From fc22b3d6507c6745911b9dfcc68f1e665ae13dbc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:43:11 +0200 Subject: Adding upstream version 4.22.0. Signed-off-by: Daniel Baumann --- upstream/opensuse-leap-15-6/man3/CPU_SET.3 | 348 +++++ upstream/opensuse-leap-15-6/man3/INFINITY.3 | 85 ++ upstream/opensuse-leap-15-6/man3/MAX.3 | 75 ++ upstream/opensuse-leap-15-6/man3/MB_CUR_MAX.3 | 43 + upstream/opensuse-leap-15-6/man3/MB_LEN_MAX.3 | 51 + upstream/opensuse-leap-15-6/man3/_Generic.3 | 64 + .../opensuse-leap-15-6/man3/__ppc_get_timebase.3 | 99 ++ .../opensuse-leap-15-6/man3/__ppc_set_ppr_med.3 | 116 ++ upstream/opensuse-leap-15-6/man3/__ppc_yield.3 | 70 + upstream/opensuse-leap-15-6/man3/__setfpucw.3 | 72 + upstream/opensuse-leap-15-6/man3/a64l.3 | 112 ++ upstream/opensuse-leap-15-6/man3/abort.3 | 96 ++ upstream/opensuse-leap-15-6/man3/abs.3 | 127 ++ upstream/opensuse-leap-15-6/man3/acos.3 | 124 ++ upstream/opensuse-leap-15-6/man3/acosh.3 | 127 ++ upstream/opensuse-leap-15-6/man3/add_wch.3ncurses | 304 +++++ .../opensuse-leap-15-6/man3/add_wchstr.3ncurses | 118 ++ upstream/opensuse-leap-15-6/man3/addch.3ncurses | 267 ++++ upstream/opensuse-leap-15-6/man3/addchstr.3ncurses | 112 ++ upstream/opensuse-leap-15-6/man3/addseverity.3 | 90 ++ upstream/opensuse-leap-15-6/man3/addstr.3ncurses | 102 ++ upstream/opensuse-leap-15-6/man3/addwstr.3ncurses | 104 ++ upstream/opensuse-leap-15-6/man3/adjtime.3 | 155 +++ upstream/opensuse-leap-15-6/man3/aio_cancel.3 | 128 ++ upstream/opensuse-leap-15-6/man3/aio_error.3 | 98 ++ upstream/opensuse-leap-15-6/man3/aio_fsync.3 | 115 ++ upstream/opensuse-leap-15-6/man3/aio_init.3 | 78 ++ upstream/opensuse-leap-15-6/man3/aio_read.3 | 162 +++ upstream/opensuse-leap-15-6/man3/aio_return.3 | 92 ++ upstream/opensuse-leap-15-6/man3/aio_suspend.3 | 146 ++ upstream/opensuse-leap-15-6/man3/aio_write.3 | 164 +++ upstream/opensuse-leap-15-6/man3/alloca.3 | 141 ++ upstream/opensuse-leap-15-6/man3/arc4random.3 | 112 ++ upstream/opensuse-leap-15-6/man3/argz_add.3 | 240 ++++ upstream/opensuse-leap-15-6/man3/asin.3 | 120 ++ upstream/opensuse-leap-15-6/man3/asinh.3 | 112 ++ upstream/opensuse-leap-15-6/man3/asprintf.3 | 73 + upstream/opensuse-leap-15-6/man3/assert.3 | 99 ++ upstream/opensuse-leap-15-6/man3/assert_perror.3 | 76 ++ upstream/opensuse-leap-15-6/man3/atan.3 | 106 ++ upstream/opensuse-leap-15-6/man3/atan2.3 | 177 +++ upstream/opensuse-leap-15-6/man3/atanh.3 | 157 +++ upstream/opensuse-leap-15-6/man3/atexit.3 | 172 +++ upstream/opensuse-leap-15-6/man3/atof.3 | 70 + upstream/opensuse-leap-15-6/man3/atoi.3 | 128 ++ upstream/opensuse-leap-15-6/man3/attr.3ncurses | 599 +++++++++ upstream/opensuse-leap-15-6/man3/attributes.3menu | 101 ++ upstream/opensuse-leap-15-6/man3/backtrace.3 | 286 ++++ upstream/opensuse-leap-15-6/man3/basename.3 | 190 +++ upstream/opensuse-leap-15-6/man3/bcmp.3 | 30 + upstream/opensuse-leap-15-6/man3/bcopy.3 | 79 ++ upstream/opensuse-leap-15-6/man3/beep.3ncurses | 57 + .../man3/bind_textdomain_codeset.3 | 72 + upstream/opensuse-leap-15-6/man3/bindresvport.3 | 117 ++ upstream/opensuse-leap-15-6/man3/bindtextdomain.3 | 69 + upstream/opensuse-leap-15-6/man3/bkgd.3ncurses | 103 ++ upstream/opensuse-leap-15-6/man3/bkgrnd.3ncurses | 111 ++ upstream/opensuse-leap-15-6/man3/border.3ncurses | 153 +++ .../opensuse-leap-15-6/man3/border_set.3ncurses | 206 +++ upstream/opensuse-leap-15-6/man3/bsd_signal.3 | 115 ++ upstream/opensuse-leap-15-6/man3/bsearch.3 | 142 ++ upstream/opensuse-leap-15-6/man3/bstring.3 | 76 ++ upstream/opensuse-leap-15-6/man3/bswap.3 | 68 + upstream/opensuse-leap-15-6/man3/btowc.3 | 89 ++ upstream/opensuse-leap-15-6/man3/btree.3 | 229 ++++ upstream/opensuse-leap-15-6/man3/byteorder.3 | 86 ++ upstream/opensuse-leap-15-6/man3/bzero.3 | 161 +++ upstream/opensuse-leap-15-6/man3/cabs.3 | 57 + upstream/opensuse-leap-15-6/man3/cacos.3 | 96 ++ upstream/opensuse-leap-15-6/man3/cacosh.3 | 98 ++ .../man3/canonicalize_file_name.3 | 83 ++ upstream/opensuse-leap-15-6/man3/carg.3 | 91 ++ upstream/opensuse-leap-15-6/man3/casin.3 | 60 + upstream/opensuse-leap-15-6/man3/casinh.3 | 64 + upstream/opensuse-leap-15-6/man3/catan.3 | 95 ++ upstream/opensuse-leap-15-6/man3/catanh.3 | 97 ++ upstream/opensuse-leap-15-6/man3/catgets.3 | 91 ++ upstream/opensuse-leap-15-6/man3/catopen.3 | 200 +++ upstream/opensuse-leap-15-6/man3/cbrt.3 | 90 ++ upstream/opensuse-leap-15-6/man3/ccos.3 | 60 + upstream/opensuse-leap-15-6/man3/ccosh.3 | 40 + upstream/opensuse-leap-15-6/man3/ceil.3 | 118 ++ upstream/opensuse-leap-15-6/man3/cexp.3 | 61 + upstream/opensuse-leap-15-6/man3/cexp2.3 | 31 + upstream/opensuse-leap-15-6/man3/cfree.3 | 135 ++ upstream/opensuse-leap-15-6/man3/cimag.3 | 61 + upstream/opensuse-leap-15-6/man3/circleq.3 | 318 +++++ upstream/opensuse-leap-15-6/man3/clear.3ncurses | 118 ++ upstream/opensuse-leap-15-6/man3/clearenv.3 | 140 ++ upstream/opensuse-leap-15-6/man3/clock.3 | 104 ++ .../opensuse-leap-15-6/man3/clock_getcpuclockid.3 | 158 +++ upstream/opensuse-leap-15-6/man3/clog.3 | 74 ++ upstream/opensuse-leap-15-6/man3/clog10.3 | 78 ++ upstream/opensuse-leap-15-6/man3/clog2.3 | 45 + upstream/opensuse-leap-15-6/man3/closedir.3 | 78 ++ upstream/opensuse-leap-15-6/man3/cmsg.3 | 266 ++++ upstream/opensuse-leap-15-6/man3/color.3ncurses | 430 ++++++ upstream/opensuse-leap-15-6/man3/confstr.3 | 159 +++ upstream/opensuse-leap-15-6/man3/conj.3 | 59 + upstream/opensuse-leap-15-6/man3/copysign.3 | 95 ++ upstream/opensuse-leap-15-6/man3/cos.3 | 121 ++ upstream/opensuse-leap-15-6/man3/cosh.3 | 133 ++ upstream/opensuse-leap-15-6/man3/cpow.3 | 56 + upstream/opensuse-leap-15-6/man3/cproj.3 | 62 + upstream/opensuse-leap-15-6/man3/creal.3 | 59 + upstream/opensuse-leap-15-6/man3/csin.3 | 60 + upstream/opensuse-leap-15-6/man3/csinh.3 | 60 + upstream/opensuse-leap-15-6/man3/csqrt.3 | 54 + upstream/opensuse-leap-15-6/man3/ctan.3 | 60 + upstream/opensuse-leap-15-6/man3/ctanh.3 | 61 + upstream/opensuse-leap-15-6/man3/ctermid.3 | 76 ++ upstream/opensuse-leap-15-6/man3/ctime.3 | 414 ++++++ .../man3/curses_variables.3ncurses | 151 +++ upstream/opensuse-leap-15-6/man3/cursor.3form | 69 + upstream/opensuse-leap-15-6/man3/cursor.3menu | 67 + upstream/opensuse-leap-15-6/man3/daemon.3 | 132 ++ upstream/opensuse-leap-15-6/man3/data.3form | 58 + upstream/opensuse-leap-15-6/man3/dbopen.3 | 536 ++++++++ .../man3/default_colors.3ncurses | 133 ++ .../opensuse-leap-15-6/man3/define_key.3ncurses | 63 + upstream/opensuse-leap-15-6/man3/delch.3ncurses | 68 + upstream/opensuse-leap-15-6/man3/deleteln.3ncurses | 85 ++ upstream/opensuse-leap-15-6/man3/des_crypt.3 | 167 +++ upstream/opensuse-leap-15-6/man3/difftime.3 | 72 + upstream/opensuse-leap-15-6/man3/dirfd.3 | 96 ++ upstream/opensuse-leap-15-6/man3/div.3 | 108 ++ upstream/opensuse-leap-15-6/man3/dl_iterate_phdr.3 | 348 +++++ upstream/opensuse-leap-15-6/man3/dladdr.3 | 278 ++++ upstream/opensuse-leap-15-6/man3/dlerror.3 | 81 ++ upstream/opensuse-leap-15-6/man3/dlinfo.3 | 320 +++++ upstream/opensuse-leap-15-6/man3/dlopen.3 | 627 +++++++++ upstream/opensuse-leap-15-6/man3/dlsym.3 | 174 +++ upstream/opensuse-leap-15-6/man3/drand48.3 | 263 ++++ upstream/opensuse-leap-15-6/man3/drand48_r.3 | 107 ++ upstream/opensuse-leap-15-6/man3/driver.3form | 261 ++++ upstream/opensuse-leap-15-6/man3/driver.3menu | 201 +++ upstream/opensuse-leap-15-6/man3/duplocale.3 | 168 +++ upstream/opensuse-leap-15-6/man3/dysize.3 | 72 + upstream/opensuse-leap-15-6/man3/ecvt.3 | 134 ++ upstream/opensuse-leap-15-6/man3/ecvt_r.3 | 103 ++ upstream/opensuse-leap-15-6/man3/encrypt.3 | 212 +++ upstream/opensuse-leap-15-6/man3/end.3 | 96 ++ upstream/opensuse-leap-15-6/man3/endian.3 | 164 +++ upstream/opensuse-leap-15-6/man3/envz_add.3 | 171 +++ upstream/opensuse-leap-15-6/man3/erf.3 | 134 ++ upstream/opensuse-leap-15-6/man3/erfc.3 | 137 ++ upstream/opensuse-leap-15-6/man3/err.3 | 157 +++ upstream/opensuse-leap-15-6/man3/errno.3 | 655 +++++++++ upstream/opensuse-leap-15-6/man3/error.3 | 170 +++ upstream/opensuse-leap-15-6/man3/ether_aton.3 | 144 ++ upstream/opensuse-leap-15-6/man3/euidaccess.3 | 107 ++ upstream/opensuse-leap-15-6/man3/exec.3 | 312 +++++ upstream/opensuse-leap-15-6/man3/exit.3 | 205 +++ upstream/opensuse-leap-15-6/man3/exp.3 | 136 ++ upstream/opensuse-leap-15-6/man3/exp10.3 | 85 ++ upstream/opensuse-leap-15-6/man3/exp2.3 | 95 ++ upstream/opensuse-leap-15-6/man3/expm1.3 | 168 +++ .../opensuse-leap-15-6/man3/extensions.3ncurses | 86 ++ upstream/opensuse-leap-15-6/man3/fabs.3 | 95 ++ upstream/opensuse-leap-15-6/man3/fclose.3 | 105 ++ upstream/opensuse-leap-15-6/man3/fcloseall.3 | 67 + upstream/opensuse-leap-15-6/man3/fdim.3 | 99 ++ upstream/opensuse-leap-15-6/man3/fenv.3 | 335 +++++ upstream/opensuse-leap-15-6/man3/ferror.3 | 121 ++ upstream/opensuse-leap-15-6/man3/fexecve.3 | 175 +++ upstream/opensuse-leap-15-6/man3/fflush.3 | 118 ++ upstream/opensuse-leap-15-6/man3/ffs.3 | 106 ++ upstream/opensuse-leap-15-6/man3/fgetc.3 | 155 +++ upstream/opensuse-leap-15-6/man3/fgetgrent.3 | 121 ++ upstream/opensuse-leap-15-6/man3/fgetpwent.3 | 130 ++ upstream/opensuse-leap-15-6/man3/fgetwc.3 | 109 ++ upstream/opensuse-leap-15-6/man3/fgetws.3 | 94 ++ upstream/opensuse-leap-15-6/man3/field.3form | 92 ++ .../opensuse-leap-15-6/man3/field_attributes.3form | 86 ++ .../opensuse-leap-15-6/man3/field_buffer.3form | 133 ++ upstream/opensuse-leap-15-6/man3/field_info.3form | 80 ++ upstream/opensuse-leap-15-6/man3/field_just.3form | 73 + upstream/opensuse-leap-15-6/man3/field_new.3form | 103 ++ upstream/opensuse-leap-15-6/man3/field_opts.3form | 130 ++ .../opensuse-leap-15-6/man3/field_userptr.3form | 64 + .../opensuse-leap-15-6/man3/field_validation.3form | 138 ++ upstream/opensuse-leap-15-6/man3/fieldtype.3form | 142 ++ upstream/opensuse-leap-15-6/man3/filefuncs.3am | 371 ++++++ upstream/opensuse-leap-15-6/man3/fileno.3 | 92 ++ upstream/opensuse-leap-15-6/man3/finite.3 | 146 ++ upstream/opensuse-leap-15-6/man3/flockfile.3 | 136 ++ upstream/opensuse-leap-15-6/man3/floor.3 | 108 ++ upstream/opensuse-leap-15-6/man3/fma.3 | 170 +++ upstream/opensuse-leap-15-6/man3/fmax.3 | 76 ++ upstream/opensuse-leap-15-6/man3/fmemopen.3 | 355 +++++ upstream/opensuse-leap-15-6/man3/fmin.3 | 76 ++ upstream/opensuse-leap-15-6/man3/fmod.3 | 157 +++ upstream/opensuse-leap-15-6/man3/fmtmsg.3 | 338 +++++ upstream/opensuse-leap-15-6/man3/fnmatch.3 | 144 ++ upstream/opensuse-leap-15-6/man3/fnmatch.3am | 126 ++ upstream/opensuse-leap-15-6/man3/fopen.3 | 408 ++++++ upstream/opensuse-leap-15-6/man3/fopencookie.3 | 458 +++++++ upstream/opensuse-leap-15-6/man3/fork.3am | 99 ++ upstream/opensuse-leap-15-6/man3/form.3form | 236 ++++ .../opensuse-leap-15-6/man3/form_variables.3form | 79 ++ upstream/opensuse-leap-15-6/man3/format.3menu | 82 ++ upstream/opensuse-leap-15-6/man3/fpathconf.3 | 276 ++++ upstream/opensuse-leap-15-6/man3/fpclassify.3 | 148 +++ upstream/opensuse-leap-15-6/man3/fpurge.3 | 86 ++ upstream/opensuse-leap-15-6/man3/fputwc.3 | 107 ++ upstream/opensuse-leap-15-6/man3/fputws.3 | 81 ++ upstream/opensuse-leap-15-6/man3/fread.3 | 167 +++ upstream/opensuse-leap-15-6/man3/frexp.3 | 145 ++ upstream/opensuse-leap-15-6/man3/fseek.3 | 180 +++ upstream/opensuse-leap-15-6/man3/fseeko.3 | 105 ++ upstream/opensuse-leap-15-6/man3/ftime.3 | 108 ++ upstream/opensuse-leap-15-6/man3/ftok.3 | 113 ++ upstream/opensuse-leap-15-6/man3/fts.3 | 812 ++++++++++++ upstream/opensuse-leap-15-6/man3/ftw.3 | 503 +++++++ upstream/opensuse-leap-15-6/man3/futimes.3 | 109 ++ upstream/opensuse-leap-15-6/man3/fwide.3 | 92 ++ upstream/opensuse-leap-15-6/man3/gamma.3 | 124 ++ upstream/opensuse-leap-15-6/man3/gcvt.3 | 85 ++ upstream/opensuse-leap-15-6/man3/get_nprocs.3 | 96 ++ upstream/opensuse-leap-15-6/man3/get_phys_pages.3 | 90 ++ upstream/opensuse-leap-15-6/man3/get_wch.3ncurses | 180 +++ upstream/opensuse-leap-15-6/man3/get_wstr.3ncurses | 186 +++ upstream/opensuse-leap-15-6/man3/getaddrinfo.3 | 854 ++++++++++++ upstream/opensuse-leap-15-6/man3/getaddrinfo_a.3 | 614 +++++++++ upstream/opensuse-leap-15-6/man3/getauxval.3 | 275 ++++ upstream/opensuse-leap-15-6/man3/getcchar.3ncurses | 154 +++ upstream/opensuse-leap-15-6/man3/getch.3ncurses | 407 ++++++ upstream/opensuse-leap-15-6/man3/getcontext.3 | 204 +++ upstream/opensuse-leap-15-6/man3/getcwd.3 | 312 +++++ upstream/opensuse-leap-15-6/man3/getdate.3 | 317 +++++ upstream/opensuse-leap-15-6/man3/getdirentries.3 | 83 ++ upstream/opensuse-leap-15-6/man3/getdtablesize.3 | 91 ++ upstream/opensuse-leap-15-6/man3/getentropy.3 | 103 ++ upstream/opensuse-leap-15-6/man3/getenv.3 | 144 ++ upstream/opensuse-leap-15-6/man3/getfsent.3 | 152 +++ upstream/opensuse-leap-15-6/man3/getgrent.3 | 203 +++ upstream/opensuse-leap-15-6/man3/getgrent_r.3 | 224 ++++ upstream/opensuse-leap-15-6/man3/getgrnam.3 | 255 ++++ upstream/opensuse-leap-15-6/man3/getgrouplist.3 | 203 +++ upstream/opensuse-leap-15-6/man3/gethostbyname.3 | 533 ++++++++ upstream/opensuse-leap-15-6/man3/gethostid.3 | 146 ++ upstream/opensuse-leap-15-6/man3/getipnodebyname.3 | 253 ++++ upstream/opensuse-leap-15-6/man3/getline.3 | 185 +++ upstream/opensuse-leap-15-6/man3/getloadavg.3 | 74 ++ upstream/opensuse-leap-15-6/man3/getlogin.3 | 251 ++++ upstream/opensuse-leap-15-6/man3/getmntent.3 | 258 ++++ upstream/opensuse-leap-15-6/man3/getnameinfo.3 | 346 +++++ upstream/opensuse-leap-15-6/man3/getnetent.3 | 194 +++ upstream/opensuse-leap-15-6/man3/getnetent_r.3 | 153 +++ upstream/opensuse-leap-15-6/man3/getopt.3 | 578 ++++++++ upstream/opensuse-leap-15-6/man3/getpass.3 | 153 +++ upstream/opensuse-leap-15-6/man3/getprotoent.3 | 180 +++ upstream/opensuse-leap-15-6/man3/getprotoent_r.3 | 246 ++++ upstream/opensuse-leap-15-6/man3/getpt.3 | 77 ++ upstream/opensuse-leap-15-6/man3/getpw.3 | 128 ++ upstream/opensuse-leap-15-6/man3/getpwent.3 | 187 +++ upstream/opensuse-leap-15-6/man3/getpwent_r.3 | 225 ++++ upstream/opensuse-leap-15-6/man3/getpwnam.3 | 343 +++++ upstream/opensuse-leap-15-6/man3/getrpcent.3 | 137 ++ upstream/opensuse-leap-15-6/man3/getrpcent_r.3 | 139 ++ upstream/opensuse-leap-15-6/man3/getrpcport.3 | 62 + upstream/opensuse-leap-15-6/man3/gets.3 | 110 ++ upstream/opensuse-leap-15-6/man3/getservent.3 | 197 +++ upstream/opensuse-leap-15-6/man3/getservent_r.3 | 252 ++++ upstream/opensuse-leap-15-6/man3/getspnam.3 | 320 +++++ upstream/opensuse-leap-15-6/man3/getstr.3ncurses | 131 ++ upstream/opensuse-leap-15-6/man3/getsubopt.3 | 254 ++++ upstream/opensuse-leap-15-6/man3/gettext.3 | 99 ++ upstream/opensuse-leap-15-6/man3/getttyent.3 | 103 ++ upstream/opensuse-leap-15-6/man3/getusershell.3 | 101 ++ upstream/opensuse-leap-15-6/man3/getutent.3 | 345 +++++ upstream/opensuse-leap-15-6/man3/getutmp.3 | 74 ++ upstream/opensuse-leap-15-6/man3/getw.3 | 87 ++ upstream/opensuse-leap-15-6/man3/getwchar.3 | 90 ++ upstream/opensuse-leap-15-6/man3/getyx.3ncurses | 100 ++ upstream/opensuse-leap-15-6/man3/glob.3 | 351 +++++ .../opensuse-leap-15-6/man3/gnu_get_libc_version.3 | 82 ++ upstream/opensuse-leap-15-6/man3/grantpt.3 | 112 ++ upstream/opensuse-leap-15-6/man3/group_member.3 | 48 + upstream/opensuse-leap-15-6/man3/gsignal.3 | 119 ++ upstream/opensuse-leap-15-6/man3/hash.3 | 145 ++ upstream/opensuse-leap-15-6/man3/hook.3form | 94 ++ upstream/opensuse-leap-15-6/man3/hook.3menu | 95 ++ upstream/opensuse-leap-15-6/man3/hsearch.3 | 356 +++++ upstream/opensuse-leap-15-6/man3/hypot.3 | 158 +++ upstream/opensuse-leap-15-6/man3/iconv.3 | 200 +++ upstream/opensuse-leap-15-6/man3/iconv_close.3 | 59 + upstream/opensuse-leap-15-6/man3/iconv_open.3 | 128 ++ upstream/opensuse-leap-15-6/man3/if_nameindex.3 | 157 +++ upstream/opensuse-leap-15-6/man3/if_nametoindex.3 | 102 ++ upstream/opensuse-leap-15-6/man3/ilogb.3 | 153 +++ upstream/opensuse-leap-15-6/man3/in_wch.3ncurses | 66 + .../opensuse-leap-15-6/man3/in_wchstr.3ncurses | 120 ++ upstream/opensuse-leap-15-6/man3/inch.3ncurses | 112 ++ upstream/opensuse-leap-15-6/man3/inchstr.3ncurses | 109 ++ upstream/opensuse-leap-15-6/man3/index.3 | 44 + upstream/opensuse-leap-15-6/man3/inet.3 | 337 +++++ upstream/opensuse-leap-15-6/man3/inet_net_pton.3 | 369 ++++++ upstream/opensuse-leap-15-6/man3/inet_ntop.3 | 125 ++ upstream/opensuse-leap-15-6/man3/inet_pton.3 | 226 ++++ upstream/opensuse-leap-15-6/man3/initgroups.3 | 101 ++ upstream/opensuse-leap-15-6/man3/initscr.3ncurses | 255 ++++ upstream/opensuse-leap-15-6/man3/inopts.3ncurses | 348 +++++ upstream/opensuse-leap-15-6/man3/inplace.3am | 91 ++ upstream/opensuse-leap-15-6/man3/ins_wch.3ncurses | 63 + upstream/opensuse-leap-15-6/man3/ins_wstr.3ncurses | 106 ++ upstream/opensuse-leap-15-6/man3/insch.3ncurses | 73 + upstream/opensuse-leap-15-6/man3/insque.3 | 251 ++++ upstream/opensuse-leap-15-6/man3/insstr.3ncurses | 100 ++ upstream/opensuse-leap-15-6/man3/instr.3ncurses | 97 ++ upstream/opensuse-leap-15-6/man3/intro.3 | 135 ++ upstream/opensuse-leap-15-6/man3/inwstr.3ncurses | 99 ++ upstream/opensuse-leap-15-6/man3/isalpha.3 | 408 ++++++ upstream/opensuse-leap-15-6/man3/isatty.3 | 71 + upstream/opensuse-leap-15-6/man3/isfdtype.3 | 77 ++ upstream/opensuse-leap-15-6/man3/isgreater.3 | 147 +++ upstream/opensuse-leap-15-6/man3/iswalnum.3 | 98 ++ upstream/opensuse-leap-15-6/man3/iswalpha.3 | 99 ++ upstream/opensuse-leap-15-6/man3/iswblank.3 | 92 ++ upstream/opensuse-leap-15-6/man3/iswcntrl.3 | 83 ++ upstream/opensuse-leap-15-6/man3/iswctype.3 | 97 ++ upstream/opensuse-leap-15-6/man3/iswdigit.3 | 98 ++ upstream/opensuse-leap-15-6/man3/iswgraph.3 | 91 ++ upstream/opensuse-leap-15-6/man3/iswlower.3 | 109 ++ upstream/opensuse-leap-15-6/man3/iswprint.3 | 77 ++ upstream/opensuse-leap-15-6/man3/iswpunct.3 | 93 ++ upstream/opensuse-leap-15-6/man3/iswspace.3 | 86 ++ upstream/opensuse-leap-15-6/man3/iswupper.3 | 103 ++ upstream/opensuse-leap-15-6/man3/iswxdigit.3 | 90 ++ upstream/opensuse-leap-15-6/man3/items.3menu | 89 ++ upstream/opensuse-leap-15-6/man3/j0.3 | 194 +++ upstream/opensuse-leap-15-6/man3/kernel.3ncurses | 208 +++ .../opensuse-leap-15-6/man3/key_defined.3ncurses | 54 + upstream/opensuse-leap-15-6/man3/key_setsecret.3 | 90 ++ upstream/opensuse-leap-15-6/man3/keybound.3ncurses | 58 + upstream/opensuse-leap-15-6/man3/keyok.3ncurses | 57 + upstream/opensuse-leap-15-6/man3/killpg.3 | 113 ++ upstream/opensuse-leap-15-6/man3/ldexp.3 | 134 ++ upstream/opensuse-leap-15-6/man3/legacy.3ncurses | 107 ++ .../opensuse-leap-15-6/man3/legacy_coding.3ncurses | 74 ++ upstream/opensuse-leap-15-6/man3/lgamma.3 | 202 +++ upstream/opensuse-leap-15-6/man3/libblkid.3 | 74 ++ upstream/opensuse-leap-15-6/man3/lio_listio.3 | 227 ++++ upstream/opensuse-leap-15-6/man3/list.3 | 308 +++++ upstream/opensuse-leap-15-6/man3/localeconv.3 | 84 ++ upstream/opensuse-leap-15-6/man3/lockf.3 | 181 +++ upstream/opensuse-leap-15-6/man3/log.3 | 143 ++ upstream/opensuse-leap-15-6/man3/log10.3 | 97 ++ upstream/opensuse-leap-15-6/man3/log1p.3 | 153 +++ upstream/opensuse-leap-15-6/man3/log2.3 | 96 ++ upstream/opensuse-leap-15-6/man3/logb.3 | 144 ++ upstream/opensuse-leap-15-6/man3/login.3 | 151 +++ upstream/opensuse-leap-15-6/man3/lrint.3 | 113 ++ upstream/opensuse-leap-15-6/man3/lround.3 | 116 ++ upstream/opensuse-leap-15-6/man3/lsearch.3 | 97 ++ upstream/opensuse-leap-15-6/man3/lseek64.3 | 209 +++ upstream/opensuse-leap-15-6/man3/makecontext.3 | 233 ++++ upstream/opensuse-leap-15-6/man3/makedev.3 | 95 ++ upstream/opensuse-leap-15-6/man3/mallinfo.3 | 338 +++++ upstream/opensuse-leap-15-6/man3/malloc.3 | 459 +++++++ .../opensuse-leap-15-6/man3/malloc_get_state.3 | 118 ++ upstream/opensuse-leap-15-6/man3/malloc_hook.3 | 154 +++ upstream/opensuse-leap-15-6/man3/malloc_info.3 | 260 ++++ upstream/opensuse-leap-15-6/man3/malloc_stats.3 | 68 + upstream/opensuse-leap-15-6/man3/malloc_trim.3 | 84 ++ .../opensuse-leap-15-6/man3/malloc_usable_size.3 | 66 + upstream/opensuse-leap-15-6/man3/mallopt.3 | 619 +++++++++ upstream/opensuse-leap-15-6/man3/mark.3menu | 81 ++ upstream/opensuse-leap-15-6/man3/matherr.3 | 431 ++++++ upstream/opensuse-leap-15-6/man3/mblen.3 | 120 ++ upstream/opensuse-leap-15-6/man3/mbrlen.3 | 133 ++ upstream/opensuse-leap-15-6/man3/mbrtowc.3 | 204 +++ upstream/opensuse-leap-15-6/man3/mbsinit.3 | 120 ++ upstream/opensuse-leap-15-6/man3/mbsnrtowcs.3 | 200 +++ upstream/opensuse-leap-15-6/man3/mbsrtowcs.3 | 164 +++ upstream/opensuse-leap-15-6/man3/mbstowcs.3 | 244 ++++ upstream/opensuse-leap-15-6/man3/mbtowc.3 | 153 +++ upstream/opensuse-leap-15-6/man3/mcheck.3 | 214 +++ upstream/opensuse-leap-15-6/man3/memccpy.3 | 82 ++ upstream/opensuse-leap-15-6/man3/memchr.3 | 145 ++ upstream/opensuse-leap-15-6/man3/memcmp.3 | 86 ++ upstream/opensuse-leap-15-6/man3/memcpy.3 | 109 ++ upstream/opensuse-leap-15-6/man3/memfrob.3 | 63 + upstream/opensuse-leap-15-6/man3/memleaks.3ncurses | 91 ++ upstream/opensuse-leap-15-6/man3/memmem.3 | 92 ++ upstream/opensuse-leap-15-6/man3/memmove.3 | 74 ++ upstream/opensuse-leap-15-6/man3/mempcpy.3 | 97 ++ upstream/opensuse-leap-15-6/man3/memset.3 | 63 + upstream/opensuse-leap-15-6/man3/menu.3menu | 206 +++ .../opensuse-leap-15-6/man3/menu_current.3menu | 96 ++ upstream/opensuse-leap-15-6/man3/menu_name.3menu | 60 + upstream/opensuse-leap-15-6/man3/menu_new.3menu | 85 ++ upstream/opensuse-leap-15-6/man3/menu_opts.3menu | 81 ++ .../opensuse-leap-15-6/man3/menu_userptr.3menu | 65 + upstream/opensuse-leap-15-6/man3/menu_value.3menu | 71 + .../opensuse-leap-15-6/man3/menu_visible.3menu | 53 + upstream/opensuse-leap-15-6/man3/mkdtemp.3 | 90 ++ upstream/opensuse-leap-15-6/man3/mkfifo.3 | 204 +++ upstream/opensuse-leap-15-6/man3/mkstemp.3 | 250 ++++ upstream/opensuse-leap-15-6/man3/mktemp.3 | 121 ++ upstream/opensuse-leap-15-6/man3/modf.3 | 97 ++ upstream/opensuse-leap-15-6/man3/mouse.3ncurses | 404 ++++++ upstream/opensuse-leap-15-6/man3/move.3ncurses | 63 + upstream/opensuse-leap-15-6/man3/mpool.3 | 205 +++ upstream/opensuse-leap-15-6/man3/mq_close.3 | 73 + upstream/opensuse-leap-15-6/man3/mq_getattr.3 | 232 ++++ upstream/opensuse-leap-15-6/man3/mq_notify.3 | 276 ++++ upstream/opensuse-leap-15-6/man3/mq_open.3 | 301 +++++ upstream/opensuse-leap-15-6/man3/mq_receive.3 | 166 +++ upstream/opensuse-leap-15-6/man3/mq_send.3 | 173 +++ upstream/opensuse-leap-15-6/man3/mq_unlink.3 | 71 + upstream/opensuse-leap-15-6/man3/mtrace.3 | 183 +++ upstream/opensuse-leap-15-6/man3/nan.3 | 99 ++ upstream/opensuse-leap-15-6/man3/ncurses.3ncurses | 1388 ++++++++++++++++++++ upstream/opensuse-leap-15-6/man3/netlink.3 | 87 ++ upstream/opensuse-leap-15-6/man3/new.3form | 84 ++ upstream/opensuse-leap-15-6/man3/new.3menu | 81 ++ upstream/opensuse-leap-15-6/man3/new_page.3form | 72 + upstream/opensuse-leap-15-6/man3/new_pair.3ncurses | 158 +++ upstream/opensuse-leap-15-6/man3/newlocale.3 | 356 +++++ upstream/opensuse-leap-15-6/man3/nextafter.3 | 203 +++ upstream/opensuse-leap-15-6/man3/nextup.3 | 97 ++ upstream/opensuse-leap-15-6/man3/ngettext.3 | 60 + upstream/opensuse-leap-15-6/man3/nl_langinfo.3 | 356 +++++ upstream/opensuse-leap-15-6/man3/ntp_gettime.3 | 138 ++ upstream/opensuse-leap-15-6/man3/offsetof.3 | 110 ++ upstream/opensuse-leap-15-6/man3/on_exit.3 | 108 ++ upstream/opensuse-leap-15-6/man3/opaque.3ncurses | 154 +++ upstream/opensuse-leap-15-6/man3/open_memstream.3 | 144 ++ upstream/opensuse-leap-15-6/man3/opendir.3 | 148 +++ upstream/opensuse-leap-15-6/man3/openpty.3 | 180 +++ upstream/opensuse-leap-15-6/man3/opts.3form | 87 ++ upstream/opensuse-leap-15-6/man3/opts.3menu | 107 ++ upstream/opensuse-leap-15-6/man3/ordchr.3am | 79 ++ upstream/opensuse-leap-15-6/man3/outopts.3ncurses | 231 ++++ upstream/opensuse-leap-15-6/man3/overlay.3ncurses | 87 ++ upstream/opensuse-leap-15-6/man3/pad.3ncurses | 237 ++++ upstream/opensuse-leap-15-6/man3/page.3form | 98 ++ upstream/opensuse-leap-15-6/man3/panel.3curses | 204 +++ upstream/opensuse-leap-15-6/man3/pattern.3menu | 86 ++ upstream/opensuse-leap-15-6/man3/perror.3 | 145 ++ upstream/opensuse-leap-15-6/man3/popen.3 | 211 +++ upstream/opensuse-leap-15-6/man3/posix_fallocate.3 | 182 +++ upstream/opensuse-leap-15-6/man3/posix_madvise.3 | 112 ++ upstream/opensuse-leap-15-6/man3/posix_memalign.3 | 280 ++++ upstream/opensuse-leap-15-6/man3/posix_openpt.3 | 110 ++ upstream/opensuse-leap-15-6/man3/posix_spawn.3 | 823 ++++++++++++ upstream/opensuse-leap-15-6/man3/post.3form | 86 ++ upstream/opensuse-leap-15-6/man3/post.3menu | 86 ++ upstream/opensuse-leap-15-6/man3/pow.3 | 386 ++++++ upstream/opensuse-leap-15-6/man3/pow10.3 | 59 + upstream/opensuse-leap-15-6/man3/powerof2.3 | 46 + upstream/opensuse-leap-15-6/man3/print.3ncurses | 68 + upstream/opensuse-leap-15-6/man3/printf.3 | 1242 ++++++++++++++++++ upstream/opensuse-leap-15-6/man3/printw.3ncurses | 92 ++ upstream/opensuse-leap-15-6/man3/profil.3 | 97 ++ .../man3/program_invocation_name.3 | 66 + upstream/opensuse-leap-15-6/man3/psignal.3 | 117 ++ upstream/opensuse-leap-15-6/man3/pthread_atfork.3 | 108 ++ .../opensuse-leap-15-6/man3/pthread_attr_init.3 | 316 +++++ .../man3/pthread_attr_setaffinity_np.3 | 123 ++ .../man3/pthread_attr_setdetachstate.3 | 118 ++ .../man3/pthread_attr_setguardsize.3 | 166 +++ .../man3/pthread_attr_setinheritsched.3 | 143 ++ .../man3/pthread_attr_setschedparam.3 | 128 ++ .../man3/pthread_attr_setschedpolicy.3 | 115 ++ .../man3/pthread_attr_setscope.3 | 142 ++ .../man3/pthread_attr_setsigmask_np.3 | 133 ++ .../man3/pthread_attr_setstack.3 | 167 +++ .../man3/pthread_attr_setstackaddr.3 | 118 ++ .../man3/pthread_attr_setstacksize.3 | 117 ++ upstream/opensuse-leap-15-6/man3/pthread_cancel.3 | 240 ++++ .../opensuse-leap-15-6/man3/pthread_cleanup_push.3 | 322 +++++ .../man3/pthread_cleanup_push_defer_np.3 | 100 ++ upstream/opensuse-leap-15-6/man3/pthread_create.3 | 412 ++++++ upstream/opensuse-leap-15-6/man3/pthread_detach.3 | 108 ++ upstream/opensuse-leap-15-6/man3/pthread_equal.3 | 60 + upstream/opensuse-leap-15-6/man3/pthread_exit.3 | 109 ++ .../man3/pthread_getattr_default_np.3 | 195 +++ .../opensuse-leap-15-6/man3/pthread_getattr_np.3 | 359 +++++ .../man3/pthread_getcpuclockid.3 | 183 +++ upstream/opensuse-leap-15-6/man3/pthread_join.3 | 137 ++ upstream/opensuse-leap-15-6/man3/pthread_kill.3 | 111 ++ .../man3/pthread_kill_other_threads_np.3 | 72 + .../man3/pthread_mutex_consistent.3 | 86 ++ .../man3/pthread_mutexattr_getpshared.3 | 82 ++ .../man3/pthread_mutexattr_init.3 | 53 + .../man3/pthread_mutexattr_setrobust.3 | 264 ++++ .../man3/pthread_rwlockattr_setkind_np.3 | 119 ++ upstream/opensuse-leap-15-6/man3/pthread_self.3 | 80 ++ .../man3/pthread_setaffinity_np.3 | 210 +++ .../man3/pthread_setcancelstate.3 | 198 +++ .../man3/pthread_setconcurrency.3 | 103 ++ .../opensuse-leap-15-6/man3/pthread_setname_np.3 | 205 +++ .../man3/pthread_setschedparam.3 | 450 +++++++ .../opensuse-leap-15-6/man3/pthread_setschedprio.3 | 104 ++ upstream/opensuse-leap-15-6/man3/pthread_sigmask.3 | 165 +++ .../opensuse-leap-15-6/man3/pthread_sigqueue.3 | 112 ++ .../opensuse-leap-15-6/man3/pthread_spin_init.3 | 148 +++ .../opensuse-leap-15-6/man3/pthread_spin_lock.3 | 102 ++ .../opensuse-leap-15-6/man3/pthread_testcancel.3 | 67 + .../opensuse-leap-15-6/man3/pthread_tryjoin_np.3 | 157 +++ upstream/opensuse-leap-15-6/man3/pthread_yield.3 | 81 ++ upstream/opensuse-leap-15-6/man3/ptsname.3 | 147 +++ upstream/opensuse-leap-15-6/man3/putenv.3 | 143 ++ upstream/opensuse-leap-15-6/man3/putgrent.3 | 69 + upstream/opensuse-leap-15-6/man3/putpwent.3 | 99 ++ upstream/opensuse-leap-15-6/man3/puts.3 | 127 ++ upstream/opensuse-leap-15-6/man3/putwchar.3 | 95 ++ upstream/opensuse-leap-15-6/man3/qecvt.3 | 109 ++ upstream/opensuse-leap-15-6/man3/qsort.3 | 160 +++ upstream/opensuse-leap-15-6/man3/raise.3 | 86 ++ upstream/opensuse-leap-15-6/man3/rand.3 | 243 ++++ upstream/opensuse-leap-15-6/man3/random.3 | 196 +++ upstream/opensuse-leap-15-6/man3/random_r.3 | 179 +++ upstream/opensuse-leap-15-6/man3/rcmd.3 | 303 +++++ upstream/opensuse-leap-15-6/man3/re_comp.3 | 78 ++ upstream/opensuse-leap-15-6/man3/readdir.3 | 307 +++++ upstream/opensuse-leap-15-6/man3/readdir.3am | 106 ++ upstream/opensuse-leap-15-6/man3/readdir_r.3 | 148 +++ upstream/opensuse-leap-15-6/man3/readfile.3am | 88 ++ upstream/opensuse-leap-15-6/man3/realpath.3 | 234 ++++ upstream/opensuse-leap-15-6/man3/recno.3 | 207 +++ upstream/opensuse-leap-15-6/man3/refresh.3ncurses | 143 ++ upstream/opensuse-leap-15-6/man3/regex.3 | 380 ++++++ upstream/opensuse-leap-15-6/man3/remainder.3 | 237 ++++ upstream/opensuse-leap-15-6/man3/remove.3 | 96 ++ upstream/opensuse-leap-15-6/man3/remquo.3 | 141 ++ upstream/opensuse-leap-15-6/man3/requestname.3form | 65 + upstream/opensuse-leap-15-6/man3/requestname.3menu | 66 + .../opensuse-leap-15-6/man3/resizeterm.3ncurses | 130 ++ upstream/opensuse-leap-15-6/man3/resolver.3 | 512 ++++++++ upstream/opensuse-leap-15-6/man3/revoutput.3am | 77 ++ upstream/opensuse-leap-15-6/man3/revtwoway.3am | 65 + upstream/opensuse-leap-15-6/man3/rewinddir.3 | 63 + upstream/opensuse-leap-15-6/man3/rexec.3 | 164 +++ upstream/opensuse-leap-15-6/man3/rint.3 | 148 +++ upstream/opensuse-leap-15-6/man3/round.3 | 113 ++ upstream/opensuse-leap-15-6/man3/roundup.3 | 56 + upstream/opensuse-leap-15-6/man3/rpc.3 | 1204 +++++++++++++++++ upstream/opensuse-leap-15-6/man3/rpmatch.3 | 172 +++ upstream/opensuse-leap-15-6/man3/rquota.3 | 34 + upstream/opensuse-leap-15-6/man3/rtime.3 | 155 +++ upstream/opensuse-leap-15-6/man3/rtnetlink.3 | 127 ++ upstream/opensuse-leap-15-6/man3/rwarray.3am | 104 ++ upstream/opensuse-leap-15-6/man3/scalb.3 | 199 +++ upstream/opensuse-leap-15-6/man3/scalbln.3 | 177 +++ upstream/opensuse-leap-15-6/man3/scandir.3 | 311 +++++ upstream/opensuse-leap-15-6/man3/scanf.3 | 145 ++ upstream/opensuse-leap-15-6/man3/scanw.3ncurses | 95 ++ upstream/opensuse-leap-15-6/man3/sched_getcpu.3 | 92 ++ upstream/opensuse-leap-15-6/man3/scr_dump.3ncurses | 100 ++ upstream/opensuse-leap-15-6/man3/scroll.3ncurses | 90 ++ upstream/opensuse-leap-15-6/man3/seekdir.3 | 92 ++ upstream/opensuse-leap-15-6/man3/sem_close.3 | 66 + upstream/opensuse-leap-15-6/man3/sem_destroy.3 | 78 ++ upstream/opensuse-leap-15-6/man3/sem_getvalue.3 | 77 ++ upstream/opensuse-leap-15-6/man3/sem_init.3 | 111 ++ upstream/opensuse-leap-15-6/man3/sem_open.3 | 178 +++ upstream/opensuse-leap-15-6/man3/sem_post.3 | 76 ++ upstream/opensuse-leap-15-6/man3/sem_unlink.3 | 69 + upstream/opensuse-leap-15-6/man3/sem_wait.3 | 254 ++++ upstream/opensuse-leap-15-6/man3/setaliasent.3 | 185 +++ upstream/opensuse-leap-15-6/man3/setbuf.3 | 230 ++++ upstream/opensuse-leap-15-6/man3/setenv.3 | 153 +++ upstream/opensuse-leap-15-6/man3/setjmp.3 | 333 +++++ upstream/opensuse-leap-15-6/man3/setlocale.3 | 255 ++++ upstream/opensuse-leap-15-6/man3/setlogmask.3 | 88 ++ upstream/opensuse-leap-15-6/man3/setnetgrent.3 | 166 +++ upstream/opensuse-leap-15-6/man3/shm_open.3 | 511 +++++++ upstream/opensuse-leap-15-6/man3/siginterrupt.3 | 99 ++ upstream/opensuse-leap-15-6/man3/signbit.3 | 82 ++ upstream/opensuse-leap-15-6/man3/significand.3 | 80 ++ upstream/opensuse-leap-15-6/man3/sigpause.3 | 128 ++ upstream/opensuse-leap-15-6/man3/sigqueue.3 | 165 +++ upstream/opensuse-leap-15-6/man3/sigset.3 | 268 ++++ upstream/opensuse-leap-15-6/man3/sigsetops.3 | 193 +++ upstream/opensuse-leap-15-6/man3/sigvec.3 | 285 ++++ upstream/opensuse-leap-15-6/man3/sigwait.3 | 110 ++ upstream/opensuse-leap-15-6/man3/sin.3 | 125 ++ upstream/opensuse-leap-15-6/man3/sincos.3 | 115 ++ upstream/opensuse-leap-15-6/man3/sinh.3 | 132 ++ upstream/opensuse-leap-15-6/man3/sleep.3 | 82 ++ upstream/opensuse-leap-15-6/man3/slist.3 | 319 +++++ upstream/opensuse-leap-15-6/man3/slk.3ncurses | 291 ++++ upstream/opensuse-leap-15-6/man3/sockatmark.3 | 141 ++ upstream/opensuse-leap-15-6/man3/sp_funcs.3ncurses | 373 ++++++ upstream/opensuse-leap-15-6/man3/spacing.3menu | 89 ++ upstream/opensuse-leap-15-6/man3/sqrt.3 | 112 ++ upstream/opensuse-leap-15-6/man3/sscanf.3 | 744 +++++++++++ upstream/opensuse-leap-15-6/man3/stailq.3 | 377 ++++++ upstream/opensuse-leap-15-6/man3/static_assert.3 | 119 ++ upstream/opensuse-leap-15-6/man3/statvfs.3 | 251 ++++ upstream/opensuse-leap-15-6/man3/stdarg.3 | 298 +++++ upstream/opensuse-leap-15-6/man3/stdin.3 | 160 +++ upstream/opensuse-leap-15-6/man3/stdio.3 | 345 +++++ upstream/opensuse-leap-15-6/man3/stdio_ext.3 | 138 ++ upstream/opensuse-leap-15-6/man3/stpncpy.3 | 165 +++ upstream/opensuse-leap-15-6/man3/strcasecmp.3 | 115 ++ upstream/opensuse-leap-15-6/man3/strchr.3 | 132 ++ upstream/opensuse-leap-15-6/man3/strcmp.3 | 211 +++ upstream/opensuse-leap-15-6/man3/strcoll.3 | 89 ++ upstream/opensuse-leap-15-6/man3/strcpy.3 | 207 +++ upstream/opensuse-leap-15-6/man3/strdup.3 | 148 +++ upstream/opensuse-leap-15-6/man3/strerror.3 | 318 +++++ upstream/opensuse-leap-15-6/man3/strfmon.3 | 210 +++ upstream/opensuse-leap-15-6/man3/strfromd.3 | 233 ++++ upstream/opensuse-leap-15-6/man3/strfry.3 | 58 + upstream/opensuse-leap-15-6/man3/strftime.3 | 780 +++++++++++ upstream/opensuse-leap-15-6/man3/string.3 | 224 ++++ upstream/opensuse-leap-15-6/man3/strlen.3 | 64 + upstream/opensuse-leap-15-6/man3/strncat.3 | 133 ++ upstream/opensuse-leap-15-6/man3/strnlen.3 | 86 ++ upstream/opensuse-leap-15-6/man3/strpbrk.3 | 69 + upstream/opensuse-leap-15-6/man3/strptime.3 | 416 ++++++ upstream/opensuse-leap-15-6/man3/strsep.3 | 165 +++ upstream/opensuse-leap-15-6/man3/strsignal.3 | 168 +++ upstream/opensuse-leap-15-6/man3/strspn.3 | 88 ++ upstream/opensuse-leap-15-6/man3/strstr.3 | 99 ++ upstream/opensuse-leap-15-6/man3/strtod.3 | 208 +++ upstream/opensuse-leap-15-6/man3/strtoimax.3 | 71 + upstream/opensuse-leap-15-6/man3/strtok.3 | 289 ++++ upstream/opensuse-leap-15-6/man3/strtol.3 | 297 +++++ upstream/opensuse-leap-15-6/man3/strtoul.3 | 221 ++++ upstream/opensuse-leap-15-6/man3/strverscmp.3 | 149 +++ upstream/opensuse-leap-15-6/man3/strxfrm.3 | 89 ++ upstream/opensuse-leap-15-6/man3/swab.3 | 79 ++ upstream/opensuse-leap-15-6/man3/sysconf.3 | 393 ++++++ upstream/opensuse-leap-15-6/man3/syslog.3 | 360 +++++ upstream/opensuse-leap-15-6/man3/system.3 | 272 ++++ upstream/opensuse-leap-15-6/man3/sysv_signal.3 | 93 ++ upstream/opensuse-leap-15-6/man3/tailq.3 | 397 ++++++ upstream/opensuse-leap-15-6/man3/tan.3 | 149 +++ upstream/opensuse-leap-15-6/man3/tanh.3 | 108 ++ upstream/opensuse-leap-15-6/man3/tcgetpgrp.3 | 128 ++ upstream/opensuse-leap-15-6/man3/tcgetsid.3 | 76 ++ upstream/opensuse-leap-15-6/man3/telldir.3 | 103 ++ upstream/opensuse-leap-15-6/man3/tempnam.3 | 178 +++ .../opensuse-leap-15-6/man3/termattrs.3ncurses | 135 ++ upstream/opensuse-leap-15-6/man3/termcap.3ncurses | 262 ++++ upstream/opensuse-leap-15-6/man3/terminfo.3ncurses | 528 ++++++++ .../man3/terminfo_variables.3ncurses | 193 +++ upstream/opensuse-leap-15-6/man3/termios.3 | 1240 +++++++++++++++++ upstream/opensuse-leap-15-6/man3/textdomain.3 | 57 + upstream/opensuse-leap-15-6/man3/tgamma.3 | 219 +++ upstream/opensuse-leap-15-6/man3/threads.3ncurses | 602 +++++++++ upstream/opensuse-leap-15-6/man3/time.3am | 90 ++ upstream/opensuse-leap-15-6/man3/timegm.3 | 95 ++ upstream/opensuse-leap-15-6/man3/timeradd.3 | 143 ++ upstream/opensuse-leap-15-6/man3/tmpfile.3 | 106 ++ upstream/opensuse-leap-15-6/man3/tmpnam.3 | 169 +++ upstream/opensuse-leap-15-6/man3/toascii.3 | 71 + upstream/opensuse-leap-15-6/man3/touch.3ncurses | 126 ++ upstream/opensuse-leap-15-6/man3/toupper.3 | 188 +++ upstream/opensuse-leap-15-6/man3/towctrans.3 | 85 ++ upstream/opensuse-leap-15-6/man3/towlower.3 | 132 ++ upstream/opensuse-leap-15-6/man3/towupper.3 | 131 ++ upstream/opensuse-leap-15-6/man3/trace.3ncurses | 230 ++++ upstream/opensuse-leap-15-6/man3/trunc.3 | 86 ++ upstream/opensuse-leap-15-6/man3/tsearch.3 | 353 +++++ upstream/opensuse-leap-15-6/man3/ttyname.3 | 112 ++ upstream/opensuse-leap-15-6/man3/ttyslot.3 | 172 +++ upstream/opensuse-leap-15-6/man3/tzset.3 | 247 ++++ upstream/opensuse-leap-15-6/man3/ualarm.3 | 143 ++ upstream/opensuse-leap-15-6/man3/ulimit.3 | 90 ++ upstream/opensuse-leap-15-6/man3/undocumented.3 | 164 +++ upstream/opensuse-leap-15-6/man3/ungetwc.3 | 105 ++ upstream/opensuse-leap-15-6/man3/unlocked_stdio.3 | 197 +++ upstream/opensuse-leap-15-6/man3/unlockpt.3 | 87 ++ upstream/opensuse-leap-15-6/man3/updwtmp.3 | 84 ++ upstream/opensuse-leap-15-6/man3/uselocale.3 | 102 ++ upstream/opensuse-leap-15-6/man3/userptr.3form | 64 + upstream/opensuse-leap-15-6/man3/userptr.3menu | 64 + upstream/opensuse-leap-15-6/man3/usleep.3 | 126 ++ upstream/opensuse-leap-15-6/man3/util.3ncurses | 396 ++++++ upstream/opensuse-leap-15-6/man3/uuid++.3ossp | 307 +++++ upstream/opensuse-leap-15-6/man3/uuid.3 | 64 + upstream/opensuse-leap-15-6/man3/uuid.3ossp | 578 ++++++++ upstream/opensuse-leap-15-6/man3/uuid_clear.3 | 59 + upstream/opensuse-leap-15-6/man3/uuid_compare.3 | 58 + upstream/opensuse-leap-15-6/man3/uuid_copy.3 | 62 + upstream/opensuse-leap-15-6/man3/uuid_generate.3 | 90 ++ upstream/opensuse-leap-15-6/man3/uuid_is_null.3 | 60 + upstream/opensuse-leap-15-6/man3/uuid_parse.3 | 71 + upstream/opensuse-leap-15-6/man3/uuid_time.3 | 63 + upstream/opensuse-leap-15-6/man3/uuid_unparse.3 | 69 + upstream/opensuse-leap-15-6/man3/wcpcpy.3 | 82 ++ upstream/opensuse-leap-15-6/man3/wcpncpy.3 | 109 ++ upstream/opensuse-leap-15-6/man3/wcrtomb.3 | 147 +++ upstream/opensuse-leap-15-6/man3/wcscasecmp.3 | 102 ++ upstream/opensuse-leap-15-6/man3/wcscat.3 | 73 + upstream/opensuse-leap-15-6/man3/wcschr.3 | 72 + upstream/opensuse-leap-15-6/man3/wcscmp.3 | 82 ++ upstream/opensuse-leap-15-6/man3/wcscpy.3 | 75 ++ upstream/opensuse-leap-15-6/man3/wcscspn.3 | 84 ++ upstream/opensuse-leap-15-6/man3/wcsdup.3 | 86 ++ upstream/opensuse-leap-15-6/man3/wcslen.3 | 68 + upstream/opensuse-leap-15-6/man3/wcsncasecmp.3 | 108 ++ upstream/opensuse-leap-15-6/man3/wcsncat.3 | 75 ++ upstream/opensuse-leap-15-6/man3/wcsncmp.3 | 96 ++ upstream/opensuse-leap-15-6/man3/wcsncpy.3 | 92 ++ upstream/opensuse-leap-15-6/man3/wcsnlen.3 | 94 ++ upstream/opensuse-leap-15-6/man3/wcsnrtombs.3 | 190 +++ upstream/opensuse-leap-15-6/man3/wcspbrk.3 | 72 + upstream/opensuse-leap-15-6/man3/wcsrchr.3 | 69 + upstream/opensuse-leap-15-6/man3/wcsrtombs.3 | 165 +++ upstream/opensuse-leap-15-6/man3/wcsspn.3 | 81 ++ upstream/opensuse-leap-15-6/man3/wcsstr.3 | 78 ++ upstream/opensuse-leap-15-6/man3/wcstoimax.3 | 61 + upstream/opensuse-leap-15-6/man3/wcstok.3 | 120 ++ upstream/opensuse-leap-15-6/man3/wcstombs.3 | 128 ++ upstream/opensuse-leap-15-6/man3/wcswidth.3 | 76 ++ upstream/opensuse-leap-15-6/man3/wctob.3 | 89 ++ upstream/opensuse-leap-15-6/man3/wctomb.3 | 122 ++ upstream/opensuse-leap-15-6/man3/wctrans.3 | 91 ++ upstream/opensuse-leap-15-6/man3/wctype.3 | 103 ++ upstream/opensuse-leap-15-6/man3/wcwidth.3 | 80 ++ upstream/opensuse-leap-15-6/man3/win.3form | 91 ++ upstream/opensuse-leap-15-6/man3/win.3menu | 91 ++ upstream/opensuse-leap-15-6/man3/window.3ncurses | 235 ++++ upstream/opensuse-leap-15-6/man3/wmemchr.3 | 73 + upstream/opensuse-leap-15-6/man3/wmemcmp.3 | 93 ++ upstream/opensuse-leap-15-6/man3/wmemcpy.3 | 78 ++ upstream/opensuse-leap-15-6/man3/wmemmove.3 | 73 + upstream/opensuse-leap-15-6/man3/wmemset.3 | 64 + upstream/opensuse-leap-15-6/man3/wordexp.3 | 243 ++++ upstream/opensuse-leap-15-6/man3/wprintf.3 | 276 ++++ upstream/opensuse-leap-15-6/man3/wresize.3ncurses | 65 + upstream/opensuse-leap-15-6/man3/xcrypt.3 | 98 ++ upstream/opensuse-leap-15-6/man3/xdr.3 | 612 +++++++++ upstream/opensuse-leap-15-6/man3/y0.3 | 275 ++++ 731 files changed, 119812 insertions(+) create mode 100644 upstream/opensuse-leap-15-6/man3/CPU_SET.3 create mode 100644 upstream/opensuse-leap-15-6/man3/INFINITY.3 create mode 100644 upstream/opensuse-leap-15-6/man3/MAX.3 create mode 100644 upstream/opensuse-leap-15-6/man3/MB_CUR_MAX.3 create mode 100644 upstream/opensuse-leap-15-6/man3/MB_LEN_MAX.3 create mode 100644 upstream/opensuse-leap-15-6/man3/_Generic.3 create mode 100644 upstream/opensuse-leap-15-6/man3/__ppc_get_timebase.3 create mode 100644 upstream/opensuse-leap-15-6/man3/__ppc_set_ppr_med.3 create mode 100644 upstream/opensuse-leap-15-6/man3/__ppc_yield.3 create mode 100644 upstream/opensuse-leap-15-6/man3/__setfpucw.3 create mode 100644 upstream/opensuse-leap-15-6/man3/a64l.3 create mode 100644 upstream/opensuse-leap-15-6/man3/abort.3 create mode 100644 upstream/opensuse-leap-15-6/man3/abs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/acos.3 create mode 100644 upstream/opensuse-leap-15-6/man3/acosh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/add_wch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/add_wchstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/addch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/addchstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/addseverity.3 create mode 100644 upstream/opensuse-leap-15-6/man3/addstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/addwstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/adjtime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_cancel.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_error.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_fsync.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_init.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_read.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_return.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_suspend.3 create mode 100644 upstream/opensuse-leap-15-6/man3/aio_write.3 create mode 100644 upstream/opensuse-leap-15-6/man3/alloca.3 create mode 100644 upstream/opensuse-leap-15-6/man3/arc4random.3 create mode 100644 upstream/opensuse-leap-15-6/man3/argz_add.3 create mode 100644 upstream/opensuse-leap-15-6/man3/asin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/asinh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/asprintf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/assert.3 create mode 100644 upstream/opensuse-leap-15-6/man3/assert_perror.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atan.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atan2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atanh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atexit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atof.3 create mode 100644 upstream/opensuse-leap-15-6/man3/atoi.3 create mode 100644 upstream/opensuse-leap-15-6/man3/attr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/attributes.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/backtrace.3 create mode 100644 upstream/opensuse-leap-15-6/man3/basename.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bcmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bcopy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/beep.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/bind_textdomain_codeset.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bindresvport.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bindtextdomain.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bkgd.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/bkgrnd.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/border.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/border_set.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/bsd_signal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bsearch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bstring.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bswap.3 create mode 100644 upstream/opensuse-leap-15-6/man3/btowc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/btree.3 create mode 100644 upstream/opensuse-leap-15-6/man3/byteorder.3 create mode 100644 upstream/opensuse-leap-15-6/man3/bzero.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cabs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cacos.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cacosh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/canonicalize_file_name.3 create mode 100644 upstream/opensuse-leap-15-6/man3/carg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/casin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/casinh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/catan.3 create mode 100644 upstream/opensuse-leap-15-6/man3/catanh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/catgets.3 create mode 100644 upstream/opensuse-leap-15-6/man3/catopen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cbrt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ccos.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ccosh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ceil.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cexp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cexp2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cfree.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cimag.3 create mode 100644 upstream/opensuse-leap-15-6/man3/circleq.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clear.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/clearenv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clock.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clock_getcpuclockid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clog.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clog10.3 create mode 100644 upstream/opensuse-leap-15-6/man3/clog2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/closedir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cmsg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/color.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/confstr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/conj.3 create mode 100644 upstream/opensuse-leap-15-6/man3/copysign.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cos.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cosh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cpow.3 create mode 100644 upstream/opensuse-leap-15-6/man3/cproj.3 create mode 100644 upstream/opensuse-leap-15-6/man3/creal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/csin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/csinh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/csqrt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ctan.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ctanh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ctermid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ctime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/curses_variables.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/cursor.3form create mode 100644 upstream/opensuse-leap-15-6/man3/cursor.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/daemon.3 create mode 100644 upstream/opensuse-leap-15-6/man3/data.3form create mode 100644 upstream/opensuse-leap-15-6/man3/dbopen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/default_colors.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/define_key.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/delch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/deleteln.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/des_crypt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/difftime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dirfd.3 create mode 100644 upstream/opensuse-leap-15-6/man3/div.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dl_iterate_phdr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dladdr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dlerror.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dlinfo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dlopen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dlsym.3 create mode 100644 upstream/opensuse-leap-15-6/man3/drand48.3 create mode 100644 upstream/opensuse-leap-15-6/man3/drand48_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/driver.3form create mode 100644 upstream/opensuse-leap-15-6/man3/driver.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/duplocale.3 create mode 100644 upstream/opensuse-leap-15-6/man3/dysize.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ecvt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ecvt_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/encrypt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/end.3 create mode 100644 upstream/opensuse-leap-15-6/man3/endian.3 create mode 100644 upstream/opensuse-leap-15-6/man3/envz_add.3 create mode 100644 upstream/opensuse-leap-15-6/man3/erf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/erfc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/err.3 create mode 100644 upstream/opensuse-leap-15-6/man3/errno.3 create mode 100644 upstream/opensuse-leap-15-6/man3/error.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ether_aton.3 create mode 100644 upstream/opensuse-leap-15-6/man3/euidaccess.3 create mode 100644 upstream/opensuse-leap-15-6/man3/exec.3 create mode 100644 upstream/opensuse-leap-15-6/man3/exit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/exp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/exp10.3 create mode 100644 upstream/opensuse-leap-15-6/man3/exp2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/expm1.3 create mode 100644 upstream/opensuse-leap-15-6/man3/extensions.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/fabs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fclose.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fcloseall.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fdim.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fenv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ferror.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fexecve.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fflush.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ffs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fgetc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fgetgrent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fgetpwent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fgetwc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fgetws.3 create mode 100644 upstream/opensuse-leap-15-6/man3/field.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_attributes.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_buffer.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_info.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_just.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_new.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_opts.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_userptr.3form create mode 100644 upstream/opensuse-leap-15-6/man3/field_validation.3form create mode 100644 upstream/opensuse-leap-15-6/man3/fieldtype.3form create mode 100644 upstream/opensuse-leap-15-6/man3/filefuncs.3am create mode 100644 upstream/opensuse-leap-15-6/man3/fileno.3 create mode 100644 upstream/opensuse-leap-15-6/man3/finite.3 create mode 100644 upstream/opensuse-leap-15-6/man3/flockfile.3 create mode 100644 upstream/opensuse-leap-15-6/man3/floor.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fma.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fmax.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fmemopen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fmin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fmod.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fmtmsg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fnmatch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fnmatch.3am create mode 100644 upstream/opensuse-leap-15-6/man3/fopen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fopencookie.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fork.3am create mode 100644 upstream/opensuse-leap-15-6/man3/form.3form create mode 100644 upstream/opensuse-leap-15-6/man3/form_variables.3form create mode 100644 upstream/opensuse-leap-15-6/man3/format.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/fpathconf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fpclassify.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fpurge.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fputwc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fputws.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fread.3 create mode 100644 upstream/opensuse-leap-15-6/man3/frexp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fseek.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fseeko.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ftime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ftok.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fts.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ftw.3 create mode 100644 upstream/opensuse-leap-15-6/man3/futimes.3 create mode 100644 upstream/opensuse-leap-15-6/man3/fwide.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gamma.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gcvt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/get_nprocs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/get_phys_pages.3 create mode 100644 upstream/opensuse-leap-15-6/man3/get_wch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/get_wstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/getaddrinfo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getaddrinfo_a.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getauxval.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getcchar.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/getch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/getcontext.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getcwd.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getdate.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getdirentries.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getdtablesize.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getentropy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getenv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getfsent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getgrent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getgrent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getgrnam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getgrouplist.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gethostbyname.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gethostid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getipnodebyname.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getline.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getloadavg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getlogin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getmntent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getnameinfo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getnetent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getnetent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getopt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpass.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getprotoent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getprotoent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpw.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpwent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpwent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getpwnam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getrpcent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getrpcent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getrpcport.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gets.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getservent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getservent_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getspnam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/getsubopt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gettext.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getttyent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getusershell.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getutent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getutmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getw.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getwchar.3 create mode 100644 upstream/opensuse-leap-15-6/man3/getyx.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/glob.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gnu_get_libc_version.3 create mode 100644 upstream/opensuse-leap-15-6/man3/grantpt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/group_member.3 create mode 100644 upstream/opensuse-leap-15-6/man3/gsignal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/hash.3 create mode 100644 upstream/opensuse-leap-15-6/man3/hook.3form create mode 100644 upstream/opensuse-leap-15-6/man3/hook.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/hsearch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/hypot.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iconv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iconv_close.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iconv_open.3 create mode 100644 upstream/opensuse-leap-15-6/man3/if_nameindex.3 create mode 100644 upstream/opensuse-leap-15-6/man3/if_nametoindex.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ilogb.3 create mode 100644 upstream/opensuse-leap-15-6/man3/in_wch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/in_wchstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/inch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/inchstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/index.3 create mode 100644 upstream/opensuse-leap-15-6/man3/inet.3 create mode 100644 upstream/opensuse-leap-15-6/man3/inet_net_pton.3 create mode 100644 upstream/opensuse-leap-15-6/man3/inet_ntop.3 create mode 100644 upstream/opensuse-leap-15-6/man3/inet_pton.3 create mode 100644 upstream/opensuse-leap-15-6/man3/initgroups.3 create mode 100644 upstream/opensuse-leap-15-6/man3/initscr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/inopts.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/inplace.3am create mode 100644 upstream/opensuse-leap-15-6/man3/ins_wch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/ins_wstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/insch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/insque.3 create mode 100644 upstream/opensuse-leap-15-6/man3/insstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/instr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/intro.3 create mode 100644 upstream/opensuse-leap-15-6/man3/inwstr.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/isalpha.3 create mode 100644 upstream/opensuse-leap-15-6/man3/isatty.3 create mode 100644 upstream/opensuse-leap-15-6/man3/isfdtype.3 create mode 100644 upstream/opensuse-leap-15-6/man3/isgreater.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswalnum.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswalpha.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswblank.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswcntrl.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswctype.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswdigit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswgraph.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswlower.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswprint.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswpunct.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswspace.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswupper.3 create mode 100644 upstream/opensuse-leap-15-6/man3/iswxdigit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/items.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/j0.3 create mode 100644 upstream/opensuse-leap-15-6/man3/kernel.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/key_defined.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/key_setsecret.3 create mode 100644 upstream/opensuse-leap-15-6/man3/keybound.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/keyok.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/killpg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ldexp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/legacy.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/legacy_coding.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/lgamma.3 create mode 100644 upstream/opensuse-leap-15-6/man3/libblkid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lio_listio.3 create mode 100644 upstream/opensuse-leap-15-6/man3/list.3 create mode 100644 upstream/opensuse-leap-15-6/man3/localeconv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lockf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/log.3 create mode 100644 upstream/opensuse-leap-15-6/man3/log10.3 create mode 100644 upstream/opensuse-leap-15-6/man3/log1p.3 create mode 100644 upstream/opensuse-leap-15-6/man3/log2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/logb.3 create mode 100644 upstream/opensuse-leap-15-6/man3/login.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lrint.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lround.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lsearch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/lseek64.3 create mode 100644 upstream/opensuse-leap-15-6/man3/makecontext.3 create mode 100644 upstream/opensuse-leap-15-6/man3/makedev.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mallinfo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_get_state.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_hook.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_info.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_stats.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_trim.3 create mode 100644 upstream/opensuse-leap-15-6/man3/malloc_usable_size.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mallopt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mark.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/matherr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mblen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbrlen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbrtowc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbsinit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbsnrtowcs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbsrtowcs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbstowcs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mbtowc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mcheck.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memccpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memchr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memcmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memcpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memfrob.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memleaks.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/memmem.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memmove.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mempcpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/memset.3 create mode 100644 upstream/opensuse-leap-15-6/man3/menu.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_current.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_name.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_new.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_opts.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_userptr.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_value.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/menu_visible.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/mkdtemp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mkfifo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mkstemp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mktemp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/modf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mouse.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/move.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/mpool.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_close.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_getattr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_notify.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_open.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_receive.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_send.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mq_unlink.3 create mode 100644 upstream/opensuse-leap-15-6/man3/mtrace.3 create mode 100644 upstream/opensuse-leap-15-6/man3/nan.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ncurses.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/netlink.3 create mode 100644 upstream/opensuse-leap-15-6/man3/new.3form create mode 100644 upstream/opensuse-leap-15-6/man3/new.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/new_page.3form create mode 100644 upstream/opensuse-leap-15-6/man3/new_pair.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/newlocale.3 create mode 100644 upstream/opensuse-leap-15-6/man3/nextafter.3 create mode 100644 upstream/opensuse-leap-15-6/man3/nextup.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ngettext.3 create mode 100644 upstream/opensuse-leap-15-6/man3/nl_langinfo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ntp_gettime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/offsetof.3 create mode 100644 upstream/opensuse-leap-15-6/man3/on_exit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/opaque.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/open_memstream.3 create mode 100644 upstream/opensuse-leap-15-6/man3/opendir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/openpty.3 create mode 100644 upstream/opensuse-leap-15-6/man3/opts.3form create mode 100644 upstream/opensuse-leap-15-6/man3/opts.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/ordchr.3am create mode 100644 upstream/opensuse-leap-15-6/man3/outopts.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/overlay.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/pad.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/page.3form create mode 100644 upstream/opensuse-leap-15-6/man3/panel.3curses create mode 100644 upstream/opensuse-leap-15-6/man3/pattern.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/perror.3 create mode 100644 upstream/opensuse-leap-15-6/man3/popen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/posix_fallocate.3 create mode 100644 upstream/opensuse-leap-15-6/man3/posix_madvise.3 create mode 100644 upstream/opensuse-leap-15-6/man3/posix_memalign.3 create mode 100644 upstream/opensuse-leap-15-6/man3/posix_openpt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/posix_spawn.3 create mode 100644 upstream/opensuse-leap-15-6/man3/post.3form create mode 100644 upstream/opensuse-leap-15-6/man3/post.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/pow.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pow10.3 create mode 100644 upstream/opensuse-leap-15-6/man3/powerof2.3 create mode 100644 upstream/opensuse-leap-15-6/man3/print.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/printf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/printw.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/profil.3 create mode 100644 upstream/opensuse-leap-15-6/man3/program_invocation_name.3 create mode 100644 upstream/opensuse-leap-15-6/man3/psignal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_atfork.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_init.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setaffinity_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setdetachstate.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setguardsize.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setinheritsched.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setschedparam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setschedpolicy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setscope.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setsigmask_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setstack.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setstackaddr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_attr_setstacksize.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_cancel.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_cleanup_push.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_cleanup_push_defer_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_create.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_detach.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_equal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_exit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_getattr_default_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_getattr_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_getcpuclockid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_join.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_kill.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_kill_other_threads_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_mutex_consistent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_mutexattr_getpshared.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_mutexattr_init.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_mutexattr_setrobust.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_rwlockattr_setkind_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_self.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setaffinity_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setcancelstate.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setconcurrency.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setname_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setschedparam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_setschedprio.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_sigmask.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_sigqueue.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_spin_init.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_spin_lock.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_testcancel.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_tryjoin_np.3 create mode 100644 upstream/opensuse-leap-15-6/man3/pthread_yield.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ptsname.3 create mode 100644 upstream/opensuse-leap-15-6/man3/putenv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/putgrent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/putpwent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/puts.3 create mode 100644 upstream/opensuse-leap-15-6/man3/putwchar.3 create mode 100644 upstream/opensuse-leap-15-6/man3/qecvt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/qsort.3 create mode 100644 upstream/opensuse-leap-15-6/man3/raise.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rand.3 create mode 100644 upstream/opensuse-leap-15-6/man3/random.3 create mode 100644 upstream/opensuse-leap-15-6/man3/random_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rcmd.3 create mode 100644 upstream/opensuse-leap-15-6/man3/re_comp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/readdir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/readdir.3am create mode 100644 upstream/opensuse-leap-15-6/man3/readdir_r.3 create mode 100644 upstream/opensuse-leap-15-6/man3/readfile.3am create mode 100644 upstream/opensuse-leap-15-6/man3/realpath.3 create mode 100644 upstream/opensuse-leap-15-6/man3/recno.3 create mode 100644 upstream/opensuse-leap-15-6/man3/refresh.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/regex.3 create mode 100644 upstream/opensuse-leap-15-6/man3/remainder.3 create mode 100644 upstream/opensuse-leap-15-6/man3/remove.3 create mode 100644 upstream/opensuse-leap-15-6/man3/remquo.3 create mode 100644 upstream/opensuse-leap-15-6/man3/requestname.3form create mode 100644 upstream/opensuse-leap-15-6/man3/requestname.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/resizeterm.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/resolver.3 create mode 100644 upstream/opensuse-leap-15-6/man3/revoutput.3am create mode 100644 upstream/opensuse-leap-15-6/man3/revtwoway.3am create mode 100644 upstream/opensuse-leap-15-6/man3/rewinddir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rexec.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rint.3 create mode 100644 upstream/opensuse-leap-15-6/man3/round.3 create mode 100644 upstream/opensuse-leap-15-6/man3/roundup.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rpc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rpmatch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rquota.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rtime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rtnetlink.3 create mode 100644 upstream/opensuse-leap-15-6/man3/rwarray.3am create mode 100644 upstream/opensuse-leap-15-6/man3/scalb.3 create mode 100644 upstream/opensuse-leap-15-6/man3/scalbln.3 create mode 100644 upstream/opensuse-leap-15-6/man3/scandir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/scanf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/scanw.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/sched_getcpu.3 create mode 100644 upstream/opensuse-leap-15-6/man3/scr_dump.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/scroll.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/seekdir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_close.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_destroy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_getvalue.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_init.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_open.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_post.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_unlink.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sem_wait.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setaliasent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setbuf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setenv.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setjmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setlocale.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setlogmask.3 create mode 100644 upstream/opensuse-leap-15-6/man3/setnetgrent.3 create mode 100644 upstream/opensuse-leap-15-6/man3/shm_open.3 create mode 100644 upstream/opensuse-leap-15-6/man3/siginterrupt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/signbit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/significand.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigpause.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigqueue.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigset.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigsetops.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigvec.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sigwait.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sincos.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sinh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sleep.3 create mode 100644 upstream/opensuse-leap-15-6/man3/slist.3 create mode 100644 upstream/opensuse-leap-15-6/man3/slk.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/sockatmark.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sp_funcs.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/spacing.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/sqrt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sscanf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stailq.3 create mode 100644 upstream/opensuse-leap-15-6/man3/static_assert.3 create mode 100644 upstream/opensuse-leap-15-6/man3/statvfs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stdarg.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stdin.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stdio.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stdio_ext.3 create mode 100644 upstream/opensuse-leap-15-6/man3/stpncpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strcasecmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strchr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strcmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strcoll.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strcpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strdup.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strerror.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strfmon.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strfromd.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strfry.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strftime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/string.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strlen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strncat.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strnlen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strpbrk.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strptime.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strsep.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strsignal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strspn.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strstr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strtod.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strtoimax.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strtok.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strtol.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strtoul.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strverscmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/strxfrm.3 create mode 100644 upstream/opensuse-leap-15-6/man3/swab.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sysconf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/syslog.3 create mode 100644 upstream/opensuse-leap-15-6/man3/system.3 create mode 100644 upstream/opensuse-leap-15-6/man3/sysv_signal.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tailq.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tan.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tanh.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tcgetpgrp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tcgetsid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/telldir.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tempnam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/termattrs.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/termcap.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/terminfo.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/terminfo_variables.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/termios.3 create mode 100644 upstream/opensuse-leap-15-6/man3/textdomain.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tgamma.3 create mode 100644 upstream/opensuse-leap-15-6/man3/threads.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/time.3am create mode 100644 upstream/opensuse-leap-15-6/man3/timegm.3 create mode 100644 upstream/opensuse-leap-15-6/man3/timeradd.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tmpfile.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tmpnam.3 create mode 100644 upstream/opensuse-leap-15-6/man3/toascii.3 create mode 100644 upstream/opensuse-leap-15-6/man3/touch.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/toupper.3 create mode 100644 upstream/opensuse-leap-15-6/man3/towctrans.3 create mode 100644 upstream/opensuse-leap-15-6/man3/towlower.3 create mode 100644 upstream/opensuse-leap-15-6/man3/towupper.3 create mode 100644 upstream/opensuse-leap-15-6/man3/trace.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/trunc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tsearch.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ttyname.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ttyslot.3 create mode 100644 upstream/opensuse-leap-15-6/man3/tzset.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ualarm.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ulimit.3 create mode 100644 upstream/opensuse-leap-15-6/man3/undocumented.3 create mode 100644 upstream/opensuse-leap-15-6/man3/ungetwc.3 create mode 100644 upstream/opensuse-leap-15-6/man3/unlocked_stdio.3 create mode 100644 upstream/opensuse-leap-15-6/man3/unlockpt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/updwtmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uselocale.3 create mode 100644 upstream/opensuse-leap-15-6/man3/userptr.3form create mode 100644 upstream/opensuse-leap-15-6/man3/userptr.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/usleep.3 create mode 100644 upstream/opensuse-leap-15-6/man3/util.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/uuid++.3ossp create mode 100644 upstream/opensuse-leap-15-6/man3/uuid.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid.3ossp create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_clear.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_compare.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_copy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_generate.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_is_null.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_parse.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_time.3 create mode 100644 upstream/opensuse-leap-15-6/man3/uuid_unparse.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcpcpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcpncpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcrtomb.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcscasecmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcscat.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcschr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcscmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcscpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcscspn.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsdup.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcslen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsncasecmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsncat.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsncmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsncpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsnlen.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsnrtombs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcspbrk.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsrchr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsrtombs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsspn.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcsstr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcstoimax.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcstok.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcstombs.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcswidth.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wctob.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wctomb.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wctrans.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wctype.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wcwidth.3 create mode 100644 upstream/opensuse-leap-15-6/man3/win.3form create mode 100644 upstream/opensuse-leap-15-6/man3/win.3menu create mode 100644 upstream/opensuse-leap-15-6/man3/window.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/wmemchr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wmemcmp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wmemcpy.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wmemmove.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wmemset.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wordexp.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wprintf.3 create mode 100644 upstream/opensuse-leap-15-6/man3/wresize.3ncurses create mode 100644 upstream/opensuse-leap-15-6/man3/xcrypt.3 create mode 100644 upstream/opensuse-leap-15-6/man3/xdr.3 create mode 100644 upstream/opensuse-leap-15-6/man3/y0.3 (limited to 'upstream/opensuse-leap-15-6/man3') diff --git a/upstream/opensuse-leap-15-6/man3/CPU_SET.3 b/upstream/opensuse-leap-15-6/man3/CPU_SET.3 new file mode 100644 index 00000000..35b1d6df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/CPU_SET.3 @@ -0,0 +1,348 @@ +.\" Copyright (C) 2006 Michael Kerrisk +.\" and Copyright (C) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH CPU_SET 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT, +CPU_AND, CPU_OR, CPU_XOR, CPU_EQUAL, +CPU_ALLOC, CPU_ALLOC_SIZE, CPU_FREE, +CPU_SET_S, CPU_CLR_S, CPU_ISSET_S, CPU_ZERO_S, +CPU_COUNT_S, CPU_AND_S, CPU_OR_S, CPU_XOR_S, CPU_EQUAL_S \- +macros for manipulating CPU sets +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void CPU_ZERO(cpu_set_t *" set ); +.PP +.BI "void CPU_SET(int " cpu ", cpu_set_t *" set ); +.BI "void CPU_CLR(int " cpu ", cpu_set_t *" set ); +.BI "int CPU_ISSET(int " cpu ", cpu_set_t *" set ); +.PP +.BI "int CPU_COUNT(cpu_set_t *" set ); +.PP +.BI "void CPU_AND(cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.BI "void CPU_OR(cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.BI "void CPU_XOR(cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.PP +.BI "int CPU_EQUAL(cpu_set_t *" set1 ", cpu_set_t *" set2 ); +.PP +.BI "cpu_set_t *CPU_ALLOC(int " num_cpus ); +.BI "void CPU_FREE(cpu_set_t *" set ); +.BI "size_t CPU_ALLOC_SIZE(int " num_cpus ); +.PP +.BI "void CPU_ZERO_S(size_t " setsize ", cpu_set_t *" set ); +.PP +.BI "void CPU_SET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); +.BI "void CPU_CLR_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); +.BI "int CPU_ISSET_S(int " cpu ", size_t " setsize ", cpu_set_t *" set ); +.PP +.BI "int CPU_COUNT_S(size_t " setsize ", cpu_set_t *" set ); +.PP +.BI "void CPU_AND_S(size_t " setsize ", cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.BI "void CPU_OR_S(size_t " setsize ", cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.BI "void CPU_XOR_S(size_t " setsize ", cpu_set_t *" destset , +.BI " cpu_set_t *" srcset1 ", cpu_set_t *" srcset2 ); +.PP +.BI "int CPU_EQUAL_S(size_t " setsize ", cpu_set_t *" set1 \ +", cpu_set_t *" set2 ); +.fi +.SH DESCRIPTION +The +.I cpu_set_t +data structure represents a set of CPUs. +CPU sets are used by +.BR sched_setaffinity (2) +and similar interfaces. +.PP +The +.I cpu_set_t +data type is implemented as a bit mask. +However, the data structure should be treated as opaque: +all manipulation of CPU sets should be done via the macros +described in this page. +.PP +The following macros are provided to operate on the CPU set +.IR set : +.TP +.BR CPU_ZERO () +Clears +.IR set , +so that it contains no CPUs. +.TP +.BR CPU_SET () +Add CPU +.I cpu +to +.IR set . +.TP +.BR CPU_CLR () +Remove CPU +.I cpu +from +.IR set . +.TP +.BR CPU_ISSET () +Test to see if CPU +.I cpu +is a member of +.IR set . +.TP +.BR CPU_COUNT () +Return the number of CPUs in +.IR set . +.PP +Where a +.I cpu +argument is specified, it should not produce side effects, +since the above macros may evaluate the argument more than once. +.PP +The first CPU on the system corresponds to a +.I cpu +value of 0, the next CPU corresponds to a +.I cpu +value of 1, and so on. +No assumptions should be made about particular CPUs being +available, or the set of CPUs being contiguous, since CPUs can +be taken offline dynamically or be otherwise absent. +The constant +.B CPU_SETSIZE +(currently 1024) specifies a value one greater than the maximum CPU +number that can be stored in +.IR cpu_set_t . +.PP +The following macros perform logical operations on CPU sets: +.TP +.BR CPU_AND () +Store the intersection of the sets +.I srcset1 +and +.I srcset2 +in +.I destset +(which may be one of the source sets). +.TP +.BR CPU_OR () +Store the union of the sets +.I srcset1 +and +.I srcset2 +in +.I destset +(which may be one of the source sets). +.TP +.BR CPU_XOR () +Store the XOR of the sets +.I srcset1 +and +.I srcset2 +in +.I destset +(which may be one of the source sets). +The XOR means the set of CPUs that are in either +.I srcset1 +or +.IR srcset2 , +but not both. +.TP +.BR CPU_EQUAL () +Test whether two CPU set contain exactly the same CPUs. +.SS Dynamically sized CPU sets +Because some applications may require the ability to dynamically +size CPU sets (e.g., to allocate sets larger than that +defined by the standard +.I cpu_set_t +data type), glibc nowadays provides a set of macros to support this. +.PP +The following macros are used to allocate and deallocate CPU sets: +.TP +.BR CPU_ALLOC () +Allocate a CPU set large enough to hold CPUs +in the range 0 to +.IR num_cpus\-1 . +.TP +.BR CPU_ALLOC_SIZE () +Return the size in bytes of the CPU set that would be needed to +hold CPUs in the range 0 to +.IR num_cpus\-1 . +This macro provides the value that can be used for the +.I setsize +argument in the +.BR CPU_*_S () +macros described below. +.TP +.BR CPU_FREE () +Free a CPU set previously allocated by +.BR CPU_ALLOC (). +.PP +The macros whose names end with "_S" are the analogs of +the similarly named macros without the suffix. +These macros perform the same tasks as their analogs, +but operate on the dynamically allocated CPU set(s) whose size is +.I setsize +bytes. +.SH RETURN VALUE +.BR CPU_ISSET () +and +.BR CPU_ISSET_S () +return nonzero if +.I cpu +is in +.IR set ; +otherwise, it returns 0. +.PP +.BR CPU_COUNT () +and +.BR CPU_COUNT_S () +return the number of CPUs in +.IR set . +.PP +.BR CPU_EQUAL () +and +.BR CPU_EQUAL_S () +return nonzero if the two CPU sets are equal; otherwise they return 0. +.PP +.BR CPU_ALLOC () +returns a pointer on success, or NULL on failure. +(Errors are as for +.BR malloc (3).) +.PP +.BR CPU_ALLOC_SIZE () +returns the number of bytes required to store a +CPU set of the specified cardinality. +.PP +The other functions do not return a value. +.SH STANDARDS +Linux. +.SH HISTORY +The +.BR CPU_ZERO (), +.BR CPU_SET (), +.BR CPU_CLR (), +and +.BR CPU_ISSET () +macros were added in glibc 2.3.3. +.PP +.BR CPU_COUNT () +first appeared in glibc 2.6. +.PP +.BR CPU_AND (), +.BR CPU_OR (), +.BR CPU_XOR (), +.BR CPU_EQUAL (), +.BR CPU_ALLOC (), +.BR CPU_ALLOC_SIZE (), +.BR CPU_FREE (), +.BR CPU_ZERO_S (), +.BR CPU_SET_S (), +.BR CPU_CLR_S (), +.BR CPU_ISSET_S (), +.BR CPU_AND_S (), +.BR CPU_OR_S (), +.BR CPU_XOR_S (), +and +.BR CPU_EQUAL_S () +first appeared in glibc 2.7. +.SH NOTES +To duplicate a CPU set, use +.BR memcpy (3). +.PP +Since CPU sets are bit masks allocated in units of long words, +the actual number of CPUs in a dynamically +allocated CPU set will be rounded up to the next multiple of +.IR "sizeof(unsigned long)" . +An application should consider the contents of these extra bits +to be undefined. +.PP +Notwithstanding the similarity in the names, +note that the constant +.B CPU_SETSIZE +indicates the number of CPUs in the +.I cpu_set_t +data type (thus, it is effectively a count of the bits in the bit mask), +while the +.I setsize +argument of the +.BR CPU_*_S () +macros is a size in bytes. +.PP +The data types for arguments and return values shown +in the SYNOPSIS are hints what about is expected in each case. +However, since these interfaces are implemented as macros, +the compiler won't necessarily catch all type errors +if you violate the suggestions. +.SH BUGS +On 32-bit platforms with glibc 2.8 and earlier, +.BR CPU_ALLOC () +allocates twice as much space as is required, and +.BR CPU_ALLOC_SIZE () +returns a value twice as large as it should. +This bug should not affect the semantics of a program, +but does result in wasted memory +and less efficient operation of the macros that +operate on dynamically allocated CPU sets. +These bugs are fixed in glibc 2.9. +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7029 +.SH EXAMPLES +The following program demonstrates the use of some of the macros +used for dynamically allocated CPU sets. +.PP +.\" SRC BEGIN (CPU_SET.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +#include + +int +main(int argc, char *argv[]) +{ + cpu_set_t *cpusetp; + size_t size, num_cpus; + + if (argc < 2) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + num_cpus = atoi(argv[1]); + + cpusetp = CPU_ALLOC(num_cpus); + if (cpusetp == NULL) { + perror("CPU_ALLOC"); + exit(EXIT_FAILURE); + } + + size = CPU_ALLOC_SIZE(num_cpus); + + CPU_ZERO_S(size, cpusetp); + for (size_t cpu = 0; cpu < num_cpus; cpu += 2) + CPU_SET_S(cpu, size, cpusetp); + + printf("CPU_COUNT() of set: %d\en", CPU_COUNT_S(size, cpusetp)); + + CPU_FREE(cpusetp); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR sched_setaffinity (2), +.BR pthread_attr_setaffinity_np (3), +.BR pthread_setaffinity_np (3), +.BR cpuset (7) diff --git a/upstream/opensuse-leap-15-6/man3/INFINITY.3 b/upstream/opensuse-leap-15-6/man3/INFINITY.3 new file mode 100644 index 00000000..514ca689 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/INFINITY.3 @@ -0,0 +1,85 @@ +.\" Copyright 2004 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH INFINITY 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL \- floating-point constants +.SH LIBRARY +Math library +.RI ( libm ) +.SH SYNOPSIS +.nf +.BR "#define _ISOC99_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B INFINITY +.PP +.B NAN +.PP +.B HUGE_VAL +.B HUGE_VALF +.B HUGE_VALL +.fi +.SH DESCRIPTION +The macro +.B INFINITY +expands to a +.I float +constant representing positive infinity. +.PP +The macro +.B NAN +expands to a +.I float +constant representing a quiet NaN +(when supported). +A +.I quiet +NaN is a NaN ("not-a-number") that does not raise exceptions +when it is used in arithmetic. +The opposite is a +.I signaling +NaN. +See IEC 60559:1989. +.PP +The macros +.BR HUGE_VAL , +.BR HUGE_VALF , +.B HUGE_VALL +expand to constants of types +.IR double , +.IR float , +and +.IR "long double" , +respectively, +that represent a large positive value, possibly positive infinity. +.SH STANDARDS +C11. +.SH HISTORY +C99. +.PP +On a glibc system, the macro +.B HUGE_VAL +is always available. +Availability of the +.B NAN +macro can be tested using +.BR "#ifdef NAN" , +and similarly for +.BR INFINITY , +.BR HUGE_VALF , +.BR HUGE_VALL . +They will be defined by +.I +if +.B _ISOC99_SOURCE +or +.B _GNU_SOURCE +is defined, or +.B __STDC_VERSION__ +is defined +and has a value not less than 199901L. +.SH SEE ALSO +.BR fpclassify (3), +.BR math_error (7) diff --git a/upstream/opensuse-leap-15-6/man3/MAX.3 b/upstream/opensuse-leap-15-6/man3/MAX.3 new file mode 100644 index 00000000..cbc85163 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/MAX.3 @@ -0,0 +1,75 @@ +.\" Copyright (C) 2021 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH MAX 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +MAX, MIN \- maximum or minimum of two values +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI MAX( a ", " b ); +.BI MIN( a ", " b ); +.fi +.SH DESCRIPTION +These macros return the maximum or minimum of +.I a +and +.IR b . +.SH RETURN VALUE +These macros return the value of one of their arguments, +possibly converted to a different type (see BUGS). +.SH ERRORS +These macros may raise the "invalid" floating-point exception +when any of the arguments is NaN. +.SH STANDARDS +GNU, BSD. +.SH NOTES +If either of the arguments is of a floating-point type, +you might prefer to use +.BR fmax (3) +or +.BR fmin (3), +which can handle NaN. +.PP +The arguments may be evaluated more than once, or not at all. +.PP +Some UNIX systems might provide these macros in a different header, +or not at all. +.SH BUGS +Due to the usual arithmetic conversions, +the result of these macros may be very different from either of the arguments. +To avoid this, ensure that both arguments have the same type. +.SH EXAMPLES +.\" SRC BEGIN (MAX.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int a, b, x; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + a = atoi(argv[1]); + b = atoi(argv[2]); + x = MAX(a, b); + printf("MAX(%d, %d) is %d\en", a, b, x); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR fmax (3), +.BR fmin (3) diff --git a/upstream/opensuse-leap-15-6/man3/MB_CUR_MAX.3 b/upstream/opensuse-leap-15-6/man3/MB_CUR_MAX.3 new file mode 100644 index 00000000..9d4a8cea --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/MB_CUR_MAX.3 @@ -0,0 +1,43 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.\" Modified, aeb, 990824 +.\" +.TH MB_CUR_MAX 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +MB_CUR_MAX \- maximum length of a multibyte character in the current locale +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.fi +.SH DESCRIPTION +The +.B MB_CUR_MAX +macro defines an integer expression giving +the maximum number of bytes needed to represent a single +wide character in the current locale. +This value is locale dependent and therefore not a compile-time constant. +.SH RETURN VALUE +An integer in the range [1, +.BR MB_LEN_MAX ]. +The value 1 denotes traditional 8-bit encoded characters. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH SEE ALSO +.BR MB_LEN_MAX (3), +.BR mblen (3), +.BR mbstowcs (3), +.BR mbtowc (3), +.BR wcstombs (3), +.BR wctomb (3) diff --git a/upstream/opensuse-leap-15-6/man3/MB_LEN_MAX.3 b/upstream/opensuse-leap-15-6/man3/MB_LEN_MAX.3 new file mode 100644 index 00000000..297c4fda --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/MB_LEN_MAX.3 @@ -0,0 +1,51 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.\" Modified, aeb, 990824 +.\" +.TH MB_LEN_MAX 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +MB_LEN_MAX \- maximum multibyte length of a character across all locales +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.fi +.SH DESCRIPTION +The +.B MB_LEN_MAX +macro is the maximum number of bytes needed to represent a single +wide character, in any of the supported locales. +.SH RETURN VALUE +A constant integer greater than zero. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH NOTES +The entities +.B MB_LEN_MAX +and +.I sizeof(wchar_t) +are totally unrelated. +In glibc, +.B MB_LEN_MAX +is typically 16 +.\" For an explanation of why the limit was raised to 16, see +.\" http://lists.gnu.org/archive/html/bug-gnulib/2015-05/msg00001.html +.\" From: Bruno Haible +.\" Subject: Re: why is MB_LEN_MAX so large (16) on glibc +.\" Date: Thu, 14 May 2015 02:30:14 +0200 +(6 in glibc versions earlier than 2.2), while +.I sizeof(wchar_t) +is 4. +.SH SEE ALSO +.BR MB_CUR_MAX (3) diff --git a/upstream/opensuse-leap-15-6/man3/_Generic.3 b/upstream/opensuse-leap-15-6/man3/_Generic.3 new file mode 100644 index 00000000..7f409673 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/_Generic.3 @@ -0,0 +1,64 @@ +.\" Copyright (C) 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH _Generic 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +_Generic \- type-generic selection +.SH SYNOPSIS +.nf +.BR _Generic( \fIexpression\fP ", type1: " e1 ", " "... /*" \ +", default: " "e */" ); +.fi +.SH DESCRIPTION +.BR _Generic () +evaluates the path of code under the type selector +that is compatible with the type of the controlling +.IR expression , +or +.B default: +if no type is compatible. +.PP +.I expression +is not evaluated. +.PP +This is especially useful for writing type-generic macros, +that will behave differently depending on the type of the argument. +.SH STANDARDS +C11. +.SH HISTORY +C11. +.SH EXAMPLES +The following program demonstrates how to write +a replacement for the standard +.BR imaxabs (3) +function, which being a function can't really provide what it promises: +seamlessly upgrading to the widest available type. +.IP +.\" SRC BEGIN (_Generic.c) +.EX +#include +#include +#include + +#define my_imaxabs _Generic(INTMAX_C(0), \e + long: labs, \e + long long: llabs \e + /* long long long: lllabs */ \e +) + +int +main(void) +{ + off_t a; + + a = \-42; + printf("imaxabs(%jd) == %jd\en", (intmax_t) a, my_imaxabs(a)); + printf("&imaxabs == %p\en", &my_imaxabs); + printf("&labs == %p\en", &labs); + printf("&llabs == %p\en", &llabs); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END diff --git a/upstream/opensuse-leap-15-6/man3/__ppc_get_timebase.3 b/upstream/opensuse-leap-15-6/man3/__ppc_get_timebase.3 new file mode 100644 index 00000000..763f9f62 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/__ppc_get_timebase.3 @@ -0,0 +1,99 @@ +.\" Copyright (c) 2012, IBM Corporation. +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH __ppc_get_timebase 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +__ppc_get_timebase, __ppc_get_timebase_freq \- get the current value +of the Time Base Register on Power architecture and its frequency. +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B uint64_t __ppc_get_timebase(void); +.B uint64_t __ppc_get_timebase_freq(void); +.fi +.SH DESCRIPTION +.BR __ppc_get_timebase () +reads the current value of the Time Base Register and returns its +value, while +.BR __ppc_get_timebase_freq () +returns the frequency in which the Time Base Register is updated. +.PP +The Time Base Register is a 64-bit register provided by Power Architecture +processors. +It stores a monotonically incremented value that is updated at a +system-dependent frequency that may be different from the processor +frequency. +.SH RETURN VALUE +.BR __ppc_get_timebase () +returns a 64-bit unsigned integer that represents the current value of the +Time Base Register. +.PP +.BR __ppc_get_timebase_freq () +returns a 64-bit unsigned integer that represents the frequency at +which the Time Base Register is updated. +.SH STANDARDS +GNU. +.SH HISTORY +.TP +.BR __ppc_get_timebase () +.\" commit d9dc34cd569bcfe714fe8c708e58c028106e8b2e +glibc 2.16. +.TP +.BR __ppc_get_timebase_freq () +.\" commit 8ad11b9a9cf1de82bd7771306b42070b91417c11 +glibc 2.17. +.SH EXAMPLES +The following program will calculate the time, in microseconds, spent +between two calls to +.BR __ppc_get_timebase (). +.SS Program source +\& +.\" SRC BEGIN (__ppc_get_timebase.c) +.EX +#include +#include +#include +#include +#include + +/* Maximum value of the Time Base Register: 2\[ha]60 \- 1. + Source: POWER ISA. */ +#define MAX_TB 0xFFFFFFFFFFFFFFF + +int +main(void) +{ + uint64_t tb1, tb2, diff; + uint64_t freq; + + freq = __ppc_get_timebase_freq(); + printf("Time Base frequency = %"PRIu64" Hz\en", freq); + + tb1 = __ppc_get_timebase(); + + // Do some stuff... + + tb2 = __ppc_get_timebase(); + + if (tb2 > tb1) { + diff = tb2 \- tb1; + } else { + /* Treat Time Base Register overflow. */ + diff = (MAX_TB \- tb2) + tb1; + } + + printf("Elapsed time = %1.2f usecs\en", + (double) diff * 1000000 / freq); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR time (2), +.BR usleep (3) diff --git a/upstream/opensuse-leap-15-6/man3/__ppc_set_ppr_med.3 b/upstream/opensuse-leap-15-6/man3/__ppc_set_ppr_med.3 new file mode 100644 index 00000000..2a062dd6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/__ppc_set_ppr_med.3 @@ -0,0 +1,116 @@ +'\" t +.\" Copyright (c) 2015, 2016 IBM Corporation. +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH __ppc_set_ppr_med 3 2023-03-30 "Linux man-pages 6.04" +Programmer's Manual" +.SH NAME +__ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low, +__ppc_set_ppr_med_low, __ppc_set_ppr_med_high \- +Set the Program Priority Register +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void __ppc_set_ppr_med(void); +.B void __ppc_set_ppr_very_low(void); +.B void __ppc_set_ppr_low(void); +.B void __ppc_set_ppr_med_low(void); +.B void __ppc_set_ppr_med_high(void); +.fi +.SH DESCRIPTION +These functions provide access to the +.I Program Priority Register +(PPR) on the Power architecture. +.PP +The PPR is a 64-bit register that controls the program's priority. +By adjusting the PPR value the programmer may improve system +throughput by causing system resources to be used more +efficiently, especially in contention situations. +The available unprivileged states are covered by the following functions: +.TP +.BR __ppc_set_ppr_med () +sets the Program Priority Register value to +.I medium +(default). +.TP +.BR __ppc_set_ppr_very_low () +sets the Program Priority Register value to +.IR "very low" . +.TP +.BR __ppc_set_ppr_low () +sets the Program Priority Register value to +.IR low . +.TP +.BR __ppc_set_ppr_med_low () +sets the Program Priority Register value to +.IR "medium low" . +.PP +The privileged state +.I medium high +may also be set during certain time intervals by problem-state (unprivileged) +programs, with the following function: +.TP +.BR __ppc_set_ppr_med_high () +sets the Program Priority to +.IR "medium high" . +.PP +If the program priority is medium high when the time interval expires or if an +attempt is made to set the priority to medium high when it is not allowed, the +priority is set to medium. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR __ppc_set_ppr_med (), +.BR __ppc_set_ppr_very_low (), +.BR __ppc_set_ppr_low (), +.BR __ppc_set_ppr_med_low (), +.BR __ppc_set_ppr_med_high () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +.TP +.BR __ppc_set_ppr_med () +.TQ +.BR __ppc_set_ppr_low () +.TQ +.BR __ppc_set_ppr_med_low () +glibc 2.18. +.TP +.BR __ppc_set_ppr_very_low () +.TQ +.BR __ppc_set_ppr_med_high () +glibc 2.23. +.SH NOTES +The functions +.BR __ppc_set_ppr_very_low () +and +.BR __ppc_set_ppr_med_high () +will be defined by +.I +if +.B _ARCH_PWR8 +is defined. +Availability of these functions can be tested using +.BR "#ifdef _ARCH_PWR8" . +.SH SEE ALSO +.BR __ppc_yield (3) +.PP +.I Power ISA, Book\~II - Section\ 3.1 (Program Priority Registers) diff --git a/upstream/opensuse-leap-15-6/man3/__ppc_yield.3 b/upstream/opensuse-leap-15-6/man3/__ppc_yield.3 new file mode 100644 index 00000000..ea6265d8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/__ppc_yield.3 @@ -0,0 +1,70 @@ +'\" t +.\" Copyright (c) 2015, IBM Corporation. +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH __ppc_yield 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +__ppc_yield, __ppc_mdoio, __ppc_mdoom \- +Hint the processor to release shared resources +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void __ppc_yield(void); +.B void __ppc_mdoio(void); +.B void __ppc_mdoom(void); +.fi +.SH DESCRIPTION +These functions +provide hints about the usage of resources that are shared with other +processors on the Power architecture. +They can be used, for example, if a program waiting on a lock intends +to divert the shared resources to be used by other processors. +.PP +.BR __ppc_yield () +provides a hint that performance will probably be improved if shared +resources dedicated to the executing processor are released for use by +other processors. +.PP +.BR __ppc_mdoio () +provides a hint that performance will probably be improved if shared +resources dedicated to the executing processor are released until all +outstanding storage accesses to caching-inhibited storage have been +completed. +.PP +.BR __ppc_mdoom () +provides a hint that performance will probably be improved if shared +resources dedicated to the executing processor are released until all +outstanding storage accesses to cacheable storage for which the data +is not in the cache have been completed. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR __ppc_yield (), +.BR __ppc_mdoio (), +.BR __ppc_mdoom () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.18. +.SH SEE ALSO +.BR __ppc_set_ppr_med (3) +.PP +.I Power ISA, Book\~II - Section\~3.2 ("or" architecture) diff --git a/upstream/opensuse-leap-15-6/man3/__setfpucw.3 b/upstream/opensuse-leap-15-6/man3/__setfpucw.3 new file mode 100644 index 00000000..06fd7299 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/__setfpucw.3 @@ -0,0 +1,72 @@ +.\" Written Sat Mar 8 10:35:08 MEZ 1997 by +.\" J. "MUFTI" Scheurich (mufti@csv.ica.uni-stuttgart.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH __setfpucw 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +__setfpucw \- set FPU control word on i386 architecture (obsolete) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] void __setfpucw(unsigned short " control_word ); +.fi +.SH DESCRIPTION +.BR __setfpucw () +transfers +.I control_word +to the registers of the FPU (floating-point unit) on the i386 architecture. +This was used to control floating-point precision, +rounding and floating-point exceptions. +.SH STANDARDS +GNU. +.SH HISTORY +Removed in glibc 2.1. +.SH NOTES +There are new functions from C99, with prototypes in +.IR , +to control FPU rounding modes, like +.BR fegetround (3), +.BR fesetround (3), +and the floating-point environment, like +.BR fegetenv (3), +.BR feholdexcept (3), +.BR fesetenv (3), +.BR feupdateenv (3), +and FPU exception handling, like +.BR feclearexcept (3), +.BR fegetexceptflag (3), +.BR feraiseexcept (3), +.BR fesetexceptflag (3), +and +.BR fetestexcept (3). +.PP +If direct access to the FPU control word is still needed, the +.B _FPU_GETCW +and +.B _FPU_SETCW +macros from +.I +can be used. +.SH EXAMPLES +.B __setfpucw(0x1372) +.PP +Set FPU control word on the i386 architecture to +.RS +.PD 0 +.IP \[bu] 3 +extended precision +.IP \[bu] +rounding to nearest +.IP \[bu] +exceptions on overflow, zero divide and NaN +.PD +.RE +.SH SEE ALSO +.BR feclearexcept (3) +.PP +.I diff --git a/upstream/opensuse-leap-15-6/man3/a64l.3 b/upstream/opensuse-leap-15-6/man3/a64l.3 new file mode 100644 index 00000000..049fc206 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/a64l.3 @@ -0,0 +1,112 @@ +'\" t +\t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Corrected, aeb, 2002-05-30 +.\" +.TH a64l 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +a64l, l64a \- convert between long and base-64 +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long a64l(const char *" str64 ); +.BI "char *l64a(long " value ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR a64l (), +.BR l64a (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions provide a conversion between 32-bit long integers +and little-endian base-64 ASCII strings (of length zero to six). +If the string used as argument for +.BR a64l () +has length greater than six, only the first six bytes are used. +If the type +.I long +has more than 32 bits, then +.BR l64a () +uses only the low order 32 bits of +.IR value , +and +.BR a64l () +sign-extends its 32-bit result. +.PP +The 64 digits in the base-64 system are: +.PP +.RS +.nf +\&\[aq].\[aq] represents a 0 +\&\[aq]/\[aq] represents a 1 +0-9 represent 2-11 +A-Z represent 12-37 +a-z represent 38-63 +.fi +.RE +.PP +So 123 = 59*64\[ha]0 + 1*64\[ha]1 = "v/". +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR l64a () +T} Thread safety MT-Unsafe race:l64a +T{ +.BR a64l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The value returned by +.BR l64a () +may be a pointer to a static buffer, possibly overwritten +by later calls. +.PP +The behavior of +.BR l64a () +is undefined when +.I value +is negative. +If +.I value +is zero, it returns an empty string. +.PP +These functions are broken before glibc 2.2.5 +(puts most significant digit first). +.PP +This is not the encoding used by +.BR uuencode (1). +.SH SEE ALSO +.BR uuencode (1), +.\" .BR itoa (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/abort.3 b/upstream/opensuse-leap-15-6/man3/abort.3 new file mode 100644 index 00000000..bc3c8dc0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/abort.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright 2007 (C) Michael Kerrisk +.\" some parts Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH abort 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +abort \- cause abnormal process termination +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B [[noreturn]] void abort(void); +.fi +.SH DESCRIPTION +The +.BR abort () +function first unblocks the +.B SIGABRT +signal, and then raises that signal for the calling process +(as though +.BR raise (3) +was called). +This results in the abnormal termination of the process unless the +.B SIGABRT +signal is caught and the signal handler does not return +(see +.BR longjmp (3)). +.PP +If the +.B SIGABRT +signal is ignored, or caught by a handler that returns, the +.BR abort () +function will still terminate the process. +It does this by restoring the default disposition for +.B SIGABRT +and then raising the signal for a second time. +.SH RETURN VALUE +The +.BR abort () +function never returns. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR abort () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +SVr4, POSIX.1-2001, 4.3BSD, C89. +.PP +Up until glibc 2.26, +if the +.BR abort () +function caused process termination, +all open streams were closed and flushed (as with +.BR fclose (3)). +However, in some cases this could result in deadlocks and data corruption. +Therefore, starting with glibc 2.27, +.\" glibc commit 91e7cf982d0104f0e71770f5ae8e3faf352dea9f +.BR abort () +terminates the process without flushing streams. +POSIX.1 permits either possible behavior, saying that +.BR abort () +"may include an attempt to effect fclose() on all open streams". +.SH SEE ALSO +.BR gdb (1), +.BR sigaction (2), +.BR assert (3), +.BR exit (3), +.BR longjmp (3), +.BR raise (3) diff --git a/upstream/opensuse-leap-15-6/man3/abs.3 b/upstream/opensuse-leap-15-6/man3/abs.3 new file mode 100644 index 00000000..86176e90 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/abs.3 @@ -0,0 +1,127 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH abs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +abs, labs, llabs, imaxabs \- compute the absolute value of an integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int abs(int " j ); +.BI "long labs(long " j ); +.BI "long long llabs(long long " j ); +.PP +.B #include +.PP +.BI "intmax_t imaxabs(intmax_t " j ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR llabs (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR abs () +function computes the absolute value of the integer +argument \fIj\fP. +The +.BR labs (), +.BR llabs (), +and +.BR imaxabs () +functions compute the absolute value of the argument \fIj\fP of the +appropriate integer type for the function. +.SH RETURN VALUE +Returns the absolute value of the integer argument, of the appropriate +integer type for the function. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR abs (), +.BR labs (), +.BR llabs (), +.BR imaxabs () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99, SVr4, 4.3BSD. +.\" POSIX.1 (1996 edition) requires only the +.\" .BR abs () +.\" function. +.PP +C89 only +includes the +.BR abs () +and +.BR labs () +functions; the functions +.BR llabs () +and +.BR imaxabs () +were added in C99. +.SH NOTES +Trying to take the absolute value of the most negative integer +is not defined. +.PP +The +.BR llabs () +function is included since glibc 2.0. +The +.BR imaxabs () +function is included since glibc 2.1.1. +.PP +For +.BR llabs () +to be declared, it may be necessary to define +\fB_ISOC99_SOURCE\fP or \fB_ISOC9X_SOURCE\fP (depending on the +version of glibc) before including any standard headers. +.PP +By default, +GCC handles +.BR abs (), +.BR labs (), +and (since GCC 3.0) +.BR llabs () +and +.BR imaxabs () +as built-in functions. +.SH SEE ALSO +.BR cabs (3), +.BR ceil (3), +.BR fabs (3), +.BR floor (3), +.BR rint (3) diff --git a/upstream/opensuse-leap-15-6/man3/acos.3 b/upstream/opensuse-leap-15-6/man3/acos.3 new file mode 100644 index 00000000..3e7b45b8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/acos.3 @@ -0,0 +1,124 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH acos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +acos, acosf, acosl \- arc cosine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double acos(double " x ); +.BI "float acosf(float " x ); +.BI "long double acosl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR acosf (), +.BR acosl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the arc cosine of +.IR x ; +that is +the value whose cosine is +.IR x . +.SH RETURN VALUE +On success, these functions return the arc cosine of +.I x +in radians; the return value is in the range [0,\ pi]. +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +1, ++0 is returned. +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, +and a NaN is returned. +.PP +If +.I x +is outside the range [\-1,\ 1], +a domain error occurs, +and a NaN is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is outside the range [\-1,\ 1] +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR acos (), +.BR acosf (), +.BR acosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR asin (3), +.BR atan (3), +.BR atan2 (3), +.BR cacos (3), +.BR cos (3), +.BR sin (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/acosh.3 b/upstream/opensuse-leap-15-6/man3/acosh.3 new file mode 100644 index 00000000..b87089c8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/acosh.3 @@ -0,0 +1,127 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH acosh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +acosh, acoshf, acoshl \- inverse hyperbolic cosine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double acosh(double " x ); +.BI "float acoshf(float " x ); +.BI "long double acoshl(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR acosh (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR acoshf (), +.BR acoshl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the inverse hyperbolic cosine of +.IR x ; +that is the value whose hyperbolic cosine is +.IR x . +.SH RETURN VALUE +On success, these functions return the inverse hyperbolic cosine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +1, +0 is returned. +.PP +If +.I x +is positive infinity, positive infinity is returned. +.PP +If +.I x +is less than 1, +a domain error occurs, +and the functions return a NaN. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is less than 1 +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR acosh (), +.BR acoshf (), +.BR acoshl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR asinh (3), +.BR atanh (3), +.BR cacosh (3), +.BR cosh (3), +.BR sinh (3), +.BR tanh (3) diff --git a/upstream/opensuse-leap-15-6/man3/add_wch.3ncurses b/upstream/opensuse-leap-15-6/man3/add_wch.3ncurses new file mode 100644 index 00000000..7c0e66e2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/add_wch.3ncurses @@ -0,0 +1,304 @@ +.\"*************************************************************************** +.\" Copyright (c) 2001-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_add_wch.3x,v 1.24 2017/11/18 23:47:37 tom Exp $ +.TH add_wch 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBadd_wch\fP, +\fBwadd_wch\fP, +\fBmvadd_wch\fP, +\fBmvwadd_wch\fP, +\fBecho_wchar\fP, +\fBwecho_wchar\fP \- add a complex character and rendition to a \fBcurses\fR window, then advance the cursor +.SH SYNOPSIS +.PP +\fB#include \fP +.sp +.B "int add_wch( const cchar_t *\fIwch\fB );" +.br +.B "int wadd_wch( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" +.br +.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" +.br +.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );" +.br +.B "int echo_wchar( const cchar_t *\fIwch\fB );" +.br +.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );" +.br +.SH DESCRIPTION +.SS add_wch +.PP +The +\fBadd_wch\fP, +\fBwadd_wch\fP, +\fBmvadd_wch\fP, and +\fBmvwadd_wch\fP +functions put the complex character \fIwch\fP into the given +window at its current position, +which is then advanced. +These functions perform +wrapping and special-character processing as follows: +.bP +If \fIwch\fP refers to a spacing character, +then any previous character at that location is removed. +A new character specified by \fIwch\fP is +placed at that location with rendition specified by \fIwch\fP. +The cursor then advances to +the next spacing character on the screen. +.bP +If \fIwch\fP refers to a non-spacing character, +all previous characters at that location are preserved. +The non-spacing characters of \fIwch\fP +are added to the spacing complex character, +and the rendition specified by \fIwch\fP is ignored. +.bP +If the character part of \fIwch\fP is +a tab, newline, backspace or other control character, +the window is updated and the cursor moves as if \fBaddch\fR were called. +.SS echo_wchar +.PP +The \fBecho_wchar\fP +function is functionally equivalent to a call to +\fBadd_wch\fP +followed by a call to +\fBrefresh\fP(3X). +Similarly, the +\fBwecho_wchar\fP +is functionally equivalent to a call to +\fBwadd_wch\fP +followed by a call to +\fBwrefresh\fP. +The knowledge +that only a single character is being output is taken into consideration and, +for non-control characters, a considerable performance gain might be seen +by using the *\fBecho\fP* functions instead of their equivalents. +.SS Line Graphics +Like \fBaddch\fP(3X), +\fBaddch_wch\fP accepts symbols which make it simple to draw lines and other +frequently used special characters. +These symbols correspond to the same VT100 line-drawing set as +\fBaddch\fP(3X). +.PP +.TS +l l l l l +l l l l l +_ _ _ _ _ +lw(1.5i) lw5 lw5 lw5 lw20. +\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR +\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR +WACS_BLOCK 0x25ae # 0 solid square block +WACS_BOARD 0x2592 # h board of squares +WACS_BTEE 0x2534 + v bottom tee +WACS_BULLET 0x00b7 o ~ bullet +WACS_CKBOARD 0x2592 : a checker board (stipple) +WACS_DARROW 0x2193 v . arrow pointing down +WACS_DEGREE 0x00b0 ' f degree symbol +WACS_DIAMOND 0x25c6 + ` diamond +WACS_GEQUAL 0x2265 > > greater-than-or-equal-to +WACS_HLINE 0x2500 \- q horizontal line +WACS_LANTERN 0x2603 # i lantern symbol +WACS_LARROW 0x2190 < , arrow pointing left +WACS_LEQUAL 0x2264 < y less-than-or-equal-to +WACS_LLCORNER 0x2514 + m lower left-hand corner +WACS_LRCORNER 0x2518 + j lower right-hand corner +WACS_LTEE 0x2524 + t left tee +WACS_NEQUAL 0x2260 ! | not-equal +WACS_PI 0x03c0 * { greek pi +WACS_PLMINUS 0x00b1 # g plus/minus +WACS_PLUS 0x253c + n plus +WACS_RARROW 0x2192 > + arrow pointing right +WACS_RTEE 0x251c + u right tee +WACS_S1 0x23ba \- o scan line 1 +WACS_S3 0x23bb \- p scan line 3 +WACS_S7 0x23bc \- r scan line 7 +WACS_S9 0x23bd \&_ s scan line 9 +WACS_STERLING 0x00a3 f } pound-sterling symbol +WACS_TTEE 0x252c + w top tee +WACS_UARROW 0x2191 ^ \- arrow pointing up +WACS_ULCORNER 0x250c + l upper left-hand corner +WACS_URCORNER 0x2510 + k upper right-hand corner +WACS_VLINE 0x2502 | x vertical line +.TE +.PP +The wide-character configuration of ncurses also defines symbols +for double-lines: +.PP +.TS +l l l l l +l l l l l +_ _ _ _ _ +lw(1.5i) lw5 lw5 lw5 lw20. +\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR +\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR +WACS_D_BTEE 0x2569 + H double tee pointing up +WACS_D_HLINE 0x2550 - R double horizontal line +WACS_D_LLCORNER 0x255a + D double lower left corner +WACS_D_LRCORNER 0x255d + A double lower right corner +WACS_D_LTEE 0x2560 + F double tee pointing right +WACS_D_PLUS 0x256c + E double large plus +WACS_D_RTEE 0x2563 + G double tee pointing left +WACS_D_TTEE 0x2566 + I double tee pointing down +WACS_D_ULCORNER 0x2554 + C double upper left corner +WACS_D_URCORNER 0x2557 + B double upper right corner +WACS_D_VLINE 0x2551 | Y double vertical line +.TE +.PP +and for thick lines: +.TS +l l l l l +l l l l l +_ _ _ _ _ +lw(1.5i) lw5 lw5 lw5 lw20. +\fBACS\fR \fBUnicode\fP \fBASCII\fR \fBacsc\fP \fBGlyph\fR +\fBName\fR \fBDefault\fP \fBDefault\fR \fBchar\fP \fBName\fR +WACS_T_BTEE 0x253b + V thick tee pointing up +WACS_T_HLINE 0x2501 - Q thick horizontal line +WACS_T_LLCORNER 0x2517 + M thick lower left corner +WACS_T_LRCORNER 0x251b + J thick lower right corner +WACS_T_LTEE 0x252b + T thick tee pointing right +WACS_T_PLUS 0x254b + N thick large plus +WACS_T_RTEE 0x2523 + U thick tee pointing left +WACS_T_TTEE 0x2533 + W thick tee pointing down +WACS_T_ULCORNER 0x250f + L thick upper left corner +WACS_T_URCORNER 0x2513 + K thick upper right corner +WACS_T_VLINE 0x2503 | X thick vertical line +.TE +.SH RETURN VALUE +.PP +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.PP +Functions with a \*(``mv\*('' prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +.PP +Note that +\fBadd_wch\fP, +\fBmvadd_wch\fP, +\fBmvwadd_wch\fP, and +\fBecho_wchar\fP +may be macros. +.SH PORTABILITY +.PP +All of these functions are described in the XSI Curses standard, Issue 4. +The defaults specified for line-drawing characters apply in the POSIX locale. +.PP +X/Open Curses makes it clear that the WACS_ symbols should be defined as +a pointer to \fBcchar_t\fP data, e.g., in the discussion of \fBborder_set\fR. +A few implementations are problematic: +.bP +NetBSD curses defines the symbols as a \fBwchar_t\fP within a \fBcchar_t\fP. +.bP +HPUX curses equates some of the \fIACS_\fP symbols +to the analogous \fIWACS_\fP symbols as if the \fIACS_\fP symbols were +wide characters. +The misdefined symbols are the arrows +and other symbols which are not used for line-drawing. +.PP +X/Open Curses does not define symbols for thick- or double-lines. +SVr4 curses implementations defined their line-drawing symbols in +terms of intermediate symbols. +This implementation extends those symbols, providing new definitions +which are not in the SVr4 implementations. +.PP +Not all Unicode-capable terminals provide support for VT100-style +alternate character sets (i.e., the \fBacsc\fP capability), +with their corresponding line-drawing characters. +X/Open Curses did not address the aspect of integrating Unicode with +line-drawing characters. +Existing implementations of Unix curses (AIX, HPUX, Solaris) +use only the \fBacsc\fP character-mapping to provide this feature. +As a result, those implementations can only use single-byte line-drawing +characters. +Ncurses 5.3 (2002) provided a table of Unicode values to solve these problems. +NetBSD curses incorporated that table in 2010. +.PP +In this implementation, the Unicode values are used instead of the +terminal description's \fBacsc\fP mapping as discussed in ncurses(3X) +for the environment variable \fBNCURSES_NO_UTF8_ACS\fP. +In contrast, for the same cases, the line-drawing characters +described in \fBcurs_addch\fP(3X) will use only the ASCII default values. +.PP +Having Unicode available does not solve all of the problems with +line-drawing for curses: +.bP +The closest Unicode equivalents to the +VT100 graphics \fIS1\fP, \fIS3\fP, \fIS7\fP and \fIS9\fP +frequently are not displayed at +the regular intervals which the terminal used. +.bP +The \fIlantern\fP is a special case. +It originated with the AT&T 4410 terminal in the early 1980s. +There is no accessible documentation depicting the lantern symbol +on the AT&T terminal. +.IP +Lacking documentation, most readers assume that a \fIstorm lantern\fP +was intended. +But there are several possibilities, all with problems. +.IP +Unicode 6.0 (2010) does provide two lantern symbols: U+1F383 and U+1F3EE. +Those were not available in 2002, and are irrelevant since +they lie outside the BMP and as a result are not generally available +in terminals. +They are not storm lanterns, in any case. +.IP +Most \fIstorm lanterns\fP have a tapering glass chimney +(to guard against tipping); +some have a wire grid protecting the chimney. +.IP +For the tapering appearance, \[u2603] U+2603 was adequate. +In use on a terminal, no one can tell what the image represents. +Unicode calls it a snowman. +.IP +Others have suggested these alternatives: +\[sc] U+00A7 (section mark), +\[u0398] U+0398 (theta), +\[u03A6] U+03A6 (phi), +\[u03B4] U+03B4 (delta), +\[u2327] U+2327 (x in a rectangle), +\[u256C] U+256C (forms double vertical and horizontal), and +\[u2612] U+2612 (ballot box with x). +.SH SEE ALSO +.na +.PP +\fBncurses\fR(3NCURSES), +\fBaddch\fR(3NCURSES), +\fBattr\fR(3NCURSES), +\fBclear\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBputwc\fR(3) diff --git a/upstream/opensuse-leap-15-6/man3/add_wchstr.3ncurses b/upstream/opensuse-leap-15-6/man3/add_wchstr.3ncurses new file mode 100644 index 00000000..f087d625 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/add_wchstr.3ncurses @@ -0,0 +1,118 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_add_wchstr.3x,v 1.11 2017/11/18 23:56:00 tom Exp $ +.TH add_wchstr 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBadd_wchstr\fR, +\fBadd_wchnstr\fR, +\fBwadd_wchstr\fR, +\fBwadd_wchnstr\fR, +\fBmvadd_wchstr\fR, +\fBmvadd_wchnstr\fR, +\fBmvwadd_wchstr\fR, +\fBmvwadd_wchnstr\fR \- add an array of complex characters (and attributes) to a curses window +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint add_wchstr(const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint add_wchnstr(const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wadd_wchstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint wadd_wchnstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvadd_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvadd_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwadd_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvwadd_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These functions copy the (null-terminated) +array of complex characters \fIwchstr\fR +into the window image structure +starting at the current cursor position. +The four functions with \fIn\fR as the last +argument copy at most \fIn\fR elements, +but no more than will fit on the line. +If \fBn\fR=\fB\-1\fR then the whole array is copied, +to the maximum number of characters that will fit on the line. +.PP +The window cursor is \fInot\fR advanced. +These functions work faster than \fBwaddnstr\fR. +On the other hand: +.bP +they do not perform checking +(such as for the newline, backspace, or carriage return characters), +.bP +they do not advance the current cursor position, +.bP +they do not expand other control characters to ^-escapes, and +.bP +they truncate the string if it crosses the right margin, +rather than wrapping it around to the new line. +.PP +These functions end successfully +on encountering a null \fIcchar_t\fR, or +when they have filled the current line. +If a complex character cannot completely fit at the end of the current line, +the remaining columns are filled with the background character and rendition. +.SH RETURN VALUE +All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.PP +X/Open does not define any error conditions. +This implementation returns an error +if the window pointer is null. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +All functions except \fBwadd_wchnstr\fR may be macros. +.SH PORTABILITY +These entry points are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBaddwstr\fR(3NCURSES), +\fBncurses\fR(3NCURSES). +.PP +Comparable functions in the narrow-character (ncurses) library are +described in +\fBaddchstr\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/addch.3ncurses b/upstream/opensuse-leap-15-6/man3/addch.3ncurses new file mode 100644 index 00000000..a2b7fd02 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/addch.3ncurses @@ -0,0 +1,267 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addch.3x,v 1.44 2017/11/20 01:27:20 tom Exp $ +.TH addch 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBaddch\fR, +\fBwaddch\fR, +\fBmvaddch\fR, +\fBmvwaddch\fR, +\fBechochar\fR, +\fBwechochar\fR \- add a character (with attributes) to a \fBcurses\fR window, then advance the cursor +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint addch(const chtype ch);\fR +.br +\fBint waddch(WINDOW *win, const chtype ch);\fR +.br +\fBint mvaddch(int y, int x, const chtype ch);\fR +.br +\fBint mvwaddch(WINDOW *win, int y, int x, const chtype ch);\fR +.br +\fBint echochar(const chtype ch);\fR +.br +\fBint wechochar(WINDOW *win, const chtype ch);\fR +.br +.SH DESCRIPTION +.SS Adding characters +The \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR and \fBmvwaddch\fR routines put +the character \fIch\fR into the given window at its current window position, +which is then advanced. They are analogous to \fBputchar\fR(3) in \fBstdio\fR(3). +If the advance is at the right margin: +.bP +The cursor automatically wraps to the beginning of the next line. +.bP +At the bottom of the current scrolling region, +and if \fBscrollok\fR is enabled, +the scrolling region is scrolled up one line. +.bP +If \fBscrollok\fR is not enabled, +writing a character at the lower right margin succeeds. +However, an error is returned because +it is not possible to wrap to a new line +.PP +If \fIch\fR is a tab, newline, carriage return or backspace, +the cursor is moved appropriately within the window: +.bP +Backspace moves the cursor one character left; at the left +edge of a window it does nothing. +.bP +Carriage return moves the cursor to the window left margin on the current line. +.bP +Newline does a \fBclrtoeol\fR, +then moves the cursor to the window left margin on the next line, +scrolling the window if on the last line. +.bP +Tabs are considered to be at every eighth column. +The tab interval may be altered by setting the \fBTABSIZE\fR variable. +.PP +If \fIch\fR is any other control character, it +is drawn in \fB^\fR\fIX\fR notation. Calling \fBwinch\fR after adding a +control character does not return the character itself, but instead returns +the ^-representation of the control character. +.PP +Video attributes can be combined with a character argument passed to +\fBaddch\fR or related functions by logical-ORing them into the character. +(Thus, text, including attributes, can be copied from one place to another +using \fBinch\fR(3X) and \fBaddch\fR.) See the \fBattr\fR(3NCURSES) page for +values of predefined video attribute constants that can be usefully OR'ed +into characters. +.SS Echoing characters +.PP +The \fBechochar\fR and \fBwechochar\fR routines are equivalent to a call to +\fBaddch\fR followed by a call to \fBrefresh\fR(3X), or a call to \fBwaddch\fR +followed by a call to \fBwrefresh\fR. The knowledge that only a single +character is being output is used and, for non-control characters, a +considerable performance gain may be seen by using these routines instead of +their equivalents. +.SS Line Graphics +The following variables may be used to add line drawing characters to the +screen with routines of the \fBaddch\fR family. The default character listed +below is used if the \fBacsc\fR capability does not define a terminal-specific +replacement for it, +or if the terminal and locale configuration requires Unicode but the +library is unable to use Unicode. +.PP +The names are taken from VT100 nomenclature. +.PP +.TS +l l l l +l l l l +_ _ _ _ +l l l l. +\fBACS\fR \fBACS\fR \fBacsc\fP \fBGlyph\fR +\fBName\fR \fBDefault\fR \fBchar\fP \fBName\fR +ACS_BLOCK # 0 solid square block +ACS_BOARD # h board of squares +ACS_BTEE + v bottom tee +ACS_BULLET o ~ bullet +ACS_CKBOARD : a checker board (stipple) +ACS_DARROW v . arrow pointing down +ACS_DEGREE ' f degree symbol +ACS_DIAMOND + ` diamond +ACS_GEQUAL > > greater-than-or-equal-to +ACS_HLINE \- q horizontal line +ACS_LANTERN # i lantern symbol +ACS_LARROW < , arrow pointing left +ACS_LEQUAL < y less-than-or-equal-to +ACS_LLCORNER + m lower left-hand corner +ACS_LRCORNER + j lower right-hand corner +ACS_LTEE + t left tee +ACS_NEQUAL ! | not-equal +ACS_PI * { greek pi +ACS_PLMINUS # g plus/minus +ACS_PLUS + n plus +ACS_RARROW > + arrow pointing right +ACS_RTEE + u right tee +ACS_S1 \- o scan line 1 +ACS_S3 \- p scan line 3 +ACS_S7 \- r scan line 7 +ACS_S9 \&_ s scan line 9 +ACS_STERLING f } pound-sterling symbol +ACS_TTEE + w top tee +ACS_UARROW ^ \- arrow pointing up +ACS_ULCORNER + l upper left-hand corner +ACS_URCORNER + k upper right-hand corner +ACS_VLINE | x vertical line +.TE +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success +(the SVr4 manuals specify only +\*(``an integer value other than \fBERR\fR\*('') upon successful completion, +unless otherwise noted in the preceding routine descriptions. +.PP +Functions with a \*(``mv\*('' prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and +\fBechochar\fR may be macros. +.SH PORTABILITY +All these functions are described in the XSI Curses standard, Issue 4. +The defaults specified for forms-drawing characters apply in the POSIX locale. +.SS ACS Symbols +.LP +X/Open Curses states that the \fIACS_\fP definitions are \fBchar\fP constants. +For the wide-character implementation (see \fBcurs_add_wch\fP), +there are analogous \fIWACS_\fP definitions which are \fBcchar_t\fP constants. +.LP +Some ACS symbols +(ACS_S3, +ACS_S7, +ACS_LEQUAL, +ACS_GEQUAL, +ACS_PI, +ACS_NEQUAL, +ACS_STERLING) +were not documented in +any publicly released System V. However, many publicly available terminfos +include \fBacsc\fR strings in which their key characters (pryz{|}) are +embedded, and a second-hand list of their character descriptions has come +to light. The ACS-prefixed names for them were invented for \fBncurses\fR(3NCURSES). +.LP +The \fIdisplayed\fP values for the \fIACS_\fP and \fIWACS_\fP constants +depend on +.bP +the library configuration, i.e., \fBncurses\fP versus \fBncursesw\fP, +where the latter is capable of displaying Unicode while the former is not, and +.bP +whether the \fIlocale\fP uses UTF-8 encoding. +.LP +In certain cases, the terminal is unable to display line-drawing characters +except by using UTF-8 (see the discussion of \fBNCURSES_NO_UTF8_ACS\fP in +ncurses(3X)). +.SS Character Set +X/Open Curses assumes that the parameter passed to \fBwaddch\fP contains +a single character. +As discussed in \fBcurs_attr\fP(3X), that character may have been +more than eight bits in an SVr3 or SVr4 implementation, +but in the X/Open Curses model, the details are not given. +The important distinction between SVr4 curses and X/Open Curses is +that the non-character information (attributes and color) was +separated from the character information which is packed in a \fBchtype\fP +to pass to \fBwaddch\fP. +.PP +In this implementation, \fBchtype\fP holds eight bits. +But ncurses allows multibyte characters to be passed in a succession +of calls to \fBwaddch\fP. +The other implementations do not do this; +a call to \fBwaddch\fP passes exactly one character +which may be rendered as one or more cells on the screen +depending on whether it is printable. +.PP +Depending on the locale settings, +ncurses will inspect the byte passed in each call to \fBwaddch\fP, +and check if the latest call will continue a multibyte sequence. +When a character is \fIcomplete\fP, +ncurses displays the character and moves to the next position in the screen. +.PP +If the calling application interrupts the succession of bytes in +a multibyte character by moving the current location (e.g., using \fBwmove\fP), +ncurses discards the partially built character, +starting over again. +.PP +For portability to other implementations, +do not rely upon this behavior: +.bP +check if a character can be represented as a single byte in the current locale +before attempting call \fBwaddch\fP, and +.bP +call \fBwadd_wch\fP for characters which cannot be handled by \fBwaddch\fP. +.SS TABSIZE +.LP +The \fBTABSIZE\fR variable is implemented in some versions of curses, +but is not part of X/Open curses. +.LP +If \fIch\fR is a carriage return, +the cursor is moved to the beginning of the current row of the window. +This is true of other implementations, but is not documented. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBattr\fR(3NCURSES), +\fBclear\fR(3NCURSES), +\fBinch\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBputc\fR(3). +.PP +Comparable functions in the wide-character (ncursesw) library are +described in +\fBadd_wch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/addchstr.3ncurses b/upstream/opensuse-leap-15-6/man3/addchstr.3ncurses new file mode 100644 index 00000000..7205ee18 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/addchstr.3ncurses @@ -0,0 +1,112 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addchstr.3x,v 1.17 2017/11/18 23:56:00 tom Exp $ +.TH addchstr 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBaddchstr\fR, +\fBaddchnstr\fR, +\fBwaddchstr\fR, +\fBwaddchnstr\fR, +\fBmvaddchstr\fR, +\fBmvaddchnstr\fR, +\fBmvwaddchstr\fR, +\fBmvwaddchnstr\fR \- add a string of characters (and attributes) to a \fBcurses\fR window +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint addchstr(const chtype *chstr);\fR +.br +\fBint addchnstr(const chtype *chstr, int n);\fR +.br +\fBint waddchstr(WINDOW *win, const chtype *chstr);\fR +.br +\fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR +.br +\fBint mvaddchstr(int y, int x, const chtype *chstr);\fR +.br +\fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR +.br +\fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR +.br +\fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR +.fi +.SH DESCRIPTION +These functions copy the (null-terminated) +\fIchstr\fR array +into the window image structure +starting at the current cursor position. +The four functions with \fIn\fR as the last +argument copy at most \fIn\fR elements, +but no more than will fit on the line. +If \fBn\fR=\fB\-1\fR then the whole array is copied, +to the maximum number of characters that will fit on the line. +.PP +The window cursor is \fInot\fR advanced. +These functions work faster than \fBwaddnstr\fR. +On the other hand: +.bP +they do not perform checking +(such as for the newline, backspace, or carriage return characters), +.bP +they do not advance the current cursor position, +.bP +they do not expand other control characters to ^-escapes, and +.bP +they truncate the string if it crosses the right margin, +rather than wrapping it around to the new line. +.SH RETURN VALUE +All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.PP +X/Open does not define any error conditions. +This implementation returns an error +if the window pointer is null. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +All functions except \fBwaddchnstr\fR may be macros. +.SH PORTABILITY +These entry points are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBaddstr\fR(3NCURSES), +\fBncurses\fR(3NCURSES). +.PP +Comparable functions in the wide-character (ncursesw) library are +described in +\fBadd_wchstr\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/addseverity.3 b/upstream/opensuse-leap-15-6/man3/addseverity.3 new file mode 100644 index 00000000..434bfc74 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/addseverity.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" adapted glibc info page +.\" +.\" polished a little, aeb +.TH addseverity 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +addseverity \- introduce new severity classes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.PP +.B #include +.PP +.BI "int addseverity(int " severity ", const char *" s ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR addseverity (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +This function allows the introduction of new severity classes +which can be addressed by the +.I severity +argument of the +.BR fmtmsg (3) +function. +By default, that function knows only how to +print messages for severity 0-4 (with strings (none), HALT, +ERROR, WARNING, INFO). +This call attaches the given string +.I s +to the given value +.IR severity . +If +.I s +is NULL, the severity class with the numeric value +.I severity +is removed. +It is not possible to overwrite or remove one of the default +severity classes. +The severity value must be nonnegative. +.SH RETURN VALUE +Upon success, the value +.B MM_OK +is returned. +Upon error, the return value is +.BR MM_NOTOK . +Possible errors include: out of memory, attempt to remove a +nonexistent or default severity class. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR addseverity () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +System V. +.SH NOTES +New severity classes can also be added by setting the environment variable +.BR SEV_LEVEL . +.SH SEE ALSO +.BR fmtmsg (3) diff --git a/upstream/opensuse-leap-15-6/man3/addstr.3ncurses b/upstream/opensuse-leap-15-6/man3/addstr.3ncurses new file mode 100644 index 00000000..10b792bb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/addstr.3ncurses @@ -0,0 +1,102 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addstr.3x,v 1.18 2017/11/18 23:56:00 tom Exp $ +.TH addstr 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBaddstr\fR, +\fBaddnstr\fR, +\fBwaddstr\fR, +\fBwaddnstr\fR, +\fBmvaddstr\fR, +\fBmvaddnstr\fR, +\fBmvwaddstr\fR, +\fBmvwaddnstr\fR \- add a string of characters to a \fBcurses\fR window and advance cursor +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint addstr(const char *\fR\fIstr\fR\fB);\fR +.br +\fBint addnstr(const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint waddstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint waddnstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvaddstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint mvaddnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwaddstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR +.br +\fBint mvwaddnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These functions write the (null-terminated) character string +\fIstr\fR on the given window. +It is similar to calling \fBwaddch\fR once for each character in the string. +.PP +The \fImv\fR functions perform cursor movement once, before writing any +characters. +Thereafter, the cursor is advanced as a side-effect of writing to the window. +.PP +The four functions with \fIn\fR as the last argument +write at most \fIn\fR characters, +or until a terminating null is reached. +If \fIn\fR is \-1, then the entire string will be added. +.SH RETURN VALUE +All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.PP +X/Open does not define any error conditions. +This implementation returns an error +.bP +if the window pointer is null or +.bP +if the string pointer is null or +.bP +if the corresponding calls to \fBwaddch\fP return an error. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +All of these functions except \fBwaddnstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBaddch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/addwstr.3ncurses b/upstream/opensuse-leap-15-6/man3/addwstr.3ncurses new file mode 100644 index 00000000..1925fe4a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/addwstr.3ncurses @@ -0,0 +1,104 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_addwstr.3x,v 1.12 2017/11/18 23:56:00 tom Exp $ +.TH addwstr 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBaddwstr\fR, +\fBaddnwstr\fR, +\fBwaddwstr\fR, +\fBwaddnwstr\fR, +\fBmvaddwstr\fR, +\fBmvaddnwstr\fR, +\fBmvwaddwstr\fR, +\fBmvwaddnwstr\fR \- add a string of wide characters to a \fBcurses\fR window and advance cursor +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint addwstr(const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint addnwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint waddwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint waddnwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvaddwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvaddnwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwaddwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwaddnwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These functions write the characters of the +(null-terminated) \fBwchar_t\fR character string +\fIwstr\fR on the given window. +It is similar to constructing a \fBcchar_t\fR for each wchar_t in the string, +then calling \fBwadd_wch\fR for the resulting \fBcchar_t\fR. +.PP +The \fImv\fR functions perform cursor movement once, before writing any +characters. +Thereafter, the cursor is advanced as a side-effect of writing to the window. +.PP +The four functions with \fIn\fR as the last argument +write at most \fIn\fR \fBwchar_t\fR characters, +or until a terminating null is reached. +If \fIn\fR is \-1, then the entire string will be added. +.SH RETURN VALUE +All functions return the integer \fBERR\fR upon failure and \fBOK\fR on success. +.PP +X/Open does not define any error conditions. +This implementation returns an error +.bP +if the window pointer is null or +.bP +if the string pointer is null or +.bP +if the corresponding calls to \fBwadd_wch\fP return an error. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +All of these functions except \fBwaddnwstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBadd_wch\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/adjtime.3 b/upstream/opensuse-leap-15-6/man3/adjtime.3 new file mode 100644 index 00000000..05bff8b9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/adjtime.3 @@ -0,0 +1,155 @@ +'\" t +.\" Copyright (c) 2006 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH adjtime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +adjtime \- correct the time to synchronize the system clock +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int adjtime(const struct timeval *" delta ", struct timeval *" olddelta ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR adjtime (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR adjtime () +function gradually adjusts the system clock (as returned by +.BR gettimeofday (2)). +The amount of time by which the clock is to be adjusted is specified +in the structure pointed to by +.IR delta . +This structure has the following form: +.PP +.in +4n +.EX +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ +}; +.EE +.in +.PP +If the adjustment in +.I delta +is positive, then the system clock is speeded up by some +small percentage (i.e., by adding a small +amount of time to the clock value in each second) until the adjustment +has been completed. +If the adjustment in +.I delta +is negative, then the clock is slowed down in a similar fashion. +.PP +If a clock adjustment from an earlier +.BR adjtime () +call is already in progress +at the time of a later +.BR adjtime () +call, and +.I delta +is not NULL for the later call, then the earlier adjustment is stopped, +but any already completed part of that adjustment is not undone. +.PP +If +.I olddelta +is not NULL, then the buffer that it points to is used to return +the amount of time remaining from any previous adjustment that +has not yet been completed. +.SH RETURN VALUE +On success, +.BR adjtime () +returns 0. +On failure, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The adjustment in +.I delta +is outside the permitted range. +.TP +.B EPERM +The caller does not have sufficient privilege to adjust the time. +Under Linux, the +.B CAP_SYS_TIME +capability is required. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR adjtime () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD, System V. +.SH NOTES +The adjustment that +.BR adjtime () +makes to the clock is carried out in such a manner that the clock +is always monotonically increasing. +Using +.BR adjtime () +to adjust the time prevents the problems that can be caused for certain +applications (e.g., +.BR make (1)) +by abrupt positive or negative jumps in the system time. +.PP +.BR adjtime () +is intended to be used to make small adjustments to the system time. +Most systems impose a limit on the adjustment that can be specified in +.IR delta . +In the glibc implementation, +.I delta +must be less than or equal to (INT_MAX / 1000000 \- 2) +and greater than or equal to (INT_MIN / 1000000 + 2) +(respectively 2145 and \-2145 seconds on i386). +.SH BUGS +A longstanding bug +.\" http://sourceware.org/bugzilla/show_bug?id=2449 +.\" http://bugzilla.kernel.org/show_bug.cgi?id=6761 +meant that if +.I delta +was specified as NULL, +no valid information about the outstanding clock adjustment was returned in +.IR olddelta . +(In this circumstance, +.BR adjtime () +should return the outstanding clock adjustment, without changing it.) +This bug is fixed +.\" Thanks to the new adjtimex() ADJ_OFFSET_SS_READ flag +on systems with glibc 2.8 or later and +Linux kernel 2.6.26 or later. +.SH SEE ALSO +.BR adjtimex (2), +.BR gettimeofday (2), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_cancel.3 b/upstream/opensuse-leap-15-6/man3/aio_cancel.3 new file mode 100644 index 00000000..0145c97c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_cancel.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_cancel 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_cancel \- cancel an outstanding asynchronous I/O request +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_cancel () +function attempts to cancel outstanding asynchronous I/O requests +for the file descriptor +.IR fd . +If +.I aiocbp +is NULL, all such requests are canceled. +Otherwise, only the request +described by the control block pointed to by +.I aiocbp +is canceled. +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +Normal asynchronous notification occurs for canceled requests (see +.BR aio (7) +and +.BR sigevent (7)). +The request return status +.RB ( aio_return (3)) +is set to \-1, and the request error status +.RB ( aio_error (3)) +is set to +.BR ECANCELED . +The control block of requests that cannot be canceled is not changed. +.PP +If the request could not be canceled, +then it will terminate in the usual way after performing the I/O operation. +(In this case, +.BR aio_error (3) +will return the status +.BR EINPROGRESSS .) +.PP +If +.I aiocbp +is not NULL, and +.I fd +differs from the file descriptor with which the asynchronous operation +was initiated, unspecified results occur. +.PP +Which operations are cancelable is implementation-defined. +.\" FreeBSD: not those on raw disk devices. +.SH RETURN VALUE +The +.BR aio_cancel () +function returns one of the following values: +.TP +.B AIO_CANCELED +All requests were successfully canceled. +.TP +.B AIO_NOTCANCELED +At least one of the +requests specified was not canceled because it was in progress. +In this case, one may check the status of individual requests using +.BR aio_error (3). +.TP +.B AIO_ALLDONE +All requests had already been completed before the call. +.TP +\-1 +An error occurred. +The cause of the error can be found by inspecting +.IR errno . +.SH ERRORS +.TP +.B EBADF +.I fd +is not a valid file descriptor. +.TP +.B ENOSYS +.BR aio_cancel () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_cancel () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH EXAMPLES +See +.BR aio (7). +.SH SEE ALSO +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_error.3 b/upstream/opensuse-leap-15-6/man3/aio_error.3 new file mode 100644 index 00000000..89fef418 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_error.3 @@ -0,0 +1,98 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_error 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_error \- get error status of asynchronous I/O operation +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int aio_error(const struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_error () +function returns the error status for the asynchronous I/O request +with control block pointed to by +.IR aiocbp . +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.SH RETURN VALUE +This function returns one of the following: +.TP +.B EINPROGRESS +if the request has not been +completed yet. +.TP +.B ECANCELED +if the request was canceled. +.TP +.B 0 +if the request completed successfully. +.TP +.RB "> " 0 +A positive error number, if the asynchronous I/O operation failed. +This is the same value that would have been stored in the +.I errno +variable in the case of a synchronous +.BR read (2), +.BR write (2), +.BR fsync (2), +or +.BR fdatasync (2) +call. +.SH ERRORS +.TP +.B EINVAL +.I aiocbp +does not point at a control block for an asynchronous I/O request +of which the return status (see +.BR aio_return (3)) +has not been retrieved yet. +.TP +.B ENOSYS +.BR aio_error () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_error () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH EXAMPLES +See +.BR aio (7). +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_fsync.3 b/upstream/opensuse-leap-15-6/man3/aio_fsync.3 new file mode 100644 index 00000000..7aba06b1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_fsync.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_fsync 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_fsync \- asynchronous file synchronization +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int aio_fsync(int " op ", struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_fsync () +function does a sync on all outstanding asynchronous I/O operations +associated with +.IR aiocbp\->aio_fildes . +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +More precisely, if +.I op +is +.BR O_SYNC , +then all currently queued I/O operations shall be +completed as if by a call of +.BR fsync (2), +and if +.I op +is +.BR O_DSYNC , +this call is the asynchronous analog of +.BR fdatasync (2). +.PP +Note that this is a request only; it does not wait for I/O completion. +.PP +Apart from +.IR aio_fildes , +the only field in the structure pointed to by +.I aiocbp +that is used by this call is the +.I aio_sigevent +field (a +.I sigevent +structure, described in +.BR sigevent (7)), +which indicates the desired type of asynchronous notification at completion. +All other fields are ignored. +.SH RETURN VALUE +On success (the sync request was successfully queued) +this function returns 0. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +Out of resources. +.TP +.B EBADF +.I aio_fildes +is not a valid file descriptor open for writing. +.TP +.B EINVAL +Synchronized I/O is not supported for this file, or +.I op +is not +.B O_SYNC +or +.BR O_DSYNC . +.TP +.B ENOSYS +.BR aio_fsync () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_fsync () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7), +.BR sigevent (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_init.3 b/upstream/opensuse-leap-15-6/man3/aio_init.3 new file mode 100644 index 00000000..2f5bdd4c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_init.3 @@ -0,0 +1,78 @@ +.\" Copyright (c) 2010 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH aio_init 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_init \- asynchronous I/O initialization +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B "#include " +.PP +.BI "void aio_init(const struct aioinit *" init ); +.fi +.SH DESCRIPTION +The GNU-specific +.BR aio_init () +function allows the caller to provide tuning hints to the +glibc POSIX AIO implementation. +Use of this function is optional, but to be effective, +it must be called before employing any other functions in the POSIX AIO API. +.PP +The tuning information is provided in the buffer pointed to by the argument +.IR init . +This buffer is a structure of the following form: +.PP +.in +4n +.EX +struct aioinit { + int aio_threads; /* Maximum number of threads */ + int aio_num; /* Number of expected simultaneous + requests */ + int aio_locks; /* Not used */ + int aio_usedba; /* Not used */ + int aio_debug; /* Not used */ + int aio_numusers; /* Not used */ + int aio_idle_time; /* Number of seconds before idle thread + terminates (since glibc 2.2) */ + int aio_reserved; +}; +.EE +.in +.PP +The following fields are used in the +.I aioinit +structure: +.TP +.I aio_threads +This field specifies the maximum number of worker threads that +may be used by the implementation. +If the number of outstanding I/O operations exceeds this limit, +then excess operations will be queued until a worker thread becomes free. +If this field is specified with a value less than 1, the value 1 is used. +The default value is 20. +.TP +.I aio_num +This field should specify the maximum number of simultaneous I/O requests +that the caller expects to enqueue. +If a value less than 32 is specified for this field, +it is rounded up to 32. +.\" FIXME . But, if aio_num > 32, the behavior looks strange. See +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12083 +The default value is 64. +.TP +.I aio_idle_time +This field specifies the amount of time in seconds that a +worker thread should wait for further requests before terminating, +after having completed a previous request. +The default value is 1. +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH SEE ALSO +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_read.3 b/upstream/opensuse-leap-15-6/man3/aio_read.3 new file mode 100644 index 00000000..51625895 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_read.3 @@ -0,0 +1,162 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_read 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_read \- asynchronous read +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int aio_read(struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_read () +function queues the I/O request described by the buffer pointed to by +.IR aiocbp . +This function is the asynchronous analog of +.BR read (2). +The arguments of the call +.PP +.in +4n +.EX +read(fd, buf, count) +.EE +.in +.PP +correspond (in order) to the fields +.IR aio_fildes , +.IR aio_buf , +and +.I aio_nbytes +of the structure pointed to by +.IR aiocbp . +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +The data is read starting at the absolute position +.IR aiocbp\->aio_offset , +regardless of the file offset. +After the call, +the value of the file offset is unspecified. +.PP +The "asynchronous" means that this call returns as soon as the +request has been enqueued; the read may or may not have completed +when the call returns. +One tests for completion using +.BR aio_error (3). +The return status of a completed I/O operation can be obtained by +.BR aio_return (3). +Asynchronous notification of I/O completion can be obtained by setting +.I aiocbp\->aio_sigevent +appropriately; see +.BR sigevent (7) +for details. +.PP +If +.B _POSIX_PRIORITIZED_IO +is defined, and this file supports it, +then the asynchronous operation is submitted at a priority equal +to that of the calling process minus +.IR aiocbp\->aio_reqprio . +.PP +The field +.I aiocbp\->aio_lio_opcode +is ignored. +.PP +No data is read from a regular file beyond its maximum offset. +.SH RETURN VALUE +On success, 0 is returned. +On error, the request is not enqueued, \-1 +is returned, and +.I errno +is set to indicate the error. +If an error is detected only later, it will +be reported via +.BR aio_return (3) +(returns status \-1) and +.BR aio_error (3) +(error status\[em]whatever one would have gotten in +.IR errno , +such as +.BR EBADF ). +.SH ERRORS +.TP +.B EAGAIN +Out of resources. +.TP +.B EBADF +.I aio_fildes +is not a valid file descriptor open for reading. +.TP +.B EINVAL +One or more of +.IR aio_offset , +.IR aio_reqprio , +or +.I aio_nbytes +are invalid. +.TP +.B ENOSYS +.BR aio_read () +is not implemented. +.TP +.B EOVERFLOW +The file is a regular file, we start reading before end-of-file +and want at least one byte, but the starting position is past +the maximum offset for this file. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_read () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +It is a good idea to zero out the control block before use. +The control block must not be changed while the read operation +is in progress. +The buffer area being read into +.\" or the control block of the operation +must not be accessed during the operation or undefined results may occur. +The memory areas involved must remain valid. +.PP +Simultaneous I/O operations specifying the same +.I aiocb +structure produce undefined results. +.SH EXAMPLES +See +.BR aio (7). +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_return.3 b/upstream/opensuse-leap-15-6/man3/aio_return.3 new file mode 100644 index 00000000..742d76cc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_return.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_return 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_return \- get return status of asynchronous I/O operation +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "ssize_t aio_return(struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_return () +function returns the final return status for the asynchronous I/O request +with control block pointed to by +.IR aiocbp . +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +This function should be called only once for any given request, after +.BR aio_error (3) +returns something other than +.BR EINPROGRESS . +.SH RETURN VALUE +If the asynchronous I/O operation has completed, this function returns +the value that would have been returned in case of a synchronous +.BR read (2), +.BR write (2), +.BR fsync (2), +or +.BR fdatasync (2), +call. +On error, \-1 is returned, and \fIerrno\fP is set to indicate the error. +.PP +If the asynchronous I/O operation has not yet completed, +the return value and effect of +.BR aio_return () +are undefined. +.SH ERRORS +.TP +.B EINVAL +.I aiocbp +does not point at a control block for an asynchronous I/O request +of which the return status has not been retrieved yet. +.TP +.B ENOSYS +.BR aio_return () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_return () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH EXAMPLES +See +.BR aio (7). +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_suspend.3 b/upstream/opensuse-leap-15-6/man3/aio_suspend.3 new file mode 100644 index 00000000..9bdad5b0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_suspend.3 @@ -0,0 +1,146 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" and Copyright (C) 2010 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_suspend 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_suspend \- wait for asynchronous I/O operation or timeout +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.PP +.B "#include " +.PP +.BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems , +.BI " const struct timespec *restrict " timeout ); +.fi +.SH DESCRIPTION +The +.BR aio_suspend () +function suspends the calling thread until one of the following occurs: +.IP \[bu] 3 +One or more of the asynchronous I/O requests in the list +.I aiocb_list +has completed. +.IP \[bu] +A signal is delivered. +.IP \[bu] +.I timeout +is not NULL and the specified time interval has passed. +(For details of the +.I timespec +structure, see +.BR nanosleep (2).) +.PP +The +.I nitems +argument specifies the number of items in +.IR aiocb_list . +Each item in the list pointed to by +.I aiocb_list +must be either NULL (and then is ignored), +or a pointer to a control block on which I/O was initiated using +.BR aio_read (3), +.BR aio_write (3), +or +.BR lio_listio (3). +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +If +.B CLOCK_MONOTONIC +is supported, this clock is used to measure +the timeout interval (see +.BR clock_gettime (2)). +.SH RETURN VALUE +If this function returns after completion of one of the I/O +requests specified in +.IR aiocb_list , +0 is returned. +Otherwise, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +The call timed out before any of the indicated operations +had completed. +.TP +.B EINTR +The call was ended by signal +(possibly the completion signal of one of the operations we were +waiting for); see +.BR signal (7). +.TP +.B ENOSYS +.BR aio_suspend () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_suspend () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.PP +POSIX doesn't specify the parameters to be +.IR restrict ; +that is specific to glibc. +.SH NOTES +One can achieve polling by using a non-NULL +.I timeout +that specifies a zero time interval. +.PP +If one or more of the asynchronous I/O operations specified in +.I aiocb_list +has already completed at the time of the call to +.BR aio_suspend (), +then the call returns immediately. +.PP +To determine which I/O operations have completed +after a successful return from +.BR aio_suspend (), +use +.BR aio_error (3) +to scan the list of +.I aiocb +structures pointed to by +.IR aiocb_list . +.SH BUGS +The glibc implementation of +.BR aio_suspend () +is not async-signal-safe, +.\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=13172 +in violation of the requirements of POSIX.1. +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_write (3), +.BR lio_listio (3), +.BR aio (7), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/aio_write.3 b/upstream/opensuse-leap-15-6/man3/aio_write.3 new file mode 100644 index 00000000..6e92b20c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/aio_write.3 @@ -0,0 +1,164 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH aio_write 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +aio_write \- asynchronous write +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int aio_write(struct aiocb *" aiocbp ); +.fi +.SH DESCRIPTION +The +.BR aio_write () +function queues the I/O request described by the buffer pointed to by +.IR aiocbp . +This function is the asynchronous analog of +.BR write (2). +The arguments of the call +.PP +.in +4n +.EX +write(fd, buf, count) +.EE +.in +.PP +correspond (in order) to the fields +.IR aio_fildes , +.IR aio_buf , +and +.I aio_nbytes +of the structure pointed to by +.IR aiocbp . +(See +.BR aio (7) +for a description of the +.I aiocb +structure.) +.PP +If +.B O_APPEND +is not set, the data is written starting at the +absolute position +.IR aiocbp\->aio_offset , +regardless of the file offset. +If +.B O_APPEND +is set, data is written at the end of the file in the same order as +.BR aio_write () +calls are made. +After the call, the value of the file offset is unspecified. +.PP +The "asynchronous" means that this call returns as soon as the +request has been enqueued; the write may or may not have completed +when the call returns. +One tests for completion using +.BR aio_error (3). +The return status of a completed I/O operation can be obtained +.BR aio_return (3). +Asynchronous notification of I/O completion can be obtained by setting +.I aiocbp\->aio_sigevent +appropriately; see +.BR sigevent (7) +for details. +.PP +If +.B _POSIX_PRIORITIZED_IO +is defined, and this file supports it, +then the asynchronous operation is submitted at a priority equal +to that of the calling process minus +.IR aiocbp\->aio_reqprio . +.PP +The field +.I aiocbp\->aio_lio_opcode +is ignored. +.PP +No data is written to a regular file beyond its maximum offset. +.SH RETURN VALUE +On success, 0 is returned. +On error, the request is not enqueued, \-1 +is returned, and +.I errno +is set to indicate the error. +If an error is detected only later, it will +be reported via +.BR aio_return (3) +(returns status \-1) and +.BR aio_error (3) +(error status\[em]whatever one would have gotten in +.IR errno , +such as +.BR EBADF ). +.SH ERRORS +.TP +.B EAGAIN +Out of resources. +.TP +.B EBADF +.I aio_fildes +is not a valid file descriptor open for writing. +.TP +.B EFBIG +The file is a regular file, we want to write at least one byte, +but the starting position is at or beyond the maximum offset for this file. +.TP +.B EINVAL +One or more of +.IR aio_offset , +.IR aio_reqprio , +.I aio_nbytes +are invalid. +.TP +.B ENOSYS +.BR aio_write () +is not implemented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aio_write () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +It is a good idea to zero out the control block before use. +The control block must not be changed while the write operation +is in progress. +The buffer area being written out +.\" or the control block of the operation +must not be accessed during the operation or undefined results may occur. +The memory areas involved must remain valid. +.PP +Simultaneous I/O operations specifying the same +.I aiocb +structure produce undefined results. +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR lio_listio (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/alloca.3 b/upstream/opensuse-leap-15-6/man3/alloca.3 new file mode 100644 index 00000000..bcd917da --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/alloca.3 @@ -0,0 +1,141 @@ +'\" t +.\" Copyright (c) 1980, 1991 Regents of the University of California. +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)alloca.3 5.1 (Berkeley) 5/2/91 +.\" +.\" Converted Mon Nov 29 11:05:55 1993 by Rik Faith +.\" Modified Tue Oct 22 23:41:56 1996 by Eric S. Raymond +.\" 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). +.\" +.TH alloca 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +alloca \- allocate memory that is automatically freed +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *alloca(size_t " size ); +.fi +.SH DESCRIPTION +The +.BR alloca () +function allocates +.I size +bytes of space in the stack frame of the caller. +This temporary space is +automatically freed when the function that called +.BR alloca () +returns to its caller. +.SH RETURN VALUE +The +.BR alloca () +function returns a pointer to the beginning of the allocated space. +If the allocation causes stack overflow, program behavior is undefined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR alloca () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +PWB, 32V. +.SH NOTES +The +.BR alloca () +function is machine- and compiler-dependent. +Because it allocates from the stack, it's faster than +.BR malloc (3) +and +.BR free (3). +In certain cases, +it can also simplify memory deallocation in applications that use +.BR longjmp (3) +or +.BR siglongjmp (3). +Otherwise, its use is discouraged. +.PP +Because the space allocated by +.BR alloca () +is allocated within the stack frame, +that space is automatically freed if the function return +is jumped over by a call to +.BR longjmp (3) +or +.BR siglongjmp (3). +.PP +The space allocated by +.BR alloca () +is +.I not +automatically deallocated if the pointer that refers to it +simply goes out of scope. +.PP +Do not attempt to +.BR free (3) +space allocated by +.BR alloca ()! +.PP +By necessity, +.BR alloca () +is a compiler built-in, also known as +.BR __builtin_alloca (). +By default, modern compilers automatically translate all uses of +.BR alloca () +into the built-in, but this is forbidden if standards conformance is requested +.RI ( "\-ansi" , +.IR "\-std=c*" ), +in which case +.I +is required, lest a symbol dependency be emitted. +.PP +The fact that +.BR alloca () +is a built-in means it is impossible to take its address +or to change its behavior by linking with a different library. +.PP +Variable length arrays (VLAs) are part of the C99 standard, +optional since C11, and can be used for a similar purpose. +However, they do not port to standard C++, and, being variables, +live in their block scope and don't have an allocator-like interface, +making them unfit for implementing functionality like +.BR strdupa (3). +.SH BUGS +Due to the nature of the stack, it is impossible to check if the allocation +would overflow the space available, and, hence, neither is indicating an error. +(However, the program is likely to receive a +.B SIGSEGV +signal if it attempts to access unavailable space.) +.PP +On many systems +.BR alloca () +cannot be used inside the list of arguments of a function call, because +the stack space reserved by +.BR alloca () +would appear on the stack in the middle of the space for the +function arguments. +.SH SEE ALSO +.BR brk (2), +.BR longjmp (3), +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/arc4random.3 b/upstream/opensuse-leap-15-6/man3/arc4random.3 new file mode 100644 index 00000000..ed2081da --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/arc4random.3 @@ -0,0 +1,112 @@ +'\" t +.\" Copyright (C) 2023 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH arc4random 3 2023-03-18 "Linux man-pages 6.04" +.SH NAME +arc4random, arc4random_uniform, arc4random_buf +\- cryptographically-secure pseudorandom number generator +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B uint32_t arc4random(void); +.BI "uint32_t arc4random_uniform(uint32_t " upper_bound ); +.BI "void arc4random_buf(void " buf [. n "], size_t " n ); +.fi +.SH DESCRIPTION +These functions give cryptographically-secure pseudorandom numbers. +.PP +.BR arc4random () +returns a uniformly-distributed value. +.PP +.BR arc4random_uniform () +returns a uniformly-distributed value less than +.I upper_bound +(see BUGS). +.PP +.BR arc4random_buf () +fills the memory pointed to by +.IR buf , +with +.I n +bytes of pseudorandom data. +.PP +The +.BR rand (3) +and +.BR drand48 (3) +families of functions should only be used where +the quality of the pseudorandom numbers is not a concern +.I and +there's a need for repeatability of the results. +Unless you meet both of those conditions, +use the +.BR arc4random () +functions. +.SH RETURN VALUE +.BR arc4random () +returns a pseudorandom number. +.PP +.BR arc4random_uniform () +returns a pseudorandom number less than +.I upper_bound +for valid input, or +.B 0 +when +.I upper_bound +is invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR arc4random (), +.BR arc4random_uniform (), +.BR arc4random_buf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +OpenBSD 2.1, +FreeBSD 3.0, +NetBSD 1.6, +DragonFly 1.0, +libbsd, +glibc 2.36. +.SH BUGS +An +.I upper_bound +of +.B 0 +doesn't make sense in a call to +.BR arc4random_uniform (). +Such a call will fail, and return +.BR 0 . +Be careful, +since that value is +.I not +less than +.IR upper_bound . +In some cases, +such as accessing an array, +using that value could result in Undefined Behavior. +.SH SEE ALSO +.BR getrandom (3), +.BR rand (3), +.BR drand48 (3), +.BR random (7) diff --git a/upstream/opensuse-leap-15-6/man3/argz_add.3 b/upstream/opensuse-leap-15-6/man3/argz_add.3 new file mode 100644 index 00000000..cce20e4d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/argz_add.3 @@ -0,0 +1,240 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" based on the description in glibc source and infopages +.\" +.\" Corrections and additions, aeb +.TH argz_add 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +argz_add, argz_add_sep, argz_append, argz_count, argz_create, +argz_create_sep, argz_delete, argz_extract, argz_insert, +argz_next, argz_replace, argz_stringify \- functions to handle an argz list +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "error_t argz_add(char **restrict " argz ", size_t *restrict " argz_len , +.BI " const char *restrict " str ); +.PP +.BI "error_t argz_add_sep(char **restrict " argz \ +", size_t *restrict " argz_len , +.BI " const char *restrict " str ", int " delim ); +.PP +.BI "error_t argz_append(char **restrict " argz ", size_t *restrict " argz_len , +.BI " const char *restrict " buf ", size_t " buf_len ); +.PP +.BI "size_t argz_count(const char *" argz ", size_t " argz_len ); +.PP +.BI "error_t argz_create(char *const " argv "[], char **restrict " argz , +.BI " size_t *restrict " argz_len ); +.PP +.BI "error_t argz_create_sep(const char *restrict " str ", int " sep , +.BI " char **restrict " argz ", size_t *restrict " argz_len ); +.PP +.BI "void argz_delete(char **restrict " argz ", size_t *restrict " argz_len , +.BI " char *restrict " entry ); +.PP +.BI "void argz_extract(const char *restrict " argz ", size_t " argz_len , +.BI " char **restrict " argv ); +.PP +.BI "error_t argz_insert(char **restrict " argz ", size_t *restrict " argz_len , +.BI " char *restrict " before ", const char *restrict " entry ); +.PP +.BI "char *argz_next(const char *restrict " argz ", size_t " argz_len , +.BI " const char *restrict " entry ); +.PP +.BI "error_t argz_replace(char **restrict " argz \ +", size_t *restrict " argz_len , +.BI " const char *restrict " str ", const char *restrict " with , +.BI " unsigned int *restrict " replace_count ); +.PP +.BI "void argz_stringify(char *" argz ", size_t " len ", int " sep ); +.fi +.SH DESCRIPTION +These functions are glibc-specific. +.PP +An argz vector is a pointer to a character buffer together with a length. +The intended interpretation of the character buffer is an array +of strings, where the strings are separated by null bytes (\[aq]\e0\[aq]). +If the length is nonzero, the last byte of the buffer must be a null byte. +.PP +These functions are for handling argz vectors. +The pair (NULL,0) is an argz vector, and, conversely, +argz vectors of length 0 must have null pointer. +Allocation of nonempty argz vectors is done using +.BR malloc (3), +so that +.BR free (3) +can be used to dispose of them again. +.PP +.BR argz_add () +adds the string +.I str +at the end of the array +.IR *argz , +and updates +.I *argz +and +.IR *argz_len . +.PP +.BR argz_add_sep () +is similar, but splits the string +.I str +into substrings separated by the delimiter +.IR delim . +For example, one might use this on a UNIX search path with +delimiter \[aq]:\[aq]. +.PP +.BR argz_append () +appends the argz vector +.RI ( buf ,\ buf_len ) +after +.RI ( *argz ,\ *argz_len ) +and updates +.I *argz +and +.IR *argz_len . +(Thus, +.I *argz_len +will be increased by +.IR buf_len .) +.PP +.BR argz_count () +counts the number of strings, that is, +the number of null bytes (\[aq]\e0\[aq]), in +.RI ( argz ,\ argz_len ). +.PP +.BR argz_create () +converts a UNIX-style argument vector +.IR argv , +terminated by +.IR "(char\ *)\ 0" , +into an argz vector +.RI ( *argz ,\ *argz_len ). +.PP +.BR argz_create_sep () +converts the null-terminated string +.I str +into an argz vector +.RI ( *argz ,\ *argz_len ) +by breaking it up at every occurrence of the separator +.IR sep . +.PP +.BR argz_delete () +removes the substring pointed to by +.I entry +from the argz vector +.RI ( *argz ,\ *argz_len ) +and updates +.I *argz +and +.IR *argz_len . +.PP +.BR argz_extract () +is the opposite of +.BR argz_create (). +It takes the argz vector +.RI ( argz ,\ argz_len ) +and fills the array starting at +.I argv +with pointers to the substrings, and a final NULL, +making a UNIX-style argv vector. +The array +.I argv +must have room for +.IR argz_count ( argz ", " argz_len ") + 1" +pointers. +.PP +.BR argz_insert () +is the opposite of +.BR argz_delete (). +It inserts the argument +.I entry +at position +.I before +into the argz vector +.RI ( *argz ,\ *argz_len ) +and updates +.I *argz +and +.IR *argz_len . +If +.I before +is NULL, then +.I entry +will inserted at the end. +.PP +.BR argz_next () +is a function to step through the argz vector. +If +.I entry +is NULL, the first entry is returned. +Otherwise, the entry +following is returned. +It returns NULL if there is no following entry. +.PP +.BR argz_replace () +replaces each occurrence of +.I str +with +.IR with , +reallocating argz as necessary. +If +.I replace_count +is non-NULL, +.I *replace_count +will be incremented by the number of replacements. +.PP +.BR argz_stringify () +is the opposite of +.BR argz_create_sep (). +It transforms the argz vector into a normal string by replacing +all null bytes (\[aq]\e0\[aq]) except the last by +.IR sep . +.SH RETURN VALUE +All argz functions that do memory allocation have a return type of +.I error_t +(an integer type), +and return 0 for success, and +.B ENOMEM +if an allocation error occurs. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR argz_add (), +.BR argz_add_sep (), +.BR argz_append (), +.BR argz_count (), +.BR argz_create (), +.BR argz_create_sep (), +.BR argz_delete (), +.BR argz_extract (), +.BR argz_insert (), +.BR argz_next (), +.BR argz_replace (), +.BR argz_stringify () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH BUGS +Argz vectors without a terminating null byte may lead to +Segmentation Faults. +.SH SEE ALSO +.BR envz_add (3) diff --git a/upstream/opensuse-leap-15-6/man3/asin.3 b/upstream/opensuse-leap-15-6/man3/asin.3 new file mode 100644 index 00000000..6197b382 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/asin.3 @@ -0,0 +1,120 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH asin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +asin, asinf, asinl \- arc sine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double asin(double " x ); +.BI "float asinf(float " x ); +.BI "long double asinl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR asinf (), +.BR asinl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the principal value of the arc sine of +.IR x ; +that is the value whose sine is +.IR x . +.SH RETURN VALUE +On success, these functions return the principal value of the arc sine of +.I x +in radians; the return value is in the range [\-pi/2,\ pi/2]. +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), ++0 (\-0) is returned. +.PP +If +.I x +is outside the range [\-1,\ 1], +a domain error occurs, +and a NaN is returned. +.\" +.\" POSIX.1-2001 documents an optional range error for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is outside the range [\-1,\ 1] +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR asin (), +.BR asinf (), +.BR asinl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR acos (3), +.BR atan (3), +.BR atan2 (3), +.BR casin (3), +.BR cos (3), +.BR sin (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/asinh.3 b/upstream/opensuse-leap-15-6/man3/asinh.3 new file mode 100644 index 00000000..dba7af89 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/asinh.3 @@ -0,0 +1,112 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH asinh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +asinh, asinhf, asinhl \- inverse hyperbolic sine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double asinh(double " x ); +.BI "float asinhf(float " x ); +.BI "long double asinhl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR asinh (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR asinhf (), +.BR asinhl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the inverse hyperbolic sine of +.IR x ; +that is the value whose hyperbolic sine is +.IR x . +.SH RETURN VALUE +On success, these functions return the inverse hyperbolic sine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is positive infinity (negative infinity), +positive infinity (negative infinity) is returned. +.\" +.\" POSIX.1-2001 documents an optional range error for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR asinh (), +.BR asinhf (), +.BR asinhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR acosh (3), +.BR atanh (3), +.BR casinh (3), +.BR cosh (3), +.BR sinh (3), +.BR tanh (3) diff --git a/upstream/opensuse-leap-15-6/man3/asprintf.3 b/upstream/opensuse-leap-15-6/man3/asprintf.3 new file mode 100644 index 00000000..7e2ec6f0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/asprintf.3 @@ -0,0 +1,73 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Text fragments inspired by Martin Schulze . +.\" +.TH asprintf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +asprintf, vasprintf \- print to allocated string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int asprintf(char **restrict " strp ", const char *restrict " fmt ", ...);" +.BI "int vasprintf(char **restrict " strp ", const char *restrict " fmt , +.BI " va_list " ap ); +.fi +.SH DESCRIPTION +The functions +.BR asprintf () +and +.BR vasprintf () +are analogs of +.BR sprintf (3) +and +.BR vsprintf (3), +except that they allocate a string large enough to hold the output +including the terminating null byte (\[aq]\e0\[aq]), +and return a pointer to it via the first argument. +This pointer should be passed to +.BR free (3) +to release the allocated storage when it is no longer needed. +.SH RETURN VALUE +When successful, these functions return the number of bytes printed, +just like +.BR sprintf (3). +If memory allocation wasn't possible, or some other error occurs, +these functions will return \-1, and the contents of +.I strp +are undefined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR asprintf (), +.BR vasprintf () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The FreeBSD implementation sets +.I strp +to NULL on error. +.SH STANDARDS +GNU, BSD. +.SH SEE ALSO +.BR free (3), +.BR malloc (3), +.BR printf (3) diff --git a/upstream/opensuse-leap-15-6/man3/assert.3 b/upstream/opensuse-leap-15-6/man3/assert.3 new file mode 100644 index 00000000..4323c84e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/assert.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith +.\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond +.\" Modified Thu Jun 2 23:44:11 2016 by Nikos Mavrogiannopoulos +.TH assert 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +assert \- abort the program if assertion is false +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void assert(scalar " expression ); +.fi +.SH DESCRIPTION +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 +.I expression +is false (i.e., compares equal to zero), +.BR assert () +prints an error message to standard error +and terminates the program by calling +.BR abort (3). +The error message includes the name of the file and function containing the +.BR assert () +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 +.B NDEBUG +is defined at the moment +.I +was last included, the macro +.BR assert () +generates no code, and hence does nothing at all. +It is not recommended to define +.B NDEBUG +if using +.BR assert () +to detect error conditions since the software +may behave non-deterministically. +.SH RETURN VALUE +No value is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR assert () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, C99, POSIX.1-2001. +.PP +In C89, +.I expression +is required to be of type +.I int +and undefined behavior results if it is not, but in C99 +it may have any scalar type. +.\" See Defect Report 107 for more details. +.SH BUGS +.BR assert () +is implemented as a macro; if the expression tested has side-effects, +program behavior will be different depending on whether +.B NDEBUG +is defined. +This may create Heisenbugs which go away when debugging +is turned on. +.SH SEE ALSO +.BR abort (3), +.BR assert_perror (3), +.BR exit (3) diff --git a/upstream/opensuse-leap-15-6/man3/assert_perror.3 b/upstream/opensuse-leap-15-6/man3/assert_perror.3 new file mode 100644 index 00000000..26c69e81 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/assert_perror.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" This replaces an earlier man page written by Walter Harms +.\" . +.\" +.TH assert_perror 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +assert_perror \- test errnum and abort +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void assert_perror(int " errnum ); +.fi +.SH DESCRIPTION +If the macro +.B NDEBUG +was defined at the moment +.I +was last included, the macro +.BR assert_perror () +generates no code, and hence does nothing at all. +Otherwise, the macro +.BR assert_perror () +prints an error message to standard error and terminates the program +by calling +.BR abort (3) +if +.I errnum +is nonzero. +The message contains the filename, function name and +line number of the macro call, and the output of +.IR strerror(errnum) . +.SH RETURN VALUE +No value is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR assert_perror () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH BUGS +The purpose of the assert macros is to help programmers find bugs in +their programs, things that cannot happen unless there was a coding mistake. +However, with system or library calls the situation is rather different, +and error returns can happen, and will happen, and should be tested for. +Not by an assert, where the test goes away when +.B NDEBUG +is defined, +but by proper error handling code. +Never use this macro. +.SH SEE ALSO +.BR abort (3), +.BR assert (3), +.BR exit (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/atan.3 b/upstream/opensuse-leap-15-6/man3/atan.3 new file mode 100644 index 00000000..635b2250 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atan.3 @@ -0,0 +1,106 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH atan 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atan, atanf, atanl \- arc tangent function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double atan(double " x ); +.BI "float atanf(float " x ); +.BI "long double atanl(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR atanf (), +.BR atanl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the principal value of the arc tangent of +.IR x ; +that is the value whose tangent is +.IR x . +.SH RETURN VALUE +On success, these functions return the principal value of the arc tangent of +.I x +in radians; the return value is in the range [\-pi/2,\ pi/2]. +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), ++0 (\-0) is returned. +.PP +If +.I x +is positive infinity (negative infinity), +pi/2 (\-pi/2) is returned. +.\" +.\" POSIX.1-2001 documents an optional range error for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atan (), +.BR atanf (), +.BR atanl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR acos (3), +.BR asin (3), +.BR atan2 (3), +.BR carg (3), +.BR catan (3), +.BR cos (3), +.BR sin (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/atan2.3 b/upstream/opensuse-leap-15-6/man3/atan2.3 new file mode 100644 index 00000000..2a047632 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atan2.3 @@ -0,0 +1,177 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH atan2 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atan2, atan2f, atan2l \- arc tangent function of two variables +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double atan2(double " y ", double " x ); +.BI "float atan2f(float " y ", float " x ); +.BI "long double atan2l(long double " y ", long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR atan2f (), +.BR atan2l (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the principal value of the arc tangent of +.IR y/x , +using the signs of the two arguments to determine +the quadrant of the result. +.SH RETURN VALUE +On success, these functions return the principal value of the arc tangent of +.I y/x +in radians; the return value is in the range [\-pi,\ pi]. +.PP +If +.I y +is +0 (\-0) and +.I x +is less than 0, +pi (\-pi) is returned. +.PP +If +.I y +is +0 (\-0) and +.I x +is greater than 0, +0 (\-0) is returned. +.PP +If +.I y +is less than 0 and +.I x +is +0 or \-0, \-pi/2 is returned. +.PP +If +.I y +is greater than 0 and +.I x +is +0 or \-0, pi/2 is returned. +.PP +.\" POSIX.1 says: +.\" If +.\" .I x +.\" is 0, a pole error shall not occur. +.\" +If either +.I x +or +.I y +is NaN, a NaN is returned. +.PP +.\" POSIX.1 says: +.\" If the result underflows, a range error may occur and +.\" .I y/x +.\" should be returned. +.\" +If +.I y +is +0 (\-0) and +.I x +is \-0, +pi (\-pi) is returned. +.PP +If +.I y +is +0 (\-0) and +.I x +is +0, +0 (\-0) is returned. +.PP +If +.I y +is a finite value greater (less) than 0, and +.I x +is negative infinity, +pi (\-pi) is returned. +.PP +If +.I y +is a finite value greater (less) than 0, and +.I x +is positive infinity, +0 (\-0) is returned. +.PP +If +.I y +is positive infinity (negative infinity), and +.I x +is finite, +pi/2 (\-pi/2) is returned. +.PP +If +.I y +is positive infinity (negative infinity) and +.I x +is negative infinity, +3*pi/4 (\-3*pi/4) is returned. +.PP +If +.I y +is positive infinity (negative infinity) and +.I x +is positive infinity, +pi/4 (\-pi/4) is returned. +.\" +.\" POSIX.1 says: +.\" If both arguments are 0, a domain error shall not occur. +.SH ERRORS +No errors occur. +.\" POSIX.1 documents an optional underflow error +.\" glibc 2.8 does not do this. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atan2 (), +.BR atan2f (), +.BR atan2l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR acos (3), +.BR asin (3), +.BR atan (3), +.BR carg (3), +.BR cos (3), +.BR sin (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/atanh.3 b/upstream/opensuse-leap-15-6/man3/atanh.3 new file mode 100644 index 00000000..6d15ec59 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atanh.3 @@ -0,0 +1,157 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH atanh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atanh, atanhf, atanhl \- inverse hyperbolic tangent function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double atanh(double " x ); +.BI "float atanhf(float " x ); +.BI "long double atanhl(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR atanh (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR atanhf (), +.BR atanhl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions calculate the inverse hyperbolic tangent of +.IR x ; +that is the value whose hyperbolic tangent is +.IR x . +.SH RETURN VALUE +On success, these functions return the inverse hyperbolic tangent of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is +1 or \-1, +a pole error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the mathematically correct sign. +.PP +If the absolute value of +.I x +is greater than 1, +a domain error occurs, +and a NaN is returned. +.\" +.\" POSIX.1-2001 documents an optional range error for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP less than \-1 or greater than +1 +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Pole error: \fIx\fP is +1 or \-1 +.I errno +is set to +.B ERANGE +(but see BUGS). +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atanh (), +.BR atanhf (), +.BR atanhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH BUGS +In glibc 2.9 and earlier, +.\" Bug: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6759 +.\" This can be seen in sysdeps/ieee754/k_standard.c +when a pole error occurs, +.I errno +is set to +.B EDOM +instead of the POSIX-mandated +.BR ERANGE . +Since glibc 2.10, glibc does the right thing. +.SH SEE ALSO +.BR acosh (3), +.BR asinh (3), +.BR catanh (3), +.BR cosh (3), +.BR sinh (3), +.BR tanh (3) diff --git a/upstream/opensuse-leap-15-6/man3/atexit.3 b/upstream/opensuse-leap-15-6/man3/atexit.3 new file mode 100644 index 00000000..670c249b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atexit.3 @@ -0,0 +1,172 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH atexit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atexit \- register a function to be called at normal process termination +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int atexit(void (*" function )(void)); +.fi +.SH DESCRIPTION +The +.BR atexit () +function registers the given +.I function +to be +called at normal process termination, either via +.BR exit (3) +or via return from the program's +.IR main (). +Functions so registered are called in +the reverse order of their registration; no arguments are passed. +.PP +The same function may be registered multiple times: +it is called once for each registration. +.PP +POSIX.1 requires that an implementation allow at least +.\" POSIX.1-2001, POSIX.1-2008 +.B ATEXIT_MAX +(32) such functions to be registered. +The actual limit supported by an implementation can be obtained using +.BR sysconf (3). +.PP +When a child process is created via +.BR fork (2), +it inherits copies of its parent's registrations. +Upon a successful call to one of the +.BR exec (3) +functions, +all registrations are removed. +.SH RETURN VALUE +The +.BR atexit () +function returns the value 0 if successful; otherwise +it returns a nonzero value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atexit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX.1 says that the result of calling +.\" POSIX.1-2001, POSIX.1-2008 +.BR exit (3) +more than once (i.e., calling +.BR exit (3) +within a function registered using +.BR atexit ()) +is undefined. +On some systems (but not Linux), this can result in an infinite recursion; +.\" 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. +portable programs should not invoke +.BR exit (3) +inside a function registered using +.BR atexit (). +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, C99, SVr4, 4.3BSD. +.SH NOTES +Functions registered using +.BR atexit () +(and +.BR on_exit (3)) +are not called if a process terminates abnormally because +of the delivery of a signal. +.PP +If one of the registered functions calls +.BR _exit (2), +then any remaining functions are not invoked, +and the other process termination steps performed by +.BR exit (3) +are not performed. +.PP +The +.BR atexit () +and +.BR on_exit (3) +functions register functions on the same list: +at normal process termination, +the registered functions are invoked in reverse order +of their registration by these two functions. +.PP +According to POSIX.1, the result is undefined if +.BR longjmp (3) +is used to terminate execution of one of the functions registered using +.BR atexit (). +.\" In glibc, things seem to be handled okay +.SS Linux notes +Since glibc 2.2.3, +.BR atexit () +(and +.BR on_exit (3)) +can be used within a shared library to establish functions +that are called when the shared library is unloaded. +.SH EXAMPLES +.\" SRC BEGIN (atexit.c) +.EX +#include +#include +#include + +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 +.\" SRC END +.SH SEE ALSO +.BR _exit (2), +.BR dlopen (3), +.BR exit (3), +.BR on_exit (3) diff --git a/upstream/opensuse-leap-15-6/man3/atof.3 b/upstream/opensuse-leap-15-6/man3/atof.3 new file mode 100644 index 00000000..acc90d0c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atof.3 @@ -0,0 +1,70 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH atof 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atof \- convert a string to a double +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double atof(const char *" nptr ); +.fi +.SH DESCRIPTION +The +.BR atof () +function converts the initial portion of the string +pointed to by \fInptr\fP to +.IR double . +The behavior is the same as +.PP +.in +4n +.EX +strtod(nptr, NULL); +.EE +.in +.PP +except that +.BR atof () +does not detect errors. +.SH RETURN VALUE +The converted value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atof () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, C99, SVr4, 4.3BSD. +.SH SEE ALSO +.BR atoi (3), +.BR atol (3), +.BR strfromd (3), +.BR strtod (3), +.BR strtol (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/atoi.3 b/upstream/opensuse-leap-15-6/man3/atoi.3 new file mode 100644 index 00000000..c34346e3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/atoi.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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:41 1993, David Metcalfe +.\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers +.\" +.TH atoi 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +atoi, atol, atoll \- convert a string to an integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int atoi(const char *" nptr ); +.BI "long atol(const char *" nptr ); +.BI "long long atoll(const char *" nptr ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR atoll (): +.nf + _ISOC99_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR atoi () +function converts the initial portion of the string +pointed to by \fInptr\fP to +.IR int . +The behavior is the same as +.PP +.in +4n +.EX +strtol(nptr, NULL, 10); +.EE +.in +.PP +except that +.BR atoi () +does not detect errors. +.PP +The +.BR atol () +and +.BR atoll () +functions behave the same as +.BR atoi (), +except that they convert the initial portion of the +string to their return type of \fIlong\fP or \fIlong long\fP. +.SH RETURN VALUE +The converted value or 0 on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR atoi (), +.BR atol (), +.BR atoll () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX.1 leaves the return value of +.BR atoi () +on error unspecified. +On glibc, musl libc, and uClibc, 0 is returned on error. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001, SVr4, 4.3BSD. +.PP +C89 and +POSIX.1-1996 include the functions +.BR atoi () +and +.BR atol () +only. +.\" .SH NOTES +.\" Linux libc provided +.\" .BR atoq () +.\" as an obsolete name for +.\" .BR atoll (); +.\" .BR atoq () +.\" is not provided by glibc. +.\" The +.\" .BR atoll () +.\" function is present since glibc 2.0.2, but +.\" not in libc4 or libc5. +.SH BUGS +.I errno +is not set on error so there is no way to distinguish between 0 as an +error and as the converted value. +No checks for overflow or underflow are done. +Only base-10 input can be converted. +It is recommended to instead use the +.BR strtol () +and +.BR strtoul () +family of functions in new programs. +.SH SEE ALSO +.BR atof (3), +.BR strtod (3), +.BR strtol (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/attr.3ncurses b/upstream/opensuse-leap-15-6/man3/attr.3ncurses new file mode 100644 index 00000000..67f554f8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/attr.3ncurses @@ -0,0 +1,599 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_attr.3x,v 1.62 2017/12/16 20:16:07 tom Exp $ +.TH attr 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de NS +.ie n .sp +.el .sp .5 +.ie n .in +4 +.el .in +2 +.nf +.ft C \" Courier +.. +.de NE +.fi +.ft R +.in -4 +.. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.\" --------------------------------------------------------------------------- +.SH NAME +.\" attr_get +\fBattr_get\fR, +\fBwattr_get\fR, +\fBattr_set\fR, +\fBwattr_set\fR, +.\" .br +\fBattr_off\fR, +\fBwattr_off\fR, +\fBattr_on\fR, +\fBwattr_on\fR, +.\" .br +\fBattroff\fR, +\fBwattroff\fR, +\fBattron\fR, +\fBwattron\fR, +\fBattrset\fR, +\fBwattrset\fR, +.\" .br +\fBchgat\fR, +\fBwchgat\fR, +\fBmvchgat\fR, +\fBmvwchgat\fR, +.\" .br +\fBcolor_set\fR, +\fBwcolor_set\fR, +.\" .br +\fBstandend\fR, +\fBwstandend\fR, +\fBstandout\fR, +\fBwstandout\fR \- \fBcurses\fR character and window attribute control routines +.ad +.hy +.\" --------------------------------------------------------------------------- +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint attr_get(attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR +.br +\fBint wattr_get(WINDOW *\fP\fIwin\fP\fB, attr_t *\fP\fIattrs\fP\fB, short *\fP\fIpair\fP\fB,\fR \fBvoid *\fP\fIopts\fP\fB);\fR +.br +\fBint attr_set(attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR +.br +\fBint wattr_set(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void *\fP\fIopts\fP\fB);\fR +.sp +\fBint attr_off(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR +.br +\fBint wattr_off(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR +.br +\fBint attr_on(attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR +.br +\fBint wattr_on(WINDOW *\fP\fIwin\fP\fB, attr_t \fP\fIattrs\fP\fB, void *\fP\fIopts\fP\fB);\fR +.sp +\fBint attroff(int \fP\fIattrs);\fR +.br +\fBint wattroff(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR +.br +\fBint attron(int \fP\fIattrs\fP\fB);\fR +.br +\fBint wattron(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR +.br +\fBint attrset(int \fP\fIattrs\fP\fB);\fR +.br +\fBint wattrset(WINDOW *\fP\fIwin\fP\fB, int \fP\fIattrs\fP\fB);\fR +.sp +\fBint chgat(int \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB,\fR \fBconst void *\fP\fIopts\fP\fB);\fR +.br +\fBint wchgat(WINDOW *\fP\fIwin\fP\fB,\fP + \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR +.br +\fBint mvchgat(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB,\fP + \fBint \fP\fIn\fP\fB, attr_t \fP\fIattr\fP\fB,\fR \fBshort \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR +.br +\fBint mvwchgat(WINDOW *\fP\fIwin, int \fP\fIy, int \fP\fIx\fP\fB,\fP + \fBint \fP\fIn,\fR \fBattr_t \fP\fIattr\fP\fB, short \fP\fIpair\fP\fB, const void *\fP\fIopts\fP\fB);\fR +.sp +\fBint color_set(short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fR +.br +\fBint wcolor_set(WINDOW *\fP\fIwin\fP\fB, short \fP\fIpair\fP\fB,\fR \fBvoid* \fP\fIopts);\fR +.sp +\fBint standend(void);\fR +.br +\fBint wstandend(WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBint standout(void);\fR +.br +\fBint wstandout(WINDOW *\fP\fIwin\fP\fB);\fR +.\" --------------------------------------------------------------------------- +.SH DESCRIPTION +.PP +These routines manipulate the current attributes of the named window, +which then apply to all characters that are written into +the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. +Attributes are +a property of the character, and move with the character through any scrolling +and insert/delete line/character operations. +To the extent possible, they are +displayed as appropriate modifications to the graphic rendition of characters +put on the screen. +.PP +These routines do not affect the attributes used +when erasing portions of the window. +See \fBbkgd\fR(3NCURSES) for functions which modify the attributes used for +erasing and clearing. +.PP +Routines which do not have a \fBWINDOW*\fP parameter apply to \fBstdscr\fP. +For example, +\fBattr_set\fP is the \fBstdscr\fP variant of \fBwattr_set\fP. +.\" --------------------------------------------------------------------------- +.SS Window attributes +.PP +There are two sets of functions: +.bP +functions for manipulating the window attributes and color: +\fBwattr_set\fP and \fBwattr_get\fP. +.bP +functions for manipulating only the window attributes (not color): +\fBwattr_on\fP and \fBwattr_off\fP. +.PP +The \fBwattr_set\fP function sets the current attributes +of the given window to \fIattrs\fP, with color specified by \fIpair\fP. +.PP +Use \fBwattr_get\fP to retrieve attributes for the given window. +.PP +Use \fBattr_on\fP and \fBwattr_on\fP to turn on window attributes, i.e., +values OR'd together in \fIattr\fP, +without affecting other attributes. +Use \fBattr_off\fP and \fBwattr_off\fP to turn off window attributes, +again values OR'd together in \fIattr\fP, +without affecting other attributes. +.\" --------------------------------------------------------------------------- +.SS Legacy window attributes +The X/Open window attribute routines which \fIset\fP or \fIget\fP, +turn \fIon\fP or \fIoff\fP +are extensions of older routines +which assume that color pairs are OR'd into the attribute parameter. +These newer routines use similar names, because +X/Open simply added an underscore (\fB_\fP) for the newer names. +.PP +The \fBint\fP datatype used in the legacy routines is treated as if +it is the same size as \fBchtype\fP (used by \fBaddch\fP(3X)). +It holds the common video attributes (such as bold, reverse), +as well as a few bits for color. +Those bits correspond to the \fBA_COLOR\fP symbol. +The \fBCOLOR_PAIR\fP macro provides a value which can be OR'd into +the attribute parameter. +For example, +as long as that value fits into the \fBA_COLOR\fP mask, +then these calls produce similar results: +.NS +attrset(A_BOLD | COLOR_PAIR(\fIpair\fP)); +attr_set(A_BOLD, \fIpair\fP, NULL); +.NE +.PP +However, if the value does not fit, then the \fBCOLOR_PAIR\fP macro +uses only the bits that fit. +For example, because in ncurses \fBA_COLOR\fP has eight (8) bits, +then \fBCOLOR_PAIR(259)\fP is 4 (259\-255). +.PP +The \fBPAIR_NUMBER\fP macro extracts a pair number from an \fBint\fP +(or \fBchtype\fP). +For example, the \fIinput\fP and \fIoutput\fP values in these statements +would be the same: +.NS +int value = A_BOLD | COLOR_PAIR(\fIinput\fP); +int \fIoutput\fP = PAIR_NUMBER(value); +.NE +.PP +The \fBattrset\fP routine is a legacy feature predating SVr4 curses +but kept in X/Open Curses for the same reason that SVr4 curses kept it: +compatibility. +.PP +The remaining \fBattr\fR* functions operate exactly like the corresponding +\fBattr_\fR* functions, except that they take arguments of type \fBint\fR +rather than \fBattr_t\fR. +.PP +There is no corresponding \fBattrget\fP function as such in X/Open Curses, +although ncurses provides \fBgetattrs\fP (see curs_legacy(3X)). +.\" --------------------------------------------------------------------------- +.SS Change character rendition +.PP +The routine \fBchgat\fR changes the attributes of a given number of characters +starting at the current cursor location of \fBstdscr\fR. +It does not update +the cursor and does not perform wrapping. +A character count of \-1 or greater +than the remaining window width means to change attributes all the way to the +end of the current line. +The \fBwchgat\fR function generalizes this to any window; +the \fBmvwchgat\fR function does a cursor move before acting. +.PP +In these functions, +the color \fIpair\fP argument is a color-pair index +(as in the first argument of \fBinit_pair\fR, see \fBcolor\fR(3NCURSES)). +.\" --------------------------------------------------------------------------- +.SS Change window color +The routine \fBcolor_set\fR sets the current color of the given window to the +foreground/background combination described by the color \fIpair\fP parameter. +.\" --------------------------------------------------------------------------- +.SS Standout +.PP +The routine \fBstandout\fR is +the same as \fBattron(A_STANDOUT)\fR. +The routine \fBstandend\fR is the same +as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all +attributes. +.PP +X/Open does not mark these "restricted", because +.bP +they have well established legacy use, and +.bP +there is no ambiguity about the way the attributes +might be combined with a color pair. +.\" --------------------------------------------------------------------------- +.SH VIDEO ATTRIBUTES +The following video attributes, defined in \fB\fR, can be passed to +the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR'd with the +characters passed to \fBaddch\fR (see \fBaddch\fR(3NCURSES)). +.PP +.RS +.TS +l l +_ _ _ +l l . +\fIName\fR \fIDescription\fR +\fBA_NORMAL\fR Normal display (no highlight) +\fBA_STANDOUT\fR Best highlighting mode of the terminal. +\fBA_UNDERLINE\fR Underlining +\fBA_REVERSE\fR Reverse video +\fBA_BLINK\fR Blinking +\fBA_DIM\fR Half bright +\fBA_BOLD\fR Extra bright or bold +\fBA_PROTECT\fR Protected mode +\fBA_INVIS\fR Invisible or blank mode +\fBA_ALTCHARSET\fR Alternate character set +\fBA_ITALIC\fR Italics (non-X/Open extension) +\fBA_CHARTEXT\fR Bit-mask to extract a character +\fBA_COLOR\fR Bit-mask to extract a color (legacy routines) +.TE +.RE +.PP +These video attributes are supported by \fBattr_on\fP and related functions +(which also support the attributes recognized by \fBattron\fP, etc.): +.RS +.TS +l l +_ _ _ +l l . +\fIName\fR \fIDescription\fR +\fBWA_HORIZONTAL\fR Horizontal highlight +\fBWA_LEFT\fR Left highlight +\fBWA_LOW\fR Low highlight +\fBWA_RIGHT\fR Right highlight +\fBWA_TOP\fR Top highlight +\fBWA_VERTICAL\fR Vertical highlight +.TE +.RE +.PP +The return values of many of these routines are not meaningful (they are +implemented as macro-expanded assignments and simply return their argument). +The SVr4 manual page claims (falsely) that these routines always return \fB1\fR. +.\" --------------------------------------------------------------------------- +.SH NOTES +These functions may be macros: +.sp +.RS +\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR, +\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR. +.RE +.PP +Color pair values can only be OR'd with attributes if the pair +number is less than 256. +The alternate functions such as \fBcolor_set\fP can pass a color pair +value directly. +However, ncurses ABI 4 and 5 simply OR this value within the alternate functions. +You must use ncurses ABI 6 to support more than 256 color pairs. +.\" --------------------------------------------------------------------------- +.SH HISTORY +X/Open Curses is largely based on SVr4 curses, +adding support for \*(``wide-characters\*('' (not specific to Unicode). +Some of the X/Open differences from SVr4 curses address the way +video attributes can be applied to wide-characters. +But aside from that, \fBattrset\fP and \fBattr_set\fP are similar. +SVr4 curses provided the basic features for manipulating video attributes. +However, earlier versions of curses provided a part of these features. +.PP +As seen in 2.8BSD, curses assumed 7-bit characters, +using the eighth bit of a byte to represent the \fIstandout\fP +feature (often implemented as bold and/or reverse video). +The BSD curses library provided functions \fBstandout\fP and \fBstandend\fP +which were carried along into X/Open Curses due to their pervasive use +in legacy applications. +.PP +Some terminals in the 1980s could support a variety of video attributes, +although the BSD curses library could do nothing with those. +System V (1983) provided an improved curses library. +It defined the \fBA_\fP symbols for use by applications to manipulate the +other attributes. +There are few useful references for the chronology. +.PP +Goodheart's book +\fIUNIX Curses Explained\fP (1991) describes SVr3 (1987), +commenting on several functions: +.bP +the \fBattron\fP, \fBattroff\fP, \fBattrset\fP functions +(and most of the functions found in SVr4 but not in BSD curses) were +introduced by System V, +.bP +the alternate character set feature with \fBA_ALTCHARSET\fP was +added in SVr2 and improved in SVr3 (by adding \fBacs_map[]\fP), +.bP +\fBstart_color\fP and related color-functions were introduced by System V.3.2, +.bP +pads, soft-keys were added in SVr3, and +.PP +Goodheart did not mention the background character or the \fBcchar_t\fP type. +Those are respectively SVr4 and X/Open features. +He did mention the \fBA_\fP constants, but did not indicate their values. +Those were not the same in different systems, +even for those marked as System V. +.PP +Different Unix systems used different sizes for the bit-fields in \fBchtype\fP +for \fIcharacters\fP and \fIcolors\fP, and took into account the different +integer sizes (32-bit versus 64-bit). +.PP +This table showing the number of bits for \fBA_COLOR\fP +and \fBA_CHARTEXT\fP +was gleaned from the curses header files for +various operating systems and architectures. +The inferred architecture and notes reflect +the format and size of the defined constants +as well as clues such as the alternate character set implementation. +A 32-bit library can be used on a 64-bit system, +but not necessarily the reverse. +.RS +.TS +l l l l l l +_ _ _ _ _ _ +l l l l l l . +\fIYear\fR \fISystem\fR \fIArch\fP \fIColor\fR \fIChar\fR \fINotes\fR +1992 Solaris 5.2 32 6 17 SVr4 curses +1992 HPUX 9 32 no 8 SVr2 curses +1992 AIX 3.2 32 no 23 SVr2 curses +1994 OSF/1 r3 32 no 23 SVr2 curses +1995 HP-UX 10.00 32 6 16 SVr3 \*(``curses_colr\*('' +1995 HP-UX 10.00 32 6 8 SVr4, X/Open curses +1995 Solaris 5.4 32/64 7 16 X/Open curses +1996 AIX 4.2 32 7 16 X/Open curses +1996 OSF/1 r4 32 6 16 X/Open curses +1997 HP-UX 11.00 32 6 8 X/Open curses +2000 U/Win 32/64 7/31 16 uses \fBchtype\fP +.TE +.RE +.PP +Notes: +.RS 3 +.PP +Regarding HP-UX, +.bP +HP-UX 10.20 (1996) added support for 64-bit PA-RISC processors in 1996. +.bP +HP-UX 10.30 (1997) marked \*(``curses_colr\*('' obsolete. +That version of curses was dropped with HP-UX 11.30 in 2006. +.PP +Regarding OSF/1 (and Tru64), +.bP +These used 64-bit hardware. +Like ncurses, the OSF/1 curses interface is not customized for 32-bit +and 64-bit versions. +.bP +Unlike other systems which evolved from AT&T code, +OSF/1 provided a new implementation for X/Open curses. +.PP +Regarding Solaris, +.bP +The initial release of Solaris was in 1992. +.bP +The \fIxpg4\fP (X/Open) curses was developed by MKS from 1990 to 1995. +Sun's copyright began in 1996. +.bP +Sun updated the X/Open curses interface after 64-bit support was introduced in 1997, +but did not modify the SVr4 curses interface. +.PP +Regarding U/Win, +.bP +Development of the curses library began in 1991, stopped in 2000. +.bP +Color support was added in 1998. +.bP +The library uses only \fBchtype\fP (no \fBcchar_t\fP). +.RE +.PP +Once X/Open curses was adopted in the mid-1990s, the constraint of +a 32-bit interface with many colors and wide-characters for \fBchtype\fP +became a moot point. The \fBcchar_t\fP structure (whose size and +members are not specified in X/Open Curses) could be extended as needed. +.PP +Other interfaces are rarely used now: +.bP +BSD curses was improved slightly in 1993/1994 using Keith Bostic's +modification to make the library 8-bit clean for \fBnvi\fP. +He moved \fIstandout\fP attribute to a structure member. +.IP +The resulting 4.4BSD curses was replaced by ncurses over the next ten years. +.bP +U/Win is rarely used now. +.\" --------------------------------------------------------------------------- +.SH EXTENSIONS +.PP +This implementation provides the \fBA_ITALIC\fP attribute for terminals +which have the \fBenter_italics_mode\fP (\fBsitm\fP) +and \fBexit_italics_mode\fP (\fBritm\fP) capabilities. +Italics are not mentioned in X/Open Curses. +Unlike the other video attributes, \fBA_ITALIC\fP is unrelated +to the \fBset_attributes\fP capabilities. +This implementation makes the assumption that +\fBexit_attribute_mode\fP may also reset italics. +.PP +Each of the functions added by XSI Curses has a parameter \fIopts\fP, +which X/Open Curses still (after more than twenty years) documents +as reserved for future use, saying that it should be \fBNULL\fP. +This implementation uses that parameter in ABI 6 for the functions which +have a color-pair parameter to support \fIextended color pairs\fP: +.bP +For functions which modify the color, e.g., +\fBwattr_set\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to set the color pair instead of the \fBshort\fP \fIpair\fP parameter. +.bP +For functions which retrieve the color, e.g., +\fBwattr_get\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to retrieve the color pair as an \fBint\fP value, +in addition +retrieving it via the standard pointer to \fBshort\fP parameter. +.PP +The remaining functions which have \fIopts\fP, +but do not manipulate color, +e.g., \fBwattr_on\fP and \fBwattr_off\fP +are not used by this implementation except to check that they are \fBNULL\fP. +.\" --------------------------------------------------------------------------- +.SH PORTABILITY +These functions are supported in the XSI Curses standard, Issue 4. +The standard defined the dedicated type for highlights, +\fBattr_t\fR, which was not defined in SVr4 curses. +The functions taking \fBattr_t\fR arguments were not supported under SVr4. +.PP +Very old versions of this library did not force an update of the screen +when changing the attributes. +Use \fBtouchwin\fR to force the screen to match the updated attributes. +.PP +The XSI Curses standard states that whether the traditional functions +\fBattron\fR/\fBattroff\fR/\fBattrset\fR can manipulate attributes other than +\fBA_BLINK\fR, \fBA_BOLD\fR, \fBA_DIM\fR, \fBA_REVERSE\fR, \fBA_STANDOUT\fR, or +\fBA_UNDERLINE\fR is "unspecified". +Under this implementation as well as +SVr4 curses, these functions correctly manipulate all other highlights +(specifically, \fBA_ALTCHARSET\fR, \fBA_PROTECT\fR, and \fBA_INVIS\fR). +.PP +XSI Curses added these entry points: +.sp +.RS +\fBattr_get\fR, \fBattr_on\fR, +\fBattr_off\fR, \fBattr_set\fR, \fBwattr_on\fR, \fBwattr_off\fR, +\fBwattr_get\fR, \fBwattr_set\fR +.RE +.PP +The new functions are intended to work with +a new series of highlight macros prefixed with \fBWA_\fR. +The older macros have direct counterparts in the newer set of names: +.PP +.RS +.ne 9 +.TS +l l +_ _ _ +l l . +\fIName\fR \fIDescription\fR +\fBWA_NORMAL\fR Normal display (no highlight) +\fBWA_STANDOUT\fR Best highlighting mode of the terminal. +\fBWA_UNDERLINE\fR Underlining +\fBWA_REVERSE\fR Reverse video +\fBWA_BLINK\fR Blinking +\fBWA_DIM\fR Half bright +\fBWA_BOLD\fR Extra bright or bold +\fBWA_ALTCHARSET\fR Alternate character set +.TE +.RE +.PP +XSI curses does not assign values to these symbols, +nor does it state whether or not they are related to the +similarly-named A_NORMAL, etc.: +.bP +The XSI curses standard specifies that each pair of corresponding \fBA_\fR +and \fBWA_\fR-using functions operates on the same current-highlight +information. +.bP +However, in some implementations, those symbols have unrelated values. +.IP +For example, the Solaris \fIxpg4\fP (X/Open) curses declares +\fBattr_t\fP to be an unsigned short integer (16-bits), +while \fBchtype\fP is a unsigned integer (32-bits). +The \fBWA_\fP symbols in this case are different from the \fBA_\fP symbols +because they are used for a smaller datatype which does not +represent \fBA_CHARTEXT\fP or \fBA_COLOR\fP. +.IP +In this implementation (as in many others), the values happen to be +the same because it simplifies copying information between +\fBchtype\fP and \fBcchar_t\fP variables. +.PP +The XSI standard extended conformance level adds new highlights +\fBA_HORIZONTAL\fR, \fBA_LEFT\fR, \fBA_LOW\fR, \fBA_RIGHT\fR, \fBA_TOP\fR, +\fBA_VERTICAL\fR (and corresponding \fBWA_\fR macros for each). +As of August 2013, +no known terminal provides these highlights +(i.e., via the \fBsgr1\fP capability). +.\" --------------------------------------------------------------------------- +.SH RETURN VALUE +All routines return the integer \fBOK\fR on success, or \fBERR\fP on failure. +.PP +X/Open does not define any error conditions. +.PP +This implementation +.bP +returns an error if the window pointer is null. +.bP +returns an error if the color pair parameter +for \fBwcolor_set\fP is outside the range 0..COLOR_PAIRS\-1. +.bP +does not return an error if either of the parameters of \fBwattr_get\fP +used for retrieving attribute or color-pair values is \fBNULL\fP. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.\" --------------------------------------------------------------------------- +.SH SEE ALSO +.na +\fBncurses\fR(3NCURSES), +\fBaddch\fR(3NCURSES), +\fBaddstr\fR(3NCURSES), +\fBbkgd\fR(3NCURSES), +\fBprintw\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/attributes.3menu b/upstream/opensuse-leap-15-6/man3/attributes.3menu new file mode 100644 index 00000000..25ec49af --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/attributes.3menu @@ -0,0 +1,101 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_attributes.3x,v 1.13 2015/12/05 20:44:42 jmc Exp $ +.TH attributes 3MENU "" +.SH NAME +\fBmenu_back\fR, +\fBmenu_fore\fR, +\fBmenu_grey\fR, +\fBmenu_pad\fR, +\fBset_menu_back\fR, +\fBset_menu_fore\fR, +\fBset_menu_grey\fR, +\fBset_menu_pad\fR \- color and attribute control for menus +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_fore(MENU *menu, chtype attr); +.br +chtype menu_fore(const MENU *menu); +.br +int set_menu_back(MENU *menu, chtype attr); +.br +chtype menu_back(const MENU *menu); +.br +int set_menu_grey(MENU *menu, chtype attr); +.br +chtype menu_grey(const MENU *menu); +.br +int set_menu_pad(MENU *menu, int pad); +.br +int menu_pad(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_fore\fR sets the foreground attribute of +\fImenu\fR. This is the highlight used for selected menu items. +\fBmenu_fore\fR returns the foreground attribute. The default +is \fBA_REVERSE\fR. +.PP +The function \fBset_menu_back\fR sets the background attribute of +\fImenu\fR. This is the highlight used for selectable (but not currently +selected) menu items. The function \fBmenu_back\fR returns the background +attribute. The default is \fBA_NORMAL\fR. +.PP +The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is +the highlight used for un-selectable menu items in menus that permit more than +one selection. The function \fBmenu_grey\fR returns the grey attribute. +The default is \fBA_UNDERLINE\fR. +.PP +The function \fBset_menu_pad\fR sets the character used to fill the space +between the name and description parts of a menu item. \fBmenu_pad\fR returns +the given menu's pad character. The default is a blank. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "menu_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/backtrace.3 b/upstream/opensuse-leap-15-6/man3/backtrace.3 new file mode 100644 index 00000000..6e8413f5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/backtrace.3 @@ -0,0 +1,286 @@ +'\" t +.\" Copyright (C) 2007 Michael Kerrisk +.\" drawing on material by Justin Pryzby +.\" +.\" %%%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 +.TH backtrace 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +backtrace, backtrace_symbols, backtrace_symbols_fd \- support +for application self-debugging +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int backtrace(void *" buffer [. size "], int " size ); +.PP +.BI "char **backtrace_symbols(void *const " buffer [. size "], int " size ); +.BI "void backtrace_symbols_fd(void *const " buffer [. size "], int " size ", \ +int " fd ); +.fi +.SH DESCRIPTION +.BR backtrace () +returns a backtrace for the calling program, +in the array pointed to by +.IR buffer . +A backtrace is the series of currently active function calls for +the program. +Each item in the array pointed to by +.I buffer +is of type +.IR "void\ *" , +and is the return address from +the corresponding stack frame. +The +.I size +argument specifies the maximum number of addresses +that can be stored in +.IR buffer . +If the backtrace is larger than +.IR size , +then the addresses corresponding to the +.I size +most recent function calls are returned; +to obtain the complete backtrace, make sure that +.I buffer +and +.I size +are large enough. +.PP +Given the set of addresses returned by +.BR backtrace () +in +.IR buffer , +.BR backtrace_symbols () +translates the addresses into an array of strings that describe +the addresses symbolically. +The +.I size +argument specifies the number of addresses in +.IR buffer . +The symbolic representation of each address consists of the function name +(if this can be determined), a hexadecimal offset into the function, +and the actual return address (in hexadecimal). +The address of the array of string pointers is returned +as the function result of +.BR backtrace_symbols (). +This array is +.BR malloc (3)ed +by +.BR backtrace_symbols (), +and must be freed by the caller. +(The strings pointed to by the array of pointers +need not and should not be freed.) +.PP +.BR backtrace_symbols_fd () +takes the same +.I buffer +and +.I size +arguments as +.BR backtrace_symbols (), +but instead of returning an array of strings to the caller, +it writes the strings, one per line, to the file descriptor +.IR fd . +.BR backtrace_symbols_fd () +does not call +.BR malloc (3), +and so can be employed in situations where the latter function might +fail, but see NOTES. +.SH RETURN VALUE +.BR backtrace () +returns the number of addresses returned in +.IR buffer , +which is not greater than +.IR size . +If the return value is less than +.IR size , +then the full backtrace was stored; if it is equal to +.IR size , +then it may have been truncated, in which case the addresses of the +oldest stack frames are not returned. +.PP +On success, +.BR backtrace_symbols () +returns a pointer to the array +.BR malloc (3)ed +by the call; +on error, NULL is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR backtrace (), +.BR backtrace_symbols (), +.BR backtrace_symbols_fd () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH NOTES +These functions make some assumptions about how a function's return +address is stored on the stack. +Note the following: +.IP \[bu] 3 +Omission of the frame pointers (as +implied by any of +.BR gcc (1)'s +nonzero optimization levels) may cause these assumptions to be +violated. +.IP \[bu] +Inlined functions do not have stack frames. +.IP \[bu] +Tail-call optimization causes one stack frame to replace another. +.IP \[bu] +.BR backtrace () +and +.BR backtrace_symbols_fd () +don't call +.BR malloc () +explicitly, but they are part of +.IR libgcc , +which gets loaded dynamically when first used. +Dynamic loading usually triggers a call to +.BR malloc (3). +If you need certain calls to these two functions to not allocate memory +(in signal handlers, for example), you need to make sure +.I libgcc +is loaded beforehand. +.PP +The symbol names may be unavailable without the use of special linker +options. +For systems using the GNU linker, it is necessary to use the +.I \-rdynamic +linker option. +Note that names of "static" functions are not exposed, +and won't be available in the backtrace. +.SH EXAMPLES +The program below demonstrates the use of +.BR backtrace () +and +.BR backtrace_symbols (). +The following shell session shows what we might see when running the +program: +.PP +.in +4n +.EX +.RB "$" " cc \-rdynamic prog.c \-o prog" +.RB "$" " ./prog 3" +backtrace() returned 8 addresses +\&./prog(myfunc3+0x5c) [0x80487f0] +\&./prog [0x8048871] +\&./prog(myfunc+0x21) [0x8048894] +\&./prog(myfunc+0x1a) [0x804888d] +\&./prog(myfunc+0x1a) [0x804888d] +\&./prog(main+0x65) [0x80488fb] +\&/lib/libc.so.6(__libc_start_main+0xdc) [0xb7e38f9c] +\&./prog [0x8048711] +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (backtrace.c) +.EX +#include +#include +#include +#include + +#define BT_BUF_SIZE 100 + +void +myfunc3(void) +{ + int nptrs; + void *buffer[BT_BUF_SIZE]; + char **strings; + + nptrs = backtrace(buffer, BT_BUF_SIZE); + printf("backtrace() returned %d addresses\en", nptrs); + + /* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO) + would produce similar output to the following: */ + + strings = backtrace_symbols(buffer, nptrs); + if (strings == NULL) { + perror("backtrace_symbols"); + exit(EXIT_FAILURE); + } + + for (size_t j = 0; j < nptrs; j++) + printf("%s\en", strings[j]); + + free(strings); +} + +static void /* "static" means don\[aq]t export the symbol... */ +myfunc2(void) +{ + myfunc3(); +} + +void +myfunc(int ncalls) +{ + if (ncalls > 1) + myfunc(ncalls \- 1); + else + myfunc2(); +} + +int +main(int argc, char *argv[]) +{ + if (argc != 2) { + fprintf(stderr, "%s num\-calls\en", argv[0]); + exit(EXIT_FAILURE); + } + + myfunc(atoi(argv[1])); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR addr2line (1), +.BR gcc (1), +.BR gdb (1), +.BR ld (1), +.BR dlopen (3), +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/basename.3 b/upstream/opensuse-leap-15-6/man3/basename.3 new file mode 100644 index 00000000..a7ecc40c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/basename.3 @@ -0,0 +1,190 @@ +'\" t +.\" Copyright (c) 2000 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Created, 14 Dec 2000 by Michael Kerrisk +.\" +.TH basename 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +basename, dirname \- parse pathname components +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *dirname(char *" path ); +.BI "char *basename(char *" path ); +.fi +.SH DESCRIPTION +Warning: there are two different functions +.BR basename (); +see below. +.PP +The functions +.BR dirname () +and +.BR basename () +break a null-terminated pathname string into directory +and filename components. +In the usual case, +.BR dirname () +returns the string up to, but not including, the final \[aq]/\[aq], and +.BR basename () +returns the component following the final \[aq]/\[aq]. +Trailing \[aq]/\[aq] characters are not counted as part of the pathname. +.PP +If +.I path +does not contain a slash, +.BR dirname () +returns the string "." while +.BR basename () +returns a copy of +.IR path . +If +.I path +is the string "/", then both +.BR dirname () +and +.BR basename () +return the string "/". +If +.I path +is a null pointer or points to an empty string, then both +.BR dirname () +and +.BR basename () +return the string ".". +.PP +Concatenating the string returned by +.BR dirname (), +a "/", and the string returned by +.BR basename () +yields a complete pathname. +.PP +Both +.BR dirname () +and +.BR basename () +may modify the contents of +.IR path , +so it may be desirable to pass a copy when calling one of +these functions. +.PP +These functions may return pointers to statically allocated memory +which may be overwritten by subsequent calls. +Alternatively, they may return a pointer to some part of +.IR path , +so that the string referred to by +.I path +should not be modified or freed until the pointer returned by +the function is no longer required. +.PP +The following list of examples (taken from SUSv2) +shows the strings returned by +.BR dirname () +and +.BR basename () +for different paths: +.RS +.TS +lb lb lb +l l l l. +path dirname basename +/usr/lib /usr lib +/usr/ / usr +usr . usr +/ / / +\&. . . +\&.. . .. +.TE +.RE +.SH RETURN VALUE +Both +.BR dirname () +and +.BR basename () +return pointers to null-terminated strings. +(Do not pass these pointers to +.BR free (3).) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR basename (), +.BR dirname () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +There are two different versions of +.BR basename () +- the POSIX version described above, and the GNU version, which one gets +after +.PP +.in +4n +.EX +.BR " #define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B " #include " +.EE +.in +.PP +The GNU version never modifies its argument, and returns the +empty string when +.I path +has a trailing slash, and in particular also when it is "/". +There is no GNU version of +.BR dirname (). +.PP +With glibc, one gets the POSIX version of +.BR basename () +when +.I +is included, and the GNU version otherwise. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH BUGS +In the glibc implementation, +the POSIX versions of these functions modify the +.I path +argument, and segfault when called with a static string +such as "/usr/". +.PP +Before glibc 2.2.1, the glibc version of +.BR dirname () +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 +.BR basename () +and +.BR dirname (): +.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 SEE ALSO +.BR basename (1), +.BR dirname (1) diff --git a/upstream/opensuse-leap-15-6/man3/bcmp.3 b/upstream/opensuse-leap-15-6/man3/bcmp.3 new file mode 100644 index 00000000..a897aab8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bcmp.3 @@ -0,0 +1,30 @@ +.\" Copyright 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH bcmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bcmp \- compare byte sequences +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int bcmp(const void " s1 [. n "], const void " s2 [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +.BR bcmp () +is identical to +.BR memcmp (3); +use it instead. +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +Marked as LEGACY in POSIX.1-2001; +removed in POSIX.1-2008. +.SH SEE ALSO +.BR memcmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/bcopy.3 b/upstream/opensuse-leap-15-6/man3/bcopy.3 new file mode 100644 index 00000000..734a5673 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bcopy.3 @@ -0,0 +1,79 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" +.\" Modified Sun Feb 26 14:52:00 1995 by Rik Faith +.\" Modified Tue Oct 22 23:48:10 1996 by Eric S. Raymond +.\" " +.TH bcopy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bcopy \- copy byte sequence +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] void bcopy(const void " src [. n "], void " dest [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The +.BR bcopy () +function copies +.I n +bytes from +.I src +to +.IR dest . +The result is correct, even when both areas overlap. +.SH RETURN VALUE +None. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR bcopy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +.PP +Marked as LEGACY in POSIX.1-2001: use +.BR memcpy (3) +or +.BR memmove (3) +in new programs. +Note that the first two arguments +are interchanged for +.BR memcpy (3) +and +.BR memmove (3). +POSIX.1-2008 removes the specification of +.BR bcopy (). +.SH SEE ALSO +.BR bstring (3), +.BR memccpy (3), +.BR memcpy (3), +.BR memmove (3), +.BR strcpy (3), +.BR strncpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/beep.3ncurses b/upstream/opensuse-leap-15-6/man3/beep.3ncurses new file mode 100644 index 00000000..ecd2c303 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/beep.3ncurses @@ -0,0 +1,57 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_beep.3x,v 1.12 2010/12/04 18:36:44 tom Exp $ +.TH beep 3NCURSES "" +.SH NAME +\fBbeep\fR, \fBflash\fR \- \fBcurses\fR bell and screen flash routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint beep(void);\fR +.br +\fBint flash(void);\fR +.br +.SH DESCRIPTION +The \fBbeep\fR and \fBflash\fR routines are used to alert the terminal user. +The routine \fBbeep\fR sounds an audible alarm on the terminal, if possible; +otherwise it flashes the screen (visible bell). The routine \fBflash\fR +flashes the screen, and if that is not possible, sounds the alert. If neither +alert is possible, nothing happens. Nearly all terminals have an audible alert +(bell or beep), but only some can flash the screen. +.SH RETURN VALUE +These routines return \fBOK\fR if they succeed in beeping or flashing, +\fBERR\fR otherwise. +.SH EXTENSIONS +SVr4's beep and flash routines always returned \fBOK\fR, so it was not +possible to tell when the beep or flash failed. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +Like SVr4, it specifies that they always return \fBOK\fR. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/bind_textdomain_codeset.3 b/upstream/opensuse-leap-15-6/man3/bind_textdomain_codeset.3 new file mode 100644 index 00000000..b1109fae --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bind_textdomain_codeset.3 @@ -0,0 +1,72 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" 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. +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" GNU gettext source code and manual +.\" LI18NUX 2000 Globalization Specification +.\" +.TH BIND_TEXTDOMAIN_CODESET 3 "May 2001" "GNU gettext 20220912" +.SH NAME +bind_textdomain_codeset \- set encoding of message translations +.SH SYNOPSIS +.nf +.B #include +.sp +.BI "char * bind_textdomain_codeset (const char * " domainname , +.BI " const char * " codeset ); +.fi +.SH DESCRIPTION +The \fBbind_textdomain_codeset\fP function sets the output codeset for message +catalogs for domain \fIdomainname\fP. +.PP +A message domain is a set of translatable \fImsgid\fP messages. Usually, +every software package has its own message domain. +.PP +By default, the \fBgettext\fP family of functions returns translated messages +in the locale's character encoding, which can be retrieved as +\fBnl_langinfo(CODESET)\fP. The need for calling \fBbind_textdomain_codeset\fP +arises for programs which store strings in a locale independent way (e.g. +UTF-8) and want to avoid an extra character set conversion on the returned +translated messages. +.PP +\fIdomainname\fP must be a non-empty string. +.PP +If \fIcodeset\fP is not NULL, it must be a valid encoding name which can be +used for the \fBiconv_open\fP function. The \fBbind_textdomain_codeset\fP +function sets the output codeset for message catalogs belonging to domain +\fIdomainname\fP to \fIcodeset\fP. The function makes copies of the argument +strings as needed. +.PP +If \fIcodeset\fP is NULL, the function returns the previously set codeset for +domain \fIdomainname\fP. The default is NULL, denoting the locale's character +encoding. +.SH "RETURN VALUE" +If successful, the \fBbind_textdomain_codeset\fP function returns the current +codeset for domain \fIdomainname\fP, after possibly changing it. The resulting +string is valid until the next \fBbind_textdomain_codeset\fP call for the same +\fIdomainname\fP and must not be modified or freed. If a memory allocation +failure occurs, it sets \fBerrno\fP to \fBENOMEM\fP and returns NULL. If no +codeset has been set for domain \fIdomainname\fP, it returns NULL. +.SH ERRORS +The following error can occur, among others: +.TP +.B ENOMEM +Not enough memory available. +.SH BUGS +The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid +warnings in C code predating ANSI C. +.SH "SEE ALSO" +.BR gettext (3), +.BR dgettext (3), +.BR dcgettext (3), +.BR ngettext (3), +.BR dngettext (3), +.BR dcngettext (3), +.BR textdomain (3), +.BR nl_langinfo (3), +.BR iconv_open (3) diff --git a/upstream/opensuse-leap-15-6/man3/bindresvport.3 b/upstream/opensuse-leap-15-6/man3/bindresvport.3 new file mode 100644 index 00000000..c7e9b3fa --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bindresvport.3 @@ -0,0 +1,117 @@ +'\" t +.\" Copyright (C) 2007, Michael Kerrisk +.\" and Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2007-05-31, mtk: Rewrite and substantial additional text. +.\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors +.\" +.TH bindresvport 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bindresvport \- bind a socket to a privileged IP port +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int bindresvport(int " sockfd ", struct sockaddr_in *" sin ); +.fi +.SH DESCRIPTION +.BR bindresvport () +is used to bind the socket referred to by the +file descriptor +.I sockfd +to a privileged anonymous IP port, +that is, a port number arbitrarily selected from the range 512 to 1023. +.\" glibc actually starts searching with a port # in the range 600 to 1023 +.PP +If the +.BR bind (2) +performed by +.BR bindresvport () +is successful, and +.I sin +is not NULL, then +.I sin\->sin_port +returns the port number actually allocated. +.PP +.I sin +can be NULL, in which case +.I sin\->sin_family +is implicitly taken to be +.BR AF_INET . +However, in this case, +.BR bindresvport () +has no way to return the port number actually allocated. +(This information can later be obtained using +.BR getsockname (2).) +.SH RETURN VALUE +.BR bindresvport () +returns 0 on success; otherwise \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.BR bindresvport () +can fail for any of the same reasons as +.BR bind (2). +In addition, the following errors may occur: +.TP +.B EACCES +The calling process was not privileged +(on Linux: the calling process did not have the +.B CAP_NET_BIND_SERVICE +capability in the user namespace governing its network namespace). +.TP +.B EADDRINUSE +All privileged ports are in use. +.TP +.BR EAFNOSUPPORT " (" EPFNOSUPPORT " in glibc 2.7 and earlier)" +.I sin +is not NULL and +.I sin\->sin_family +is not +.BR AF_INET . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR bindresvport () +T} Thread safety T{ +glibc\ >=\ 2.17: MT-Safe; +.\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5 +glibc\ <\ 2.17: MT-Unsafe +T} +.TE +.hy +.ad +.sp 1 +.PP +The +.BR bindresvport () +function uses a static variable that was not protected by a lock +before glibc 2.17, rendering the function MT-Unsafe. +.SH VERSIONS +Present on the BSDs, Solaris, and many other systems. +.SH NOTES +Unlike some +.BR bindresvport () +implementations, +the glibc implementation ignores any value that the caller supplies in +.IR sin\->sin_port . +.SH STANDARDS +BSD. +.SH SEE ALSO +.BR bind (2), +.BR getsockname (2) diff --git a/upstream/opensuse-leap-15-6/man3/bindtextdomain.3 b/upstream/opensuse-leap-15-6/man3/bindtextdomain.3 new file mode 100644 index 00000000..e7623205 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bindtextdomain.3 @@ -0,0 +1,69 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" 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. +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" GNU gettext source code and manual +.\" LI18NUX 2000 Globalization Specification +.\" +.TH BINDTEXTDOMAIN 3 "May 2001" "GNU gettext 20220912" +.SH NAME +bindtextdomain \- set directory containing message catalogs +.SH SYNOPSIS +.nf +.B #include +.sp +.BI "char * bindtextdomain (const char * " domainname ", const char * " dirname ); +.fi +.SH DESCRIPTION +The \fBbindtextdomain\fP function sets the base directory of the hierarchy +containing message catalogs for a given message domain. +.PP +A message domain is a set of translatable \fImsgid\fP messages. Usually, +every software package has its own message domain. The need for calling +\fBbindtextdomain\fP arises because packages are not always installed with +the same prefix as the header and the libc/libintl libraries. +.PP +Message catalogs will be expected at the pathnames +\fIdirname\fP/\fIlocale\fP/\fIcategory\fP/\fIdomainname\fP.mo, +where \fIlocale\fP is a locale name and \fIcategory\fP is a locale facet such +as \fBLC_MESSAGES\fP. +.PP +\fIdomainname\fP must be a non-empty string. +.PP +If \fIdirname\fP is not NULL, the base directory for message catalogs belonging +to domain \fIdomainname\fP is set to \fIdirname\fP. The function makes copies +of the argument strings as needed. If the program wishes to call the +\fBchdir\fP function, it is important that \fIdirname\fP be an absolute +pathname; otherwise it cannot be guaranteed that the message catalogs will +be found. +.PP +If \fIdirname\fP is NULL, the function returns the previously set base +directory for domain \fIdomainname\fP. +.SH "RETURN VALUE" +If successful, the \fBbindtextdomain\fP function returns the current base +directory for domain \fIdomainname\fP, after possibly changing it. The +resulting string is valid until the next \fBbindtextdomain\fP call for the +same \fIdomainname\fP and must not be modified or freed. If a memory allocation +failure occurs, it sets \fBerrno\fP to \fBENOMEM\fP and returns NULL. +.SH ERRORS +The following error can occur, among others: +.TP +.B ENOMEM +Not enough memory available. +.SH BUGS +The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid +warnings in C code predating ANSI C. +.SH "SEE ALSO" +.BR gettext (3), +.BR dgettext (3), +.BR dcgettext (3), +.BR ngettext (3), +.BR dngettext (3), +.BR dcngettext (3), +.BR textdomain (3), +.BR realpath (3) diff --git a/upstream/opensuse-leap-15-6/man3/bkgd.3ncurses b/upstream/opensuse-leap-15-6/man3/bkgd.3ncurses new file mode 100644 index 00000000..61dc0e31 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bkgd.3ncurses @@ -0,0 +1,103 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_bkgd.3x,v 1.25 2017/11/18 23:56:00 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH bkgd 3NCURSES "" +.SH NAME +\fBbkgdset\fR, \fBwbkgdset\fR, +\fBbkgd\fR, \fBwbkgd\fR, +\fBgetbkgd\fR \- \fBcurses\fR window background manipulation routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR +.br +\fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR +.br +\fBint bkgd(chtype \fP\fIch\fP\fB);\fR +.br +\fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR +.br +\fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR +.br +.SH DESCRIPTION +.SS bkgdset +The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the +background of the named window. +The window background is a \fBchtype\fR consisting of +any combination of attributes (i.e., rendition) and a character. +The attribute part of the background is combined (OR'ed) with all non-blank +characters that are written into the window with \fBwaddch\fR. Both +the character and attribute parts of the background are combined with +the blank characters. The background becomes a property of the +character and moves with the character through any scrolling and +insert/delete line/character operations. +.PP +To the extent possible on a particular terminal, +the attribute part of the background is displayed +as the graphic rendition of the character put on the screen. +.SS bkgd +.PP +The \fBbkgd\fR and \fBwbkgd\fR functions +set the background property of the current or specified window +and then apply this setting to every character position in that window: +.PP +.bP +The rendition of every character on the screen is changed to +the new background rendition. +.bP +Wherever the former background character +appears, it is changed to the new background character. +.SS getbkgd +.PP +The \fBgetbkgd\fR function returns the given window's current background +character/attribute pair. +.SH RETURN VALUE +.PP +The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR. +The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set", +but this appears to be an error. +.SH NOTES +.PP +Note that \fBbkgdset\fR and \fBbkgd\fR may be macros. +.SH PORTABILITY +.PP +These functions are described in the XSI Curses standard, Issue 4. +It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure, +but gives no failure conditions. +.SH SEE ALSO +.na +.PP +\fBncurses\fR(3NCURSES), +\fBaddch\fR(3NCURSES), +\fBattr\fR(3NCURSES), +\fBoutopts\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/bkgrnd.3ncurses b/upstream/opensuse-leap-15-6/man3/bkgrnd.3ncurses new file mode 100644 index 00000000..8cb47cdf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bkgrnd.3ncurses @@ -0,0 +1,111 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_bkgrnd.3x,v 1.8 2017/11/18 23:47:37 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH bkgrnd 3NCURSES "" +.SH NAME +\fBbkgrnd\fR, +\fBwbkgrnd\fR, +\fBbkgrndset\fR, +\fBwbkgrndset\fR, +\fBgetbkgrnd\fR, +\fBwgetbkgrnd\fR \- \fBcurses\fR window complex background manipulation routines +.SH SYNOPSIS +.PP +.B #include +.sp +\fBint bkgrnd(\fR\fB const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wbkgrnd(\fR\fB WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBvoid bkgrndset(const cchar_t *\fR\fIwch\fR \fB);\fR +.br +\fBvoid wbkgrndset(WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint getbkgrnd(cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR +.br +.SH DESCRIPTION +.SS bkgrndset +.PP +The \fBbkgrndset\fR and \fBwbkgrndset\fR routines manipulate the +background of the named window. +The window background is a \fBcchar_t\fR consisting of +any combination of attributes (i.e., rendition) and a complex character. +The attribute part of the background is combined (OR'ed) with all non-blank +characters that are written into the window with \fBwaddch\fR. Both +the character and attribute parts of the background are combined with +the blank characters. +The background becomes a property of the +character and moves with the character through any scrolling and +insert/delete line/character operations. +.PP +To the extent possible on a +particular terminal, the attribute part of the background is displayed +as the graphic rendition of the character put on the screen. +.SS bkgrnd +.PP +The \fBbkgrnd\fR and \fBwbkgrnd\fR functions +set the background property of the current or specified window +and then apply this setting to every character position in that window: +.bP +The rendition of every character on the screen is changed to +the new background rendition. +.bP +Wherever the former background character +appears, it is changed to the new background character. +.SS getbkgrnd +.PP +The \fBgetbkgrnd\fR function returns the given window's current background +character/attribute pair via the \fBwch\fR pointer. +If the given window pointer is null, +the character is not updated (but no error returned). +.SH NOTES +Note that +\fBbkgrnd\fR, +\fBbkgrndset\fR, and +\fBgetbkgrnd\fR +may be macros. +.SH RETURN VALUE +.PP +The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value. +.PP +Upon successful completion, the other functions return \fBOK\fR. +Otherwise, they return \fBERR\fR: +.bP +A null window pointer is treated as an error. +.bP +A null character pointer is treated as an error. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBbkgd\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/border.3ncurses b/upstream/opensuse-leap-15-6/man3/border.3ncurses new file mode 100644 index 00000000..f51ddd2c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/border.3ncurses @@ -0,0 +1,153 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_border.3x,v 1.22 2010/12/04 18:36:44 tom Exp $ +.TH border 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBborder\fR, +\fBwborder\fR, +\fBbox\fR, +\fBhline\fR, +\fBwhline\fR, +\fBvline\fR, +\fBwvline\fR, +\fBmvhline\fR, +\fBmvwhline\fR, +\fBmvvline\fR, +\fBmvwvline\fR \- create \fBcurses\fR borders, horizontal and vertical lines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.br +\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR + \fBchtype tl, chtype tr, chtype bl, chtype br);\fR +.br +\fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR + \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR + \fBchtype bl, chtype br);\fR +.br +\fBint box(WINDOW *win, chtype verch, chtype horch);\fR +.br +\fBint hline(chtype ch, int n);\fR +.br +\fBint whline(WINDOW *win, chtype ch, int n);\fR +.br +\fBint vline(chtype ch, int n);\fR +.br +\fBint wvline(WINDOW *win, chtype ch, int n);\fR +.br +\fBint mvhline(int y, int x, chtype ch, int n);\fR +.br +\fBint mvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR +.br +\fBint mvvline(int y, int x, chtype ch, int n);\fR +.br +\fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR +.br +.SH DESCRIPTION +The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines +draw a box around the edges of a window. +Other than the window, each argument is a character with attributes: +.sp +.RS +\fIls\fR \- left side, +.br +\fIrs\fR \- right side, +.br +\fIts\fR \- top side, +.br +\fIbs\fR \- bottom side, +.br +\fItl\fR \- top left-hand corner, +.br +\fItr\fR \- top right-hand corner, +.br +\fIbl\fR \- bottom left-hand corner, and +.br +\fIbr\fR \- bottom right-hand corner. +.RE +.PP +If any of these arguments is zero, then the corresponding +default values (defined in \fBcurses.h\fR) are used instead: +.sp +.RS +\fBACS_VLINE\fR, +.br +\fBACS_VLINE\fR, +.br +\fBACS_HLINE\fR, +.br +\fBACS_HLINE\fR, +.br +\fBACS_ULCORNER\fR, +.br +\fBACS_URCORNER\fR, +.br +\fBACS_LLCORNER\fR, +.br +\fBACS_LRCORNER\fR. +.RE +.PP +\fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand +for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR +\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR. +.PP +The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right) +line using \fIch\fR starting at the current cursor position in the window. The +current cursor position is not changed. The line is at most \fIn\fR characters +long, or as many as fit into the window. +.PP +The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line +using \fIch\fR starting at the current cursor position in the window. The +current cursor position is not changed. The line is at most \fIn\fR characters +long, or as many as fit into the window. +.SH RETURN VALUE +All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a +non-negative integer if \fBimmedok\fR is set", but this appears to be an error. +.PP +X/Open does not define any error conditions. +This implementation returns an error +if the window pointer is null. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +The borders generated by these functions are \fIinside\fR borders (this +is also true of SVr4 curses, though the fact is not documented). +.PP +Note that \fBborder\fR and \fBbox\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +The standard specifies that they return \fBERR\fR on failure, +but specifies no error conditions. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBoutopts\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/border_set.3ncurses b/upstream/opensuse-leap-15-6/man3/border_set.3ncurses new file mode 100644 index 00000000..0280e78b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/border_set.3ncurses @@ -0,0 +1,206 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2011,2012 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_border_set.3x,v 1.11 2012/11/03 23:03:59 tom Exp $ +.TH border_set 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBborder_set\fR, +\fBwborder_set\fR, +\fBbox_set\fR, +\fBhline_set\fR, +\fBwhline_set\fR, +\fBmvhline_set\fR, +\fBmvwhline_set\fR, +\fBvline_set\fR, +\fBwvline_set\fR, +\fBmvvline_set\fR, +\fBmvwvline_set\fR \- create \fBcurses\fR borders or lines using complex characters and renditions +.ad +.hy +.SH SYNOPSIS +.PP +\fB#include \fR +.sp +\fBint border_set(\fR + \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR, + \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR, + \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR, + \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR +\fB);\fR +.br +\fBint wborder_set(\fR + \fBWINDOW *win\fR, + \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR, + \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR, + \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR, + \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR +.br +\fBint box_set(\fR + \fBWINDOW *win\fR, + \fBconst cchar_t *\fR\fIverch\fR, + \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR +.br +\fBint hline_set(\fR + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint whline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvhline_set(\fR + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvwhline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint vline_set(\fR + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint wvline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvvline_set(\fR + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +\fBint mvwvline_set(\fR + \fBWINDOW *\fR\fIwin\fR, + \fBint \fR\fIy\fR, \fBint \fR\fIx\fR, + \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR +.br +.SH DESCRIPTION +.PP +The +\fBborder_set\fR +and +\fBwborder_set\fR +functions draw a border around the edges of the current or specified window. +These functions do not change the cursor position, and do not wrap. +.PP +Other than the window, each argument is a complex character with attributes: +.RS +\fIls\fR \- left side, +.br +\fIrs\fR \- right side, +.br +\fIts\fR \- top side, +.br +\fIbs\fR \- bottom side, +.br +\fItl\fR \- top left-hand corner, +.br +\fItr\fR \- top right-hand corner, +.br +\fIbl\fR \- bottom left-hand corner, and +.br +\fIbr\fR \- bottom right-hand corner. +.RE +.PP +If any of these arguments is zero, then the corresponding +default values (defined in \fBcurses.h\fR) are used instead: +.RS +\fBWACS_VLINE\fR, +.br +\fBWACS_VLINE\fR, +.br +\fBWACS_HLINE\fR, +.br +\fBWACS_HLINE\fR, +.br +\fBWACS_ULCORNER\fR, +.br +\fBWACS_URCORNER\fR, +.br +\fBWACS_LLCORNER\fR, and +.br +\fBWACS_LRCORNER\fR. +.RE +.PP +\fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR +is a shorthand for the following call: +.PP +\fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR + \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR +.PP +The +\fB*line_set\fR +functions use +\fIwch\fR +to draw a line starting at the current cursor position in the window. +The line is at most \fIn\fR characters long or as many as fit into the window. +The current cursor position is not changed. +.PP +The +\fBhline_set\fR, +\fBmvhline_set\fR, +\fBmvwhline_set\fR, and +\fBwhline_set\fR +functions draw a line proceeding toward the last column of the same line. +.PP +The +\fBvline_set\fR, +\fBmvvline_set\fR, +\fBmvwvline_set\fR, and +\fBwvline_set\fR +functions draw a line proceeding toward the last line of the window. +.br +.SH NOTES +.PP +Note that +\fBborder_set\fR, +\fBhline_set\fR, +\fBmvhline_set\fR, +\fBmvvline_set\fR, +\fBmvwhline_set\fR, +\fBmvwvline_set\fR, and +\fBvline_set\fR +may be macros. +.br +.SH RETURN VALUE +.PP +Upon successful completion, these functions return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.PP +Functions using a window parameter return an error if it is null. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBadd_wch\fR(3NCURSES), +\fBborder\fR(3NCURSES), +\fBoutopts\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/bsd_signal.3 b/upstream/opensuse-leap-15-6/man3/bsd_signal.3 new file mode 100644 index 00000000..e488ac2e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bsd_signal.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright (c) 2007 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH bsd_signal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bsd_signal \- signal handling with BSD semantics +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B typedef void (*sighandler_t)(int); +.PP +.BI "sighandler_t bsd_signal(int " signum ", sighandler_t " handler ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR bsd_signal (): +.nf + Since glibc 2.26: + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + && ! (_POSIX_C_SOURCE >= 200809L) + glibc 2.25 and earlier: + _XOPEN_SOURCE +.fi +.SH DESCRIPTION +The +.BR bsd_signal () +function takes the same arguments, and performs the same task, as +.BR signal (2). +.PP +The difference between the two is that +.BR bsd_signal () +is guaranteed to provide reliable signal semantics, that is: +a) the disposition of the signal is not reset to the default +when the handler is invoked; +b) delivery of further instances of the signal is blocked while +the signal handler is executing; and +c) if the handler interrupts a blocking system call, +then the system call is automatically restarted. +A portable application cannot rely on +.BR signal (2) +to provide these guarantees. +.SH RETURN VALUE +The +.BR bsd_signal () +function returns the previous value of the signal handler, or +.B SIG_ERR +on error. +.SH ERRORS +As for +.BR signal (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR bsd_signal () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Use of +.BR bsd_signal () +should be avoided; use +.BR sigaction (2) +instead. +.PP +On modern Linux systems, +.BR bsd_signal () +and +.BR signal (2) +are equivalent. +But on older systems, +.BR signal (2) +provided unreliable signal semantics; see +.BR signal (2) +for details. +.PP +The use of +.I sighandler_t +is a GNU extension; +this type is defined only if the +.B _GNU_SOURCE +feature test macro is defined. +.SH STANDARDS +None. +.SH HISTORY +4.2BSD, POSIX.1-2001. +Removed in POSIX.1-2008, +recommending the use of +.BR sigaction (2) +instead. +.SH SEE ALSO +.BR sigaction (2), +.BR signal (2), +.BR sysv_signal (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/bsearch.3 b/upstream/opensuse-leap-15-6/man3/bsearch.3 new file mode 100644 index 00000000..1537abcb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bsearch.3 @@ -0,0 +1,142 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH bsearch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bsearch \- binary search of a sorted array +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *bsearch(const void " key [. size "], \ +const void " base [. size " * ." nmemb ], +.BI " size_t " nmemb ", size_t " size , +.BI " int (*" compar ")(const void [." size "], \ +const void [." size ])); +.fi +.SH DESCRIPTION +The +.BR bsearch () +function searches an array of +.I nmemb +objects, +the initial member of which is pointed to by +.IR base , +for a member +that matches the object pointed to by +.IR key . +The size of each member +of the array is specified by +.IR size . +.PP +The contents of the array should be in ascending sorted order according +to the comparison function referenced by +.IR compar . +The +.I compar +routine is expected to have two arguments which point to the +.I key +object and to an array member, in that order, and should return an integer +less than, equal to, or greater than zero if the +.I key +object is found, +respectively, to be less than, to match, or be greater than the array +member. +.SH RETURN VALUE +The +.BR bsearch () +function returns a pointer to a matching member of the +array, or NULL if no match is found. +If there are multiple elements that +match the key, the element returned is unspecified. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR bsearch () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, C99, SVr4, 4.3BSD. +.SH EXAMPLES +The example below first sorts an array of structures using +.BR qsort (3), +then retrieves desired elements using +.BR bsearch (). +.PP +.\" SRC BEGIN (bsearch.c) +.EX +#include +#include +#include + +#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0])) + +struct mi { + int nr; + const char *name; +}; + +static struct mi 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" } +}; + +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, ARRAY_SIZE(months), sizeof(months[0]), compmi); + for (size_t i = 1; i < argc; i++) { + struct mi key; + struct mi *res; + + key.name = argv[i]; + res = bsearch(&key, months, ARRAY_SIZE(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 +.\" SRC END +.SH SEE ALSO +.BR hsearch (3), +.BR lsearch (3), +.BR qsort (3), +.BR tsearch (3) diff --git a/upstream/opensuse-leap-15-6/man3/bstring.3 b/upstream/opensuse-leap-15-6/man3/bstring.3 new file mode 100644 index 00000000..2004adf9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bstring.3 @@ -0,0 +1,76 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified 1993-04-12, David Metcalfe +.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu) +.\" Modified 2002-01-20, Walter Harms +.TH bstring 3 2023-01-07 "Linux man-pages 6.04" +.SH NAME +bcmp, bcopy, bzero, memccpy, memchr, memcmp, memcpy, memfrob, memmem, +memmove, memset \- byte string operations +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int bcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); +.PP +.BI "void bcopy(const void " src [. n "], void " dest [. n "], size_t " n ); +.PP +.BI "void bzero(void " s [. n "], size_t " n ); +.PP +.BI "void *memccpy(void " dest [. n "], const void " src [. n "], int " c ", \ +size_t " n ); +.PP +.BI "void *memchr(const void " s [. n "], int " c ", size_t " n ); +.PP +.BI "int memcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); +.PP +.BI "void *memcpy(void " dest [. n "], const void " src [. n "], size_t " n ); +.PP +.BI "void *memfrob(void " s [. n "], size_t " n ); +.PP +.BI "void *memmem(const void " haystack [. haystacklen "], size_t " haystacklen , +.BI " const void " needle [. needlelen "], size_t " needlelen ); +.PP +.BI "void *memmove(void " dest [. n "], const void " src [. n "], size_t " n ); +.PP +.BI "void *memset(void " s [. n "], int " c ", size_t " n ); +.fi +.SH DESCRIPTION +The byte string functions perform operations on strings (byte arrays) +that are not necessarily null-terminated. +See the individual man pages +for descriptions of each function. +.SH NOTES +The functions +.BR bcmp () +and +.BR bcopy () +are obsolete. +Use +.BR memcmp () +and +.BR memmove () +instead. +.\" The old functions are not even available on some non-GNU/Linux systems. +.SH SEE ALSO +.BR bcmp (3), +.BR bcopy (3), +.BR bzero (3), +.BR memccpy (3), +.BR memchr (3), +.BR memcmp (3), +.BR memcpy (3), +.BR memfrob (3), +.BR memmem (3), +.BR memmove (3), +.BR memset (3), +.BR string (3) diff --git a/upstream/opensuse-leap-15-6/man3/bswap.3 b/upstream/opensuse-leap-15-6/man3/bswap.3 new file mode 100644 index 00000000..31d33846 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bswap.3 @@ -0,0 +1,68 @@ +.\" Copyright (C) 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH bswap 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bswap_16, bswap_32, bswap_64 \- reverse order of bytes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "uint16_t bswap_16(uint16_t " x ); +.BI "uint32_t bswap_32(uint32_t " x ); +.BI "uint64_t bswap_64(uint64_t " x ); +.fi +.SH DESCRIPTION +These functions return a value in which the order of the bytes +in their 2-, 4-, or 8-byte arguments is reversed. +.SH RETURN VALUE +These functions return the value of their argument with the bytes reversed. +.SH ERRORS +These functions always succeed. +.SH STANDARDS +GNU. +.SH EXAMPLES +The program below swaps the bytes of the 8-byte integer supplied as +its command-line argument. +The following shell session demonstrates the use of the program: +.PP +.in +4n +.EX +$ \fB./a.out 0x0123456789abcdef\fP +0x123456789abcdef ==> 0xefcdab8967452301 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (bswap.c) +.EX +#include +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + uint64_t x; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + x = strtoull(argv[1], NULL, 0); + printf("%#" PRIx64 " ==> %#" PRIx64 "\en", x, bswap_64(x)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR byteorder (3), +.BR endian (3) diff --git a/upstream/opensuse-leap-15-6/man3/btowc.3 b/upstream/opensuse-leap-15-6/man3/btowc.3 new file mode 100644 index 00000000..ecf1f0b2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/btowc.3 @@ -0,0 +1,89 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH btowc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +btowc \- convert single byte to wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t btowc(int " c ); +.fi +.SH DESCRIPTION +The +.BR btowc () +function converts \fIc\fP, +interpreted as a multibyte sequence +of length 1, starting in the initial shift state, to a wide character and +returns it. +If \fIc\fP is +.B EOF +or not a valid multibyte sequence of length 1, +the +.BR btowc () +function returns +.BR WEOF . +.SH RETURN VALUE +The +.BR btowc () +function returns the wide character +converted from the single byte \fIc\fP. +If \fIc\fP is +.B EOF +or not a valid multibyte sequence of length 1, +it returns +.BR WEOF . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR btowc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH NOTES +The behavior of +.BR btowc () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +This function should never be used. +It does not work for encodings which have +state, and unnecessarily treats single bytes differently from multibyte +sequences. +Use either +.BR mbtowc (3) +or the thread-safe +.BR mbrtowc (3) +instead. +.SH SEE ALSO +.BR mbrtowc (3), +.BR mbtowc (3), +.BR wctob (3) diff --git a/upstream/opensuse-leap-15-6/man3/btree.3 b/upstream/opensuse-leap-15-6/man3/btree.3 new file mode 100644 index 00000000..95d3ba72 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/btree.3 @@ -0,0 +1,229 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)btree.3 8.4 (Berkeley) 8/18/94 +.\" +.TH btree 3 2022-12-04 "Linux man-pages 6.04" +.\".UC 7 +.SH NAME +btree \- btree database access method +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.ft B +#include +#include +.ft R +.fi +.SH DESCRIPTION +.IR "Note well" : +This page documents interfaces provided up until glibc 2.1. +Since glibc 2.2, glibc no longer provides these interfaces. +Probably, you are looking for the APIs provided by the +.I libdb +library instead. +.PP +The routine +.BR dbopen (3) +is the library interface to database files. +One of the supported file formats is btree files. +The general description of the database access methods is in +.BR dbopen (3), +this manual page describes only the btree-specific information. +.PP +The btree data structure is a sorted, balanced tree structure storing +associated key/data pairs. +.PP +The btree access-method-specific data structure provided to +.BR dbopen (3) +is defined in the +.I +include file as follows: +.PP +.in +4n +.EX +typedef struct { + unsigned long flags; + unsigned int cachesize; + int maxkeypage; + int minkeypage; + unsigned int psize; + int (*compare)(const DBT *key1, const DBT *key2); + size_t (*prefix)(const DBT *key1, const DBT *key2); + int lorder; +} BTREEINFO; +.EE +.in +.PP +The elements of this structure are as follows: +.TP +.I flags +The flag value is specified by ORing any of the following values: +.RS +.TP +.B R_DUP +Permit duplicate keys in the tree, that is, +permit insertion if the key to be +inserted already exists in the tree. +The default behavior, as described in +.BR dbopen (3), +is to overwrite a matching key when inserting a new key or to fail if +the +.B R_NOOVERWRITE +flag is specified. +The +.B R_DUP +flag is overridden by the +.B R_NOOVERWRITE +flag, and if the +.B R_NOOVERWRITE +flag is specified, attempts to insert duplicate keys into +the tree will fail. +.IP +If the database contains duplicate keys, the order of retrieval of +key/data pairs is undefined if the +.I get +routine is used, however, +.I seq +routine calls with the +.B R_CURSOR +flag set will always return the logical +"first" of any group of duplicate keys. +.RE +.TP +.I cachesize +A suggested maximum size (in bytes) of the memory cache. +This value is +.I only +advisory, and the access method will allocate more memory rather than fail. +Since every search examines the root page of the tree, caching the most +recently used pages substantially improves access time. +In addition, physical writes are delayed as long as possible, so a moderate +cache can reduce the number of I/O operations significantly. +Obviously, using a cache increases (but only increases) the likelihood of +corruption or lost data if the system crashes while a tree is being modified. +If +.I cachesize +is 0 (no size is specified), a default cache is used. +.TP +.I maxkeypage +The maximum number of keys which will be stored on any single page. +Not currently implemented. +.\" The maximum number of keys which will be stored on any single page. +.\" Because of the way the btree data structure works, +.\" .I maxkeypage +.\" must always be greater than or equal to 2. +.\" If +.\" .I maxkeypage +.\" is 0 (no maximum number of keys is specified), the page fill factor is +.\" made as large as possible (which is almost invariably what is wanted). +.TP +.I minkeypage +The minimum number of keys which will be stored on any single page. +This value is used to determine which keys will be stored on overflow +pages, that is, if a key or data item is longer than the pagesize divided +by the minkeypage value, it will be stored on overflow pages instead +of in the page itself. +If +.I minkeypage +is 0 (no minimum number of keys is specified), a value of 2 is used. +.TP +.I psize +Page size is the size (in bytes) of the pages used for nodes in the tree. +The minimum page size is 512 bytes and the maximum page size is 64\ KiB. +If +.I psize +is 0 (no page size is specified), a page size is chosen based on the +underlying filesystem I/O block size. +.TP +.I compare +Compare is the key comparison function. +It must return an integer less than, equal to, or greater than zero if the +first key argument is considered to be respectively less than, equal to, +or greater than the second key argument. +The same comparison function must be used on a given tree every time it +is opened. +If +.I compare +is NULL (no comparison function is specified), the keys are compared +lexically, with shorter keys considered less than longer keys. +.TP +.I prefix +Prefix is the prefix comparison function. +If specified, this routine must return the number of bytes of the second key +argument which are necessary to determine that it is greater than the first +key argument. +If the keys are equal, the key length should be returned. +Note, the usefulness of this routine is very data-dependent, but, in some +data sets can produce significantly reduced tree sizes and search times. +If +.I prefix +is NULL (no prefix function is specified), +.I and +no comparison function is specified, a default lexical comparison routine +is used. +If +.I prefix +is NULL and a comparison routine is specified, no prefix comparison is +done. +.TP +.I lorder +The byte order for integers in the stored database metadata. +The number should represent the order as an integer; for example, +big endian order would be the number 4,321. +If +.I lorder +is 0 (no order is specified), the current host order is used. +.PP +If the file already exists (and the +.B O_TRUNC +flag is not specified), the +values specified for the arguments +.IR flags , +.IR lorder , +and +.I psize +are ignored +in favor of the values used when the tree was created. +.PP +Forward sequential scans of a tree are from the least key to the greatest. +.PP +Space freed up by deleting key/data pairs from the tree is never reclaimed, +although it is normally made available for reuse. +This means that the btree storage structure is grow-only. +The only solutions are to avoid excessive deletions, or to create a fresh +tree periodically from a scan of an existing one. +.PP +Searches, insertions, and deletions in a btree will all complete in +O lg base N where base is the average fill factor. +Often, inserting ordered data into btrees results in a low fill factor. +This implementation has been modified to make ordered insertion the best +case, resulting in a much better than normal page fill factor. +.SH ERRORS +The +.I btree +access method routines may fail and set +.I errno +for any of the errors specified for the library routine +.BR dbopen (3). +.SH BUGS +Only big and little endian byte order is supported. +.SH SEE ALSO +.BR dbopen (3), +.BR hash (3), +.BR mpool (3), +.BR recno (3) +.PP +.IR "The Ubiquitous B-tree" , +Douglas Comer, ACM Comput. Surv. 11, 2 (June 1979), 121-138. +.PP +.IR "Prefix B-trees" , +Bayer and Unterauer, ACM Transactions on Database Systems, Vol. 2, 1 +(March 1977), 11-26. +.PP +.IR "The Art of Computer Programming Vol. 3: Sorting and Searching" , +D.E. Knuth, 1968, pp 471-480. diff --git a/upstream/opensuse-leap-15-6/man3/byteorder.3 b/upstream/opensuse-leap-15-6/man3/byteorder.3 new file mode 100644 index 00000000..525a93f0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/byteorder.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 21:29:05 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Thu Jul 26 14:06:20 2001 by Andries Brouwer (aeb@cwi.nl) +.\" +.TH BYTEORDER 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +htonl, htons, ntohl, ntohs \- convert values between host and network +byte order +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "uint32_t htonl(uint32_t " hostlong ); +.BI "uint16_t htons(uint16_t " hostshort ); +.PP +.BI "uint32_t ntohl(uint32_t " netlong ); +.BI "uint16_t ntohs(uint16_t " netshort ); +.fi +.SH DESCRIPTION +The +.BR htonl () +function converts the unsigned integer +.I hostlong +from host byte order to network byte order. +.PP +The +.BR htons () +function converts the unsigned short integer +.I hostshort +from host byte order to network byte order. +.PP +The +.BR ntohl () +function converts the unsigned integer +.I netlong +from network byte order to host byte order. +.PP +The +.BR ntohs () +function converts the unsigned short integer +.I netshort +from network byte order to host byte order. +.PP +On the i386 the host byte order is Least Significant Byte first, +whereas the network byte order, as used on the Internet, is Most +Significant Byte first. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR htonl (), +.BR htons (), +.BR ntohl (), +.BR ntohs () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR bswap (3), +.BR endian (3), +.BR gethostbyname (3), +.BR getservent (3) diff --git a/upstream/opensuse-leap-15-6/man3/bzero.3 b/upstream/opensuse-leap-15-6/man3/bzero.3 new file mode 100644 index 00000000..ac06e913 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/bzero.3 @@ -0,0 +1,161 @@ +'\" t +.\" Copyright (C) 2017 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH bzero 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +bzero, explicit_bzero \- zero a byte string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void bzero(void " s [. n "], size_t " n ); +.PP +.B #include +.PP +.BI "void explicit_bzero(void " s [. n "], size_t " n ); +.fi +.SH DESCRIPTION +The +.BR bzero () +function erases the data in the +.I n +bytes of the memory starting at the location pointed to by +.IR s , +by writing zeros (bytes containing \[aq]\e0\[aq]) to that area. +.PP +The +.BR explicit_bzero () +function performs the same task as +.BR bzero (). +It differs from +.BR bzero () +in that it guarantees that compiler optimizations will not remove the +erase operation if the compiler deduces that the operation is "unnecessary". +.SH RETURN VALUE +None. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR bzero (), +.BR explicit_bzero () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR explicit_bzero () +glibc 2.25. +.IP +The +.BR explicit_bzero () +function is a nonstandard extension that is also present on some of the BSDs. +Some other implementations have a similar function, such as +.BR memset_explicit () +or +.BR memset_s (). +.TP +.BR bzero () +4.3BSD. +.IP +Marked as LEGACY in POSIX.1-2001. +Removed in POSIX.1-2008. +.SH NOTES +The +.BR explicit_bzero () +function addresses a problem that security-conscious applications +may run into when using +.BR bzero (): +if the compiler can deduce that the location to be zeroed will +never again be touched by a +.I correct +program, then it may remove the +.BR bzero () +call altogether. +This is a problem if the intent of the +.BR bzero () +call was to erase sensitive data (e.g., passwords) +to prevent the possibility that the data was leaked +by an incorrect or compromised program. +Calls to +.BR explicit_bzero () +are never optimized away by the compiler. +.PP +The +.BR explicit_bzero () +function does not solve all problems associated with erasing sensitive data: +.IP \[bu] 3 +The +.BR explicit_bzero () +function does +.I not +guarantee that sensitive data is completely erased from memory. +(The same is true of +.BR bzero ().) +For example, there may be copies of the sensitive data in +a register and in "scratch" stack areas. +The +.BR explicit_bzero () +function is not aware of these copies, and can't erase them. +.IP \[bu] +In some circumstances, +.BR explicit_bzero () +can +.I decrease +security. +If the compiler determined that the variable containing the +sensitive data could be optimized to be stored in a register +(because it is small enough to fit in a register, +and no operation other than the +.BR explicit_bzero () +call would need to take the address of the variable), then the +.BR explicit_bzero () +call will force the data to be copied from the register +to a location in RAM that is then immediately erased +(while the copy in the register remains unaffected). +The problem here is that data in RAM is more likely to be exposed +by a bug than data in a register, and thus the +.BR explicit_bzero () +call creates a brief time window where the sensitive data is more +vulnerable than it would otherwise have been +if no attempt had been made to erase the data. +.PP +Note that declaring the sensitive variable with the +.B volatile +qualifier does +.I not +eliminate the above problems. +Indeed, it will make them worse, since, for example, +it may force a variable that would otherwise have been optimized +into a register to instead be maintained in (more vulnerable) +RAM for its entire lifetime. +.PP +Notwithstanding the above details, for security-conscious applications, using +.BR explicit_bzero () +is generally preferable to not using it. +The developers of +.BR explicit_bzero () +anticipate that future compilers will recognize calls to +.BR explicit_bzero () +and take steps to ensure that all copies of the sensitive data are erased, +including copies in registers or in "scratch" stack areas. +.SH SEE ALSO +.BR bstring (3), +.BR memset (3), +.BR swab (3) diff --git a/upstream/opensuse-leap-15-6/man3/cabs.3 b/upstream/opensuse-leap-15-6/man3/cabs.3 new file mode 100644 index 00000000..1ffe293c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cabs.3 @@ -0,0 +1,57 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cabs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cabs, cabsf, cabsl \- absolute value of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double cabs(double complex " z ); +.BI "float cabsf(float complex " z ); +.BI "long double cabsl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions return the absolute value of the complex number +.IR z . +The result is a real number. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cabs (), +.BR cabsf (), +.BR cabsl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH NOTES +The function is actually an alias for +.I "hypot(a,\ b)" +(or, equivalently, +.IR "sqrt(a*a\ +\ b*b)" ). +.SH SEE ALSO +.BR abs (3), +.BR cimag (3), +.BR hypot (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/cacos.3 b/upstream/opensuse-leap-15-6/man3/cacos.3 new file mode 100644 index 00000000..d430e01b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cacos.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright (C) 2011 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cacos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cacos, cacosf, cacosl \- complex arc cosine +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cacos(double complex " z ); +.BI "float complex cacosf(float complex " z ); +.BI "long double complex cacosl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc cosine of +.IR z . +If \fIy\ =\ cacos(z)\fP, then \fIz\ =\ ccos(y)\fP. +The real part of +.I y +is chosen in the interval [0,pi]. +.PP +One has: +.PP +.nf + cacos(z) = \-i * clog(z + i * csqrt(1 \- z * z)) +.fi +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cacos (), +.BR cacosf (), +.BR cacosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH EXAMPLES +.\" SRC BEGIN (cacos.c) +.EX +/* Link with "\-lm" */ + +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + double complex z, c, f; + double complex i = I; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + z = atof(argv[1]) + atof(argv[2]) * I; + + c = cacos(z); + + printf("cacos() = %6.3f %6.3f*i\en", creal(c), cimag(c)); + + f = \-i * clog(z + i * csqrt(1 \- z * z)); + + printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR ccos (3), +.BR clog (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/cacosh.3 b/upstream/opensuse-leap-15-6/man3/cacosh.3 new file mode 100644 index 00000000..81fca548 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cacosh.3 @@ -0,0 +1,98 @@ +'\" t +.\" Copyright 2002 Walter Harms(walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright (C) 2011 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cacosh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cacosh(double complex " z ); +.BI "float complex cacoshf(float complex " z ); +.BI "long double complex cacoshl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc hyperbolic cosine of +.IR z . +If \fIy\ =\ cacosh(z)\fP, then \fIz\ =\ ccosh(y)\fP. +The imaginary part of +.I y +is chosen in the interval [\-pi,pi]. +The real part of +.I y +is chosen nonnegative. +.PP +One has: +.PP +.nf + cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2)) +.fi +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cacosh (), +.BR cacoshf (), +.BR cacoshl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +glibc 2.1. +.SH EXAMPLES +.\" SRC BEGIN (cacosh.c) +.EX +/* Link with "\-lm" */ + +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + double complex z, c, f; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + z = atof(argv[1]) + atof(argv[2]) * I; + + c = cacosh(z); + printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c)); + + f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2)); + printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR acosh (3), +.BR cabs (3), +.BR ccosh (3), +.BR cimag (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/canonicalize_file_name.3 b/upstream/opensuse-leap-15-6/man3/canonicalize_file_name.3 new file mode 100644 index 00000000..134453af --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/canonicalize_file_name.3 @@ -0,0 +1,83 @@ +'\" t +.\" Copyright 2013 Michael Kerrisk +.\" (Replaces an earlier page by Walter Harms and Michael Kerrisk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH canonicalize_file_name 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +canonicalize_file_name \- return the canonicalized absolute pathname +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "char *canonicalize_file_name(const char *" path ");" +.fi +.SH DESCRIPTION +The +.BR canonicalize_file_name () +function returns a null-terminated string containing +the canonicalized absolute pathname corresponding to +.IR path . +In the returned string, symbolic links are resolved, as are +.I . +and +.I .. +pathname components. +Consecutive slash +.RI ( / ) +characters are replaced by a single slash. +.PP +The returned string is dynamically allocated by +.BR canonicalize_file_name () +and the caller should deallocate it with +.BR free (3) +when it is no longer required. +.PP +The call +.I canonicalize_file_name(path) +is equivalent to the call: +.PP +.in +4n +.EX +realpath(path, NULL); +.EE +.in +.SH RETURN VALUE +On success, +.BR canonicalize_file_name () +returns a null-terminated string. +On error (e.g., a pathname component is unreadable or does not exist), +.BR canonicalize_file_name () +returns NULL and sets +.I errno +to indicate the error. +.SH ERRORS +See +.BR realpath (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR canonicalize_file_name () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR readlink (2), +.BR realpath (3) diff --git a/upstream/opensuse-leap-15-6/man3/carg.3 b/upstream/opensuse-leap-15-6/man3/carg.3 new file mode 100644 index 00000000..fd70e010 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/carg.3 @@ -0,0 +1,91 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH carg 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +carg, cargf, cargl \- calculate the complex argument +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double carg(double complex " z ");" +.BI "float cargf(float complex " z ");" +.BI "long double cargl(long double complex " z ");" +.fi +.SH DESCRIPTION +These functions calculate the complex argument (also called phase angle) of +.IR z , +with a branch cut along the negative real axis. +.PP +A complex number can be described by two real coordinates. +One may use rectangular coordinates and gets +.PP +.in +4n +.EX +z = x + I * y +.EE +.in +.PP +where +.I x\~=\~creal(z) +and +.IR y\~=\~cimag(z) . +.PP +Or one may use polar coordinates and gets +.PP +.in +4n +.EX +z = r * cexp(I * a) +.EE +.in +.PP +where +.I r\~=\~cabs(z) +is the "radius", the "modulus", the absolute value of +.IR z , +and +.I a\~=\~carg(z) +is the "phase angle", the argument of +.IR z . +.PP +One has: +.PP +.in +4n +.EX +tan(carg(z)) = cimag(z) / creal(z) +.EE +.in +.SH RETURN VALUE +The return value is in the range of [\-pi,pi]. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR carg (), +.BR cargf (), +.BR cargl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/casin.3 b/upstream/opensuse-leap-15-6/man3/casin.3 new file mode 100644 index 00000000..e2a923c4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/casin.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH casin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +casin, casinf, casinl \- complex arc sine +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex casin(double complex " z ); +.BI "float complex casinf(float complex " z ); +.BI "long double complex casinl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc sine of +.IR z . +If \fIy\ =\ casin(z)\fP, then \fIz\ =\ csin(y)\fP. +The real part of +.I y +is chosen in the interval [\-pi/2,pi/2]. +.PP +One has: +.PP +.nf + casin(z) = \-i clog(iz + csqrt(1 \- z * z)) +.fi +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR casin (), +.BR casinf (), +.BR casinl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR clog (3), +.BR csin (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/casinh.3 b/upstream/opensuse-leap-15-6/man3/casinh.3 new file mode 100644 index 00000000..73274213 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/casinh.3 @@ -0,0 +1,64 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH casinh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +casinh, casinhf, casinhl \- complex arc sine hyperbolic +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex casinh(double complex " z ); +.BI "float complex casinhf(float complex " z ); +.BI "long double complex casinhl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc hyperbolic sine of +.IR z . +If \fIy\~=\~casinh(z)\fP, then \fIz\~=\~csinh(y)\fP. +The imaginary part of +.I y +is chosen in the interval [\-pi/2,pi/2]. +.PP +One has: +.PP +.in +4n +.EX +casinh(z) = clog(z + csqrt(z * z + 1)) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR casinh (), +.BR casinhf (), +.BR casinhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR asinh (3), +.BR cabs (3), +.BR cimag (3), +.BR csinh (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/catan.3 b/upstream/opensuse-leap-15-6/man3/catan.3 new file mode 100644 index 00000000..c2ad870e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/catan.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright (C) 2011 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH catan 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +catan, catanf, catanl \- complex arc tangents +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex catan(double complex " z ); +.BI "float complex catanf(float complex " z ); +.BI "long double complex catanl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc tangent of +.IR z . +If \fIy\~=\~catan(z)\fP, then \fIz\~=\~ctan(y)\fP. +The real part of y is chosen in the interval [\-pi/2,pi/2]. +.PP +One has: +.PP +.in +4n +.EX +catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR catan (), +.BR catanf (), +.BR catanl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH EXAMPLES +.\" SRC BEGIN (catan.c) +.EX +/* Link with "\-lm" */ + +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + double complex z, c, f; + double complex i = I; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + z = atof(argv[1]) + atof(argv[2]) * I; + + c = catan(z); + printf("catan() = %6.3f %6.3f*i\en", creal(c), cimag(c)); + + f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i); + printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR ccos (3), +.BR clog (3), +.BR ctan (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/catanh.3 b/upstream/opensuse-leap-15-6/man3/catanh.3 new file mode 100644 index 00000000..23c56b5c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/catanh.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright (C) 2011 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH catanh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +catanh, catanhf, catanhl \- complex arc tangents hyperbolic +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex catanh(double complex " z ); +.BI "float complex catanhf(float complex " z ); +.BI "long double complex catanhl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex arc hyperbolic tangent of +.IR z . +If \fIy\~=\~catanh(z)\fP, then \fIz\~=\~ctanh(y)\fP. +The imaginary part of +.I y +is chosen in the interval [\-pi/2,pi/2]. +.PP +One has: +.PP +.in +4n +.EX +catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z)) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR catanh (), +.BR catanhf (), +.BR catanhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH EXAMPLES +.\" SRC BEGIN (catanh.c) +.EX +/* Link with "\-lm" */ + +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + double complex z, c, f; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + z = atof(argv[1]) + atof(argv[2]) * I; + + c = catanh(z); + printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c)); + + f = 0.5 * (clog(1 + z) \- clog(1 \- z)); + printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR atanh (3), +.BR cabs (3), +.BR cimag (3), +.BR ctanh (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/catgets.3 b/upstream/opensuse-leap-15-6/man3/catgets.3 new file mode 100644 index 00000000..7a57a260 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/catgets.3 @@ -0,0 +1,91 @@ +'\" t +.\" Copyright 1993 Mitchum DSouza +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Updated, aeb, 980809 +.TH catgets 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +catgets \- get message from a message catalog +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *catgets(nl_catd " catalog ", int " set_number \ +", int " message_number , +.BI " const char *" message ); +.fi +.SH DESCRIPTION +.BR catgets () +reads the message +.IR message_number , +in set +.IR set_number , +from the message catalog identified by +.IR catalog , +where +.I catalog +is a catalog descriptor returned from an earlier call to +.BR catopen (3). +The fourth argument, +.IR message , +points to a default message string which will be returned by +.BR catgets () +if the identified message catalog is not currently available. +The +message-text is contained in an internal buffer area and should be copied by +the application if it is to be saved or modified. +The return string is +always terminated with a null byte (\[aq]\e0\[aq]). +.SH RETURN VALUE +On success, +.BR catgets () +returns a pointer to an internal buffer area +containing the null-terminated message string. +On failure, +.BR catgets () +returns the value +.IR message . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR catgets () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +The +.BR catgets () +function is available only in libc.so.4.4.4c and above. +.PP +The Jan 1987 X/Open Portability Guide specifies a more subtle +error return: +.I message +is returned if the message catalog specified by +.I catalog +is not available, while an empty string is returned +when the message catalog is available but does not contain +the specified message. +These two possible error returns seem to be discarded in SUSv2 +in favor of always returning +.IR message . +.SH SEE ALSO +.BR catopen (3), +.BR setlocale (3) diff --git a/upstream/opensuse-leap-15-6/man3/catopen.3 b/upstream/opensuse-leap-15-6/man3/catopen.3 new file mode 100644 index 00000000..8634de97 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/catopen.3 @@ -0,0 +1,200 @@ +'\" t +.\" Copyright 1993 Mitchum DSouza +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze +.\" Modified 2001-12-14 aeb +.\" +.TH catopen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +catopen, catclose \- open/close a message catalog +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "nl_catd catopen(const char *" name ", int " flag ); +.BI "int catclose(nl_catd " catalog ); +.fi +.SH DESCRIPTION +The function +.BR catopen () +opens a message catalog and returns a catalog descriptor. +The descriptor remains valid until +.BR catclose () +or +.BR execve (2). +If a file descriptor is used to implement catalog descriptors, +then the +.B FD_CLOEXEC +flag will be set. +.PP +The argument +.I name +specifies the name of the message catalog to be opened. +If +.I name +specifies an absolute path (i.e., contains a \[aq]/\[aq]), +then +.I name +specifies a pathname for the message catalog. +Otherwise, the environment variable +.B NLSPATH +is used with +.I name +substituted for +.B %N +(see +.BR locale (7)). +It is unspecified whether +.B NLSPATH +will be used when the process has root privileges. +If +.B NLSPATH +does not exist in the environment, +or if a message catalog cannot be opened +in any of the paths specified by it, +then an implementation defined path is used. +This latter default path may depend on the +.B LC_MESSAGES +locale setting when the +.I flag +argument is +.B NL_CAT_LOCALE +and on the +.B LANG +environment variable when the +.I flag +argument is 0. +Changing the +.B LC_MESSAGES +part of the locale may invalidate +open catalog descriptors. +.PP +The +.I flag +argument to +.BR catopen () +is used to indicate the source for the language to use. +If it is set to +.BR NL_CAT_LOCALE , +then it will use the current locale setting for +.BR LC_MESSAGES . +Otherwise, it will use the +.B LANG +environment variable. +.PP +The function +.BR catclose () +closes the message catalog identified by +.IR catalog . +It invalidates any subsequent references to the message catalog +defined by +.IR catalog . +.SH RETURN VALUE +The function +.BR catopen () +returns a message catalog descriptor of type +.I nl_catd +on success. +On failure, it returns +.I (nl_catd)\~\-1 +and sets +.I errno +to indicate the error. +The possible error values include all +possible values for the +.BR open (2) +call. +.PP +The function +.BR catclose () +returns 0 on success, or \-1 on failure. +.SH ENVIRONMENT +.TP +.B LC_MESSAGES +May be the source of the +.B LC_MESSAGES +locale setting, and thus +determine the language to use if +.I flag +is set to +.BR NL_CAT_LOCALE . +.TP +.B LANG +The language to use if +.I flag +is 0. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR catopen () +T} Thread safety MT-Safe env +T{ +.BR catclose () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The above is the POSIX.1 description. +The glibc value for +.B NL_CAT_LOCALE +is 1. +.\" (Compare +.\" .B MCLoadAll +.\" below.) +The default path varies, but usually looks at a number of places below +.IR /usr/share/locale . +.\" .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 . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.\" 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). +.SH SEE ALSO +.BR catgets (3), +.BR setlocale (3) diff --git a/upstream/opensuse-leap-15-6/man3/cbrt.3 b/upstream/opensuse-leap-15-6/man3/cbrt.3 new file mode 100644 index 00000000..10b21923 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cbrt.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright 1995 Jim Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" changed `square root' into `cube root' - aeb, 950919 +.\" +.\" Modified 2002-07-27 Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH cbrt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cbrt, cbrtf, cbrtl \- cube root function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double cbrt(double " x ); +.BI "float cbrtf(float " x ); +.BI "long double cbrtl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR cbrt (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR cbrtf (), +.BR cbrtl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the (real) cube root of +.IR x . +This function cannot fail; every representable real value has a +representable real cube root. +.SH RETURN VALUE +These functions return the cube root of +.IR x . +.PP +If +.I x +is +0, \-0, positive infinity, negative infinity, or NaN, +.I x +is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cbrt (), +.BR cbrtf (), +.BR cbrtl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.\" .BR cbrt () +.\" was a GNU extension. It is now a C99 requirement. +.SH SEE ALSO +.BR pow (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/ccos.3 b/upstream/opensuse-leap-15-6/man3/ccos.3 new file mode 100644 index 00000000..8b65465d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ccos.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH ccos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ccos, ccosf, ccosl \- complex cosine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex ccos(double complex " z ); +.BI "float complex ccosf(float complex " z ); +.BI "long double complex ccosl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex cosine of +.IR z . +.PP +The complex cosine function is defined as: +.PP +.in +4n +.EX +ccos(z) = (exp(i * z) + exp(\-i * z)) / 2 +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ccos (), +.BR ccosf (), +.BR ccosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cacos (3), +.BR csin (3), +.BR ctan (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/ccosh.3 b/upstream/opensuse-leap-15-6/man3/ccosh.3 new file mode 100644 index 00000000..5f93131b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ccosh.3 @@ -0,0 +1,40 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH ccosh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ccosh, ccoshf, ccoshl \- complex hyperbolic cosine +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex ccosh(double complex " z ); +.BI "float complex ccoshf(float complex " z ); +.BI "long double complex ccoshl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex hyperbolic cosine of +.IR z . +.PP +The complex hyperbolic cosine function is defined as: +.PP +.in +4n +.EX +ccosh(z) = (exp(z)+exp(\-z))/2 +.EE +.in +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cacosh (3), +.BR csinh (3), +.BR ctanh (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/ceil.3 b/upstream/opensuse-leap-15-6/man3/ceil.3 new file mode 100644 index 00000000..b9b1955c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ceil.3 @@ -0,0 +1,118 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH ceil 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ceil, ceilf, ceill \- ceiling function: smallest integral value not +less than argument +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double ceil(double " x ); +.BI "float ceilf(float " x ); +.BI "long double ceill(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ceilf (), +.BR ceill (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the smallest integral value that is not less than +.IR x . +.PP +For example, +.I ceil(0.5) +is 1.0, and +.I ceil(\-0.5) +is 0.0. +.SH RETURN VALUE +These functions return the ceiling of +.IR x . +.PP +If +.I x +is integral, +0, \-0, NaN, or infinite, +.I x +itself is returned. +.SH ERRORS +No errors occur. +POSIX.1-2001 documents a range error for overflows, but see NOTES. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ceil (), +.BR ceilf (), +.BR ceill () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH NOTES +SUSv2 and POSIX.1-2001 contain text about overflow (which might set +.I errno +to +.BR ERANGE , +or raise an +.B FE_OVERFLOW +exception). +In practice, the result cannot overflow on any current machine, +so this error-handling stuff is just nonsense. +.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point. +(More precisely, overflow can happen only when the maximum value +of the exponent is smaller than the number of mantissa bits. +For the IEEE-754 standard 32-bit and 64-bit floating-point numbers +the maximum value of the exponent is 127 (respectively, 1023), +and the number of mantissa bits +including the implicit bit +is 24 (respectively, 53).) +.PP +The integral value returned by these functions may be too large +to store in an integer type +.RI ( int , +.IR long , +etc.). +To avoid an overflow, which will produce undefined results, +an application should perform a range check on the returned value +before assigning it to an integer type. +.SH SEE ALSO +.BR floor (3), +.BR lrint (3), +.BR nearbyint (3), +.BR rint (3), +.BR round (3), +.BR trunc (3) diff --git a/upstream/opensuse-leap-15-6/man3/cexp.3 b/upstream/opensuse-leap-15-6/man3/cexp.3 new file mode 100644 index 00000000..06e94883 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cexp.3 @@ -0,0 +1,61 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cexp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cexp, cexpf, cexpl \- complex exponential function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cexp(double complex " z ); +.BI "float complex cexpf(float complex " z ); +.BI "long double complex cexpl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate e (2.71828..., the base of natural logarithms) +raised to the power of +.IR z . +.PP +One has: +.PP +.in +4n +.EX +cexp(I * z) = ccos(z) + I * csin(z) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cexp (), +.BR cexpf (), +.BR cexpl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cexp2 (3), +.BR clog (3), +.BR cpow (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/cexp2.3 b/upstream/opensuse-leap-15-6/man3/cexp2.3 new file mode 100644 index 00000000..10ed2c68 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cexp2.3 @@ -0,0 +1,31 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cexp2 3 2022-12-04 "Linux man-pages 6.04" +.SH NAME +cexp2, cexp2f, cexp2l \- base-2 exponent of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cexp2(double complex " z ); +.BI "float complex cexp2f(float complex " z ); +.BI "long double complex cexp2l(long double complex " z ); +.fi +.SH DESCRIPTION +The function returns 2 raised to the power of +.IR z . +.SH STANDARDS +These function names are reserved for future use in C99. +.PP +As at glibc 2.31, these functions are not provided in glibc. +.\" But reserved in NAMESPACE. +.SH SEE ALSO +.BR cabs (3), +.BR cexp (3), +.BR clog10 (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/cfree.3 b/upstream/opensuse-leap-15-6/man3/cfree.3 new file mode 100644 index 00000000..754afa40 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cfree.3 @@ -0,0 +1,135 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH cfree 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cfree \- free allocated memory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.PP +.B "#include " +.PP +/* In SunOS 4 */ +.BI "int cfree(void *" ptr ); +.PP +/* In glibc or FreeBSD libcompat */ +.BI "void cfree(void *" ptr ); +.PP +/* In SCO OpenServer */ +.BI "void cfree(char " ptr [. size " * ." num "], unsigned int " num ", \ +unsigned int " size ); +.PP +/* In Solaris watchmalloc.so.1 */ +.BI "void cfree(void " ptr [. elsize " * ." nelem "], size_t " nelem ", \ +size_t " elsize ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR cfree (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +This function should never be used. +Use +.BR free (3) +instead. +Starting with glibc 2.26, it has been removed from glibc. +.SS 1-arg cfree +In glibc, the function +.BR cfree () +is a synonym for +.BR free (3), +"added for compatibility with SunOS". +.PP +Other systems have other functions with this name. +The declaration is sometimes in +.I +and sometimes in +.IR . +.SS 3-arg cfree +Some SCO and Solaris versions have malloc libraries with a 3-argument +.BR cfree (), +apparently as an analog to +.BR calloc (3). +.PP +If you need it while porting something, add +.PP +.in +4n +.EX +#define cfree(p, n, s) free((p)) +.EE +.in +.PP +to your file. +.PP +A frequently asked question is "Can I use +.BR free (3) +to free memory allocated with +.BR calloc (3), +or do I need +.BR cfree ()?" +Answer: use +.BR free (3). +.PP +An SCO manual writes: "The cfree routine is provided for compliance +to the iBCSe2 standard and simply calls free. +The num and size +arguments to cfree are not used." +.SH RETURN VALUE +The SunOS version of +.BR cfree () +(which is a synonym for +.BR free (3)) +returns 1 on success and 0 on failure. +In case of error, +.I errno +is set to +.BR EINVAL : +the value of +.I ptr +was not a pointer to a block previously allocated by +one of the routines in the +.BR malloc (3) +family. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cfree () +T} Thread safety MT-Safe /* In glibc */ +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The 3-argument version of +.BR cfree () +as used by SCO conforms to the iBCSe2 standard: +Intel386 Binary Compatibility Specification, Edition 2. +.SH STANDARDS +None. +.SH HISTORY +.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112 +Removed in glibc 2.26. +.SH SEE ALSO +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/cimag.3 b/upstream/opensuse-leap-15-6/man3/cimag.3 new file mode 100644 index 00000000..3e0cb07e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cimag.3 @@ -0,0 +1,61 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cimag 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cimag, cimagf, cimagl \- get imaginary part of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double cimag(double complex " z ); +.BI "float cimagf(float complex " z ); +.BI "long double cimagl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions return the imaginary part of the complex number +.IR z . +.PP +One has: +.PP +.in +4n +.EX +z = creal(z) + I * cimag(z) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cimag (), +.BR cimagf (), +.BR cimagl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +GCC also supports __imag__. +That is a GNU extension. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR creal (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/circleq.3 b/upstream/opensuse-leap-15-6/man3/circleq.3 new file mode 100644 index 00000000..c0fabdec --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/circleq.3 @@ -0,0 +1,318 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" +.TH CIRCLEQ 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +CIRCLEQ_EMPTY, +CIRCLEQ_ENTRY, +CIRCLEQ_FIRST, +CIRCLEQ_FOREACH, +CIRCLEQ_FOREACH_REVERSE, +CIRCLEQ_HEAD, +CIRCLEQ_HEAD_INITIALIZER, +CIRCLEQ_INIT, +CIRCLEQ_INSERT_AFTER, +CIRCLEQ_INSERT_BEFORE, +CIRCLEQ_INSERT_HEAD, +CIRCLEQ_INSERT_TAIL, +CIRCLEQ_LAST, +CIRCLEQ_LOOP_NEXT, +CIRCLEQ_LOOP_PREV, +CIRCLEQ_NEXT, +CIRCLEQ_PREV, +CIRCLEQ_REMOVE +\- implementation of a doubly linked circular queue +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B CIRCLEQ_ENTRY(TYPE); +.PP +.B CIRCLEQ_HEAD(HEADNAME, TYPE); +.BI "CIRCLEQ_HEAD CIRCLEQ_HEAD_INITIALIZER(CIRCLEQ_HEAD " head ); +.BI "void CIRCLEQ_INIT(CIRCLEQ_HEAD *" head ); +.PP +.BI "int CIRCLEQ_EMPTY(CIRCLEQ_HEAD *" head ); +.PP +.BI "void CIRCLEQ_INSERT_HEAD(CIRCLEQ_HEAD *" head , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "void CIRCLEQ_INSERT_TAIL(CIRCLEQ_HEAD *" head , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "void CIRCLEQ_INSERT_BEFORE(CIRCLEQ_HEAD *" head ", struct TYPE *" listelm , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "void CIRCLEQ_INSERT_AFTER(CIRCLEQ_HEAD *" head ", struct TYPE *" listelm , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.PP +.BI "struct TYPE *CIRCLEQ_FIRST(CIRCLEQ_HEAD *" head ); +.BI "struct TYPE *CIRCLEQ_LAST(CIRCLEQ_HEAD *" head ); +.BI "struct TYPE *CIRCLEQ_PREV(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "struct TYPE *CIRCLEQ_NEXT(struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "struct TYPE *CIRCLEQ_LOOP_PREV(CIRCLEQ_HEAD *" head , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.BI "struct TYPE *CIRCLEQ_LOOP_NEXT(CIRCLEQ_HEAD *" head , +.BI " struct TYPE *" elm ", CIRCLEQ_ENTRY " NAME ); +.PP +.BI "CIRCLEQ_FOREACH(struct TYPE *" var ", CIRCLEQ_HEAD *" head , +.BI " CIRCLEQ_ENTRY " NAME ); +.BI "CIRCLEQ_FOREACH_REVERSE(struct TYPE *" var ", CIRCLEQ_HEAD *" head , +.BI " CIRCLEQ_ENTRY " NAME ); +.PP +.BI "void CIRCLEQ_REMOVE(CIRCLEQ_HEAD *" head ", struct TYPE *" elm , +.BI " CIRCLEQ_ENTRY " NAME ); +.fi +.SH DESCRIPTION +These macros define and operate on doubly linked circular queues. +.PP +In the macro definitions, +.I TYPE +is the name of a user-defined structure, +that must contain a field of type +.IR CIRCLEQ_ENTRY , +named +.IR NAME . +The argument +.I HEADNAME +is the name of a user-defined structure +that must be declared using the macro +.BR CIRCLEQ_HEAD (). +.SS Creation +A circular queue is headed by a structure defined by the +.BR CIRCLEQ_HEAD () +macro. +This structure contains a pair of pointers, +one to the first element in the queue +and the other to the last element in the queue. +The elements are doubly linked +so that an arbitrary element can be removed without traversing the queue. +New elements can be added to the queue +after an existing element, +before an existing element, +at the head of the queue, +or at the end of the queue. +A +.I CIRCLEQ_HEAD +structure is declared as follows: +.PP +.in +4 +.EX +CIRCLEQ_HEAD(HEADNAME, TYPE) head; +.EE +.in +.PP +where +.I struct HEADNAME +is the structure to be defined, and +.I struct TYPE +is the type of the elements to be linked into the queue. +A pointer to the head of the queue can later be declared as: +.PP +.in +4 +.EX +struct HEADNAME *headp; +.EE +.in +.PP +(The names +.I head +and +.I headp +are user selectable.) +.PP +.BR CIRCLEQ_ENTRY () +declares a structure that connects the elements in the queue. +.PP +.BR CIRCLEQ_HEAD_INITIALIZER () +evaluates to an initializer for the queue +.IR head . +.PP +.BR CIRCLEQ_INIT () +initializes the queue referenced by +.IR head . +.PP +.BR CIRCLEQ_EMPTY () +evaluates to true if there are no items on the queue. +.SS Insertion +.BR CIRCLEQ_INSERT_HEAD () +inserts the new element +.I elm +at the head of the queue. +.PP +.BR CIRCLEQ_INSERT_TAIL () +inserts the new element +.I elm +at the end of the queue. +.PP +.BR CIRCLEQ_INSERT_BEFORE () +inserts the new element +.I elm +before the element +.IR listelm . +.PP +.BR CIRCLEQ_INSERT_AFTER () +inserts the new element +.I elm +after the element +.IR listelm . +.SS Traversal +.BR CIRCLEQ_FIRST () +returns the first item on the queue. +.PP +.BR CIRCLEQ_LAST () +returns the last item on the queue. +.PP +.BR CIRCLEQ_PREV () +returns the previous item on the queue, or +.I &head +if this item is the first one. +.PP +.BR CIRCLEQ_NEXT () +returns the next item on the queue, or +.I &head +if this item is the last one. +.PP +.BR CIRCLEQ_LOOP_PREV () +returns the previous item on the queue. +If +.I elm +is the first element on the queue, the last element is returned. +.PP +.BR CIRCLEQ_LOOP_NEXT () +returns the next item on the queue. +If +.I elm +is the last element on the queue, the first element is returned. +.PP +.BR CIRCLEQ_FOREACH () +traverses the queue referenced by +.I head +in the forward direction, assigning each element in turn to +.IR var . +.I var +is set to +.I &head +if the loop completes normally, or if there were no elements. +.PP +.BR CIRCLEQ_FOREACH_REVERSE () +traverses the queue referenced by +.I head +in the reverse direction, +assigning each element in turn to +.IR var . +.SS Removal +.BR CIRCLEQ_REMOVE () +removes the element +.I elm +from the queue. +.SH RETURN VALUE +.BR CIRCLEQ_EMPTY () +returns nonzero if the queue is empty, +and zero if the queue contains at least one entry. +.PP +.BR CIRCLEQ_FIRST (), +.BR CIRCLEQ_LAST (), +.BR CIRCLEQ_LOOP_PREV (), +and +.BR CIRCLEQ_LOOP_NEXT () +return a pointer to the first, last, previous, or next +.I TYPE +structure, respectively. +.PP +.BR CIRCLEQ_PREV (), +and +.BR CIRCLEQ_NEXT () +are similar to their +.BR CIRCLEQ_LOOP_* () +counterparts, +except that if the argument is the first or last element, respectively, +they return +.IR &head . +.PP +.BR CIRCLEQ_HEAD_INITIALIZER () +returns an initializer that can be assigned to the queue +.IR head . +.SH STANDARDS +BSD. +.SH BUGS +.BR CIRCLEQ_FOREACH () +and +.BR CIRCLEQ_FOREACH_REVERSE () +don't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +.BR CIRCLEQ_FOREACH_SAFE () +and +.BR CIRCLEQ_FOREACH_REVERSE_SAFE (), +which are present on the BSDs but are not present in glibc, +fix this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. +.SH EXAMPLES +.\" SRC BEGIN (circleq.c) +.EX +#include +#include +#include +#include + +struct entry { + int data; + CIRCLEQ_ENTRY(entry) entries; /* Queue */ +}; + +CIRCLEQ_HEAD(circlehead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct circlehead head; /* Queue head */ + int i; + + CIRCLEQ_INIT(&head); /* Initialize the queue */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head */ + CIRCLEQ_INSERT_HEAD(&head, n1, entries); + + n1 = malloc(sizeof(struct entry)); /* Insert at the tail */ + CIRCLEQ_INSERT_TAIL(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after */ + CIRCLEQ_INSERT_AFTER(&head, n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); /* Insert before */ + CIRCLEQ_INSERT_BEFORE(&head, n2, n3, entries); + + CIRCLEQ_REMOVE(&head, n2, entries); /* Deletion */ + free(n2); + /* Forward traversal */ + i = 0; + CIRCLEQ_FOREACH(np, &head, entries) + np\->data = i++; + /* Reverse traversal */ + CIRCLEQ_FOREACH_REVERSE(np, &head, entries) + printf("%i\en", np\->data); + /* Queue deletion */ + n1 = CIRCLEQ_FIRST(&head); + while (n1 != (void *)&head) { + n2 = CIRCLEQ_NEXT(n1, entries); + free(n1); + n1 = n2; + } + CIRCLEQ_INIT(&head); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR insque (3), +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/clear.3ncurses b/upstream/opensuse-leap-15-6/man3/clear.3ncurses new file mode 100644 index 00000000..83b3e982 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clear.3ncurses @@ -0,0 +1,118 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_clear.3x,v 1.15 2016/10/15 17:02:31 tom Exp $ +.TH clear 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBerase\fR, +\fBwerase\fR, +\fBclear\fR, +\fBwclear\fR, +\fBclrtobot\fR, +\fBwclrtobot\fR, +\fBclrtoeol\fR, +\fBwclrtoeol\fR \- clear all or part of a \fBcurses\fR window +.ad +.hy +.SH SYNOPSIS +\fB# include \fR +.sp +\fBint erase(void);\fR +.br +\fBint werase(WINDOW *win);\fR +.br +\fBint clear(void);\fR +.br +\fBint wclear(WINDOW *win);\fR +.br +\fBint clrtobot(void);\fR +.br +\fBint wclrtobot(WINDOW *win);\fR +.br +\fBint clrtoeol(void);\fR +.br +\fBint wclrtoeol(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBerase\fR and \fBwerase\fR routines copy blanks to every +position in the window, clearing the screen. +.PP +The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and +\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is +cleared completely on the next call to \fBwrefresh\fR for that window +and repainted from scratch. +.PP +The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the +end of screen. That is, they erase all lines below the cursor in the window. +Also, the current line to the right of the cursor, inclusive, is erased. +.PP +The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line +to the right of the cursor, inclusive, to the end of the current line. +.PP +Blanks created by erasure have the current background rendition (as set +by \fBwbkgdset\fR) merged into them. +.SH RETURN VALUE +All routines return the integer \fBOK\fR on success and \fBERR\fP on failure. +The SVr4.0 manual says "or a +non-negative integer if \fBimmedok\fR is set", but this appears to be an error. +.PP +X/Open defines no error conditions. +In this implementation, +functions using a window pointer parameter return an error if it is null. +.SH NOTES +Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR, +\fBclrtobot\fR, and \fBclrtoeol\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. +.PP +Some historic curses implementations had, as an undocumented feature, the +ability to do the equivalent of \fBclearok(..., 1)\fR by saying +\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under +ncurses. +.PP +This implementation, and others such as Solaris, +sets the current position to 0,0 after erasing +via \fBwerase\fP and \fBwclear\fP. +That fact is not documented in other implementations, +and may not be true of implementations +which were not derived from SVr4 source. +.PP +Not obvious from the description, +most implementations clear the screen after \fBwclear\fP +even for a subwindow or derived window. +If you do not want to clear the screen during the next \fBwrefresh\fP, +use \fBwerase\fP instead. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/clearenv.3 b/upstream/opensuse-leap-15-6/man3/clearenv.3 new file mode 100644 index 00000000..24a86845 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clearenv.3 @@ -0,0 +1,140 @@ +'\" t +.\" Copyright 2001 John Levon +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Additions, aeb, 2001-10-17. +.TH clearenv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clearenv \- clear the environment +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "int clearenv(void);" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR clearenv (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR clearenv () +function clears the environment of all name-value +pairs and sets the value of the external variable +.I environ +to NULL. +After this call, new variables can be added to the environment using +.BR putenv (3) +and +.BR setenv (3). +.SH RETURN VALUE +The +.BR clearenv () +function returns zero on success, and a nonzero +value on failure. +.\" Most versions of UNIX return -1 on error, or do not even have errors. +.\" glibc info and the Watcom C library document "a nonzero value". +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clearenv () +T} Thread safety MT-Unsafe const:env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR putenv () +POSIX.1-2008. +.TP +.BR clearenv () +None. +.SH HISTORY +.TP +.BR putenv () +glibc 2.0. +POSIX.1-2001. +.TP +.BR clearenv () +glibc 2.0. +.PP +Various UNIX variants (DG/UX, HP-UX, QNX, ...). +POSIX.9 (bindings for FORTRAN77). +POSIX.1-1996 did not accept +.BR clearenv () +and +.BR putenv (3), +but changed its mind and scheduled these functions for some +later issue of this standard (see \[sc]B.4.6.1). +However, POSIX.1-2001 +adds only +.BR putenv (3), +and rejected +.BR clearenv (). +.SH NOTES +On systems where +.BR clearenv () +is unavailable, the assignment +.PP +.in +4n +.EX +environ = NULL; +.EE +.in +.PP +will probably do. +.PP +The +.BR clearenv () +function may be useful in security-conscious applications that want to +precisely control the environment that is passed to programs +executed using +.BR exec (3). +The application would do this by first clearing the environment +and then adding select environment variables. +.PP +Note that the main effect of +.BR clearenv () +is to adjust the value of the pointer +.BR environ (7); +this function does not erase the contents of the buffers +containing the environment definitions. +.PP +The DG/UX and Tru64 man pages write: If +.I environ +has been modified by anything other than the +.BR putenv (3), +.BR getenv (3), +or +.BR clearenv () +functions, then +.BR clearenv () +will return an error and the process environment will remain unchanged. +.\" .LP +.\" HP-UX has a ENOMEM error return. +.SH SEE ALSO +.BR getenv (3), +.BR putenv (3), +.BR setenv (3), +.BR unsetenv (3), +.BR environ (7) diff --git a/upstream/opensuse-leap-15-6/man3/clock.3 b/upstream/opensuse-leap-15-6/man3/clock.3 new file mode 100644 index 00000000..3d360b91 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clock.3 @@ -0,0 +1,104 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 21:27:01 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 14 Jun 2002, Michael Kerrisk +.\" Added notes on differences from other UNIX systems with respect to +.\" waited-for children. +.TH clock 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clock \- determine processor time +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B clock_t clock(void); +.fi +.SH DESCRIPTION +The +.BR clock () +function returns an approximation of processor time used by the program. +.SH RETURN VALUE +The value returned is the CPU time used so far as a +.IR clock_t ; +to get the number of seconds used, divide by +.BR CLOCKS_PER_SEC . +If the processor time used is not available or its value cannot +be represented, the function returns the value +.IR (clock_t)\ \-1 . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clock () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +XSI requires that +.B CLOCKS_PER_SEC +equals 1000000 independent +of the actual resolution. +.PP +On several other implementations, +the value returned by +.BR clock () +also includes the times of any children whose status has been +collected via +.BR wait (2) +(or another wait-type call). +Linux does not include the times of waited-for children in the +value returned by +.BR clock (). +.\" 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 +The +.BR times (2) +function, which explicitly returns (separate) information about the +caller and its children, may be preferable. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.PP +In glibc 2.17 and earlier, +.BR clock () +was implemented on top of +.BR times (2). +For improved accuracy, +since glibc 2.18, it is implemented on top of +.BR clock_gettime (2) +(using the +.B CLOCK_PROCESS_CPUTIME_ID +clock). +.SH NOTES +The C standard allows for arbitrary values at the start of the program; +subtract the value returned from a call to +.BR clock () +at the start of the program to get maximum portability. +.PP +Note that the time can wrap around. +On a 32-bit system where +.B CLOCKS_PER_SEC +equals 1000000 this function will return the same +value approximately every 72 minutes. +.SH SEE ALSO +.BR clock_gettime (2), +.BR getrusage (2), +.BR times (2) diff --git a/upstream/opensuse-leap-15-6/man3/clock_getcpuclockid.3 b/upstream/opensuse-leap-15-6/man3/clock_getcpuclockid.3 new file mode 100644 index 00000000..d8798218 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clock_getcpuclockid.3 @@ -0,0 +1,158 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH clock_getcpuclockid 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clock_getcpuclockid \- obtain ID of a process CPU-time clock +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ), +since glibc 2.17 +.PP +Before glibc 2.17, +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.B #include +.nf +.PP +.BI "int clock_getcpuclockid(pid_t " pid ", clockid_t *" clockid ); +.fi +.PP +.ad l +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR clock_getcpuclockid (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR clock_getcpuclockid () +function obtains the ID of the CPU-time clock of the process whose ID is +.IR pid , +and returns it in the location pointed to by +.IR clockid . +If +.I pid +is zero, then the clock ID of the CPU-time clock +of the calling process is returned. +.SH RETURN VALUE +On success, +.BR clock_getcpuclockid () +returns 0; +on error, it returns one of the positive error numbers listed in ERRORS. +.SH ERRORS +.TP +.B ENOSYS +The kernel does not support obtaining the per-process +CPU-time clock of another process, and +.I pid +does not specify the calling process. +.TP +.B EPERM +The caller does not have permission to access +the CPU-time clock of the process specified by +.IR pid . +(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 +.B ESRCH +There is no process with the ID +.IR pid . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clock_getcpuclockid () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.SH NOTES +Calling +.BR clock_gettime (2) +with the clock ID obtained by a call to +.BR clock_getcpuclockid () +with a +.I pid +of 0, +is the same as using the clock ID +.BR CLOCK_PROCESS_CPUTIME_ID . +.SH EXAMPLES +The example program below obtains the +CPU-time clock ID of the process whose ID is given on the command line, +and then uses +.BR clock_gettime (2) +to obtain the time on that clock. +An example run is the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out 1" " # Show CPU clock of init process" +CPU\-time clock for PID 1 is 2.213466748 seconds +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (clock_getcpuclockid.c) +.EX +#define _XOPEN_SOURCE 600 +#include +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + clockid_t clockid; + struct timespec ts; + + if (argc != 2) { + fprintf(stderr, "%s \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 +.\" SRC END +.SH SEE ALSO +.BR clock_getres (2), +.BR timer_create (2), +.BR pthread_getcpuclockid (3), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/clog.3 b/upstream/opensuse-leap-15-6/man3/clog.3 new file mode 100644 index 00000000..caf1fc3f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clog.3 @@ -0,0 +1,74 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH clog 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clog, clogf, clogl \- natural logarithm of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex clog(double complex " z ); +.BI "float complex clogf(float complex " z ); +.BI "long double complex clogl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex natural logarithm of +.IR z , +with a branch cut along the negative real axis. +.PP +The logarithm +.BR clog () +is the inverse function of the exponential +.BR cexp (3). +Thus, if \fIy\ =\ clog(z)\fP, then \fIz\ =\ cexp(y)\fP. +The imaginary part of +.I y +is chosen in the interval [\-pi,pi]. +.PP +One has: +.PP +.in +4n +.EX +clog(z) = log(cabs(z)) + I * carg(z) +.EE +.in +.PP +Note that +.I z +close to zero will cause an overflow. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clog (), +.BR clogf (), +.BR clogl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cexp (3), +.BR clog10 (3), +.BR clog2 (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/clog10.3 b/upstream/opensuse-leap-15-6/man3/clog10.3 new file mode 100644 index 00000000..87e7113f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clog10.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH clog10 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clog10, clog10f, clog10l \- base-10 logarithm of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "double complex clog10(double complex " z ); +.BI "float complex clog10f(float complex " z ); +.BI "long double complex clog10l(long double complex " z ); +.fi +.SH DESCRIPTION +The call +.I clog10(z) +is equivalent to: +.PP +.in +4n +.EX +clog(z)/log(10) +.EE +.in +.PP +or equally: +.PP +.in +4n +.EX +log10(cabs(c)) + I * carg(c) / log(10) +.EE +.in +.PP +The other functions perform the same task for +.I float +and +.IR "long double" . +.PP +Note that +.I z +close to zero will cause an overflow. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clog10 (), +.BR clog10f (), +.BR clog10l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.PP +The identifiers are reserved for future use in C99 and C11. +.SH SEE ALSO +.BR cabs (3), +.BR cexp (3), +.BR clog (3), +.BR clog2 (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/clog2.3 b/upstream/opensuse-leap-15-6/man3/clog2.3 new file mode 100644 index 00000000..e727a3fd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/clog2.3 @@ -0,0 +1,45 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH clog2 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clog2, clog2f, clog2l \- base-2 logarithm of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex clog2(double complex " z ); +.BI "float complex clog2f(float complex " z ); +.BI "long double complex clog2l(long double complex " z ); +.fi +.SH DESCRIPTION +The call +.I clog2(z) +is equivalent to +.IR clog(z)/log(2) . +.PP +The other functions perform the same task for +.I float +and +.IR "long double" . +.PP +Note that +.I z +close to zero will cause an overflow. +.SH STANDARDS +None. +.SH HISTORY +These function names are reserved for future use in C99. +.PP +Not yet in glibc, as at glibc 2.19. +.\" But reserved in NAMESPACE. +.SH SEE ALSO +.BR cabs (3), +.BR cexp (3), +.BR clog (3), +.BR clog10 (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/closedir.3 b/upstream/opensuse-leap-15-6/man3/closedir.3 new file mode 100644 index 00000000..8a7da511 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/closedir.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH closedir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +closedir \- close a directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int closedir(DIR *" dirp ); +.fi +.SH DESCRIPTION +The +.BR closedir () +function closes the directory stream associated with +.IR dirp . +A successful call to +.BR closedir () +also closes the underlying file descriptor associated with +.IR dirp . +The directory stream descriptor +.I dirp +is not available +after this call. +.SH RETURN VALUE +The +.BR closedir () +function returns 0 on success. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +Invalid directory stream descriptor +.IR dirp . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR closedir () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR close (2), +.BR opendir (3), +.BR readdir (3), +.BR rewinddir (3), +.BR scandir (3), +.BR seekdir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/cmsg.3 b/upstream/opensuse-leap-15-6/man3/cmsg.3 new file mode 100644 index 00000000..435e2089 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cmsg.3 @@ -0,0 +1,266 @@ +.\" This man page is Copyright (C) 1999 Andi Kleen . +.\" +.\" %%%LICENSE_START(VERBATIM_ONE_PARA) +.\" Permission is granted to distribute possibly modified copies +.\" of this page provided the header is included verbatim, +.\" and in case of nontrivial modification author and date +.\" of the modification is added to the header. +.\" %%%LICENSE_END +.\" +.\" $Id: cmsg.3,v 1.8 2000/12/20 18:10:31 ak Exp $ +.TH CMSG 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- access ancillary data +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *" msgh ); +.BI "struct cmsghdr *CMSG_NXTHDR(struct msghdr *" msgh , +.BR " struct cmsghdr *" cmsg ); +.BI "size_t CMSG_ALIGN(size_t " length ); +.BI "size_t CMSG_SPACE(size_t " length ); +.BI "size_t CMSG_LEN(size_t " length ); +.BI "unsigned char *CMSG_DATA(struct cmsghdr *" cmsg ); +.fi +.SH DESCRIPTION +These macros are used to create and access control messages (also called +ancillary data) that are not a part of the socket payload. +This control information may +include the interface the packet was received on, various rarely used header +fields, an extended error description, a set of file descriptors, or UNIX +credentials. +For instance, control messages can be used to send +additional header fields such as IP options. +Ancillary data is sent by calling +.BR sendmsg (2) +and received by calling +.BR recvmsg (2). +See their manual pages for more information. +.PP +Ancillary data is a sequence of +.I cmsghdr +structures with appended data. +See the specific protocol man pages for the available control message types. +The maximum ancillary buffer size allowed per socket can be set using +.IR /proc/sys/net/core/optmem_max ; +see +.BR socket (7). +.PP +The +.I cmsghdr +structure is defined as follows: +.PP +.in +4n +.EX +struct cmsghdr { + size_t cmsg_len; /* Data byte count, including header + (type is socklen_t in POSIX) */ + int cmsg_level; /* Originating protocol */ + int cmsg_type; /* Protocol\-specific type */ +/* followed by + unsigned char cmsg_data[]; */ +}; +.EE +.in +.PP +The sequence of +.I cmsghdr +structures should never be accessed directly. +Instead, use only the following macros: +.TP +.BR CMSG_FIRSTHDR () +returns a pointer to the first +.I cmsghdr +in the ancillary +data buffer associated with the passed +.IR msghdr . +It returns NULL if there isn't enough space for a +.I cmsghdr +in the buffer. +.TP +.BR CMSG_NXTHDR () +returns the next valid +.I cmsghdr +after the passed +.IR cmsghdr . +It returns NULL when there isn't enough space left in the buffer. +.IP +When initializing a buffer that will contain a series of +.I cmsghdr +structures (e.g., to be sent with +.BR sendmsg (2)), +that buffer should first be zero-initialized +to ensure the correct operation of +.BR CMSG_NXTHDR (). +.TP +.BR CMSG_ALIGN (), +given a length, returns it including the required alignment. +This is a +constant expression. +.TP +.BR CMSG_SPACE () +returns the number of bytes an ancillary element with payload of the +passed data length occupies. +This is a constant expression. +.TP +.BR CMSG_DATA () +returns a pointer to the data portion of a +.IR cmsghdr . +The pointer returned cannot be assumed to be suitably aligned for +accessing arbitrary payload data types. +Applications should not cast it to a pointer type matching the payload, +but should instead use +.BR memcpy (3) +to copy data to or from a suitably declared object. +.TP +.BR CMSG_LEN () +returns the value to store in the +.I cmsg_len +member of the +.I cmsghdr +structure, taking into account any necessary +alignment. +It takes the data length as an argument. +This is a constant +expression. +.PP +To create ancillary data, first initialize the +.I msg_controllen +member of the +.I msghdr +with the length of the control message buffer. +Use +.BR CMSG_FIRSTHDR () +on the +.I msghdr +to get the first control message and +.BR CMSG_NXTHDR () +to get all subsequent ones. +In each control message, initialize +.I cmsg_len +(with +.BR CMSG_LEN ()), +the other +.I cmsghdr +header fields, and the data portion using +.BR CMSG_DATA (). +Finally, the +.I msg_controllen +field of the +.I msghdr +should be set to the sum of the +.BR CMSG_SPACE () +of the length of +all control messages in the buffer. +For more information on the +.IR msghdr , +see +.BR recvmsg (2). +.SH VERSIONS +For portability, ancillary data should be accessed using only the macros +described here. +.PP +In Linux, +.BR CMSG_LEN (), +.BR CMSG_DATA (), +and +.BR CMSG_ALIGN () +are constant expressions (assuming their argument is constant), +meaning that these values can be used to declare the size of global variables. +This may not be portable, however. +.SH STANDARDS +.TP +.BR CMSG_FIRSTHDR () +.TQ +.BR CMSG_NXTHDR () +.TQ +.BR CMSG_DATA () +POSIX.1-2008. +.TP +.BR CMSG_SPACE () +.TQ +.BR CMSG_LEN () +.TQ +.BR CMSG_ALIGN () +Linux. +.SH HISTORY +This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite, +the IPv6 advanced API described in RFC\ 2292 and SUSv2. +.PP +.BR CMSG_SPACE () +and +.BR CMSG_LEN () +.\" https://www.austingroupbugs.net/view.php?id=978#c3242 +will be included in the next POSIX release (Issue 8). +.SH EXAMPLES +This code looks for the +.B IP_TTL +option in a received ancillary buffer: +.PP +.in +4n +.EX +struct msghdr msgh; +struct cmsghdr *cmsg; +int received_ttl; + +/* Receive auxiliary data in msgh */ + +for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL; + cmsg = CMSG_NXTHDR(&msgh, cmsg)) { + if (cmsg\->cmsg_level == IPPROTO_IP + && cmsg\->cmsg_type == IP_TTL) { + memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl)); + break; + } +} + +if (cmsg == NULL) { + /* Error: IP_TTL not enabled or small buffer or I/O error */ +} +.EE +.in +.PP +The code below passes an array of file descriptors over a +UNIX domain socket using +.BR SCM_RIGHTS : +.PP +.in +4n +.EX +struct msghdr msg = { 0 }; +struct cmsghdr *cmsg; +int myfds[NUM_FD]; /* Contains the file descriptors to pass */ +char iobuf[1]; +struct iovec io = { + .iov_base = iobuf, + .iov_len = sizeof(iobuf) +}; +union { /* Ancillary data buffer, wrapped in a union + in order to ensure it is suitably aligned */ + char buf[CMSG_SPACE(sizeof(myfds))]; + struct cmsghdr align; +} u; + +msg.msg_iov = &io; +msg.msg_iovlen = 1; +msg.msg_control = u.buf; +msg.msg_controllen = sizeof(u.buf); +cmsg = CMSG_FIRSTHDR(&msg); +cmsg\->cmsg_level = SOL_SOCKET; +cmsg\->cmsg_type = SCM_RIGHTS; +cmsg\->cmsg_len = CMSG_LEN(sizeof(myfds)); +memcpy(CMSG_DATA(cmsg), myfds, sizeof(myfds)); +.EE +.in +.PP +For a complete code example that shows passing of file descriptors +over a UNIX domain socket, see +.BR seccomp_unotify (2). +.SH SEE ALSO +.BR recvmsg (2), +.BR sendmsg (2) +.PP +RFC\ 2292 diff --git a/upstream/opensuse-leap-15-6/man3/color.3ncurses b/upstream/opensuse-leap-15-6/man3/color.3ncurses new file mode 100644 index 00000000..e3a8c0f6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/color.3ncurses @@ -0,0 +1,430 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_color.3x,v 1.53 2017/11/20 01:03:45 tom Exp $ +.TH color 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.ds n 5 +.na +.hy 0 +.SH NAME +\fBstart_color\fR, +\fBhas_colors\fR, +\fBcan_change_color\fR, +\fBinit_pair\fR, +\fBinit_color\fR, +\fBcolor_content\fR, +\fBpair_content\fR, +\fBreset_color_pairs\fR, +\fBCOLOR_PAIR\fR, +\fBPAIR_NUMBER\fR \- \fBcurses\fR color manipulation routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint start_color(void);\fR +.sp +\fBbool has_colors(void);\fR +.br +\fBbool can_change_color(void);\fR +.sp +\fBint init_pair(short pair, short f, short b);\fR +.br +\fBint init_color(short color, short r, short g, short b);\fR +.br +/* extensions */ +.br +\fBint init_extended_pair(int pair, int f, int b);\fR +.br +\fBint init_extended_color(int color, int r, int g, int b);\fR +.sp +\fBint color_content(short color, short *r, short *g, short *b);\fR +.br +\fBint pair_content(short pair, short *f, short *b);\fR +.br +/* extensions */ +.br +\fBint extended_color_content(int color, int *r, int *g, int *b);\fR +.br +\fBint extended_pair_content(int pair, int *f, int *b);\fR +.sp +/* extensions */ +.br +\fBvoid reset_color_pairs(void);\fR +.sp +\fBint COLOR_PAIR(int n);\fR +.br +\fBPAIR_NUMBER(\fR\fIattrs\fR\fB);\fP +.br +.SH DESCRIPTION +.SS Overview +\fBcurses\fR supports color attributes on terminals with that capability. +To use these routines \fBstart_color\fR must be called, usually right after +\fBinitscr\fR. +Colors are always used in pairs (referred to as color-pairs). +A color-pair consists of a foreground color (for characters) and a background +color (for the blank field on which the characters are displayed). +A programmer initializes a color-pair with the routine \fBinit_pair\fR. +After it has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR) +can be used to convert the pair to a video attribute. +.PP +If a terminal is capable of redefining colors, the programmer can use the +routine \fBinit_color\fR to change the definition of a color. +The routines \fBhas_colors\fR and \fBcan_change_color\fR +return \fBTRUE\fR or \fBFALSE\fR, +depending on whether the terminal has color capabilities and whether the +programmer can change the colors. +The routine \fBcolor_content\fR allows a +programmer to extract the amounts of red, green, and blue components in an +initialized color. +The routine \fBpair_content\fR allows a programmer to find +out how a given color-pair is currently defined. +.SS Color Rendering +The \fBcurses\fP library combines these inputs to produce the +actual foreground and background colors shown on the screen: +.bP +per-character video attributes (e.g., via \fBwaddch\fP), +.bP +the window attribute (e.g., by \fBwattrset\fP), and +.bP +the background character (e.g., \fBwbkgdset\fP). +.PP +Per-character and window attributes are usually set by a parameter containing +video attributes including a color pair value. +Some functions such as \fBwattr_set\fP use a separate parameter which +is the color pair number. +.PP +The background character is a special case: it includes a character value, +just as if it were passed to \fBwaddch\fP. +.PP +The \fBcurses\fP library does the actual work of combining these color +pairs in an internal function called from \fBwaddch\fP: +.bP +If the parameter passed to \fBwaddch\fP is \fIblank\fP, +and it uses the special color pair 0, +.RS +.bP +\fBcurses\fP next checks the window attribute. +.bP +If the window attribute does not use color pair 0, +\fBcurses\fP uses the color pair from the window attribute. +.bP +Otherwise, \fBcurses\fP uses the background character. +.RE +.bP +If the parameter passed to \fBwaddch\fP is \fInot blank\fP, +or it does not use the special color pair 0, +\fBcurses\fP prefers the color pair from the parameter, +if it is nonzero. +Otherwise, it tries the window attribute next, and finally the +background character. +.PP +Some \fBcurses\fP functions such as \fBwprintw\fP call \fBwaddch\fP. +Those do not combine its parameter with a color pair. +Consequently those calls use only the window attribute or +the background character. +.SH CONSTANTS +.PP +In \fB\fR the following macros are defined. +These are the standard colors (ISO-6429). +\fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default +background color for all terminals. +.PP +.nf + \fBCOLOR_BLACK\fR + \fBCOLOR_RED\fR + \fBCOLOR_GREEN\fR + \fBCOLOR_YELLOW\fR + \fBCOLOR_BLUE\fR + \fBCOLOR_MAGENTA\fR + \fBCOLOR_CYAN\fR + \fBCOLOR_WHITE\fR +.fi +.PP +Some terminals support more than the eight (8) \*(``ANSI\*('' colors. +There are no standard names for those additional colors. +.SH VARIABLES +.SS COLORS +is initialized by \fBstart_color\fP to the maximum number of colors +the terminal can support. +.SS COLOR_PAIRS +is initialized by \fBstart_color\fP to the maximum number of color pairs +the terminal can support. +.SH FUNCTIONS +.SS start_color +The \fBstart_color\fR routine requires no arguments. +It must be called if the programmer wants to use colors, and before any other +color manipulation routine is called. +It is good practice to call this routine right after \fBinitscr\fR. +\fBstart_color\fR does this: +.bP +It initializes two global variables, \fBCOLORS\fR and +\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors +and color-pairs the terminal can support). +.bP +It initializes the special color pair \fB0\fP to the default foreground +and background colors. +No other color pairs are initialized. +.bP +It restores the colors on the terminal to the values +they had when the terminal was just turned on. +.bP +If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability, +\fBstart_color\fP +initializes its internal table representing the +red, green and blue components of the color palette. +.IP +The components depend on whether the terminal uses +CGA (aka \*(``ANSI\*('') or +HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set). +The table is initialized first for eight basic colors +(black, red, green, yellow, blue, magenta, cyan, and white), +and after that (if the terminal supports more than eight colors) +the components are initialized to \fB1000\fP. +.IP +\fBstart_color\fP does not attempt to set the terminal's color palette +to match its built-in table. +An application may use \fBinit_color\fP to alter the internal table +along with the terminal's color. +.PP +These limits apply to color values and color pairs. +Values outside these limits are not legal, and may result in a runtime error: +.bP +\fBCOLORS\fP corresponds to the terminal database's \fBmax_colors\fR capability, +(see \fBterminfo\fR(\*n)). +.bP +color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP, +inclusive (including \fB0\fP and \fBCOLORS\-1\fP). +.bP +a special color value \fB\-1\fP is used in certain extended functions +to denote the \fIdefault color\fP (see \fBuse_default_colors\fP). +.bP +\fBCOLOR_PAIRS\fP corresponds to the terminal database's \fBmax_pairs\fP capability, +(see \fBterminfo\fR(\*n)). +.bP +legal color pair values are in the range \fB1\fP to \fBCOLOR_PAIRS\-1\fP, +inclusive. +.bP +color pair \fB0\fP is special; it denotes \*(``no color\*(''. +.IP +Color pair \fB0\fP is assumed to be white on black, +but is actually whatever the terminal implements before color is initialized. +It cannot be modified by the application. +.SS has_colors +.PP +The \fBhas_colors\fR routine requires no arguments. +It returns \fBTRUE\fR if +the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR. +This routine facilitates writing terminal-independent programs. +For example, a programmer can use it to decide +whether to use color or some other video attribute. +.SS can_change_color +.PP +The \fBcan_change_color\fR routine requires no arguments. +It returns \fBTRUE\fR if the terminal supports colors +and can change their definitions; +other, it returns \fBFALSE\fR. +This routine facilitates writing terminal-independent programs. +.SS init_pair +.PP +The \fBinit_pair\fR routine changes the definition of a color-pair. +It takes three arguments: the number of the color-pair to be changed, the foreground +color number, and the background color number. +For portable applications: +.bP +The first argument must be a legal color pair value. +If default colors are used (see \fBuse_default_colors\fP) +the upper limit is adjusted to allow for extra pairs which use +a default color in foreground and/or background. +.bP +The second and third arguments must be legal color values. +.PP +If the color-pair was previously initialized, +the screen is refreshed and all occurrences of that color-pair +are changed to the new definition. +.PP +As an extension, ncurses allows you to set color pair \fB0\fP via +the \fBassume_default_colors\fR(3X) routine, or to specify the use of +default colors (color number \fB\-1\fR) if you first invoke the +\fBuse_default_colors\fR(3X) routine. +.PP +The extension \fBreset_color_pairs\fP tells ncurses to discard all +of the color-pair information which was set with \fBinit_pair\fP. +It also touches the current- and standard-screens, allowing an application to +switch color palettes rapidly. +.SS init_color +.PP +The \fBinit_color\fR routine changes the definition of a color. +It takes four arguments: the number of the color to be changed followed by three RGB values +(for the amounts of red, green, and blue components). +.bP +The first argument must be a legal color value; +default colors are not allowed here. +(See the section \fBColors\fR for the default color index.) +.bP +Each of the last three arguments +must be a value in the range \fB0\fP through \fB1000\fP. +.PP +When \fBinit_color\fR is used, all +occurrences of that color on the screen immediately change to the new +definition. +.SS color_content +.PP +The \fBcolor_content\fR routine gives programmers a way to find the intensity +of the red, green, and blue (RGB) components in a color. +It requires four arguments: the color number, and three addresses +of \fBshort\fRs for storing +the information about the amounts of red, green, and blue components in the +given color. +.bP +The first argument must be a legal color value, i.e., +\fB0\fP through \fBCOLORS\-1\fP, inclusive. +.bP +The values that are stored at the addresses pointed to by the +last three arguments are in the range +\fB0\fP (no component) through \fB1000\fP (maximum amount of component), inclusive. +.SS pair_content +.PP +The \fBpair_content\fR routine allows programmers to find out what colors a +given color-pair consists of. +It requires three arguments: the color-pair +number, and two addresses of \fBshort\fRs for storing the foreground and the +background color numbers. +.bP +The first argument must be a legal color value, +i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fR, inclusive. +.bP +The values that are stored at the addresses pointed +to by the second and third arguments are in the +range \fB0\fP through \fBCOLORS\fR, inclusive. +.SS PAIR_NUMBER +.PP +\fBPAIR_NUMBER(\fR\fIattrs\fR) extracts the color +value from its \fIattrs\fP parameter and returns it as a color pair number. +.SS COLOR_PAIR +Its inverse \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR converts a color pair number +to an attribute. +Attributes can hold color pairs in the range 0 to 255. +If you need a color pair larger than that, you must use functions +such as \fBattr_set\fP (which pass the color pair as a separate parameter) +rather than the legacy functions such as \fBattrset\fP. +.SH RETURN VALUE +The routines \fBcan_change_color\fR and \fBhas_colors\fR return \fBTRUE\fR +or \fBFALSE\fR. +.PP +All other routines return the integer \fBERR\fR upon failure and an \fBOK\fR +(SVr4 specifies only \*(``an integer value other than \fBERR\fR\*('') upon successful +completion. +.PP +X/Open defines no error conditions. +This implementation will return \fBERR\fR on attempts to +use color values outside the range \fB0\fP to \fBCOLORS\fP\-1 +(except for the default colors extension), +or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP. +Color values used in \fBinit_color\fP must be in the range \fB0\fP to \fB1000\fP. +An error is returned from all functions +if the terminal has not been initialized. +An error is returned from secondary functions such as \fBinit_pair\fP +if \fBstart_color\fP was not called. +.RS 3 +.TP 5 +\fBinit_color\fP +returns an error if the terminal does not support +this feature, e.g., if the \fBinitialize_color\fP capability is absent +from the terminal description. +.TP 5 +\fBstart_color\fP +returns an error if the color table cannot be allocated. +.RE +.SH NOTES +In the \fBncurses\fR implementation, there is a separate color activation flag, +color palette, color pairs table, and associated \fBCOLORS\fP and \fBCOLOR_PAIRS\fP counts +for each screen; the \fBstart_color\fR function only affects the current +screen. +The SVr4/XSI interface is not really designed with this in mind, and +historical implementations may use a single shared color palette. +.PP +Setting an implicit background color via a color pair affects only +character cells that a character write operation explicitly touches. +To change +the background color used when parts of a window are blanked by erasing or +scrolling operations, see \fBbkgd\fR(3NCURSES). +.PP +Several caveats apply on older x86 machines (e.g., i386, i486) with VGA-compatible graphics: +.bP +COLOR_YELLOW is actually brown. +To get yellow, use COLOR_YELLOW combined with the \fBA_BOLD\fR attribute. +.bP +The A_BLINK attribute should in theory cause the background to go bright. +This often fails to work, and even some cards for which it mostly works +(such as the +Paradise and compatibles) do the wrong thing when you try to set a bright +\*(``yellow\*('' background (you get a blinking yellow foreground instead). +.bP +Color RGB values are not settable. +.SH PORTABILITY +This implementation satisfies XSI Curses's minimum maximums +for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR. +.PP +The \fBinit_pair\fP routine accepts negative values of foreground +and background color to support the \fBuse_default_colors\fR(3X) extension, +but only if that routine has been first invoked. +.PP +The assumption that \fBCOLOR_BLACK\fR is the default +background color for all terminals can be modified using the +\fBassume_default_colors\fR(3X) extension. +.PP +This implementation checks the pointers, +e.g., for the values returned by +\fBcolor_content\fP and \fBpair_content\fP, +and will treat those as optional parameters when null. +.PP +X/Open Curses does not specify a limit for the number of colors and +color pairs which a terminal can support. +However, in its use of \fBshort\fP for the parameters, +it carries over SVr4's implementation detail for the compiled +terminfo database, which uses signed 16-bit numbers. +This implementation provides extended versions of those functions +which use \fBshort\fP parameters, +allowing applications to use larger color- and pair-numbers. +.PP +The \fBreset_color_pairs\fP function is an extension of ncurses. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBattr\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBdefault_colors\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/confstr.3 b/upstream/opensuse-leap-15-6/man3/confstr.3 new file mode 100644 index 00000000..86fdd84d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/confstr.3 @@ -0,0 +1,159 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:53:02 1993 by Rik Faith (faith@cs.unc.edu) +.\" +.\" FIXME Many more values for 'name' are supported, some of which +.\" are documented under 'info libc confstr'. +.\" See for the rest. +.\" These should all be added to this page. +.\" See also the POSIX.1-2001 specification of confstr() +.\" +.TH confstr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +confstr \- get configuration dependent string variables +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t confstr(int " "name" ", char " buf [. size "], size_t " size ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR confstr (): +.nf + _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE +.fi +.SH DESCRIPTION +.BR confstr () +gets the value of configuration-dependent string variables. +.PP +The +.I name +argument is the system variable to be queried. +The following variables are supported: +.TP +.BR _CS_GNU_LIBC_VERSION " (GNU C library only; since glibc 2.3.2)" +A string which identifies the GNU C library version on this system +(e.g., "glibc 2.3.4"). +.TP +.BR _CS_GNU_LIBPTHREAD_VERSION " (GNU C library only; since glibc 2.3.2)" +A string which identifies the POSIX implementation supplied by this +C library (e.g., "NPTL 2.3.4" or "linuxthreads\-0.10"). +.TP +.B _CS_PATH +A value for the +.B PATH +variable which indicates where all the POSIX.2 standard utilities can +be found. +.PP +If +.I buf +is not NULL and +.I size +is not zero, +.BR confstr () +copies the value of the string to +.I buf +truncated to +.I size \- 1 +bytes if necessary, with a null byte (\[aq]\e0\[aq]) as terminator. +This can be detected by comparing the return value of +.BR confstr () +against +.IR size . +.PP +If +.I size +is zero and +.I buf +is NULL, +.BR confstr () +just returns the value as defined below. +.SH RETURN VALUE +If +.I name +is a valid configuration variable, +.BR confstr () +returns the number of bytes (including the terminating null byte) +that would be required to hold the entire value of that variable. +This value may be greater than +.IR size , +which means that the value in +.I buf +is truncated. +.PP +If +.I name +is a valid configuration variable, +but that variable does not have a value, then +.BR confstr () +returns 0. +If +.I name +does not correspond to a valid configuration variable, +.BR confstr () +returns 0, and +.I errno +is set to +.BR EINVAL . +.SH ERRORS +.TP +.B EINVAL +The value of +.I name +is invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR confstr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The following code fragment determines the path where to find +the POSIX.2 system utilities: +.PP +.in +4n +.EX +char *pathbuf; +size_t n; + +n = confstr(_CS_PATH, NULL, (size_t) 0); +pathbuf = malloc(n); +if (pathbuf == NULL) + abort(); +confstr(_CS_PATH, pathbuf, n); +.EE +.in +.SH SEE ALSO +.BR getconf (1), +.BR sh (1), +.BR exec (3), +.BR fpathconf (3), +.BR pathconf (3), +.BR sysconf (3), +.BR system (3) diff --git a/upstream/opensuse-leap-15-6/man3/conj.3 b/upstream/opensuse-leap-15-6/man3/conj.3 new file mode 100644 index 00000000..8b54f623 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/conj.3 @@ -0,0 +1,59 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH conj 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +conj, conjf, conjl \- calculate the complex conjugate +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex conj(double complex " z ); +.BI "float complex conjf(float complex " z ); +.BI "long double complex conjl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions return the complex conjugate value of +.IR z . +That is the value obtained by changing the sign of the imaginary part. +.PP +One has: +.PP +.in +4n +.EX +cabs(z) = csqrt(z * conj(z)) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR conj (), +.BR conjf (), +.BR conjl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR csqrt (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/copysign.3 b/upstream/opensuse-leap-15-6/man3/copysign.3 new file mode 100644 index 00000000..6851312d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/copysign.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH copysign 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +copysign, copysignf, copysignl \- copy sign of a number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double copysign(double " x ", double " y ); +.BI "float copysignf(float " x ", float " y ); +.BI "long double copysignl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR copysign (), +.BR copysignf (), +.BR copysignl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return a value whose absolute value matches that of +.IR x , +but whose sign bit matches that of +.IR y . +.PP +For example, +.I "copysign(42.0,\ \-1.0)" +and +.I "copysign(\-42.0, \-1.0)" +both return \-42.0. +.SH RETURN VALUE +On success, these functions return a value whose magnitude is taken from +.I x +and whose sign is taken from +.IR y . +.PP +If +.I x +is a NaN, +a NaN with the sign bit of +.I y +is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR copysign (), +.BR copysignf (), +.BR copysignl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On architectures where the floating-point formats are not IEEE 754 compliant, +these functions may treat a negative zero as positive. +.SH STANDARDS +C11, POSIX.1-2008. +.PP +This function is defined in IEC 559 (and the appendix with +recommended functions in IEEE 754/IEEE 854). +.SH HISTORY +C99, POSIX.1-2001, 4.3BSD. +.SH SEE ALSO +.BR signbit (3) diff --git a/upstream/opensuse-leap-15-6/man3/cos.3 b/upstream/opensuse-leap-15-6/man3/cos.3 new file mode 100644 index 00000000..9fde0ceb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cos.3 @@ -0,0 +1,121 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH cos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cos, cosf, cosl \- cosine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double cos(double " x ); +.BI "float cosf(float " x ); +.BI "long double cosl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR cosf (), +.BR cosl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the cosine of +.IR x , +where +.I x +is +given in radians. +.SH RETURN VALUE +On success, these functions return the cosine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, +and a NaN is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cos (), +.BR cosf (), +.BR cosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH BUGS +Before glibc 2.10, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6780 +.I errno +to +.B EDOM +when a domain error occurred. +.SH SEE ALSO +.BR acos (3), +.BR asin (3), +.BR atan (3), +.BR atan2 (3), +.BR ccos (3), +.BR sin (3), +.BR sincos (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/cosh.3 b/upstream/opensuse-leap-15-6/man3/cosh.3 new file mode 100644 index 00000000..52eab463 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cosh.3 @@ -0,0 +1,133 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH cosh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cosh, coshf, coshl \- hyperbolic cosine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double cosh(double " x ); +.BI "float coshf(float " x ); +.BI "long double coshl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR coshf (), +.BR coshl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the hyperbolic cosine of +.IR x , +which is defined mathematically as: +.PP +.in +4n +.EX +cosh(x) = (exp(x) + exp(\-x)) / 2 +.EE +.in +.SH RETURN VALUE +On success, these functions return the hyperbolic cosine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 or \-0, 1 is returned. +.PP +If +.I x +is positive infinity or negative infinity, +positive infinity is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.RB + HUGE_VAL , +.RB + HUGE_VALF , +or +.RB + HUGE_VALL , +respectively. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cosh (), +.BR coshf (), +.BR coshl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH BUGS +In glibc 2.3.4 and earlier, +an overflow floating-point +.RB ( FE_OVERFLOW ) +exception is not raised when an overflow occurs. +.SH SEE ALSO +.BR acosh (3), +.BR asinh (3), +.BR atanh (3), +.BR ccos (3), +.BR sinh (3), +.BR tanh (3) diff --git a/upstream/opensuse-leap-15-6/man3/cpow.3 b/upstream/opensuse-leap-15-6/man3/cpow.3 new file mode 100644 index 00000000..b2fa4a5e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cpow.3 @@ -0,0 +1,56 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cpow 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cpow, cpowf, cpowl \- complex power function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cpow(double complex " x ", double complex " z ); +.BI "float complex cpowf(float complex " x ", float complex " z ); +.BI "long double complex cpowl(long double complex " x , +.BI " long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate +.I x +raised to the power +.I z +(with a branch cut for +.I x +along the negative real axis). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cpow (), +.BR cpowf (), +.BR cpowl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR pow (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/cproj.3 b/upstream/opensuse-leap-15-6/man3/cproj.3 new file mode 100644 index 00000000..c123ca58 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cproj.3 @@ -0,0 +1,62 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH cproj 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +cproj, cprojf, cprojl \- project into Riemann Sphere +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex cproj(double complex " z ");" +.BI "float complex cprojf(float complex " z ");" +.BI "long double complex cprojl(long double complex " z ");" +.fi +.SH DESCRIPTION +These functions project a point in the plane onto the surface of a +Riemann Sphere, the one-point compactification of the complex plane. +Each finite point +.I z +projects to +.I z +itself. +Every complex infinite value is projected to a single infinite value, +namely to positive infinity on the real axis. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR cproj (), +.BR cprojf (), +.BR cprojl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.PP +In glibc 2.11 and earlier, the implementation does something different +(a +.I stereographic +projection onto a Riemann Sphere). +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=10401 +.SH SEE ALSO +.BR cabs (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/creal.3 b/upstream/opensuse-leap-15-6/man3/creal.3 new file mode 100644 index 00000000..4c43a754 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/creal.3 @@ -0,0 +1,59 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH creal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +creal, crealf, creall \- get real part of a complex number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double creal(double complex " z ); +.BI "float crealf(float complex " z ); +.BI "long double creall(long double complex " z ); +.fi +.SH DESCRIPTION +These functions return the real part of the complex number +.IR z . +.PP +One has: +.PP +.nf + z = creal(z) + I * cimag(z) +.fi +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR creal (), +.BR crealf (), +.BR creall () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +GCC supports also __real__. +That is a GNU extension. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cimag (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/csin.3 b/upstream/opensuse-leap-15-6/man3/csin.3 new file mode 100644 index 00000000..c566d338 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/csin.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH csin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +csin, csinf, csinl \- complex sine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex csin(double complex " z ); +.BI "float complex csinf(float complex " z ); +.BI "long double complex csinl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex sine of +.IR z . +.PP +The complex sine function is defined as: +.PP +.in +4n +.EX +csin(z) = (exp(i * z) \- exp(\-i * z)) / (2 * i) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR csin (), +.BR csinf (), +.BR csinl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR casin (3), +.BR ccos (3), +.BR ctan (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/csinh.3 b/upstream/opensuse-leap-15-6/man3/csinh.3 new file mode 100644 index 00000000..ed157439 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/csinh.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH csinh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +csinh, csinhf, csinhl \- complex hyperbolic sine +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex csinh(double complex " z ); +.BI "float complex csinhf(float complex " z ); +.BI "long double complex csinhl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex hyperbolic sine of +.IR z . +.PP +The complex hyperbolic sine function is defined as: +.PP +.in +4n +.EX +csinh(z) = (exp(z)\-exp(\-z))/2 +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR csinh (), +.BR csinhf (), +.BR csinhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR casinh (3), +.BR ccosh (3), +.BR ctanh (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/csqrt.3 b/upstream/opensuse-leap-15-6/man3/csqrt.3 new file mode 100644 index 00000000..7495ff86 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/csqrt.3 @@ -0,0 +1,54 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH csqrt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +csqrt, csqrtf, csqrtl \- complex square root +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex csqrt(double complex " z ); +.BI "float complex csqrtf(float complex " z ); +.BI "long double complex csqrtl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex square root of +.IR z , +with a branch cut along the negative real axis. +(That means that \fIcsqrt(\-1+eps*I)\fP will be close to I while +\fIcsqrt(\-1\-eps*I)\fP will be close to \-I, \fIif eps\fP is a small positive +real number.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR csqrt (), +.BR csqrtf (), +.BR csqrtl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR cexp (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/ctan.3 b/upstream/opensuse-leap-15-6/man3/ctan.3 new file mode 100644 index 00000000..9abf900f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ctan.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH ctan 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ctan, ctanf, ctanl \- complex tangent function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex ctan(double complex " z ); +.BI "float complex ctanf(float complex " z ); +.BI "long double complex ctanl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex tangent of +.IR z . +.PP +The complex tangent function is defined as: +.PP +.in +4n +.EX +ctan(z) = csin(z) / ccos(z) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ctan (), +.BR ctanf (), +.BR ctanl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR catan (3), +.BR ccos (3), +.BR csin (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/ctanh.3 b/upstream/opensuse-leap-15-6/man3/ctanh.3 new file mode 100644 index 00000000..130f41cc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ctanh.3 @@ -0,0 +1,61 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH ctanh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ctanh, ctanhf, ctanhl \- complex hyperbolic tangent +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double complex ctanh(double complex " z ); +.BI "float complex ctanhf(float complex " z ); +.BI "long double complex ctanhl(long double complex " z ); +.fi +.SH DESCRIPTION +These functions calculate the complex hyperbolic tangent of +.IR z . +.PP +The complex hyperbolic tangent function is defined +mathematically as: +.PP +.in +4n +.EX +ctanh(z) = csinh(z) / ccosh(z) +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ctanh (), +.BR ctanhf (), +.BR ctanhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR cabs (3), +.BR catanh (3), +.BR ccosh (3), +.BR csinh (3), +.BR complex (7) diff --git a/upstream/opensuse-leap-15-6/man3/ctermid.3 b/upstream/opensuse-leap-15-6/man3/ctermid.3 new file mode 100644 index 00000000..e762bdb7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ctermid.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu) +.TH ctermid 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ctermid \- get controlling terminal name +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.\" POSIX also requires this function to be declared in , +.\" and glibc does so if suitable feature test macros are defined. +.PP +.BI "char *ctermid(char *" "s" ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ctermid (): +.nf + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +.BR ctermid () +returns a string which is the pathname for the current +controlling terminal for this process. +If +.I s +is NULL, +a static buffer is used, otherwise +.I s +points to a buffer used to hold the terminal pathname. +The symbolic constant +.B L_ctermid +is the maximum number of characters in the returned pathname. +.SH RETURN VALUE +The pointer to the pathname. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ctermid () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, Svr4. +.SH BUGS +The returned pathname may not uniquely identify the controlling +terminal; it may, for example, be +.IR /dev/tty . +.PP +It is not assured that the program can open the terminal. +.\" in glibc 2.3.x, x >= 4, the glibc headers threw an error +.\" if ctermid() was given an argument; fixed in glibc 2.4. +.SH SEE ALSO +.BR ttyname (3) diff --git a/upstream/opensuse-leap-15-6/man3/ctime.3 b/upstream/opensuse-leap-15-6/man3/ctime.3 new file mode 100644 index 00000000..79912750 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ctime.3 @@ -0,0 +1,414 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 19:49:27 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Fri Apr 26 12:38:55 MET DST 1996 by Martin Schulze (joey@linux.de) +.\" Modified 2001-11-13, aeb +.\" Modified 2001-12-13, joey, aeb +.\" Modified 2004-11-16, mtk +.\" +.TH ctime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r, +localtime_r \- transform date and time to broken-down time or ASCII +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *asctime(const struct tm *" tm ); +.BI "char *asctime_r(const struct tm *restrict " tm , +.BI " char " buf "[restrict 26]);" +.PP +.BI "char *ctime(const time_t *" timep ); +.BI "char *ctime_r(const time_t *restrict " timep , +.BI " char " buf "[restrict 26]);" +.PP +.BI "struct tm *gmtime(const time_t *" timep ); +.BI "struct tm *gmtime_r(const time_t *restrict " timep , +.BI " struct tm *restrict " result ); +.PP +.BI "struct tm *localtime(const time_t *" timep ); +.BI "struct tm *localtime_r(const time_t *restrict " timep , +.BI " struct tm *restrict " result ); +.PP +.BI "time_t mktime(struct tm *" tm ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR asctime_r (), +.BR ctime_r (), +.BR gmtime_r (), +.BR localtime_r (): +.nf + _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR ctime (), +.BR gmtime (), +and +.BR localtime () +functions all take +an argument of data type \fItime_t\fP, which represents calendar time. +When interpreted as an absolute time value, it represents the number of +seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). +.PP +The +.BR asctime () +and +.BR mktime () +functions both take an argument +representing broken-down time, which is a representation +separated into year, month, day, and so on. +.PP +Broken-down time is stored in the structure +.IR tm , +described in +.BR tm (3type). +.PP +The call +.BI ctime( t ) +is equivalent to +.BI asctime(localtime( t )) \fR. +It converts the calendar time \fIt\fP into a +null-terminated string of the form +.PP +.in +4n +.EX +"Wed Jun 30 21:49:08 1993\en" +.EE +.in +.PP +The abbreviations for the days of the week are "Sun", "Mon", "Tue", "Wed", +"Thu", "Fri", and "Sat". +The abbreviations for the months are "Jan", +"Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", and +"Dec". +The return value points to a statically allocated string which +might be overwritten by subsequent calls to any of the date and time +functions. +The function also sets the external +variables \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP (see +.BR tzset (3)) +with information about the current timezone. +The reentrant version +.BR ctime_r () +does the same, but stores the +string in a user-supplied buffer +which should have room for at least 26 bytes. +It need not +set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP. +.PP +The +.BR gmtime () +function converts the calendar time \fItimep\fP to +broken-down time representation, expressed in Coordinated Universal Time +(UTC). +It may return NULL when the year does not fit into an integer. +The return value points to a statically allocated struct which might be +overwritten by subsequent calls to any of the date and time functions. +The +.BR gmtime_r () +function does the same, but stores the data in a +user-supplied struct. +.PP +The +.BR localtime () +function converts the calendar time \fItimep\fP to +broken-down time representation, +expressed relative to the user's specified timezone. +The function acts as if it called +.BR tzset (3) +and sets the external variables \fItzname\fP with +information about the current timezone, \fItimezone\fP with the difference +between Coordinated Universal Time (UTC) and local standard time in +seconds, and \fIdaylight\fP to a nonzero value if daylight savings +time rules apply during some part of the year. +The return value points to a statically allocated struct which might be +overwritten by subsequent calls to any of the date and time functions. +The +.BR localtime_r () +function does the same, but stores the data in a +user-supplied struct. +It need not set \fItzname\fP, \fItimezone\fP, and \fIdaylight\fP. +.PP +The +.BR asctime () +function converts the broken-down time value +\fItm\fP into a null-terminated string with the same format as +.BR ctime (). +The return value points to a statically allocated string which might be +overwritten by subsequent calls to any of the date and time functions. +The +.BR asctime_r () +function does the same, but stores the string in +a user-supplied buffer which should have room for at least 26 bytes. +.PP +The +.BR mktime () +function converts a broken-down time structure, expressed +as local time, to calendar time representation. +The function ignores +the values supplied by the caller in the +.I tm_wday +and +.I tm_yday +fields. +The value specified in the +.I tm_isdst +field informs +.BR mktime () +whether or not daylight saving time (DST) +is in effect for the time supplied in the +.I tm +structure: +a positive value means DST is in effect; +zero means that DST is not in effect; +and a negative value means that +.BR mktime () +should (use timezone information and system databases to) +attempt to determine whether DST is in effect at the specified time. +.PP +The +.BR mktime () +function modifies the fields of the +.I tm +structure as follows: +.I tm_wday +and +.I tm_yday +are set to values determined from the contents of the other fields; +if structure members are outside their valid interval, they will be +normalized (so that, for example, 40 October is changed into 9 November); +.I tm_isdst +is set (regardless of its initial value) +to a positive value or to 0, respectively, +to indicate whether DST is or is not in effect at the specified time. +Calling +.BR mktime () +also sets the external variable \fItzname\fP with +information about the current timezone. +.PP +If the specified broken-down +time cannot be represented as calendar time (seconds since the Epoch), +.BR mktime () +returns +.I (time_t)\ \-1 +and does not alter the +members of the broken-down time structure. +.SH RETURN VALUE +On success, +.BR gmtime () +and +.BR localtime () +return a pointer to a +.IR "struct\ tm" . +.PP +On success, +.BR gmtime_r () +and +.BR localtime_r () +return the address of the structure pointed to by +.IR result . +.PP +On success, +.BR asctime () +and +.BR ctime () +return a pointer to a string. +.PP +On success, +.BR asctime_r () +and +.BR ctime_r () +return a pointer to the string pointed to by +.IR buf . +.PP +On success, +.BR mktime () +returns the calendar time (seconds since the Epoch), +expressed as a value of type +.IR time_t . +.PP +On error, +.BR mktime () +returns the value +.IR "(time_t)\ \-1" . +The remaining functions return NULL on error. +On error, +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EOVERFLOW +The result cannot be represented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR asctime () +T} Thread safety T{ +MT-Unsafe race:asctime locale +T} +T{ +.BR asctime_r () +T} Thread safety T{ +MT-Safe locale +T} +T{ +.BR ctime () +T} Thread safety T{ +MT-Unsafe race:tmbuf +race:asctime env locale +T} +T{ +.BR ctime_r (), +.BR gmtime_r (), +.BR localtime_r (), +.BR mktime () +T} Thread safety T{ +MT-Safe env locale +T} +T{ +.BR gmtime (), +.BR localtime () +T} Thread safety T{ +MT-Unsafe race:tmbuf env locale +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX doesn't specify the parameters of +.BR ctime_r () +to be +.IR restrict ; +that is specific to glibc. +.PP +In many implementations, including glibc, a 0 in +.I tm_mday +is interpreted as meaning the last day of the preceding month. +.PP +According to POSIX.1-2001, +.BR localtime () +is required to behave as though +.BR tzset (3) +was called, while +.BR localtime_r () +does not have this requirement. +.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/ +For portable code, +.BR tzset (3) +should be called before +.BR localtime_r (). +.SH STANDARDS +.TP +.BR asctime () +.TQ +.BR ctime () +.TQ +.BR gmtime () +.TQ +.BR localtime () +.TQ +.BR mktime () +C11, POSIX.1-2008. +.TP +.BR asctime_r () +.TQ +.BR ctime_r () +.TQ +.BR gmtime_r () +.TQ +.BR localtime_r () +POSIX.1-2008. +.SH HISTORY +.TP +.BR gmtime () +.TQ +.BR localtime () +.TQ +.BR mktime () +C89, POSIX.1-2001. +.TP +.BR asctime () +.TQ +.BR ctime () +C89, POSIX.1-2001. +Marked obsolete in POSIX.1-2008 (recommending +.BR strftime (3)). +.TP +.BR gmtime_r () +.TQ +.BR localtime_r () +POSIX.1-2001. +.TP +.BR asctime_r () +.TQ +.BR ctime_r () +POSIX.1-2001. +Marked obsolete in POSIX.1-2008 (recommending +.BR strftime (3)). +.SH NOTES +The four functions +.BR asctime (), +.BR ctime (), +.BR gmtime (), +and +.BR localtime () +return a pointer to static data and hence are not thread-safe. +The thread-safe versions, +.BR asctime_r (), +.BR ctime_r (), +.BR gmtime_r (), +and +.BR localtime_r (), +are specified by SUSv2. +.PP +POSIX.1-2001 says: +"The +.BR asctime (), +.BR ctime (), +.BR gmtime (), +and +.BR localtime () +functions shall return values in one of two static objects: +a broken-down time structure and an array of type +.IR char . +Execution of any of the functions may overwrite the information returned +in either of these objects by any of the other functions." +This can occur in the glibc implementation. +.SH SEE ALSO +.BR date (1), +.BR gettimeofday (2), +.BR time (2), +.BR utime (2), +.BR clock (3), +.BR difftime (3), +.BR strftime (3), +.BR strptime (3), +.BR timegm (3), +.BR tzset (3), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/curses_variables.3ncurses b/upstream/opensuse-leap-15-6/man3/curses_variables.3ncurses new file mode 100644 index 00000000..a4d32d58 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/curses_variables.3ncurses @@ -0,0 +1,151 @@ +.\"*************************************************************************** +.\" Copyright (c) 2010-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_variables.3x,v 1.9 2017/11/18 23:56:00 tom Exp $ +.TH curses_variables 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.ds n 5 +.na +.hy 0 +.SH NAME +\fBCOLORS\fR, +\fBCOLOR_PAIRS\fR, +\fBCOLS\fR, +\fBESCDELAY\fR, +\fBLINES\fR, +\fBTABSIZE\fR, +\fBcurscr\fR, +\fBnewscr\fR, +\fBstdscr\fR +\- \fBcurses\fR global variables +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBint COLOR_PAIRS;\fR +.br +\fBint COLORS;\fR +.br +\fBint COLS;\fR +.br +\fBint ESCDELAY;\fR +.br +\fBint LINES;\fR +.br +\fBint TABSIZE;\fR +.br +\fBWINDOW * curscr;\fR +.br +\fBWINDOW * newscr;\fR +.br +\fBWINDOW * stdscr;\fR +.fi +.SH DESCRIPTION +This page summarizes variables provided by the \fBcurses\fP library. +A more complete description is given in the \fBcurses\fP(3X) manual page. +.PP +Depending on the configuration, these may be actual variables, +or macros (see \fBthreads\fR(3NCURSES) and \fBopaque\fR(3NCURSES)) +which provide read-only access to \fIcurses\fP's state. +In either case, applications should treat them as read-only to avoid +confusing the library. +.SS COLOR_PAIRS +After initializing curses, this variable contains the number of color pairs +which the terminal can support. +Usually the number of color pairs will be the product \fBCOLORS\fP*\fBCOLORS\fP, +however this is not always true: +.bP +a few terminals use HLS colors, which do not follow this rule +.bP +terminals supporting a large number of colors are limited by the number +of color pairs that can be represented in a \fIsigned short\fP value. +.SS COLORS +After initializing curses, this variable contains the number of colors +which the terminal can support. +.SS COLS +After initializing curses, this variable contains the width of the screen, +i.e., the number of columns. +.SS ESCDELAY +This variable holds the number of milliseconds to wait after reading an +escape character, +to distinguish between an individual escape character entered on the +keyboard from escape sequences sent by cursor- and function-keys +(see curses(3X). +.SS LINES +After initializing curses, this variable contains the height of the screen, +i.e., the number of lines. +.SS TABSIZE +This variable holds the number of columns used by the \fIcurses\fP library +when converting a tab character to spaces as it adds the tab to a window +(see curs_addch(3X). +.SS The Current Screen +This implementation of curses uses a special window \fBcurscr\fP to +record its updates to the terminal screen. +.SS The New Screen +This implementation of curses uses a special window \fBnewscr\fP to +hold updates to the terminal screen before applying them to \fBcurscr\fP. +.SS The Standard Screen +Upon initializing curses, +a default window called \fBstdscr\fP, +which is the size of the terminal screen, is created. +Many curses functions use this window. +.SH NOTES +The curses library is initialized using either \fBinitscr\fR(3X), +or \fBnewterm\fR(3X). +.PP +If \fBcurses\fP is configured to use separate curses/terminfo libraries, +most of these variables reside in the curses library. +.SH PORTABILITY +ESCDELAY and TABSIZE are extensions, +not provided in most other implementations of curses. +.PP +ESCDELAY is an extension in AIX curses: +.bP +In AIX, the units for ESCDELAY are \fIfifths\fP of a millisecond. +.bP +The default value for AIX's ESCDELAY is 0.1 seconds. +.bP +AIX also enforces a limit of 10,000 seconds for ESCDELAY; +this implementation currently has no upper limit. +.PP +This implementation has long used ESCDELAY with units of milliseconds, +making it impossible to be completely compatible with AIX. +Likewise, most users have either decided to override the value, +or rely upon its default value. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBopaque\fR(3NCURSES), +\fBterminfo\fR(3NCURSES), +\fBthreads\fR(3NCURSES), +\fBterminfo_variables\fR(3NCURSES), +\fBterminfo\fR(\*n). diff --git a/upstream/opensuse-leap-15-6/man3/cursor.3form b/upstream/opensuse-leap-15-6/man3/cursor.3form new file mode 100644 index 00000000..c236bc2c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cursor.3form @@ -0,0 +1,69 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_cursor.3x,v 1.9 2015/12/05 20:39:43 jmc Exp $ +.TH cursor 3FORM "" +.SH NAME +\fBpos_form_cursor\fR \- position a form window cursor +.SH SYNOPSIS +\fB#include \fR +.br +int pos_form_cursor(FORM *form); +.br +.SH DESCRIPTION +The function \fBpos_form_cursor\fR restores the cursor to the position required +for the forms driver to continue processing requests. This is useful after +\fBcurses\fR routines have been called to do screen-painting in response to a +form operation. +.SH RETURN VALUE +This routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_NOT_POSTED +The form has not been posted. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/cursor.3menu b/upstream/opensuse-leap-15-6/man3/cursor.3menu new file mode 100644 index 00000000..920911fc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/cursor.3menu @@ -0,0 +1,67 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_cursor.3x,v 1.9 2015/12/05 23:42:45 tom Exp $ +.TH cursor 3MENU "" +.SH NAME +\fBpos_menu_cursor\fR \- position a menu's cursor +.SH SYNOPSIS +\fB#include \fR +.br +int pos_menu_cursor(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBpos_menu_cursor\fR restores the cursor to the current position +associated with the menu's selected item. This is useful after \fBcurses\fR +routines have been called to do screen-painting in response to a menu select. +.SH RETURN VALUE +This routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_NOT_POSTED +The menu has not been posted. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/daemon.3 b/upstream/opensuse-leap-15-6/man3/daemon.3 new file mode 100644 index 00000000..9fb08e56 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/daemon.3 @@ -0,0 +1,132 @@ +'\" t +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)daemon.3 8.1 (Berkeley) 6/9/93 +.\" Added mentioning of glibc weirdness wrt unistd.h. 5/11/98, Al Viro +.TH daemon 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +daemon \- run in the background +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int daemon(int " nochdir ", int " noclose ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR daemon (): +.nf + Since glibc 2.21: +.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 + _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 DESCRIPTION +The +.BR daemon () +function is for programs wishing to detach themselves from the +controlling terminal and run in the background as system daemons. +.PP +If +.I nochdir +is zero, +.BR daemon () +changes the process's current working directory +to the root directory ("/"); +otherwise, the current working directory is left unchanged. +.PP +If +.I noclose +is zero, +.BR daemon () +redirects standard input, standard output, and standard error +to +.IR /dev/null ; +otherwise, no changes are made to these file descriptors. +.SH RETURN VALUE +(This function forks, and if the +.BR fork (2) +succeeds, the parent calls +.\" not .IR in order not to underline _ +.BR _exit (2), +so that further errors are seen by the child only.) +On success +.BR daemon () +returns zero. +If an error occurs, +.BR daemon () +returns \-1 and sets +.I errno +to any of the errors specified for the +.BR fork (2) +and +.BR setsid (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR daemon () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +A similar function appears on the BSDs. +.PP +The glibc implementation can also return \-1 when +.I /dev/null +exists but is not a character device with the expected +major and minor numbers. +In this case, +.I errno +need not be set. +.SH STANDARDS +None. +.SH HISTORY +4.4BSD. +.SH BUGS +The GNU C library implementation of this function was taken from BSD, +and does not employ the double-fork technique (i.e., +.BR fork (2), +.BR setsid (2), +.BR fork (2)) +that is necessary to ensure that the resulting daemon process is +not a session leader. +Instead, the resulting daemon +.I is +a session leader. +.\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=19144 +.\" Tested using a program that uses daemon() and then opens an +.\" otherwise unused console device (/dev/ttyN) that does not +.\" have an associated getty process. +On systems that follow System V semantics (e.g., Linux), +this means that if the daemon opens a terminal that is not +already a controlling terminal for another session, +then that terminal will inadvertently become +the controlling terminal for the daemon. +.SH SEE ALSO +.BR fork (2), +.BR setsid (2), +.BR daemon (7), +.BR logrotate (8) diff --git a/upstream/opensuse-leap-15-6/man3/data.3form b/upstream/opensuse-leap-15-6/man3/data.3form new file mode 100644 index 00000000..0e179f79 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/data.3form @@ -0,0 +1,58 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_data.3x,v 1.11 2015/12/05 23:01:16 tom Exp $ +.TH data 3FORM "" +.SH NAME +\fBdata_ahead\fP, +\fBdata_behind\fR \- test for off-screen data in given forms +.SH SYNOPSIS +\fB#include \fR +.br +bool data_ahead(const FORM *form); +.br +bool data_behind(const FORM *form); +.br +.SH DESCRIPTION +The function \fBdata_ahead\fR tests whether there is off-screen data +ahead in the given form. It returns TRUE (1) or FALSE (0). +.PP +The function \fBdata_behind\fR tests whether there is off-screen data +behind in the given form. It returns TRUE (1) or FALSE (0). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/dbopen.3 b/upstream/opensuse-leap-15-6/man3/dbopen.3 new file mode 100644 index 00000000..6209e3e1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dbopen.3 @@ -0,0 +1,536 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94 +.\" +.TH dbopen 3 2022-12-04 "Linux man-pages 6.04" +.UC 7 +.SH NAME +dbopen \- database access methods +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.B #include +.PP +.BI "DB *dbopen(const char *" file ", int " flags ", int " mode \ +", DBTYPE " type , +.BI " const void *" openinfo ); +.fi +.SH DESCRIPTION +.IR "Note well" : +This page documents interfaces provided up until glibc 2.1. +Since glibc 2.2, glibc no longer provides these interfaces. +Probably, you are looking for the APIs provided by the +.I libdb +library instead. +.PP +.BR dbopen () +is the library interface to database files. +The supported file formats are btree, hashed, and UNIX file oriented. +The btree format is a representation of a sorted, balanced tree structure. +The hashed format is an extensible, dynamic hashing scheme. +The flat-file format is a byte stream file with fixed or variable length +records. +The formats and file-format-specific information are described in detail +in their respective manual pages +.BR btree (3), +.BR hash (3), +and +.BR recno (3). +.PP +.BR dbopen () +opens +.I file +for reading and/or writing. +Files never intended to be preserved on disk may be created by setting +the +.I file +argument to NULL. +.PP +The +.I flags +and +.I mode +arguments are as specified to the +.BR open (2) +routine, however, only the +.BR O_CREAT , +.BR O_EXCL , +.BR O_EXLOCK , +.BR O_NONBLOCK , +.BR O_RDONLY , +.BR O_RDWR , +.BR O_SHLOCK , +and +.B O_TRUNC +flags are meaningful. +(Note, opening a database file +.B O_WRONLY +is not possible.) +.\"Three additional options may be specified by ORing +.\"them into the +.\".I flags +.\"argument. +.\".TP +.\"DB_LOCK +.\"Do the necessary locking in the database to support concurrent access. +.\"If concurrent access isn't needed or the database is read-only this +.\"flag should not be set, as it tends to have an associated performance +.\"penalty. +.\".TP +.\"DB_SHMEM +.\"Place the underlying memory pool used by the database in shared +.\"memory. +.\"Necessary for concurrent access. +.\".TP +.\"DB_TXN +.\"Support transactions in the database. +.\"The DB_LOCK and DB_SHMEM flags must be set as well. +.PP +The +.I type +argument is of type +.I DBTYPE +(as defined in the +.I +include file) and +may be set to +.BR DB_BTREE , +.BR DB_HASH , +or +.BR DB_RECNO . +.PP +The +.I openinfo +argument is a pointer to an access-method-specific structure described +in the access method's manual page. +If +.I openinfo +is NULL, each access method will use defaults appropriate for the system +and the access method. +.PP +.BR dbopen () +returns a pointer to a +.I DB +structure on success and NULL on error. +The +.I DB +structure is defined in the +.I +include file, and contains at +least the following fields: +.PP +.in +4n +.EX +typedef struct { + DBTYPE type; + int (*close)(const DB *db); + int (*del)(const DB *db, const DBT *key, unsigned int flags); + int (*fd)(const DB *db); + int (*get)(const DB *db, DBT *key, DBT *data, + unsigned int flags); + int (*put)(const DB *db, DBT *key, const DBT *data, + unsigned int flags); + int (*sync)(const DB *db, unsigned int flags); + int (*seq)(const DB *db, DBT *key, DBT *data, + unsigned int flags); +} DB; +.EE +.in +.PP +These elements describe a database type and a set of functions performing +various actions. +These functions take a pointer to a structure as returned by +.BR dbopen (), +and sometimes one or more pointers to key/data structures and a flag value. +.TP +.I type +The type of the underlying access method (and file format). +.TP +.I close +A pointer to a routine to flush any cached information to disk, free any +allocated resources, and close the underlying file(s). +Since key/data pairs may be cached in memory, failing to sync the file +with a +.I close +or +.I sync +function may result in inconsistent or lost information. +.I close +routines return \-1 on error (setting +.IR errno ) +and 0 on success. +.TP +.I del +A pointer to a routine to remove key/data pairs from the database. +.IP +The argument +.I flag +may be set to the following value: +.RS +.TP +.B R_CURSOR +Delete the record referenced by the cursor. +The cursor must have previously been initialized. +.RE +.IP +.I delete +routines return \-1 on error (setting +.IR errno ), +0 on success, and 1 if the specified +.I key +was not in the file. +.TP +.I fd +A pointer to a routine which returns a file descriptor representative +of the underlying database. +A file descriptor referencing the same file will be returned to all +processes which call +.BR dbopen () +with the same +.I file +name. +This file descriptor may be safely used as an argument to the +.BR fcntl (2) +and +.BR flock (2) +locking functions. +The file descriptor is not necessarily associated with any of the +underlying files used by the access method. +No file descriptor is available for in memory databases. +.I fd +routines return \-1 on error (setting +.IR errno ), +and the file descriptor on success. +.TP +.I get +A pointer to a routine which is the interface for keyed retrieval from +the database. +The address and length of the data associated with the specified +.I key +are returned in the structure referenced by +.IR data . +.I get +routines return \-1 on error (setting +.IR errno ), +0 on success, and 1 if the +.I key +was not in the file. +.TP +.I put +A pointer to a routine to store key/data pairs in the database. +.IP +The argument +.I flag +may be set to one of the following values: +.RS +.TP +.B R_CURSOR +Replace the key/data pair referenced by the cursor. +The cursor must have previously been initialized. +.TP +.B R_IAFTER +Append the data immediately after the data referenced by +.IR key , +creating a new key/data pair. +The record number of the appended key/data pair is returned in the +.I key +structure. +(Applicable only to the +.B DB_RECNO +access method.) +.TP +.B R_IBEFORE +Insert the data immediately before the data referenced by +.IR key , +creating a new key/data pair. +The record number of the inserted key/data pair is returned in the +.I key +structure. +(Applicable only to the +.B DB_RECNO +access method.) +.TP +.B R_NOOVERWRITE +Enter the new key/data pair only if the key does not previously exist. +.TP +.B R_SETCURSOR +Store the key/data pair, setting or initializing the position of the +cursor to reference it. +(Applicable only to the +.B DB_BTREE +and +.B DB_RECNO +access methods.) +.RE +.IP +.B R_SETCURSOR +is available only for the +.B DB_BTREE +and +.B DB_RECNO +access +methods because it implies that the keys have an inherent order +which does not change. +.IP +.B R_IAFTER +and +.B R_IBEFORE +are available only for the +.B DB_RECNO +access method because they each imply that the access method is able to +create new keys. +This is true only if the keys are ordered and independent, record numbers +for example. +.IP +The default behavior of the +.I put +routines is to enter the new key/data pair, replacing any previously +existing key. +.IP +.I put +routines return \-1 on error (setting +.IR errno ), +0 on success, and 1 if the +.B R_NOOVERWRITE +.I flag +was set and the key already exists in the file. +.TP +.I seq +A pointer to a routine which is the interface for sequential +retrieval from the database. +The address and length of the key are returned in the structure +referenced by +.IR key , +and the address and length of the data are returned in the +structure referenced +by +.IR data . +.IP +Sequential key/data pair retrieval may begin at any time, and the +position of the "cursor" is not affected by calls to the +.IR del , +.IR get , +.IR put , +or +.I sync +routines. +Modifications to the database during a sequential scan will be reflected +in the scan, that is, +records inserted behind the cursor will not be returned +while records inserted in front of the cursor will be returned. +.IP +The flag value +.B must +be set to one of the following values: +.RS +.TP +.B R_CURSOR +The data associated with the specified key is returned. +This differs from the +.I get +routines in that it sets or initializes the cursor to the location of +the key as well. +(Note, for the +.B DB_BTREE +access method, the returned key is not necessarily an +exact match for the specified key. +The returned key is the smallest key greater than or equal to the specified +key, permitting partial key matches and range searches.) +.TP +.B R_FIRST +The first key/data pair of the database is returned, and the cursor +is set or initialized to reference it. +.TP +.B R_LAST +The last key/data pair of the database is returned, and the cursor +is set or initialized to reference it. +(Applicable only to the +.B DB_BTREE +and +.B DB_RECNO +access methods.) +.TP +.B R_NEXT +Retrieve the key/data pair immediately after the cursor. +If the cursor is not yet set, this is the same as the +.B R_FIRST +flag. +.TP +.B R_PREV +Retrieve the key/data pair immediately before the cursor. +If the cursor is not yet set, this is the same as the +.B R_LAST +flag. +(Applicable only to the +.B DB_BTREE +and +.B DB_RECNO +access methods.) +.RE +.IP +.B R_LAST +and +.B R_PREV +are available only for the +.B DB_BTREE +and +.B DB_RECNO +access methods because they each imply that the keys have an inherent +order which does not change. +.IP +.I seq +routines return \-1 on error (setting +.IR errno ), +0 on success and 1 if there are no key/data pairs less than or greater +than the specified or current key. +If the +.B DB_RECNO +access method is being used, and if the database file +is a character special file and no complete key/data pairs are currently +available, the +.I seq +routines return 2. +.TP +.I sync +A pointer to a routine to flush any cached information to disk. +If the database is in memory only, the +.I sync +routine has no effect and will always succeed. +.IP +The flag value may be set to the following value: +.RS +.TP +.B R_RECNOSYNC +If the +.B DB_RECNO +access method is being used, this flag causes +the sync routine to apply to the btree file which underlies the +recno file, not the recno file itself. +(See the +.I bfname +field of the +.BR recno (3) +manual page for more information.) +.RE +.IP +.I sync +routines return \-1 on error (setting +.IR errno ) +and 0 on success. +.SS Key/data pairs +Access to all file types is based on key/data pairs. +Both keys and data are represented by the following data structure: +.PP +.in +4n +.EX +typedef struct { + void *data; + size_t size; +} DBT; +.EE +.in +.PP +The elements of the +.I DBT +structure are defined as follows: +.TP +.I data +A pointer to a byte string. +.TP +.I size +The length of the byte string. +.PP +Key and data byte strings may reference strings of essentially unlimited +length although any two of them must fit into available memory at the same +time. +It should be noted that the access methods provide no guarantees about +byte string alignment. +.SH ERRORS +The +.BR dbopen () +routine may fail and set +.I errno +for any of the errors specified for the library routines +.BR open (2) +and +.BR malloc (3) +or the following: +.TP +.B EFTYPE +A file is incorrectly formatted. +.TP +.B EINVAL +A parameter has been specified (hash function, pad byte, etc.) that is +incompatible with the current file specification or which is not +meaningful for the function (for example, use of the cursor without +prior initialization) or there is a mismatch between the version +number of file and the software. +.PP +The +.I close +routines may fail and set +.I errno +for any of the errors specified for the library routines +.BR close (2), +.BR read (2), +.BR write (2), +.BR free (3), +or +.BR fsync (2). +.PP +The +.IR del , +.IR get , +.IR put , +and +.I seq +routines may fail and set +.I errno +for any of the errors specified for the library routines +.BR read (2), +.BR write (2), +.BR free (3), +or +.BR malloc (3). +.PP +The +.I fd +routines will fail and set +.I errno +to +.B ENOENT +for in memory databases. +.PP +The +.I sync +routines may fail and set +.I errno +for any of the errors specified for the library routine +.BR fsync (2). +.SH BUGS +The typedef +.I DBT +is a mnemonic for "data base thang", and was used +because no one could think of a reasonable name that wasn't already used. +.PP +The file descriptor interface is a kludge and will be deleted in a +future version of the interface. +.PP +None of the access methods provide any form of concurrent access, +locking, or transactions. +.SH SEE ALSO +.BR btree (3), +.BR hash (3), +.BR mpool (3), +.BR recno (3) +.PP +.IR "LIBTP: Portable, Modular Transactions for UNIX" , +Margo Seltzer, Michael Olson, USENIX proceedings, Winter 1992. diff --git a/upstream/opensuse-leap-15-6/man3/default_colors.3ncurses b/upstream/opensuse-leap-15-6/man3/default_colors.3ncurses new file mode 100644 index 00000000..286f6eed --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/default_colors.3ncurses @@ -0,0 +1,133 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2011,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1997,1999,2000,2005 +.\" +.\" $Id: default_colors.3x,v 1.25 2016/10/15 17:16:48 tom Exp $ +.TH default_colors 3NCURSES "" +.SH NAME +\fBuse_default_colors\fR, +\fBassume_default_colors\fR \- use terminal's default colors +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint use_default_colors(void);\fP +.br +\fBint assume_default_colors(int fg, int bg);\fP +.SH DESCRIPTION +The \fBuse_default_colors\fP and \fBassume_default_colors\fP +functions are extensions to the curses library. +They are used with terminals that support ISO 6429 color, or equivalent. +These terminals allow the application to reset color to an unspecified +default value (e.g., with SGR 39 or SGR 49). +.PP +Applications that paint a colored background over the whole screen +do not take advantage of SGR 39 and SGR 49. +Some applications are designed to work with the default background, +using colors only for text. +For example, there are several implementations of the \fBls\fP program +which use colors to denote different file types or permissions. +These "color ls" programs do not necessarily modify the background color, +typically using only the \fBsetaf\fP terminfo capability to set the +foreground color. +Full-screen applications that use default colors can achieve similar +visual effects. +.PP +The first function, \fBuse_default_colors\fP +tells the curses library to assign terminal default +foreground/background colors to color number \-1. So init_pair(x,COLOR_RED,\-1) +will initialize pair x as red on default background and init_pair(x,\-1,COLOR_BLUE) will +initialize pair x as default foreground on blue. +.PP +The other, \fBassume_default_colors\fP +is a refinement which tells which colors to paint for color pair 0. +This function recognizes a special color number \-1, +which denotes the default terminal color. +.PP +The following are equivalent: +.RS +.br +.I use_default_colors(); +.br +.I assume_default_colors(\-1,\-1); +.RE +.PP +These are ncurses extensions. +For other curses implementations, color +number \-1 does not mean anything, just as for ncurses before a +successful call of \fBuse_default_colors\fP or \fBassume_default_colors\fP. +.PP +Other curses implementations do not allow an application to modify color pair 0. +They assume that the background is COLOR_BLACK, +but do not ensure that the color pair 0 is painted to match the +assumption. +If your application does not use either +.B use_default_colors +or +.B assume_default_colors +ncurses will paint a white foreground (text) with black background +for color pair 0. +.SH RETURN VALUE +These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success. +They will fail if either the terminal does not support +the \fBorig_pair\fP or \fBorig_colors\fP capability. +If the \fBinitialize_pair\fP capability is not found, this causes an +error as well. +.SH NOTES +Associated with this extension, the \fBinit_pair\fR function accepts +negative arguments to specify default foreground or background colors. +.PP +The \fBuse_default_colors\fP function was added to support \fIded\fP. +This is a full-screen application which uses curses to manage only part +of the screen. The bottom portion of the screen, which is of adjustable +size, is left uncolored to display the results from shell commands. +The top portion of the screen colors filenames using a scheme like the +"color ls" programs. +Attempting to manage the background color of the screen for this application +would give unsatisfactory results for a variety of reasons. +This extension was devised after +noting that color xterm (and similar programs) provides a background color +which does not necessarily correspond to any of the ANSI colors. +While a special terminfo entry could be constructed using nine colors, +there was no mechanism provided within curses to account for the related +\fBorig_pair\fP and \fBback_color_erase\fP capabilities. +.PP +The \fBassume_default_colors\fP function was added to solve +a different problem: support for applications which would use +environment variables and other configuration to bypass curses' +notion of the terminal's default colors, setting specific values. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBcolor\fR(3NCURSES), +\fBded\fP(1). +.SH AUTHOR +Thomas Dickey (from an analysis of the requirements for color xterm +for XFree86 3.1.2C, February 1996). diff --git a/upstream/opensuse-leap-15-6/man3/define_key.3ncurses b/upstream/opensuse-leap-15-6/man3/define_key.3ncurses new file mode 100644 index 00000000..edf49b11 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/define_key.3ncurses @@ -0,0 +1,63 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1997 +.\" +.\" $Id: define_key.3x,v 1.15 2017/11/21 00:53:44 tom Exp $ +.TH define_key 3NCURSES "" +.SH NAME +\fBdefine_key\fP \- define a keycode +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint define_key(const char *definition, int keycode);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to define keycodes with their corresponding control +strings, so that the ncurses library will interpret them just as it would +the predefined codes in the terminfo database. +.PP +If the given string is null, any existing definition for the keycode is +removed. +Similarly, if the given keycode is negative or zero, any existing string +for the given definition is removed. +.SH RETURN VALUE +The keycode must be greater than zero, and the string non-null, +otherwise \fBERR\fP is returned. +\fBERR\fP may also be returned if there is insufficient memory to allocate the +data to store the definition. +If no error is detected, \fBOK\fP is returned. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBkeyok\fR(3NCURSES), +\fBkey_defined\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/delch.3ncurses b/upstream/opensuse-leap-15-6/man3/delch.3ncurses new file mode 100644 index 00000000..411138e5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/delch.3ncurses @@ -0,0 +1,68 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_delch.3x,v 1.11 2010/12/04 18:36:44 tom Exp $ +.TH delch 3NCURSES "" +.SH NAME +\fBdelch\fR, +\fBwdelch\fR, +\fBmvdelch\fR, +\fBmvwdelch\fR \- delete character under the cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint delch(void);\fR +.br +\fBint wdelch(WINDOW *win);\fR +.br +\fBint mvdelch(int y, int x);\fR +.br +\fBint mvwdelch(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines delete the character under the cursor; all characters to the +right of the cursor on the same line are moved to the left one position and the +last character on the line is filled with a blank. The cursor position does +not change (after moving to \fIy\fR, \fIx\fR, if specified). (This does not +imply use of the hardware delete character feature.) +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/deleteln.3ncurses b/upstream/opensuse-leap-15-6/man3/deleteln.3ncurses new file mode 100644 index 00000000..15a60905 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/deleteln.3ncurses @@ -0,0 +1,85 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_deleteln.3x,v 1.13 2010/12/04 18:36:44 tom Exp $ +.TH deleteln 3NCURSES "" +.SH NAME +\fBdeleteln\fR, +\fBwdeleteln\fR, +\fBinsdelln\fR, +\fBwinsdelln\fR, +\fBinsertln\fR, +\fBwinsertln\fR \- delete and insert lines in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint deleteln(void);\fR +.br +\fBint wdeleteln(WINDOW *win);\fR +.br +\fBint insdelln(int n);\fR +.br +\fBint winsdelln(WINDOW *win, int n);\fR +.br +\fBint insertln(void);\fR +.br +\fBint winsertln(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBdeleteln\fR and \fBwdeleteln\fR routines delete the line under the +cursor in the window; all lines below the current line are moved up one line. +The bottom line of the window is cleared. The cursor position does not change. +.PP +The \fBinsdelln\fR and \fBwinsdelln\fR routines, for positive \fIn\fR, insert +\fIn\fR lines into the specified window above the current line. The \fIn\fR +bottom lines are lost. For negative \fIn\fR, delete \fIn\fR lines (starting +with the one under the cursor), and move the remaining lines up. The bottom +\fIn\fR lines are cleared. The current cursor position remains the same. +.PP +The \fBinsertln\fR and \fBwinsertln\fR routines insert a blank line above the +current line and the bottom line is lost. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.PP +X/Open defines no error conditions. +In this implementation, +if the window parameter is null, an error is returned. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. The +standard specifies that they return \fBERR\fR on failure, but specifies no +error conditions. +.SH NOTES +Note that all but \fBwinsdelln\fR may be macros. +.PP +These routines do not require a hardware line delete or insert feature in the +terminal. In fact, they will not use hardware line delete/insert unless +\fBidlok(..., TRUE)\fR has been set on the current window. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/des_crypt.3 b/upstream/opensuse-leap-15-6/man3/des_crypt.3 new file mode 100644 index 00000000..081214a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/des_crypt.3 @@ -0,0 +1,167 @@ +'\" t +.\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI; +.\" +.\" Taken from libc4 sources, which say: +.\" Copyright (C) 1993 Eric Young - can be distributed under GPL. +.\" +.\" However, the above header line suggests that this file in fact is +.\" Copyright Sun Microsystems, Inc (and is provided for unrestricted use, +.\" see other Sun RPC sources). +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH des_crypt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast +DES encryption +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.\" Sun version +.\" .B #include +.B #include +.PP +.BI "[[deprecated]] int ecb_crypt(char *" key ", char " data [. datalen ], +.BI " unsigned int " datalen ", \ +unsigned int " mode ); +.BI "[[deprecated]] int cbc_crypt(char *" key ", char " data [. datalen ], +.BI " unsigned int " datalen ", \ +unsigned int " mode , +.BI " char *" ivec ); +.PP +.BI "[[deprecated]] void des_setparity(char *" key ); +.PP +.BI "[[deprecated]] int DES_FAILED(int " status ); +.fi +.SH DESCRIPTION +.BR ecb_crypt () +and +.BR cbc_crypt () +implement the +NBS +DES +(Data Encryption Standard). +These routines are faster and more general purpose than +.BR crypt (3). +They also are able to utilize +DES +hardware if it is available. +.BR ecb_crypt () +encrypts in +ECB +(Electronic Code Book) +mode, which encrypts blocks of data independently. +.BR cbc_crypt () +encrypts in +CBC +(Cipher Block Chaining) +mode, which chains together +successive blocks. +CBC +mode protects against insertions, deletions, and +substitutions of blocks. +Also, regularities in the clear text will +not appear in the cipher text. +.PP +Here is how to use these routines. +The first argument, +.IR key , +is the 8-byte encryption key with parity. +To set the key's parity, which for +DES +is in the low bit of each byte, use +.BR des_setparity (). +The second argument, +.IR data , +contains the data to be encrypted or decrypted. +The +third argument, +.IR datalen , +is the length in bytes of +.IR data , +which must be a multiple of 8. +The fourth argument, +.IR mode , +is formed by ORing together some things. +For the encryption direction OR in either +.B DES_ENCRYPT +or +.BR DES_DECRYPT . +For software versus hardware +encryption, OR in either +.B DES_HW +or +.BR DES_SW . +If +.B DES_HW +is specified, and there is no hardware, then the encryption is performed +in software and the routine returns +.BR DESERR_NOHWDEVICE . +For +.BR cbc_crypt (), +the argument +.I ivec +is the 8-byte initialization +vector for the chaining. +It is updated to the next initialization +vector upon return. +.SH RETURN VALUE +.TP +.B DESERR_NONE +No error. +.TP +.B DESERR_NOHWDEVICE +Encryption succeeded, but done in software instead of the requested hardware. +.TP +.B DESERR_HWERROR +An error occurred in the hardware or driver. +.TP +.B DESERR_BADPARAM +Bad argument to routine. +.PP +Given a result status +.IR stat , +the macro +.\" .BR DES_FAILED\c +.\" .BR ( stat ) +.BI DES_FAILED( stat ) +is false only for the first two statuses. +.\" So far the Sun page +.\" Some additions - aeb +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ecb_crypt (), +.BR cbc_crypt (), +.BR des_setparity () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +glibc 2.1. +Removed in glibc 2.28. +.PP +Because they employ the DES block cipher, +which is no longer considered secure, +these functions were removed. +Applications should switch to a modern cryptography library, such as +.BR libgcrypt . +.SH SEE ALSO +.BR des (1), +.BR crypt (3), +.BR xcrypt (3) diff --git a/upstream/opensuse-leap-15-6/man3/difftime.3 b/upstream/opensuse-leap-15-6/man3/difftime.3 new file mode 100644 index 00000000..572dfa69 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/difftime.3 @@ -0,0 +1,72 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH difftime 3 2023-04-03 "Linux man-pages 6.04" +.SH NAME +difftime \- calculate time difference +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double difftime(time_t " time1 ", time_t " time0 ); +.fi +.SH DESCRIPTION +The +.BR difftime () +function returns the number of seconds elapsed +between time \fItime1\fP and time \fItime0\fP, represented as a +.IR double . +Each of the times is specified in calendar time, which means its +value is a measurement (in seconds) relative to the +Epoch, 1970-01-01 00:00:00 +0000 (UTC). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR difftime () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH NOTES +On a POSIX system, +.I time_t +is an arithmetic type, and one could just +define +.PP +.in +4n +.EX +#define my_difftime(t1,t0) (double)(t1 \- t0) +.EE +.in +.PP +when the possible overflow in the subtraction is not a concern. +.SH SEE ALSO +.BR date (1), +.BR gettimeofday (2), +.BR time (2), +.BR ctime (3), +.BR gmtime (3), +.BR localtime (3) diff --git a/upstream/opensuse-leap-15-6/man3/dirfd.3 b/upstream/opensuse-leap-15-6/man3/dirfd.3 new file mode 100644 index 00000000..50b04f3e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dirfd.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH dirfd 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dirfd \- get directory stream file descriptor +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int dirfd(DIR *" dirp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR dirfd (): +.nf + /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The function +.BR dirfd () +returns the file descriptor associated with the directory stream +.IR dirp . +.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 +.BR fstat (2) +and +.BR fchdir (2). +It will be automatically closed when +.BR closedir (3) +is called. +.SH RETURN VALUE +On success, +.BR dirfd () +returns a file descriptor (a nonnegative integer). +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +POSIX.1-2008 specifies two errors, +neither of which is returned by the current +.\" glibc 2.8 +implementation. +.TP +.B EINVAL +.I dirp +does not refer to a valid directory stream. +.TP +.B ENOTSUP +The implementation does not support the association of a file +descriptor with a directory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dirfd () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +4.3BSD-Reno (not in 4.2BSD). +.\" It is present in libc5 (since 5.1.2) and in glibc 2. +.SH SEE ALSO +.BR open (2), +.BR openat (2), +.BR closedir (3), +.BR opendir (3), +.BR readdir (3), +.BR rewinddir (3), +.BR scandir (3), +.BR seekdir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/div.3 b/upstream/opensuse-leap-15-6/man3/div.3 new file mode 100644 index 00000000..1988e473 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/div.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH div 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +div, ldiv, lldiv, imaxdiv \- compute quotient and remainder of +an integer division +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "div_t div(int " numerator ", int " denominator ); +.BI "ldiv_t ldiv(long " numerator ", long " denominator ); +.BI "lldiv_t lldiv(long long " numerator ", long long " denominator ); +.PP +.B #include +.PP +.BI "imaxdiv_t imaxdiv(intmax_t " numerator ", intmax_t " denominator ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR lldiv (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR div () +function computes the value +\fInumerator\fP/\fIdenominator\fP and +returns the quotient and remainder in a structure +named \fIdiv_t\fP that contains +two integer members (in unspecified order) named \fIquot\fP and \fIrem\fP. +The quotient is rounded toward zero. +The result satisfies \fIquot\fP*\fIdenominator\fP+\fIrem\fP = \fInumerator\fP. +.PP +The +.BR ldiv (), +.BR lldiv (), +and +.BR imaxdiv () +functions do the same, +dividing numbers of the indicated type and +returning the result in a structure +of the indicated name, in all cases with fields \fIquot\fP and \fIrem\fP +of the same type as the function arguments. +.SH RETURN VALUE +The \fIdiv_t\fP (etc.) structure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR div (), +.BR ldiv (), +.BR lldiv (), +.BR imaxdiv () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, C99, SVr4, 4.3BSD. +.PP +.BR lldiv () +and +.BR imaxdiv () +were added in C99. +.SH EXAMPLES +After +.PP +.in +4n +.EX +div_t q = div(\-5, 3); +.EE +.in +.PP +the values \fIq.quot\fP and \fIq.rem\fP are \-1 and \-2, respectively. +.SH SEE ALSO +.BR abs (3), +.BR remainder (3) diff --git a/upstream/opensuse-leap-15-6/man3/dl_iterate_phdr.3 b/upstream/opensuse-leap-15-6/man3/dl_iterate_phdr.3 new file mode 100644 index 00000000..44fb1a3e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dl_iterate_phdr.3 @@ -0,0 +1,348 @@ +'\" t +.\" Copyright (c) 2003, 2017 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH dl_iterate_phdr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dl_iterate_phdr \- walk through list of shared objects +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B int dl_iterate_phdr( +.BI " int (*" callback ")(struct dl_phdr_info *" info , +.BI " size_t " size ", void *" data ), +.BI " void *" data ); +.fi +.SH DESCRIPTION +The +.BR dl_iterate_phdr () +function allows an application to inquire at run time to find +out which shared objects it has loaded, +and the order in which they were loaded. +.PP +The +.BR dl_iterate_phdr () +function walks through the list of an +application's shared objects and calls the function +.I callback +once for each object, +until either all shared objects have been processed or +.I callback +returns a nonzero value. +.PP +Each call to +.I callback +receives three arguments: +.IR info , +which is a pointer to a structure containing information +about the shared object; +.IR size , +which is the size of the structure pointed to by +.IR info ; +and +.IR data , +which is a copy of whatever value was passed by the calling +program as the second argument (also named +.IR data ) +in the call to +.BR dl_iterate_phdr (). +.PP +The +.I info +argument is a structure of the following type: +.PP +.in +4n +.EX +struct dl_phdr_info { + ElfW(Addr) dlpi_addr; /* Base address of object */ + const char *dlpi_name; /* (Null\-terminated) name of + object */ + const ElfW(Phdr) *dlpi_phdr; /* Pointer to array of + ELF program headers + for this object */ + ElfW(Half) dlpi_phnum; /* # of items in \fIdlpi_phdr\fP */ + + /* The following fields were added in glibc 2.4, after the first + version of this structure was available. Check the \fIsize\fP + argument passed to the dl_iterate_phdr callback to determine + whether or not each later member is available. */ + + unsigned long long dlpi_adds; + /* Incremented when a new object may + have been added */ + unsigned long long dlpi_subs; + /* Incremented when an object may + have been removed */ + size_t dlpi_tls_modid; + /* If there is a PT_TLS segment, its module + ID as used in TLS relocations, else zero */ + void *dlpi_tls_data; + /* The address of the calling thread\[aq]s instance + of this module\[aq]s PT_TLS segment, if it has + one and it has been allocated in the calling + thread, otherwise a null pointer */ +}; +.EE +.in +.PP +(The +.IR ElfW () +macro definition turns its argument into the name of an ELF data +type suitable for the hardware architecture. +For example, on a 32-bit platform, +.I ElfW(Addr) +yields the data type name +.IR Elf32_Addr . +Further information on these types can be found in the +.IR " and " +header files.) +.PP +The +.I dlpi_addr +field indicates the base address of the shared object +(i.e., the difference between the virtual memory address of +the shared object and the offset of that object in the file +from which it was loaded). +The +.I dlpi_name +field is a null-terminated string giving the pathname +from which the shared object was loaded. +.PP +To understand the meaning of the +.I dlpi_phdr +and +.I dlpi_phnum +fields, we need to be aware that an ELF shared object consists +of a number of segments, each of which has a corresponding +program header describing the segment. +The +.I dlpi_phdr +field is a pointer to an array of the program headers for this +shared object. +The +.I dlpi_phnum +field indicates the size of this array. +.PP +These program headers are structures of the following form: +.PP +.in +4n +.EX +typedef struct { + Elf32_Word p_type; /* Segment type */ + Elf32_Off p_offset; /* Segment file offset */ + Elf32_Addr p_vaddr; /* Segment virtual address */ + Elf32_Addr p_paddr; /* Segment physical address */ + Elf32_Word p_filesz; /* Segment size in file */ + Elf32_Word p_memsz; /* Segment size in memory */ + Elf32_Word p_flags; /* Segment flags */ + Elf32_Word p_align; /* Segment alignment */ +} Elf32_Phdr; +.EE +.in +.PP +Note that we can calculate the location of a particular program header, +.IR x , +in virtual memory using the formula: +.PP +.in +4n +.EX +addr == info\->dlpi_addr + info\->dlpi_phdr[x].p_vaddr; +.EE +.in +.PP +Possible values for +.I p_type +include the following (see +.I +for further details): +.PP +.in +4n +.EX +#define PT_LOAD 1 /* Loadable program segment */ +#define PT_DYNAMIC 2 /* Dynamic linking information */ +#define PT_INTERP 3 /* Program interpreter */ +#define PT_NOTE 4 /* Auxiliary information */ +#define PT_SHLIB 5 /* Reserved */ +#define PT_PHDR 6 /* Entry for header table itself */ +#define PT_TLS 7 /* Thread\-local storage segment */ +#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ +#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ +.\" For PT_GNU_STACK, see http://www.airs.com/blog/archives/518 +#define PT_GNU_RELRO 0x6474e552 /* Read\-only after relocation */ +.EE +.in +.SH RETURN VALUE +The +.BR dl_iterate_phdr () +function returns whatever value was returned by the last call to +.IR callback . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dl_iterate_phdr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Various other systems provide a version of this function, +although details of the returned +.I dl_phdr_info +structure differ. +On the BSDs and Solaris, the structure includes the fields +.IR dlpi_addr , +.IR dlpi_name , +.IR dlpi_phdr , +and +.I dlpi_phnum +in addition to other implementation-specific fields. +.PP +Future versions of the C library may add further fields to the +.I dl_phdr_info +structure; in that event, the +.I size +argument provides a mechanism for the callback function to discover +whether it is running on a system with added fields. +.SH STANDARDS +None. +.SH HISTORY +glibc 2.2.4. +.SH NOTES +The first object visited by +.I callback +is the main program. +For the main program, the +.I dlpi_name +field will be an empty string. +.SH EXAMPLES +The following program displays a list of pathnames of the +shared objects it has loaded. +For each shared object, the program lists some information +(virtual address, size, flags, and type) +for each of the objects ELF segments. +.PP +The following shell session demonstrates the output +produced by the program on an x86-64 system. +The first shared object for which output is displayed +(where the name is an empty string) +is the main program. +.PP +.in +4n +.EX +$ \fB./a.out\fP +Name: "" (9 segments) + 0: [ 0x400040; memsz: 1f8] flags: 0x5; PT_PHDR + 1: [ 0x400238; memsz: 1c] flags: 0x4; PT_INTERP + 2: [ 0x400000; memsz: ac4] flags: 0x5; PT_LOAD + 3: [ 0x600e10; memsz: 240] flags: 0x6; PT_LOAD + 4: [ 0x600e28; memsz: 1d0] flags: 0x6; PT_DYNAMIC + 5: [ 0x400254; memsz: 44] flags: 0x4; PT_NOTE + 6: [ 0x400970; memsz: 3c] flags: 0x4; PT_GNU_EH_FRAME + 7: [ (nil); memsz: 0] flags: 0x6; PT_GNU_STACK + 8: [ 0x600e10; memsz: 1f0] flags: 0x4; PT_GNU_RELRO +Name: "linux\-vdso.so.1" (4 segments) + 0: [0x7ffc6edd1000; memsz: e89] flags: 0x5; PT_LOAD + 1: [0x7ffc6edd1360; memsz: 110] flags: 0x4; PT_DYNAMIC + 2: [0x7ffc6edd17b0; memsz: 3c] flags: 0x4; PT_NOTE + 3: [0x7ffc6edd17ec; memsz: 3c] flags: 0x4; PT_GNU_EH_FRAME +Name: "/lib64/libc.so.6" (10 segments) + 0: [0x7f55712ce040; memsz: 230] flags: 0x5; PT_PHDR + 1: [0x7f557145b980; memsz: 1c] flags: 0x4; PT_INTERP + 2: [0x7f55712ce000; memsz: 1b6a5c] flags: 0x5; PT_LOAD + 3: [0x7f55716857a0; memsz: 9240] flags: 0x6; PT_LOAD + 4: [0x7f5571688b80; memsz: 1f0] flags: 0x6; PT_DYNAMIC + 5: [0x7f55712ce270; memsz: 44] flags: 0x4; PT_NOTE + 6: [0x7f55716857a0; memsz: 78] flags: 0x4; PT_TLS + 7: [0x7f557145b99c; memsz: 544c] flags: 0x4; PT_GNU_EH_FRAME + 8: [0x7f55712ce000; memsz: 0] flags: 0x6; PT_GNU_STACK + 9: [0x7f55716857a0; memsz: 3860] flags: 0x4; PT_GNU_RELRO +Name: "/lib64/ld\-linux\-x86\-64.so.2" (7 segments) + 0: [0x7f557168f000; memsz: 20828] flags: 0x5; PT_LOAD + 1: [0x7f55718afba0; memsz: 15a8] flags: 0x6; PT_LOAD + 2: [0x7f55718afe10; memsz: 190] flags: 0x6; PT_DYNAMIC + 3: [0x7f557168f1c8; memsz: 24] flags: 0x4; PT_NOTE + 4: [0x7f55716acec4; memsz: 604] flags: 0x4; PT_GNU_EH_FRAME + 5: [0x7f557168f000; memsz: 0] flags: 0x6; PT_GNU_STACK + 6: [0x7f55718afba0; memsz: 460] flags: 0x4; PT_GNU_RELRO +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (dl_iterate_phdr.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +static int +callback(struct dl_phdr_info *info, size_t size, void *data) +{ + char *type; + int p_type; + + printf("Name: \e"%s\e" (%d segments)\en", info\->dlpi_name, + info\->dlpi_phnum); + + for (size_t j = 0; j < info\->dlpi_phnum; j++) { + p_type = info\->dlpi_phdr[j].p_type; + type = (p_type == PT_LOAD) ? "PT_LOAD" : + (p_type == PT_DYNAMIC) ? "PT_DYNAMIC" : + (p_type == PT_INTERP) ? "PT_INTERP" : + (p_type == PT_NOTE) ? "PT_NOTE" : + (p_type == PT_INTERP) ? "PT_INTERP" : + (p_type == PT_PHDR) ? "PT_PHDR" : + (p_type == PT_TLS) ? "PT_TLS" : + (p_type == PT_GNU_EH_FRAME) ? "PT_GNU_EH_FRAME" : + (p_type == PT_GNU_STACK) ? "PT_GNU_STACK" : + (p_type == PT_GNU_RELRO) ? "PT_GNU_RELRO" : NULL; + + printf(" %2zu: [%14p; memsz:%7jx] flags: %#jx; ", j, + (void *) (info\->dlpi_addr + info\->dlpi_phdr[j].p_vaddr), + (uintmax_t) info\->dlpi_phdr[j].p_memsz, + (uintmax_t) info\->dlpi_phdr[j].p_flags); + if (type != NULL) + printf("%s\en", type); + else + printf("[other (%#x)]\en", p_type); + } + + return 0; +} + +int +main(void) +{ + dl_iterate_phdr(callback, NULL); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR ldd (1), +.BR objdump (1), +.BR readelf (1), +.BR dladdr (3), +.BR dlopen (3), +.BR elf (5), +.BR ld.so (8) +.PP +.IR "Executable and Linking Format Specification" , +available at various locations online. diff --git a/upstream/opensuse-leap-15-6/man3/dladdr.3 b/upstream/opensuse-leap-15-6/man3/dladdr.3 new file mode 100644 index 00000000..5248476f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dladdr.3 @@ -0,0 +1,278 @@ +'\" t +.\" Copyright (C) 2015 Michael Kerrisk +.\" and Copyright (C) 2008 Petr Baudis (dladdr caveat) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH dladdr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dladdr, dladdr1 \- translate address to symbolic information +.SH LIBRARY +Dynamic linking library +.RI ( libdl ", " \-ldl ) +.SH SYNOPSIS +.nf +.B #define _GNU_SOURCE +.B #include +.PP +.BI "int dladdr(const void *" addr ", Dl_info *" info ); +.BI "int dladdr1(const void *" addr ", Dl_info *" info ", void **" extra_info , +.BI " int " flags ); +.fi +.SH DESCRIPTION +The function +.BR dladdr () +determines whether the address specified in +.I addr +is located in one of the shared objects loaded by the calling application. +If it is, then +.BR dladdr () +returns information about the shared object and symbol that overlaps +.IR addr . +This information is returned in a +.I Dl_info +structure: +.PP +.in +4n +.EX +typedef struct { + const char *dli_fname; /* Pathname of shared object that + contains address */ + void *dli_fbase; /* Base address at which shared + object is loaded */ + const char *dli_sname; /* Name of symbol whose definition + overlaps \fIaddr\fP */ + void *dli_saddr; /* Exact address of symbol named + in \fIdli_sname\fP */ +} Dl_info; +.EE +.in +.PP +If no symbol matching +.I addr +could be found, then +.I dli_sname +and +.I dli_saddr +are set to NULL. +.PP +The function +.BR dladdr1 () +is like +.BR dladdr (), +but returns additional information via the argument +.IR extra_info . +The information returned depends on the value specified in +.IR flags , +which can have one of the following values: +.TP +.B RTLD_DL_LINKMAP +Obtain a pointer to the link map for the matched file. +The +.I extra_info +argument points to a pointer to a +.I link_map +structure (i.e., +.IR "struct link_map\~**" ), +defined in +.I +as: +.IP +.in +4n +.EX +struct link_map { + ElfW(Addr) l_addr; /* Difference between the + address in the ELF file and + the address in memory */ + char *l_name; /* Absolute pathname where + object was found */ + ElfW(Dyn) *l_ld; /* Dynamic section of the + shared object */ + struct link_map *l_next, *l_prev; + /* Chain of loaded objects */ + + /* Plus additional fields private to the + implementation */ +}; +.EE +.in +.TP +.B RTLD_DL_SYMENT +Obtain a pointer to the ELF symbol table entry of the matching symbol. +The +.I extra_info +argument is a pointer to a symbol pointer: +.IR "const ElfW(Sym) **" . +The +.IR ElfW () +macro definition turns its argument into the name of an ELF data +type suitable for the hardware architecture. +For example, on a 64-bit platform, +.I ElfW(Sym) +yields the data type name +.IR Elf64_Sym , +which is defined in +.I +as: +.IP +.in +4n +.EX +typedef struct { + Elf64_Word st_name; /* Symbol name */ + unsigned char st_info; /* Symbol type and binding */ + unsigned char st_other; /* Symbol visibility */ + Elf64_Section st_shndx; /* Section index */ + Elf64_Addr st_value; /* Symbol value */ + Elf64_Xword st_size; /* Symbol size */ +} Elf64_Sym; +.EE +.in +.IP +The +.I st_name +field is an index into the string table. +.IP +The +.I st_info +field encodes the symbol's type and binding. +The type can be extracted using the macro +.B ELF64_ST_TYPE(st_info) +(or +.B ELF32_ST_TYPE() +on 32-bit platforms), which yields one of the following values: +.in +4n +.TS +lb lb +lb l. +Value Description +STT_NOTYPE Symbol type is unspecified +STT_OBJECT Symbol is a data object +STT_FUNC Symbol is a code object +STT_SECTION Symbol associated with a section +STT_FILE Symbol's name is filename +STT_COMMON Symbol is a common data object +STT_TLS Symbol is thread-local data object +STT_GNU_IFUNC Symbol is indirect code object +.TE +.in +.IP +The symbol binding can be extracted from the +.I st_info +field using the macro +.B ELF64_ST_BIND(st_info) +(or +.B ELF32_ST_BIND() +on 32-bit platforms), which yields one of the following values: +.in +4n +.TS +lb lb +lb l. +Value Description +STB_LOCAL Local symbol +STB_GLOBAL Global symbol +STB_WEAK Weak symbol +STB_GNU_UNIQUE Unique symbol +.TE +.in +.IP +The +.I st_other +field contains the symbol's visibility, which can be extracted using the macro +.B ELF64_ST_VISIBILITY(st_info) +(or +.B ELF32_ST_VISIBILITY() +on 32-bit platforms), which yields one of the following values: +.in +4n +.TS +lb lb +lb l. +Value Description +STV_DEFAULT Default symbol visibility rules +STV_INTERNAL Processor-specific hidden class +STV_HIDDEN Symbol unavailable in other modules +STV_PROTECTED Not preemptible, not exported +.TE +.in +.SH RETURN VALUE +On success, these functions return a nonzero value. +If the address specified in +.I addr +could be matched to a shared object, +but not to a symbol in the shared object, then the +.I info\->dli_sname +and +.I info\->dli_saddr +fields are set to NULL. +.PP +If the address specified in +.I addr +could not be matched to a shared object, then these functions return 0. +In this case, an error message is +.I not +.\" According to the FreeBSD man page, dladdr1() does signal an +.\" error via dlerror() for this case. +available via +.BR dlerror (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dladdr (), +.BR dladdr1 () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +.TP +.BR dladdr () +glibc 2.0. +.TP +.BR dladdr1 () +glibc 2.3.3. +.PP +Solaris. +.SH BUGS +Sometimes, the function pointers you pass to +.BR dladdr () +may surprise you. +On some architectures (notably i386 and x86-64), +.I dli_fname +and +.I dli_fbase +may end up pointing back at the object from which you called +.BR dladdr (), +even if the function used as an argument should come from +a dynamically linked library. +.PP +The problem is that the function pointer will still be resolved +at compile time, but merely point to the +.I plt +(Procedure Linkage Table) +section of the original object (which dispatches the call after +asking the dynamic linker to resolve the symbol). +To work around this, +you can try to compile the code to be position-independent: +then, the compiler cannot prepare the pointer +at compile time any more and +.BR gcc (1) +will generate code that just loads the final symbol address from the +.I got +(Global Offset Table) at run time before passing it to +.BR dladdr (). +.SH SEE ALSO +.BR dl_iterate_phdr (3), +.BR dlinfo (3), +.BR dlopen (3), +.BR dlsym (3), +.BR ld.so (8) diff --git a/upstream/opensuse-leap-15-6/man3/dlerror.3 b/upstream/opensuse-leap-15-6/man3/dlerror.3 new file mode 100644 index 00000000..c2efef77 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dlerror.3 @@ -0,0 +1,81 @@ +'\" t +.\" Copyright 1995 Yggdrasil Computing, Incorporated. +.\" and Copyright 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH dlerror 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dlerror \- obtain error diagnostic for functions in the dlopen API +.SH LIBRARY +Dynamic linking library +.RI ( libdl ", " \-ldl ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "char *dlerror(void);" +.fi +.SH DESCRIPTION +The +.BR dlerror () +function returns a human-readable, +null-terminated string describing the most recent error +that occurred from a call to one of the functions in the dlopen API +since the last call to +.BR dlerror (). +The returned string does +.I not +include a trailing newline. +.PP +.BR dlerror () +returns NULL if no errors have occurred since initialization or since +it was last called. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dlerror () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0. +POSIX.1-2001. +.PP +SunOS. +.SH NOTES +The message returned by +.BR dlerror () +may reside in a statically allocated buffer that is +overwritten by subsequent +.BR dlerror () +calls. +.\" .LP +.\" The string returned by +.\" .BR dlerror () +.\" should not be modified. +.\" Some systems give the prototype as +.\" .sp +.\" .in +5 +.\" .B "const char *dlerror(void);" +.\" .in +.SH EXAMPLES +See +.BR dlopen (3). +.SH SEE ALSO +.BR dladdr (3), +.BR dlinfo (3), +.BR dlopen (3), +.BR dlsym (3) diff --git a/upstream/opensuse-leap-15-6/man3/dlinfo.3 b/upstream/opensuse-leap-15-6/man3/dlinfo.3 new file mode 100644 index 00000000..bc331dcc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dlinfo.3 @@ -0,0 +1,320 @@ +'\" t +.\" Copyright (C) 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH dlinfo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dlinfo \- obtain information about a dynamically loaded object +.SH LIBRARY +Dynamic linking library +.RI ( libdl ", " \-ldl ) +.SH SYNOPSIS +.nf +.B #define _GNU_SOURCE +.B #include +.B #include +.PP +.BR "int dlinfo(void *restrict " handle ", int " request \ +", void *restrict " info ); +.fi +.SH DESCRIPTION +The +.BR dlinfo () +function obtains information about the dynamically loaded object +referred to by +.I handle +(typically obtained by an earlier call to +.BR dlopen (3) +or +.BR dlmopen (3)). +The +.I request +argument specifies which information is to be returned. +The +.I info +argument is a pointer to a buffer used to store information +returned by the call; the type of this argument depends on +.IR request . +.PP +The following values are supported for +.I request +(with the corresponding type for +.I info +shown in parentheses): +.TP +.BR RTLD_DI_LMID " (\fILmid_t *\fP)" +Obtain the ID of the link-map list (namespace) in which +.I handle +is loaded. +.TP +.BR RTLD_DI_LINKMAP " (\fIstruct link_map **\fP)" +Obtain a pointer to the +.I link_map +structure corresponding to +.IR handle . +The +.I info +argument points to a pointer to a +.I link_map +structure, defined in +.I +as: +.IP +.in +4n +.EX +struct link_map { + ElfW(Addr) l_addr; /* Difference between the + address in the ELF file and + the address in memory */ + char *l_name; /* Absolute pathname where + object was found */ + ElfW(Dyn) *l_ld; /* Dynamic section of the + shared object */ + struct link_map *l_next, *l_prev; + /* Chain of loaded objects */ + + /* Plus additional fields private to the + implementation */ +}; +.EE +.in +.TP +.BR RTLD_DI_ORIGIN " (\fIchar *\fP)" +Copy the pathname of the origin of the shared object corresponding to +.I handle +to the location pointed to by +.IR info . +.TP +.BR RTLD_DI_SERINFO " (\fIDl_serinfo *\fP)" +Obtain the library search paths for the shared object referred to by +.IR handle . +The +.I info +argument is a pointer to a +.I Dl_serinfo +that contains the search paths. +Because the number of search paths may vary, +the size of the structure pointed to by +.I info +can vary. +The +.B RTLD_DI_SERINFOSIZE +request described below allows applications to size the buffer suitably. +The caller must perform the following steps: +.RS +.IP (1) 5 +Use a +.B RTLD_DI_SERINFOSIZE +request to populate a +.I Dl_serinfo +structure with the size +.RI ( dls_size ) +of the structure needed for the subsequent +.B RTLD_DI_SERINFO +request. +.IP (2) +Allocate a +.I Dl_serinfo +buffer of the correct size +.RI ( dls_size ). +.IP (3) +Use a further +.B RTLD_DI_SERINFOSIZE +request to populate the +.I dls_size +and +.I dls_cnt +fields of the buffer allocated in the previous step. +.IP (4) +Use a +.B RTLD_DI_SERINFO +to obtain the library search paths. +.RE +.IP +The +.I Dl_serinfo +structure is defined as follows: +.IP +.in +4n +.EX +typedef struct { + size_t dls_size; /* Size in bytes of + the whole buffer */ + unsigned int dls_cnt; /* Number of elements + in \[aq]dls_serpath\[aq] */ + Dl_serpath dls_serpath[1]; /* Actually longer, + \[aq]dls_cnt\[aq] elements */ +} Dl_serinfo; +.EE +.in +.IP +Each of the +.I dls_serpath +elements in the above structure is a structure of the following form: +.IP +.in +4n +.EX +typedef struct { + char *dls_name; /* Name of library search + path directory */ + unsigned int dls_flags; /* Indicates where this + directory came from */ +} Dl_serpath; +.EE +.in +.IP +The +.I dls_flags +field is currently unused, and always contains zero. +.TP +.BR RTLD_DI_SERINFOSIZE " (\fIDl_serinfo *\fP)" +Populate the +.I dls_size +and +.I dls_cnt +fields of the +.I Dl_serinfo +structure pointed to by +.I info +with values suitable for allocating a buffer for use in a subsequent +.B RTLD_DI_SERINFO +request. +.TP +.BR RTLD_DI_TLS_MODID " (\fIsize_t *\fP, since glibc 2.4)" +Obtain the module ID of this shared object's TLS (thread-local storage) +segment, as used in TLS relocations. +If this object does not define a TLS segment, zero is placed in +.IR *info . +.TP +.BR RTLD_DI_TLS_DATA " (\fIvoid **\fP, since glibc 2.4)" +Obtain a pointer to the calling +thread's TLS block corresponding to this shared object's TLS segment. +If this object does not define a PT_TLS segment, +or if the calling thread has not allocated a block for it, +NULL is placed in +.IR *info . +.SH RETURN VALUE +On success, +.BR dlinfo () +returns 0. +On failure, it returns \-1; the cause of the error can be diagnosed using +.BR dlerror (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dlinfo () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The sets of requests supported by the various implementations +overlaps only partially. +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.3.3. +Solaris. +.SH EXAMPLES +The program below opens a shared objects using +.BR dlopen (3) +and then uses the +.B RTLD_DI_SERINFOSIZE +and +.B RTLD_DI_SERINFO +requests to obtain the library search path list for the library. +Here is an example of what we might see when running the program: +.PP +.in +4n +.EX +$ \fB./a.out /lib64/libm.so.6\fP +dls_serpath[0].dls_name = /lib64 +dls_serpath[1].dls_name = /usr/lib64 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (dlinfo.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + void *handle; + Dl_serinfo serinfo; + Dl_serinfo *sip; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + /* Obtain a handle for shared object specified on command line. */ + + handle = dlopen(argv[1], RTLD_NOW); + if (handle == NULL) { + fprintf(stderr, "dlopen() failed: %s\en", dlerror()); + exit(EXIT_FAILURE); + } + + /* Discover the size of the buffer that we must pass to + RTLD_DI_SERINFO. */ + + if (dlinfo(handle, RTLD_DI_SERINFOSIZE, &serinfo) == \-1) { + fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror()); + exit(EXIT_FAILURE); + } + + /* Allocate the buffer for use with RTLD_DI_SERINFO. */ + + sip = malloc(serinfo.dls_size); + if (sip == NULL) { + perror("malloc"); + exit(EXIT_FAILURE); + } + + /* Initialize the \[aq]dls_size\[aq] and \[aq]dls_cnt\[aq] fields in the newly + allocated buffer. */ + + if (dlinfo(handle, RTLD_DI_SERINFOSIZE, sip) == \-1) { + fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror()); + exit(EXIT_FAILURE); + } + + /* Fetch and print library search list. */ + + if (dlinfo(handle, RTLD_DI_SERINFO, sip) == \-1) { + fprintf(stderr, "RTLD_DI_SERINFO failed: %s\en", dlerror()); + exit(EXIT_FAILURE); + } + + for (size_t j = 0; j < serinfo.dls_cnt; j++) + printf("dls_serpath[%zu].dls_name = %s\en", + j, sip\->dls_serpath[j].dls_name); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR dl_iterate_phdr (3), +.BR dladdr (3), +.BR dlerror (3), +.BR dlopen (3), +.BR dlsym (3), +.BR ld.so (8) diff --git a/upstream/opensuse-leap-15-6/man3/dlopen.3 b/upstream/opensuse-leap-15-6/man3/dlopen.3 new file mode 100644 index 00000000..8652d909 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dlopen.3 @@ -0,0 +1,627 @@ +'\" t +.\" Copyright 1995 Yggdrasil Computing, Incorporated. +.\" written by Adam J. Richter (adam@yggdrasil.com), +.\" with typesetting help from Daniel Quinlan (quinlan@yggdrasil.com). +.\" and Copyright 2003, 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified by David A. Wheeler 2000-11-28. +.\" Applied patch by Terran Melconian, aeb, 2001-12-14. +.\" Modified by Hacksaw 2003-03-13. +.\" Modified by Matt Domsch, 2003-04-09: _init and _fini obsolete +.\" Modified by Michael Kerrisk 2003-05-16. +.\" Modified by Walter Harms: dladdr, dlvsym +.\" Modified by Petr Baudis , 2008-12-04: dladdr caveat +.\" +.TH dlopen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dlclose, dlopen, dlmopen \- +open and close a shared object +.SH LIBRARY +Dynamic linking library +.RI ( libdl ", " \-ldl ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *dlopen(const char *" filename ", int " flags ); +.BI "int dlclose(void *" handle ); +.PP +.B #define _GNU_SOURCE +.br +.B #include +.PP +.BI "void *dlmopen(Lmid_t " lmid ", const char *" filename ", int " flags ); +.fi +.SH DESCRIPTION +.SS dlopen() +The function +.BR dlopen () +loads the dynamic shared object (shared library) +file named by the null-terminated +string +.I filename +and returns an opaque "handle" for the loaded object. +This handle is employed with other functions in the dlopen API, such as +.BR dlsym (3), +.BR dladdr (3), +.BR dlinfo (3), +and +.BR dlclose (). +.PP +If +.I filename +.\" FIXME On Solaris, when handle is NULL, we seem to get back +.\" a handle for (something like) the root of the namespace. +.\" The point here is that if we do a dlmopen(LM_ID_NEWLM), then +.\" the filename==NULL case returns a different handle than +.\" in the initial namespace. But, on glibc, the same handle is +.\" returned. This is probably a bug in glibc. +.\" +is NULL, then the returned handle is for the main program. +If +.I filename +contains a slash ("/"), then it is interpreted as a (relative +or absolute) pathname. +Otherwise, the dynamic linker searches for the object as follows +(see +.BR ld.so (8) +for further details): +.IP \[bu] 3 +(ELF only) If the calling object +(i.e., the shared library or executable from which +.BR dlopen () +is called) +contains a DT_RPATH tag, and does not contain a DT_RUNPATH tag, +then the directories listed in the DT_RPATH tag are searched. +.IP \[bu] +If, at the time that the program was started, the environment variable +.B LD_LIBRARY_PATH +was defined to contain a colon-separated list of directories, +then these are searched. +(As a security measure, this variable is ignored for set-user-ID and +set-group-ID programs.) +.IP \[bu] +(ELF only) If the calling object +contains a DT_RUNPATH tag, then the directories listed in that tag +are searched. +.IP \[bu] +The cache file +.I /etc/ld.so.cache +(maintained by +.BR ldconfig (8)) +is checked to see whether it contains an entry for +.IR filename . +.IP \[bu] +The directories +.I /lib +and +.I /usr/lib +are searched (in that order). +.PP +If the object specified by +.I filename +has dependencies on other shared objects, +then these are also automatically loaded by the dynamic linker +using the same rules. +(This process may occur recursively, +if those objects in turn have dependencies, and so on.) +.PP +One of the following two values must be included in +.IR flags : +.TP +.B RTLD_LAZY +Perform lazy binding. +Resolve symbols only as the code that references them is executed. +If the symbol is never referenced, then it is never resolved. +(Lazy binding is performed only for function references; +references to variables are always immediately bound when +the shared object is loaded.) +Since glibc 2.1.1, +.\" commit 12b5b6b7f78ea111e89bbf638294a5413c791072 +this flag is overridden by the effect of the +.B LD_BIND_NOW +environment variable. +.TP +.B RTLD_NOW +If this value is specified, or the environment variable +.B LD_BIND_NOW +is set to a nonempty string, +all undefined symbols in the shared object are resolved before +.BR dlopen () +returns. +If this cannot be done, an error is returned. +.PP +Zero or more of the following values may also be ORed in +.IR flags : +.TP +.B RTLD_GLOBAL +The symbols defined by this shared object will be +made available for symbol resolution of subsequently loaded shared objects. +.TP +.B RTLD_LOCAL +This is the converse of +.BR RTLD_GLOBAL , +and the default if neither flag is specified. +Symbols defined in this shared object are not made available to resolve +references in subsequently loaded shared objects. +.TP +.BR RTLD_NODELETE " (since glibc 2.2)" +Do not unload the shared object during +.BR dlclose (). +Consequently, the object's static and global variables are not reinitialized +if the object is reloaded with +.BR dlopen () +at a later time. +.TP +.BR RTLD_NOLOAD " (since glibc 2.2)" +Don't load the shared object. +This can be used to test if the object is already resident +.RB ( dlopen () +returns NULL if it is not, or the object's handle if it is resident). +This flag can also be used to promote the flags on a shared object +that is already loaded. +For example, a shared object that was previously loaded with +.B RTLD_LOCAL +can be reopened with +.BR RTLD_NOLOAD\ |\ RTLD_GLOBAL . +.\" +.TP +.BR RTLD_DEEPBIND " (since glibc 2.3.4)" +.\" Inimitably described by UD in +.\" http://sources.redhat.com/ml/libc-hacker/2004-09/msg00083.html. +Place the lookup scope of the symbols in this +shared object ahead of the global scope. +This means that a self-contained object will use +its own symbols in preference to global symbols with the same name +contained in objects that have already been loaded. +.PP +If +.I filename +is NULL, then the returned handle is for the main program. +When given to +.BR dlsym (3), +this handle causes a search for a symbol in the main program, +followed by all shared objects loaded at program startup, +and then all shared objects loaded by +.BR dlopen () +with the flag +.BR RTLD_GLOBAL . +.PP +Symbol references in the shared object are resolved using (in order): +symbols in the link map of objects loaded for the main program and its +dependencies; +symbols in shared objects (and their dependencies) +that were previously opened with +.BR dlopen () +using the +.B RTLD_GLOBAL +flag; +and definitions in the shared object itself +(and any dependencies that were loaded for that object). +.PP +Any global symbols in the executable that were placed into +its dynamic symbol table by +.BR ld (1) +can also be used to resolve references in a dynamically loaded shared object. +Symbols may be placed in the dynamic symbol table +either because the executable was linked with the flag "\-rdynamic" +(or, synonymously, "\-\-export\-dynamic"), which causes all of +the executable's global symbols to be placed in the dynamic symbol table, +or because +.BR ld (1) +noted a dependency on a symbol in another object during static linking. +.PP +If the same shared object is opened again with +.BR dlopen (), +the same object handle is returned. +The dynamic linker maintains reference +counts for object handles, so a dynamically loaded shared object is not +deallocated until +.BR dlclose () +has been called on it as many times as +.BR dlopen () +has succeeded on it. +Constructors (see below) are called only when the object is actually loaded +into memory (i.e., when the reference count increases to 1). +.PP +A subsequent +.BR dlopen () +call that loads the same shared object with +.B RTLD_NOW +may force symbol resolution for a shared object earlier loaded with +.BR RTLD_LAZY . +Similarly, an object that was previously opened with +.B RTLD_LOCAL +can be promoted to +.B RTLD_GLOBAL +in a subsequent +.BR dlopen (). +.PP +If +.BR dlopen () +fails for any reason, it returns NULL. +.\" +.SS dlmopen() +This function performs the same task as +.BR dlopen ()\[em]the +.I filename +and +.I flags +arguments, as well as the return value, are the same, +except for the differences noted below. +.PP +The +.BR dlmopen () +function differs from +.BR dlopen () +primarily in that it accepts an additional argument, +.IR lmid , +that specifies the link-map list (also referred to as a +.IR namespace ) +in which the shared object should be loaded. +(By comparison, +.BR dlopen () +adds the dynamically loaded shared object to the same namespace as +the shared object from which the +.BR dlopen () +call is made.) +The +.I Lmid_t +type is an opaque handle that refers to a namespace. +.PP +The +.I lmid +argument is either the ID of an existing namespace +.\" FIXME: Is using dlinfo() RTLD_DI_LMID the right technique? +(which can be obtained using the +.BR dlinfo (3) +.B RTLD_DI_LMID +request) or one of the following special values: +.TP +.B LM_ID_BASE +Load the shared object in the initial namespace +(i.e., the application's namespace). +.TP +.B LM_ID_NEWLM +Create a new namespace and load the shared object in that namespace. +The object must have been correctly linked +to reference all of the other shared objects that it requires, +since the new namespace is initially empty. +.PP +If +.I filename +is NULL, then the only permitted value for +.I lmid +is +.BR LM_ID_BASE . +.SS dlclose() +The function +.BR dlclose () +decrements the reference count on the +dynamically loaded shared object referred to by +.IR handle . +.PP +If the object's reference count drops to zero +and no symbols in this object are required by other objects, +then the object is unloaded +after first calling any destructors defined for the object. +(Symbols in this object might be required in another object +because this object was opened with the +.B RTLD_GLOBAL +flag and one of its symbols satisfied a relocation in another object.) +.PP +All shared objects that were automatically loaded when +.BR dlopen () +was invoked on the object referred to by +.I handle +are recursively closed in the same manner. +.PP +A successful return from +.BR dlclose () +does not guarantee that the symbols associated with +.I handle +are removed from the caller's address space. +In addition to references resulting from explicit +.BR dlopen () +calls, a shared object may have been implicitly loaded +(and reference counted) because of dependencies in other shared objects. +Only when all references have been released can the shared object +be removed from the address space. +.SH RETURN VALUE +On success, +.BR dlopen () +and +.BR dlmopen () +return a non-NULL handle for the loaded object. +On error +(file could not be found, was not readable, had the wrong format, +or caused errors during loading), +these functions return NULL. +.PP +On success, +.BR dlclose () +returns 0; on error, it returns a nonzero value. +.PP +Errors from these functions can be diagnosed using +.BR dlerror (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dlopen (), +.BR dlmopen (), +.BR dlclose () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR dlopen () +.TQ +.BR dlclose () +POSIX.1-2008. +.TP +.BR dlmopen () +.TQ +.B RTLD_NOLOAD +.TQ +.B RTLD_NODELETE +GNU. +.TP +.B RTLD_DEEPBIND +Solaris. +.SH HISTORY +.TP +.BR dlopen () +.TQ +.BR dlclose () +glibc 2.0. +POSIX.1-2001. +.TP +.BR dlmopen () +glibc 2.3.4. +.SH NOTES +.SS dlmopen() and namespaces +A link-map list defines an isolated namespace for the +resolution of symbols by the dynamic linker. +Within a namespace, +dependent shared objects are implicitly loaded according to the usual rules, +and symbol references are likewise resolved according to the usual rules, +but such resolution is confined to the definitions provided by the +objects that have been (explicitly and implicitly) loaded into the namespace. +.PP +The +.BR dlmopen () +function permits object-load isolation\[em]the ability +to load a shared object in a new namespace without +exposing the rest of the application to the symbols +made available by the new object. +Note that the use of the +.B RTLD_LOCAL +flag is not sufficient for this purpose, +since it prevents a shared object's symbols from being available to +.I any +other shared object. +In some cases, +we may want to make the symbols provided by a dynamically +loaded shared object available to (a subset of) other shared objects +without exposing those symbols to the entire application. +This can be achieved by using a separate namespace and the +.B RTLD_GLOBAL +flag. +.PP +The +.BR dlmopen () +function also can be used to provide better isolation than the +.B RTLD_LOCAL +flag. +In particular, shared objects loaded with +.B RTLD_LOCAL +may be promoted to +.B RTLD_GLOBAL +if they are dependencies of another shared object loaded with +.BR RTLD_GLOBAL . +Thus, +.B RTLD_LOCAL +is insufficient to isolate a loaded shared object except in the (uncommon) +case where one has explicit control over all shared object dependencies. +.PP +Possible uses of +.BR dlmopen () +are plugins where the author of the plugin-loading framework +can't trust the plugin authors and does not wish +any undefined symbols from the plugin framework to be resolved to plugin +symbols. +Another use is to load the same object more than once. +Without the use of +.BR dlmopen (), +this would require the creation of distinct copies of the shared object file. +Using +.BR dlmopen (), +this can be achieved by loading the same shared object file into +different namespaces. +.PP +The glibc implementation supports a maximum of +.\" DL_NNS +16 namespaces. +.\" +.SS Initialization and finalization functions +Shared objects may export functions using the +.B __attribute__((constructor)) +and +.B __attribute__((destructor)) +function attributes. +Constructor functions are executed before +.BR dlopen () +returns, and destructor functions are executed before +.BR dlclose () +returns. +A shared object may export multiple constructors and destructors, +and priorities can be associated with each function +to determine the order in which they are executed. +See the +.B gcc +info pages (under "Function attributes") +.\" info gcc "C Extensions" "Function attributes" +for further information. +.PP +An older method of (partially) achieving the same result is via the use of +two special symbols recognized by the linker: +.B _init +and +.BR _fini . +If a dynamically loaded shared object exports a routine named +.BR _init (), +then that code is executed after loading a shared object, before +.BR dlopen () +returns. +If the shared object exports a routine named +.BR _fini (), +then that routine is called just before the object is unloaded. +In this case, one must avoid linking against the system startup files, +which contain default versions of these files; +this can be done by using the +.BR gcc (1) +.I \-nostartfiles +command-line option. +.PP +Use of +.B _init +and +.B _fini +is now deprecated in favor of the aforementioned +constructors and destructors, +which among other advantages, +permit multiple initialization and finalization functions to be defined. +.\" +.\" Using these routines, or the gcc +.\" .B \-nostartfiles +.\" or +.\" .B \-nostdlib +.\" options, is not recommended. +.\" Their use may result in undesired behavior, +.\" since the constructor/destructor routines will not be executed +.\" (unless special measures are taken). +.\" .\" void _init(void) __attribute__((constructor)); +.\" .\" void _fini(void) __attribute__((destructor)); +.\" +.PP +Since glibc 2.2.3, +.BR atexit (3) +can be used to register an exit handler that is automatically +called when a shared object is unloaded. +.SS History +These functions are part of the dlopen API, derived from SunOS. +.SH BUGS +As at glibc 2.24, specifying the +.B RTLD_GLOBAL +flag when calling +.BR dlmopen () +.\" dlerror(): "invalid mode" +generates an error. +Furthermore, specifying +.B RTLD_GLOBAL +when calling +.BR dlopen () +results in a program crash +.RB ( SIGSEGV ) +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=18684 +if the call is made from any object loaded in a +namespace other than the initial namespace. +.SH EXAMPLES +The program below loads the (glibc) math library, +looks up the address of the +.BR cos (3) +function, and prints the cosine of 2.0. +The following is an example of building and running the program: +.PP +.in +4n +.EX +$ \fBcc dlopen_demo.c \-ldl\fP +$ \fB./a.out\fP +\-0.416147 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (dlopen.c) +.EX +#include +#include +#include + +#include /* Defines LIBM_SO (which will be a + string such as "libm.so.6") */ +int +main(void) +{ + void *handle; + double (*cosine)(double); + char *error; + + handle = dlopen(LIBM_SO, RTLD_LAZY); + if (!handle) { + fprintf(stderr, "%s\en", dlerror()); + exit(EXIT_FAILURE); + } + + dlerror(); /* Clear any existing error */ + + cosine = (double (*)(double)) dlsym(handle, "cos"); + + /* According to the ISO C standard, casting between function + pointers and \[aq]void *\[aq], as done above, produces undefined results. + POSIX.1\-2001 and POSIX.1\-2008 accepted this state of affairs and + proposed the following workaround: + + *(void **) (&cosine) = dlsym(handle, "cos"); + + This (clumsy) cast conforms with the ISO C standard and will + avoid any compiler warnings. + + The 2013 Technical Corrigendum 1 to POSIX.1\-2008 improved matters + by requiring that conforming implementations support casting + \[aq]void *\[aq] to a function pointer. Nevertheless, some compilers + (e.g., gcc with the \[aq]\-pedantic\[aq] option) may complain about the + cast used in this program. */ +.\" http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08 +.\" http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07 +.\" http://austingroupbugs.net/view.php?id=74 + + error = dlerror(); + if (error != NULL) { + fprintf(stderr, "%s\en", error); + exit(EXIT_FAILURE); + } + + printf("%f\en", (*cosine)(2.0)); + dlclose(handle); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR ld (1), +.BR ldd (1), +.BR pldd (1), +.BR dl_iterate_phdr (3), +.BR dladdr (3), +.BR dlerror (3), +.BR dlinfo (3), +.BR dlsym (3), +.BR rtld\-audit (7), +.BR ld.so (8), +.BR ldconfig (8) +.PP +gcc info pages, ld info pages diff --git a/upstream/opensuse-leap-15-6/man3/dlsym.3 b/upstream/opensuse-leap-15-6/man3/dlsym.3 new file mode 100644 index 00000000..db9c066c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dlsym.3 @@ -0,0 +1,174 @@ +'\" t +.\" Copyright 1995 Yggdrasil Computing, Incorporated. +.\" and Copyright 2003, 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH dlsym 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dlsym, dlvsym \- obtain address of a symbol in a shared object or executable +.SH LIBRARY +Dynamic linking library +.RI ( libdl ", " \-ldl ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *dlsym(void *restrict " handle ", const char *restrict " symbol ); +.PP +.B #define _GNU_SOURCE +.B #include +.PP +.BI "void *dlvsym(void *restrict " handle ", const char *restrict " symbol , +.BI " const char *restrict " version ); +.fi +.SH DESCRIPTION +The function +.BR dlsym () +takes a "handle" of a dynamic loaded shared object returned by +.BR dlopen (3) +along with a null-terminated symbol name, +and returns the address where that symbol is +loaded into memory. +If the symbol is not found, in the specified +object or any of the shared objects that were automatically loaded by +.BR dlopen (3) +when that object was loaded, +.BR dlsym () +returns NULL. +(The search performed by +.BR dlsym () +is breadth first through the dependency tree of these shared objects.) +.PP +In unusual cases (see NOTES) the value of the symbol could actually be NULL. +Therefore, a NULL return from +.BR dlsym () +need not indicate an error. +The correct way to distinguish an error from a symbol whose value is NULL +is to call +.BR dlerror (3) +to clear any old error conditions, then call +.BR dlsym (), +and then call +.BR dlerror (3) +again, saving its return value into a variable, and check whether +this saved value is not NULL. +.PP +There are two special pseudo-handles that may be specified in +.IR handle : +.TP +.B RTLD_DEFAULT +Find the first occurrence of the desired symbol +using the default shared object search order. +The search will include global symbols in the executable +and its dependencies, +as well as symbols in shared objects that were dynamically loaded with the +.B RTLD_GLOBAL +flag. +.TP +.B RTLD_NEXT +Find the next occurrence of the desired symbol in the search order +after the current object. +This allows one to provide a wrapper +around a function in another shared object, so that, for example, +the definition of a function in a preloaded shared object +(see +.B LD_PRELOAD +in +.BR ld.so (8)) +can find and invoke the "real" function provided in another shared object +(or for that matter, the "next" definition of the function in cases +where there are multiple layers of preloading). +.PP +The +.B _GNU_SOURCE +feature test macro must be defined in order to obtain the +definitions of +.B RTLD_DEFAULT +and +.B RTLD_NEXT +from +.IR . +.PP +The function +.BR dlvsym () +does the same as +.BR dlsym () +but takes a version string as an additional argument. +.SH RETURN VALUE +On success, +these functions return the address associated with +.IR symbol . +On failure, they return NULL; +the cause of the error can be diagnosed using +.BR dlerror (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dlsym (), +.BR dlvsym () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR dlsym () +POSIX.1-2008. +.TP +.BR dlvsym () +GNU. +.SH HISTORY +.TP +.BR dlsym () +glibc 2.0. +POSIX.1-2001. +.TP +.BR dlvsym () +glibc 2.1. +.SH NOTES +There are several scenarios when the address of a global symbol is NULL. +For example, a symbol can be placed at zero address by the linker, via +a linker script or with +.I \-\-defsym +command-line option. +Undefined weak symbols also have NULL value. +Finally, the symbol value may be the result of +a GNU indirect function (IFUNC) resolver function that returns +NULL as the resolved value. +In the latter case, +.BR dlsym () +also returns NULL without error. +However, in the former two cases, the +behavior of GNU dynamic linker is inconsistent: relocation processing +succeeds and the symbol can be observed to have NULL value, but +.BR dlsym () +fails and +.BR dlerror () +indicates a lookup error. +.\" +.SS History +The +.BR dlsym () +function is part of the dlopen API, derived from SunOS. +That system does not have +.BR dlvsym (). +.SH EXAMPLES +See +.BR dlopen (3). +.SH SEE ALSO +.BR dl_iterate_phdr (3), +.BR dladdr (3), +.BR dlerror (3), +.BR dlinfo (3), +.BR dlopen (3), +.BR ld.so (8) diff --git a/upstream/opensuse-leap-15-6/man3/drand48.3 b/upstream/opensuse-leap-15-6/man3/drand48.3 new file mode 100644 index 00000000..4776fc48 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/drand48.3 @@ -0,0 +1,263 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 19:46:03 1993 by Rik Faith (faith@cs.unc.edu) +.TH drand48 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, +lcong48 \- generate uniformly distributed pseudo-random numbers +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B double drand48(void); +.BI "double erand48(unsigned short " xsubi [3]); +.PP +.B long lrand48(void); +.BI "long nrand48(unsigned short " xsubi [3]); +.PP +.B long mrand48(void); +.BI "long jrand48(unsigned short " xsubi [3]); +.PP +.BI "void srand48(long " seedval ); +.BI "unsigned short *seed48(unsigned short " seed16v [3]); +.BI "void lcong48(unsigned short " param [7]); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.\" .BR drand48 (), +.\" .BR erand48 (), +.\" .BR lrand48 (), +.\" .BR nrand48 (), +.\" .BR mrand48 (), +.\" .BR jrand48 (), +.\" .BR srand48 (), +.\" .BR seed48 (), +.\" .BR lcong48 (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions generate pseudo-random numbers using the linear congruential +algorithm and 48-bit integer arithmetic. +.PP +The +.BR drand48 () +and +.BR erand48 () +functions return nonnegative +double-precision floating-point values uniformly distributed over the interval +[0.0,\ 1.0). +.PP +The +.BR lrand48 () +and +.BR nrand48 () +functions return nonnegative +long integers uniformly distributed over the interval [0,\ 2\[ha]31). +.PP +The +.BR mrand48 () +and +.BR jrand48 () +functions return signed long +integers uniformly distributed over the interval [\-2\[ha]31,\ 2\[ha]31). +.PP +The +.BR srand48 (), +.BR seed48 (), +and +.BR lcong48 () +functions are +initialization functions, one of which should be called before using +.BR drand48 (), +.BR lrand48 (), +or +.BR mrand48 (). +The functions +.BR erand48 (), +.BR nrand48 (), +and +.BR jrand48 () +do not require +an initialization function to be called first. +.PP +All the functions work by generating a sequence of 48-bit integers, +.IR Xi , +according to the linear congruential formula: +.PP +.in +4n +.EX +.B Xn+1 = (aXn + c) mod m, where n >= 0 +.EE +.in +.PP +The parameter +.I m += 2\[ha]48, hence 48-bit integer arithmetic is performed. +Unless +.BR lcong48 () +is called, +.I a +and +.I c +are given by: +.PP +.in +4n +.EX +.B a = 0x5DEECE66D +.B c = 0xB +.EE +.in +.PP +The value returned by any of the functions +.BR drand48 (), +.BR erand48 (), +.BR lrand48 (), +.BR nrand48 (), +.BR mrand48 (), +or +.BR jrand48 () +is +computed by first generating the next 48-bit +.I Xi +in the sequence. +Then the appropriate number of bits, according to the type of data item to +be returned, is copied from the high-order bits of +.I Xi +and transformed +into the returned value. +.PP +The functions +.BR drand48 (), +.BR lrand48 (), +and +.BR mrand48 () +store +the last 48-bit +.I Xi +generated in an internal buffer. +The functions +.BR erand48 (), +.BR nrand48 (), +and +.BR jrand48 () +require the calling +program to provide storage for the successive +.I Xi +values in the array +argument +.IR xsubi . +The functions are initialized by placing the initial +value of +.I Xi +into the array before calling the function for the first +time. +.PP +The initializer function +.BR srand48 () +sets the high order 32-bits of +.I Xi +to the argument +.IR seedval . +The low order 16-bits are set +to the arbitrary value 0x330E. +.PP +The initializer function +.BR seed48 () +sets the value of +.I Xi +to +the 48-bit value specified in the array argument +.IR seed16v . +The +previous value of +.I Xi +is copied into an internal buffer and a +pointer to this buffer is returned by +.BR seed48 (). +.PP +The initialization function +.BR lcong48 () +allows the user to specify +initial values for +.IR Xi , +.IR a , +and +.IR c . +Array argument +elements +.I param[0\-2] +specify +.IR Xi , +.I param[3\-5] +specify +.IR a , +and +.I param[6] +specifies +.IR c . +After +.BR lcong48 () +has been called, a subsequent call to either +.BR srand48 () +or +.BR seed48 () +will restore the standard values of +.I a +and +.IR c . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR drand48 (), +.BR erand48 (), +.BR lrand48 (), +.BR nrand48 (), +.BR mrand48 (), +.BR jrand48 (), +.BR srand48 (), +.BR seed48 (), +.BR lcong48 () +T} Thread safety T{ +MT-Unsafe race:drand48 +T} +.TE +.hy +.ad +.sp 1 +.PP +The above +functions record global state information for the random number generator, +so they are not thread-safe. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4. +.SH SEE ALSO +.BR rand (3), +.BR random (3) diff --git a/upstream/opensuse-leap-15-6/man3/drand48_r.3 b/upstream/opensuse-leap-15-6/man3/drand48_r.3 new file mode 100644 index 00000000..cd79354e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/drand48_r.3 @@ -0,0 +1,107 @@ +'\" t +.\" Copyright 2003 Walter Harms, 2004 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Created 2004-10-31. Text taken from a page by Walter Harms, 2003-09-08 +.\" +.TH drand48_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r, +srand48_r, seed48_r, lcong48_r +\- generate uniformly distributed pseudo-random numbers reentrantly +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int drand48_r(struct drand48_data *restrict " buffer , +.BI " double *restrict " result ); +.BI "int erand48_r(unsigned short " xsubi [3] "," +.BI " struct drand48_data *restrict "buffer , +.BI " double *restrict " result ");" +.PP +.BI "int lrand48_r(struct drand48_data *restrict " buffer , +.BI " long *restrict " result ); +.BI "int nrand48_r(unsigned short " xsubi[3] "," +.BI " struct drand48_data *restrict "buffer , +.BI " long *restrict " result ");" +.PP +.BI "int mrand48_r(struct drand48_data *restrict " buffer , +.BI " long *restrict " result ");" +.BI "int jrand48_r(unsigned short " xsubi[3] "," +.BI " struct drand48_data *restrict " buffer , +.BI " long *restrict " result ");" +.PP +.BI "int srand48_r(long int " seedval ", struct drand48_data *" buffer ");" +.BI "int seed48_r(unsigned short " seed16v[3] ", struct drand48_data *" buffer ); +.BI "int lcong48_r(unsigned short " param[7] ", struct drand48_data *" buffer ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.\" .BR drand48_r (), +.\" .BR erand48_r (), +.\" .BR lrand48_r (), +.\" .BR nrand48_r (), +.\" .BR mrand48_r (), +.\" .BR jrand48_r (), +.\" .BR srand48_r (), +.\" .BR seed48_r (), +.\" .BR lcong48_r (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +These functions are the reentrant analogs of the functions described in +.BR drand48 (3). +Instead of modifying the global random generator state, they use +the supplied data +.IR buffer . +.PP +Before the first use, this struct must be initialized, for example, +by filling it with zeros, or by calling one of the functions +.BR srand48_r (), +.BR seed48_r (), +or +.BR lcong48_r (). +.SH RETURN VALUE +The return value is 0. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR drand48_r (), +.BR erand48_r (), +.BR lrand48_r (), +.BR nrand48_r (), +.BR mrand48_r (), +.BR jrand48_r (), +.BR srand48_r (), +.BR seed48_r (), +.BR lcong48_r () +T} Thread safety MT-Safe race:buffer +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR drand48 (3), +.BR rand (3), +.BR random (3) diff --git a/upstream/opensuse-leap-15-6/man3/driver.3form b/upstream/opensuse-leap-15-6/man3/driver.3form new file mode 100644 index 00000000..5ab01b97 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/driver.3form @@ -0,0 +1,261 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_driver.3x,v 1.28 2017/11/18 23:47:37 tom Exp $ +.TH driver 3FORM "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBform_driver\fR, +\fBform_driver_w\fR \- command-processing loop of the form system +.SH SYNOPSIS +\fB#include \fR +.br +\fBint form_driver(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB);\fP +.br +\fBint form_driver_w(FORM *\fP\fIform\fP\fB, int \fP\fIc\fP\fB, wchar_t \fP\fIwch\fP\fB);\fP +.br +.SH DESCRIPTION +.SS form_driver +Once a form has been posted (displayed), you should funnel input events to it +through \fBform_driver\fR. This routine has three major input cases: +.bP +The input is a form navigation request. +Navigation request codes are constants defined in \fB\fP, +which are distinct from the key- and character codes returned by \fBwgetch\fP(3X). +.bP +The input is a printable character. +Printable characters (which must be positive, less than 256) are +checked according to the program's locale settings. +.bP +The input is the KEY_MOUSE special key associated with an mouse event. +.SS form_driver_w +.PP +This extension simplifies the use of the forms library using wide characters. +The input is either a key code (a request) or a wide character +returned by \fBget_wch\fP(3X). +The type must be passed as well, +to enable the library to determine whether the parameter +is a wide character or a request. +.SS Form-driver requests +.PP +The form driver requests are as follows: +.TS +l l +_ _ +l l. +\fIName\fR \fIDescription\fR +REQ_BEG_FIELD Move to the beginning of the field. +REQ_BEG_LINE Move to the beginning of the line. +REQ_CLR_EOF Clear to end of field from cursor. +REQ_CLR_EOL Clear to end of line from cursor. +REQ_CLR_FIELD Clear the entire field. +REQ_DEL_CHAR Delete character at the cursor. +REQ_DEL_LINE Delete line at the cursor. +REQ_DEL_PREV Delete character before the cursor. +REQ_DEL_WORD Delete blank-delimited word at the cursor. +REQ_DOWN_CHAR Move down in the field. +REQ_DOWN_FIELD Move down to a field. +REQ_END_FIELD Move to the end of the field. +REQ_END_LINE Move to the end of the line. +REQ_FIRST_FIELD Move to the first field. +REQ_FIRST_PAGE Move to the first page. +REQ_INS_CHAR Insert a blank at the cursor. +REQ_INS_LINE Insert a blank line at the cursor. +REQ_INS_MODE Enter insert mode. +REQ_LAST_FIELD Move to the last field. +REQ_LAST_PAGE Move to the last field. +REQ_LEFT_CHAR Move left in the field. +REQ_LEFT_FIELD Move left to a field. +REQ_NEW_LINE Insert or overlay a new line. +REQ_NEXT_CHAR Move to the next char. +REQ_NEXT_CHOICE Display next field choice. +REQ_NEXT_FIELD Move to the next field. +REQ_NEXT_LINE Move to the next line. +REQ_NEXT_PAGE Move to the next page. +REQ_NEXT_PAGE Move to the next page. +REQ_NEXT_WORD Move to the next word. +REQ_OVL_MODE Enter overlay mode. +REQ_PREV_CHAR Move to the previous char. +REQ_PREV_CHOICE Display previous field choice. +REQ_PREV_FIELD Move to the previous field. +REQ_PREV_LINE Move to the previous line. +REQ_PREV_PAGE Move to the previous page. +REQ_PREV_WORD Move to the previous word. +REQ_RIGHT_CHAR Move right in the field. +REQ_RIGHT_FIELD Move right to a field. +REQ_SCR_BCHAR Scroll the field backward a character. +REQ_SCR_BHPAGE Scroll the field backward half a page. +REQ_SCR_BLINE Scroll the field backward a line. +REQ_SCR_BPAGE Scroll the field backward a page. +REQ_SCR_FCHAR Scroll the field forward a character. +REQ_SCR_FHPAGE Scroll the field forward half a page. +REQ_SCR_FLINE Scroll the field forward a line. +REQ_SCR_FPAGE Scroll the field forward a page. +REQ_SCR_HBHALF Horizontal scroll the field backward half a line. +REQ_SCR_HBLINE Horizontal scroll the field backward a line. +REQ_SCR_HFHALF Horizontal scroll the field forward half a line. +REQ_SCR_HFLINE Horizontal scroll the field forward a line. +REQ_SFIRST_FIELD Move to the sorted first field. +REQ_SLAST_FIELD Move to the sorted last field. +REQ_SNEXT_FIELD Move to the sorted next field. +REQ_SPREV_FIELD Move to the sorted previous field. +REQ_UP_CHAR Move up in the field. +REQ_UP_FIELD Move up to a field. +REQ_VALIDATION Validate field. +.TE +.PP +If the second argument is a printable character, the driver places it +in the current position in the current field. If it is one of the forms +requests listed above, that request is executed. +.SS Field validation +The form library makes updates to the window associated with form fields rather than +directly to the field buffers. +.PP +The form driver provides low-level control over updates to the form fields. +The form driver also provides for validating modified fields to ensure that the contents +meet whatever constraints an application may attach using \fBset_field_type\fP. +.PP +.PP +You can validate a field without making any changes to it using +\fBREQ_VALIDATION\fP. +The form driver also validates a field in these cases: +.bP +a call to \fBset_current_field\fP attempts to move to a different field. +.bP +a call to \fBset_current_page\fP attempts to move to a different page of the form. +.bP +a request attempts to move to a different field. +.bP +a request attempts to move to a different page of the form. +.PP +In each case, the move fails if the field is invalid. +.PP +If the modified field is valid, the form driver copies the modified +data from the window associated with the field +to the field buffer. +.SS Mouse handling +.PP +If the second argument is the KEY_MOUSE special key, the associated +mouse event is translated into one of the above pre-defined requests. +Currently only clicks in the user window (e.g., inside the form display +area or the decoration window) are handled. +.PP +If you click above the display region of the form: +.RS 3 +.TP +a REQ_PREV_FIELD is generated for a single click, +.TP +a REQ_PREV_PAGE is generated for a double-click and +.TP +a REQ_FIRST_FIELD is generated for a triple-click. +.RE +.PP +If you click below the display region of the form: +.RS 3 +.TP +a REQ_NEXT_FIELD is generated for a single click, +.TP +a REQ_NEXT_PAGE is generated for a double-click and +.TP +a REQ_LAST_FIELD is generated for a triple-click. +.RE +.PP +If you click at an field inside the display area of the form: +.RS 3 +.bP +the form cursor is positioned to that field. +.bP +If you double-click a field, +the form cursor is positioned to that field +and \fBE_UNKNOWN_COMMAND\fR is returned. +This return value makes sense, +because a double click usually means that an field-specific action should +be returned. +It is exactly the purpose of this return value to signal that an +application specific command should be executed. +.bP +If a translation +into a request was done, \fBform_driver\fR returns the result of this request. +.RE +.PP +If you clicked outside the user window or the mouse event could not be translated +into a form request an \fBE_REQUEST_DENIED\fR is returned. +.SS Application-defined commands +.PP +If the second argument is neither printable nor one of the above +pre-defined form requests, the driver assumes it is an application-specific +command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands +should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these +pre-defined requests. +.SH RETURN VALUE +\fBform_driver\fR returns one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NOT_POSTED +The form has not been posted. +.TP 5 +.B E_INVALID_FIELD +Contents of field is invalid. +.TP 5 +.B E_REQUEST_DENIED +The form driver could not process the request. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_UNKNOWN_COMMAND +The form driver code saw an unknown request code. +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBform\fR(3FORM), +\fBfield_buffer\fR(3FORM), +\fBfield_validation\fR(3FORM), +\fBfieldtype\fR(3FORM), +\fBform_variables\fR(3FORM), +\fBgetch\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/driver.3menu b/upstream/opensuse-leap-15-6/man3/driver.3menu new file mode 100644 index 00000000..afcd5fe4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/driver.3menu @@ -0,0 +1,201 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_driver.3x,v 1.22 2017/11/18 23:47:37 tom Exp $ +.TH driver 3MENU "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBmenu_driver\fR \- command-processing loop of the menu system +.SH SYNOPSIS +\fB#include \fR +.br +int menu_driver(MENU *menu, int c); +.br +.SH DESCRIPTION +Once a menu has been posted (displayed), you should funnel input events to it +through \fBmenu_driver\fR. This routine has three major input cases: +.bP +The input is a form navigation request. +Navigation request codes are constants defined in \fB\fP, +which are distinct from the key- and character codes returned by \fBwgetch\fP(3X). +.bP +The input is a printable character. +Printable characters (which must be positive, less than 256) are +checked according to the program's locale settings. +.bP +The input is the KEY_MOUSE special key associated with an mouse event. +.PP +The menu driver requests are as follows: +.TP 5 +REQ_LEFT_ITEM +Move left to an item. +.TP 5 +REQ_RIGHT_ITEM +Move right to an item. +.TP 5 +REQ_UP_ITEM +Move up to an item. +.TP 5 +REQ_DOWN_ITEM +Move down to an item. +.TP 5 +REQ_SCR_ULINE +Scroll up a line. +.TP 5 +REQ_SCR_DLINE +Scroll down a line. +.TP 5 +REQ_SCR_DPAGE +Scroll down a page. +.TP 5 +REQ_SCR_UPAGE +Scroll up a page. +.TP 5 +REQ_FIRST_ITEM +Move to the first item. +.TP 5 +REQ_LAST_ITEM +Move to the last item. +.TP 5 +REQ_NEXT_ITEM +Move to the next item. +.TP 5 +REQ_PREV_ITEM +Move to the previous item. +.TP 5 +REQ_TOGGLE_ITEM +Select/deselect an item. +.TP 5 +REQ_CLEAR_PATTERN +Clear the menu pattern buffer. +.TP 5 +REQ_BACK_PATTERN +Delete the previous character from the pattern buffer. +.TP 5 +REQ_NEXT_MATCH +Move to the next item matching the pattern match. +.TP 5 +REQ_PREV_MATCH +Move to the previous item matching the pattern match. +.PP +If the second argument is a printable character, the code appends +it to the pattern buffer and attempts to move to the next item matching +the new pattern. If there is no such match, \fBmenu_driver\fR returns +\fBE_NO_MATCH\fR and deletes the appended character from the buffer. +.PP +If the second argument is one of the above pre-defined requests, the +corresponding action is performed. +.SS MOUSE HANDLING +.PP +If the second argument is the KEY_MOUSE special key, the associated +mouse event is translated into one of the above pre-defined requests. +Currently only clicks in the user window (e.g., inside the menu display +area or the decoration window) are handled. +.PP +If you click above the display region of the menu: +.bP +a REQ_SCR_ULINE is generated for a single click, +.bP +a REQ_SCR_UPAGE is generated for a double-click and +.bP +a REQ_FIRST_ITEM is generated for a triple-click. +.PP +If you click below the display region of the menu: +.bP +a REQ_SCR_DLINE is generated for a single click, +.bP +a REQ_SCR_DPAGE is generated for a double-click and +.bP +a REQ_LAST_ITEM is generated for a triple-click. +.PP +If you click at an item inside the display area of the menu: +.bP +the menu cursor is positioned to that item. +.bP +If you double-click an item a REQ_TOGGLE_ITEM +is generated and \fBE_UNKNOWN_COMMAND\fR is returned. +This return value makes sense, +because a double click usually means that an item-specific action should +be returned. +It is exactly the purpose of this return value to signal that an +application specific command should be executed. +.bP +If a translation +into a request was done, \fBmenu_driver\fR returns the result of this request. +.PP +If you clicked outside the user window or the mouse event could not be translated +into a menu request an \fBE_REQUEST_DENIED\fR is returned. +.SS APPLICATION-DEFINED COMMANDS +.PP +If the second argument is neither printable nor one of the above +pre-defined menu requests or KEY_MOUSE, the drive assumes it is an application-specific +command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands +should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these +pre-defined requests. +.SH RETURN VALUE +\fBmenu_driver\fR return one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NOT_POSTED +The menu has not been posted. +.TP 5 +.B E_UNKNOWN_COMMAND +The menu driver code saw an unknown request code. +.TP 5 +.B E_NO_MATCH +Character failed to match. +.TP 5 +.B E_REQUEST_DENIED +The menu driver could not process the request. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBmenu\fR(3MENU), +\fBgetch\fR(3X). +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. The support for mouse events is ncurses specific. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/duplocale.3 b/upstream/opensuse-leap-15-6/man3/duplocale.3 new file mode 100644 index 00000000..d91b2d5f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/duplocale.3 @@ -0,0 +1,168 @@ +.\" Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH duplocale 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +duplocale \- duplicate a locale object +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "locale_t duplocale(locale_t " locobj ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR duplocale (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR duplocale () +function creates a duplicate of the locale object referred to by +.IR locobj . +.PP +If +.I locobj +is +.BR LC_GLOBAL_LOCALE , +.BR duplocale () +creates a locale object containing a copy of the global locale +determined by +.BR setlocale (3). +.SH RETURN VALUE +On success, +.BR duplocale () +returns a handle for the new locale object. +On error, it returns +.IR "(locale_t)\ 0", +and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory to create the duplicate locale object. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.3. +.SH NOTES +Duplicating a locale can serve the following purposes: +.IP \[bu] 3 +To create a copy of a locale object in which one of more categories +are to be modified (using +.BR newlocale (3)). +.IP \[bu] +To obtain a handle for the current locale which can used in +other functions that employ a locale handle, such as +.BR toupper_l (3). +This is done by applying +.BR duplocale () +to the value returned by the following call: +.IP +.in +4n +.EX +loc = uselocale((locale_t) 0); +.EE +.in +.IP +This technique is necessary, because the above +.BR uselocale (3) +call may return the value +.BR LC_GLOBAL_LOCALE , +which results in undefined behavior if passed to functions such as +.BR toupper_l (3). +Calling +.BR duplocale () +can be used to ensure that the +.B LC_GLOBAL_LOCALE +value is converted into a usable locale object. +See EXAMPLES, below. +.PP +Each locale object created by +.BR duplocale () +should be deallocated using +.BR freelocale (3). +.SH EXAMPLES +The program below uses +.BR uselocale (3) +and +.BR duplocale () +to obtain a handle for the current locale which is then passed to +.BR toupper_l (3). +The program takes one command-line argument, +a string of characters that is converted to uppercase and +displayed on standard output. +An example of its use is the following: +.PP +.in +4n +.EX +$ \fB./a.out abc\fP +ABC +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (duplocale.c) +.EX +#define _XOPEN_SOURCE 700 +#include +#include +#include +#include + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e + } while (0) + +int +main(int argc, char *argv[]) +{ + locale_t loc, nloc; + + if (argc != 2) { + fprintf(stderr, "Usage: %s string\en", argv[0]); + exit(EXIT_FAILURE); + } + + /* This sequence is necessary, because uselocale() might return + the value LC_GLOBAL_LOCALE, which can\[aq]t be passed as an + argument to toupper_l(). */ + + loc = uselocale((locale_t) 0); + if (loc == (locale_t) 0) + errExit("uselocale"); + + nloc = duplocale(loc); + if (nloc == (locale_t) 0) + errExit("duplocale"); + + for (char *p = argv[1]; *p; p++) + putchar(toupper_l(*p, nloc)); + + printf("\en"); + + freelocale(nloc); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR freelocale (3), +.BR newlocale (3), +.BR setlocale (3), +.BR uselocale (3), +.BR locale (5), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/dysize.3 b/upstream/opensuse-leap-15-6/man3/dysize.3 new file mode 100644 index 00000000..39664f3f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/dysize.3 @@ -0,0 +1,72 @@ +'\" t +.\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" aeb: some corrections +.TH dysize 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +dysize \- get number of days for a given year +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int dysize(int " year ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR dysize (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The function returns 365 for a normal year and 366 for a leap year. +The calculation for leap year is based on: +.PP +.in +4n +.EX +(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0) +.EE +.in +.PP +The formula is defined in the macro +.I __isleap(year) +also found in +.IR . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR dysize () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SunOS 4.x. +.PP +This is a compatibility function only. +Don't use it in new programs. +.\" The SCO version of this function had a year-2000 problem. +.SH SEE ALSO +.BR strftime (3) diff --git a/upstream/opensuse-leap-15-6/man3/ecvt.3 b/upstream/opensuse-leap-15-6/man3/ecvt.3 new file mode 100644 index 00000000..1fdd4e34 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ecvt.3 @@ -0,0 +1,134 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH ecvt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ecvt, fcvt \- convert a floating-point number to a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *ecvt(double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign ); +.BI "[[deprecated]] char *fcvt(double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ecvt (), +.BR fcvt (): +.nf + Since glibc 2.17 + (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200809L)) + || /* glibc >= 2.20 */ _DEFAULT_SOURCE + || /* glibc <= 2.19 */ _SVID_SOURCE + glibc 2.12 to glibc 2.16: + (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200112L)) + || _SVID_SOURCE + Before glibc 2.12: + _SVID_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +The +.BR ecvt () +function converts \fInumber\fP to a null-terminated +string of \fIndigits\fP digits (where \fIndigits\fP is reduced to a +system-specific limit determined by the precision of a +.IR double ), +and returns a pointer to the string. +The high-order digit is nonzero, unless +.I number +is zero. +The low order digit is rounded. +The string itself does not contain a decimal point; however, +the position of the decimal point relative to the start of the string +is stored in \fI*decpt\fP. +A negative value for \fI*decpt\fP means that +the decimal point is to the left of the start of the string. +If the sign of +\fInumber\fP is negative, \fI*sign\fP is set to a nonzero value, +otherwise it is set to 0. +If +.I number +is zero, it is unspecified whether \fI*decpt\fP is 0 or 1. +.PP +The +.BR fcvt () +function is identical to +.BR ecvt (), +except that +\fIndigits\fP specifies the number of digits after the decimal point. +.SH RETURN VALUE +Both the +.BR ecvt () +and +.BR fcvt () +functions return a pointer to a +static string containing the ASCII representation of \fInumber\fP. +The static string is overwritten by each call to +.BR ecvt () +or +.BR fcvt (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ecvt () +T} Thread safety MT-Unsafe race:ecvt +T{ +.BR fcvt () +T} Thread safety MT-Unsafe race:fcvt +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr2; +marked as LEGACY in POSIX.1-2001. +POSIX.1-2008 removes the specifications of +.BR ecvt () +and +.BR fcvt (), +recommending the use of +.BR sprintf (3) +instead (though +.BR snprintf (3) +may be preferable). +.SH NOTES +.\" Linux libc4 and libc5 specified the type of +.\" .I ndigits +.\" as +.\" .IR size_t . +Not all locales use a point as the radix character ("decimal point"). +.SH SEE ALSO +.BR ecvt_r (3), +.BR gcvt (3), +.BR qecvt (3), +.BR setlocale (3), +.BR sprintf (3) diff --git a/upstream/opensuse-leap-15-6/man3/ecvt_r.3 b/upstream/opensuse-leap-15-6/man3/ecvt_r.3 new file mode 100644 index 00000000..4af1a8c1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ecvt_r.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" This replaces an earlier man page written by Walter Harms +.\" . +.\" +.\" Corrected return types; from Fabian; 2004-10-05 +.\" +.TH ecvt_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int ecvt_r(double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign , +.BI " char *restrict " buf ", size_t " len ); +.BI "[[deprecated]] int fcvt_r(double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign , +.BI " char *restrict " buf ", size_t " len ); +.PP +.BI "[[deprecated]] int qecvt_r(long double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign , +.BI " char *restrict " buf ", size_t " len ); +.BI "[[deprecated]] int qfcvt_r(long double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign , +.BI " char *restrict " buf ", size_t " len ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ecvt_r (), +.BR fcvt_r (), +.BR qecvt_r (), +.BR qfcvt_r (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The functions +.BR ecvt_r (), +.BR fcvt_r (), +.BR qecvt_r (), +and +.BR qfcvt_r () +are identical to +.BR ecvt (3), +.BR fcvt (3), +.BR qecvt (3), +and +.BR qfcvt (3), +respectively, except that they do not return their result in a static +buffer, but instead use the supplied +.I buf +of size +.IR len . +See +.BR ecvt (3) +and +.BR qecvt (3). +.SH RETURN VALUE +These functions return 0 on success, and \-1 otherwise. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ecvt_r (), +.BR fcvt_r (), +.BR qecvt_r (), +.BR qfcvt_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH NOTES +These functions are obsolete. +Instead, +.BR sprintf (3) +is recommended. +.SH SEE ALSO +.BR ecvt (3), +.BR qecvt (3), +.BR sprintf (3) diff --git a/upstream/opensuse-leap-15-6/man3/encrypt.3 b/upstream/opensuse-leap-15-6/man3/encrypt.3 new file mode 100644 index 00000000..230d94df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/encrypt.3 @@ -0,0 +1,212 @@ +'\" t +.\" Copyright 2000 Nicolás Lichtmaier +.\" Created 2000-07-22 00:52-0300 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified 2002-07-23 19:21:35 CEST 2002 Walter Harms +.\" +.\" +.\" Modified 2003-04-04, aeb +.\" +.TH encrypt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +encrypt, setkey, encrypt_r, setkey_r \- encrypt 64-bit messages +.SH LIBRARY +Encryption and decryption library +.RI ( libcrypto ", " \-lcrypto ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "[[deprecated]] void encrypt(char " block "[64], int " edflag ); +.PP +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "[[deprecated]] void setkey(const char *" key ); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "[[deprecated]] void setkey_r(const char *" key ", struct crypt_data *" data ); +.BI "[[deprecated]] void encrypt_r(char *" block ", int " edflag , +.BI " struct crypt_data *" data ); +.fi +.SH DESCRIPTION +These functions encrypt and decrypt 64-bit messages. +The +.BR setkey () +function sets the key used by +.BR encrypt (). +The +.I key +argument used here is an array of 64 bytes, each of which has +numerical value 1 or 0. +The bytes key[n] where n=8*i-1 are ignored, +so that the effective key length is 56 bits. +.PP +The +.BR encrypt () +function modifies the passed buffer, encoding if +.I edflag +is 0, and decoding if 1 is being passed. +Like the +.I key +argument, also +.I block +is a bit vector representation of the actual value that is encoded. +The result is returned in that same vector. +.PP +These two functions are not reentrant, that is, the key data is +kept in static storage. +The functions +.BR setkey_r () +and +.BR encrypt_r () +are the reentrant versions. +They use the following +structure to hold the key data: +.PP +.in +4n +.EX +struct crypt_data { + char keysched[16 * 8]; + char sb0[32768]; + char sb1[32768]; + char sb2[32768]; + char sb3[32768]; + char crypt_3_buf[14]; + char current_salt[2]; + long current_saltbits; + int direction; + int initialized; +}; +.EE +.in +.PP +Before calling +.BR setkey_r () +set +.I data\->initialized +to zero. +.SH RETURN VALUE +These functions do not return any value. +.SH ERRORS +Set +.I errno +to zero before calling the above functions. +On success, +.I errno +is unchanged. +.TP +.B ENOSYS +The function is not provided. +(For example because of former USA export restrictions.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR encrypt (), +.BR setkey () +T} Thread safety MT-Unsafe race:crypt +T{ +.BR encrypt_r (), +.BR setkey_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR encrypt () +.TQ +.BR setkey () +POSIX.1-2008. +.TP +.BR encrypt_r () +.TQ +.BR setkey_r () +None. +.SH HISTORY +Removed in glibc 2.28. +.PP +Because they employ the DES block cipher, +which is no longer considered secure, +these functions were removed from glibc. +Applications should switch to a modern cryptography library, such as +.BR libgcrypt . +.TP +.BR encrypt () +.TQ +.BR setkey () +POSIX.1-2001, SUS, SVr4. +.SS Availability in glibc +See +.BR crypt (3). +.SS Features in glibc +In glibc 2.2, these functions use the DES algorithm. +.SH EXAMPLES +.\" [[deprecated]] SRC BEGIN (encrypt.c) +.EX +#define _XOPEN_SOURCE +#include +#include +#include +#include + +int +main(void) +{ + char key[64]; + char orig[9] = "eggplant"; + char buf[64]; + char txt[9]; + + for (size_t i = 0; i < 64; i++) { + key[i] = rand() & 1; + } + + for (size_t i = 0; i < 8; i++) { + for (size_t j = 0; j < 8; j++) { + buf[i * 8 + j] = orig[i] >> j & 1; + } + setkey(key); + } + printf("Before encrypting: %s\en", orig); + + encrypt(buf, 0); + for (size_t i = 0; i < 8; i++) { + for (size_t j = 0, txt[i] = \[aq]\e0\[aq]; j < 8; j++) { + txt[i] |= buf[i * 8 + j] << j; + } + txt[8] = \[aq]\e0\[aq]; + } + printf("After encrypting: %s\en", txt); + + encrypt(buf, 1); + for (size_t i = 0; i < 8; i++) { + for (size_t j = 0, txt[i] = \[aq]\e0\[aq]; j < 8; j++) { + txt[i] |= buf[i * 8 + j] << j; + } + txt[8] = \[aq]\e0\[aq]; + } + printf("After decrypting: %s\en", txt); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR cbc_crypt (3), +.BR crypt (3), +.BR ecb_crypt (3) +.\" .BR fcrypt (3) diff --git a/upstream/opensuse-leap-15-6/man3/end.3 b/upstream/opensuse-leap-15-6/man3/end.3 new file mode 100644 index 00000000..d7c81a6d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/end.3 @@ -0,0 +1,96 @@ +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH end 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +etext, edata, end \- end of program segments +.SH SYNOPSIS +.nf +.BI extern " etext" ; +.BI extern " edata" ; +.BI extern " end" ; +.fi +.SH DESCRIPTION +The addresses of these symbols indicate the end of various program +segments: +.TP +.I etext +This is the first address past the end of the text segment +(the program code). +.TP +.I edata +This is the first address past the end of the +initialized data segment. +.TP +.I end +This is the first address past the end of the +uninitialized data segment (also known as the BSS segment). +.SH STANDARDS +None. +.SH HISTORY +Although these symbols have long been provided on most UNIX systems, +they are not standardized; use with caution. +.SH NOTES +The program must explicitly declare these symbols; +they are not defined in any header file. +.PP +On some systems the names of these symbols are preceded by underscores, +thus: +.IR _etext , +.IR _edata , +and +.IR _end . +These symbols are also defined for programs compiled on Linux. +.PP +At the start of program execution, +the program break will be somewhere near +.I &end +(perhaps at the start of the following page). +However, the break will change as memory is allocated via +.BR brk (2) +or +.BR malloc (3). +Use +.BR sbrk (2) +with an argument of zero to find the current value of the program break. +.SH EXAMPLES +When run, the program below produces output such as the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +First address past: + program text (etext) 0x8048568 + initialized data (edata) 0x804a01c + uninitialized data (end) 0x804a024 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (end.c) +.EX +#include +#include + +extern char etext, edata, end; /* The symbols must have some type, + or "gcc \-Wall" complains */ + +int +main(void) +{ + printf("First address past:\en"); + printf(" program text (etext) %10p\en", &etext); + printf(" initialized data (edata) %10p\en", &edata); + printf(" uninitialized data (end) %10p\en", &end); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR objdump (1), +.BR readelf (1), +.BR sbrk (2), +.BR elf (5) diff --git a/upstream/opensuse-leap-15-6/man3/endian.3 b/upstream/opensuse-leap-15-6/man3/endian.3 new file mode 100644 index 00000000..cddcec1c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/endian.3 @@ -0,0 +1,164 @@ +.\" Copyright (C) 2009, Linux Foundation, written by Michael Kerrisk +.\" +.\" a few pieces remain from an earlier version +.\" Copyright (C) 2008, Nanno Langstraat +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH endian 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, +htobe64, htole64, be64toh, le64toh \- +convert values between host and big-/little-endian byte order +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "uint16_t htobe16(uint16_t " host_16bits ); +.BI "uint16_t htole16(uint16_t " host_16bits ); +.BI "uint16_t be16toh(uint16_t " big_endian_16bits ); +.BI "uint16_t le16toh(uint16_t " little_endian_16bits ); +.PP +.BI "uint32_t htobe32(uint32_t " host_32bits ); +.BI "uint32_t htole32(uint32_t " host_32bits ); +.BI "uint32_t be32toh(uint32_t " big_endian_32bits ); +.BI "uint32_t le32toh(uint32_t " little_endian_32bits ); +.PP +.BI "uint64_t htobe64(uint64_t " host_64bits ); +.BI "uint64_t htole64(uint64_t " host_64bits ); +.BI "uint64_t be64toh(uint64_t " big_endian_64bits ); +.BI "uint64_t le64toh(uint64_t " little_endian_64bits ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.ad l +.PP +.BR htobe16 (), +.BR htole16 (), +.BR be16toh (), +.BR le16toh (), +.BR htobe32 (), +.BR htole32 (), +.BR be32toh (), +.BR le32toh (), +.BR htobe64 (), +.BR htole64 (), +.BR be64toh (), +.BR le64toh (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + In glibc up to and including 2.19: + _BSD_SOURCE +.fi +.ad +.SH DESCRIPTION +These functions convert the byte encoding of integer values from +the byte order that the current CPU (the "host") uses, +to and from little-endian and big-endian byte order. +.PP +The number, +.IR nn , +in the name of each function indicates the size of +integer handled by the function, either 16, 32, or 64 bits. +.PP +The functions with names of the form "htobe\fInn\fP" convert +from host byte order to big-endian order. +.PP +The functions with names of the form "htole\fInn\fP" convert +from host byte order to little-endian order. +.PP +The functions with names of the form "be\fInn\fPtoh" convert +from big-endian order to host byte order. +.PP +The functions with names of the form "le\fInn\fPtoh" convert +from little-endian order to host byte order. +.SH VERSIONS +Similar functions are present on the BSDs, +where the required header file is +.I +instead of +.IR . +Unfortunately, +NetBSD, FreeBSD, and glibc haven't followed the original +OpenBSD naming convention for these functions, +whereby the +.I nn +component always appears at the end of the function name +(thus, for example, in NetBSD, FreeBSD, and glibc, +the equivalent of OpenBSDs "betoh32" is "be32toh"). +.SH STANDARDS +None. +.SH HISTORY +glibc 2.9. +.PP +These functions are similar to the older +.BR byteorder (3) +family of functions. +For example, +.BR be32toh () +is identical to +.BR ntohl (). +.PP +The advantage of the +.BR byteorder (3) +functions is that they are standard functions available +on all UNIX systems. +On the other hand, the fact that they were designed +for use in the context of TCP/IP means that +they lack the 64-bit and little-endian variants described in this page. +.SH EXAMPLES +The program below display the results of converting an integer +from host byte order to both little-endian and big-endian byte order. +Since host byte order is either little-endian or big-endian, +only one of these conversions will have an effect. +When we run this program on a little-endian system such as x86-32, +we see the following: +.PP +.in +4n +.EX +$ \fB./a.out\fP +x.u32 = 0x44332211 +htole32(x.u32) = 0x44332211 +htobe32(x.u32) = 0x11223344 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (endian.c) +.EX +#include +#include +#include +#include + +int +main(void) +{ + union { + uint32_t u32; + uint8_t arr[4]; + } x; + + x.arr[0] = 0x11; /* Lowest\-address byte */ + x.arr[1] = 0x22; + x.arr[2] = 0x33; + x.arr[3] = 0x44; /* Highest\-address byte */ + + printf("x.u32 = %#x\en", x.u32); + printf("htole32(x.u32) = %#x\en", htole32(x.u32)); + printf("htobe32(x.u32) = %#x\en", htobe32(x.u32)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR bswap (3), +.BR byteorder (3) diff --git a/upstream/opensuse-leap-15-6/man3/envz_add.3 b/upstream/opensuse-leap-15-6/man3/envz_add.3 new file mode 100644 index 00000000..93572253 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/envz_add.3 @@ -0,0 +1,171 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" based on the description in glibc source and infopages +.\" +.\" Corrections and additions, aeb +.TH envz_add 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +envz_add, envz_entry, envz_get, envz_merge, +envz_remove, envz_strip \- environment string support +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "error_t envz_add(char **restrict " envz ", size_t *restrict " envz_len , +.BI " const char *restrict " name \ +", const char *restrict " value ); +.PP +.BI "char *envz_entry(const char *restrict " envz ", size_t " envz_len , +.BI " const char *restrict " name ); +.PP +.BI "char *envz_get(const char *restrict " envz ", size_t " envz_len , +.BI " const char *restrict " name ); +.PP +.BI "error_t envz_merge(char **restrict " envz ", size_t *restrict " envz_len , +.BI " const char *restrict " envz2 ", size_t " envz2_len , +.BI " int " override ); +.PP +.BI "void envz_remove(char **restrict " envz ", size_t *restrict " envz_len , +.BI " const char *restrict " name ); +.PP +.BI "void envz_strip(char **restrict " envz ", size_t *restrict " envz_len ); +.fi +.SH DESCRIPTION +These functions are glibc-specific. +.PP +An argz vector is a pointer to a character buffer together with a length, +see +.BR argz_add (3). +An envz vector is a special argz vector, namely one where the strings +have the form "name=value". +Everything after the first \[aq]=\[aq] is considered +to be the value. +If there is no \[aq]=\[aq], the value is taken to be NULL. +(While the value in case of a trailing \[aq]=\[aq] is the empty string "".) +.PP +These functions are for handling envz vectors. +.PP +.BR envz_add () +adds the string +.RI \&" name = value \&" +(in case +.I value +is non-NULL) or +.RI \&" name \&" +(in case +.I value +is NULL) to the envz vector +.RI ( *envz ,\ *envz_len ) +and updates +.I *envz +and +.IR *envz_len . +If an entry with the same +.I name +existed, it is removed. +.PP +.BR envz_entry () +looks for +.I name +in the envz vector +.RI ( envz ,\ envz_len ) +and returns the entry if found, or NULL if not. +.PP +.BR envz_get () +looks for +.I name +in the envz vector +.RI ( envz ,\ envz_len ) +and returns the value if found, or NULL if not. +(Note that the value can also be NULL, namely when there is +an entry for +.I name +without \[aq]=\[aq] sign.) +.PP +.BR envz_merge () +adds each entry in +.I envz2 +to +.IR *envz , +as if with +.BR envz_add (). +If +.I override +is true, then values in +.I envz2 +will supersede those with the same name in +.IR *envz , +otherwise not. +.PP +.BR envz_remove () +removes the entry for +.I name +from +.RI ( *envz ,\ *envz_len ) +if there was one. +.PP +.BR envz_strip () +removes all entries with value NULL. +.SH RETURN VALUE +All envz functions that do memory allocation have a return type of +.I error_t +(an integer type), +and return 0 for success, and +.B ENOMEM +if an allocation error occurs. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR envz_add (), +.BR envz_entry (), +.BR envz_get (), +.BR envz_merge (), +.BR envz_remove (), +.BR envz_strip () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH EXAMPLES +.\" SRC BEGIN (envz_add.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[], char *envp[]) +{ + char *str; + size_t e_len = 0; + + for (size_t i = 0; envp[i] != NULL; i++) + e_len += strlen(envp[i]) + 1; + + str = envz_entry(*envp, e_len, "HOME"); + printf("%s\en", str); + str = envz_get(*envp, e_len, "HOME"); + printf("%s\en", str); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR argz_add (3) diff --git a/upstream/opensuse-leap-15-6/man3/erf.3 b/upstream/opensuse-leap-15-6/man3/erf.3 new file mode 100644 index 00000000..b90ca6b9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/erf.3 @@ -0,0 +1,134 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH erf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +erf, erff, erfl \- error function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double erf(double " x ); +.BI "float erff(float " x ); +.BI "long double erfl(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR erf (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR erff (), +.BR erfl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the error function of +.IR x , +defined as +.PP +.in +4n +.EX +erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(\-t*t) dt +.EE +.in +.SH RETURN VALUE +On success, these functions return the value of the error function of +.IR x , +a value in the range [\-1,\ 1]. +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is positive infinity (negative infinity), ++1 (\-1) is returned. +.PP +If +.I x +is subnormal, +a range error occurs, +and the return value is 2*x/sqrt(pi). +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result underflow (\fIx\fP is subnormal) +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.PP +These functions do not set +.IR errno . +.\" It is intentional that these functions do not set errno for this case +.\" see https://www.sourceware.org/bugzilla/show_bug.cgi?id=6785 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR erf (), +.BR erff (), +.BR erfl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR cerf (3), +.BR erfc (3), +.BR exp (3) diff --git a/upstream/opensuse-leap-15-6/man3/erfc.3 b/upstream/opensuse-leap-15-6/man3/erfc.3 new file mode 100644 index 00000000..9b411509 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/erfc.3 @@ -0,0 +1,137 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH erfc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +erfc, erfcf, erfcl \- complementary error function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double erfc(double " x ); +.BI "float erfcf(float " x ); +.BI "long double erfcl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR erfc (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR erfcf (), +.BR erfcl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the complementary error function of +.IR x , +that is, 1.0 \- erf(x). +.SH RETURN VALUE +On success, these functions return the complementary error function of +.IR x , +a value in the range [0,2]. +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 or \-0, 1 is returned. +.PP +If +.I x +is positive infinity, ++0 is returned. +.PP +If +.I x +is negative infinity, ++2 is returned. +.PP +If the function result underflows and produces an unrepresentable value, +the return value is 0.0. +.PP +If the function result underflows but produces a representable +(i.e., subnormal) value, +.\" e.g., erfc(27) on x86-32 +that value is returned, and +a range error occurs. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result underflow (result is subnormal) +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.PP +These functions do not set +.IR errno . +.\" It is intentional that these functions do not set errno for this case +.\" see https://www.sourceware.org/bugzilla/show_bug.cgi?id=6785 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR erfc (), +.BR erfcf (), +.BR erfcl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH NOTES +The +.BR erfc (), +.BR erfcf (), +and +.BR erfcl () +functions are provided to avoid the loss accuracy that +would occur for the calculation 1-erf(x) for large values of +.I x +(for which the value of erf(x) approaches 1). +.SH SEE ALSO +.BR cerf (3), +.BR erf (3), +.BR exp (3) diff --git a/upstream/opensuse-leap-15-6/man3/err.3 b/upstream/opensuse-leap-15-6/man3/err.3 new file mode 100644 index 00000000..89be3ed8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/err.3 @@ -0,0 +1,157 @@ +'\" t +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" 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 +.\" +.TH err 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- formatted error messages +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[noreturn]] void err(int " eval ", const char *" fmt ", ...);" +.BI "[[noreturn]] void errx(int " eval ", const char *" fmt ", ...);" +.PP +.BI "void warn(const char *" fmt ", ...);" +.BI "void warnx(const char *" fmt ", ...);" +.PP +.B #include +.PP +.BI "[[noreturn]] void verr(int " eval ", const char *" fmt ", va_list " args ); +.BI "[[noreturn]] void verrx(int " eval ", const char *" fmt ", va_list " args ); +.PP +.BI "void vwarn(const char *" fmt ", va_list " args ); +.BI "void vwarnx(const char *" fmt ", va_list " args ); +.fi +.SH DESCRIPTION +The +.BR err () +and +.BR warn () +family of functions display a formatted error message on the standard +error output. +In all cases, the last component of the program name, a colon character, +and a space are output. +If the +.I fmt +argument is not NULL, the +.BR printf (3)-like +formatted error message is output. +The output is terminated by a newline character. +.PP +The +.BR err (), +.BR verr (), +.BR warn (), +and +.BR vwarn () +functions append an error message obtained from +.BR strerror (3) +based on the global variable +.IR errno , +preceded by another colon and space unless the +.I fmt +argument is +NULL. +.PP +The +.BR errx () +and +.BR warnx () +functions do not append an error message. +.PP +The +.BR err (), +.BR verr (), +.BR errx (), +and +.BR verrx () +functions do not return, but exit with the value of the argument +.IR eval . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR err (), +.BR errx (), +.BR warn (), +.BR warnx (), +.BR verr (), +.BR verrx (), +.BR vwarn (), +.BR vwarnx () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +.TP +.BR err () +.TQ +.BR warn () +4.4BSD. +.SH EXAMPLES +Display the current +.I errno +information string and exit: +.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 +Display an error message and exit: +.PP +.in +4n +.EX +if (tm.tm_hour < START_TIME) + errx(EXIT_FAILURE, "too early, wait until %s", + start_time_string); +.EE +.in +.PP +Warn of an error: +.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 SEE ALSO +.BR error (3), +.BR exit (3), +.BR perror (3), +.BR printf (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/errno.3 b/upstream/opensuse-leap-15-6/man3/errno.3 new file mode 100644 index 00000000..89641077 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/errno.3 @@ -0,0 +1,655 @@ +.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 5 Oct 2002, Modified by Michael Kerrisk +.\" Updated for POSIX.1 2001 +.\" 2004-12-17 Martin Schulze , mtk +.\" Removed errno declaration prototype, added notes +.\" 2006-02-09 Kurt Wall, mtk +.\" Added non-POSIX errors +.\" +.TH errno 3 2022-12-04 "Linux man-pages 6.04" +.SH NAME +errno \- number of last error +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.\".PP +.\".BI "extern int " errno ; +.fi +.SH DESCRIPTION +The +.I +header file defines the integer variable +.IR errno , +which is set by system calls and some library functions in the event +of an error to indicate what went wrong. +.\" +.SS errno +The value in +.I errno +is significant only when the return value of +the call indicated an error +(i.e., \-1 from most system calls; +\-1 or NULL from most library functions); +a function that succeeds +.I is +allowed to change +.IR errno . +The value of +.I errno +is never set to zero by any system call or library function. +.PP +For some system calls and library functions (e.g., +.BR getpriority (2)), +\-1 is a valid return on success. +In such cases, a successful return can be distinguished from an error +return by setting +.I errno +to zero before the call, and then, +if the call returns a status that indicates that an error +may have occurred, checking to see if +.I errno +has a nonzero value. +.PP +.I errno +is defined by the ISO C standard to be a modifiable lvalue +of type +.IR int , +and must not be explicitly declared; +.I errno +may be a macro. +.I errno +is thread-local; setting it in one thread +does not affect its value in any other thread. +.\" +.SS Error numbers and names +Valid error numbers are all positive numbers. +The +.I +header file defines symbolic names for each +of the possible error numbers that may appear in +.IR errno . +.PP +All the error names specified by POSIX.1 +must have distinct values, with the exception of +.B EAGAIN +and +.BR EWOULDBLOCK , +which may be the same. +On Linux, these two have the same value on all architectures. +.PP +The error numbers that correspond to each symbolic name +vary across UNIX systems, +and even across different architectures on Linux. +Therefore, numeric values are not included as part of the list of +error names below. +The +.BR perror (3) +and +.BR strerror (3) +functions can be used to convert these names to +corresponding textual error messages. +.PP +On any particular Linux system, +one can obtain a list of all symbolic error names and +the corresponding error numbers using the +.BR errno (1) +command (part of the +.I moreutils +package): +.PP +.in +4n +.EX +$ \fBerrno \-l\fP +EPERM 1 Operation not permitted +ENOENT 2 No such file or directory +ESRCH 3 No such process +EINTR 4 Interrupted system call +EIO 5 Input/output error +\&... +.EE +.in +.PP +The +.BR errno (1) +command can also be used to look up individual error numbers and names, +and to search for errors using strings from the error description, +as in the following examples: +.PP +.in +4n +.EX +$ \fBerrno 2\fP +ENOENT 2 No such file or directory +$ \fBerrno ESRCH\fP +ESRCH 3 No such process +$ \fBerrno \-s permission\fP +EACCES 13 Permission denied +.EE +.in +.\".PP +.\" POSIX.1 (2001 edition) lists the following symbolic error names. Of +.\" these, \fBEDOM\fP and \fBERANGE\fP are in the ISO C standard. ISO C +.\" Amendment 1 defines the additional error number \fBEILSEQ\fP for +.\" coding errors in multibyte or wide characters. +.\" +.SS List of error names +In the list of the symbolic error names below, +various names are marked as follows: +.TP +.I POSIX.1-2001 +The name is defined by POSIX.1-2001, +and is defined in later POSIX.1 versions, unless otherwise indicated. +.TP +.I POSIX.1-2008 +The name is defined in POSIX.1-2008, +but was not present in earlier POSIX.1 standards. +.TP +.I C99 +The name is defined by C99. +.PP +Below is a list of the symbolic error names that are defined on Linux: +.TP 16 +.B E2BIG +Argument list too long (POSIX.1-2001). +.TP +.B EACCES +Permission denied (POSIX.1-2001). +.TP +.B EADDRINUSE +Address already in use (POSIX.1-2001). +.TP +.B EADDRNOTAVAIL +Address not available (POSIX.1-2001). +.\" EADV is only an error on HURD(?) +.TP +.B EAFNOSUPPORT +Address family not supported (POSIX.1-2001). +.TP +.B EAGAIN +Resource temporarily unavailable (may be the same value as +.BR EWOULDBLOCK ) +(POSIX.1-2001). +.TP +.B EALREADY +Connection already in progress (POSIX.1-2001). +.TP +.B EBADE +Invalid exchange. +.TP +.B EBADF +Bad file descriptor (POSIX.1-2001). +.TP +.B EBADFD +File descriptor in bad state. +.TP +.B EBADMSG +Bad message (POSIX.1-2001). +.TP +.B EBADR +Invalid request descriptor. +.TP +.B EBADRQC +Invalid request code. +.TP +.B EBADSLT +Invalid slot. +.\" EBFONT is defined but appears not to be used by kernel or glibc. +.TP +.B EBUSY +Device or resource busy (POSIX.1-2001). +.TP +.B ECANCELED +Operation canceled (POSIX.1-2001). +.TP +.B ECHILD +No child processes (POSIX.1-2001). +.TP +.B ECHRNG +Channel number out of range. +.TP +.B ECOMM +Communication error on send. +.TP +.B ECONNABORTED +Connection aborted (POSIX.1-2001). +.TP +.B ECONNREFUSED +Connection refused (POSIX.1-2001). +.TP +.B ECONNRESET +Connection reset (POSIX.1-2001). +.TP +.B EDEADLK +Resource deadlock avoided (POSIX.1-2001). +.TP +.B EDEADLOCK +On most architectures, a synonym for +.BR EDEADLK . +On some architectures (e.g., Linux MIPS, PowerPC, SPARC), +it is a separate error code "File locking deadlock error". +.TP +.B EDESTADDRREQ +Destination address required (POSIX.1-2001). +.TP +.B EDOM +Mathematics argument out of domain of function (POSIX.1, C99). +.\" EDOTDOT is defined but appears to be unused +.TP +.B EDQUOT +.\" POSIX just says "Reserved" +Disk quota exceeded (POSIX.1-2001). +.TP +.B EEXIST +File exists (POSIX.1-2001). +.TP +.B EFAULT +Bad address (POSIX.1-2001). +.TP +.B EFBIG +File too large (POSIX.1-2001). +.TP +.B EHOSTDOWN +Host is down. +.TP +.B EHOSTUNREACH +Host is unreachable (POSIX.1-2001). +.TP +.B EHWPOISON +Memory page has hardware error. +.TP +.B EIDRM +Identifier removed (POSIX.1-2001). +.TP +.B EILSEQ +Invalid or incomplete multibyte or wide character (POSIX.1, C99). +.IP +The text shown here is the glibc error description; +in POSIX.1, this error is described as "Illegal byte sequence". +.TP +.B EINPROGRESS +Operation in progress (POSIX.1-2001). +.TP +.B EINTR +Interrupted function call (POSIX.1-2001); see +.BR signal (7). +.TP +.B EINVAL +Invalid argument (POSIX.1-2001). +.TP +.B EIO +Input/output error (POSIX.1-2001). +.TP +.B EISCONN +Socket is connected (POSIX.1-2001). +.TP +.B EISDIR +Is a directory (POSIX.1-2001). +.TP +.B EISNAM +Is a named type file. +.TP +.B EKEYEXPIRED +Key has expired. +.TP +.B EKEYREJECTED +Key was rejected by service. +.TP +.B EKEYREVOKED +Key has been revoked. +.TP +.B EL2HLT +Level 2 halted. +.TP +.B EL2NSYNC +Level 2 not synchronized. +.TP +.B EL3HLT +Level 3 halted. +.TP +.B EL3RST +Level 3 reset. +.TP +.B ELIBACC +Cannot access a needed shared library. +.TP +.B ELIBBAD +Accessing a corrupted shared library. +.TP +.B ELIBMAX +Attempting to link in too many shared libraries. +.TP +.B ELIBSCN +\&.lib section in a.out corrupted +.TP +.B ELIBEXEC +Cannot exec a shared library directly. +.TP +.B ELNRNG +.\" ELNRNG appears to be used by a few drivers +Link number out of range. +.TP +.B ELOOP +Too many levels of symbolic links (POSIX.1-2001). +.TP +.B EMEDIUMTYPE +Wrong medium type. +.TP +.B EMFILE +Too many open files (POSIX.1-2001). +Commonly caused by exceeding the +.B RLIMIT_NOFILE +resource limit described in +.BR getrlimit (2). +Can also be caused by exceeding the limit specified in +.IR /proc/sys/fs/nr_open . +.TP +.B EMLINK +Too many links (POSIX.1-2001). +.TP +.B EMSGSIZE +Message too long (POSIX.1-2001). +.TP +.B EMULTIHOP +.\" POSIX says "Reserved" +Multihop attempted (POSIX.1-2001). +.TP +.B ENAMETOOLONG +Filename too long (POSIX.1-2001). +.\" ENAVAIL is defined, but appears not to be used +.TP +.B ENETDOWN +Network is down (POSIX.1-2001). +.TP +.B ENETRESET +Connection aborted by network (POSIX.1-2001). +.TP +.B ENETUNREACH +Network unreachable (POSIX.1-2001). +.TP +.B ENFILE +Too many open files in system (POSIX.1-2001). +On Linux, this is probably a result of encountering the +.I /proc/sys/fs/file\-max +limit (see +.BR proc (5)). +.TP +.B ENOANO +.\" ENOANO appears to be used by a few drivers +No anode. +.TP +.B ENOBUFS +No buffer space available (POSIX.1 (XSI STREAMS option)). +.\" ENOCSI is defined but appears to be unused. +.TP +.B ENODATA +The named attribute does not exist, +or the process has no access to this attribute; see +.BR xattr (7). +.IP +In POSIX.1-2001 (XSI STREAMS option), +this error was described as +"No message is available on the STREAM head read queue". +.TP +.B ENODEV +No such device (POSIX.1-2001). +.TP +.B ENOENT +No such file or directory (POSIX.1-2001). +.IP +Typically, this error results when a specified pathname does not exist, +or one of the components in the directory prefix of a pathname does not exist, +or the specified pathname is a dangling symbolic link. +.TP +.B ENOEXEC +Exec format error (POSIX.1-2001). +.TP +.B ENOKEY +Required key not available. +.TP +.B ENOLCK +No locks available (POSIX.1-2001). +.TP +.B ENOLINK +.\" POSIX says "Reserved" +Link has been severed (POSIX.1-2001). +.TP +.B ENOMEDIUM +No medium found. +.TP +.B ENOMEM +Not enough space/cannot allocate memory (POSIX.1-2001). +.TP +.B ENOMSG +No message of the desired type (POSIX.1-2001). +.TP +.B ENONET +Machine is not on the network. +.TP +.B ENOPKG +Package not installed. +.TP +.B ENOPROTOOPT +Protocol not available (POSIX.1-2001). +.TP +.B ENOSPC +No space left on device (POSIX.1-2001). +.TP +.B ENOSR +No STREAM resources (POSIX.1 (XSI STREAMS option)). +.TP +.B ENOSTR +Not a STREAM (POSIX.1 (XSI STREAMS option)). +.TP +.B ENOSYS +Function not implemented (POSIX.1-2001). +.TP +.B ENOTBLK +Block device required. +.TP +.B ENOTCONN +The socket is not connected (POSIX.1-2001). +.TP +.B ENOTDIR +Not a directory (POSIX.1-2001). +.TP +.B ENOTEMPTY +Directory not empty (POSIX.1-2001). +.\" ENOTNAM is defined but appears to be unused. +.TP +.B ENOTRECOVERABLE +State not recoverable (POSIX.1-2008). +.TP +.B ENOTSOCK +Not a socket (POSIX.1-2001). +.TP +.B ENOTSUP +Operation not supported (POSIX.1-2001). +.TP +.B ENOTTY +Inappropriate I/O control operation (POSIX.1-2001). +.TP +.B ENOTUNIQ +Name not unique on network. +.TP +.B ENXIO +No such device or address (POSIX.1-2001). +.TP +.B EOPNOTSUPP +Operation not supported on socket (POSIX.1-2001). +.IP +.RB ( ENOTSUP +and +.B EOPNOTSUPP +have the same value on Linux, but +according to POSIX.1 these error values should be distinct.) +.TP +.B EOVERFLOW +Value too large to be stored in data type (POSIX.1-2001). +.TP +.B EOWNERDEAD +.\" Used at least by the user-space side of rubost mutexes +Owner died (POSIX.1-2008). +.TP +.B EPERM +Operation not permitted (POSIX.1-2001). +.TP +.B EPFNOSUPPORT +Protocol family not supported. +.TP +.B EPIPE +Broken pipe (POSIX.1-2001). +.TP +.B EPROTO +Protocol error (POSIX.1-2001). +.TP +.B EPROTONOSUPPORT +Protocol not supported (POSIX.1-2001). +.TP +.B EPROTOTYPE +Protocol wrong type for socket (POSIX.1-2001). +.TP +.B ERANGE +Result too large (POSIX.1, C99). +.TP +.B EREMCHG +Remote address changed. +.TP +.B EREMOTE +Object is remote. +.TP +.B EREMOTEIO +Remote I/O error. +.TP +.B ERESTART +Interrupted system call should be restarted. +.TP +.B ERFKILL +.\" ERFKILL appears to be used by various drivers +Operation not possible due to RF-kill. +.TP +.B EROFS +Read-only filesystem (POSIX.1-2001). +.TP +.B ESHUTDOWN +Cannot send after transport endpoint shutdown. +.TP +.B ESPIPE +Invalid seek (POSIX.1-2001). +.TP +.B ESOCKTNOSUPPORT +Socket type not supported. +.TP +.B ESRCH +No such process (POSIX.1-2001). +.\" ESRMNT is defined but appears not to be used +.TP +.B ESTALE +Stale file handle (POSIX.1-2001). +.IP +This error can occur for NFS and for other filesystems. +.TP +.B ESTRPIPE +Streams pipe error. +.TP +.B ETIME +Timer expired +(POSIX.1 (XSI STREAMS option)). +.IP +(POSIX.1 says "STREAM +.BR ioctl (2) +timeout".) +.TP +.B ETIMEDOUT +Connection timed out (POSIX.1-2001). +.TP +.B ETOOMANYREFS +.\" ETOOMANYREFS seems to be used in net/unix/af_unix.c +Too many references: cannot splice. +.TP +.B ETXTBSY +Text file busy (POSIX.1-2001). +.TP +.B EUCLEAN +Structure needs cleaning. +.TP +.B EUNATCH +Protocol driver not attached. +.TP +.B EUSERS +Too many users. +.TP +.B EWOULDBLOCK +Operation would block (may be same value as +.BR EAGAIN ) +(POSIX.1-2001). +.TP +.B EXDEV +Invalid cross-device link (POSIX.1-2001). +.TP +.B EXFULL +Exchange full. +.SH NOTES +A common mistake is to do +.PP +.in +4n +.EX +if (somecall() == \-1) { + printf("somecall() failed\en"); + if (errno == ...) { ... } +} +.EE +.in +.PP +where +.I errno +no longer needs to have the value it had upon return from +.IR somecall () +(i.e., it may have been changed by the +.BR printf (3)). +If the value of +.I errno +should be preserved across a library call, it must be saved: +.PP +.in +4n +.EX +if (somecall() == \-1) { + int errsv = errno; + printf("somecall() failed\en"); + if (errsv == ...) { ... } +} +.EE +.in +.PP +Note that the POSIX threads APIs do +.I not +set +.I errno +on error. +Instead, on failure they return an error number as the function result. +These error numbers have the same meanings as the error numbers returned in +.I errno +by other APIs. +.PP +On some ancient systems, +.I +was not present or did not declare +.IR errno , +so that it was necessary to declare +.I errno +manually +(i.e., +.IR "extern int errno" ). +.BR "Do not do this" . +It long ago ceased to be necessary, +and it will cause problems with modern versions of the C library. +.SH SEE ALSO +.BR errno (1), \" In the moreutils package +.BR err (3), +.BR error (3), +.BR perror (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/error.3 b/upstream/opensuse-leap-15-6/man3/error.3 new file mode 100644 index 00000000..258ed13e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/error.3 @@ -0,0 +1,170 @@ +'\" t +.\" Copyright (C) 2006 Justin Pryzby +.\" and Copyright (C) 2006 Michael Kerrisk +.\" +.\" %%%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 +.TH error 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +error, error_at_line, error_message_count, error_one_per_line, +error_print_progname \- glibc error reporting functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void error(int " status ", int " errnum ", const char *" format ", ...);" +.BI "void error_at_line(int " status ", int " errnum ", const char *" filename , +.BI " unsigned int " linenum ", const char *" format ", ...);" +.PP +.BI "extern unsigned int " error_message_count ; +.BI "extern int " error_one_per_line ; +.PP +.BI "extern void (*" error_print_progname ")(void);" +.fi +.SH DESCRIPTION +.BR error () +is a general error-reporting function. +It flushes +.IR stdout , +and then outputs to +.I stderr +the program name, a colon and a space, the message specified by the +.BR printf (3)-style +format string \fIformat\fP, and, if \fIerrnum\fP is +nonzero, a second colon and a space followed by the string given by +.IR strerror(errnum) . +Any arguments required for +.I format +should follow +.I format +in the argument list. +The output is terminated by a newline character. +.PP +The program name printed by +.BR error () +is the value of the global variable +.BR program_invocation_name (3). +.I program_invocation_name +initially has the same value as +.IR main ()'s +.IR argv[0] . +The value of this variable can be modified to change the output of +.BR error (). +.PP +If \fIstatus\fP has a nonzero value, then +.BR error () +calls +.BR exit (3) +to terminate the program using the given value as the exit status; +otherwise it returns after printing the error message. +.PP +The +.BR error_at_line () +function is exactly the same as +.BR error (), +except for the addition of the arguments +.I filename +and +.IR linenum . +The output produced is as for +.BR error (), +except that after the program name are written: a colon, the value of +.IR filename , +a colon, and the value of +.IR linenum . +The preprocessor values \fB__LINE__\fP and +\fB__FILE__\fP may be useful when calling +.BR error_at_line (), +but other values can also be used. +For example, these arguments could refer to a location in an input file. +.PP +If the global variable \fIerror_one_per_line\fP is set nonzero, +a sequence of +.BR error_at_line () +calls with the +same value of \fIfilename\fP and \fIlinenum\fP will result in only +one message (the first) being output. +.PP +The global variable \fIerror_message_count\fP counts the number of +messages that have been output by +.BR error () +and +.BR error_at_line (). +.PP +If the global variable \fIerror_print_progname\fP +is assigned the address of a function +(i.e., is not NULL), then that function is called +instead of prefixing the message with the program name and colon. +The function should print a suitable string to +.IR stderr . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR error () +T} Thread safety MT-Safe locale +T{ +.BR error_at_line () +T} Thread safety T{ +MT-Unsafe\ race: error_at_line/\:error_one_per_line locale +T} +.TE +.hy +.ad +.sp 1 +.PP +The internal +.I error_one_per_line +variable is accessed (without any form of synchronization, but since it's an +.I int +used once, it should be safe enough) and, if +.I error_one_per_line +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 cancelation, so it can be interrupted only after +one of the two variables is modified. +After that, +.BR error_at_line () +is very much like +.BR error (). +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR err (3), +.BR errno (3), +.BR exit (3), +.BR perror (3), +.BR program_invocation_name (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/ether_aton.3 b/upstream/opensuse-leap-15-6/man3/ether_aton.3 new file mode 100644 index 00000000..9fcc9194 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ether_aton.3 @@ -0,0 +1,144 @@ +'\" t +.\" Copyright 2002 Ian Redfern (redferni@logica.com) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" FreeBSD 4.4 man pages +.\" +.\" Minor additions, aeb, 2013-06-21 +.\" +.TH ether_aton 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line, +ether_ntoa_r, ether_aton_r \- Ethernet address manipulation routines +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *ether_ntoa(const struct ether_addr *" addr ); +.BI "struct ether_addr *ether_aton(const char *" asc ); +.PP +.BI "int ether_ntohost(char *" hostname ", const struct ether_addr *" addr ); +.BI "int ether_hostton(const char *" hostname ", struct ether_addr *" addr ); +.PP +.BI "int ether_line(const char *" line ", struct ether_addr *" addr , +.BI " char *" hostname ); +.PP +/* GNU extensions */ +.BI "char *ether_ntoa_r(const struct ether_addr *" addr ", char *" buf ); +.PP +.BI "struct ether_addr *ether_aton_r(const char *" asc , +.BI " struct ether_addr *" addr ); +.fi +.SH DESCRIPTION +.BR ether_aton () +converts the 48-bit Ethernet host address +.I asc +from the standard hex-digits-and-colons notation into binary data in +network byte order and returns a pointer to it in a statically +allocated buffer, which subsequent calls will +overwrite. +.BR ether_aton () +returns NULL if the address is invalid. +.PP +The +.BR ether_ntoa () +function converts the Ethernet host address +.I addr +given in network byte order to a string in standard +hex-digits-and-colons notation, omitting leading zeros. +The string is returned in a statically allocated buffer, +which subsequent calls will overwrite. +.PP +The +.BR ether_ntohost () +function maps an Ethernet address to the +corresponding hostname in +.I /etc/ethers +and returns nonzero if it cannot be found. +.PP +The +.BR ether_hostton () +function maps a hostname to the +corresponding Ethernet address in +.I /etc/ethers +and returns nonzero if it cannot be found. +.PP +The +.BR ether_line () +function parses a line in +.I /etc/ethers +format (ethernet address followed by whitespace followed by +hostname; \[aq]#\[aq] introduces a comment) and returns an address +and hostname pair, or nonzero if it cannot be parsed. +The buffer pointed to by +.I hostname +must be sufficiently long, for example, have the same length as +.IR line . +.PP +The functions +.BR ether_ntoa_r () +and +.BR ether_aton_r () +are reentrant +thread-safe versions of +.BR ether_ntoa () +and +.BR ether_aton () +respectively, and do not use static buffers. +.PP +The structure +.I ether_addr +is defined in +.I +as: +.PP +.in +4n +.EX +struct ether_addr { + uint8_t ether_addr_octet[6]; +} +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ether_aton (), +.BR ether_ntoa () +T} Thread safety MT-Unsafe +T{ +.BR ether_ntohost (), +.BR ether_hostton (), +.BR ether_line (), +.BR ether_ntoa_r (), +.BR ether_aton_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD, SunOS. +.SH BUGS +In glibc 2.2.5 and earlier, the implementation of +.BR ether_line () +.\" The fix was presumably commit c0a0f9a32c8baa6ab93d00eb42d92c02e9e146d7 +.\" which was in glibc 2.3 +is broken. +.SH SEE ALSO +.BR ethers (5) diff --git a/upstream/opensuse-leap-15-6/man3/euidaccess.3 b/upstream/opensuse-leap-15-6/man3/euidaccess.3 new file mode 100644 index 00000000..83884321 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/euidaccess.3 @@ -0,0 +1,107 @@ +'\" t +.\" Copyright (C) 2007 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH euidaccess 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +euidaccess, eaccess \- check effective user's permissions for a file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int euidaccess(const char *" pathname ", int " mode ); +.BI "int eaccess(const char *" pathname ", int " mode ); +.fi +.SH DESCRIPTION +Like +.BR access (2), +.BR euidaccess () +checks permissions and existence of the file identified by its argument +.IR pathname . +However, whereas +.BR access (2) +performs checks using the real user and group identifiers of the process, +.BR euidaccess () +uses the effective identifiers. +.PP +.I mode +is a mask consisting of one or more of +.BR R_OK ", " W_OK ", " X_OK ", and " F_OK , +with the same meanings as for +.BR access (2). +.PP +.BR eaccess () +is a synonym for +.BR euidaccess (), +provided for compatibility with some other systems. +.SH RETURN VALUE +On success (all requested permissions granted), zero is returned. +On error (at least one bit in +.I mode +asked for a permission that is denied, or some other error occurred), +\-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +As for +.BR access (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR euidaccess (), +.BR eaccess () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Some other systems have an +.\" e.g., FreeBSD 6.1. +.BR eaccess () +function. +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR eaccess () +glibc 2.4. +.SH NOTES +.IR Warning : +Using this function to check a process's permissions on a file before +performing some operation based on that information leads to race conditions: +the file permissions may change between the two steps. +Generally, it is safer just to attempt the desired operation and handle +any permission error that occurs. +.PP +This function always dereferences symbolic links. +If you need to check the permissions on a symbolic link, use +.BR faccessat (2) +with the flags +.B AT_EACCESS +and +.BR AT_SYMLINK_NOFOLLOW . +.SH SEE ALSO +.BR access (2), +.BR chmod (2), +.BR chown (2), +.BR faccessat (2), +.BR open (2), +.BR setgid (2), +.BR setuid (2), +.BR stat (2), +.BR credentials (7), +.BR path_resolution (7) diff --git a/upstream/opensuse-leap-15-6/man3/exec.3 b/upstream/opensuse-leap-15-6/man3/exec.3 new file mode 100644 index 00000000..0d65ac05 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/exec.3 @@ -0,0 +1,312 @@ +'\" t +.\" Copyright (c) 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)exec.3 6.4 (Berkeley) 4/19/91 +.\" +.\" Converted for Linux, Mon Nov 29 11:12:48 1993, faith@cs.unc.edu +.\" Updated more for Linux, Tue Jul 15 11:54:18 1997, pacman@cqc.com +.\" Modified, 24 Jun 2004, Michael Kerrisk +.\" Added note on casting NULL +.\" +.TH exec 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +execl, execlp, execle, execv, execvp, execvpe \- execute a file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B extern char **environ; +.PP +.BI "int execl(const char *" pathname ", const char *" arg ", ..." +.B " /*, (char *) NULL */);" +.BI "int execlp(const char *" file ", const char *" arg ", ..." +.B " /*, (char *) NULL */);" +.BI "int execle(const char *" pathname ", const char *" arg ", ..." +.BI " /*, (char *) NULL, char *const " envp "[] */);" +.BI "int execv(const char *" pathname ", char *const " argv "[]);" +.BI "int execvp(const char *" file ", char *const " argv "[]);" +.BI "int execvpe(const char *" file ", char *const " argv \ +"[], char *const " envp "[]);" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR execvpe (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR exec () +family of functions replaces the current process image with a new process +image. +The functions described in this manual page are layered on top of +.BR execve (2). +(See the manual page for +.BR execve (2) +for further details about the replacement of the current process image.) +.PP +The initial argument for these functions is the name of a file that is +to be executed. +.PP +The functions can be grouped based on the letters following the "exec" prefix. +.\" +.SS l - execl(), execlp(), execle() +The +.I "const char\ *arg" +and subsequent ellipses can be thought of as +.IR arg0 , +.IR arg1 , +\&..., +.IR argn . +Together they describe a list of one or more pointers to null-terminated +strings that represent the argument list available to the executed program. +The first argument, by convention, should point to the filename associated +with the file being executed. +The list of arguments +.I must +be terminated by a null pointer, +and, since these are variadic functions, this pointer must be cast +.IR "(char\ *) NULL" . +.PP +By contrast with the 'l' functions, the 'v' functions (below) specify the +command-line arguments of the executed program as a vector. +.\" +.SS v - execv(), execvp(), execvpe() +The +.I "char\ *const argv[]" +argument is an array of pointers to null-terminated strings that +represent the argument list available to the new program. +The first argument, by convention, should point to the filename +associated with the file being executed. +The array of pointers +.I must +be terminated by a null pointer. +.SS e - execle(), execvpe() +The environment of the new process image is specified via the argument +.IR envp . +The +.I envp +argument is an array of pointers to null-terminated strings and +.I must +be terminated by a null pointer. +.PP +All other +.BR exec () +functions (which do not include 'e' in the suffix) +take the environment for the new process +image from the external variable +.I environ +in the calling process. +.SS p - execlp(), execvp(), execvpe() +These functions duplicate the actions of the shell in +searching for an executable file +if the specified filename does not contain a slash (/) character. +The file is sought in the colon-separated list of directory pathnames +specified in the +.B PATH +environment variable. +If this variable isn't defined, the path list defaults to +a list that includes the directories returned by +.I confstr(_CS_PATH) +(which typically returns the value "/bin:/usr/bin") +and possibly also the current working directory; +see NOTES for further details. +.PP +.BR execvpe () +searches for the program using the value of +.B PATH +from the caller's environment, not from the +.I envp +argument. +.PP +If the specified filename includes a slash character, then +.B PATH +is ignored, and the file at the specified pathname is executed. +.PP +In addition, certain errors are treated specially. +.PP +If permission is denied for a file (the attempted +.BR execve (2) +failed with the error +.BR EACCES ), +these functions will continue searching the rest of the search path. +If no other file is found, however, +they will return with +.I errno +set to +.BR EACCES . +.PP +If the header of a file isn't recognized (the attempted +.BR execve (2) +failed with the error +.BR ENOEXEC ), +these functions will execute the shell +.RI ( /bin/sh ) +with the path of the file as its first argument. +(If this attempt fails, no further searching is done.) +.PP +All other +.BR exec () +functions (which do not include 'p' in the suffix) +take as their first argument a (relative or absolute) pathname +that identifies the program to be executed. +.SH RETURN VALUE +The +.BR exec () +functions return only if an error has occurred. +The return value is \-1, and +.I errno +is set to indicate the error. +.SH ERRORS +All of these functions may fail and set +.I errno +for any of the errors specified for +.BR execve (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR execl (), +.BR execle (), +.BR execv () +T} Thread safety MT-Safe +T{ +.BR execlp (), +.BR execvp (), +.BR execvpe () +T} Thread safety MT-Safe env +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The default search path (used when the environment +does not contain the variable \fBPATH\fR) +shows some variation across systems. +It generally includes +.I /bin +and +.I /usr/bin +(in that order) and may also include the current working directory. +On some other systems, the current working is included after +.I /bin +and +.IR /usr/bin , +as an anti-Trojan-horse measure. +The glibc implementation long followed the traditional default where +the current working directory is included at the start of the search path. +However, some code refactoring during the development of glibc 2.24 +.\" glibc commit 1eb8930608705702d5746e5491bab4e4429fcb83 +caused the current working directory to be dropped altogether +from the default search path. +This accidental behavior change is considered mildly beneficial, +and won't be reverted. +.PP +The behavior of +.BR execlp () +and +.BR execvp () +when errors occur while attempting to execute the file is historic +practice, but has not traditionally been documented and is not specified by +the POSIX standard. +BSD (and possibly other systems) do an automatic +sleep and retry if +.B ETXTBSY +is encountered. +Linux treats it as a hard +error and returns immediately. +.PP +Traditionally, the functions +.BR execlp () +and +.BR execvp () +ignored all errors except for the ones described above and +.B ENOMEM +and +.BR E2BIG , +upon which they returned. +They now return if any error other than the ones +described above occurs. +.SH STANDARDS +.TP +.B environ +.TQ +.BR execl () +.TQ +.BR execlp () +.TQ +.BR execle () +.TQ +.BR execv () +.TQ +.BR execvp () +POSIX.1-2008. +.TP +.BR execvpe () +GNU. +.SH HISTORY +.TP +.B environ +.TQ +.BR execl () +.TQ +.BR execlp () +.TQ +.BR execle () +.TQ +.BR execv () +.TQ +.BR execvp () +POSIX.1-2001. +.TP +.BR execvpe () +glibc 2.11. +.SH BUGS +Before glibc 2.24, +.BR execl () +and +.BR execle () +employed +.BR realloc (3) +internally and were consequently not async-signal-safe, +in violation of the requirements of POSIX.1. +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=19534 +This was fixed in glibc 2.24. +.\" +.SS Architecture-specific details +On sparc and sparc64, +.BR execv () +is provided as a system call by the kernel +(with the prototype shown above) +for compatibility with SunOS. +This function is +.I not +employed by the +.BR execv () +wrapper function on those architectures. +.SH SEE ALSO +.BR sh (1), +.BR execve (2), +.BR execveat (2), +.BR fork (2), +.BR ptrace (2), +.BR fexecve (3), +.BR system (3), +.BR environ (7) diff --git a/upstream/opensuse-leap-15-6/man3/exit.3 b/upstream/opensuse-leap-15-6/man3/exit.3 new file mode 100644 index 00000000..21261062 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/exit.3 @@ -0,0 +1,205 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" FIXME . There are a lot of other process termination actions that +.\" could be listed on this page. See, for example, the list in the +.\" POSIX exit(3p) page. +.\" +.TH exit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +exit \- cause normal process termination +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[noreturn]] void exit(int " status ); +.fi +.SH DESCRIPTION +The +.BR exit () +function causes normal process termination and the least significant byte of +.I status +(i.e., \fIstatus & 0xFF\fP) is returned to the parent (see +.BR wait (2)). +.PP +All functions registered with +.BR atexit (3) +and +.BR on_exit (3) +are called, in the reverse order of their registration. +(It is possible for one of these functions to use +.BR atexit (3) +or +.BR on_exit (3) +to register an additional +function to be executed during exit processing; +the new registration is added to the front of the list of functions +that remain to be called.) +If one of these functions does not return +(e.g., it calls +.BR _exit (2), +or kills itself with a signal), +then none of the remaining functions is called, +and further exit processing (in particular, flushing of +.BR stdio (3) +streams) is abandoned. +If a function has been registered multiple times using +.BR atexit (3) +or +.BR on_exit (3), +then it is called as many times as it was registered. +.PP +All open +.BR stdio (3) +streams are flushed and closed. +Files created by +.BR tmpfile (3) +are removed. +.PP +The C standard specifies two constants, +\fBEXIT_SUCCESS\fP and \fBEXIT_FAILURE\fP, +that may be passed to +.BR exit () +to indicate successful or unsuccessful +termination, respectively. +.SH RETURN VALUE +The +.BR exit () +function does not return. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR exit () +T} Thread safety MT-Unsafe race:exit +.TE +.hy +.ad +.sp 1 +.PP +The +.BR exit () +function uses a global variable that is not protected, +so it is not thread-safe. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001, SVr4, 4.3BSD. +.SH NOTES +The behavior is undefined if one of the functions registered using +.BR atexit (3) +and +.BR on_exit (3) +calls either +.BR exit () +or +.BR longjmp (3). +Note that a call to +.BR execve (2) +removes registrations created using +.BR atexit (3) +and +.BR on_exit (3). +.PP +The use of +.B EXIT_SUCCESS +and +.B EXIT_FAILURE +is slightly more portable +(to non-UNIX environments) than the use of 0 and some nonzero value +like 1 or \-1. +In particular, VMS uses a different convention. +.PP +BSD has attempted to standardize exit codes +(which some C libraries such as the GNU C library have also adopted); +see the file +.IR . +.PP +After +.BR exit (), +the exit status must be transmitted to the +parent process. +There are three cases: +.IP \[bu] 3 +If the parent has set +.BR SA_NOCLDWAIT , +or has set the +.B SIGCHLD +handler to +.BR SIG_IGN , +the status is discarded and the child dies immediately. +.IP \[bu] +If the parent was waiting on the child, +it is notified of the exit status and the child dies immediately. +.IP \[bu] +Otherwise, +the child becomes a "zombie" process: +most of the process resources are recycled, +but a slot containing minimal information about the child process +(termination status, resource usage statistics) is retained in process table. +This allows the parent to subsequently use +.BR waitpid (2) +(or similar) to learn the termination status of the child; +at that point the zombie process slot is released. +.PP +If the implementation supports the +.B SIGCHLD +signal, this signal +is sent to the parent. +If the parent has set +.BR SA_NOCLDWAIT , +it is undefined whether a +.B SIGCHLD +signal is sent. +.\" +.SS Signals sent to other processes +If the exiting process is a session leader and its controlling terminal +is the controlling terminal of the session, then each process in +the foreground process group of this controlling terminal +is sent a +.B SIGHUP +signal, and the terminal is disassociated +from this session, allowing it to be acquired by a new controlling +process. +.PP +If the exit of the process causes a process group to become orphaned, +and if any member of the newly orphaned process group is stopped, +then a +.B SIGHUP +signal followed by a +.B SIGCONT +signal will be +sent to each process in this process group. +See +.BR setpgid (2) +for an explanation of orphaned process groups. +.PP +Except in the above cases, +where the signalled processes may be children of the terminating process, +termination of a process does +.I not +in general cause a signal to be sent to children of that process. +However, a process can use the +.BR prctl (2) +.B PR_SET_PDEATHSIG +operation to arrange that it receives a signal if its parent terminates. +.SH SEE ALSO +.BR _exit (2), +.BR get_robust_list (2), +.BR setpgid (2), +.BR wait (2), +.BR atexit (3), +.BR on_exit (3), +.BR tmpfile (3) diff --git a/upstream/opensuse-leap-15-6/man3/exp.3 b/upstream/opensuse-leap-15-6/man3/exp.3 new file mode 100644 index 00000000..f78e0365 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/exp.3 @@ -0,0 +1,136 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH exp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +exp, expf, expl \- base-e exponential function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double exp(double " x ); +.BI "float expf(float " x ); +.BI "long double expl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR expf (), +.BR expl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the value of e (the base of natural +logarithms) raised to the power of +.IR x . +.SH RETURN VALUE +On success, these functions return the exponential value of +.IR x . +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is positive infinity, +positive infinity is returned. +.PP +If +.I x +is negative infinity, ++0 is returned. +.PP +If the result underflows, +a range error occurs, +and zero is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.RB + HUGE_VAL , +.RB + HUGE_VALF , +or +.RB + HUGE_VALL , +respectively. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error, overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error, underflow +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR exp (), +.BR expf (), +.BR expl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR cbrt (3), +.BR cexp (3), +.BR exp10 (3), +.BR exp2 (3), +.BR expm1 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/exp10.3 b/upstream/opensuse-leap-15-6/man3/exp10.3 new file mode 100644 index 00000000..fcae3796 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/exp10.3 @@ -0,0 +1,85 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.TH exp10 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +exp10, exp10f, exp10l \- base-10 exponential function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "double exp10(double " x ); +.BI "float exp10f(float " x ); +.BI "long double exp10l(long double " x ); +.fi +.SH DESCRIPTION +These functions return the value of 10 +raised to the power of +.IR x . +.SH RETURN VALUE +On success, these functions return the base-10 exponential value of +.IR x . +.PP +For various special cases, including the handling of infinity and NaN, +as well as overflows and underflows, see +.BR exp (3). +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +For a discussion of the errors that can occur for these functions, see +.BR exp (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR exp10 (), +.BR exp10f (), +.BR exp10l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH BUGS +Before glibc 2.19, the glibc implementation of these functions did not set +.I errno +to +.B ERANGE +when an underflow error occurred. +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6787 +.SH SEE ALSO +.BR cbrt (3), +.BR exp (3), +.BR exp2 (3), +.BR log10 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/exp2.3 b/upstream/opensuse-leap-15-6/man3/exp2.3 new file mode 100644 index 00000000..dbb1ee21 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/exp2.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH exp2 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +exp2, exp2f, exp2l \- base-2 exponential function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double exp2(double " x ); +.BI "float exp2f(float " x ); +.BI "long double exp2l(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR exp2 (), +.BR exp2f (), +.BR exp2l (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return the value of 2 raised to the power of +.IR x . +.SH RETURN VALUE +On success, these functions return the base-2 exponential value of +.IR x . +.PP +For various special cases, including the handling of infinity and NaN, +as well as overflows and underflows, see +.BR exp (3). +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +For a discussion of the errors that can occur for these functions, see +.BR exp (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR exp2 (), +.BR exp2f (), +.BR exp2l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR cbrt (3), +.BR cexp2 (3), +.BR exp (3), +.BR exp10 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/expm1.3 b/upstream/opensuse-leap-15-6/man3/expm1.3 new file mode 100644 index 00000000..15272a4d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/expm1.3 @@ -0,0 +1,168 @@ +'\" t +.\" Copyright 1995 Jim Van Zandt +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified 2002-07-27 Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH expm1 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +expm1, expm1f, expm1l \- exponential minus 1 +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double expm1(double " x ); +.BI "float expm1f(float " x ); +.BI "long double expm1l(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR expm1 (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR expm1f (), +.BR expm1l (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return a value equivalent to +.PP +.nf + exp(x) \- 1 +.fi +.PP +The result is computed in a way that is accurate even if the value of +.I x +is near +zero\[em]a case where +.I "exp(x) \- 1" +would be inaccurate due to +subtraction of two numbers that are nearly equal. +.SH RETURN VALUE +On success, these functions return +.IR "exp(x)\ \-\ 1" . +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is +0 (\-0), ++0 (\-0) is returned. +.PP +If +.I x +is positive infinity, positive infinity is returned. +.PP +If +.I x +is negative infinity, \-1 is returned. +.PP +If the result overflows, a range error occurs, +and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error, overflow +.I errno +is set to +.B ERANGE +(but see BUGS). +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.\" +.\" POSIX.1 specifies an optional range error (underflow) if +.\" x is subnormal. glibc does not implement this. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR expm1 (), +.BR expm1f (), +.BR expm1l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +BSD. +.SH BUGS +Before glibc 2.17, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6778 +on certain architectures (e.g., x86, but not x86_64) +.BR expm1 () +raised a bogus underflow floating-point exception +for some large negative +.I x +values (where the function result approaches \-1). +.PP +Before approximately glibc 2.11, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6814 +.\" e.g., expm1(1e5) through expm1(1.00199970127e5), +.\" but not expm1(1.00199970128e5) and beyond. +.BR expm1 () +raised a bogus invalid floating-point exception in addition to the expected +overflow exception, and returned a NaN instead of positive infinity, +for some large positive +.I x +values. +.PP +Before glibc 2.11, +.\" It looks like the fix was in glibc 2.11, or possibly glibc 2.12. +.\" I have no test system for glibc 2.11, but glibc 2.12 passes. +.\" From the source (sysdeps/i386/fpu/s_expm1.S) it looks +.\" like the changes were in glibc 2.11. +the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6788 +.I errno +to +.B ERANGE +when a range error occurred. +.SH SEE ALSO +.BR exp (3), +.BR log (3), +.BR log1p (3) diff --git a/upstream/opensuse-leap-15-6/man3/extensions.3ncurses b/upstream/opensuse-leap-15-6/man3/extensions.3ncurses new file mode 100644 index 00000000..c6be49eb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/extensions.3ncurses @@ -0,0 +1,86 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2010,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1999-on +.\" +.\" $Id: curs_extend.3x,v 1.21 2016/10/15 16:52:48 tom Exp $ +.TH extensions 3NCURSES "" +.SH NAME +\fBcurses_version\fP, +\fBuse_extended_names\fP \- miscellaneous curses extensions +. +.SH SYNOPSIS +\fB#include \fP +.sp +\fBconst char * curses_version(void);\fP +.br +\fBint use_extended_names(bool enable);\fP +.SH DESCRIPTION +These functions are extensions to the curses library +which do not fit easily into other categories. +.SS curses_version +.PP +Use \fBcurses_version\fP +to get the version number, including patch level of the library, e.g., +.B 5.0.19991023 +.SS use_extended_names +.PP +The \fBuse_extended_names\fP +function controls whether the calling application +is able to use user-defined or nonstandard names +which may be compiled into the terminfo +description, i.e., via the terminfo or termcap interfaces. +Normally these names are available for use, since the essential decision +is made by using the \fB\-x\fP option of \fBtic\fP to compile +extended terminal definitions. +However you can disable this feature +to ensure compatibility with other implementations of curses. +.SH RETURN VALUE +.PP +\fBcurses_version\fP returns a pointer to static memory; you should not free +this in your application. +.PP +\fBuse_extended_names\fP returns the previous state, allowing you to +save this and restore it. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBgetch\fR(3NCURSES), +\fBmouse\fR(3NCURSES), +\fBprint\fR(3NCURSES), +\fButil\fR(3NCURSES), +\fBdefault_colors\fR(3NCURSES), +\fBdefine_key\fR(3NCURSES), +\fBkeybound\fR(3NCURSES), +\fBkeyok\fR(3NCURSES), +\fBresizeterm\fR(3NCURSES), +\fBwresize\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/fabs.3 b/upstream/opensuse-leap-15-6/man3/fabs.3 new file mode 100644 index 00000000..b52dc1da --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fabs.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH fabs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fabs, fabsf, fabsl \- absolute value of floating-point number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fabs(double " x ); +.BI "float fabsf(float " x ); +.BI "long double fabsl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fabsf (), +.BR fabsl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the absolute value of the floating-point +number +.IR x . +.SH RETURN VALUE +These functions return the absolute value of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is \-0, +0 is returned. +.PP +If +.I x +is negative infinity or positive infinity, positive infinity is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fabs (), +.BR fabsf (), +.BR fabsl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR abs (3), +.BR cabs (3), +.BR ceil (3), +.BR floor (3), +.BR labs (3), +.BR rint (3) diff --git a/upstream/opensuse-leap-15-6/man3/fclose.3 b/upstream/opensuse-leap-15-6/man3/fclose.3 new file mode 100644 index 00000000..f120234f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fclose.3 @@ -0,0 +1,105 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Chris Torek and the American National Standards Committee X3, +.\" on Information Processing Systems. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)fclose.3 6.7 (Berkeley) 6/29/91 +.\" +.\" Converted for Linux, Mon Nov 29 15:19:14 1993, faith@cs.unc.edu +.\" +.\" Modified 2000-07-22 by Nicolás Lichtmaier +.\" +.TH fclose 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fclose \- close a stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fclose(FILE *" stream ); +.fi +.SH DESCRIPTION +The +.BR fclose () +function flushes the stream pointed to by +.I stream +(writing any buffered output data using +.BR fflush (3)) +and closes the underlying file descriptor. +.SH RETURN VALUE +Upon successful completion, 0 is returned. +Otherwise, +.B EOF +is returned and +.I errno +is set to indicate the error. +In either case, any further access +(including another call to +.BR fclose ()) +to the stream results in undefined behavior. +.SH ERRORS +.TP +.B EBADF +The file descriptor underlying +.I stream +is not valid. +.\" This error cannot occur unless you are mixing ANSI C stdio operations and +.\" low-level file operations on the same stream. If you do get this error, +.\" you must have closed the stream's low-level file descriptor using +.\" something like close(fileno(stream)). +.PP +The +.BR fclose () +function may also fail and set +.I errno +for any of the errors specified for the routines +.BR close (2), +.BR write (2), +or +.BR fflush (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fclose () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.SH NOTES +Note that +.BR fclose () +flushes only the user-space buffers provided by the +C library. +To ensure that the data is physically stored +on disk the kernel buffers must be flushed too, for example, with +.BR sync (2) +or +.BR fsync (2). +.SH SEE ALSO +.BR close (2), +.BR fcloseall (3), +.BR fflush (3), +.BR fileno (3), +.BR fopen (3), +.BR setbuf (3) diff --git a/upstream/opensuse-leap-15-6/man3/fcloseall.3 b/upstream/opensuse-leap-15-6/man3/fcloseall.3 new file mode 100644 index 00000000..b45b3dd0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fcloseall.3 @@ -0,0 +1,67 @@ +'\" t +.\" Copyright (c) 2006 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH fcloseall 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fcloseall \- close all open streams +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B int fcloseall(void); +.fi +.SH DESCRIPTION +The +.BR fcloseall () +function closes all of the calling process's open streams. +Buffered output for each stream is written before it is closed +(as for +.BR fflush (3)); +buffered input is discarded. +.PP +The standard streams, +.IR stdin , +.IR stdout , +and +.I stderr +are also closed. +.SH RETURN VALUE +This function returns 0 if all files were successfully closed; +on error, +.B EOF +is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fcloseall () +T} Thread safety MT-Unsafe race:streams +.TE +.hy +.ad +.sp 1 +.PP +The +.BR fcloseall () +function does not lock the streams, so it is not thread-safe. +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR close (2), +.BR fclose (3), +.BR fflush (3), +.BR fopen (3), +.BR setbuf (3) diff --git a/upstream/opensuse-leap-15-6/man3/fdim.3 b/upstream/opensuse-leap-15-6/man3/fdim.3 new file mode 100644 index 00000000..b4c44594 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fdim.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright 2003 Walter Harms, Andries Brouwer +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH fdim 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fdim, fdimf, fdiml \- positive difference +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fdim(double " x ", double " y ); +.BI "float fdimf(float " x ", float " y ); +.BI "long double fdiml(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fdimf (), +.BR fdiml (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return the positive difference, max(\fIx\fP-\fIy\fP,0), +between their arguments. +.SH RETURN VALUE +On success, these functions return the positive difference. +.PP +If +.I x +or +.I y +is a NaN, a NaN is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fdim (), +.BR fdimf (), +.BR fdiml () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH BUGS +Before glibc 2.24 +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6796 +on certain architectures (e.g., x86, but not x86_64) +these functions did not set +.IR errno . +.SH SEE ALSO +.BR fmax (3) diff --git a/upstream/opensuse-leap-15-6/man3/fenv.3 b/upstream/opensuse-leap-15-6/man3/fenv.3 new file mode 100644 index 00000000..8c1d8d4f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fenv.3 @@ -0,0 +1,335 @@ +'\" t +.\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 2000-08-14 added GNU additions from Andreas Jaeger +.\" 2000-12-05 some changes inspired by acahalan's remarks +.\" +.TH fenv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag, +fetestexcept, fegetenv, fegetround, feholdexcept, fesetround, +fesetenv, feupdateenv, feenableexcept, fedisableexcept, +fegetexcept \- floating-point rounding and exception handling +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int feclearexcept(int " excepts ); +.BI "int fegetexceptflag(fexcept_t *" flagp ", int " excepts ); +.BI "int feraiseexcept(int " excepts ); +.BI "int fesetexceptflag(const fexcept_t *" flagp ", int " excepts ); +.BI "int fetestexcept(int " excepts ); +.PP +.B "int fegetround(void);" +.BI "int fesetround(int " rounding_mode ); +.PP +.BI "int fegetenv(fenv_t *" envp ); +.BI "int feholdexcept(fenv_t *" envp ); +.BI "int fesetenv(const fenv_t *" envp ); +.BI "int feupdateenv(const fenv_t *" envp ); +.fi +.SH DESCRIPTION +These eleven functions were defined in C99, and describe the handling +of floating-point rounding and exceptions (overflow, zero-divide, etc.). +.SS Exceptions +The +.I divide-by-zero +exception occurs when an operation on finite numbers +produces infinity as exact answer. +.PP +The +.I overflow +exception occurs when a result has to be represented as a +floating-point number, but has (much) larger absolute value than the +largest (finite) floating-point number that is representable. +.PP +The +.I underflow +exception occurs when a result has to be represented as a +floating-point number, but has smaller absolute value than the smallest +positive normalized floating-point number (and would lose much accuracy +when represented as a denormalized number). +.PP +The +.I inexact +exception occurs when the rounded result of an operation +is not equal to the infinite precision result. +It may occur whenever +.I overflow +or +.I underflow +occurs. +.PP +The +.I invalid +exception occurs when there is no well-defined result +for an operation, as for 0/0 or infinity \- infinity or sqrt(\-1). +.SS Exception handling +Exceptions are represented in two ways: as a single bit +(exception present/absent), and these bits correspond in some +implementation-defined way with bit positions in an integer, +and also as an opaque structure that may contain more information +about the exception (perhaps the code address where it occurred). +.PP +Each of the macros +.BR FE_DIVBYZERO , +.BR FE_INEXACT , +.BR FE_INVALID , +.BR FE_OVERFLOW , +.B FE_UNDERFLOW +is defined when the implementation supports handling +of the corresponding exception, and if so then +defines the corresponding bit(s), so that one can call +exception handling functions, for example, using the integer argument +.BR FE_OVERFLOW | FE_UNDERFLOW . +Other exceptions may be supported. +The macro +.B FE_ALL_EXCEPT +is the bitwise OR of all bits corresponding to supported exceptions. +.PP +The +.BR feclearexcept () +function clears the supported exceptions represented by the bits +in its argument. +.PP +The +.BR fegetexceptflag () +function stores a representation of the state of the exception flags +represented by the argument +.I excepts +in the opaque object +.IR *flagp . +.PP +The +.BR feraiseexcept () +function raises the supported exceptions represented by the bits in +.IR excepts . +.PP +The +.BR fesetexceptflag () +function sets the complete status for the exceptions represented by +.I excepts +to the value +.IR *flagp . +This value must have been obtained by an earlier call of +.BR fegetexceptflag () +with a last argument that contained all bits in +.IR excepts . +.PP +The +.BR fetestexcept () +function returns a word in which the bits are set that were +set in the argument +.I excepts +and for which the corresponding exception is currently set. +.SS Rounding mode +The rounding mode determines how the result of floating-point operations +is treated when the result cannot be exactly represented in the significand. +Various rounding modes may be provided: +round to nearest (the default), +round up (toward positive infinity), +round down (toward negative infinity), and +round toward zero. +.PP +Each of the macros +.BR FE_TONEAREST , +.BR FE_UPWARD , +.BR FE_DOWNWARD , +and +.B FE_TOWARDZERO +is defined when the implementation supports getting and setting +the corresponding rounding direction. +.PP +The +.BR fegetround () +function returns the macro corresponding to the current +rounding mode. +.PP +The +.BR fesetround () +function sets the rounding mode as specified by its argument +and returns zero when it was successful. +.PP +C99 and POSIX.1-2008 specify an identifier, +.BR FLT_ROUNDS , +defined in +.IR , +which indicates the implementation-defined rounding +behavior for floating-point addition. +This identifier has one of the following values: +.TP +.B \-1 +The rounding mode is not determinable. +.TP +.B 0 +Rounding is toward 0. +.TP +.B 1 +Rounding is toward nearest number. +.TP +.B 2 +Rounding is toward positive infinity. +.TP +.B 3 +Rounding is toward negative infinity. +.PP +Other values represent machine-dependent, nonstandard rounding modes. +.PP +The value of +.B FLT_ROUNDS +should reflect the current rounding mode as set by +.BR fesetround () +(but see BUGS). +.SS Floating-point environment +The entire floating-point environment, including +control modes and status flags, can be handled +as one opaque object, of type +.IR fenv_t . +The default environment is denoted by +.B FE_DFL_ENV +(of type +.IR "const fenv_t\ *" ). +This is the environment setup at program start and it is defined by +ISO C to have round to nearest, all exceptions cleared and a nonstop +(continue on exceptions) mode. +.PP +The +.BR fegetenv () +function saves the current floating-point environment in the object +.IR *envp . +.PP +The +.BR feholdexcept () +function does the same, then clears all exception flags, +and sets a nonstop (continue on exceptions) mode, +if available. +It returns zero when successful. +.PP +The +.BR fesetenv () +function restores the floating-point environment from +the object +.IR *envp . +This object must be known to be valid, for example, the result of a call to +.BR fegetenv () +or +.BR feholdexcept () +or equal to +.BR FE_DFL_ENV . +This call does not raise exceptions. +.PP +The +.BR feupdateenv () +function installs the floating-point environment represented by +the object +.IR *envp , +except that currently raised exceptions are not cleared. +After calling this function, the raised exceptions will be a bitwise OR +of those previously set with those in +.IR *envp . +As before, the object +.I *envp +must be known to be valid. +.SH RETURN VALUE +These functions return zero on success and nonzero if an error occurred. +.\" Earlier seven of these functions were listed as returning void. +.\" This was corrected in Corrigendum 1 (ISO/IEC 9899:1999/Cor.1:2001(E)) +.\" of the C99 Standard. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.nh +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR feclearexcept (), +.BR fegetexceptflag (), +.BR feraiseexcept (), +.BR fesetexceptflag (), +.BR fetestexcept (), +.BR fegetround (), +.BR fesetround (), +.BR fegetenv (), +.BR feholdexcept (), +.BR fesetenv (), +.BR feupdateenv (), +.BR feenableexcept (), +.BR fedisableexcept (), +.BR fegetexcept () +T} Thread safety T{ +MT-Safe +T} +.TE +.hy +.ad +.sp 1 +.hy +.SH STANDARDS +C11, POSIX.1-2008, IEC 60559 (IEC 559:1989), ANSI/IEEE 854. +.SH HISTORY +C99, POSIX.1-2001. +glibc 2.1. +.SH NOTES +.SS glibc notes +If possible, the GNU C Library defines a macro +.B FE_NOMASK_ENV +which represents an environment where every exception raised causes a +trap to occur. +You can test for this macro using +.BR #ifdef . +It is defined only if +.B _GNU_SOURCE +is defined. +The C99 standard does not define a way to set individual bits in the +floating-point mask, for example, to trap on specific flags. +Since glibc 2.2, glibc supports the functions +.BR feenableexcept () +and +.BR fedisableexcept () +to set individual floating-point traps, and +.BR fegetexcept () +to query the state. +.PP +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B "#include " +.PP +.BI "int feenableexcept(int " excepts ); +.BI "int fedisableexcept(int " excepts ); +.B "int fegetexcept(void);" +.fi +.PP +The +.BR feenableexcept () +and +.BR fedisableexcept () +functions enable (disable) traps for each of the exceptions represented by +.I excepts +and return the previous set of enabled exceptions when successful, +and \-1 otherwise. +The +.BR fegetexcept () +function returns the set of all currently enabled exceptions. +.SH BUGS +C99 specifies that the value of +.B FLT_ROUNDS +should reflect changes to the current rounding mode, as set by +.BR fesetround (). +Currently, +.\" Aug 08, glibc 2.8 +this does not occur: +.B FLT_ROUNDS +always has the value 1. +.\" See http://gcc.gnu.org/ml/gcc/2002-02/msg01535.html +.SH SEE ALSO +.BR math_error (7) diff --git a/upstream/opensuse-leap-15-6/man3/ferror.3 b/upstream/opensuse-leap-15-6/man3/ferror.3 new file mode 100644 index 00000000..7826bdb3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ferror.3 @@ -0,0 +1,121 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" and Copyright (C) 2021 Michael Kerrisk +.\" 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)ferror.3 6.8 (Berkeley) 6/29/91 +.\" +.\" +.\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu +.\" +.TH ferror 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +clearerr, feof, ferror \- check and reset stream status +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void clearerr(FILE *" stream ); +.BI "int feof(FILE *" stream ); +.BI "int ferror(FILE *" stream ); +.fi +.SH DESCRIPTION +The function +.BR clearerr () +clears the end-of-file and error indicators for the stream pointed to by +.IR stream . +.PP +The function +.BR feof () +tests the end-of-file indicator for the stream pointed to by +.IR stream , +returning nonzero if it is set. +The end-of-file indicator can be cleared only by the function +.BR clearerr (). +.PP +The function +.BR ferror () +tests the error indicator for the stream pointed to by +.IR stream , +returning nonzero if it is set. +The error indicator can be reset only by the +.BR clearerr () +function. +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +The +.BR feof () +function returns nonzero if the end-of-file indicator is set for +.IR stream ; +otherwise, it returns zero. +.PP +The +.BR ferror () +function returns nonzero if the error indicator is set for +.IR stream ; +otherwise, it returns zero. +.SH ERRORS +These functions should not fail and do not set +.IR errno . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR clearerr (), +.BR feof (), +.BR ferror () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.SH NOTES +POSIX.1-2008 specifies +.\"https://www.austingroupbugs.net/view.php?id=401 +that these functions shall not change the value of +.I errno +if +.I stream +is valid. +.SH CAVEATS +Normally, +programs should read the return value of an input function, +such as +.BR fgetc (3), +before using functions of the +.BR feof (3) +family. +Only when the function returned the sentinel value +.B EOF +it makes sense to distinguish between the end of a file or an error with +.BR feof (3) +or +.BR ferror (3). +.SH SEE ALSO +.BR open (2), +.BR fdopen (3), +.BR fileno (3), +.BR stdio (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/fexecve.3 b/upstream/opensuse-leap-15-6/man3/fexecve.3 new file mode 100644 index 00000000..79bef473 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fexecve.3 @@ -0,0 +1,175 @@ +'\" t +.\" Copyright (c) 2006, 2014, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH fexecve 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fexecve \- execute program specified via file descriptor +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fexecve(int " fd ", char *const " argv "[], char *const " envp []); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fexecve (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +.BR fexecve () +performs the same task as +.BR execve (2), +with the difference that the file to be executed +is specified via a file descriptor, +.IR fd , +rather than via a pathname. +The file descriptor +.I fd +must be opened read-only +.RB ( O_RDONLY ) +or with the +.B O_PATH +flag +and the caller must have permission to execute the file that it refers to. +.SH RETURN VALUE +A successful call to +.BR fexecve () +never returns. +On error, the function does return, with a result value of \-1, and +.I errno +is set to indicate the error. +.SH ERRORS +Errors are as for +.BR execve (2), +with the following additions: +.TP +.B EINVAL +.I fd +is not a valid file descriptor, or +.I argv +is NULL, or +.I envp +is NULL. +.TP +.B ENOENT +The close-on-exec flag is set on +.IR fd , +and +.I fd +refers to a script. +See BUGS. +.TP +.B ENOSYS +The kernel does not provide the +.BR execveat (2) +system call, and the +.I /proc +filesystem could not be accessed. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fexecve () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.3.2. +.PP +On Linux with glibc versions 2.26 and earlier, +.BR fexecve () +is implemented using the +.BR proc (5) +filesystem, so +.I /proc +needs to be mounted and available at the time of the call. +Since glibc 2.27, +.\" glibc commit 43ffc53a352a67672210c9dd4959f6c6b7407e60 +if the underlying kernel supports the +.BR execveat (2) +system call, then +.BR fexecve () +is implemented using that system call, with the benefit that +.I /proc +does not need to be mounted. +.SH NOTES +The idea behind +.BR fexecve () +is to allow the caller to verify (checksum) the contents of +an executable before executing it. +Simply opening the file, checksumming the contents, and then doing an +.BR execve (2) +would not suffice, since, between the two steps, the filename, +or a directory prefix of the pathname, could have been exchanged +(by, for example, modifying the target of a symbolic link). +.BR fexecve () +does not mitigate the problem that the +.I contents +of a file could be changed between the checksumming and the call to +.BR fexecve (); +for that, the solution is to ensure that the permissions on the file +prevent it from being modified by malicious users. +.PP +The natural idiom when using +.BR fexecve () +is to set the close-on-exec flag on +.IR fd , +so that the file descriptor does not leak through to the program +that is executed. +This approach is natural for two reasons. +First, it prevents file descriptors being consumed unnecessarily. +(The executed program normally has no need of a file descriptor +that refers to the program itself.) +Second, if +.BR fexecve () +is used recursively, +employing the close-on-exec flag prevents the file descriptor exhaustion +that would result from the fact that each step in the recursion would +cause one more file descriptor to be passed to the new program. +(But see BUGS.) +.SH BUGS +If +.I fd +refers to a script (i.e., it is an executable text file that names +a script interpreter with a first line that begins with the characters +.IR #! ) +and the close-on-exec flag has been set for +.IR fd , +then +.BR fexecve () +fails with the error +.BR ENOENT . +This error occurs because, +by the time the script interpreter is executed, +.I fd +has already been closed because of the close-on-exec flag. +Thus, the close-on-exec flag can't be set on +.I fd +if it refers to a script, leading to the problems described in NOTES. +.SH SEE ALSO +.BR execve (2), +.BR execveat (2) diff --git a/upstream/opensuse-leap-15-6/man3/fflush.3 b/upstream/opensuse-leap-15-6/man3/fflush.3 new file mode 100644 index 00000000..32e4dd6a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fflush.3 @@ -0,0 +1,118 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Chris Torek and the American National Standards Committee X3, +.\" on Information Processing Systems. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)fflush.3 5.4 (Berkeley) 6/29/91 +.\" +.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu +.\" +.\" Modified 2000-07-22 by Nicolás Lichtmaier +.\" Modified 2001-10-16 by John Levon +.\" +.TH fflush 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fflush \- flush a stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fflush(FILE *" stream ); +.fi +.SH DESCRIPTION +For output streams, +.BR fflush () +forces a write of all user-space buffered data for the given output or update +.I stream +via the stream's underlying write function. +.PP +For input streams associated with seekable files +(e.g., disk files, but not pipes or terminals), +.BR fflush () +discards any buffered data that has been fetched from the underlying file, +but has not been consumed by the application. +.PP +The open status of the stream is unaffected. +.PP +If the +.I stream +argument is NULL, +.BR fflush () +flushes +.I all +open output streams. +.\" mtk: POSIX specifies that only output streams are flushed for this case. +.\" Also verified for glibc by experiment. +.PP +For a nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +Upon successful completion 0 is returned. +Otherwise, +.B EOF +is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I stream +is not an open stream, or is not open for writing. +.PP +The function +.BR fflush () +may also fail and set +.I errno +for any of the errors specified for +.BR write (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fflush () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001, POSIX.1-2008. +.PP +POSIX.1-2001 did not specify the behavior for flushing of input streams, +but the behavior is specified in POSIX.1-2008. +.SH NOTES +Note that +.BR fflush () +flushes only the user-space buffers provided by the C library. +To ensure that the data is physically stored on disk +the kernel buffers must be flushed too, for example, with +.BR sync (2) +or +.BR fsync (2). +.SH SEE ALSO +.BR fsync (2), +.BR sync (2), +.BR write (2), +.BR fclose (3), +.BR fileno (3), +.BR fopen (3), +.BR fpurge (3), +.BR setbuf (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/ffs.3 b/upstream/opensuse-leap-15-6/man3/ffs.3 new file mode 100644 index 00000000..1858cbeb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ffs.3 @@ -0,0 +1,106 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 19:39:35 1993 by Rik Faith (faith@cs.unc.edu) +.\" +.\" Modified 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH ffs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ffs, ffsl, ffsll \- find first bit set in a word +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int ffs(int " i ); +.PP +.B #include +.PP +.BI "int ffsl(long " i ); +.BI "int ffsll(long long " i ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ffs (): +.nf + Since glibc 2.12: + _XOPEN_SOURCE >= 700 + || ! (_POSIX_C_SOURCE >= 200809L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE + Before glibc 2.12: + none +.fi +.PP +.BR ffsl (), +.BR ffsll (): +.nf + Since glibc 2.27: +.\" glibc commit 68fe16dd327c895c08b9ee443b234c49c13b36e9 + _DEFAULT_SOURCE + Before glibc 2.27: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR ffs () +function returns the position of the first +(least significant) bit set in the word \fIi\fP. +The least significant bit is position 1 and the +most significant position is, for example, 32 or 64. +The functions +.BR ffsll () +and +.BR ffsl () +do the same but take +arguments of possibly different size. +.SH RETURN VALUE +These functions return the position of the first bit set, +or 0 if no bits are set in +.IR i . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ffs (), +.BR ffsl (), +.BR ffsll () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +BSD systems have a prototype in +.IR . +.SH STANDARDS +.TP +.BR ffs () +POSIX.1-2001, POSIX.1-2008, 4.3BSD. +.TP +.BR ffsl () +.TQ +.BR ffsll () +GNU. +.SH SEE ALSO +.BR memchr (3) diff --git a/upstream/opensuse-leap-15-6/man3/fgetc.3 b/upstream/opensuse-leap-15-6/man3/fgetc.3 new file mode 100644 index 00000000..c907a1cf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fgetc.3 @@ -0,0 +1,155 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl) +.TH fgetc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetc, fgets, getc, getchar, ungetc \- input of characters and strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fgetc(FILE *" stream ); +.BI "int getc(FILE *" stream ); +.B "int getchar(void);" +.PP +.BI "char *fgets(char " s "[restrict ." size "], int " size ", \ +FILE *restrict " stream ); +.PP +.BI "int ungetc(int " c ", FILE *" stream ); +.fi +.SH DESCRIPTION +.BR fgetc () +reads the next character from +.I stream +and returns it as an +.I unsigned char +cast to an +.IR int , +or +.B EOF +on end of file or error. +.PP +.BR getc () +is equivalent to +.BR fgetc () +except that it may be implemented as a macro which evaluates +.I stream +more than once. +.PP +.BR getchar () +is equivalent to +.BI "getc(" stdin ) \fR. +.PP +.BR fgets () +reads in at most one less than +.I size +characters from +.I stream +and stores them into the buffer pointed to by +.IR s . +Reading stops after an +.B EOF +or a newline. +If a newline is read, it is stored into the buffer. +A terminating null byte (\[aq]\e0\[aq]) +is stored after the last character in the buffer. +.PP +.BR ungetc () +pushes +.I c +back to +.IR stream , +cast to +.IR "unsigned char" , +where it is available for subsequent read operations. +Pushed-back characters +will be returned in reverse order; only one pushback is guaranteed. +.PP +Calls to the functions described here can be mixed with each other and with +calls to other input functions from the +.I stdio +library for the same input stream. +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +.BR fgetc (), +.BR getc (), +and +.BR getchar () +return the character read as an +.I unsigned char +cast to an +.I int +or +.B EOF +on end of file or error. +.PP +.BR fgets () +returns +.I s +on success, and NULL +on error or when end of file occurs while no characters have been read. +.PP +.BR ungetc () +returns +.I c +on success, or +.B EOF +on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fgetc (), +.BR fgets (), +.BR getc (), +.BR getchar (), +.BR ungetc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.SH NOTES +It is not advisable to mix calls to input functions from the +.I stdio +library with low-level calls to +.BR read (2) +for the file descriptor associated with the input stream; the results +will be undefined and very probably not what you want. +.SH SEE ALSO +.BR read (2), +.BR write (2), +.BR ferror (3), +.BR fgetwc (3), +.BR fgetws (3), +.BR fopen (3), +.BR fread (3), +.BR fseek (3), +.BR getline (3), +.BR gets (3), +.BR getwchar (3), +.BR puts (3), +.BR scanf (3), +.BR ungetwc (3), +.BR unlocked_stdio (3), +.BR feature_test_macros (7) diff --git a/upstream/opensuse-leap-15-6/man3/fgetgrent.3 b/upstream/opensuse-leap-15-6/man3/fgetgrent.3 new file mode 100644 index 00000000..69fb852a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fgetgrent.3 @@ -0,0 +1,121 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH fgetgrent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetgrent \- get group file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "struct group *fgetgrent(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fgetgrent (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR fgetgrent () +function returns a pointer to a structure containing +the group information from the file referred to by +.IR stream . +The first time it is called +it returns the first entry; thereafter, it returns successive entries. +The file referred to by +.I stream +must have the same format as +.I /etc/group +(see +.BR group (5)). +.PP +The \fIgroup\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* NULL\-terminated array of pointers + to names of group members */ +}; +.EE +.in +.SH RETURN VALUE +The +.BR fgetgrent () +function returns a pointer to a +.I group +structure, +or NULL if there are no more entries or an error occurs. +In the event of an error, +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory to allocate +.I group +structure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fgetgrent () +T} Thread safety MT-Unsafe race:fgetgrent +.TE +.hy +.ad +.sp 1 +.\" 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 STANDARDS +None. +.SH HISTORY +SVr4. +.SH SEE ALSO +.BR endgrent (3), +.BR fgetgrent_r (3), +.BR fopen (3), +.BR getgrent (3), +.BR getgrgid (3), +.BR getgrnam (3), +.BR putgrent (3), +.BR setgrent (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/fgetpwent.3 b/upstream/opensuse-leap-15-6/man3/fgetpwent.3 new file mode 100644 index 00000000..f6ca7426 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fgetpwent.3 @@ -0,0 +1,130 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH fgetpwent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetpwent \- get password file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "struct passwd *fgetpwent(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fgetpwent (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR fgetpwent () +function returns a pointer to a structure containing +the broken out fields of a line in the file \fIstream\fP. +The first time it is called it returns the first entry; +thereafter, it returns successive entries. +The file referred to by +.I stream +must have the same format as +.I /etc/passwd +(see +.BR passwd (5)). +.PP +The \fIpasswd\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.SH RETURN VALUE +The +.BR fgetpwent () +function returns a pointer to a +.I passwd +structure, or NULL if +there are no more entries or an error occurs. +In the event of an error, +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory to allocate +.I passwd +structure. +.SH FILES +.TP +.I /etc/passwd +password database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fgetpwent () +T} Thread safety MT-Unsafe race:fgetpwent +.TE +.hy +.ad +.sp 1 +.\" 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 STANDARDS +None. +.SH HISTORY +SVr4. +.SH SEE ALSO +.BR endpwent (3), +.BR fgetpwent_r (3), +.BR fopen (3), +.BR getpw (3), +.BR getpwent (3), +.BR getpwnam (3), +.BR getpwuid (3), +.BR putpwent (3), +.BR setpwent (3), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/fgetwc.3 b/upstream/opensuse-leap-15-6/man3/fgetwc.3 new file mode 100644 index 00000000..8c1cfec2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fgetwc.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon +.TH fgetwc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetwc, getwc \- read a wide character from a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "wint_t fgetwc(FILE *" stream ); +.BI "wint_t getwc(FILE *" stream ); +.fi +.SH DESCRIPTION +The +.BR fgetwc () +function is the wide-character equivalent +of the +.BR fgetc (3) +function. +It reads a wide character from \fIstream\fP and returns it. +If the end of stream is reached, or if \fIferror(stream)\fP becomes true, +it returns +.BR WEOF . +If a wide-character conversion error occurs, it sets +\fIerrno\fP to \fBEILSEQ\fP and returns +.BR WEOF . +.PP +The +.BR getwc () +function or macro functions identically to +.BR fgetwc (). +It may be implemented as a macro, and may evaluate its argument +more than once. +There is no reason ever to use it. +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +On success, +.BR fgetwc () +returns the next wide-character from the stream. +Otherwise, +.B WEOF +is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +Apart from the usual ones, there is +.TP +.B EILSEQ +The data obtained from the input stream does not +form a valid character. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fgetwc (), +.BR getwc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR fgetwc () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +In the absence of additional information passed to the +.BR fopen (3) +call, it is +reasonable to expect that +.BR fgetwc () +will actually read a multibyte sequence +from the stream and then convert it to a wide character. +.SH SEE ALSO +.BR fgetws (3), +.BR fputwc (3), +.BR ungetwc (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/fgetws.3 b/upstream/opensuse-leap-15-6/man3/fgetws.3 new file mode 100644 index 00000000..c2a68e44 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fgetws.3 @@ -0,0 +1,94 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon +.TH fgetws 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetws \- read a wide-character string from a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *fgetws(wchar_t " ws "[restrict ." n "], int " n \ +", FILE *restrict " stream ); +.fi +.SH DESCRIPTION +The +.BR fgetws () +function is the wide-character equivalent +of the +.BR fgets (3) +function. +It reads a string of at most \fIn\-1\fP wide characters into the +wide-character array pointed to by \fIws\fP, +and adds a terminating null wide character (L\[aq]\e0\[aq]). +It stops reading wide characters after it has encountered and +stored a newline wide character. +It also stops when end of stream is reached. +.PP +The programmer must ensure that there is room for at least \fIn\fP wide +characters at \fIws\fP. +.PP +For a nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +The +.BR fgetws () +function, if successful, returns \fIws\fP. +If end of stream +was already reached or if an error occurred, it returns NULL. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fgetws () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR fgetws () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +In the absence of additional information passed to the +.BR fopen (3) +call, it is +reasonable to expect that +.BR fgetws () +will actually read a multibyte string +from the stream and then convert it to a wide-character string. +.PP +This function is unreliable, +because it does not permit to deal properly with +null wide characters that may be present in the input. +.SH SEE ALSO +.BR fgetwc (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/field.3form b/upstream/opensuse-leap-15-6/man3/field.3form new file mode 100644 index 00000000..28989f45 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field.3form @@ -0,0 +1,92 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field.3x,v 1.11 2012/11/03 23:03:59 tom Exp $ +.TH field 3FORM "" +.SH NAME +\fBform_field\fR \- make and break connections between fields and forms +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_fields(FORM *form, FIELD **fields); +.br +FIELD **form_fields(const FORM *form); +.br +int field_count(const FORM *form); +.br +int move_field(FIELD *field, int frow, int fcol); +.br +.SH DESCRIPTION +The function \fBset_form_fields\fR changes the field pointer array of +the given \fIform\fR. The array must be terminated by a \fBNULL\fR. +.PP +The function \fBform_fields\fR returns the field array of the given form. +.PP +The function \fBfield_count\fR returns the count of fields in \fIform\fR. +.PP +The function \fBmove_field\fR moves the given field (which must be disconnected) +to a specified location on the screen. +.SH RETURN VALUE +The function \fBform_fields\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +The function \fBfield_count\fR returns \fBERR\fR if the \fIform\fP parameter +is \fBNULL\fP. +.PP +The functions \fBset_form_fields\fR and \fBmove_field\fR return one of +the following codes on error: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CONNECTED +The field is already connected to a form. +.TP 5 +.B E_POSTED +The form is already posted. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +The SVr4 forms library documentation specifies the \fBfield_count\fR error value +as \-1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_attributes.3form b/upstream/opensuse-leap-15-6/man3/field_attributes.3form new file mode 100644 index 00000000..8e3587c9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_attributes.3form @@ -0,0 +1,86 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_attributes.3x,v 1.12 2010/12/04 18:40:45 tom Exp $ +.TH field_attributes 3FORM "" +.SH NAME +\fBform_field_attributes\fR \- color and attribute control for form fields +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_fore(FIELD *field, chtype attr); +.br +chtype field_fore(const FIELD *field); +.br +int set_field_back(FIELD *field, chtype attr); +.br +chtype field_back(const FIELD *field); +.br +int set_field_pad(FIELD *field, int pad); +.br +int field_pad(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_fore\fR sets the foreground attribute of +\fIfield\fR. This is the highlight used to display the field contents. The +function \fBfield_fore\fR returns the foreground attribute. The default is +\fBA_STANDOUT\fR. +.PP +The function \fBset_field_back\fR sets the background attribute of +\fIform\fR. This is the highlight used to display the extent fields in the +form. The function \fBfield_back\fR returns the background attribute. The +default is \fBA_NORMAL\fR. +.PP +The function \fBset_field_pad\fR sets the character used to fill the field. +The function \fBfield_pad\fR returns the given form's pad character. The +default is a blank. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_buffer.3form b/upstream/opensuse-leap-15-6/man3/field_buffer.3form new file mode 100644 index 00000000..2e132b93 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_buffer.3form @@ -0,0 +1,133 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_buffer.3x,v 1.20 2017/11/18 23:56:00 tom Exp $ +.TH field_buffer 3FORM "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBform_field_buffer\fR \- field buffer control +.SH SYNOPSIS +\fB#include \fR +.sp +int set_field_buffer(FIELD *field, int buf, const char *value); +.br +char *field_buffer(const FIELD *field, int buffer); +.br +int set_field_status(FIELD *field, bool status); +.br +bool field_status(const FIELD *field); +.br +int set_max_field(FIELD *field, int max); +.br +.SH DESCRIPTION +The function \fBset_field_buffer\fR sets the numbered buffer of the given field +to contain a given string: +.RS 3 +.bP +Buffer 0 is the displayed value of the field. +.bP +Other numbered buffers may be allocated by applications through the \fBnbuf\fR +argument of (see \fBfield_new\fR(3FORM)) +but are not manipulated by the forms library. +.RE +.PP +The function \fBfield_buffer\fR returns a pointer to +the contents of the given numbered buffer: +.RS 3 +.bP +The buffer contents always have the same length, +and are padded with trailing spaces +as needed to ensure this length is the same. +.bP +The buffer may contain leading spaces, depending on how it was set. +.bP +The buffer contents are set with \fBset_field_buffer\fP, +or as a side effect of any editing operations on the corresponding field. +.bP +Editing operations are based on the \fIwindow\fP which displays the field, +rather than a \fIstring\fP. +The window contains only printable characters, and is filled with blanks. +If you want the raw data, you must write your +own routine that copies the value out of the buffer and removes the leading +and trailing spaces. +.bP +Because editing operations change the content of the buffer to +correspond to the window, you should not rely on using buffers +for long-term storage of form data. +.RE +.PP +The function \fBset_field_status\fR sets the associated status flag of +\fIfield\fR; \fBfield_status\fR gets the current value. The status flag +is set to a nonzero value whenever the field changes. +.PP +The function \fBset_max_field\fR sets the maximum size for a dynamic field. +An argument of 0 turns off any maximum size threshold for that field. +.SH RETURN VALUE +The \fBfield_buffer\fR function returns NULL on error. +It sets errno according to their success: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.PP +The \fBfield_status\fR function returns \fBTRUE\fR or \fBFALSE\fR. +.PP +The remaining routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +.PP +When configured for wide characters, \fBfield_buffer\fP returns a pointer +to temporary storage (allocated and freed by the library). +The application should not attempt to modify the data. +It will be freed on the next call to \fBfield_buffer\fP to return the +same buffer. +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_info.3form b/upstream/opensuse-leap-15-6/man3/field_info.3form new file mode 100644 index 00000000..fa2bb193 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_info.3form @@ -0,0 +1,80 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_info.3x,v 1.13 2015/12/05 23:01:16 tom Exp $ +.TH field_info 3FORM "" +.SH NAME +\fBdynamic_field_info\fP, +\fBfield_info\fR \- retrieve field characteristics +.SH SYNOPSIS +\fB#include \fR +.br +int field_info(const FIELD *field, int *rows, int *cols, + int *frow, int *fcol, int *nrow, int *nbuf); +.br +int dynamic_field_info(const FIELD *field, int *rows, int *cols, int *max); +.br +.SH DESCRIPTION +The function \fBfield_info\fR returns the sizes and other attributes passed in +to the field at its creation time. The attributes are: height, width, row of +upper-left corner, column of upper-left corner, number off-screen rows, and +number of working buffers. +.PP +The function \fBdynamic_field_info\fR returns the actual size of the field, and +its maximum possible size. If the field has no size limit, the location +addressed by the third argument will be set to 0. +A field can be made dynamic +by turning off the \fBO_STATIC\fR option with \fBfield_opts_off\fR. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +A null (zero pointer) is accepted for any of the return values, +to ignore that value. +Not all implementations allow this, e.g., Solaris 2.7 does not. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_just.3form b/upstream/opensuse-leap-15-6/man3/field_just.3form new file mode 100644 index 00000000..872fc73d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_just.3form @@ -0,0 +1,73 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_just.3x,v 1.12 2015/12/05 23:02:59 tom Exp $ +.TH field_just 3FORM "" +.SH NAME +\fBset_field_just\fR, +\fBfield_just\fP \- retrieve field characteristics +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_just(FIELD *field, int justification); +.br +int field_just(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_just\fR sets the justification attribute of +a field; \fBfield_just\fR returns a field's justification attribute. +The attribute may be one of NO_JUSTIFICATION, JUSTIFY_RIGHT, +JUSTIFY_LEFT, or JUSTIFY_CENTER. +. +.SH RETURN VALUE +The function \fBfield_just\fR returns one of: NO_JUSTIFICATION, +JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER. +.PP +The function \fBset_field_just\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_new.3form b/upstream/opensuse-leap-15-6/man3/field_new.3form new file mode 100644 index 00000000..76fb9059 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_new.3form @@ -0,0 +1,103 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_new.3x,v 1.19 2015/12/05 23:42:45 tom Exp $ +.TH field_new 3FORM "" +.SH NAME +\fBnew_field\fR, +\fBdup_field\fR, +\fBlink_field\fR, +\fBfree_field\fR \- create and destroy form fields +.SH SYNOPSIS +\fB#include \fR +.br +FIELD *new_field(int height, int width, + int toprow, int leftcol, + int offscreen, int nbuffers); +.br +FIELD *dup_field(FIELD *field, int toprow, int leftcol); +.br +FIELD *link_field(FIELD *field, int toprow, int leftcol); +.br +int free_field(FIELD *field); +.br +.SH DESCRIPTION +The function \fBnew_field\fR allocates a new field and initializes it from the +parameters given: height, width, row of upper-left corner, column of upper-left +corner, number off-screen rows, and number of additional working buffers. +.PP +The function \fBdup_field\fR duplicates a field at a new location. Most +attributes (including current contents, size, validation type, buffer count, +growth threshold, justification, foreground, background, pad character, +options, and user pointer) are copied. Field status and the field page bit are +not copied. +.PP +The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field +shares buffers with its parent. Attribute data is separate. +.PP +The function \fBfree_field\fR de-allocates storage associated with a field. +.SH RETURN VALUE +The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return +\fBNULL\fR on error. +They set errno according to their success: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred, e.g., malloc failure. +.PP +The function \fBfree_field\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CONNECTED +field is connected. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +It may be unwise to count on the set of attributes copied by +\fBdup_field\fR being portable; the System V forms library documents are +not very explicit about what gets copied and what does not. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_opts.3form b/upstream/opensuse-leap-15-6/man3/field_opts.3form new file mode 100644 index 00000000..b79be2c7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_opts.3form @@ -0,0 +1,130 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_opts.3x,v 1.20 2015/12/05 23:53:43 tom Exp $ +.TH field_opts 3FORM "" +.SH NAME +\fBset_field_opts\fP, +\fBfield_opts_on\fP, +\fBfield_opts_off\fP, +\fBfield_opts\fP \- set and get field options +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_opts(FIELD *field, Field_Options opts); +.br +int field_opts_on(FIELD *field, Field_Options opts); +.br +int field_opts_off(FIELD *field, Field_Options opts); +.br +Field_Options field_opts(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_field_opts\fR sets all the given field's option bits (field +option bits may be logically-OR'ed together). +.PP +The function \fBfield_opts_on\fR turns on the given option bits, and leaves +others alone. +.PP +The function \fBfield_opts_off\fR turns off the given option bits, and leaves +others alone. +.PP +The function \fBfield_opts\fR returns the field's current option bits. +.PP +The following standard options are defined (all are on by default): +.TP 5 +O_ACTIVE +The field is visited during processing. If this option is off, the field will +not be reachable by navigation keys. Please notice that an invisible field +appears to be inactive also. +.TP 5 +O_AUTOSKIP +Skip to the next field when this one fills. +.TP 5 +O_BLANK +The field is cleared whenever a character is entered at the first position. +.TP 5 +O_EDIT +The field can be edited. +.TP 5 +O_NULLOK +Allow a blank field. +.TP 5 +O_PASSOK +Validate field only if modified by user. +.TP 5 +O_PUBLIC +The field contents are displayed as data is entered. +.TP 5 +O_STATIC +Field buffers are fixed to field's original size. +Turn this option off to create a dynamic field. +.TP 5 +O_VISIBLE +The field is displayed. If this option is off, display of the field is +suppressed. +.TP 5 +O_WRAP +Words that do not fit on a line are wrapped to the next line. Words are +blank-separated. +.PP +These extension options are defined (extensions are off by default): +.TP 5 +O_DYNAMIC_JUSTIFY +Permit dynamic fields to be justified, like static fields. +.TP 5 +O_NO_LEFT_STRIP +Preserve leading whitespace in the field buffer, which is normally discarded. +.SH RETURN VALUE +Except for \fBfield_opts\fR, each routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CURRENT +The field is the current field. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBform\fR(3FORM). +\fBfield_just\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_userptr.3form b/upstream/opensuse-leap-15-6/man3/field_userptr.3form new file mode 100644 index 00000000..40a31c2d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_userptr.3form @@ -0,0 +1,64 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_userptr.3x,v 1.11 2015/12/05 23:01:56 tom Exp $ +.TH field_userptr 3FORM "" +.SH NAME +\fBset_field_userptr\fR, +\fBfield_userptr\fR \- associate application data with a form field +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_userptr(FIELD *field, void*userptr); +.br +void *field_userptr(const FIELD *field); +.br +.SH DESCRIPTION +Every form field has a field that can be used to hold application-specific data +(that is, the form-driver code leaves it alone). These functions get and set +that field. +.SH RETURN VALUE +The function \fBfield_userptr\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +The function \fBset_field_userptr\fR returns \fBE_OK\fP (success). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +The user pointer is a void pointer. +We chose not to leave it as a char pointer for SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/field_validation.3form b/upstream/opensuse-leap-15-6/man3/field_validation.3form new file mode 100644 index 00000000..c3ef1c89 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/field_validation.3form @@ -0,0 +1,138 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_field_validation.3x,v 1.21 2017/11/20 01:28:31 tom Exp $ +.TH field_validation 3FORM "" +.SH NAME +\fBform_field_validation\fR \- data type validation for fields +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_type(FIELD *field, FIELDTYPE *type, ...); +.br +FIELDTYPE *field_type(const FIELD *field); +.br +void *field_arg(const FIELD *field); +.sp +FIELDTYPE *TYPE_ALNUM; +.br +FIELDTYPE *TYPE_ALPHA; +.br +FIELDTYPE *TYPE_ENUM; +.br +FIELDTYPE *TYPE_INTEGER; +.br +FIELDTYPE *TYPE_NUMERIC; +.br +FIELDTYPE *TYPE_REGEXP; +.br +FIELDTYPE *TYPE_IPV4; +.br +.SH DESCRIPTION +The function \fBset_field_type\fR declares a data type for a given form field. +This is the type checked by validation functions. +The predefined types are as follows: +.TP 5 +TYPE_ALNUM +Alphanumeric data. Requires a third \fBint\fR argument, a minimum field width. +.TP 5 +TYPE_ALPHA +Character data. Requires a third \fBint\fR argument, a minimum field width. +.TP 5 +TYPE_ENUM +Accept one of a specified set of strings. Requires a third \fB(char **)\fR +argument pointing to a string list; a fourth \fBint\fR flag argument to enable +case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a partial +match must be a unique one (if this flag is off, a prefix matches the first +of any set of more than one list elements with that prefix). Please notice +that the string list is copied. So you may use a list that lives in automatic variables on the stack. +.TP 5 +TYPE_INTEGER +Integer data, parsable to an integer by \fBatoi\fP(3). Requires a third +\fBint\fR argument controlling the precision, a fourth \fBlong\fR argument +constraining minimum value, and a fifth \fBlong\fR constraining maximum value. +If the maximum value is less than or equal to the minimum value, the range is +simply ignored. On return the field buffer is formatted according to the +\fBprintf\fR format specification ".*ld", where the '*' is replaced by the +precision argument. +For details of the precision handling see \fBprintf's\fR man-page. +.TP 5 +TYPE_NUMERIC +Numeric data (may have a decimal-point part). Requires a third +\fBint\fR argument controlling the precision, a fourth \fBdouble\fR +argument constraining minimum value, and a fifth \fBdouble\fR constraining +maximum value. If your system supports locales, the decimal point character +to be used must be the one specified by your locale. +If the maximum value is less than or equal to the minimum value, the range is +simply ignored. On return the field buffer is formatted according to the +\fBprintf\fR format specification ".*f", where the '*' is replaced by the +precision argument. +For details of the precision handling see \fBprintf's\fR man-page. +.TP 5 +TYPE_REGEXP +Regular expression data. Requires a regular expression \fB(char *)\fR third argument; +the data is valid if the regular expression matches it. Regular expressions +are in the format of \fBregcomp\fR and \fBregexec\fR. Please notice +that the regular expression must match the whole field. If you have for +example an eight character wide field, a regular expression "^[0\-9]*$" always +means that you have to fill all eight positions with digits. If you want to +allow fewer digits, you may use for example "^[0\-9]* *$" which is good for +trailing spaces (up to an empty field), or "^ *[0\-9]* *$" which is good for +leading and trailing spaces around the digits. +.TP 5 +TYPE_IPV4 +An Internet Protocol Version 4 address. This requires no additional argument. It +is checked whether or not the buffer has the form a.b.c.d, where a,b,c and d are +numbers between 0 and 255. Trailing blanks in the buffer are ignored. The address +itself is not validated. Please note that this is an ncurses extension. This +field type may not be available in other curses implementations. +.PP +It is possible to set up new programmer-defined field types. See the +\fBfieldtype\fR(3FORM) manual page. +.SH RETURN VALUE +The functions \fBfield_type\fR and \fBfield_arg\fR return \fBNULL\fR on +error. The function \fBset_field_type\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBform\fR(3FORM), +\fBform_variables\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/fieldtype.3form b/upstream/opensuse-leap-15-6/man3/fieldtype.3form new file mode 100644 index 00000000..70063e60 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fieldtype.3form @@ -0,0 +1,142 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_fieldtype.3x,v 1.16 2010/12/04 18:40:45 tom Exp $ +.TH fieldtype 3FORM "" +.SH NAME +\fBform_fieldtype\fR \- define validation-field types +.SH SYNOPSIS +\fB#include \fR +.br +FIELDTYPE *new_fieldtype( + bool (* const field_check)(FIELD *, const void *), + bool (* const char_check)(int, const void *)); +.br +int free_fieldtype(FIELDTYPE *fieldtype); +.br +int set_fieldtype_arg( + FIELDTYPE *fieldtype, + void *(* const make_arg)(va_list *), + void *(* const copy_arg)(const void *), + void (* const free_arg)(void *)); +.br +int set_fieldtype_choice( + FIELDTYPE *fieldtype, + bool (* const next_choice)(FIELD *, const void *), + bool (* const prev_choice)(FIELD *, const void *)); +.br +FIELDTYPE *link_fieldtype(FIELDTYPE *type1, + FIELDTYPE *type2); +.br +.SH DESCRIPTION +The function \fBnew_fieldtype\fR creates a new field type usable for data +validation. You supply it with \fIfield_check\fR, a predicate to check the +validity of an entered data string whenever the user attempts to leave a field. +The (FIELD *) argument is passed in so the validation predicate can see the +field's buffer, sizes and other attributes; the second argument is an +argument-block structure, about which more below. +.PP +You also supply \fBnew_fieldtype\fR with \fIchar_check\fR, +a function to validate input characters as they are entered; it will be passed +the character to be checked and a pointer to an argument-block structure. +.PP +The function \fBfree_fieldtype\fR frees the space allocated for a given +validation type. +.PP +The function \fBset_fieldtype_arg\fR associates three storage-management functions +with a field type. +The \fImake_arg\fR function is automatically applied to the +list of arguments you give \fBset_field_type\fR when attaching validation +to a field; its job is to bundle these into an allocated argument-block +object which can later be passed to validation predicated. +The other two hook arguments should copy and free argument-block structures. +They will be used by the forms-driver code. +You must supply the \fImake_arg\fR function, +the other two are optional, you may supply NULL for them. +In this case it is assumed +that \fImake_arg\fR does not allocate memory but simply loads the +argument into a single scalar value. +.PP +The function \fBlink_fieldtype\fR creates +a new field type from the two given types. +They are connected by an logical 'OR'. +.PP +The form driver requests \fBREQ_NEXT_CHOICE\fR and \fBREQ_PREV_CHOICE\fR assume +that the possible values of a field form an ordered set, and provide the forms +user with a way to move through the set. +The \fBset_fieldtype_choice\fR +function allows forms programmers to define successor and predecessor functions +for the field type. +These functions take the field pointer and an +argument-block structure as arguments. +.SH RETURN VALUE +The pointer-valued routines return NULL on error. +They set errno according to their success: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred, e.g., malloc failure. +.PP +The integer-valued routines return one of the following codes on +error: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CONNECTED +The field is already connected to a form. +.TP 5 +.B E_CURRENT +The field is the current field. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.PP +All of the \fB(char *)\fR arguments of these functions should actually be +\fB(void *)\fR. The type has been left uncorrected for strict compatibility +with System V. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/filefuncs.3am b/upstream/opensuse-leap-15-6/man3/filefuncs.3am new file mode 100644 index 00000000..e5be1e99 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/filefuncs.3am @@ -0,0 +1,371 @@ +.TH FILEFUNCS 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +filefuncs \- provide some file related functionality to gawk +.SH SYNOPSIS +.ft CW +@load "filefuncs" +.sp +result = chdir("/some/directory") +.sp +result = stat("/some/path", statdata [, follow]) +.sp +flags = or(FTS_PHYSICAL, ...) +.br +result = fts(pathlist, flags, filedata) +.ft R +.SH DESCRIPTION +The +.I filefuncs +extension adds several functions that provide access to +file-related facilities. +.SS chdir() +The +.B chdir() +function is a direct hook to the +.IR chdir (2) +system call to change the current directory. +It returns zero +upon success or less than zero upon error. +In the latter case it updates +.BR ERRNO . +.SS stat() +The +.B stat() +function provides a hook into the +.IR stat (2) +system call. +It returns zero +upon success or less than zero upon error. +In the latter case it updates +.BR ERRNO . +By default, it uses +.IR lstat (2). +However, if passed a third argument, it uses +.IR stat (2), +instead. +.PP +In all cases, it clears the +.B statdata +array. +When the call is successful, +.B stat() +fills the +.B statdata +array with information retrieved from the filesystem, as follows: +.TP +\fBstatdata["name"]\fP +The name of the file. +.TP +\fBstatdata["dev"]\fP +Corresponds to the +.I st_dev +field in the +.IR "struct stat" . +.TP +\fBstatdata["ino"]\fP +Corresponds to the +.I st_ino +field in the +.IR "struct stat" . +.TP +\fBstatdata["mode"]\fP +Corresponds to the +.I st_mode +field in the +.IR "struct stat" . +.TP +\fBstatdata["nlink"]\fP +Corresponds to the +.I st_nlink +field in the +.IR "struct stat" . +.TP +\fBstatdata["uid"]\fP +Corresponds to the +.I st_uid +field in the +.IR "struct stat" . +.TP +\fBstatdata["gid"]\fP +Corresponds to the +.I st_gid +field in the +.IR "struct stat" . +.TP +\fBstatdata["size"]\fP +Corresponds to the +.I st_size +field in the +.IR "struct stat" . +.TP +\fBstatdata["atime"]\fP +Corresponds to the +.I st_atime +field in the +.IR "struct stat" . +.TP +\fBstatdata["mtime"]\fP +Corresponds to the +.I st_mtime +field in the +.IR "struct stat" . +.TP +\fBstatdata["ctime"]\fP +Corresponds to the +.I st_ctime +field in the +.IR "struct stat" . +.TP +\fBstatdata["rdev"]\fP +Corresponds to the +.I st_rdev +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["major"]\fP +Corresponds to the +.I st_major +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["minor"]\fP +Corresponds to the +.I st_minor +field in the +.IR "struct stat" . +This element is only present for device files. +.TP +\fBstatdata["blksize"]\fP +Corresponds to the +.I st_blksize +field in the +.IR "struct stat" , +if this field is present on your system. +(It is present on all modern systems that we know of.) +.TP +\fBstatdata["pmode"]\fP +A human-readable version of the mode value, such as printed by +.IR ls (1). +For example, \fB"-rwxr-xr-x"\fP. +.TP +\fBstatdata["linkval"]\fP +If the named file is a symbolic link, this element will exist +and its value is the value of the symbolic link (where the +symbolic link points to). +.TP +\fBstatdata["type"]\fP +The type of the file as a string. One of +\fB"file"\fP, +\fB"blockdev"\fP, +\fB"chardev"\fP, +\fB"directory"\fP, +\fB"socket"\fP, +\fB"fifo"\fP, +\fB"symlink"\fP, +\fB"door"\fP, +or +\fB"unknown"\fP. +Not all systems support all file types. +.SS fts() +The +.B fts() +function provides a hook to the +.IR fts (3) +set of routines for traversing file hierarchies. +Instead of returning data about one file at a time in a stream, +it fills in a multi-dimensional array with data about each file and +directory encountered in the requested hierarchies. +.PP +The arguments are as follows: +.TP +.B pathlist +An array of filenames. The element values are used; the index values are ignored. +.TP +.B flags +This should be the bitwise OR of one or more of the following +predefined flag values. At least one of +.B FTS_LOGICAL +or +.B FTS_PHYSICAL +must be provided; otherwise +.B fts() +returns an error value and sets +.BR ERRNO . +.RS +.TP +.B FTS_LOGICAL +Do a ``logical'' file traversal, where the information returned for +a symbolic link refers to the linked-to file, and not to the +symbolic link itself. +This flag is mutually exclusive with +.BR FTS_PHYSICAL . +.TP +.B FTS_PHYSICAL +Do a ``physical'' file traversal, where the information returned for +a symbolic link refers to the symbolic link itself. +This flag is mutually exclusive with +.BR FTS_LOGICAL . +.TP +.B FTS_NOCHDIR +As a performance optimization, the +.IR fts (3) +routines change directory as they traverse a file hierarchy. +This flag disables that optimization. +.TP +.B FTS_COMFOLLOW +Immediately follow a symbolic link named in +.BR pathlist , +whether or not +.B FTS_LOGICAL +is set. +.TP +.B FTS_SEEDOT +By default, the +.IR fts (3) +routines do not return entries for ``.'' and ``..''. +This option causes entries for ``..'' to also be included. +(The AWK extension always includes an entry for ``.'', see below.) +.TP +.B FTS_XDEV +During a traversal, do not cross onto a different mounted filesystem. +.RE +.TP +.B filedata +The +.B filedata +array is first cleared. +Then, +.B fts() +creates an element in +.B filedata +for every element in +.BR pathlist . +The index is the name of the directory or file given in +.BR pathlist . +The element for this index is itself an array. +There are two cases. +.RS +.TP +The path is a file. +In this case, the array contains two or three elements: +.RS +.TP +\fB"path"\fP +The full path to this file, starting from the ``root'' that was given +in the +.B pathlist +array. +.TP +\fB"stat"\fP +This element is itself an array, containing the same information as provided +by the +.B stat() +function described earlier for its +.B statdata +argument. +The element may not be present if +.IR stat (2) +for the file failed. +.TP +\fB"error"\fP +If some kind of error was encountered, the array will also +contain an element named \fB"error"\fP, which is a string describing the error. +.RE +.TP +The path is a directory. +In this case, the array contains one element for each entry in the directory. +If an entry is a file, that element is as for files, just described. +If the entry is a directory, that element is (recursively), an array describing +the subdirectory. +If +.B FTS_SEEDOT +was provided in the flags, then there will also be an element named +\fB".."\fP. This element will be an array containing the data +as provided by +.BR stat() . +.sp +In addition, there will be an element whose index is \fB"."\fP. +This element is an array containing the same two or three elements +as for a file: +\fB"path"\fP, +\fB"stat"\fP, +and +\fB"error"\fP. +.RE +.PP +The +.B fts() +function returns 0 if there were no errors. Otherwise it returns \-1. +.SH NOTES +The AWK +.B fts() +extension does not exactly mimic the interface of the +.IR fts (3) +routines, choosing instead to provide an interface that is based +on associative arrays, which should be more comfortable to use from +an AWK program. This includes the lack of a comparison function, since +.I gawk +already provides powerful array sorting facilities. While an +.IR fts_read() \-like +interface could have been provided, this felt less natural than +simply creating a multi-dimensional array to represent the file +hierarchy and its information. +.PP +Nothing prevents AWK code from changing the predefined +.BI FTS_ xx +values, but doing so may cause strange results when +the changed values are passed to +.BR fts() . +.SH BUGS +There are many more file-related functions for which AWK +interfaces would be desirable. +.SH EXAMPLE +See +.B test/fts.awk +in the +.I gawk +distribution for an example. +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.PP +.IR chdir (2), +.IR fts (3), +.IR stat (2). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/fileno.3 b/upstream/opensuse-leap-15-6/man3/fileno.3 new file mode 100644 index 00000000..c3c7c222 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fileno.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" and Copyright (C) 2021 Michael Kerrisk +.\" 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu +.\" Added remark on EBADF for fileno, aeb, 2001-03-22 +.\" +.TH fileno 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fileno \- obtain file descriptor of a stdio stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fileno(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fileno (): +.nf + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The function +.BR fileno () +examines the argument +.I stream +and returns the integer file descriptor used to implement this stream. +The file descriptor is still owned by +.I stream +and will be closed when +.BR fclose (3) +is called. +Duplicate the file descriptor with +.BR dup (2) +before passing it to code that might close it. +.PP +For the nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +On success, +.BR fileno () +returns the file descriptor associated with +.IR stream . +On failure, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I stream +is not associated with a file. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fileno () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR open (2), +.BR fdopen (3), +.BR stdio (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/finite.3 b/upstream/opensuse-leap-15-6/man3/finite.3 new file mode 100644 index 00000000..0260047d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/finite.3 @@ -0,0 +1,146 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH finite 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \- +BSD floating-point classification functions +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int finite(double " x ); +.BI "int finitef(float " x ); +.BI "int finitel(long double " x ); +.PP +.BI "int isinf(double " x ); +.BI "int isinff(float " x ); +.BI "int isinfl(long double " x ); +.PP +.BI "int isnan(double " x ); +.BI "int isnanf(float " x ); +.BI "int isnanl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR finite (), +.BR finitef (), +.BR finitel (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.PP +.BR isinf (): + _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR isinff (), +.BR isinfl (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR isnan (): +.nf + _XOPEN_SOURCE || _ISOC99_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR isnanf (), +.BR isnanl (): +.nf + _XOPEN_SOURCE >= 600 + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR finite (), +.BR finitef (), +and +.BR finitel () +functions return a nonzero value if +.I x +is neither infinite +nor a "not-a-number" (NaN) value, and 0 otherwise. +.PP +The +.BR isnan (), +.BR isnanf (), +and +.BR isnanl () +functions return a nonzero value if +.I x +is a NaN value, +and 0 otherwise. +.PP +The +.BR isinf (), +.BR isinff (), +and +.BR isinfl () +functions return 1 if +.I x +is positive infinity, \-1 if +.I x +is negative infinity, and 0 otherwise. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR finite (), +.BR finitef (), +.BR finitel (), +.BR isinf (), +.BR isinff (), +.BR isinfl (), +.BR isnan (), +.BR isnanf (), +.BR isnanl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH NOTES +Note that these functions are obsolete. +C99 defines macros +.BR isfinite (), +.BR isinf (), +and +.BR isnan () +(for all types) replacing them. +Further note that the C99 +.BR isinf () +has weaker guarantees on the return value. +See +.BR fpclassify (3). +.\" +.\" finite* not on HP-UX; they exist on Tru64. +.\" .SH HISTORY +.\" The +.\" .BR finite () +.\" function occurs in 4.3BSD. +.\" see IEEE.3 in the 4.3BSD manual +.SH SEE ALSO +.BR fpclassify (3) diff --git a/upstream/opensuse-leap-15-6/man3/flockfile.3 b/upstream/opensuse-leap-15-6/man3/flockfile.3 new file mode 100644 index 00000000..425532a7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/flockfile.3 @@ -0,0 +1,136 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH flockfile 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +flockfile, ftrylockfile, funlockfile \- lock FILE for stdio +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void flockfile(FILE *" filehandle ); +.BI "int ftrylockfile(FILE *" filehandle ); +.BI "void funlockfile(FILE *" filehandle ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.nf + /* Since glibc 2.24: */ _POSIX_C_SOURCE >= 199309L + || /* glibc <= 2.23: */ _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The stdio functions are thread-safe. +This is achieved by assigning +to each +.I FILE +object a lockcount and (if the lockcount is nonzero) +an owning thread. +For each library call, these functions wait until the +.I FILE +object +is no longer locked by a different thread, then lock it, do the +requested I/O, and unlock the object again. +.PP +(Note: this locking has nothing to do with the file locking done +by functions like +.BR flock (2) +and +.BR lockf (3).) +.PP +All this is invisible to the C-programmer, but there may be two +reasons to wish for more detailed control. +On the one hand, maybe +a series of I/O actions by one thread belongs together, and should +not be interrupted by the I/O of some other thread. +On the other hand, maybe the locking overhead should be avoided +for greater efficiency. +.PP +To this end, a thread can explicitly lock the +.I FILE +object, +then do its series of I/O actions, then unlock. +This prevents +other threads from coming in between. +If the reason for doing +this was to achieve greater efficiency, one does the I/O with +the nonlocking versions of the stdio functions: with +.BR getc_unlocked (3) +and +.BR putc_unlocked (3) +instead of +.BR getc (3) +and +.BR putc (3). +.PP +The +.BR flockfile () +function waits for +.I *filehandle +to be +no longer locked by a different thread, then makes the +current thread owner of +.IR *filehandle , +and increments +the lockcount. +.PP +The +.BR funlockfile () +function decrements the lock count. +.PP +The +.BR ftrylockfile () +function is a nonblocking version +of +.BR flockfile (). +It does nothing in case some other thread +owns +.IR *filehandle , +and it obtains ownership and increments +the lockcount otherwise. +.SH RETURN VALUE +The +.BR ftrylockfile () +function returns zero for success +(the lock was obtained), and nonzero for failure. +.SH ERRORS +None. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR flockfile (), +.BR ftrylockfile (), +.BR funlockfile () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +These functions are available when +.B _POSIX_THREAD_SAFE_FUNCTIONS +is defined. +.SH SEE ALSO +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/floor.3 b/upstream/opensuse-leap-15-6/man3/floor.3 new file mode 100644 index 00000000..613973f3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/floor.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH floor 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +floor, floorf, floorl \- largest integral value not greater than argument +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double floor(double " x ); +.BI "float floorf(float " x ); +.BI "long double floorl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR floorf (), +.BR floorl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the largest integral value that is not greater than +.IR x . +.PP +For example, +.I floor(0.5) +is 0.0, and +.I floor(\-0.5) +is \-1.0. +.SH RETURN VALUE +These functions return the floor of +.IR x . +.PP +If +.I x +is integral, +0, \-0, NaN, or an infinity, +.I x +itself is returned. +.SH ERRORS +No errors occur. +POSIX.1-2001 documents a range error for overflows, but see NOTES. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR floor (), +.BR floorf (), +.BR floorl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.PP +SUSv2 and POSIX.1-2001 contain text about overflow (which might set +.I errno +to +.BR ERANGE , +or raise an +.B FE_OVERFLOW +exception). +In practice, the result cannot overflow on any current machine, +so this error-handling stuff is just nonsense. +.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point. +(More precisely, overflow can happen only when the maximum value +of the exponent is smaller than the number of mantissa bits. +For the IEEE-754 standard 32-bit and 64-bit floating-point numbers +the maximum value of the exponent is 127 (respectively, 1023), +and the number of mantissa bits +including the implicit bit +is 24 (respectively, 53).) +.SH SEE ALSO +.BR ceil (3), +.BR lrint (3), +.BR nearbyint (3), +.BR rint (3), +.BR round (3), +.BR trunc (3) diff --git a/upstream/opensuse-leap-15-6/man3/fma.3 b/upstream/opensuse-leap-15-6/man3/fma.3 new file mode 100644 index 00000000..ca089569 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fma.3 @@ -0,0 +1,170 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Modified 2004-11-15, Added further text on FLT_ROUNDS +.\" as suggested by AEB and Fabian Kreutz +.\" +.TH fma 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fma, fmaf, fmal \- floating-point multiply and add +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fma(double " x ", double " y ", double " z ); +.BI "float fmaf(float " x ", float " y ", float " z ); +.BI "long double fmal(long double " x ", long double " y ", long double " z ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fma (), +.BR fmaf (), +.BR fmal (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions compute +.IR x " * " y " + " z . +The result is rounded as one ternary operation according to the +current rounding mode (see +.BR fenv (3)). +.SH RETURN VALUE +These functions return the value of +.IR x " * " y " + " z , +rounded as one ternary operation. +.PP +If +.I x +or +.I y +is a NaN, a NaN is returned. +.PP +If +.I x +times +.I y +is an exact infinity, and +.I z +is an infinity with the opposite sign, +a domain error occurs, +and a NaN is returned. +.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. +If one of +.I x +or +.I y +is an infinity, the other is 0, and +.I z +is not a NaN, +a domain error occurs, and +a NaN is returned. +.\" POSIX.1 says that a NaN or an implementation-defined value shall +.\" be returned for this case. +.PP +If one of +.I x +or +.I y +is an infinity, and the other is 0, and +.I z +is a NaN, +.\" POSIX.1 makes the domain error optional for this case. +a domain error occurs, and +a NaN is returned. +.PP +If +.I x +times +.I y +is not an infinity times zero (or vice versa), and +.I z +is a NaN, +a NaN is returned. +.PP +If the result overflows, +a range error occurs, and +an infinity with the correct sign is returned. +.PP +If the result underflows, +a range error occurs, and +a signed 0 is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP * \fIy\fP + \fIz\fP, \ +or \fIx\fP * \fIy\fP is invalid and \fIz\fP is not a NaN +.\" .I errno +.\" is set to +.\" .BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Range error: result overflow +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error: result underflow +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.PP +These functions do not set +.IR errno . +.\" FIXME . Is it intentional that these functions do not set errno? +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6801 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fma (), +.BR fmaf (), +.BR fmal () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR remainder (3), +.BR remquo (3) diff --git a/upstream/opensuse-leap-15-6/man3/fmax.3 b/upstream/opensuse-leap-15-6/man3/fmax.3 new file mode 100644 index 00000000..6d69b628 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fmax.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH fmax 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fmax(double " x ", double " y ); +.BI "float fmaxf(float " x ", float " y ); +.BI "long double fmaxl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fmax (), +.BR fmaxf (), +.BR fmaxl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return the larger value of +.I x +and +.IR y . +.SH RETURN VALUE +These functions return the maximum of +.I x +and +.IR y . +.PP +If one argument is a NaN, the other argument is returned. +.PP +If both arguments are NaN, a NaN is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fmax (), +.BR fmaxf (), +.BR fmaxl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR fdim (3), +.BR fmin (3) diff --git a/upstream/opensuse-leap-15-6/man3/fmemopen.3 b/upstream/opensuse-leap-15-6/man3/fmemopen.3 new file mode 100644 index 00000000..0d400504 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fmemopen.3 @@ -0,0 +1,355 @@ +'\" t +.\" Copyright 2005, 2012, 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH fmemopen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fmemopen \- open memory as stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "FILE *fmemopen(void " buf [. size "], size_t " size ", \ +const char *" mode ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fmemopen (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR fmemopen () +function opens a stream that permits the access specified by +.IR mode . +The stream allows I/O to be performed on the string or memory buffer +pointed to by +.IR buf . +.PP +The +.I mode +argument specifies the semantics of I/O on the stream, +and is one of the following: +.TP +.I r +The stream is opened for reading. +.TP +.I w +The stream is opened for writing. +.TP +.I a +Append; open the stream for writing, +with the initial buffer position set to the first null byte. +.TP +.I r+ +Open the stream for reading and writing. +.TP +.I w+ +Open the stream for reading and writing. +The buffer contents are truncated +(i.e., \[aq]\e0\[aq] is placed in the first byte of the buffer). +.TP +.I a+ +Append; open the stream for reading and writing, +with the initial buffer position set to the first null byte. +.PP +The stream maintains the notion of a current position, +the location where the next I/O operation will be performed. +The current position is implicitly updated by I/O operations. +It can be explicitly updated using +.BR fseek (3), +and determined using +.BR ftell (3). +In all modes other than append, +the initial position is set to the start of the buffer. +In append mode, if no null byte is found within the buffer, +then the initial position is +.IR size+1 . +.PP +If +.I buf +is specified as NULL, then +.BR fmemopen () +allocates a buffer of +.I size +bytes. +This is useful for an application that wants to write data to +a temporary buffer and then read it back again. +The initial position is set to the start of the buffer. +The buffer is automatically freed when the stream is closed. +Note that the caller has no way to obtain a pointer to the +temporary buffer allocated by this call (but see +.BR open_memstream (3)). +.PP +If +.I buf +is not NULL, then it should point to a buffer of at least +.I size +bytes allocated by the caller. +.PP +When a stream that has been opened for writing is flushed +.RB ( fflush (3)) +or closed +.RB ( fclose (3)), +a null byte is written at the end of the buffer if there is space. +The caller should ensure that an extra byte is available in the +buffer +(and that +.I size +counts that byte) +to allow for this. +.PP +In a stream opened for reading, +null bytes (\[aq]\e0\[aq]) in the buffer do not cause read +operations to return an end-of-file indication. +A read from the buffer will indicate end-of-file +only when the current buffer position advances +.I size +bytes past the start of the buffer. +.PP +Write operations take place either at the current position +(for modes other than append), or at the current size of the stream +(for append modes). +.PP +Attempts to write more than +.I size +bytes to the buffer result in an error. +By default, such errors will be visible +(by the absence of data) only when the +.I stdio +buffer is flushed. +Disabling buffering with the following call +may be useful to detect errors at the time of an output operation: +.PP +.in +4n +.EX +setbuf(stream, NULL); +.EE +.in +.SH RETURN VALUE +Upon successful completion, +.BR fmemopen () +returns a +.I FILE +pointer. +Otherwise, NULL is returned and +.I errno +is set to indicate the error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fmemopen (), +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 1.0.x. +POSIX.1-2008. +.PP +POSIX.1-2008 specifies that \[aq]b\[aq] in +.I mode +shall be ignored. +However, Technical Corrigendum 1 +.\" http://austingroupbugs.net/view.php?id=396 +adjusts the standard to allow implementation-specific treatment for this case, +thus permitting the glibc treatment of \[aq]b\[aq]. +.PP +With glibc 2.22, binary mode (see below) was removed, +many longstanding bugs in the implementation of +.BR fmemopen () +were fixed, and a new versioned symbol was created for this interface. +.\" +.SS Binary mode +From glibc 2.9 to glibc 2.21, the glibc implementation of +.BR fmemopen () +supported a "binary" mode, +enabled by specifying the letter \[aq]b\[aq] as the second character in +.IR mode . +In this mode, +writes don't implicitly add a terminating null byte, and +.BR fseek (3) +.B SEEK_END +is relative to the end of the buffer (i.e., the value specified by the +.I size +argument), rather than the current string length. +.PP +An API bug afflicted the implementation of binary mode: +to specify binary mode, the \[aq]b\[aq] must be the +.I second +character in +.IR mode . +Thus, for example, "wb+" has the desired effect, but "w+b" does not. +This is inconsistent with the treatment of +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12836 +.I mode +by +.BR fopen (3). +.PP +Binary mode was removed in glibc 2.22; a \[aq]b\[aq] specified in +.I mode +has no effect. +.SH NOTES +There is no file descriptor associated with the file stream +returned by this function +(i.e., +.BR fileno (3) +will return an error if called on the returned stream). +.SH BUGS +Before glibc 2.22, if +.I size +is specified as zero, +.BR fmemopen () +fails with the error +.BR EINVAL . +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=11216 +It would be more consistent if this case successfully created +a stream that then returned end-of-file on the first attempt at reading; +since glibc 2.22, the glibc implementation provides that behavior. +.PP +Before glibc 2.22, +specifying append mode ("a" or "a+") for +.BR fmemopen () +sets the initial buffer position to the first null byte, but +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=13152 +(if the current position is reset to a location other than +the end of the stream) +does not force subsequent writes to append at the end of the stream. +This bug is fixed in glibc 2.22. +.PP +Before glibc 2.22, if the +.I mode +argument to +.BR fmemopen () +specifies append ("a" or "a+"), and the +.I size +argument does not cover a null byte in +.IR buf , +then, according to POSIX.1-2008, +the initial buffer position should be set to +the next byte after the end of the buffer. +However, in this case the glibc +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=13151 +.BR fmemopen () +sets the buffer position to \-1. +This bug is fixed in glibc 2.22. +.PP +Before glibc 2.22, +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=14292 +when a call to +.BR fseek (3) +with a +.I whence +value of +.B SEEK_END +was performed on a stream created by +.BR fmemopen (), +the +.I offset +was +.I subtracted +from the end-of-stream position, instead of being added. +This bug is fixed in glibc 2.22. +.PP +The glibc 2.9 addition of "binary" mode for +.BR fmemopen () +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6544 +silently changed the ABI: previously, +.BR fmemopen () +ignored \[aq]b\[aq] in +.IR mode . +.SH EXAMPLES +The program below uses +.BR fmemopen () +to open an input buffer, and +.BR open_memstream (3) +to open a dynamically sized output buffer. +The program scans its input string (taken from the program's +first command-line argument) reading integers, +and writes the squares of these integers to the output buffer. +An example of the output produced by this program is the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out \[aq]1 23 43\[aq]" +size=11; ptr=1 529 1849 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (fmemopen.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + FILE *out, *in; + int v, s; + size_t size; + char *ptr; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \[aq]...\[aq]\en", argv[0]); + exit(EXIT_FAILURE); + } + + in = fmemopen(argv[1], strlen(argv[1]), "r"); + if (in == NULL) + err(EXIT_FAILURE, "fmemopen"); + + out = open_memstream(&ptr, &size); + if (out == NULL) + err(EXIT_FAILURE, "open_memstream"); + + for (;;) { + s = fscanf(in, "%d", &v); + if (s <= 0) + break; + + s = fprintf(out, "%d ", v * v); + if (s == \-1) + err(EXIT_FAILURE, "fprintf"); + } + + fclose(in); + fclose(out); + + printf("size=%zu; ptr=%s\en", size, ptr); + + free(ptr); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR fopen (3), +.BR fopencookie (3), +.BR open_memstream (3) diff --git a/upstream/opensuse-leap-15-6/man3/fmin.3 b/upstream/opensuse-leap-15-6/man3/fmin.3 new file mode 100644 index 00000000..f5d0b67f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fmin.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH fmin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fmin, fminf, fminl \- determine minimum of two floating-point numbers +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fmin(double " x ", double " y ); +.BI "float fminf(float " x ", float " y ); +.BI "long double fminl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fmin (), +.BR fminf (), +.BR fminl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return the lesser value of +.I x +and +.IR y . +.SH RETURN VALUE +These functions return the minimum of +.I x +and +.IR y . +.PP +If one argument is a NaN, the other argument is returned. +.PP +If both arguments are NaN, a NaN is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fmin (), +.BR fminf (), +.BR fminl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR fdim (3), +.BR fmax (3) diff --git a/upstream/opensuse-leap-15-6/man3/fmod.3 b/upstream/opensuse-leap-15-6/man3/fmod.3 new file mode 100644 index 00000000..ec5dcb66 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fmod.3 @@ -0,0 +1,157 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH fmod 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fmod, fmodf, fmodl \- floating-point remainder function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double fmod(double " x ", double " y ); +.BI "float fmodf(float " x ", float " y ); +.BI "long double fmodl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fmodf (), +.BR fmodl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions compute the floating-point remainder of dividing +.I x +by +.IR y . +The return value is +.I x +\- +.I n +* +.IR y , +where +.I n +is the quotient of +.I x +/ +.IR y , +rounded toward zero to an integer. +.SH RETURN VALUE +On success, these +functions return the value \fIx\fP\ \-\ \fIn\fP*\fIy\fP, +for some integer +.IR n , +such that the returned value has the same sign as +.I x +and a magnitude less than the magnitude of +.IR y . +.PP +If +.I x +or +.I y +is a NaN, a NaN is returned. +.PP +If +.I x +is an infinity, +a domain error occurs, and +a NaN is returned. +.PP +If +.I y +is zero, +a domain error occurs, and +a NaN is returned. +.PP +If +.I x +is +0 (\-0), and +.I y +is not zero, +0 (\-0) is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Domain error: \fIy\fP is zero +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.\" POSIX.1 documents an optional underflow error, but AFAICT it doesn't +.\" (can't?) occur -- mtk, Jul 2008 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fmod (), +.BR fmodf (), +.BR fmodl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH BUGS +Before glibc 2.10, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6784 +.I errno +to +.B EDOM +when a domain error occurred for an infinite +.IR x . +.SH SEE ALSO +.BR remainder (3) diff --git a/upstream/opensuse-leap-15-6/man3/fmtmsg.3 b/upstream/opensuse-leap-15-6/man3/fmtmsg.3 new file mode 100644 index 00000000..cd62d0e7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fmtmsg.3 @@ -0,0 +1,338 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" adapted glibc info page +.\" +.\" This should run as 'Guru Meditation' (amiga joke :) +.\" The function is quite complex and deserves an example +.\" +.\" Polished, aeb, 2003-11-01 +.TH fmtmsg 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fmtmsg \- print formatted error messages +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fmtmsg(long " classification ", const char *" label , +.BI " int " severity ", const char *" text , +.BI " const char *" action ", const char *" tag ); +.fi +.SH DESCRIPTION +This function displays a message described by its arguments on the device(s) +specified in the +.I classification +argument. +For messages written to +.IR stderr , +the format depends on the +.B MSGVERB +environment variable. +.PP +The +.I label +argument identifies the source of the message. +The string must consist +of two colon separated parts where the first part has not more +than 10 and the second part not more than 14 characters. +.PP +The +.I text +argument describes the condition of the error. +.PP +The +.I action +argument describes possible steps to recover from the error. +If it is printed, it is prefixed by "TO FIX: ". +.PP +The +.I tag +argument is a reference to the online documentation where more +information can be found. +It should contain the +.I label +value and a unique identification number. +.SS Dummy arguments +Each of the arguments can have a dummy value. +The dummy classification value +.B MM_NULLMC +(0L) does not specify any output, so nothing is printed. +The dummy severity value +.B NO_SEV +(0) says that no severity is supplied. +The values +.BR MM_NULLLBL , +.BR MM_NULLTXT , +.BR MM_NULLACT , +.B MM_NULLTAG +are synonyms for +.IR "((char\ *)\ 0)" , +the empty string, and +.B MM_NULLSEV +is a synonym for +.BR NO_SEV . +.SS The classification argument +The +.I classification +argument is the sum of values describing 4 types of information. +.PP +The first value defines the output channel. +.TP 12n +.B MM_PRINT +Output to +.IR stderr . +.TP +.B MM_CONSOLE +Output to the system console. +.TP +.B "MM_PRINT | MM_CONSOLE" +Output to both. +.PP +The second value is the source of the error: +.TP 12n +.B MM_HARD +A hardware error occurred. +.TP +.B MM_FIRM +A firmware error occurred. +.TP +.B MM_SOFT +A software error occurred. +.PP +The third value encodes the detector of the problem: +.TP 12n +.B MM_APPL +It is detected by an application. +.TP +.B MM_UTIL +It is detected by a utility. +.TP +.B MM_OPSYS +It is detected by the operating system. +.PP +The fourth value shows the severity of the incident: +.TP 12n +.B MM_RECOVER +It is a recoverable error. +.TP +.B MM_NRECOV +It is a nonrecoverable error. +.SS The severity argument +The +.I severity +argument can take one of the following values: +.TP 12n +.B MM_NOSEV +No severity is printed. +.TP +.B MM_HALT +This value is printed as HALT. +.TP +.B MM_ERROR +This value is printed as ERROR. +.TP +.B MM_WARNING +This value is printed as WARNING. +.TP +.B MM_INFO +This value is printed as INFO. +.PP +The numeric values are between 0 and 4. +Using +.BR addseverity (3) +or the environment variable +.B SEV_LEVEL +you can add more levels and strings to print. +.SH RETURN VALUE +The function can return 4 values: +.TP 12n +.B MM_OK +Everything went smooth. +.TP +.B MM_NOTOK +Complete failure. +.TP +.B MM_NOMSG +Error writing to +.IR stderr . +.TP +.B MM_NOCON +Error writing to the console. +.SH ENVIRONMENT +The environment variable +.B MSGVERB +("message verbosity") can be used to suppress parts of +the output to +.IR stderr . +(It does not influence output to the console.) +When this variable is defined, is non-NULL, and is a colon-separated +list of valid keywords, then only the parts of the message corresponding +to these keywords is printed. +Valid keywords are "label", "severity", "text", "action", and "tag". +.PP +The environment variable +.B SEV_LEVEL +can be used to introduce new severity levels. +By default, only the five severity levels described +above are available. +Any other numeric value would make +.BR fmtmsg () +print nothing. +If the user puts +.B SEV_LEVEL +with a format like +.PP +.RS +SEV_LEVEL=[description[:description[:...]]] +.RE +.PP +in the environment of the process before the first call to +.BR fmtmsg (), +where each description is of the form +.PP +.RS +severity-keyword,level,printstring +.RE +.PP +then +.BR fmtmsg () +will also accept the indicated values for the level (in addition to +the standard levels 0\[en]4), and use the indicated printstring when +such a level occurs. +.PP +The severity-keyword part is not used by +.BR fmtmsg () +but it has to be present. +The level part is a string representation of a number. +The numeric value must be a number greater than 4. +This value must be used in the severity argument of +.BR fmtmsg () +to select this class. +It is not possible to overwrite +any of the predefined classes. +The printstring +is the string printed when a message of this class is processed by +.BR fmtmsg (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR fmtmsg () +T} Thread safety T{ +glibc\ >=\ 2.16: MT-Safe; +glibc\ <\ 2.16: MT-Unsafe +T} +.TE +.hy +.ad +.sp 1 +.PP +Before glibc 2.16, the +.BR fmtmsg () +function uses a static variable that is not protected, +so it is not thread-safe. +.PP +Since glibc 2.16, +.\" Modified in commit 7724defcf8873116fe4efab256596861eef21a94 +the +.BR fmtmsg () +function uses a lock to protect the static variable, so it is thread-safe. +.SH STANDARDS +.TP +.BR fmtmsg () +.TQ +.B MSGVERB +POSIX.1-2008. +.SH HISTORY +.TP +.BR fmtmsg () +System V. +POSIX.1-2001 and POSIX.1-2008. +glibc 2.1. +.TP +.B MSGVERB +System V. +POSIX.1-2001 and POSIX.1-2008. +.TP +.B SEV_LEVEL +System V. +.PP +System V and UnixWare man pages tell us that these functions +have been replaced by "pfmt() and addsev()" or by "pfmt(), +vpfmt(), lfmt(), and vlfmt()", and will be removed later. +.SH EXAMPLES +.\" SRC BEGIN (fmtmsg.c) +.EX +#include +#include +#include + +int +main(void) +{ + long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER; + int err; + + err = fmtmsg(class, "util\-linux:mount", MM_ERROR, + "unknown mount option", "See mount(8).", + "util\-linux:mount:017"); + switch (err) { + case MM_OK: + break; + case MM_NOTOK: + printf("Nothing printed\en"); + break; + case MM_NOMSG: + printf("Nothing printed to stderr\en"); + break; + case MM_NOCON: + printf("No console output\en"); + break; + default: + printf("Unknown error from fmtmsg()\en"); + } + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.PP +The output should be: +.PP +.in +4n +.EX +util\-linux:mount: ERROR: unknown mount option +TO FIX: See mount(8). util\-linux:mount:017 +.EE +.in +.PP +and after +.PP +.in +4n +.EX +MSGVERB=text:action; export MSGVERB +.EE +.in +.PP +the output becomes: +.PP +.in +4n +.EX +unknown mount option +TO FIX: See mount(8). +.EE +.in +.SH SEE ALSO +.BR addseverity (3), +.BR perror (3) diff --git a/upstream/opensuse-leap-15-6/man3/fnmatch.3 b/upstream/opensuse-leap-15-6/man3/fnmatch.3 new file mode 100644 index 00000000..5a48429a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fnmatch.3 @@ -0,0 +1,144 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:35:54 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Mon Oct 16 00:16:29 2000 following Joseph S. Myers +.\" +.TH fnmatch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fnmatch \- match filename or pathname +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fnmatch(const char *" "pattern" ", const char *" string ", int " flags ); +.fi +.SH DESCRIPTION +The +.BR fnmatch () +function checks whether the +.I string +argument matches the +.I pattern +argument, which is a shell wildcard pattern (see +.BR glob (7)). +.PP +The +.I flags +argument modifies the behavior; it is the bitwise OR of zero or more +of the following flags: +.TP +.B FNM_NOESCAPE +If this flag is set, treat backslash as an ordinary character, +instead of an escape character. +.TP +.B FNM_PATHNAME +If this flag is set, match a slash in +.I string +only with a slash in +.I pattern +and not by an asterisk (*) or a question mark (?) metacharacter, +nor by a bracket expression ([]) containing a slash. +.TP +.B FNM_PERIOD +If this flag is set, a leading period in +.I string +has to be matched exactly by a period in +.IR pattern . +A period is considered to be leading if it is the first character in +.IR string , +or if both +.B FNM_PATHNAME +is set and the period immediately follows a slash. +.TP +.B FNM_FILE_NAME +This is a GNU synonym for +.BR FNM_PATHNAME . +.TP +.B FNM_LEADING_DIR +If this flag (a GNU extension) is set, the pattern is considered to be +matched if it matches an initial segment of +.I string +which is followed by a slash. +This flag is mainly for the internal +use of glibc and is implemented only in certain cases. +.TP +.B FNM_CASEFOLD +If this flag (a GNU extension) is set, the pattern is matched +case-insensitively. +.TP +.B FNM_EXTMATCH +If this flag (a GNU extension) is set, extended patterns are +supported, as introduced by \&'ksh' and now supported by other shells. +The extended format is as follows, with \fIpattern\-list\fR +being a \&'|' separated list of patterns. +.TP +\&'?(\fIpattern\-list\fR)' +The pattern matches if zero or one occurrences of any of the +patterns in the \fIpattern\-list\fR match the input \fIstring\fR. +.TP +\&'*(\fIpattern\-list\fR)' +The pattern matches if zero or more occurrences of any of the +patterns in the \fIpattern\-list\fR match the input \fIstring\fR. +.TP +\&'+(\fIpattern\-list\fR)' +The pattern matches if one or more occurrences of any of the +patterns in the \fIpattern\-list\fR match the input \fIstring\fR. +.TP +\&'@(\fIpattern\-list\fR)' +The pattern matches if exactly one occurrence of any of the +patterns in the \fIpattern\-list\fR match the input \fIstring\fR. +.TP +\&'!(\fIpattern\-list\fR)' +The pattern matches if the input \fIstring\fR cannot be matched with +any of the patterns in the \fIpattern\-list\fR. +.SH RETURN VALUE +Zero if +.I string +matches +.IR pattern , +.B FNM_NOMATCH +if there is no match or another nonzero value if there is an error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fnmatch () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR fnmatch () +POSIX.1-2008. +.TP +.B FNM_FILE_NAME +.TQ +.B FNM_LEADING_DIR +.TQ +.B FNM_CASEFOLD +GNU. +.SH HISTORY +.TP +.BR fnmatch () +POSIX.1-2001, POSIX.2. +.SH SEE ALSO +.BR sh (1), +.BR glob (3), +.BR scandir (3), +.BR wordexp (3), +.BR glob (7) diff --git a/upstream/opensuse-leap-15-6/man3/fnmatch.3am b/upstream/opensuse-leap-15-6/man3/fnmatch.3am new file mode 100644 index 00000000..d82a154d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fnmatch.3am @@ -0,0 +1,126 @@ +.TH FNMATCH 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +fnmatch \- compare a string against a filename wildcard +.SH SYNOPSIS +.ft CW +@load "fnmatch" +.sp +result = fnmatch(pattern, string, flags) +.ft R +.SH DESCRIPTION +The +.I fnmatch +extension provides an AWK interface to the +.IR fnmatch (3) +routine. It adds a single function named +.BR fnmatch() , +one predefined variable +.RB ( FNM_NOMATCH ), +and an array of flag values named +.BR FNM . +.PP +The first argument is the filename wildcard to match, the second +is the filename string, and the third is either zero, +or the bitwise OR of one or more of the flags in the +.B FNM +array. +.PP +The return value is zero on success, +.B FNM_NOMATCH +if the string did not match the pattern, or +a different non-zero value if an error occurred. +.PP +The flags are follows: +.TP +\fBFNM["CASEFOLD"]\fP +Corresponds to the +.B FNM_CASEFOLD +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["FILE_NAME"]\fP +Corresponds to the +.B FNM_FILE_NAME +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["LEADING_DIR"]\fP +Corresponds to the +.B FNM_LEADING_DIR +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["NOESCAPE"]\fP +Corresponds to the +.B FNM_NOESCAPE +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["PATHNAME"]\fP +Corresponds to the +.B FNM_PATHNAME +flag as defined in +.IR fnmatch (3). +.TP +\fBFNM["PERIOD"]\fP +Corresponds to the +.B FNM_PERIOD +flag as defined in +.IR fnmatch (3). +.PP +.SH NOTES +Nothing prevents AWK code from changing the predefined +variable +.BR FNM_NOMATCH , +but doing so may cause strange results. +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "fnmatch" +\&... +flags = or(FNM["PERIOD"], FNM["NOESCAPE"]) +if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) + print "no match" +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.PP +.IR fnmatch (3). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/fopen.3 b/upstream/opensuse-leap-15-6/man3/fopen.3 new file mode 100644 index 00000000..a124bac2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fopen.3 @@ -0,0 +1,408 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Chris Torek and the American National Standards Committee X3, +.\" on Information Processing Systems. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)fopen.3 6.8 (Berkeley) 6/29/91 +.\" +.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu +.\" Modified, aeb, 960421, 970806 +.\" Modified, joey, aeb, 2002-01-03 +.\" +.TH fopen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fopen, fdopen, freopen \- stream open functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "FILE *fopen(const char *restrict " pathname \ +", const char *restrict " mode ); +.BI "FILE *fdopen(int " fd ", const char *" mode ); +.BI "FILE *freopen(const char *restrict " pathname \ +", const char *restrict " mode , +.BI " FILE *restrict " stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fdopen (): +.nf + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The +.BR fopen () +function opens the file whose name is the string pointed to by +.I pathname +and associates a stream with it. +.PP +The argument +.I mode +points to a string beginning with one of the following sequences +(possibly followed by additional characters, as described below): +.TP +.B r +Open text file for reading. +The stream is positioned at the beginning of the file. +.TP +.B r+ +Open for reading and writing. +The stream is positioned at the beginning of the file. +.TP +.B w +Truncate file to zero length or create text file for writing. +The stream is positioned at the beginning of the file. +.TP +.B w+ +Open for reading and writing. +The file is created if it does not exist, otherwise it is truncated. +The stream is positioned at the beginning of +the file. +.TP +.B a +Open for appending (writing at end of file). +The file is created if it does not exist. +The stream is positioned at the end of the file. +.TP +.B a+ +Open for reading and appending (writing at end of file). +The file is created if it does not exist. +Output is always appended to the end of the file. +POSIX is silent on what the initial read position is when using this mode. +For glibc, the initial file position for reading is at +the beginning of the file, but for Android/BSD/MacOS, the +initial file position for reading is at the end of the file. +.PP +The +.I mode +string can also include the letter \[aq]b\[aq] either as a last character or as +a character between the characters in any of the two-character strings +described above. +This is strictly for compatibility with ISO C +and has no effect; the \[aq]b\[aq] is ignored on all POSIX +conforming systems, including Linux. +(Other systems may treat text files and binary files differently, +and adding the \[aq]b\[aq] may be a good idea if you do I/O to a binary +file and expect that your program may be ported to non-UNIX +environments.) +.PP +See NOTES below for details of glibc extensions for +.IR mode . +.PP +Any created file will have the mode +.BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH +(0666), as modified by the process's umask value (see +.BR umask (2)). +.PP +Reads and writes may be intermixed on read/write streams in any order. +Note that ANSI C requires that a file positioning function intervene +between output and input, unless an input operation encounters end-of-file. +(If this condition is not met, then a read is allowed to return the +result of writes other than the most recent.) +Therefore it is good practice (and indeed sometimes necessary +under Linux) to put an +.BR fseek (3) +or +.BR fsetpos (3) +operation between write and read operations on such a stream. +This operation may be an apparent no-op +(as in \fIfseek(..., 0L, SEEK_CUR)\fP +called for its synchronizing side effect). +.PP +Opening a file in append mode (\fBa\fP as the first character of +.IR mode ) +causes all subsequent write operations to this stream to occur +at end-of-file, as if preceded by the call: +.PP +.in +4n +.EX +fseek(stream, 0, SEEK_END); +.EE +.in +.PP +The file descriptor associated with the stream is opened as if by a call to +.BR open (2) +with the following flags: +.RS +.TS +allbox; +lb lb +c l. +fopen() mode open() flags +\fIr\fP O_RDONLY +\fIw\fP O_WRONLY | O_CREAT | O_TRUNC +\fIa\fP O_WRONLY | O_CREAT | O_APPEND +\fIr+\fP O_RDWR +\fIw+\fP O_RDWR | O_CREAT | O_TRUNC +\fIa+\fP O_RDWR | O_CREAT | O_APPEND +.TE +.RE +.\" +.SS fdopen() +The +.BR fdopen () +function associates a stream with the existing file descriptor, +.IR fd . +The +.I mode +of the stream (one of the values "r", "r+", "w", "w+", "a", "a+") +must be compatible with the mode of the file descriptor. +The file position indicator of the new stream is set to that +belonging to +.IR fd , +and the error and end-of-file indicators are cleared. +Modes "w" or "w+" do not cause truncation of the file. +The file descriptor is not dup'ed, and will be closed when +the stream created by +.BR fdopen () +is closed. +The result of applying +.BR fdopen () +to a shared memory object is undefined. +.\" +.SS freopen() +The +.BR freopen () +function opens the file whose name is the string pointed to by +.I pathname +and associates the stream pointed to by +.I stream +with it. +The original stream (if it exists) is closed. +The +.I mode +argument is used just as in the +.BR fopen () +function. +.PP +If the +.I pathname +argument is a null pointer, +.BR freopen () +changes the mode of the stream to that specified in +.IR mode ; +that is, +.BR freopen () +reopens the pathname that is associated with the stream. +The specification for this behavior was added in the C99 standard, which says: +.PP +.RS +In this case, +the file descriptor associated with the stream need not be closed +if the call to +.BR freopen () +succeeds. +It is implementation-defined which changes of mode are permitted (if any), +and under what circumstances. +.RE +.PP +The primary use of the +.BR freopen () +function is to change the file associated with a standard text stream +.RI ( stderr ", " stdin ", or " stdout ). +.SH RETURN VALUE +Upon successful completion +.BR fopen (), +.BR fdopen (), +and +.BR freopen () +return a +.I FILE +pointer. +Otherwise, NULL is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The +.I mode +provided to +.BR fopen (), +.BR fdopen (), +or +.BR freopen () +was invalid. +.PP +The +.BR fopen (), +.BR fdopen (), +and +.BR freopen () +functions may also fail and set +.I errno +for any of the errors specified for the routine +.BR malloc (3). +.PP +The +.BR fopen () +function may also fail and set +.I errno +for any of the errors specified for the routine +.BR open (2). +.PP +The +.BR fdopen () +function may also fail and set +.I errno +for any of the errors specified for the routine +.BR fcntl (2). +.PP +The +.BR freopen () +function may also fail and set +.I errno +for any of the errors specified for the routines +.BR open (2), +.BR fclose (3), +and +.BR fflush (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fopen (), +.BR fdopen (), +.BR freopen () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR fopen () +.TQ +.BR freopen () +C11, POSIX.1-2008. +.TP +.BR fdopen () +POSIX.1-2008. +.SH HISTORY +.TP +.BR fopen () +.TQ +.BR freopen () +POSIX.1-2001, C89. +.TP +.BR fdopen () +POSIX.1-2001. +.SH NOTES +.SS glibc notes +The GNU C library allows the following extensions for the string specified in +.IR mode : +.TP +.BR c " (since glibc 2.3.3)" +Do not make the open operation, +or subsequent read and write operations, +thread cancelation points. +This flag is ignored for +.BR fdopen (). +.TP +.BR e " (since glibc 2.7)" +Open the file with the +.B O_CLOEXEC +flag. +See +.BR open (2) +for more information. +This flag is ignored for +.BR fdopen (). +.TP +.BR m " (since glibc 2.3)" +Attempt to access the file using +.BR mmap (2), +rather than I/O system calls +.RB ( read (2), +.BR write (2)). +Currently, +.\" As at glibc 2.4: +use of +.BR mmap (2) +is attempted only for a file opened for reading. +.TP +.B x +.\" Since glibc 2.0? +.\" FIXME . C11 specifies this flag +Open the file exclusively +(like the +.B O_EXCL +flag of +.BR open (2)). +If the file already exists, +.BR fopen () +fails, and sets +.I errno +to +.BR EEXIST . +This flag is ignored for +.BR fdopen (). +.PP +In addition to the above characters, +.BR fopen () +and +.BR freopen () +support the following syntax +in +.IR mode : +.PP +.BI " ,ccs=" string +.PP +The given +.I string +is taken as the name of a coded character set and +the stream is marked as wide-oriented. +Thereafter, internal conversion functions convert I/O +to and from the character set +.IR string . +If the +.BI ,ccs= string +syntax is not specified, +then the wide-orientation of the stream is +determined by the first file operation. +If that operation is a wide-character operation, +the stream is marked wide-oriented, +and functions to convert to the coded character set are loaded. +.SH BUGS +When parsing for individual flag characters in +.I mode +(i.e., the characters preceding the "ccs" specification), +the glibc implementation of +.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12685 +.BR fopen () +and +.BR freopen () +limits the number of characters examined in +.I mode +to 7 (or, before glibc 2.14, to 6, +which was not enough to include possible specifications such as "rb+cmxe"). +The current implementation of +.BR fdopen () +parses at most 5 characters in +.IR mode . +.SH SEE ALSO +.BR open (2), +.BR fclose (3), +.BR fileno (3), +.BR fmemopen (3), +.BR fopencookie (3), +.BR open_memstream (3) diff --git a/upstream/opensuse-leap-15-6/man3/fopencookie.3 b/upstream/opensuse-leap-15-6/man3/fopencookie.3 new file mode 100644 index 00000000..1749d40f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fopencookie.3 @@ -0,0 +1,458 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH fopencookie 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fopencookie \- opening a custom stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "FILE *fopencookie(void *restrict " cookie ", const char *restrict " mode , +.BI " cookie_io_functions_t " io_funcs ); +.fi +.SH DESCRIPTION +The +.BR fopencookie () +function allows the programmer to create a custom implementation +for a standard I/O stream. +This implementation can store the stream's data at a location of +its own choosing; for example, +.BR fopencookie () +is used to implement +.BR fmemopen (3), +which provides a stream interface to data that is stored in a +buffer in memory. +.PP +In order to create a custom stream the programmer must: +.IP \[bu] 3 +Implement four "hook" functions that are used internally by the +standard I/O library when performing I/O on the stream. +.IP \[bu] +Define a "cookie" data type, +a structure that provides bookkeeping information +(e.g., where to store data) used by the aforementioned hook functions. +The standard I/O package knows nothing about the contents of this cookie +(thus it is typed as +.I void\~* +when passed to +.BR fopencookie ()), +but automatically supplies the cookie +as the first argument when calling the hook functions. +.IP \[bu] +Call +.BR fopencookie () +to open a new stream and associate the cookie and hook functions +with that stream. +.PP +The +.BR fopencookie () +function serves a purpose similar to +.BR fopen (3): +it opens a new stream and returns a pointer to a +.I FILE +object that is used to operate on that stream. +.PP +The +.I cookie +argument is a pointer to the caller's cookie structure +that is to be associated with the new stream. +This pointer is supplied as the first argument when the standard I/O +library invokes any of the hook functions described below. +.PP +The +.I mode +argument serves the same purpose as for +.BR fopen (3). +The following modes are supported: +.IR r , +.IR w , +.IR a , +.IR r+ , +.IR w+ , +and +.IR a+ . +See +.BR fopen (3) +for details. +.PP +The +.I io_funcs +argument is a structure that contains four fields pointing to the +programmer-defined hook functions that are used to implement this stream. +The structure is defined as follows +.PP +.in +4n +.EX +typedef struct { + cookie_read_function_t *read; + cookie_write_function_t *write; + cookie_seek_function_t *seek; + cookie_close_function_t *close; +} cookie_io_functions_t; +.EE +.in +.PP +The four fields are as follows: +.TP +.I cookie_read_function_t *read +This function implements read operations for the stream. +When called, it receives three arguments: +.IP +.in +4n +.EX +ssize_t read(void *cookie, char *buf, size_t size); +.EE +.in +.IP +The +.I buf +and +.I size +arguments are, respectively, +a buffer into which input data can be placed and the size of that buffer. +As its function result, the +.I read +function should return the number of bytes copied into +.IR buf , +0 on end of file, or \-1 on error. +The +.I read +function should update the stream offset appropriately. +.IP +If +.I *read +is a null pointer, +then reads from the custom stream always return end of file. +.TP +.I cookie_write_function_t *write +This function implements write operations for the stream. +When called, it receives three arguments: +.IP +.in +4n +.EX +ssize_t write(void *cookie, const char *buf, size_t size); +.EE +.in +.IP +The +.I buf +and +.I size +arguments are, respectively, +a buffer of data to be output to the stream and the size of that buffer. +As its function result, the +.I write +function should return the number of bytes copied from +.IR buf , +or 0 on error. +(The function must not return a negative value.) +The +.I write +function should update the stream offset appropriately. +.IP +If +.I *write +is a null pointer, +then output to the stream is discarded. +.TP +.I cookie_seek_function_t *seek +This function implements seek operations on the stream. +When called, it receives three arguments: +.IP +.in +4n +.EX +int seek(void *cookie, off64_t *offset, int whence); +.EE +.in +.IP +The +.I *offset +argument specifies the new file offset depending on which +of the following three values is supplied in +.IR whence : +.RS +.TP +.B SEEK_SET +The stream offset should be set +.I *offset +bytes from the start of the stream. +.TP +.B SEEK_CUR +.I *offset +should be added to the current stream offset. +.TP +.B SEEK_END +The stream offset should be set to the size of the stream plus +.IR *offset . +.RE +.IP +Before returning, the +.I seek +function should update +.I *offset +to indicate the new stream offset. +.IP +As its function result, the +.I seek +function should return 0 on success, and \-1 on error. +.IP +If +.I *seek +is a null pointer, +then it is not possible to perform seek operations on the stream. +.TP +.I cookie_close_function_t *close +This function closes the stream. +The hook function can do things such as freeing buffers allocated +for the stream. +When called, it receives one argument: +.IP +.in +4n +.EX +int close(void *cookie); +.EE +.in +.IP +The +.I cookie +argument is the cookie that the programmer supplied when calling +.BR fopencookie (). +.IP +As its function result, the +.I close +function should return 0 on success, and +.B EOF +on error. +.IP +If +.I *close +is NULL, then no special action is performed when the stream is closed. +.SH RETURN VALUE +On success +.BR fopencookie () +returns a pointer to the new stream. +On error, NULL is returned. +.\" .SH ERRORS +.\" It's not clear if errno ever gets set... +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fopencookie () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH EXAMPLES +The program below implements a custom stream whose functionality +is similar (but not identical) to that available via +.BR fmemopen (3). +It implements a stream whose data is stored in a memory buffer. +The program writes its command-line arguments to the stream, +and then seeks through the stream reading two out of every +five characters and writing them to standard output. +The following shell session demonstrates the use of the program: +.PP +.in +4n +.EX +.RB "$" " ./a.out \[aq]hello world\[aq]" +/he/ +/ w/ +/d/ +Reached end of file +.EE +.in +.PP +Note that a more general version of the program below +could be improved to more robustly handle various error situations +(e.g., opening a stream with a cookie that already has an open stream; +closing a stream that has already been closed). +.SS Program source +\& +.\" SRC BEGIN (fopencookie.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +#define INIT_BUF_SIZE 4 + +struct memfile_cookie { + char *buf; /* Dynamically sized buffer for data */ + size_t allocated; /* Size of buf */ + size_t endpos; /* Number of characters in buf */ + off_t offset; /* Current file offset in buf */ +}; + +ssize_t +memfile_write(void *c, const char *buf, size_t size) +{ + char *new_buff; + struct memfile_cookie *cookie = c; + + /* Buffer too small? Keep doubling size until big enough. */ + + while (size + cookie\->offset > cookie\->allocated) { + new_buff = realloc(cookie\->buf, cookie\->allocated * 2); + if (new_buff == NULL) + return \-1; + cookie\->allocated *= 2; + cookie\->buf = new_buff; + } + + memcpy(cookie\->buf + cookie\->offset, buf, size); + + cookie\->offset += size; + if (cookie\->offset > cookie\->endpos) + cookie\->endpos = cookie\->offset; + + return size; +} + +ssize_t +memfile_read(void *c, char *buf, size_t size) +{ + ssize_t xbytes; + struct memfile_cookie *cookie = c; + + /* Fetch minimum of bytes requested and bytes available. */ + + xbytes = size; + if (cookie\->offset + size > cookie\->endpos) + xbytes = cookie\->endpos \- cookie\->offset; + if (xbytes < 0) /* offset may be past endpos */ + xbytes = 0; + + memcpy(buf, cookie\->buf + cookie\->offset, xbytes); + + cookie\->offset += xbytes; + return xbytes; +} + +int +memfile_seek(void *c, off64_t *offset, int whence) +{ + off64_t new_offset; + struct memfile_cookie *cookie = c; + + if (whence == SEEK_SET) + new_offset = *offset; + else if (whence == SEEK_END) + new_offset = cookie\->endpos + *offset; + else if (whence == SEEK_CUR) + new_offset = cookie\->offset + *offset; + else + return \-1; + + if (new_offset < 0) + return \-1; + + cookie\->offset = new_offset; + *offset = new_offset; + return 0; +} + +int +memfile_close(void *c) +{ + struct memfile_cookie *cookie = c; + + free(cookie\->buf); + cookie\->allocated = 0; + cookie\->buf = NULL; + + return 0; +} + +int +main(int argc, char *argv[]) +{ + cookie_io_functions_t memfile_func = { + .read = memfile_read, + .write = memfile_write, + .seek = memfile_seek, + .close = memfile_close + }; + FILE *stream; + struct memfile_cookie mycookie; + size_t nread; + char buf[1000]; + + /* Set up the cookie before calling fopencookie(). */ + + mycookie.buf = malloc(INIT_BUF_SIZE); + if (mycookie.buf == NULL) { + perror("malloc"); + exit(EXIT_FAILURE); + } + + mycookie.allocated = INIT_BUF_SIZE; + mycookie.offset = 0; + mycookie.endpos = 0; + + stream = fopencookie(&mycookie, "w+", memfile_func); + if (stream == NULL) { + perror("fopencookie"); + exit(EXIT_FAILURE); + } + + /* Write command\-line arguments to our file. */ + + for (size_t j = 1; j < argc; j++) + if (fputs(argv[j], stream) == EOF) { + perror("fputs"); + exit(EXIT_FAILURE); + } + + /* Read two bytes out of every five, until EOF. */ + + for (long p = 0; ; p += 5) { + if (fseek(stream, p, SEEK_SET) == \-1) { + perror("fseek"); + exit(EXIT_FAILURE); + } + nread = fread(buf, 1, 2, stream); + if (nread == 0) { + if (ferror(stream) != 0) { + fprintf(stderr, "fread failed\en"); + exit(EXIT_FAILURE); + } + printf("Reached end of file\en"); + break; + } + + printf("/%.*s/\en", (int) nread, buf); + } + + free(mycookie.buf); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR fclose (3), +.BR fmemopen (3), +.BR fopen (3), +.BR fseek (3) diff --git a/upstream/opensuse-leap-15-6/man3/fork.3am b/upstream/opensuse-leap-15-6/man3/fork.3am new file mode 100644 index 00000000..14e3e1fc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fork.3am @@ -0,0 +1,99 @@ +.TH FORK 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +fork, wait, waitpid \- basic process management +.SH SYNOPSIS +.ft CW +@load "fork" +.sp +pid = fork() +.sp +ret = waitpid(pid) +.sp +ret = wait(); +.ft R +.SH DESCRIPTION +The +.I fork +extension adds three functions, as follows. +.TP +.B fork() +This function creates a new process. The return value is the zero +in the child and the process-id number of the child in the parent, +or \-1 upon error. In the latter case, +.B ERRNO +indicates the problem. +In the child, \fBPROCINFO["pid"]\fP and \fBPROCINFO["ppid"]\fP +are updated to reflect the correct values. +.TP +.B waitpid() +This function takes a numeric argument, which is the process-id to +wait for. The return value is that of the +.IR waitpid (2) +system call. +.TP +.B wait() +This function waits for the first child to die. +The return value is that of the +.IR wait (2) +system call. +.\" .SH NOTES +.SH BUGS +There is no corresponding +.B exec() +function. +.PP +The interfaces could be enhanced to provide more facilities, +including pulling out the various bits of the return status. +.SH EXAMPLE +.ft CW +.nf +@load "fork" +\&... +if ((pid = fork()) == 0) + print "hello from the child" +else + print "hello from the parent" +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.PP +.IR fork (2), +.IR wait (2), +.IR waitpid (2). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/form.3form b/upstream/opensuse-leap-15-6/man3/form.3form new file mode 100644 index 00000000..c777c0cc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/form.3form @@ -0,0 +1,236 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form.3x,v 1.30 2017/11/25 20:28:02 tom Exp $ +.TH form 3FORM "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBform\fR \- curses extension for programming forms +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBform\fR library provides terminal-independent facilities for composing +form screens on character-cell terminals. The library includes: field +routines, which create and modify form fields; and form routines, which group +fields into forms, display forms on the screen, and handle interaction with the +user. +.PP +The \fBform\fR library uses the \fBcurses\fR libraries. +To use the \fBform\fR library, link with the options +\fB\-lform \-lcurses\fR. +.PP +Your program should set up the locale, e.g., +.sp + \fBsetlocale(LC_ALL, "");\fP +.sp +so that input/output processing will work. +.PP +A curses initialization routine such as \fBinitscr\fR must be called +before using any of these functions. +. +.SS Current Default Values for Field Attributes +. +The \fBform\fR library maintains a default value for field attributes. You +can get or set this default by calling the appropriate \fBset_\fR +or retrieval +routine with a \fBNULL\fR field pointer. Changing this default with a +\fBset_\fR function affects future field creations, but does not change the +rendering of fields already created. +. +.SS Routine Name Index +. +The following table lists each \fBform\fR routine and the name of +the manual page on which it is described. +. +.TS +l l +l l . +\fBcurses\fR Routine Name Manual Page Name += +current_field \fBpage\fR(3FORM) +data_ahead \fBdata\fR(3FORM) +data_behind \fBdata\fR(3FORM) +dup_field \fBfield_new\fR(3FORM) +dynamic_field_info \fBfield_info\fR(3FORM) +field_arg \fBfield_validation\fR(3FORM) +field_back \fBfield_attributes\fR(3FORM) +field_buffer \fBfield_buffer\fR(3FORM) +field_count \fBfield\fR(3FORM) +field_fore \fBfield_attributes\fR(3FORM) +field_index \fBpage\fR(3FORM) +field_info \fBfield_info\fR(3FORM) +field_init \fBhook\fR(3FORM) +field_just \fBfield_just\fR(3FORM) +field_opts \fBfield_opts\fR(3FORM) +field_opts_off \fBfield_opts\fR(3FORM) +field_opts_on \fBfield_opts\fR(3FORM) +field_pad \fBfield_attributes\fR(3FORM) +field_status \fBfield_buffer\fR(3FORM) +field_term \fBhook\fR(3FORM) +field_type \fBfield_validation\fR(3FORM) +field_userptr \fBfield_userptr\fR(3FORM) +form_driver \fBdriver\fR(3FORM) +form_driver_w \fBdriver\fR(3FORM)* +form_fields \fBfield\fR(3FORM) +form_init \fBhook\fR(3FORM) +form_opts \fBopts\fR(3FORM) +form_opts_off \fBopts\fR(3FORM) +form_opts_on \fBopts\fR(3FORM) +form_page \fBpage\fR(3FORM) +form_request_by_name \fBrequestname\fR(3FORM) +form_request_name \fBrequestname\fR(3FORM) +form_sub \fBwin\fR(3FORM) +form_term \fBhook\fR(3FORM) +form_userptr \fBuserptr\fR(3FORM) +form_win \fBwin\fR(3FORM) +free_field \fBfield_new\fR(3FORM) +free_fieldtype \fBfieldtype\fR(3FORM) +free_form \fBnew\fR(3FORM) +link_field \fBfield_new\fR(3FORM) +link_fieldtype \fBfieldtype\fR(3FORM) +move_field \fBfield\fR(3FORM) +new_field \fBfield_new\fR(3FORM) +new_fieldtype \fBfieldtype\fR(3FORM) +new_form \fBnew\fR(3FORM) +new_page \fBnew_page\fR(3FORM) +pos_form_cursor \fBcursor\fR(3FORM) +post_form \fBpost\fR(3FORM) +scale_form \fBwin\fR(3FORM) +set_current_field \fBpage\fR(3FORM) +set_field_back \fBfield_attributes\fR(3FORM) +set_field_buffer \fBfield_buffer\fR(3FORM) +set_field_fore \fBfield_attributes\fR(3FORM) +set_field_init \fBhook\fR(3FORM) +set_field_just \fBfield_just\fR(3FORM) +set_field_opts \fBfield_opts\fR(3FORM) +set_field_pad \fBfield_attributes\fR(3FORM) +set_field_status \fBfield_buffer\fR(3FORM) +set_field_term \fBhook\fR(3FORM) +set_field_type \fBfield_validation\fR(3FORM) +set_field_userptr \fBfield_userptr\fR(3FORM) +set_fieldtype_arg \fBfieldtype\fR(3FORM) +set_fieldtype_choice \fBfieldtype\fR(3FORM) +set_form_fields \fBfield\fR(3FORM) +set_form_init \fBhook\fR(3FORM) +set_form_opts \fBfield_opts\fR(3FORM) +set_form_page \fBpage\fR(3FORM) +set_form_sub \fBwin\fR(3FORM) +set_form_term \fBhook\fR(3FORM) +set_form_userptr \fBuserptr\fR(3FORM) +set_form_win \fBwin\fR(3FORM) +set_max_field \fBfield_buffer\fR(3FORM) +set_new_page \fBnew_page\fR(3FORM) +unfocus_current_field \fBpage\fR(3FORM) +unpost_form \fBpost\fR(3FORM) +.TE +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error, +and set errno to the corresponding error-code returned by functions +returning an integer. +Routines that return +an integer return one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_CONNECTED +The field is already connected to a form. +.TP 5 +.B E_INVALID_FIELD +Contents of a field are not valid. +.TP 5 +.B E_NOT_CONNECTED +No fields are connected to the form. +.TP 5 +.B E_NOT_POSTED +The form has not been posted. +.TP 5 +.B E_NO_ROOM +Form is too large for its window. +.TP 5 +.B E_POSTED +The form is already posted. +.TP 5 +.B E_REQUEST_DENIED +The form driver could not process the request. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_UNKNOWN_COMMAND +The form driver code saw an unknown request code. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. +.PP +In your library list, libform.a should be before libncurses.a; that is, +you want to say \*(``\-lform \-lncurses\*('', not the other way around +(which would give you a link error when using static libraries). +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +The menu facility was documented in SVr4.2 in +\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +.PP +It is not part of X/Open Curses. +.PP +Aside from ncurses, there are few implementations: +.bP +systems based on SVr4 source code, e.g., Solaris. +.bP +NetBSD curses. +.PP +A few functions in this implementation are extensions added for ncurses, +but not provided by other implementations, e.g., +\fBform_driver_w\fP, +\fBunfocus_current_field\fP. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric +S. Raymond. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.PP +This describes \fBncurses\fR +version 6.1 (patch 20180317). diff --git a/upstream/opensuse-leap-15-6/man3/form_variables.3form b/upstream/opensuse-leap-15-6/man3/form_variables.3form new file mode 100644 index 00000000..08bee1ac --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/form_variables.3form @@ -0,0 +1,79 @@ +.\"*************************************************************************** +.\" Copyright (c) 2010-2013,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_variables.3x,v 1.5 2017/11/20 00:59:21 tom Exp $ +.TH form_variables 3FORM "" +.na +.hy 0 +.SH NAME +\fBTYPE_ALNUM\fR, +\fBTYPE_ALPHA\fR, +\fBTYPE_ENUM\fR, +\fBTYPE_INTEGER\fR, +\fBTYPE_IPV4\fR, +\fBTYPE_NUMERIC\fR, +\fBTYPE_REGEXP\fR +\- form system global variables +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.PP +\fBFIELDTYPE * TYPE_ALNUM;\fR +\fBFIELDTYPE * TYPE_ALPHA;\fR +\fBFIELDTYPE * TYPE_ENUM;\fR +\fBFIELDTYPE * TYPE_INTEGER;\fR +\fBFIELDTYPE * TYPE_IPV4;\fR +\fBFIELDTYPE * TYPE_NUMERIC;\fR +\fBFIELDTYPE * TYPE_REGEXP;\fR +.fi +.SH DESCRIPTION +These are building blocks for the form library, +defining fields that can be created using \fBset_fieldtype\fP(3X). +Each provides functions for field- and character-validation, +according to the given datatype. +.SS TYPE_ALNUM +This holds alphanumeric data. +.SS TYPE_ALPHA +This holds alphabetic data. +.SS TYPE_ENUM +This holds an enumerated type. +.SS TYPE_INTEGER +This holds a decimal integer. +.SS TYPE_IPV4 +This holds an IPv4 internet address, e.g., "127.0.0.1". +.SS TYPE_NUMERIC +This holds a decimal number, with optional sign and decimal point. +.SS TYPE_REGEXP +This holds a regular expression. +.SH PORTABILITY +The \fBTYPE_IPV4\fP variable is an extension not provided by older +implementations of the form library. +.SH SEE ALSO +\fBform\fR(3FORM). diff --git a/upstream/opensuse-leap-15-6/man3/format.3menu b/upstream/opensuse-leap-15-6/man3/format.3menu new file mode 100644 index 00000000..a214a92c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/format.3menu @@ -0,0 +1,82 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_format.3x,v 1.14 2016/10/15 17:02:31 tom Exp $ +.TH format 3MENU "" +.SH NAME +\fBset_menu_format\fP, +\fBmenu_format\fP \- set and get menu sizes +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_format(MENU *menu, int rows, int cols); +.br +void menu_format(const MENU *menu, int *rows, int *cols); +.br +.SH DESCRIPTION +The function \fBset_menu_format\fR sets the maximum display size of the given +menu. If this size is too small to display all menu items, the menu will be +made scrollable. If this size is larger than the menus subwindow and the +subwindow is too small to display all menu items, \fBpost_menu\fR will fail. +.PP +The default format is 16 rows, 1 column. Calling \fBset_menu_format\fR with a +null menu pointer will change this default. A zero row or column argument to +\fBset_menu_format\fR is interpreted as a request not to change the current +value. +.PP +The function \fBmenu_format\fR returns the maximum-size constraints for the +given menu into the storage addressed by \fBrows\fR and \fBcols\fR. +.SH RETURN VALUE +These routines returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The menu is already posted. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/fpathconf.3 b/upstream/opensuse-leap-15-6/man3/fpathconf.3 new file mode 100644 index 00000000..8d29a797 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fpathconf.3 @@ -0,0 +1,276 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright (C) 2017 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Wed Jul 28 11:12:26 1993 by Rik Faith (faith@cs.unc.edu) +.\" +.\" FIXME Probably all of the following should be documented: +.\" _PC_SYNC_IO, +.\" _PC_ASYNC_IO, +.\" _PC_PRIO_IO, +.\" _PC_SOCK_MAXBUF, +.\" _PC_FILESIZEBITS, +.\" _PC_REC_INCR_XFER_SIZE, +.\" _PC_REC_MAX_XFER_SIZE, +.\" _PC_REC_MIN_XFER_SIZE, +.\" _PC_REC_XFER_ALIGN, +.\" _PC_ALLOC_SIZE_MIN, +.\" _PC_SYMLINK_MAX, +.\" _PC_2_SYMLINKS +.\" +.TH fpathconf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fpathconf, pathconf \- get configuration values for files +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long fpathconf(int " fd ", int " name ); +.BI "long pathconf(const char *" path ", int " name ); +.fi +.SH DESCRIPTION +.BR fpathconf () +gets a value for the configuration option +.I name +for the open file descriptor +.IR fd . +.PP +.BR pathconf () +gets a value for configuration option +.I name +for the filename +.IR path . +.PP +The corresponding macros defined in +.I +are minimum values; if an application wants to take advantage of values +which may change, a call to +.BR fpathconf () +or +.BR pathconf () +can be made, which may yield more liberal results. +.PP +Setting +.I name +equal to one of the following constants returns the following +configuration options: +.TP +.B _PC_LINK_MAX +The maximum number of links to the file. +If +.I fd +or +.I path +refer to a directory, then the value applies to the whole directory. +The corresponding macro is +.BR _POSIX_LINK_MAX . +.TP +.B _PC_MAX_CANON +The maximum length of a formatted input line, where +.I fd +or +.I path +must refer to a terminal. +The corresponding macro is +.BR _POSIX_MAX_CANON . +.TP +.B _PC_MAX_INPUT +The maximum length of an input line, where +.I fd +or +.I path +must refer to a terminal. +The corresponding macro is +.BR _POSIX_MAX_INPUT . +.TP +.B _PC_NAME_MAX +The maximum length of a filename in the directory +.I path +or +.I fd +that the process is allowed to create. +The corresponding macro is +.BR _POSIX_NAME_MAX . +.TP +.B _PC_PATH_MAX +The maximum length of a relative pathname when +.I path +or +.I fd +is the current working directory. +The corresponding macro is +.BR _POSIX_PATH_MAX . +.TP +.B _PC_PIPE_BUF +The maximum number of bytes that can be written atomically to a pipe of FIFO. +For +.BR fpathconf (), +.I fd +should refer to a pipe or FIFO. +For +.BR fpathconf (), +.I path +should refer to a FIFO or a directory; in the latter case, +the returned value corresponds to FIFOs created in that directory. +The corresponding macro is +.BR _POSIX_PIPE_BUF . +.TP +.B _PC_CHOWN_RESTRICTED +This returns a positive value if the use of +.BR chown (2) +and +.BR fchown (2) +for changing a file's user ID is restricted to a process +with appropriate privileges, +and changing a file's group ID to a value other than the process's +effective group ID or one of its supplementary group IDs +is restricted to a process with appropriate privileges. +According to POSIX.1, +this variable shall always be defined with a value other than \-1. +The corresponding macro is +.BR _POSIX_CHOWN_RESTRICTED . +.IP +If +.I fd +or +.I path +refers to a directory, +then the return value applies to all files in that directory. +.TP +.B _PC_NO_TRUNC +This returns nonzero if accessing filenames longer than +.B _POSIX_NAME_MAX +generates an error. +The corresponding macro is +.BR _POSIX_NO_TRUNC . +.TP +.B _PC_VDISABLE +This returns nonzero if special character processing can be disabled, where +.I fd +or +.I path +must refer to a terminal. +.SH RETURN VALUE +The return value of these functions is one of the following: +.IP \[bu] 3 +On error, \-1 is returned and +.I errno +is set to indicate the error +(for example, +.BR EINVAL , +indicating that +.I name +is invalid). +.IP \[bu] +If +.I name +corresponds to a maximum or minimum limit, and that limit is indeterminate, +\-1 is returned and +.I errno +is not changed. +(To distinguish an indeterminate limit from an error, set +.I errno +to zero before the call, and then check whether +.I errno +is nonzero when \-1 is returned.) +.IP \[bu] +If +.I name +corresponds to an option, +a positive value is returned if the option is supported, +and \-1 is returned if the option is not supported. +.IP \[bu] +Otherwise, +the current value of the option or limit is returned. +This value will not be more restrictive than +the corresponding value that was described to the application in +.I +or +.I +when the application was compiled. +.SH ERRORS +.TP +.B EACCES +.RB ( pathconf ()) +Search permission is denied for one of the directories in the path prefix of +.IR path . +.TP +.B EBADF +.RB ( fpathconf ()) +.I fd +is not a valid file descriptor. +.TP +.B EINVAL +.I name +is invalid. +.TP +.B EINVAL +The implementation does not support an association of +.I name +with the specified file. +.TP +.B ELOOP +.RB ( pathconf ()) +Too many symbolic links were encountered while resolving +.IR path . +.TP +.B ENAMETOOLONG +.RB ( pathconf ()) +.I path +is too long. +.TP +.B ENOENT +.RB ( pathconf ()) +A component of +.I path +does not exist, or +.I path +is an empty string. +.TP +.B ENOTDIR +.RB ( pathconf ()) +A component used as a directory in +.I path +is not in fact a directory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fpathconf (), +.BR pathconf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Files with name lengths longer than the value returned for +.I name +equal to +.B _PC_NAME_MAX +may exist in the given directory. +.PP +Some returned values may be huge; they are not suitable for allocating +memory. +.SH SEE ALSO +.BR getconf (1), +.BR open (2), +.BR statfs (2), +.BR confstr (3), +.BR sysconf (3) diff --git a/upstream/opensuse-leap-15-6/man3/fpclassify.3 b/upstream/opensuse-leap-15-6/man3/fpclassify.3 new file mode 100644 index 00000000..4522eeb6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fpclassify.3 @@ -0,0 +1,148 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" This was done with the help of the glibc manual. +.\" +.\" 2004-10-31, aeb, corrected +.TH fpclassify 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fpclassify, isfinite, isnormal, isnan, isinf \- floating-point +classification macros +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fpclassify(" x ); +.BI "int isfinite(" x ); +.BI "int isnormal(" x ); +.BI "int isnan(" x ); +.BI "int isinf(" x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.\" I haven't fully grokked the source to determine the FTM requirements; +.\" in part, the following has been tested by experiment. +.BR fpclassify (), +.BR isfinite (), +.BR isnormal (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.PP +.BR isnan (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR isinf (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +Floating point numbers can have special values, such as +infinite or NaN. +With the macro +.BI fpclassify( x ) +you can find out what type +.I x +is. +The macro takes any floating-point expression as argument. +The result is one of the following values: +.TP 14 +.B FP_NAN +.I x +is "Not a Number". +.TP +.B FP_INFINITE +.I x +is either positive infinity or negative infinity. +.TP +.B FP_ZERO +.I x +is zero. +.TP +.B FP_SUBNORMAL +.I x +is too small to be represented in normalized format. +.TP +.B FP_NORMAL +if nothing of the above is correct then it must be a +normal floating-point number. +.PP +The other macros provide a short answer to some standard questions. +.TP 14 +.BI isfinite( x ) +returns a nonzero value if +.br +(fpclassify(x) != FP_NAN && fpclassify(x) != FP_INFINITE) +.TP +.BI isnormal( x ) +returns a nonzero value if +(fpclassify(x) == FP_NORMAL) +.TP +.BI isnan( x ) +returns a nonzero value if +(fpclassify(x) == FP_NAN) +.TP +.BI isinf( x ) +returns 1 if +.I x +is positive infinity, and \-1 if +.I x +is negative infinity. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fpclassify (), +.BR isfinite (), +.BR isnormal (), +.BR isnan (), +.BR isinf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.PP +In glibc 2.01 and earlier, +.BR isinf () +returns a nonzero value (actually: 1) if +.I x +is positive infinity or negative infinity. +(This is all that C99 requires.) +.SH NOTES +For +.BR isinf (), +the standards merely say that the return value is nonzero +if and only if the argument has an infinite value. +.SH SEE ALSO +.BR finite (3), +.BR INFINITY (3), +.BR isgreater (3), +.BR signbit (3) diff --git a/upstream/opensuse-leap-15-6/man3/fpurge.3 b/upstream/opensuse-leap-15-6/man3/fpurge.3 new file mode 100644 index 00000000..494d7de0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fpurge.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH fpurge 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fpurge, __fpurge \- purge a stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +/* unsupported */ +.B #include +.PP +.BI "int fpurge(FILE *" stream ); +.PP +/* supported */ +.B #include +.B #include +.PP +.BI "void __fpurge(FILE *" stream ); +.fi +.SH DESCRIPTION +The function +.BR fpurge () +clears the buffers of the given stream. +For output streams this discards any unwritten output. +For input streams this discards any input read from the underlying object +but not yet obtained via +.BR getc (3); +this includes any text pushed back via +.BR ungetc (3). +See also +.BR fflush (3). +.PP +The function +.BR __fpurge () +does precisely the same, but without returning a value. +.SH RETURN VALUE +Upon successful completion +.BR fpurge () +returns 0. +On error, it returns \-1 and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I stream +is not an open stream. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR __fpurge () +T} Thread safety MT-Safe race:stream +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR fpurge () +4.4BSD. +Not available under Linux. +.TP +.BR __fpurge () +Solaris, glibc 2.1.95. +.SH NOTES +Usually it is a mistake to want to discard input buffers. +.SH SEE ALSO +.\" .BR fclean (3), +.BR fflush (3), +.BR setbuf (3), +.BR stdio_ext (3) diff --git a/upstream/opensuse-leap-15-6/man3/fputwc.3 b/upstream/opensuse-leap-15-6/man3/fputwc.3 new file mode 100644 index 00000000..14350420 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fputwc.3 @@ -0,0 +1,107 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH fputwc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fputwc, putwc \- write a wide character to a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "wint_t fputwc(wchar_t " wc ", FILE *" stream ); +.BI "wint_t putwc(wchar_t " wc ", FILE *" stream ); +.fi +.SH DESCRIPTION +The +.BR fputwc () +function is the wide-character +equivalent of the +.BR fputc (3) +function. +It writes the wide character \fIwc\fP to \fIstream\fP. +If +\fIferror(stream)\fP becomes true, it returns +.BR WEOF . +If a wide-character conversion error occurs, +it sets \fIerrno\fP to \fBEILSEQ\fP and returns +.BR WEOF . +Otherwise, it returns \fIwc\fP. +.PP +The +.BR putwc () +function or macro functions identically to +.BR fputwc (). +It may be implemented as a macro, and may evaluate its argument +more than once. +There is no reason ever to use it. +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +On success, +.BR fputwc () +function returns +.IR wc . +Otherwise, +.B WEOF +is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +Apart from the usual ones, there is +.TP +.B EILSEQ +Conversion of \fIwc\fP to the stream's encoding fails. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fputwc (), +.BR putwc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH NOTES +The behavior of +.BR fputwc () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +In the absence of additional information passed to the +.BR fopen (3) +call, it is +reasonable to expect that +.BR fputwc () +will actually write the multibyte +sequence corresponding to the wide character \fIwc\fP. +.SH SEE ALSO +.BR fgetwc (3), +.BR fputws (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/fputws.3 b/upstream/opensuse-leap-15-6/man3/fputws.3 new file mode 100644 index 00000000..6f214c45 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fputws.3 @@ -0,0 +1,81 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH fputws 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fputws \- write a wide-character string to a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fputws(const wchar_t *restrict " ws ", FILE *restrict " stream ); +.fi +.SH DESCRIPTION +The +.BR fputws () +function is the wide-character equivalent of +the +.BR fputs (3) +function. +It writes the wide-character string starting at \fIws\fP, +up to but not including the terminating null wide character (L\[aq]\e0\[aq]), +to \fIstream\fP. +.PP +For a nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +The +.BR fputws () +function returns a +nonnegative integer if the operation was +successful, or \-1 to indicate an error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fputws () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR fputws () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +In the absence of additional information passed to the +.BR fopen (3) +call, it is +reasonable to expect that +.BR fputws () +will actually write the multibyte +string corresponding to the wide-character string \fIws\fP. +.SH SEE ALSO +.BR fputwc (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/fread.3 b/upstream/opensuse-leap-15-6/man3/fread.3 new file mode 100644 index 00000000..0ec6abf2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fread.3 @@ -0,0 +1,167 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" and Copyright (c) 2020 Arkadiusz Drabczyk +.\" 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)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 +.\" Modified Fri May 17 10:21:51 1996 by Martin Schulze +.\" +.TH fread 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fread, fwrite \- binary stream input/output +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t fread(void " ptr "[restrict ." size " * ." nmemb ], +.BI " size_t " size ", size_t " nmemb , +.BI " FILE *restrict " stream ); +.BI "size_t fwrite(const void " ptr "[restrict ." size " * ." nmemb ], +.BI " size_t " size ", size_t " nmemb , +.BI " FILE *restrict " stream ); +.fi +.SH DESCRIPTION +The function +.BR fread () +reads +.I nmemb +items of data, each +.I size +bytes long, from the stream pointed to by +.IR stream , +storing them at the location given by +.IR ptr . +.PP +The function +.BR fwrite () +writes +.I nmemb +items of data, each +.I size +bytes long, to the stream pointed to by +.IR stream , +obtaining them from the location given by +.IR ptr . +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +On success, +.BR fread () +and +.BR fwrite () +return the number of items read or written. +This number equals the number of bytes transferred only when +.I size +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 +.BR fread () +does not distinguish between end-of-file and error, and callers must use +.BR feof (3) +and +.BR ferror (3) +to determine which occurred. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fread (), +.BR fwrite () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.SH EXAMPLES +The program below demonstrates the use of +.BR fread () +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 Program source +\& +.\" SRC BEGIN (fread.c) +.EX +#include +#include + +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) + +int +main(void) +{ + FILE *fp; + size_t ret; + unsigned char buffer[4]; + + fp = fopen("/bin/sh", "rb"); + if (!fp) { + perror("fopen"); + return EXIT_FAILURE; + } + + ret = fread(buffer, sizeof(*buffer), ARRAY_SIZE(buffer), fp); + if (ret != ARRAY_SIZE(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 +.\" SRC END +.SH SEE ALSO +.BR read (2), +.BR write (2), +.BR feof (3), +.BR ferror (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/frexp.3 b/upstream/opensuse-leap-15-6/man3/frexp.3 new file mode 100644 index 00000000..f8939dbf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/frexp.3 @@ -0,0 +1,145 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH frexp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +frexp, frexpf, frexpl \- convert floating-point number to fractional +and integral components +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double frexp(double " x ", int *" exp ); +.BI "float frexpf(float " x ", int *" exp ); +.BI "long double frexpl(long double " x ", int *" exp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR frexpf (), +.BR frexpl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions are used to split the number +.I x +into a +normalized fraction and an exponent which is stored in +.IR exp . +.SH RETURN VALUE +These functions return the normalized fraction. +If the argument +.I x +is not zero, +the normalized fraction is +.I x +times a power of two, +and its absolute value is always in the range 1/2 (inclusive) to +1 (exclusive), that is, [0.5,1). +.PP +If +.I x +is zero, then the normalized fraction is +zero and zero is stored in +.IR exp . +.PP +If +.I x +is a NaN, +a NaN is returned, and the value of +.I *exp +is unspecified. +.PP +If +.I x +is positive infinity (negative infinity), +positive infinity (negative infinity) is returned, and the value of +.I *exp +is unspecified. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR frexp (), +.BR frexpf (), +.BR frexpl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH EXAMPLES +The program below produces results such as the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out 2560" +frexp(2560, &e) = 0.625: 0.625 * 2\[ha]12 = 2560 +.RB "$" " ./a.out \-4" +frexp(\-4, &e) = \-0.5: \-0.5 * 2\[ha]3 = \-4 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (frexp.c) +.EX +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + double x, r; + int exp; + + x = strtod(argv[1], NULL); + r = frexp(x, &exp); + + printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en", + x, r, r, FLT_RADIX, exp, x); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR ldexp (3), +.BR modf (3) diff --git a/upstream/opensuse-leap-15-6/man3/fseek.3 b/upstream/opensuse-leap-15-6/man3/fseek.3 new file mode 100644 index 00000000..f7c46cca --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fseek.3 @@ -0,0 +1,180 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Chris Torek and the American National Standards Committee X3, +.\" on Information Processing Systems. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)fseek.3 6.11 (Berkeley) 6/29/91 +.\" +.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu +.\" +.TH fseek 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fgetpos, fseek, fsetpos, ftell, rewind \- reposition a stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fseek(FILE *" stream ", long " offset ", int " whence ); +.BI "long ftell(FILE *" stream ); +.PP +.BI "void rewind(FILE *" stream ); +.PP +.BI "int fgetpos(FILE *restrict " stream ", fpos_t *restrict " pos ); +.BI "int fsetpos(FILE *" stream ", const fpos_t *" pos ); +.fi +.SH DESCRIPTION +The +.BR fseek () +function sets the file position indicator for the stream pointed to by +.IR stream . +The new position, measured in bytes, is obtained by adding +.I offset +bytes to the position specified by +.IR whence . +If +.I whence +is set to +.BR SEEK_SET , +.BR SEEK_CUR , +or +.BR SEEK_END , +the offset is relative to the start of the file, the current position +indicator, or end-of-file, respectively. +A successful call to the +.BR fseek () +function clears the end-of-file indicator for the stream and undoes +any effects of the +.BR ungetc (3) +function on the same stream. +.PP +The +.BR ftell () +function obtains the current value of the file position indicator for the +stream pointed to by +.IR stream . +.PP +The +.BR rewind () +function sets the file position indicator for the stream pointed to by +.I stream +to the beginning of the file. +It is equivalent to: +.PP +.RS +(void) fseek(stream, 0L, SEEK_SET) +.RE +.PP +except that the error indicator for the stream is also cleared (see +.BR clearerr (3)). +.PP +The +.BR fgetpos () +and +.BR fsetpos () +functions are alternate interfaces equivalent to +.BR ftell () +and +.BR fseek () +(with +.I whence +set to +.BR SEEK_SET ), +setting and storing the current value of the file offset into or from the +object referenced by +.IR pos . +On some non-UNIX systems, an +.I fpos_t +object may be a complex object and these routines may be the only way to +portably reposition a text stream. +.PP +If the stream refers to a regular file +and the resulting stream offset is beyond the size of the file, +subsequent writes will extend the file with a hole, up to the offset, +before committing any data. +See +.BR lseek (2) +for details on file seeking semantics. +.SH RETURN VALUE +The +.BR rewind () +function returns no value. +Upon successful completion, +.BR fgetpos (), +.BR fseek (), +.BR fsetpos () +return 0, +and +.BR ftell () +returns the current offset. +Otherwise, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The +.I whence +argument to +.BR fseek () +was not +.BR SEEK_SET , +.BR SEEK_END , +or +.BR SEEK_CUR . +Or: the resulting file offset would be negative. +.TP +.B ESPIPE +The file descriptor underlying +.I stream +is not seekable (e.g., it refers to a pipe, FIFO, or socket). +.PP +The functions +.BR fgetpos (), +.BR fseek (), +.BR fsetpos (), +and +.BR ftell () +may also fail and set +.I errno +for any of the errors specified for the routines +.BR fflush (3), +.BR fstat (2), +.BR lseek (2), +and +.BR malloc (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fseek (), +.BR ftell (), +.BR rewind (), +.BR fgetpos (), +.BR fsetpos () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.SH SEE ALSO +.BR lseek (2), +.BR fseeko (3) diff --git a/upstream/opensuse-leap-15-6/man3/fseeko.3 b/upstream/opensuse-leap-15-6/man3/fseeko.3 new file mode 100644 index 00000000..c4842970 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fseeko.3 @@ -0,0 +1,105 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH fseeko 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fseeko, ftello \- seek to or report file position +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fseeko(FILE *" stream ", off_t " offset ", int " whence ); +.BI "off_t ftello(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fseeko (), +.BR ftello (): +.nf + _FILE_OFFSET_BITS == 64 || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR fseeko () +and +.BR ftello () +functions are identical to +.BR fseek (3) +and +.BR ftell (3) +(see +.BR fseek (3)), +respectively, except that the +.I offset +argument of +.BR fseeko () +and the return value of +.BR ftello () +is of type +.I off_t +instead of +.IR long . +.PP +On some architectures, both +.I off_t +and +.I long +are 32-bit types, but defining +.B _FILE_OFFSET_BITS +with the value 64 (before including +.I any +header files) +will turn +.I off_t +into a 64-bit type. +.SH RETURN VALUE +On successful completion, +.BR fseeko () +returns 0, while +.BR ftello () +returns the current offset. +Otherwise, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +See the ERRORS in +.BR fseek (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fseeko (), +.BR ftello () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001, SUSv2. +.SH NOTES +The declarations of these functions can also be obtained by defining +the obsolete +.B _LARGEFILE_SOURCE +feature test macro. +.SH SEE ALSO +.BR fseek (3) diff --git a/upstream/opensuse-leap-15-6/man3/ftime.3 b/upstream/opensuse-leap-15-6/man3/ftime.3 new file mode 100644 index 00000000..e7cb4b8b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ftime.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright (c) 1993 Michael Haardt +.\" (michael@moria.de) +.\" Fri Apr 2 11:32:09 MET DST 1993 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH ftime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ftime \- return date and time +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int ftime(struct timeb *" tp ); +.fi +.SH DESCRIPTION +.BR NOTE : +This function is no longer provided by the GNU C library. +Use +.BR clock_gettime (2) +instead. +.PP +This function returns the current time as seconds and milliseconds +since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). +The time is returned in +.IR tp , +which is declared as follows: +.PP +.in +4n +.EX +struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; +}; +.EE +.in +.PP +Here \fItime\fP is the number of seconds since the Epoch, +and \fImillitm\fP is the number of milliseconds since \fItime\fP +seconds since the Epoch. +The \fItimezone\fP field is the local timezone measured in minutes +of time west of Greenwich (with a negative value indicating minutes +east of Greenwich). +The \fIdstflag\fP field +is a flag that, if nonzero, indicates that Daylight Saving time +applies locally during the appropriate part of the year. +.PP +POSIX.1-2001 says that the contents of the \fItimezone\fP and \fIdstflag\fP +fields are unspecified; avoid relying on them. +.SH RETURN VALUE +This function always returns 0. +(POSIX.1-2001 specifies, and some systems document, a \-1 error return.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ftime () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +Removed in glibc 2.33. +4.2BSD, POSIX.1-2001. +Removed in POSIX.1-2008. +.PP +This function is obsolete. +Don't use it. +If the time in seconds +suffices, +.BR time (2) +can be used; +.BR gettimeofday (2) +gives microseconds; +.BR clock_gettime (2) +gives nanoseconds but is not as widely available. +.SH BUGS +Early glibc2 is buggy and returns 0 in the +.I millitm +field; +glibc 2.1.1 is correct again. +.\" .SH HISTORY +.\" The +.\" .BR ftime () +.\" function appeared in 4.2BSD. +.SH SEE ALSO +.BR gettimeofday (2), +.BR time (2) diff --git a/upstream/opensuse-leap-15-6/man3/ftok.3 b/upstream/opensuse-leap-15-6/man3/ftok.3 new file mode 100644 index 00000000..a7a2361a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ftok.3 @@ -0,0 +1,113 @@ +'\" t +.\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified 2001-11-28, by Michael Kerrisk, +.\" Changed data type of proj_id; minor fixes +.\" aeb: further fixes; added notes. +.\" +.TH ftok 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ftok \- convert a pathname and a project identifier to a System V IPC key +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.fi +.PP +.BI "key_t ftok(const char *" pathname ", int " proj_id ); +.SH DESCRIPTION +The +.BR ftok () +function uses the identity of the file named by the given +.I pathname +(which must refer to an existing, accessible file) +and the least significant 8 bits of +.I proj_id +(which must be nonzero) to generate a +.I key_t +type System V IPC key, suitable for use with +.BR msgget (2), +.BR semget (2), +or +.BR shmget (2). +.PP +The resulting value is the same for all pathnames that +name the same file, when the same value of +.I proj_id +is used. +The value returned should be different when the +(simultaneously existing) files or the project IDs differ. +.SH RETURN VALUE +On success, the generated +.I key_t +value is returned. +On failure \-1 is returned, with +.I errno +indicating the error as for the +.BR stat (2) +system call. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ftok () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +On some ancient systems, the prototype was: +.PP +.in +4n +.EX +.BI "key_t ftok(char *" pathname ", char " proj_id ); +.EE +.in +.PP +Today, +.I proj_id +is an +.IR int , +but still only 8 bits are used. +Typical usage has an ASCII character +.IR proj_id , +that is why the behavior is said to be undefined when +.I proj_id +is zero. +.PP +Of course, no guarantee can be given that the resulting +.I key_t +is unique. +Typically, a best-effort attempt combines the given +.I proj_id +byte, the lower 16 bits of the inode number, and the +lower 8 bits of the device number into a 32-bit result. +Collisions may easily happen, for example between files on +.I /dev/hda1 +and files on +.IR /dev/sda1 . +.SH EXAMPLES +See +.BR semget (2). +.SH SEE ALSO +.BR msgget (2), +.BR semget (2), +.BR shmget (2), +.BR stat (2), +.BR sysvipc (7) diff --git a/upstream/opensuse-leap-15-6/man3/fts.3 b/upstream/opensuse-leap-15-6/man3/fts.3 new file mode 100644 index 00000000..d8587720 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fts.3 @@ -0,0 +1,812 @@ +'\" t +.\" $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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)fts.3 8.5 (Berkeley) 4/16/94 +.\" +.\" 2007-12-08, mtk, Converted from mdoc to man macros +.\" +.TH fts 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \ +traverse a file hierarchy +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "FTS *fts_open(char * const *" path_argv ", int " options , +.BI " int (*" compar ")(const FTSENT **, const FTSENT **));" +.PP +.BI "FTSENT *fts_read(FTS *" ftsp ); +.PP +.BI "FTSENT *fts_children(FTS *" ftsp ", int " instr ); +.PP +.BI "int fts_set(FTS *" ftsp ", FTSENT *" f ", int " instr ); +.PP +.BI "int fts_close(FTS *" ftsp ); +.fi +.SH DESCRIPTION +The +fts functions are provided for traversing +file hierarchies. +A simple overview is that the +.BR fts_open () +function returns a "handle" (of type +.IR "FTS\ *" ) +that refers to a file hierarchy "stream". +This handle is then supplied to the other +fts functions. +The function +.BR fts_read () +returns a pointer to a structure describing one of the files in the file +hierarchy. +The function +.BR fts_children () +returns a pointer to a linked list of structures, each of which describes +one of the files contained in a directory in the hierarchy. +.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 +.IR . +The first type is +.IR FTS , +the structure that represents the file hierarchy itself. +The second type is +.IR FTSENT , +the structure that represents a file in the file +hierarchy. +Normally, an +.I FTSENT +structure is returned for every file in the file +hierarchy. +In this manual page, "file" and +"FTSENT structure" +are generally interchangeable. +.PP +The +.I FTSENT +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 +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; /* [l]stat(2) information */ +.\" 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 */ +} FTSENT; +.EE +.in +.PP +These fields are defined as follows: +.\" .Bl -tag -width "fts_namelen" +.TP +.I fts_info +One of the following values describing the returned +.I FTSENT +structure and +the file it represents. +With the exception of directories without errors +.RB ( FTS_D ), +all of these +entries are terminal, that is, they will not be revisited, nor will any +of their descendants be visited. +.\" .Bl -tag -width FTS_DEFAULT +.RS +.TP +.B FTS_D +A directory being visited in preorder. +.TP +.B FTS_DC +A directory that causes a cycle in the tree. +(The +.I fts_cycle +field of the +.I FTSENT +structure will be filled in as well.) +.TP +.B FTS_DEFAULT +Any +.I FTSENT +structure that represents a file type not explicitly described +by one of the other +.I fts_info +values. +.TP +.B FTS_DNR +A directory which cannot be read. +This is an error return, and the +.I fts_errno +field will be set to indicate what caused the error. +.TP +.B FTS_DOT +A file named +"." +or +".." +which was not specified as a filename to +.BR fts_open () +(see +.BR FTS_SEEDOT ). +.TP +.B FTS_DP +A directory being visited in postorder. +The contents of the +.I FTSENT +structure will be unchanged from when +it was returned in preorder, that is, with the +.I fts_info +field set to +.BR FTS_D . +.TP +.B FTS_ERR +This is an error return, and the +.I fts_errno +field will be set to indicate what caused the error. +.TP +.B FTS_F +A regular file. +.TP +.B FTS_NS +A file for which no +.RB [ l ] stat (2) +information was available. +The contents of the +.I fts_statp +field are undefined. +This is an error return, and the +.I fts_errno +field will be set to indicate what caused the error. +.TP +.B FTS_NSOK +A file for which no +.RB [ l ] stat (2) +information was requested. +The contents of the +.I fts_statp +field are undefined. +.TP +.B FTS_SL +A symbolic link. +.TP +.B FTS_SLNONE +A symbolic link with a nonexistent target. +The contents of the +.I fts_statp +field reference the file characteristic information for the symbolic link +itself. +.\" .El +.RE +.TP +.I fts_accpath +A path for accessing the file from the current directory. +.TP +.I fts_path +The path for the file relative to the root of the traversal. +This path contains the path specified to +.BR fts_open () +as a prefix. +.TP +.I fts_pathlen +The sum of the lengths of the strings referenced by +.I fts_path +and +.IR fts_name . +.TP +.I fts_name +The name of the file. +.TP +.I fts_namelen +The length of the string referenced by +.IR fts_name . +.TP +.I fts_level +The depth of the traversal, numbered from \-1 to N, where this file +was found. +The +.I FTSENT +structure representing the parent of the starting point (or root) +of the traversal is numbered \-1, and the +.I FTSENT +structure for the root +itself is numbered 0. +.TP +.I fts_errno +If +.BR fts_children () +or +.BR fts_read () +returns an +.I FTSENT +structure whose +.I fts_info +field is set to +.BR FTS_DNR , +.BR FTS_ERR , +or +.BR FTS_NS , +the +.I fts_errno +field contains the error number (i.e., the +.I errno +value) +specifying the cause of the error. +Otherwise, the contents of the +.I fts_errno +field are undefined. +.TP +.I fts_number +This field is provided for the use of the application program and is +not modified by the +fts functions. +It is initialized to 0. +.TP +.I fts_pointer +This field is provided for the use of the application program and is +not modified by the +fts functions. +It is initialized to +NULL. +.TP +.I fts_parent +A pointer to the +.I FTSENT +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 +.IR fts_level , +.IR fts_number , +and +.I fts_pointer +fields are guaranteed to be initialized. +.TP +.I fts_link +Upon return from the +.BR fts_children () +function, the +.I fts_link +field points to the next structure in the NULL-terminated linked list of +directory members. +Otherwise, the contents of the +.I fts_link +field are undefined. +.TP +.I fts_cycle +If a directory causes a cycle in the hierarchy (see +.BR FTS_DC ), +either because +of a hard link between two directories, or a symbolic link pointing to a +directory, the +.I fts_cycle +field of the structure will point to the +.I FTSENT +structure in the hierarchy that references the same file as the current +.I FTSENT +structure. +Otherwise, the contents of the +.I fts_cycle +field are undefined. +.TP +.I fts_statp +A pointer to +.RB [ l ] stat (2) +information for the file. +.\" .El +.PP +A single buffer is used for all of the paths of all of the files in the +file hierarchy. +Therefore, the +.I fts_path +and +.I fts_accpath +fields are guaranteed to be +null-terminated +.I only +for the file most recently returned by +.BR fts_read (). +To use these fields to reference any files represented by other +.I FTSENT +structures will require that the path buffer be modified using the +information contained in that +.I FTSENT +structure's +.I fts_pathlen +field. +Any such modifications should be undone before further calls to +.BR fts_read () +are attempted. +The +.I fts_name +field is always +null-terminated. +.SS fts_open() +The +.BR fts_open () +function takes a pointer to an array of character pointers naming one +or more paths which make up a logical file hierarchy to be traversed. +The array must be terminated by a +null pointer. +.PP +There are +a number of options, at least one of which (either +.B FTS_LOGICAL +or +.BR FTS_PHYSICAL ) +must be specified. +The options are selected by ORing +the following values: +.\" .Bl -tag -width "FTS_PHYSICAL" +.TP +.B FTS_LOGICAL +This option causes the +fts routines to return +.I FTSENT +structures for the targets of symbolic links +instead of the symbolic links themselves. +If this option is set, the only symbolic links for which +.I FTSENT +structures +are returned to the application are those referencing nonexistent files: +the +.I fts_statp +field is obtained via +.BR stat (2) +with a fallback to +.BR lstat (2). +.TP +.B FTS_PHYSICAL +This option causes the +fts routines to return +.I FTSENT +structures for symbolic links themselves instead +of the target files they point to. +If this option is set, +.I FTSENT +structures for all symbolic links in the +hierarchy are returned to the application: +the +.I fts_statp +field is obtained via +.BR lstat (2). +.TP +.B FTS_COMFOLLOW +This option causes any symbolic link specified as a root path to be +followed immediately, as if via +.BR FTS_LOGICAL , +regardless of the primary mode. +.TP +.B FTS_NOCHDIR +As a performance optimization, the +fts functions change directories as they walk the file hierarchy. +This has the side-effect that an application cannot rely on being +in any particular directory during the traversal. +This +option turns off this optimization, and the +fts functions will not change the current directory. +Note that applications should not themselves change their current directory +and try to access files unless +.B FTS_NOCHDIR +is specified and absolute +pathnames were provided as arguments to +.BR fts_open (). +.TP +.B FTS_NOSTAT +By default, returned +.I FTSENT +structures reference file characteristic information (the +.I fts_statp +field) for each file visited. +This option relaxes that requirement as a performance optimization, +allowing the +fts functions to set the +.I fts_info +field to +.B FTS_NSOK +and leave the contents of the +.I fts_statp +field undefined. +.TP +.B FTS_SEEDOT +By default, unless they are specified as path arguments to +.BR fts_open (), +any files named +"." +or +".." +encountered in the file hierarchy are ignored. +This option causes the +fts routines to return +.I FTSENT +structures for them. +.TP +.B FTS_XDEV +This option prevents +fts from descending into directories that have a different device number +than the file from which the descent began. +.\" .El +.PP +The argument +.BR compar () +specifies a user-defined function which may be used to order the traversal +of the hierarchy. +It +takes two pointers to pointers to +.I FTSENT +structures as arguments and +should return a negative value, zero, or a positive value to indicate +if the file referenced by its first argument comes before, in any order +with respect to, or after, the file referenced by its second argument. +The +.IR fts_accpath , +.IR fts_path , +and +.I fts_pathlen +fields of the +.I FTSENT +structures may +.I never +be used in this comparison. +If the +.I fts_info +field is set to +.B FTS_NS +or +.BR FTS_NSOK , +the +.I fts_statp +field may not either. +If the +.BR compar () +argument is +NULL, +the directory traversal order is in the order listed in +.I path_argv +for the root paths, and in the order listed in the directory for +everything else. +.SS fts_read() +The +.BR fts_read () +function returns a pointer to an +.I FTSENT +structure describing a file in +the hierarchy. +Directories (that are readable and do not cause cycles) are visited at +least twice, once in preorder and once in postorder. +All other files are visited at least once. +(Hard links between directories that do not cause cycles or symbolic +links to symbolic links may cause files to be visited more than once, +or directories more than twice.) +.PP +If all the members of the hierarchy have been returned, +.BR fts_read () +returns NULL and sets +.I errno +to 0. +If an error unrelated to a file in the hierarchy occurs, +.BR fts_read () +returns +NULL +and sets +.I errno +to indicate the error. +If an error related to a returned file occurs, a pointer to an +.I FTSENT +structure is returned, and +.I errno +may or may not have been set (see +.IR fts_info ). +.PP +The +.I FTSENT +structures returned by +.BR fts_read () +may be overwritten after a call to +.BR fts_close () +on the same file hierarchy stream, or, after a call to +.BR fts_read () +on the same file hierarchy stream unless they represent a file of type +directory, in which case they will not be overwritten until after a call to +.BR fts_read () +after the +.I FTSENT +structure has been returned by the function +.BR fts_read () +in postorder. +.SS fts_children() +The +.BR fts_children () +function returns a pointer to an +.I FTSENT +structure describing the first entry in a NULL-terminated linked list of +the files in the directory represented by the +.I FTSENT +structure most recently returned by +.BR fts_read (). +The list is linked through the +.I fts_link +field of the +.I FTSENT +structure, and is ordered by the user-specified comparison function, if any. +Repeated calls to +.BR fts_children () +will re-create this linked list. +.PP +As a special case, if +.BR fts_read () +has not yet been called for a hierarchy, +.BR fts_children () +will return a pointer to the files in the logical directory specified to +.BR fts_open (), +that is, the arguments specified to +.BR fts_open (). +Otherwise, if the +.I FTSENT +structure most recently returned by +.BR fts_read () +is not a directory being visited in preorder, +or the directory does not contain any files, +.BR fts_children () +returns +NULL +and sets +.I errno +to zero. +If an error occurs, +.BR fts_children () +returns +NULL +and sets +.I errno +to indicate the error. +.PP +The +.I FTSENT +structures returned by +.BR fts_children () +may be overwritten after a call to +.BR fts_children (), +.BR fts_close (), +or +.BR fts_read () +on the same file hierarchy stream. +.PP +The +.I instr +argument is either zero or the following value: +.\" .Bl -tag -width FTS_NAMEONLY +.TP +.B FTS_NAMEONLY +Only the names of the files are needed. +The contents of all the fields in the returned linked list of structures +are undefined with the exception of the +.I fts_name +and +.I fts_namelen +fields. +.\" .El +.SS fts_set() +The function +.BR fts_set () +allows the user application to determine further processing for the +file +.I f +of the stream +.IR ftsp . +The +.BR fts_set () +function +returns 0 on success, and \-1 if an error occurs. +.PP +The +.I instr +argument is either 0 (meaning "do nothing") or one of the following values: +.\" .Bl -tag -width FTS_PHYSICAL +.TP +.B FTS_AGAIN +Revisit the file; any file type may be revisited. +The next call to +.BR fts_read () +will return the referenced file. +The +.I fts_stat +and +.I fts_info +fields of the structure will be reinitialized at that time, +but no other fields will have been changed. +This option is meaningful only for the most recently returned +file from +.BR fts_read (). +Normal use is for postorder directory visits, where it causes the +directory to be revisited (in both preorder and postorder) as well as all +of its descendants. +.TP +.B FTS_FOLLOW +The referenced file must be a symbolic link. +If the referenced file is the one most recently returned by +.BR fts_read (), +the next call to +.BR fts_read () +returns the file with the +.I fts_info +and +.I fts_statp +fields reinitialized to reflect the target of the symbolic link instead +of the symbolic link itself. +If the file is one of those most recently returned by +.BR fts_children (), +the +.I fts_info +and +.I fts_statp +fields of the structure, when returned by +.BR fts_read (), +will reflect the target of the symbolic link instead of the symbolic link +itself. +In either case, if the target of the symbolic link does not exist, the +fields of the returned structure will be unchanged and the +.I fts_info +field will be set to +.BR FTS_SLNONE . +.IP +If the target of the link is a directory, the preorder return, followed +by the return of all of its descendants, followed by a postorder return, +is done. +.TP +.B FTS_SKIP +No descendants of this file are visited. +The file may be one of those most recently returned by either +.BR fts_children () +or +.BR fts_read (). +.\" .El +.SS fts_close() +The +.BR fts_close () +function closes the file hierarchy stream referred to by +.I ftsp +and restores the current directory to the directory from which +.BR fts_open () +was called to open +.IR ftsp . +The +.BR fts_close () +function +returns 0 on success, and \-1 if an error occurs. +.SH ERRORS +The function +.BR fts_open () +may fail and set +.I errno +for any of the errors specified for +.BR open (2) +and +.BR malloc (3). +.PP +The function +.BR fts_close () +may fail and set +.I errno +for any of the errors specified for +.BR chdir (2) +and +.BR close (2). +.PP +The functions +.BR fts_read () +and +.BR fts_children () +may fail and set +.I errno +for any of the errors specified for +.BR chdir (2), +.BR malloc (3), +.BR opendir (3), +.BR readdir (3), +and +.RB [ l ] stat (2). +.PP +In addition, +.BR fts_children (), +.BR fts_open (), +and +.BR fts_set () +may fail and set +.I errno +as follows: +.TP +.B EINVAL +.I options +or +.I instr +was invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fts_open (), +.BR fts_set (), +.BR fts_close () +T} Thread safety MT-Safe +T{ +.BR fts_read (), +.BR fts_children () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +glibc 2. +4.4BSD. +.SH BUGS +Before glibc 2.23, +.\" Fixed by commit 8b7b7f75d91f7bac323dd6a370aeb3e9c5c4a7d5 +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=15838 +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=11460 +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 +.IR \-D_FILE_OFFSET_BITS=64 ). +.\" +.\" 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. +.SH SEE ALSO +.BR find (1), +.BR chdir (2), +.BR lstat (2), +.BR stat (2), +.BR ftw (3), +.BR qsort (3) diff --git a/upstream/opensuse-leap-15-6/man3/ftw.3 b/upstream/opensuse-leap-15-6/man3/ftw.3 new file mode 100644 index 00000000..93b26f08 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ftw.3 @@ -0,0 +1,503 @@ +'\" t +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de) +.\" and copyright (c) 1999 Andries Brouwer (aeb@cwi.nl) +.\" and copyright (c) 2006 Justin Pryzby +.\" and copyright (c) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified Sun Jul 25 11:02:22 1993 by Rik Faith (faith@cs.unc.edu) +.\" 2006-05-24, Justin Pryzby +.\" document FTW_ACTIONRETVAL; include .SH RETURN VALUE; +.\" 2006-05-24, Justin Pryzby and +.\" Michael Kerrisk +.\" reorganized and rewrote much of the page +.\" 2006-05-24, Michael Kerrisk +.\" Added an example program. +.\" +.TH ftw 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ftw, nftw \- file tree walk +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int nftw(const char *" dirpath , +.BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb , +.BI " int " typeflag ", struct FTW *" ftwbuf ), +.BI " int " nopenfd ", int " flags ); +.PP +.B [[deprecated]] +.BI "int ftw(const char *" dirpath , +.BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb , +.BI " int " typeflag ), +.BI " int " nopenfd ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR nftw (): +.nf + _XOPEN_SOURCE >= 500 +.fi +.SH DESCRIPTION +.BR nftw () +walks through the directory tree that is +located under the directory \fIdirpath\fP, +and calls \fIfn\fP() once for each entry in the tree. +By default, directories are handled before the files and +subdirectories they contain (preorder traversal). +.PP +To avoid using up all of the calling process's file descriptors, +\fInopenfd\fP specifies the maximum number of directories that +.BR nftw () +will hold open simultaneously. +When +the search depth exceeds this, +.BR nftw () +will become slower because +directories have to be closed and reopened. +.BR nftw () +uses at most +one file descriptor for each level in the directory tree. +.PP +For each entry found in the tree, +.BR nftw () +calls +\fIfn\fP() with four arguments: +.IR fpath , +.IR sb , +.IR typeflag , +and +.IR ftwbuf . +.I fpath +is the pathname of the entry, +and is expressed either as a pathname relative to the calling process's +current working directory at the time of the call to +.BR nftw (), +if +.I dirpath +was expressed as a relative pathname, +or as an absolute pathname, if +.I dirpath +was expressed as an absolute pathname. +.I sb +is a pointer to the +.I stat +structure returned by a call to +.BR stat (2) +for +.IR fpath . +.PP +The +.I typeflag +argument passed to +.IR fn () +is an integer that has one of the following values: +.TP +.B FTW_F +.I fpath +is a regular file. +.TP +.B FTW_D +.I fpath +is a directory. +.TP +.B FTW_DNR +.I fpath +is a directory which can't be read. +.TP +.B FTW_DP +.I fpath +is a directory, and \fBFTW_DEPTH\fP was specified in \fIflags\fP. +(If +.B FTW_DEPTH +was not specified in +.IR flags , +then directories will always be visited with +.I typeflag +set to +.BR FTW_D .) +All of the files +and subdirectories within \fIfpath\fP have been processed. +.TP +.B FTW_NS +The +.BR stat (2) +call failed on +.IR fpath , +which is not a symbolic link. +The probable cause for this is that the caller had read permission +on the parent directory, so that the filename +.I fpath +could be seen, +but did not have execute permission, +so that the file could not be reached for +.BR stat (2). +The contents of the buffer pointed to by +.I sb +are undefined. +.TP +.B FTW_SL +.I fpath +is a symbolic link, and \fBFTW_PHYS\fP was set in \fIflags\fP. +.\" To obtain the definition of this constant from +.\" .IR , +.\" either +.\" .B _BSD_SOURCE +.\" must be defined, or +.\" .BR _XOPEN_SOURCE +.\" must be defined with a value of 500 or more. +.TP +.B FTW_SLN +.I fpath +is a symbolic link pointing to a nonexistent file. +(This occurs only if \fBFTW_PHYS\fP is not set.) +In this case the +.I sb +argument passed to +.IR fn () +contains information returned by performing +.BR lstat (2) +on the "dangling" symbolic link. +(But see BUGS.) +.PP +The fourth argument +.RI ( ftwbuf ) +that +.BR nftw () +supplies when calling +\fIfn\fP() +is a pointer to a structure of type \fIFTW\fP: +.PP +.in +4n +.EX +struct FTW { + int base; + int level; +}; +.EE +.in +.PP +.I base +is the offset of the filename (i.e., basename component) +in the pathname given in +.IR fpath . +.I level +is the depth of +.I fpath +in the directory tree, relative to the root of the tree +.RI ( dirpath , +which has depth 0). +.PP +To stop the tree walk, \fIfn\fP() returns a nonzero value; this +value will become the return value of +.BR nftw (). +As long as \fIfn\fP() returns 0, +.BR nftw () +will continue either until it has traversed the entire tree, +in which case it will return zero, +or until it encounters an error (such as a +.BR malloc (3) +failure), in which case it will return \-1. +.PP +Because +.BR nftw () +uses dynamic data structures, the only safe way to +exit out of a tree walk is to return a nonzero value from \fIfn\fP(). +To allow a signal to terminate the walk without causing a memory leak, +have the handler set a global flag that is checked by \fIfn\fP(). +\fIDon't\fP use +.BR longjmp (3) +unless the program is going to terminate. +.PP +The \fIflags\fP argument of +.BR nftw () +is formed by ORing zero or more of the +following flags: +.TP +.BR FTW_ACTIONRETVAL " (since glibc 2.3.3)" +If this glibc-specific flag is set, then +.BR nftw () +handles the return value from +.IR fn () +differently. +.IR fn () +should return one of the following values: +.RS +.TP +.B FTW_CONTINUE +Instructs +.BR nftw () +to continue normally. +.TP +.B FTW_SKIP_SIBLINGS +If \fIfn\fP() returns this value, then +siblings of the current entry will be skipped, +and processing continues in the parent. +.\" If \fBFTW_DEPTH\fP +.\" is set, the entry's parent directory is processed next (with +.\" \fIflag\fP set to \fBFTW_DP\fP). +.TP +.B FTW_SKIP_SUBTREE +If \fIfn\fP() is called with an entry that is a directory +(\fItypeflag\fP is \fBFTW_D\fP), this return +value will prevent objects within that directory from being passed as +arguments to \fIfn\fP(). +.BR nftw () +continues processing with the next sibling of the directory. +.TP +.B FTW_STOP +Causes +.BR nftw () +to return immediately with the return value +\fBFTW_STOP\fP. +.PP +Other return values could be associated with new actions in the future; +\fIfn\fP() should not return values other than those listed above. +.PP +The feature test macro +.B _GNU_SOURCE +must be defined +(before including +.I any +header files) +in order to +obtain the definition of \fBFTW_ACTIONRETVAL\fP from \fI\fP. +.RE +.TP +.B FTW_CHDIR +If set, do a +.BR chdir (2) +to each directory before handling its contents. +This is useful if the program needs to perform some action +in the directory in which \fIfpath\fP resides. +(Specifying this flag has no effect on the pathname that is passed in the +.I fpath +argument of +.IR fn .) +.TP +.B FTW_DEPTH +If set, do a post-order traversal, that is, call \fIfn\fP() for +the directory itself \fIafter\fP handling the contents of the directory +and its subdirectories. +(By default, each directory is handled \fIbefore\fP its contents.) +.TP +.B FTW_MOUNT +If set, stay within the same filesystem +(i.e., do not cross mount points). +.TP +.B FTW_PHYS +If set, do not follow symbolic links. +(This is what you want.) +If not set, symbolic links are followed, but no file is reported twice. +.IP +If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set, +then the function +.IR fn () +is never called for a directory that would be a descendant of itself. +.SS ftw() +.BR ftw () +is an older function that offers a subset of the functionality of +.BR nftw (). +The notable differences are as follows: +.IP \[bu] 3 +.BR ftw () +has no +.I flags +argument. +It behaves the same as when +.BR nftw () +is called with +.I flags +specified as zero. +.IP \[bu] +The callback function, +.IR fn (), +is not supplied with a fourth argument. +.IP \[bu] +The range of values that is passed via the +.I typeflag +argument supplied to +.IR fn () +is smaller: just +.BR FTW_F , +.BR FTW_D , +.BR FTW_DNR , +.BR FTW_NS , +and (possibly) +.BR FTW_SL . +.SH RETURN VALUE +These functions return 0 on success, and \-1 if an error occurs. +.PP +If \fIfn\fP() returns nonzero, +then the tree walk is terminated and the value returned by \fIfn\fP() +is returned as the result of +.BR ftw () +or +.BR nftw (). +.PP +If +.BR nftw () +is called with the \fBFTW_ACTIONRETVAL\fP flag, +then the only nonzero value that should be used by \fIfn\fP() +to terminate the tree walk is \fBFTW_STOP\fP, +and that value is returned as the result of +.BR nftw (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nftw () +T} Thread safety MT-Safe cwd +T{ +.BR ftw () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +In some implementations (e.g., glibc), +.BR ftw () +will never use \fBFTW_SL\fP; on other systems \fBFTW_SL\fP occurs only +for symbolic links that do not point to an existing file; +and again on other systems +.BR ftw () +will use \fBFTW_SL\fP for each symbolic link. +If +.I fpath +is a symbolic link and +.BR stat (2) +failed, POSIX.1-2008 states +that it is undefined whether \fBFTW_NS\fP or \fBFTW_SL\fP +is passed in +.IR typeflag . +For predictable results, use +.BR nftw (). +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +.TP +.BR ftw () +POSIX.1-2001, SVr4, SUSv1. +POSIX.1-2008 marks it as obsolete. +.TP +.BR nftw () +glibc 2.1. +POSIX.1-2001, SUSv1. +.TP +.B FTW_SL +POSIX.1-2001, SUSv1. +.SH NOTES +POSIX.1-2008 notes that the results are unspecified if +.I fn +does not preserve the current working directory. +.SH BUGS +According to POSIX.1-2008, when the +.I typeflag +argument passed to +.IR fn () +contains +.BR FTW_SLN , +the buffer pointed to by +.I sb +should contain information about the dangling symbolic link +(obtained by calling +.BR lstat (2) +on the link). +Early glibc versions correctly followed the POSIX specification on this point. +However, as a result of a regression introduced in glibc 2.4, +the contents of the buffer pointed to by +.I sb +were undefined when +.B FTW_SLN +is passed in +.IR typeflag . +(More precisely, the contents of the buffer were left unchanged in this case.) +This regression was eventually fixed in glibc 2.30, +.\" https://bugzilla.redhat.com/show_bug.cgi?id=1422736 +.\" http://austingroupbugs.net/view.php?id=1121 +.\" glibc commit 6ba205b2c35e3e024c8c12d2ee1b73363e84da87 +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=23501 +so that the glibc implementation (once more) follows the POSIX specification. +.SH EXAMPLES +The following program traverses the directory tree under the path named +in its first command-line argument, or under the current directory +if no argument is supplied. +It displays various information about each file. +The second command-line argument can be used to specify characters that +control the value assigned to the \fIflags\fP +argument when calling +.BR nftw (). +.SS Program source +\& +.\" SRC BEGIN (ftw.c) +.EX +#define _XOPEN_SOURCE 500 +#include +#include +#include +#include +#include + +static int +display_info(const char *fpath, const struct stat *sb, + int tflag, struct FTW *ftwbuf) +{ + printf("%\-3s %2d ", + (tflag == FTW_D) ? "d" : (tflag == FTW_DNR) ? "dnr" : + (tflag == FTW_DP) ? "dp" : (tflag == FTW_F) ? "f" : + (tflag == FTW_NS) ? "ns" : (tflag == FTW_SL) ? "sl" : + (tflag == FTW_SLN) ? "sln" : "???", + ftwbuf\->level); + + if (tflag == FTW_NS) + printf("\-\-\-\-\-\-\-"); + else + printf("%7jd", (intmax_t) sb\->st_size); + + printf(" %\-40s %d %s\en", + fpath, ftwbuf\->base, fpath + ftwbuf\->base); + + return 0; /* To tell nftw() to continue */ +} + +int +main(int argc, char *argv[]) +{ + int flags = 0; + + if (argc > 2 && strchr(argv[2], \[aq]d\[aq]) != NULL) + flags |= FTW_DEPTH; + if (argc > 2 && strchr(argv[2], \[aq]p\[aq]) != NULL) + flags |= FTW_PHYS; + + if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags) + == \-1) + { + perror("nftw"); + exit(EXIT_FAILURE); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR stat (2), +.BR fts (3), +.BR readdir (3) diff --git a/upstream/opensuse-leap-15-6/man3/futimes.3 b/upstream/opensuse-leap-15-6/man3/futimes.3 new file mode 100644 index 00000000..2711b8a6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/futimes.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (c) 2006, 2008, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH futimes 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +futimes, lutimes \- change file timestamps +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int futimes(int " fd ", const struct timeval " tv [2]); +.BI "int lutimes(const char *" filename ", const struct timeval " tv [2]); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR futimes (), +.BR lutimes (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +.BR futimes () +changes the access and modification times of a file in the same way as +.BR utimes (2), +with the difference that the file whose timestamps are to be changed +is specified via a file descriptor, +.IR fd , +rather than via a pathname. +.PP +.BR lutimes () +changes the access and modification times of a file in the same way as +.BR utimes (2), +with the difference that if +.I filename +refers to a symbolic link, then the link is not dereferenced: +instead, the timestamps of the symbolic link are changed. +.SH RETURN VALUE +On success, zero is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +Errors are as for +.BR utimes (2), +with the following additions for +.BR futimes (): +.TP +.B EBADF +.I fd +is not a valid file descriptor. +.TP +.B ENOSYS +The +.I /proc +filesystem could not be accessed. +.PP +The following additional error may occur for +.BR lutimes (): +.TP +.B ENOSYS +The kernel does not support this call; Linux 2.6.22 or later is required. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR futimes (), +.BR lutimes () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +Linux, BSD. +.SH HISTORY +.TP +.BR futimes () +glibc 2.3. +.TP +.BR lutimes () +glibc 2.6. +.SH NOTES +.BR lutimes () +is implemented using the +.BR utimensat (2) +system call. +.SH SEE ALSO +.BR utime (2), +.BR utimensat (2), +.BR symlink (7) diff --git a/upstream/opensuse-leap-15-6/man3/fwide.3 b/upstream/opensuse-leap-15-6/man3/fwide.3 new file mode 100644 index 00000000..81ef33d2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/fwide.3 @@ -0,0 +1,92 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH fwide 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fwide \- set and determine the orientation of a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fwide(FILE *" stream ", int " mode ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fwide (): +.nf + _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE + || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +When \fImode\fP is zero, the +.BR fwide () +function determines the current +orientation of \fIstream\fP. +It returns a positive value if \fIstream\fP is +wide-character oriented, that is, if wide-character I/O is permitted but char +I/O is disallowed. +It returns a negative value if \fIstream\fP is byte oriented\[em]that is, +if char I/O is permitted but wide-character I/O is disallowed. +It +returns zero if \fIstream\fP has no orientation yet; in this case the next +I/O operation might change the orientation (to byte oriented if it is a char +I/O operation, or to wide-character oriented if it is a wide-character I/O +operation). +.PP +Once a stream has an orientation, it cannot be changed and persists until +the stream is closed. +.PP +When \fImode\fP is nonzero, the +.BR fwide () +function first attempts to set +\fIstream\fP's orientation (to wide-character oriented +if \fImode\fP is greater than 0, or +to byte oriented if \fImode\fP is less than 0). +It then returns a value denoting the +current orientation, as above. +.SH RETURN VALUE +The +.BR fwide () +function returns the stream's orientation, after possibly +changing it. +A positive return value means wide-character oriented. +A negative return value means byte oriented. +A return value of zero means undecided. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +Wide-character output to a byte oriented stream can be performed through the +.BR fprintf (3) +function with the +.B %lc +and +.B %ls +directives. +.PP +Char oriented output to a wide-character oriented stream can be performed +through the +.BR fwprintf (3) +function with the +.B %c +and +.B %s +directives. +.SH SEE ALSO +.BR fprintf (3), +.BR fwprintf (3) diff --git a/upstream/opensuse-leap-15-6/man3/gamma.3 b/upstream/opensuse-leap-15-6/man3/gamma.3 new file mode 100644 index 00000000..b943c5ac --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gamma.3 @@ -0,0 +1,124 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Modified 2003-11-18, aeb: historical remarks +.\" +.TH gamma 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gamma, gammaf, gammal \- (logarithm of the) gamma function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] double gamma(double " x ");" +.BI "[[deprecated]] float gammaf(float " x ");" +.BI "[[deprecated]] long double gammal(long double " x ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR gamma (): +.nf + _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR gammaf (), +.BR gammal (): +.nf + _XOPEN_SOURCE >= 600 || (_XOPEN_SOURCE && _ISOC99_SOURCE) + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions are deprecated: instead, use either the +.BR tgamma (3) +or the +.BR lgamma (3) +functions, as appropriate. +.PP +For the definition of the Gamma function, see +.BR tgamma (3). +.SS *BSD version +The libm in 4.4BSD and some versions of FreeBSD had a +.BR gamma () +function that computes the Gamma function, as one would expect. +.SS glibc version +glibc has a +.BR gamma () +function that is equivalent to +.BR lgamma (3) +and computes the natural logarithm of the Gamma function. +.SH RETURN VALUE +See +.BR lgamma (3). +.SH ERRORS +See +.BR lgamma (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR gamma (), +.BR gammaf (), +.BR gammal () +T} Thread safety MT-Unsafe race:signgam +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVID 2. +.PP +Because of historical variations in behavior across systems, +this function is not specified in any recent standard. +.PP +4.2BSD had a +.BR gamma () +that computed +.RI ln(|Gamma(| x |)|), +leaving the sign of +.RI Gamma(| x |) +in the external integer +.IR signgam . +In 4.3BSD the name was changed to +.BR lgamma (3), +and the man page promises +.PP +.in +4n +"At some time in the future the name gamma will be rehabilitated +and used for the Gamma function" +.in +.PP +This did indeed happen in 4.4BSD, where +.BR gamma () +computes the Gamma function (with no effect on +.IR signgam ). +However, this came too late, and we now have +.BR tgamma (3), +the "true gamma" function. +.\" 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. +.SH SEE ALSO +.BR lgamma (3), +.BR signgam (3), +.BR tgamma (3) diff --git a/upstream/opensuse-leap-15-6/man3/gcvt.3 b/upstream/opensuse-leap-15-6/man3/gcvt.3 new file mode 100644 index 00000000..22405b5b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gcvt.3 @@ -0,0 +1,85 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH gcvt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gcvt \- convert a floating-point number to a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *gcvt(double " number ", int " ndigit ", char *" buf ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR gcvt (): +.nf + Since glibc 2.17 + (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200809L)) + || /* glibc >= 2.20 */ _DEFAULT_SOURCE + || /* glibc <= 2.19 */ _SVID_SOURCE + glibc 2.12 to glibc 2.16: + (_XOPEN_SOURCE >= 500 && ! (_POSIX_C_SOURCE >= 200112L)) + || _SVID_SOURCE + Before glibc 2.12: + _SVID_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +The +.BR gcvt () +function converts \fInumber\fP to a minimal length null-terminated +ASCII string and stores the result in \fIbuf\fP. +It produces \fIndigit\fP significant digits in either +.BR printf (3) +F format or E format. +.SH RETURN VALUE +The +.BR gcvt () +function returns +\fIbuf\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR gcvt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +Marked as LEGACY in POSIX.1-2001. +POSIX.1-2008 removed it, +recommending the use of +.BR sprintf (3) +instead (though +.BR snprintf (3) +may be preferable). +.SH SEE ALSO +.BR ecvt (3), +.BR fcvt (3), +.BR sprintf (3) diff --git a/upstream/opensuse-leap-15-6/man3/get_nprocs.3 b/upstream/opensuse-leap-15-6/man3/get_nprocs.3 new file mode 100644 index 00000000..4323e53e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/get_nprocs.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright (c) 2012, Petr Benas +.\" and Copyright (c) 2012, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH get_nprocs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +get_nprocs, get_nprocs_conf \- get number of processors +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B int get_nprocs(void); +.B int get_nprocs_conf(void); +.fi +.SH DESCRIPTION +The function +.BR get_nprocs_conf () +returns the number of processors configured by the operating system. +.PP +The function +.BR get_nprocs () +returns the number of processors currently available in the system. +This may be less than the number returned by +.BR get_nprocs_conf () +because processors may be offline (e.g., on hotpluggable systems). +.SH RETURN VALUE +As given in DESCRIPTION. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR get_nprocs (), +.BR get_nprocs_conf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH NOTES +The current +.\" glibc 2.15 +implementation of these functions is rather expensive, +since they open and parse files in the +.I /sys +filesystem each time they are called. +.PP +The following +.BR sysconf (3) +calls make use of the functions documented on this page +to return the same information. +.PP +.in +4n +.EX +np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */ +np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */ +.EE +.in +.SH EXAMPLES +The following example shows how +.BR get_nprocs () +and +.BR get_nprocs_conf () +can be used. +.PP +.\" SRC BEGIN (get_nprocs_conf.c) +.EX +#include +#include +#include + +int +main(void) +{ + printf("This system has %d processors configured and " + "%d processors available.\en", + get_nprocs_conf(), get_nprocs()); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR nproc (1) diff --git a/upstream/opensuse-leap-15-6/man3/get_phys_pages.3 b/upstream/opensuse-leap-15-6/man3/get_phys_pages.3 new file mode 100644 index 00000000..50c2bb13 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/get_phys_pages.3 @@ -0,0 +1,90 @@ +.\" Copyright (c) 2015 William Woodruff (william@tuffbizz.com) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH get_phys_pages 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +get_phys_pages, get_avphys_pages \- get total and available physical +page counts +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.B long get_phys_pages(void); +.B long get_avphys_pages(void); +.fi +.SH DESCRIPTION +The function +.BR get_phys_pages () +returns the total number of physical pages of memory available on the system. +.PP +The function +.BR get_avphys_pages () +returns the number of currently available physical pages of memory on the +system. +.SH RETURN VALUE +On success, +these functions return a nonnegative value as given in DESCRIPTION. +On failure, they return \-1 and set +.I errno +to indicate the error. +.SH ERRORS +.TP +.B ENOSYS +The system could not provide the required information +(possibly because the +.I /proc +filesystem was not mounted). +.SH STANDARDS +GNU. +.SH HISTORY +Before glibc 2.23, +these functions obtained the required information by scanning the +.I MemTotal +and +.I MemFree +fields of +.IR /proc/meminfo . +Since glibc 2.23, +these functions obtain the required information by calling +.BR sysinfo (2). +.SH NOTES +The following +.BR sysconf (3) +calls provide a portable means of obtaining the same information as the +functions described on this page. +.PP +.in +4n +.EX +total_pages = sysconf(_SC_PHYS_PAGES); /* total pages */ +avl_pages = sysconf(_SC_AVPHYS_PAGES); /* available pages */ +.EE +.in +.SH EXAMPLES +The following example shows how +.BR get_phys_pages () +and +.BR get_avphys_pages () +can be used. +.PP +.\" SRC BEGIN (get_phys_pages.c) +.EX +#include +#include +#include + +int +main(void) +{ + printf("This system has %ld pages of physical memory and " + "%ld pages of physical memory available.\en", + get_phys_pages(), get_avphys_pages()); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR sysconf (3) diff --git a/upstream/opensuse-leap-15-6/man3/get_wch.3ncurses b/upstream/opensuse-leap-15-6/man3/get_wch.3ncurses new file mode 100644 index 00000000..10d4a891 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/get_wch.3ncurses @@ -0,0 +1,180 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_get_wch.3x,v 1.10 2017/11/18 23:56:00 tom Exp $ +.TH get_wch 3NCURSES "" +.na +.hy 0 +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, +\fBmvwget_wch\fR, +\fBunget_wch\fR \- get (or push back) a wide character from curses terminal keyboard +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint get_wch(wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wget_wch(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvget_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvwget_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR +.br +\fBint unget_wch(const wchar_t \fR\fIwch\fR\fB);\fR +.SH DESCRIPTION +The +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, and +\fBmvwget_wch\fR +functions read a character +from the terminal associated with the current or specified window. +In no-delay mode, +if no input is waiting, the value \fBERR\fR is returned. +In delay mode, +the program waits until the system passes text through to the program. +Depending on the setting of \fBcbreak\fR, +this is after one character (cbreak mode), +or after the first newline (nocbreak mode). +In half-delay mode, +the program waits until the user types a character or the specified +timeout interval has elapsed. +.PP +Unless \fBnoecho\fR has been set, +these routines echo the character into the designated window. +.PP +If the window is not a pad and has been moved or modified since the +last call to \fBwrefresh\fR, +\fBwrefresh\fR will be called before another character is read. +.PP +If \fBkeypad\fR is enabled, +these functions respond to +the pressing of a function key by setting the object pointed to by +\fIwch\fR +to the keycode assigned to the function key, +and returning \fBKEY_CODE_YES\fR. +If a character (such as escape) that could be the +beginning of a function key is received, curses sets a timer. +If the remainder +of the sequence does arrive within the designated time, curses passes through +the character; otherwise, curses returns the function key value. +For this +reason, many terminals experience a delay between the time a user presses +the escape key and the time the escape is returned to the program. +.PP +The keycodes returned by these functions are the same as those +returned by \fBwgetch\fP: +.bP +The predefined function +keys are listed in \fB\fR as macros with values outside the range +of 8-bit characters. +Their names begin with \fBKEY_\fR. +.bP +Other (user-defined) function keys which may be defined using \fBdefine_key\fP(3X) +have no names, but also are expected to have values outside the range of +8-bit characters. +.PP +The +\fBunget_wch\fR +function pushes the wide character +\fIwch\fR +back onto the head of the input queue, so the wide character +is returned by the next call to +\fBget_wch\fR. +The pushback of +one character is guaranteed. +If the program calls +\fBunget_wch\fR +too many times without an intervening call to +\fBget_wch\fR, +the operation may fail. +.SH NOTES +The header file +\fB\fR +automatically +includes the header file +\fB\fR. +.PP +Applications should not define the escape key by itself as a single-character +function. +.PP +When using +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, or +\fBmvwget_wch\fR, applications should +not use +\fBnocbreak\fR +mode and +\fBecho\fR +mode +at the same time. +Depending on the state of the tty driver when each character +is typed, the program may produce undesirable results. +.PP +All functions except \fBwget_wch\fR and \fBunget_wch\fR +may be macros. +.SH RETURN VALUE +When +\fBget_wch\fR, +\fBwget_wch\fR, +\fBmvget_wch\fR, and +\fBmvwget_wch\fR +functions successfully +report the pressing of a function key, they return +\fBKEY_CODE_YES\fR. +When they successfully report a wide character, they return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.PP +Upon successful completion, +\fBunget_wch\fR +returns +\fBOK\fR. +Otherwise, the function returns +\fBERR\fR. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBgetch\fR(3NCURSES), +\fBins_wch\fR(3NCURSES), +\fBinopts\fR(3NCURSES), +\fBmove\fR(3NCURSES), +\fBrefresh\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/get_wstr.3ncurses b/upstream/opensuse-leap-15-6/man3/get_wstr.3ncurses new file mode 100644 index 00000000..41054e39 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/get_wstr.3ncurses @@ -0,0 +1,186 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_get_wstr.3x,v 1.12 2017/11/21 00:45:48 tom Exp $ +.TH get_wstr 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBget_wstr\fR, +\fBgetn_wstr\fR, +\fBwget_wstr\fR, +\fBwgetn_wstr\fR, +\fBmvget_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwget_wstr\fR, +\fBmvwgetn_wstr\fR \- get an array of wide characters from a curses terminal keyboard +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +\fBint get_wstr(wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint getn_wstr(wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvgetn_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwget_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwgetn_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +The effect of +\fBget_wstr\fR +is as though a series of calls +to +\fBget_wch\fR(3X) +were made, until a newline, other end-of-line, or end-of-file condition is processed. +An end-of-file condition is represented by \fBWEOF\fR, as defined in \fB\fR. +The newline and end-of-line conditions are represented by the \fB\\n\fR \fBwchar_t\fR value. +In all instances, the end of the string is terminated by a null \fBwchar_t\fR. +The routine places resulting values in the area pointed to by \fIwstr\fR. +.PP +The user's erase and kill characters are interpreted. If keypad +mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR +are both considered equivalent to the user's kill character. +.PP +Characters input are echoed only if \fBecho\fR is currently on. In that case, +backspace is echoed as deletion of the previous character (typically a left +motion). +.PP +The effect of +\fBwget_wstr\fR +is as though a series of +calls to +\fBwget_wch\fR +were made. +.PP +The effect of +\fBmvget_wstr\fR +is as though a call to +\fBmove\fR +and then a series of calls to +\fBget_wch\fR +were +made. +.PP +The effect of +\fBmvwget_wstr\fR +is as though a call to +\fBwmove\fR +and then a series of calls to +\fBwget_wch\fR +were made. +.PP +The +\fBgetn_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwgetn_wstr\fR, and +\fBwgetn_wstr\fR +functions are identical +to the +\fBget_wstr\fR, +\fBmvget_wstr\fR, +\fBmvwget_wstr\fR, and +\fBwget_wstr\fR +functions, respectively, +except that the +\fB*n_*\fR +versions read at most +\fIn\fR +characters, letting the application prevent overflow of the +input buffer. +.SH NOTES +Using +\fBget_wstr\fR, +\fBmvget_wstr\fR, +\fBmvwget_wstr\fR, or +\fBwget_wstr\fR +to read a line that +overflows the array pointed to by +\fBwstr\fR +causes undefined +results. +The use of +\fBgetn_wstr\fR, +\fBmvgetn_wstr\fR, +\fBmvwgetn_wstr\fR, or +\fBwgetn_wstr\fR, respectively, is recommended. +.PP +These functions cannot return \fBKEY_\fR values because there +is no way to distinguish a \fBKEY_\fR value from a valid \fBwchar_t\fR value. +.PP +All of these routines except \fBwgetn_wstr\fR may be macros. +.SH RETURN VALUE +All of these functions return \fBOK\fR upon successful completion. +Otherwise, they return \fBERR\fR. +.PP +Functions using a window parameter return an error if it is null. +.RS +.TP 5 +\fBwgetn_wstr\fP +returns an error if the associated call to \fBwget_wch\fP failed. +.RE +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH PORTABILITY +These functions are described in The Single Unix Specification, Version 2. +No error conditions are defined. +This implementation returns \fBERR\fP if the window pointer is null, +or if the lower-level \fBwget_wch\fR call returns an \fBERR\fP. +In the latter case, +an \fBERR\fP return without other data is treated as an end-of-file condition, +and the returned array contains a \fBWEOF\fR followed by a null \fBwchar_t\fR. +.PP +X/Open curses documented these functions to pass an array of \fBwchar_t\fR +in 1997, but that was an error because of this part of the description: +.RS +.PP +The effect of \fIget_wstr()\fP is as though a series of calls to +\fIget_wch()\fP were made, until a newline character, end-of-line character, or +end-of-file character is processed. +.RE +.PP +The latter function \fIget_wch()\fP can return a negative value, +while \fBwchar_t\fP is a unsigned type. +All of the vendors implement this using \fBwint_t\fR, following the standard. +.SH SEE ALSO +Functions: +\fBncurses\fR(3NCURSES), +\fBget_wch\fR(3NCURSES), +\fBgetstr\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/getaddrinfo.3 b/upstream/opensuse-leap-15-6/man3/getaddrinfo.3 new file mode 100644 index 00000000..dcea707d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getaddrinfo.3 @@ -0,0 +1,854 @@ +'\" t +.\" Copyright (c) 2007, 2008 Michael Kerrisk +.\" and Copyright (c) 2006 Ulrich Drepper +.\" A few pieces of an earlier version remain: +.\" Copyright 2000, Sam Varshavchik +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References: RFC 2553 +.\" +.\" 2005-08-09, mtk, added AI_ALL, AI_ADDRCONFIG, AI_V4MAPPED, +.\" and AI_NUMERICSERV. +.\" 2006-11-25, Ulrich Drepper +.\" Add text describing Internationalized Domain Name extensions. +.\" 2007-06-08, mtk: added example programs +.\" 2008-02-26, mtk; clarify discussion of NULL 'hints' argument; other +.\" minor rewrites. +.\" 2008-06-18, mtk: many parts rewritten +.\" 2008-12-04, Petr Baudis +.\" Describe results ordering and reference /etc/gai.conf. +.\" +.\" FIXME . glibc's 2.9 NEWS file documents DCCP and UDP-lite support +.\" and is SCTP support now also there? +.\" +.TH getaddrinfo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getaddrinfo, freeaddrinfo, gai_strerror \- network address and +service translation +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "int getaddrinfo(const char *restrict " node , +.BI " const char *restrict " service , +.BI " const struct addrinfo *restrict " hints , +.BI " struct addrinfo **restrict " res ); +.PP +.BI "void freeaddrinfo(struct addrinfo *" res ); +.PP +.BI "const char *gai_strerror(int " errcode ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getaddrinfo (), +.BR freeaddrinfo (), +.BR gai_strerror (): +.nf + Since glibc 2.22: + _POSIX_C_SOURCE >= 200112L + glibc 2.21 and earlier: + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +Given +.I node +and +.IR service , +which identify an Internet host and a service, +.BR getaddrinfo () +returns one or more +.I addrinfo +structures, each of which contains an Internet address +that can be specified in a call to +.BR bind (2) +or +.BR connect (2). +The +.BR getaddrinfo () +function combines the functionality provided by the +.\" .BR getipnodebyname (3), +.\" .BR getipnodebyaddr (3), +.BR gethostbyname (3) +and +.BR getservbyname (3) +functions into a single interface, but unlike the latter functions, +.BR getaddrinfo () +is reentrant and allows programs to eliminate IPv4-versus-IPv6 dependencies. +.PP +The +.I addrinfo +structure used by +.BR getaddrinfo () +contains the following fields: +.PP +.in +4n +.EX +struct addrinfo { + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + socklen_t ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; +.EE +.in +.PP +The +.I hints +argument points to an +.I addrinfo +structure that specifies criteria for selecting the socket address +structures returned in the list pointed to by +.IR res . +If +.I hints +is not NULL it points to an +.I addrinfo +structure whose +.IR ai_family , +.IR ai_socktype , +and +.I ai_protocol +specify criteria that limit the set of socket addresses returned by +.BR getaddrinfo (), +as follows: +.TP +.I ai_family +This field specifies the desired address family for the returned addresses. +Valid values for this field include +.B AF_INET +and +.BR AF_INET6 . +The value +.B AF_UNSPEC +indicates that +.BR getaddrinfo () +should return socket addresses for any address family +(either IPv4 or IPv6, for example) that can be used with +.I node +and +.IR service . +.TP +.I ai_socktype +This field specifies the preferred socket type, for example +.B SOCK_STREAM +or +.BR SOCK_DGRAM . +Specifying 0 in this field indicates that socket addresses of any type +can be returned by +.BR getaddrinfo (). +.TP +.I ai_protocol +This field specifies the protocol for the returned socket addresses. +Specifying 0 in this field indicates that socket addresses with +any protocol can be returned by +.BR getaddrinfo (). +.TP +.I ai_flags +This field specifies additional options, described below. +Multiple flags are specified by bitwise OR-ing them together. +.PP +All the other fields in the structure pointed to by +.I hints +must contain either 0 or a null pointer, as appropriate. +.PP +Specifying +.I hints +as NULL is equivalent to setting +.I ai_socktype +and +.I ai_protocol +to 0; +.I ai_family +to +.BR AF_UNSPEC ; +and +.I ai_flags +to +.BR "(AI_V4MAPPED\ |\ AI_ADDRCONFIG)" . +(POSIX specifies different defaults for +.IR ai_flags ; +see NOTES.) +.I node +specifies either a numerical network address +(for IPv4, numbers-and-dots notation as supported by +.BR inet_aton (3); +for IPv6, hexadecimal string format as supported by +.BR inet_pton (3)), +or a network hostname, whose network addresses are looked up and resolved. +If +.I hints.ai_flags +contains the +.B AI_NUMERICHOST +flag, then +.I node +must be a numerical network address. +The +.B AI_NUMERICHOST +flag suppresses any potentially lengthy network host address lookups. +.PP +If the +.B AI_PASSIVE +flag is specified in +.IR hints.ai_flags , +and +.I node +is NULL, +then the returned socket addresses will be suitable for +.BR bind (2)ing +a socket that will +.BR accept (2) +connections. +The returned socket address will contain the "wildcard address" +.RB ( INADDR_ANY +for IPv4 addresses, +.B IN6ADDR_ANY_INIT +for IPv6 address). +The wildcard address is used by applications (typically servers) +that intend to accept connections on any of the host's network addresses. +If +.I node +is not NULL, then the +.B AI_PASSIVE +flag is ignored. +.PP +If the +.B AI_PASSIVE +flag is not set in +.IR hints.ai_flags , +then the returned socket addresses will be suitable for use with +.BR connect (2), +.BR sendto (2), +or +.BR sendmsg (2). +If +.I node +is NULL, +then the network address will be set to the loopback interface address +.RB ( INADDR_LOOPBACK +for IPv4 addresses, +.B IN6ADDR_LOOPBACK_INIT +for IPv6 address); +this is used by applications that intend to communicate +with peers running on the same host. +.PP +.I service +sets the port in each returned address structure. +If this argument is a service name (see +.BR services (5)), +it is translated to the corresponding port number. +This argument can also be specified as a decimal number, +which is simply converted to binary. +If +.I service +is NULL, then the port number of the returned socket addresses +will be left uninitialized. +If +.B AI_NUMERICSERV +is specified in +.I hints.ai_flags +and +.I service +is not NULL, then +.I service +must point to a string containing a numeric port number. +This flag is used to inhibit the invocation of a name resolution service +in cases where it is known not to be required. +.PP +Either +.I node +or +.IR service , +but not both, may be NULL. +.PP +The +.BR getaddrinfo () +function allocates and initializes a linked list of +.I addrinfo +structures, one for each network address that matches +.I node +and +.IR service , +subject to any restrictions imposed by +.IR hints , +and returns a pointer to the start of the list in +.IR res . +The items in the linked list are linked by the +.I ai_next +field. +.PP +There are several reasons why +the linked list may have more than one +.I addrinfo +structure, including: the network host is multihomed, accessible +over multiple protocols (e.g., both +.B AF_INET +and +.BR AF_INET6 ); +or the same service is available from multiple socket types (one +.B SOCK_STREAM +address and another +.B SOCK_DGRAM +address, for example). +Normally, the application should try +using the addresses in the order in which they are returned. +The sorting function used within +.BR getaddrinfo () +is defined in RFC\ 3484; the order can be tweaked for a particular +system by editing +.I /etc/gai.conf +(available since glibc 2.5). +.PP +If +.I hints.ai_flags +includes the +.B AI_CANONNAME +flag, then the +.I ai_canonname +field of the first of the +.I addrinfo +structures in the returned list is set to point to the +official name of the host. +.\" Prior to glibc 2.3.4, the ai_canonname of each addrinfo +.\" structure was set pointing to the canonical name; that was +.\" more than POSIX.1-2001 specified, or other implementations provided. +.\" MTK, Aug 05 +.PP +The remaining fields of each returned +.I addrinfo +structure are initialized as follows: +.IP \[bu] 3 +The +.IR ai_family , +.IR ai_socktype , +and +.I ai_protocol +fields return the socket creation parameters (i.e., these fields have +the same meaning as the corresponding arguments of +.BR socket (2)). +For example, +.I ai_family +might return +.B AF_INET +or +.BR AF_INET6 ; +.I ai_socktype +might return +.B SOCK_DGRAM +or +.BR SOCK_STREAM ; +and +.I ai_protocol +returns the protocol for the socket. +.IP \[bu] +A pointer to the socket address is placed in the +.I ai_addr +field, and the length of the socket address, in bytes, +is placed in the +.I ai_addrlen +field. +.PP +If +.I hints.ai_flags +includes the +.B AI_ADDRCONFIG +flag, then IPv4 addresses are returned in the list pointed to by +.I res +only if the local system has at least one +IPv4 address configured, and IPv6 addresses are returned +only if the local system has at least one IPv6 address configured. +The loopback address is not considered for this case as valid +as a configured address. +This flag is useful on, for example, +IPv4-only systems, to ensure that +.BR getaddrinfo () +does not return IPv6 socket addresses that would always fail in +.BR connect (2) +or +.BR bind (2). +.PP +If +.I hints.ai_flags +specifies the +.B AI_V4MAPPED +flag, and +.I hints.ai_family +was specified as +.BR AF_INET6 , +and no matching IPv6 addresses could be found, +then return IPv4-mapped IPv6 addresses in the list pointed to by +.IR res . +If both +.B AI_V4MAPPED +and +.B AI_ALL +are specified in +.IR hints.ai_flags , +then return both IPv6 and IPv4-mapped IPv6 addresses +in the list pointed to by +.IR res . +.B AI_ALL +is ignored if +.B AI_V4MAPPED +is not also specified. +.PP +The +.BR freeaddrinfo () +function frees the memory that was allocated +for the dynamically allocated linked list +.IR res . +.SS Extensions to getaddrinfo() for Internationalized Domain Names +Starting with glibc 2.3.4, +.BR getaddrinfo () +has been extended to selectively allow the incoming and outgoing +hostnames to be transparently converted to and from the +Internationalized Domain Name (IDN) format (see RFC 3490, +.IR "Internationalizing Domain Names in Applications (IDNA)" ). +Four new flags are defined: +.TP +.B AI_IDN +If this flag is specified, then the node name given in +.I node +is converted to IDN format if necessary. +The source encoding is that of the current locale. +.IP +If the input name contains non-ASCII characters, then the IDN encoding +is used. +Those parts of the node name (delimited by dots) that contain +non-ASCII characters are encoded using ASCII Compatible Encoding (ACE) +before being passed to the name resolution functions. +.\" Implementation Detail: +.\" To minimize effects on system performance the implementation might +.\" want to check whether the input string contains any non-ASCII +.\" characters. If there are none the IDN step can be skipped completely. +.\" On systems which allow not-ASCII safe encodings for a locale this +.\" might be a problem. +.TP +.B AI_CANONIDN +After a successful name lookup, and if the +.B AI_CANONNAME +flag was specified, +.BR getaddrinfo () +will return the canonical name of the +node corresponding to the +.I addrinfo +structure value passed back. +The return value is an exact copy of the value returned by the name +resolution function. +.IP +If the name is encoded using ACE, then it will contain the +.I xn\-\- +prefix for one or more components of the name. +To convert these components into a readable form the +.B AI_CANONIDN +flag can be passed in addition to +.BR AI_CANONNAME . +The resulting string is encoded using the current locale's encoding. +.\" +.\"Implementation Detail: +.\"If no component of the returned name starts with xn\-\- the IDN +.\"step can be skipped, therefore avoiding unnecessary slowdowns. +.TP +.BR AI_IDN_ALLOW_UNASSIGNED ", " AI_IDN_USE_STD3_ASCII_RULES +Setting these flags will enable the +IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and +IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 +conforming hostname) +flags respectively to be used in the IDNA handling. +.SH RETURN VALUE +.\" FIXME glibc defines the following additional errors, some which +.\" can probably be returned by getaddrinfo(); they need to +.\" be documented. +.\" #ifdef __USE_GNU +.\" #define EAI_INPROGRESS -100 /* Processing request in progress. */ +.\" #define EAI_CANCELED -101 /* Request canceled. */ +.\" #define EAI_NOTCANCELED -102 /* Request not canceled. */ +.\" #define EAI_ALLDONE -103 /* All requests done. */ +.\" #define EAI_INTR -104 /* Interrupted by a signal. */ +.\" #define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ +.\" #endif +.BR getaddrinfo () +returns 0 if it succeeds, or one of the following nonzero error codes: +.TP +.B EAI_ADDRFAMILY +.\" Not in SUSv3 +The specified network host does not have any network addresses in the +requested address family. +.TP +.B EAI_AGAIN +The name server returned a temporary failure indication. +Try again later. +.TP +.B EAI_BADFLAGS +.I hints.ai_flags +contains invalid flags; or, +.I hints.ai_flags +included +.B AI_CANONNAME +and +.I name +was NULL. +.TP +.B EAI_FAIL +The name server returned a permanent failure indication. +.TP +.B EAI_FAMILY +The requested address family is not supported. +.TP +.B EAI_MEMORY +Out of memory. +.TP +.B EAI_NODATA +.\" Not in SUSv3 +The specified network host exists, but does not have any +network addresses defined. +.TP +.B EAI_NONAME +The +.I node +or +.I service +is not known; or both +.I node +and +.I service +are NULL; or +.B AI_NUMERICSERV +was specified in +.I hints.ai_flags +and +.I service +was not a numeric port-number string. +.TP +.B EAI_SERVICE +The requested service is not available for the requested socket type. +It may be available through another socket type. +For example, this error could occur if +.I service +was "shell" (a service available only on stream sockets), and either +.I hints.ai_protocol +was +.BR IPPROTO_UDP , +or +.I hints.ai_socktype +was +.BR SOCK_DGRAM ; +or the error could occur if +.I service +was not NULL, and +.I hints.ai_socktype +was +.B SOCK_RAW +(a socket type that does not support the concept of services). +.TP +.B EAI_SOCKTYPE +The requested socket type is not supported. +This could occur, for example, if +.I hints.ai_socktype +and +.I hints.ai_protocol +are inconsistent (e.g., +.B SOCK_DGRAM +and +.BR IPPROTO_TCP , +respectively). +.TP +.B EAI_SYSTEM +Other system error; +.I errno +is set to indicate the error. +.PP +The +.BR gai_strerror () +function translates these error codes to a human readable string, +suitable for error reporting. +.SH FILES +.I /etc/gai.conf +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getaddrinfo () +T} Thread safety MT-Safe env locale +T{ +.BR freeaddrinfo (), +.BR gai_strerror () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +According to POSIX.1, specifying +.\" POSIX.1-2001, POSIX.1-2008 +.I hints +as NULL should cause +.I ai_flags +to be assumed as 0. +The GNU C library instead assumes a value of +.B (AI_V4MAPPED\~|\~AI_ADDRCONFIG) +for this case, +since this value is considered an improvement on the specification. +.SH STANDARDS +POSIX.1-2008. +.TP +.BR getaddrinfo () +RFC\ 2553. +.SH HISTORY +POSIX.1-2001. +.TP +.B AI_ADDRCONFIG +.TQ +.B AI_ALL +.TQ +.B AI_V4MAPPED +glibc 2.3.3. +.TP +.B AI_NUMERICSERV +glibc 2.3.4. +.SH NOTES +.BR getaddrinfo () +supports the +.IB address % scope-id +notation for specifying the IPv6 scope-ID. +.SH EXAMPLES +.\" getnameinfo.3 refers to this example +.\" socket.2 refers to this example +.\" bind.2 refers to this example +.\" connect.2 refers to this example +.\" recvfrom.2 refers to this example +.\" sendto.2 refers to this example +The following programs demonstrate the use of +.BR getaddrinfo (), +.BR gai_strerror (), +.BR freeaddrinfo (), +and +.BR getnameinfo (3). +The programs are an echo server and client for UDP datagrams. +.SS Server program +\& +.\" SRC BEGIN (server.c) +.EX +#include +#include +#include +#include +#include +#include +#include + +#define BUF_SIZE 500 + +int +main(int argc, char *argv[]) +{ + int sfd, s; + char buf[BUF_SIZE]; + ssize_t nread; + socklen_t peer_addrlen; + struct addrinfo hints; + struct addrinfo *result, *rp; + struct sockaddr_storage peer_addr; + + if (argc != 2) { + fprintf(stderr, "Usage: %s port\en", argv[0]); + exit(EXIT_FAILURE); + } + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ + hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */ + hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ + hints.ai_protocol = 0; /* Any protocol */ + hints.ai_canonname = NULL; + hints.ai_addr = NULL; + hints.ai_next = NULL; + + s = getaddrinfo(NULL, argv[1], &hints, &result); + if (s != 0) { + fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s)); + exit(EXIT_FAILURE); + } + + /* getaddrinfo() returns a list of address structures. + Try each address until we successfully bind(2). + If socket(2) (or bind(2)) fails, we (close the socket + and) try the next address. */ + + for (rp = result; rp != NULL; rp = rp\->ai_next) { + sfd = socket(rp\->ai_family, rp\->ai_socktype, + rp\->ai_protocol); + if (sfd == \-1) + continue; + + if (bind(sfd, rp\->ai_addr, rp\->ai_addrlen) == 0) + break; /* Success */ + + close(sfd); + } + + freeaddrinfo(result); /* No longer needed */ + + if (rp == NULL) { /* No address succeeded */ + fprintf(stderr, "Could not bind\en"); + exit(EXIT_FAILURE); + } + + /* Read datagrams and echo them back to sender. */ + + for (;;) { + char host[NI_MAXHOST], service[NI_MAXSERV]; + + peer_addrlen = sizeof(peer_addr); + nread = recvfrom(sfd, buf, BUF_SIZE, 0, + (struct sockaddr *) &peer_addr, &peer_addrlen); + if (nread == \-1) + continue; /* Ignore failed request */ + + s = getnameinfo((struct sockaddr *) &peer_addr, + peer_addrlen, host, NI_MAXHOST, + service, NI_MAXSERV, NI_NUMERICSERV); + if (s == 0) + printf("Received %zd bytes from %s:%s\en", + nread, host, service); + else + fprintf(stderr, "getnameinfo: %s\en", gai_strerror(s)); + + if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr, + peer_addrlen) != nread) + { + fprintf(stderr, "Error sending response\en"); + } + } +} +.EE +.\" SRC END +.SS Client program +\& +.\" SRC BEGIN (client.c) +.EX +#include +#include +#include +#include +#include +#include +#include + +#define BUF_SIZE 500 + +int +main(int argc, char *argv[]) +{ + int sfd, s; + char buf[BUF_SIZE]; + size_t len; + ssize_t nread; + struct addrinfo hints; + struct addrinfo *result, *rp; + + if (argc < 3) { + fprintf(stderr, "Usage: %s host port msg...\en", argv[0]); + exit(EXIT_FAILURE); + } + + /* Obtain address(es) matching host/port. */ + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ + hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */ + hints.ai_flags = 0; + hints.ai_protocol = 0; /* Any protocol */ + + s = getaddrinfo(argv[1], argv[2], &hints, &result); + if (s != 0) { + fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s)); + exit(EXIT_FAILURE); + } + + /* getaddrinfo() returns a list of address structures. + Try each address until we successfully connect(2). + If socket(2) (or connect(2)) fails, we (close the socket + and) try the next address. */ + + for (rp = result; rp != NULL; rp = rp\->ai_next) { + sfd = socket(rp\->ai_family, rp\->ai_socktype, + rp\->ai_protocol); + if (sfd == \-1) + continue; + + if (connect(sfd, rp\->ai_addr, rp\->ai_addrlen) != \-1) + break; /* Success */ + + close(sfd); + } + + freeaddrinfo(result); /* No longer needed */ + + if (rp == NULL) { /* No address succeeded */ + fprintf(stderr, "Could not connect\en"); + exit(EXIT_FAILURE); + } + + /* Send remaining command\-line arguments as separate + datagrams, and read responses from server. */ + + for (size_t j = 3; j < argc; j++) { + len = strlen(argv[j]) + 1; + /* +1 for terminating null byte */ + + if (len > BUF_SIZE) { + fprintf(stderr, + "Ignoring long message in argument %zu\en", j); + continue; + } + + if (write(sfd, argv[j], len) != len) { + fprintf(stderr, "partial/failed write\en"); + exit(EXIT_FAILURE); + } + + nread = read(sfd, buf, BUF_SIZE); + if (nread == \-1) { + perror("read"); + exit(EXIT_FAILURE); + } + + printf("Received %zd bytes: %s\en", nread, buf); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.\" .BR getipnodebyaddr (3), +.\" .BR getipnodebyname (3), +.BR getaddrinfo_a (3), +.BR gethostbyname (3), +.BR getnameinfo (3), +.BR gai.conf (5), +.BR inet (3), +.BR gai.conf (5), +.BR hostname (7), +.BR ip (7) diff --git a/upstream/opensuse-leap-15-6/man3/getaddrinfo_a.3 b/upstream/opensuse-leap-15-6/man3/getaddrinfo_a.3 new file mode 100644 index 00000000..0c1ef3a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getaddrinfo_a.3 @@ -0,0 +1,614 @@ +'\" t +.\" Copyright (c) 2009 Petr Baudis +.\" and clean-ups and additions (C) Copyright 2010 Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References: http://people.redhat.com/drepper/asynchnl.pdf, +.\" http://www.imperialviolet.org/2005/06/01/asynchronous-dns-lookups-with-glibc.html +.\" +.TH getaddrinfo_a 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getaddrinfo_a, gai_suspend, gai_error, gai_cancel \- asynchronous +network address and service translation +.SH LIBRARY +Asynchronous name lookup library +.RI ( libanl ", " \-lanl ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int getaddrinfo_a(int " mode ", struct gaicb *" list [restrict], +.BI " int " nitems ", struct sigevent *restrict " sevp ); +.BI "int gai_suspend(const struct gaicb *const " list "[], int " nitems , +.BI " const struct timespec *" timeout ); +.PP +.BI "int gai_error(struct gaicb *" req ); +.BI "int gai_cancel(struct gaicb *" req ); +.fi +.SH DESCRIPTION +The +.BR getaddrinfo_a () +function performs the same task as +.BR getaddrinfo (3), +but allows multiple name look-ups to be performed asynchronously, +with optional notification on completion of look-up operations. +.PP +The +.I mode +argument has one of the following values: +.TP +.B GAI_WAIT +Perform the look-ups synchronously. +The call blocks until the look-ups have completed. +.TP +.B GAI_NOWAIT +Perform the look-ups asynchronously. +The call returns immediately, +and the requests are resolved in the background. +See the discussion of the +.I sevp +argument below. +.PP +The array +.I list +specifies the look-up requests to process. +The +.I nitems +argument specifies the number of elements in +.IR list . +The requested look-up operations are started in parallel. +NULL elements in +.I list +are ignored. +Each request is described by a +.I gaicb +structure, defined as follows: +.PP +.in +4n +.EX +struct gaicb { + const char *ar_name; + const char *ar_service; + const struct addrinfo *ar_request; + struct addrinfo *ar_result; +}; +.EE +.in +.PP +The elements of this structure correspond to the arguments of +.BR getaddrinfo (3). +Thus, +.I ar_name +corresponds to the +.I node +argument and +.I ar_service +to the +.I service +argument, identifying an Internet host and a service. +The +.I ar_request +element corresponds to the +.I hints +argument, specifying the criteria for selecting +the returned socket address structures. +Finally, +.I ar_result +corresponds to the +.I res +argument; you do not need to initialize this element, +it will be automatically set when the request +is resolved. +The +.I addrinfo +structure referenced by the last two elements is described in +.BR getaddrinfo (3). +.PP +When +.I mode +is specified as +.BR GAI_NOWAIT , +notifications about resolved requests +can be obtained by employing the +.I sigevent +structure pointed to by the +.I sevp +argument. +For the definition and general details of this structure, see +.BR sigevent (7). +The +.I sevp\->sigev_notify +field can have the following values: +.TP +.B SIGEV_NONE +Don't provide any notification. +.TP +.B SIGEV_SIGNAL +When a look-up completes, generate the signal +.I sigev_signo +for the process. +See +.BR sigevent (7) +for general details. +The +.I si_code +field of the +.I siginfo_t +structure will be set to +.BR SI_ASYNCNL . +.\" si_pid and si_uid are also set, to the values of the calling process, +.\" which doesn't provide useful information, so we'll skip mentioning it. +.TP +.B SIGEV_THREAD +When a look-up completes, invoke +.I sigev_notify_function +as if it were the start function of a new thread. +See +.BR sigevent (7) +for details. +.PP +For +.B SIGEV_SIGNAL +and +.BR SIGEV_THREAD , +it may be useful to point +.I sevp\->sigev_value.sival_ptr +to +.IR list . +.PP +The +.BR gai_suspend () +function suspends execution of the calling thread, +waiting for the completion of one or more requests in the array +.IR list . +The +.I nitems +argument specifies the size of the array +.IR list . +The call blocks until one of the following occurs: +.IP \[bu] 3 +One or more of the operations in +.I list +completes. +.IP \[bu] +The call is interrupted by a signal that is caught. +.IP \[bu] +The time interval specified in +.I timeout +elapses. +This argument specifies a timeout in seconds plus nanoseconds (see +.BR nanosleep (2) +for details of the +.I timespec +structure). +If +.I timeout +is NULL, then the call blocks indefinitely +(until one of the events above occurs). +.PP +No explicit indication of which request was completed is given; +you must determine which request(s) have completed by iterating with +.BR gai_error () +over the list of requests. +.PP +The +.BR gai_error () +function returns the status of the request +.IR req : +either +.B EAI_INPROGRESS +if the request was not completed yet, +0 if it was handled successfully, +or an error code if the request could not be resolved. +.PP +The +.BR gai_cancel () +function cancels the request +.IR req . +If the request has been canceled successfully, +the error status of the request will be set to +.B EAI_CANCELED +and normal asynchronous notification will be performed. +The request cannot be canceled if it is currently being processed; +in that case, it will be handled as if +.BR gai_cancel () +has never been called. +If +.I req +is NULL, an attempt is made to cancel all outstanding requests +that the process has made. +.SH RETURN VALUE +The +.BR getaddrinfo_a () +function returns 0 if all of the requests have been enqueued successfully, +or one of the following nonzero error codes: +.TP +.B EAI_AGAIN +The resources necessary to enqueue the look-up requests were not available. +The application may check the error status of each +request to determine which ones failed. +.TP +.B EAI_MEMORY +Out of memory. +.TP +.B EAI_SYSTEM +.I mode +is invalid. +.PP +The +.BR gai_suspend () +function returns 0 if at least one of the listed requests has been completed. +Otherwise, it returns one of the following nonzero error codes: +.TP +.B EAI_AGAIN +The given timeout expired before any of the requests could be completed. +.TP +.B EAI_ALLDONE +There were no actual requests given to the function. +.TP +.B EAI_INTR +A signal has interrupted the function. +Note that this interruption might have been +caused by signal notification of some completed look-up request. +.PP +The +.BR gai_error () +function can return +.B EAI_INPROGRESS +for an unfinished look-up request, +0 for a successfully completed look-up +(as described above), one of the error codes that could be returned by +.BR getaddrinfo (3), +or the error code +.B EAI_CANCELED +if the request has been canceled explicitly before it could be finished. +.PP +The +.BR gai_cancel () +function can return one of these values: +.TP +.B EAI_CANCELED +The request has been canceled successfully. +.TP +.B EAI_NOTCANCELED +The request has not been canceled. +.TP +.B EAI_ALLDONE +The request has already completed. +.PP +The +.BR gai_strerror (3) +function translates these error codes to a human readable string, +suitable for error reporting. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getaddrinfo_a (), +.BR gai_suspend (), +.BR gai_error (), +.BR gai_cancel () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.2.3. +.PP +The interface of +.BR getaddrinfo_a () +was modeled after the +.BR lio_listio (3) +interface. +.SH EXAMPLES +Two examples are provided: a simple example that resolves +several requests in parallel synchronously, and a complex example +showing some of the asynchronous capabilities. +.SS Synchronous example +The program below simply resolves several hostnames in parallel, +giving a speed-up compared to resolving the hostnames sequentially using +.BR getaddrinfo (3). +The program might be used like this: +.PP +.in +4n +.EX +$ \fB./a.out mirrors.kernel.org enoent.linuxfoundation.org gnu.org\fP +mirrors.kernel.org: 139.178.88.99 +enoent.linuxfoundation.org: Name or service not known +gnu.org: 209.51.188.116 +.EE +.in +.PP +Here is the program source code +.PP +.\" SRC BEGIN (sync.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int ret; + struct gaicb *reqs[argc \- 1]; + char host[NI_MAXHOST]; + struct addrinfo *res; + + if (argc < 2) { + fprintf(stderr, "Usage: %s HOST...\en", argv[0]); + exit(EXIT_FAILURE); + } + + for (size_t i = 0; i < argc \- 1; i++) { + reqs[i] = malloc(sizeof(*reqs[0])); + if (reqs[i] == NULL) { + perror("malloc"); + exit(EXIT_FAILURE); + } + memset(reqs[i], 0, sizeof(*reqs[0])); + reqs[i]\->ar_name = argv[i + 1]; + } + + ret = getaddrinfo_a(GAI_WAIT, reqs, argc \- 1, NULL); + if (ret != 0) { + fprintf(stderr, "getaddrinfo_a() failed: %s\en", + gai_strerror(ret)); + exit(EXIT_FAILURE); + } + + for (size_t i = 0; i < argc \- 1; i++) { + printf("%s: ", reqs[i]\->ar_name); + ret = gai_error(reqs[i]); + if (ret == 0) { + res = reqs[i]\->ar_result; + + ret = getnameinfo(res\->ai_addr, res\->ai_addrlen, + host, sizeof(host), + NULL, 0, NI_NUMERICHOST); + if (ret != 0) { + fprintf(stderr, "getnameinfo() failed: %s\en", + gai_strerror(ret)); + exit(EXIT_FAILURE); + } + puts(host); + + } else { + puts(gai_strerror(ret)); + } + } + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SS Asynchronous example +This example shows a simple interactive +.BR getaddrinfo_a () +front-end. +The notification facility is not demonstrated. +.PP +An example session might look like this: +.PP +.in +4n +.EX +$ \fB./a.out\fP +> a mirrors.kernel.org enoent.linuxfoundation.org gnu.org +> c 2 +[2] gnu.org: Request not canceled +> w 0 1 +[00] mirrors.kernel.org: Finished +> l +[00] mirrors.kernel.org: 139.178.88.99 +[01] enoent.linuxfoundation.org: Processing request in progress +[02] gnu.org: 209.51.188.116 +> l +[00] mirrors.kernel.org: 139.178.88.99 +[01] enoent.linuxfoundation.org: Name or service not known +[02] gnu.org: 209.51.188.116 +.EE +.in +.PP +The program source is as follows: +.PP +.\" SRC BEGIN (async.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +static struct gaicb **reqs = NULL; +static size_t nreqs = 0; + +static char * +getcmd(void) +{ + static char buf[256]; + + fputs("> ", stdout); fflush(stdout); + if (fgets(buf, sizeof(buf), stdin) == NULL) + return NULL; + + if (buf[strlen(buf) \- 1] == \[aq]\en\[aq]) + buf[strlen(buf) \- 1] = 0; + + return buf; +} + +/* Add requests for specified hostnames. */ +static void +add_requests(void) +{ + size_t nreqs_base = nreqs; + char *host; + int ret; + + while ((host = strtok(NULL, " "))) { + nreqs++; + reqs = realloc(reqs, sizeof(reqs[0]) * nreqs); + + reqs[nreqs \- 1] = calloc(1, sizeof(*reqs[0])); + reqs[nreqs \- 1]\->ar_name = strdup(host); + } + + /* Queue nreqs_base..nreqs requests. */ + + ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base], + nreqs \- nreqs_base, NULL); + if (ret) { + fprintf(stderr, "getaddrinfo_a() failed: %s\en", + gai_strerror(ret)); + exit(EXIT_FAILURE); + } +} + +/* Wait until at least one of specified requests completes. */ +static void +wait_requests(void) +{ + char *id; + int ret; + size_t n; + struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs)); + /* NULL elements are ignored by gai_suspend(). */ + + while ((id = strtok(NULL, " ")) != NULL) { + n = atoi(id); + + if (n >= nreqs) { + printf("Bad request number: %s\en", id); + return; + } + + wait_reqs[n] = reqs[n]; + } + + ret = gai_suspend(wait_reqs, nreqs, NULL); + if (ret) { + printf("gai_suspend(): %s\en", gai_strerror(ret)); + return; + } + + for (size_t i = 0; i < nreqs; i++) { + if (wait_reqs[i] == NULL) + continue; + + ret = gai_error(reqs[i]); + if (ret == EAI_INPROGRESS) + continue; + + printf("[%02zu] %s: %s\en", i, reqs[i]\->ar_name, + ret == 0 ? "Finished" : gai_strerror(ret)); + } +} + +/* Cancel specified requests. */ +static void +cancel_requests(void) +{ + char *id; + int ret; + size_t n; + + while ((id = strtok(NULL, " ")) != NULL) { + n = atoi(id); + + if (n >= nreqs) { + printf("Bad request number: %s\en", id); + return; + } + + ret = gai_cancel(reqs[n]); + printf("[%s] %s: %s\en", id, reqs[atoi(id)]\->ar_name, + gai_strerror(ret)); + } +} + +/* List all requests. */ +static void +list_requests(void) +{ + int ret; + char host[NI_MAXHOST]; + struct addrinfo *res; + + for (size_t i = 0; i < nreqs; i++) { + printf("[%02zu] %s: ", i, reqs[i]\->ar_name); + ret = gai_error(reqs[i]); + + if (!ret) { + res = reqs[i]\->ar_result; + + ret = getnameinfo(res\->ai_addr, res\->ai_addrlen, + host, sizeof(host), + NULL, 0, NI_NUMERICHOST); + if (ret) { + fprintf(stderr, "getnameinfo() failed: %s\en", + gai_strerror(ret)); + exit(EXIT_FAILURE); + } + puts(host); + } else { + puts(gai_strerror(ret)); + } + } +} + +int +main(void) +{ + char *cmdline; + char *cmd; + + while ((cmdline = getcmd()) != NULL) { + cmd = strtok(cmdline, " "); + + if (cmd == NULL) { + list_requests(); + } else { + switch (cmd[0]) { + case \[aq]a\[aq]: + add_requests(); + break; + case \[aq]w\[aq]: + wait_requests(); + break; + case \[aq]c\[aq]: + cancel_requests(); + break; + case \[aq]l\[aq]: + list_requests(); + break; + default: + fprintf(stderr, "Bad command: %c\en", cmd[0]); + break; + } + } + } + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getaddrinfo (3), +.BR inet (3), +.BR lio_listio (3), +.BR hostname (7), +.BR ip (7), +.BR sigevent (7) diff --git a/upstream/opensuse-leap-15-6/man3/getauxval.3 b/upstream/opensuse-leap-15-6/man3/getauxval.3 new file mode 100644 index 00000000..062483ad --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getauxval.3 @@ -0,0 +1,275 @@ +'\" t +.\" Copyright 2012 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" See also https://lwn.net/Articles/519085/ +.\" +.TH getauxval 3 2023-04-03 "Linux man-pages 6.04" +.SH NAME +getauxval \- retrieve a value from the auxiliary vector +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "unsigned long getauxval(unsigned long " type ); +.fi +.SH DESCRIPTION +The +.BR getauxval () +function retrieves values from the auxiliary vector, +a mechanism that the kernel's ELF binary loader +uses to pass certain information to +user space when a program is executed. +.PP +Each entry in the auxiliary vector consists of a pair of values: +a type that identifies what this entry represents, +and a value for that type. +Given the argument +.IR type , +.BR getauxval () +returns the corresponding value. +.PP +The value returned for each +.I type +is given in the following list. +Not all +.I type +values are present on all architectures. +.TP +.B AT_BASE +The base address of the program interpreter (usually, the dynamic linker). +.TP +.B AT_BASE_PLATFORM +A pointer to a string (PowerPC and MIPS only). +On PowerPC, this identifies the real platform; may differ from +.BR AT_PLATFORM "." +On MIPS, +.\" commit e585b768da111f2c2d413de6214e83bbdfee8f22 +this identifies the ISA level (since Linux 5.7). +.TP +.B AT_CLKTCK +The frequency with which +.BR times (2) +counts. +This value can also be obtained via +.IR sysconf(_SC_CLK_TCK) . +.TP +.B AT_DCACHEBSIZE +The data cache block size. +.TP +.B AT_EGID +The effective group ID of the thread. +.TP +.B AT_ENTRY +The entry address of the executable. +.TP +.B AT_EUID +The effective user ID of the thread. +.TP +.B AT_EXECFD +File descriptor of program. +.TP +.B AT_EXECFN +A pointer to a string containing the pathname used to execute the program. +.TP +.B AT_FLAGS +Flags (unused). +.TP +.B AT_FPUCW +Used FPU control word (SuperH architecture only). +This gives some information about the FPU initialization +performed by the kernel. +.TP +.B AT_GID +The real group ID of the thread. +.TP +.B AT_HWCAP +An architecture and ABI dependent bit-mask whose settings +indicate detailed processor capabilities. +The contents of the bit mask are hardware dependent +(for example, see the kernel source file +.I arch/x86/include/asm/cpufeature.h +for details relating to the Intel x86 architecture; the value +returned is the first 32-bit word of the array described there). +A human-readable version of the same information is available via +.IR /proc/cpuinfo . +.TP +.BR AT_HWCAP2 " (since glibc 2.18)" +Further machine-dependent hints about processor capabilities. +.TP +.B AT_ICACHEBSIZE +The instruction cache block size. +.\" .TP +.\" .BR AT_IGNORE +.\" .TP +.\" .BR AT_IGNOREPPC +.\" .TP +.\" .BR AT_NOTELF +.TP +.\" Kernel commit 98a5f361b8625c6f4841d6ba013bbf0e80d08147 +.B AT_L1D_CACHEGEOMETRY +Geometry of the L1 data cache, encoded with the cache line size in bytes +in the bottom 16 bits and the cache associativity in the next 16 bits. +The associativity is such that if N is the 16-bit value, +the cache is N-way set associative. +.TP +.B AT_L1D_CACHESIZE +The L1 data cache size. +.TP +.B AT_L1I_CACHEGEOMETRY +Geometry of the L1 instruction cache, encoded as for +.BR AT_L1D_CACHEGEOMETRY . +.TP +.B AT_L1I_CACHESIZE +The L1 instruction cache size. +.TP +.B AT_L2_CACHEGEOMETRY +Geometry of the L2 cache, encoded as for +.BR AT_L1D_CACHEGEOMETRY . +.TP +.B AT_L2_CACHESIZE +The L2 cache size. +.TP +.B AT_L3_CACHEGEOMETRY +Geometry of the L3 cache, encoded as for +.BR AT_L1D_CACHEGEOMETRY . +.TP +.B AT_L3_CACHESIZE +The L3 cache size. +.TP +.B AT_PAGESZ +The system page size (the same value returned by +.IR sysconf(_SC_PAGESIZE) ). +.TP +.B AT_PHDR +The address of the program headers of the executable. +.TP +.B AT_PHENT +The size of program header entry. +.TP +.B AT_PHNUM +The number of program headers. +.TP +.B AT_PLATFORM +A pointer to a string that identifies the hardware platform +that the program is running on. +The dynamic linker uses this in the interpretation of +.I rpath +values. +.TP +.B AT_RANDOM +The address of sixteen bytes containing a random value. +.TP +.B AT_SECURE +Has a nonzero value if this executable should be treated securely. +Most commonly, a nonzero value indicates that the process is +executing a set-user-ID or set-group-ID binary +(so that its real and effective UIDs or GIDs differ from one another), +or that it gained capabilities by executing +a binary file that has capabilities (see +.BR capabilities (7)). +Alternatively, +a nonzero value may be triggered by a Linux Security Module. +When this value is nonzero, +the dynamic linker disables the use of certain environment variables (see +.BR ld\-linux.so (8)) +and glibc changes other aspects of its behavior. +(See also +.BR secure_getenv (3).) +.TP +.B AT_SYSINFO +The entry point to the system call function in the vDSO. +Not present/needed on all architectures (e.g., absent on x86-64). +.TP +.B AT_SYSINFO_EHDR +The address of a page containing the virtual Dynamic Shared Object (vDSO) +that the kernel creates in order to provide fast implementations of +certain system calls. +.TP +.B AT_UCACHEBSIZE +The unified cache block size. +.TP +.B AT_UID +The real user ID of the thread. +.SH RETURN VALUE +On success, +.BR getauxval () +returns the value corresponding to +.IR type . +If +.I type +is not found, 0 is returned. +.SH ERRORS +.TP +.BR ENOENT " (since glibc 2.19)" +.\" commit b9ab448f980e296eac21ac65f53783967cc6037b +No entry corresponding to +.I type +could be found in the auxiliary vector. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getauxval () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.16. +.SH NOTES +The primary consumer of the information in the auxiliary vector +is the dynamic linker, +.BR ld\-linux.so (8). +The auxiliary vector is a convenient and efficient shortcut +that allows the kernel to communicate a certain set of standard +information that the dynamic linker usually or always needs. +In some cases, the same information could be obtained by system calls, +but using the auxiliary vector is cheaper. +.PP +The auxiliary vector resides just above the argument list and +environment in the process address space. +The auxiliary vector supplied to a program can be viewed by setting the +.B LD_SHOW_AUXV +environment variable when running a program: +.PP +.in +4n +.EX +$ LD_SHOW_AUXV=1 sleep 1 +.EE +.in +.PP +The auxiliary vector of any process can (subject to file permissions) +be obtained via +.IR /proc/ pid /auxv ; +see +.BR proc (5) +for more information. +.SH BUGS +Before the addition of the +.B ENOENT +error in glibc 2.19, +there was no way to unambiguously distinguish the case where +.I type +could not be found from the case where the value corresponding to +.I type +was zero. +.SH SEE ALSO +.BR execve (2), +.BR secure_getenv (3), +.BR vdso (7), +.BR ld\-linux.so (8) diff --git a/upstream/opensuse-leap-15-6/man3/getcchar.3ncurses b/upstream/opensuse-leap-15-6/man3/getcchar.3ncurses new file mode 100644 index 00000000..a23ab6ab --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getcchar.3ncurses @@ -0,0 +1,154 @@ +.\"*************************************************************************** +.\" Copyright (c) 2001-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getcchar.3x,v 1.19 2017/11/18 23:47:37 tom Exp $ +.TH getcchar 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBgetcchar\fP, +\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint getcchar(\fP +.br +.B " const cchar_t *\fIwcval\fP," +.br +.B " wchar_t *\fIwch\fP," +.br +.B " attr_t *\fIattrs\fP," +.br +.B " short *\fIcolor_pair\fP," +.br +.B " void *\fIopts\fP );" +.sp +.B "int setcchar(" +.br +.B " cchar_t *\fIwcval\fP," +.br +.B " const wchar_t *\fIwch\fP," +.br +.B " const attr_t \fIattrs\fP," +.br +.B " short \fIcolor_pair\fP," +.br +.B " void *\fIopts\fP );" +.SH DESCRIPTION +.SS getcchar +.PP +The \fBgetcchar\fP function gets a wide-character string +and rendition from a \fBcchar_t\fP argument. +When \fIwch\fP is not a null pointer, +the \fBgetcchar\fP function does the following: +.bP +Extracts information from a \fBcchar_t\fP value \fIwcval\fP +.bP +Stores the character attributes in the location pointed to by \fIattrs\fP +.bP +Stores the color-pair in the location pointed to by \fIcolor_pair\fP +.bP +Stores the wide-character string, +characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP. +.PP +When +\fIwch\fP +is a null pointer, the +\fBgetcchar\fP +function does the following: +.bP +Obtains the number of wide characters pointed to by \fIwcval\fP +.bP +Does not change the data referenced by +\fIattrs\fP +or +\fIcolor_pair\fP +.SS setcchar +.PP +The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP +by using: +.bP +The character attributes in +\fIattrs\fP +.bP +The color pair in +\fIcolor_pair\fP +.bP +The wide-character string pointed to by \fIwch\fP. +The string must be L'\\0' terminated, +contain at most one spacing character, +which must be the first. +.IP +Up to \fBCCHARW_MAX\fP\-1 nonspacing characters may follow. +Additional nonspacing characters are ignored. +.IP +The string may contain a single control character instead. +In that case, no nonspacing characters are allowed. +.SH EXTENSIONS +.PP +X/Open Curses documents the \fIopts\fP argument as reserved for future use, +saying that it must be null. +This implementation +uses that parameter in ABI 6 for the functions which have a color-pair +parameter to support extended color pairs: +.bP +For functions which modify the color, e.g., \fBsetcchar\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to set the color pair instead of the \fBshort\fP pair parameter. +.bP +For functions which retrieve the color, e.g., \fBgetcchar\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to retrieve the color pair as an \fBint\fP value, +in addition retrieving it via the standard pointer to \fBshort\fP parameter. +.SH NOTES +.PP +The \fIwcval\fP argument may be a value generated by a call to +\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument. +If \fIwcval\fP is constructed by any other means, the effect is unspecified. +.SH RETURN VALUE +.PP +When \fIwch\fP is a null pointer, +\fBgetcchar\fP returns the number of wide characters referenced by +\fIwcval\fP, +including one for a trailing null. +.PP +When \fIwch\fP is not a null pointer, +\fBgetcchar\fP returns \fBOK\fP upon successful completion, +and \fBERR\fP otherwise. +.PP +Upon successful completion, \fBsetcchar\fP returns \fBOK\fP. +Otherwise, it returns \fBERR\fP. +.SH SEE ALSO +.PP +Functions: +\fBattr\fR(3NCURSES), +\fBcolor\fR(3NCURSES), +\fBncurses\fR(3NCURSES), +\fBwcwidth\fR(3). diff --git a/upstream/opensuse-leap-15-6/man3/getch.3ncurses b/upstream/opensuse-leap-15-6/man3/getch.3ncurses new file mode 100644 index 00000000..1596e983 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getch.3ncurses @@ -0,0 +1,407 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getch.3x,v 1.51 2017/11/21 00:45:48 tom Exp $ +.TH getch 3NCURSES "" +.na +.hy 0 +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBgetch\fR, +\fBwgetch\fR, +\fBmvgetch\fR, +\fBmvwgetch\fR, +\fBungetch\fR, +\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint getch(void);\fR +.br +\fBint wgetch(WINDOW *\fP\fIwin);\fR +.br +\fBint mvgetch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBint mvwgetch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBint ungetch(int \fP\fIch\fP\fB);\fR +.br +\fBint has_key(int \fP\fIch\fP\fB);\fR +.br +.SH DESCRIPTION +.SS Reading characters +The \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR and \fBmvwgetch\fR, routines read +a character from the window. +In no-delay mode, if no input is waiting, the value \fBERR\fR is returned. +In delay mode, the program waits until the system +passes text through to the program. +Depending on the setting of \fBcbreak\fR, +this is after one character (cbreak mode), +or after the first newline (nocbreak mode). +In half-delay mode, +the program waits until a character is typed or the +specified timeout has been reached. +.PP +If \fBecho\fR is enabled, and the window is not a pad, +then the character will also be echoed into the +designated window according to the following rules: +.bP +If the character is the current erase character, left arrow, or backspace, +the cursor is moved one space to the left and that screen position is erased +as if \fBdelch\fR had been called. +.bP +If the character value is any other \fBKEY_\fR define, the user is alerted +with a \fBbeep\fR call. +.bP +If the character is a carriage-return, +and if \fBnl\fP is enabled, +it is translated to a line-feed after echoing. +.bP +Otherwise the character is simply output to the screen. +.PP +If the window is not a pad, and it has been moved or modified since the last +call to \fBwrefresh\fR, \fBwrefresh\fR will be called before another character +is read. +.SS Keypad mode +.PP +If \fBkeypad\fR is \fBTRUE\fR, and a function key is pressed, the token for +that function key is returned instead of the raw characters: +.bP +The predefined function +keys are listed in \fB\fR as macros with values outside the range +of 8-bit characters. +Their names begin with \fBKEY_\fR. +.bP +Other (user-defined) function keys which may be defined using \fBdefine_key\fP(3X) +have no names, but also are expected to have values outside the range of +8-bit characters. +.PP +Thus, a variable +intended to hold the return value of a function key must be of short size or +larger. +.PP +When a character that could be the beginning of a function key is received +(which, on modern terminals, means an escape character), +\fBcurses\fR sets a timer. +If the remainder of the sequence does not come in within the designated +time, the character is passed through; +otherwise, the function key value is returned. +For this reason, many terminals experience a delay between the time +a user presses the escape key and the escape is returned to the program. +.PP +In \fBncurses\fP, the timer normally expires after the value in \fBESCDELAY\fP (see \fBcurs_variables\fP(3X)). +If \fBnotimeout\fP is \fBTRUE\fP, the timer does not expire; +it is an infinite (or very large) value. +Because function keys usually begin with an escape character, +the terminal may appear to hang in notimeout mode after pressing the escape key +until another key is pressed. +.SS Ungetting characters +.PP +The \fBungetch\fR routine places \fIch\fR back onto the input queue to be +returned by the next call to \fBwgetch\fR. +There is just one input queue for all windows. +.PP +.SS Predefined key-codes +The following special keys are defined in \fB\fR. +.bP +Except for the special case \fBKEY_RESIZE\fP, +it is necessary to enable \fBkeypad\fR for \fBgetch\fP to return these codes. +.bP +Not all of these are necessarily supported on any particular terminal. +.bP +The naming convention may seem obscure, with some apparent +misspellings (such as "RSUME" for "resume"). +The names correspond to the long terminfo capability names for the keys, +and were defined long ago, in the 1980s. +.PP +.TS +center tab(/) ; +l l . +\fIName\fR/\fIKey\fR \fIname\fR +_ +KEY_BREAK/Break key +KEY_DOWN/The four arrow keys ... +KEY_UP +KEY_LEFT +KEY_RIGHT +KEY_HOME/Home key (upward+left arrow) +KEY_BACKSPACE/Backspace +KEY_F0/T{ +Function keys; space for 64 keys is reserved. +T} +KEY_F(\fIn\fR)/T{ +For 0 \(<= \fIn\fR \(<= 63 +T} +KEY_DL/Delete line +KEY_IL/Insert line +KEY_DC/Delete character +KEY_IC/Insert char or enter insert mode +KEY_EIC/Exit insert char mode +KEY_CLEAR/Clear screen +KEY_EOS/Clear to end of screen +KEY_EOL/Clear to end of line +KEY_SF/Scroll 1 line forward +KEY_SR/Scroll 1 line backward (reverse) +KEY_NPAGE/Next page +KEY_PPAGE/Previous page +KEY_STAB/Set tab +KEY_CTAB/Clear tab +KEY_CATAB/Clear all tabs +KEY_ENTER/Enter or send +KEY_SRESET/Soft (partial) reset +KEY_RESET/Reset or hard reset +KEY_PRINT/Print or copy +KEY_LL/Home down or bottom (lower left) +KEY_A1/Upper left of keypad +KEY_A3/Upper right of keypad +KEY_B2/Center of keypad +KEY_C1/Lower left of keypad +KEY_C3/Lower right of keypad +KEY_BTAB/Back tab key +KEY_BEG/Beg(inning) key +KEY_CANCEL/Cancel key +KEY_CLOSE/Close key +KEY_COMMAND/Cmd (command) key +KEY_COPY/Copy key +KEY_CREATE/Create key +KEY_END/End key +KEY_EXIT/Exit key +KEY_FIND/Find key +KEY_HELP/Help key +KEY_MARK/Mark key +KEY_MESSAGE/Message key +KEY_MOUSE/Mouse event read +KEY_MOVE/Move key +KEY_NEXT/Next object key +KEY_OPEN/Open key +KEY_OPTIONS/Options key +KEY_PREVIOUS/Previous object key +KEY_REDO/Redo key +KEY_REFERENCE/Ref(erence) key +KEY_REFRESH/Refresh key +KEY_REPLACE/Replace key +KEY_RESIZE/Screen resized +KEY_RESTART/Restart key +KEY_RESUME/Resume key +KEY_SAVE/Save key +KEY_SBEG/Shifted beginning key +KEY_SCANCEL/Shifted cancel key +KEY_SCOMMAND/Shifted command key +KEY_SCOPY/Shifted copy key +KEY_SCREATE/Shifted create key +KEY_SDC/Shifted delete char key +KEY_SDL/Shifted delete line key +KEY_SELECT/Select key +KEY_SEND/Shifted end key +KEY_SEOL/Shifted clear line key +KEY_SEXIT/Shifted exit key +KEY_SFIND/Shifted find key +KEY_SHELP/Shifted help key +KEY_SHOME/Shifted home key +KEY_SIC/Shifted input key +KEY_SLEFT/Shifted left arrow key +KEY_SMESSAGE/Shifted message key +KEY_SMOVE/Shifted move key +KEY_SNEXT/Shifted next key +KEY_SOPTIONS/Shifted options key +KEY_SPREVIOUS/Shifted prev key +KEY_SPRINT/Shifted print key +KEY_SREDO/Shifted redo key +KEY_SREPLACE/Shifted replace key +KEY_SRIGHT/Shifted right arrow +KEY_SRSUME/Shifted resume key +KEY_SSAVE/Shifted save key +KEY_SSUSPEND/Shifted suspend key +KEY_SUNDO/Shifted undo key +KEY_SUSPEND/Suspend key +KEY_UNDO/Undo key +.TE +.PP +Keypad is arranged like this: +.br +.TS +center allbox tab(/) ; +c c c . +\fBA1\fR/\fBup\fR/\fBA3\fR +\fBleft\fR/\fBB2\fR/\fBright\fR +\fBC1\fR/\fBdown\fR/\fBC3\fR +.TE +.sp +A few of these predefined values do \fInot\fP correspond to a real key: +.bP +.B KEY_RESIZE +is returned when the \fBSIGWINCH\fP signal has been detected +(see \fBinitscr\fP(3X) and \fBresizeterm\fR(3NCURSES)). +This code is returned whether or not \fBkeypad\fP has been enabled. +.bP +.B KEY_MOUSE +is returned for mouse-events (see \fBmouse\fR(3NCURSES)). +This code relies upon whether or not \fBkeypad\fP(3X) has been enabled, +because (e.g., with \fIxterm\fP mouse prototocol) ncurses must +read escape sequences, +just like a function key. +.SS Testing key-codes +.PP +The \fBhas_key\fR routine takes a key-code value from the above list, and +returns \fBTRUE\fP or \fBFALSE\fP according to whether +the current terminal type recognizes a key with that value. +.PP +The library also supports these extensions: +.RS 3 +.TP 5 +.B define_key +defines a key-code for a given string (see \fBdefine_key\fP(3X)). +.TP 5 +.B key_defined +checks if there is a key-code defined for a given +string (see \fBkey_defined\fP(3X)). +.RE +.PP +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR (\fBOK\fR in the case of \fBungetch\fP) upon successful +completion. +.RS 3 +.TP 5 +\fBungetch\fP +returns \fBERR\fP +if there is no more room in the FIFO. +.TP +\fBwgetch\fP +returns \fBERR\fP +if the window pointer is null, or +if its timeout expires without having any data, or +if the execution was interrupted by a signal (\fBerrno\fR will be set to +\fBEINTR\fR). +.RE +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Use of the escape key by a programmer for a single character function is +discouraged, as it will cause a delay of up to one second while the +keypad code looks for a following function-key sequence. +.PP +Some keys may be the same as commonly used control +keys, e.g., \fBKEY_ENTER\fP versus control/M, \fBKEY_BACKSPACE\fP versus control/H. +Some curses implementations may differ according to whether they +treat these control keys specially (and ignore the terminfo), or +use the terminfo definitions. +\fBNcurses\fR uses the terminfo definition. +If it says that \fBKEY_ENTER\fP is control/M, +\fBgetch\fR will return \fBKEY_ENTER\fP +when you press control/M. +.PP +Generally, \fBKEY_ENTER\fP denotes the character(s) sent by the \fIEnter\fP +key on the numeric keypad: +.bP +the terminal description lists the most useful keys, +.bP +the \fIEnter\fP key on the regular keyboard is already handled by +the standard ASCII characters for carriage-return and line-feed, +.bP +depending on whether \fBnl\fP or \fBnonl\fP was called, +pressing "Enter" on the regular keyboard may return either a carriage-return +or line-feed, and finally +.bP +"Enter or send" is the standard description for this key. +.PP +When using \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, or +\fBmvwgetch\fR, nocbreak mode (\fBnocbreak\fR) and echo mode +(\fBecho\fR) should not be used at the same time. +Depending on the +state of the tty driver when each character is typed, the program may +produce undesirable results. +.PP +Note that \fBgetch\fR, \fBmvgetch\fR, and \fBmvwgetch\fR may be macros. +.PP +Historically, the set of keypad macros was largely defined by the extremely +function-key-rich keyboard of the AT&T 7300, aka 3B1, aka Safari 4. +Modern +personal computers usually have only a small subset of these. +IBM PC-style +consoles typically support little more than \fBKEY_UP\fR, \fBKEY_DOWN\fR, +\fBKEY_LEFT\fR, \fBKEY_RIGHT\fR, \fBKEY_HOME\fR, \fBKEY_END\fR, +\fBKEY_NPAGE\fR, \fBKEY_PPAGE\fR, and function keys 1 through 12. +The Ins key +is usually mapped to \fBKEY_IC\fR. +.SH PORTABILITY +The *get* functions are described in the XSI Curses standard, Issue 4. +They +read single-byte characters only. +The standard specifies that they return +\fBERR\fR on failure, but specifies no error conditions. +.PP +The echo behavior of these functions on input of \fBKEY_\fR or backspace +characters was not specified in the SVr4 documentation. +This description is +adopted from the XSI Curses standard. +.PP +The behavior of \fBgetch\fR and friends in the presence of handled signals is +unspecified in the SVr4 and XSI Curses documentation. +Under historical curses +implementations, it varied depending on whether the operating system's +implementation of handled signal receipt interrupts a \fBread\fR(2) call in +progress or not, and also (in some implementations) depending on whether an +input timeout or non-blocking mode has been set. +.PP +\fBKEY_MOUSE\fP is mentioned in XSI Curses, along with a few related +terminfo capabilities, but no higher-level functions use the feature. +The implementation in ncurses is an extension. +.PP +\fBKEY_RESIZE\fP is an extension first implemented for ncurses. +NetBSD curses later added this extension. +.PP +Programmers concerned about portability should be prepared for either of two +cases: (a) signal receipt does not interrupt \fBgetch\fR; (b) signal receipt +interrupts \fBgetch\fR and causes it to return \fBERR\fP with \fBerrno\fR set to +\fBEINTR\fR. +.PP +The \fBhas_key\fR function is unique to \fBncurses\fR. +We recommend that +any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinopts\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBmouse\fR(3NCURSES), +\fBmove\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBresizeterm\fR(3NCURSES). +.PP +Comparable functions in the wide-character (ncursesw) library are +described in +\fBget_wch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/getcontext.3 b/upstream/opensuse-leap-15-6/man3/getcontext.3 new file mode 100644 index 00000000..e8189169 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getcontext.3 @@ -0,0 +1,204 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getcontext 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getcontext, setcontext \- get or set the user context +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getcontext(ucontext_t *" ucp ); +.BI "int setcontext(const ucontext_t *" ucp ); +.fi +.SH DESCRIPTION +In a System V-like environment, one has the two types +.I mcontext_t +and +.I ucontext_t +defined in +.I +and the four functions +.BR getcontext (), +.BR setcontext (), +.BR makecontext (3), +and +.BR swapcontext (3) +that allow user-level context switching between multiple +threads of control within a process. +.PP +The +.I mcontext_t +type is machine-dependent and opaque. +The +.I ucontext_t +type is a structure that has at least +the following fields: +.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 +with +.I sigset_t +and +.I stack_t +defined in +.IR . +Here +.I uc_link +points to the context that will be resumed +when the current context terminates (in case the current context +was created using +.BR makecontext (3)), +.I uc_sigmask +is the +set of signals blocked in this context (see +.BR sigprocmask (2)), +.I uc_stack +is the stack used by this context (see +.BR sigaltstack (2)), +and +.I uc_mcontext +is the +machine-specific representation of the saved context, +that includes the calling thread's machine registers. +.PP +The function +.BR getcontext () +initializes the structure +pointed to by +.I ucp +to the currently active context. +.PP +The function +.BR setcontext () +restores the user context +pointed to by +.IR ucp . +A successful call does not return. +The context should have been obtained by a call of +.BR getcontext (), +or +.BR makecontext (3), +or received as the third argument to a signal +handler (see the discussion of the +.B SA_SIGINFO +flag in +.BR sigaction (2)). +.PP +If the context was obtained by a call of +.BR getcontext (), +program execution continues as if this call just returned. +.PP +If the context was obtained by a call of +.BR makecontext (3), +program execution continues by a call to the function +.I func +specified as the second argument of that call to +.BR makecontext (3). +When the function +.I func +returns, we continue with the +.I uc_link +member of the structure +.I ucp +specified as the +first argument of that call to +.BR makecontext (3). +When this member is NULL, the thread exits. +.PP +If the context was obtained by a call to a signal handler, +then old standard text says that "program execution continues with the +program instruction following the instruction interrupted +by the signal". +However, this sentence was removed in SUSv2, +and the present verdict is "the result is unspecified". +.SH RETURN VALUE +When successful, +.BR getcontext () +returns 0 and +.BR setcontext () +does not return. +On error, both return \-1 and set +.I errno +to indicate the error. +.SH ERRORS +None defined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getcontext (), +.BR setcontext () +T} Thread safety MT-Safe race:ucp +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SUSv2, POSIX.1-2001. +.PP +POSIX.1-2008 removes these functions, +citing portability issues, and +recommending that applications be rewritten to use POSIX threads instead. +.SH NOTES +The earliest incarnation of this mechanism was the +.BR setjmp (3)/\c +.BR longjmp (3) +mechanism. +Since that does not define +the handling of the signal context, the next stage was the +.BR sigsetjmp (3)/\c +.BR siglongjmp (3) +pair. +The present mechanism gives much more control. +On the other hand, +there is no easy way to detect whether a return from +.BR getcontext () +is from the first call, or via a +.BR setcontext () +call. +The user has to invent their own bookkeeping device, and a register +variable won't do since registers are restored. +.PP +When a signal occurs, the current user context is saved and +a new context is created by the kernel for the signal handler. +Do not leave the handler using +.BR longjmp (3): +it is undefined what would happen with contexts. +Use +.BR siglongjmp (3) +or +.BR setcontext () +instead. +.SH SEE ALSO +.BR sigaction (2), +.BR sigaltstack (2), +.BR sigprocmask (2), +.BR longjmp (3), +.BR makecontext (3), +.BR sigsetjmp (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/getcwd.3 b/upstream/opensuse-leap-15-6/man3/getcwd.3 new file mode 100644 index 00000000..f410f9ce --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getcwd.3 @@ -0,0 +1,312 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Wed Jul 21 22:35:42 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 18 Mar 1996 by Martin Schulze (joey@infodrom.north.de): +.\" Corrected description of getwd(). +.\" Modified Sat Aug 21 12:32:12 MET 1999 by aeb - applied fix by aj +.\" Modified Mon Dec 11 13:32:51 MET 2000 by aeb +.\" Modified Thu Apr 22 03:49:15 CEST 2002 by Roger Luethi +.\" +.TH getcwd 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getcwd, getwd, get_current_dir_name \- get current working directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *getcwd(char " buf [. size "], size_t " size ); +.B "char *get_current_dir_name(void);" +.PP +.BI "[[deprecated]] char *getwd(char " buf [PATH_MAX]); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR get_current_dir_name (): +.nf + _GNU_SOURCE +.fi +.PP +.BR getwd (): +.nf + Since glibc 2.12: + (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE + Before glibc 2.12: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +These functions return a null-terminated string containing an +absolute pathname that is the current working directory of +the calling process. +The pathname is returned as the function result and via the argument +.IR buf , +if present. +.PP +The +.BR getcwd () +function copies an absolute pathname of the current working directory +to the array pointed to by +.IR buf , +which is of length +.IR size . +.PP +If the length of the absolute pathname of the current working directory, +including the terminating null byte, exceeds +.I size +bytes, NULL is returned, and +.I errno +is set to +.BR ERANGE ; +an application should check for this error, and allocate a larger +buffer if necessary. +.PP +As an extension to the POSIX.1-2001 standard, glibc's +.BR getcwd () +allocates the buffer dynamically using +.BR malloc (3) +if +.I buf +is NULL. +In this case, the allocated buffer has the length +.I size +unless +.I size +is zero, when +.I buf +is allocated as big as necessary. +The caller should +.BR free (3) +the returned buffer. +.PP +.BR get_current_dir_name () +will +.BR malloc (3) +an array big enough to hold the absolute pathname of +the current working directory. +If the environment +variable +.B PWD +is set, and its value is correct, then that value will be returned. +The caller should +.BR free (3) +the returned buffer. +.PP +.BR getwd () +does not +.BR malloc (3) +any memory. +The +.I buf +argument should be a pointer to an array at least +.B PATH_MAX +bytes long. +If the length of the absolute pathname of the current working directory, +including the terminating null byte, exceeds +.B PATH_MAX +bytes, NULL is returned, and +.I errno +is set to +.BR ENAMETOOLONG . +(Note that on some systems, +.B PATH_MAX +may not be a compile-time constant; +furthermore, its value may depend on the filesystem, see +.BR pathconf (3).) +For portability and security reasons, use of +.BR getwd () +is deprecated. +.SH RETURN VALUE +On success, these functions return a pointer to a string containing +the pathname of the current working directory. +In the case of +.BR getcwd () +and +.BR getwd () +this is the same value as +.IR buf . +.PP +On failure, these functions return NULL, and +.I errno +is set to indicate the error. +The contents of the array pointed to by +.I buf +are undefined on error. +.SH ERRORS +.TP +.B EACCES +Permission to read or search a component of the filename was denied. +.TP +.B EFAULT +.I buf +points to a bad address. +.TP +.B EINVAL +The +.I size +argument is zero and +.I buf +is not a null pointer. +.TP +.B EINVAL +.BR getwd (): +.I buf +is NULL. +.TP +.B ENAMETOOLONG +.BR getwd (): +The size of the null-terminated absolute pathname string exceeds +.B PATH_MAX +bytes. +.TP +.B ENOENT +The current working directory has been unlinked. +.TP +.B ENOMEM +Out of memory. +.TP +.B ERANGE +The +.I size +argument is less than the length of the absolute pathname of the +working directory, including the terminating null byte. +You need to allocate a bigger array and try again. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getcwd (), +.BR getwd () +T} Thread safety MT-Safe +T{ +.BR get_current_dir_name () +T} Thread safety MT-Safe env +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX.1-2001 leaves the behavior of +.BR getcwd () +unspecified if +.I buf +is NULL. +.PP +POSIX.1-2001 +does not define any errors for +.BR getwd (). +.SH VERSIONS +.SS C library/kernel differences +On Linux, the kernel provides a +.BR getcwd () +system call, which the functions described in this page will use if possible. +The system call takes the same arguments as the library function +of the same name, but is limited to returning at most +.B PATH_MAX +bytes. +(Before Linux 3.12, +.\" commit 3272c544da48f8915a0e34189182aed029bd0f2b +the limit on the size of the returned pathname was the system page size. +On many architectures, +.B PATH_MAX +and the system page size are both 4096 bytes, +but a few architectures have a larger page size.) +If the length of the pathname of the current working directory +exceeds this limit, then the system call fails with the error +.BR ENAMETOOLONG . +In this case, the library functions fall back to +a (slower) alternative implementation that returns the full pathname. +.PP +Following a change in Linux 2.6.36, +.\" commit 8df9d1a4142311c084ffeeacb67cd34d190eff74 +the pathname returned by the +.BR getcwd () +system call will be prefixed with the string "(unreachable)" +if the current directory is not below the root directory of the current +process (e.g., because the process set a new filesystem root using +.BR chroot (2) +without changing its current directory into the new root). +Such behavior can also be caused by an unprivileged user by changing +the current directory into another mount namespace. +When dealing with pathname from untrusted sources, callers of the +functions described in this page +should consider checking whether the returned pathname starts +with '/' or '(' to avoid misinterpreting an unreachable path +as a relative pathname. +.SH STANDARDS +.TP +.BR getcwd () +POSIX.1-2008. +.TP +.BR get_current_dir_name () +GNU. +.TP +.BR getwd () +None. +.SH HISTORY +.TP +.BR getcwd () +POSIX.1-2001. +.TP +.BR getwd () +POSIX.1-2001, but marked LEGACY. +Removed in POSIX.1-2008. +Use +.BR getcwd () +instead. +.PP +Under Linux, these functions make use of the +.BR getcwd () +system call (available since Linux 2.1.92). +On older systems they would query +.IR /proc/self/cwd . +If both system call and proc filesystem are missing, a +generic implementation is called. +Only in that case can +these calls fail under Linux with +.BR EACCES . +.SH NOTES +These functions are often used to save the location of the current working +directory for the purpose of returning to it later. +Opening the current +directory (".") and calling +.BR fchdir (2) +to return is usually a faster and more reliable alternative when sufficiently +many file descriptors are available, especially on platforms other than Linux. +.SH BUGS +Since the Linux 2.6.36 change that added "(unreachable)" in the +circumstances described above, the glibc implementation of +.BR getcwd () +has failed to conform to POSIX and returned a relative pathname when the API +contract requires an absolute pathname. +With glibc 2.27 onwards this is corrected; +calling +.BR getcwd () +from such a pathname will now result in failure with +.BR ENOENT . +.SH SEE ALSO +.BR pwd (1), +.BR chdir (2), +.BR fchdir (2), +.BR open (2), +.BR unlink (2), +.BR free (3), +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/getdate.3 b/upstream/opensuse-leap-15-6/man3/getdate.3 new file mode 100644 index 00000000..c12c2a7d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getdate.3 @@ -0,0 +1,317 @@ +'\" t +.\" Copyright 2001 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified, 2001-12-26, aeb +.\" 2008-09-07, mtk, Various rewrites; added an example program. +.\" +.TH getdate 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getdate, getdate_r \- convert a date-plus-time string to broken-down time +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "struct tm *getdate(const char *" string ); +.PP +.B "extern int getdate_err;" +.PP +.BI "int getdate_r(const char *restrict " string ", struct tm *restrict " res ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getdate (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.PP +.BR getdate_r (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The function +.BR getdate () +converts a string representation of a date and time, +contained in the buffer pointed to by +.IR string , +into a broken-down time. +The broken-down time is stored in a +.I tm +structure, and a pointer to this +structure is returned as the function result. +This +.I tm +structure is allocated in static storage, +and consequently it will be overwritten by further calls to +.BR getdate (). +.PP +In contrast to +.BR strptime (3), +(which has a +.I format +argument), +.BR getdate () +uses the formats found in the file +whose full pathname is given in the environment variable +.BR DATEMSK . +The first line in the file that matches the given input string +is used for the conversion. +.PP +The matching is done case insensitively. +Superfluous whitespace, either in the pattern or in the string to +be converted, is ignored. +.PP +The conversion specifications that a pattern can contain are those given for +.BR strptime (3). +One more conversion specification is specified in POSIX.1-2001: +.TP +.B %Z +Timezone name. +.\" 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. +This is not implemented in glibc. +.PP +When +.B %Z +is given, the structure containing the broken-down time +is initialized with values corresponding to the current +time in the given timezone. +Otherwise, the structure is initialized to the broken-down time +corresponding to the current local time (as by a call to +.BR localtime (3)). +.PP +When only the day of the week is given, +the day is taken to be the first such day +on or after today. +.PP +When only the month is given (and no year), the month is taken to +be the first such month equal to or after the current month. +If no day is given, it is the first day of the month. +.PP +When no hour, minute, and second are given, the current +hour, minute, and second are taken. +.PP +If no date is given, but we know the hour, then that hour is taken +to be the first such hour equal to or after the current hour. +.PP +.BR getdate_r () +is a GNU extension that provides a reentrant version of +.BR getdate (). +Rather than using a global variable to report errors and a static buffer +to return the broken down time, +it returns errors via the function result value, +and returns the resulting broken-down time in the +caller-allocated buffer pointed to by the argument +.IR res . +.SH RETURN VALUE +When successful, +.BR getdate () +returns a pointer to a +.IR "struct tm" . +Otherwise, it returns NULL and sets the global variable +.I getdate_err +to one of the error numbers shown below. +Changes to +.I errno +are unspecified. +.PP +On success +.BR getdate_r () +returns 0; +on error it returns one of the error numbers shown below. +.SH ERRORS +The following errors are returned via +.I getdate_err +(for +.BR getdate ()) +or as the function result (for +.BR getdate_r ()): +.TP 4n +.B 1 +The +.B DATEMSK +environment variable is not defined, or its value is an empty string. +.TP +.B 2 +The template file specified by +.B DATEMSK +cannot be opened for reading. +.TP +.B 3 +Failed to get file status information. +.\" stat() +.TP +.B 4 +The template file is not a regular file. +.TP +.B 5 +An error was encountered while reading the template file. +.TP +.B 6 +Memory allocation failed (not enough memory available). +.\" Error 6 doesn't seem to occur in glibc +.TP +.B 7 +There is no line in the file that matches the input. +.TP +.B 8 +Invalid input specification. +.SH ENVIRONMENT +.TP +.B DATEMSK +File containing format patterns. +.TP +.BR TZ ", " LC_TIME +Variables used by +.BR strptime (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getdate () +T} Thread safety T{ +MT-Unsafe race:getdate env locale +T} +T{ +.BR getdate_r () +T} Thread safety T{ +MT-Safe env locale +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The POSIX.1 specification for +.BR strptime (3) +contains conversion specifications using the +.B %E +or +.B %O +modifier, while such specifications are not given for +.BR getdate (). +In glibc, +.BR getdate () +is implemented using +.BR strptime (3), +so that precisely the same conversions are supported by both. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The program below calls +.BR getdate () +for each of its command-line arguments, +and for each call displays the values in the fields of the returned +.I tm +structure. +The following shell session demonstrates the operation of the program: +.PP +.in +4n +.EX +.RB "$" " TFILE=$PWD/tfile" +.RB "$" " echo \[aq]%A\[aq] > $TFILE " " # Full name of the day of the week" +.RB "$" " echo \[aq]%T\[aq] >> $TFILE" " # Time (HH:MM:SS)" +.RB "$" " echo \[aq]%F\[aq] >> $TFILE" " # ISO date (YYYY\-MM\-DD)" +.RB "$" " date" +.RB "$" " export DATEMSK=$TFILE" +.RB "$" " ./a.out Tuesday \[aq]2009\-12\-28\[aq] \[aq]12:22:33\[aq]" +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 Program source +\& +.\" SRC BEGIN (getdate.c) +.EX +#define _GNU_SOURCE +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + struct tm *tmp; + + for (size_t j = 1; j < argc; j++) { + tmp = getdate(argv[j]); + + if (tmp == NULL) { + printf("Call %zu failed; getdate_err = %d\en", + j, getdate_err); + continue; + } + + printf("Call %zu (\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 +.\" SRC END +.SH SEE ALSO +.BR time (2), +.BR localtime (3), +.BR setlocale (3), +.BR strftime (3), +.BR strptime (3) diff --git a/upstream/opensuse-leap-15-6/man3/getdirentries.3 b/upstream/opensuse-leap-15-6/man3/getdirentries.3 new file mode 100644 index 00000000..d8734af4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getdirentries.3 @@ -0,0 +1,83 @@ +'\" t +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) +.\" Portions extracted from /usr/include/dirent.h are: +.\" Copyright 1991, 1992 Free Software Foundation +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getdirentries 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getdirentries \- get directory entries in a filesystem-independent format +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "ssize_t getdirentries(int " fd ", char " buf "[restrict ." nbytes "], \ +size_t " nbytes , +.BI " off_t *restrict " basep ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getdirentries (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +Read directory entries from the directory specified by +.I fd +into +.IR buf . +At most +.I nbytes +are read. +Reading starts at offset +.IR *basep , +and +.I *basep +is updated with the new position after reading. +.SH RETURN VALUE +.BR getdirentries () +returns the number of bytes read or zero when at the end of the directory. +If an error occurs, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +See the Linux library source code for details. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getdirentries () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH NOTES +Use +.BR opendir (3) +and +.BR readdir (3) +instead. +.SH SEE ALSO +.BR lseek (2), +.BR open (2) diff --git a/upstream/opensuse-leap-15-6/man3/getdtablesize.3 b/upstream/opensuse-leap-15-6/man3/getdtablesize.3 new file mode 100644 index 00000000..975f498e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getdtablesize.3 @@ -0,0 +1,91 @@ +'\" t +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified 2002-04-15 by Roger Luethi and aeb +.\" +.TH getdtablesize 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getdtablesize \- get file descriptor table size +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B int getdtablesize(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getdtablesize (): +.nf + Since glibc 2.20: + _DEFAULT_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) + glibc 2.12 to glibc 2.19: + _BSD_SOURCE || ! (_POSIX_C_SOURCE >= 200112L) + Before glibc 2.12: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +.BR getdtablesize () +returns the maximum number of files a process can have open, +one more than the largest possible value for a file descriptor. +.SH RETURN VALUE +The current limit on the number of open files per process. +.SH ERRORS +On Linux, +.BR getdtablesize () +can return any of the errors described for +.BR getrlimit (2); +see NOTES below. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getdtablesize () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The glibc version of +.BR getdtablesize () +calls +.BR getrlimit (2) +and returns the current +.B RLIMIT_NOFILE +limit, or +.B OPEN_MAX +when that fails. +.\" The libc4 and libc5 versions return +.\" .B OPEN_MAX +.\" (set to 256 since Linux 0.98.4). +.PP +Portable applications should employ +.I sysconf(_SC_OPEN_MAX) +instead of this call. +.SH STANDARDS +None. +.SH HISTORY +SVr4, 4.4BSD +(first appeared in 4.2BSD). +.SH SEE ALSO +.BR close (2), +.BR dup (2), +.BR getrlimit (2), +.BR open (2) diff --git a/upstream/opensuse-leap-15-6/man3/getentropy.3 b/upstream/opensuse-leap-15-6/man3/getentropy.3 new file mode 100644 index 00000000..8165c7f6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getentropy.3 @@ -0,0 +1,103 @@ +.\" Copyright (C) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getentropy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getentropy \- fill a buffer with random bytes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getentropy(void " buffer [. length "], size_t " length ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getentropy (): +.nf + _DEFAULT_SOURCE +.fi +.SH DESCRIPTION +The +.BR getentropy () +function writes +.I length +bytes of high-quality random data to the buffer starting +at the location pointed to by +.IR buffer . +The maximum permitted value for the +.I length +argument is 256. +.PP +A successful call to +.BR getentropy () +always provides the requested number of bytes of entropy. +.SH RETURN VALUE +On success, this function returns zero. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EFAULT +Part or all of the buffer specified by +.I buffer +and +.I length +is not in valid addressable memory. +.TP +.B EIO +.I length +is greater than 256. +.TP +.B EIO +An unspecified error occurred while trying to overwrite +.I buffer +with random data. +.TP +.B ENOSYS +This kernel version does not implement the +.BR getrandom (2) +system call required to implement this function. +.SH STANDARDS +None. +.SH HISTORY +glibc 2.25. +OpenBSD. +.SH NOTES +The +.BR getentropy () +function is implemented using +.BR getrandom (2). +.PP +Whereas the glibc wrapper makes +.BR getrandom (2) +a cancelation point, +.BR getentropy () +is not a cancelation point. +.PP +.BR getentropy () +is also declared in +.BR . +(No feature test macro need be defined to obtain the declaration from +that header file.) +.PP +A call to +.BR getentropy () +may block if the system has just booted and the kernel has +not yet collected enough randomness to initialize the entropy pool. +In this case, +.BR getentropy () +will keep blocking even if a signal is handled, +and will return only once the entropy pool has been initialized. +.SH SEE ALSO +.BR getrandom (2), +.BR urandom (4), +.BR random (7) diff --git a/upstream/opensuse-leap-15-6/man3/getenv.3 b/upstream/opensuse-leap-15-6/man3/getenv.3 new file mode 100644 index 00000000..89a6b26d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getenv.3 @@ -0,0 +1,144 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2007, 2012 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH getenv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getenv, secure_getenv \- get an environment variable +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *getenv(const char *" name ); +.BI "char *secure_getenv(const char *" name ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR secure_getenv (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR getenv () +function searches the environment list to find the +environment variable +.IR name , +and returns a pointer to the corresponding +.I value +string. +.PP +The GNU-specific +.BR secure_getenv () +function is just like +.BR getenv () +except that it returns NULL in cases where "secure execution" is required. +Secure execution is required if one of the following conditions +was true when the program run by the calling process was loaded: +.IP \[bu] 3 +the process's effective user ID did not match its real user ID or +the process's effective group ID did not match its real group ID +(typically this is the result of executing a set-user-ID or +set-group-ID program); +.IP \[bu] +the effective capability bit was set on the executable file; or +.IP \[bu] +the process has a nonempty permitted capability set. +.PP +Secure execution may also be required if triggered +by some Linux security modules. +.PP +The +.BR secure_getenv () +function is intended for use in general-purpose libraries +to avoid vulnerabilities that could occur if +set-user-ID or set-group-ID programs accidentally +trusted the environment. +.SH RETURN VALUE +The +.BR getenv () +function returns a pointer to the value in the +environment, or NULL if there is no match. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getenv (), +.BR secure_getenv () +T} Thread safety MT-Safe env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR getenv () +C11, POSIX.1-2008. +.TP +.BR secure_getenv () +GNU. +.SH HISTORY +.TP +.BR getenv () +POSIX.1-2001, C89, C99, SVr4, 4.3BSD. +.TP +.BR secure_getenv () +glibc 2.17. +.SH NOTES +The strings in the environment list are of the form \fIname=value\fP. +.PP +As typically implemented, +.BR getenv () +returns a pointer to a string within the environment list. +The caller must take care not to modify this string, +since that would change the environment of the process. +.PP +The implementation of +.BR getenv () +is not required to be reentrant. +The string pointed to by the return value of +.BR getenv () +may be statically allocated, +and can be modified by a subsequent call to +.BR getenv (), +.BR putenv (3), +.BR setenv (3), +or +.BR unsetenv (3). +.PP +The "secure execution" mode of +.BR secure_getenv () +is controlled by the +.B AT_SECURE +flag contained in the auxiliary vector passed from the kernel to user space. +.SH SEE ALSO +.BR clearenv (3), +.BR getauxval (3), +.BR putenv (3), +.BR setenv (3), +.BR unsetenv (3), +.BR capabilities (7), +.BR environ (7) diff --git a/upstream/opensuse-leap-15-6/man3/getfsent.3 b/upstream/opensuse-leap-15-6/man3/getfsent.3 new file mode 100644 index 00000000..65d8d120 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getfsent.3 @@ -0,0 +1,152 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Inspired by a page written by Walter Harms. +.\" +.TH getfsent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getfsent, getfsspec, getfsfile, setfsent, endfsent \- handle fstab entries +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "int setfsent(void);" +.B "struct fstab *getfsent(void);" +.B "void endfsent(void);" +.PP +.BI "struct fstab *getfsfile(const char *" mount_point ); +.BI "struct fstab *getfsspec(const char *" special_file ); +.fi +.SH DESCRIPTION +These functions read from the file +.IR /etc/fstab . +The +.I struct fstab +is defined by: +.PP +.in +4n +.EX +struct fstab { + char *fs_spec; /* block device name */ + char *fs_file; /* mount point */ + char *fs_vfstype; /* filesystem 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 +Here the field +.I fs_type +contains (on a *BSD system) +one of the five strings "rw", "rq", "ro", "sw", "xx" +(read-write, read-write with quota, read-only, swap, ignore). +.PP +The function +.BR setfsent () +opens the file when required and positions it at the first line. +.PP +The function +.BR getfsent () +parses the next line from the file. +(After opening it when required.) +.PP +The function +.BR endfsent () +closes the file when required. +.PP +The function +.BR getfsspec () +searches the file from the start and returns the first entry found +for which the +.I fs_spec +field matches the +.I special_file +argument. +.PP +The function +.BR getfsfile () +searches the file from the start and returns the first entry found +for which the +.I fs_file +field matches the +.I mount_point +argument. +.SH RETURN VALUE +Upon success, the functions +.BR getfsent (), +.BR getfsfile (), +and +.BR getfsspec () +return a pointer to a +.IR "struct fstab" , +while +.BR setfsent () +returns 1. +Upon failure or end-of-file, these functions return NULL and 0, respectively. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR endfsent (), +.BR setfsent () +T} Thread safety T{ +MT-Unsafe race:fsent +T} +T{ +.BR getfsent (), +.BR getfsspec (), +.BR getfsfile () +T} Thread safety T{ +MT-Unsafe race:fsent locale +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Several operating systems have these functions, for example, +*BSD, SunOS, Digital UNIX, AIX (which also has a +.BR getfstype ()). +HP-UX has functions of the same names, +that however use a +.I struct checklist +instead of a +.IR "struct fstab" , +and calls these functions obsolete, superseded by +.BR getmntent (3). +.SH STANDARDS +None. +.SH HISTORY +The +.BR getfsent () +function appeared in 4.0BSD; the other four functions appeared in 4.3BSD. +.SH NOTES +These functions are not thread-safe. +.PP +Since Linux allows mounting a block special device in several places, +and since several devices can have the same mount point, where the +last device with a given mount point is the interesting one, +while +.BR getfsfile () +and +.BR getfsspec () +only return the first occurrence, these two functions are not suitable +for use under Linux. +.SH SEE ALSO +.BR getmntent (3), +.BR fstab (5) diff --git a/upstream/opensuse-leap-15-6/man3/getgrent.3 b/upstream/opensuse-leap-15-6/man3/getgrent.3 new file mode 100644 index 00000000..17f5b29c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getgrent.3 @@ -0,0 +1,203 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH getgrent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getgrent, setgrent, endgrent \- get group file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.B struct group *getgrent(void); +.PP +.B void setgrent(void); +.B void endgrent(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR setgrent (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR getgrent (), +.BR endgrent (): +.nf + Since glibc 2.22: + _XOPEN_SOURCE >= 500 || _DEFAULT_SOURCE +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + glibc 2.21 and earlier + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getgrent () +function returns a pointer to a structure containing +the broken-out fields of a record in the group database +(e.g., the local group file +.IR /etc/group , +NIS, and LDAP). +The first time +.BR getgrent () +is called, +it returns the first entry; thereafter, it returns successive entries. +.PP +The +.BR setgrent () +function rewinds to the beginning +of the group database, to allow repeated scans. +.PP +The +.BR endgrent () +function is used to close the group database +after all processing has been performed. +.PP +The \fIgroup\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* NULL\-terminated array of pointers + to names of group members */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR group (5). +.SH RETURN VALUE +The +.BR getgrent () +function returns a pointer to a +.I group +structure, +or NULL if there are no more entries or an error occurs. +.PP +Upon error, +.I errno +may be set. +If one wants to check +.I errno +after the call, it should be set to zero before the call. +.PP +The return value may point to a static area, and may be overwritten +by subsequent calls to +.BR getgrent (), +.BR getgrgid (3), +or +.BR getgrnam (3). +(Do not pass the returned pointer to +.BR free (3).) +.SH ERRORS +.TP +.B EAGAIN +The service was temporarily unavailable; try again later. +For NSS backends in glibc +this indicates a temporary error talking to the backend. +The error may correct itself, retrying later is suggested. +.TP +.B EINTR +A signal was caught; see +.BR signal (7). +.TP +.B EIO +I/O error. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.\" not in POSIX +.B ENOENT +A necessary input file cannot be found. +For NSS backends in glibc +this indicates the backend is not correctly configured. +.TP +.B ENOMEM +.\" not in POSIX +Insufficient memory to allocate +.I group +structure. +.TP +.B ERANGE +Insufficient buffer space supplied. +.SH FILES +.TP +.I /etc/group +local group database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getgrent () +T} Thread safety T{ +MT-Unsafe race:grent +race:grentbuf locale +T} +T{ +.BR setgrent (), +.BR endgrent () +T} Thread safety T{ +MT-Unsafe race:grent locale +T} +.TE +.hy +.ad +.sp 1 +.PP +In the above table, +.I grent +in +.I race:grent +signifies that if any of the functions +.BR setgrent (), +.BR getgrent (), +or +.BR endgrent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR fgetgrent (3), +.BR getgrent_r (3), +.BR getgrgid (3), +.BR getgrnam (3), +.BR getgrouplist (3), +.BR putgrent (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/getgrent_r.3 b/upstream/opensuse-leap-15-6/man3/getgrent_r.3 new file mode 100644 index 00000000..e33d5ca5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getgrent_r.3 @@ -0,0 +1,224 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH getgrent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getgrent_r, fgetgrent_r \- get group file entry reentrantly +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getgrent_r(struct group *restrict " gbuf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct group **restrict " gbufp ); +.BI "int fgetgrent_r(FILE *restrict " stream ", struct group *restrict " gbuf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct group **restrict " gbufp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getgrent_r (): +.nf + _GNU_SOURCE +.fi +.\" FIXME . The FTM requirements seem inconsistent here. File a glibc bug? +.PP +.BR fgetgrent_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +The functions +.BR getgrent_r () +and +.BR fgetgrent_r () +are the reentrant versions of +.BR getgrent (3) +and +.BR fgetgrent (3). +The former reads the next group entry from the stream initialized by +.BR setgrent (3). +The latter reads the next group entry from +.IR stream . +.PP +The \fIgroup\fP structure is defined in +.I +as follows: +.PP +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* NULL\-terminated array of pointers + to names of group members */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR group (5). +.PP +The nonreentrant functions return a pointer to static storage, +where this static storage contains further pointers to group +name, password, and members. +The reentrant functions described here return all of that in +caller-provided buffers. +First of all there is the buffer +.I gbuf +that can hold a \fIstruct group\fP. +And next the buffer +.I buf +of size +.I buflen +that can hold additional strings. +The result of these functions, the \fIstruct group\fP read from the stream, +is stored in the provided buffer +.IR *gbuf , +and a pointer to this \fIstruct group\fP is returned in +.IR *gbufp . +.SH RETURN VALUE +On success, these functions return 0 and +.I *gbufp +is a pointer to the \fIstruct group\fP. +On error, these functions return an error value and +.I *gbufp +is NULL. +.SH ERRORS +.TP +.B ENOENT +No more entries. +.TP +.B ERANGE +Insufficient buffer space supplied. +Try again with larger buffer. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getgrent_r () +T} Thread safety T{ +MT-Unsafe race:grent locale +T} +T{ +.BR fgetgrent_r () +T} Thread safety T{ +MT-Safe +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I grent +in +.I race:grent +signifies that if any of the functions +.BR setgrent (3), +.BR getgrent (3), +.BR endgrent (3), +or +.BR getgrent_r () +are used in parallel in different threads of a program, +then data races could occur. +.SH VERSIONS +Other systems use the prototype +.PP +.in +4n +.EX +struct group *getgrent_r(struct group *grp, char *buf, + int buflen); +.EE +.in +.PP +or, better, +.PP +.in +4n +.EX +int getgrent_r(struct group *grp, char *buf, int buflen, + FILE **gr_fp); +.EE +.in +.SH STANDARDS +GNU. +.SH HISTORY +These functions are done in a style resembling +the POSIX version of functions like +.BR getpwnam_r (3). +.SH NOTES +The function +.BR getgrent_r () +is not really reentrant since it shares the reading position +in the stream with all other threads. +.SH EXAMPLES +.\" SRC BEGIN (getgrent_r.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#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 (size_t 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 +.\" #include +.\" if (i) { +.\" if (i == ENOENT) +.\" break; +.\" printf("getgrent_r: %s", strerror(i)); +.\" exit(EXIT_FAILURE); +.\" } +.\" SRC END +.SH SEE ALSO +.BR fgetgrent (3), +.BR getgrent (3), +.BR getgrgid (3), +.BR getgrnam (3), +.BR putgrent (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/getgrnam.3 b/upstream/opensuse-leap-15-6/man3/getgrnam.3 new file mode 100644 index 00000000..576d73c1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getgrnam.3 @@ -0,0 +1,255 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH getgrnam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "struct group *getgrnam(const char *" name ); +.BI "struct group *getgrgid(gid_t " gid ); +.PP +.BI "int getgrnam_r(const char *restrict " name \ +", struct group *restrict " grp , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct group **restrict " result ); +.BI "int getgrgid_r(gid_t " gid ", struct group *restrict " grp , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct group **restrict " result ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getgrnam_r (), +.BR getgrgid_r (): +.nf + _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getgrnam () +function returns a pointer to a structure containing +the broken-out fields of the record in the group database +(e.g., the local group file +.IR /etc/group , +NIS, and LDAP) +that matches the group name +.IR name . +.PP +The +.BR getgrgid () +function returns a pointer to a structure containing +the broken-out fields of the record in the group database +that matches the group ID +.IR gid . +.PP +The \fIgroup\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* NULL\-terminated array of pointers + to names of group members */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR group (5). +.PP +The +.BR getgrnam_r () +and +.BR getgrgid_r () +functions obtain the same information as +.BR getgrnam () +and +.BR getgrgid (), +but store the retrieved +.I group +structure +in the space pointed to by +.IR grp . +The string fields pointed to by the members of the +.I group +structure are stored in the buffer +.I buf +of size +.IR buflen . +A pointer to the result (in case of success) or NULL (in case no entry +was found or an error occurred) is stored in +.IR *result . +.PP +The call +.PP +.in +4n +.EX +sysconf(_SC_GETGR_R_SIZE_MAX) +.EE +.in +.PP +returns either \-1, without changing +.IR errno , +or an initial suggested size for +.IR buf . +(If this size is too small, +the call fails with +.BR ERANGE , +in which case the caller can retry with a larger buffer.) +.SH RETURN VALUE +The +.BR getgrnam () +and +.BR getgrgid () +functions return a pointer to a +.I group +structure, or NULL if the matching entry +is not found or an error occurs. +If an error occurs, +.I errno +is set to indicate the error. +If one wants to check +.I errno +after the call, it should be set to zero before the call. +.PP +The return value may point to a static area, and may be overwritten +by subsequent calls to +.BR getgrent (3), +.BR getgrgid (), +or +.BR getgrnam (). +(Do not pass the returned pointer to +.BR free (3).) +.PP +On success, +.BR getgrnam_r () +and +.BR getgrgid_r () +return zero, and set +.I *result +to +.IR grp . +If no matching group record was found, +these functions return 0 and store NULL in +.IR *result . +In case of error, an error number is returned, and NULL is stored in +.IR *result . +.SH ERRORS +.TP +.BR 0 " or " ENOENT " or " ESRCH " or " EBADF " or " EPERM " or ..." +The given +.I name +or +.I gid +was not found. +.TP +.B EINTR +A signal was caught; see +.BR signal (7). +.TP +.B EIO +I/O error. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOMEM +.\" not in POSIX +Insufficient memory to allocate +.I group +structure. +.\" to allocate the group structure, or to allocate buffers +.TP +.B ERANGE +Insufficient buffer space supplied. +.SH FILES +.TP +.I /etc/group +local group database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getgrnam () +T} Thread safety T{ +MT-Unsafe race:grnam locale +T} +T{ +.BR getgrgid () +T} Thread safety T{ +MT-Unsafe race:grgid locale +T} +T{ +.BR getgrnam_r (), +.BR getgrgid_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The formulation given above under "RETURN VALUE" is from POSIX.1. +.\" POSIX.1-2001, POSIX.1-2008 +It does not call "not found" an error, hence does not specify what value +.I errno +might have in this situation. +But that makes it impossible to recognize +errors. +One might argue that according to POSIX +.I errno +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. +.\" more precisely: +.\" AIX 5.1 - gives ESRCH +.\" OSF1 4.0g - gives EWOULDBLOCK +.\" libc, glibc up to glibc 2.6, Irix 6.5 - give ENOENT +.\" since glibc 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 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR endgrent (3), +.BR fgetgrent (3), +.BR getgrent (3), +.BR getpwnam (3), +.BR setgrent (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/getgrouplist.3 b/upstream/opensuse-leap-15-6/man3/getgrouplist.3 new file mode 100644 index 00000000..0404d6ff --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getgrouplist.3 @@ -0,0 +1,203 @@ +'\" t +.\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" A few pieces remain from an earlier version written in +.\" 2002 by Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getgrouplist 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getgrouplist \- get list of groups to which a user belongs +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getgrouplist(const char *" user ", gid_t " group , +.BI " gid_t *" groups ", int *" ngroups ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getgrouplist (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR getgrouplist () +function scans the group database (see +.BR group (5)) +to obtain the list of groups that +.I user +belongs to. +Up to +.I *ngroups +of these groups are returned in the array +.IR groups . +.PP +If it was not among the groups defined for +.I user +in the group database, then +.I group +is included in the list of groups returned by +.BR getgrouplist (); +typically this argument is specified as the group ID from +the password record for +.IR user . +.PP +The +.I ngroups +argument is a value-result argument: +on return it always contains the number of groups found for +.IR user , +including +.IR group ; +this value may be greater than the number of groups stored in +.IR groups . +.SH RETURN VALUE +If the number of groups of which +.I user +is a member is less than or equal to +.IR *ngroups , +then the value +.I *ngroups +is returned. +.PP +If the user is a member of more than +.I *ngroups +groups, then +.BR getgrouplist () +returns \-1. +In this case, the value returned in +.I *ngroups +can be used to resize the buffer passed to a further call to +.BR getgrouplist (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getgrouplist () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +glibc 2.2.4. +.SH BUGS +Before glibc 2.3.3, +the implementation of this function contains a buffer-overrun bug: +it returns the complete list of groups for +.I user +in the array +.IR groups , +even when the number of groups exceeds +.IR *ngroups . +.SH EXAMPLES +The program below displays the group list for the user named in its +first command-line argument. +The second command-line argument specifies the +.I ngroups +value to be supplied to +.BR getgrouplist (). +The following shell session shows examples of the use of this program: +.PP +.in +4n +.EX +.RB "$" " ./a.out cecilia 0" +getgrouplist() returned \-1; ngroups = 3 +.RB "$" " ./a.out cecilia 3" +ngroups = 3 +16 (dialout) +33 (video) +100 (users) +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (getgrouplist.c) +.EX +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int ngroups; + struct passwd *pw; + struct group *gr; + gid_t *groups; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + ngroups = atoi(argv[2]); + + 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 (size_t 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 +.\" SRC END +.SH SEE ALSO +.BR getgroups (2), +.BR setgroups (2), +.BR getgrent (3), +.BR group_member (3), +.BR group (5), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/gethostbyname.3 b/upstream/opensuse-leap-15-6/man3/gethostbyname.3 new file mode 100644 index 00000000..cb5fac41 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gethostbyname.3 @@ -0,0 +1,533 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH gethostbyname 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, +h_errno, +herror, hstrerror, +gethostbyaddr_r, +gethostbyname2, gethostbyname2_r, gethostbyname_r, +gethostent_r \- get network host entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void sethostent(int " stayopen ); +.B void endhostent(void); +.PP +.B [[deprecated]] extern int h_errno; +.PP +.BI "[[deprecated]] struct hostent *gethostbyname(const char *" name ); +.BI "[[deprecated]] struct hostent *gethostbyaddr(const void " addr [. len ], +.BI " socklen_t " len ", int " type ); +.PP +.BI "[[deprecated]] void herror(const char *" s ); +.BI "[[deprecated]] const char *hstrerror(int " err ); +.PP +/* System V/POSIX extension */ +.B struct hostent *gethostent(void); +.PP +/* GNU extensions */ +.B [[deprecated]] +.BI "struct hostent *gethostbyname2(const char *" name ", int " af ); +.PP +.BI "int gethostent_r(struct hostent *restrict " ret , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct hostent **restrict " result , +.BI " int *restrict " h_errnop ); +.PP +.B [[deprecated]] +.BI "int gethostbyaddr_r(const void " addr "[restrict ." len "], socklen_t " len , +.BI " int " type , +.BI " struct hostent *restrict " ret , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct hostent **restrict " result , +.BI " int *restrict " h_errnop ); +.B [[deprecated]] +.BI "int gethostbyname_r(const char *restrict " name , +.BI " struct hostent *restrict " ret , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct hostent **restrict " result , +.BI " int *restrict " h_errnop ); +.B [[deprecated]] +.BI "int gethostbyname2_r(const char *restrict " name ", int " af, +.BI " struct hostent *restrict " ret , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct hostent **restrict " result , +.BI " int *restrict " h_errnop ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR gethostbyname2 (), +.BR gethostent_r (), +.BR gethostbyaddr_r (), +.BR gethostbyname_r (), +.BR gethostbyname2_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc up to and including 2.19: + _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR herror (), +.BR hstrerror (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.8 to glibc 2.19: + _BSD_SOURCE || _SVID_SOURCE + Before glibc 2.8: + none +.fi +.PP +.BR h_errno : +.nf + Since glibc 2.19 + _DEFAULT_SOURCE || _POSIX_C_SOURCE < 200809L + glibc 2.12 to glibc 2.19: + _BSD_SOURCE || _SVID_SOURCE || _POSIX_C_SOURCE < 200809L + Before glibc 2.12: + none +.fi +.SH DESCRIPTION +The +.BR gethostbyname* (), +.BR gethostbyaddr* (), +.BR herror (), +and +.BR hstrerror () +functions are obsolete. +Applications should use +.BR getaddrinfo (3), +.BR getnameinfo (3), +and +.BR gai_strerror (3) +instead. +.PP +The +.BR sethostent () +function specifies, if \fIstayopen\fP is true (1), +that a connected TCP socket should be used for the name server queries and +that the connection should remain open during successive queries. +Otherwise, name server queries will use UDP datagrams. +.PP +The +.BR endhostent () +function ends the use of a TCP connection for name +server queries. +.PP +The +.BR gethostbyname () +function returns a structure of type +.I hostent +for the given host +.IR name . +Here +.I name +is either a hostname or an IPv4 address in standard dot notation (as for +.BR inet_addr (3)). +If +.I name +is an IPv4 address, no lookup is performed and +.BR gethostbyname () +simply copies +.I name +into the +.I h_name +field and its +.I struct in_addr +equivalent into the +.I h_addr_list[0] +field of the returned +.I hostent +structure. +If +.I name +doesn't end in a dot and the environment variable +.B HOSTALIASES +is set, the alias file pointed to by +.B HOSTALIASES +will first be searched for +.I name +(see +.BR hostname (7) +for the file format). +The current domain and its parents are searched unless \fIname\fP +ends in a dot. +.PP +The +.BR gethostbyaddr () +function returns a structure of type \fIhostent\fP +for the given host address \fIaddr\fP of length \fIlen\fP and address type +\fItype\fP. +Valid address types are +.B AF_INET +and +.B AF_INET6 +(defined in +.IR ). +The host address argument is a pointer to a struct of a type depending +on the address type, for example a \fIstruct in_addr *\fP (probably +obtained via a call to +.BR inet_addr (3)) +for address type +.BR AF_INET . +.PP +The (obsolete) +.BR herror () +function prints the error message associated +with the current value of \fIh_errno\fP on \fIstderr\fP. +.PP +The (obsolete) +.BR hstrerror () +function takes an error number +(typically \fIh_errno\fP) and returns the corresponding message string. +.PP +The domain name queries carried out by +.BR gethostbyname () +and +.BR gethostbyaddr () +rely on the Name Service Switch +.RB ( nsswitch.conf (5)) +configured sources or a local name server +.RB ( named (8)). +The default action is to query the Name Service Switch +.RB ( nsswitch.conf (5)) +configured sources, failing that, a local name server +.RB ( named (8)). +.\" +.SS Historical +The +.BR nsswitch.conf (5) +file is the modern way of controlling the order of host lookups. +.PP +In glibc 2.4 and earlier, the +.I order +keyword was used to control the order of host lookups as defined in +.I /etc/host.conf +.RB ( host.conf (5)). +.PP +The \fIhostent\fP structure is defined in \fI\fP as follows: +.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] /* for backward compatibility */ +.EE +.in +.PP +The members of the \fIhostent\fP structure are: +.TP +.I h_name +The official name of the host. +.TP +.I h_aliases +An array of alternative names for the host, terminated by a null pointer. +.TP +.I h_addrtype +The type of address; always +.B AF_INET +or +.B AF_INET6 +at present. +.TP +.I h_length +The length of the address in bytes. +.TP +.I h_addr_list +An array of pointers to network addresses for the host (in network byte +order), terminated by a null pointer. +.TP +.I h_addr +The first address in \fIh_addr_list\fP for backward compatibility. +.SH RETURN VALUE +The +.BR gethostbyname () +and +.BR gethostbyaddr () +functions return the +.I hostent +structure or a null pointer if an error occurs. +On error, the +.I h_errno +variable holds an error number. +When non-NULL, the return value may point at static data, see the notes below. +.SH ERRORS +The variable \fIh_errno\fP can have the following values: +.TP +.B HOST_NOT_FOUND +The specified host is unknown. +.TP +.B NO_DATA +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 +.B NO_ADDRESS +is a synonym for +.BR NO_DATA . +.TP +.B NO_RECOVERY +A nonrecoverable name server error occurred. +.TP +.B TRY_AGAIN +A temporary error occurred on an authoritative name server. +Try again later. +.SH FILES +.TP +.I /etc/host.conf +resolver configuration file +.TP +.I /etc/hosts +host database file +.TP +.I /etc/nsswitch.conf +name service switch configuration +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR gethostbyname () +T} Thread safety T{ +MT-Unsafe race:hostbyname env +locale +T} +T{ +.BR gethostbyaddr () +T} Thread safety T{ +MT-Unsafe race:hostbyaddr env +locale +T} +T{ +.BR sethostent (), +.BR endhostent (), +.BR gethostent_r () +T} Thread safety T{ +MT-Unsafe race:hostent env +locale +T} +T{ +.BR herror (), +.BR hstrerror () +T} Thread safety MT-Safe +T{ +.BR gethostent () +T} Thread safety T{ +MT-Unsafe race:hostent +race:hostentbuf env locale +T} +T{ +.BR gethostbyname2 () +T} Thread safety T{ +MT-Unsafe race:hostbyname2 +env locale +T} +T{ +.BR gethostbyaddr_r (), +.BR gethostbyname_r (), +.BR gethostbyname2_r () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +In the above table, +.I hostent +in +.I race:hostent +signifies that if any of the functions +.BR sethostent (), +.BR gethostent (), +.BR gethostent_r (), +or +.BR endhostent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +.TP +.BR sethostent () +.TQ +.BR endhostent () +.TQ +.BR gethostent () +POSIX.1-2008. +.TP +.BR gethostent_r () +GNU. +.TP +Others: +None. +.SH HISTORY +.TP +.BR sethostent () +.TQ +.BR endhostent () +.TQ +.BR gethostent () +POSIX.1-2001. +.TP +.BR gethostbyname () +.TQ +.BR gethostbyaddr () +.TQ +.I h_errno +Marked obsolescent in POSIX.1-2001. +Removed in POSIX.1-2008, +recommending the use of +.BR getaddrinfo (3) +and +.BR getnameinfo (3) +instead. +.SH NOTES +The functions +.BR gethostbyname () +and +.BR gethostbyaddr () +may return pointers to static data, which may be overwritten by +later calls. +Copying the +.I struct hostent +does not suffice, since it contains pointers; a deep copy is required. +.PP +In the original BSD implementation the +.I len +argument +of +.BR gethostbyname () +was an +.IR int . +The SUSv2 standard is buggy and declares the +.I len +argument of +.BR gethostbyaddr () +to be of type +.IR size_t . +(That is wrong, because it has to be +.IR int , +and +.I size_t +is not. +POSIX.1-2001 makes it +.IR socklen_t , +which is OK.) +See also +.BR accept (2). +.PP +The BSD prototype for +.BR gethostbyaddr () +uses +.I "const char\ *" +for the first argument. +.SS System V/POSIX extension +POSIX requires the +.BR gethostent () +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 +.IR /etc/hosts . +.\" e.g., Linux, FreeBSD, UnixWare, HP-UX +It may be available only when the library was built without DNS support. +.\" e.g., FreeBSD, AIX +The glibc version will ignore ipv6 entries. +This function is not reentrant, +and glibc adds a reentrant version +.BR gethostent_r (). +.SS GNU extensions +glibc2 also has a +.BR gethostbyname2 () +that works like +.BR gethostbyname (), +but permits to specify the address family to which the address must belong. +.PP +glibc2 also has reentrant versions +.BR gethostent_r (), +.BR gethostbyaddr_r (), +.BR gethostbyname_r (), +and +.BR gethostbyname2_r (). +The caller supplies a +.I hostent +structure +.I ret +which will be filled in on success, and a temporary work buffer +.I buf +of size +.IR buflen . +After the call, +.I result +will point to the result on success. +In case of an error +or if no entry is found +.I result +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 +.I buf +is too small, the functions will return +.BR ERANGE , +and the call should be retried with a larger buffer. +The global variable +.I h_errno +is not modified, but the address of a variable in which to store error numbers +is passed in +.IR h_errnop . +.SH BUGS +.BR gethostbyname () +does not recognize components of a dotted IPv4 address string +that are expressed in hexadecimal. +.\" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482973 +.SH SEE ALSO +.BR getaddrinfo (3), +.\" .BR getipnodebyaddr (3), +.\" .BR getipnodebyname (3), +.BR getnameinfo (3), +.BR inet (3), +.BR inet_ntop (3), +.BR inet_pton (3), +.BR resolver (3), +.BR hosts (5), +.BR nsswitch.conf (5), +.BR hostname (7), +.BR named (8) +.\" .BR resolv+ (8) diff --git a/upstream/opensuse-leap-15-6/man3/gethostid.3 b/upstream/opensuse-leap-15-6/man3/gethostid.3 new file mode 100644 index 00000000..e18b18bf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gethostid.3 @@ -0,0 +1,146 @@ +'\" t +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) +.\" +.\" Updated with additions from Mitchum DSouza +.\" Portions Copyright 1993 Mitchum DSouza +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond +.TH gethostid 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gethostid, sethostid \- get or set the unique identifier of the current host +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B long gethostid(void); +.BI "int sethostid(long " hostid ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR gethostid (): +.nf + Since glibc 2.20: + _DEFAULT_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + Up to and including glibc 2.19: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.PP +.BR sethostid (): +.nf + Since glibc 2.21: +.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 + _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 DESCRIPTION +.BR gethostid () +and +.BR sethostid () +respectively get or set a unique 32-bit identifier for the current machine. +The 32-bit identifier was intended to be unique among all UNIX systems in +existence. +This normally resembles the Internet address for the local +machine, as returned by +.BR gethostbyname (3), +and thus usually never needs to be set. +.PP +The +.BR sethostid () +call is restricted to the superuser. +.SH RETURN VALUE +.BR gethostid () +returns the 32-bit identifier for the current host as set by +.BR sethostid (). +.PP +On success, +.BR sethostid () +returns 0; on error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.BR sethostid () +can fail with the following errors: +.TP +.B EACCES +The caller did not have permission to write to the file used +to store the host ID. +.TP +.B EPERM +The calling process's effective user or group ID is not the same +as its corresponding real ID. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR gethostid () +T} Thread safety T{ +MT-Safe hostid env locale +T} +T{ +.BR sethostid () +T} Thread safety T{ +MT-Unsafe const:hostid +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +In the glibc implementation, the +.I hostid +is stored in the file +.IR /etc/hostid . +(Before glibc 2.2, the file +.I /var/adm/hostid +was used.) +.\" libc5 used /etc/hostid; libc4 didn't have these functions +.PP +In the glibc implementation, if +.BR gethostid () +cannot open the file containing the host ID, +then it obtains the hostname using +.BR gethostname (2), +passes that hostname to +.BR gethostbyname_r (3) +in order to obtain the host's IPv4 address, +and returns a value obtained by bit-twiddling the IPv4 address. +(This value may not be unique.) +.SH STANDARDS +.TP +.BR gethostid () +POSIX.1-2008. +.TP +.BR sethostid () +None. +.SH HISTORY +4.2BSD; dropped in 4.4BSD. +SVr4 and POSIX.1-2001 include +.BR gethostid () +but not +.BR sethostid (). +.SH BUGS +It is impossible to ensure that the identifier is globally unique. +.SH SEE ALSO +.BR hostid (1), +.BR gethostbyname (3) diff --git a/upstream/opensuse-leap-15-6/man3/getipnodebyname.3 b/upstream/opensuse-leap-15-6/man3/getipnodebyname.3 new file mode 100644 index 00000000..51d6431e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getipnodebyname.3 @@ -0,0 +1,253 @@ +.\" Copyright 2000 Sam Varshavchik +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References: RFC 2553 +.TH getipnodebyname 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getipnodebyname, getipnodebyaddr, freehostent \- get network +hostnames and addresses +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "[[deprecated]] struct hostent *getipnodebyname(const char *" name ", int " af , +.BI " int " flags ", int *" error_num ); +.BI "[[deprecated]] struct hostent *getipnodebyaddr(const void " addr [. len ], +.BI " size_t " len ", int " af , +.BI " int *" "error_num" ); +.BI "[[deprecated]] void freehostent(struct hostent *" "ip" ); +.fi +.SH DESCRIPTION +These functions are deprecated (and unavailable in glibc). +Use +.BR getaddrinfo (3) +and +.BR getnameinfo (3) +instead. +.PP +The +.BR getipnodebyname () +and +.BR getipnodebyaddr () +functions return the names and addresses of a network host. +These functions return a pointer to the +following structure: +.PP +.in +4n +.EX +struct hostent { + char *h_name; + char **h_aliases; + int h_addrtype; + int h_length; + char **h_addr_list; +}; +.EE +.in +.PP +These functions replace the +.BR gethostbyname (3) +and +.BR gethostbyaddr (3) +functions, which could access only the IPv4 network address family. +The +.BR getipnodebyname () +and +.BR getipnodebyaddr () +functions can access multiple network address families. +.PP +Unlike the +.B gethostby +functions, +these functions return pointers to dynamically allocated memory. +The +.BR freehostent () +function is used to release the dynamically allocated memory +after the caller no longer needs the +.I hostent +structure. +.SS getipnodebyname() arguments +The +.BR getipnodebyname () +function +looks up network addresses for the host +specified by the +.I name +argument. +The +.I af +argument specifies one of the following values: +.TP +.B AF_INET +The +.I name +argument points to a dotted-quad IPv4 address or a name +of an IPv4 network host. +.TP +.B AF_INET6 +The +.I name +argument points to a hexadecimal IPv6 address or a name +of an IPv6 network host. +.PP +The +.I flags +argument specifies additional options. +More than one option can be specified by bitwise OR-ing +them together. +.I flags +should be set to 0 +if no options are desired. +.TP +.B AI_V4MAPPED +This flag is used with +.B AF_INET6 +to request a query for IPv4 addresses instead of +IPv6 addresses; the IPv4 addresses will +be mapped to IPv6 addresses. +.TP +.B AI_ALL +This flag is used with +.B AI_V4MAPPED +to request a query for both IPv4 and IPv6 addresses. +Any IPv4 address found will be mapped to an IPv6 address. +.TP +.B AI_ADDRCONFIG +This flag is used with +.B AF_INET6 +to +further request that queries for IPv6 addresses should not be made unless +the system has at least one IPv6 address assigned to a network interface, +and that queries for IPv4 addresses should not be made unless the +system has at least one IPv4 address assigned to a network interface. +This flag may be used by itself or with the +.B AI_V4MAPPED +flag. +.TP +.B AI_DEFAULT +This flag is equivalent to +.BR "(AI_ADDRCONFIG | AI_V4MAPPED)" . +.SS getipnodebyaddr() arguments +The +.BR getipnodebyaddr () +function +looks up the name of the host whose +network address is +specified by the +.I addr +argument. +The +.I af +argument specifies one of the following values: +.TP +.B AF_INET +The +.I addr +argument points to a +.I struct in_addr +and +.I len +must be set to +.IR "sizeof(struct in_addr)" . +.TP +.B AF_INET6 +The +.I addr +argument points to a +.I struct in6_addr +and +.I len +must be set to +.IR "sizeof(struct in6_addr)" . +.SH RETURN VALUE +NULL is returned if an error occurred, and +.I error_num +will contain an error code from the following list: +.TP +.B HOST_NOT_FOUND +The hostname or network address was not found. +.TP +.B NO_ADDRESS +The domain name server recognized the network address or name, +but no answer was returned. +This can happen if the network host has only IPv4 addresses and +a request has been made for IPv6 information only, or vice versa. +.TP +.B NO_RECOVERY +The domain name server returned a permanent failure response. +.TP +.B TRY_AGAIN +The domain name server returned a temporary failure response. +You might have better luck next time. +.PP +A successful query returns a pointer to a +.I hostent +structure that contains the following fields: +.TP +.I h_name +This is the official name of this network host. +.TP +.I h_aliases +This is an array of pointers to unofficial aliases for the same host. +The array is terminated by a null pointer. +.TP +.I h_addrtype +This is a copy of the +.I af +argument to +.BR getipnodebyname () +or +.BR getipnodebyaddr (). +.I h_addrtype +will always be +.B AF_INET +if the +.I af +argument was +.BR AF_INET . +.I h_addrtype +will always be +.B AF_INET6 +if the +.I af +argument was +.BR AF_INET6 . +.TP +.I h_length +This field will be set to +.I sizeof(struct in_addr) +if +.I h_addrtype +is +.BR AF_INET , +and to +.I sizeof(struct in6_addr) +if +.I h_addrtype +is +.BR AF_INET6 . +.TP +.I h_addr_list +This is an array of one or more pointers to network address structures for the +network host. +The array is terminated by a null pointer. +.SH STANDARDS +None. +.SH HISTORY +.\" Not in POSIX.1-2001. +RFC\ 2553. +.PP +Present in glibc 2.1.91-95, but removed again. +Several UNIX-like systems support them, but all +call them deprecated. +.SH SEE ALSO +.BR getaddrinfo (3), +.BR getnameinfo (3), +.BR inet_ntop (3), +.BR inet_pton (3) diff --git a/upstream/opensuse-leap-15-6/man3/getline.3 b/upstream/opensuse-leap-15-6/man3/getline.3 new file mode 100644 index 00000000..e94354e5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getline.3 @@ -0,0 +1,185 @@ +'\" t +.\" Copyright (c) 2001 John Levon +.\" Based in part on GNU libc documentation +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getline 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getline, getdelim \- delimited string input +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "ssize_t getline(char **restrict " lineptr ", size_t *restrict " n , +.BI " FILE *restrict " stream ); +.BI "ssize_t getdelim(char **restrict " lineptr ", size_t *restrict " n , +.BI " int " delim ", FILE *restrict " stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getline (), +.BR getdelim (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +.BR getline () +reads an entire line from \fIstream\fP, +storing the address of the buffer containing the text into +.IR *lineptr . +The buffer is null-terminated and includes the newline character, if +one was found. +.PP +If +.I *lineptr +is set to NULL before the call, then +.BR getline () +will allocate a buffer for storing the line. +This buffer should be freed by the user program +even if +.BR getline () +failed. +.PP +Alternatively, before calling +.BR getline (), +.I *lineptr +can contain a pointer to a +.BR malloc (3)\-allocated +buffer +.I *n +bytes in size. +If the buffer is not large enough to hold the line, +.BR getline () +resizes it with +.BR realloc (3), +updating +.I *lineptr +and +.I *n +as necessary. +.PP +In either case, on a successful call, +.I *lineptr +and +.I *n +will be updated to reflect the buffer address and allocated size respectively. +.PP +.BR getdelim () +works like +.BR getline (), +except that a line delimiter other than newline can be specified as the +.I delimiter +argument. +As with +.BR getline (), +a delimiter character is not added if one was not present +in the input before end of file was reached. +.SH RETURN VALUE +On success, +.BR getline () +and +.BR getdelim () +return the number of characters read, including the delimiter character, +but not including the terminating null byte (\[aq]\e0\[aq]). +This value can be used +to handle embedded null bytes in the line read. +.PP +Both functions return \-1 on failure to read a line (including end-of-file +condition). +In the event of a failure, +.I errno +is set to indicate the error. +.PP +If +.I *lineptr +was set to NULL before the call, then the buffer should be freed by the +user program even on failure. +.SH ERRORS +.TP +.B EINVAL +Bad arguments +.RI ( n +or +.I lineptr +is NULL, or +.I stream +is not valid). +.TP +.B ENOMEM +Allocation or reallocation of the line buffer failed. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getline (), +.BR getdelim () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +GNU, POSIX.1-2008. +.SH EXAMPLES +.\" SRC BEGIN (getline.c) +.EX +#define _GNU_SOURCE +#include +#include + +int +main(int argc, char *argv[]) +{ + FILE *stream; + char *line = NULL; + size_t len = 0; + ssize_t nread; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + stream = fopen(argv[1], "r"); + if (stream == NULL) { + perror("fopen"); + exit(EXIT_FAILURE); + } + + while ((nread = getline(&line, &len, stream)) != \-1) { + printf("Retrieved line of length %zd:\en", nread); + fwrite(line, nread, 1, stdout); + } + + free(line); + fclose(stream); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR read (2), +.BR fgets (3), +.BR fopen (3), +.BR fread (3), +.BR scanf (3) diff --git a/upstream/opensuse-leap-15-6/man3/getloadavg.3 b/upstream/opensuse-leap-15-6/man3/getloadavg.3 new file mode 100644 index 00000000..bf272b98 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getloadavg.3 @@ -0,0 +1,74 @@ +'\" t +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" @(#)getloadavg.3 8.1 (Berkeley) 6/4/93 +.\" +.\" 2007-12-08, mtk, Converted from mdoc to man macros +.\" +.TH getloadavg 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getloadavg \- get system load averages +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getloadavg(double " loadavg[] ", int " nelem ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getloadavg (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + In glibc up to and including 2.19: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR getloadavg () +function returns the number of processes in the system run queue +averaged over various periods of time. +Up to +.I nelem +samples are retrieved and assigned to successive elements of +.IR loadavg[] . +The system imposes a maximum of 3 samples, representing averages +over the last 1, 5, and 15 minutes, respectively. +.SH RETURN VALUE +If the load average was unobtainable, \-1 is returned; otherwise, +the number of samples actually retrieved is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getloadavg () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +4.3BSD-Reno, Solaris. +glibc 2.2. +.SH SEE ALSO +.BR uptime (1), +.BR proc (5) diff --git a/upstream/opensuse-leap-15-6/man3/getlogin.3 b/upstream/opensuse-leap-15-6/man3/getlogin.3 new file mode 100644 index 00000000..527848bc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getlogin.3 @@ -0,0 +1,251 @@ +'\" t +.\" Copyright 1995 James R. Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.TH getlogin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getlogin, getlogin_r, cuserid \- get username +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "char *getlogin(void);" +.BI "int getlogin_r(char " buf [. bufsize "], size_t " bufsize ); +.PP +.B #include +.PP +.BI "char *cuserid(char *" string ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getlogin_r (): +.nf +.\" Deprecated: _REENTRANT || + _POSIX_C_SOURCE >= 199506L +.fi +.PP +.BR cuserid (): +.nf + Since glibc 2.24: + (_XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L) + || _GNU_SOURCE + Up to and including glibc 2.23: + _XOPEN_SOURCE +.fi +.SH DESCRIPTION +.BR getlogin () +returns a pointer to a string containing the name of +the user logged in on the controlling terminal of the process, or a +null pointer if this information cannot be determined. +The string is +statically allocated and might be overwritten on subsequent calls to +this function or to +.BR cuserid (). +.PP +.BR getlogin_r () +returns this same username in the array +.I buf +of size +.IR bufsize . +.PP +.BR cuserid () +returns a pointer to a string containing a username +associated with the effective user ID of the process. +If \fIstring\fP +is not a null pointer, it should be an array that can hold at least +\fBL_cuserid\fP characters; the string is returned in this array. +Otherwise, a pointer to a string in a static area is returned. +This +string is statically allocated and might be overwritten on subsequent +calls to this function or to +.BR getlogin (). +.PP +The macro \fBL_cuserid\fP is an integer constant that indicates how +long an array you might need to store a username. +\fBL_cuserid\fP is declared in \fI\fP. +.PP +These functions let your program identify positively the user who is +running +.RB ( cuserid ()) +or the user who logged in this session +.RB ( getlogin ()). +(These can differ when set-user-ID programs are involved.) +.PP +For most purposes, it is more useful to use the environment variable +\fBLOGNAME\fP to find out who the user is. +This is more flexible +precisely because the user can set \fBLOGNAME\fP arbitrarily. +.SH RETURN VALUE +.BR getlogin () +returns a pointer to the username when successful, +and NULL on failure, with +.I errno +set to indicate the error. +.BR getlogin_r () +returns 0 when successful, and nonzero on failure. +.SH ERRORS +POSIX specifies: +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENXIO +The calling process has no controlling terminal. +.TP +.B ERANGE +(getlogin_r) +The length of the username, including the terminating null byte (\[aq]\e0\[aq]), +is larger than +.IR bufsize . +.PP +Linux/glibc also has: +.TP +.B ENOENT +There was no corresponding entry in the utmp-file. +.TP +.B ENOMEM +Insufficient memory to allocate passwd structure. +.TP +.B ENOTTY +Standard input didn't refer to a terminal. +(See BUGS.) +.SH FILES +.TP +\fI/etc/passwd\fP +password database file +.TP +\fI/var/run/utmp\fP +(traditionally \fI/etc/utmp\fP; +some libc versions used \fI/var/adm/utmp\fP) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getlogin () +T} Thread safety T{ +MT-Unsafe race:getlogin race:utent +sig:ALRM timer locale +T} +T{ +.BR getlogin_r () +T} Thread safety T{ +MT-Unsafe race:utent sig:ALRM timer +locale +T} +T{ +.BR cuserid () +T} Thread safety T{ +MT-Unsafe race:cuserid/!string locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I utent +in +.I race:utent +signifies that if any of the functions +.BR setutent (3), +.BR getutent (3), +or +.BR endutent (3) +are used in parallel in different threads of a program, +then data races could occur. +.BR getlogin () +and +.BR getlogin_r () +call those functions, +so we use race:utent to remind users. +.SH VERSIONS +OpenBSD has +.BR getlogin () +and +.BR setlogin (), +and a username +associated with a session, even if it has no controlling terminal. +.SH STANDARDS +.TP +.BR getlogin () +.TQ +.BR getlogin_r () +POSIX.1-2008. +.TP +.BR cuserid () +None. +.SH STANDARDS +.TP +.BR getlogin () +.TQ +.BR getlogin_r (): +POSIX.1-2001. +OpenBSD. +.TP +.BR cuserid () +System V, POSIX.1-1988. +Removed in POSIX.1-1990. +SUSv2. +Removed in POSIX.1-2001. +.IP +System V has a +.BR cuserid () +function which uses the real +user ID rather than the effective user ID. +.SH BUGS +Unfortunately, it is often rather easy to fool +.BR getlogin (). +Sometimes it does not work at all, because some program messed up +the utmp file. +Often, it gives only the first 8 characters of +the login name. +The user currently logged in on the controlling terminal +of our program need not be the user who started it. +Avoid +.BR getlogin () +for security-related purposes. +.PP +Note that glibc does not follow the POSIX specification and uses +.I stdin +instead of +.IR /dev/tty . +A bug. +(Other recent systems, like SunOS 5.8 and HP-UX 11.11 and FreeBSD 4.8 +all return the login name also when +.I stdin +is redirected.) +.PP +Nobody knows precisely what +.BR cuserid () +does; avoid it in portable programs. +Or avoid it altogether: use +.I getpwuid(geteuid()) +instead, if that is +what you meant. +.B Do not use +.BR cuserid (). +.SH SEE ALSO +.BR logname (1), +.BR geteuid (2), +.BR getuid (2), +.BR utmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/getmntent.3 b/upstream/opensuse-leap-15-6/man3/getmntent.3 new file mode 100644 index 00000000..8edd2582 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getmntent.3 @@ -0,0 +1,258 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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:57 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 961109, 031115, aeb +.\" +.TH getmntent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getmntent, setmntent, addmntent, endmntent, hasmntopt, +getmntent_r \- get filesystem descriptor file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "FILE *setmntent(const char *" filename ", const char *" type ); +.PP +.BI "struct mntent *getmntent(FILE *" stream ); +.PP +.BI "int addmntent(FILE *restrict " stream , +.BI " const struct mntent *restrict " mnt ); +.PP +.BI "int endmntent(FILE *" streamp ); +.PP +.BI "char *hasmntopt(const struct mntent *" mnt ", const char *" opt ); +.PP +/* GNU extension */ +.B #include +.PP +.BI "struct mntent *getmntent_r(FILE *restrict " streamp , +.BI " struct mntent *restrict " mntbuf , +.BI " char " buf "[restrict ." buflen "], int " buflen ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getmntent_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These routines are used to access the filesystem description file +.I /etc/fstab +and the mounted filesystem description file +.IR /etc/mtab . +.PP +The +.BR setmntent () +function opens the filesystem description file +.I filename +and returns a file pointer which can be used by +.BR getmntent (). +The argument +.I type +is the type of access +required and can take the same values as the +.I mode +argument of +.BR fopen (3). +The returned stream should be closed using +.BR endmntent () +rather than +.BR fclose (3). +.PP +The +.BR getmntent () +function reads the next line of the filesystem +description file from +.I stream +and returns a pointer to a structure +containing the broken out fields from a line in the file. +The pointer +points to a static area of memory which is overwritten by subsequent +calls to +.BR getmntent (). +.PP +The +.BR addmntent () +function adds the +.I mntent +structure +.I mnt +to +the end of the open +.IR stream . +.PP +The +.BR endmntent () +function closes the +.I stream +associated with the filesystem description file. +.PP +The +.BR hasmntopt () +function scans the +.I mnt_opts +field (see below) +of the +.I mntent +structure +.I mnt +for a substring that matches +.IR opt . +See +.I +and +.BR mount (8) +for valid mount options. +.PP +The reentrant +.BR getmntent_r () +function is similar to +.BR getmntent (), +but stores the +.I mntent +structure +in the provided +.IR *mntbuf , +and stores the strings pointed to by the entries in that structure +in the provided array +.I buf +of size +.IR buflen . +.PP +The +.I mntent +structure is defined in +.I +as follows: +.PP +.in +4n +.EX +struct mntent { + char *mnt_fsname; /* name of mounted filesystem */ + char *mnt_dir; /* filesystem path prefix */ + char *mnt_type; /* mount type (see mntent.h) */ + char *mnt_opts; /* mount options (see mntent.h) */ + int mnt_freq; /* dump frequency in days */ + int mnt_passno; /* pass number on parallel fsck */ +}; +.EE +.in +.PP +Since fields in the mtab and fstab files are separated by whitespace, +octal escapes are used to represent the characters space (\e040), +tab (\e011), newline (\e012), and backslash (\e\e) in those files +when they occur in one of the four strings in a +.I mntent +structure. +The routines +.BR addmntent () +and +.BR getmntent () +will convert +from string representation to escaped representation and back. +When converting from escaped representation, the sequence \e134 is +also converted to a backslash. +.SH RETURN VALUE +The +.BR getmntent () +and +.BR getmntent_r () +functions return +a pointer to the +.I mntent +structure or NULL on failure. +.PP +The +.BR addmntent () +function returns 0 on success and 1 on failure. +.PP +The +.BR endmntent () +function always returns 1. +.PP +The +.BR hasmntopt () +function returns the address of the substring if +a match is found and NULL otherwise. +.SH FILES +.TP +.I /etc/fstab +filesystem description file +.TP +.I /etc/mtab +mounted filesystem description file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR setmntent (), +.BR endmntent (), +.BR hasmntopt () +T} Thread safety MT-Safe +T{ +.BR getmntent () +T} Thread safety T{ +MT-Unsafe race:mntentbuf locale +T} +T{ +.BR addmntent () +T} Thread safety T{ +MT-Safe race:stream locale +T} +T{ +.BR getmntent_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +The nonreentrant functions are from SunOS 4.1.3. +A routine +.BR getmntent_r () +was introduced in HP-UX 10, but it returns an +.IR int . +The prototype shown above is glibc-only. +.PP +System V also has a +.BR getmntent () +function but the calling sequence +differs, and the returned structure is different. +Under System V +.I /etc/mnttab +is used. +4.4BSD and Digital UNIX have a routine +.BR getmntinfo (), +a wrapper around the system call +.BR getfsstat (). +.SH SEE ALSO +.BR fopen (3), +.BR fstab (5), +.BR mount (8) diff --git a/upstream/opensuse-leap-15-6/man3/getnameinfo.3 b/upstream/opensuse-leap-15-6/man3/getnameinfo.3 new file mode 100644 index 00000000..be1c0392 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getnameinfo.3 @@ -0,0 +1,346 @@ +'\" t +.\" %%%LICENSE_START(PUBLIC_DOMAIN) +.\" This page is in the public domain. +.\" %%%LICENSE_END +.\" +.\" Almost all details are from RFC 2553. +.\" +.\" 2004-12-14, mtk, Added EAI_OVERFLOW error +.\" 2004-12-14 Fixed description of error return +.\" +.TH getnameinfo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getnameinfo \- address-to-name translation in protocol-independent manner +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int getnameinfo(const struct sockaddr *restrict " addr \ +", socklen_t " addrlen , +.BI " char " host "[_Nullable restrict ." hostlen ], +.BI " socklen_t " hostlen , +.BI " char " serv "[_Nullable restrict ." servlen ], +.BI " socklen_t " servlen , +.BI " int " flags ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getnameinfo (): +.nf + Since glibc 2.22: + _POSIX_C_SOURCE >= 200112L + glibc 2.21 and earlier: + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The +.BR getnameinfo () +function is the inverse of +.BR getaddrinfo (3): +it converts a socket address to a corresponding host and service, +in a protocol-independent manner. +It combines the functionality of +.BR gethostbyaddr (3) +and +.BR getservbyport (3), +but unlike those functions, +.BR getnameinfo () +is reentrant and allows programs to eliminate +IPv4-versus-IPv6 dependencies. +.PP +The +.I addr +argument is a pointer to a generic socket address structure +(of type +.I sockaddr_in +or +.IR sockaddr_in6 ) +of size +.I addrlen +that holds the input IP address and port number. +The arguments +.I host +and +.I serv +are pointers to caller-allocated buffers (of size +.I hostlen +and +.I servlen +respectively) into which +.BR getnameinfo () +places null-terminated strings containing the host and +service names respectively. +.PP +The caller can specify that no hostname (or no service name) +is required by providing a NULL +.I host +(or +.IR serv ) +argument or a zero +.I hostlen +(or +.IR servlen ) +argument. +However, at least one of hostname or service name +must be requested. +.PP +The +.I flags +argument modifies the behavior of +.BR getnameinfo () +as follows: +.TP +.B NI_NAMEREQD +If set, then an error is returned if the hostname cannot be determined. +.TP +.B NI_DGRAM +If set, then the service is datagram (UDP) based rather than +stream (TCP) based. +This is required for the few ports (512\[en]514) +that have different services for UDP and TCP. +.TP +.B NI_NOFQDN +If set, return only the hostname part of the fully qualified domain name +for local hosts. +.TP +.B NI_NUMERICHOST +If set, then the numeric form of the hostname is returned. +.\" For example, by calling +.\" .BR inet_ntop () +.\" instead of +.\" .BR gethostbyaddr (). +(When not set, this will still happen in case the node's name +cannot be determined.) +.\" POSIX.1-2001 TC1 has NI_NUMERICSCOPE, but glibc doesn't have it. +.TP +.B NI_NUMERICSERV +If set, then the numeric form of the service address is returned. +(When not set, this will still happen in case the service's name +cannot be determined.) +.SS Extensions to getnameinfo() for Internationalized Domain Names +Starting with glibc 2.3.4, +.BR getnameinfo () +has been extended to selectively allow +hostnames to be transparently converted to and from the +Internationalized Domain Name (IDN) format (see RFC 3490, +.IR "Internationalizing Domain Names in Applications (IDNA)" ). +Three new flags are defined: +.TP +.B NI_IDN +If this flag is used, then the name found in the lookup process is +converted from IDN format to the locale's encoding if necessary. +ASCII-only names are not affected by the conversion, which +makes this flag usable in existing programs and environments. +.TP +.BR NI_IDN_ALLOW_UNASSIGNED ", " NI_IDN_USE_STD3_ASCII_RULES +Setting these flags will enable the +IDNA_ALLOW_UNASSIGNED (allow unassigned Unicode code points) and +IDNA_USE_STD3_ASCII_RULES (check output to make sure it is a STD3 +conforming hostname) +flags respectively to be used in the IDNA handling. +.SH RETURN VALUE +.\" FIXME glibc defines the following additional errors, some which +.\" can probably be returned by getnameinfo(); they need to +.\" be documented. +.\" +.\" #ifdef __USE_GNU +.\" #define EAI_INPROGRESS -100 /* Processing request in progress. */ +.\" #define EAI_CANCELED -101 /* Request canceled. */ +.\" #define EAI_NOTCANCELED -102 /* Request not canceled. */ +.\" #define EAI_ALLDONE -103 /* All requests done. */ +.\" #define EAI_INTR -104 /* Interrupted by a signal. */ +.\" #define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ +.\" #endif +On success, 0 is returned, and node and service names, if requested, +are filled with null-terminated strings, possibly truncated to fit +the specified buffer lengths. +On error, one of the following nonzero error codes is returned: +.TP +.B EAI_AGAIN +The name could not be resolved at this time. +Try again later. +.TP +.B EAI_BADFLAGS +The +.I flags +argument has an invalid value. +.TP +.B EAI_FAIL +A nonrecoverable error occurred. +.TP +.B EAI_FAMILY +The address family was not recognized, +or the address length was invalid for the specified family. +.TP +.B EAI_MEMORY +Out of memory. +.TP +.B EAI_NONAME +The name does not resolve for the supplied arguments. +.B NI_NAMEREQD +is set and the host's name cannot be located, +or neither hostname nor service name were requested. +.TP +.B EAI_OVERFLOW +The buffer pointed to by +.I host +or +.I serv +was too small. +.TP +.B EAI_SYSTEM +A system error occurred. +The error code can be found in +.IR errno . +.PP +The +.BR gai_strerror (3) +function translates these error codes to a human readable string, +suitable for error reporting. +.SH FILES +.I /etc/hosts +.br +.I /etc/nsswitch.conf +.br +.I /etc/resolv.conf +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getnameinfo () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +RFC\ 2553. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.PP +Before glibc 2.2, the +.I hostlen +and +.I servlen +arguments were typed as +.IR size_t . +.SH NOTES +In order to assist the programmer in choosing reasonable sizes +for the supplied buffers, +.I +defines the constants +.PP +.in +4n +.EX +#define NI_MAXHOST 1025 +#define NI_MAXSERV 32 +.EE +.in +.PP +Since glibc 2.8, +these definitions are exposed only if suitable +feature test macros are defined, namely: +.BR _GNU_SOURCE , +.B _DEFAULT_SOURCE +(since glibc 2.19), +or (in glibc versions up to and including 2.19) +.B _BSD_SOURCE +or +.BR _SVID_SOURCE . +.PP +The former is the constant +.B MAXDNAME +in recent versions of BIND's +.I +header file. +The latter is a guess based on the services listed +in the current Assigned Numbers RFC. +.SH EXAMPLES +The following code tries to get the numeric hostname and service name, +for a given socket address. +Note that there is no hardcoded reference to +a particular address family. +.PP +.in +4n +.EX +struct sockaddr *addr; /* input */ +socklen_t addrlen; /* input */ +char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; + +if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), sbuf, + sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0) + printf("host=%s, serv=%s\en", hbuf, sbuf); +.EE +.in +.PP +The following version checks if the socket address has a +reverse address mapping. +.PP +.in +4n +.EX +struct sockaddr *addr; /* input */ +socklen_t addrlen; /* input */ +char hbuf[NI_MAXHOST]; + +if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), + NULL, 0, NI_NAMEREQD)) + printf("could not resolve hostname"); +else + printf("host=%s\en", hbuf); +.EE +.in +.PP +An example program using +.BR getnameinfo () +can be found in +.BR getaddrinfo (3). +.SH SEE ALSO +.BR accept (2), +.BR getpeername (2), +.BR getsockname (2), +.BR recvfrom (2), +.BR socket (2), +.BR getaddrinfo (3), +.BR gethostbyaddr (3), +.BR getservbyname (3), +.BR getservbyport (3), +.BR inet_ntop (3), +.BR hosts (5), +.BR services (5), +.BR hostname (7), +.BR named (8) +.PP +R.\& Gilligan, S.\& Thomson, J.\& Bound and W.\& Stevens, +.IR "Basic Socket Interface Extensions for IPv6" , +RFC\ 2553, March 1999. +.PP +Tatsuya Jinmei and Atsushi Onoe, +.IR "An Extension of Format for IPv6 Scoped Addresses" , +internet draft, work in progress +.UR ftp://ftp.ietf.org\:/internet\-drafts\:/draft\-ietf\-ipngwg\-scopedaddr\-format\-02.txt +.UE . +.PP +Craig Metz, +.IR "Protocol Independence Using the Sockets API" , +Proceedings of the freenix track: +2000 USENIX annual technical conference, June 2000 +.ad l +.UR http://www.usenix.org\:/publications\:/library\:/proceedings\:/usenix2000\:/freenix\:/metzprotocol.html +.UE . diff --git a/upstream/opensuse-leap-15-6/man3/getnetent.3 b/upstream/opensuse-leap-15-6/man3/getnetent.3 new file mode 100644 index 00000000..dd480fd4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getnetent.3 @@ -0,0 +1,194 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH getnetent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \- +get network entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct netent *getnetent(void); +.PP +.BI "struct netent *getnetbyname(const char *" name ); +.BI "struct netent *getnetbyaddr(uint32_t " net ", int " type ); +.PP +.BI "void setnetent(int " stayopen ); +.B void endnetent(void); +.fi +.SH DESCRIPTION +The +.BR getnetent () +function reads the next entry from the networks database +and returns a +.I netent +structure containing +the broken-out fields from the entry. +A connection is opened to the database if necessary. +.PP +The +.BR getnetbyname () +function returns a +.I netent +structure +for the entry from the database +that matches the network +.IR name . +.PP +The +.BR getnetbyaddr () +function returns a +.I netent +structure +for the entry from the database +that matches the network number +.I net +of type +.IR type . +The +.I net +argument must be in host byte order. +.PP +The +.BR setnetent () +function opens a connection to the database, +and sets the next entry to the first entry. +If +.I stayopen +is nonzero, +then the connection to the database +will not be closed between calls to one of the +.BR getnet* () +functions. +.PP +The +.BR endnetent () +function closes the connection to the database. +.PP +The +.I netent +structure is defined in +.I +as follows: +.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 +The members of the +.I netent +structure are: +.TP +.I n_name +The official name of the network. +.TP +.I n_aliases +A NULL-terminated list of alternative names for the network. +.TP +.I n_addrtype +The type of the network number; always +.BR AF_INET . +.TP +.I n_net +The network number in host byte order. +.SH RETURN VALUE +The +.BR getnetent (), +.BR getnetbyname (), +and +.BR getnetbyaddr () +functions return a pointer to a +statically allocated +.I netent +structure, or a null pointer if an +error occurs or the end of the file is reached. +.SH FILES +.TP +.I /etc/networks +networks database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getnetent () +T} Thread safety T{ +MT-Unsafe race:netent +race:netentbuf env locale +T} +T{ +.BR getnetbyname () +T} Thread safety T{ +MT-Unsafe race:netbyname +env locale +T} +T{ +.BR getnetbyaddr () +T} Thread safety T{ +MT-Unsafe race:netbyaddr +locale +T} +T{ +.BR setnetent (), +.BR endnetent () +T} Thread safety T{ +MT-Unsafe race:netent env +locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I netent +in +.I race:netent +signifies that if any of the functions +.BR setnetent (), +.BR getnetent (), +or +.BR endnetent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.PP +Before glibc 2.2, the +.I net +argument of +.BR getnetbyaddr () +was of type +.IR long . +.SH SEE ALSO +.BR getnetent_r (3), +.BR getprotoent (3), +.BR getservent (3) +.\" .BR networks (5) +.br +RFC\ 1101 diff --git a/upstream/opensuse-leap-15-6/man3/getnetent_r.3 b/upstream/opensuse-leap-15-6/man3/getnetent_r.3 new file mode 100644 index 00000000..325e47f0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getnetent_r.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getnetent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getnetent_r, getnetbyname_r, getnetbyaddr_r \- get +network entry (reentrant) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getnetent_r(struct netent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct netent **restrict " result , +.BI " int *restrict " h_errnop ); +.BI "int getnetbyname_r(const char *restrict " name , +.BI " struct netent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct netent **restrict " result , +.BI " int *restrict " h_errnop ); +.BI "int getnetbyaddr_r(uint32_t " net ", int " type , +.BI " struct netent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct netent **restrict " result , +.BI " int *restrict " h_errnop ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getnetent_r (), +.BR getnetbyname_r (), +.BR getnetbyaddr_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getnetent_r (), +.BR getnetbyname_r (), +and +.BR getnetbyaddr_r () +functions are the reentrant equivalents of, respectively, +.BR getnetent (3), +.BR getnetbyname (3), +and +.BR getnetbynumber (3). +They differ in the way that the +.I netent +structure is returned, +and in the function calling signature and return value. +This manual page describes just the differences from +the nonreentrant functions. +.PP +Instead of returning a pointer to a statically allocated +.I netent +structure as the function result, +these functions copy the structure into the location pointed to by +.IR result_buf . +.PP +The +.I buf +array is used to store the string fields pointed to by the returned +.I netent +structure. +(The nonreentrant functions allocate these strings in static storage.) +The size of this array is specified in +.IR buflen . +If +.I buf +is too small, the call fails with the error +.BR ERANGE , +and the caller must try again with a larger buffer. +(A buffer of length 1024 bytes should be sufficient for most applications.) +.\" I can find no information on the required/recommended buffer size; +.\" the nonreentrant functions use a 1024 byte buffer -- mtk. +.PP +If the function call successfully obtains a network record, then +.I *result +is set pointing to +.IR result_buf ; +otherwise, +.I *result +is set to NULL. +.PP +The buffer pointed to by +.I h_errnop +is used to return the value that would be stored in the global variable +.I h_errno +by the nonreentrant versions of these functions. +.\" getnetent.3 doesn't document any use of h_errno, but nevertheless +.\" the nonreentrant functions no seem to set h_errno. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return one of the positive error numbers listed in ERRORS. +.PP +On error, record not found +.RB ( getnetbyname_r (), +.BR getnetbyaddr_r ()), +or end of input +.RB ( getnetent_r ()) +.I result +is set to NULL. +.SH ERRORS +.TP +.B ENOENT +.RB ( getnetent_r ()) +No more records in database. +.TP +.B ERANGE +.I buf +is too small. +Try again with a larger buffer +(and increased +.IR buflen ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getnetent_r (), +.BR getnetbyname_r (), +.BR getnetbyaddr_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Functions with similar names exist on some other systems, +though typically with different calling signatures. +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR getnetent (3), +.BR networks (5) diff --git a/upstream/opensuse-leap-15-6/man3/getopt.3 b/upstream/opensuse-leap-15-6/man3/getopt.3 new file mode 100644 index 00000000..3e2fe622 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getopt.3 @@ -0,0 +1,578 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright 2006-2008, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:27:50 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Mon Aug 30 22:02:34 1995 by Jim Van Zandt +.\" longindex is a pointer, has_arg can take 3 values, using consistent +.\" names for optstring and longindex, "\n" in formats fixed. Documenting +.\" opterr and getopt_long_only. Clarified explanations (borrowing heavily +.\" from the source code). +.\" Modified 8 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) +.\" Modified 990715, aeb: changed `EOF' into `-1' since that is what POSIX +.\" says; moreover, EOF is not defined in . +.\" Modified 2002-02-16, joey: added information about nonexistent +.\" option character and colon as first option character +.\" Modified 2004-07-28, Michael Kerrisk +.\" Added text to explain how to order both '[-+]' and ':' at +.\" the start of optstring +.\" Modified 2006-12-15, mtk, Added getopt() example program. +.\" +.TH getopt 3 2023-04-03 "Linux man-pages 6.04" +.SH NAME +getopt, getopt_long, getopt_long_only, +optarg, optind, opterr, optopt \- Parse command-line options +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getopt(int " argc ", char *" argv [], +.BI " const char *" optstring ); +.PP +.BI "extern char *" optarg ; +.BI "extern int " optind ", " opterr ", " optopt ; +.PP +.B #include +.PP +.BI "int getopt_long(int " argc ", char *" argv [], +.BI " const char *" optstring , +.BI " const struct option *" longopts ", int *" longindex ); +.BI "int getopt_long_only(int " argc ", char *" argv [], +.BI " const char *" optstring , +.BI " const struct option *" longopts ", int *" longindex ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getopt (): +.nf + _POSIX_C_SOURCE >= 2 || _XOPEN_SOURCE +.fi +.PP +.BR getopt_long (), +.BR getopt_long_only (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR getopt () +function parses the command-line arguments. +Its arguments +.I argc +and +.I argv +are the argument count and array as passed to the +.IR main () +function on program invocation. +An element of \fIargv\fP that starts with \[aq]\-\[aq] +(and is not exactly "\-" or "\-\-") +is an option element. +The characters of this element +(aside from the initial \[aq]\-\[aq]) are option characters. +If +.BR getopt () +is called repeatedly, it returns successively each of the option characters +from each of the option elements. +.PP +The variable +.I optind +is the index of the next element to be processed in +.IR argv . +The system initializes this value to 1. +The caller can reset it to 1 to restart scanning of the same +.IR argv , +or when scanning a new argument vector. +.PP +If +.BR getopt () +finds another option character, it returns that +character, updating the external variable \fIoptind\fP and a static +variable \fInextchar\fP so that the next call to +.BR getopt () +can +resume the scan with the following option character or +\fIargv\fP-element. +.PP +If there are no more option characters, +.BR getopt () +returns \-1. +Then \fIoptind\fP is the index in \fIargv\fP of the first +\fIargv\fP-element that is not an option. +.PP +.I optstring +is a string containing the legitimate option characters. +A legitimate option character is any visible one byte +.BR ascii (7) +character (for which +.BR isgraph (3) +would return nonzero) that is not \[aq]\-\[aq], \[aq]:\[aq], or \[aq];\[aq]. +If such a +character is followed by a colon, the option requires an argument, so +.BR getopt () +places a pointer to the following text in the same +\fIargv\fP-element, or the text of the following \fIargv\fP-element, in +.IR optarg . +Two colons mean an option takes +an optional arg; if there is text in the current \fIargv\fP-element +(i.e., in the same word as the option name itself, for example, "\-oarg"), +then it is returned in \fIoptarg\fP, otherwise \fIoptarg\fP is set to zero. +This is a GNU extension. +If +.I optstring +contains +.B W +followed by a semicolon, then +.B \-W foo +is treated as the long option +.BR \-\-foo . +(The +.B \-W +option is reserved by POSIX.2 for implementation extensions.) +This behavior is a GNU extension, not available with libraries before +glibc 2. +.PP +By default, +.BR getopt () +permutes the contents of \fIargv\fP as it +scans, so that eventually all the nonoptions are at the end. +Two other scanning modes are also implemented. +If the first character of +\fIoptstring\fP is \[aq]+\[aq] or the environment variable +.B POSIXLY_CORRECT +is set, then option processing stops as soon as a nonoption argument is +encountered. +If \[aq]+\[aq] is not the first character of +.IR optstring , +it is treated as a normal option. +If +.B POSIXLY_CORRECT +behaviour is required in this case +.I optstring +will contain two \[aq]+\[aq] symbols. +If the first character of \fIoptstring\fP is \[aq]\-\[aq], then +each nonoption \fIargv\fP-element is handled as if it were the argument of +an option with character code 1. +(This is used by programs that were +written to expect options and other \fIargv\fP-elements in any order +and that care about the ordering of the two.) +The special argument "\-\-" forces an end of option-scanning regardless +of the scanning mode. +.PP +While processing the option list, +.BR getopt () +can detect two kinds of errors: +(1) an option character that was not specified in +.I optstring +and (2) a missing option argument +(i.e., an option at the end of the command line without an expected argument). +Such errors are handled and reported as follows: +.IP \[bu] 3 +By default, +.BR getopt () +prints an error message on standard error, +places the erroneous option character in +.IR optopt , +and returns \[aq]?\[aq] as the function result. +.IP \[bu] +If the caller has set the global variable +.I opterr +to zero, then +.BR getopt () +does not print an error message. +The caller can determine that there was an error by testing whether +the function return value is \[aq]?\[aq]. +(By default, +.I opterr +has a nonzero value.) +.IP \[bu] +If the first character +(following any optional \[aq]+\[aq] or \[aq]\-\[aq] described above) +of \fIoptstring\fP +is a colon (\[aq]:\[aq]), then +.BR getopt () +likewise does not print an error message. +In addition, it returns \[aq]:\[aq] instead of \[aq]?\[aq] to +indicate a missing option argument. +This allows the caller to distinguish the two different types of errors. +.\" +.SS getopt_long() and getopt_long_only() +The +.BR getopt_long () +function works like +.BR getopt () +except that it also accepts long options, started with two dashes. +(If the program accepts only long options, then +.I optstring +should be specified as an empty string (""), not NULL.) +Long option names may be abbreviated if the abbreviation is +unique or is an exact match for some defined option. +A long option +may take a parameter, of the form +.B \-\-arg=param +or +.BR "\-\-arg param" . +.PP +.I longopts +is a pointer to the first element of an array of +.I struct option +declared in +.I +as +.PP +.in +4n +.EX +struct option { + const char *name; + int has_arg; + int *flag; + int val; +}; +.EE +.in +.PP +The meanings of the different fields are: +.TP +.I name +is the name of the long option. +.TP +.I has_arg +is: +\fBno_argument\fP (or 0) if the option does not take an argument; +\fBrequired_argument\fP (or 1) if the option requires an argument; or +\fBoptional_argument\fP (or 2) if the option takes an optional argument. +.TP +.I flag +specifies how results are returned for a long option. +If \fIflag\fP +is NULL, then +.BR getopt_long () +returns \fIval\fP. +(For example, the calling program may set \fIval\fP to the equivalent short +option character.) +Otherwise, +.BR getopt_long () +returns 0, and +\fIflag\fP points to a variable which is set to \fIval\fP if the +option is found, but left unchanged if the option is not found. +.TP +\fIval\fP +is the value to return, or to load into the variable pointed +to by \fIflag\fP. +.PP +The last element of the array has to be filled with zeros. +.PP +If \fIlongindex\fP is not NULL, it +points to a variable which is set to the index of the long option relative to +.IR longopts . +.PP +.BR getopt_long_only () +is like +.BR getopt_long (), +but \[aq]\-\[aq] as well +as "\-\-" can indicate a long option. +If an option that starts with \[aq]\-\[aq] +(not "\-\-") doesn't match a long option, but does match a short option, +it is parsed as a short option instead. +.SH RETURN VALUE +If an option was successfully found, then +.BR getopt () +returns the option character. +If all command-line options have been parsed, then +.BR getopt () +returns \-1. +If +.BR getopt () +encounters an option character that was not in +.IR optstring , +then \[aq]?\[aq] is returned. +If +.BR getopt () +encounters an option with a missing argument, +then the return value depends on the first character in +.IR optstring : +if it is \[aq]:\[aq], then \[aq]:\[aq] is returned; +otherwise \[aq]?\[aq] is returned. +.PP +.BR getopt_long () +and +.BR getopt_long_only () +also return the option +character when a short option is recognized. +For a long option, they +return \fIval\fP if \fIflag\fP is NULL, and 0 otherwise. +Error and \-1 returns are the same as for +.BR getopt (), +plus \[aq]?\[aq] for an +ambiguous match or an extraneous parameter. +.SH ENVIRONMENT +.TP +.B POSIXLY_CORRECT +If this is set, then option processing stops as soon as a nonoption +argument is encountered. +.TP +.B __GNU_nonoption_argv_flags_ +This variable was used by +.BR bash (1) +2.0 to communicate to glibc which arguments are the results of +wildcard expansion and so should not be considered as options. +This behavior was removed in +.BR bash (1) +2.01, but the support remains in glibc. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getopt (), +.BR getopt_long (), +.BR getopt_long_only () +T} Thread safety T{ +MT-Unsafe race:getopt env +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX specifies that the +.I argv +array argument should be +.IR const , +but these functions permute its elements +unless the environment variable +.B POSIXLY_CORRECT +is set. +.I const +is used in the actual prototype to be compatible with other systems; +however, this page doesn't show the qualifier, +to avoid confusing readers. +.SH STANDARDS +.TP +.BR getopt () +POSIX.1-2008. +.TP +.BR getopt_long () +.TQ +.BR getopt_long_only () +GNU. +.IP +The use of \[aq]+\[aq] and \[aq]\-\[aq] in +.I optstring +is a GNU extension. +.SH HISTORY +.TP +.BR getopt () +POSIX.1-2001, and POSIX.2. +.PP +On some older implementations, +.BR getopt () +was declared in +.IR . +SUSv1 permitted the declaration to appear in either +.I +or +.IR . +POSIX.1-1996 marked the use of +.I +for this purpose as LEGACY. +POSIX.1-2001 does not require the declaration to appear in +.IR . +.SH NOTES +A program that scans multiple argument vectors, +or rescans the same vector more than once, +and wants to make use of GNU extensions such as \[aq]+\[aq] +and \[aq]\-\[aq] at the start of +.IR optstring , +or changes the value of +.B POSIXLY_CORRECT +between scans, +must reinitialize +.BR getopt () +by resetting +.I optind +to 0, rather than the traditional value of 1. +(Resetting to 0 forces the invocation of an internal initialization +routine that rechecks +.B POSIXLY_CORRECT +and checks for GNU extensions in +.IR optstring .) +.PP +Command-line arguments are parsed in strict order +meaning that an option requiring an argument will consume the next argument, +regardless of whether that argument is the correctly specified option argument +or simply the next option +(in the scenario the user mis-specifies the command line). +For example, if +.I optstring +is specified as "1n:" +and the user specifies the command line arguments incorrectly as +.IR "prog\ \-n\ \-1" , +the +.I \-n +option will be given the +.B optarg +value "\-1", and the +.I \-1 +option will be considered to have not been specified. +.SH EXAMPLES +.SS getopt() +The following trivial example program uses +.BR getopt () +to handle two program options: +.IR \-n , +with no associated value; and +.IR "\-t val" , +which expects an associated value. +.PP +.\" SRC BEGIN (getopt.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int flags, opt; + int nsecs, tfnd; + + nsecs = 0; + tfnd = 0; + flags = 0; + while ((opt = getopt(argc, argv, "nt:")) != \-1) { + switch (opt) { + case \[aq]n\[aq]: + flags = 1; + break; + case \[aq]t\[aq]: + nsecs = atoi(optarg); + tfnd = 1; + break; + default: /* \[aq]?\[aq] */ + fprintf(stderr, "Usage: %s [\-t nsecs] [\-n] name\en", + argv[0]); + exit(EXIT_FAILURE); + } + } + + printf("flags=%d; tfnd=%d; nsecs=%d; optind=%d\en", + flags, tfnd, nsecs, optind); + + if (optind >= argc) { + fprintf(stderr, "Expected argument after options\en"); + exit(EXIT_FAILURE); + } + + printf("name argument = %s\en", argv[optind]); + + /* Other code omitted */ + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SS getopt_long() +The following example program illustrates the use of +.BR getopt_long () +with most of its features. +.PP +.\" SRC BEGIN (getopt_long.c) +.EX +#include +#include /* for printf */ +#include /* for exit */ + +int +main(int argc, char *argv[]) +{ + int c; + int digit_optind = 0; + + while (1) { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = { + {"add", required_argument, 0, 0 }, + {"append", no_argument, 0, 0 }, + {"delete", required_argument, 0, 0 }, + {"verbose", no_argument, 0, 0 }, + {"create", required_argument, 0, \[aq]c\[aq]}, + {"file", required_argument, 0, 0 }, + {0, 0, 0, 0 } + }; + + c = getopt_long(argc, argv, "abc:d:012", + long_options, &option_index); + if (c == \-1) + break; + + switch (c) { + case 0: + printf("option %s", long_options[option_index].name); + if (optarg) + printf(" with arg %s", optarg); + printf("\en"); + break; + + case \[aq]0\[aq]: + case \[aq]1\[aq]: + case \[aq]2\[aq]: + if (digit_optind != 0 && digit_optind != this_option_optind) + printf("digits occur in two different argv\-elements.\en"); + digit_optind = this_option_optind; + printf("option %c\en", c); + break; + + case \[aq]a\[aq]: + printf("option a\en"); + break; + + case \[aq]b\[aq]: + printf("option b\en"); + break; + + case \[aq]c\[aq]: + printf("option c with value \[aq]%s\[aq]\en", optarg); + break; + + case \[aq]d\[aq]: + printf("option d with value \[aq]%s\[aq]\en", optarg); + break; + + case \[aq]?\[aq]: + break; + + default: + printf("?? getopt returned character code 0%o ??\en", c); + } + } + + if (optind < argc) { + printf("non\-option ARGV\-elements: "); + while (optind < argc) + printf("%s ", argv[optind++]); + printf("\en"); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getopt (1), +.BR getsubopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/getpass.3 b/upstream/opensuse-leap-15-6/man3/getpass.3 new file mode 100644 index 00000000..b9bde85e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpass.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH getpass 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpass \- get a password +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *getpass(const char *" prompt ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getpass (): +.nf + Since glibc 2.2.2: + _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE + Before glibc 2.2.2: + none +.fi +.SH DESCRIPTION +This function is obsolete. +Do not use it. +See NOTES. +If you want to read input without terminal echoing enabled, +see the description of the +.I ECHO +flag in +.BR termios (3). +.PP +The +.BR getpass () +function opens +.I /dev/tty +(the controlling terminal of the process), outputs the string +.IR prompt , +turns off echoing, reads one line (the "password"), +restores the terminal state and closes +.I /dev/tty +again. +.SH RETURN VALUE +The function +.BR getpass () +returns a pointer to a static buffer containing (the first +.B PASS_MAX +bytes of) the password without the trailing +newline, terminated by a null byte (\[aq]\e0\[aq]). +This buffer may be overwritten by a following call. +On error, the terminal state is restored, +.I errno +is set to indicate the error, and NULL is returned. +.SH ERRORS +.TP +.B ENXIO +The process does not have a controlling terminal. +.SH FILES +.I /dev/tty +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getpass () +T} Thread safety MT-Unsafe term +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +Version 7 AT&T UNIX. +Present in SUSv2, but marked LEGACY. +Removed in POSIX.1-2001. +.SH NOTES +.\" For libc4 and libc5, the prompt is not written to +.\" .I /dev/tty +.\" but to +.\" .IR stderr . +.\" Moreover, if +.\" .I /dev/tty +.\" cannot be opened, the password is read from +.\" .IR stdin . +.\" The static buffer has length 128 so that only the first 127 +.\" bytes of the password are returned. +.\" While reading the password, signal generation +.\" .RB ( SIGINT , +.\" .BR SIGQUIT , +.\" .BR SIGSTOP , +.\" .BR SIGTSTP ) +.\" is disabled and the corresponding characters +.\" (usually control-C, control-\e, control-Z and control-Y) +.\" are transmitted as part of the password. +.\" Since libc 5.4.19 also line editing is disabled, so that also +.\" backspace and the like will be seen as part of the password. +You should use instead +.BR readpassphrase (3bsd), +provided by +.IR libbsd . +.PP +In the GNU C library implementation, if +.I /dev/tty +cannot be opened, the prompt is written to +.I stderr +and the password is read from +.IR stdin . +There is no limit on the length of the password. +Line editing is not disabled. +.PP +According to SUSv2, the value of +.B PASS_MAX +must be defined in +.I +in case it is smaller than 8, and can in any case be obtained using +.IR sysconf(_SC_PASS_MAX) . +However, POSIX.2 withdraws the constants +.B PASS_MAX +and +.BR _SC_PASS_MAX , +and the function +.BR getpass (). +.\" Libc4 and libc5 have never supported +.\" .B PASS_MAX +.\" or +.\" .BR _SC_PASS_MAX . +The glibc version accepts +.B _SC_PASS_MAX +and returns +.B BUFSIZ +(e.g., 8192). +.SH BUGS +The calling process should zero the password as soon as possible to avoid +leaving the cleartext password visible in the process's address space. +.SH SEE ALSO +.BR crypt (3) diff --git a/upstream/opensuse-leap-15-6/man3/getprotoent.3 b/upstream/opensuse-leap-15-6/man3/getprotoent.3 new file mode 100644 index 00000000..774df5bf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getprotoent.3 @@ -0,0 +1,180 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH getprotoent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getprotoent, getprotobyname, getprotobynumber, setprotoent, +endprotoent \- get protocol entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct protoent *getprotoent(void); +.PP +.BI "struct protoent *getprotobyname(const char *" name ); +.BI "struct protoent *getprotobynumber(int " proto ); +.PP +.BI "void setprotoent(int " stayopen ); +.B void endprotoent(void); +.fi +.SH DESCRIPTION +The +.BR getprotoent () +function reads the next entry from the protocols database (see +.BR protocols (5)) +and returns a +.I protoent +structure +containing the broken-out fields from the entry. +A connection is opened to the database if necessary. +.PP +The +.BR getprotobyname () +function returns a +.I protoent +structure +for the entry from the database +that matches the protocol name +.IR name . +A connection is opened to the database if necessary. +.PP +The +.BR getprotobynumber () +function returns a +.I protoent +structure +for the entry from the database +that matches the protocol number +.IR number . +A connection is opened to the database if necessary. +.PP +The +.BR setprotoent () +function opens a connection to the database, +and sets the next entry to the first entry. +If +.I stayopen +is nonzero, +then the connection to the database +will not be closed between calls to one of the +.BR getproto* () +functions. +.PP +The +.BR endprotoent () +function closes the connection to the database. +.PP +The +.I protoent +structure is defined in +.I +as follows: +.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 +The members of the +.I protoent +structure are: +.TP +.I p_name +The official name of the protocol. +.TP +.I p_aliases +A NULL-terminated list of alternative names for the protocol. +.TP +.I p_proto +The protocol number. +.SH RETURN VALUE +The +.BR getprotoent (), +.BR getprotobyname (), +and +.BR getprotobynumber () +functions return a pointer to a +statically allocated +.I protoent +structure, or a null pointer if an +error occurs or the end of the file is reached. +.SH FILES +.PD 0 +.TP +.I /etc/protocols +protocol database file +.PD +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getprotoent () +T} Thread safety T{ +MT-Unsafe race:protoent +race:protoentbuf locale +T} +T{ +.BR getprotobyname () +T} Thread safety T{ +MT-Unsafe race:protobyname +locale +T} +T{ +.BR getprotobynumber () +T} Thread safety T{ +MT-Unsafe race:protobynumber +locale +T} +T{ +.BR setprotoent (), +.BR endprotoent () +T} Thread safety T{ +MT-Unsafe race:protoent +locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I protoent +in +.I race:protoent +signifies that if any of the functions +.BR setprotoent (), +.BR getprotoent (), +or +.BR endprotoent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.SH SEE ALSO +.BR getnetent (3), +.BR getprotoent_r (3), +.BR getservent (3), +.BR protocols (5) diff --git a/upstream/opensuse-leap-15-6/man3/getprotoent_r.3 b/upstream/opensuse-leap-15-6/man3/getprotoent_r.3 new file mode 100644 index 00000000..c365e765 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getprotoent_r.3 @@ -0,0 +1,246 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getprotoent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getprotoent_r, getprotobyname_r, getprotobynumber_r \- get +protocol entry (reentrant) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getprotoent_r(struct protoent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct protoent **restrict " result ); +.BI "int getprotobyname_r(const char *restrict " name , +.BI " struct protoent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct protoent **restrict " result ); +.BI "int getprotobynumber_r(int " proto , +.BI " struct protoent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct protoent **restrict " result ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getprotoent_r (), +.BR getprotobyname_r (), +.BR getprotobynumber_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getprotoent_r (), +.BR getprotobyname_r (), +and +.BR getprotobynumber_r () +functions are the reentrant equivalents of, respectively, +.BR getprotoent (3), +.BR getprotobyname (3), +and +.BR getprotobynumber (3). +They differ in the way that the +.I protoent +structure is returned, +and in the function calling signature and return value. +This manual page describes just the differences from +the nonreentrant functions. +.PP +Instead of returning a pointer to a statically allocated +.I protoent +structure as the function result, +these functions copy the structure into the location pointed to by +.IR result_buf . +.PP +The +.I buf +array is used to store the string fields pointed to by the returned +.I protoent +structure. +(The nonreentrant functions allocate these strings in static storage.) +The size of this array is specified in +.IR buflen . +If +.I buf +is too small, the call fails with the error +.BR ERANGE , +and the caller must try again with a larger buffer. +(A buffer of length 1024 bytes should be sufficient for most applications.) +.\" I can find no information on the required/recommended buffer size; +.\" the nonreentrant functions use a 1024 byte buffer. +.\" The 1024 byte value is also what the Solaris man page suggests. -- mtk +.PP +If the function call successfully obtains a protocol record, then +.I *result +is set pointing to +.IR result_buf ; +otherwise, +.I *result +is set to NULL. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return one of the positive error numbers listed in ERRORS. +.PP +On error, record not found +.RB ( getprotobyname_r (), +.BR getprotobynumber_r ()), +or end of input +.RB ( getprotoent_r ()) +.I result +is set to NULL. +.SH ERRORS +.TP +.B ENOENT +.RB ( getprotoent_r ()) +No more records in database. +.TP +.B ERANGE +.I buf +is too small. +Try again with a larger buffer +(and increased +.IR buflen ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getprotoent_r (), +.BR getprotobyname_r (), +.BR getprotobynumber_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Functions with similar names exist on some other systems, +though typically with different calling signatures. +.SH STANDARDS +GNU. +.SH EXAMPLES +The program below uses +.BR getprotobyname_r () +to retrieve the protocol record for the protocol named +in its first command-line argument. +If a second (integer) command-line argument is supplied, +it is used as the initial value for +.IR buflen ; +if +.BR getprotobyname_r () +fails with the error +.BR ERANGE , +the program retries with larger buffer sizes. +The following shell session shows a couple of sample runs: +.PP +.in +4n +.EX +.RB "$" " ./a.out tcp 1" +ERANGE! Retrying with larger buffer +getprotobyname_r() returned: 0 (success) (buflen=78) +p_name=tcp; p_proto=6; aliases=TCP +.RB "$" " ./a.out xxx 1" +ERANGE! Retrying with larger buffer +getprotobyname_r() returned: 0 (success) (buflen=100) +Call failed/record not found +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (getprotoent_r.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +#define MAX_BUF 10000 + +int +main(int argc, char *argv[]) +{ + int buflen, erange_cnt, s; + struct protoent result_buf; + struct protoent *result; + char buf[MAX_BUF]; + + if (argc < 2) { + printf("Usage: %s proto\-name [buflen]\en", argv[0]); + exit(EXIT_FAILURE); + } + + buflen = 1024; + if (argc > 2) + buflen = atoi(argv[2]); + + if (buflen > MAX_BUF) { + printf("Exceeded buffer limit (%d)\en", MAX_BUF); + exit(EXIT_FAILURE); + } + + erange_cnt = 0; + do { + s = getprotobyname_r(argv[1], &result_buf, + buf, buflen, &result); + if (s == ERANGE) { + if (erange_cnt == 0) + printf("ERANGE! Retrying with larger buffer\en"); + erange_cnt++; + + /* Increment a byte at a time so we can see exactly + what size buffer was required. */ + + buflen++; + + if (buflen > MAX_BUF) { + printf("Exceeded buffer limit (%d)\en", MAX_BUF); + exit(EXIT_FAILURE); + } + } + } while (s == ERANGE); + + printf("getprotobyname_r() returned: %s (buflen=%d)\en", + (s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" : + strerror(s), buflen); + + if (s != 0 || result == NULL) { + printf("Call failed/record not found\en"); + exit(EXIT_FAILURE); + } + + printf("p_name=%s; p_proto=%d; aliases=", + result_buf.p_name, result_buf.p_proto); + for (char **p = result_buf.p_aliases; *p != NULL; p++) + printf("%s ", *p); + printf("\en"); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getprotoent (3), +.BR protocols (5) diff --git a/upstream/opensuse-leap-15-6/man3/getpt.3 b/upstream/opensuse-leap-15-6/man3/getpt.3 new file mode 100644 index 00000000..560c0ec2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpt.3 @@ -0,0 +1,77 @@ +'\" t +.\" This man page was written by Jeremy Phelps . +.\" +.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE) +.\" Redistribute and modify at will. +.\" %%%LICENSE_END +.\" +.TH getpt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpt \- open a new pseudoterminal master +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B "int getpt(void);" +.fi +.SH DESCRIPTION +.BR getpt () +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 RETURN VALUE +.BR getpt () +returns an open file descriptor upon successful completion. +Otherwise, it +returns \-1 and sets +.I errno +to indicate the error. +.SH ERRORS +.BR getpt () +can fail with various errors described in +.BR open (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getpt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Use +.BR posix_openpt (3) +instead. +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH SEE ALSO +.BR grantpt (3), +.BR posix_openpt (3), +.BR ptsname (3), +.BR unlockpt (3), +.BR ptmx (4), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/getpw.3 b/upstream/opensuse-leap-15-6/man3/getpw.3 new file mode 100644 index 00000000..e7169173 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpw.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH getpw 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpw \- reconstruct password line entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.B #include +.PP +.BI "[[deprecated]] int getpw(uid_t " uid ", char *" buf ); +.fi +.SH DESCRIPTION +The +.BR getpw () +function reconstructs the password line entry for +the given user ID \fIuid\fP in the buffer \fIbuf\fP. +The returned buffer contains a line of format +.PP +.in +4n +.EX +.B name:passwd:uid:gid:gecos:dir:shell +.EE +.in +.PP +The \fIpasswd\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* user information */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR passwd (5). +.SH RETURN VALUE +The +.BR getpw () +function returns 0 on success; on error, it returns \-1, and +.I errno +is set to indicate the error. +.PP +If +.I uid +is not found in the password database, +.BR getpw () +returns \-1, sets +.I errno +to 0, and leaves +.I buf +unchanged. +.SH ERRORS +.TP +.BR 0 " or " ENOENT +No user corresponding to +.IR uid . +.TP +.B EINVAL +.I buf +is NULL. +.TP +.B ENOMEM +Insufficient memory to allocate +.I passwd +structure. +.SH FILES +.TP +.I /etc/passwd +password database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getpw () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr2. +.SH BUGS +The +.BR getpw () +function is dangerous as it may overflow the provided buffer +.IR buf . +It is obsoleted by +.BR getpwuid (3). +.SH SEE ALSO +.BR endpwent (3), +.BR fgetpwent (3), +.BR getpwent (3), +.BR getpwnam (3), +.BR getpwuid (3), +.BR putpwent (3), +.BR setpwent (3), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/getpwent.3 b/upstream/opensuse-leap-15-6/man3/getpwent.3 new file mode 100644 index 00000000..199be566 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpwent.3 @@ -0,0 +1,187 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH getpwent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpwent, setpwent, endpwent \- get password file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.B struct passwd *getpwent(void); +.B void setpwent(void); +.B void endpwent(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getpwent (), +.BR setpwent (), +.BR endpwent (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getpwent () +function returns a pointer to a structure containing +the broken-out fields of a record from the password database +(e.g., the local password file +.IR /etc/passwd , +NIS, and LDAP). +The first time +.BR getpwent () +is called, it returns the first entry; thereafter, it returns successive +entries. +.PP +The +.BR setpwent () +function rewinds to the beginning +of the password database. +.PP +The +.BR endpwent () +function is used to close the password database +after all processing has been performed. +.PP +The \fIpasswd\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* user information */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR passwd (5). +.SH RETURN VALUE +The +.BR getpwent () +function returns a pointer to a +.I passwd +structure, or NULL if +there are no more entries or an error occurred. +If an error occurs, +.I errno +is set to indicate the error. +If one wants to check +.I errno +after the call, it should be set to zero before the call. +.PP +The return value may point to a static area, and may be overwritten +by subsequent calls to +.BR getpwent (), +.BR getpwnam (3), +or +.BR getpwuid (3). +(Do not pass the returned pointer to +.BR free (3).) +.SH ERRORS +.TP +.B EINTR +A signal was caught; see +.BR signal (7). +.TP +.B EIO +I/O error. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOMEM +.\" not in POSIX +Insufficient memory to allocate +.I passwd +structure. +.\" to allocate the passwd structure, or to allocate buffers +.TP +.B ERANGE +Insufficient buffer space supplied. +.SH FILES +.TP +.I /etc/passwd +local password database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getpwent () +T} Thread safety T{ +MT-Unsafe race:pwent +race:pwentbuf locale +T} +T{ +.BR setpwent (), +.BR endpwent () +T} Thread safety T{ +MT-Unsafe race:pwent locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I pwent +in +.I race:pwent +signifies that if any of the functions +.BR setpwent (), +.BR getpwent (), +or +.BR endpwent () +are used in parallel in different threads of a program, +then data races could occur. +.SH VERSIONS +The +.I pw_gecos +field is not specified in POSIX, but is present on most implementations. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR fgetpwent (3), +.BR getpw (3), +.BR getpwent_r (3), +.BR getpwnam (3), +.BR getpwuid (3), +.BR putpwent (3), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/getpwent_r.3 b/upstream/opensuse-leap-15-6/man3/getpwent_r.3 new file mode 100644 index 00000000..46c5bef5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpwent_r.3 @@ -0,0 +1,225 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH getpwent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpwent_r, fgetpwent_r \- get passwd file entry reentrantly +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getpwent_r(struct passwd *restrict " pwbuf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct passwd **restrict " pwbufp ); +.BI "int fgetpwent_r(FILE *restrict " stream \ +", struct passwd *restrict " pwbuf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct passwd **restrict " pwbufp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getpwent_r (), +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR fgetpwent_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +The functions +.BR getpwent_r () +and +.BR fgetpwent_r () +are the reentrant versions of +.BR getpwent (3) +and +.BR fgetpwent (3). +The former reads the next passwd entry from the stream initialized by +.BR setpwent (3). +The latter reads the next passwd entry from +.IR stream . +.PP +The \fIpasswd\fP structure is defined in +.I +as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* user information */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.PP +For more information about the fields of this structure, see +.BR passwd (5). +.PP +The nonreentrant functions return a pointer to static storage, +where this static storage contains further pointers to user +name, password, gecos field, home directory and shell. +The reentrant functions described here return all of that in +caller-provided buffers. +First of all there is the buffer +.I pwbuf +that can hold a \fIstruct passwd\fP. +And next the buffer +.I buf +of size +.I buflen +that can hold additional strings. +The result of these functions, the \fIstruct passwd\fP read from the stream, +is stored in the provided buffer +.IR *pwbuf , +and a pointer to this \fIstruct passwd\fP is returned in +.IR *pwbufp . +.SH RETURN VALUE +On success, these functions return 0 and +.I *pwbufp +is a pointer to the \fIstruct passwd\fP. +On error, these functions return an error value and +.I *pwbufp +is NULL. +.SH ERRORS +.TP +.B ENOENT +No more entries. +.TP +.B ERANGE +Insufficient buffer space supplied. +Try again with larger buffer. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getpwent_r () +T} Thread safety T{ +MT-Unsafe race:pwent locale +T} +T{ +.BR fgetpwent_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +In the above table, +.I pwent +in +.I race:pwent +signifies that if any of the functions +.BR setpwent (), +.BR getpwent (), +.BR endpwent (), +or +.BR getpwent_r () +are used in parallel in different threads of a program, +then data races could occur. +.SH VERSIONS +Other systems use the prototype +.PP +.in +4n +.EX +struct passwd * +getpwent_r(struct passwd *pwd, char *buf, int buflen); +.EE +.in +.PP +or, better, +.PP +.in +4n +.EX +int +getpwent_r(struct passwd *pwd, char *buf, int buflen, + FILE **pw_fp); +.EE +.in +.SH STANDARDS +None. +.SH HISTORY +These functions are done in a style resembling +the POSIX version of functions like +.BR getpwnam_r (3). +.SH NOTES +The function +.BR getpwent_r () +is not really reentrant since it shares the reading position +in the stream with all other threads. +.SH EXAMPLES +.\" SRC BEGIN (getpwent_r.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include + +#define BUFLEN 4096 + +int +main(void) +{ + struct passwd pw; + struct passwd *pwp; + char buf[BUFLEN]; + int i; + + setpwent(); + while (1) { + i = getpwent_r(&pw, buf, sizeof(buf), &pwp); + if (i) + break; + printf("%s (%jd)\etHOME %s\etSHELL %s\en", pwp\->pw_name, + (intmax_t) pwp\->pw_uid, pwp\->pw_dir, pwp\->pw_shell); + } + endpwent(); + exit(EXIT_SUCCESS); +} +.EE +.\" perhaps add error checking - should use strerror_r +.\" #include +.\" #include +.\" if (i) { +.\" if (i == ENOENT) +.\" break; +.\" printf("getpwent_r: %s", strerror(i)); +.\" exit(EXIT_SUCCESS); +.\" } +.\" SRC END +.SH SEE ALSO +.BR fgetpwent (3), +.BR getpw (3), +.BR getpwent (3), +.BR getpwnam (3), +.BR getpwuid (3), +.BR putpwent (3), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/getpwnam.3 b/upstream/opensuse-leap-15-6/man3/getpwnam.3 new file mode 100644 index 00000000..8cf23feb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getpwnam.3 @@ -0,0 +1,343 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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(). +.\" +.TH getpwnam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getpwnam, getpwnam_r, getpwuid, getpwuid_r \- get password file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "struct passwd *getpwnam(const char *" name ); +.BI "struct passwd *getpwuid(uid_t " uid ); +.PP +.BI "int getpwnam_r(const char *restrict " name ", \ +struct passwd *restrict " pwd , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct passwd **restrict " result ); +.BI "int getpwuid_r(uid_t " uid ", struct passwd *restrict " pwd , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct passwd **restrict " result ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getpwnam_r (), +.BR getpwuid_r (): +.nf + _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getpwnam () +function returns a pointer to a structure containing +the broken-out fields of the record in the password database +(e.g., the local password file +.IR /etc/passwd , +NIS, and LDAP) +that matches the username +.IR name . +.PP +The +.BR getpwuid () +function returns a pointer to a structure containing +the broken-out fields of the record in the password database +that matches the user ID +.IR uid . +.PP +The \fIpasswd\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* user information */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.PP +See +.BR passwd (5) +for more information about these fields. +.PP +The +.BR getpwnam_r () +and +.BR getpwuid_r () +functions obtain the same information as +.BR getpwnam () +and +.BR getpwuid (), +but store the retrieved +.I passwd +structure in the space pointed to by +.IR pwd . +The string fields pointed to by the members of the +.I passwd +structure are stored in the buffer +.I buf +of size +.IR buflen . +A pointer to the result (in case of success) or NULL (in case no entry +was found or an error occurred) is stored in +.IR *result . +.PP +The call +.PP +.in +4n +.EX +sysconf(_SC_GETPW_R_SIZE_MAX) +.EE +.in +.PP +returns either \-1, without changing +.IR errno , +or an initial suggested size for +.IR buf . +(If this size is too small, +the call fails with +.BR ERANGE , +in which case the caller can retry with a larger buffer.) +.SH RETURN VALUE +The +.BR getpwnam () +and +.BR getpwuid () +functions return a pointer to a +.I passwd +structure, or NULL if the matching entry is not found or +an error occurs. +If an error occurs, +.I errno +is set to indicate the error. +If one wants to check +.I errno +after the call, it should be set to zero before the call. +.PP +The return value may point to a static area, and may be overwritten +by subsequent calls to +.BR getpwent (3), +.BR getpwnam (), +or +.BR getpwuid (). +(Do not pass the returned pointer to +.BR free (3).) +.PP +On success, +.BR getpwnam_r () +and +.BR getpwuid_r () +return zero, and set +.I *result +to +.IR pwd . +If no matching password record was found, +these functions return 0 and store NULL in +.IR *result . +In case of error, an error number is returned, and NULL is stored in +.IR *result . +.SH ERRORS +.TP +.BR 0 " or " ENOENT " or " ESRCH " or " EBADF " or " EPERM " or ..." +The given +.I name +or +.I uid +was not found. +.TP +.B EINTR +A signal was caught; see +.BR signal (7). +.TP +.B EIO +I/O error. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOMEM +.\" not in POSIX +Insufficient memory to allocate +.I passwd +structure. +.\" This structure is static, allocated 0 or 1 times. No memory leak. (libc45) +.TP +.B ERANGE +Insufficient buffer space supplied. +.SH FILES +.TP +.I /etc/passwd +local password database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getpwnam () +T} Thread safety T{ +MT-Unsafe race:pwnam locale +T} +T{ +.BR getpwuid () +T} Thread safety T{ +MT-Unsafe race:pwuid locale +T} +T{ +.BR getpwnam_r (), +.BR getpwuid_r () +T} Thread safety T{ +MT-Safe locale +T} +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The +.I pw_gecos +field is not specified in POSIX, but is present on most implementations. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH NOTES +The formulation given above under "RETURN VALUE" is from POSIX.1-2001. +It does not call "not found" an error, and hence does not specify what value +.I errno +might have in this situation. +But that makes it impossible to recognize +errors. +One might argue that according to POSIX +.I errno +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. +.\" more precisely: +.\" AIX 5.1 - gives ESRCH +.\" OSF1 4.0g - gives EWOULDBLOCK +.\" libc, glibc up to glibc 2.6, Irix 6.5 - give ENOENT +.\" since glibc 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 +.PP +The +.I pw_dir +field contains the name of the initial working directory of the user. +Login programs use the value of this field to initialize the +.B HOME +environment variable for the login shell. +An application that wants to determine its user's home directory +should inspect the value of +.B HOME +(rather than the value +.IR getpwuid(getuid())\->pw_dir ) +since this allows the user to modify their notion of +"the home directory" during a login session. +To determine the (initial) home directory of another user, +it is necessary to use +.I getpwnam("username")\->pw_dir +or similar. +.SH EXAMPLES +The program below demonstrates the use of +.BR getpwnam_r () +to find the full username and user ID for the username +supplied as a command-line argument. +.PP +.\" SRC BEGIN (getpwnam.c) +.EX +#include +#include +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + struct passwd pwd; + struct passwd *result; + char *buf; + long 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) /* Value was indeterminate */ + bufsize = 16384; /* Should be more than enough */ + + 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 +.\" SRC END +.SH SEE ALSO +.BR endpwent (3), +.BR fgetpwent (3), +.BR getgrnam (3), +.BR getpw (3), +.BR getpwent (3), +.BR getspnam (3), +.BR putpwent (3), +.BR setpwent (3), +.BR passwd (5) diff --git a/upstream/opensuse-leap-15-6/man3/getrpcent.3 b/upstream/opensuse-leap-15-6/man3/getrpcent.3 new file mode 100644 index 00000000..df625667 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getrpcent.3 @@ -0,0 +1,137 @@ +'\" t +.\" 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 +.TH getrpcent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- get +RPC entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct rpcent *getrpcent(void); +.PP +.BI "struct rpcent *getrpcbyname(const char *" name ); +.BI "struct rpcent *getrpcbynumber(int " number ); +.PP +.BI "void setrpcent(int " stayopen ); +.B void endrpcent(void); +.fi +.SH DESCRIPTION +The +.BR getrpcent (), +.BR getrpcbyname (), +and +.BR getrpcbynumber () +functions each return a pointer to an object with the +following structure containing the broken-out +fields of an entry in the RPC program number data base. +.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 +The members of this structure are: +.TP +.I r_name +The name of the server for this RPC program. +.TP +.I r_aliases +A NULL-terminated list of alternate names for the RPC program. +.TP +.I r_number +The RPC program number for this service. +.PP +The +.BR getrpcent () +function reads the next entry from the database. +A connection is opened to the database if necessary. +.PP +The +.BR setrpcent () +function opens a connection to the database, +and sets the next entry to the first entry. +If +.I stayopen +is nonzero, +then the connection to the database +will not be closed between calls to one of the +.BR getrpc* () +functions. +.PP +The +.BR endrpcent () +function closes the connection to the database. +.PP +The +.BR getrpcbyname () +and +.BR getrpcbynumber () +functions sequentially search from the beginning +of the file until a matching RPC program name or +program number is found, or until end-of-file is encountered. +.SH RETURN VALUE +On success, +.BR getrpcent (), +.BR getrpcbyname (), +and +.BR getrpcbynumber () +return a pointer to a statically allocated +.I rpcent +structure. +NULL is returned on EOF or error. +.SH FILES +.TP +.I /etc/rpc +RPC program number database. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getrpcent (), +.BR getrpcbyname (), +.BR getrpcbynumber () +T} Thread safety MT-Unsafe +T{ +.BR setrpcent (), +.BR endrpcent () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +BSD, Solaris. +.SH BUGS +All information +is contained in a static area +so it must be copied if it is +to be saved. +.SH SEE ALSO +.BR getrpcent_r (3), +.BR rpc (5), +.BR rpcinfo (8), +.BR ypserv (8) diff --git a/upstream/opensuse-leap-15-6/man3/getrpcent_r.3 b/upstream/opensuse-leap-15-6/man3/getrpcent_r.3 new file mode 100644 index 00000000..542f72ac --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getrpcent_r.3 @@ -0,0 +1,139 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getrpcent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- get +RPC entry (reentrant) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getrpcent_r(struct rpcent *" result_buf ", char " buf [. buflen ], +.BI " size_t " buflen ", struct rpcent **" result ); +.BI "int getrpcbyname_r(const char *" name , +.BI " struct rpcent *" result_buf ", char " buf [. buflen ], +.BI " size_t " buflen ", struct rpcent **" result ); +.BI "int getrpcbynumber_r(int " number , +.BI " struct rpcent *" result_buf ", char " buf [. buflen ], +.BI " size_t " buflen ", struct rpcent **" result ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getrpcent_r (), +.BR getrpcbyname_r (), +.BR getrpcbynumber_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getrpcent_r (), +.BR getrpcbyname_r (), +and +.BR getrpcbynumber_r () +functions are the reentrant equivalents of, respectively, +.BR getrpcent (3), +.BR getrpcbyname (3), +and +.BR getrpcbynumber (3). +They differ in the way that the +.I rpcent +structure is returned, +and in the function calling signature and return value. +This manual page describes just the differences from +the nonreentrant functions. +.PP +Instead of returning a pointer to a statically allocated +.I rpcent +structure as the function result, +these functions copy the structure into the location pointed to by +.IR result_buf . +.PP +The +.I buf +array is used to store the string fields pointed to by the returned +.I rpcent +structure. +(The nonreentrant functions allocate these strings in static storage.) +The size of this array is specified in +.IR buflen . +If +.I buf +is too small, the call fails with the error +.BR ERANGE , +and the caller must try again with a larger buffer. +(A buffer of length 1024 bytes should be sufficient for most applications.) +.\" I can find no information on the required/recommended buffer size; +.\" the nonreentrant functions use a 1024 byte buffer -- mtk. +.PP +If the function call successfully obtains an RPC record, then +.I *result +is set pointing to +.IR result_buf ; +otherwise, +.I *result +is set to NULL. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return one of the positive error numbers listed in ERRORS. +.PP +On error, record not found +.RB ( getrpcbyname_r (), +.BR getrpcbynumber_r ()), +or end of input +.RB ( getrpcent_r ()) +.I result +is set to NULL. +.SH ERRORS +.TP +.B ENOENT +.RB ( getrpcent_r ()) +No more records in database. +.TP +.B ERANGE +.I buf +is too small. +Try again with a larger buffer +(and increased +.IR buflen ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getrpcent_r (), +.BR getrpcbyname_r (), +.BR getrpcbynumber_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Functions with similar names exist on some other systems, +though typically with different calling signatures. +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR getrpcent (3), +.BR rpc (5) diff --git a/upstream/opensuse-leap-15-6/man3/getrpcport.3 b/upstream/opensuse-leap-15-6/man3/getrpcport.3 new file mode 100644 index 00000000..8be4579b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getrpcport.3 @@ -0,0 +1,62 @@ +'\" t +.\" 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 +.TH getrpcport 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getrpcport \- get RPC port number +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int getrpcport(const char *" host ", unsigned long " prognum , +.BI " unsigned long " versnum ", unsigned int " proto ); +.fi +.SH DESCRIPTION +.BR getrpcport () +returns the port number for version +.I versnum +of the RPC program +.I prognum +running on +.I host +and using protocol +.IR proto . +It returns 0 if it cannot contact the portmapper, or if +.I prognum +is not registered. +If +.I prognum +is registered but not with version +.IR versnum , +it will still return a port number (for some version of the program) +indicating that the program is indeed registered. +The version mismatch will be detected upon the first call to the service. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getrpcport () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +BSD, Solaris. diff --git a/upstream/opensuse-leap-15-6/man3/gets.3 b/upstream/opensuse-leap-15-6/man3/gets.3 new file mode 100644 index 00000000..eac941db --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gets.3 @@ -0,0 +1,110 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl) +.\" Modified 2013-12-31, David Malcolm +.\" Split gets(3) into its own page; fgetc() et al. move to fgetc(3) +.TH gets 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gets \- get a string from standard input (DEPRECATED) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *gets(char *" "s" ); +.fi +.SH DESCRIPTION +.IR "Never use this function" . +.PP +.BR gets () +reads a line from +.I stdin +into the buffer pointed to by +.I s +until either a terminating newline or +.BR EOF , +which it replaces with a null byte (\[aq]\e0\[aq]). +No check for buffer overrun is performed (see BUGS below). +.SH RETURN VALUE +.BR gets () +returns +.I s +on success, and NULL +on error or when end of file occurs while no characters have been read. +However, given the lack of buffer overrun checking, there can be no +guarantees that the function will even return. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR gets () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.PP +LSB deprecates +.BR gets (). +POSIX.1-2008 marks +.BR gets () +obsolescent. +ISO C11 removes the specification of +.BR gets () +from the C language, and since glibc 2.16, +glibc header files don't expose the function declaration if the +.B _ISOC11_SOURCE +feature test macro is defined. +.SH BUGS +Never use +.BR gets (). +Because it is impossible to tell without knowing the data in advance how many +characters +.BR gets () +will read, and because +.BR gets () +will continue to store characters past the end of the buffer, +it is extremely dangerous to use. +It has been used to break computer security. +Use +.BR fgets () +instead. +.PP +For more information, see CWE-242 (aka "Use of Inherently Dangerous +Function") at +http://cwe.mitre.org/data/definitions/242.html +.SH SEE ALSO +.BR read (2), +.BR write (2), +.BR ferror (3), +.BR fgetc (3), +.BR fgets (3), +.BR fgetwc (3), +.BR fgetws (3), +.BR fopen (3), +.BR fread (3), +.BR fseek (3), +.BR getline (3), +.BR getwchar (3), +.BR puts (3), +.BR scanf (3), +.BR ungetwc (3), +.BR unlocked_stdio (3), +.BR feature_test_macros (7) diff --git a/upstream/opensuse-leap-15-6/man3/getservent.3 b/upstream/opensuse-leap-15-6/man3/getservent.3 new file mode 100644 index 00000000..02372380 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getservent.3 @@ -0,0 +1,197 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze +.\" 2001-07-25 added a clause about NULL proto (Martin Michlmayr or David N. Welton) +.\" +.TH getservent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getservent, getservbyname, getservbyport, setservent, endservent \- +get service entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct servent *getservent(void); +.PP +.BI "struct servent *getservbyname(const char *" name ", const char *" proto ); +.BI "struct servent *getservbyport(int " port ", const char *" proto ); +.PP +.BI "void setservent(int " stayopen ); +.B void endservent(void); +.fi +.SH DESCRIPTION +The +.BR getservent () +function reads the next entry from the services database (see +.BR services (5)) +and returns a +.I servent +structure containing +the broken-out fields from the entry. +A connection is opened to the database if necessary. +.PP +The +.BR getservbyname () +function returns a +.I servent +structure +for the entry from the database +that matches the service +.I name +using protocol +.IR proto . +If +.I proto +is NULL, any protocol will be matched. +A connection is opened to the database if necessary. +.PP +The +.BR getservbyport () +function returns a +.I servent +structure +for the entry from the database +that matches the port +.I port +(given in network byte order) +using protocol +.IR proto . +If +.I proto +is NULL, any protocol will be matched. +A connection is opened to the database if necessary. +.PP +The +.BR setservent () +function opens a connection to the database, +and sets the next entry to the first entry. +If +.I stayopen +is nonzero, +then the connection to the database +will not be closed between calls to one of the +.BR getserv* () +functions. +.PP +The +.BR endservent () +function closes the connection to the database. +.PP +The +.I servent +structure is defined in +.I +as follows: +.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 +The members of the +.I servent +structure are: +.TP +.I s_name +The official name of the service. +.TP +.I s_aliases +A NULL-terminated list of alternative names for the service. +.TP +.I s_port +The port number for the service given in network byte order. +.TP +.I s_proto +The name of the protocol to use with this service. +.SH RETURN VALUE +The +.BR getservent (), +.BR getservbyname (), +and +.BR getservbyport () +functions return a pointer to a +statically allocated +.I servent +structure, or NULL if an +error occurs or the end of the file is reached. +.SH FILES +.TP +.I /etc/services +services database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getservent () +T} Thread safety T{ +MT-Unsafe race:servent +race:serventbuf locale +T} +T{ +.BR getservbyname () +T} Thread safety T{ +MT-Unsafe race:servbyname +locale +T} +T{ +.BR getservbyport () +T} Thread safety T{ +MT-Unsafe race:servbyport +locale +T} +T{ +.BR setservent (), +.BR endservent () +T} Thread safety T{ +MT-Unsafe race:servent +locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I servent +in +.I race:servent +signifies that if any of the functions +.BR setservent (), +.BR getservent (), +or +.BR endservent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.SH SEE ALSO +.BR getnetent (3), +.BR getprotoent (3), +.BR getservent_r (3), +.BR services (5) diff --git a/upstream/opensuse-leap-15-6/man3/getservent_r.3 b/upstream/opensuse-leap-15-6/man3/getservent_r.3 new file mode 100644 index 00000000..59937813 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getservent_r.3 @@ -0,0 +1,252 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getservent_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getservent_r, getservbyname_r, getservbyport_r \- get +service entry (reentrant) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getservent_r(struct servent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyname_r(const char *restrict " name , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct servent **restrict " result ); +.BI "int getservbyport_r(int " port , +.BI " const char *restrict " proto , +.BI " struct servent *restrict " result_buf , +.BI " char " buf "[restrict ." buflen "], size_t " buflen , +.BI " struct servent **restrict " result ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getservent_r (), +.BR getservbyname_r (), +.BR getservbyport_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR getservent_r (), +.BR getservbyname_r (), +and +.BR getservbyport_r () +functions are the reentrant equivalents of, respectively, +.BR getservent (3), +.BR getservbyname (3), +and +.BR getservbyport (3). +They differ in the way that the +.I servent +structure is returned, +and in the function calling signature and return value. +This manual page describes just the differences from +the nonreentrant functions. +.PP +Instead of returning a pointer to a statically allocated +.I servent +structure as the function result, +these functions copy the structure into the location pointed to by +.IR result_buf . +.PP +The +.I buf +array is used to store the string fields pointed to by the returned +.I servent +structure. +(The nonreentrant functions allocate these strings in static storage.) +The size of this array is specified in +.IR buflen . +If +.I buf +is too small, the call fails with the error +.BR ERANGE , +and the caller must try again with a larger buffer. +(A buffer of length 1024 bytes should be sufficient for most applications.) +.\" I can find no information on the required/recommended buffer size; +.\" the nonreentrant functions use a 1024 byte buffer -- mtk. +.PP +If the function call successfully obtains a service record, then +.I *result +is set pointing to +.IR result_buf ; +otherwise, +.I *result +is set to NULL. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return one of the positive error numbers listed in errors. +.PP +On error, record not found +.RB ( getservbyname_r (), +.BR getservbyport_r ()), +or end of input +.RB ( getservent_r ()) +.I result +is set to NULL. +.SH ERRORS +.TP +.B ENOENT +.RB ( getservent_r ()) +No more records in database. +.TP +.B ERANGE +.I buf +is too small. +Try again with a larger buffer +(and increased +.IR buflen ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getservent_r (), +.BR getservbyname_r (), +.BR getservbyport_r () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Functions with similar names exist on some other systems, +though typically with different calling signatures. +.SH STANDARDS +GNU. +.SH EXAMPLES +The program below uses +.BR getservbyport_r () +to retrieve the service record for the port and protocol named +in its first command-line argument. +If a third (integer) command-line argument is supplied, +it is used as the initial value for +.IR buflen ; +if +.BR getservbyport_r () +fails with the error +.BR ERANGE , +the program retries with larger buffer sizes. +The following shell session shows a couple of sample runs: +.PP +.in +4n +.EX +.RB "$" " ./a.out 7 tcp 1" +ERANGE! Retrying with larger buffer +getservbyport_r() returned: 0 (success) (buflen=87) +s_name=echo; s_proto=tcp; s_port=7; aliases= +.RB "$" " ./a.out 77777 tcp" +getservbyport_r() returned: 0 (success) (buflen=1024) +Call failed/record not found +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (getservent_r.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +#define MAX_BUF 10000 + +int +main(int argc, char *argv[]) +{ + int buflen, erange_cnt, port, s; + struct servent result_buf; + struct servent *result; + char buf[MAX_BUF]; + char *protop; + + if (argc < 3) { + printf("Usage: %s port\-num proto\-name [buflen]\en", argv[0]); + exit(EXIT_FAILURE); + } + + port = htons(atoi(argv[1])); + protop = (strcmp(argv[2], "null") == 0 || + strcmp(argv[2], "NULL") == 0) ? NULL : argv[2]; + + buflen = 1024; + if (argc > 3) + buflen = atoi(argv[3]); + + if (buflen > MAX_BUF) { + printf("Exceeded buffer limit (%d)\en", MAX_BUF); + exit(EXIT_FAILURE); + } + + erange_cnt = 0; + do { + s = getservbyport_r(port, protop, &result_buf, + buf, buflen, &result); + if (s == ERANGE) { + if (erange_cnt == 0) + printf("ERANGE! Retrying with larger buffer\en"); + erange_cnt++; + + /* Increment a byte at a time so we can see exactly + what size buffer was required. */ + + buflen++; + + if (buflen > MAX_BUF) { + printf("Exceeded buffer limit (%d)\en", MAX_BUF); + exit(EXIT_FAILURE); + } + } + } while (s == ERANGE); + + printf("getservbyport_r() returned: %s (buflen=%d)\en", + (s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" : + strerror(s), buflen); + + if (s != 0 || result == NULL) { + printf("Call failed/record not found\en"); + exit(EXIT_FAILURE); + } + + printf("s_name=%s; s_proto=%s; s_port=%d; aliases=", + result_buf.s_name, result_buf.s_proto, + ntohs(result_buf.s_port)); + for (char **p = result_buf.s_aliases; *p != NULL; p++) + printf("%s ", *p); + printf("\en"); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getservent (3), +.BR services (5) diff --git a/upstream/opensuse-leap-15-6/man3/getspnam.3 b/upstream/opensuse-leap-15-6/man3/getspnam.3 new file mode 100644 index 00000000..9ac2d2e6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getspnam.3 @@ -0,0 +1,320 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) and +.\" Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH getspnam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, +fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent, +lckpwdf, ulckpwdf \- get shadow password file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +/* General shadow password file API */ +.B #include +.PP +.BI "struct spwd *getspnam(const char *" name ); +.B struct spwd *getspent(void); +.PP +.B void setspent(void); +.B void endspent(void); +.PP +.BI "struct spwd *fgetspent(FILE *" stream ); +.BI "struct spwd *sgetspent(const char *" s ); +.PP +.BI "int putspent(const struct spwd *" p ", FILE *" stream ); +.PP +.B int lckpwdf(void); +.B int ulckpwdf(void); +.PP +/* GNU extension */ +.B #include +.PP +.BI "int getspent_r(struct spwd *" spbuf , +.BI " char " buf [. buflen "], size_t " buflen ", \ +struct spwd **" spbufp ); +.BI "int getspnam_r(const char *" name ", struct spwd *" spbuf , +.BI " char " buf [. buflen "], size_t " buflen ", \ +struct spwd **" spbufp ); +.PP +.BI "int fgetspent_r(FILE *" stream ", struct spwd *" spbuf , +.BI " char " buf [. buflen "], size_t " buflen ", \ +struct spwd **" spbufp ); +.BI "int sgetspent_r(const char *" s ", struct spwd *" spbuf , +.BI " char " buf [. buflen "], size_t " buflen ", \ +struct spwd **" spbufp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getspent_r (), +.BR getspnam_r (), +.BR fgetspent_r (), +.BR sgetspent_r (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +Long ago it was considered safe to have encrypted passwords openly +visible in the password file. +When computers got faster and people +got more security-conscious, this was no longer acceptable. +Julianne Frances Haugh implemented the shadow password suite +that keeps the encrypted passwords in +the shadow password database +(e.g., the local shadow password file +.IR /etc/shadow , +NIS, and LDAP), +readable only by root. +.PP +The functions described below resemble those for +the traditional password database +(e.g., see +.BR getpwnam (3) +and +.BR getpwent (3)). +.\" 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. +.PP +The +.BR getspnam () +function returns a pointer to a structure containing +the broken-out fields of the record in the shadow password database +that matches the username +.IR name . +.PP +The +.BR getspent () +function returns a pointer to the next entry in the shadow password +database. +The position in the input stream is initialized by +.BR setspent (). +When done reading, the program may call +.BR endspent () +so that resources can be deallocated. +.\" some systems require a call of setspent() before the first getspent() +.\" glibc does not +.PP +The +.BR fgetspent () +function is similar to +.BR getspent () +but uses the supplied stream instead of the one implicitly opened by +.BR setspent (). +.PP +The +.BR sgetspent () +function parses the supplied string +.I s +into a struct +.IR spwd . +.PP +The +.BR putspent () +function writes the contents of the supplied struct +.I spwd +.I *p +as a text line in the shadow password file format to +.IR stream . +String entries with value NULL and numerical entries with value \-1 +are written as an empty string. +.PP +The +.BR lckpwdf () +function is intended to protect against multiple simultaneous accesses +of the shadow password database. +It tries to acquire a lock, and returns 0 on success, +or \-1 on failure (lock not obtained within 15 seconds). +The +.BR ulckpwdf () +function releases the lock again. +Note that there is no protection against direct access of the shadow +password file. +Only programs that use +.BR lckpwdf () +will notice the lock. +.PP +These were the functions that formed the original shadow API. +They are widely available. +.\" Also in libc5 +.\" SUN doesn't have sgetspent() +.SS Reentrant versions +Analogous to the reentrant functions for the password database, glibc +also has reentrant functions for the shadow password database. +The +.BR getspnam_r () +function is like +.BR getspnam () +but stores the retrieved shadow password structure in the space pointed to by +.IR spbuf . +This shadow password structure contains pointers to strings, and these strings +are stored in the buffer +.I buf +of size +.IR buflen . +A pointer to the result (in case of success) or NULL (in case no entry +was found or an error occurred) is stored in +.IR *spbufp . +.PP +The functions +.BR getspent_r (), +.BR fgetspent_r (), +and +.BR sgetspent_r () +are similarly analogous to their nonreentrant counterparts. +.PP +Some non-glibc systems also have functions with these names, +often with different prototypes. +.\" SUN doesn't have sgetspent_r() +.SS Structure +The shadow password structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct spwd { + char *sp_namp; /* Login name */ + char *sp_pwdp; /* Encrypted password */ + long sp_lstchg; /* Date of last change + (measured in days since + 1970\-01\-01 00:00:00 +0000 (UTC)) */ + long sp_min; /* Min # of days between changes */ + long sp_max; /* Max # of days between changes */ + long sp_warn; /* # of days before password expires + to warn user to change it */ + long sp_inact; /* # of days after password expires + until account is disabled */ + long sp_expire; /* Date when account expires + (measured in days since + 1970\-01\-01 00:00:00 +0000 (UTC)) */ + unsigned long sp_flag; /* Reserved */ +}; +.EE +.in +.SH RETURN VALUE +The functions that return a pointer return NULL if no more entries +are available or if an error occurs during processing. +The functions which have \fIint\fP as the return value return 0 for +success and \-1 for failure, with +.I errno +set to indicate the error. +.PP +For the nonreentrant functions, the return value may point to static area, +and may be overwritten by subsequent calls to these functions. +.PP +The reentrant functions return zero on success. +In case of error, an error number is returned. +.SH ERRORS +.TP +.B EACCES +The caller does not have permission to access the shadow password file. +.TP +.B ERANGE +Supplied buffer is too small. +.SH FILES +.TP +.I /etc/shadow +local shadow password database file +.TP +.I /etc/.pwd.lock +lock file +.PP +The include file +.I +defines the constant +.B _PATH_SHADOW +to the pathname of the shadow password file. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getspnam () +T} Thread safety T{ +MT-Unsafe race:getspnam locale +T} +T{ +.BR getspent () +T} Thread safety T{ +MT-Unsafe race:getspent +race:spentbuf locale +T} +T{ +.BR setspent (), +.BR endspent (), +.BR getspent_r () +T} Thread safety T{ +MT-Unsafe race:getspent locale +T} +T{ +.BR fgetspent () +T} Thread safety T{ +MT-Unsafe race:fgetspent +T} +T{ +.BR sgetspent () +T} Thread safety T{ +MT-Unsafe race:sgetspent +T} +T{ +.BR putspent (), +.BR getspnam_r (), +.BR sgetspent_r () +T} Thread safety T{ +MT-Safe locale +T} +T{ +.BR lckpwdf (), +.BR ulckpwdf (), +.BR fgetspent_r () +T} Thread safety T{ +MT-Safe +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I getspent +in +.I race:getspent +signifies that if any of the functions +.BR setspent (), +.BR getspent (), +.BR getspent_r (), +or +.BR endspent () +are used in parallel in different threads of a program, +then data races could occur. +.SH VERSIONS +Many other systems provide a similar API. +.SH STANDARDS +None. +.SH SEE ALSO +.BR getgrnam (3), +.BR getpwnam (3), +.BR getpwnam_r (3), +.BR shadow (5) diff --git a/upstream/opensuse-leap-15-6/man3/getstr.3ncurses b/upstream/opensuse-leap-15-6/man3/getstr.3ncurses new file mode 100644 index 00000000..2061242c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getstr.3ncurses @@ -0,0 +1,131 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getstr.3x,v 1.23 2017/11/21 00:45:48 tom Exp $ +.TH getstr 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fBgetstr\fR, +\fBgetnstr\fR, +\fBwgetstr\fR, +\fBwgetnstr\fR, +\fBmvgetstr\fR, +\fBmvgetnstr\fR, +\fBmvwgetstr\fR, +\fBmvwgetnstr\fR \- accept character strings from \fBcurses\fR terminal keyboard +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint getstr(char *str);\fR +.br +\fBint getnstr(char *str, int n);\fR +.br +\fBint wgetstr(WINDOW *win, char *str);\fR +.br +\fBint wgetnstr(WINDOW *win, char *str, int n);\fR +.br +\fBint mvgetstr(int y, int x, char *str);\fR +.br +\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR +.br +\fBint mvgetnstr(int y, int x, char *str, int n);\fR +.br +\fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR +.br +.SH DESCRIPTION +The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR, +until a newline or carriage return is received (the terminating character is +not included in the returned string). The resulting value is placed in the +area pointed to by the character pointer \fIstr\fR. +.PP +\fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible +overflow of the input buffer. Any attempt to enter more characters (other +than the terminating newline or carriage return) causes a beep. Function +keys also cause a beep and are ignored. The \fBgetnstr\fR function reads +from the \fIstdscr\fR default window. +.PP +The user's erase and kill characters are interpreted. If keypad +mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR +are both considered equivalent to the user's kill character. +.PP +Characters input are echoed only if \fBecho\fR is currently on. In that case, +backspace is echoed as deletion of the previous character (typically a left +motion). +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4 +specifies only \*(``an integer value other than \fBERR\fR\*('') upon successful +completion. +.PP +X/Open defines no error conditions. +.PP +In this implementation, +these functions return an error +if the window pointer is null, or +if its timeout expires without having any data. +.PP +This implementation provides an extension as well. +If a \fBSIGWINCH\fP interrupts the function, it will return \fBKEY_RESIZE\fP +rather than \fBOK\fP or \fBERR\fP. +.PP +Functions with a \*(``mv\*('' prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +They read single-byte characters only. +The standard does not define any error conditions. +This implementation returns \fBERR\fP if the window pointer is null, +or if the lower-level \fBwgetch\fR(3X) call returns an \fBERR\fP. +.PP +SVr3 and early SVr4 curses implementations did not reject function keys; +the SVr4.0 documentation claimed that \*(``special keys\*('' +(such as function keys, +\*(``home\*('' key, +\*(``clear\*('' key, +\fIetc\fR.) are \*(``interpreted\*('', +without giving details. +It lied. +In fact, the \*(``character\*('' value appended to the +string by those implementations was predictable but not useful +(being, in fact, the low-order eight bits of the key's KEY_ value). +.PP +The functions \fBgetnstr\fR, \fBmvgetnstr\fR, and \fBmvwgetnstr\fR were +present but not documented in SVr4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBgetch\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/getsubopt.3 b/upstream/opensuse-leap-15-6/man3/getsubopt.3 new file mode 100644 index 00000000..48345b47 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getsubopt.3 @@ -0,0 +1,254 @@ +'\" t +.\" Copyright (C) 2007 Michael Kerrisk +.\" and Copyright (C) 2007 Justin Pryzby +.\" +.\" %%%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 +.\" +.TH getsubopt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getsubopt \- parse suboption arguments from a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getsubopt(char **restrict " optionp ", char *const *restrict " tokens , +.BI " char **restrict " valuep ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getsubopt (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +.BR getsubopt () +parses the list of comma-separated suboptions provided in +.IR optionp . +(Such a suboption list is typically produced when +.BR getopt (3) +is used to parse a command line; +see for example the \fI\-o\fP option of +.BR mount (8).) +Each suboption may include an associated value, +which is separated from the suboption name by an equal sign. +The following is an example of the kind of string +that might be passed in +.IR optionp : +.PP +.in +4n +.EX +.B ro,name=xyz +.EE +.in +.PP +The +.I tokens +argument is a pointer to a NULL-terminated array of pointers to the tokens that +.BR getsubopt () +will look for in +.IR optionp . +The tokens should be distinct, null-terminated strings containing at +least one character, with no embedded equal signs or commas. +.PP +Each call to +.BR getsubopt () +returns information about the next unprocessed suboption in +.IR optionp . +The first equal sign in a suboption (if any) is interpreted as a +separator between the name and the value of that suboption. +The value extends to the next comma, +or (for the last suboption) to the end of the string. +If the name of the suboption matches a known name from +.IR tokens , +and a value string was found, +.BR getsubopt () +sets +.I *valuep +to the address of that string. +The first comma in +.I optionp +is overwritten with a null byte, so +.I *valuep +is precisely the "value string" for that suboption. +.PP +If the suboption is recognized, but no value string was found, +.I *valuep +is set to NULL. +.PP +When +.BR getsubopt () +returns, +.I optionp +points to the next suboption, +or to the null byte (\[aq]\e0\[aq]) at the end of the +string if the last suboption was just processed. +.SH RETURN VALUE +If the first suboption in +.I optionp +is recognized, +.BR getsubopt () +returns the index of the matching suboption element in +.IR tokens . +Otherwise, \-1 is returned and +.I *valuep +is the entire +.IB name [= value ] +string. +.PP +Since +.I *optionp +is changed, the first suboption before the call to +.BR getsubopt () +is not (necessarily) the same as the first suboption after +.BR getsubopt (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getsubopt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Since +.BR getsubopt () +overwrites any commas it finds in the string +.IR *optionp , +that string must be writable; it cannot be a string constant. +.SH EXAMPLES +The following program expects suboptions following a "\-o" option. +.PP +.\" SRC BEGIN (getsubopt.c) +.EX +#define _XOPEN_SOURCE 500 +#include +#include + +#include + +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 \[aq]o\[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 \en", argv[0]); + fprintf(stderr, + "suboptions are \[aq]ro\[aq], \[aq]rw\[aq], and \[aq]name=\[aq]\en"); + exit(EXIT_FAILURE); + } + + /* Remainder of program... */ + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/gettext.3 b/upstream/opensuse-leap-15-6/man3/gettext.3 new file mode 100644 index 00000000..c033f3b4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gettext.3 @@ -0,0 +1,99 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" 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. +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" GNU gettext source code and manual +.\" LI18NUX 2000 Globalization Specification +.\" +.TH GETTEXT 3 "May 2001" "GNU gettext 20220912" +.SH NAME +gettext, dgettext, dcgettext \- translate message +.SH SYNOPSIS +.nf +.B #include +.sp +.BI "char * gettext (const char * " msgid ); +.BI "char * dgettext (const char * " domainname ", const char * " msgid ); +.BI "char * dcgettext (const char * " domainname ", const char * " msgid , +.BI " int " category ); +.fi +.SH DESCRIPTION +The \fBgettext\fP, \fBdgettext\fP and \fBdcgettext\fP functions attempt to +translate a text string into the user's native language, by looking up the +translation in a message catalog. +.PP +The \fImsgid\fP argument identifies the message to be translated. By +convention, it is the English version of the message, with non-ASCII +characters replaced by ASCII approximations. This choice allows the +translators to work with message catalogs, called PO files, that contain +both the English and the translated versions of each message, and can be +installed using the \fBmsgfmt\fP utility. +.PP +A message domain is a set of translatable \fImsgid\fP messages. Usually, +every software package has its own message domain. The domain name is used +to determine the message catalog where the translation is looked up; it must +be a non-empty string. For the \fBgettext\fP function, it is specified through +a preceding \fBtextdomain\fP call. For the \fBdgettext\fP and \fBdcgettext\fP +functions, it is passed as the \fIdomainname\fP argument; if this argument is +NULL, the domain name specified through a preceding \fBtextdomain\fP call is +used instead. +.PP +Translation lookup operates in the context of the current locale. For the +\fBgettext\fP and \fBdgettext\fP functions, the \fBLC_MESSAGES\fP locale +facet is used. It is determined by a preceding call to the \fBsetlocale\fP +function. \fBsetlocale(LC_ALL,"")\fP initializes the \fBLC_MESSAGES\fP locale +based on the first nonempty value of the three environment variables +\fBLC_ALL\fP, \fBLC_MESSAGES\fP, \fBLANG\fP; see \fBsetlocale\fP(3). For the +\fBdcgettext\fP function, the locale facet is determined by the \fIcategory\fP +argument, which should be one of the \fBLC_xxx\fP constants defined in the + header, excluding \fBLC_ALL\fP. In both cases, the functions also +use the \fBLC_CTYPE\fP locale facet in order to convert the translated message +from the translator's codeset to the current locale's codeset, unless +overridden by a prior call to the \fBbind_textdomain_codeset\fP function. +.PP +The message catalog used by the functions is at the pathname +\fIdirname\fP/\fIlocale\fP/\fIcategory\fP/\fIdomainname\fP.mo. Here +\fIdirname\fP is the directory specified through \fBbindtextdomain\fP. Its +default is system and configuration dependent; typically it is +\fIprefix\fP/share/locale, where \fIprefix\fP is the installation prefix of the +package. \fIlocale\fP is the name of the current locale facet; the GNU +implementation also tries generalizations, such as the language name without +the territory name. \fIcategory\fP is \fBLC_MESSAGES\fP for the \fBgettext\fP +and \fBdgettext\fP functions, or the argument passed to the \fBdcgettext\fP +function. +.PP +If the \fBLANGUAGE\fP environment variable is set to a nonempty value, and the +locale is not the "C" locale, the value of \fBLANGUAGE\fP is assumed to contain +a colon separated list of locale names. The functions will attempt to look up +a translation of \fImsgid\fP in each of the locales in turn. This is a GNU +extension. +.PP +In the "C" locale, or if none of the used catalogs contain a translation for +\fImsgid\fP, the \fBgettext\fP, \fBdgettext\fP and \fBdcgettext\fP functions +return \fImsgid\fP. +.SH "RETURN VALUE" +If a translation was found in one of the specified catalogs, it is converted +to the locale's codeset and returned. The resulting string is statically +allocated and must not be modified or freed. Otherwise \fImsgid\fP is returned. +.SH ERRORS +\fBerrno\fP is not modified. +.SH BUGS +The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid +warnings in C code predating ANSI C. +.PP +When an empty string is used for \fImsgid\fP, the functions may return a +nonempty string. +.SH "SEE ALSO" +.BR ngettext (3), +.BR dngettext (3), +.BR dcngettext (3), +.BR setlocale (3), +.BR textdomain (3), +.BR bindtextdomain (3), +.BR bind_textdomain_codeset (3), +.BR msgfmt (1) diff --git a/upstream/opensuse-leap-15-6/man3/getttyent.3 b/upstream/opensuse-leap-15-6/man3/getttyent.3 new file mode 100644 index 00000000..fc19dee8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getttyent.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH getttyent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getttyent, getttynam, setttyent, endttyent \- get ttys file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.B "struct ttyent *getttyent(void);" +.BI "struct ttyent *getttynam(const char *" name ); +.PP +.B "int setttyent(void);" +.B "int endttyent(void);" +.fi +.SH DESCRIPTION +These functions provide an interface to the file +.B _PATH_TTYS +(e.g., +.IR /etc/ttys ). +.PP +The function +.BR setttyent () +opens the file or rewinds it if already open. +.PP +The function +.BR endttyent () +closes the file. +.PP +The function +.BR getttynam () +searches for a given terminal name in the file. +It returns a pointer to a +.I ttyent +structure (description below). +.PP +The function +.BR getttyent () +opens the file +.B _PATH_TTYS +(if necessary) and returns the first entry. +If the file is already open, the next entry. +The +.I ttyent +structure has the form: +.PP +.in +4n +.EX +struct ttyent { + char *ty_name; /* terminal device name */ + char *ty_getty; /* command to execute, usually getty */ + char *ty_type; /* terminal type for termcap */ + int ty_status; /* status flags */ + char *ty_window; /* command to start up window manager */ + char *ty_comment; /* comment field */ +}; +.EE +.in +.PP +.I ty_status +can be: +.PP +.in +4n +.EX +#define TTY_ON 0x01 /* enable logins (start ty_getty program) */ +#define TTY_SECURE 0x02 /* allow UID 0 to login */ +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getttyent (), +.BR setttyent (), +.BR endttyent (), +.BR getttynam () +T} Thread safety MT-Unsafe race:ttyent +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH NOTES +Under Linux, the file +.IR /etc/ttys , +and the functions described above, are not used. +.SH SEE ALSO +.BR ttyname (3), +.BR ttyslot (3) diff --git a/upstream/opensuse-leap-15-6/man3/getusershell.3 b/upstream/opensuse-leap-15-6/man3/getusershell.3 new file mode 100644 index 00000000..9a961021 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getusershell.3 @@ -0,0 +1,101 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu) +.TH getusershell 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getusershell, setusershell, endusershell \- get permitted user shells +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B char *getusershell(void); +.B void setusershell(void); +.B void endusershell(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getusershell (), +.BR setusershell (), +.BR endusershell (): +.nf + Since glibc 2.21: +.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 + _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 DESCRIPTION +The +.BR getusershell () +function returns the next line from the file +.IR /etc/shells , +opening the file if necessary. +The line should contain +the pathname of a valid user shell. +If +.I /etc/shells +does not exist or +is unreadable, +.BR getusershell () +behaves as if +.I /bin/sh +and +.I /bin/csh +were listed in the file. +.PP +The +.BR setusershell () +function rewinds +.IR /etc/shells . +.PP +The +.BR endusershell () +function closes +.IR /etc/shells . +.SH RETURN VALUE +The +.BR getusershell () +function returns NULL on end-of-file. +.SH FILES +.I /etc/shells +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getusershell (), +.BR setusershell (), +.BR endusershell () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +.SH SEE ALSO +.BR shells (5) diff --git a/upstream/opensuse-leap-15-6/man3/getutent.3 b/upstream/opensuse-leap-15-6/man3/getutent.3 new file mode 100644 index 00000000..88f568f7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getutent.3 @@ -0,0 +1,345 @@ +'\" t +.\" Copyright 1995 Mark D. Roth (roth@uiuc.edu) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" References consulted: +.\" Linux libc source code +.\" Solaris manpages +.\" +.\" Modified Thu Jul 25 14:43:46 MET DST 1996 by Michael Haardt +.\" +.\" +.TH getutent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getutent, getutid, getutline, pututline, setutent, endutent, +utmpname \- access utmp file entries +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct utmp *getutent(void); +.BI "struct utmp *getutid(const struct utmp *" ut ); +.BI "struct utmp *getutline(const struct utmp *" ut ); +.PP +.BI "struct utmp *pututline(const struct utmp *" ut ); +.PP +.B void setutent(void); +.B void endutent(void); +.PP +.BI "int utmpname(const char *" file ); +.fi +.SH DESCRIPTION +New applications should use the POSIX.1-specified "utmpx" versions of +these functions; see STANDARDS. +.PP +.BR utmpname () +sets the name of the utmp-format file for the other utmp +functions to access. +If +.BR utmpname () +is not used to set the filename +before the other functions are used, they assume \fB_PATH_UTMP\fP, as +defined in \fI\fP. +.PP +.BR setutent () +rewinds the file pointer to the beginning of the utmp file. +It is generally a good idea to call it before any of the other +functions. +.PP +.BR endutent () +closes the utmp file. +It should be called when the user +code is done accessing the file with the other functions. +.PP +.BR getutent () +reads a line from the current file position in the utmp file. +It returns a pointer to a structure containing the fields of +the line. +The definition of this structure is shown in +.BR utmp (5). +.PP +.BR getutid () +searches forward from the current file position in the utmp +file based upon \fIut\fP. +If \fIut\->ut_type\fP is one of \fBRUN_LVL\fP, +\fBBOOT_TIME\fP, \fBNEW_TIME\fP, or \fBOLD_TIME\fP, +.BR getutid () +will +find the first entry whose \fIut_type\fP field matches \fIut\->ut_type\fP. +If \fIut\->ut_type\fP is one of \fBINIT_PROCESS\fP, \fBLOGIN_PROCESS\fP, +\fBUSER_PROCESS\fP, or \fBDEAD_PROCESS\fP, +.BR getutid () +will find the +first entry whose +.I ut_id +field matches \fIut\->ut_id\fP. +.PP +.BR getutline () +searches forward from the current file position in the utmp file. +It scans entries whose +.I ut_type +is \fBUSER_PROCESS\fP +or \fBLOGIN_PROCESS\fP and returns the first one whose +.I ut_line +field +matches \fIut\->ut_line\fP. +.PP +.BR pututline () +writes the +.I utmp +structure \fIut\fP into the utmp file. +It uses +.BR getutid () +to search for the proper place in the file to insert +the new entry. +If it cannot find an appropriate slot for \fIut\fP, +.BR pututline () +will append the new entry to the end of the file. +.SH RETURN VALUE +.BR getutent (), +.BR getutid (), +and +.BR getutline () +return a pointer to a \fIstruct utmp\fP on success, +and NULL on failure (which includes the "record not found" case). +This \fIstruct utmp\fP is allocated in static storage, and may be +overwritten by subsequent calls. +.PP +On success +.BR pututline () +returns +.IR ut ; +on failure, it returns NULL. +.PP +.BR utmpname () +returns 0 if the new name was successfully stored, or \-1 on failure. +.PP +On failure, these functions +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Out of memory. +.TP +.B ESRCH +Record not found. +.PP +.BR setutent (), +.BR pututline (), +and the +.BR getut* () +functions can also fail for the reasons described in +.BR open (2). +.SH FILES +.TP +.I /var/run/utmp +database of currently logged-in users +.TP +.I /var/log/wtmp +database of past user logins +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getutent () +T} Thread safety T{ +MT-Unsafe init race:utent +race:utentbuf sig:ALRM timer +T} +T{ +.BR getutid (), +.BR getutline () +T} Thread safety T{ +MT-Unsafe init race:utent +sig:ALRM timer +T} +T{ +.BR pututline () +T} Thread safety T{ +MT-Unsafe race:utent +sig:ALRM timer +T} +T{ +.BR setutent (), +.BR endutent (), +.BR utmpname () +T} Thread safety MT-Unsafe race:utent +.TE +.hy +.ad +.sp 1 +In the above table, +.I utent +in +.I race:utent +signifies that if any of the functions +.BR setutent (), +.BR getutent (), +.BR getutid (), +.BR getutline (), +.BR pututline (), +.BR utmpname (), +or +.BR endutent () +are used in parallel in different threads of a program, +then data races could occur. +.SH STANDARDS +None. +.SH HISTORY +XPG2, SVr4. +.PP +In XPG2 and SVID 2 the function +.BR pututline () +is documented to return void, and that is what it does on many systems +(AIX, HP-UX). +HP-UX introduces a new function +.BR _pututline () +with the prototype given above for +.BR pututline (). +.PP +All these functions are obsolete now on non-Linux systems. +POSIX.1-2001 and POSIX.1-2008, following SUSv1, +does not have any of these functions, but instead uses +.PP +.RS 4 +.EX +.B #include +.PP +.B struct utmpx *getutxent(void); +.B struct utmpx *getutxid(const struct utmpx *); +.B struct utmpx *getutxline(const struct utmpx *); +.B struct utmpx *pututxline(const struct utmpx *); +.B void setutxent(void); +.B void endutxent(void); +.EE +.RE +.PP +These functions are provided by glibc, +and perform the same task as their equivalents without the "x", but use +.IR "struct utmpx" , +defined on Linux to be the same as +.IR "struct utmp" . +For completeness, glibc also provides +.BR utmpxname (), +although this function is not specified by POSIX.1. +.PP +On some other systems, +the \fIutmpx\fP structure is a superset of the \fIutmp\fP structure, +with additional fields, and larger versions of the existing fields, +and parallel files are maintained, often +.I /var/*/utmpx +and +.IR /var/*/wtmpx . +.PP +Linux glibc on the other hand does not use a parallel \fIutmpx\fP file +since its \fIutmp\fP structure is already large enough. +The "x" functions listed above are just aliases for +their counterparts without the "x" (e.g., +.BR getutxent () +is an alias for +.BR getutent ()). +.SH NOTES +.SS glibc notes +The above functions are not thread-safe. +glibc adds reentrant versions +.PP +.nf +.B #include +.PP +.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp ); +.BI "int getutid_r(struct utmp *" ut , +.BI " struct utmp *" ubuf ", struct utmp **" ubufp ); +.BI "int getutline_r(struct utmp *" ut , +.BI " struct utmp *" ubuf ", struct utmp **" ubufp ); +.fi +.PP +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.PP +.BR getutent_r (), +.BR getutid_r (), +.BR getutline_r (): +.nf + _GNU_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +These functions are GNU extensions, analogs of the functions of the +same name without the _r suffix. +The +.I ubuf +argument gives these functions a place to store their result. +On success, they return 0, and a pointer to the result is written in +.IR *ubufp . +On error, these functions return \-1. +There are no utmpx equivalents of the above functions. +(POSIX.1 does not specify such functions.) +.SH EXAMPLES +The following example adds and removes a utmp record, assuming it is run +from within a pseudo terminal. +For usage in a real application, you +should check the return values of +.BR getpwuid (3) +and +.BR ttyname (3). +.PP +.\" SRC BEGIN (getutent.c) +.EX +#include +#include +#include +#include +#include +#include + +int +main(void) +{ + struct utmp entry; + + system("echo before adding entry:;who"); + + entry.ut_type = USER_PROCESS; + entry.ut_pid = getpid(); + strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/")); + /* only correct for ptys named /dev/tty[pqr][0\-9a\-z] */ + strcpy(entry.ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty")); + time(&entry.ut_time); + strcpy(entry.ut_user, getpwuid(getuid())\->pw_name); + memset(entry.ut_host, 0, UT_HOSTSIZE); + entry.ut_addr = 0; + setutent(); + pututline(&entry); + + system("echo after adding entry:;who"); + + entry.ut_type = DEAD_PROCESS; + memset(entry.ut_line, 0, UT_LINESIZE); + entry.ut_time = 0; + memset(entry.ut_user, 0, UT_NAMESIZE); + setutent(); + pututline(&entry); + + system("echo after removing entry:;who"); + + endutent(); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getutmp (3), +.BR utmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/getutmp.3 b/upstream/opensuse-leap-15-6/man3/getutmp.3 new file mode 100644 index 00000000..506f3db9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getutmp.3 @@ -0,0 +1,74 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getutmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void getutmp(const struct utmpx *" ux ", struct utmp *" u ); +.BI "void getutmpx(const struct utmp *" u ", struct utmpx *" ux ); +.fi +.SH DESCRIPTION +The +.BR getutmp () +function copies the fields of the +.I utmpx +structure pointed to by +.I ux +to the corresponding fields of the +.I utmp +structure pointed to by +.IR u . +The +.BR getutmpx () +function performs the converse operation. +.SH RETURN VALUE +These functions do not return a value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getutmp (), +.BR getutmpx () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +glibc 2.1.1. +Solaris, NetBSD. +.SH NOTES +These functions exist primarily for compatibility with other +systems where the +.I utmp +and +.I utmpx +structures contain different fields, +or the size of corresponding fields differs. +.\" e.g., on Solaris, the utmpx structure is rather larger than utmp. +On Linux, the two structures contain the same fields, +and the fields have the same sizes. +.SH SEE ALSO +.BR utmpdump (1), +.BR getutent (3), +.BR utmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/getw.3 b/upstream/opensuse-leap-15-6/man3/getw.3 new file mode 100644 index 00000000..d6b63e36 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getw.3 @@ -0,0 +1,87 @@ +'\" t +.\" Copyright (c) 1995 by Jim Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH getw 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getw, putw \- input and output of words (ints) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getw(FILE *" stream ); +.BI "int putw(int " w ", FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getw (), +.BR putw (): +.nf + Since glibc 2.3.3: + _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE + Before glibc 2.3.3: + _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE +.fi +.SH DESCRIPTION +.BR getw () +reads a word (that is, an \fIint\fP) from \fIstream\fP. +It's provided for compatibility with SVr4. +We recommend you use +.BR fread (3) +instead. +.PP +.BR putw () +writes the word \fIw\fP (that is, +an \fIint\fP) to \fIstream\fP. +It is provided for compatibility with SVr4, but we recommend you use +.BR fwrite (3) +instead. +.SH RETURN VALUE +Normally, +.BR getw () +returns the word read, and +.BR putw () +returns 0. +On error, they return \fBEOF\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getw (), +.BR putw () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr4, SUSv2. +.SH BUGS +The value returned on error is also a legitimate data value. +.BR ferror (3) +can be used to distinguish between the two cases. +.SH SEE ALSO +.BR ferror (3), +.BR fread (3), +.BR fwrite (3), +.BR getc (3), +.BR putc (3) diff --git a/upstream/opensuse-leap-15-6/man3/getwchar.3 b/upstream/opensuse-leap-15-6/man3/getwchar.3 new file mode 100644 index 00000000..805af0c7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getwchar.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH getwchar 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getwchar \- read a wide character from standard input +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "wint_t getwchar(void);" +.fi +.SH DESCRIPTION +The +.BR getwchar () +function is the wide-character equivalent of the +.BR getchar (3) +function. +It reads a wide character from +.I stdin +and returns +it. +If the end of stream is reached, or if +.I ferror(stdin) +becomes true, it returns +.BR WEOF . +If a wide-character conversion error occurs, it sets +.I errno +to +.B EILSEQ +and returns +.BR WEOF . +.PP +For a nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +The +.BR getwchar () +function returns the next wide-character from +standard input, or +.BR WEOF . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR getwchar () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH NOTES +The behavior of +.BR getwchar () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +It is reasonable to expect that +.BR getwchar () +will actually +read a multibyte sequence from standard input and then +convert it to a wide character. +.SH SEE ALSO +.BR fgetwc (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/getyx.3ncurses b/upstream/opensuse-leap-15-6/man3/getyx.3ncurses new file mode 100644 index 00000000..0d7219d6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/getyx.3ncurses @@ -0,0 +1,100 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_getyx.3x,v 1.18 2010/12/04 18:36:44 tom Exp $ +.TH getyx 3NCURSES "" +.SH NAME +\fBgetyx\fR, +\fBgetparyx\fR, +\fBgetbegyx\fR, +\fBgetmaxyx\fR \- get \fBcurses\fR cursor and window coordinates +.SH SYNOPSIS +\fB#include \fR +.sp +\fBvoid getyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getparyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getbegyx(WINDOW *win, int y, int x);\fR +.br +\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +The \fBgetyx\fR macro places the current cursor position of the given window in +the two integer variables \fIy\fR and \fIx\fR. +.PP +If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning +coordinates of the subwindow relative to the parent window into two integer +variables \fIy\fR and \fIx\fR. +Otherwise, \fB\-1\fR is placed into \fIy\fR and \fIx\fR. +.PP +Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store +the current beginning coordinates and size of the specified window. +.SH RETURN VALUE +The return values of these macros are undefined (i.e., +they should not be used as the right-hand side of assignment statements). +.SH NOTES +All of these interfaces are macros. +A "\fB&\fR" is not necessary before the variables \fIy\fR and \fIx\fR. +.SH PORTABILITY +The +\fBgetyx\fR, +\fBgetparyx\fR, +\fBgetbegyx\fR and +\fBgetmaxyx\fR +macros are described in the XSI Curses standard, Issue 4. +.PP +This implementation also provides functions +\fBgetbegx\fR, +\fBgetbegy\fR, +\fBgetcurx\fR, +\fBgetcury\fR, +\fBgetmaxx\fR, +\fBgetmaxy\fR, +\fBgetparx\fR and +\fBgetpary\fR +for compatibility with older versions of curses. +.PP +Although X/Open Curses does not address this, +many implementations provide members of the WINDOW structure +containing values corresponding to these macros. +For best portability, do not rely on using the data in WINDOW, +since some implementations make WINDOW opaque (do not allow +direct use of its members). +.PP +Besides the problem of opaque structures, +the data stored in like-named members may not have like-values in +different implementations. +For example, the WINDOW._maxx and WINDOW._maxy values in ncurses +have (at least since release 1.8.1) differed by one from some +other implementations. +The difference is hidden by means of the macro \fBgetmaxyx\fP. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBlegacy\fR(3NCURSES), +\fBopaque\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/glob.3 b/upstream/opensuse-leap-15-6/man3/glob.3 new file mode 100644 index 00000000..fcc269d1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/glob.3 @@ -0,0 +1,351 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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. +.\" +.TH glob 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +glob, globfree \- find pathnames matching a pattern, free memory from glob() +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int glob(const char *restrict " pattern ", int " flags , +.BI " int (*" errfunc ")(const char *" epath ", int " eerrno ), +.BI " glob_t *restrict " pglob ); +.BI "void globfree(glob_t *" pglob ); +.fi +.SH DESCRIPTION +The +.BR glob () +function searches for all the pathnames matching +.I pattern +according to the rules used by the shell (see +.BR glob (7)). +No tilde expansion or parameter substitution is done; if you want +these, use +.BR wordexp (3). +.PP +The +.BR globfree () +function frees the dynamically allocated storage from an earlier call +to +.BR glob (). +.PP +The results of a +.BR glob () +call are stored in the structure pointed to by +.IR pglob . +This structure is of type +.I glob_t +(declared in +.IR ) +and includes the following elements defined by POSIX.2 (more may be +present as an extension): +.PP +.in +4n +.EX +typedef struct { + size_t gl_pathc; /* Count of paths matched so far */ + char **gl_pathv; /* List of matched pathnames. */ + size_t gl_offs; /* Slots to reserve in \fIgl_pathv\fP. */ +} glob_t; +.EE +.in +.PP +Results are stored in dynamically allocated storage. +.PP +The argument +.I flags +is made up of the bitwise OR of zero or more the following symbolic +constants, which modify the behavior of +.BR glob (): +.TP +.B GLOB_ERR +Return upon a read error (because a directory does not +have read permission, for example). +By default, +.BR glob () +attempts carry on despite errors, +reading all of the directories that it can. +.TP +.B GLOB_MARK +Append a slash to each path which corresponds to a directory. +.TP +.B GLOB_NOSORT +Don't sort the returned pathnames. +The only reason to do this is to save processing time. +By default, the returned pathnames are sorted. +.TP +.B GLOB_DOOFFS +Reserve +.I pglob\->gl_offs +slots at the beginning of the list of strings in +.IR pglob\->pathv . +The reserved slots contain null pointers. +.TP +.B GLOB_NOCHECK +If no pattern matches, return the original pattern. +By default, +.BR glob () +returns +.B GLOB_NOMATCH +if there are no matches. +.TP +.B GLOB_APPEND +Append the results of this call to the vector of results +returned by a previous call to +.BR glob (). +Do not set this flag on the first invocation of +.BR glob (). +.TP +.B GLOB_NOESCAPE +Don't allow backslash (\[aq]\e\[aq]) to be used as an escape +character. +Normally, a backslash can be used to quote the following character, +providing a mechanism to turn off the special meaning +metacharacters. +.PP +.I flags +may also include any of the following, which are GNU +extensions and not defined by POSIX.2: +.TP +.B GLOB_PERIOD +Allow a leading period to be matched by metacharacters. +By default, metacharacters can't match a leading period. +.TP +.B GLOB_ALTDIRFUNC +Use alternative functions +.IR pglob\->gl_closedir , +.IR pglob\->gl_readdir , +.IR pglob\->gl_opendir , +.IR pglob\->gl_lstat , +and +.I pglob\->gl_stat +for filesystem access instead of the normal library +functions. +.TP +.B GLOB_BRACE +Expand +.BR csh (1) +style brace expressions of the form +.BR {a,b} . +Brace expressions can be nested. +Thus, for example, specifying the pattern +"{foo/{,cat,dog},bar}" would return the same results as four separate +.BR glob () +calls using the strings: +"foo/", +"foo/cat", +"foo/dog", +and +"bar". +.TP +.B GLOB_NOMAGIC +If the pattern contains no metacharacters, +then it should be returned as the sole matching word, +even if there is no file with that name. +.TP +.B GLOB_TILDE +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., "\[ti]andrea/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 +.B GLOB_TILDE_CHECK +This provides behavior similar to that of +.BR GLOB_TILDE . +The difference is that if the username is invalid, or the +home directory cannot be determined, then +instead of using the pattern itself as the name, +.BR glob () +returns +.B GLOB_NOMATCH +to indicate an error. +.TP +.B GLOB_ONLYDIR +This is a +.I hint +to +.BR glob () +that the caller is interested only in directories that match the pattern. +If the implementation can easily determine file-type information, +then nondirectory files are not returned to the caller. +However, the caller must still check that returned files +are directories. +(The purpose of this flag is merely to optimize performance when +the caller is interested only in directories.) +.PP +If +.I errfunc +is not NULL, +it will be called in case of an error with the arguments +.IR epath , +a pointer to the path which failed, and +.IR eerrno , +the value of +.I errno +as returned from one of the calls to +.BR opendir (3), +.BR readdir (3), +or +.BR stat (2). +If +.I errfunc +returns nonzero, or if +.B GLOB_ERR +is set, +.BR glob () +will terminate after the call to +.IR errfunc . +.PP +Upon successful return, +.I pglob\->gl_pathc +contains the number of matched pathnames and +.I pglob\->gl_pathv +contains a pointer to the list of pointers to matched pathnames. +The list of pointers is terminated by a null pointer. +.PP +It is possible to call +.BR glob () +several times. +In that case, the +.B GLOB_APPEND +flag has to be set in +.I flags +on the second and later invocations. +.PP +As a GNU extension, +.I pglob\->gl_flags +is set to the flags specified, +.BR or ed +with +.B GLOB_MAGCHAR +if any metacharacters were found. +.SH RETURN VALUE +On successful completion, +.BR glob () +returns zero. +Other possible returns are: +.TP +.B GLOB_NOSPACE +for running out of memory, +.TP +.B GLOB_ABORTED +for a read error, and +.TP +.B GLOB_NOMATCH +for no found matches. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR glob () +T} Thread safety T{ +MT-Unsafe race:utent env +sig:ALRM timer locale +T} +T{ +.BR globfree () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +In the above table, +.I utent +in +.I race:utent +signifies that if any of the functions +.BR setutent (3), +.BR getutent (3), +or +.BR endutent (3) +are used in parallel in different threads of a program, +then data races could occur. +.BR glob () +calls those functions, +so we use race:utent to remind users. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, POSIX.2. +.SH NOTES +The structure elements +.I gl_pathc +and +.I gl_offs +are declared as +.I size_t +in glibc 2.1, as they should be according to POSIX.2, +but are declared as +.I int +in glibc 2.0. +.SH BUGS +The +.BR glob () +function may fail due to failure of underlying function calls, such as +.BR malloc (3) +or +.BR opendir (3). +These will store their error code in +.IR errno . +.SH EXAMPLES +One example of use is the following code, which simulates typing +.PP +.in +4n +.EX +ls \-l *.c ../*.c +.EE +.in +.PP +in the shell: +.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 SEE ALSO +.BR ls (1), +.BR sh (1), +.BR stat (2), +.BR exec (3), +.BR fnmatch (3), +.BR malloc (3), +.BR opendir (3), +.BR readdir (3), +.BR wordexp (3), +.BR glob (7) diff --git a/upstream/opensuse-leap-15-6/man3/gnu_get_libc_version.3 b/upstream/opensuse-leap-15-6/man3/gnu_get_libc_version.3 new file mode 100644 index 00000000..e293b787 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gnu_get_libc_version.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH gnu_get_libc_version 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gnu_get_libc_version, gnu_get_libc_release \- get glibc version and release +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B const char *gnu_get_libc_version(void); +.B const char *gnu_get_libc_release(void); +.fi +.SH DESCRIPTION +The function +.BR gnu_get_libc_version () +returns a string that identifies the glibc version available on the system. +.PP +The function +.BR gnu_get_libc_release () +returns a string indicates the release status of the glibc version +available on the system. +This will be a string such as +.IR "stable" . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR gnu_get_libc_version (), +.BR gnu_get_libc_release () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH EXAMPLES +When run, the program below will produce output such as the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +GNU libc version: 2.8 +GNU libc release: stable +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (gnu_get_libc_version.c) +.EX +#include +#include + +#include + +int +main(void) +{ + printf("GNU libc version: %s\en", gnu_get_libc_version()); + printf("GNU libc release: %s\en", gnu_get_libc_release()); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR confstr (3) diff --git a/upstream/opensuse-leap-15-6/man3/grantpt.3 b/upstream/opensuse-leap-15-6/man3/grantpt.3 new file mode 100644 index 00000000..f9b8334b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/grantpt.3 @@ -0,0 +1,112 @@ +'\" t +.\" %%%LICENSE_START(PUBLIC_DOMAIN) +.\" This page is in the public domain. - aeb +.\" %%%LICENSE_END +.\" +.TH grantpt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +grantpt \- grant access to the slave pseudoterminal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int grantpt(int " fd ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR grantpt (): +.nf + Since glibc 2.24: + _XOPEN_SOURCE >= 500 +.\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) + glibc 2.23 and earlier: + _XOPEN_SOURCE +.fi +.SH DESCRIPTION +The +.BR grantpt () +function changes the mode and owner of the slave pseudoterminal device +corresponding to the master pseudoterminal referred to by the file descriptor +.IR fd . +The user ID of the slave is set to the real UID of the calling process. +The group ID is set to an unspecified value (e.g., +.IR tty ). +The mode of the slave is set to 0620 (crw\-\-w\-\-\-\-). +.PP +The behavior of +.BR grantpt () +is unspecified if a signal handler is installed to catch +.B SIGCHLD +signals. +.SH RETURN VALUE +When successful, +.BR grantpt () +returns 0. +Otherwise, it returns \-1 and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EACCES +The corresponding slave pseudoterminal could not be accessed. +.TP +.B EBADF +The +.I fd +argument is not a valid open file descriptor. +.TP +.B EINVAL +The +.I fd +argument is valid but not associated with a master pseudoterminal. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR grantpt () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Many systems implement this function via a set-user-ID helper binary +called "pt_chown". +On Linux systems with a devpts filesystem (present since Linux 2.2), +the kernel normally sets the correct ownership and permissions +for the pseudoterminal slave when the master is opened +.RB ( posix_openpt (3)), +so that nothing must be done by +.BR grantpt (). +Thus, no such helper binary is required +(and indeed it is configured to be absent during the +glibc build that is typical on many systems). +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.PP +This is part of the UNIX 98 pseudoterminal support, see +.BR pts (4). +.SH SEE ALSO +.BR open (2), +.BR posix_openpt (3), +.BR ptsname (3), +.BR unlockpt (3), +.BR pts (4), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/group_member.3 b/upstream/opensuse-leap-15-6/man3/group_member.3 new file mode 100644 index 00000000..c26d8040 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/group_member.3 @@ -0,0 +1,48 @@ +.\" Copyright (C) 2014, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH group_member 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +group_member \- test whether a process is in a group +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int group_member(gid_t " gid ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR group_member (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR group_member () +function tests whether any of the caller's supplementary group IDs +(as returned by +.BR getgroups (2)) +matches +.IR gid . +.SH RETURN VALUE +The +.BR group_member () +function returns nonzero if any of the caller's +supplementary group IDs matches +.IR gid , +and zero otherwise. +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR getgid (2), +.BR getgroups (2), +.BR getgrouplist (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/gsignal.3 b/upstream/opensuse-leap-15-6/man3/gsignal.3 new file mode 100644 index 00000000..63679b79 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/gsignal.3 @@ -0,0 +1,119 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" This replaces an earlier man page written by Walter Harms +.\" . +.TH gsignal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +gsignal, ssignal \- software signal facility +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B typedef void (*sighandler_t)(int); +.PP +.BI "[[deprecated]] int gsignal(int " signum ); +.PP +.BI "[[deprecated]] sighandler_t ssignal(int " signum ", sighandler_t " action ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR gsignal (), +.BR ssignal (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +Don't use these functions under Linux. +Due to a historical mistake, under Linux these functions are +aliases for +.BR raise (3) +and +.BR signal (2), +respectively. +.PP +Elsewhere, on System V-like systems, these functions implement +software signaling, entirely independent of the classical +.BR signal (2) +and +.BR kill (2) +functions. +The function +.BR ssignal () +defines the action to take when the software signal with +number +.I signum +is raised using the function +.BR gsignal (), +and returns the previous such action or +.BR SIG_DFL . +The function +.BR gsignal () +does the following: if no action (or the action +.BR SIG_DFL ) +was +specified for +.IR signum , +then it does nothing and returns 0. +If the action +.B SIG_IGN +was specified for +.IR signum , +then it does nothing and returns 1. +Otherwise, it resets the action to +.B SIG_DFL +and calls +the action function with argument +.IR signum , +and returns the value returned by that function. +The range of possible values +.I signum +varies (often 1\[en]15 or 1\[en]17). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR gsignal () +T} Thread safety MT-Safe +T{ +.BR ssignal () +T} Thread safety MT-Safe sigintr +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +AIX, DG/UX, HP-UX, SCO, Solaris, Tru64. +They are called obsolete under most of these systems, and are +broken under +.\" Linux libc and +glibc. +Some systems also have +.BR gsignal_r () +and +.BR ssignal_r (). +.SH SEE ALSO +.BR kill (2), +.BR signal (2), +.BR raise (3) diff --git a/upstream/opensuse-leap-15-6/man3/hash.3 b/upstream/opensuse-leap-15-6/man3/hash.3 new file mode 100644 index 00000000..32583287 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/hash.3 @@ -0,0 +1,145 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)hash.3 8.6 (Berkeley) 8/18/94 +.\" +.TH hash 3 2022-12-04 "Linux man-pages 6.04" +.UC 7 +.SH NAME +hash \- hash database access method +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.ft B +#include +#include +.ft R +.fi +.SH DESCRIPTION +.IR "Note well" : +This page documents interfaces provided up until glibc 2.1. +Since glibc 2.2, glibc no longer provides these interfaces. +Probably, you are looking for the APIs provided by the +.I libdb +library instead. +.PP +The routine +.BR dbopen (3) +is the library interface to database files. +One of the supported file formats is hash files. +The general description of the database access methods is in +.BR dbopen (3), +this manual page describes only the hash-specific information. +.PP +The hash data structure is an extensible, dynamic hashing scheme. +.PP +The access-method-specific data structure provided to +.BR dbopen (3) +is defined in the +.I +include file as follows: +.PP +.in +4n +.EX +typedef struct { + unsigned int bsize; + unsigned int ffactor; + unsigned int nelem; + unsigned int cachesize; + uint32_t (*hash)(const void *, size_t); + int lorder; +} HASHINFO; +.EE +.in +.PP +The elements of this structure are as follows: +.TP 10 +.I bsize +defines the hash table bucket size, and is, by default, 256 bytes. +It may be preferable to increase the page size for disk-resident tables +and tables with large data items. +.TP +.I ffactor +indicates a desired density within the hash table. +It is an approximation of the number of keys allowed to accumulate in any +one bucket, determining when the hash table grows or shrinks. +The default value is 8. +.TP +.I nelem +is an estimate of the final size of the hash table. +If not set or set too low, hash tables will expand gracefully as keys +are entered, although a slight performance degradation may be noticed. +The default value is 1. +.TP +.I cachesize +is the suggested maximum size, in bytes, of the memory cache. +This value is +.IR "only advisory" , +and the access method will allocate more memory rather than fail. +.TP +.I hash +is a user-defined hash function. +Since no hash function performs equally well on all possible data, the +user may find that the built-in hash function does poorly on a particular +data set. +A user-specified hash functions must take two arguments (a pointer to a byte +string and a length) and return a 32-bit quantity to be used as the hash +value. +.TP +.I lorder +is the byte order for integers in the stored database metadata. +The number should represent the order as an integer; for example, +big endian order would be the number 4,321. +If +.I lorder +is 0 (no order is specified), the current host order is used. +If the file already exists, the specified value is ignored and the +value specified when the tree was created is used. +.PP +If the file already exists (and the +.B O_TRUNC +flag is not specified), the +values specified for +.IR bsize , +.IR ffactor , +.IR lorder , +and +.I nelem +are +ignored and the values specified when the tree was created are used. +.PP +If a hash function is specified, +.I hash_open +attempts to determine if the hash function specified is the same as +the one with which the database was created, and fails if it is not. +.PP +Backward-compatible interfaces to the routines described in +.BR dbm (3), +and +.BR ndbm (3) +are provided, however these interfaces are not compatible with +previous file formats. +.SH ERRORS +The +.I hash +access method routines may fail and set +.I errno +for any of the errors specified for the library routine +.BR dbopen (3). +.SH BUGS +Only big and little endian byte order are supported. +.SH SEE ALSO +.BR btree (3), +.BR dbopen (3), +.BR mpool (3), +.BR recno (3) +.PP +.IR "Dynamic Hash Tables" , +Per-Ake Larson, Communications of the ACM, April 1988. +.PP +.IR "A New Hash Package for UNIX" , +Margo Seltzer, USENIX Proceedings, Winter 1991. diff --git a/upstream/opensuse-leap-15-6/man3/hook.3form b/upstream/opensuse-leap-15-6/man3/hook.3form new file mode 100644 index 00000000..dc77031c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/hook.3form @@ -0,0 +1,94 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_hook.3x,v 1.11 2010/12/04 18:40:45 tom Exp $ +.TH hook 3FORM "" +.SH NAME +\fBform_hook\fR \- set hooks for automatic invocation by applications +.SH SYNOPSIS +\fB#include \fR +.br +int set_field_init(FORM *form, Form_Hook func); +.br +Form_Hook field_init(const FORM *form); +.br +int set_field_term(FORM *form, Form_Hook func); +.br +Form_Hook field_term(const FORM *form); +.br +int set_form_init(FORM *form, Form_Hook func); +.br +Form_Hook form_init(const FORM *form); +.br +int set_form_term(FORM *form, Form_Hook func); +.br +Form_Hook form_term(const FORM *form); +.br +.SH DESCRIPTION +These functions make it possible to set hook functions to be called at various +points in the automatic processing of input event codes by \fBform_driver\fR. +.PP +The function \fBset_field_init\fR sets a hook to be called at form-post time +and each time the selected field changes (after the change). \fBfield_init\fR +returns the current field init hook, if any (\fBNULL\fR if there is no such +hook). +.PP +The function \fBset_field_term\fR sets a hook to be called at form-unpost time +and each time the selected field changes (before the change). \fBfield_term\fR +returns the current field term hook, if any (\fBNULL\fR if there is no such +hook). +.PP +The function \fBset_form_init\fR sets a hook to be called at form-post time and +just after a page change once it is posted. \fBform_init\fR returns the +current form init hook, if any (\fBNULL\fR if there is no such hook). +.PP +The function \fBset_form_term\fR sets a hook to be called at form-unpost time +and just before a page change once it is posted. \fBform_init\fR +returns the current form term hook, if any (\fBNULL\fR if there is no such +hook). +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Other routines +return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/hook.3menu b/upstream/opensuse-leap-15-6/man3/hook.3menu new file mode 100644 index 00000000..9c504384 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/hook.3menu @@ -0,0 +1,95 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_hook.3x,v 1.11 2010/12/04 18:40:45 tom Exp $ +.TH hook 3MENU "" +.SH NAME +\fBmenu_hook\fR \- set hooks for automatic invocation by applications +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_init(MENU *menu, Menu_Hook func); +.br +Menu_Hook item_init(const MENU *menu); +.br +int set_item_term(MENU *menu, Menu_Hook func); +.br +Menu_Hook item_term(const MENU *menu); +.br +int set_menu_init(MENU *menu, Menu_Hook func); +.br +Menu_Hook menu_init(const MENU *menu); +.br +int set_menu_term(MENU *menu, Menu_Hook func); +.br +Menu_Hook menu_term(const MENU *menu); +.br +.SH DESCRIPTION +These functions make it possible to set hook functions to be called at various +points in the automatic processing of input event codes by \fBmenu_driver\fR. +.PP +The function \fBset_item_init\fR sets a hook to be called at menu-post time and +each time the selected item changes (after the change). \fBitem_init\fR +returns the current item init hook, if any (\fBNULL\fR if there is no such +hook). +.PP +The function \fBset_item_term\fR sets a hook to be called at menu-unpost time +and each time the selected item changes (before the change). \fBitem_term\fR +returns the current item term hook, if any (\fBNULL\fR if there is no such +hook). +.PP +The function \fBset_menu_init\fR sets a hook to be called at menu-post time and +just after the top row on the menu changes once it is posted. \fBmenu_init\fR +returns the current menu init hook, if any (\fBNULL\fR if there is no such +hook). +.PP +The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time +and just before the top row on the menu changes once it is posted. +\fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there +is no such hook). +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Other routines +return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/hsearch.3 b/upstream/opensuse-leap-15-6/man3/hsearch.3 new file mode 100644 index 00000000..0acf0115 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/hsearch.3 @@ -0,0 +1,356 @@ +'\" t +.\" Copyright 1993 Ulrich Drepper (drepper@karlsruhe.gmd.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" References consulted: +.\" SunOS 4.1.1 man pages +.\" Modified Sat Sep 30 21:52:01 1995 by Jim Van Zandt +.\" 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 +.\" +.TH hsearch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, +hsearch_r \- hash table management +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int hcreate(size_t " nel ); +.B "void hdestroy(void);" +.PP +.BI "ENTRY *hsearch(ENTRY " item ", ACTION " action ); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int hcreate_r(size_t " nel ", struct hsearch_data *" htab ); +.BI "void hdestroy_r(struct hsearch_data *" htab ); +.PP +.BI "int hsearch_r(ENTRY " item ", ACTION " action ", ENTRY **" retval , +.BI " struct hsearch_data *" htab ); +.fi +.SH DESCRIPTION +The three functions +.BR hcreate (), +.BR hsearch (), +and +.BR hdestroy () +allow the caller to create and manage a hash search table +containing entries consisting of a key (a string) and associated data. +Using these functions, only one hash table can be used at a time. +.PP +The three functions +.BR hcreate_r (), +.BR hsearch_r (), +.BR hdestroy_r () +are reentrant versions that allow a program to use +more than one hash search table at the same time. +The last argument, +.IR htab , +points to a structure that describes the table +on which the function is to operate. +The programmer should treat this structure as opaque +(i.e., do not attempt to directly access or modify +the fields in this structure). +.PP +First a hash table must be created using +.BR hcreate (). +The argument \fInel\fP specifies the maximum number of entries +in the table. +(This maximum cannot be changed later, so choose it wisely.) +The implementation may adjust this value upward to improve the +performance of the resulting hash table. +.\" e.g., in glibc it is raised to the next higher prime number +.PP +The +.BR hcreate_r () +function performs the same task as +.BR hcreate (), +but for the table described by the structure +.IR *htab . +The structure pointed to by +.I htab +must be zeroed before the first call to +.BR hcreate_r (). +.PP +The function +.BR hdestroy () +frees the memory occupied by the hash table that was created by +.BR hcreate (). +After calling +.BR hdestroy (), +a new hash table can be created using +.BR hcreate (). +The +.BR hdestroy_r () +function performs the analogous task for a hash table described by +.IR *htab , +which was previously created using +.BR hcreate_r (). +.PP +The +.BR hsearch () +function searches the hash table for an +item with the same key as \fIitem\fP (where "the same" is determined using +.BR strcmp (3)), +and if successful returns a pointer to it. +.PP +The argument \fIitem\fP is of type \fIENTRY\fP, which is defined in +\fI\fP as follows: +.PP +.in +4n +.EX +typedef struct entry { + char *key; + void *data; +} ENTRY; +.EE +.in +.PP +The field \fIkey\fP points to a null-terminated string which is the +search key. +The field \fIdata\fP points to data that is associated with that key. +.PP +The argument \fIaction\fP determines what +.BR hsearch () +does after an unsuccessful search. +This argument must either have the value +.BR ENTER , +meaning insert a copy of +.I item +(and return a pointer to the new hash table entry as the function result), +or the value +.BR FIND , +meaning that NULL should be returned. +(If +.I action +is +.BR FIND , +then +.I data +is ignored.) +.PP +The +.BR hsearch_r () +function is like +.BR hsearch () +but operates on the hash table described by +.IR *htab . +The +.BR hsearch_r () +function differs from +.BR hsearch () +in that a pointer to the found item is returned in +.IR *retval , +rather than as the function result. +.SH RETURN VALUE +.BR hcreate () +and +.BR hcreate_r () +return nonzero on success. +They return 0 on error, with +.I errno +set to indicate the error. +.PP +On success, +.BR hsearch () +returns a pointer to an entry in the hash table. +.BR hsearch () +returns NULL on error, that is, +if \fIaction\fP is \fBENTER\fP and +the hash table is full, or \fIaction\fP is \fBFIND\fP and \fIitem\fP +cannot be found in the hash table. +.BR hsearch_r () +returns nonzero on success, and 0 on error. +In the event of an error, these two functions set +.I errno +to indicate the error. +.SH ERRORS +.BR hcreate_r () +and +.BR hdestroy_r () +can fail for the following reasons: +.TP +.B EINVAL +.I htab +is NULL. +.PP +.BR hsearch () +and +.BR hsearch_r () +can fail for the following reasons: +.TP +.B ENOMEM +.I action +was +.BR ENTER , +.I key +was not found in the table, +and there was no room in the table to add a new entry. +.TP +.B ESRCH +.I action +was +.BR FIND , +and +.I key +was not found in the table. +.PP +POSIX.1 specifies only the +.\" PROX.1-2001, POSIX.1-2008 +.B ENOMEM +error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR hcreate (), +.BR hsearch (), +.BR hdestroy () +T} Thread safety MT-Unsafe race:hsearch +T{ +.BR hcreate_r (), +.BR hsearch_r (), +.BR hdestroy_r () +T} Thread safety MT-Safe race:htab +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR hcreate () +.TQ +.BR hsearch () +.TQ +.BR hdestroy () +POSIX.1-2008. +.TP +.BR hcreate_r () +.TQ +.BR hsearch_r () +.TQ +.BR hdestroy_r () +GNU. +.SH HISTORY +.TP +.BR hcreate () +.TQ +.BR hsearch () +.TQ +.BR hdestroy () +SVr4, POSIX.1-2001. +.TP +.BR hcreate_r () +.TQ +.BR hsearch_r () +.TQ +.BR hdestroy_r () +GNU. +.SH NOTES +Hash table implementations are usually more efficient when the +table contains enough free space to minimize collisions. +Typically, this means that +.I nel +should be at least 25% larger than the maximum number of elements +that the caller expects to store in the table. +.PP +The +.BR hdestroy () +and +.BR hdestroy_r () +functions do not free the buffers pointed to by the +.I key +and +.I data +elements of the hash table entries. +(It can't do this because it doesn't know +whether these buffers were allocated dynamically.) +If these buffers need to be freed (perhaps because the program +is repeatedly creating and destroying hash tables, +rather than creating a single table whose lifetime +matches that of the program), +then the program must maintain bookkeeping data structures that +allow it to free them. +.SH BUGS +SVr4 and POSIX.1-2001 specify that \fIaction\fP +is significant only for unsuccessful searches, so that an \fBENTER\fP +should not do anything for a successful search. +In libc and glibc (before glibc 2.3), the +implementation violates the specification, +updating the \fIdata\fP for the given \fIkey\fP in this case. +.PP +Individual hash table entries can be added, but not deleted. +.SH EXAMPLES +The following program inserts 24 items into a hash table, then prints +some of them. +.PP +.\" SRC BEGIN (hsearch.c) +.EX +#include +#include +#include + +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 (size_t 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 (size_t 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 +.\" SRC END +.SH SEE ALSO +.BR bsearch (3), +.BR lsearch (3), +.BR malloc (3), +.BR tsearch (3) diff --git a/upstream/opensuse-leap-15-6/man3/hypot.3 b/upstream/opensuse-leap-15-6/man3/hypot.3 new file mode 100644 index 00000000..fda0ecc7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/hypot.3 @@ -0,0 +1,158 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH hypot 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +hypot, hypotf, hypotl \- Euclidean distance function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double hypot(double " x ", double " y ); +.BI "float hypotf(float " x ", float " y ); +.BI "long double hypotl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR hypot (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR hypotf (), +.BR hypotl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return +.RI sqrt( x * x + y * y ). +This is the length of the hypotenuse of a right-angled triangle +with sides of length +.I x +and +.IR y , +or the distance of the point +.RI ( x , y ) +from the origin. +.PP +The calculation is performed without undue overflow or underflow +during the intermediate steps of the calculation. +.\" e.g., hypot(DBL_MIN, DBL_MIN) does the right thing, as does, say +.\" hypot(DBL_MAX/2.0, DBL_MAX/2.0). +.SH RETURN VALUE +On success, these functions return the length of the hypotenuse of +a right-angled triangle +with sides of length +.I x +and +.IR y . +.PP +If +.I x +or +.I y +is an infinity, +positive infinity is returned. +.PP +If +.I x +or +.I y +is a NaN, +and the other argument is not an infinity, +a NaN is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively. +.PP +If both arguments are subnormal, and the result is subnormal, +.\" Actually, could the result not be subnormal if both arguments +.\" are subnormal? I think not -- mtk, Jul 2008 +a range error occurs, +and the correct result is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error: result underflow +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.IP +These functions do not set +.I errno +for this case. +.\" This is intentional; see +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6795 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR hypot (), +.BR hypotf (), +.BR hypotl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR cabs (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/iconv.3 b/upstream/opensuse-leap-15-6/man3/iconv.3 new file mode 100644 index 00000000..33b3a604 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iconv.3 @@ -0,0 +1,200 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" 2000-11-15 aeb, fixed prototype +.\" +.TH iconv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iconv \- perform character set conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t iconv(iconv_t " cd , +.BI " char **restrict " inbuf ", size_t *restrict " inbytesleft , +.BI " char **restrict " outbuf ", size_t *restrict " outbytesleft ); +.fi +.SH DESCRIPTION +The +.BR iconv () +function converts a sequence of characters in one character encoding +to a sequence of characters in another character encoding. +The +.I cd +argument is a conversion descriptor, +previously created by a call to +.BR iconv_open (3); +the conversion descriptor defines the character encodings that +.BR iconv () +uses for the conversion. +The +.I inbuf +argument is the address of a variable that points to +the first character of the input sequence; +.I inbytesleft +indicates the number of bytes in that buffer. +The +.I outbuf +argument is the address of a variable that points to +the first byte available in the output buffer; +.I outbytesleft +indicates the number of bytes available in the output buffer. +.PP +The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL. +In this case, the +.BR iconv () +function converts the multibyte sequence +starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP. +At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read. +At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written. +.PP +The +.BR iconv () +function converts one multibyte character at a time, and for +each character conversion it increments \fI*inbuf\fP and decrements +\fI*inbytesleft\fP by the number of converted input bytes, it increments +\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of converted +output bytes, and it updates the conversion state contained in \fIcd\fP. +If the character encoding of the input is stateful, the +.BR iconv () +function can also convert a sequence of input bytes +to an update to the conversion state without producing any output bytes; +such input is called a \fIshift sequence\fP. +The conversion can stop for four reasons: +.IP \[bu] 3 +An invalid multibyte sequence is encountered in the input. +In this case, +it sets \fIerrno\fP to \fBEILSEQ\fP and returns +.IR (size_t)\ \-1 . +\fI*inbuf\fP +is left pointing to the beginning of the invalid multibyte sequence. +.IP \[bu] +The input byte sequence has been entirely converted, +that is, \fI*inbytesleft\fP has gone down to 0. +In this case, +.BR iconv () +returns the number of +nonreversible conversions performed during this call. +.IP \[bu] +An incomplete multibyte sequence is encountered in the input, and the +input byte sequence terminates after it. +In this case, it sets \fIerrno\fP to +\fBEINVAL\fP and returns +.IR (size_t)\ \-1 . +\fI*inbuf\fP is left pointing to the +beginning of the incomplete multibyte sequence. +.IP \[bu] +The output buffer has no more room for the next converted character. +In this case, it sets \fIerrno\fP to \fBE2BIG\fP and returns +.IR (size_t)\ \-1 . +.PP +A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but +\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL. +In this case, the +.BR iconv () +function attempts to set \fIcd\fP's conversion state to the +initial state and store a corresponding shift sequence at \fI*outbuf\fP. +At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written. +If the output buffer has no more room for this reset sequence, it sets +\fIerrno\fP to \fBE2BIG\fP and returns +.IR (size_t)\ \-1 . +Otherwise, it increments +\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes +written. +.PP +A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and +\fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL. +In this case, the +.BR iconv () +function sets \fIcd\fP's conversion state to the initial state. +.SH RETURN VALUE +The +.BR iconv () +function returns the number of characters converted in a +nonreversible way during this call; reversible conversions are not counted. +In case of error, +.BR iconv () +returns +.I (size_t)\ \-1 +and sets +.I errno +to indicate the error. +.SH ERRORS +The following errors can occur, among others: +.TP +.B E2BIG +There is not sufficient room at \fI*outbuf\fP. +.TP +.B EILSEQ +An invalid multibyte sequence has been encountered in the input. +.TP +.B EINVAL +An incomplete multibyte sequence has been encountered in the input. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iconv () +T} Thread safety MT-Safe race:cd +.TE +.hy +.ad +.sp 1 +.PP +The +.BR iconv () +function is MT-Safe, as long as callers arrange for +mutual exclusion on the +.I cd +argument. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +In each series of calls to +.BR iconv (), +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 +Although +.I inbuf +and +.I outbuf +are typed as +.IR "char\ **" , +this does not mean that the objects they point can be interpreted +as C strings or as arrays of characters: +the interpretation of character byte sequences is +handled internally by the conversion functions. +In some encodings, a zero byte may be a valid part of a multibyte character. +.PP +The caller of +.BR iconv () +must ensure that the pointers passed to the function are suitable +for accessing characters in the appropriate character set. +This includes ensuring correct alignment on platforms that have +tight restrictions on alignment. +.SH SEE ALSO +.BR iconv_close (3), +.BR iconv_open (3), +.BR iconvconfig (8) diff --git a/upstream/opensuse-leap-15-6/man3/iconv_close.3 b/upstream/opensuse-leap-15-6/man3/iconv_close.3 new file mode 100644 index 00000000..adf614dd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iconv_close.3 @@ -0,0 +1,59 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html +.\" +.TH iconv_close 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iconv_close \- deallocate descriptor for character set conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iconv_close(iconv_t " cd ); +.fi +.SH DESCRIPTION +The +.BR iconv_close () +function deallocates a conversion descriptor +.I cd +previously allocated using +.BR iconv_open (3). +.SH RETURN VALUE +On success, +.BR iconv_close () +returns 0; otherwise, it returns \-1 and sets +.I errno +to indicate the error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iconv_close () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH SEE ALSO +.BR iconv (3), +.BR iconv_open (3) diff --git a/upstream/opensuse-leap-15-6/man3/iconv_open.3 b/upstream/opensuse-leap-15-6/man3/iconv_open.3 new file mode 100644 index 00000000..8b0fc37c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iconv_open.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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'. +.\" +.TH iconv_open 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iconv_open \- allocate descriptor for character set conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "iconv_t iconv_open(const char *" tocode ", const char *" fromcode ); +.fi +.SH DESCRIPTION +The +.BR iconv_open () +function allocates a conversion descriptor suitable +for converting byte sequences from character encoding +.I fromcode +to +character encoding +.IR tocode . +.PP +The values permitted for +.I fromcode +and +.I tocode +and the supported +combinations are system-dependent. +For the GNU C library, the permitted +values are listed by the +.I "iconv \-\-list" +command, and all combinations +of the listed values are supported. +Furthermore the GNU C library and the +GNU libiconv library support the following two suffixes: +.TP +//TRANSLIT +When the string "//TRANSLIT" is appended to +.IR tocode , +transliteration +is activated. +This means that when a character cannot be represented in the +target character set, it can be approximated through one or several +similarly looking characters. +.TP +//IGNORE +When the string "//IGNORE" is appended to +.IR tocode , +characters that +cannot be represented in the target character set will be silently discarded. +.PP +The resulting conversion descriptor can be used with +.BR iconv (3) +any number of times. +It remains valid until deallocated using +.BR iconv_close (3). +.PP +A conversion descriptor contains a conversion state. +After creation using +.BR iconv_open (), +the state is in the initial state. +Using +.BR iconv (3) +modifies the descriptor's conversion state. +To bring the state back to the initial state, use +.BR iconv (3) +with NULL as +.I inbuf +argument. +.SH RETURN VALUE +On success, +.BR iconv_open () +returns a freshly allocated conversion +descriptor. +On failure, it returns +.I (iconv_t)\ \-1 +and sets +.I errno +to indicate the error. +.SH ERRORS +The following error can occur, among others: +.TP +.B EINVAL +The conversion from +.I fromcode +to +.I tocode +is not supported by the +implementation. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iconv_open () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001, SUSv2. +.SH SEE ALSO +.BR iconv (1), +.BR iconv (3), +.BR iconv_close (3) diff --git a/upstream/opensuse-leap-15-6/man3/if_nameindex.3 b/upstream/opensuse-leap-15-6/man3/if_nameindex.3 new file mode 100644 index 00000000..fa9e113a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/if_nameindex.3 @@ -0,0 +1,157 @@ +'\" t +.\" Copyright (c) 2012 YOSHIFUJI Hideaki +.\" and Copyright (c) 2012 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH if_nameindex 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +if_nameindex, if_freenameindex \- get network interface names and indexes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "struct if_nameindex *if_nameindex(" void ); +.BI "void if_freenameindex(struct if_nameindex *" "ptr" ); +.fi +.SH DESCRIPTION +The +.BR if_nameindex () +function returns an array of +.I if_nameindex +structures, each containing information +about one of the network interfaces on the local system. +The +.I if_nameindex +structure contains at least the following entries: +.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 +.I if_index +field contains the interface index. +The +.I if_name +field points to the null-terminated interface name. +The end of the array is indicated by entry with +.I if_index +set to zero and +.I if_name +set to NULL. +.PP +The data structure returned by +.BR if_nameindex () +is dynamically allocated and should be freed using +.BR if_freenameindex () +when no longer needed. +.SH RETURN VALUE +On success, +.BR if_nameindex () +returns pointer to the array; +on error, NULL is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.BR if_nameindex () +may fail and set +.I errno +if: +.TP +.B ENOBUFS +Insufficient resources available. +.PP +.BR if_nameindex () +may also fail for any of the errors specified for +.BR socket (2), +.BR bind (2), +.BR ioctl (2), +.BR getsockname (2), +.BR recvmsg (2), +.BR sendto (2), +or +.BR malloc (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR if_nameindex (), +.BR if_freenameindex () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008, RFC\ 3493. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +BSDi. +.PP +Before glibc 2.3.4, +the implementation supported only interfaces with IPv4 addresses. +Support of interfaces that don't have IPv4 addresses is available only +on kernels that support netlink. +.SH EXAMPLES +The program below demonstrates the use of the functions described +on this page. +An example of the output this program might produce is the following: +.PP +.in +4n +.EX +$ \fB./a.out\fI +1: lo +2: wlan0 +3: em1 +.EE +.in +.SS Program source +.\" SRC BEGIN (if_nameindex.c) +.EX +#include +#include +#include +#include + +int +main(void) +{ + 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 +.\" SRC END +.SH SEE ALSO +.BR getsockopt (2), +.BR setsockopt (2), +.BR getifaddrs (3), +.BR if_indextoname (3), +.BR if_nametoindex (3), +.BR ifconfig (8) diff --git a/upstream/opensuse-leap-15-6/man3/if_nametoindex.3 b/upstream/opensuse-leap-15-6/man3/if_nametoindex.3 new file mode 100644 index 00000000..bdfea65a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/if_nametoindex.3 @@ -0,0 +1,102 @@ +'\" t +.\" Copyright (c) 2012 YOSHIFUJI Hideaki +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH if_nametoindex 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +if_nametoindex, if_indextoname \- mappings between network interface +names and indexes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "unsigned int if_nametoindex(const char *" "ifname" ); +.BI "char *if_indextoname(unsigned int ifindex, char *" ifname ); +.fi +.SH DESCRIPTION +The +.BR if_nametoindex () +function returns the index of the network interface +corresponding to the name +.IR ifname . +.PP +The +.BR if_indextoname () +function returns the name of the network interface +corresponding to the interface index +.IR ifindex . +The name is placed in the buffer pointed to by +.IR ifname . +The buffer must allow for the storage of at least +.B IF_NAMESIZE +bytes. +.SH RETURN VALUE +On success, +.BR if_nametoindex () +returns the index number of the network interface; +on error, 0 is returned and +.I errno +is set to indicate the error. +.PP +On success, +.BR if_indextoname () +returns +.IR ifname ; +on error, NULL is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.BR if_nametoindex () +may fail and set +.I errno +if: +.TP +.B ENODEV +No interface found with given name. +.PP +.BR if_indextoname () +may fail and set +.I errno +if: +.TP +.B ENXIO +No interface found for the index. +.PP +.BR if_nametoindex () +and +.BR if_indextoname () +may also fail for any of the errors specified for +.BR socket (2) +or +.BR ioctl (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR if_nametoindex (), +.BR if_indextoname () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008, RFC\ 3493. +.SH HISTORY +POSIX.1-2001. +BSDi. +.SH SEE ALSO +.BR getifaddrs (3), +.BR if_nameindex (3), +.BR ifconfig (8) diff --git a/upstream/opensuse-leap-15-6/man3/ilogb.3 b/upstream/opensuse-leap-15-6/man3/ilogb.3 new file mode 100644 index 00000000..c91ff093 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ilogb.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Inspired by a page by Walter Harms created 2002-08-10 +.\" +.TH ilogb 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int ilogb(double " x ); +.BI "int ilogbf(float " x ); +.BI "int ilogbl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ilogb (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR ilogbf (), +.BR ilogbl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the exponent part of their argument +as a signed integer. +When no error occurs, these functions +are equivalent to the corresponding +.BR logb (3) +functions, cast to +.IR int . +.SH RETURN VALUE +On success, these functions return the exponent of +.IR x , +as a signed integer. +.PP +If +.I x +is zero, then a domain error occurs, and the functions return +.\" the POSIX.1 spec for logb() says logb() gives pole error for this +.\" case, but for ilogb() it says domain error. +.BR FP_ILOGB0 . +.\" glibc: The numeric value is either `INT_MIN' or `-INT_MAX'. +.PP +If +.I x +is a NaN, then a domain error occurs, and the functions return +.BR FP_ILOGBNAN . +.\" glibc: The numeric value is either `INT_MIN' or `INT_MAX'. +.\" On i386, FP_ILOGB0 and FP_ILOGBNAN have the same value. +.PP +If +.I x +is negative infinity or positive infinity, then +a domain error occurs, and the functions return +.BR INT_MAX . +.\" +.\" 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. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is 0 or a NaN +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised, and +.I errno +is set to +.B EDOM +(but see BUGS). +.TP +Domain error: \fIx\fP is an infinity +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised, and +.I errno +is set to +.B EDOM +(but see BUGS). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ilogb (), +.BR ilogbf (), +.BR ilogbl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH BUGS +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6794 +Before glibc 2.16, the following bugs existed in the +glibc implementation of these functions: +.IP \[bu] 3 +The domain error case where +.I x +is 0 or a NaN did not cause +.I errno +to be set or (on some architectures) raise a floating-point exception. +.IP \[bu] +The domain error case where +.I x +is an infinity did not cause +.I errno +to be set or raise a floating-point exception. +.SH SEE ALSO +.BR log (3), +.BR logb (3), +.BR significand (3) diff --git a/upstream/opensuse-leap-15-6/man3/in_wch.3ncurses b/upstream/opensuse-leap-15-6/man3/in_wch.3ncurses new file mode 100644 index 00000000..05039d43 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/in_wch.3ncurses @@ -0,0 +1,66 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_in_wch.3x,v 1.6 2017/11/21 00:53:44 tom Exp $ +.TH in_wch 3NCURSES "" +.SH NAME +\fBin_wch\fR, +\fBmvin_wch\fR, +\fBmvwin_wch\fR, +\fBwin_wch\fR \- extract a complex character and rendition from a window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint in_wch(cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint mvin_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint mvwin_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.br +\fBint win_wch(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR +.SH DESCRIPTION +These functions extract the complex character and rendition from +the current position in the named window into the \fBcchar_t\fR object +referenced by wcval. +.SH RETURN VALUE +No errors are defined in the XSI Curses standard. +This implementation checks for null pointers, returns \fBERR\fP in that case. +Also, the \fImv\fR routines check for error moving the cursor, returning \fBERR\fP +in that case. +Otherwise they return \fBOK\fP. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that all of these routines may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/in_wchstr.3ncurses b/upstream/opensuse-leap-15-6/man3/in_wchstr.3ncurses new file mode 100644 index 00000000..b5a743f4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/in_wchstr.3ncurses @@ -0,0 +1,120 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_in_wchstr.3x,v 1.10 2017/11/21 00:53:44 tom Exp $ +.TH in_wchstr 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBin_wchstr\fR, +\fBin_wchnstr\fR, +\fBwin_wchstr\fR, +\fBwin_wchnstr\fR, +\fBmvin_wchstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchstr\fR, +\fBmvwin_wchnstr\fR \- get an array of complex characters and renditions from a curses window +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +\fBint in_wchstr(cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint in_wchnstr(cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint win_wchstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint win_wchnstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvin_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvin_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwin_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR +.br +\fBint mvwin_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR, int \fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These functions return an array of complex characters in \fIwchstr\fR, +starting at the current cursor position in the named window. +Attributes (rendition) are stored with the characters. +.PP +The +\fBin_wchnstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchnstr\fR +and +\fBwin_wchnstr\fR +fill the array +with at most +\fIn\fR +\fBcchar_t\fR +elements. +.br +.SH NOTES +Note that all routines except +\fBwin_wchnstr\fR +may be +macros. +.PP +Reading a line that overflows the array pointed to by +\fIwchstr\fR +with +\fBin_wchstr\fR, +\fBmvin_wchstr\fR, +\fBmvwin_wchstr\fR +or +\fBwin_wchstr\fR +causes undefined results. Therefore, the use of +\fBin_wchnstr\fR, +\fBmvin_wchnstr\fR, +\fBmvwin_wchnstr\fR, or +\fBwin_wchnstr\fR +is recommended. +.SH RETURN VALUE +Upon successful completion, these functions return +\fBOK\fR. +Otherwise, they return +\fBERR\fR. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH PORTABILITY +The XSI Curses defines no error conditions. +This implementation checks for null pointers, +returning \fBERR\fP in that case. +.SH SEE ALSO +Functions: +\fBncurses\fR(3NCURSES), +\fBin_wch\fR(3NCURSES), +\fBinstr\fR(3NCURSES), +\fBinwstr\fR(3NCURSES) +\fBinchstr\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/inch.3ncurses b/upstream/opensuse-leap-15-6/man3/inch.3ncurses new file mode 100644 index 00000000..a76adca5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inch.3ncurses @@ -0,0 +1,112 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inch.3x,v 1.20 2017/11/18 23:47:37 tom Exp $ +.TH inch 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBinch\fR, +\fBwinch\fR, +\fBmvinch\fR, +\fBmvwinch\fR \- get a character and attributes from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBchtype inch(void);\fR +.br +\fBchtype winch(WINDOW *win);\fR +.br +\fBchtype mvinch(int y, int x);\fR +.br +\fBchtype mvwinch(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines return the character, of type \fBchtype\fR, at the current +position in the named window. If any attributes are set for that position, +their values are OR'ed into the value returned. Constants defined in +\fB\fR can be used with the \fB&\fR (logical AND) operator to +extract the character or attributes alone. +. +.SS Attributes +The following bit-masks may be AND-ed with characters returned by \fBwinch\fR. +. +.TS +l l . +\fBA_CHARTEXT\fR Bit-mask to extract character +\fBA_ATTRIBUTES\fR Bit-mask to extract attributes +\fBA_COLOR\fR Bit-mask to extract color-pair field information +.TE +.SH RETURN VALUE +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.PP +The \fBwinch\fP function does not return an error if the window contains +characters larger than 8-bits (255). +Only the low-order 8 bits of the character are used by \fBwinch\fP. +.SH NOTES +Note that all of these routines may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.PP +Very old systems (before standardization) provide a different function +with the same name: +.bP +The \fBwinch\fP function was part of the original BSD curses library, +which stored a 7-bit character combined with the \fIstandout\fP attribute. +.IP +In BSD curses, \fBwinch\fP returned only the character (as an integer) +with the \fIstandout\fP attribute removed. +.bP +System V curses added support for several video attributes which +could be combined with characters in the window. +.IP +Reflecting this improvement, the function was altered to return the +character combined with all video attributes in a \fBchtype\fP value. +.PP +X/Open Curses does not specify +the size and layout of attributes, color and character values in +\fBchtype\fP; it is implementation-dependent. +This implementation uses 8 bits for character values. +An application using more bits, e.g., a Unicode value, +should use the wide-character equivalents to these functions. +.SH SEE ALSO +.TP 5 +\fBncurses\fR(3NCURSES) +gives an overview of the WINDOW and \fBchtype\fP data types. +.TP 5 +\fBattr\fR(3NCURSES) +goes into more detail, pointing out portability problems and +constraints on the use of \fBchtype\fP for returning window information. +.TP 5 +\fBin_wch\fR(3NCURSES) +describes comparable functions for the wide-character (ncursesw) library. diff --git a/upstream/opensuse-leap-15-6/man3/inchstr.3ncurses b/upstream/opensuse-leap-15-6/man3/inchstr.3ncurses new file mode 100644 index 00000000..15839280 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inchstr.3ncurses @@ -0,0 +1,109 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inchstr.3x,v 1.17 2017/11/18 23:47:37 tom Exp $ +.TH inchstr 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBinchstr\fR, +\fBinchnstr\fR, +\fBwinchstr\fR, +\fBwinchnstr\fR, +\fBmvinchstr\fR, +\fBmvinchnstr\fR, +\fBmvwinchstr\fR, +\fBmvwinchnstr\fR \- get a string of characters (and attributes) from a \fBcurses\fR window +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint inchstr(chtype *chstr);\fR +.br +\fBint inchnstr(chtype *chstr, int n);\fR +.br +\fBint winchstr(WINDOW *win, chtype *chstr);\fR +.br +\fBint winchnstr(WINDOW *win, chtype *chstr, int n);\fR +.br +\fBint mvinchstr(int y, int x, chtype *chstr);\fR +.br +\fBint mvinchnstr(int y, int x, chtype *chstr, int n);\fR +.br +\fBint mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);\fR +.br +\fBint mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR +.br +.SH DESCRIPTION +These routines return a NULL-terminated array of \fBchtype\fR quantities, +starting at the current cursor position in the named window and ending at the +right margin of the window. The four functions with \fIn\fR as +the last argument, return a leading substring at most \fIn\fR characters long +(exclusive of the trailing (chtype)0). +Constants defined in \fB\fR can be used with the \fB&\fR (logical +AND) operator to extract the character or the attribute alone from any position +in the \fIchstr\fR [see \fBinch\fR(3NCURSES)]. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR upon successful completion (the number of characters +retrieved, exclusive of the trailing 0). +.PP +X/Open Curses defines no error conditions. +In this implementation: +.bP +If the \fIwin\fP parameter is null, an error is returned, +.bP +If the \fIchstr\fP parameter is null, an error is returned, +.PP +Functions with a \*(``mv\*('' prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that all routines except \fBwinchnstr\fR may be macros. SVr4 does not +document whether the result string is zero-terminated; it does not document +whether a length limit argument includes any trailing 0; and it does not +document the meaning of the return value. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. It is no +more specific than the SVr4 documentation on the trailing 0. It does specify +that the successful return of the functions is \fBOK\fR. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBinch\fR(3NCURSES). +.PP +Comparable functions in the wide-character (ncursesw) library are +described in +\fBin_wchstr\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/index.3 b/upstream/opensuse-leap-15-6/man3/index.3 new file mode 100644 index 00000000..ae638896 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/index.3 @@ -0,0 +1,44 @@ +.\" Copyright 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH index 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +index, rindex \- locate character in string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *index(const char *" s ", int " c ); +.BI "[[deprecated]] char *rindex(const char *" s ", int " c ); +.fi +.SH DESCRIPTION +.BR index () +is identical to +.BR strchr (3). +.PP +.BR rindex () +is identical to +.BR strrchr (3). +.PP +Use +.BR strchr (3) +and +.BR strrchr (3) +instead of these functions. +.SH STANDARDS +None. +.SH HISTORY +4.3BSD; marked as LEGACY in POSIX.1-2001. +Removed in POSIX.1-2008, +recommending +.BR strchr (3) +and +.BR strrchr (3) +instead. +.SH SEE ALSO +.BR strchr (3), +.BR strrchr (3) diff --git a/upstream/opensuse-leap-15-6/man3/inet.3 b/upstream/opensuse-leap-15-6/man3/inet.3 new file mode 100644 index 00000000..cec4ae6b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inet.3 @@ -0,0 +1,337 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" libc.info (from glibc distribution) +.\" Modified Sat Jul 24 19:12:00 1993 by Rik Faith +.\" Modified Sun Sep 3 20:29:36 1995 by Jim Van Zandt +.\" Changed network into host byte order (for inet_network), +.\" Andreas Jaeger , 980130. +.\" 2008-06-19, mtk +.\" Describe the various address forms supported by inet_aton(). +.\" Clarify discussion of inet_lnaof(), inet_netof(), and inet_makeaddr(). +.\" Add discussion of Classful Addressing, noting that it is obsolete. +.\" Added an EXAMPLE program. +.\" +.TH inet 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, +inet_netof \- Internet address manipulation routines +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "int inet_aton(const char *" cp ", struct in_addr *" inp ); +.PP +.BI "in_addr_t inet_addr(const char *" cp ); +.BI "in_addr_t inet_network(const char *" cp ); +.PP +.BI "[[deprecated]] char *inet_ntoa(struct in_addr " in ); +.PP +.BI "[[deprecated]] struct in_addr inet_makeaddr(in_addr_t " net , +.BI " in_addr_t " host ); +.PP +.BI "[[deprecated]] in_addr_t inet_lnaof(struct in_addr " in ); +.BI "[[deprecated]] in_addr_t inet_netof(struct in_addr " in ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR inet_aton (), +.BR inet_ntoa (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + In glibc up to and including 2.19: + _BSD_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +.BR inet_aton () +converts the Internet host address \fIcp\fP from the +IPv4 numbers-and-dots notation into binary form (in network byte order) +and stores it in the structure that \fIinp\fP points to. +.BR inet_aton () +returns nonzero if the address is valid, zero if not. +The address supplied in +.I cp +can have one of the following forms: +.TP 10 +.I a.b.c.d +Each of the four numeric parts specifies a byte of the address; +the bytes are assigned in left-to-right order to produce the binary address. +.TP +.I a.b.c +Parts +.I a +and +.I b +specify the first two bytes of the binary address. +Part +.I c +is interpreted as a 16-bit value that defines the rightmost two bytes +of the binary address. +This notation is suitable for specifying (outmoded) Class B +network addresses. +.TP +.I a.b +Part +.I a +specifies the first byte of the binary address. +Part +.I b +is interpreted as a 24-bit value that defines the rightmost three bytes +of the binary address. +This notation is suitable for specifying (outmoded) Class A +network addresses. +.TP +.I a +The value +.I a +is interpreted as a 32-bit value that is stored directly +into the binary address without any byte rearrangement. +.PP +In all of the above forms, +components of the dotted address can be specified in decimal, +octal (with a leading +.IR 0 ), +or hexadecimal, with a leading +.IR 0X ). +Addresses in any of these forms are collectively termed +.IR "IPV4 numbers-and-dots notation" . +The form that uses exactly four decimal numbers is referred to as +.I IPv4 dotted-decimal notation +(or sometimes: +.IR "IPv4 dotted-quad notation" ). +.PP +.BR inet_aton () +returns 1 if the supplied string was successfully interpreted, +or 0 if the string is invalid +.RB ( errno +is +.I not +set on error). +.PP +The +.BR inet_addr () +function converts the Internet host address +\fIcp\fP from IPv4 numbers-and-dots notation into binary data in network +byte order. +If the input is invalid, +.B INADDR_NONE +(usually \-1) is returned. +Use of this function is problematic because \-1 is a valid address +(255.255.255.255). +Avoid its use in favor of +.BR inet_aton (), +.BR inet_pton (3), +or +.BR getaddrinfo (3), +which provide a cleaner way to indicate error return. +.PP +The +.BR inet_network () +function converts +.IR cp , +a string in IPv4 numbers-and-dots notation, +into a number in host byte order suitable for use as an +Internet network address. +On success, the converted address is returned. +If the input is invalid, \-1 is returned. +.PP +The +.BR inet_ntoa () +function converts the Internet host address +\fIin\fP, given in network byte order, to a string in IPv4 +dotted-decimal notation. +The string is returned in a statically +allocated buffer, which subsequent calls will overwrite. +.PP +The +.BR inet_lnaof () +function returns the local network address part +of the Internet address \fIin\fP. +The returned value is in host byte order. +.PP +The +.BR inet_netof () +function returns the network number part of +the Internet address \fIin\fP. +The returned value is in host byte order. +.PP +The +.BR inet_makeaddr () +function is the converse of +.BR inet_netof () +and +.BR inet_lnaof (). +It returns an Internet host address in network byte order, +created by combining the network number \fInet\fP +with the local address \fIhost\fP, both in +host byte order. +.PP +The structure \fIin_addr\fP as used in +.BR inet_ntoa (), +.BR inet_makeaddr (), +.BR inet_lnaof (), +and +.BR inet_netof () +is defined in +.I +as: +.PP +.in +4n +.EX +typedef uint32_t in_addr_t; + +struct in_addr { + in_addr_t s_addr; +}; +.EE +.in +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR inet_aton (), +.BR inet_addr (), +.BR inet_network (), +.BR inet_ntoa () +T} Thread safety MT-Safe locale +T{ +.BR inet_makeaddr (), +.BR inet_lnaof (), +.BR inet_netof () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR inet_addr () +.TQ +.BR inet_ntoa () +POSIX.1-2008. +.TP +.BR inet_aton () +None. +.SH STANDARDS +.TP +.BR inet_addr () +.TQ +.BR inet_ntoa () +POSIX.1-2001, 4.3BSD. +.PP +.BR inet_lnaof (), +.BR inet_netof (), +and +.BR inet_makeaddr () +are legacy functions that assume they are dealing with +.IR "classful network addresses" . +Classful networking divides IPv4 network addresses into host and network +components at byte boundaries, as follows: +.TP 10 +Class A +This address type is indicated by the value 0 in the +most significant bit of the (network byte ordered) address. +The network address is contained in the most significant byte, +and the host address occupies the remaining three bytes. +.TP +Class B +This address type is indicated by the binary value 10 in the +most significant two bits of the address. +The network address is contained in the two most significant bytes, +and the host address occupies the remaining two bytes. +.TP +Class C +This address type is indicated by the binary value 110 in the +most significant three bits of the address. +The network address is contained in the three most significant bytes, +and the host address occupies the remaining byte. +.PP +Classful network addresses are now obsolete, +having been superseded by Classless Inter-Domain Routing (CIDR), +which divides addresses into network and host components at +arbitrary bit (rather than byte) boundaries. +.SH NOTES +On x86 architectures, the host byte order is Least Significant Byte +first (little endian), whereas the network byte order, as used on the +Internet, is Most Significant Byte first (big endian). +.SH EXAMPLES +An example of the use of +.BR inet_aton () +and +.BR inet_ntoa () +is shown below. +Here are some example runs: +.PP +.in +4n +.EX +.RB "$" " ./a.out 226.000.000.037" " # Last byte is in octal" +226.0.0.31 +.RB "$" " ./a.out 0x7f.1 " " # First byte is in hex" +127.0.0.1 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (inet.c) +.EX +#define _DEFAULT_SOURCE +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + struct in_addr addr; + + if (argc != 2) { + fprintf(stderr, "%s \en", argv[0]); + exit(EXIT_FAILURE); + } + + if (inet_aton(argv[1], &addr) == 0) { + fprintf(stderr, "Invalid address\en"); + exit(EXIT_FAILURE); + } + + printf("%s\en", inet_ntoa(addr)); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR byteorder (3), +.BR getaddrinfo (3), +.BR gethostbyname (3), +.BR getnameinfo (3), +.BR getnetent (3), +.BR inet_net_pton (3), +.BR inet_ntop (3), +.BR inet_pton (3), +.BR hosts (5), +.BR networks (5) diff --git a/upstream/opensuse-leap-15-6/man3/inet_net_pton.3 b/upstream/opensuse-leap-15-6/man3/inet_net_pton.3 new file mode 100644 index 00000000..4f5479a9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inet_net_pton.3 @@ -0,0 +1,369 @@ +.\" Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH inet_net_pton 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +inet_net_pton, inet_net_ntop \- Internet network number conversion +.SH LIBRARY +Resolver library +.RI ( libresolv ", " \-lresolv ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int inet_net_pton(int " af ", const char *" pres , +.BI " void " netp [. nsize "], size_t " nsize ); +.BI "char *inet_net_ntop(int " af , +.BI " const void " netp [(. bits " - CHAR_BIT + 1) / CHAR_BIT]," +.BI " int " bits , +.BI " char " pres [. psize "], size_t " psize ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR inet_net_pton (), +.BR inet_net_ntop (): +.nf + Since glibc 2.20: + _DEFAULT_SOURCE + Before glibc 2.20: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions convert network numbers between +presentation (i.e., printable) format and network (i.e., binary) format. +.PP +For both functions, +.I af +specifies the address family for the conversion; +the only supported value is +.BR AF_INET . +.SS inet_net_pton() +The +.BR inet_net_pton () +function converts +.IR pres , +a null-terminated string containing an Internet network number in +presentation format to network format. +The result of the conversion, which is in network byte order, +is placed in the buffer pointed to by +.IR netp . +(The +.I netp +argument typically points to an +.I in_addr +structure.) +The +.I nsize +argument specifies the number of bytes available in +.IR netp . +.PP +On success, +.BR inet_net_pton () +returns the number of bits in the network number field +of the result placed in +.IR netp . +For a discussion of the input presentation format and the return value, +see NOTES. +.PP +.IR Note : +the buffer pointed to by +.I netp +should be zeroed out before calling +.BR inet_net_pton (), +since the call writes only as many bytes as are required +for the network number (or as are explicitly specified by +.IR pres ), +which may be less than the number of bytes in a complete network address. +.SS inet_net_ntop() +The +.BR inet_net_ntop () +function converts the network number in the buffer pointed to by +.I netp +to presentation format; +.I *netp +is interpreted as a value in network byte order. +The +.I bits +argument specifies the number of bits in the network number in +.IR *netp . +.PP +The null-terminated presentation-format string +is placed in the buffer pointed to by +.IR pres . +The +.I psize +argument specifies the number of bytes available in +.IR pres . +The presentation string is in CIDR format: +a dotted-decimal number representing the network address, +followed by a slash, and the size of the network number in bits. +.SH RETURN VALUE +On success, +.BR inet_net_pton () +returns the number of bits in the network number. +On error, it returns \-1, and +.I errno +is set to indicate the error. +.PP +On success, +.BR inet_net_ntop () +returns +.IR pres . +On error, it returns NULL, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAFNOSUPPORT +.I af +specified a value other than +.BR AF_INET . +.TP +.B EMSGSIZE +The size of the output buffer was insufficient. +.TP +.B ENOENT +.RB ( inet_net_pton ()) +.I pres +was not in correct presentation format. +.SH STANDARDS +None. +.SH NOTES +.SS Input presentation format for inet_net_pton() +The network number may be specified either +as a hexadecimal value +or in dotted-decimal notation. +.PP +Hexadecimal values are indicated by an initial "0x" or "0X". +The hexadecimal digits populate the nibbles (half octets) of the +network number from left to right in network byte order. +.\" If the hexadecimal string is short, the remaining nibbles are zeroed. +.PP +In dotted-decimal notation, up to four octets are specified, +as decimal numbers separated by dots. +Thus, any of the following forms are accepted: +.PP +.in +4n +.EX +a.b.c.d +a.b.c +a.b +a +.EE +.in +.PP +Each part is a number in the range 0 to 255 that +populates one byte of the resulting network number, +going from left to right, in network-byte (big endian) order. +Where a part is omitted, the resulting byte in the network number is zero. +.\" Reading other man pages, some other implementations treat +.\" 'c' in a.b.c as a 16-bit number that populates right-most two bytes +.\" 'b' in a.b as a 24-bit number that populates right-most three bytes +.PP +For either hexadecimal or dotted-decimal format, +the network number can optionally be followed by a slash +and a number in the range 0 to 32, +which specifies the size of the network number in bits. +.SS Return value of inet_net_pton() +The return value of +.BR inet_net_pton () +is the number of bits in the network number field. +If the input presentation string terminates with a slash and +an explicit size value, then that size becomes the return value of +.BR inet_net_pton (). +Otherwise, the return value, +.IR bits , +is inferred as follows: +.IP \[bu] 3 +If the most significant byte of the network number is +greater than or equal to 240, +then +.I bits +is 32. +.IP \[bu] +Otherwise, +if the most significant byte of the network number is +greater than or equal to 224, +then +.I bits +is 4. +.IP \[bu] +Otherwise, +if the most significant byte of the network number is +greater than or equal to 192, +then +.I bits +is 24. +.IP \[bu] +Otherwise, +if the most significant byte of the network number is +greater than or equal to 128, +then +.I bits +is 16. +.IP \[bu] +Otherwise, +.I bits +is 8. +.PP +If the resulting +.I bits +value from the above steps is greater than or equal to 8, +but the number of octets specified in the network number exceed +.IR "bits/8" , +then +.I bits +is set to 8 times the number of octets actually specified. +.SH EXAMPLES +The program below demonstrates the use of +.BR inet_net_pton () +and +.BR inet_net_ntop (). +It uses +.BR inet_net_pton () +to convert the presentation format network address provided in +its first command-line argument to binary form, displays the return value from +.BR inet_net_pton (). +It then uses +.BR inet_net_ntop () +to convert the binary form back to presentation format, +and displays the resulting string. +.PP +In order to demonstrate that +.BR inet_net_pton () +may not write to all bytes of its +.I netp +argument, the program allows an optional second command-line argument, +a number used to initialize the buffer before +.BR inet_net_pton () +is called. +As its final line of output, +the program displays all of the bytes of the buffer returned by +.BR inet_net_pton () +allowing the user to see which bytes have not been touched by +.BR inet_net_pton (). +.PP +An example run, showing that +.BR inet_net_pton () +infers the number of bits in the network number: +.PP +.in +4n +.EX +$ \fB./a.out 193.168\fP +inet_net_pton() returned: 24 +inet_net_ntop() yielded: 193.168.0/24 +Raw address: c1a80000 +.EE +.in +.PP +Demonstrate that +.BR inet_net_pton () +does not zero out unused bytes in its result buffer: +.PP +.in +4n +.EX +$ \fB./a.out 193.168 0xffffffff\fP +inet_net_pton() returned: 24 +inet_net_ntop() yielded: 193.168.0/24 +Raw address: c1a800ff +.EE +.in +.PP +Demonstrate that +.BR inet_net_pton () +will widen the inferred size of the network number, +if the supplied number of bytes in the presentation +string exceeds the inferred value: +.PP +.in +4n +.EX +$ \fB./a.out 193.168.1.128\fP +inet_net_pton() returned: 32 +inet_net_ntop() yielded: 193.168.1.128/32 +Raw address: c1a80180 +.EE +.in +.PP +Explicitly specifying the size of the network number overrides any +inference about its size +(but any extra bytes that are explicitly specified will still be used by +.BR inet_net_pton (): +to populate the result buffer): +.PP +.in +4n +.EX +$ \fB./a.out 193.168.1.128/24\fP +inet_net_pton() returned: 24 +inet_net_ntop() yielded: 193.168.1/24 +Raw address: c1a80180 +.EE +.in +.SS Program source +.\" SRC BEGIN (inet_net_pton.c) +.EX +/* Link with "\-lresolv" */ + +#include +#include +#include + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e + } while (0) + +int +main(int argc, char *argv[]) +{ + char buf[100]; + struct in_addr addr; + int bits; + + if (argc < 2) { + fprintf(stderr, + "Usage: %s presentation\-form [addr\-init\-value]\en", + argv[0]); + exit(EXIT_FAILURE); + } + + /* If argv[2] is supplied (a numeric value), use it to initialize + the output buffer given to inet_net_pton(), so that we can see + that inet_net_pton() initializes only those bytes needed for + the network number. If argv[2] is not supplied, then initialize + the buffer to zero (as is recommended practice). */ + + addr.s_addr = (argc > 2) ? strtod(argv[2], NULL) : 0; + + /* Convert presentation network number in argv[1] to binary. */ + + bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr)); + if (bits == \-1) + errExit("inet_net_ntop"); + + printf("inet_net_pton() returned: %d\en", bits); + + /* Convert binary format back to presentation, using \[aq]bits\[aq] + returned by inet_net_pton(). */ + + if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL) + errExit("inet_net_ntop"); + + printf("inet_net_ntop() yielded: %s\en", buf); + + /* Display \[aq]addr\[aq] in raw form (in network byte order), so we can + see bytes not displayed by inet_net_ntop(); some of those bytes + may not have been touched by inet_net_ntop(), and so will still + have any initial value that was specified in argv[2]. */ + + printf("Raw address: %x\en", htonl(addr.s_addr)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR inet (3), +.BR networks (5) diff --git a/upstream/opensuse-leap-15-6/man3/inet_ntop.3 b/upstream/opensuse-leap-15-6/man3/inet_ntop.3 new file mode 100644 index 00000000..67d6deeb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inet_ntop.3 @@ -0,0 +1,125 @@ +'\" t +.\" Copyright 2000 Sam Varshavchik +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References: RFC 2553 +.TH inet_ntop 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "const char *inet_ntop(int " af ", const void *restrict " src , +.BI " char " dst "[restrict ." size "], socklen_t " size ); +.fi +.SH DESCRIPTION +This function converts the network address structure +.I src +in the +.I af +address family into a character string. +The resulting string is copied to the buffer pointed to by +.IR dst , +which must be a non-null pointer. +The caller specifies the number of bytes available in this buffer in +the argument +.IR size . +.PP +.BR inet_ntop () +extends the +.BR inet_ntoa (3) +function to support multiple address families, +.BR inet_ntoa (3) +is now considered to be deprecated in favor of +.BR inet_ntop (). +The following address families are currently supported: +.TP +.B AF_INET +.I src +points to a +.I struct in_addr +(in network byte order) +which is converted to an IPv4 network address in +the dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP". +The buffer +.I dst +must be at least +.B INET_ADDRSTRLEN +bytes long. +.TP +.B AF_INET6 +.I src +points to a +.I struct in6_addr +(in network byte order) +which is converted to a representation of this address in the +most appropriate IPv6 network address format for this address. +The buffer +.I dst +must be at least +.B INET6_ADDRSTRLEN +bytes long. +.SH RETURN VALUE +On success, +.BR inet_ntop () +returns a non-null pointer to +.IR dst . +NULL is returned if there was an error, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EAFNOSUPPORT +.I af +was not a valid address family. +.TP +.B ENOSPC +The converted address string would exceed the size given by +.IR size . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR inet_ntop () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +Note that RFC\ 2553 defines a prototype where the last argument +.I size +is of type +.IR size_t . +Many systems follow RFC\ 2553. +glibc 2.0 and 2.1 have +.IR size_t , +but 2.2 and later have +.IR socklen_t . +.\" 2.1.3: size_t, 2.1.91: socklen_t +.SH BUGS +.B AF_INET6 +converts IPv4-mapped IPv6 addresses into an IPv6 format. +.SH EXAMPLES +See +.BR inet_pton (3). +.SH SEE ALSO +.BR getnameinfo (3), +.BR inet (3), +.BR inet_pton (3) diff --git a/upstream/opensuse-leap-15-6/man3/inet_pton.3 b/upstream/opensuse-leap-15-6/man3/inet_pton.3 new file mode 100644 index 00000000..7906cc2f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inet_pton.3 @@ -0,0 +1,226 @@ +'\" t +.\" Copyright 2000 Sam Varshavchik +.\" and Copyright (c) 2008 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References: RFC 2553 +.TH inet_pton 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +inet_pton \- convert IPv4 and IPv6 addresses from text to binary form +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int inet_pton(int " af ", const char *restrict " src \ +", void *restrict " dst ); +.fi +.SH DESCRIPTION +This function converts the character string +.I src +into a network address structure in the +.I af +address family, then +copies +the network address structure to +.IR dst . +The +.I af +argument must be either +.B AF_INET +or +.BR AF_INET6 . +.I dst +is written in network byte order. +.PP +The following address families are currently supported: +.TP +.B AF_INET +.I src +points to a character string containing an IPv4 network address in +dotted-decimal format, "\fIddd.ddd.ddd.ddd\fP", where +.I ddd +is a decimal number of up to three digits in the range 0 to 255. +The address is converted to a +.I struct in_addr +and copied to +.IR dst , +which must be +.I sizeof(struct in_addr) +(4) bytes (32 bits) long. +.TP +.B AF_INET6 +.I src +points to a character string containing an IPv6 network address. +The address is converted to a +.I struct in6_addr +and copied to +.IR dst , +which must be +.I sizeof(struct in6_addr) +(16) bytes (128 bits) long. +The allowed formats for IPv6 addresses follow these rules: +.RS +.IP \[bu] 3 +The preferred format is +.IR x:x:x:x:x:x:x:x . +This form consists of eight hexadecimal numbers, +each of which expresses a 16-bit value (i.e., each +.I x +can be up to 4 hex digits). +.IP \[bu] +A series of contiguous zero values in the preferred format +can be abbreviated to +.IR :: . +Only one instance of +.I :: +can occur in an address. +For example, the loopback address +.I 0:0:0:0:0:0:0:1 +can be abbreviated as +.IR ::1 . +The wildcard address, consisting of all zeros, can be written as +.IR :: . +.IP \[bu] +An alternate format is useful for expressing IPv4-mapped IPv6 addresses. +This form is written as +.IR x:x:x:x:x:x:d.d.d.d , +where the six leading +.IR x s +are hexadecimal values that define the six most-significant +16-bit pieces of the address (i.e., 96 bits), and the +.IR d s +express a value in dotted-decimal notation that +defines the least significant 32 bits of the address. +An example of such an address is +.IR ::FFFF:204.152.189.116 . +.RE +.IP +See RFC 2373 for further details on the representation of IPv6 addresses. +.SH RETURN VALUE +.BR inet_pton () +returns 1 on success (network address was successfully converted). +0 is returned if +.I src +does not contain a character string representing a valid network +address in the specified address family. +If +.I af +does not contain a valid address family, \-1 is returned and +.I errno +is set to +.BR EAFNOSUPPORT . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR inet_pton () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Unlike +.BR inet_aton (3) +and +.BR inet_addr (3), +.BR inet_pton () +supports IPv6 addresses. +On the other hand, +.BR inet_pton () +accepts only IPv4 addresses in dotted-decimal notation, whereas +.BR inet_aton (3) +and +.BR inet_addr (3) +allow the more general numbers-and-dots notation (hexadecimal +and octal number formats, and formats that don't require all +four bytes to be explicitly written). +For an interface that handles both IPv6 addresses, and IPv4 +addresses in numbers-and-dots notation, see +.BR getaddrinfo (3). +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH BUGS +.B AF_INET6 +does not recognize IPv4 addresses. +An explicit IPv4-mapped IPv6 address must be supplied in +.I src +instead. +.SH EXAMPLES +The program below demonstrates the use of +.BR inet_pton () +and +.BR inet_ntop (3). +Here are some example runs: +.PP +.in +4n +.EX +.RB "$" " ./a.out i6 0:0:0:0:0:0:0:0" +:: +.RB "$" " ./a.out i6 1:0:0:0:0:0:0:8" +1::8 +.RB "$" " ./a.out i6 0:0:0:0:0:FFFF:204.152.189.116" +::ffff:204.152.189.116 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (inet_pton.c) +.EX +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + unsigned char buf[sizeof(struct in6_addr)]; + int domain, s; + char str[INET6_ADDRSTRLEN]; + + if (argc != 3) { + fprintf(stderr, "Usage: %s {i4|i6|} string\en", argv[0]); + exit(EXIT_FAILURE); + } + + domain = (strcmp(argv[1], "i4") == 0) ? AF_INET : + (strcmp(argv[1], "i6") == 0) ? AF_INET6 : atoi(argv[1]); + + s = inet_pton(domain, argv[2], buf); + if (s <= 0) { + if (s == 0) + fprintf(stderr, "Not in presentation format"); + else + perror("inet_pton"); + exit(EXIT_FAILURE); + } + + if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) { + perror("inet_ntop"); + exit(EXIT_FAILURE); + } + + printf("%s\en", str); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR getaddrinfo (3), +.BR inet (3), +.BR inet_ntop (3) diff --git a/upstream/opensuse-leap-15-6/man3/initgroups.3 b/upstream/opensuse-leap-15-6/man3/initgroups.3 new file mode 100644 index 00000000..bb71e652 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/initgroups.3 @@ -0,0 +1,101 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2004-10-10 by aeb +.\" +.TH initgroups 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +initgroups \- initialize the supplementary group access list +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int initgroups(const char *" user ", gid_t " group ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR initgroups (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR initgroups () +function initializes the group access list by +reading the group database +.I /etc/group +and using all groups of +which +.I user +is a member. +The additional group +.I group +is +also added to the list. +.PP +The +.I user +argument must be non-NULL. +.SH RETURN VALUE +The +.BR initgroups () +function returns 0 on success. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory to allocate group information structure. +.TP +.B EPERM +The calling process has insufficient privilege. +See the underlying system call +.BR setgroups (2). +.SH FILES +.TP +.I /etc/group +group database file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR initgroups () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr4, 4.3BSD. +.SH SEE ALSO +.BR getgroups (2), +.BR setgroups (2), +.BR credentials (7) diff --git a/upstream/opensuse-leap-15-6/man3/initscr.3ncurses b/upstream/opensuse-leap-15-6/man3/initscr.3ncurses new file mode 100644 index 00000000..5d8515f9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/initscr.3ncurses @@ -0,0 +1,255 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_initscr.3x,v 1.29 2017/11/18 23:47:37 tom Exp $ +.TH initscr 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fBinitscr\fR, +\fBnewterm\fR, +\fBendwin\fR, +\fBisendwin\fR, +\fBset_term\fR, +\fBdelscreen\fR \- \fBcurses\fR screen initialization and manipulation routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBWINDOW *initscr(void);\fR +.br +\fBint endwin(void);\fR +.br +\fBbool isendwin(void);\fR +.br +\fBSCREEN *newterm(char *\fP\fItype\fP\fB, FILE *\fP\fIoutfd\fP\fB, FILE *\fP\fIinfd\fP\fB);\fR +.br +\fBSCREEN *set_term(SCREEN *\fP\fInew\fP\fB);\fR +.br +\fBvoid delscreen(SCREEN* \fP\fIsp\fP\fB);\fR +.br +.SH DESCRIPTION +.SS initscr +\fBinitscr\fR is normally the first \fBcurses\fR routine to call when +initializing a program. +A few special routines sometimes need to be called before it; +these are \fBslk_init\fR(3X), \fBfilter\fR, \fBripoffline\fR, +\fBuse_env\fR. +For multiple-terminal applications, +\fBnewterm\fR may be called before \fBinitscr\fR. +.PP +The initscr code determines the terminal type and initializes all \fBcurses\fR +data structures. +\fBinitscr\fR also causes the first call to \fBrefresh\fR(3X) to clear the screen. +If errors occur, \fBinitscr\fR writes an appropriate error +message to standard error and exits; +otherwise, a pointer is returned to \fBstdscr\fR. +.SS newterm +.PP +A program that outputs to more than one terminal should use the \fBnewterm\fR +routine for each terminal instead of \fBinitscr\fR. +A program that needs to inspect capabilities, +so it can continue to run in a line-oriented mode if the +terminal cannot support a screen-oriented program, would also use +\fBnewterm\fR. +The routine \fBnewterm\fR should be called once for each terminal. +It returns a variable of type \fBSCREEN *\fR which should be saved +as a reference to that terminal. +\fBnewterm\fP's arguments are +.bP +the \fItype\fR of the terminal to be used in place of \fB$TERM\fR, +.bP +a file pointer for output to the terminal, and +.bP +another file pointer for input from the terminal +.PP +If the \fItype\fR parameter is \fBNULL\fR, \fB$TERM\fR will be used. +.SS endwin +.PP +The program must also call +\fBendwin\fR for each terminal being used before exiting from \fBcurses\fR. +If \fBnewterm\fR is called more than once for the same terminal, the first +terminal referred to must be the last one for which \fBendwin\fR is called. +.PP +A program should always call \fBendwin\fR before exiting or escaping from +\fBcurses\fR mode temporarily. +This routine +.bP +resets colors to correspond with the default color pair 0, +.bP +moves the cursor to the lower left-hand corner of the screen, +.bP +clears the remainder of the line so that it uses the default colors, +.bP +sets the cursor to normal visibility (see \fBcurs_set\fP(3X)), +.bP +stops cursor-addressing mode using the \fIexit_ca_mode\fP terminal capability, +.bP +restores tty modes (see \fBreset_shell_mode\fP(3X)). +.PP +Calling \fBrefresh\fR(3X) or \fBdoupdate\fR(3X) after a +temporary escape causes the program to resume visual mode. +.SS isendwin +.PP +The \fBisendwin\fR routine returns \fBTRUE\fR if \fBendwin\fR has been +called without any subsequent calls to \fBwrefresh\fR, +and \fBFALSE\fR otherwise. +.SS set_term +.PP +The \fBset_term\fR routine is used to switch between different terminals. +The screen reference \fBnew\fR becomes the new current terminal. +The previous terminal is returned by the routine. +This is the only routine which manipulates \fBSCREEN\fR pointers; +all other routines affect only the current terminal. +.SS delscreen +.PP +The \fBdelscreen\fR routine frees storage associated with the +\fBSCREEN\fR data structure. +The \fBendwin\fR routine does not do +this, so \fBdelscreen\fR should be called after \fBendwin\fR if a +particular \fBSCREEN\fR is no longer needed. +.SH RETURN VALUE +\fBendwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR +upon successful completion. +.PP +Routines that return pointers always return \fBNULL\fR on error. +.PP +X/Open defines no error conditions. +In this implementation +.bP +\fBendwin\fP returns an error if the terminal was not initialized. +.bP +\fBnewterm\fP +returns an error if it cannot allocate the data structures for the screen, +or for the top-level windows within the screen, +i.e., +\fBcurscr\fP, \fBnewscr\fP, or \fBstdscr\fP. +.bP +\fBset_term\fP +returns no error. +.SH PORTABILITY +These functions were described in the XSI Curses standard, Issue 4. +As of 2015, the current document is X/Open Curses, Issue 7. +.SS Differences +X/Open specifies that portable applications must not +call \fBinitscr\fR more than once: +.bP +The portable way to use \fBinitscr\fP is once only, +using \fBrefresh\fP (see curs_refresh(3X)) to restore the screen after \fBendwin\fP. +.bP +This implementation allows using \fBinitscr\fP after \fBendwin\fP. +.PP +Old versions of curses, e.g., BSD 4.4, may have returned a null pointer +from \fBinitscr\fR when an error is detected, rather than exiting. +It is safe but redundant to check the return value of \fBinitscr\fR +in XSI Curses. +.SS Unset TERM Variable +.PP +If the TERM variable is missing or empty, \fBinitscr\fP uses the +value \*(``unknown\*('', +which normally corresponds to a terminal entry with the \fIgeneric\fP +(\fIgn\fP) capability. +Generic entries are detected by \fBsetupterm\fP (see curs_terminfo(3X)) and cannot be +used for full-screen operation. +Other implementations may handle a missing/empty TERM variable differently. +.SS Signal Handlers +.PP +Quoting from X/Open Curses, section 3.1.1: +.RS 5 +.PP +\fICurses implementations may provide for special handling of the \fBSIGINT\fP, +\fBSIGQUIT\fP and \fBSIGTSTP\fP signals +if their disposition is \fBSIG_DFL\fP at the time +\fBinitscr\fP is called \fP... +.PP +\fIAny special handling for these signals may remain in effect for the +life of the process or until the process changes the disposition of +the signal.\fP +.PP +\fINone of the Curses functions are required to be safe with respect to signals \fP... +.RE +.PP +This implementation establishes signal handlers during initialization, +e.g., \fBinitscr\fP or \fBnewterm\fP. +Applications which must handle these signals should set up the corresponding +handlers \fIafter\fP initializing the library: +.TP 5 +.B SIGINT +The handler \fIattempts\fP to cleanup the screen on exit. +Although it \fIusually\fP works as expected, there are limitations: +.RS 5 +.bP +Walking the \fBSCREEN\fP list is unsafe, since all list management +is done without any signal blocking. +.bP +On systems which have \fBREENTRANT\fP turned on, \fBset_term\fP uses +functions which could deadlock or misbehave in other ways. +.bP +\fBendwin\fP calls other functions, many of which use stdio or +other library functions which are clearly unsafe. +.RE +.TP 5 +.B SIGTERM +This uses the same handler as \fBSIGINT\fP, with the same limitations. +It is not mentioned in X/Open Curses, but is more suitable for this +purpose than \fBSIGQUIT\fP (which is used in debugging). +.TP 5 +.B SIGTSTP +This handles the \fIstop\fP signal, used in job control. +When resuming the process, this implementation discards pending +input with \fBflushinput\fP (see curs_util(3X)), and repaints the screen +assuming that it has been completely altered. +It also updates the saved terminal modes with \fBdef_shell_mode\fP (see curs_kernel(3X)). +.TP 5 +.B SIGWINCH +This handles the window-size changes which were ignored in +the standardization efforts. +The handler sets a (signal-safe) variable +which is later tested in \fBwgetch\fP (see curs_getch(3X)). +If \fBkeypad\fP has been enabled for the corresponding window, +\fBwgetch\fP returns the key symbol \fBKEY_RESIZE\fP. +At the same time, \fBwgetch\fP calls \fBresizeterm\fP to adjust the +standard screen \fBstdscr\fP, +and update other data such as \fBLINES\fP and \fBCOLS\fP. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBkernel\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBslk\fR(3NCURSES), +\fBterminfo\fR(3NCURSES), +\fButil\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/inopts.3ncurses b/upstream/opensuse-leap-15-6/man3/inopts.3ncurses new file mode 100644 index 00000000..5bdb7fcf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inopts.3ncurses @@ -0,0 +1,348 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inopts.3x,v 1.26 2017/11/21 00:47:10 tom Exp $ +.TH inopts 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fBcbreak\fR, +\fBnocbreak\fR, +\fBecho\fR, +\fBnoecho\fR, +\fBhalfdelay\fR, +\fBintrflush\fR, +\fBkeypad\fR, +\fBmeta\fR, +\fBnodelay\fR, +\fBnotimeout\fR, +\fBraw\fR, +\fBnoraw\fR, +\fBnoqiflush\fR, +\fBqiflush\fR, +\fBtimeout\fR, +\fBwtimeout\fR, +\fBtypeahead\fR \- \fBcurses\fR input options +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint cbreak(void);\fR +.br +\fBint nocbreak(void);\fR +.br +\fBint echo(void);\fR +.br +\fBint noecho(void);\fR +.br +\fBint halfdelay(int tenths);\fR +.br +\fBint intrflush(WINDOW *win, bool bf);\fR +.br +\fBint keypad(WINDOW *win, bool bf);\fR +.br +\fBint meta(WINDOW *win, bool bf);\fR +.br +\fBint nodelay(WINDOW *win, bool bf);\fR +.br +\fBint raw(void);\fR +.br +\fBint noraw(void);\fR +.br +\fBvoid noqiflush(void);\fR +.br +\fBvoid qiflush(void);\fR +.br +\fBint notimeout(WINDOW *win, bool bf);\fR +.br +\fBvoid timeout(int delay);\fR +.br +\fBvoid wtimeout(WINDOW *win, int delay);\fR +.br +\fBint typeahead(int fd);\fR +.br +.SH DESCRIPTION +The \fBncurses\fP library provides several functions which let an application +change the way input from the terminal is handled. +Some are global, applying to all windows. +Others apply only to a specific window. +Window-specific settings are not automatically applied to new or derived +windows. +An application must apply these to each window, if the same behavior +is needed. +.\" +.SS cbreak +Normally, the tty driver buffers typed characters until a newline or carriage +return is typed. +The \fBcbreak\fR routine disables line buffering and +erase/kill character-processing (interrupt and flow control characters are +unaffected), making characters typed by the user immediately available to the +program. +The \fBnocbreak\fR routine returns the terminal to normal (cooked) +mode. +.PP +Initially the terminal may or may not be in \fBcbreak\fR mode, as the mode is +inherited; therefore, a program should call \fBcbreak\fR or \fBnocbreak\fR +explicitly. +Most interactive programs using \fBcurses\fR set the \fBcbreak\fR +mode. +Note that \fBcbreak\fR overrides \fBraw\fR. +[See \fBgetch\fR(3NCURSES) for a +discussion of how these routines interact with \fBecho\fR and \fBnoecho\fR.] +.\" +.SS echo/noecho +.PP +The \fBecho\fR and \fBnoecho\fR routines control whether characters typed by +the user are echoed by \fBgetch\fR(3X) as they are typed. +Echoing by the tty +driver is always disabled, but initially \fBgetch\fR is in echo mode, so +characters typed are echoed. +Authors of most interactive programs prefer to do +their own echoing in a controlled area of the screen, or not to echo at all, so +they disable echoing by calling \fBnoecho\fR. +[See \fBgetch\fR(3NCURSES) for a +discussion of how these routines interact with \fBcbreak\fR and +\fBnocbreak\fR.] +.\" +.SS halfdelay +.PP +The \fBhalfdelay\fR routine is used for half-delay mode, which is similar to +\fBcbreak\fR mode in that characters typed by the user are immediately +available to the program. +However, after blocking for \fItenths\fR tenths of +seconds, \fBERR\fP is returned if nothing has been typed. +The value of \fItenths\fR +must be a number between 1 and 255. +Use \fBnocbreak\fR to leave half-delay +mode. +.\" +.SS intrflush +.PP +If the \fBintrflush\fR option is enabled (\fIbf\fR is \fBTRUE\fR), and an +interrupt key is pressed on the keyboard (interrupt, break, quit), all output in +the tty driver queue will be flushed, giving the effect of faster response to +the interrupt, but causing \fBcurses\fR to have the wrong idea of what is on +the screen. +Disabling the option (\fIbf\fR is \fBFALSE\fR) prevents the +flush. +The default for the option is inherited from the tty driver settings. +The window argument is ignored. +.\" +.SS keypad +.PP +The \fBkeypad\fR option enables the keypad of the user's terminal. +If +enabled (\fIbf\fR is \fBTRUE\fR), the user can press a function key +(such as an arrow key) and \fBwgetch\fR(3X) returns a single value +representing the function key, as in \fBKEY_LEFT\fR. +If disabled +(\fIbf\fR is \fBFALSE\fR), \fBcurses\fR does not treat function keys +specially and the program has to interpret the escape sequences +itself. +If the keypad in the terminal can be turned on (made to +transmit) and off (made to work locally), turning on this option +causes the terminal keypad to be turned on when \fBwgetch\fR(3X) is +called. +The default value for keypad is \fBFALSE\fP. +.\" +.SS meta +.PP +Initially, whether the terminal returns 7 or 8 significant bits on +input depends on the control mode of the tty driver [see termio(7)]. +To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR, +\fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag +on the terminal. +To force 7 bits to be returned, invoke +\fBmeta\fR(\fIwin\fR, \fBFALSE\fR); this is equivalent, under POSIX, +to setting the CS7 flag on the terminal. +The window argument, +\fIwin\fR, is always ignored. +If the terminfo capabilities \fBsmm\fR +(meta_on) and \fBrmm\fR (meta_off) are defined for the terminal, +\fBsmm\fR is sent to the terminal when \fBmeta\fR(\fIwin\fR, +\fBTRUE\fR) is called and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR, +\fBFALSE\fR) is called. +.\" +.SS nodelay +.PP +The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call. +If no input is ready, \fBgetch\fR returns \fBERR\fR. +If disabled +(\fIbf\fR is \fBFALSE\fR), \fBgetch\fR waits until a key is pressed. +.PP +While interpreting an input escape sequence, \fBwgetch\fR(3X) sets a timer +while waiting for the next character. +If \fBnotimeout(\fR\fIwin\fR, +\fBTRUE\fR) is called, then \fBwgetch\fR does not set a timer. +The +purpose of the timeout is to differentiate between sequences received +from a function key and those typed by a user. +.\" +.SS raw/noraw +.PP +The \fBraw\fR and \fBnoraw\fR routines place the terminal into or out of raw +mode. +Raw mode is similar to \fBcbreak\fR mode, in that characters typed are +immediately passed through to the user program. +The differences are that in +raw mode, the interrupt, quit, suspend, and flow control characters are all +passed through uninterpreted, instead of generating a signal. +The behavior of +the BREAK key depends on other bits in the tty driver that are not set by +\fBcurses\fR. +.\" +.SS noqiflush +.PP +When the \fBnoqiflush\fR routine is used, normal flush of input and +output queues associated with the \fBINTR\fR, \fBQUIT\fR and +\fBSUSP\fR characters will not be done [see termio(7)]. +When +\fBqiflush\fR is called, the queues will be flushed when these control +characters are read. +You may want to call \fBnoqiflush\fR in a signal +handler if you want output to continue as though the interrupt +had not occurred, after the handler exits. +.\" +.SS timeout/wtimeout +.PP +The \fBtimeout\fR and \fBwtimeout\fR routines set blocking or +non-blocking read for a given window. +If \fIdelay\fR is negative, +blocking read is used (i.e., waits indefinitely for +input). +If \fIdelay\fR is zero, then non-blocking read is used +(i.e., read returns \fBERR\fR if no input is waiting). +If +\fIdelay\fR is positive, then read blocks for \fIdelay\fR +milliseconds, and returns \fBERR\fR if there is still no input. +Hence, these routines provide the same functionality as \fBnodelay\fR, +plus the additional capability of being able to block for only +\fIdelay\fR milliseconds (where \fIdelay\fR is positive). +.\" +.SS typeahead +.PP +The \fBcurses\fR library does \*(``line-breakout optimization\*('' +by looking for typeahead periodically while updating the screen. +If input is found, and it is coming from a tty, +the current update is postponed until +\fBrefresh\fR(3X) or \fBdoupdate\fR is called again. +This allows faster response to commands typed in advance. +Normally, the input FILE +pointer passed to \fBnewterm\fR, or \fBstdin\fR in the case that +\fBinitscr\fR was used, will be used to do this typeahead checking. +The \fBtypeahead\fR routine specifies that the file descriptor +\fIfd\fR is to be used to check for typeahead instead. +If \fIfd\fR is +\-1, then no typeahead checking is done. +.\" +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and \fBOK\fP +(SVr4 specifies only \*(``an integer value other than \fBERR\fR\*('') +upon successful completion, +unless otherwise noted in the preceding routine descriptions. +.PP +X/Open does not define any error conditions. +In this implementation, +functions with a window parameter will return an error if it is null. +Any function will also return an error if the terminal was not initialized. +Also, +.RS +.TP 5 +\fBhalfdelay\fP +returns an error +if its parameter is outside the range 1..255. +.RE +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.PP +The ncurses library obeys the XPG4 standard and the historical practice of the +AT&T curses implementations, in that the echo bit is cleared when curses +initializes the terminal state. +BSD curses differed from this slightly; it +left the echo bit on at initialization, but the BSD \fBraw\fR call turned it +off as a side-effect. +For best portability, set echo or noecho explicitly +just after initialization, even if your program remains in cooked mode. +.PP +When \fBkeypad\fP is first enabled, +ncurses loads the key-definitions for the current terminal description. +If the terminal description includes extended string capabilities, +e.g., from using the \fB\-x\fP option of \fBtic\fP, +then ncurses also defines keys for the capabilities whose names +begin with \*(``k\*(''. +The corresponding keycodes are generated and (depending on previous +loads of terminal descriptions) may differ from one execution of a +program to the next. +The generated keycodes are recognized by the \fBkeyname\fP function +(which will then return a name beginning with \*(``k\*('' denoting the +terminfo capability name rather than \*(``K\*('', used for curses key-names). +On the other hand, an application can use \fBdefine_key\fP to establish +a specific keycode for a given string. +This makes it possible for an application to check for an extended +capability's presence with \fBtigetstr\fP, +and reassign the keycode to match its own needs. +.PP +Low-level applications can use \fBtigetstr\fP to obtain the definition +of any particular string capability. +Higher-level applications which use the curses \fBwgetch\fP +and similar functions to return keycodes rely upon the order in which +the strings are loaded. +If more than one key definition has the same string value, +then \fBwgetch\fP can return only one keycode. +Most curses implementations (including ncurses) +load key definitions in the order +defined by the array of string capability names. +The last key to be loaded determines the keycode which will be returned. +In ncurses, you may also have extended capabilities interpreted as +key definitions. +These are loaded after the predefined keys, +and if a capability's value is the same as a previously-loaded +key definition, +the later definition is the one used. +.SH NOTES +Note that \fBecho\fR, \fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR, +\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBnoqiflush\fR, +\fBqiflush\fR, \fBtimeout\fR, and \fBwtimeout\fR may be macros. +.PP +The \fBnoraw\fR and \fBnocbreak\fR calls follow historical practice in that +they attempt to restore to normal (\*(``cooked\*('') mode from raw and cbreak modes +respectively. +Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver +control states that are hard to predict or understand; it is not recommended. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBgetch\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fButil\fR(3NCURSES), +\fBdefine_key\fR(3NCURSES), +\fBtermios\fR(3) diff --git a/upstream/opensuse-leap-15-6/man3/inplace.3am b/upstream/opensuse-leap-15-6/man3/inplace.3am new file mode 100644 index 00000000..0d1d535d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inplace.3am @@ -0,0 +1,91 @@ +.TH INPLACE 3am "Jun 17 2015" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +inplace \- emulate sed/perl/ruby in-place editing +.SH SYNOPSIS +.ft CW +.nf +gawk -i inplace ... +.fi +.ft R +.SH DESCRIPTION +The +.I inplace +extension adds two functions named +.B inplace_begin() +and +.BR inplace_end() . +These functions are meant to be invoked from the +.I inplace.awk +wrapper which is installed when +.I gawk +is. +.PP +By default, each named file on the command line is +replaced with a new file of the same name whose contents +are the results of running the AWK program. +If the user supplies an AWK variable named +.B INPLACE_SUFFIX +in a +.B BEGIN +rule or on the command line, then the +.I inplace +extension concatenates that suffix onto the original +filename and uses the result as a filename for renaming +the original. +.PP +One can disable inplace editing selectively by placing +.B inplace=0 +on the command line prior to files that should be processed normally. +One can reenable inplace editing by placing +.B inplace=1 +prior to files that should be subject to inplace editing. +.\" .SH NOTES +.SH BUGS +While the extension does attempt to preserve ownership and permissions, it makes no attempt to copy the ACLs from the original file. +.PP +If the program dies prematurely, as might happen if an unhandled signal is received, a temporary file may be left behind. +.SH EXAMPLE +.ft CW +.nf +gawk -i inplace '\f(CIscript\fP' files ... +.br +gawk -i inplace -f \f(CIscriptfile\fP files ... +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am). +.SH AUTHOR +Andrew Schorr, +.BR schorr@telemetry-investments.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, 2015 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/ins_wch.3ncurses b/upstream/opensuse-leap-15-6/man3/ins_wch.3ncurses new file mode 100644 index 00000000..4f89f6a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ins_wch.3ncurses @@ -0,0 +1,63 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_ins_wch.3x,v 1.6 2017/11/21 00:53:44 tom Exp $ +.TH ins_wch 3NCURSES "" +.SH NAME +\fBins_wch\fR, +\fBmvins_wch\fR, +\fBmvwins_wch\fR, +\fBwins_wch\fR \- insert a complex character and rendition into a window +.SH SYNOPSIS +#include +.sp +\fBint ins_wch(const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint wins_wch(WINDOW *\fR\fIwin, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvins_wch(int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR +.br +\fBint mvwins_wch(WINDOW *\fR\fIwin, int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR +.SH DESCRIPTION +These routines, insert the complex character \fIwch\fR with rendition +before the character under the cursor. +All characters to the right of the cursor are moved one space to the right, +with the possibility of the rightmost character on the line being lost. +The insertion operation does not change the cursor position. +.SH RETURN VALUE +If successful, these functions return \fBOK\fP. +If not, they return \fBERR\fP. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH ERRORS +No errors are defined. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinsch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/ins_wstr.3ncurses b/upstream/opensuse-leap-15-6/man3/ins_wstr.3ncurses new file mode 100644 index 00000000..94445394 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ins_wstr.3ncurses @@ -0,0 +1,106 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_ins_wstr.3x,v 1.8 2017/11/21 00:53:44 tom Exp $ +.TH ins_wstr 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBins_wstr\fR, +\fBins_nwstr\fR, +\fBwins_wstr\fR, +\fBwins_nwstr\fR, +\fBmvins_wstr\fR, +\fBmvins_nwstr\fR, +\fBmvwins_wstr\fR, +\fBmvwins_nwstr\fR \- insert a wide-character string into a curses window +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +\fBint ins_wstr(const wchar_t *\fR\fIwstr);\fR +.br +\fBint ins_nwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint wins_wstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint wins_nwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvins_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvins_nwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwins_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwins_nwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +These routines insert a \fBwchar_t\fR character string +(as many characters as will fit on the line) +before the character under the cursor. +All characters to the right of the cursor are shifted right, +with the possibility of the rightmost characters on the line being lost. +No wrapping is performed. +The cursor position does not change +(after moving to \fIy\fR, \fIx\fR, if specified). +The four routines with \fIn\fR as the last argument +insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters. +If \fIn\fR is less than 1, the entire string is inserted. +.PP +If a character in \fIwstr\fR is a tab, newline, carriage return or +backspace, the cursor is moved appropriately within the window. +A newline also does a \fBclrtoeol\fR before moving. +Tabs are considered to be at every eighth column. +If a character in \fIwstr\fR is another control character, +it is drawn in the \fB^\fR\fIX\fR notation. +Calling \fBwin_wch\fR after adding a control character +(and moving to it, if necessary) +does not return the control character, +but instead returns a character in the ^-representation +of the control character. +.SH NOTES +Note that all but wins_nwstr may be macros. +.PP +If the first character in the string is a nonspacing character, these +functions will fail. +XSI does not define what will happen if a nonspacing character follows +a control character. +.SH RETURN VALUE +Upon successful completion, these functions return \fBOK\fP. +Otherwise, they return \fBERR\fP. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinsstr\fR(3NCURSES), +\fBin_wch\fR(3NCURSES), +\fBins_wch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/insch.3ncurses b/upstream/opensuse-leap-15-6/man3/insch.3ncurses new file mode 100644 index 00000000..92e5e7df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/insch.3ncurses @@ -0,0 +1,73 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_insch.3x,v 1.14 2017/11/21 00:53:44 tom Exp $ +.TH insch 3NCURSES "" +.SH NAME +\fBinsch\fR, +\fBwinsch\fR, +\fBmvinsch\fR, +\fBmvwinsch\fR \- insert a character before cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint insch(chtype ch);\fR +.br +\fBint winsch(WINDOW *win, chtype ch);\fR +.br +\fBint mvinsch(int y, int x, chtype ch);\fR +.br +\fBint mvwinsch(WINDOW *win, int y, int x, chtype ch);\fR +.br +.SH DESCRIPTION +These routines insert the character \fIch\fR before the character under the +cursor. All characters to the right of the cursor are moved one space to the +right, with the possibility of the rightmost character on the line being lost. +The insertion operation does not change the cursor position. +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and \fBOK\fP +(SVr4 specifies only "an integer value other than \fBERR\fR") +upon successful completion, +unless otherwise noted in the preceding routine descriptions. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +These routines do not necessarily imply use of a hardware insert character +feature. +.PP +Note that \fBinsch\fR, \fBmvinsch\fR, and \fBmvwinsch\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES). +.PP +Comparable functions in the wide-character (ncursesw) library are +described in +\fBins_wch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/insque.3 b/upstream/opensuse-leap-15-6/man3/insque.3 new file mode 100644 index 00000000..3f3e1bcf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/insque.3 @@ -0,0 +1,251 @@ +'\" t +.\" 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 +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH insque 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +insque, remque \- insert/remove an item from a queue +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void insque(void *" elem ", void *" prev ); +.BI "void remque(void *" elem ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR insque (), +.BR remque (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR insque () +and +.BR remque () +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 +The +.BR insque () +function inserts the element pointed to by \fIelem\fP +immediately after the element pointed to by \fIprev\fP. +.PP +If the list is linear, then the call +.I "insque(elem, NULL)" +can be used to insert the initial list element, +and the call sets the forward and backward pointers of +.I elem +to NULL. +.PP +If the list is circular, +the caller should ensure that the forward and backward pointers of the +first element are initialized to point to that element, +and the +.I prev +argument of the +.BR insque () +call should also point to the element. +.PP +The +.BR remque () +function removes the element pointed to by \fIelem\fP from the +doubly linked list. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR insque (), +.BR remque () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On ancient systems, +.\" e.g., SunOS, Linux libc4 and libc5 +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 +This is still what you will get if +.B _GNU_SOURCE +is defined before +including \fI\fP. +.PP +The location of the prototypes for these functions differs among several +versions of UNIX. +The above is the POSIX version. +Some systems place them in \fI\fP. +.\" Linux libc4 and libc 5 placed them +.\" in \fI\fP. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH BUGS +In glibc 2.4 and earlier, it was not possible to specify +.I prev +as NULL. +Consequently, to build a linear list, the caller had to build a list +using an initial call that contained the first two elements of the list, +with the forward and backward pointers in each element suitably initialized. +.SH EXAMPLES +The program below demonstrates the use of +.BR insque (). +Here is an example run of the program: +.PP +.in +4n +.EX +.RB "$ " "./a.out \-c a b c" +Traversing completed list: + a + b + c +That was a circular list +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (insque.c) +.EX +#include +#include +#include +#include + +struct element { + struct element *forward; + struct element *backward; + char *name; +}; + +static struct element * +new_element(void) +{ + struct element *e; + + 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 \[aq]c\[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 +.\" SRC END +.SH SEE ALSO +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/insstr.3ncurses b/upstream/opensuse-leap-15-6/man3/insstr.3ncurses new file mode 100644 index 00000000..72edfe2e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/insstr.3ncurses @@ -0,0 +1,100 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_insstr.3x,v 1.22 2017/11/21 00:53:44 tom Exp $ +.TH insstr 3NCURSES "" +.SH NAME +\fBinsstr\fR, +\fBinsnstr\fR, +\fBwinsstr\fR, +\fBwinsnstr\fR, +\fBmvinsstr\fR, +\fBmvinsnstr\fR, +\fBmvwinsstr\fR, +\fBmvwinsnstr\fR \- insert string before cursor in a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.br +\fBint insstr(const char *str);\fR +.br +\fBint insnstr(const char *str, int n);\fR +.br +\fBint winsstr(WINDOW *win, const char *str);\fR +.br +\fBint winsnstr(WINDOW *win, const char *str, int n);\fR +.br +\fBint mvinsstr(int y, int x, const char *str);\fR +.br +\fBint mvinsnstr(int y, int x, const char *str, int n);\fR +.br +\fBint mvwinsstr(WINDOW *win, int y, int x, const char *str);\fR +.br +\fBint mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);\fR +.br +.SH DESCRIPTION +These routines insert a character string +(as many characters as will fit on the line) +before the character under the cursor. +All characters to the right of the cursor are shifted right +with the possibility of the rightmost characters on the line being lost. +The cursor position does not change +(after moving to \fIy\fR, \fIx\fR, if specified). +The functions with \fIn\fR as the last argument +insert a leading substring of at most \fIn\fR characters. +If \fIn\fR<=0, then the entire string is inserted. +.PP +Special characters are handled as in \fBaddch\fP. +.SH RETURN VALUE +All routines that return an integer return \fBERR\fR upon failure and \fBOK\fP +(SVr4 specifies only "an integer value other than \fBERR\fR") +upon successful completion, +unless otherwise noted in the preceding routine descriptions. +.PP +X/Open defines no error conditions. +In this implementation, +if the window parameter is null or the str parameter is null, +an error is returned. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that all but \fBwinsnstr\fR may be macros. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4, which adds +const qualifiers to the arguments. +.LP +The Single Unix Specification, Version 2 states that +\fBinsnstr\fP and \fBwinsnstr\fP perform wrapping. +This is probably an error, since it makes this group of functions inconsistent. +Also, no implementation of curses documents this inconsistency. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fButil\fR(3NCURSES), +\fBclear\fR(3NCURSES), +\fBinch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/instr.3ncurses b/upstream/opensuse-leap-15-6/man3/instr.3ncurses new file mode 100644 index 00000000..bdc78b1c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/instr.3ncurses @@ -0,0 +1,97 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_instr.3x,v 1.18 2017/11/18 23:47:37 tom Exp $ +.TH instr 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBinstr\fR, +\fBinnstr\fR, +\fBwinstr\fR, +\fBwinnstr\fR, +\fBmvinstr\fR, +\fBmvinnstr\fR, +\fBmvwinstr\fR, +\fBmvwinnstr\fR \- get a string of characters from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint instr(char *str);\fR +.br +\fBint innstr(char *str, int n);\fR +.br +\fBint winstr(WINDOW *win, char *str);\fR +.br +\fBint winnstr(WINDOW *win, char *str, int n);\fR +.br +\fBint mvinstr(int y, int x, char *str);\fR +.br +\fBint mvinnstr(int y, int x, char *str, int n);\fR +.br +\fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR +.br +\fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR +.br +.SH DESCRIPTION +These routines return a string of characters in \fIstr\fR, extracted starting +at the current cursor position in the named window. +Attributes are stripped from the characters. The four +functions with \fIn\fR as the last argument return a leading substring at most +\fIn\fR characters long (exclusive of the trailing NUL). +.SH RETURN VALUE +All of the functions return \fBERR\fR upon failure, +or the number of characters actually read into the string. +.PP +X/Open Curses defines no error conditions. +In this implementation: +.bP +If the \fIwin\fP parameter is null, an error is returned, +.bP +If the \fIchstr\fP parameter is null, an error is returned, +.PP +Functions with a \*(``mv\*('' prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH NOTES +Note that all routines except \fBwinnstr\fR may be macros. +.SH PORTABILITY +SVr4 does not +document whether a length limit includes or excludes the trailing NUL. +.PP +The ncurses library extends the XSI description by allowing a negative +value for \fIn\fR. +In this case, the functions return the string ending at the right margin. +.SH SEE ALSO +\fBncurses\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/intro.3 b/upstream/opensuse-leap-15-6/man3/intro.3 new file mode 100644 index 00000000..493383e5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/intro.3 @@ -0,0 +1,135 @@ +.\" Copyright (C) 2007 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2007-10-23 mtk, Nearly a complete rewrite of the earlier page. +.TH intro 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +intro \- introduction to library functions +.SH DESCRIPTION +Section 3 of the manual describes all library functions +excluding the library functions +(system call wrappers) +described in Section 2, +which implement system calls. +.PP +Many of the functions described in the section are part of the +Standard C Library +.RI ( libc ). +Some functions are part of other libraries +(e.g., +the math library, +.IR libm , +or the real-time library, +.IR librt ) +in which case the manual page will indicate +the linker option needed to link against the required library +(e.g., +.I \-lm +and +.IR \-lrt , +respectively, +for the aforementioned libraries). +.PP +In some cases, +the programmer must define a feature test macro in order to obtain +the declaration of a function from the header file specified +in the man page SYNOPSIS section. +(Where required, +these +.I feature test macros +must be defined before including +.I any +header files.) +In such cases, +the required macro is described in the man page. +For further information on feature test macros, +see +.BR feature_test_macros (7). +.\" +.\" There +.\" are various function groups which can be identified by a letter which +.\" is appended to the chapter number: +.\" .IP (3C) +.\" These functions, +.\" the functions from chapter 2 and from chapter 3S are +.\" contained in the C standard library libc, +.\" which will be used by +.\" .BR cc (1) +.\" by default. +.\" .IP (3S) +.\" These functions are parts of the +.\" .BR stdio (3) +.\" library. They are contained in the standard C library libc. +.\" .IP (3M) +.\" These functions are contained in the arithmetic library libm. They are +.\" used by the +.\" .BR f77 (1) +.\" FORTRAN compiler by default, +.\" but not by the +.\" .BR cc (1) +.\" C compiler, +.\" which needs the option \fI\-lm\fP. +.\" .IP (3F) +.\" These functions are part of the FORTRAN library libF77. There are no +.\" special compiler flags needed to use these functions. +.\" .IP (3X) +.\" Various special libraries. The manual pages documenting their functions +.\" specify the library names. +.SS Subsections +Section 3 of this manual is organized into subsections +that reflect the complex structure of the standard C library +and its many implementations: +.IP \[bu] 3 +3const +.IP \[bu] +3head +.IP \[bu] +3type +.PP +This difficult history frequently makes it a poor example to follow +in design, +implementation, +and presentation. +.PP +Ideally, +a library for the C language +is designed such that each header file +presents the interface to a coherent software module. +It provides a small number of function declarations +and exposes only data types and constants that +are required for use of those functions. +Together, +these are termed an API or +.IR "application program interface" . +Types and constants to be shared among multiple APIs +should be placed in header files that declare no functions. +This organization permits a C library module +to be documented concisely with one header file per manual page. +Such an approach +improves the readability and accessibility of library documentation, +and thereby the usability of the software. +.SH STANDARDS +Certain terms and abbreviations are used to indicate UNIX variants +and standards to which calls in this section conform. +See +.BR standards (7). +.SH NOTES +.SS Authors and copyright conditions +Look at the header of the manual page source +for the author(s) and copyright conditions. +Note that these can be different from page to page! +.SH SEE ALSO +.BR intro (2), +.BR errno (3), +.BR capabilities (7), +.BR credentials (7), +.BR environ (7), +.BR feature_test_macros (7), +.BR libc (7), +.BR math_error (7), +.BR path_resolution (7), +.BR pthreads (7), +.BR signal (7), +.BR standards (7), +.BR system_data_types (7) diff --git a/upstream/opensuse-leap-15-6/man3/inwstr.3ncurses b/upstream/opensuse-leap-15-6/man3/inwstr.3ncurses new file mode 100644 index 00000000..9c340044 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/inwstr.3ncurses @@ -0,0 +1,99 @@ +.\"*************************************************************************** +.\" Copyright (c) 2002-2012,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_inwstr.3x,v 1.9 2017/10/28 23:42:58 tom Exp $ +.TH inwstr 3NCURSES "" +.SH NAME +\fBinwstr\fR, +\fBinnwstr\fR, +\fBwinwstr\fR, +\fBwinnwstr\fR, +\fBmvinwstr\fR, +\fBmvinnwstr\fR, +\fBmvwinwstr\fR, +\fBmvwinnwstr\fR \- get a string of \fBwchar_t\fR characters from a curses window +.SH SYNOPSIS +.nf +\fB#include \fR +.sp +\fBint inwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint innwstr(\fR\fBwchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.br +\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB);\fR +.br +\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR +.fi +.SH DESCRIPTION +.PP +These routines return a string of \fBwchar_t\fR wide characters in \fIwstr\fR, +extracted starting at the current cursor position in the named window. +.PP +The four functions with \fIn\fR as the last argument return a leading substring at most +\fIn\fR characters long (exclusive of the trailing NUL). +Transfer stops at the end of the current line, or when \fIn\fR characters have +been stored at the location referenced by \fIwstr\fR. +.PP +If the size \fIn\fR is not large enough to store a complete complex character, +an error is generated. +.SH NOTES +.PP +All routines except +\fBwinnwstr\fR +may be macros. +.PP +Each cell in the window holds a complex character (i.e., base- +and combining-characters) together with attributes and color. +These functions store only the wide characters, +ignoring attributes and color. +Use \fBin_wchstr\fP to return the complex characters from a window. +.SH RETURN VALUE +All routines return +\fBERR\fR +upon failure. Upon +successful completion, the *\fBinwstr\fR +routines return +\fBOK\fR, and the *\fBinnwstr\fR +routines return the +number of characters read into the string. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinstr\fR(3NCURSES), +\fBin_wchstr\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/isalpha.3 b/upstream/opensuse-leap-15-6/man3/isalpha.3 new file mode 100644 index 00000000..4226e35e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/isalpha.3 @@ -0,0 +1,408 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:10:00 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Aug 21 17:51:50 1994 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt +.\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de) +.\" +.TH isalpha 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower, +isprint, ispunct, isspace, isupper, isxdigit, +isalnum_l, isalpha_l, isascii_l, isblank_l, iscntrl_l, +isdigit_l, isgraph_l, islower_l, +isprint_l, ispunct_l, isspace_l, isupper_l, isxdigit_l +\- character classification functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int isalnum(int " c ); +.BI "int isalpha(int " c ); +.BI "int iscntrl(int " c ); +.BI "int isdigit(int " c ); +.BI "int isgraph(int " c ); +.BI "int islower(int " c ); +.BI "int isprint(int " c ); +.BI "int ispunct(int " c ); +.BI "int isspace(int " c ); +.BI "int isupper(int " c ); +.BI "int isxdigit(int " c ); +.PP +.BI "int isascii(int " c ); +.BI "int isblank(int " c ); +.PP +.BI "int isalnum_l(int " c ", locale_t " locale ); +.BI "int isalpha_l(int " c ", locale_t " locale ); +.BI "int isblank_l(int " c ", locale_t " locale ); +.BI "int iscntrl_l(int " c ", locale_t " locale ); +.BI "int isdigit_l(int " c ", locale_t " locale ); +.BI "int isgraph_l(int " c ", locale_t " locale ); +.BI "int islower_l(int " c ", locale_t " locale ); +.BI "int isprint_l(int " c ", locale_t " locale ); +.BI "int ispunct_l(int " c ", locale_t " locale ); +.BI "int isspace_l(int " c ", locale_t " locale ); +.BI "int isupper_l(int " c ", locale_t " locale ); +.BI "int isxdigit_l(int " c ", locale_t " locale ); +.PP +.BI "int isascii_l(int " c ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.ad l +.PP +.BR isascii (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.PP +.BR isblank (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.nh +.PP +.BR isalnum_l (), +.BR isalpha_l (), +.BR isblank_l (), +.BR iscntrl_l (), +.BR isdigit_l (), +.BR isgraph_l (), +.BR islower_l (), +.BR isprint_l (), +.BR ispunct_l (), +.BR isspace_l (), +.BR isupper_l (), +.BR isxdigit_l (): +.hy +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.PP +.BR isascii_l (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE) + Before glibc 2.10: + _GNU_SOURCE +.fi +.ad +.SH DESCRIPTION +These functions check whether +.IR c , +which must have the value of an +.I unsigned char +or +.BR EOF , +falls into a certain character class according to the specified locale. +The functions without the +"_l" suffix perform the check based on the current locale. +.PP +The functions with the "_l" suffix perform the check +based on the locale specified by the locale object +.IR locale . +The behavior of these functions is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)) +or is not a valid locale object handle. +.PP +The list below explains the operation of the functions without +the "_l" suffix; +the functions with the "_l" suffix differ only in using the locale object +.I locale +instead of the current locale. +.TP +.BR isalnum () +checks for an alphanumeric character; it is equivalent to +.BI "(isalpha(" c ") || isdigit(" c "))" \fR. +.TP +.BR isalpha () +checks for an alphabetic character; in the standard \fB"C"\fP +locale, it is equivalent to +.BI "(isupper(" c ") || islower(" c "))" \fR. +In some locales, there may be additional characters for which +.BR isalpha () +is true\[em]letters which are neither uppercase nor lowercase. +.TP +.BR isascii () +checks whether \fIc\fP is a 7-bit +.I unsigned char +value that fits into +the ASCII character set. +.TP +.BR isblank () +checks for a blank character; that is, a space or a tab. +.TP +.BR iscntrl () +checks for a control character. +.TP +.BR isdigit () +checks for a digit (0 through 9). +.TP +.BR isgraph () +checks for any printable character except space. +.TP +.BR islower () +checks for a lowercase character. +.TP +.BR isprint () +checks for any printable character including space. +.TP +.BR ispunct () +checks for any printable character which is not a space or an +alphanumeric character. +.TP +.BR isspace () +checks for white-space characters. +In the +.B """C""" +and +.B """POSIX""" +locales, these are: space, form-feed +.RB ( \[aq]\ef\[aq] ), +newline +.RB ( \[aq]\en\[aq] ), +carriage return +.RB ( \[aq]\er\[aq] ), +horizontal tab +.RB ( \[aq]\et\[aq] ), +and vertical tab +.RB ( \[aq]\ev\[aq] ). +.TP +.BR isupper () +checks for an uppercase letter. +.TP +.BR isxdigit () +checks for hexadecimal digits, that is, one of +.br +.BR "0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F" . +.SH RETURN VALUE +The values returned are nonzero if the character +.I c +falls into the tested class, and zero if not. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR isalnum (), +.BR isalpha (), +.BR isascii (), +.BR isblank (), +.BR iscntrl (), +.BR isdigit (), +.BR isgraph (), +.BR islower (), +.BR isprint (), +.BR ispunct (), +.BR isspace (), +.BR isupper (), +.BR isxdigit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.\" FIXME: need a thread-safety statement about the *_l functions +.SH STANDARDS +.TP +.BR isalnum () +.TQ +.BR isalpha () +.TQ +.BR iscntrl () +.TQ +.BR isdigit () +.TQ +.BR isgraph () +.TQ +.BR islower () +.TQ +.BR isprint () +.TQ +.BR ispunct () +.TQ +.BR isspace () +.TQ +.BR isupper () +.TQ +.BR isxdigit () +.TQ +.BR isblank () +C11, POSIX.1-2008. +.TP +.BR isascii () +.TQ +.BR isalnum_l () +.TQ +.BR isalpha_l () +.TQ +.BR isblank_l () +.TQ +.BR iscntrl_l () +.TQ +.BR isdigit_l () +.TQ +.BR isgraph_l () +.TQ +.BR islower_l () +.TQ +.BR isprint_l () +.TQ +.BR ispunct_l () +.TQ +.BR isspace_l () +.TQ +.BR isupper_l () +.TQ +.BR isxdigit_l () +POSIX.1-2008. +.TP +.BR isascii_l () +GNU. +.SH HISTORY +.TP +.BR isalnum () +.TQ +.BR isalpha () +.TQ +.BR iscntrl () +.TQ +.BR isdigit () +.TQ +.BR isgraph () +.TQ +.BR islower () +.TQ +.BR isprint () +.TQ +.BR ispunct () +.TQ +.BR isspace () +.TQ +.BR isupper () +.TQ +.BR isxdigit () +C89, POSIX.1-2001. +.TP +.BR isblank () +C99, POSIX.1-2001. +.TP +.BR isascii () +POSIX.1-2001 (XSI). +.IP +POSIX.1-2008 marks it as obsolete, +noting that it cannot be used portably in a localized application. +.TP +.BR isalnum_l () +.TQ +.BR isalpha_l () +.TQ +.BR isblank_l () +.TQ +.BR iscntrl_l () +.TQ +.BR isdigit_l () +.TQ +.BR isgraph_l () +.TQ +.BR islower_l () +.TQ +.BR isprint_l () +.TQ +.BR ispunct_l () +.TQ +.BR isspace_l () +.TQ +.BR isupper_l () +.TQ +.BR isxdigit_l () +glibc 2.3. +POSIX.1-2008. +.TP +.BR isascii_l () +glibc 2.3. +.SH NOTES +The standards require that the argument +.I c +for these functions is either +.B EOF +or a value that is representable in the type +.IR "unsigned char" . +If the argument +.I c +is of type +.IR char , +it must be cast to +.IR "unsigned char" , +as in the following example: +.PP +.in +4n +.EX +char c; +\&... +res = toupper((unsigned char) c); +.EE +.in +.PP +This is necessary because +.I char +may be the equivalent of +.IR "signed char" , +in which case a byte where the top bit is set would be sign extended when +converting to +.IR int , +yielding a value that is outside the range of +.IR "unsigned char" . +.PP +The details of what characters belong to which class depend on the +locale. +For example, +.BR isupper () +will not recognize an A-umlaut (\(:A) as an uppercase letter in the default +.B "C" +locale. +.SH SEE ALSO +.BR iswalnum (3), +.BR iswalpha (3), +.BR iswblank (3), +.BR iswcntrl (3), +.BR iswdigit (3), +.BR iswgraph (3), +.BR iswlower (3), +.BR iswprint (3), +.BR iswpunct (3), +.BR iswspace (3), +.BR iswupper (3), +.BR iswxdigit (3), +.BR newlocale (3), +.BR setlocale (3), +.BR toascii (3), +.BR tolower (3), +.BR toupper (3), +.BR uselocale (3), +.BR ascii (7), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/isatty.3 b/upstream/opensuse-leap-15-6/man3/isatty.3 new file mode 100644 index 00000000..87a77e2c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/isatty.3 @@ -0,0 +1,71 @@ +'\" t +.\" Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH isatty 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +isatty \- test whether a file descriptor refers to a terminal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int isatty(int " fd ); +.fi +.SH DESCRIPTION +The +.BR isatty () +function tests whether +.I fd +is an open file descriptor referring to a terminal. +.SH RETURN VALUE +.BR isatty () +returns 1 if +.I fd +is an open file descriptor referring to a terminal; +otherwise 0 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I fd +is not a valid file descriptor. +.TP +.B ENOTTY +.I fd +refers to a file other than a terminal. +On some older kernels, some types of files +.\" e.g., FIFOs and pipes on 2.6.32 +resulted in the error +.B EINVAL +in this case (which is a violation of POSIX, which specifies the error +.BR ENOTTY ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR isatty () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR fstat (2), +.BR ttyname (3) diff --git a/upstream/opensuse-leap-15-6/man3/isfdtype.3 b/upstream/opensuse-leap-15-6/man3/isfdtype.3 new file mode 100644 index 00000000..18e2cc94 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/isfdtype.3 @@ -0,0 +1,77 @@ +.\" Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH isfdtype 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +isfdtype \- test file type of a file descriptor +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int isfdtype(int " fd ", int " fdtype ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR isfdtype (): +.nf + Since glibc 2.20: + _DEFAULT_SOURCE + Before glibc 2.20: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR isfdtype () +function tests whether the file descriptor +.I fd +refers to a file of type +.IR fdtype . +The +.I fdtype +argument specifies one of the +.B S_IF* +constants defined in +.I +and documented in +.BR stat (2) +(e.g., +.BR S_IFREG ). +.SH RETURN VALUE +The +.BR isfdtype () +function returns 1 if the file descriptor +.I fd +is of type +.I fdtype +and 0 if it is not. +On failure, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +The +.BR isfdtype () +function can fail with any of the same errors as +.BR fstat (2). +.SH VERSIONS +Portable applications should use +.BR fstat (2) +instead. +.SH STANDARDS +None. +.SH HISTORY +It appeared in the draft POSIX.1g standard. +It is present on OpenBSD and Tru64 UNIX +(where the required header file in both cases is just +.IR , +as shown in the POSIX.1g draft). +.SH SEE ALSO +.BR fstat (2) diff --git a/upstream/opensuse-leap-15-6/man3/isgreater.3 b/upstream/opensuse-leap-15-6/man3/isgreater.3 new file mode 100644 index 00000000..00d686bd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/isgreater.3 @@ -0,0 +1,147 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" 2002-07-27 Walter Harms +.\" this was done with the help of the glibc manual +.\" +.TH isgreater 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +isgreater, isgreaterequal, isless, islessequal, islessgreater, +isunordered \- floating-point relational tests without exception for NaN +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int isgreater(" x ", " y ); +.BI "int isgreaterequal(" x ", " y ); +.BI "int isless(" x ", " y ); +.BI "int islessequal(" x ", " y ); +.BI "int islessgreater(" x ", " y ); +.BI "int isunordered(" x ", " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.nf + All functions described here: + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The normal relational operations (like +.BR < , +"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 +These macros are guaranteed to evaluate their arguments only once. +The arguments must be of real floating-point type (note: do not pass +integer values as arguments to these macros, since the arguments will +.I not +be promoted to real-floating types). +.TP +.BR isgreater () +determines \fI(x)\ >\ (y)\fP without an exception +if +.I x +or +.I y +is NaN. +.TP +.BR isgreaterequal () +determines \fI(x)\ >=\ (y)\fP without an exception +if +.I x +or +.I y +is NaN. +.TP +.BR isless () +determines \fI(x)\ <\ (y)\fP without an exception +if +.I x +or +.I y +is NaN. +.TP +.BR islessequal () +determines \fI(x)\ <=\ (y)\fP without an exception +if +.I x +or +.I y +is NaN. +.TP +.BR islessgreater () +determines \fI(x)\ < (y) || (x) >\ (y)\fP +without an exception if +.I x +or +.I y +is NaN. +This macro is not equivalent to \fIx\ !=\ y\fP because that expression is +true if +.I x +or +.I y +is NaN. +.TP +.BR isunordered () +determines whether its arguments are unordered, that is, whether +at least one of the arguments is a NaN. +.SH RETURN VALUE +The macros other than +.BR isunordered () +return the result of the relational comparison; +these macros return 0 if either argument is a NaN. +.PP +.BR isunordered () +returns 1 if +.I x +or +.I y +is NaN and 0 otherwise. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR isgreater (), +.BR isgreaterequal (), +.BR isless (), +.BR islessequal (), +.BR islessgreater (), +.BR isunordered () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Not all hardware supports these functions, +and where hardware support isn't provided, they will be emulated by macros. +This will result in a performance penalty. +Don't use these functions if NaN is of no concern for you. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR fpclassify (3), +.BR isnan (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswalnum.3 b/upstream/opensuse-leap-15-6/man3/iswalnum.3 new file mode 100644 index 00000000..b624e191 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswalnum.3 @@ -0,0 +1,98 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswalnum 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswalnum \- test for alphanumeric wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswalnum(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswalnum () +function is the wide-character equivalent of the +.BR isalnum (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "alnum". +.PP +The wide-character class "alnum" is a subclass of the wide-character class +"graph", and therefore also a subclass of the wide-character class "print". +.PP +Being a subclass of the wide-character class "print", +the wide-character class +"alnum" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", +the wide-character class "alnum" is disjoint from +the wide-character class "space" and its subclass "blank". +.PP +The wide-character class "alnum" is disjoint from the wide-character class +"punct". +.PP +The wide-character class "alnum" is the union of the wide-character classes +"alpha" and "digit". +As such, it also contains the wide-character class +"xdigit". +.PP +The wide-character class "alnum" +always contains at least the letters +\[aq]A\[aq] to \[aq]Z\[aq], +\[aq]a\[aq] to \[aq]z\[aq], +and the digits \[aq]0\[aq] to \[aq]9\[aq]. +.SH RETURN VALUE +The +.BR iswalnum () +function returns nonzero +if +.I wc +is a wide character +belonging to the wide-character class "alnum". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswalnum () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswalnum () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isalnum (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswalpha.3 b/upstream/opensuse-leap-15-6/man3/iswalpha.3 new file mode 100644 index 00000000..8f8a4e9a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswalpha.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswalpha 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswalpha \- test for alphabetic wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswalpha(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswalpha () +function is the wide-character equivalent of the +.BR isalpha (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "alpha". +.PP +The wide-character class "alpha" is a subclass of the +wide-character class "alnum", +and therefore also a subclass of the wide-character class "graph" and +of the wide-character class "print". +.PP +Being a subclass of the wide-character class "print", +the wide-character class +"alpha" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", +the wide-character class "alpha" is disjoint from +the wide-character class "space" and its subclass "blank". +.PP +Being a subclass of the wide-character class "alnum", +the wide-character class "alpha" is disjoint from the +wide-character class "punct". +.PP +The wide-character class "alpha" is disjoint from the wide-character class +"digit". +.PP +The wide-character class "alpha" contains the wide-character classes "upper" +and "lower". +.PP +The wide-character class "alpha" always contains at least the +letters \[aq]A\[aq] to \[aq]Z\[aq] and \[aq]a\[aq] to \[aq]z\[aq]. +.SH RETURN VALUE +The +.BR iswalpha () +function returns nonzero +if +.I wc +is a wide character +belonging to the wide-character class "alpha". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswalpha () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswalpha () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isalpha (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswblank.3 b/upstream/opensuse-leap-15-6/man3/iswblank.3 new file mode 100644 index 00000000..ab55a8c4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswblank.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswblank 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswblank \- test for whitespace wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswblank(wint_t " wc ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR iswblank (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR iswblank () +function is the wide-character equivalent of the +.BR isblank (3) +function. +It tests whether \fIwc\fP is a wide character +belonging to the wide-character class "blank". +.PP +The wide-character class "blank" is a subclass of the wide-character class +"space". +.PP +Being a subclass of the wide-character class "space", +the wide-character class "blank" is disjoint from the +wide-character class "graph" and therefore also disjoint +from its subclasses "alnum", "alpha", "upper", "lower", "digit", +"xdigit", "punct". +.PP +The wide-character class "blank" always contains +at least the space character +and the control character \[aq]\et\[aq]. +.SH RETURN VALUE +The +.BR iswblank () +function returns nonzero +if \fIwc\fP is a wide character +belonging to the wide-character class "blank". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswblank () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The behavior of +.BR iswblank () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isblank (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswcntrl.3 b/upstream/opensuse-leap-15-6/man3/iswcntrl.3 new file mode 100644 index 00000000..b1a481e8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswcntrl.3 @@ -0,0 +1,83 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswcntrl 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswcntrl \- test for control wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswcntrl(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswcntrl () +function is the wide-character equivalent of the +.BR iscntrl (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "cntrl". +.PP +The wide-character class "cntrl" is disjoint from the wide-character class +"print" and therefore also disjoint from its subclasses "graph", "alpha", +"upper", "lower", "digit", "xdigit", "punct". +.PP +For an unsigned char +.IR c , +.I iscntrl(c) +implies +.IR iswcntrl(btowc(c)) , +but not vice versa. +.SH RETURN VALUE +The +.BR iswcntrl () +function returns nonzero if +.I wc +is a +wide character belonging to the wide-character class "cntrl". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswcntrl () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswcntrl () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iscntrl (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswctype.3 b/upstream/opensuse-leap-15-6/man3/iswctype.3 new file mode 100644 index 00000000..d1fc35e3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswctype.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswctype 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswctype \- wide-character classification +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswctype(wint_t " wc ", wctype_t " desc ); +.fi +.SH DESCRIPTION +If +.I wc +is a wide character having the character property designated by +.I desc +(or in other words: belongs to the character class designated by +.IR desc ), +then the +.BR iswctype () +function returns nonzero. +Otherwise, it +returns zero. +If +.I wc +is +.BR WEOF , +zero is returned. +.PP +.I desc +must be a character property descriptor +returned by the +.BR wctype (3) +function. +.SH RETURN VALUE +The +.BR iswctype () +function returns nonzero if +the +.I wc +has the designated +property. +Otherwise, it returns 0. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswctype () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswctype () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iswalnum (3), +.BR iswalpha (3), +.BR iswblank (3), +.BR iswcntrl (3), +.BR iswdigit (3), +.BR iswgraph (3), +.BR iswlower (3), +.BR iswprint (3), +.BR iswpunct (3), +.BR iswspace (3), +.BR iswupper (3), +.BR iswxdigit (3), +.BR wctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswdigit.3 b/upstream/opensuse-leap-15-6/man3/iswdigit.3 new file mode 100644 index 00000000..ee0b7200 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswdigit.3 @@ -0,0 +1,98 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswdigit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswdigit \- test for decimal digit wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswdigit(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswdigit () +function is the wide-character equivalent of the +.BR isdigit (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "digit". +.PP +The wide-character class "digit" is a subclass of the wide-character class +"xdigit", and therefore also a subclass +of the wide-character class "alnum", of +the wide-character class "graph" and of the wide-character class "print". +.PP +Being a subclass of the wide character +class "print", the wide-character class +"digit" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", +the wide-character class +"digit" is disjoint from the wide-character class "space" and its subclass +"blank". +.PP +Being a subclass of the wide-character +class "alnum", the wide-character class +"digit" is disjoint from the wide-character class "punct". +.PP +The wide-character class "digit" is +disjoint from the wide-character class +"alpha" and therefore also disjoint from its subclasses "lower", "upper". +.PP +The wide-character class "digit" always +contains exactly the digits \[aq]0\[aq] to \[aq]9\[aq]. +.SH RETURN VALUE +The +.BR iswdigit () +function returns nonzero +if +.I wc +is a wide character +belonging to the wide-character class "digit". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswdigit () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswdigit () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isdigit (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswgraph.3 b/upstream/opensuse-leap-15-6/man3/iswgraph.3 new file mode 100644 index 00000000..bb2bdb0d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswgraph.3 @@ -0,0 +1,91 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswgraph 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswgraph \- test for graphic wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswgraph(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswgraph () +function is the wide-character equivalent of the +.BR isgraph (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "graph". +.PP +The wide-character class "graph" is a subclass of the wide-character class +"print". +.PP +Being a subclass of the wide-character class "print", +the wide-character class +"graph" is disjoint from the wide-character class "cntrl". +.PP +The wide-character class "graph" is disjoint from the wide-character class +"space" and therefore also disjoint from its subclass "blank". +.\" Note: UNIX98 (susv2/xbd/locale.html) says that "graph" and "space" may +.\" have characters in common, except U+0020. But C99 (ISO/IEC 9899:1999 +.\" section 7.25.2.1.10) says that "space" and "graph" are disjoint. +.PP +The wide-character class "graph" contains all the wide characters from the +wide-character class "print" except the space character. +It therefore contains +the wide-character classes "alnum" and "punct". +.SH RETURN VALUE +The +.BR iswgraph () +function returns nonzero +if +.I wc +is a wide character +belonging to the wide-character class "graph". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswgraph () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswgraph () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isgraph (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswlower.3 b/upstream/opensuse-leap-15-6/man3/iswlower.3 new file mode 100644 index 00000000..562b3876 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswlower.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswlower 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswlower \- test for lowercase wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswlower(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswlower () +function is the wide-character equivalent of the +.BR islower (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "lower". +.PP +The wide-character class "lower" is a subclass of the wide-character class +"alpha", and therefore also a subclass +of the wide-character class "alnum", of +the wide-character class "graph" and of the wide-character class "print". +.PP +Being a subclass of the wide-character class "print", +the wide-character class +"lower" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", +the wide-character class "lower" is disjoint from the +wide-character class "space" and its subclass "blank". +.PP +Being a subclass of the wide-character class "alnum", +the wide-character class +"lower" is disjoint from the wide-character class "punct". +.PP +Being a subclass of the wide-character class "alpha", +the wide-character class +"lower" is disjoint from the wide-character class "digit". +.PP +The wide-character class "lower" contains at least +those characters +.I wc +which are equal to +.I towlower(wc) +and different from +.IR towupper(wc) . +.PP +The wide-character class "lower" always contains +at least the letters \[aq]a\[aq] to \[aq]z\[aq]. +.SH RETURN VALUE +The +.BR iswlower () +function returns nonzero +if +.I wc +is a wide character +belonging to the wide-character class "lower". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswlower () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswlower () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +This function is not very appropriate for dealing with Unicode characters, +because Unicode knows about three cases: upper, lower, and title case. +.SH SEE ALSO +.BR islower (3), +.BR iswctype (3), +.BR towlower (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswprint.3 b/upstream/opensuse-leap-15-6/man3/iswprint.3 new file mode 100644 index 00000000..fdbbbd1c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswprint.3 @@ -0,0 +1,77 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswprint 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswprint \- test for printing wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswprint(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswprint () +function is the wide-character equivalent of the +.BR isprint (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "print". +.PP +The wide-character class "print" is disjoint from the wide-character class +"cntrl". +.PP +The wide-character class "print" contains the wide-character class "graph". +.SH RETURN VALUE +The +.BR iswprint () +function returns nonzero if +.I wc +is a +wide character belonging to the wide-character class "print". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswprint () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswprint () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isprint (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswpunct.3 b/upstream/opensuse-leap-15-6/man3/iswpunct.3 new file mode 100644 index 00000000..f10912e2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswpunct.3 @@ -0,0 +1,93 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswpunct 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswpunct \- test for punctuation or symbolic wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswpunct(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswpunct () +function is the wide-character equivalent of the +.BR ispunct (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "punct". +.PP +The wide-character class "punct" is a subclass of the wide-character class +"graph", and therefore also a subclass of the wide-character class "print". +.PP +The wide-character class "punct" is disjoint from the wide-character class +"alnum" and therefore also disjoint from its subclasses "alpha", "upper", +"lower", "digit", "xdigit". +.PP +Being a subclass of the wide-character class "print", +the wide-character class +"punct" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", +the wide-character class +"punct" is disjoint from the wide-character class "space" and its subclass +"blank". +.SH RETURN VALUE +The +.BR iswpunct () +function returns nonzero +if +.I wc +is a wide-character +belonging to the wide-character class "punct". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswpunct () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswpunct () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +This function's name is a misnomer when dealing with Unicode characters, +because the wide-character class "punct" contains both punctuation characters +and symbol (math, currency, etc.) characters. +.SH SEE ALSO +.BR ispunct (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswspace.3 b/upstream/opensuse-leap-15-6/man3/iswspace.3 new file mode 100644 index 00000000..d4347d8d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswspace.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswspace 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswspace \- test for whitespace wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswspace(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswspace () +function is the wide-character equivalent of the +.BR isspace (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "space". +.PP +The wide-character class "space" is disjoint from the wide-character class +"graph" and therefore also disjoint from its subclasses "alnum", "alpha", +"upper", "lower", "digit", "xdigit", "punct". +.\" Note: UNIX98 (susv2/xbd/locale.html) says that "space" and "graph" may +.\" have characters in common, except U+0020. But C99 (ISO/IEC 9899:1999 +.\" section 7.25.2.1.10) says that "space" and "graph" are disjoint. +.PP +The wide-character class "space" contains the wide-character class "blank". +.PP +The wide-character class "space" +always contains at least the space character +and the control characters +\[aq]\ef\[aq], \[aq]\en\[aq], \[aq]\er\[aq], \[aq]\et\[aq], and \[aq]\ev\[aq]. +.SH RETURN VALUE +The +.BR iswspace () +function returns nonzero if +.I wc +is a wide character +belonging to the wide-character class "space". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswspace () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswspace () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR isspace (3), +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswupper.3 b/upstream/opensuse-leap-15-6/man3/iswupper.3 new file mode 100644 index 00000000..16ebb279 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswupper.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswupper 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswupper \- test for uppercase wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswupper(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswupper () +function is the wide-character equivalent of the +.BR isupper (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "upper". +.PP +The wide-character class "upper" is a subclass of the wide-character class +"alpha", and therefore also a subclass of the wide-character class "alnum", of +the wide-character class "graph" and of the wide-character class "print". +.PP +Being a subclass of the wide-character class "print", the wide-character class +"upper" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", the wide-character class +"upper" is disjoint from the wide-character class "space" and its subclass +"blank". +.PP +Being a subclass of the wide-character class "alnum", the wide-character class +"upper" is disjoint from the wide-character class "punct". +.PP +Being a subclass of the wide-character class "alpha", the wide-character class +"upper" is disjoint from the wide-character class "digit". +.PP +The wide-character class "upper" contains at least those characters +.I wc +which are equal to +.I towupper(wc) +and different from +.IR towlower(wc) . +.PP +The wide-character class "upper" always contains at least the +letters \[aq]A\[aq] to \[aq]Z\[aq]. +.SH RETURN VALUE +The +.BR iswupper () +function returns nonzero if +.I wc +is a wide character +belonging to the wide-character class "upper". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswupper () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswupper () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +This function is not very appropriate for dealing with Unicode characters, +because Unicode knows about three cases: upper, lower, and title case. +.SH SEE ALSO +.BR isupper (3), +.BR iswctype (3), +.BR towupper (3) diff --git a/upstream/opensuse-leap-15-6/man3/iswxdigit.3 b/upstream/opensuse-leap-15-6/man3/iswxdigit.3 new file mode 100644 index 00000000..474bbb02 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/iswxdigit.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH iswxdigit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +iswxdigit \- test for hexadecimal digit wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int iswxdigit(wint_t " wc ); +.fi +.SH DESCRIPTION +The +.BR iswxdigit () +function is the wide-character equivalent of the +.BR isxdigit (3) +function. +It tests whether +.I wc +is a wide character +belonging to the wide-character class "xdigit". +.PP +The wide-character class "xdigit" is a subclass of the wide-character class +"alnum", and therefore also a subclass of the wide-character class "graph" and +of the wide-character class "print". +.PP +Being a subclass of the wide-character class "print", the wide-character class +"xdigit" is disjoint from the wide-character class "cntrl". +.PP +Being a subclass of the wide-character class "graph", the wide-character class +"xdigit" is disjoint from the wide-character class "space" and its subclass +"blank". +.PP +Being a subclass of the wide-character class "alnum", the wide-character class +"xdigit" is disjoint from the wide-character class "punct". +.PP +The wide-character class "xdigit" always contains at least the +letters \[aq]A\[aq] to \[aq]F\[aq], \[aq]a\[aq] to \[aq]f\[aq] +and the digits \[aq]0\[aq] to \[aq]9\[aq]. +.SH RETURN VALUE +The +.BR iswxdigit () +function returns nonzero if +.I wc +is a wide character +belonging to the wide-character class "xdigit". +Otherwise, it returns zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR iswxdigit () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR iswxdigit () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iswctype (3), +.BR isxdigit (3) diff --git a/upstream/opensuse-leap-15-6/man3/items.3menu b/upstream/opensuse-leap-15-6/man3/items.3menu new file mode 100644 index 00000000..e69d3816 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/items.3menu @@ -0,0 +1,89 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2012,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_items.3x,v 1.11 2015/12/05 23:47:32 tom Exp $ +.TH items 3MENU "" +.SH NAME +\fBset_menu_items\fR, +\fBmenu_items\fR, +\fBitem_count\fP \- make and break connections between items and menus +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_items(MENU *menu, ITEM **items); +.br +ITEM **menu_items(const MENU *menu); +.br +int item_count(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_items\fR changes the item pointer array of the given +\fImenu\fR. The array must be terminated by a \fBNULL\fR. +.PP +The function \fBmenu_items\fR returns the item array of the given menu. +.PP +The function \fBitem_count\fR returns the count of items in \fImenu\fR. +.SH RETURN VALUE +The function \fBmenu_items\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error +return value) if its \fImenu\fP parameter is \fBNULL\fP. +.PP +The function \fBset_menu_items\fR returns one of the following codes on error: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.TP 5 +.B E_POSTED +The menu is already posted. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.PP +The SVr4 menu library documentation specifies the \fBitem_count\fR error value +as \-1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/j0.3 b/upstream/opensuse-leap-15-6/man3/j0.3 new file mode 100644 index 00000000..b148cc09 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/j0.3 @@ -0,0 +1,194 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH j0 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \- +Bessel functions of the first kind +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double j0(double " x ); +.BI "double j1(double " x ); +.BI "double jn(int " n ", double " x ); +.PP +.BI "float j0f(float " x ); +.BI "float j1f(float " x ); +.BI "float jnf(int " n ", float " x ); +.PP +.BI "long double j0l(long double " x ); +.BI "long double j1l(long double " x ); +.BI "long double jnl(int " n ", long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR j0 (), +.BR j1 (), +.BR jn (): +.nf + _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR j0f (), +.BR j0l (), +.BR j1f (), +.BR j1l (), +.BR jnf (), +.BR jnl (): +.nf + _XOPEN_SOURCE >= 600 + || (_ISOC99_SOURCE && _XOPEN_SOURCE) + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR j0 () +and +.BR j1 () +functions return Bessel functions of +.I x +of the first kind of orders 0 and 1, respectively. +The +.BR jn () +function +returns the Bessel function of +.I x +of the first kind of order +.IR n . +.PP +The +.BR j0f (), +.BR j1f (), +and +.BR jnf (), +functions are versions that take and return +.I float +values. +The +.BR j0l (), +.BR j1l (), +and +.BR jnl () +functions are versions that take and return +.I "long double" +values. +.SH RETURN VALUE +On success, these functions return the appropriate +Bessel value of the first kind for +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is too large in magnitude, +or the result underflows, +a range error occurs, +and the return value is 0. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result underflow, or \fIx\fP is too large in magnitude +.I errno +is set to +.BR ERANGE . +.PP +These functions do not raise exceptions for +.BR fetestexcept (3). +.\" e.g., j0(1.5e16) +.\" This is intentional. +.\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6805 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR j0 (), +.BR j0f (), +.BR j0l () +T} Thread safety MT-Safe +T{ +.BR j1 (), +.BR j1f (), +.BR j1l () +T} Thread safety MT-Safe +T{ +.BR jn (), +.BR jnf (), +.BR jnl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR j0 () +.TQ +.BR j1 () +.TQ +.BR jn () +POSIX.1-2008. +.TP +Others: +BSD. +.SH HISTORY +.TP +.BR j0 () +.TQ +.BR j1 () +.TQ +.BR jn () +SVr4, 4.3BSD, +POSIX.1-2001, POSIX.1-2008. +.TP +Others: +BSD. +.SH BUGS +There are errors of up to 2e\-16 in the values returned by +.BR j0 (), +.BR j1 (), +and +.BR jn () +for values of +.I x +between \-8 and 8. +.SH SEE ALSO +.BR y0 (3) diff --git a/upstream/opensuse-leap-15-6/man3/kernel.3ncurses b/upstream/opensuse-leap-15-6/man3/kernel.3ncurses new file mode 100644 index 00000000..48f5e95e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/kernel.3ncurses @@ -0,0 +1,208 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_kernel.3x,v 1.23 2017/11/18 23:47:37 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH kernel 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBdef_prog_mode\fR, +\fBdef_shell_mode\fR, +\fBreset_prog_mode\fR, +\fBreset_shell_mode\fR, +\fBresetty\fR, +\fBsavetty\fR, +\fBgetsyx\fR, +\fBsetsyx\fR, +\fBripoffline\fR, +\fBcurs_set\fR, +\fBnapms\fR \- low-level \fBcurses\fR routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint def_prog_mode(void);\fR +.br +\fBint def_shell_mode(void);\fR +.br +\fBint reset_prog_mode(void);\fR +.br +\fBint reset_shell_mode(void);\fR +.br +\fBint resetty(void);\fR +.br +\fBint savetty(void);\fR +.br +\fBvoid getsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBvoid setsyx(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBint ripoffline(int \fP\fIline\fP\fB, int (*\fP\fIinit\fP\fB)(WINDOW *, int));\fR +.br +\fBint curs_set(int \fP\fIvisibility\fP\fB);\fR +.br +\fBint napms(int \fP\fIms\fP\fB);\fR +.br +.SH DESCRIPTION +The following routines give low-level access to various \fBcurses\fR +capabilities. These routines typically are used inside library +routines. +.SS def_prog_mode, def_shell_mode +.PP +The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the +current terminal modes as the "program" (in \fBcurses\fR) or "shell" +(not in \fBcurses\fR) state for use by the \fBreset_prog_mode\fR and +\fBreset_shell_mode\fR routines. This is done automatically by +\fBinitscr\fR. There is one such save area for each screen context +allocated by \fBnewterm\fR. +.SS reset_prog_mode, reset_shell_mode +.PP +The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore +the terminal to "program" (in \fBcurses\fR) or "shell" (out of +\fBcurses\fR) state. These are done automatically by \fBendwin\fR(3X) +and, after an \fBendwin\fR, by \fBdoupdate\fR, so they normally are +not called. +.SS resetty, savetty +.PP +The \fBresetty\fR and \fBsavetty\fR routines save and restore the +state of the terminal modes. \fBsavetty\fR saves the current state in +a buffer and \fBresetty\fR restores the state to what it was at the +last call to \fBsavetty\fR. +.SS getsyx +.PP +The \fBgetsyx\fR routine returns the current coordinates of the virtual screen +cursor in \fIy\fR and \fIx\fR. If \fBleaveok\fR is currently \fBTRUE\fR, then +\fB\-1\fR,\fB\-1\fR is returned. If lines have been removed from the top of the +screen, using \fBripoffline\fR, \fIy\fR and \fIx\fR include these lines; +therefore, \fIy\fR and \fIx\fR should be used only as arguments for +\fBsetsyx\fR. +.SS setsyx +.PP +The \fBsetsyx\fR routine sets the virtual screen cursor to +\fIy\fR, \fIx\fR. If \fIy\fR and \fIx\fR are both \fB\-1\fR, then +\fBleaveok\fR is set. The two routines \fBgetsyx\fR and \fBsetsyx\fR +are designed to be used by a library routine, which manipulates +\fBcurses\fR windows but does not want to change the current position +of the program's cursor. The library routine would call \fBgetsyx\fR +at the beginning, do its manipulation of its own windows, do a +\fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call +\fBdoupdate\fR. +.SS ripoffline +.PP +The \fBripoffline\fR routine provides access to the same facility that +\fBslk_init\fR [see \fBslk\fR(3NCURSES)] uses to reduce the size of the +screen. \fBripoffline\fR must be called before \fBinitscr\fR or +\fBnewterm\fR is called, to prepare these initial actions: +.bP +If \fIline\fR is positive, a line is removed from the top of \fBstdscr\fR. +.bP +if \fIline\fR is negative, a line is removed from the bottom. +.PP +When the resulting initialization is done inside \fBinitscr\fR, the +routine \fBinit\fR (supplied by the user) is called with two +arguments: +.bP +a window pointer to the one-line window that has been +allocated and +.bP +an integer with the number of columns in the window. +.PP +Inside this initialization routine, the integer variables \fBLINES\fR +and \fBCOLS\fR (defined in \fB\fR) are not guaranteed to be +accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called. It +is allowable to call \fBwnoutrefresh\fR during the initialization +routine. +.PP +\fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or +\fBnewterm\fR. +.SS curs_set +.PP +The \fBcurs_set\fR routine sets the cursor state to invisible, +normal, or very visible for \fBvisibility\fR equal to \fB0\fR, +\fB1\fR, or \fB2\fR respectively. If the terminal supports the +\fIvisibility\fR requested, the previous \fIcursor\fR state is +returned; otherwise, \fBERR\fR is returned. +.SS napms +.PP +The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds. +.SH RETURN VALUE +Except for \fBcurs_set\fR, these routines always return \fBOK\fR. +.PP +\fBcurs_set\fR +returns the previous cursor state, or \fBERR\fR if the +requested \fIvisibility\fR is not supported. +.PP +X/Open defines no error conditions. +In this implementation +.TP 5 +.na +.hy 0 +\fBdef_prog_mode\fR, \fBdef_shell_mode\fR, \fBreset_prog_mode\fR, \fBreset_shell_mode\fR +.hy +.ad +return an error +if the terminal was not initialized, or +if the I/O call to obtain the terminal settings fails. +.TP 5 +\fBripoffline\fP +returns an error if the maximum number of ripped-off lines +exceeds the maximum (NRIPS = 5). +.SH NOTES +Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before +the variables \fIy\fR and \fIx\fR. +.PP +Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently +incorrect". This implementation gets it right, but it may be unwise to count +on the correctness of the return value anywhere else. +.PP +Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR +if \fBcurs_set\fR +has been called to make the cursor other than normal, i.e., either +invisible or very visible. +There is no way for ncurses to determine the initial cursor state to +restore that. +.SH PORTABILITY +The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI +Curses standard, Issue 4. All other functions are as described in XSI Curses. +.PP +The SVr4 documentation describes \fBsetsyx\fR and \fBgetsyx\fR as having return +type int. This is misleading, as they are macros with no documented semantics +for the return value. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBscr_dump\fR(3NCURSES), +\fBslk\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/key_defined.3ncurses b/upstream/opensuse-leap-15-6/man3/key_defined.3ncurses new file mode 100644 index 00000000..96a69f88 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/key_defined.3ncurses @@ -0,0 +1,54 @@ +.\"*************************************************************************** +.\" Copyright (c) 2003-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 2003 +.\" +.\" $Id: key_defined.3x,v 1.6 2010/12/04 18:40:45 tom Exp $ +.TH key_defined 3NCURSES "" +.SH NAME +\fBkey_defined\fP \- check if a keycode is defined +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint key_defined(const char *definition);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to determine if a string is currently bound +to any keycode. +.SH RETURN VALUE +If the string is bound to a keycode, its value (greater than zero) is returned. +If no keycode is bound, zero is returned. +If the string conflicts with longer strings which are bound to keys, \-1 is returned. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/key_setsecret.3 b/upstream/opensuse-leap-15-6/man3/key_setsecret.3 new file mode 100644 index 00000000..fd2bc02d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/key_setsecret.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" I had no way the check the functions out +.\" be careful +.TH key_setsecret 3 2022-12-15 "Linux man-pages 6.04" +.SH NAME +key_decryptsession, key_encryptsession, key_setsecret, key_gendes, +key_secretkey_is_set \- interfaces to rpc keyserver daemon +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int key_decryptsession(char *" remotename ", des_block *" deskey ); +.BI "int key_encryptsession(char *" remotename ", des_block *" deskey ); +.PP +.BI "int key_gendes(des_block *" deskey ); +.PP +.BI "int key_setsecret(char *" key ); +.B int key_secretkey_is_set(void); +.fi +.SH DESCRIPTION +The functions here are used within the RPC's secure authentication +mechanism (AUTH_DES). +There should be no need for user programs to +use this functions. +.PP +The function +.BR key_decryptsession () +uses the (remote) server netname and takes the DES key +for decrypting. +It uses the public key of the server and the +secret key associated with the effective UID of the calling process. +.PP +The function +.BR key_encryptsession () +is the inverse of +.BR key_decryptsession (). +It encrypts the DES keys with the public key of the server and +the secret key associated with the effective UID of the calling process. +.PP +The function +.BR key_gendes () +is used to ask the keyserver for a secure conversation key. +.PP +The function +.BR key_setsecret () +is used to set the key for the effective UID of the calling process. +.PP +The function +.BR key_secretkey_is_set () +can be used to determine whether a key has been +set for the effective UID of the calling process. +.SH RETURN VALUE +These functions return 1 on success and 0 on failure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR key_decryptsession (), +.BR key_encryptsession (), +.BR key_gendes (), +.BR key_setsecret (), +.BR key_secretkey_is_set () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH NOTES +Note that we talk about two types of encryption here. +One is asymmetric using a public and secret key. +The other is symmetric, the +64-bit DES. +.PP +These routines were part of the Linux/Doors-project, abandoned by now. +.SH SEE ALSO +.BR crypt (3) diff --git a/upstream/opensuse-leap-15-6/man3/keybound.3ncurses b/upstream/opensuse-leap-15-6/man3/keybound.3ncurses new file mode 100644 index 00000000..e9138566 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/keybound.3ncurses @@ -0,0 +1,58 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2008,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1999 +.\" +.\" $Id: keybound.3x,v 1.8 2010/12/04 18:49:20 tom Exp $ +.TH keybound 3NCURSES "" +.SH NAME +\fBkeybound\fP \- return definition of keycode +.SH SYNOPSIS +\fB#include \fP +.sp +\fBchar * keybound(int keycode, int count);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to determine the string which is defined +in the terminfo for specific keycodes. +.SH RETURN VALUE +The \fIkeycode\fP parameter must be greater than zero, else NULL is returned. +If it does not correspond to a defined key, then NULL is returned. +The \fIcount\fP parameter is used to allow the application to iterate +through multiple definitions, counting from zero. +When successful, +the function returns a string which must be freed by the caller. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3NCURSES), +\fBkeyok\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/keyok.3ncurses b/upstream/opensuse-leap-15-6/man3/keyok.3ncurses new file mode 100644 index 00000000..005b2f05 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/keyok.3ncurses @@ -0,0 +1,57 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1997 +.\" +.\" $Id: keyok.3x,v 1.12 2017/11/21 00:53:44 tom Exp $ +.TH keyok 3NCURSES "" +.SH NAME +\fBkeyok\fP \- enable or disable a keycode +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint keyok(int keycode, bool enable);\fP +.SH DESCRIPTION +This is an extension to the curses library. +It permits an application to disable specific keycodes, rather than +use the \fIkeypad\fP function to disable all keycodes. +Keys that have been disabled can be re-enabled. +.SH RETURN VALUE +The keycode must be greater than zero, else \fBERR\fP is returned. +If it does not correspond to a defined key, then \fBERR\fP is returned. +If the \fIenable\fP parameter is true, then the key must have been disabled, +and vice versa. +Otherwise, the function returns \fBOK\fP. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBdefine_key\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/killpg.3 b/upstream/opensuse-leap-15-6/man3/killpg.3 new file mode 100644 index 00000000..6651dd3a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/killpg.3 @@ -0,0 +1,113 @@ +.\" Copyright (c) 1980, 1991 Regents of the University of California. +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)killpg.2 6.5 (Berkeley) 3/10/91 +.\" +.\" Modified Fri Jul 23 21:55:01 1993 by Rik Faith +.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond +.\" Modified 2004-06-16 by Michael Kerrisk +.\" Added notes on CAP_KILL +.\" Modified 2004-06-21 by aeb +.\" +.TH killpg 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +killpg \- send signal to a process group +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int killpg(int " pgrp ", int " sig ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR killpg (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE +.fi +.SH DESCRIPTION +.BR killpg () +sends the signal +.I sig +to the process group +.IR pgrp . +See +.BR signal (7) +for a list of signals. +.PP +If +.I pgrp +is 0, +.BR killpg () +sends the signal to the calling process's process group. +(POSIX says: if +.I pgrp +is less than or equal to 1, the behavior is undefined.) +.PP +For the permissions required to send a signal to another process, see +.BR kill (2). +.SH RETURN VALUE +On success, zero is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I sig +is not a valid signal number. +.TP +.B EPERM +The process does not have permission to send the signal +to any of the target processes. +For the required permissions, see +.BR kill (2). +.TP +.B ESRCH +No process can be found in the process group specified by +.IR pgrp . +.TP +.B ESRCH +The process group was given as 0 but the sending process does not +have a process group. +.SH VERSIONS +There are various differences between the permission checking +in BSD-type systems and System\ V-type systems. +See the POSIX rationale for +.BR kill (3p). +A difference not mentioned by POSIX concerns the return +value +.BR EPERM : +BSD documents that no signal is sent and +.B EPERM +returned when the permission check failed for at least one target process, +while POSIX documents +.B EPERM +only when the permission check failed for all target processes. +.SS C library/kernel differences +On Linux, +.BR killpg () +is implemented as a library function that makes the call +.IR "kill(\-pgrp,\ sig)" . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.4BSD +(first appeared in 4BSD). +.SH SEE ALSO +.BR getpgrp (2), +.BR kill (2), +.BR signal (2), +.BR capabilities (7), +.BR credentials (7) diff --git a/upstream/opensuse-leap-15-6/man3/ldexp.3 b/upstream/opensuse-leap-15-6/man3/ldexp.3 new file mode 100644 index 00000000..57b5b132 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ldexp.3 @@ -0,0 +1,134 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH ldexp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2 +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double ldexp(double " x ", int " exp ); +.BI "float ldexpf(float " x ", int " exp ); +.BI "long double ldexpl(long double " x ", int " exp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ldexpf (), +.BR ldexpl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the result of multiplying the floating-point number +.I x +by 2 raised to the power +.IR exp . +.SH RETURN VALUE +On success, these functions return +.IR "x * (2\[ha]exp)" . +.PP +If +.I exp +is zero, then +.I x +is returned. +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is positive infinity (negative infinity), +positive infinity (negative infinity) is returned. +.PP +If the result underflows, +a range error occurs, +and zero is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with a sign the same as +.IR x . +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error, overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error, underflow +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ldexp (), +.BR ldexpf (), +.BR ldexpl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR frexp (3), +.BR modf (3), +.BR scalbln (3) diff --git a/upstream/opensuse-leap-15-6/man3/legacy.3ncurses b/upstream/opensuse-leap-15-6/man3/legacy.3ncurses new file mode 100644 index 00000000..555770aa --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/legacy.3ncurses @@ -0,0 +1,107 @@ +.\"*************************************************************************** +.\" Copyright (c) 2007-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_legacy.3x,v 1.8 2017/11/21 00:45:48 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH legacy 3NCURSES "" +.SH NAME +curs_legacy \- get \fBcurses\fP cursor and window coordinates, attributes +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint getattrs(WINDOW *win);\fP +.br +\fBint getbegx(WINDOW *win);\fP +.br +\fBint getbegy(WINDOW *win);\fP +.br +\fBint getcurx(WINDOW *win);\fP +.br +\fBint getcury(WINDOW *win);\fP +.br +\fBint getmaxx(WINDOW *win);\fP +.br +\fBint getmaxy(WINDOW *win);\fP +.br +\fBint getparx(WINDOW *win);\fP +.br +\fBint getpary(WINDOW *win);\fP +.br +.SH DESCRIPTION +These legacy functions are simpler to use than the X/Open Curses functions: +.bP +The \fBgetattrs\fP function returns the same attribute data as \fBwattr_get\fP. +.IP +However, \fBgetattrs\fP returns an integer (actually a \fBchtype\fP), +while \fBwattr_get\fP returns the current color pair in a separate parameter. +In the wide-character library configuration, +color pairs may not fit into a \fBchtype\fP, +so \fBwattr_get\fP is the only way to obtain the color information. +.IP +Because \fBgetattrs\fP returns the attributes in a single parameter, +it would not be possible for an application to distinguish that from +\fBERR\fP (a \fI-1\fP). +If the window parameter is null, \fBgetattrs\fP returns \fBA_NORMAL\fP (zero). +.bP +The \fBgetbegy\fP and \fBgetbegx\fP functions return the same +data as \fBgetbegyx\fP. +.bP +The \fBgetcury\fP and \fBgetcurx\fP functions return the same +data as \fBgetyx\fP. +.bP +The \fBgetmaxy\fP and \fBgetmaxx\fP functions return the same +data as \fBgetmaxyx\fP. +.bP +The \fBgetpary\fP and \fBgetparx\fP functions return the same +data as \fBgetparyx\fP. +.SH RETURN VALUE +Except as noted, +these functions return an integer, +or \fBERR\fP if the window parameter is null. +.SH NOTES +All of these interfaces are provided as macros and functions. +The macros are suppressed (and only the functions provided) +when \fBNCURSES_OPAQUE\fP is defined. +The standard forms such as \fBgetyx\fP must be implemented as macros, +and (in this implementation) are defined in terms of the functions +described here, +to avoid reliance on internal details of the WINDOW structure. +.SH PORTABILITY +These functions were supported on Version 7, BSD or System V implementations. +None of those implementations checked the window parameter. +.PP +The \fBgetattrs\fP function and macro are defined to return a (signed) integer +for compatibility with those implementations +although an unsigned type would have been more appropriate. +.SH SEE ALSO +\fBcurses\fP(3X), +\fBcurs_getyx\fP(3X), +\fBcurs_opaque\fP(3X) diff --git a/upstream/opensuse-leap-15-6/man3/legacy_coding.3ncurses b/upstream/opensuse-leap-15-6/man3/legacy_coding.3ncurses new file mode 100644 index 00000000..5b2e7fca --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/legacy_coding.3ncurses @@ -0,0 +1,74 @@ +.\"*************************************************************************** +.\" Copyright (c) 2005-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey +.\" +.\" $Id: legacy_coding.3x,v 1.6 2017/03/15 08:14:25 tom Exp $ +.TH legacy_coding 3NCURSES "" +.SH NAME +\fBuse_legacy_coding\fR \- override locale-encoding checks +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint use_legacy_coding(int level);\fP +.SH DESCRIPTION +The \fBuse_legacy_coding\fP function is an extension to the curses library. +It allows the caller to change the result of \fBunctrl\fP, +and suppress related checks within the library that would normally +cause nonprinting characters to be rendered in visible form. +This affects only 8-bit characters. +.PP +The \fIlevel\fP parameter controls the result: +.RS +.TP 5 +0 +the library functions normally, +rendering nonprinting characters as described in \fBunctrl\fP. +.TP +1 +the library ignores \fBisprintf\fP for codes in the range 160-255. +.TP +2 +the library ignores \fBisprintf\fP for codes in the range 128-255. +It also modifies the output of \fBunctrl\fP, showing codes in the +range 128-159 as is. +.RE +.SH RETURN VALUE +If the screen has not been initialized, +or the \fIlevel\fP parameter is out of range, +the function returns \fBERR\fP. +Otherwise, it returns the previous level: \fB0\fP, \fB1\fP or \fB2\fP. +.SH PORTABILITY +This routine is specific to ncurses. +It was not supported on Version 7, BSD or System V implementations. +It is recommended that any code depending on ncurses extensions +be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBunctrl\fR. +.SH AUTHOR +Thomas Dickey (to support lynx's font-switching feature). diff --git a/upstream/opensuse-leap-15-6/man3/lgamma.3 b/upstream/opensuse-leap-15-6/man3/lgamma.3 new file mode 100644 index 00000000..efaf28c7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lgamma.3 @@ -0,0 +1,202 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" based on glibc infopages +.\" +.TH lgamma 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \- +log gamma function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double lgamma(double " x ); +.BI "float lgammaf(float " x ); +.BI "long double lgammal(long double " x ); +.PP +.BI "double lgamma_r(double " x ", int *" signp ); +.BI "float lgammaf_r(float " x ", int *" signp ); +.BI "long double lgammal_r(long double " x ", int *" signp ); +.PP +.BI "extern int " signgam ; +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.nf +.BR lgamma (): + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR lgammaf (), +.BR lgammal (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR lgamma_r (), +.BR lgammaf_r (), +.BR lgammal_r (): +.nf + /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.IR signgam : +.nf + _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +For the definition of the Gamma function, see +.BR tgamma (3). +.PP +The +.BR lgamma (), +.BR lgammaf (), +and +.BR lgammal () +functions return the natural logarithm of +the absolute value of the Gamma function. +The sign of the Gamma function is returned in the +external integer +.I signgam +declared in +.IR . +It is 1 when the Gamma function is positive or zero, \-1 +when it is negative. +.PP +Since using a constant location +.I signgam +is not thread-safe, the functions +.BR lgamma_r (), +.BR lgammaf_r (), +and +.BR lgammal_r () +have been introduced; they return the sign via the argument +.IR signp . +.SH RETURN VALUE +On success, these functions return the natural logarithm of Gamma(x). +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is 1 or 2, +0 is returned. +.PP +If +.I x +is positive infinity or negative infinity, +positive infinity is returned. +.PP +If +.I x +is a nonpositive integer, +a pole error occurs, +and the functions return +.RB + HUGE_VAL , +.RB + HUGE_VALF , +or +.RB + HUGE_VALL , +respectively. +.PP +If the result overflows, +a range error occurs, +.\" e.g., lgamma(DBL_MAX) +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the correct mathematical sign. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Pole error: \fIx\fP is a nonpositive integer +.I errno +is set to +.B ERANGE +(but see BUGS). +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.\" glibc (as at 2.8) also supports an inexact +.\" exception for various cases. +.SH STANDARDS +.TP +.BR lgamma () +.TQ +.BR lgammaf () +.TQ +.BR lgammal () +C11, POSIX.1-2008. +.TP +.I signgam +POSIX.1-2008. +.TP +.BR lgamma_r () +.TQ +.BR lgammaf_r () +.TQ +.BR lgammal_r () +None. +.SH HISTORY +.TP +.BR lgamma () +.TQ +.BR lgammaf () +.TQ +.BR lgammal () +C99, POSIX.1-2001. +.TP +.I signgam +POSIX.1-2001. +.TP +.BR lgamma_r () +.TQ +.BR lgammaf_r () +.TQ +.BR lgammal_r () +None. +.SH BUGS +In glibc 2.9 and earlier, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6777 +when a pole error occurs, +.I errno +is set to +.BR EDOM ; +instead of the POSIX-mandated +.BR ERANGE . +Since glibc 2.10, glibc does the right thing. +.SH SEE ALSO +.BR tgamma (3) diff --git a/upstream/opensuse-leap-15-6/man3/libblkid.3 b/upstream/opensuse-leap-15-6/man3/libblkid.3 new file mode 100644 index 00000000..9d81fed5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/libblkid.3 @@ -0,0 +1,74 @@ +'\" t +.\" Title: libblkid +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "LIBBLKID" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +libblkid \- block device identification library +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBcc\fP \fIfile.c\fP \fB\-lblkid\fP +.SH "DESCRIPTION" +.sp +The \fBlibblkid\fP library is used to identify block devices (disks) as to their content (e.g., filesystem type) as well as extracting additional information such as filesystem labels/volume names, unique identifiers/serial numbers. A common use is to allow use of \fBLABEL=\fP and \fBUUID=\fP tags instead of hard\-coding specific block device names into configuration files. +.sp +The low\-level part of the library also allows the extraction of information about partitions and block device topology. +.sp +The high\-level part of the library keeps information about block devices in a cache file and is verified to still be valid before being returned to the user (if the user has read permission on the raw block device, otherwise not). The cache file also allows unprivileged users (normally anyone other than root, or those not in the "disk" group) to locate devices by label/id. The standard location of the cache file can be overridden by the environment variable \fBBLKID_FILE\fP. +.sp +In situations where one is getting information about a single known device, it does not impact performance whether the cache is used or not (unless you are not able to read the block device directly). +.sp +The high\-level part of the library supports two methods to evaluate \fBLABEL/UUID\fP. It reads information directly from a block device or read information from /dev/disk/by\-* udev symlinks. The udev is preferred method by default. +.sp +If you are dealing with multiple devices, use of the cache is highly recommended (even if empty) as devices will be scanned at most one time and the on\-disk cache will be updated if possible. +.sp +In some cases (modular kernels), block devices are not even visible until after they are accessed the first time, so it is critical that there is some way to locate these devices without enumerating only visible devices, so the use of the cache file is \fBrequired\fP in this situation. +.SH "CONFIGURATION FILE" +.sp +The standard location of the \fI/etc/blkid.conf\fP config file can be overridden by the environment variable \fBBLKID_CONF\fP. For more details about the config file see \fBblkid\fP(8) man page. +.SH "AUTHORS" +.sp +\fBlibblkid\fP was written by Andreas Dilger for the ext2 filesystem utilities, with input from Ted Ts\(cqo. The library was subsequently heavily modified by Ted Ts\(cqo. +.sp +The low\-level probing code was rewritten by Karel Zak. +.SH "COPYING" +.sp +\fBlibblkid\fP is available under the terms of the GNU Library General Public License (LGPL), version 2 (or at your discretion any later version). +.SH "SEE ALSO" +.sp +\fBblkid\fP(8), +\fBfindfs\fP(8) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibblkid\fP library is part of the util\-linux package since version 2.15. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/lio_listio.3 b/upstream/opensuse-leap-15-6/man3/lio_listio.3 new file mode 100644 index 00000000..e99d959a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lio_listio.3 @@ -0,0 +1,227 @@ +'\" t +.\" Copyright (C) 2010, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH lio_listio 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lio_listio \- initiate a list of I/O requests +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int lio_listio(int " mode , +.BI " struct aiocb *restrict const " aiocb_list [restrict], +.BI " int " nitems ", struct sigevent *restrict " sevp ); +.fi +.SH DESCRIPTION +The +.BR lio_listio () +function initiates the list of I/O operations described by the array +.IR aiocb_list . +.PP +The +.I mode +operation has one of the following values: +.TP +.B LIO_WAIT +The call blocks until all operations are complete. +The +.I sevp +argument is ignored. +.TP +.B LIO_NOWAIT +The I/O operations are queued for processing and the call returns immediately. +When all of the I/O operations complete, asynchronous notification occurs, +as specified by the +.I sevp +argument; see +.BR sigevent (7) +for details. +If +.I sevp +is NULL, no asynchronous notification occurs. +.PP +The +.I aiocb_list +argument is an array of pointers to +.I aiocb +structures that describe I/O operations. +These operations are executed in an unspecified order. +The +.I nitems +argument specifies the size of the array +.IR aiocb_list . +Null pointers in +.I aiocb_list +are ignored. +.PP +In each control block in +.IR aiocb_list , +the +.I aio_lio_opcode +field specifies the I/O operation to be initiated, as follows: +.TP +.B LIO_READ +Initiate a read operation. +The operation is queued as for a call to +.BR aio_read (3) +specifying this control block. +.TP +.B LIO_WRITE +Initiate a write operation. +The operation is queued as for a call to +.BR aio_write (3) +specifying this control block. +.TP +.B LIO_NOP +Ignore this control block. +.PP +The remaining fields in each control block have the same meanings as for +.BR aio_read (3) +and +.BR aio_write (3). +The +.I aio_sigevent +fields of each control block can be used to specify notifications +for the individual I/O operations (see +.BR sigevent (7)). +.SH RETURN VALUE +If +.I mode +is +.BR LIO_NOWAIT , +.BR lio_listio () +returns 0 if all I/O operations are successfully queued. +Otherwise, \-1 is returned, and +.I errno +is set to indicate the error. +.PP +If +.I mode +is +.BR LIO_WAIT , +.BR lio_listio () +returns 0 when all of the I/O operations have completed successfully. +Otherwise, \-1 is returned, and +.I errno +is set to indicate the error. +.PP +The return status from +.BR lio_listio () +provides information only about the call itself, +not about the individual I/O operations. +One or more of the I/O operations may fail, +but this does not prevent other operations completing. +The status of individual I/O operations in +.I aiocb_list +can be determined using +.BR aio_error (3). +When an operation has completed, +its return status can be obtained using +.BR aio_return (3). +Individual I/O operations can fail for the reasons described in +.BR aio_read (3) +and +.BR aio_write (3). +.SH ERRORS +The +.BR lio_listio () +function may fail for the following reasons: +.TP +.B EAGAIN +Out of resources. +.TP +.B EAGAIN +.\" Doesn't happen in glibc(?) +The number of I/O operations specified by +.I nitems +would cause the limit +.B AIO_MAX +to be exceeded. +.TP +.B EINTR +.I mode +was +.B LIO_WAIT +and a signal +was caught before all I/O operations completed; see +.BR signal (7). +(This may even be one of the signals used for +asynchronous I/O completion notification.) +.TP +.B EINVAL +.I mode +is invalid, or +.\" Doesn't happen in glibc(?) +.I nitems +exceeds the limit +.BR AIO_LISTIO_MAX . +.TP +.B EIO +One of more of the operations specified by +.I aiocb_list +failed. +.\" e.g., ioa_reqprio or aio_lio_opcode was invalid +The application can check the status of each operation using +.BR aio_return (3). +.PP +If +.BR lio_listio () +fails with the error +.BR EAGAIN , +.BR EINTR , +or +.BR EIO , +then some of the operations in +.I aiocb_list +may have been initiated. +If +.BR lio_listio () +fails for any other reason, +then none of the I/O operations has been initiated. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lio_listio () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +It is a good idea to zero out the control blocks before use. +The control blocks must not be changed while the I/O operations +are in progress. +The buffer areas being read into or written from +.\" or the control block of the operation +must not be accessed during the operations or undefined results may occur. +The memory areas involved must remain valid. +.PP +Simultaneous I/O operations specifying the same +.I aiocb +structure produce undefined results. +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR aio (7) diff --git a/upstream/opensuse-leap-15-6/man3/list.3 b/upstream/opensuse-leap-15-6/man3/list.3 new file mode 100644 index 00000000..a1006eb7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/list.3 @@ -0,0 +1,308 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" +.TH LIST 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +LIST_EMPTY, +LIST_ENTRY, +LIST_FIRST, +LIST_FOREACH, +.\"LIST_FOREACH_FROM, +.\"LIST_FOREACH_SAFE, +.\"LIST_FOREACH_FROM_SAFE, +LIST_HEAD, +LIST_HEAD_INITIALIZER, +LIST_INIT, +LIST_INSERT_AFTER, +LIST_INSERT_BEFORE, +LIST_INSERT_HEAD, +LIST_NEXT, +.\"LIST_PREV, +LIST_REMOVE +.\"LIST_SWAP +\- implementation of a doubly linked list +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B LIST_ENTRY(TYPE); +.PP +.B LIST_HEAD(HEADNAME, TYPE); +.BI "LIST_HEAD LIST_HEAD_INITIALIZER(LIST_HEAD " head ); +.BI "void LIST_INIT(LIST_HEAD *" head ); +.PP +.BI "int LIST_EMPTY(LIST_HEAD *" head ); +.PP +.BI "void LIST_INSERT_HEAD(LIST_HEAD *" head , +.BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); +.BI "void LIST_INSERT_BEFORE(struct TYPE *" listelm , +.BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); +.BI "void LIST_INSERT_AFTER(struct TYPE *" listelm , +.BI " struct TYPE *" elm ", LIST_ENTRY " NAME ); +.PP +.BI "struct TYPE *LIST_FIRST(LIST_HEAD *" head ); +.\" .BI "struct TYPE *LIST_PREV(struct TYPE *" elm ", LIST_HEAD *" head , +.\" .BI " struct TYPE, LIST_ENTRY " NAME ); +.BI "struct TYPE *LIST_NEXT(struct TYPE *" elm ", LIST_ENTRY " NAME ); +.PP +.BI "LIST_FOREACH(struct TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ); +.\" .BI "LIST_FOREACH_FROM(struct TYPE *" var ", LIST_HEAD *" head ", LIST_ENTRY " NAME ); +.\" .PP +.\" .BI "LIST_FOREACH_SAFE(struct TYPE *" var ", LIST_HEAD *" head , +.\" .BI " LIST_ENTRY " NAME ", struct TYPE *" temp_var ); +.\" .BI "LIST_FOREACH_FROM_SAFE(struct TYPE *" var ", LIST_HEAD *" head , +.\" .BI " LIST_ENTRY " NAME ", struct TYPE *" temp_var ); +.PP +.BI "void LIST_REMOVE(struct TYPE *" elm ", LIST_ENTRY " NAME ); +.\" .PP +.\" .BI "void LIST_SWAP(LIST_HEAD *" head1 ", LIST_HEAD *" head2 , +.\" .BI " struct TYPE, LIST_ENTRY " NAME ); +.fi +.SH DESCRIPTION +These macros define and operate on doubly linked lists. +.PP +In the macro definitions, +.I TYPE +is the name of a user-defined structure, +that must contain a field of type +.IR LIST_ENTRY , +named +.IR NAME . +The argument +.I HEADNAME +is the name of a user-defined structure +that must be declared using the macro +.BR LIST_HEAD (). +.SS Creation +A list is headed by a structure defined by the +.BR LIST_HEAD () +macro. +This structure contains a single pointer to the first element on the list. +The elements are doubly linked +so that an arbitrary element can be removed without traversing the list. +New elements can be added to the list +after an existing element, +before an existing element, +or at the head of the list. +A +.I LIST_HEAD +structure is declared as follows: +.PP +.in +4 +.EX +LIST_HEAD(HEADNAME, TYPE) head; +.EE +.in +.PP +where +.I struct HEADNAME +is the structure to be defined, and +.I struct TYPE +is the type of the elements to be linked into the list. +A pointer to the head of the list can later be declared as: +.PP +.in +4 +.EX +struct HEADNAME *headp; +.EE +.in +.PP +(The names +.I head +and +.I headp +are user selectable.) +.PP +.BR LIST_ENTRY () +declares a structure that connects the elements in the list. +.PP +.BR LIST_HEAD_INITIALIZER () +evaluates to an initializer for the list +.IR head . +.PP +.BR LIST_INIT () +initializes the list referenced by +.IR head . +.PP +.BR LIST_EMPTY () +evaluates to true if there are no elements in the list. +.SS Insertion +.BR LIST_INSERT_HEAD () +inserts the new element +.I elm +at the head of the list. +.PP +.BR LIST_INSERT_BEFORE () +inserts the new element +.I elm +before the element +.IR listelm . +.PP +.BR LIST_INSERT_AFTER () +inserts the new element +.I elm +after the element +.IR listelm . +.SS Traversal +.BR LIST_FIRST () +returns the first element in the list, or NULL if the list is empty. +.\" .PP +.\" .BR LIST_PREV () +.\" returns the previous element in the list, or NULL if this is the first. +.\" List +.\" .I head +.\" must contain element +.\" .IR elm . +.PP +.BR LIST_NEXT () +returns the next element in the list, or NULL if this is the last. +.PP +.BR LIST_FOREACH () +traverses the list referenced by +.I head +in the forward direction, +assigning each element in turn to +.IR var . +.\" .PP +.\" .BR LIST_FOREACH_FROM () +.\" behaves identically to +.\" .BR LIST_FOREACH () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found LIST element and begins the loop at +.\" .I var +.\" instead of the first element in the LIST referenced by +.\" .IR head . +.\" .PP +.\" .BR LIST_FOREACH_SAFE () +.\" traverses the list referenced by +.\" .I head +.\" in the forward direction, assigning each element in turn to +.\" .IR var . +.\" However, unlike +.\" .BR LIST_FOREACH () +.\" here it is permitted to both remove +.\" .I var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .PP +.\" .BR LIST_FOREACH_FROM_SAFE () +.\" behaves identically to +.\" .BR LIST_FOREACH_SAFE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found LIST element and begins the loop at +.\" .I var +.\" instead of the first element in the LIST referenced by +.\" .IR head . +.SS Removal +.BR LIST_REMOVE () +removes the element +.I elm +from the list. +.\" .SS Other features +.\" .BR LIST_SWAP () +.\" swaps the contents of +.\" .I head1 +.\" and +.\" .IR head2 . +.SH RETURN VALUE +.BR LIST_EMPTY () +returns nonzero if the list is empty, +and zero if the list contains at least one entry. +.PP +.BR LIST_FIRST (), +and +.BR LIST_NEXT () +return a pointer to the first or next +.I TYPE +structure, respectively. +.PP +.BR LIST_HEAD_INITIALIZER () +returns an initializer that can be assigned to the list +.IR head . +.SH STANDARDS +BSD. +.SH HISTORY +4.4BSD. +.SH BUGS +.BR LIST_FOREACH () +doesn't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +.BR LIST_FOREACH_SAFE (), +which is present on the BSDs but is not present in glibc, +fixes this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. +.SH EXAMPLES +.\" SRC BEGIN (list.c) +.EX +#include +#include +#include +#include + +struct entry { + int data; + LIST_ENTRY(entry) entries; /* List */ +}; + +LIST_HEAD(listhead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct listhead head; /* List head */ + int i; + + LIST_INIT(&head); /* Initialize the list */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head */ + LIST_INSERT_HEAD(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after */ + LIST_INSERT_AFTER(n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); /* Insert before */ + LIST_INSERT_BEFORE(n2, n3, entries); + + i = 0; /* Forward traversal */ + LIST_FOREACH(np, &head, entries) + np\->data = i++; + + LIST_REMOVE(n2, entries); /* Deletion */ + free(n2); + /* Forward traversal */ + LIST_FOREACH(np, &head, entries) + printf("%i\en", np\->data); + /* List deletion */ + n1 = LIST_FIRST(&head); + while (n1 != NULL) { + n2 = LIST_NEXT(n1, entries); + free(n1); + n1 = n2; + } + LIST_INIT(&head); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR insque (3), +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/localeconv.3 b/upstream/opensuse-leap-15-6/man3/localeconv.3 new file mode 100644 index 00000000..86562c9d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/localeconv.3 @@ -0,0 +1,84 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:01:20 1993 by Rik Faith (faith@cs.unc.edu) +.TH localeconv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +localeconv \- get numeric formatting information +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct lconv *localeconv(void); +.fi +.SH DESCRIPTION +The +.BR localeconv () +function returns a pointer to a +.I struct lconv +for the current locale. +This structure is shown in +.BR locale (7), +and contains all values associated with the locale categories +.B LC_NUMERIC +and +.BR LC_MONETARY . +Programs may also use the functions +.BR printf (3) +and +.BR strfmon (3), +which behave according to the actual locale in use. +.SH RETURN VALUE +The +.BR localeconv () +function returns a pointer to a filled in +.IR "struct lconv" . +This structure may be (in glibc, +.IR is ) +statically allocated, and may be overwritten by subsequent calls. +According to POSIX, +the caller should not modify the contents of this structure. +The +.BR localeconv () +function always succeeds. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR localeconv () +T} Thread safety T{ +MT-Unsafe race:localeconv locale +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11. +.SH HISTORY +C89. +.SH BUGS +The +.BR printf (3) +family of functions may or may not honor the current locale. +.SH SEE ALSO +.BR locale (1), +.BR localedef (1), +.BR isalpha (3), +.BR nl_langinfo (3), +.BR setlocale (3), +.BR strcoll (3), +.BR strftime (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/lockf.3 b/upstream/opensuse-leap-15-6/man3/lockf.3 new file mode 100644 index 00000000..7ef60243 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lockf.3 @@ -0,0 +1,181 @@ +'\" t +.\" Copyright 1997 Nicolás Lichtmaier +.\" Created Thu Aug 7 00:44:00 ART 1997 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Added section stuff, aeb, 2002-04-22. +.\" Corrected include file, drepper, 2003-06-15. +.\" +.TH lockf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lockf \- apply, test or remove a POSIX lock on an open file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int lockf(int " fd ", int " cmd ", off_t " len ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR lockf (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +Apply, test, or remove a POSIX lock on a section of an open file. +The file is specified by +.IR fd , +a file descriptor open for writing, the action by +.IR cmd , +and the section consists of byte positions +.IR pos .. pos + len \-1 +if +.I len +is positive, and +.IR pos \- len .. pos \-1 +if +.I len +is negative, where +.I pos +is the current file position, and if +.I len +is zero, the section extends from the current file position to +infinity, encompassing the present and future end-of-file positions. +In all cases, the section may extend past current end-of-file. +.PP +On Linux, +.BR lockf () +is just an interface on top of +.BR fcntl (2) +locking. +Many other systems implement +.BR lockf () +in this way, but note that POSIX.1 leaves the relationship between +.BR lockf () +and +.BR fcntl (2) +locks unspecified. +A portable application should probably avoid mixing calls +to these interfaces. +.PP +Valid operations are given below: +.TP +.B F_LOCK +Set an exclusive lock on the specified section of the file. +If (part of) this section is already locked, the call +blocks until the previous lock is released. +If this section overlaps an earlier locked section, +both are merged. +File locks are released as soon as the process holding the locks +closes some file descriptor for the file. +A child process does not inherit these locks. +.TP +.B F_TLOCK +Same as +.B F_LOCK +but the call never blocks and returns an error instead if the file is +already locked. +.TP +.B F_ULOCK +Unlock the indicated section of the file. +This may cause a locked section to be split into two locked sections. +.TP +.B F_TEST +Test the lock: return 0 if the specified section +is unlocked or locked by this process; return \-1, set +.I errno +to +.B EAGAIN +.RB ( EACCES +on some other systems), +if another process holds a lock. +.SH RETURN VALUE +On success, zero is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.BR EACCES " or " EAGAIN +The file is locked and +.B F_TLOCK +or +.B F_TEST +was specified, or the operation is prohibited because the file has +been memory-mapped by another process. +.TP +.B EBADF +.I fd +is not an open file descriptor; or +.I cmd +is +.B F_LOCK +or +.B F_TLOCK +and +.I fd +is not a writable file descriptor. +.TP +.B EDEADLK +The command was +.B F_LOCK +and this lock operation would cause a deadlock. +.TP +.B EINTR +While waiting to acquire a lock, the call was interrupted by +delivery of a signal caught by a handler; see +.BR signal (7). +.TP +.B EINVAL +An invalid operation was specified in +.IR cmd . +.TP +.B ENOLCK +Too many segment locks open, lock table is full. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lockf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4. +.SH SEE ALSO +.BR fcntl (2), +.BR flock (2) +.PP +.I locks.txt +and +.I mandatory\-locking.txt +in the Linux kernel source directory +.I Documentation/filesystems +(on older kernels, these files are directly under the +.I Documentation +directory, and +.I mandatory\-locking.txt +is called +.IR mandatory.txt ) diff --git a/upstream/opensuse-leap-15-6/man3/log.3 b/upstream/opensuse-leap-15-6/man3/log.3 new file mode 100644 index 00000000..d5569d0a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/log.3 @@ -0,0 +1,143 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH log 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +log, logf, logl \- natural logarithmic function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double log(double " x ); +.BI "float logf(float " x ); +.BI "long double logl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR logf (), +.BR logl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the natural logarithm of +.IR x . +.SH RETURN VALUE +On success, these functions return the natural logarithm of +.IR x . +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is 1, the result is +0. +.PP +If +.I x +is positive infinity, +positive infinity is returned. +.PP +If +.I x +is zero, +then a pole error occurs, and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +.PP +If +.I x +is negative (including negative infinity), then +a domain error occurs, and a NaN (not a number) is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is negative +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Pole error: \fIx\fP is zero +.I errno +is set to +.BR ERANGE . +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR log (), +.BR logf (), +.BR logl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH BUGS +In glibc 2.5 and earlier, +taking the +.BR log () +of a NaN produces a bogus invalid floating-point +.RB ( FE_INVALID ) +exception. +.SH SEE ALSO +.BR cbrt (3), +.BR clog (3), +.BR log10 (3), +.BR log1p (3), +.BR log2 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/log10.3 b/upstream/opensuse-leap-15-6/man3/log10.3 new file mode 100644 index 00000000..9cc190f0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/log10.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH log10 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +log10, log10f, log10l \- base-10 logarithmic function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double log10(double " x ); +.BI "float log10f(float " x ); +.BI "long double log10l(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR log10f (), +.BR log10l (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the base 10 logarithm of +.IR x . +.SH RETURN VALUE +On success, these functions return the base 10 logarithm of +.IR x . +.PP +For special cases, including where +.I x +is 0, 1, negative, infinity, or NaN, see +.BR log (3). +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +For a discussion of the errors that can occur for these functions, see +.BR log (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR log10 (), +.BR log10f (), +.BR log10l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR cbrt (3), +.BR clog10 (3), +.BR exp10 (3), +.BR log (3), +.BR log2 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/log1p.3 b/upstream/opensuse-leap-15-6/man3/log1p.3 new file mode 100644 index 00000000..207f96a0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/log1p.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright 1995 Jim Van Zandt +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.TH log1p 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +log1p, log1pf, log1pl \- logarithm of 1 plus argument +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double log1p(double " x ); +.BI "float log1pf(float " x ); +.BI "long double log1pl(long double " x ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.nf +.BR log1p (): + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR log1pf (), +.BR log1pl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return a value equivalent to +.PP +.nf + log (1 + \fIx\fP) +.fi +.PP +The result is computed in a way +that is accurate even if the value of +.I x +is near zero. +.SH RETURN VALUE +On success, these functions return the natural logarithm of +.IR "(1\ +\ x)" . +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is positive infinity, positive infinity is returned. +.PP +If +.I x +is \-1, a pole error occurs, +and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +.PP +If +.I x +is less than \-1 (including negative infinity), +a domain error occurs, +and a NaN (not a number) is returned. +.\" POSIX.1 specifies a possible range error if x is subnormal +.\" glibc 2.8 doesn't do this +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is less than \-1 +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Pole error: \fIx\fP is \-1 +.I errno +is set to +.B ERANGE +(but see BUGS). +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR log1p (), +.BR log1pf (), +.BR log1pl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.\" BSD +.SH BUGS +Before glibc 2.22, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792 +.I errno +to +.B EDOM +when a domain error occurred. +.PP +Before glibc 2.22, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6792 +.I errno +to +.B ERANGE +when a range error occurred. +.SH SEE ALSO +.BR exp (3), +.BR expm1 (3), +.BR log (3) diff --git a/upstream/opensuse-leap-15-6/man3/log2.3 b/upstream/opensuse-leap-15-6/man3/log2.3 new file mode 100644 index 00000000..c27cbeb0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/log2.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" +.TH log2 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +log2, log2f, log2l \- base-2 logarithmic function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double log2(double " x ); +.BI "float log2f(float " x ); +.BI "long double log2l(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR log2 (), +.BR log2f (), +.BR log2l (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return the base 2 logarithm of +.IR x . +.SH RETURN VALUE +On success, these functions return the base 2 logarithm of +.IR x . +.PP +For special cases, including where +.I x +is 0, 1, negative, infinity, or NaN, see +.BR log (3). +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +For a discussion of the errors that can occur for these functions, see +.BR log (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR log2 (), +.BR log2f (), +.BR log2l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD. +.SH SEE ALSO +.BR cbrt (3), +.BR clog2 (3), +.BR log (3), +.BR log10 (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/logb.3 b/upstream/opensuse-leap-15-6/man3/logb.3 new file mode 100644 index 00000000..feab19ac --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/logb.3 @@ -0,0 +1,144 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Inspired by a page by Walter Harms created 2002-08-10 +.\" +.TH logb 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +logb, logbf, logbl \- get exponent of a floating-point value +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double logb(double " x ); +.BI "float logbf(float " x ); +.BI "long double logbl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR logb (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR logbf (), +.BR logbl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions extract the exponent from the +internal floating-point representation of +.I x +and return it as a floating-point value. +The integer constant +.BR FLT_RADIX , +defined in +.IR , +indicates the radix used for the system's floating-point representation. +If +.B FLT_RADIX +is 2, +.BI logb( x ) +is equal to +.BI floor(log2( x ))\fR, +except that it is probably faster. +.PP +If +.I x +is subnormal, +.BR logb () +returns the exponent +.I x +would have if it were normalized. +.SH RETURN VALUE +On success, these functions return the exponent of +.IR x . +.PP +If +.I x +is a NaN, +a NaN is returned. +.PP +If +.I x +is zero, then a pole error occurs, and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +.PP +If +.I x +is negative infinity or positive infinity, then +positive infinity is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Pole error: \fIx\fP is 0 +.\" .I errno +.\" is set to +.\" .BR ERANGE . +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.PP +These functions do not set +.IR errno . +.\" FIXME . Is it intentional that these functions do not set errno? +.\" log(), log2(), log10() do set errno +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6793 +.\" +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR logb (), +.BR logbf (), +.BR logbl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.TP +.BR logb () +4.3BSD +(see IEEE.3 in the 4.3BSD manual). +.SH SEE ALSO +.BR ilogb (3), +.BR log (3) diff --git a/upstream/opensuse-leap-15-6/man3/login.3 b/upstream/opensuse-leap-15-6/man3/login.3 new file mode 100644 index 00000000..949097e4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/login.3 @@ -0,0 +1,151 @@ +'\" t +.\" Derived from text written by Martin Schulze (or taken from glibc.info) +.\" and text written by Paul Thompson - both copyright 2002. +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH login 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +login, logout \- write utmp and wtmp entries +.SH LIBRARY +System utilities library +.RI ( libutil ", " \-lutil ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void login(const struct utmp *" ut ); +.BI "int logout(const char *" ut_line ); +.fi +.SH DESCRIPTION +The utmp file records who is currently using the system. +The wtmp file records all logins and logouts. +See +.BR utmp (5). +.PP +The function +.BR login () +takes the supplied +.IR "struct utmp" , +.IR ut , +and writes it to both the utmp and the wtmp file. +.PP +The function +.BR logout () +clears the entry in the utmp file again. +.SS GNU details +More precisely, +.BR login () +takes the argument +.I ut +struct, fills the field +.I ut\->ut_type +(if there is such a field) with the value +.BR USER_PROCESS , +and fills the field +.I ut\->ut_pid +(if there is such a field) with the process ID of the calling process. +Then it tries to fill the field +.IR ut\->ut_line . +It takes the first of +.IR stdin , +.IR stdout , +.I stderr +that is a terminal, and +stores the corresponding pathname minus a possible leading +.I /dev/ +into this field, and then writes the struct to the utmp file. +On the other hand, +if no terminal name was found, this field is filled with "???" +and the struct is not written to the utmp file. +After this, the struct is written to the wtmp file. +.PP +The +.BR logout () +function searches the utmp file for an entry matching the +.I ut_line +argument. +If a record is found, it is updated by zeroing out the +.I ut_name +and +.I ut_host +fields, updating the +.I ut_tv +timestamp field and setting +.I ut_type +(if there is such a field) to +.BR DEAD_PROCESS . +.SH RETURN VALUE +The +.BR logout () +function returns 1 if the entry was successfully written to the +database, or 0 if an error occurred. +.SH FILES +.TP +.I /var/run/utmp +user accounting database, configured through +.B _PATH_UTMP +in +.I +.TP +.I /var/log/wtmp +user accounting log file, configured through +.B _PATH_WTMP +in +.I +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR login (), +.BR logout () +T} Thread safety T{ +MT-Unsafe race:utent +sig:ALRM timer +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I utent +in +.I race:utent +signifies that if any of the functions +.BR setutent (3), +.BR getutent (3), +or +.BR endutent (3) +are used in parallel in different threads of a program, +then data races could occur. +.BR login () +and +.BR logout () +calls those functions, +so we use race:utent to remind users. +.SH VERSIONS +The member +.I ut_user +of +.I struct utmp +is called +.I ut_name +in BSD. +Therefore, +.I ut_name +is defined as an alias for +.I ut_user +in +.IR . +.SH STANDARDS +BSD. +.SH SEE ALSO +.BR getutent (3), +.BR utmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/lrint.3 b/upstream/opensuse-leap-15-6/man3/lrint.3 new file mode 100644 index 00000000..7d72b48c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lrint.3 @@ -0,0 +1,113 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH lrint 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lrint, lrintf, lrintl, llrint, llrintf, llrintl \- round to nearest integer +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long lrint(double " x ); +.BI "long lrintf(float " x ); +.BI "long lrintl(long double " x ); +.PP +.BI "long long llrint(double " x ); +.BI "long long llrintf(float " x ); +.BI "long long llrintl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions round their argument to the nearest integer value, +using the current rounding direction (see +.BR fesetround (3)). +.PP +Note that unlike the +.BR rint (3) +family of functions, +the return type of these functions differs from +that of their arguments. +.SH RETURN VALUE +These functions return the rounded integer value. +.PP +If +.I x +is a NaN or an infinity, +or the rounded value is too large to be stored in a +.I long +.RI ( "long long" +in the case of the +.B ll* +functions), +then a domain error occurs, and the return value is unspecified. +.\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1) +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large +.\" .I errno +.\" is set to +.\" .BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.PP +These functions do not set +.IR errno . +.\" FIXME . Is it intentional that these functions do not set errno? +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6798 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lrint (), +.BR lrintf (), +.BR lrintl (), +.BR llrint (), +.BR llrintf (), +.BR llrintl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lround (3), +.BR nearbyint (3), +.BR rint (3), +.BR round (3) diff --git a/upstream/opensuse-leap-15-6/man3/lround.3 b/upstream/opensuse-leap-15-6/man3/lround.3 new file mode 100644 index 00000000..6413f148 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lround.3 @@ -0,0 +1,116 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH lround 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lround, lroundf, lroundl, llround, llroundf, llroundl \- round to +nearest integer +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long lround(double " x ); +.BI "long lroundf(float " x ); +.BI "long lroundl(long double " x ); +.PP +.BI "long long llround(double " x ); +.BI "long long llroundf(float " x ); +.BI "long long llroundl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions round their argument to the nearest integer value, +rounding halfway cases away from zero, +regardless of the current rounding direction (see +.BR fenv (3)). +.PP +Note that unlike the +.BR round (3) +and +.BR ceil (3), +functions, the return type of these functions differs from +that of their arguments. +.SH RETURN VALUE +These functions return the rounded integer value. +.PP +If +.I x +is a NaN or an infinity, +or the rounded value is too large to be stored in a +.I long +.RI ( "long long" +in the case of the +.B ll* +functions), +then a domain error occurs, and the return value is unspecified. +.\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1) +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large +.\" .I errno +.\" is set to +.\" .BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.PP +These functions do not set +.IR errno . +.\" FIXME . Is it intentional that these functions do not set errno? +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6797 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lround (), +.BR lroundf (), +.BR lroundl (), +.BR llround (), +.BR llroundf (), +.BR llroundl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lrint (3), +.BR nearbyint (3), +.BR rint (3), +.BR round (3) diff --git a/upstream/opensuse-leap-15-6/man3/lsearch.3 b/upstream/opensuse-leap-15-6/man3/lsearch.3 new file mode 100644 index 00000000..9d2fda10 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lsearch.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 1995 Jim Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Corrected prototype and include, aeb, 990927 +.TH lsearch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +lfind, lsearch \- linear search of an array +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *lfind(const void " key [. size "], \ +const void " base [. size " * ." nmemb ], +.BI " size_t *" nmemb ", size_t " size , +.BI " int(*" compar ")(const void [." size "], \ +const void [." size ])); +.BI "void *lsearch(const void " key [. size "], \ +void " base [. size " * ." nmemb ], +.BI " size_t *" nmemb ", size_t " size , +.BI " int(*" compar ")(const void [." size "], \ +const void [." size ])); +.fi +.SH DESCRIPTION +.BR lfind () +and +.BR lsearch () +perform a linear search for +.I key +in the array +.I base +which has +.I *nmemb +elements of +.I size +bytes each. +The comparison function referenced by +.I compar +is expected to have two arguments which point to the +.I key +object and to an array member, in that order, and which +returns zero if the +.I key +object matches the array member, and +nonzero otherwise. +.PP +If +.BR lsearch () +does not find a matching element, then the +.I key +object is inserted at the end of the table, and +.I *nmemb +is +incremented. +In particular, one should know that a matching element +exists, or that more room is available. +.SH RETURN VALUE +.BR lfind () +returns a pointer to a matching member of the array, or +NULL if no match is found. +.BR lsearch () +returns a pointer to +a matching member of the array, or to the newly added member if no +match is found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lfind (), +.BR lsearch () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +libc-4.6.27. +.SH BUGS +The naming is unfortunate. +.SH SEE ALSO +.BR bsearch (3), +.BR hsearch (3), +.BR tsearch (3) diff --git a/upstream/opensuse-leap-15-6/man3/lseek64.3 b/upstream/opensuse-leap-15-6/man3/lseek64.3 new file mode 100644 index 00000000..940a03f5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/lseek64.3 @@ -0,0 +1,209 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" and Copyright (c) 2020 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH lseek64 3 2022-12-15 "Linux man-pages 6.04" +.SH NAME +lseek64 \- reposition 64-bit read/write file offset +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _LARGEFILE64_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.B #include +.PP +.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence ); +.fi +.SH DESCRIPTION +The +.BR lseek () +family of functions reposition the offset of the open file associated +with the file descriptor +.I fd +to +.I offset +bytes relative to the start, current position, or end of the file, +when +.I whence +has the value +.BR SEEK_SET , +.BR SEEK_CUR , +or +.BR SEEK_END , +respectively. +.PP +For more details, return value, and errors, see +.BR lseek (2). +.PP +Four interfaces are available: +.BR lseek (), +.BR lseek64 (), +.BR llseek (), +and +.BR _llseek (). +.\" +.\" For some background details, see: +.\" https://lore.kernel.org/linux-man/CAKgNAkhNSWR3uYhYYaxx74fZfJ3JrpfAAPVrK0AFk_cAOUsbDg@mail.gmail.com/ +.\" +.SS lseek() +Prototype: +.PP +.in +4n +.EX +.BI "off_t lseek(int " fd ", off_t " offset ", int " whence ); +.EE +.in +.PP +The C library's +.BR lseek () +wrapper function uses the type +.IR off_t . +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 +in which case it is a 64-bit signed type. +.SS lseek64() +Prototype: +.PP +.in +4n +.EX +.BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence ); +.EE +.in +.PP +The +.BR lseek64 () +library function uses a 64-bit type even when +.I off_t +is a 32-bit type. +Its prototype (and the type +.IR off64_t ) +is available only when one compiles with +.PP +.in +4n +.EX +#define _LARGEFILE64_SOURCE +.EE +.in +.PP +The function +.BR lseek64 () +.\" in glibc 2.0.94, not in glibc 2.0.6 +is available since glibc 2.1. +.\" +.SS llseek() +Prototype: +.PP +.in +4n +.EX +.BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence ); +.EE +.in +.PP +The type +.I loff_t +is a 64-bit signed type. +The +.BR llseek () +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 +.BR e2fsck (8), +glibc 2.1.3 added the link-time warning +.PP +.in +4n +"the \`llseek\' function may be dangerous; use \`lseek64\' instead." +.in +.PP +This makes this function unusable if one desires a warning-free +compilation. +.PP +Since glibc 2.28, +.\" glibc commit 5c5c0dd747070db624c8e2c43691cec854f114ef +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 +.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo , +.BI " loff_t *" result ", int " whence ); +.EE +.in +.PP +For more details, see +.BR llseek (2). +.PP +64-bit systems don't need an +.BR _llseek () +system call. +Instead, they have an +.BR lseek (2) +system call that supports 64-bit file offsets. +.\" 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. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR lseek64 () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH NOTES +.BR lseek64 () +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 +.I off_t +type. +As noted above, this symbol is exposed by header files if the +.B _LARGEFILE64_SOURCE +feature test macro is defined. +ALternatively, on a 32-bit system, the symbol +.I lseek +is aliased to +.I lseek64 +if the macro +.B _FILE_OFFSET_BITS +is defined with the value 64. +.SH SEE ALSO +.BR llseek (2), +.BR lseek (2) diff --git a/upstream/opensuse-leap-15-6/man3/makecontext.3 b/upstream/opensuse-leap-15-6/man3/makecontext.3 new file mode 100644 index 00000000..2019358a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/makecontext.3 @@ -0,0 +1,233 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer (aeb@cwi.nl) +.\" and Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2006-08-02, mtk, Added example program +.\" +.TH makecontext 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +makecontext, swapcontext \- manipulate user context +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc \ +", ...);" +.BI "int swapcontext(ucontext_t *restrict " oucp , +.BI " const ucontext_t *restrict " ucp ); +.fi +.SH DESCRIPTION +In a System V-like environment, one has the type +.I ucontext_t +(defined in +.I +and described in +.BR getcontext (3)) +and the four functions +.BR getcontext (3), +.BR setcontext (3), +.BR makecontext (), +and +.BR swapcontext () +that allow user-level context switching +between multiple threads of control within a process. +.PP +The +.BR makecontext () +function modifies the context pointed to +by \fIucp\fP (which was obtained from a call to +.BR getcontext (3)). +Before invoking +.BR makecontext (), +the caller must allocate a new stack +for this context and assign its address to \fIucp\->uc_stack\fP, +and define a successor context and +assign its address to \fIucp\->uc_link\fP. +.PP +When this context is later activated (using +.BR setcontext (3) +or +.BR swapcontext ()) +the function \fIfunc\fP is called, +and passed the series of integer +.RI ( int ) +arguments that follow +.IR argc ; +the caller must specify the number of these arguments in +.IR argc . +When this function returns, the successor context is activated. +If the successor context pointer is NULL, the thread exits. +.PP +The +.BR swapcontext () +function saves the current context in +the structure pointed to by \fIoucp\fP, and then activates the +context pointed to by \fIucp\fP. +.SH RETURN VALUE +When successful, +.BR swapcontext () +does not return. +(But we may return later, in case \fIoucp\fP is +activated, in which case it looks like +.BR swapcontext () +returns 0.) +On error, +.BR swapcontext () +returns \-1 and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient stack space left. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR makecontext () +T} Thread safety T{ +MT-Safe race:ucp +T} +T{ +.BR swapcontext () +T} Thread safety T{ +MT-Safe race:oucp race:ucp +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +glibc 2.1. +SUSv2, POSIX.1-2001. +Removed in POSIX.1-2008, +citing portability issues, and +recommending that applications be rewritten to use POSIX threads instead. +.SH NOTES +The interpretation of \fIucp\->uc_stack\fP is just as in +.BR sigaltstack (2), +namely, this struct contains the start and length of a memory area +to be used as the stack, regardless of the direction of growth of +the stack. +Thus, it is not necessary for the user program to +worry about this direction. +.PP +On architectures where +.I int +and pointer types are the same size +(e.g., x86-32, where both types are 32 bits), +you may be able to get away with passing pointers as arguments to +.BR makecontext () +following +.IR argc . +However, doing this is not guaranteed to be portable, +is undefined according to the standards, +and won't work on architectures where pointers are larger than +.IR int s. +Nevertheless, starting with glibc 2.8, glibc makes some changes to +.BR makecontext (), +to permit this on some 64-bit architectures (e.g., x86-64). +.SH EXAMPLES +The example program below demonstrates the use of +.BR getcontext (3), +.BR makecontext (), +and +.BR swapcontext (). +Running the program produces the following output: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +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 Program source +\& +.\" SRC BEGIN (makecontext.c) +.EX +#include +#include +#include + +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("%s: started\en", __func__); + printf("%s: swapcontext(&uctx_func1, &uctx_func2)\en", __func__); + if (swapcontext(&uctx_func1, &uctx_func2) == \-1) + handle_error("swapcontext"); + printf("%s: returning\en", __func__); +} + +static void +func2(void) +{ + printf("%s: started\en", __func__); + printf("%s: swapcontext(&uctx_func2, &uctx_func1)\en", __func__); + if (swapcontext(&uctx_func2, &uctx_func1) == \-1) + handle_error("swapcontext"); + printf("%s: returning\en", __func__); +} + +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("%s: swapcontext(&uctx_main, &uctx_func2)\en", __func__); + if (swapcontext(&uctx_main, &uctx_func2) == \-1) + handle_error("swapcontext"); + + printf("%s: exiting\en", __func__); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR sigaction (2), +.BR sigaltstack (2), +.BR sigprocmask (2), +.BR getcontext (3), +.BR sigsetjmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/makedev.3 b/upstream/opensuse-leap-15-6/man3/makedev.3 new file mode 100644 index 00000000..08e67f0b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/makedev.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH makedev 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +makedev, major, minor \- manage a device number +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "dev_t makedev(unsigned int " maj ", unsigned int " min ); +.PP +.BI "unsigned int major(dev_t " dev ); +.BI "unsigned int minor(dev_t " dev ); +.fi +.SH DESCRIPTION +A device ID consists of two parts: +a major ID, identifying the class of the device, +and a minor ID, identifying a specific instance of a device in that class. +A device ID is represented using the type +.IR dev_t . +.PP +Given major and minor device IDs, +.BR makedev () +combines these to produce a device ID, returned as the function result. +This device ID can be given to +.BR mknod (2), +for example. +.PP +The +.BR major () +and +.BR minor () +functions perform the converse task: given a device ID, +they return, respectively, the major and minor components. +These macros can be useful to, for example, +decompose the device IDs in the structure returned by +.BR stat (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR makedev (), +.BR major (), +.BR minor () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The BSDs expose the definitions for these macros via +.IR . +.SH STANDARDS +None. +.SH HISTORY +BSD, HP-UX, Solaris, AIX, Irix. +.\" The header location is inconsistent: +.\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h. +.PP +These interfaces are defined as macros. +Since glibc 2.3.3, +they have been aliases for three GNU-specific functions: +.BR gnu_dev_makedev (), +.BR gnu_dev_major (), +and +.BR gnu_dev_minor (). +The latter names are exported, but the traditional names are more portable. +.PP +Depending on the version, +glibc also exposes definitions for these macros from +.IR +if suitable feature test macros are defined. +However, this behavior was deprecated in glibc 2.25, +.\" glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f +and since glibc 2.28, +.\" glibc commit e16deca62e16f645213dffd4ecd1153c37765f17 +.I +no longer provides these definitions. +.SH SEE ALSO +.BR mknod (2), +.BR stat (2) diff --git a/upstream/opensuse-leap-15-6/man3/mallinfo.3 b/upstream/opensuse-leap-15-6/man3/mallinfo.3 new file mode 100644 index 00000000..f3bf9219 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mallinfo.3 @@ -0,0 +1,338 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mallinfo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mallinfo, mallinfo2 \- obtain memory allocation information +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B struct mallinfo mallinfo(void); +.B struct mallinfo2 mallinfo2(void); +.fi +.SH DESCRIPTION +These functions return a copy of a structure containing information about +memory allocations performed by +.BR malloc (3) +and related functions. +The structure returned by each function contains the same fields. +However, the older function, +.BR mallinfo (), +is deprecated since the type used for the fields is too small (see BUGS). +.PP +Note that not all allocations are visible to these functions; +see BUGS and consider using +.BR malloc_info (3) +instead. +.PP +The +.I mallinfo2 +structure returned by +.BR mallinfo2 () +is defined as follows: +.PP +.in +4n +.EX +struct mallinfo2 { + size_t arena; /* Non\-mmapped space allocated (bytes) */ + size_t ordblks; /* Number of free chunks */ + size_t smblks; /* Number of free fastbin blocks */ + size_t hblks; /* Number of mmapped regions */ + size_t hblkhd; /* Space allocated in mmapped regions + (bytes) */ + size_t usmblks; /* See below */ + size_t fsmblks; /* Space in freed fastbin blocks (bytes) */ + size_t uordblks; /* Total allocated space (bytes) */ + size_t fordblks; /* Total free space (bytes) */ + size_t keepcost; /* Top\-most, releasable space (bytes) */ +}; +.EE +.in +.PP +The +.I mallinfo +structure returned by the deprecated +.BR mallinfo () +function is exactly the same, except that the fields are typed as +.IR int . +.PP +The structure fields contain the following information: +.TP 10 +.I arena +The total amount of memory allocated by means other than +.BR mmap (2) +(i.e., memory allocated on the heap). +This figure includes both in-use blocks and blocks on the free list. +.TP +.I ordblks +The number of ordinary (i.e., non-fastbin) free blocks. +.TP +.I smblks +.\" the glibc info page wrongly says this field is unused +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=26746 +The number of fastbin free blocks (see +.BR mallopt (3)). +.TP +.I hblks +The number of blocks currently allocated using +.BR mmap (2). +(See the discussion of +.B M_MMAP_THRESHOLD +in +.BR mallopt (3).) +.TP +.I hblkhd +The number of bytes in blocks currently allocated using +.BR mmap (2). +.TP +.I usmblks +This field is unused, and is always 0. +.\" It seems to have been zero since at least as far back as glibc 2.15 +Historically, it was the "highwater mark" for allocated space\[em]that is, +the maximum amount of space that was ever allocated (in bytes); +this field was maintained only in nonthreading environments. +.TP +.I fsmblks +.\" the glibc info page wrongly says this field is unused +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=26746 +The total number of bytes in fastbin free blocks. +.TP +.I uordblks +The total number of bytes used by in-use allocations. +.TP +.I fordblks +The total number of bytes in free blocks. +.TP +.I keepcost +The total amount of releasable free space at the top +of the heap. +This is the maximum number of bytes that could ideally +(i.e., ignoring page alignment restrictions, and so on) be released by +.BR malloc_trim (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR mallinfo (), +.BR mallinfo2 () +T} Thread safety T{ +MT-Unsafe init const:mallopt +T} +.TE +.hy +.ad +.sp 1 +.BR mallinfo ()/ +.BR mallinfo2 () +would access some global internal objects. +If modify them with non-atomically, +may get inconsistent results. +The identifier +.I mallopt +in +.I const:mallopt +mean that +.BR mallopt () +would modify the global internal objects with atomics, that make sure +.BR mallinfo ()/ +.BR mallinfo2 () +is safe enough, others modify with non-atomically maybe not. +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR mallinfo () +glibc 2.0. +SVID. +.TP +.BR mallinfo2 () +.\" commit e3960d1c57e57f33e0e846d615788f4ede73b945 +glibc 2.33. +.SH BUGS +.\" 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 +.B Information is returned for only the main memory allocation area. +Allocations in other arenas are excluded. +See +.BR malloc_stats (3) +and +.BR malloc_info (3) +for alternatives that include information about other arenas. +.PP +The fields of the +.I mallinfo +structure that is returned by the older +.BR mallinfo () +function are typed as +.IR int . +However, because some internal bookkeeping values may be of type +.IR long , +the reported values may wrap around zero and thus be inaccurate. +.SH EXAMPLES +The program below employs +.BR mallinfo2 () +to retrieve memory allocation statistics before and after +allocating and freeing some blocks of memory. +The statistics are displayed on standard output. +.PP +The first two command-line arguments specify the number and size of +blocks to be allocated with +.BR malloc (3). +.PP +The remaining three arguments specify which of the allocated blocks +should be freed with +.BR free (3). +These three arguments are optional, and specify (in order): +the step size to be used in the loop that frees blocks +(the default is 1, meaning free all blocks in the range); +the ordinal position of the first block to be freed +(default 0, meaning the first allocated block); +and a number one greater than the ordinal position +of the last block to be freed +(default is one greater than the maximum block number). +If these three arguments are omitted, +then the defaults cause all allocated blocks to be freed. +.PP +In the following example run of the program, +1000 allocations of 100 bytes are performed, +and then every second allocated block is freed: +.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 Program source +\& +.\" SRC BEGIN (mallinfo.c) +.EX +#include +#include +#include + +static void +display_mallinfo2(void) +{ + struct mallinfo2 mi; + + mi = mallinfo2(); + + printf("Total non\-mmapped bytes (arena): %zu\en", mi.arena); + printf("# of free chunks (ordblks): %zu\en", mi.ordblks); + printf("# of free fastbin blocks (smblks): %zu\en", mi.smblks); + printf("# of mapped regions (hblks): %zu\en", mi.hblks); + printf("Bytes in mapped regions (hblkhd): %zu\en", mi.hblkhd); + printf("Max. total allocated space (usmblks): %zu\en", mi.usmblks); + printf("Free bytes held in fastbins (fsmblks): %zu\en", mi.fsmblks); + printf("Total allocated space (uordblks): %zu\en", mi.uordblks); + printf("Total free space (fordblks): %zu\en", mi.fordblks); + printf("Topmost releasable block (keepcost): %zu\en", mi.keepcost); +} + +int +main(int argc, char *argv[]) +{ +#define MAX_ALLOCS 2000000 + char *alloc[MAX_ALLOCS]; + size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep; + + 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_mallinfo2(); + + for (size_t 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_mallinfo2(); + + for (size_t j = freeBegin; j < freeEnd; j += freeStep) + free(alloc[j]); + + printf("\en============== After freeing blocks ==============\en"); + display_mallinfo2(); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR mmap (2), +.BR malloc (3), +.BR malloc_info (3), +.BR malloc_stats (3), +.BR malloc_trim (3), +.BR mallopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc.3 b/upstream/opensuse-leap-15-6/man3/malloc.3 new file mode 100644 index 00000000..d9a03d1a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc.3 @@ -0,0 +1,459 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright i2007, 2012, 2018, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 19:00:59 1993 by Rik Faith (faith@cs.unc.edu) +.\" Clarification concerning realloc, iwj10@cus.cam.ac.uk (Ian Jackson), 950701 +.\" Documented MALLOC_CHECK_, Wolfram Gloger (wmglo@dent.med.uni-muenchen.de) +.\" 2007-09-15 mtk: added notes on malloc()'s use of sbrk() and mmap(). +.\" +.\" FIXME . Review http://austingroupbugs.net/view.php?id=374 +.\" to see what changes are required on this page. +.\" +.TH malloc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc, free, calloc, realloc, reallocarray \- allocate and free dynamic memory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *malloc(size_t " "size" ); +.BI "void free(void " "*ptr" ); +.BI "void *calloc(size_t " "nmemb" ", size_t " "size" ); +.BI "void *realloc(void " "*ptr" ", size_t " "size" ); +.BI "void *reallocarray(void " "*ptr" ", size_t " nmemb ", size_t " "size" ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR reallocarray (): +.nf + Since glibc 2.29: + _DEFAULT_SOURCE + glibc 2.28 and earlier: + _GNU_SOURCE +.fi +.SH DESCRIPTION +.SS malloc() +The +.BR malloc () +function allocates +.I size +bytes and returns a pointer to the allocated memory. +.IR "The memory is not initialized" . +If +.I size +is 0, then +.BR malloc () +returns a unique pointer value that can later be successfully passed to +.BR free (). +(See "Nonportable behavior" for portability issues.) +.SS free() +The +.BR free () +function frees the memory space pointed to by +.IR ptr , +which must have been returned by a previous call to +.BR malloc () +or related functions. +Otherwise, or if +.I ptr +has already been freed, undefined behavior occurs. +If +.I ptr +is NULL, no operation is performed. +.SS calloc() +The +.BR calloc () +function allocates memory for an array of +.I nmemb +elements of +.I size +bytes each and returns a pointer to the allocated memory. +The memory is set to zero. +If +.I nmemb +or +.I size +is 0, then +.BR calloc () +returns a unique pointer value that can later be successfully passed to +.BR free (). +.PP +If the multiplication of +.I nmemb +and +.I size +would result in integer overflow, then +.BR calloc () +returns an error. +By contrast, +an integer overflow would not be detected in the following call to +.BR malloc (), +with the result that an incorrectly sized block of memory would be allocated: +.PP +.in +4n +.EX +malloc(nmemb * size); +.EE +.in +.SS realloc() +The +.BR realloc () +function changes the size of the memory block pointed to by +.I ptr +to +.I size +bytes. +The contents of the memory +will be unchanged in the range from the start of the region +up to the minimum of the old and new sizes. +If the new size is larger than the old size, the added memory will +.I not +be initialized. +.PP +If +.I ptr +is NULL, then the call is equivalent to +.IR malloc(size) , +for all values of +.IR size . +.PP +If +.I size +is equal to zero, +and +.I ptr +is not NULL, then the call is equivalent to +.I free(ptr) +(but see "Nonportable behavior" for portability issues). +.PP +Unless +.I ptr +is NULL, it must have been returned by an earlier call to +.B malloc +or related functions. +If the area pointed to was moved, a +.I free(ptr) +is done. +.SS reallocarray() +The +.BR reallocarray () +function changes the size of (and possibly moves) +the memory block pointed to by +.I ptr +to be large enough for an array of +.I nmemb +elements, each of which is +.I size +bytes. +It is equivalent to the call +.PP +.in +4n +.EX +realloc(ptr, nmemb * size); +.EE +.in +.PP +However, unlike that +.BR realloc () +call, +.BR reallocarray () +fails safely in the case where the multiplication would overflow. +If such an overflow occurs, +.BR reallocarray () +returns an error. +.SH RETURN VALUE +The +.BR malloc (), +.BR calloc (), +.BR realloc (), +and +.BR reallocarray () +functions return a pointer to the allocated memory, +which is suitably aligned for any type that fits into +the requested size or less. +On error, these functions return NULL and set +.IR errno . +Attempting to allocate more than +.B PTRDIFF_MAX +bytes is considered an error, as an object that large +could cause later pointer subtraction to overflow. +.PP +The +.BR free () +function returns no value, and preserves +.IR errno . +.PP +The +.BR realloc () +and +.BR reallocarray () +functions return NULL if +.I ptr +is not NULL and the requested size is zero; +this is not considered an error. +(See "Nonportable behavior" for portability issues.) +Otherwise, the returned pointer may be the same as +.I ptr +if the allocation was not moved +(e.g., there was room to expand the allocation in-place), or different from +.I ptr +if the allocation was moved to a new address. +If these functions fail, +the original block is left untouched; it is not freed or moved. +.SH ERRORS +.BR calloc (), +.BR malloc (), +.BR realloc (), +and +.BR reallocarray () +can fail with the following error: +.TP +.B ENOMEM +Out of memory. +Possibly, the application hit the +.B RLIMIT_AS +or +.B RLIMIT_DATA +limit described in +.BR getrlimit (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc (), +.BR free (), +.BR calloc (), +.BR realloc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR malloc () +.TQ +.BR free () +.TQ +.BR calloc () +.TQ +.BR realloc () +C11, POSIX.1-2008. +.TP +.BR reallocarray () +None. +.SH HISTORY +.TP +.BR malloc () +.TQ +.BR free () +.TQ +.BR calloc () +.TQ +.BR realloc () +POSIX.1-2001, C89. +.TP +.BR reallocarray () +glibc 2.26. +OpenBSD 5.6, FreeBSD 11.0. +.PP +.BR malloc () +and related functions rejected sizes greater than +.B PTRDIFF_MAX +starting in glibc 2.30. +.PP +.BR free () +preserved +.I errno +starting in glibc 2.33. +.SH NOTES +By default, Linux follows an optimistic memory allocation strategy. +This means that when +.BR malloc () +returns non-NULL there is no guarantee that the memory really +is available. +In case it turns out that the system is out of memory, +one or more processes will be killed by the OOM killer. +For more information, see the description of +.I /proc/sys/vm/overcommit_memory +and +.I /proc/sys/vm/oom_adj +in +.BR proc (5), +and the Linux kernel source file +.IR Documentation/vm/overcommit\-accounting.rst . +.PP +Normally, +.BR malloc () +allocates memory from the heap, and adjusts the size of the heap +as required, using +.BR sbrk (2). +When allocating blocks of memory larger than +.B MMAP_THRESHOLD +bytes, the glibc +.BR malloc () +implementation allocates the memory as a private anonymous mapping using +.BR mmap (2). +.B MMAP_THRESHOLD +is 128\ kB by default, but is adjustable using +.BR mallopt (3). +Prior to Linux 4.7 +allocations performed using +.BR mmap (2) +were unaffected by the +.B RLIMIT_DATA +resource limit; +since Linux 4.7, this limit is also enforced for allocations performed using +.BR mmap (2). +.PP +To avoid corruption in multithreaded applications, +mutexes are used internally to protect the memory-management +data structures employed by these functions. +In a multithreaded application in which threads simultaneously +allocate and free memory, +there could be contention for these mutexes. +To scalably handle memory allocation in multithreaded applications, +glibc creates additional +.I memory allocation arenas +if mutex contention is detected. +Each arena is a large region of memory that is internally allocated +by the system +(using +.BR brk (2) +or +.BR mmap (2)), +and managed with its own mutexes. +.PP +If your program uses a private memory allocator, +it should do so by replacing +.BR malloc (), +.BR free (), +.BR calloc (), +and +.BR realloc (). +The replacement functions must implement the documented glibc behaviors, +including +.I errno +handling, size-zero allocations, and overflow checking; +otherwise, other library routines may crash or operate incorrectly. +For example, if the replacement +.IR free () +does not preserve +.IR errno , +then seemingly unrelated library routines may +fail without having a valid reason in +.IR errno . +Private memory allocators may also need to replace other glibc functions; +see "Replacing malloc" in the glibc manual for details. +.PP +Crashes in memory allocators +are almost always related to heap corruption, such as overflowing +an allocated chunk or freeing the same pointer twice. +.PP +The +.BR malloc () +implementation is tunable via environment variables; see +.BR mallopt (3) +for details. +.SS Nonportable behavior +The behavior of +these functions when the requested size is zero +is glibc specific; +other implementations may return NULL without setting +.IR errno , +and portable POSIX programs should tolerate such behavior. +See +.BR realloc (3p). +.PP +POSIX requires memory allocators +to set +.I errno +upon failure. +However, the C standard does not require this, and applications +portable to non-POSIX platforms should not assume this. +.PP +Portable programs should not use private memory allocators, +as POSIX and the C standard do not allow replacement of +.BR malloc (), +.BR free (), +.BR calloc (), +and +.BR realloc (). +.SH EXAMPLES +.EX +#include +#include +#include +#include +#include + +#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type))) +#define MALLOC(type) MALLOCARRAY(1, type) + +static inline void *my_mallocarray(size_t nmemb, size_t size); + +int +main(void) +{ + char *p; + + p = MALLOCARRAY(32, char); + if (p == NULL) + err(EXIT_FAILURE, "malloc"); + + strlcpy(p, "foo", 32); + puts(p); +} + +static inline void * +my_mallocarray(size_t nmemb, size_t size) +{ + return reallocarray(NULL, nmemb, size); +} +.EE +.SH SEE ALSO +.\" http://g.oswego.edu/dl/html/malloc.html +.\" A Memory Allocator - by Doug Lea +.\" +.\" http://www.bozemanpass.com/info/linux/malloc/Linux_Heap_Contention.html +.\" Linux Heap, Contention in free() - David Boreham +.\" +.\" http://www.citi.umich.edu/projects/linux-scalability/reports/malloc.html +.\" malloc() Performance in a Multithreaded Linux Environment - +.\" Check Lever, David Boreham +.\" +.ad l +.nh +.BR valgrind (1), +.BR brk (2), +.BR mmap (2), +.BR alloca (3), +.BR malloc_get_state (3), +.BR malloc_info (3), +.BR malloc_trim (3), +.BR malloc_usable_size (3), +.BR mallopt (3), +.BR mcheck (3), +.BR mtrace (3), +.BR posix_memalign (3) +.PP +For details of the GNU C library implementation, see +.UR https://sourceware.org/glibc/wiki/MallocInternals +.UE . diff --git a/upstream/opensuse-leap-15-6/man3/malloc_get_state.3 b/upstream/opensuse-leap-15-6/man3/malloc_get_state.3 new file mode 100644 index 00000000..8f58d132 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_get_state.3 @@ -0,0 +1,118 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH malloc_get_state 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc_get_state, malloc_set_state \- +record and restore state of malloc implementation +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void *malloc_get_state(void); +.BI "int malloc_set_state(void *" state ); +.fi +.SH DESCRIPTION +.IR Note : +these function are removed in glibc 2.25. +.PP +The +.BR malloc_get_state () +function records the current state of all +.BR malloc (3) +internal bookkeeping variables +(but not the actual contents of the heap +or the state of +.BR malloc_hook (3) +functions pointers). +The state is recorded in a system-dependent opaque data structure +dynamically allocated via +.BR malloc (3), +and a pointer to that data structure is returned as the function result. +(It is the caller's responsibility to +.BR free (3) +this memory.) +.PP +The +.BR malloc_set_state () +function restores the state of all +.BR malloc (3) +internal bookkeeping variables to the values recorded in +the opaque data structure pointed to by +.IR state . +.SH RETURN VALUE +On success, +.BR malloc_get_state () +returns a pointer to a newly allocated opaque data structure. +On error (for example, memory could not be allocated for the data structure), +.BR malloc_get_state () +returns NULL. +.PP +On success, +.BR malloc_set_state () +returns 0. +If the implementation detects that +.I state +does not point to a correctly formed data structure, +.\" if(ms->magic != MALLOC_STATE_MAGIC) return -1; +.BR malloc_set_state () +returns \-1. +If the implementation detects that +the version of the data structure referred to by +.I state +is a more recent version than this implementation knows about, +.\" /* Must fail if the major version is too high. */ +.\" if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2; +.BR malloc_set_state () +returns \-2. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc_get_state (), +.BR malloc_set_state () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH NOTES +These functions are useful when using this +.BR malloc (3) +implementation as part of a shared library, +and the heap contents are saved/restored via some other method. +This technique is used by GNU Emacs to implement its "dumping" function. +.PP +Hook function pointers are never saved or restored by these +functions, with two exceptions: +if malloc checking (see +.BR mallopt (3)) +was in use when +.BR malloc_get_state () +was called, then +.BR malloc_set_state () +resets malloc checking hooks +.\" i.e., calls __malloc_check_init() +if possible; +.\" i.e., malloc checking is not already in use +.\" and the caller requested malloc checking +if malloc checking was not in use in the recorded state, +but the caller has requested malloc checking, +then the hooks are reset to 0. +.SH SEE ALSO +.BR malloc (3), +.BR mallopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc_hook.3 b/upstream/opensuse-leap-15-6/man3/malloc_hook.3 new file mode 100644 index 00000000..5d5247b7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_hook.3 @@ -0,0 +1,154 @@ +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Heavily based on glibc documentation +.\" Polished, added docs, removed glibc doc bug, 2002-07-20, aeb +.\" +.TH __malloc_hook 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +__malloc_hook, __malloc_initialize_hook, +__memalign_hook, __free_hook, __realloc_hook, +__after_morecore_hook \- malloc debugging variables (DEPRECATED) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "void *(*volatile __malloc_hook)(size_t " size ", const void *" caller ); +.PP +.BI "void *(*volatile __realloc_hook)(void *" ptr ", size_t " size , +.BI " const void *" caller ); +.PP +.BI "void *(*volatile __memalign_hook)(size_t " alignment ", size_t " size , +.BI " const void *" caller ); +.PP +.BI "void (*volatile __free_hook)(void *" ptr ", const void *" caller ); +.PP +.B "void (*__malloc_initialize_hook)(void);" +.PP +.B "void (*volatile __after_morecore_hook)(void);" +.fi +.SH DESCRIPTION +The GNU C library lets you modify the behavior of +.BR malloc (3), +.BR realloc (3), +and +.BR free (3) +by specifying appropriate hook functions. +You can use these hooks +to help you debug programs that use dynamic memory allocation, +for example. +.PP +The variable +.B __malloc_initialize_hook +points at a function that is called once when the malloc implementation +is initialized. +This is a weak variable, so it can be overridden in +the application with a definition like the following: +.PP +.in +4n +.EX +void (*__malloc_initialize_hook)(void) = my_init_hook; +.EE +.in +.PP +Now the function +.IR my_init_hook () +can do the initialization of all hooks. +.PP +The four functions pointed to by +.BR __malloc_hook , +.BR __realloc_hook , +.BR __memalign_hook , +.B __free_hook +have a prototype like the functions +.BR malloc (3), +.BR realloc (3), +.BR memalign (3), +.BR free (3), +respectively, except that they have a final argument +.I caller +that gives the address of the caller of +.BR malloc (3), +etc. +.PP +The variable +.B __after_morecore_hook +points at a function that is called each time after +.BR sbrk (2) +was asked for more memory. +.SH STANDARDS +GNU. +.SH NOTES +The use of these hook functions is not safe in multithreaded programs, +and they are now deprecated. +From glibc 2.24 onwards, the +.B __malloc_initialize_hook +variable has been removed from the API, +and from glibc 2.34 onwards, all +the hook variables have been removed from the API. +.\" https://bugzilla.redhat.com/show_bug.cgi?id=450187 +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=9957 +Programmers should instead preempt calls to the relevant functions +by defining and exporting +.BR malloc (), +.BR free (), +.BR realloc (), +and +.BR calloc (). +.SH EXAMPLES +Here is a short example of how to use these variables. +.PP +.EX +#include +#include + +/* Prototypes for our hooks */ +static void my_init_hook(void); +static void *my_malloc_hook(size_t, const void *); + +/* Variables to save original hooks */ +static void *(*old_malloc_hook)(size_t, const void *); + +/* Override initializing hook from the C library */ +void (*__malloc_initialize_hook)(void) = my_init_hook; + +static void +my_init_hook(void) +{ + old_malloc_hook = __malloc_hook; + __malloc_hook = my_malloc_hook; +} + +static void * +my_malloc_hook(size_t size, const void *caller) +{ + void *result; + + /* Restore all old hooks */ + __malloc_hook = old_malloc_hook; + + /* Call recursively */ + result = malloc(size); + + /* Save underlying hooks */ + old_malloc_hook = __malloc_hook; + + /* printf() might call malloc(), so protect it too */ + printf("malloc(%zu) called from %p returns %p\en", + size, caller, result); + + /* Restore our own hooks */ + __malloc_hook = my_malloc_hook; + + return result; +} +.EE +.SH SEE ALSO +.BR mallinfo (3), +.BR malloc (3), +.BR mcheck (3), +.BR mtrace (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc_info.3 b/upstream/opensuse-leap-15-6/man3/malloc_info.3 new file mode 100644 index 00000000..f4066add --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_info.3 @@ -0,0 +1,260 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH malloc_info 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc_info \- export malloc state to a stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int malloc_info(int " options ", FILE *" stream ); +.fi +.SH DESCRIPTION +The +.BR malloc_info () +function exports an XML string that describes the current state +of the memory-allocation +implementation in the caller. +The string is printed on the file stream +.IR stream . +The exported string includes information about all arenas (see +.BR malloc (3)). +.PP +As currently implemented, +.I options +must be zero. +.SH RETURN VALUE +On success, +.BR malloc_info () +returns 0. +On failure, it returns \-1, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I options +was nonzero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc_info () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.10. +.SH NOTES +The memory-allocation information is provided as an XML string +(rather than a C structure) +because the information may change over time +(according to changes in the underlying implementation). +The output XML string includes a version field. +.PP +The +.BR open_memstream (3) +function can be used to send the output of +.BR malloc_info () +directly into a buffer in memory, rather than to a file. +.PP +The +.BR malloc_info () +function is designed to address deficiencies in +.BR malloc_stats (3) +and +.BR mallinfo (3). +.SH EXAMPLES +The program below takes up to four command-line arguments, +of which the first three are mandatory. +The first argument specifies the number of threads that +the program should create. +All of the threads, including the main thread, +allocate the number of blocks of memory specified by the second argument. +The third argument controls the size of the blocks to be allocated. +The main thread creates blocks of this size, +the second thread created by the program allocates blocks of twice this size, +the third thread allocates blocks of three times this size, and so on. +.PP +The program calls +.BR malloc_info () +twice to display the memory-allocation state. +The first call takes place before any threads +are created or memory allocated. +The second call is performed after all threads have allocated memory. +.PP +In the following example, +the command-line arguments specify the creation of one additional thread, +and both the main thread and the additional thread +allocate 10000 blocks of memory. +After the blocks of memory have been allocated, +.BR malloc_info () +shows the state of two allocation arenas. +.PP +.in +4n +.EX +.RB "$ " "getconf GNU_LIBC_VERSION" +glibc 2.13 +.RB "$ " "./a.out 1 10000 100" +============ Before allocating blocks ============ + + + + + + + + + + + + + + + + + + + +============ After allocating blocks ============ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.EE +.in +.SS Program source +.\" SRC BEGIN (malloc_info.c) +.EX +#include +#include +#include +#include +#include +#include + +static size_t blockSize; +static size_t numThreads; +static unsigned int numBlocks; + +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 (unsigned int j = 0; j < numBlocks; j++) + if (malloc(blockSize * (2 + tn)) == NULL) + err(EXIT_FAILURE, "malloc\-thread"); + + sleep(100); /* Sleep until main thread terminates. */ + return NULL; +} + +int +main(int argc, char *argv[]) +{ + int sleepTime; + pthread_t *thr; + + 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; + + thr = calloc(numThreads, sizeof(*thr)); + if (thr == NULL) + err(EXIT_FAILURE, "calloc"); + + printf("============ Before allocating blocks ============\en"); + malloc_info(0, stdout); + + /* Create threads that allocate different amounts of memory. */ + + for (size_t tn = 0; tn < numThreads; tn++) { + errno = pthread_create(&thr[tn], NULL, thread_func, + (void *) tn); + if (errno != 0) + err(EXIT_FAILURE, "pthread_create"); + + /* If we add a sleep interval after the start\-up of each + thread, the threads likely won\[aq]t contend for malloc + mutexes, and therefore additional arenas won\[aq]t be + allocated (see malloc(3)). */ + + if (sleepTime > 0) + sleep(sleepTime); + } + + /* The main thread also allocates some memory. */ + + for (unsigned int j = 0; j < numBlocks; j++) + if (malloc(blockSize) == NULL) + err(EXIT_FAILURE, "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 +.\" SRC END +.SH SEE ALSO +.BR mallinfo (3), +.BR malloc (3), +.BR malloc_stats (3), +.BR mallopt (3), +.BR open_memstream (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc_stats.3 b/upstream/opensuse-leap-15-6/man3/malloc_stats.3 new file mode 100644 index 00000000..ed9f08a5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_stats.3 @@ -0,0 +1,68 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH malloc_stats 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc_stats \- print memory allocation statistics +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void malloc_stats(void); +.fi +.SH DESCRIPTION +The +.BR malloc_stats () +function prints (on standard error) statistics about memory allocated by +.BR malloc (3) +and related functions. +For each arena (allocation area), this function prints +the total amount of memory allocated +and the total number of bytes consumed by in-use allocations. +(These two values correspond to the +.I arena +and +.I uordblks +fields retrieved by +.BR mallinfo (3).) +In addition, +the function prints the sum of these two statistics for all arenas, +and the maximum number of blocks and bytes that were ever simultaneously +allocated using +.BR mmap (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc_stats () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.0. +.SH NOTES +More detailed information about memory allocations in the main arena +can be obtained using +.BR mallinfo (3). +.SH SEE ALSO +.BR mmap (2), +.BR mallinfo (3), +.BR malloc (3), +.BR malloc_info (3), +.BR mallopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc_trim.3 b/upstream/opensuse-leap-15-6/man3/malloc_trim.3 new file mode 100644 index 00000000..fb1725ff --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_trim.3 @@ -0,0 +1,84 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH malloc_trim 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc_trim \- release free memory from the heap +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int malloc_trim(size_t " pad ); +.fi +.SH DESCRIPTION +The +.BR malloc_trim () +function attempts to release free memory from the heap +(by calling +.BR sbrk (2) +or +.BR madvise (2) +with suitable arguments). +.PP +The +.I pad +argument specifies the amount of free space to leave untrimmed +at the top of the heap. +If this argument is 0, only the minimum amount of memory is maintained +at the top of the heap (i.e., one page or less). +A nonzero argument can be used to maintain some trailing space +at the top of the heap in order to allow future allocations +to be made without having to extend the heap with +.BR sbrk (2). +.SH RETURN VALUE +The +.BR malloc_trim () +function returns 1 if memory was actually released back to the system, +or 0 if it was not possible to release any memory. +.SH ERRORS +No errors are defined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc_trim () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH VERSIONS +glibc 2.0. +.SH NOTES +Only the main heap (using +.BR sbrk (2)) +honors the +.I pad +argument; thread heaps do not. +.PP +Since glibc 2.8 this function frees memory in all arenas and in all +chunks with whole free pages. +.\" See commit 68631c8eb92ff38d9da1ae34f6aa048539b199cc +.\" (dated 2007-12-16) which adds iteration over all +.\" arenas and frees all pages in chunks which are free. +.PP +Before glibc 2.8 this function only freed memory at the +top of the heap in the main arena. +.SH SEE ALSO +.BR sbrk (2), +.BR malloc (3), +.BR mallopt (3) diff --git a/upstream/opensuse-leap-15-6/man3/malloc_usable_size.3 b/upstream/opensuse-leap-15-6/man3/malloc_usable_size.3 new file mode 100644 index 00000000..3dfff815 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/malloc_usable_size.3 @@ -0,0 +1,66 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH malloc_usable_size 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +malloc_usable_size \- obtain size of block of memory allocated from heap +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t malloc_usable_size(void *" ptr ); +.fi +.SH DESCRIPTION +The +.BR malloc_usable_size () +function returns the number of usable bytes in the block pointed to by +.IR ptr , +a pointer to a block of memory allocated by +.BR malloc (3) +or a related function. +.SH RETURN VALUE +.BR malloc_usable_size () +returns the number of usable bytes in +the block of allocated memory pointed to by +.IR ptr . +If +.I ptr +is NULL, 0 is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR malloc_usable_size () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH NOTES +The value returned by +.BR malloc_usable_size () +may be greater than the requested size of the allocation because +of alignment and minimum size constraints. +Although the excess bytes can be overwritten by the application +without ill effects, +this is not good programming practice: +the number of excess bytes in an allocation depends on +the underlying implementation. +.PP +The main use of this function is for debugging and introspection. +.SH SEE ALSO +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/mallopt.3 b/upstream/opensuse-leap-15-6/man3/mallopt.3 new file mode 100644 index 00000000..5b41d9ba --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mallopt.3 @@ -0,0 +1,619 @@ +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mallopt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mallopt \- set memory allocation parameters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mallopt(int " param ", int " value ); +.fi +.SH DESCRIPTION +The +.BR mallopt () +function adjusts parameters that control the behavior of the +memory-allocation functions (see +.BR malloc (3)). +The +.I param +argument specifies the parameter to be modified, and +.I value +specifies the new value for that parameter. +.PP +The following values can be specified for +.IR param : +.TP +.B M_ARENA_MAX +If this parameter has a nonzero value, +it defines a hard limit on the maximum number of arenas that can be created. +An arena represents a pool of memory that can be used by +.BR malloc (3) +(and similar) calls to service allocation requests. +Arenas are thread safe and +therefore may have multiple concurrent memory requests. +The trade-off is between the number of threads and the number of arenas. +The more arenas you have, the lower the per-thread contention, +but the higher the memory usage. +.IP +The default value of this parameter is 0, +meaning that the limit on the number of arenas is determined +according to the setting of +.BR M_ARENA_TEST . +.IP +This parameter has been available since glibc 2.10 via +.BR \-\-enable\-experimental\-malloc , +and since glibc 2.15 by default. +In some versions of the allocator there was no limit on the number +of created arenas (e.g., CentOS 5, RHEL 5). +.IP +When employing newer glibc versions, applications may in +some cases exhibit high contention when accessing arenas. +In these cases, it may be beneficial to increase +.B M_ARENA_MAX +to match the number of threads. +This is similar in behavior to strategies taken by tcmalloc and jemalloc +(e.g., per-thread allocation pools). +.TP +.B M_ARENA_TEST +This parameter specifies a value, in number of arenas created, +at which point the system configuration will be examined +to determine a hard limit on the number of created arenas. +(See +.B M_ARENA_MAX +for the definition of an arena.) +.IP +The computation of the arena hard limit is implementation-defined +and is usually calculated as a multiple of the number of available CPUs. +Once the hard limit is computed, the result is final and constrains +the total number of arenas. +.IP +The default value for the +.B M_ARENA_TEST +parameter is 2 on systems where +.I sizeof(long) +is 4; otherwise the default value is 8. +.IP +This parameter has been available since glibc 2.10 via +.BR \-\-enable\-experimental\-malloc , +and since glibc 2.15 by default. +.IP +The value of +.B M_ARENA_TEST +is not used when +.B M_ARENA_MAX +has a nonzero value. +.TP +.B M_CHECK_ACTION +Setting this parameter controls how glibc responds when various kinds +of programming errors are detected (e.g., freeing the same pointer twice). +The 3 least significant bits (2, 1, and 0) of the value assigned +to this parameter determine the glibc behavior, as follows: +.RS +.TP +Bit 0 +If this bit is set, then print a one-line message on +.I stderr +that provides details about the error. +The message starts with the string "***\ glibc detected\ ***", +followed by the program name, +the name of the memory-allocation function in which the error was detected, +a brief description of the error, +and the memory address where the error was detected. +.TP +Bit 1 +If this bit is set, then, +after printing any error message specified by bit 0, +the program is terminated by calling +.BR abort (3). +Since glibc 2.4, +if bit 0 is also set, +then, between printing the error message and aborting, +the program also prints a stack trace in the manner of +.BR backtrace (3), +and prints the process's memory mapping in the style of +.IR /proc/ pid /maps +(see +.BR proc (5)). +.TP +Bit 2 (since glibc 2.4) +This bit has an effect only if bit 0 is also set. +If this bit is set, +then the one-line message describing the error is simplified +to contain just the name of the function where the error +was detected and the brief description of the error. +.RE +.IP +The remaining bits in +.I value +are ignored. +.IP +Combining the above details, +the following numeric values are meaningful for +.BR M_CHECK_ACTION : +.RS 12 +.TP +.B 0 +Ignore error conditions; continue execution (with undefined results). +.TP +.B 1 +Print a detailed error message and continue execution. +.TP +.B 2 +Abort the program. +.TP +.B 3 +Print detailed error message, stack trace, and memory mappings, +and abort the program. +.TP +.B 5 +Print a simple error message and continue execution. +.TP +.B 7 +Print simple error message, stack trace, and memory mappings, +and abort the program. +.RE +.IP +Since glibc 2.3.4, the default value for the +.B M_CHECK_ACTION +parameter is 3. +In glibc 2.3.3 and earlier, the default value is 1. +.IP +Using a nonzero +.B M_CHECK_ACTION +value can be useful because otherwise a crash may happen much later, +and the true cause of the problem is then very hard to track down. +.TP +.B M_MMAP_MAX +.\" The following text adapted from comments in the glibc source: +This parameter specifies the maximum number of allocation requests that +may be simultaneously serviced using +.BR mmap (2). +This parameter exists because some systems have a limited number +of internal tables for use by +.BR mmap (2), +and using more than a few of them may degrade performance. +.IP +The default value is 65,536, +a value which has no special significance and +which serves only as a safeguard. +Setting this parameter to 0 disables the use of +.BR mmap (2) +for servicing large allocation requests. +.TP +.B M_MMAP_THRESHOLD +For allocations greater than or equal to the limit specified (in bytes) by +.B M_MMAP_THRESHOLD +that can't be satisfied from the free list, +the memory-allocation functions employ +.BR mmap (2) +instead of increasing the program break using +.BR sbrk (2). +.IP +Allocating memory using +.BR mmap (2) +has the significant advantage that the allocated memory blocks +can always be independently released back to the system. +(By contrast, +the heap can be trimmed only if memory is freed at the top end.) +On the other hand, there are some disadvantages to the use of +.BR mmap (2): +deallocated space is not placed on the free list +for reuse by later allocations; +memory may be wasted because +.BR mmap (2) +allocations must be page-aligned; +and the kernel must perform the expensive task of zeroing out +memory allocated via +.BR mmap (2). +Balancing these factors leads to a default setting of 128*1024 for the +.B M_MMAP_THRESHOLD +parameter. +.IP +The lower limit for this parameter is 0. +The upper limit is +.BR DEFAULT_MMAP_THRESHOLD_MAX : +512*1024 on 32-bit systems or +.I 4*1024*1024*sizeof(long) +on 64-bit systems. +.IP +.IR Note : +Nowadays, glibc uses a dynamic mmap threshold by default. +The initial value of the threshold is 128*1024, +but when blocks larger than the current threshold and less than or equal to +.B DEFAULT_MMAP_THRESHOLD_MAX +are freed, +the threshold is adjusted upward to the size of the freed block. +When dynamic mmap thresholding is in effect, +the threshold for trimming the heap is also dynamically adjusted +to be twice the dynamic mmap threshold. +Dynamic adjustment of the mmap threshold is disabled if any of the +.BR M_TRIM_THRESHOLD , +.BR M_TOP_PAD , +.BR M_MMAP_THRESHOLD , +or +.B M_MMAP_MAX +parameters is set. +.TP +.BR M_MXFAST " (since glibc 2.3)" +.\" The following text adapted from comments in the glibc sources: +Set the upper limit for memory allocation requests that are satisfied +using "fastbins". +(The measurement unit for this parameter is bytes.) +Fastbins are storage areas that hold deallocated blocks of memory +of the same size without merging adjacent free blocks. +Subsequent reallocation of blocks of the same size can be handled +very quickly by allocating from the fastbin, +although memory fragmentation and the overall memory footprint +of the program can increase. +.IP +The default value for this parameter is +.I 64*sizeof(size_t)/4 +(i.e., 64 on 32-bit architectures). +The range for this parameter is 0 to +.IR 80*sizeof(size_t)/4 . +Setting +.B M_MXFAST +to 0 disables the use of fastbins. +.TP +.BR M_PERTURB " (since glibc 2.4)" +If this parameter is set to a nonzero value, +then bytes of allocated memory (other than allocations via +.BR calloc (3)) +are initialized to the complement of the value +in the least significant byte of +.IR value , +and when allocated memory is released using +.BR free (3), +the freed bytes are set to the least significant byte of +.IR value . +This can be useful for detecting errors where programs +incorrectly rely on allocated memory being initialized to zero, +or reuse values in memory that has already been freed. +.IP +The default value for this parameter is 0. +.TP +.B M_TOP_PAD +This parameter defines the amount of padding to employ when calling +.BR sbrk (2) +to modify the program break. +(The measurement unit for this parameter is bytes.) +This parameter has an effect in the following circumstances: +.RS +.IP \[bu] 3 +When the program break is increased, then +.B M_TOP_PAD +bytes are added to the +.BR sbrk (2) +request. +.IP \[bu] +When the heap is trimmed as a consequence of calling +.BR free (3) +(see the discussion of +.BR M_TRIM_THRESHOLD ) +this much free space is preserved at the top of the heap. +.RE +.IP +In either case, +the amount of padding is always rounded to a system page boundary. +.IP +Modifying +.B M_TOP_PAD +is a trade-off between increasing the number of system calls +(when the parameter is set low) +and wasting unused memory at the top of the heap +(when the parameter is set high). +.IP +The default value for this parameter is 128*1024. +.\" DEFAULT_TOP_PAD in glibc source +.TP +.B M_TRIM_THRESHOLD +When the amount of contiguous free memory at the top of the heap +grows sufficiently large, +.BR free (3) +employs +.BR sbrk (2) +to release this memory back to the system. +(This can be useful in programs that continue to execute for +a long period after freeing a significant amount of memory.) +The +.B M_TRIM_THRESHOLD +parameter specifies the minimum size (in bytes) that +this block of memory must reach before +.BR sbrk (2) +is used to trim the heap. +.IP +The default value for this parameter is 128*1024. +Setting +.B M_TRIM_THRESHOLD +to \-1 disables trimming completely. +.IP +Modifying +.B M_TRIM_THRESHOLD +is a trade-off between increasing the number of system calls +(when the parameter is set low) +and wasting unused memory at the top of the heap +(when the parameter is set high). +.\" +.SS Environment variables +A number of environment variables can be defined +to modify some of the same parameters as are controlled by +.BR mallopt (). +Using these variables has the advantage that the source code +of the program need not be changed. +To be effective, these variables must be defined before the +first call to a memory-allocation function. +(If the same parameters are adjusted via +.BR mallopt (), +then the +.BR mallopt () +settings take precedence.) +For security reasons, +these variables are ignored in set-user-ID and set-group-ID programs. +.PP +The environment variables are as follows +(note the trailing underscore at the end of the name of some variables): +.TP +.B MALLOC_ARENA_MAX +Controls the same parameter as +.BR mallopt () +.BR M_ARENA_MAX . +.TP +.B MALLOC_ARENA_TEST +Controls the same parameter as +.BR mallopt () +.BR M_ARENA_TEST . +.TP +.B MALLOC_CHECK_ +This environment variable controls the same parameter as +.BR mallopt () +.BR M_CHECK_ACTION . +If this variable is set to a nonzero value, +then a special implementation of the memory-allocation functions is used. +(This is accomplished using the +.BR malloc_hook (3) +feature.) +This implementation performs additional error checking, +but is slower +.\" On glibc 2.12/x86, a simple malloc()+free() loop is about 70% slower +.\" when MALLOC_CHECK_ was set. +than the standard set of memory-allocation functions. +(This implementation does not detect all possible errors; +memory leaks can still occur.) +.IP +The value assigned to this environment variable should be a single digit, +whose meaning is as described for +.BR M_CHECK_ACTION . +Any characters beyond the initial digit are ignored. +.IP +For security reasons, the effect of +.B MALLOC_CHECK_ +is disabled by default for set-user-ID and set-group-ID programs. +However, if the file +.I /etc/suid\-debug +exists (the content of the file is irrelevant), then +.B MALLOC_CHECK_ +also has an effect for set-user-ID and set-group-ID programs. +.TP +.B MALLOC_MMAP_MAX_ +Controls the same parameter as +.BR mallopt () +.BR M_MMAP_MAX . +.TP +.B MALLOC_MMAP_THRESHOLD_ +Controls the same parameter as +.BR mallopt () +.BR M_MMAP_THRESHOLD . +.TP +.B MALLOC_PERTURB_ +Controls the same parameter as +.BR mallopt () +.BR M_PERTURB . +.TP +.B MALLOC_TRIM_THRESHOLD_ +Controls the same parameter as +.BR mallopt () +.BR M_TRIM_THRESHOLD . +.TP +.B MALLOC_TOP_PAD_ +Controls the same parameter as +.BR mallopt () +.BR M_TOP_PAD . +.SH RETURN VALUE +On success, +.BR mallopt () +returns 1. +On error, it returns 0. +.SH ERRORS +On error, +.I errno +is +.I not +set. +.SH VERSIONS +A similar function exists on many System V derivatives, +but the range of values for +.I param +varies across systems. +The SVID defined options +.BR M_MXFAST , +.BR M_NLBLKS , +.BR M_GRAIN , +and +.BR M_KEEP , +but only the first of these is implemented in glibc. +.SH STANDARDS +None. +.SH HISTORY +glibc 2.0. +.SH BUGS +Specifying an invalid value for +.I param +does not generate an error. +.PP +A calculation error within the glibc implementation means that +a call of the form: +.\" FIXME . This looks buggy: +.\" setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK) +.\" malloc requests are rounded up: +.\" (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12129 +.PP +.in +4n +.EX +mallopt(M_MXFAST, n) +.EE +.in +.PP +does not result in fastbins being employed for all allocations of size up to +.IR n . +To ensure desired results, +.I n +should be rounded up to the next multiple greater than or equal to +.IR (2k+1)*sizeof(size_t) , +where +.I k +is an integer. +.\" Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t) +.PP +If +.BR mallopt () +is used to set +.BR M_PERTURB , +then, as expected, the bytes of allocated memory are initialized +to the complement of the byte in +.IR value , +and when that memory is freed, +the bytes of the region are initialized to the byte specified in +.IR value . +However, there is an +.RI off-by- sizeof(size_t) +error in the implementation: +.\" FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12140 +instead of initializing precisely the block of memory +being freed by the call +.IR free(p) , +the block starting at +.I p+sizeof(size_t) +is initialized. +.SH EXAMPLES +The program below demonstrates the use of +.BR M_CHECK_ACTION . +If the program is supplied with an (integer) command-line argument, +then that argument is used to set the +.B M_CHECK_ACTION +parameter. +The program then allocates a block of memory, +and frees it twice (an error). +.PP +The following shell session shows what happens when we run this program +under glibc, with the default value for +.BR M_CHECK_ACTION : +.PP +.in +4n +.EX +$ \fB./a.out\fP +main(): returned from first free() call +*** glibc detected *** ./a.out: double free or corruption (top): 0x09d30008 *** +======= Backtrace: ========= +/lib/libc.so.6(+0x6c501)[0x523501] +/lib/libc.so.6(+0x6dd70)[0x524d70] +/lib/libc.so.6(cfree+0x6d)[0x527e5d] +\&./a.out[0x80485db] +/lib/libc.so.6(__libc_start_main+0xe7)[0x4cdce7] +\&./a.out[0x8048471] +======= Memory map: ======== +001e4000\-001fe000 r\-xp 00000000 08:06 1083555 /lib/libgcc_s.so.1 +001fe000\-001ff000 r\-\-p 00019000 08:06 1083555 /lib/libgcc_s.so.1 +[some lines omitted] +b7814000\-b7817000 rw\-p 00000000 00:00 0 +bff53000\-bff74000 rw\-p 00000000 00:00 0 [stack] +Aborted (core dumped) +.EE +.in +.PP +The following runs show the results when employing other values for +.BR M_CHECK_ACTION : +.PP +.in +4n +.EX +$ \fB./a.out 1\fP # Diagnose error and continue +main(): returned from first free() call +*** glibc detected *** ./a.out: double free or corruption (top): 0x09cbe008 *** +main(): returned from second free() call +$ \fB./a.out 2\fP # Abort without error message +main(): returned from first free() call +Aborted (core dumped) +$ \fB./a.out 0\fP # Ignore error and continue +main(): returned from first free() call +main(): returned from second free() call +.EE +.in +.PP +The next run shows how to set the same parameter using the +.B MALLOC_CHECK_ +environment variable: +.PP +.in +4n +.EX +$ \fBMALLOC_CHECK_=1 ./a.out\fP +main(): returned from first free() call +*** glibc detected *** ./a.out: free(): invalid pointer: 0x092c2008 *** +main(): returned from second free() call +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (mallopt.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + char *p; + + if (argc > 1) { + if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) { + fprintf(stderr, "mallopt() failed"); + exit(EXIT_FAILURE); + } + } + + p = malloc(1000); + if (p == NULL) { + fprintf(stderr, "malloc() failed"); + exit(EXIT_FAILURE); + } + + free(p); + printf("%s(): returned from first free() call\en", __func__); + + free(p); + printf("%s(): returned from second free() call\en", __func__); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR mmap (2), +.BR sbrk (2), +.BR mallinfo (3), +.BR malloc (3), +.BR malloc_hook (3), +.BR malloc_info (3), +.BR malloc_stats (3), +.BR malloc_trim (3), +.BR mcheck (3), +.BR mtrace (3), +.BR posix_memalign (3) diff --git a/upstream/opensuse-leap-15-6/man3/mark.3menu b/upstream/opensuse-leap-15-6/man3/mark.3menu new file mode 100644 index 00000000..c9afca18 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mark.3menu @@ -0,0 +1,81 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_mark.3x,v 1.12 2015/12/05 23:42:45 tom Exp $ +.TH mark 3MENU "" +.SH NAME +\fBset_menu_mark\fP, +\fBmenu_mark\fR \- get and set the menu mark string +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_mark(MENU *menu, const char *mark); +.br +const char *menu_mark(const MENU *menu); +.br +.SH DESCRIPTION +In order to make menu selections visible on older terminals without +highlighting or color capability, the menu library marks selected items +in a menu with a prefix string. +.PP +The function \fBset_menu_mark\fR sets the mark string for the given menu. +Calling \fBset_menu_mark\fR with a null menu item will abolish the mark string. +Note that changing the length of the mark string for a menu while the +menu is posted is likely to produce unhelpful behavior. +.PP +The default string is "\-" (a dash). Calling \fBset_menu_mark\fR with +a non-\fBNULL\fR menu argument will change this default. +.PP +The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if +there is none). +.SH RETURN VALUE +The function \fBmenu_mark\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +The function \fBset_menu_mark\fR may return the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/matherr.3 b/upstream/opensuse-leap-15-6/man3/matherr.3 new file mode 100644 index 00000000..99493314 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/matherr.3 @@ -0,0 +1,431 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH matherr 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +matherr \- SVID math library exception handling +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int matherr(struct exception *" exc ); +.PP +.B [[deprecated]] extern _LIB_VERSION_TYPE _LIB_VERSION; +.fi +.SH DESCRIPTION +.IR Note : +the mechanism described in this page is no longer supported by glibc. +Before glibc 2.27, it had been marked as obsolete. +Since glibc 2.27, +.\" glibc commit 813378e9fe17e029caf627cab76fe23eb46815fa +the mechanism has been removed altogether. +New applications should use the techniques described in +.BR math_error (7) +and +.BR fenv (3). +This page documents the +.BR matherr () +mechanism as an aid for maintaining and porting older applications. +.PP +The System V Interface Definition (SVID) specifies that various +math functions should invoke a function called +.BR matherr () +if a math exception is detected. +This function is called before the math function returns; +after +.BR matherr () +returns, the system then returns to the math function, +which in turn returns to the caller. +.PP +To employ +.BR matherr (), +the programmer must define the +.B _SVID_SOURCE +feature test macro +(before including +.I any +header files), +and assign the value +.B _SVID_ +to the external variable +.BR _LIB_VERSION . +.PP +The system provides a default version of +.BR matherr (). +This version does nothing, and returns zero +(see below for the significance of this). +The default +.BR matherr () +can be overridden by a programmer-defined +version, which will be invoked when an exception occurs. +The function is invoked with one argument, a pointer to an +.I exception +structure, defined as follows: +.PP +.in +4n +.EX +struct exception { + int type; /* Exception type */ + char *name; /* Name of function causing exception */ + double arg1; /* 1st argument to function */ + double arg2; /* 2nd argument to function */ + double retval; /* Function return value */ +} +.EE +.in +.PP +The +.I type +field has one of the following values: +.TP 12 +.B DOMAIN +A domain error occurred (the function argument was outside the range +for which the function is defined). +The return value depends on the function; +.I errno +is set to +.BR EDOM . +.TP +.B SING +A pole error occurred (the function result is an infinity). +The return value in most cases is +.B HUGE +(the largest single precision floating-point number), +appropriately signed. +In most cases, +.I errno +is set to +.BR EDOM . +.TP +.B OVERFLOW +An overflow occurred. +In most cases, the value +.B HUGE +is returned, and +.I errno +is set to +.BR ERANGE . +.TP +.B UNDERFLOW +An underflow occurred. +0.0 is returned, and +.I errno +is set to +.BR ERANGE . +.TP +.B TLOSS +Total loss of significance. +0.0 is returned, and +.I errno +is set to +.BR ERANGE . +.TP +.B PLOSS +Partial loss of significance. +This value is unused on glibc +(and many other systems). +.PP +The +.I arg1 +and +.I arg2 +fields are the arguments supplied to the function +.RI ( arg2 +is undefined for functions that take only one argument). +.PP +The +.I retval +field specifies the return value that the math +function will return to its caller. +The programmer-defined +.BR matherr () +can modify this field to change the return value of the math function. +.PP +If the +.BR matherr () +function returns zero, then the system sets +.I errno +as described above, and may print an error message on standard error +(see below). +.PP +If the +.BR matherr () +function returns a nonzero value, then the system does not set +.IR errno , +and doesn't print an error message. +.SS Math functions that employ matherr() +The table below lists the functions and circumstances in which +.BR matherr () +is called. +The "Type" column indicates the value assigned to +.I exc\->type +when calling +.BR matherr (). +The "Result" column is the default return value assigned to +.IR exc\->retval . +.PP +The "Msg?" and "errno" columns describe the default behavior if +.BR matherr () +returns zero. +If the "Msg?" columns contains "y", +then the system prints an error message on standard error. +.PP +The table uses the following notations and abbreviations: +.PP +.RS +.TS +l l. +x first argument to function +y second argument to function +fin finite value for argument +neg negative value for argument +int integral value for argument +o/f result overflowed +u/f result underflowed +|x| absolute value of x +X_TLOSS is a constant defined in \fI\fP +.TE +.RE +.\" Details below from glibc 2.8's sysdeps/ieee754/k_standard.c +.\" A subset of cases were test by experimental programs. +.TS +lB lB lB cB lB +l l l c l. +Function Type Result Msg? errno +acos(|x|>1) DOMAIN HUGE y EDOM +asin(|x|>1) DOMAIN HUGE y EDOM +atan2(0,0) DOMAIN HUGE y EDOM +acosh(x<1) DOMAIN NAN y EDOM \" retval is 0.0/0.0 +atanh(|x|>1) DOMAIN NAN y EDOM \" retval is 0.0/0.0 +atanh(|x|==1) SING (x>0.0)? y EDOM \" retval is x/0.0 +\ \ HUGE_VAL : +\ \ \-HUGE_VAL +cosh(fin) o/f OVERFLOW HUGE n ERANGE +sinh(fin) o/f OVERFLOW (x>0.0) ? n ERANGE +\ \ HUGE : \-HUGE +sqrt(x<0) DOMAIN 0.0 y EDOM +hypot(fin,fin) o/f OVERFLOW HUGE n ERANGE +exp(fin) o/f OVERFLOW HUGE n ERANGE +exp(fin) u/f UNDERFLOW 0.0 n ERANGE +exp2(fin) o/f OVERFLOW HUGE n ERANGE +exp2(fin) u/f UNDERFLOW 0.0 n ERANGE +exp10(fin) o/f OVERFLOW HUGE n ERANGE +exp10(fin) u/f UNDERFLOW 0.0 n ERANGE +j0(|x|>X_TLOSS) TLOSS 0.0 y ERANGE +j1(|x|>X_TLOSS) TLOSS 0.0 y ERANGE +jn(|x|>X_TLOSS) TLOSS 0.0 y ERANGE +y0(x>X_TLOSS) TLOSS 0.0 y ERANGE +y1(x>X_TLOSS) TLOSS 0.0 y ERANGE +yn(x>X_TLOSS) TLOSS 0.0 y ERANGE +y0(0) DOMAIN \-HUGE y EDOM +y0(x<0) DOMAIN \-HUGE y EDOM +y1(0) DOMAIN \-HUGE y EDOM +y1(x<0) DOMAIN \-HUGE y EDOM +yn(n,0) DOMAIN \-HUGE y EDOM +yn(x<0) DOMAIN \-HUGE y EDOM +lgamma(fin) o/f OVERFLOW HUGE n ERANGE +lgamma(\-int) or SING HUGE y EDOM +\ \ lgamma(0) +tgamma(fin) o/f OVERFLOW HUGE_VAL n ERANGE +tgamma(\-int) SING NAN y EDOM +tgamma(0) SING copysign( y ERANGE +\ \ HUGE_VAL,x) +log(0) SING \-HUGE y EDOM +log(x<0) DOMAIN \-HUGE y EDOM +log2(0) SING \-HUGE n EDOM \" different from log() +log2(x<0) DOMAIN \-HUGE n EDOM \" different from log() +log10(0) SING \-HUGE y EDOM +log10(x<0) DOMAIN \-HUGE y EDOM +pow(0.0,0.0) DOMAIN 0.0 y EDOM +pow(x,y) o/f OVERFLOW HUGE n ERANGE +pow(x,y) u/f UNDERFLOW 0.0 n ERANGE +pow(NaN,0.0) DOMAIN x n EDOM +0**neg DOMAIN 0.0 y EDOM \" +0 and -0 +neg**non-int DOMAIN 0.0 y EDOM +scalb() o/f OVERFLOW (x>0.0) ? n ERANGE +\ \ HUGE_VAL : +\ \ \-HUGE_VAL +scalb() u/f UNDERFLOW copysign( n ERANGE +\ \ \ \ 0.0,x) +fmod(x,0) DOMAIN x y EDOM +remainder(x,0) DOMAIN NAN y EDOM \" retval is 0.0/0.0 +.TE +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR matherr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH EXAMPLES +The example program demonstrates the use of +.BR matherr () +when calling +.BR log (3). +The program takes up to three command-line arguments. +The first argument is the floating-point number to be given to +.BR log (3). +If the optional second argument is provided, then +.B _LIB_VERSION +is set to +.B _SVID_ +so that +.BR matherr () +is called, and the integer supplied in the +command-line argument is used as the return value from +.BR matherr (). +If the optional third command-line argument is supplied, +then it specifies an alternative return value that +.BR matherr () +should assign as the return value of the math function. +.PP +The following example run, where +.BR log (3) +is given an argument of 0.0, does not use +.BR matherr (): +.PP +.in +4n +.EX +.RB "$" " ./a.out 0.0" +errno: Numerical result out of range +x=\-inf +.EE +.in +.PP +In the following run, +.BR matherr () +is called, and returns 0: +.PP +.in +4n +.EX +.RB "$" " ./a.out 0.0 0" +matherr SING exception in log() function + args: 0.000000, 0.000000 + retval: \-340282346638528859811704183484516925440.000000 +log: SING error +errno: Numerical argument out of domain +x=\-340282346638528859811704183484516925440.000000 +.EE +.in +.PP +The message "log: SING error" was printed by the C library. +.PP +In the following run, +.BR matherr () +is called, and returns a nonzero value: +.PP +.in +4n +.EX +.RB "$" " ./a.out 0.0 1" +matherr SING exception in log() function + args: 0.000000, 0.000000 + retval: \-340282346638528859811704183484516925440.000000 +x=\-340282346638528859811704183484516925440.000000 +.EE +.in +.PP +In this case, the C library did not print a message, and +.I errno +was not set. +.PP +In the following run, +.BR matherr () +is called, changes the return value of the math function, +and returns a nonzero value: +.PP +.in +4n +.EX +.RB "$" " ./a.out 0.0 1 12345.0" +matherr SING exception in log() function + args: 0.000000, 0.000000 + retval: \-340282346638528859811704183484516925440.000000 +x=12345.000000 +.EE +.in +.SS Program source +\& +.\" [[deprecated]] SRC BEGIN (matherr.c) +.EX +#define _SVID_SOURCE +#include +#include +#include +#include + +static int matherr_ret = 0; /* Value that matherr() + should return */ +static int change_retval = 0; /* Should matherr() change + function\[aq]s return value? */ +static double new_retval; /* New function return value */ + +int +matherr(struct exception *exc) +{ + fprintf(stderr, "matherr %s exception in %s() function\en", + (exc\->type == DOMAIN) ? "DOMAIN" : + (exc\->type == OVERFLOW) ? "OVERFLOW" : + (exc\->type == UNDERFLOW) ? "UNDERFLOW" : + (exc\->type == SING) ? "SING" : + (exc\->type == TLOSS) ? "TLOSS" : + (exc\->type == PLOSS) ? "PLOSS" : "???", + exc\->name); + fprintf(stderr, " args: %f, %f\en", + exc\->arg1, exc\->arg2); + fprintf(stderr, " retval: %f\en", exc\->retval); + + if (change_retval) + exc\->retval = new_retval; + + return matherr_ret; +} + +int +main(int argc, char *argv[]) +{ + double x; + + if (argc < 2) { + fprintf(stderr, "Usage: %s " + " [ []]\en", argv[0]); + exit(EXIT_FAILURE); + } + + if (argc > 2) { + _LIB_VERSION = _SVID_; + matherr_ret = atoi(argv[2]); + } + + if (argc > 3) { + change_retval = 1; + new_retval = atof(argv[3]); + } + + x = log(atof(argv[1])); + if (errno != 0) + perror("errno"); + + printf("x=%f\en", x); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR fenv (3), +.BR math_error (7), +.BR standards (7) diff --git a/upstream/opensuse-leap-15-6/man3/mblen.3 b/upstream/opensuse-leap-15-6/man3/mblen.3 new file mode 100644 index 00000000..f8115c3b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mblen.3 @@ -0,0 +1,120 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mblen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mblen \- determine number of bytes in next multibyte character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mblen(const char " s [. n "], size_t " n ); +.fi +.SH DESCRIPTION +If +.I s +is not NULL, the +.BR mblen () +function inspects at most +.I n +bytes of the multibyte string starting at +.I s +and extracts the +next complete multibyte character. +It uses a static anonymous shift state known only to the +.BR mblen () +function. +If the multibyte character is not the null wide +character, it returns the number of bytes that were consumed from +.IR s . +If the multibyte character is the null wide character, it returns 0. +.PP +If the +.I n +bytes starting at +.I s +do not contain a complete multibyte +character, +.BR mblen () +returns \-1. +This can happen even if +.I n +is greater than or equal to +.IR MB_CUR_MAX , +if the multibyte string contains redundant shift sequences. +.PP +If the multibyte string starting at +.I s +contains an invalid multibyte +sequence before the next complete character, +.BR mblen () +also returns \-1. +.PP +If +.I s +is NULL, the +.BR mblen () +function +.\" The Dinkumware doc and the Single UNIX specification say this, but +.\" glibc doesn't implement this. +resets the shift state, known to only this function, to the initial state, and +returns nonzero if the encoding has nontrivial shift state, or zero if the +encoding is stateless. +.SH RETURN VALUE +The +.BR mblen () +function returns the number of +bytes parsed from the multibyte +sequence starting at +.IR s , +if a non-null wide character was recognized. +It returns 0, if a null wide character was recognized. +It returns \-1, if an +invalid multibyte sequence was encountered or if it couldn't parse a complete +multibyte character. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mblen () +T} Thread safety MT-Unsafe race +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The function +.BR mbrlen (3) +provides a better interface to the same +functionality. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mblen () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR mbrlen (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbrlen.3 b/upstream/opensuse-leap-15-6/man3/mbrlen.3 new file mode 100644 index 00000000..10f46c5d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbrlen.3 @@ -0,0 +1,133 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbrlen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbrlen \- determine number of bytes in next multibyte character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t mbrlen(const char " s "[restrict ." n "], size_t " n , +.BI " mbstate_t *restrict " ps ); +.fi +.SH DESCRIPTION +The +.BR mbrlen () +function inspects at most +.I n +bytes of the multibyte +string starting at +.I s +and extracts the next complete multibyte character. +It updates the shift state +.IR *ps . +If the multibyte character is not the +null wide character, it returns the number of bytes that were consumed from +.IR s . +If the multibyte character is the null wide character, it resets the +shift state +.I *ps +to the initial state and returns 0. +.PP +If the +.I n +bytes starting at +.I s +do not contain a complete multibyte +character, +.BR mbrlen () +returns +.IR "(size_t)\ \-2" . +This can happen even if +.I n +>= +.IR MB_CUR_MAX , +if the multibyte string contains redundant shift +sequences. +.PP +If the multibyte string starting at +.I s +contains an invalid multibyte +sequence before the next complete character, +.BR mbrlen () +returns +.I (size_t)\ \-1 +and sets +.I errno +to +.BR EILSEQ . +In this case, +the effects on +.I *ps +are undefined. +.PP +If +.I ps +is NULL, a static anonymous state known only to the +.BR mbrlen () +function is used instead. +.SH RETURN VALUE +The +.BR mbrlen () +function returns the number of bytes +parsed from the multibyte +sequence starting at +.IR s , +if a non-null wide character was recognized. +It returns 0, if a null wide character was recognized. +It returns +.I "(size_t)\ \-1" +and sets +.I errno +to +.BR EILSEQ , +if an invalid multibyte sequence was +encountered. +It returns +.I (size_t)\ \-2 +if it couldn't parse a complete multibyte +character, meaning that +.I n +should be increased. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mbrlen () +T} Thread safety MT-Unsafe race:mbrlen/!ps +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbrlen () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR mbrtowc (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbrtowc.3 b/upstream/opensuse-leap-15-6/man3/mbrtowc.3 new file mode 100644 index 00000000..4f71fdf4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbrtowc.3 @@ -0,0 +1,204 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbrtowc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbrtowc \- convert a multibyte sequence to a wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n ], +.BI " size_t " n ", mbstate_t *restrict " ps ); +.fi +.SH DESCRIPTION +The main case for this function is when +.I s +is not NULL and +.I pwc +is +not NULL. +In this case, the +.BR mbrtowc () +function inspects at most +.I n +bytes of the multibyte string starting at +.IR s , +extracts the next complete +multibyte character, converts it to a wide character and stores it at +.IR *pwc . +It updates the shift state +.IR *ps . +If the converted wide +character is not L\[aq]\e0\[aq] (the null wide character), +it returns the number of bytes that were consumed +from +.IR s . +If the converted wide character is L\[aq]\e0\[aq], it resets the shift +state +.I *ps +to the initial state and returns 0. +.PP +If the +.I n +bytes starting at +.I s +do not contain a complete multibyte +character, +.BR mbrtowc () +returns +.IR "(size_t)\ \-2" . +This can happen even if +.I n +>= +.IR MB_CUR_MAX , +if the multibyte string contains redundant shift +sequences. +.PP +If the multibyte string starting at +.I s +contains an invalid multibyte +sequence before the next complete character, +.BR mbrtowc () +returns +.I (size_t)\ \-1 +and sets +.I errno +to +.BR EILSEQ . +In this case, +the effects on +.I *ps +are undefined. +.PP +A different case is when +.I s +is not NULL but +.I pwc +is NULL. +In this case, the +.BR mbrtowc () +function behaves as above, except that it does not +store the converted wide character in memory. +.PP +A third case is when +.I s +is NULL. +In this case, +.I pwc +and +.I n +are +ignored. +If the conversion state represented by +.I *ps +denotes an +incomplete multibyte character conversion, the +.BR mbrtowc () +function +returns +.IR "(size_t)\ \-1" , +sets +.I errno +to +.BR EILSEQ , +and +leaves +.I *ps +in an undefined state. +Otherwise, the +.BR mbrtowc () +function +puts +.I *ps +in the initial state and returns 0. +.PP +In all of the above cases, if +.I ps +is NULL, a static anonymous +state known only to the +.BR mbrtowc () +function is used instead. +Otherwise, +.I *ps +must be a valid +.I mbstate_t +object. +An +.I mbstate_t +object +.I a +can be initialized to the initial state +by zeroing it, for example using +.PP +.in +4n +.EX +memset(&a, 0, sizeof(a)); +.EE +.in +.SH RETURN VALUE +The +.BR mbrtowc () +function returns the number of bytes parsed from the +multibyte sequence starting at +.IR s , +if a non-L\[aq]\e0\[aq] wide character +was recognized. +It returns 0, if a L\[aq]\e0\[aq] wide character was recognized. +It returns +.I (size_t)\ \-1 +and sets +.I errno +to +.BR EILSEQ , +if an invalid multibyte sequence was +encountered. +It returns +.I "(size_t)\ \-2" +if it couldn't parse a complete multibyte +character, meaning that +.I n +should be increased. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mbrtowc () +T} Thread safety MT-Unsafe race:mbrtowc/!ps +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbrtowc () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR mbsinit (3), +.BR mbsrtowcs (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbsinit.3 b/upstream/opensuse-leap-15-6/man3/mbsinit.3 new file mode 100644 index 00000000..30b05c8b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbsinit.3 @@ -0,0 +1,120 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbsinit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbsinit \- test for initial shift state +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mbsinit(const mbstate_t *" ps ); +.fi +.SH DESCRIPTION +Character conversion between the multibyte representation and the wide +character representation uses conversion state, of type +.IR mbstate_t . +Conversion of a string uses a finite-state machine; when it is interrupted +after the complete conversion of a number of characters, it may need to +save a state for processing the remaining characters. +Such a conversion +state is needed for the sake of encodings such as ISO-2022 and UTF-7. +.PP +The initial state is the state at the beginning of conversion of a string. +There are two kinds of state: the one used by multibyte to wide character +conversion functions, such as +.BR mbsrtowcs (3), +and the one used by wide +character to multibyte conversion functions, such as +.BR wcsrtombs (3), +but they both fit in a +.IR mbstate_t , +and they both have the same +representation for an initial state. +.PP +For 8-bit encodings, all states are equivalent to the initial state. +For multibyte encodings like UTF-8, EUC-*, BIG5, or SJIS, the wide character +to multibyte conversion functions never produce non-initial states, but the +multibyte to wide-character conversion functions like +.BR mbrtowc (3) +do +produce non-initial states when interrupted in the middle of a character. +.PP +One possible way to create an +.I mbstate_t +in initial state is to set it to zero: +.PP +.in +4n +.EX +mbstate_t state; +memset(&state, 0, sizeof(state)); +.EE +.in +.PP +On Linux, the following works as well, but might generate compiler warnings: +.PP +.in +4n +.EX +mbstate_t state = { 0 }; +.EE +.in +.PP +The function +.BR mbsinit () +tests whether +.I *ps +corresponds to an +initial state. +.SH RETURN VALUE +.BR mbsinit () +returns nonzero if +.I *ps +is an initial state, or if +.I ps +is NULL. +Otherwise, it returns 0. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mbsinit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbsinit () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR mbrlen (3), +.BR mbrtowc (3), +.BR mbsrtowcs (3), +.BR wcrtomb (3), +.BR wcsrtombs (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbsnrtowcs.3 b/upstream/opensuse-leap-15-6/man3/mbsnrtowcs.3 new file mode 100644 index 00000000..acb8f8ce --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbsnrtowcs.3 @@ -0,0 +1,200 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbsnrtowcs 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +mbsnrtowcs \- convert a multibyte string to a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t mbsnrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src , +.BI " size_t " nms ", size_t " len \ +", mbstate_t *restrict " ps ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mbsnrtowcs (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR mbsnrtowcs () +function is like the +.BR mbsrtowcs (3) +function, except that +the number of bytes to be converted, starting at +.IR *src , +is limited to at most +.I nms +bytes. +.PP +If +.I dest +is not NULL, the +.BR mbsnrtowcs () +function converts at +most +.I nms +bytes from the +multibyte string +.I *src +to a wide-character string starting at +.IR dest . +At most +.I len +wide characters are written to +.IR dest . +The shift state +.I *ps +is updated. +The conversion is effectively performed by repeatedly +calling +.I "mbrtowc(dest, *src, n, ps)" +where +.I n +is some +positive number, as long as this call succeeds, and then incrementing +.I dest +by one and +.I *src +by the number of bytes consumed. +The +conversion can stop for three reasons: +.IP \[bu] 3 +An invalid multibyte sequence has been encountered. +In this case, +.I *src +is left pointing to the invalid multibyte sequence, +.I (size_t)\ \-1 +is returned, +and +.I errno +is set to +.BR EILSEQ . +.IP \[bu] +The +.I nms +limit forces a stop, +or +.I len +non-L\[aq]\e0\[aq] wide characters +have been stored at +.IR dest . +In this case, +.I *src +is left pointing to the +next multibyte sequence to be converted, and the number of wide characters +written to +.I dest +is returned. +.IP \[bu] +The multibyte string has been completely converted, including the +terminating null wide character (\[aq]\e0\[aq]) +(which has the side effect of bringing back +.I *ps +to the +initial state). +In this case, +.I *src +is set to NULL, and the number of wide +characters written to +.IR dest , +excluding the terminating null wide character, +is returned. +.PP +According to POSIX.1, +if the input buffer ends with an incomplete character, +it is unspecified whether conversion stops at the end of +the previous character (if any), or at the end of the input buffer. +The glibc implementation adopts the former behavior. +.PP +If +.I dest +is NULL, +.I len +is ignored, and the conversion proceeds as +above, except that the converted wide characters +are not written out to memory, +and that no destination length limit exists. +.PP +In both of the above cases, if +.I ps +is NULL, a static anonymous +state known only to the +.BR mbsnrtowcs () +function is used instead. +.PP +The programmer must ensure that there is room for at least +.I len +wide +characters at +.IR dest . +.SH RETURN VALUE +The +.BR mbsnrtowcs () +function returns the number of wide characters +that make up the converted part of the wide-character string, +not including the terminating null wide character. +If an invalid multibyte sequence was +encountered, +.I (size_t)\ \-1 +is returned, and +.I errno +set to +.BR EILSEQ . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR mbsnrtowcs () +T} Thread safety T{ +MT-Unsafe race:mbsnrtowcs/!ps +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH NOTES +The behavior of +.BR mbsnrtowcs () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +Passing NULL as +.I ps +is not multithread safe. +.SH SEE ALSO +.BR iconv (3), +.BR mbrtowc (3), +.BR mbsinit (3), +.BR mbsrtowcs (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbsrtowcs.3 b/upstream/opensuse-leap-15-6/man3/mbsrtowcs.3 new file mode 100644 index 00000000..19675990 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbsrtowcs.3 @@ -0,0 +1,164 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbsrtowcs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbsrtowcs \- convert a multibyte string to a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t mbsrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src , +.BI " size_t " len ", mbstate_t *restrict " ps ); +.fi +.SH DESCRIPTION +If +.I dest +is not NULL, the +.BR mbsrtowcs () +function converts the +multibyte string +.I *src +to a wide-character string starting at +.IR dest . +At most +.I len +wide characters are written to +.IR dest . +The shift state +.I *ps +is updated. +The conversion is effectively performed by repeatedly +calling +.I "mbrtowc(dest, *src, n, ps)" +where +.I n +is some +positive number, as long as this call succeeds, and then incrementing +.I dest +by one and +.I *src +by the number of bytes consumed. +The conversion can stop for three reasons: +.IP \[bu] 3 +An invalid multibyte sequence has been encountered. +In this case, +.I *src +is left pointing to the invalid multibyte sequence, +.I (size_t)\ \-1 +is returned, +and +.I errno +is set to +.BR EILSEQ . +.IP \[bu] +.I len +non-L\[aq]\e0\[aq] wide characters have been stored at +.IR dest . +In this case, +.I *src +is left pointing to the next +multibyte sequence to be converted, +and the number of wide characters written to +.I dest +is returned. +.IP \[bu] +The multibyte string has been completely converted, including the +terminating null wide character (\[aq]\e0\[aq]), which has the side +effect of bringing back +.I *ps +to the +initial state. +In this case, +.I *src +is set to NULL, and the number of wide +characters written to +.IR dest , +excluding the terminating null wide character, is returned. +.PP +If +.I dest +is NULL, +.I len +is ignored, +and the conversion proceeds as above, +except that the converted wide characters are not written out to memory, +and that no length limit exists. +.PP +In both of the above cases, +if +.I ps +is NULL, a static anonymous +state known only to the +.BR mbsrtowcs () +function is used instead. +.PP +The programmer must ensure that there is room for at least +.I len +wide +characters at +.IR dest . +.SH RETURN VALUE +The +.BR mbsrtowcs () +function returns the number of wide characters that make +up the converted part of the wide-character string, not including the +terminating null wide character. +If an invalid multibyte sequence was +encountered, +.I (size_t)\ \-1 +is returned, and +.I errno +set to +.BR EILSEQ . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR mbsrtowcs () +T} Thread safety T{ +MT-Unsafe race:mbsrtowcs/!ps +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbsrtowcs () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +Passing NULL as +.I ps +is not multithread safe. +.SH SEE ALSO +.BR iconv (3), +.BR mbrtowc (3), +.BR mbsinit (3), +.BR mbsnrtowcs (3), +.BR mbstowcs (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbstowcs.3 b/upstream/opensuse-leap-15-6/man3/mbstowcs.3 new file mode 100644 index 00000000..d6f9a70a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbstowcs.3 @@ -0,0 +1,244 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" and Copyright 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbstowcs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbstowcs \- convert a multibyte string to a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t mbstowcs(wchar_t " dest "[restrict ." n "], \ +const char *restrict " src , +.BI " size_t " n ); +.fi +.SH DESCRIPTION +If +.I dest +is not NULL, +the +.BR mbstowcs () +function converts the +multibyte string +.I src +to a wide-character string starting at +.IR dest . +At most +.I n +wide characters are written to +.IR dest . +The sequence of characters in the string +.I src +shall begin in the initial shift state. +The conversion can stop for three reasons: +.IP \[bu] 3 +An invalid multibyte sequence has been encountered. +In this case, +.I (size_t)\ \-1 +is returned. +.IP \[bu] +.I n +non-L\[aq]\e0\[aq] wide characters have been stored at +.IR dest . +In this case, the number of wide characters written to +.I dest +is returned, but the +shift state at this point is lost. +.IP \[bu] +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 +.IR dest , +excluding the terminating null wide character, is returned. +.PP +The programmer must ensure that there is room for at least +.I n +wide +characters at +.IR dest . +.PP +If +.I dest +is NULL, +.I n +is ignored, and the conversion proceeds as +above, except that the converted wide characters are not written out to memory, +and that no length limit exists. +.PP +In order to avoid the case 2 above, the programmer should make sure +.I n +is +greater than or equal to +.IR "mbstowcs(NULL,src,0)+1" . +.SH RETURN VALUE +The +.BR mbstowcs () +function returns the number of wide characters that make +up the converted part of the wide-character string, not including the +terminating null wide character. +If an invalid multibyte sequence was +encountered, +.I (size_t)\ \-1 +is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mbstowcs () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The function +.BR mbsrtowcs (3) +provides a better interface to the same +functionality. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbstowcs () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH EXAMPLES +The program below illustrates the use of +.BR mbstowcs (), +as well as some of the wide character classification functions. +An example run is the following: +.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 Program source +\& +.\" SRC BEGIN (mbstowcs.c) +.EX +#include +#include +#include +#include +#include +#include + +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 \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 +.\" SRC END +.SH SEE ALSO +.BR mblen (3), +.BR mbsrtowcs (3), +.BR mbtowc (3), +.BR wcstombs (3), +.BR wctomb (3) diff --git a/upstream/opensuse-leap-15-6/man3/mbtowc.3 b/upstream/opensuse-leap-15-6/man3/mbtowc.3 new file mode 100644 index 00000000..d39ca0a4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mbtowc.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH mbtowc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mbtowc \- convert a multibyte sequence to a wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mbtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The main case for this function is when +.I s +is not NULL and +.I pwc +is +not NULL. +In this case, the +.BR mbtowc () +function inspects at most +.I n +bytes of the multibyte string starting at +.IR s , +extracts the next complete +multibyte character, converts it to a wide character and stores it at +.IR *pwc . +It updates an internal shift state known only to the +.BR mbtowc () +function. +If +.I s +does not point to a null byte (\[aq]\e0\[aq]), it returns the number +of bytes that were consumed from +.IR s , +otherwise it returns 0. +.PP +If the +.I n +bytes starting at +.I s +do not contain a complete multibyte +character, or if they contain an invalid multibyte sequence, +.BR mbtowc () +returns \-1. +This can happen even if +.I n +>= +.IR MB_CUR_MAX , +if the multibyte string contains redundant shift sequences. +.PP +A different case is when +.I s +is not NULL but +.I pwc +is NULL. +In this case, the +.BR mbtowc () +function behaves as above, except that it does not +store the converted wide character in memory. +.PP +A third case is when +.I s +is NULL. +In this case, +.I pwc +and +.I n +are +ignored. +The +.BR mbtowc () +function +.\" The Dinkumware doc and the Single UNIX specification say this, but +.\" glibc doesn't implement this. +resets the shift state, only known to this function, +to the initial state, and +returns nonzero if the encoding has nontrivial shift state, or zero if the +encoding is stateless. +.SH RETURN VALUE +If +.I s +is not NULL, the +.BR mbtowc () +function returns the number of +consumed bytes starting at +.IR s , +or 0 if +.I s +points to a null byte, +or \-1 upon failure. +.PP +If +.I s +is NULL, the +.BR mbtowc () +function +returns nonzero if the encoding +has nontrivial shift state, or zero if the encoding is stateless. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mbtowc () +T} Thread safety MT-Unsafe race +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +This function is not multithread safe. +The function +.BR mbrtowc (3) +provides +a better interface to the same functionality. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR mbtowc () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR MB_CUR_MAX (3), +.BR mblen (3), +.BR mbrtowc (3), +.BR mbstowcs (3), +.BR wcstombs (3), +.BR wctomb (3) diff --git a/upstream/opensuse-leap-15-6/man3/mcheck.3 b/upstream/opensuse-leap-15-6/man3/mcheck.3 new file mode 100644 index 00000000..c21dee04 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mcheck.3 @@ -0,0 +1,214 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mcheck 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mcheck, mcheck_check_all, mcheck_pedantic, mprobe \- heap consistency checking +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mcheck(void (*" abortfunc ")(enum mcheck_status " mstatus )); +.BI "int mcheck_pedantic(void (*" abortfunc ")(enum mcheck_status " mstatus )); +.B void mcheck_check_all(void); +.PP +.BI "enum mcheck_status mprobe(void *" ptr ); +.fi +.SH DESCRIPTION +The +.BR mcheck () +function installs a set of debugging hooks for the +.BR malloc (3) +family of memory-allocation functions. +These hooks cause certain consistency checks to be performed +on the state of the heap. +The checks can detect application errors such as freeing a block of memory +more than once or corrupting the bookkeeping data structures +that immediately precede a block of allocated memory. +.PP +To be effective, the +.BR mcheck () +function must be called before the first call to +.BR malloc (3) +or a related function. +In cases where this is difficult to ensure, linking the program with +.I \-lmcheck +inserts an implicit call to +.BR mcheck () +(with a NULL argument) +before the first call to a memory-allocation function. +.PP +The +.BR mcheck_pedantic () +function is similar to +.BR mcheck (), +but performs checks on all allocated blocks whenever +one of the memory-allocation functions is called. +This can be very slow! +.PP +The +.BR mcheck_check_all () +function causes an immediate check on all allocated blocks. +This call is effective only if +.BR mcheck () +is called beforehand. +.PP +If the system detects an inconsistency in the heap, +the caller-supplied function pointed to by +.I abortfunc +is invoked with a single argument, +.IR mstatus , +that indicates what type of inconsistency was detected. +If +.I abortfunc +is NULL, a default function prints an error message on +.I stderr +and calls +.BR abort (3). +.PP +The +.BR mprobe () +function performs a consistency check on +the block of allocated memory pointed to by +.IR ptr . +The +.BR mcheck () +function should be called beforehand (otherwise +.BR mprobe () +returns +.BR MCHECK_DISABLED ). +.PP +The following list describes the values returned by +.BR mprobe () +or passed as the +.I mstatus +argument when +.I abortfunc +is invoked: +.TP +.BR MCHECK_DISABLED " (" mprobe "() only)" +.BR mcheck () +was not called before the first memory allocation function was called. +Consistency checking is not possible. +.TP +.BR MCHECK_OK " (" mprobe "() only)" +No inconsistency detected. +.TP +.B MCHECK_HEAD +Memory preceding an allocated block was clobbered. +.TP +.B MCHECK_TAIL +Memory following an allocated block was clobbered. +.TP +.B +MCHECK_FREE +A block of memory was freed twice. +.SH RETURN VALUE +.BR mcheck () +and +.BR mcheck_pedantic () +return 0 on success, or \-1 on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mcheck (), +.BR mcheck_pedantic (), +.BR mcheck_check_all (), +.BR mprobe () +T} Thread safety T{ +MT-Unsafe race:mcheck +const:malloc_hooks +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +.TP +.BR mcheck_pedantic () +.TQ +.BR mcheck_check_all () +glibc 2.2. +.TP +.BR mcheck () +.TQ +.BR mprobe () +glibc 2.0. +.SH NOTES +Linking a program with +.I \-lmcheck +and using the +.B MALLOC_CHECK_ +environment variable (described in +.BR mallopt (3)) +cause the same kinds of errors to be detected. +But, using +.B MALLOC_CHECK_ +does not require the application to be relinked. +.\" But is MALLOC_CHECK_ slower? +.SH EXAMPLES +The program below calls +.BR mcheck () +with a NULL argument and then frees the same block of memory twice. +The following shell session demonstrates what happens +when running the program: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +About to free + +About to free a second time +block freed twice +Aborted (core dumped) +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (mcheck.c) +.EX +#include +#include +#include + +int +main(void) +{ + char *p; + + if (mcheck(NULL) != 0) { + fprintf(stderr, "mcheck() failed\en"); + + exit(EXIT_FAILURE); + } + + p = malloc(1000); + + fprintf(stderr, "About to free\en"); + free(p); + fprintf(stderr, "\enAbout to free a second time\en"); + free(p); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR malloc (3), +.BR mallopt (3), +.BR mtrace (3) diff --git a/upstream/opensuse-leap-15-6/man3/memccpy.3 b/upstream/opensuse-leap-15-6/man3/memccpy.3 new file mode 100644 index 00000000..890c8252 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memccpy.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:57:24 1993 by Rik Faith (faith@cs.unc.edu) +.TH memccpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memccpy \- copy memory area +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *memccpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], +.BI " int " c ", size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memccpy () +function copies no more than +.I n +bytes from +memory area +.I src +to memory area +.IR dest , +stopping when the +character +.I c +is found. +.PP +If the memory areas overlap, the results are undefined. +.SH RETURN VALUE +The +.BR memccpy () +function returns a pointer to the next character +in +.I dest +after +.IR c , +or NULL if +.I c +was not found in the +first +.I n +characters of +.IR src . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memccpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR bcopy (3), +.BR bstring (3), +.BR memcpy (3), +.BR memmove (3), +.BR strcpy (3), +.BR strncpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/memchr.3 b/upstream/opensuse-leap-15-6/man3/memchr.3 new file mode 100644 index 00000000..7e04efb2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memchr.3 @@ -0,0 +1,145 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Mon Apr 12 12:49:57 1993, David Metcalfe +.\" Modified Sat Jul 24 18:56:22 1993, Rik Faith (faith@cs.unc.edu) +.\" Modified Wed Feb 20 21:09:36 2002, Ian Redfern (redferni@logica.com) +.\" 2008-07-09, mtk, add rawmemchr() +.\" +.TH memchr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memchr, memrchr, rawmemchr \- scan memory for a character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *memchr(const void " s [. n "], int " c ", size_t " n ); +.BI "void *memrchr(const void " s [. n "], int " c ", size_t " n ); +.PP +.BI "[[deprecated]] void *rawmemchr(const void " s [. n "], int " c ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR memrchr (), +.BR rawmemchr (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR memchr () +function scans the initial +.I n +bytes of the memory +area pointed to by +.I s +for the first instance of +.IR c . +Both +.I c +and the bytes of the memory area pointed to by +.I s +are interpreted as +.IR "unsigned char" . +.PP +The +.BR memrchr () +function is like the +.BR memchr () +function, +except that it searches backward from the end of the +.I n +bytes pointed to by +.I s +instead of forward from the beginning. +.PP +The +.BR rawmemchr () +function is similar to +.BR memchr (), +but it assumes +(i.e., the programmer knows for certain) +that an instance of +.I c +lies somewhere in the memory area starting at the location pointed to by +.IR s . +If an instance of +.I c +is not found, the behavior is undefined. +Use either +.BR strlen (3) +or +.BR memchr (3) +instead. +.SH RETURN VALUE +The +.BR memchr () +and +.BR memrchr () +functions return a pointer +to the matching byte or NULL if the character does not occur in +the given memory area. +.PP +The +.BR rawmemchr () +function returns a pointer to the matching byte. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memchr (), +.BR memrchr (), +.BR rawmemchr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR memchr () +C11, POSIX.1-2008. +.TP +.BR memrchr () +.TQ +.BR rawmemchr () +GNU. +.SH HISTORY +.TP +.BR memchr () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.TP +.BR memrchr () +glibc 2.2. +.TP +.BR rawmemchr () +glibc 2.1. +.SH SEE ALSO +.BR bstring (3), +.BR ffs (3), +.BR memmem (3), +.BR strchr (3), +.BR strpbrk (3), +.BR strrchr (3), +.BR strsep (3), +.BR strspn (3), +.BR strstr (3), +.BR wmemchr (3) diff --git a/upstream/opensuse-leap-15-6/man3/memcmp.3 b/upstream/opensuse-leap-15-6/man3/memcmp.3 new file mode 100644 index 00000000..7cb1f5ea --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memcmp.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu) +.TH memcmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memcmp \- compare memory areas +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int memcmp(const void " s1 [. n "], const void " s2 [. n "], size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memcmp () +function compares the first \fIn\fP bytes (each interpreted as +.IR "unsigned char" ) +of the memory areas \fIs1\fP and \fIs2\fP. +.SH RETURN VALUE +The +.BR memcmp () +function returns an integer less than, equal to, or +greater than zero if the first \fIn\fP bytes of \fIs1\fP is found, +respectively, to be less than, to match, or be greater than the first +\fIn\fP bytes of \fIs2\fP. +.PP +For a nonzero return value, the sign is determined by the sign of +the difference between the first pair of bytes (interpreted as +.IR "unsigned char" ) +that differ in +.I s1 +and +.IR s2 . +.PP +If +.I n +is zero, the return value is zero. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memcmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH CAVEATS +Do not use +.BR memcmp () +to compare security critical data, such as cryptographic secrets, +because the required CPU time depends on the number of equal bytes. +Instead, a function that performs comparisons in constant time is required. +Some operating systems provide such a function (e.g., NetBSD's +.BR consttime_memequal ()), +but no such function is specified in POSIX. +On Linux, you may need to implement such a function yourself. +.SH SEE ALSO +.BR bstring (3), +.BR strcasecmp (3), +.BR strcmp (3), +.BR strcoll (3), +.BR strncasecmp (3), +.BR strncmp (3), +.BR wmemcmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/memcpy.3 b/upstream/opensuse-leap-15-6/man3/memcpy.3 new file mode 100644 index 00000000..0cddee41 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memcpy.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:41:09 1993 by Rik Faith (faith@cs.unc.edu) +.TH memcpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memcpy \- copy memory area +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *memcpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memcpy () +function copies \fIn\fP bytes from memory area +\fIsrc\fP to memory area \fIdest\fP. +The memory areas must not overlap. +Use +.BR memmove (3) +if the memory areas do overlap. +.SH RETURN VALUE +The +.BR memcpy () +function returns a pointer to \fIdest\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memcpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH CAVEATS +Failure to observe the requirement that the memory areas +do not overlap has been the source of significant bugs. +(POSIX and the C standards are explicit that employing +.BR memcpy () +with overlapping areas produces undefined behavior.) +Most notably, in glibc 2.13 +.\" glibc commit 6fb8cbcb58a29fff73eb2101b34caa19a7f88eba +a performance optimization of +.BR memcpy () +on some platforms (including x86-64) included changing the order +.\" From forward copying to backward copying +in which bytes were copied from +.I src +to +.IR dest . +.PP +This change revealed breakages in a number of applications that performed +copying with overlapping areas. +.\" Adobe Flash player was the highest profile example: +.\" https://bugzilla.redhat.com/show_bug.cgi?id=638477 +.\" Reported: 2010-09-29 02:35 EDT by JCHuynh +.\" Bug 638477 - Strange sound on mp3 flash website +.\" +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=12518 +.\" Bug 12518 - memcpy acts randomly (and differently) with overlapping areas +.\" Reported: 2011-02-25 02:26 UTC by Linus Torvalds +.\" +Under the previous implementation, +the order in which the bytes were copied had fortuitously hidden the bug, +which was revealed when the copying order was reversed. +In glibc 2.14, +.\" glibc commit 0354e355014b7bfda32622e0255399d859862fcd +a versioned symbol was added so that old binaries +(i.e., those linked against glibc versions earlier than 2.14) +employed a +.BR memcpy () +implementation that safely handles the overlapping buffers case +(by providing an "older" +.BR memcpy () +implementation that was aliased to +.BR memmove (3)). +.SH SEE ALSO +.BR bcopy (3), +.BR bstring (3), +.BR memccpy (3), +.BR memmove (3), +.BR mempcpy (3), +.BR strcpy (3), +.BR strncpy (3), +.BR wmemcpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/memfrob.3 b/upstream/opensuse-leap-15-6/man3/memfrob.3 new file mode 100644 index 00000000..b6cdb3a2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memfrob.3 @@ -0,0 +1,63 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:54:45 1993 by Rik Faith (faith@cs.unc.edu) +.TH memfrob 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memfrob \- frobnicate (obfuscate) a memory area +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void *memfrob(void " s [. n "], size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memfrob () +function obfuscates the first \fIn\fP bytes of the +memory area \fIs\fP by exclusive-ORing each character with the number +42. +The effect can be reversed by using +.BR memfrob () +on the +obfuscated memory area. +.PP +Note that this function is not a proper encryption routine as the XOR +constant is fixed, and is suitable only for hiding strings. +.SH RETURN VALUE +The +.BR memfrob () +function returns a pointer to the obfuscated memory +area. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memfrob () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR bstring (3), +.BR strfry (3) diff --git a/upstream/opensuse-leap-15-6/man3/memleaks.3ncurses b/upstream/opensuse-leap-15-6/man3/memleaks.3ncurses new file mode 100644 index 00000000..22de5c98 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memleaks.3ncurses @@ -0,0 +1,91 @@ +.\"*************************************************************************** +.\" Copyright (c) 2008-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_memleaks.3x,v 1.6 2017/08/22 08:35:37 Sven.Joachim Exp $ +.TH memleaks 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fB_nc_freeall\fP, +\fB_nc_free_and_exit\fP, +\fB_nc_free_tinfo\fP \- \fBcurses\fR memory-leak checking +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBvoid _nc_freeall(void);\fR +.br +\fBvoid _nc_free_and_exit(int);\fR +.br +\fBvoid _nc_free_tinfo(int);\fR +.SH DESCRIPTION +These functions are used to simplify analysis of memory leaks in the ncurses +library. +They are normally not available; +they must be configured into the library +at build time using the \fB\-\-disable-leaks\fP option. +That compiles-in code that frees memory that normally would not be freed. +.PP +Any implementation of curses must not free the memory associated with +a screen, since (even after calling \fBendwin\fP), it must be available +for use in the next call to \fBrefresh\fP(3X). +There are also chunks of memory held for performance reasons. +That makes it hard to analyze curses applications for memory leaks. +When using the specially configured debugging version of the ncurses library, +applications can call functions which free those chunks of memory, +simplifying the process of memory-leak checking. +.PP +These functions are named with a \*(``_nc_\*('' prefix because they are not +intended for use in the non-debugging library: +.TP 5 +\fB_nc_freeall\fP +This frees (almost) all of the memory allocated by ncurses. +.TP 5 +\fB_nc_free_and_exit\fP +This frees the memory allocated by ncurses (like \fB_nc_freeall\fP), +and exits the program. +It is preferred over \fB_nc_freeall\fP since some of that memory +may be required to keep the application running. +Simply exiting (with the given exit-code) is safer. +.TP 5 +\fB_nc_free_tinfo\fP +Use this function if only the low-level terminfo functions (and +corresponding library) are used. +Like \fB_nc_free_and_exit\fP, it exits the program after freeing memory. +.SH RETURN VALUE +These functions do not return a value. +.SH PORTABILITY +These functions are not part of X/Open Curses; +nor do other implementations of curses provide a similar feature. +.SH SEE ALSO +\fBncurses\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/memmem.3 b/upstream/opensuse-leap-15-6/man3/memmem.3 new file mode 100644 index 00000000..745c879c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memmem.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:50:48 1993 by Rik Faith (faith@cs.unc.edu) +.\" Interchanged 'needle' and 'haystack'; added history, aeb, 980113. +.TH memmem 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memmem \- locate a substring +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void *memmem(const void " haystack [. haystacklen "], size_t " haystacklen , +.BI " const void " needle [. needlelen "], size_t " needlelen ); +.fi +.SH DESCRIPTION +The +.BR memmem () +function finds the start of the first occurrence +of the substring +.I needle +of length +.I needlelen +in the memory +area +.I haystack +of length +.IR haystacklen . +.SH RETURN VALUE +The +.BR memmem () +function returns a pointer to the beginning of the +substring, or NULL if the substring is not found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memmem () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +musl libc 0.9.7; +FreeBSD 6.0, OpenBSD 5.4, NetBSD, Illumos. +.SH BUGS +.\" This function was broken in Linux libraries up to and including libc 5.0.9; +.\" there the +.\" .IR needle +.\" and +.\" .I haystack +.\" arguments were interchanged, +.\" and a pointer to the end of the first occurrence of +.\" .I needle +.\" was returned. +.\" +.\" Both old and new libc's have the bug that if +.\" .I needle +.\" is empty, +.\" .I haystack\-1 +.\" (instead of +.\" .IR haystack ) +.\" is returned. +In glibc 2.0, if +.I needle +is empty, +.BR memmem () +returns a pointer to the last byte of +.IR haystack . +This is fixed in glibc 2.1. +.SH SEE ALSO +.BR bstring (3), +.BR strstr (3) diff --git a/upstream/opensuse-leap-15-6/man3/memmove.3 b/upstream/opensuse-leap-15-6/man3/memmove.3 new file mode 100644 index 00000000..c740750f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memmove.3 @@ -0,0 +1,74 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:49:59 1993 by Rik Faith (faith@cs.unc.edu) +.TH memmove 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memmove \- copy memory area +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *memmove(void " dest [. n "], const void " src [. n "], size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memmove () +function copies +.I n +bytes from memory area +.I src +to memory area +.IR dest . +The memory areas may overlap: copying takes place as though +the bytes in +.I src +are first copied into a temporary array that does not overlap +.I src +or +.IR dest , +and the bytes are then copied from the temporary array to +.IR dest . +.SH RETURN VALUE +The +.BR memmove () +function returns a pointer to +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memmove () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR bcopy (3), +.BR bstring (3), +.BR memccpy (3), +.BR memcpy (3), +.BR strcpy (3), +.BR strncpy (3), +.BR wmemmove (3) diff --git a/upstream/opensuse-leap-15-6/man3/mempcpy.3 b/upstream/opensuse-leap-15-6/man3/mempcpy.3 new file mode 100644 index 00000000..8e401983 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mempcpy.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Heavily based on glibc infopages, copyright Free Software Foundation +.\" +.\" aeb, 2003, polished a little +.TH mempcpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mempcpy, wmempcpy \- copy memory area +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void *mempcpy(void " dest "[restrict ." n "], const void " src "[restrict ." n ], +.BI " size_t " n ); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "wchar_t *wmempcpy(wchar_t " dest "[restrict ." n ], +.BI " const wchar_t " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR mempcpy () +function is nearly identical to the +.BR memcpy (3) +function. +It copies +.I n +bytes from the object beginning at +.I src +into the object pointed to by +.IR dest . +But instead of returning the value of +.I dest +it returns a pointer to the byte following the last written byte. +.PP +This function is useful in situations where a number of objects +shall be copied to consecutive memory positions. +.PP +The +.BR wmempcpy () +function is identical but takes +.I wchar_t +type arguments and copies +.I n +wide characters. +.SH RETURN VALUE +.I dest ++ +.IR n . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mempcpy (), +.BR wmempcpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH EXAMPLES +.EX +void * +combine(void *o1, size_t s1, void *o2, size_t s2) +{ + void *result = malloc(s1 + s2); + if (result != NULL) + mempcpy(mempcpy(result, o1, s1), o2, s2); + return result; +} +.EE +.SH SEE ALSO +.BR memccpy (3), +.BR memcpy (3), +.BR memmove (3), +.BR wmemcpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/memset.3 b/upstream/opensuse-leap-15-6/man3/memset.3 new file mode 100644 index 00000000..0644355e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/memset.3 @@ -0,0 +1,63 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:49:23 1993 by Rik Faith (faith@cs.unc.edu) +.TH memset 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +memset \- fill memory with a constant byte +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void *memset(void " s [. n "], int " c ", size_t " n ); +.fi +.SH DESCRIPTION +The +.BR memset () +function fills the first +.I n +bytes of the +memory area pointed to by +.I s +with the constant byte +.IR c . +.SH RETURN VALUE +The +.BR memset () +function returns a pointer to the memory area +.IR s . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR memset () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR bstring (3), +.BR bzero (3), +.BR swab (3), +.BR wmemset (3) diff --git a/upstream/opensuse-leap-15-6/man3/menu.3menu b/upstream/opensuse-leap-15-6/man3/menu.3menu new file mode 100644 index 00000000..ef4a3958 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu.3menu @@ -0,0 +1,206 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2014,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu.3x,v 1.24 2017/11/25 20:24:22 tom Exp $ +.TH menu 3MENU "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBmenu\fR \- curses extension for programming menus +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBmenu\fR library provides terminal-independent facilities for composing +menu systems on character-cell terminals. The library includes: item routines, +which create and modify menu items; and menu routines, which group items into +menus, display menus on the screen, and handle interaction with the user. +.PP +The \fBmenu\fR library uses the \fBcurses\fR libraries, and a curses +initialization routine such as \fBinitscr\fR must be called before using any of +these functions. To use the \fBmenu\fR library, link with the options +\fB\-lmenu \-lcurses\fR. +. +.SS Current Default Values for Item Attributes +. +The \fBmenu\fR library maintains a default value for item attributes. You can +get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR +routine with a \fBNULL\fR item pointer. Changing this default with a +\fBset_\fR function affects future item creations, but does not change the +rendering of items already created. +. +.SS Routine Name Index +. +The following table lists each \fBmenu\fR routine and the name of +the manual page on which it is described. +. +.TS +l l . +\fBcurses\fR Routine Name Manual Page Name += +current_item \fBmenu_current\fR(3MENU) +free_item \fBmenu_new\fR(3MENU) +free_menu \fBnew\fR(3MENU) +item_count \fBitems\fR(3MENU) +item_description \fBmenu_name\fR(3MENU) +item_index \fBmenu_current\fR(3MENU) +item_init \fBhook\fR(3MENU) +item_name \fBmenu_name\fR(3MENU) +item_opts \fBmenu_opts\fR(3MENU) +item_opts_off \fBmenu_opts\fR(3MENU) +item_opts_on \fBmenu_opts\fR(3MENU) +item_term \fBhook\fR(3MENU) +item_userptr \fBmenu_userptr\fR(3MENU) +item_value \fBmenu_value\fR(3MENU) +item_visible \fBmenu_visible\fR(3MENU) +menu_back \fBattributes\fR(3MENU) +menu_driver \fBdriver\fR(3MENU) +menu_fore \fBattributes\fR(3MENU) +menu_format \fBformat\fR(3MENU) +menu_grey \fBattributes\fR(3MENU) +menu_init \fBhook\fR(3MENU) +menu_items \fBitems\fR(3MENU) +menu_mark \fBmark\fR(3MENU) +menu_opts \fBopts\fR(3MENU) +menu_opts_off \fBopts\fR(3MENU) +menu_opts_on \fBopts\fR(3MENU) +menu_pad \fBattributes\fR(3MENU) +menu_pattern \fBpattern\fR(3MENU) +menu_request_by_name \fBrequestname\fR(3MENU) +menu_request_name \fBrequestname\fR(3MENU) +menu_spacing \fBspacing\fR(3MENU) +menu_sub \fBwin\fR(3MENU) +menu_term \fBhook\fR(3MENU) +menu_userptr \fBuserptr\fR(3MENU) +menu_win \fBwin\fR(3MENU) +new_item \fBmenu_new\fR(3MENU) +new_menu \fBnew\fR(3MENU) +pos_menu_cursor \fBcursor\fR(3MENU) +post_menu \fBpost\fR(3MENU) +scale_menu \fBwin\fR(3MENU) +set_current_item \fBmenu_current\fR(3MENU) +set_item_init \fBhook\fR(3MENU) +set_item_opts \fBmenu_opts\fR(3MENU) +set_item_term \fBhook\fR(3MENU) +set_item_userptr \fBmenu_userptr\fR(3MENU) +set_item_value \fBmenu_value\fR(3MENU) +set_menu_back \fBattributes\fR(3MENU) +set_menu_fore \fBattributes\fR(3MENU) +set_menu_format \fBformat\fR(3MENU) +set_menu_grey \fBattributes\fR(3MENU) +set_menu_init \fBhook\fR(3MENU) +set_menu_items \fBitems\fR(3MENU) +set_menu_mark \fBmark\fR(3MENU) +set_menu_opts \fBmenu_opts\fR(3MENU) +set_menu_pad \fBattributes\fR(3MENU) +set_menu_pattern \fBpattern\fR(3MENU) +set_menu_spacing \fBspacing\fR(3MENU) +set_menu_sub \fBwin\fR(3MENU) +set_menu_term \fBhook\fR(3MENU) +set_menu_userptr \fBuserptr\fR(3MENU) +set_menu_win \fBwin\fR(3MENU) +set_top_row \fBmenu_current\fR(3MENU) +top_row \fBmenu_current\fR(3MENU) +unpost_menu \fBpost\fR(3MENU) +.TE +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NO_MATCH +Character failed to match. +.TP 5 +.B E_NO_ROOM +Menu is too large for its window. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.TP 5 +.B E_NOT_POSTED +The menu has not been posted. +.TP 5 +.B E_NOT_SELECTABLE +The designated item cannot be selected. +.TP 5 +.B E_POSTED +The menu is already posted. +.TP 5 +.B E_REQUEST_DENIED +The menu driver could not process the request. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_UNKNOWN_COMMAND +The menu driver code saw an unknown request code. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. +.PP +In your library list, libmenu.a should be before libncurses.a; that is, +you should say \*(``\-lmenu \-lncurses\*('', not the other way around +(which would give a link-error when using static libraries). +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.PP +The menu facility was documented in SVr4.2 in +\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +.PP +It is not part of X/Open Curses. +.PP +Aside from ncurses, there are few implementations: +.bP +systems based on SVr4 source code, e.g., Solaris. +.bP +NetBSD curses. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric +S. Raymond. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin \*(``menu_\*('' +for detailed descriptions of the entry points. +.PP +This describes \fBncurses\fR +version 6.1 (patch 20180317). diff --git a/upstream/opensuse-leap-15-6/man3/menu_current.3menu b/upstream/opensuse-leap-15-6/man3/menu_current.3menu new file mode 100644 index 00000000..a88717b1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_current.3menu @@ -0,0 +1,96 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_current.3x,v 1.13 2010/12/04 18:40:45 tom Exp $ +.TH menu_current 3MENU "" +.SH NAME +\fBmitem_current\fR \- set and get current_menu_item +.SH SYNOPSIS +\fB#include \fR +.br +int set_current_item(MENU *menu, const ITEM *item); +.br +ITEM *current_item(const MENU *menu); +.br +int set_top_row(MENU *menu, int row); +.br +int top_row(const MENU *menu); +.br +int item_index(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_current_item\fR sets the current item (the item on which +the menu cursor is positioned). \fBcurrent_item\fR returns a pointer to the +current item in the given menu. +.PP +The function \fBset_top_row\fR sets the top row of the menu to show the given +row (the top row is initially 0, and is reset to this value whenever the +\fBO_ROWMAJOR\fR option is toggled). The item leftmost on the given row +becomes current. The function \fBtop_row\fR returns the number of the top menu +row being displayed. +.PP +The function \fBitem_index\fR returns the (zero-origin) index of \fIitem\fR in +the menu's item pointer list. +.SH RETURN VALUE +\fBcurrent_item\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +\fBtop_row\fR and \fBitem_index\fR return \fBERR\fR (the general \fBcurses\fR +error value) if their \fImenu\fP parameter is \fBNULL\fP. +.PP +\fBset_current_item\fR and \fBset_top_row\fR return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.PP +The SVr4 menu library documentation specifies the \fBtop_row\fR and +\fBindex_item\fR error value as \-1 (which is the value of \fBERR\fR). +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_name.3menu b/upstream/opensuse-leap-15-6/man3/menu_name.3menu new file mode 100644 index 00000000..daba273e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_name.3menu @@ -0,0 +1,60 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_name.3x,v 1.9 2015/12/05 23:42:45 tom Exp $ +.TH menu_name 3MENU "" +.SH NAME +\fBitem_name\fR, +\fBitem_description\fR \- get menu item name and description fields +.SH SYNOPSIS +\fB#include \fR +.br +const char *item_name(const ITEM *item); +.br +const char *item_description(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBitem_name\fR returns the name part of the given item. +.br +The function \fBitem_description\fR returns the description part of the given +item. +.SH RETURN VALUE +These routines return a pointer (which may be \fBNULL\fR). +They do not set errno. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. +They were not supported on Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_new.3menu b/upstream/opensuse-leap-15-6/man3/menu_new.3menu new file mode 100644 index 00000000..7bf9d651 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_new.3menu @@ -0,0 +1,85 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_new.3x,v 1.13 2015/12/05 23:42:45 tom Exp $ +.TH menu_new 3MENU "" +.SH NAME +\fBnew_item\fP, +\fBfree_item\fR \- create and destroy menu items +.SH SYNOPSIS +\fB#include \fR +.br +ITEM *new_item(const char *name, const char *description); +.br +int free_item(ITEM *item); +.br +.SH DESCRIPTION +The function \fBnew_item\fR allocates a new item and initializes it from the +\fBname\fR and \fBdescription\fR pointers. Please notice that the item stores +only the pointers to the name and description. Those pointers must be valid +during the lifetime of the item. So you should be very careful with names +or descriptions allocated on the stack of some routines. +.br +The function \fBfree_item\fR de-allocates an item. Please notice that it +is the responsibility of the application to release the memory for the +name or the description of the item. +.SH RETURN VALUE +The function \fBnew_item\fR returns \fBNULL\fR on error. +It sets errno according to the function's failure: +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred, e.g., malloc failure. +.PP +The function \fBfree_item\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CONNECTED +Item is connected to a menu. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_opts.3menu b/upstream/opensuse-leap-15-6/man3/menu_opts.3menu new file mode 100644 index 00000000..587a3568 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_opts.3menu @@ -0,0 +1,81 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_opts.3x,v 1.12 2015/12/05 23:42:45 tom Exp $ +.TH menu_opts 3MENU "" +.SH NAME +\fBset_item_opts\fP, +\fBitem_opts_on\fP, +\fBitem_opts_off\fP, +\fBitem_opts\fR \- set and get menu item options +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_opts(ITEM *item, Item_Options opts); +.br +int item_opts_on(ITEM *item, Item_Options opts); +.br +int item_opts_off(ITEM *item, Item_Options opts); +.br +Item_Options item_opts(const ITEM *item); +.br +.SH DESCRIPTION +The function \fBset_item_opts\fR sets all the given item's option bits (menu +option bits may be logically-OR'ed together). +.PP +The function \fBitem_opts_on\fR turns on the given option bits, and leaves +others alone. +.PP +The function \fBitem_opts_off\fR turns off the given option bits, and leaves +others alone. +.PP +The function \fBitem_opts\fR returns the item's current option bits. +.PP +There is only one defined option bit mask, \fBO_SELECTABLE\fR. When this is +on, the item may be selected during menu processing. This option defaults +to on. +.SH RETURN VALUE +Except for \fBitem_opts\fR, each routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_userptr.3menu b/upstream/opensuse-leap-15-6/man3/menu_userptr.3menu new file mode 100644 index 00000000..efd8f534 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_userptr.3menu @@ -0,0 +1,65 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_userptr.3x,v 1.12 2015/12/05 23:42:45 tom Exp $ +.TH menu_userptr 3MENU "" +.SH NAME +\fBset_item_userptr\fP, +\fBitem_userptr\fR \- associate application data with a menu item +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_userptr(ITEM *item, void *userptr); +.br +void *item_userptr(const ITEM *item); +.br +.SH DESCRIPTION +Every menu item has a field that can be used to hold application-specific data +(that is, the menu-driver code leaves it alone). These functions get and set +that field. +.SH RETURN VALUE +The function \fBitem_userptr\fR returns a pointer (possibly \fBNULL\fR). +It does not set errno. +.PP +The \fBset_item_userptr\fP always returns \fBE_OK\fP (success). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.PP +The user pointer is a void pointer. +We chose not to leave it as a char pointer for SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_value.3menu b/upstream/opensuse-leap-15-6/man3/menu_value.3menu new file mode 100644 index 00000000..ec15ba92 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_value.3menu @@ -0,0 +1,71 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_value.3x,v 1.11 2015/12/05 23:01:16 tom Exp $ +.TH menu_value 3MENU "" +.SH NAME +\fBset_item_value\fP, +\fBitem_value\fP \- set and get menu item values +.SH SYNOPSIS +\fB#include \fR +.br +int set_item_value(ITEM *item, bool value); +.br +bool item_value(const ITEM *item); +.br +.SH DESCRIPTION +If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with +\fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBopts\fR(3MENU)), the menu +becomes multi-valued; that is, more than one item may simultaneously be +selected. +.PP +In a multi_valued menu, you can used \fBset_item_value\fR to select the +given menu item (second argument \fBTRUE\fR) or deselect it (second argument +\fBFALSE\fR). +.SH RETURN VALUE +The function \fBset_item_value\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_REQUEST_DENIED +The menu driver could not process the request. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/menu_visible.3menu b/upstream/opensuse-leap-15-6/man3/menu_visible.3menu new file mode 100644 index 00000000..63f457a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/menu_visible.3menu @@ -0,0 +1,53 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: mitem_visible.3x,v 1.7 2010/12/04 18:40:45 tom Exp $ +.TH menu_visible 3MENU "" +.SH NAME +\fBmitem_visible\fR \- check visibility of a menu item +.SH SYNOPSIS +\fB#include \fR +.br +bool item_visible(const ITEM *item); +.br +.SH DESCRIPTION +A menu item is visible when it is in the portion of a posted menu that +is mapped onto the screen (if the menu is scrollable, in particular, this +portion will be smaller than the whole menu). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/mkdtemp.3 b/upstream/opensuse-leap-15-6/man3/mkdtemp.3 new file mode 100644 index 00000000..8ddc70dd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mkdtemp.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright 2001 John Levon +.\" Based on mkstemp(3), Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and GNU libc documentation +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.TH mkdtemp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mkdtemp \- create a unique temporary directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *mkdtemp(char *" template ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mkdtemp (): +.nf + /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc 2.19 and earlier: */ _BSD_SOURCE + || /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +The +.BR mkdtemp () +function generates a uniquely named temporary +directory from \fItemplate\fP. +The last six characters of \fItemplate\fP +must be XXXXXX and these are replaced with a string that makes the +directory name unique. +The directory is then created with +permissions 0700. +Since it will be modified, +.I template +must not be a string constant, but should be declared as a character array. +.SH RETURN VALUE +The +.BR mkdtemp () +function returns a pointer to the modified template +string on success, and NULL on failure, in which case +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The last six characters of \fItemplate\fP were not XXXXXX. +Now \fItemplate\fP is unchanged. +.PP +Also see +.BR mkdir (2) +for other possible values for \fIerrno\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mkdtemp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1.91. +NetBSD 1.4. +POSIX.1-2008. +.SH SEE ALSO +.BR mktemp (1), +.BR mkdir (2), +.BR mkstemp (3), +.BR mktemp (3), +.BR tempnam (3), +.BR tmpfile (3), +.BR tmpnam (3) diff --git a/upstream/opensuse-leap-15-6/man3/mkfifo.3 b/upstream/opensuse-leap-15-6/man3/mkfifo.3 new file mode 100644 index 00000000..fbaea11c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mkfifo.3 @@ -0,0 +1,204 @@ +'\" t +.\" This manpage is Copyright (C) 1995 James R. Van Zandt +.\" and Copyright (C) 2006, 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" changed section from 2 to 3, aeb, 950919 +.\" +.TH mkfifo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mkfifo, mkfifoat \- make a FIFO special file (a named pipe) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int mkfifo(const char *" pathname ", mode_t " mode ); +.PP +.BR "#include " "/* Definition of AT_* constants */" +.B #include +.PP +.BI "int mkfifoat(int " dirfd ", const char *" pathname ", mode_t " mode ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mkfifoat (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _ATFILE_SOURCE +.fi +.SH DESCRIPTION +.BR mkfifo () +makes a FIFO special file with name \fIpathname\fP. +\fImode\fP specifies the FIFO's permissions. +It is modified by the +process's \fBumask\fP in the usual way: the permissions of the created +file are \fB(\fP\fImode\fP\fB & \[ti]umask)\fP. +.PP +A FIFO special file is similar to a pipe, except that it is created +in a different way. +Instead of being an anonymous communications +channel, a FIFO special file is entered into the filesystem by +calling +.BR mkfifo (). +.PP +Once you have created a FIFO special file in this way, any process can +open it for reading or writing, in the same way as an ordinary file. +However, it has to be open at both ends simultaneously before you can +proceed to do any input or output operations on it. +Opening a FIFO for reading normally blocks until some +other process opens the same FIFO for writing, and vice versa. +See +.BR fifo (7) +for nonblocking handling of FIFO special files. +.SS mkfifoat() +The +.BR mkfifoat () +function operates in exactly the same way as +.BR mkfifo (), +except for the differences described here. +.PP +If the pathname given in +.I pathname +is relative, then it is interpreted relative to the directory +referred to by the file descriptor +.I dirfd +(rather than relative to the current working directory of +the calling process, as is done by +.BR mkfifo () +for a relative pathname). +.PP +If +.I pathname +is relative and +.I dirfd +is the special value +.BR AT_FDCWD , +then +.I pathname +is interpreted relative to the current working +directory of the calling process (like +.BR mkfifo ()). +.PP +If +.I pathname +is absolute, then +.I dirfd +is ignored. +.PP +See +.BR openat (2) +for an explanation of the need for +.BR mkfifoat (). +.SH RETURN VALUE +On success +.BR mkfifo () +and +.BR mkfifoat () +return 0. +On error, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EACCES +One of the directories in \fIpathname\fP did not allow search +(execute) permission. +.TP +.B EBADF +.RB ( mkfifoat ()) +.I pathname +is relative but +.I dirfd +is neither +.B AT_FDCWD +nor a valid file descriptor. +.TP +.B EDQUOT +The user's quota of disk blocks or inodes on the filesystem has been +exhausted. +.TP +.B EEXIST +\fIpathname\fP already exists. +This includes the case where +.I pathname +is a symbolic link, dangling or not. +.TP +.B ENAMETOOLONG +Either the total length of \fIpathname\fP is greater than +\fBPATH_MAX\fP, or an individual filename component has a length +greater than \fBNAME_MAX\fP. +In the GNU system, there is no imposed +limit on overall filename length, but some filesystems may place +limits on the length of a component. +.TP +.B ENOENT +A directory component in \fIpathname\fP does not exist or is a +dangling symbolic link. +.TP +.B ENOSPC +The directory or filesystem has no room for the new file. +.TP +.B ENOTDIR +A component used as a directory in \fIpathname\fP is not, in fact, a +directory. +.TP +.B ENOTDIR +.RB ( mkfifoat ()) +.I pathname +is a relative pathname and +.I dirfd +is a file descriptor referring to a file other than a directory. +.TP +.B EROFS +\fIpathname\fP refers to a read-only filesystem. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mkfifo (), +.BR mkfifoat () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +It is implemented using +.BR mknodat (2). +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +.TP +.BR mkfifo () +POSIX.1-2001. +.TP +.BR mkfifoat () +glibc 2.4. +POSIX.1-2008. +.SH SEE ALSO +.BR mkfifo (1), +.BR close (2), +.BR open (2), +.BR read (2), +.BR stat (2), +.BR umask (2), +.BR write (2), +.BR fifo (7) diff --git a/upstream/opensuse-leap-15-6/man3/mkstemp.3 b/upstream/opensuse-leap-15-6/man3/mkstemp.3 new file mode 100644 index 00000000..4f0b351e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mkstemp.3 @@ -0,0 +1,250 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2008, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" +.TH mkstemp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mkstemp, mkostemp, mkstemps, mkostemps \- create a unique temporary file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mkstemp(char *" template ); +.BI "int mkostemp(char *" template ", int " flags ); +.BI "int mkstemps(char *" template ", int " suffixlen ); +.BI "int mkostemps(char *" template ", int " suffixlen ", int " flags ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mkstemp (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.12: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR mkostemp (): +.nf + _GNU_SOURCE +.fi +.PP +.BR mkstemps (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR mkostemps (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR mkstemp () +function generates a unique temporary filename from +.IR template , +creates and opens the file, +and returns an open file descriptor for the file. +.PP +The last six characters of +.I template +must be "XXXXXX" and these are replaced with a string that makes the +filename unique. +Since it will be modified, +.I template +must not be a string constant, but should be declared as a character array. +.PP +The file is created with +permissions 0600, that is, read plus write for owner only. +The returned file descriptor provides both read and write access to the file. +The file is opened with the +.BR open (2) +.B O_EXCL +flag, guaranteeing that the caller is the process that creates the file. +.PP +The +.BR mkostemp () +function is like +.BR mkstemp (), +with the difference that the following bits\[em]with the same meaning as for +.BR open (2)\[em]may +be specified in +.IR flags : +.BR O_APPEND , +.BR O_CLOEXEC , +and +.BR O_SYNC . +Note that when creating the file, +.BR mkostemp () +includes the values +.BR O_RDWR , +.BR O_CREAT , +and +.B O_EXCL +in the +.I flags +argument given to +.BR open (2); +including these values in the +.I flags +argument given to +.BR mkostemp () +is unnecessary, and produces errors on some +.\" Reportedly, FreeBSD +systems. +.PP +The +.BR mkstemps () +function is like +.BR mkstemp (), +except that the string in +.I template +contains a suffix of +.I suffixlen +characters. +Thus, +.I template +is of the form +.IR "prefixXXXXXXsuffix" , +and the string XXXXXX is modified as for +.BR mkstemp (). +.PP +The +.BR mkostemps () +function is to +.BR mkstemps () +as +.BR mkostemp () +is to +.BR mkstemp (). +.SH RETURN VALUE +On success, these functions return the file descriptor +of the temporary file. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EEXIST +Could not create a unique temporary filename. +Now the contents of \fItemplate\fP are undefined. +.TP +.B EINVAL +For +.BR mkstemp () +and +.BR mkostemp (): +The last six characters of \fItemplate\fP were not XXXXXX; +now \fItemplate\fP is unchanged. +.IP +For +.BR mkstemps () +and +.BR mkostemps (): +.I template +is less than +.I "(6 + suffixlen)" +characters long, or the last 6 characters before the suffix in +.I template +were not XXXXXX. +.PP +These functions may also fail with any of the errors described for +.BR open (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mkstemp (), +.BR mkostemp (), +.BR mkstemps (), +.BR mkostemps () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR mkstemp () +POSIX.1-2001. +.TP +.BR mkstemps () +BSD. +.\" mkstemps() appears to be at least on the BSDs, Mac OS X, Solaris, +.\" and Tru64. +.TP +.BR mkostemp () +.TQ +.BR mkostemps () +GNU. +.SH HISTORY +.TP +.BR mkstemp () +4.3BSD, POSIX.1-2001. +.TP +.BR mkstemps () +glibc 2.11. +BSD, Mac OS X, Solaris, Tru64. +.TP +.BR mkostemp () +glibc 2.7. +.TP +.BR mkostemps () +glibc 2.11. +.PP +In glibc versions 2.06 and earlier, the file is created with permissions 0666, +that is, read and write for all users. +This old behavior may be +a security risk, especially since other UNIX flavors use 0600, +and somebody might overlook this detail when porting programs. +POSIX.1-2008 adds a requirement that the file be created with mode 0600. +.PP +More generally, the POSIX specification of +.BR mkstemp () +does not say anything +about file modes, so the application should make sure its +file mode creation mask (see +.BR umask (2)) +is set appropriately before calling +.BR mkstemp () +(and +.BR mkostemp ()). +.\" +.\" The prototype for +.\" .BR mkstemp () +.\" is in +.\" .I +.\" for libc4, libc5, glibc1; glibc2 follows POSIX.1 and has the prototype in +.\" .IR . +.SH SEE ALSO +.BR mkdtemp (3), +.BR mktemp (3), +.BR tempnam (3), +.BR tmpfile (3), +.BR tmpnam (3) diff --git a/upstream/opensuse-leap-15-6/man3/mktemp.3 b/upstream/opensuse-leap-15-6/man3/mktemp.3 new file mode 100644 index 00000000..b0473fb2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mktemp.3 @@ -0,0 +1,121 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 ) +.\" Modified Sun Mar 28 23:44:38 1999 by Andries Brouwer (aeb@cwi.nl) +.\" +.TH mktemp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mktemp \- make a unique temporary filename +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *mktemp(char *" template ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mktemp (): +.nf + Since glibc 2.12: + (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200112L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE + Before glibc 2.12: + _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +.IR "Never use this function" ; +see BUGS. +.PP +The +.BR mktemp () +function generates a unique temporary filename +from \fItemplate\fP. +The last six characters of \fItemplate\fP must +be XXXXXX and these are replaced with a string that makes the +filename unique. +Since it will be modified, +.I template +must not be a string constant, but should be declared as a character array. +.SH RETURN VALUE +The +.BR mktemp () +function always returns \fItemplate\fP. +If a unique name was created, the last six bytes of \fItemplate\fP will +have been modified in such a way that the resulting name is unique +(i.e., does not exist already) +If a unique name could not be created, +\fItemplate\fP is made an empty string, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The last six characters of \fItemplate\fP were not XXXXXX. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mktemp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD, POSIX.1-2001. +Removed in POSIX.1-2008. +.\" .SH NOTES +.\" The prototype is in +.\" .I +.\" for libc4, libc5, glibc1; glibc2 follows the Single UNIX Specification +.\" and has the prototype in +.\" .IR . +.SH BUGS +Never use +.BR mktemp (). +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 +.BR mktemp () +is a security risk. +The race is avoided by +.BR mkstemp (3) +and +.BR mkdtemp (3). +.SH SEE ALSO +.BR mktemp (1), +.BR mkdtemp (3), +.BR mkstemp (3), +.BR tempnam (3), +.BR tmpfile (3), +.BR tmpnam (3) diff --git a/upstream/opensuse-leap-15-6/man3/modf.3 b/upstream/opensuse-leap-15-6/man3/modf.3 new file mode 100644 index 00000000..2a23b5e9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/modf.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH modf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +modf, modff, modfl \- extract signed integral and fractional values from +floating-point number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double modf(double " x ", double *" iptr ); +.BI "float modff(float " x ", float *" iptr ); +.BI "long double modfl(long double " x ", long double *" iptr ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR modff (), +.BR modfl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions break the argument +.I x +into an integral +part and a fractional part, each of which has the same sign as +.IR x . +The integral part is stored in the location pointed to by +.IR iptr . +.SH RETURN VALUE +These functions return the fractional part of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned, and +.I *iptr +is set to a NaN. +.PP +If +.I x +is positive infinity (negative infinity), +0 (\-0) is returned, and +.I *iptr +is set to positive infinity (negative infinity). +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR modf (), +.BR modff (), +.BR modfl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR frexp (3), +.BR ldexp (3) diff --git a/upstream/opensuse-leap-15-6/man3/mouse.3ncurses b/upstream/opensuse-leap-15-6/man3/mouse.3ncurses new file mode 100644 index 00000000..7ef0e892 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mouse.3ncurses @@ -0,0 +1,404 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_mouse.3x,v 1.47 2017/11/18 23:52:45 tom Exp $ +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de NS +.ie n .sp +.el .sp .5 +.ie n .in +4 +.el .in +2 +.nf +.ft C \" Courier +.. +.de NE +.fi +.ft R +.in -4 +.. +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH mouse 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBhas_mouse\fR, +\fBgetmouse\fR, \fBungetmouse\fR, +\fBmousemask\fR, \fBwenclose\fR, +\fBmouse_trafo\fR, \fBwmouse_trafo\fR, +\fBmouseinterval\fR \- mouse interface through curses +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.PP +\fBtypedef unsigned long mmask_t;\fR +.PP +.nf +\fBtypedef struct {\fR +\fB short id; \fR\fI/* ID to distinguish multiple devices */\fR +\fB int x, y, z; \fR\fI/* event coordinates */\fR +\fB mmask_t bstate; \fR\fI/* button state bits */\fR +\fB} MEVENT;\fR +.fi +.PP +\fBbool has_mouse(void);\fR +.br +\fBint getmouse(MEVENT *\fP\fIevent\fP\fB);\fR +.br +\fBint ungetmouse(MEVENT *\fP\fIevent\fP\fB);\fR +.br +\fBmmask_t mousemask(mmask_t \fP\fInewmask\fP\fB, mmask_t *\fP\fIoldmask\fP\fB);\fR +.br +\fBbool wenclose(const WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBbool mouse_trafo(int* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB, bool \fP\fIto_screen\fP\fB);\fR +.br +\fBbool wmouse_trafo(const WINDOW* \fP\fIwin\fP\fB, int* \fP\fIpY\fP\fB, int* \fP\fIpX\fP\fB,\fR +.br + \fBbool \fP\fIto_screen\fP\fB);\fR +.br +\fBint mouseinterval(int \fP\fIerval\fP\fB);\fR +.br +.SH DESCRIPTION +These functions provide an interface to mouse events from +\fBncurses\fR(3NCURSES). +Mouse events are represented by \fBKEY_MOUSE\fR +pseudo-key values in the \fBwgetch\fR(3X) input stream. +.SS mousemask +.PP +To make mouse events visible, use the \fBmousemask\fR function. +This will set +the mouse events to be reported. +By default, no mouse events are reported. +The function will return a mask to indicate which of the specified mouse events +can be reported; on complete failure it returns 0. +If oldmask is non-NULL, +this function fills the indicated location with the previous value of the given +window's mouse event mask. +.PP +As a side effect, setting a zero mousemask may turn off the mouse pointer; +setting a nonzero mask may turn it on. +Whether this happens is device-dependent. +.SS Mouse events +.PP +Here are the mouse event type masks which may be defined: +.PP +.TS +l l +_ _ +l l. +\fIName\fR \fIDescription\fR +BUTTON1_PRESSED mouse button 1 down +BUTTON1_RELEASED mouse button 1 up +BUTTON1_CLICKED mouse button 1 clicked +BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked +BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked +_ +BUTTON2_PRESSED mouse button 2 down +BUTTON2_RELEASED mouse button 2 up +BUTTON2_CLICKED mouse button 2 clicked +BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked +BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked +_ +BUTTON3_PRESSED mouse button 3 down +BUTTON3_RELEASED mouse button 3 up +BUTTON3_CLICKED mouse button 3 clicked +BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked +BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked +_ +BUTTON4_PRESSED mouse button 4 down +BUTTON4_RELEASED mouse button 4 up +BUTTON4_CLICKED mouse button 4 clicked +BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked +BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked +_ +BUTTON5_PRESSED mouse button 5 down +BUTTON5_RELEASED mouse button 5 up +BUTTON5_CLICKED mouse button 5 clicked +BUTTON5_DOUBLE_CLICKED mouse button 5 double clicked +BUTTON5_TRIPLE_CLICKED mouse button 5 triple clicked +_ +BUTTON_SHIFT shift was down during button state change +BUTTON_CTRL control was down during button state change +BUTTON_ALT alt was down during button state change +ALL_MOUSE_EVENTS report all button state changes +REPORT_MOUSE_POSITION report mouse movement +_ +.TE +.SS getmouse +.PP +Once a class of mouse events has been made visible in a window, +calling the \fBwgetch\fR function on that window may return +\fBKEY_MOUSE\fR as an indicator that a mouse event has been queued. +To read the event data and pop the event off the queue, call +\fBgetmouse\fR. +This function will return \fBOK\fR if a mouse event +is actually visible in the given window, \fBERR\fR otherwise. +When \fBgetmouse\fR returns \fBOK\fR, the data deposited as y and +x in the event structure coordinates will be screen-relative character-cell +coordinates. +The returned state mask will have exactly one bit set to +indicate the event type. +The corresponding data in the queue is marked invalid. +A subsequent call to \fBgetmouse\fP will retrieve the next older +item from the queue. +.SS ungetmouse +.PP +The \fBungetmouse\fR function behaves analogously to \fBungetch\fR. +It pushes +a \fBKEY_MOUSE\fR event onto the input queue, and associates with that event +the given state data and screen-relative character-cell coordinates. +.SS wenclose +.PP +The \fBwenclose\fR function tests whether a given pair of screen-relative +character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP +if it is and \fBFALSE\fP otherwise. +It is useful for determining what subset of +the screen windows enclose the location of a mouse event. +.SS wmouse_trafo +.PP +The \fBwmouse_trafo\fR function transforms a given pair of coordinates +from stdscr-relative coordinates +to coordinates relative to the given window or vice versa. +The resulting stdscr-relative coordinates are not always identical +to window-relative coordinates due to the mechanism to reserve lines on top +or bottom of the screen for other purposes +(see the \fBripoffline\fP and \fBslk_init\fR(3X) calls, for example). +.bP +If the parameter \fBto_screen\fR is \fBTRUE\fR, the pointers +\fBpY, pX\fR must reference the coordinates of a location +inside the window \fBwin\fR. +They are converted to window-relative coordinates and returned +through the pointers. +If the conversion was successful, the function returns \fBTRUE\fR. +.bP +If one of the parameters was NULL or the location is +not inside the window, \fBFALSE\fR is returned. +.bP +If \fBto_screen\fR is +\fBFALSE\fR, the pointers \fBpY, pX\fR must reference window-relative +coordinates. +They are converted to stdscr-relative coordinates if the +window \fBwin\fR encloses this point. +In this case the function returns \fBTRUE\fR. +.bP +If one of the parameters is NULL or the point is not inside the +window, \fBFALSE\fR is returned. +The referenced coordinates +are only replaced by the converted coordinates if the transformation was +successful. +.SS mouse_trafo +.PP +The \fBmouse_trafo\fR function performs the same translation +as \fBwmouse_trafo\fR, +using stdscr for \fBwin\fR. +.SS mouseinterval +.PP +The \fBmouseinterval\fR function sets the maximum time (in thousands of a +second) that can elapse between press and release events for them to +be recognized as a click. +Use \fBmouseinterval(0)\fR to disable click resolution. +This function returns the previous interval value. +Use \fBmouseinterval(\-1)\fR to obtain the interval without altering it. +The default is one sixth of a second. +.SS has_mouse +.PP +The \fBhas_mouse\fP function returns \fBTRUE\fP if the mouse driver has been +successfully initialized. +.PP +Note that mouse events will be ignored when input is in cooked mode, and will +cause an error beep when cooked mode is being simulated in a window by a +function such as \fBgetstr\fR that expects a linefeed for input-loop +termination. +.SH RETURN VALUE +\fBgetmouse\fR and \fBungetmouse\fR +return the integer \fBERR\fR upon failure or \fBOK\fR +upon successful completion: +.RS 3 +.TP 5 +\fBgetmouse\fP +returns an error. +.bP +If no mouse driver was initialized, or +if the mask parameter is zero, +.bP +It also returns an error if no more events remain in the queue. +.TP 5 +\fBungetmouse\fP +returns an error if the FIFO is full. +.RE +.PP +\fBmousemask\fR +returns the mask of reportable events. +.PP +\fBmouseinterval\fR +returns the previous interval value, unless +the terminal was not initialized. +In that case, it returns the maximum interval value (166). +.PP +\fBwenclose\fR and \fBwmouse_trafo\fR +are boolean functions returning \fBTRUE\fR or \fBFALSE\fR depending +on their test result. +.SH PORTABILITY +These calls were designed for \fBncurses\fR(3NCURSES), and are not found in SVr4 +curses, 4.4BSD curses, or any other previous version of curses. +.PP +SVr4 curses had support for the mouse in a variant of \fBxterm\fP. +It is mentioned in a few places, but with no supporting documentation: +.bP +the \*(``libcurses\*('' manual page lists functions for this feature +which are prototyped in \fBcurses.h\fP: +.NS +extern int mouse_set(long int); +extern int mouse_on(long int); +extern int mouse_off(long int); +extern int request_mouse_pos(void); +extern int map_button(unsigned long); +extern void wmouse_position(WINDOW *, int *, int *); +extern unsigned long getmouse(void), getbmap(void); +.NE +.bP +the \*(``terminfo\*('' manual page lists capabilities for the feature +.NS +buttons btns BT Number of buttons on the mouse +get_mouse getm Gm Curses should get button events +key_mouse kmous Km 0631, Mouse event has occurred +mouse_info minfo Mi Mouse status information +req_mouse_pos reqmp RQ Request mouse position report +.NE +.bP +the interface made assumptions (as does ncurses) about the escape sequences +sent to and received from the terminal. +.IP +For instance +the SVr4 curses library used the \fBget_mouse\fP capability to tell the +terminal which mouse button events it should send, +passing the mouse-button bit-mask to the terminal. +Also, it could ask the terminal where the mouse was using the \fBreq_mouse_pos\fP capability. +.IP +Those features required a terminal which had been modified to work with curses. +They were not part of the X Consortium's xterm. +.PP +When developing the xterm mouse support for ncurses in September 1995, +Eric Raymond was uninterested in using the same interface due to its +lack of documentation. +Later, in 1998, Mark Hesseling provided support in +PDCurses 2.3 using the SVr4 interface. +PDCurses, however, does not use video terminals, +making it unnecessary to be concerned about compatibility with the +escape sequences. +.PP +The feature macro \fBNCURSES_MOUSE_VERSION\fR is provided so the preprocessor +can be used to test whether these features are present. +If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fR will be +incremented. +These values for \fBNCURSES_MOUSE_VERSION\fR may be +specified when configuring ncurses: +.RS 3 +.TP 3 +1 +has definitions for reserved events. +The mask uses 28 bits. +.TP 3 +2 +adds definitions for button 5, +removes the definitions for reserved events. +The mask uses 29 bits. +.RE +.PP +The order of the \fBMEVENT\fR structure members is not guaranteed. +Additional fields may be added to the structure in the future. +.PP +Under \fBncurses\fR(3NCURSES), these calls are implemented using either +xterm's built-in mouse-tracking API or +platform-specific drivers including +.RS 3 +.bP +Alessandro Rubini's gpm server +.bP +FreeBSD sysmouse +.bP +OS/2 EMX +.RE +.PP +If you are using an unsupported configuration, +mouse events will not be visible to +\fBncurses\fR(3NCURSES) (and the \fBmousemask\fR function will always +return \fB0\fR). +.PP +If the terminfo entry contains a \fBXM\fR string, +this is used in the xterm mouse driver to control the +way the terminal is initialized for mouse operation. +The default, if \fBXM\fR is not found, +corresponds to private mode 1000 of xterm: +.PP +.RS 3 +\\E[?1000%?%p1%{1}%=%th%el%; +.RE +.PP +The \fIz\fP member in the event structure is not presently used. +It is intended +for use with touch screens (which may be pressure-sensitive) or with +3D-mice/trackballs/power gloves. +.PP +The \fBALL_MOUSE_EVENTS\fP class does not include \fBREPORT_MOUSE_POSITION\fP. +They are distinct. +For example, in xterm, +wheel/scrolling mice send position reports as a sequence of +presses of buttons 4 or 5 without matching button-releases. +.SH BUGS +Mouse events under xterm will not in fact be ignored during cooked mode, +if they have been enabled by \fBmousemask\fR. +Instead, the xterm mouse +report sequence will appear in the string read. +.PP +Mouse events under xterm will not be detected correctly in a window with +its keypad bit off, since they are interpreted as a variety of function key. +Your terminfo description should have \fBkmous\fR set to "\\E[M" +(the beginning of the response from xterm for mouse clicks). +Other values for \fBkmous\fR are permitted, +but under the same assumption, +i.e., it is the beginning of the response. +.PP +Because there are no standard terminal responses that would serve to identify +terminals which support the xterm mouse protocol, \fBncurses\fR assumes that +if your $TERM environment variable contains "xterm", +or \fBkmous\fR is defined in +the terminal description, then the terminal may send mouse events. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBkernel\fR(3NCURSES), +\fBslk\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/move.3ncurses b/upstream/opensuse-leap-15-6/man3/move.3ncurses new file mode 100644 index 00000000..1ba18b04 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/move.3ncurses @@ -0,0 +1,63 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_move.3x,v 1.16 2017/11/21 00:46:31 tom Exp $ +.TH move 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBmove\fR, +\fBwmove\fR \- move \fBcurses\fR window cursor +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint move(int y, int x);\fR +.br +\fBint wmove(WINDOW *win, int y, int x);\fR +.br +.SH DESCRIPTION +These routines move the cursor associated with the window to line \fIy\fR and +column \fIx\fR. This routine does not move the physical cursor of the terminal +until \fBrefresh\fR(3X) is called. The position specified is relative to the upper +left-hand corner of the window, which is (0,0). +.SH RETURN VALUE +These routines return \fBERR\fR upon failure and \fBOK\fP (SVr4 +specifies only "an integer value other than \fBERR\fR") upon successful +completion. +.PP +Specifically, they return an error +if the window pointer is null, or +if the position is outside the window. +.SH NOTES +Note that \fBmove\fR may be a macro. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBrefresh\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/mpool.3 b/upstream/opensuse-leap-15-6/man3/mpool.3 new file mode 100644 index 00000000..2dca8651 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mpool.3 @@ -0,0 +1,205 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)mpool.3 8.1 (Berkeley) 6/4/93 +.\" +.TH mpool 3 2023-03-30 "Linux man-pages 6.04" +.UC 7 +.SH NAME +mpool \- shared memory buffer pool +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "MPOOL *mpool_open(DBT *" key ", int " fd ", pgno_t " pagesize \ +", pgno_t " maxcache ); +.PP +.BI "void mpool_filter(MPOOL *" mp ", void (*pgin)(void *, pgno_t, void *)," +.BI " void (*" pgout ")(void *, pgno_t, void *)," +.BI " void *" pgcookie ); +.PP +.BI "void *mpool_new(MPOOL *" mp ", pgno_t *" pgnoaddr ); +.BI "void *mpool_get(MPOOL *" mp ", pgno_t " pgno ", unsigned int " flags ); +.BI "int mpool_put(MPOOL *" mp ", void *" pgaddr ", unsigned int " flags ); +.PP +.BI "int mpool_sync(MPOOL *" mp ); +.BI "int mpool_close(MPOOL *" mp ); +.fi +.SH DESCRIPTION +.IR "Note well" : +This page documents interfaces provided up until glibc 2.1. +Since glibc 2.2, glibc no longer provides these interfaces. +Probably, you are looking for the APIs provided by the +.I libdb +library instead. +.PP +.I Mpool +is the library interface intended to provide page oriented buffer management +of files. +The buffers may be shared between processes. +.PP +The function +.BR mpool_open () +initializes a memory pool. +The +.I key +argument is the byte string used to negotiate between multiple +processes wishing to share buffers. +If the file buffers are mapped in shared memory, all processes using +the same key will share the buffers. +If +.I key +is NULL, the buffers are mapped into private memory. +The +.I fd +argument is a file descriptor for the underlying file, which must be seekable. +If +.I key +is non-NULL and matches a file already being mapped, the +.I fd +argument is ignored. +.PP +The +.I pagesize +argument is the size, in bytes, of the pages into which the file is broken up. +The +.I maxcache +argument is the maximum number of pages from the underlying file to cache +at any one time. +This value is not relative to the number of processes which share a file's +buffers, but will be the largest value specified by any of the processes +sharing the file. +.PP +The +.BR mpool_filter () +function is intended to make transparent input and output processing of the +pages possible. +If the +.I pgin +function is specified, it is called each time a buffer is read into the memory +pool from the backing file. +If the +.I pgout +function is specified, it is called each time a buffer is written into the +backing file. +Both functions are called with the +.I pgcookie +pointer, the page number and a pointer to the page to being read or written. +.PP +The function +.BR mpool_new () +takes an +.I MPOOL +pointer and an address as arguments. +If a new page can be allocated, a pointer to the page is returned and +the page number is stored into the +.I pgnoaddr +address. +Otherwise, NULL is returned and +.I errno +is set. +.PP +The function +.BR mpool_get () +takes an +.I MPOOL +pointer and a page number as arguments. +If the page exists, a pointer to the page is returned. +Otherwise, NULL is returned and +.I errno +is set. +The +.I flags +argument is not currently used. +.PP +The function +.BR mpool_put () +unpins the page referenced by +.IR pgaddr . +.I pgaddr +must be an address previously returned by +.BR mpool_get () +or +.BR mpool_new (). +The flag value is specified by ORing +any of the following values: +.TP +.B MPOOL_DIRTY +The page has been modified and needs to be written to the backing file. +.PP +.BR mpool_put () +returns 0 on success and \-1 if an error occurs. +.PP +The function +.BR mpool_sync () +writes all modified pages associated with the +.I MPOOL +pointer to the +backing file. +.BR mpool_sync () +returns 0 on success and \-1 if an error occurs. +.PP +The +.BR mpool_close () +function free's up any allocated memory associated with the memory pool +cookie. +Modified pages are +.B not +written to the backing file. +.BR mpool_close () +returns 0 on success and \-1 if an error occurs. +.SH ERRORS +The +.BR mpool_open () +function may fail and set +.I errno +for any of the errors specified for the library routine +.BR malloc (3). +.PP +The +.BR mpool_get () +function may fail and set +.I errno +for the following: +.TP 15 +.B EINVAL +The requested record doesn't exist. +.PP +The +.BR mpool_new () +and +.BR mpool_get () +functions may fail and set +.I errno +for any of the errors specified for the library routines +.BR read (2), +.BR write (2), +and +.BR malloc (3). +.PP +The +.BR mpool_sync () +function may fail and set +.I errno +for any of the errors specified for the library routine +.BR write (2). +.PP +The +.BR mpool_close () +function may fail and set +.I errno +for any of the errors specified for the library routine +.BR free (3). +.SH STANDARDS +BSD. +.SH SEE ALSO +.BR btree (3), +.BR dbopen (3), +.BR hash (3), +.BR recno (3) diff --git a/upstream/opensuse-leap-15-6/man3/mq_close.3 b/upstream/opensuse-leap-15-6/man3/mq_close.3 new file mode 100644 index 00000000..55e370bb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_close.3 @@ -0,0 +1,73 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_close 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_close \- close a message queue descriptor +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mq_close(mqd_t " mqdes ); +.fi +.SH DESCRIPTION +.BR mq_close () +closes the message queue descriptor +.IR mqdes . +.PP +If the calling process has attached a notification request (see +.BR mq_notify (3)) +to this message queue via +.IR mqdes , +then this request is removed, +and another process can now attach a notification request. +.SH RETURN VALUE +On success +.BR mq_close () +returns 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EBADF +The message queue descriptor specified in +.I mqdes +is invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_close () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +All open message queues are automatically closed on process termination, +or upon +.BR execve (2). +.SH SEE ALSO +.BR mq_getattr (3), +.BR mq_notify (3), +.BR mq_open (3), +.BR mq_receive (3), +.BR mq_send (3), +.BR mq_unlink (3), +.BR mq_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_getattr.3 b/upstream/opensuse-leap-15-6/man3/mq_getattr.3 new file mode 100644 index 00000000..e85da502 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_getattr.3 @@ -0,0 +1,232 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_getattr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_getattr, mq_setattr \- get/set message queue attributes +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mq_getattr(mqd_t " mqdes ", struct mq_attr *" attr ); +.BI "int mq_setattr(mqd_t " mqdes ", const struct mq_attr *restrict " newattr , +.BI " struct mq_attr *restrict " oldattr ); +.fi +.SH DESCRIPTION +.BR mq_getattr () +and +.BR mq_setattr () +respectively retrieve and modify attributes of the message queue +referred to by the message queue descriptor +.IR mqdes . +.PP +.BR mq_getattr () +returns an +.I mq_attr +structure in the buffer pointed by +.IR attr . +This structure is defined as: +.PP +.in +4n +.EX +struct mq_attr { + long mq_flags; /* Flags: 0 or O_NONBLOCK */ + long mq_maxmsg; /* Max. # of messages on queue */ + long mq_msgsize; /* Max. message size (bytes) */ + long mq_curmsgs; /* # of messages currently in queue */ +}; +.EE +.in +.PP +The +.I mq_flags +field contains flags associated with the open message queue description. +This field is initialized when the queue is created by +.BR mq_open (3). +The only flag that can appear in this field is +.BR O_NONBLOCK . +.PP +The +.I mq_maxmsg +and +.I mq_msgsize +fields are set when the message queue is created by +.BR mq_open (3). +The +.I mq_maxmsg +field is an upper limit on the number of messages +that may be placed on the queue using +.BR mq_send (3). +The +.I mq_msgsize +field is an upper limit on the size of messages +that may be placed on the queue. +Both of these fields must have a value greater than zero. +Two +.I /proc +files that place ceilings on the values for these fields are described in +.BR mq_overview (7). +.PP +The +.I mq_curmsgs +field returns the number of messages currently held in the queue. +.PP +.BR mq_setattr () +sets message queue attributes using information supplied in the +.I mq_attr +structure pointed to by +.IR newattr . +The only attribute that can be modified is the setting of the +.B O_NONBLOCK +flag in +.IR mq_flags . +The other fields in +.I newattr +are ignored. +If the +.I oldattr +field is not NULL, +then the buffer that it points to is used to return an +.I mq_attr +structure that contains the same information that is returned by +.BR mq_getattr (). +.SH RETURN VALUE +On success +.BR mq_getattr () +and +.BR mq_setattr () +return 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EBADF +The message queue descriptor specified in +.I mqdes +is invalid. +.TP +.B EINVAL +.I newattr\->mq_flags +contained set bits other than +.BR O_NONBLOCK . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_getattr (), +.BR mq_setattr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, +.BR mq_getattr () +and +.BR mq_setattr () +are library functions layered on top of the +.BR mq_getsetattr (2) +system call. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The program below can be used to show the default +.I mq_maxmsg +and +.I mq_msgsize +values that are assigned to a message queue that is created with a call to +.BR mq_open (3) +in which the +.I attr +argument is NULL. +Here is an example run of the program: +.PP +.in +4n +.EX +$ \fB./a.out /testq\fP +Maximum # of messages on queue: 10 +Maximum message size: 8192 +.EE +.in +.PP +Since Linux 3.5, the following +.I /proc +files (described in +.BR mq_overview (7)) +can be used to control the defaults: +.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 Program source +\& +.\" SRC BEGIN (mq_getattr.c) +.EX +#include +#include +#include +#include +#include +#include + +#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, 0600, 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 +.\" SRC END +.SH SEE ALSO +.BR mq_close (3), +.BR mq_notify (3), +.BR mq_open (3), +.BR mq_receive (3), +.BR mq_send (3), +.BR mq_unlink (3), +.BR mq_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_notify.3 b/upstream/opensuse-leap-15-6/man3/mq_notify.3 new file mode 100644 index 00000000..6bf2c4ea --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_notify.3 @@ -0,0 +1,276 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_notify 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_notify \- register for notification when a message is available +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.BR "#include " "/* Definition of SIGEV_* constants */" +.PP +.BI "int mq_notify(mqd_t " mqdes ", const struct sigevent *" sevp ); +.fi +.SH DESCRIPTION +.BR mq_notify () +allows the calling process to register or unregister for delivery of +an asynchronous notification when a new message arrives on +the empty message queue referred to by the message queue descriptor +.IR mqdes . +.PP +The +.I sevp +argument is a pointer to a +.I sigevent +structure. +For the definition and general details of this structure, see +.BR sigevent (7). +.PP +If +.I sevp +is a non-null pointer, then +.BR mq_notify () +registers the calling process to receive message notification. +The +.I sigev_notify +field of the +.I sigevent +structure to which +.I sevp +points specifies how notification is to be performed. +This field has one of the following values: +.TP +.B SIGEV_NONE +A "null" notification: the calling process is registered as the target +for notification, but when a message arrives, no notification is sent. +.\" When is SIGEV_NONE useful? +.TP +.B SIGEV_SIGNAL +Notify the process by sending the signal specified in +.IR sigev_signo . +See +.BR sigevent (7) +for general details. +The +.I si_code +field of the +.I siginfo_t +structure will be set to +.BR SI_MESGQ . +In addition, +.\" I don't know of other implementations that set +.\" si_pid and si_uid -- MTK +.I si_pid +will be set to the PID of the process that sent the message, and +.I si_uid +will be set to the real user ID of the sending process. +.TP +.B SIGEV_THREAD +Upon message delivery, invoke +.I sigev_notify_function +as if it were the start function of a new thread. +See +.BR sigevent (7) +for details. +.PP +Only one process can be registered to receive notification +from a message queue. +.PP +If +.I sevp +is NULL, and the calling process is currently registered to receive +notifications for this message queue, then the registration is removed; +another process can then register to receive a message notification +for this queue. +.PP +Message notification occurs only when a new message arrives and +the queue was previously empty. +If the queue was not empty at the time +.BR mq_notify () +was called, then a notification will occur only after +the queue is emptied and a new message arrives. +.PP +If another process or thread is waiting to read a message +from an empty queue using +.BR mq_receive (3), +then any message notification registration is ignored: +the message is delivered to the process or thread calling +.BR mq_receive (3), +and the message notification registration remains in effect. +.PP +Notification occurs once: after a notification is delivered, +the notification registration is removed, +and another process can register for message notification. +If the notified process wishes to receive the next notification, +it can use +.BR mq_notify () +to request a further notification. +This should be done before emptying all unread messages from the queue. +(Placing the queue in nonblocking mode is useful for emptying +the queue of messages without blocking once it is empty.) +.SH RETURN VALUE +On success +.BR mq_notify () +returns 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EBADF +The message queue descriptor specified in +.I mqdes +is invalid. +.TP +.B EBUSY +Another process has already registered to receive notification +for this message queue. +.TP +.B EINVAL +.I sevp\->sigev_notify +is not one of the permitted values; or +.I sevp\->sigev_notify +is +.B SIGEV_SIGNAL +and +.I sevp\->sigev_signo +is not a valid signal number. +.TP +.B ENOMEM +Insufficient memory. +.PP +POSIX.1-2008 says that an implementation +.I may +generate an +.B EINVAL +.\" Linux does not do this +error if +.I sevp +is NULL, and the caller is not currently registered to receive +notifications for the queue +.IR mqdes . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_notify () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.SS C library/kernel differences +In the glibc implementation, the +.BR mq_notify () +library function is implemented on top of the system call of the same name. +When +.I sevp +is NULL, or specifies a notification mechanism other than +.BR SIGEV_THREAD , +the library function directly invokes the system call. +For +.BR SIGEV_THREAD , +much of the implementation resides within the library, +rather than the kernel. +(This is necessarily so, +since the thread involved in handling the notification is one +that must be managed by the C library POSIX threads implementation.) +The implementation involves the use of a raw +.BR netlink (7) +socket and creates a new thread for each notification that is +delivered to the process. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The following program registers a notification request for the +message queue named in its command-line argument. +Notification is performed by creating a thread. +The thread executes a function which reads one message from the +queue and then terminates the process. +.SS Program source +.\" SRC BEGIN (mq_notify.c) +.EX +#include +#include +#include +#include +#include +#include + +#define handle_error(msg) \e + do { perror(msg); exit(EXIT_FAILURE); } while (0) + +static void /* Thread start function */ +tfunc(union sigval sv) +{ + struct mq_attr attr; + ssize_t nr; + void *buf; + mqd_t mqdes = *((mqd_t *) sv.sival_ptr); + + /* Determine max. msg size; allocate buffer to receive msg */ + + if (mq_getattr(mqdes, &attr) == \-1) + handle_error("mq_getattr"); + buf = malloc(attr.mq_msgsize); + if (buf == NULL) + handle_error("malloc"); + + nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL); + if (nr == \-1) + handle_error("mq_receive"); + + printf("Read %zd bytes from MQ\en", nr); + free(buf); + exit(EXIT_SUCCESS); /* Terminate the process */ +} + +int +main(int argc, char *argv[]) +{ + mqd_t mqdes; + struct sigevent sev; + + if (argc != 2) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + mqdes = mq_open(argv[1], O_RDONLY); + if (mqdes == (mqd_t) \-1) + handle_error("mq_open"); + + sev.sigev_notify = SIGEV_THREAD; + sev.sigev_notify_function = tfunc; + sev.sigev_notify_attributes = NULL; + sev.sigev_value.sival_ptr = &mqdes; /* Arg. to thread func. */ + if (mq_notify(mqdes, &sev) == \-1) + handle_error("mq_notify"); + + pause(); /* Process will be terminated by thread function */ +} +.EE +.\" SRC END +.SH SEE ALSO +.BR mq_close (3), +.BR mq_getattr (3), +.BR mq_open (3), +.BR mq_receive (3), +.BR mq_send (3), +.BR mq_unlink (3), +.BR mq_overview (7), +.BR sigevent (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_open.3 b/upstream/opensuse-leap-15-6/man3/mq_open.3 new file mode 100644 index 00000000..457fa536 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_open.3 @@ -0,0 +1,301 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_open 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_open \- open a message queue +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.BR "#include " " /* For O_* constants */" +.BR "#include " " /* For mode constants */" +.B #include +.PP +.BI "mqd_t mq_open(const char *" name ", int " oflag ); +.BI "mqd_t mq_open(const char *" name ", int " oflag ", mode_t " mode , +.BI " struct mq_attr *" attr ); +.fi +.SH DESCRIPTION +.BR mq_open () +creates a new POSIX message queue or opens an existing queue. +The queue is identified by +.IR name . +For details of the construction of +.IR name , +see +.BR mq_overview (7). +.PP +The +.I oflag +argument specifies flags that control the operation of the call. +(Definitions of the flags values can be obtained by including +.IR .) +Exactly one of the following must be specified in +.IR oflag : +.TP +.B O_RDONLY +Open the queue to receive messages only. +.TP +.B O_WRONLY +Open the queue to send messages only. +.TP +.B O_RDWR +Open the queue to both send and receive messages. +.PP +Zero or more of the following flags can additionally be +.IR OR ed +in +.IR oflag : +.TP +.BR O_CLOEXEC " (since Linux 2.6.26)" +.\" commit 269f21344b23e552c21c9e2d7ca258479dcd7a0a +Set the close-on-exec flag for the message queue descriptor. +See +.BR open (2) +for a discussion of why this flag is useful. +.TP +.B O_CREAT +Create the message queue if it does not exist. +The owner (user ID) of the message queue is set to the effective +user ID of the calling process. +The group ownership (group ID) is set to the effective group ID +of the calling process. +.\" In reality the filesystem IDs are used on Linux. +.TP +.B O_EXCL +If +.B O_CREAT +was specified in +.IR oflag , +and a queue with the given +.I name +already exists, then fail with the error +.BR EEXIST . +.TP +.B O_NONBLOCK +Open the queue in nonblocking mode. +In circumstances where +.BR mq_receive (3) +and +.BR mq_send (3) +would normally block, these functions instead fail with the error +.BR EAGAIN . +.PP +If +.B O_CREAT +is specified in +.IR oflag , +then two additional arguments must be supplied. +The +.I mode +argument specifies the permissions to be placed on the new queue, +as for +.BR open (2). +(Symbolic definitions for the permissions bits can be obtained by including +.IR .) +The permissions settings are masked against the process umask. +.PP +The fields of the +.I struct mq_attr +pointed to +.I attr +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 +.I mq_maxmsg +and +.I mq_msgsize +fields are employed when calling +.BR mq_open (); +the values in the remaining fields are ignored. +.PP +If +.I attr +is NULL, then the queue is created with implementation-defined +default attributes. +Since Linux 3.5, two +.I /proc +files can be used to control these defaults; see +.BR mq_overview (7) +for details. +.SH RETURN VALUE +On success, +.BR mq_open () +returns a message queue descriptor for use by other +message queue functions. +On error, +.BR mq_open () +returns +.IR "(mqd_t)\ \-1", +with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EACCES +The queue exists, but the caller does not have permission to +open it in the specified mode. +.TP +.B EACCES +.I name +contained more than one slash. +.\" Note that this isn't consistent with the same case for sem_open() +.TP +.B EEXIST +Both +.B O_CREAT +and +.B O_EXCL +were specified in +.IR oflag , +but a queue with this +.I name +already exists. +.TP +.B EINVAL +.\" glibc checks whether the name starts with a "/" and if not, +.\" gives this error +.I name +doesn't follow the format in +.BR mq_overview (7). +.TP +.B EINVAL +.B O_CREAT +was specified in +.IR oflag , +and +.I attr +was not NULL, but +.I attr\->mq_maxmsg +or +.I attr\->mq_msqsize +was invalid. +Both of these fields must be greater than zero. +In a process that is unprivileged (does not have the +.B CAP_SYS_RESOURCE +capability), +.I attr\->mq_maxmsg +must be less than or equal to the +.I msg_max +limit, and +.I attr\->mq_msgsize +must be less than or equal to the +.I msgsize_max +limit. +In addition, even in a privileged process, +.I attr\->mq_maxmsg +cannot exceed the +.B HARD_MAX +limit. +(See +.BR mq_overview (7) +for details of these limits.) +.TP +.B EMFILE +The per-process limit on the number of open file +and message queue descriptors has been reached +(see the description of +.B RLIMIT_NOFILE +in +.BR getrlimit (2)). +.TP +.B ENAMETOOLONG +.I name +was too long. +.TP +.B ENFILE +The system-wide limit on the total number of open files +and message queues has been reached. +.TP +.B ENOENT +The +.B O_CREAT +flag was not specified in +.IR oflag , +and no queue with this +.I name +exists. +.TP +.B ENOENT +.I name +was just "/" followed by no other characters. +.\" Note that this isn't consistent with the same case for sem_open() +.TP +.B ENOMEM +Insufficient memory. +.TP +.B ENOSPC +Insufficient space for the creation of a new message queue. +This probably occurred because the +.I queues_max +limit was encountered; see +.BR mq_overview (7). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_open () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.SS C library/kernel differences +The +.BR mq_open () +library function is implemented on top of a system call of the same name. +The library function performs the check that the +.I name +starts with a slash (/), giving the +.B EINVAL +error if it does not. +The kernel system call expects +.I name +to contain no preceding slash, +so the C library function passes +.I name +without the preceding slash (i.e., +.IR name+1 ) +to the system call. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH BUGS +Before Linux 2.6.14, +the process umask was not applied to the permissions specified in +.IR mode . +.SH SEE ALSO +.BR mq_close (3), +.BR mq_getattr (3), +.BR mq_notify (3), +.BR mq_receive (3), +.BR mq_send (3), +.BR mq_unlink (3), +.BR mq_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_receive.3 b/upstream/opensuse-leap-15-6/man3/mq_receive.3 new file mode 100644 index 00000000..2270e522 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_receive.3 @@ -0,0 +1,166 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_receive 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_receive, mq_timedreceive \- receive a message from a message queue +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "ssize_t mq_receive(mqd_t " mqdes ", char " msg_ptr [. msg_len ], +.BI " size_t " msg_len ", unsigned int *" msg_prio ); +.PP +.B #include +.B #include +.PP +.BI "ssize_t mq_timedreceive(mqd_t " mqdes ", \ +char *restrict " msg_ptr [. msg_len ], +.BI " size_t " msg_len ", unsigned int *restrict " msg_prio , +.BI " const struct timespec *restrict " abs_timeout ); +.fi +.PP +.ad l +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mq_timedreceive (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.BR mq_receive () +removes the oldest message with the highest priority from +the message queue referred to by the message queue descriptor +.IR mqdes , +and places it in the buffer pointed to by +.IR msg_ptr . +The +.I msg_len +argument specifies the size of the buffer pointed to by +.IR msg_ptr ; +this must be greater than or equal to the +.I mq_msgsize +attribute of the queue (see +.BR mq_getattr (3)). +If +.I msg_prio +is not NULL, then the buffer to which it points is used +to return the priority associated with the received message. +.PP +If the queue is empty, then, by default, +.BR mq_receive () +blocks until a message becomes available, +or the call is interrupted by a signal handler. +If the +.B O_NONBLOCK +flag is enabled for the message queue description, +then the call instead fails immediately with the error +.BR EAGAIN . +.PP +.BR mq_timedreceive () +behaves just like +.BR mq_receive (), +except that if the queue is empty and the +.B O_NONBLOCK +flag is not enabled for the message queue description, then +.I abs_timeout +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 a +.BR timespec (3) +structure. +.PP +If no message is available, +and the timeout has already expired by the time of the call, +.BR mq_timedreceive () +returns immediately. +.SH RETURN VALUE +On success, +.BR mq_receive () +and +.BR mq_timedreceive () +return the number of bytes in the received message; +on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +The queue was empty, and the +.B O_NONBLOCK +flag was set for the message queue description referred to by +.IR mqdes . +.TP +.B EBADF +The descriptor specified in +.I mqdes +was invalid or not opened for reading. +.TP +.B EINTR +The call was interrupted by a signal handler; see +.BR signal (7). +.TP +.B EINVAL +The call would have blocked, and +.I abs_timeout +was invalid, either because +.I tv_sec +was less than zero, or because +.I tv_nsec +was less than zero or greater than 1000 million. +.TP +.B EMSGSIZE +.I msg_len +was less than the +.I mq_msgsize +attribute of the message queue. +.TP +.B ETIMEDOUT +The call timed out before a message could be transferred. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_receive (), +.BR mq_timedreceive () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, +.BR mq_timedreceive () +is a system call, and +.BR mq_receive () +is a library function layered on top of that system call. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR mq_close (3), +.BR mq_getattr (3), +.BR mq_notify (3), +.BR mq_open (3), +.BR mq_send (3), +.BR mq_unlink (3), +.BR timespec (3), +.BR mq_overview (7), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_send.3 b/upstream/opensuse-leap-15-6/man3/mq_send.3 new file mode 100644 index 00000000..9def3137 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_send.3 @@ -0,0 +1,173 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_send 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_send, mq_timedsend \- send a message to a message queue +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mq_send(mqd_t " mqdes ", const char " msg_ptr [. msg_len ], +.BI " size_t " msg_len ", unsigned int " msg_prio ); +.PP +.B #include +.B #include +.PP +.BI "int mq_timedsend(mqd_t " mqdes ", const char " msg_ptr [. msg_len ], +.BI " size_t " msg_len ", unsigned int " msg_prio , +.BI " const struct timespec *" abs_timeout ); +.fi +.PP +.ad l +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR mq_timedsend (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.BR mq_send () +adds the message pointed to by +.I msg_ptr +to the message queue referred to by the message queue descriptor +.IR mqdes . +The +.I msg_len +argument specifies the length of the message pointed to by +.IR msg_ptr ; +this length must be less than or equal to the queue's +.I mq_msgsize +attribute. +Zero-length messages are allowed. +.PP +The +.I msg_prio +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 +.BR mq_overview (7) +for details on the range for the message priority. +.PP +If the message queue is already full +(i.e., the number of messages on the queue equals the queue's +.I mq_maxmsg +attribute), then, by default, +.BR mq_send () +blocks until sufficient space becomes available to allow the message +to be queued, or until the call is interrupted by a signal handler. +If the +.B O_NONBLOCK +flag is enabled for the message queue description, +then the call instead fails immediately with the error +.BR EAGAIN . +.PP +.BR mq_timedsend () +behaves just like +.BR mq_send (), +except that if the queue is full and the +.B O_NONBLOCK +flag is not enabled for the message queue description, then +.I abs_timeout +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 a +.BR timespec (3) +structure. +.PP +If the message queue is full, +and the timeout has already expired by the time of the call, +.BR mq_timedsend () +returns immediately. +.SH RETURN VALUE +On success, +.BR mq_send () +and +.BR mq_timedsend () +return zero; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +The queue was full, and the +.B O_NONBLOCK +flag was set for the message queue description referred to by +.IR mqdes . +.TP +.B EBADF +The descriptor specified in +.I mqdes +was invalid or not opened for writing. +.TP +.B EINTR +The call was interrupted by a signal handler; see +.BR signal (7). +.TP +.B EINVAL +The call would have blocked, and +.I abs_timeout +was invalid, either because +.I tv_sec +was less than zero, or because +.I tv_nsec +was less than zero or greater than 1000 million. +.TP +.B EMSGSIZE +.I msg_len +was greater than the +.I mq_msgsize +attribute of the message queue. +.TP +.B ETIMEDOUT +The call timed out before a message could be transferred. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_send (), +.BR mq_timedsend () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, +.BR mq_timedsend () +is a system call, and +.BR mq_send () +is a library function layered on top of that system call. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR mq_close (3), +.BR mq_getattr (3), +.BR mq_notify (3), +.BR mq_open (3), +.BR mq_receive (3), +.BR mq_unlink (3), +.BR timespec (3), +.BR mq_overview (7), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/mq_unlink.3 b/upstream/opensuse-leap-15-6/man3/mq_unlink.3 new file mode 100644 index 00000000..5d90a8aa --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mq_unlink.3 @@ -0,0 +1,71 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mq_unlink 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mq_unlink \- remove a message queue +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int mq_unlink(const char *" name ); +.fi +.SH DESCRIPTION +.BR mq_unlink () +removes the specified message queue +.IR name . +The message queue name is removed immediately. +The queue itself is destroyed once any other processes that have +the queue open close their descriptors referring to the queue. +.SH RETURN VALUE +On success +.BR mq_unlink () +returns 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EACCES +The caller does not have permission to unlink this message queue. +.TP +.B ENAMETOOLONG +.I name +was too long. +.TP +.B ENOENT +There is no message queue with the given +.IR name . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mq_unlink () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR mq_close (3), +.BR mq_getattr (3), +.BR mq_notify (3), +.BR mq_open (3), +.BR mq_receive (3), +.BR mq_send (3), +.BR mq_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/mtrace.3 b/upstream/opensuse-leap-15-6/man3/mtrace.3 new file mode 100644 index 00000000..bd4efa48 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/mtrace.3 @@ -0,0 +1,183 @@ +'\" t +.\" Copyright (c) 2012 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH mtrace 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +mtrace, muntrace \- malloc tracing +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.B "void mtrace(void);" +.B "void muntrace(void);" +.fi +.SH DESCRIPTION +The +.BR mtrace () +function installs hook functions for the memory-allocation functions +.RB ( malloc (3), +.BR realloc (3) +.BR memalign (3), +.BR free (3)). +These hook functions record tracing information about memory allocation +and deallocation. +The tracing information can be used to discover memory leaks and +attempts to free nonallocated memory in a program. +.PP +The +.BR muntrace () +function disables the hook functions installed by +.BR mtrace (), +so that tracing information is no longer recorded +for the memory-allocation functions. +If no hook functions were successfully installed by +.BR mtrace (), +.BR muntrace () +does nothing. +.PP +When +.BR mtrace () +is called, it checks the value of the environment variable +.BR MALLOC_TRACE , +which should contain the pathname of a file in which +the tracing information is to be recorded. +If the pathname is successfully opened, it is truncated to zero length. +.PP +If +.B MALLOC_TRACE +is not set, +or the pathname it specifies is invalid or not writable, +then no hook functions are installed, and +.BR mtrace () +has no effect. +In set-user-ID and set-group-ID programs, +.B MALLOC_TRACE +is ignored, and +.BR mtrace () +has no effect. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR mtrace (), +.BR muntrace () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.\" FIXME: The marking is different from that in the glibc manual, +.\" markings in glibc manual are more detailed: +.\" +.\" mtrace: MT-Unsafe env race:mtrace const:malloc_hooks init +.\" muntrace: MT-Unsafe race:mtrace const:malloc_hooks locale +.\" +.\" But there is something wrong in glibc manual, for example: +.\" glibc manual says muntrace should have marking locale because it calls +.\" fprintf(), but muntrace does not execute area which cause locale problem. +.SH STANDARDS +GNU. +.SH NOTES +In normal usage, +.BR mtrace () +is called once at the start of execution of a program, and +.BR muntrace () +is never called. +.PP +The tracing output produced after a call to +.BR mtrace () +is textual, but not designed to be human readable. +The GNU C library provides a Perl script, +.BR mtrace (1), +that interprets the trace log and produces human-readable output. +For best results, +the traced program should be compiled with debugging enabled, +so that line-number information is recorded in the executable. +.PP +The tracing performed by +.BR mtrace () +incurs a performance penalty (if +.B MALLOC_TRACE +points to a valid, writable pathname). +.SH BUGS +The line-number information produced by +.BR mtrace (1) +is not always precise: +the line number references may refer to the previous or following (nonblank) +line of the source code. +.SH EXAMPLES +The shell session below demonstrates the use of the +.BR mtrace () +function and the +.BR mtrace (1) +command in a program that has memory leaks at two different locations. +The demonstration uses the following program: +.PP +.in +4n +.RB "$ " "cat t_mtrace.c" +.\" SRC BEGIN (t_mtrace.c) +.EX +#include +#include +#include + +int +main(void) +{ + mtrace(); + + for (unsigned int j = 0; j < 2; j++) + malloc(100); /* Never freed\-\-a memory leak */ + + calloc(16, 16); /* Never freed\-\-a memory leak */ + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.PP +When we run the program as follows, we see that +.BR mtrace () +diagnosed memory leaks at two different locations in the program: +.PP +.in +4n +.EX +.RB "$ " "cc \-g t_mtrace.c \-o t_mtrace" +.RB "$ " "export MALLOC_TRACE=/tmp/t" +.RB "$ " "./t_mtrace" +.RB "$ " "mtrace ./t_mtrace $MALLOC_TRACE" +Memory not freed: +-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- + Address Size Caller +0x084c9378 0x64 at /home/cecilia/t_mtrace.c:12 +0x084c93e0 0x64 at /home/cecilia/t_mtrace.c:12 +0x084c9448 0x100 at /home/cecilia/t_mtrace.c:16 +.EE +.in +.PP +The first two messages about unfreed memory correspond to the two +.BR malloc (3) +calls inside the +.I for +loop. +The final message corresponds to the call to +.BR calloc (3) +(which in turn calls +.BR malloc (3)). +.SH SEE ALSO +.BR mtrace (1), +.BR malloc (3), +.BR malloc_hook (3), +.BR mcheck (3) diff --git a/upstream/opensuse-leap-15-6/man3/nan.3 b/upstream/opensuse-leap-15-6/man3/nan.3 new file mode 100644 index 00000000..42a670c3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/nan.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Based on glibc infopages +.\" +.\" Corrections by aeb +.\" +.TH nan 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +nan, nanf, nanl \- return 'Not a Number' +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double nan(const char *" tagp ); +.BI "float nanf(const char *" tagp ); +.BI "long double nanl(const char *" tagp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR nan (), +.BR nanf (), +.BR nanl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions return a representation (determined by +.IR tagp ) +of a quiet NaN. +If the implementation does not support +quiet NaNs, these functions return zero. +.PP +The call +.I nan("char\-sequence") +is equivalent to: +.PP +.in +4n +.EX +strtod("NAN(char\-sequence)", NULL); +.EE +.in +.PP +Similarly, calls to +.BR nanf () +and +.BR nanl () +are equivalent to analogous calls to +.BR strtof (3) +and +.BR strtold (3). +.PP +The argument +.I tagp +is used in an unspecified manner. +On IEEE 754 systems, there are many representations of NaN, and +.I tagp +selects one. +On other systems it may do nothing. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nan (), +.BR nanf (), +.BR nanl () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.PP +See also IEC 559 and the appendix with +recommended functions in IEEE 754/IEEE 854. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR isnan (3), +.BR strtod (3), +.BR math_error (7) diff --git a/upstream/opensuse-leap-15-6/man3/ncurses.3ncurses b/upstream/opensuse-leap-15-6/man3/ncurses.3ncurses new file mode 100644 index 00000000..4e8a30df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ncurses.3ncurses @@ -0,0 +1,1388 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: ncurses.3x,v 1.136 2017/11/18 23:48:44 tom Exp $ +.hy 0 +.TH ncurses 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.de NS +.ie n .sp +.el .sp .5 +.ie n .in +4 +.el .in +2 +.nf +.ft C \" Courier +.. +.de NE +.fi +.ft R +.in -4 +.. +.ds n 5 +.ds d /usr/share/terminfo +.SH NAME +\fBncurses\fR \- CRT screen handling and optimization package +.SH SYNOPSIS +\fB#include \fR +.br +.SH DESCRIPTION +The \fBncurses\fR library routines give the user a terminal-independent method +of updating character screens with reasonable optimization. +This implementation is \*(``new curses\*('' (ncurses) and +is the approved replacement for +4.4BSD classic curses, which has been discontinued. +This describes \fBncurses\fR +version 6.1 (patch 20180317). +.PP +The \fBncurses\fR library emulates the curses library of +System V Release 4 UNIX, +and XPG4 (X/Open Portability Guide) curses (also known as XSI curses). +XSI stands for X/Open System Interfaces Extension. +The \fBncurses\fR library is freely redistributable in source form. +Differences from the SVr4 +curses are summarized under the +\fBEXTENSIONS\fP and \fBPORTABILITY\fP sections below and +described in detail in the respective +\fBEXTENSIONS\fP, \fBPORTABILITY\fP and \fBBUGS\fP sections +of individual man pages. +.PP +The \fBncurses\fR library also provides many useful extensions, +i.e., features which cannot be implemented by a simple add-on library +but which require access to the internals of the library. +.PP +A program using these routines must be linked with the \fB\-lncurses\fR option, +or (if it has been generated) with the debugging library \fB\-lncurses_g\fR. +(Your system integrator may also have installed these libraries under +the names \fB\-lcurses\fR and \fB\-lcurses_g\fR.) +The ncurses_g library generates trace logs (in a file called 'trace' in the +current directory) that describe curses actions. +See also the section on \fBALTERNATE CONFIGURATIONS\fP. +.PP +The \fBncurses\fR package supports: overall screen, window and pad +manipulation; output to windows and pads; reading terminal input; control over +terminal and \fBcurses\fR input and output options; environment query +routines; color manipulation; use of soft label keys; terminfo capabilities; +and access to low-level terminal-manipulation routines. +.SS Initialization +.PP +The library uses the locale which the calling program has initialized. +That is normally done with \fBsetlocale\fP: +.NS +\fBsetlocale(LC_ALL, "");\fP +.NE +.PP +If the locale is not initialized, +the library assumes that characters are printable as in ISO\-8859\-1, +to work with certain legacy programs. +You should initialize the locale and not rely on specific details of +the library when the locale has not been setup. +.PP +The function \fBinitscr\fR or \fBnewterm\fR +must be called to initialize the library +before any of the other routines that deal with windows +and screens are used. +The routine \fBendwin\fR(3X) must be called before exiting. +.PP +To get character-at-a-time input without echoing (most +interactive, screen oriented programs want this), the following +sequence should be used: +.NS +\fBinitscr(); cbreak(); noecho();\fR +.NE +.PP +Most programs would additionally use the sequence: +.NS +\fBnonl();\fR +\fBintrflush(stdscr, FALSE);\fR +\fBkeypad(stdscr, TRUE);\fR +.NE +.PP +Before a \fBcurses\fR program is run, the tab stops of the terminal +should be set and its initialization strings, if defined, must be output. +This can be done by executing the \fBtput init\fR command +after the shell environment variable \fBTERM\fR has been exported. +\fBtset(1)\fR is usually responsible for doing this. +[See \fBterminfo\fR(\*n) for further details.] +.SS Datatypes +.PP +Beware: the terminal your program is running may or may not have +the features you expect. Ncurses makes no attempt to check available +features in advance. This is upon the programmer. +.PP +The \fBncurses\fR library permits manipulation of data structures, +called \fIwindows\fR, which can be thought of as two-dimensional +arrays of characters representing all or part of a CRT screen. +A default window called \fBstdscr\fR, which is the size of the terminal +screen, is supplied. +Others may be created with \fBnewwin\fR. +.PP +Note that \fBcurses\fR does not handle overlapping windows, that's done by +the \fBpanel\fR(3CURSES) library. +This means that you can either use +\fBstdscr\fR or divide the screen into tiled windows and not using +\fBstdscr\fR at all. +Mixing the two will result in unpredictable, and undesired, effects. +.PP +Windows are referred to by variables declared as \fBWINDOW *\fR. +These data structures are manipulated with routines described here and +elsewhere in the \fBncurses\fR manual pages. +Among those, the most basic +routines are \fBmove\fR and \fBaddch\fR. +More general versions of +these routines are included with names beginning with \fBw\fR, +allowing the user to specify a window. +The routines not beginning +with \fBw\fR affect \fBstdscr\fR. +.PP +After using routines to manipulate a window, \fBrefresh\fR(3X) is called, +telling \fBcurses\fR to make the user's CRT screen look like +\fBstdscr\fR. +The characters in a window are actually of type +\fBchtype\fR, (character and attribute data) so that other information +about the character may also be stored with each character. +.PP +Special windows called \fIpads\fR may also be manipulated. +These are windows +which are not constrained to the size of the screen and whose contents need not +be completely displayed. +See \fBpad\fR(3NCURSES) for more information. +.PP +In addition to drawing characters on the screen, video attributes and colors +may be supported, causing the characters to show up in such modes as +underlined, in reverse video, or in color on terminals that support such +display enhancements. +Line drawing characters may be specified to be output. +On input, \fBcurses\fR is also able to translate arrow and function keys that +transmit escape sequences into single values. +The video attributes, line +drawing characters, and input values use names, defined in \fB\fR, +such as \fBA_REVERSE\fR, \fBACS_HLINE\fR, and \fBKEY_LEFT\fR. +.SS Environment variables +.PP +If the environment variables \fBLINES\fR and \fBCOLUMNS\fR are set, or if the +program is executing in a window environment, line and column information in +the environment will override information read by \fIterminfo\fR. +This would affect a program running in an AT&T 630 layer, +for example, where the size of a +screen is changeable (see \fBENVIRONMENT\fR). +.PP +If the environment variable \fBTERMINFO\fR is defined, any program using +\fBcurses\fR checks for a local terminal definition before checking in the +standard place. +For example, if \fBTERM\fR is set to \fBatt4424\fR, then the +compiled terminal definition is found in +.NS +\fB\*d/a/att4424\fR. +.NE +.PP +(The \fBa\fR is copied from the first letter of \fBatt4424\fR to avoid +creation of huge directories.) However, if \fBTERMINFO\fR is set to +\fB$HOME/myterms\fR, \fBcurses\fR first checks +.NS +\fB$HOME/myterms/a/att4424\fR, +.NE +.PP +and if that fails, it then checks +.NS +\fB\*d/a/att4424\fR. +.NE +.PP +This is useful for developing experimental definitions or when write +permission in \fB\*d\fR is not available. +.PP +The integer variables \fBLINES\fR and \fBCOLS\fR are defined in +\fB\fR and will be filled in by \fBinitscr\fR with the size of the +screen. +The constants \fBTRUE\fR and \fBFALSE\fR have the values \fB1\fR and +\fB0\fR, respectively. +.PP +The \fBcurses\fR routines also define the \fBWINDOW *\fR variable \fBcurscr\fR +which is used for certain low-level operations like clearing and redrawing a +screen containing garbage. +The \fBcurscr\fR can be used in only a few routines. +.\" +.SS Routine and Argument Names +Many \fBcurses\fR routines have two or more versions. +The routines prefixed with \fBw\fR require a window argument. +The routines prefixed with \fBp\fR require a pad argument. +Those without a prefix generally use \fBstdscr\fR. +.PP +The routines prefixed with \fBmv\fR require a \fIy\fR and \fIx\fR +coordinate to move to before performing the appropriate action. +The \fBmv\fR routines imply a call to \fBmove\fR before the call to the +other routine. +The coordinate \fIy\fR always refers to the row (of +the window), and \fIx\fR always refers to the column. +The upper left-hand corner is always (0,0), not (1,1). +.PP +The routines prefixed with \fBmvw\fR take both a window argument and +\fIx\fR and \fIy\fR coordinates. +The window argument is always specified before the coordinates. +.PP +In each case, \fIwin\fR is the window affected, and \fIpad\fR is the +pad affected; \fIwin\fR and \fIpad\fR are always pointers to type +\fBWINDOW\fR. +.PP +Option setting routines require a Boolean flag \fIbf\fR with the value +\fBTRUE\fR or \fBFALSE\fR; \fIbf\fR is always of type \fBbool\fR. +Most of the data types used in the library routines, +such as \fBWINDOW\fR, \fBSCREEN\fR, \fBbool\fR, and \fBchtype\fR +are defined in \fB\fR. +Types used for the terminfo routines such as +\fBTERMINAL\fR are defined in \fB\fR. +.PP +This manual page describes functions which may appear in any configuration +of the library. +There are two common configurations of the library: +.RS 3 +.TP 5 +.I ncurses +the "normal" library, which handles 8-bit characters. +The normal (8-bit) library stores characters combined with attributes +in \fBchtype\fP data. +.IP +Attributes alone (no corresponding character) may be stored in \fBchtype\fP +or the equivalent \fBattr_t\fP data. +In either case, the data is stored in something like an integer. +.IP +Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBchtype\fP. +.TP 5 +.I ncursesw +the so-called "wide" library, which handles multibyte characters +(see the section on \fBALTERNATE CONFIGURATIONS\fP). +The "wide" library includes all of the calls from the "normal" library. +It adds about one third more calls using data types which store +multibyte characters: +.RS 5 +.TP 5 +.B cchar_t +corresponds to \fBchtype\fP. +However it is a structure, because more data is stored than can fit into +an integer. +The characters are large enough to require a full integer value \- and there +may be more than one character per cell. +The video attributes and color are stored in separate fields of the structure. +.IP +Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBcchar_t\fP. +.TP 5 +.B wchar_t +stores a "wide" character. +Like \fBchtype\fP, this may be an integer. +.TP 5 +.B wint_t +stores a \fBwchar_t\fP or \fBWEOF\fP \- not the same, though both may have +the same size. +.RE +.IP +The "wide" library provides new functions which are analogous to +functions in the "normal" library. +There is a naming convention which relates many of the normal/wide variants: +a "_w" is inserted into the name. +For example, \fBwaddch\fP becomes \fBwadd_wch\fP. +.RE +.PP +.\" +.SS Routine Name Index +The following table lists each \fBcurses\fR routine and the name of +the manual page on which it is described. +Routines flagged with \*(``*\*('' +are ncurses-specific, not described by XPG4 or present in SVr4. +.PP +.TS +center tab(/); +l l +l l . +\fBcurses\fR Routine Name/Manual Page Name += +COLOR_PAIR/\fBcolor\fR(3NCURSES) +PAIR_NUMBER/\fBattr\fR(3NCURSES) +_nc_free_and_exit/\fBmemleaks\fR(3NCURSES)* +_nc_freeall/\fBmemleaks\fR(3NCURSES)* +_nc_tracebits/\fBtrace\fR(3NCURSES)* +_traceattr/\fBtrace\fR(3NCURSES)* +_traceattr2/\fBtrace\fR(3NCURSES)* +_tracechar/\fBtrace\fR(3NCURSES)* +_tracechtype/\fBtrace\fR(3NCURSES)* +_tracechtype2/\fBtrace\fR(3NCURSES)* +_tracedump/\fBtrace\fR(3NCURSES)* +_tracef/\fBtrace\fR(3NCURSES)* +_tracemouse/\fBtrace\fR(3NCURSES)* +add_wch/\fBadd_wch\fR(3NCURSES) +add_wchnstr/\fBadd_wchstr\fR(3NCURSES) +add_wchstr/\fBadd_wchstr\fR(3NCURSES) +addch/\fBaddch\fR(3NCURSES) +addchnstr/\fBaddchstr\fR(3NCURSES) +addchstr/\fBaddchstr\fR(3NCURSES) +addnstr/\fBaddstr\fR(3NCURSES) +addnwstr/\fBaddwstr\fR(3NCURSES) +addstr/\fBaddstr\fR(3NCURSES) +addwstr/\fBaddwstr\fR(3NCURSES) +alloc_pair/\fBnew_pair\fR(3NCURSES)* +assume_default_colors/\fBdefault_colors\fR(3NCURSES)* +attr_get/\fBattr\fR(3NCURSES) +attr_off/\fBattr\fR(3NCURSES) +attr_on/\fBattr\fR(3NCURSES) +attr_set/\fBattr\fR(3NCURSES) +attroff/\fBattr\fR(3NCURSES) +attron/\fBattr\fR(3NCURSES) +attrset/\fBattr\fR(3NCURSES) +baudrate/\fBtermattrs\fR(3NCURSES) +beep/\fBbeep\fR(3NCURSES) +bkgd/\fBbkgd\fR(3NCURSES) +bkgdset/\fBbkgd\fR(3NCURSES) +bkgrnd/\fBbkgrnd\fR(3NCURSES) +bkgrndset/\fBbkgrnd\fR(3NCURSES) +border/\fBborder\fR(3NCURSES) +border_set/\fBborder_set\fR(3NCURSES) +box/\fBborder\fR(3NCURSES) +box_set/\fBborder_set\fR(3NCURSES) +can_change_color/\fBcolor\fR(3NCURSES) +cbreak/\fBinopts\fR(3NCURSES) +chgat/\fBattr\fR(3NCURSES) +clear/\fBclear\fR(3NCURSES) +clearok/\fBoutopts\fR(3NCURSES) +clrtobot/\fBclear\fR(3NCURSES) +clrtoeol/\fBclear\fR(3NCURSES) +color_content/\fBcolor\fR(3NCURSES) +color_set/\fBattr\fR(3NCURSES) +copywin/\fBoverlay\fR(3NCURSES) +curs_set/\fBkernel\fR(3NCURSES) +curses_version/\fBextensions\fR(3NCURSES)* +def_prog_mode/\fBkernel\fR(3NCURSES) +def_shell_mode/\fBkernel\fR(3NCURSES) +define_key/\fBdefine_key\fR(3NCURSES)* +del_curterm/\fBterminfo\fR(3NCURSES) +delay_output/\fButil\fR(3NCURSES) +delch/\fBdelch\fR(3NCURSES) +deleteln/\fBdeleteln\fR(3NCURSES) +delscreen/\fBinitscr\fR(3NCURSES) +delwin/\fBwindow\fR(3NCURSES) +derwin/\fBwindow\fR(3NCURSES) +doupdate/\fBrefresh\fR(3NCURSES) +dupwin/\fBwindow\fR(3NCURSES) +echo/\fBinopts\fR(3NCURSES) +echo_wchar/\fBadd_wch\fR(3NCURSES) +echochar/\fBaddch\fR(3NCURSES) +endwin/\fBinitscr\fR(3NCURSES) +erase/\fBclear\fR(3NCURSES) +erasechar/\fBtermattrs\fR(3NCURSES) +erasewchar/\fBtermattrs\fR(3NCURSES) +extended_color_content/\fBcolor\fR(3NCURSES)* +extended_pair_content/\fBcolor\fR(3NCURSES)* +extended_slk_color/\fBslk\fR(3NCURSES)* +filter/\fButil\fR(3NCURSES) +find_pair/\fBnew_pair\fR(3NCURSES)* +flash/\fBbeep\fR(3NCURSES) +flushinp/\fButil\fR(3NCURSES) +free_pair/\fBnew_pair\fR(3NCURSES)* +get_wch/\fBget_wch\fR(3NCURSES) +get_wstr/\fBget_wstr\fR(3NCURSES) +getattrs/\fBattr\fR(3NCURSES) +getbegx/\fBlegacy\fR(3NCURSES)* +getbegy/\fBlegacy\fR(3NCURSES)* +getbegyx/\fBgetyx\fR(3NCURSES) +getbkgd/\fBbkgd\fR(3NCURSES) +getbkgrnd/\fBbkgrnd\fR(3NCURSES) +getcchar/\fBgetcchar\fR(3NCURSES) +getch/\fBgetch\fR(3NCURSES) +getcurx/\fBlegacy\fR(3NCURSES)* +getcury/\fBlegacy\fR(3NCURSES)* +getmaxx/\fBlegacy\fR(3NCURSES)* +getmaxy/\fBlegacy\fR(3NCURSES)* +getmaxyx/\fBgetyx\fR(3NCURSES) +getmouse/\fBmouse\fR(3NCURSES)* +getn_wstr/\fBget_wstr\fR(3NCURSES) +getnstr/\fBgetstr\fR(3NCURSES) +getparx/\fBlegacy\fR(3NCURSES)* +getpary/\fBlegacy\fR(3NCURSES)* +getparyx/\fBgetyx\fR(3NCURSES) +getstr/\fBgetstr\fR(3NCURSES) +getsyx/\fBkernel\fR(3NCURSES) +getwin/\fButil\fR(3NCURSES) +getyx/\fBgetyx\fR(3NCURSES) +halfdelay/\fBinopts\fR(3NCURSES) +has_colors/\fBcolor\fR(3NCURSES) +has_ic/\fBtermattrs\fR(3NCURSES) +has_il/\fBtermattrs\fR(3NCURSES) +has_key/\fBgetch\fR(3NCURSES)* +hline/\fBborder\fR(3NCURSES) +hline_set/\fBborder_set\fR(3NCURSES) +idcok/\fBoutopts\fR(3NCURSES) +idlok/\fBoutopts\fR(3NCURSES) +immedok/\fBoutopts\fR(3NCURSES) +in_wch/\fBin_wch\fR(3NCURSES) +in_wchnstr/\fBin_wchstr\fR(3NCURSES) +in_wchstr/\fBin_wchstr\fR(3NCURSES) +inch/\fBinch\fR(3NCURSES) +inchnstr/\fBinchstr\fR(3NCURSES) +inchstr/\fBinchstr\fR(3NCURSES) +init_color/\fBcolor\fR(3NCURSES) +init_extended_color/\fBcolor\fR(3NCURSES)* +init_extended_pair/\fBcolor\fR(3NCURSES)* +init_pair/\fBcolor\fR(3NCURSES) +initscr/\fBinitscr\fR(3NCURSES) +innstr/\fBinstr\fR(3NCURSES) +innwstr/\fBinwstr\fR(3NCURSES) +ins_nwstr/\fBins_wstr\fR(3NCURSES) +ins_wch/\fBins_wch\fR(3NCURSES) +ins_wstr/\fBins_wstr\fR(3NCURSES) +insch/\fBinsch\fR(3NCURSES) +insdelln/\fBdeleteln\fR(3NCURSES) +insertln/\fBdeleteln\fR(3NCURSES) +insnstr/\fBinsstr\fR(3NCURSES) +insstr/\fBinsstr\fR(3NCURSES) +instr/\fBinstr\fR(3NCURSES) +intrflush/\fBinopts\fR(3NCURSES) +inwstr/\fBinwstr\fR(3NCURSES) +is_cleared/\fBopaque\fR(3NCURSES)* +is_idcok/\fBopaque\fR(3NCURSES)* +is_idlok/\fBopaque\fR(3NCURSES)* +is_immedok/\fBopaque\fR(3NCURSES)* +is_keypad/\fBopaque\fR(3NCURSES)* +is_leaveok/\fBopaque\fR(3NCURSES)* +is_linetouched/\fBtouch\fR(3NCURSES) +is_nodelay/\fBopaque\fR(3NCURSES)* +is_notimeout/\fBopaque\fR(3NCURSES)* +is_pad/\fBopaque\fR(3NCURSES)* +is_scrollok/\fBopaque\fR(3NCURSES)* +is_subwin/\fBopaque\fR(3NCURSES)* +is_syncok/\fBopaque\fR(3NCURSES)* +is_term_resized/\fBresizeterm\fR(3NCURSES)* +is_wintouched/\fBtouch\fR(3NCURSES) +isendwin/\fBinitscr\fR(3NCURSES) +key_defined/\fBkey_defined\fR(3NCURSES)* +key_name/\fButil\fR(3NCURSES) +keybound/\fBkeybound\fR(3NCURSES)* +keyname/\fButil\fR(3NCURSES) +keyok/\fBkeyok\fR(3NCURSES)* +keypad/\fBinopts\fR(3NCURSES) +killchar/\fBtermattrs\fR(3NCURSES) +killwchar/\fBtermattrs\fR(3NCURSES) +leaveok/\fBoutopts\fR(3NCURSES) +longname/\fBtermattrs\fR(3NCURSES) +mcprint/\fBprint\fR(3NCURSES)* +meta/\fBinopts\fR(3NCURSES) +mouse_trafo/\fBmouse\fR(3NCURSES)* +mouseinterval/\fBmouse\fR(3NCURSES)* +mousemask/\fBmouse\fR(3NCURSES)* +move/\fBmove\fR(3NCURSES) +mvadd_wch/\fBadd_wch\fR(3NCURSES) +mvadd_wchnstr/\fBadd_wchstr\fR(3NCURSES) +mvadd_wchstr/\fBadd_wchstr\fR(3NCURSES) +mvaddch/\fBaddch\fR(3NCURSES) +mvaddchnstr/\fBaddchstr\fR(3NCURSES) +mvaddchstr/\fBaddchstr\fR(3NCURSES) +mvaddnstr/\fBaddstr\fR(3NCURSES) +mvaddnwstr/\fBaddwstr\fR(3NCURSES) +mvaddstr/\fBaddstr\fR(3NCURSES) +mvaddwstr/\fBaddwstr\fR(3NCURSES) +mvchgat/\fBattr\fR(3NCURSES) +mvcur/\fBterminfo\fR(3NCURSES) +mvdelch/\fBdelch\fR(3NCURSES) +mvderwin/\fBwindow\fR(3NCURSES) +mvget_wch/\fBget_wch\fR(3NCURSES) +mvget_wstr/\fBget_wstr\fR(3NCURSES) +mvgetch/\fBgetch\fR(3NCURSES) +mvgetn_wstr/\fBget_wstr\fR(3NCURSES) +mvgetnstr/\fBgetstr\fR(3NCURSES) +mvgetstr/\fBgetstr\fR(3NCURSES) +mvhline/\fBborder\fR(3NCURSES) +mvhline_set/\fBborder_set\fR(3NCURSES) +mvin_wch/\fBin_wch\fR(3NCURSES) +mvin_wchnstr/\fBin_wchstr\fR(3NCURSES) +mvin_wchstr/\fBin_wchstr\fR(3NCURSES) +mvinch/\fBinch\fR(3NCURSES) +mvinchnstr/\fBinchstr\fR(3NCURSES) +mvinchstr/\fBinchstr\fR(3NCURSES) +mvinnstr/\fBinstr\fR(3NCURSES) +mvinnwstr/\fBinwstr\fR(3NCURSES) +mvins_nwstr/\fBins_wstr\fR(3NCURSES) +mvins_wch/\fBins_wch\fR(3NCURSES) +mvins_wstr/\fBins_wstr\fR(3NCURSES) +mvinsch/\fBinsch\fR(3NCURSES) +mvinsnstr/\fBinsstr\fR(3NCURSES) +mvinsstr/\fBinsstr\fR(3NCURSES) +mvinstr/\fBinstr\fR(3NCURSES) +mvinwstr/\fBinwstr\fR(3NCURSES) +mvprintw/\fBprintw\fR(3NCURSES) +mvscanw/\fBscanw\fR(3NCURSES) +mvvline/\fBborder\fR(3NCURSES) +mvvline_set/\fBborder_set\fR(3NCURSES) +mvwadd_wch/\fBadd_wch\fR(3NCURSES) +mvwadd_wchnstr/\fBadd_wchstr\fR(3NCURSES) +mvwadd_wchstr/\fBadd_wchstr\fR(3NCURSES) +mvwaddch/\fBaddch\fR(3NCURSES) +mvwaddchnstr/\fBaddchstr\fR(3NCURSES) +mvwaddchstr/\fBaddchstr\fR(3NCURSES) +mvwaddnstr/\fBaddstr\fR(3NCURSES) +mvwaddnwstr/\fBaddwstr\fR(3NCURSES) +mvwaddstr/\fBaddstr\fR(3NCURSES) +mvwaddwstr/\fBaddwstr\fR(3NCURSES) +mvwchgat/\fBattr\fR(3NCURSES) +mvwdelch/\fBdelch\fR(3NCURSES) +mvwget_wch/\fBget_wch\fR(3NCURSES) +mvwget_wstr/\fBget_wstr\fR(3NCURSES) +mvwgetch/\fBgetch\fR(3NCURSES) +mvwgetn_wstr/\fBget_wstr\fR(3NCURSES) +mvwgetnstr/\fBgetstr\fR(3NCURSES) +mvwgetstr/\fBgetstr\fR(3NCURSES) +mvwhline/\fBborder\fR(3NCURSES) +mvwhline_set/\fBborder_set\fR(3NCURSES) +mvwin/\fBwindow\fR(3NCURSES) +mvwin_wch/\fBin_wch\fR(3NCURSES) +mvwin_wchnstr/\fBin_wchstr\fR(3NCURSES) +mvwin_wchstr/\fBin_wchstr\fR(3NCURSES) +mvwinch/\fBinch\fR(3NCURSES) +mvwinchnstr/\fBinchstr\fR(3NCURSES) +mvwinchstr/\fBinchstr\fR(3NCURSES) +mvwinnstr/\fBinstr\fR(3NCURSES) +mvwinnwstr/\fBinwstr\fR(3NCURSES) +mvwins_nwstr/\fBins_wstr\fR(3NCURSES) +mvwins_wch/\fBins_wch\fR(3NCURSES) +mvwins_wstr/\fBins_wstr\fR(3NCURSES) +mvwinsch/\fBinsch\fR(3NCURSES) +mvwinsnstr/\fBinsstr\fR(3NCURSES) +mvwinsstr/\fBinsstr\fR(3NCURSES) +mvwinstr/\fBinstr\fR(3NCURSES) +mvwinwstr/\fBinwstr\fR(3NCURSES) +mvwprintw/\fBprintw\fR(3NCURSES) +mvwscanw/\fBscanw\fR(3NCURSES) +mvwvline/\fBborder\fR(3NCURSES) +mvwvline_set/\fBborder_set\fR(3NCURSES) +napms/\fBkernel\fR(3NCURSES) +newpad/\fBpad\fR(3NCURSES) +newterm/\fBinitscr\fR(3NCURSES) +newwin/\fBwindow\fR(3NCURSES) +nl/\fBoutopts\fR(3NCURSES) +nocbreak/\fBinopts\fR(3NCURSES) +nodelay/\fBinopts\fR(3NCURSES) +noecho/\fBinopts\fR(3NCURSES) +nofilter/\fButil\fR(3NCURSES)* +nonl/\fBoutopts\fR(3NCURSES) +noqiflush/\fBinopts\fR(3NCURSES) +noraw/\fBinopts\fR(3NCURSES) +notimeout/\fBinopts\fR(3NCURSES) +overlay/\fBoverlay\fR(3NCURSES) +overwrite/\fBoverlay\fR(3NCURSES) +pair_content/\fBcolor\fR(3NCURSES) +pechochar/\fBpad\fR(3NCURSES) +pnoutrefresh/\fBpad\fR(3NCURSES) +prefresh/\fBpad\fR(3NCURSES) +printw/\fBprintw\fR(3NCURSES) +putp/\fBterminfo\fR(3NCURSES) +putwin/\fButil\fR(3NCURSES) +qiflush/\fBinopts\fR(3NCURSES) +raw/\fBinopts\fR(3NCURSES) +redrawwin/\fBrefresh\fR(3NCURSES) +refresh/\fBrefresh\fR(3NCURSES) +reset_prog_mode/\fBkernel\fR(3NCURSES) +reset_shell_mode/\fBkernel\fR(3NCURSES) +resetty/\fBkernel\fR(3NCURSES) +resize_term/\fBresizeterm\fR(3NCURSES)* +resizeterm/\fBresizeterm\fR(3NCURSES)* +restartterm/\fBterminfo\fR(3NCURSES) +ripoffline/\fBkernel\fR(3NCURSES) +savetty/\fBkernel\fR(3NCURSES) +scanw/\fBscanw\fR(3NCURSES) +scr_dump/\fBscr_dump\fR(3NCURSES) +scr_init/\fBscr_dump\fR(3NCURSES) +scr_restore/\fBscr_dump\fR(3NCURSES) +scr_set/\fBscr_dump\fR(3NCURSES) +scrl/\fBscroll\fR(3NCURSES) +scroll/\fBscroll\fR(3NCURSES) +scrollok/\fBoutopts\fR(3NCURSES) +set_curterm/\fBterminfo\fR(3NCURSES) +set_term/\fBinitscr\fR(3NCURSES) +setcchar/\fBgetcchar\fR(3NCURSES) +setscrreg/\fBoutopts\fR(3NCURSES) +setsyx/\fBkernel\fR(3NCURSES) +setterm/\fBterminfo\fR(3NCURSES) +setupterm/\fBterminfo\fR(3NCURSES) +slk_attr/\fBslk\fR(3NCURSES)* +slk_attr_off/\fBslk\fR(3NCURSES) +slk_attr_on/\fBslk\fR(3NCURSES) +slk_attr_set/\fBslk\fR(3NCURSES) +slk_attroff/\fBslk\fR(3NCURSES) +slk_attron/\fBslk\fR(3NCURSES) +slk_attrset/\fBslk\fR(3NCURSES) +slk_clear/\fBslk\fR(3NCURSES) +slk_color/\fBslk\fR(3NCURSES) +slk_init/\fBslk\fR(3NCURSES) +slk_label/\fBslk\fR(3NCURSES) +slk_noutrefresh/\fBslk\fR(3NCURSES) +slk_refresh/\fBslk\fR(3NCURSES) +slk_restore/\fBslk\fR(3NCURSES) +slk_set/\fBslk\fR(3NCURSES) +slk_touch/\fBslk\fR(3NCURSES) +standend/\fBattr\fR(3NCURSES) +standout/\fBattr\fR(3NCURSES) +start_color/\fBcolor\fR(3NCURSES) +subpad/\fBpad\fR(3NCURSES) +subwin/\fBwindow\fR(3NCURSES) +syncok/\fBwindow\fR(3NCURSES) +term_attrs/\fBtermattrs\fR(3NCURSES) +termattrs/\fBtermattrs\fR(3NCURSES) +termname/\fBtermattrs\fR(3NCURSES) +tgetent/\fBtermcap\fR(3NCURSES) +tgetflag/\fBtermcap\fR(3NCURSES) +tgetnum/\fBtermcap\fR(3NCURSES) +tgetstr/\fBtermcap\fR(3NCURSES) +tgoto/\fBtermcap\fR(3NCURSES) +tigetflag/\fBterminfo\fR(3NCURSES) +tigetnum/\fBterminfo\fR(3NCURSES) +tigetstr/\fBterminfo\fR(3NCURSES) +timeout/\fBinopts\fR(3NCURSES) +tiparm/\fBterminfo\fR(3NCURSES)* +touchline/\fBtouch\fR(3NCURSES) +touchwin/\fBtouch\fR(3NCURSES) +tparm/\fBterminfo\fR(3NCURSES) +tputs/\fBtermcap\fR(3NCURSES) +tputs/\fBterminfo\fR(3NCURSES) +trace/\fBtrace\fR(3NCURSES)* +typeahead/\fBinopts\fR(3NCURSES) +unctrl/\fButil\fR(3NCURSES) +unget_wch/\fBget_wch\fR(3NCURSES) +ungetch/\fBgetch\fR(3NCURSES) +ungetmouse/\fBmouse\fR(3NCURSES)* +untouchwin/\fBtouch\fR(3NCURSES) +use_default_colors/\fBdefault_colors\fR(3NCURSES)* +use_env/\fButil\fR(3NCURSES) +use_extended_names/\fBextensions\fR(3NCURSES)* +use_legacy_coding/\fBlegacy_coding\fR(3NCURSES)* +use_tioctl/\fButil\fR(3NCURSES) +vid_attr/\fBterminfo\fR(3NCURSES) +vid_puts/\fBterminfo\fR(3NCURSES) +vidattr/\fBterminfo\fR(3NCURSES) +vidputs/\fBterminfo\fR(3NCURSES) +vline/\fBborder\fR(3NCURSES) +vline_set/\fBborder_set\fR(3NCURSES) +vw_printw/\fBprintw\fR(3NCURSES) +vw_scanw/\fBscanw\fR(3NCURSES) +vwprintw/\fBprintw\fR(3NCURSES) +vwscanw/\fBscanw\fR(3NCURSES) +wadd_wch/\fBadd_wch\fR(3NCURSES) +wadd_wchnstr/\fBadd_wchstr\fR(3NCURSES) +wadd_wchstr/\fBadd_wchstr\fR(3NCURSES) +waddch/\fBaddch\fR(3NCURSES) +waddchnstr/\fBaddchstr\fR(3NCURSES) +waddchstr/\fBaddchstr\fR(3NCURSES) +waddnstr/\fBaddstr\fR(3NCURSES) +waddnwstr/\fBaddwstr\fR(3NCURSES) +waddstr/\fBaddstr\fR(3NCURSES) +waddwstr/\fBaddwstr\fR(3NCURSES) +wattr_get/\fBattr\fR(3NCURSES) +wattr_off/\fBattr\fR(3NCURSES) +wattr_on/\fBattr\fR(3NCURSES) +wattr_set/\fBattr\fR(3NCURSES) +wattroff/\fBattr\fR(3NCURSES) +wattron/\fBattr\fR(3NCURSES) +wattrset/\fBattr\fR(3NCURSES) +wbkgd/\fBbkgd\fR(3NCURSES) +wbkgdset/\fBbkgd\fR(3NCURSES) +wbkgrnd/\fBbkgrnd\fR(3NCURSES) +wbkgrndset/\fBbkgrnd\fR(3NCURSES) +wborder/\fBborder\fR(3NCURSES) +wborder_set/\fBborder_set\fR(3NCURSES) +wchgat/\fBattr\fR(3NCURSES) +wclear/\fBclear\fR(3NCURSES) +wclrtobot/\fBclear\fR(3NCURSES) +wclrtoeol/\fBclear\fR(3NCURSES) +wcolor_set/\fBattr\fR(3NCURSES) +wcursyncup/\fBwindow\fR(3NCURSES) +wdelch/\fBdelch\fR(3NCURSES) +wdeleteln/\fBdeleteln\fR(3NCURSES) +wecho_wchar/\fBadd_wch\fR(3NCURSES) +wechochar/\fBaddch\fR(3NCURSES) +wenclose/\fBmouse\fR(3NCURSES)* +werase/\fBclear\fR(3NCURSES) +wget_wch/\fBget_wch\fR(3NCURSES) +wget_wstr/\fBget_wstr\fR(3NCURSES) +wgetbkgrnd/\fBbkgrnd\fR(3NCURSES) +wgetch/\fBgetch\fR(3NCURSES) +wgetdelay/\fBopaque\fR(3NCURSES)* +wgetn_wstr/\fBget_wstr\fR(3NCURSES) +wgetnstr/\fBgetstr\fR(3NCURSES) +wgetparent/\fBopaque\fR(3NCURSES)* +wgetscrreg/\fBopaque\fR(3NCURSES)* +wgetstr/\fBgetstr\fR(3NCURSES) +whline/\fBborder\fR(3NCURSES) +whline_set/\fBborder_set\fR(3NCURSES) +win_wch/\fBin_wch\fR(3NCURSES) +win_wchnstr/\fBin_wchstr\fR(3NCURSES) +win_wchstr/\fBin_wchstr\fR(3NCURSES) +winch/\fBinch\fR(3NCURSES) +winchnstr/\fBinchstr\fR(3NCURSES) +winchstr/\fBinchstr\fR(3NCURSES) +winnstr/\fBinstr\fR(3NCURSES) +winnwstr/\fBinwstr\fR(3NCURSES) +wins_nwstr/\fBins_wstr\fR(3NCURSES) +wins_wch/\fBins_wch\fR(3NCURSES) +wins_wstr/\fBins_wstr\fR(3NCURSES) +winsch/\fBinsch\fR(3NCURSES) +winsdelln/\fBdeleteln\fR(3NCURSES) +winsertln/\fBdeleteln\fR(3NCURSES) +winsnstr/\fBinsstr\fR(3NCURSES) +winsstr/\fBinsstr\fR(3NCURSES) +winstr/\fBinstr\fR(3NCURSES) +winwstr/\fBinwstr\fR(3NCURSES) +wmouse_trafo/\fBmouse\fR(3NCURSES)* +wmove/\fBmove\fR(3NCURSES) +wnoutrefresh/\fBrefresh\fR(3NCURSES) +wprintw/\fBprintw\fR(3NCURSES) +wredrawln/\fBrefresh\fR(3NCURSES) +wrefresh/\fBrefresh\fR(3NCURSES) +wresize/\fBwresize\fR(3NCURSES)* +wscanw/\fBscanw\fR(3NCURSES) +wscrl/\fBscroll\fR(3NCURSES) +wsetscrreg/\fBoutopts\fR(3NCURSES) +wstandend/\fBattr\fR(3NCURSES) +wstandout/\fBattr\fR(3NCURSES) +wsyncdown/\fBwindow\fR(3NCURSES) +wsyncup/\fBwindow\fR(3NCURSES) +wtimeout/\fBinopts\fR(3NCURSES) +wtouchln/\fBtouch\fR(3NCURSES) +wunctrl/\fButil\fR(3NCURSES) +wvline/\fBborder\fR(3NCURSES) +wvline_set/\fBborder_set\fR(3NCURSES) +.TE +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and an +integer value other than \fBERR\fR upon successful completion, unless +otherwise noted in the routine descriptions. +.PP +As a general rule, routines check for null pointers passed as parameters, +and handle this as an error. +.PP +All macros return the value of the \fBw\fR version, except \fBsetscrreg\fR, +\fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and \fBgetmaxyx\fR. +The return values of +\fBsetscrreg\fR, +\fBwsetscrreg\fR, +\fBgetyx\fR, +\fBgetbegyx\fR, and +\fBgetmaxyx\fR are undefined (i.e., these should not be used as the +right-hand side of assignment statements). +.PP +Routines that return pointers return \fBNULL\fR on error. +.SH ENVIRONMENT +.PP +The following environment symbols are useful for customizing the +runtime behavior of the \fBncurses\fR library. +The most important ones have been already discussed in detail. +.SS CC command-character +.PP +When set, change occurrences of the command_character +(i.e., the \fBcmdch\fP capability) +of the loaded terminfo entries to the value of this variable. +Very few terminfo entries provide this feature. +.PP +Because this name is also used in development environments to represent +the C compiler's name, \fBncurses\fR ignores it if it does not happen to +be a single character. +.SS BAUDRATE +.PP +The debugging library checks this environment variable when the application +has redirected output to a file. +The variable's numeric value is used for the baudrate. +If no value is found, \fBncurses\fR uses 9600. +This allows testers to construct repeatable test-cases +that take into account costs that depend on baudrate. +.SS COLUMNS +.PP +Specify the width of the screen in characters. +Applications running in a windowing environment usually are able to +obtain the width of the window in which they are executing. +If neither the \fBCOLUMNS\fP value nor the terminal's screen size is available, +\fBncurses\fR uses the size which may be specified in the terminfo database +(i.e., the \fBcols\fR capability). +.PP +It is important that your application use a correct size for the screen. +This is not always possible because your application may be +running on a host which does not honor NAWS (Negotiations About Window +Size), or because you are temporarily running as another user. +However, setting \fBCOLUMNS\fP and/or \fBLINES\fP overrides the library's +use of the screen size obtained from the operating system. +.PP +Either \fBCOLUMNS\fP or \fBLINES\fP symbols may be specified independently. +This is mainly useful to circumvent legacy misfeatures of terminal descriptions, +e.g., xterm which commonly specifies a 65 line screen. +For best results, \fBlines\fR and \fBcols\fR should not be specified in +a terminal description for terminals which are run as emulations. +.PP +Use the \fBuse_env\fR function to disable all use of external environment +(but not including system calls) to determine the screen size. +Use the \fBuse_tioctl\fR function to update \fBCOLUMNS\fP or \fBLINES\fP +to match the screen size obtained from system calls or the terminal database. +.SS ESCDELAY +.PP +Specifies the total time, in milliseconds, for which ncurses will +await a character sequence, e.g., a function key. +The default value, 1000 milliseconds, is enough for most uses. +However, it is made a variable to accommodate unusual applications. +.PP +The most common instance where you may wish to change this value +is to work with slow hosts, e.g., running on a network. +If the host cannot read characters rapidly enough, it will have the same +effect as if the terminal did not send characters rapidly enough. +The library will still see a timeout. +.PP +Note that xterm mouse events are built up from character sequences +received from the xterm. +If your application makes heavy use of multiple-clicking, you may +wish to lengthen this default value because the timeout applies +to the composed multi-click event as well as the individual clicks. +.PP +In addition to the environment variable, +this implementation provides a global variable with the same name. +Portable applications should not rely upon the presence of ESCDELAY +in either form, +but setting the environment variable rather than the global variable +does not create problems when compiling an application. +.SS HOME +Tells \fBncurses\fR where your home directory is. +That is where it may read and write auxiliary terminal descriptions: +.NS +$HOME/.termcap +$HOME/.terminfo +.NE +.SS LINES +.PP +Like COLUMNS, specify the height of the screen in characters. +See COLUMNS for a detailed description. +.SS MOUSE_BUTTONS_123 +.PP +This applies only to the OS/2 EMX port. +It specifies the order of buttons on the mouse. +OS/2 numbers a 3-button mouse inconsistently from other +platforms: +.NS +1 = left +.br +2 = right +.br +3 = middle. +.NE +.PP +This variable lets you customize the mouse. +The variable must be three numeric digits 1\-3 in any order, e.g., 123 or 321. +If it is not specified, \fBncurses\fR uses 132. +.SS NCURSES_ASSUMED_COLORS +.PP +Override the compiled-in assumption that the +terminal's default colors are white-on-black +(see \fBdefault_colors\fR(3NCURSES)). +You may set the foreground and background color values with this environment +variable by proving a 2-element list: foreground,background. +For example, to tell ncurses to not assume anything +about the colors, set this to "\-1,\-1". +To make it green-on-black, set it to "2,0". +Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed. +.SS NCURSES_CONSOLE2 +This applies only to the MinGW port of ncurses. +.PP +The \fBConsole2\fP program's handling of the Microsoft Console API call +\fBCreateConsoleScreenBuffer\fP is defective. +Applications which use this will hang. +However, it is possible to simulate the action of this call by +mapping coordinates, +explicitly saving and restoring the original screen contents. +Setting the environment variable \fBNCGDB\fP has the same effect. +.SS NCURSES_GPM_TERMS +.PP +This applies only to ncurses configured to use the GPM interface. +.PP +If present, +the environment variable is a list of one or more terminal names +against which the \fBTERM\fP environment variable is matched. +Setting it to an empty value disables the GPM interface; +using the built-in support for xterm, etc. +.PP +If the environment variable is absent, +ncurses will attempt to open GPM if \fBTERM\fP contains "linux". +.SS NCURSES_NO_HARD_TABS +.PP +\fBNcurses\fP may use tabs as part of the cursor movement optimization. +In some cases, +your terminal driver may not handle these properly. +Set this environment variable to disable the feature. +You can also adjust your \fBstty\fP settings to avoid the problem. +.SS NCURSES_NO_MAGIC_COOKIE +.PP +Some terminals use a magic-cookie feature which requires special handling +to make highlighting and other video attributes display properly. +You can suppress the highlighting entirely for these terminals by +setting this environment variable. +.SS NCURSES_NO_PADDING +.PP +Most of the terminal descriptions in the terminfo database are written +for real "hardware" terminals. +Many people use terminal emulators +which run in a windowing environment and use curses-based applications. +Terminal emulators can duplicate +all of the important aspects of a hardware terminal, but they do not +have the same limitations. +The chief limitation of a hardware terminal from the standpoint +of your application is the management of dataflow, i.e., timing. +Unless a hardware terminal is interfaced into a terminal concentrator +(which does flow control), +it (or your application) must manage dataflow, preventing overruns. +The cheapest solution (no hardware cost) +is for your program to do this by pausing after +operations that the terminal does slowly, such as clearing the display. +.PP +As a result, many terminal descriptions (including the vt100) +have delay times embedded. +You may wish to use these descriptions, +but not want to pay the performance penalty. +.PP +Set the NCURSES_NO_PADDING environment variable to disable all but mandatory +padding. +Mandatory padding is used as a part of special control +sequences such as \fIflash\fR. +.SS NCURSES_NO_SETBUF +This setting is obsolete. +Before changes +.RS 3 +.bP +started with 5.9 patch 20120825 +and +.bP +continued +though 5.9 patch 20130126 +.RE +.PP +\fBncurses\fR enabled buffered output during terminal initialization. +This was done (as in SVr4 curses) for performance reasons. +For testing purposes, both of \fBncurses\fR and certain applications, +this feature was made optional. +Setting the NCURSES_NO_SETBUF variable +disabled output buffering, leaving the output in the original (usually +line buffered) mode. +.PP +In the current implementation, +ncurses performs its own buffering and does not require this workaround. +It does not modify the buffering of the standard output. +.PP +The reason for the change was to make the behavior for interrupts and +other signals more robust. +One drawback is that certain nonconventional programs would mix +ordinary stdio calls with ncurses calls and (usually) work. +This is no longer possible since ncurses is not using +the buffered standard output but its own output (to the same file descriptor). +As a special case, the low-level calls such as \fBputp\fP still use the +standard output. +But high-level curses calls do not. +.SS NCURSES_NO_UTF8_ACS +.PP +During initialization, the \fBncurses\fR library +checks for special cases where VT100 line-drawing (and the corresponding +alternate character set capabilities) described in the terminfo are known +to be missing. +Specifically, when running in a UTF\-8 locale, +the Linux console emulator and the GNU screen program ignore these. +Ncurses checks the \fBTERM\fP environment variable for these. +For other special cases, you should set this environment variable. +Doing this tells ncurses to use Unicode values which correspond to +the VT100 line-drawing glyphs. +That works for the special cases cited, +and is likely to work for terminal emulators. +.PP +When setting this variable, you should set it to a nonzero value. +Setting it to zero (or to a nonnumber) +disables the special check for "linux" and "screen". +.PP +As an alternative to the environment variable, +ncurses checks for an extended terminfo capability \fBU8\fP. +This is a numeric capability which can be compiled using \fBtic\ \-x\fP. +For example +.RS 3 +.ft CW +.sp +.nf +# linux console, if patched to provide working +# VT100 shift-in/shift-out, with corresponding font. +linux-vt100|linux console with VT100 line-graphics, + U8#0, use=linux, +.sp +# uxterm with vt100Graphics resource set to false +xterm-utf8|xterm relying on UTF-8 line-graphics, + U8#1, use=xterm, +.fi +.ft +.RE +.PP +The name "U8" is chosen to be two characters, +to permit it to be used by applications that use ncurses' +termcap interface. +.SS NCURSES_TRACE +.PP +During initialization, the \fBncurses\fR debugging library +checks the NCURSES_TRACE environment variable. +If it is defined, to a numeric value, \fBncurses\fR calls the \fBtrace\fR +function, using that value as the argument. +.PP +The argument values, which are defined in \fBcurses.h\fR, provide several +types of information. +When running with traces enabled, your application will write the +file \fBtrace\fR to the current directory. +.PP +See \fBcurs_trace\fP(3X) for more information. +.SS TERM +.PP +Denotes your terminal type. +Each terminal type is distinct, though many are similar. +.PP +\fBTERM\fP is commonly set by terminal emulators to help +applications find a workable terminal description. +Some of those choose a popular approximation, e.g., +\*(``ansi\*('', \*(``vt100\*('', \*(``xterm\*('' rather than an exact fit. +Not infrequently, your application will have problems with that approach, +e.g., incorrect function-key definitions. +.PP +If you set \fBTERM\fP in your environment, +it has no effect on the operation of the terminal emulator. +It only affects the way applications work within the terminal. +Likewise, as a general rule (\fBxterm\fP being a rare exception), +terminal emulators which allow you to +specify \fBTERM\fP as a parameter or configuration value do +not change their behavior to match that setting. +.SS TERMCAP +If the \fBncurses\fR library has been configured with \fItermcap\fR +support, \fBncurses\fR will check for a terminal's description in +termcap form if it is not available in the terminfo database. +.PP +The \fBTERMCAP\fP environment variable contains either a terminal description (with +newlines stripped out), +or a file name telling where the information denoted by +the \fBTERM\fP environment variable exists. +In either case, setting it directs \fBncurses\fR to ignore +the usual place for this information, e.g., /etc/termcap. +.SS TERMINFO +.PP +\fBncurses\fP can be configured to read from multiple terminal databases. +The \fBTERMINFO\fP variable overrides the location for the default terminal database. +Terminal descriptions (in terminal format) are stored in terminal databases: +.bP +Normally these are stored in a directory tree, +using subdirectories named by the first letter of the terminal names therein. +.IP +This is the scheme used in System V, which legacy Unix systems use, +and the \fBTERMINFO\fP variable is used by \fIcurses\fP applications on those +systems to override the default location of the terminal database. +.bP +If \fBncurses\fP is built to use hashed databases, +then each entry in this list may be the path of a hashed database file, e.g., +.NS +/usr/share/terminfo.db +.NE +.IP +rather than +.NS +/usr/share/terminfo/ +.NE +.IP +The hashed database uses less disk-space and is a little faster than the +directory tree. +However, +some applications assume the existence of the directory tree, +reading it directly +rather than using the terminfo library calls. +.bP +If \fBncurses\fP is built with a support for reading termcap files +directly, then an entry in this list may be the path of a termcap file. +.bP +If the \fBTERMINFO\fP variable begins with +\*(``hex:\*('' or \*(``b64:\*('', +\fBncurses\fP uses the remainder of that variable as a compiled terminal +description. +You might produce the base64 format using \fBinfocmp\fP(1M): +.NS +TERMINFO="$(infocmp -0 -Q2 -q)" +export TERMINFO +.NE +.IP +The compiled description is used if it corresponds to the terminal identified +by the \fBTERM\fP variable. +.PP +Setting \fBTERMINFO\fP is the simplest, +but not the only way to set location of the default terminal database. +The complete list of database locations in order follows: +.RS 3 +.bP +the last terminal database to which \fBncurses\fR wrote, +if any, is searched first +.bP +the location specified by the TERMINFO environment variable +.bP +$HOME/.terminfo +.bP +locations listed in the TERMINFO_DIRS environment variable +.bP +one or more locations whose names are configured and compiled into the +ncurses library, i.e., +.RS 3 +.bP +no default value (corresponding to the TERMINFO_DIRS variable) +.bP +/usr/share/terminfo (corresponding to the TERMINFO variable) +.RE +.RE +.PP +.SS TERMINFO_DIRS +.PP +Specifies a list of locations to search for terminal descriptions. +Each location in the list is a terminal database as described in +the section on the \fBTERMINFO\fP variable. +The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX. +.PP +There is no corresponding feature in System V terminfo; +it is an extension developed for \fBncurses\fP. +.SS TERMPATH +.PP +If \fBTERMCAP\fP does not hold a file name then \fBncurses\fR checks +the \fBTERMPATH\fP environment variable. +This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, +semicolons on OS/2 EMX. +.PP +If the \fBTERMPATH\fP environment variable is not set, +\fBncurses\fR looks in the files +.NS +/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, +.NE +.PP +in that order. +.PP +The library may be configured to disregard the following variables when the +current user is the superuser (root), or if the application uses setuid or +setgid permissions: +.NS +$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME. +.NE +.SH ALTERNATE CONFIGURATIONS +.PP +Several different configurations are possible, +depending on the configure script options used when building \fBncurses\fP. +There are a few main options whose effects are visible to the applications +developer using \fBncurses\fP: +.TP 5 +\-\-disable\-overwrite +The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP: +.NS +\fB#include \fR +.NE +.IP +This option is used to avoid filename conflicts when \fBncurses\fP +is not the main implementation of curses of the computer. +If \fBncurses\fP is installed disabling overwrite, it puts its headers in +a subdirectory, e.g., +.NS +\fB#include \fR +.NE +.IP +It also omits a symbolic link which would allow you to use \fB\-lcurses\fP +to build executables. +.TP 5 +\-\-enable\-widec +The configure script renames the library and +(if the \fB\-\-disable\-overwrite\fP option is used) +puts the header files in a different subdirectory. +All of the library names have a "w" appended to them, +i.e., instead of +.NS +\fB\-lncurses\fR +.NE +.IP +you link with +.NS +\fB\-lncursesw\fR +.NE +.IP +You must also define \fB_XOPEN_SOURCE_EXTENDED\fP when compiling for the +wide-character library to use the extended (wide-character) functions. +The \fBcurses.h\fP file which is installed for the wide-character +library is designed to be compatible with the normal library's header. +Only the size of the \fBWINDOW\fP structure differs, and very few +applications require more than a pointer to \fBWINDOW\fPs. +If the headers are installed allowing overwrite, +the wide-character library's headers should be installed last, +to allow applications to be built using either library +from the same set of headers. +.TP 5 +\-\-with\-pthread +The configure script renames the library. +All of the library names have a "t" appended to them +(before any "w" added by \fB\-\-enable\-widec\fP). +.IP +The global variables such as \fBLINES\fP are replaced by macros to +allow read-only access. +At the same time, setter-functions are provided to set these values. +Some applications (very few) may require changes to work with this convention. +.TP 5 +\-\-with\-shared +.TP +\-\-with\-normal +.TP +\-\-with\-debug +.TP +\-\-with\-profile +The shared and normal (static) library names differ by their suffixes, +e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP. +The debug and profiling libraries add a "_g" and a "_p" to the root +names respectively, +e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP. +.TP 5 +\-\-with\-trace +The \fBtrace\fP function normally resides in the debug library, +but it is sometimes useful to configure this in the shared library. +Configure scripts should check for the function's existence rather +than assuming it is always in the debug library. +.SH FILES +.TP 5 +/usr/share/tabset +directory containing initialization files for the terminal capability database +/usr/share/terminfo +terminal capability database +.SH SEE ALSO +\fBterminfo\fR(\*n) and related pages whose names begin +"curs_" for detailed routine descriptions. +.br +\fBcurses_variables\fR(3NCURSES) +.br +\fBuser_caps\fP(5) for user-defined capabilities +.SH EXTENSIONS +The \fBncurses\fR library can be compiled with an option (\fB\-DUSE_GETCAP\fR) +that falls back to the old-style /etc/termcap file if the terminal setup code +cannot find a terminfo entry corresponding to \fBTERM\fR. +Use of this feature +is not recommended, as it essentially includes an entire termcap compiler in +the \fBncurses\fR startup code, at significant cost in core and startup cycles. +.PP +The \fBncurses\fR library includes facilities for capturing mouse events on +certain terminals (including xterm). +See the \fBmouse\fR(3NCURSES) +manual page for details. +.PP +The \fBncurses\fR library includes facilities for responding to window +resizing events, e.g., when running in an xterm. +See the \fBresizeterm\fR(3NCURSES) +and \fBwresize\fR(3NCURSES) manual pages for details. +In addition, the library may be configured with a \fBSIGWINCH\fP handler. +.PP +The \fBncurses\fR library extends the fixed set of function key capabilities +of terminals by allowing the application designer to define additional +key sequences at runtime. +See the \fBdefine_key\fR(3NCURSES) +\fBkey_defined\fR(3NCURSES), +and \fBkeyok\fR(3NCURSES) manual pages for details. +.PP +The \fBncurses\fR library can exploit the capabilities of terminals which +implement the ISO\-6429 SGR 39 and SGR 49 controls, which allow an application +to reset the terminal to its original foreground and background colors. +From the users' perspective, the application is able to draw colored +text on a background whose color is set independently, providing better +control over color contrasts. +See the \fBdefault_colors\fR(3NCURSES) manual page for details. +.PP +The \fBncurses\fR library includes a function for directing application output +to a printer attached to the terminal device. +See the \fBprint\fR(3NCURSES) manual page for details. +.SH PORTABILITY +The \fBncurses\fR library is intended to be BASE-level conformant with XSI +Curses. +The EXTENDED XSI Curses functionality +(including color support) is supported. +.PP +A small number of local differences (that is, individual differences between +the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR +sections of the library man pages. +.PP +Unlike other implementations, this one checks parameters such as pointers +to WINDOW structures to ensure they are not null. +The main reason for providing this behavior is to guard against programmer +error. +The standard interface does not provide a way for the library +to tell an application which of several possible errors were detected. +Relying on this (or some other) extension will adversely affect the +portability of curses applications. +.PP +This implementation also contains several extensions: +.bP +The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4. +See the \fBgetch\fR(3NCURSES) manual page for details. +.bP +The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4. +See the \fBslk\fR(3NCURSES) manual page for details. +.bP +The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR, +\fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not +part of XPG4, nor are they present in SVr4. +See the \fBmouse\fR(3NCURSES) manual page for details. +.bP +The routine \fBmcprint\fR was not present in any previous curses implementation. +See the \fBprint\fR(3NCURSES) manual page for details. +.bP +The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4. +See the \fBwresize\fR(3NCURSES) manual page for details. +.bP +The WINDOW structure's internal details can be hidden from application +programs. +See \fBopaque\fR(3NCURSES) for the discussion of \fBis_scrollok\fR, etc. +.bP +This implementation can be configured to provide rudimentary support +for multi-threaded applications. +See \fBthreads\fR(3NCURSES) for details. +.bP +This implementation can also be configured to provide a set of functions which +improve the ability to manage multiple screens. +See \fBsp_funcs\fR(3NCURSES) for details. +.PP +In historic curses versions, delays embedded in the capabilities \fBcr\fR, +\fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay +bits in the UNIX tty driver. +In this implementation, all padding is done by sending NUL bytes. +This method is slightly more expensive, but narrows the interface +to the UNIX kernel significantly and increases the package's portability +correspondingly. +.SH NOTES +The header file \fB\fR automatically includes the header files +\fB\fR and \fB\fR. +.PP +If standard output from a \fBncurses\fR program is re-directed to something +which is not a tty, screen updates will be directed to standard error. +This was an undocumented feature of AT&T System V Release 3 curses. +.SH AUTHORS +Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey. +Based on pcurses by Pavel Curtis. diff --git a/upstream/opensuse-leap-15-6/man3/netlink.3 b/upstream/opensuse-leap-15-6/man3/netlink.3 new file mode 100644 index 00000000..332d26aa --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/netlink.3 @@ -0,0 +1,87 @@ +.\" This manpage copyright 1998 by Andi Kleen. +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Based on the original comments from Alexey Kuznetsov +.\" $Id: netlink.3,v 1.1 1999/05/14 17:17:24 freitag Exp $ +.\" +.TH netlink 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +netlink \- Netlink macros +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int NLMSG_ALIGN(size_t " len ); +.BI "int NLMSG_LENGTH(size_t " len ); +.BI "int NLMSG_SPACE(size_t " len ); +.BI "void *NLMSG_DATA(struct nlmsghdr *" nlh ); +.BI "struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *" nlh ", int " len ); +.BI "int NLMSG_OK(struct nlmsghdr *" nlh ", int " len ); +.BI "int NLMSG_PAYLOAD(struct nlmsghdr *" nlh ", int " len ); +.fi +.SH DESCRIPTION +.I +defines several standard macros to access or create a netlink datagram. +They are similar in spirit to the macros defined in +.BR cmsg (3) +for auxiliary data. +The buffer passed to and from a netlink socket should +be accessed using only these macros. +.TP +.BR NLMSG_ALIGN () +Round the length of a netlink message up to align it properly. +.TP +.BR NLMSG_LENGTH () +Given the payload length, +.IR len , +this macro returns the aligned length to store in the +.I nlmsg_len +field of the +.IR nlmsghdr . +.TP +.BR NLMSG_SPACE () +Return the number of bytes that a netlink message with payload of +.I len +would occupy. +.TP +.BR NLMSG_DATA () +Return a pointer to the payload associated with the passed +.IR nlmsghdr . +.TP +.\" this is bizarre, maybe the interface should be fixed. +.BR NLMSG_NEXT () +Get the next +.I nlmsghdr +in a multipart message. +The caller must check if the current +.I nlmsghdr +didn't have the +.B NLMSG_DONE +set\[em]this function doesn't return NULL on end. +The +.I len +argument is an lvalue containing the remaining length +of the message buffer. +This macro decrements it by the length of the message header. +.TP +.BR NLMSG_OK () +Return true if the netlink message is not truncated and +is in a form suitable for parsing. +.TP +.BR NLMSG_PAYLOAD () +Return the length of the payload associated with the +.IR nlmsghdr . +.SH VERSIONS +It is often better to use netlink via +.I libnetlink +than via the low-level kernel interface. +.SH STANDARDS +Linux. +.SH SEE ALSO +.BR libnetlink (3), +.BR netlink (7) diff --git a/upstream/opensuse-leap-15-6/man3/new.3form b/upstream/opensuse-leap-15-6/man3/new.3form new file mode 100644 index 00000000..2ee539c0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/new.3form @@ -0,0 +1,84 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_new.3x,v 1.10 2015/12/05 23:01:16 tom Exp $ +.TH new 3FORM "" +.SH NAME +\fBnew_form\fR, +\fBfree_form\fP \- create and destroy forms +.SH SYNOPSIS +\fB#include \fR +.br +FORM *new_form(FIELD **fields); +.br +int free_form(FORM *form); +.br +.SH DESCRIPTION +The function \fBnew_form\fR creates a new form connected to a specified field +pointer array (which must be \fBNULL\fR-terminated). +.PP +The function \fBfree_form\fR disconnects \fIform\fR from its field array +and frees the storage allocated for the form. +.SH RETURN VALUE +The function \fBnew_form\fR returns \fBNULL\fR on error. +It sets errno according to the function's success: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_CONNECTED +The field is already connected to a form. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred, e.g., malloc failure. +.PP +The function \fBfree_form\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The form has already been posted. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/new.3menu b/upstream/opensuse-leap-15-6/man3/new.3menu new file mode 100644 index 00000000..392b4298 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/new.3menu @@ -0,0 +1,81 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_new.3x,v 1.12 2015/12/05 23:42:45 tom Exp $ +.TH new 3MENU "" +.SH NAME +\fBnew_menu\fP, +\fBfree_menu\fR \- create and destroy menus +.SH SYNOPSIS +\fB#include \fR +.br +MENU *new_menu(ITEM **items); +.br +int free_menu(MENU *menu); +.br +.SH DESCRIPTION +The function \fBnew_menu\fR creates a new menu connected to a specified item +pointer array (which must be \fBNULL\fR-terminated). +.PP +The function \fBfree_menu\fR disconnects \fImenu\fR from its item array +and frees the storage allocated for the menu. +.SH RETURN VALUE +The function \fBnew_menu\fR returns \fBNULL\fR on error. +It sets errno according to the function's failure: +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred, e.g., malloc failure. +.PP +The function \fBfree_menu\fR returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The menu has already been posted. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/new_page.3form b/upstream/opensuse-leap-15-6/man3/new_page.3form new file mode 100644 index 00000000..d833e5a1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/new_page.3form @@ -0,0 +1,72 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_new_page.3x,v 1.11 2015/12/05 23:42:45 tom Exp $ +.TH new_page 3FORM "" +.SH NAME +\fBset_new_page\fR, +\fBnew_page\fR \- form pagination functions +.SH SYNOPSIS +\fB#include \fR +.br +int set_new_page(FIELD *field, bool new_page_flag); +.br +bool new_page(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_new_page\fR sets or resets a flag marking the given field +as the beginning of a new page on its form. +.PP +The function \fBnew_page\fR is a predicate which tests if a given field marks +a page beginning on its form. +.SH RETURN VALUE +The function \fBnew_page\fR returns \fBTRUE\fR or \fBFALSE\fR. +.PP +The function \fBset_new_page\fR return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_CONNECTED +The given field is already connected to a form. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) and related pages whose names begin "form_" for detailed +descriptions of the entry points. +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/new_pair.3ncurses b/upstream/opensuse-leap-15-6/man3/new_pair.3ncurses new file mode 100644 index 00000000..cb2284f5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/new_pair.3ncurses @@ -0,0 +1,158 @@ +.\"*************************************************************************** +.\" Copyright (c) 2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey +.\" +.\" $Id: new_pair.3x,v 1.10 2017/11/18 23:48:44 tom Exp $ +.TH new_pair 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.de NS +.ie n .sp +.el .sp .5 +.ie n .in +4 +.el .in +2 +.nf +.ft C \" Courier +.. +.de NE +.fi +.ft R +.in -4 +.. +.SH NAME +\fBalloc_pair\fP, +\fBfind_pair\fP, +\fBfree_pair\fP \- new curses color-pair functions +.SH SYNOPSIS +\fB#include \fP +.sp +\fBint alloc_pair(int fg, int bg);\fP +.br +\fBint find_pair(int fg, int bg);\fP +.br +\fBint free_pair(int pair);\fP +.SH DESCRIPTION +These functions are an extension to the curses library. +They permit an application to dynamically allocate a color pair using +the foreground/background colors rather than assign a fixed color pair number, +and return an unused pair to the pool. +.PP +The number of colors may be related to the number of possible color +pairs for a given terminal, or it may not: +.bP +While almost all terminals allow setting the color \fIattributes\fP +independently, +it is unlikely that your terminal allows you to modify the attributes +of a given character cell without rewriting it. +That is, the foreground and background colors are applied as a pair. +.bP +Color pairs are the curses library's way of managing a color palette +on a terminal. +If the library does not keep track of the \fIcombinations\fP of +colors which are displayed, it will be inefficient. +.bP +For simple terminal emulators +with only a few dozen color combinations, +it is convenient to use the maximum number of combinations +as the limit on color pairs: +.NS +\fBCOLORS\fP\fI * \fP\fBCOLORS\fP +.NE +.bP +Terminals which support \fIdefault colors\fP distinct from \*(``ANSI colors\*('' +add to the possible combinations, producing this total: +.NS +\fI( \fP\fBCOLORS\fP\fI + 1 ) * ( \fP\fBCOLORS\fP\fI + 1 )\fP +.NE +.bP +An application might use up to a few dozen color pairs to +implement a predefined color scheme. +.IP +Beyond that lies in the realm of programs using the foreground +and background colors for \*(``ASCII art\*('' +(or some other non-textual application). +.IP +Also beyond those few dozen pairs, the required size for a table +to represent the combinations grows rapidly with an increasing number of colors. +.IP +These functions allow a developer to let the screen library +manage color pairs. +.SS alloc_pair +The \fBalloc_pair\fP function accepts parameters for +foreground and background color, and +checks if that color combination is already associated with a color pair. +.bP +If the combination already exists, \fBalloc_pair\fP returns the existing pair. +.bP +If the combination does not exist, \fBalloc_pair\fP allocates a new color pair and returns that. +.bP +If the table fills up, \fBalloc_pair\fP discards the least-recently +allocated entry using \fBfree_pair\fP and allocates a new color pair. +.PP +All of the color pairs are allocated from a table of possible color pairs. +The size of the table is determined by the terminfo \fIpairs\fP capability. +The table is shared with \fBinit_pair\fP; +in fact \fBalloc_pair\fP calls \fBinit_pair\fP after +updating the ncurses library's fast index to the colors versus color pairs. +.SS find_pair +The \fBfind_pair\fP function accepts parameters for +foreground and background color, and +checks if that color combination is already associated with a color pair, +returning the pair number if it has been allocated. +Otherwise it returns \-1. +.SS free_pair +Marks the given color pair as unused, +i.e., like color pair 0. +.SH RETURN VALUE +.PP +The \fBalloc_pair\fP function returns a color pair number in the range +1 through \fBCOLOR_PAIRS\fP\-1, unless it encounters an error updating +its fast index to the color pair values, preventing it from allocating +a color pair. In that case, it returns \-1. +.PP +The \fBfind_pair\fP function returns a color pair number if the +given color combination has been associated with a color pair, +or \-1 if not. +.PP +Likewise, \fBfree_pair\fP returns \fBOK\fP unless it encounters an +error updating the fast index or if no such color pair is in use. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBinit_pair\fR(3X). +.SH AUTHOR +Thomas Dickey. diff --git a/upstream/opensuse-leap-15-6/man3/newlocale.3 b/upstream/opensuse-leap-15-6/man3/newlocale.3 new file mode 100644 index 00000000..4a935560 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/newlocale.3 @@ -0,0 +1,356 @@ +.\" Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH newlocale 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +newlocale, freelocale \- create, modify, and free a locale object +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "locale_t newlocale(int " category_mask ", const char *" locale , +.BI " locale_t " base ); +.BI "void freelocale(locale_t " locobj ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR newlocale (), +.BR freelocale (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR newlocale () +function creates a new locale object, or modifies an existing object, +returning a reference to the new or modified object as the function result. +Whether the call creates a new object or modifies an existing object +is determined by the value of +.IR base : +.IP \[bu] 3 +If +.I base +is +.IR "(locale_t)\ 0" , +a new object is created. +.IP \[bu] +If +.I base +refers to valid existing locale object +(i.e., an object returned by a previous call to +.BR newlocale () +or +.BR duplocale (3)), +then that object is modified by the call. +If the call is successful, the contents of +.I base +are unspecified (in particular, the object referred to by +.I base +may be freed, and a new object created). +Therefore, the caller should ensure that it stops using +.I base +before the call to +.BR newlocale (), +and should subsequently refer to the modified object via the +reference returned as the function result. +If the call fails, the contents of +.I base +remain valid and unchanged. +.PP +If +.I base +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)), +or is not +.I (locale_t)\ 0 +and is not a valid locale object handle, +the behavior is undefined. +.PP +The +.I category_mask +argument is a bit mask that specifies the locale categories +that are to be set in a newly created locale object +or modified in an existing object. +The mask is constructed by a bitwise OR of the constants +.BR LC_ADDRESS_MASK , +.BR LC_CTYPE_MASK , +.BR LC_COLLATE_MASK , +.BR LC_IDENTIFICATION_MASK , +.BR LC_MEASUREMENT_MASK , +.BR LC_MESSAGES_MASK , +.BR LC_MONETARY_MASK , +.BR LC_NUMERIC_MASK , +.BR LC_NAME_MASK , +.BR LC_PAPER_MASK , +.BR LC_TELEPHONE_MASK , +and +.BR LC_TIME_MASK . +Alternatively, the mask can be specified as +.BR LC_ALL_MASK , +which is equivalent to ORing all of the preceding constants. +.PP +For each category specified in +.IR category_mask , +the locale data from +.I locale +will be used in the object returned by +.BR newlocale (). +If a new locale object is being created, +data for all categories not specified in +.I category_mask +is taken from the default ("POSIX") locale. +.PP +The following preset values of +.I locale +are defined for all categories that can be specified in +.IR category_mask : +.TP +"POSIX" +A minimal locale environment for C language programs. +.TP +"C" +Equivalent to "POSIX". +.TP +"" +An implementation-defined native environment +corresponding to the values of the +.B LC_* +and +.B LANG +environment variables (see +.BR locale (7)). +.SS freelocale() +The +.BR freelocale () +function deallocates the resources associated with +.IR locobj , +a locale object previously returned by a call to +.BR newlocale () +or +.BR duplocale (3). +If +.I locobj +is +.B LC_GLOBAL_LOCALE +or is not valid locale object handle, the results are undefined. +.PP +Once a locale object has been freed, +the program should make no further use of it. +.SH RETURN VALUE +On success, +.BR newlocale () +returns a handle that can be used in calls to +.BR duplocale (3), +.BR freelocale (), +and other functions that take a +.I locale_t +argument. +On error, +.BR newlocale () +returns +.IR "(locale_t)\ 0", +and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EINVAL +One or more bits in +.I category_mask +do not correspond to a valid locale category. +.TP +.B EINVAL +.I locale +is NULL. +.TP +.B ENOENT +.I locale +is not a string pointer referring to a valid locale. +.TP +.B ENOMEM +Insufficient memory to create a locale object. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.3. +.SH NOTES +Each locale object created by +.BR newlocale () +should be deallocated using +.BR freelocale (). +.SH EXAMPLES +The program below takes up to two command-line arguments, +which each identify locales. +The first argument is required, and is used to set the +.B LC_NUMERIC +category in a locale object created using +.BR newlocale (). +The second command-line argument is optional; +if it is present, it is used to set the +.B LC_TIME +category of the locale object. +.PP +Having created and initialized the locale object, +the program then applies it using +.BR uselocale (3), +and then tests the effect of the locale changes by: +.IP (1) 5 +Displaying a floating-point number with a fractional part. +This output will be affected by the +.B LC_NUMERIC +setting. +In many European-language locales, +the fractional part of the number is separated from the integer part +using a comma, rather than a period. +.IP (2) +Displaying the date. +The format and language of the output will be affected by the +.B LC_TIME +setting. +.PP +The following shell sessions show some example runs of this program. +.PP +Set the +.B LC_NUMERIC +category to +.I fr_FR +(French): +.PP +.in +4n +.EX +$ \fB./a.out fr_FR\fP +123456,789 +Fri Mar 7 00:25:08 2014 +.EE +.in +.PP +Set the +.B LC_NUMERIC +category to +.I fr_FR +(French), +and the +.B LC_TIME +category to +.I it_IT +(Italian): +.PP +.in +4n +.EX +$ \fB./a.out fr_FR it_IT\fP +123456,789 +ven 07 mar 2014 00:26:01 CET +.EE +.in +.PP +Specify the +.B LC_TIME +setting as an empty string, +which causes the value to be taken from environment variable settings +(which, here, specify +.IR mi_NZ , +New Zealand Māori): +.PP +.in +4n +.EX +$ LC_ALL=mi_NZ ./a.out fr_FR "" +123456,789 +Te Paraire, te 07 o Poutū\-te\-rangi, 2014 00:38:44 CET +.EE +.in +.SS Program source +.\" SRC BEGIN (newlocale.c) +.EX +#define _XOPEN_SOURCE 700 +#include +#include +#include +#include + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e + } while (0) + +int +main(int argc, char *argv[]) +{ + char buf[100]; + time_t t; + size_t s; + struct tm *tm; + locale_t loc, nloc; + + if (argc < 2) { + fprintf(stderr, "Usage: %s locale1 [locale2]\en", argv[0]); + exit(EXIT_FAILURE); + } + + /* Create a new locale object, taking the LC_NUMERIC settings + from the locale specified in argv[1]. */ + + loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0); + if (loc == (locale_t) 0) + errExit("newlocale"); + + /* If a second command\-line argument was specified, modify the + locale object to take the LC_TIME settings from the locale + specified in argv[2]. We assign the result of this newlocale() + call to \[aq]nloc\[aq] rather than \[aq]loc\[aq], since in some cases, we might + want to preserve \[aq]loc\[aq] if this call fails. */ + + if (argc > 2) { + nloc = newlocale(LC_TIME_MASK, argv[2], loc); + if (nloc == (locale_t) 0) + errExit("newlocale"); + loc = nloc; + } + + /* Apply the newly created locale to this thread. */ + + uselocale(loc); + + /* Test effect of LC_NUMERIC. */ + + printf("%8.3f\en", 123456.789); + + /* Test effect of LC_TIME. */ + + t = time(NULL); + tm = localtime(&t); + if (tm == NULL) + errExit("time"); + + s = strftime(buf, sizeof(buf), "%c", tm); + if (s == 0) + errExit("strftime"); + + printf("%s\en", buf); + + /* Free the locale object. */ + + uselocale(LC_GLOBAL_LOCALE); /* So \[aq]loc\[aq] is no longer in use */ + freelocale(loc); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR locale (1), +.BR duplocale (3), +.BR setlocale (3), +.BR uselocale (3), +.BR locale (5), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/nextafter.3 b/upstream/opensuse-leap-15-6/man3/nextafter.3 new file mode 100644 index 00000000..b8c31c9f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/nextafter.3 @@ -0,0 +1,203 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Based on glibc infopages +.\" +.TH nextafter 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \- +floating-point number manipulation +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double nextafter(double " x ", double " y ); +.BI "float nextafterf(float " x ", float " y ); +.BI "long double nextafterl(long double " x ", long double " y ); +.PP +.BI "double nexttoward(double " x ", long double " y ); +.BI "float nexttowardf(float " x ", long double " y ); +.BI "long double nexttowardl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR nextafter (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR nextafterf (), +.BR nextafterl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR nexttoward (), +.BR nexttowardf (), +.BR nexttowardl (): +.nf + _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE + || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR nextafter (), +.BR nextafterf (), +and +.BR nextafterl () +functions return the next representable floating-point value following +.I x +in the direction of +.IR y . +If +.I y +is less than +.IR x , +these functions will return the largest representable number less than +.IR x . +.PP +If +.I x +equals +.IR y , +the functions return +.IR y . +.PP +The +.BR nexttoward (), +.BR nexttowardf (), +and +.BR nexttowardl () +functions do the same as the corresponding +.BR nextafter () +functions, except that they have a +.I "long double" +second argument. +.SH RETURN VALUE +On success, +these functions return the next representable floating-point value after +.I x +in the direction of +.IR y . +.PP +If +.I x +equals +.IR y , +then +.I y +(cast to the same type as +.IR x ) +is returned. +.PP +If +.I x +or +.I y +is a NaN, +a NaN is returned. +.PP +If +.I x +is finite, +.\" e.g., DBL_MAX +and the result would overflow, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the correct mathematical sign. +.PP +If +.I x +is not equal to +.IR y , +and the correct function result would be subnormal, zero, or underflow, +a range error occurs, +and either the correct value (if it can be represented), +or 0.0, is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result overflow +.\" e.g., nextafter(DBL_MAX, HUGE_VAL); +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error: result is subnormal or underflows +.\" e.g., nextafter(DBL_MIN, 0.0); +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nextafter (), +.BR nextafterf (), +.BR nextafterl (), +.BR nexttoward (), +.BR nexttowardf (), +.BR nexttowardl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.PP +This function is defined in IEC 559 (and the appendix with +recommended functions in IEEE 754/IEEE 854). +.SH HISTORY +C99, POSIX.1-2001. +.SH BUGS +In glibc 2.5 and earlier, these functions do not raise an underflow +floating-point +.RB ( FE_UNDERFLOW ) +exception when an underflow occurs. +.PP +Before glibc 2.23 +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6799 +these functions did not set +.IR errno . +.SH SEE ALSO +.BR nearbyint (3) diff --git a/upstream/opensuse-leap-15-6/man3/nextup.3 b/upstream/opensuse-leap-15-6/man3/nextup.3 new file mode 100644 index 00000000..7a5b2011 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/nextup.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright (C) 2016, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH nextup 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \- +return next floating-point number toward positive/negative infinity +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "double nextup(double " x ); +.BI "float nextupf(float " x ); +.BI "long double nextupl(long double " x ); +.PP +.BI "double nextdown(double " x ); +.BI "float nextdownf(float " x ); +.BI "long double nextdownl(long double " x ); +.fi +.SH DESCRIPTION +The +.BR nextup (), +.BR nextupf (), +and +.BR nextupl () +functions return the next representable floating-point number greater than +.IR x . +.PP +If +.I x +is the smallest representable negative number in the corresponding type, +these functions return \-0. +If +.I x +is 0, the returned value is the smallest representable positive number +of the corresponding type. +.PP +If +.I x +is positive infinity, the returned value is positive infinity. +If +.I x +is negative infinity, +the returned value is the largest representable finite negative number +of the corresponding type. +.PP +If +.I x +is Nan, +the returned value is NaN. +.PP +The value returned by +.I nextdown(x) +is +.IR \-nextup(\-x) , +and similarly for the other types. +.SH RETURN VALUE +See DESCRIPTION. +.\" .SH ERRORS +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nextup (), +.BR nextupf (), +.BR nextupl (), +.BR nextdown (), +.BR nextdownf (), +.BR nextdownl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +These functions are described in +.I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic +and +.IR "ISO/IEC TS 18661". +.SH HISTORY +glibc 2.24. +.SH SEE ALSO +.BR nearbyint (3), +.BR nextafter (3) diff --git a/upstream/opensuse-leap-15-6/man3/ngettext.3 b/upstream/opensuse-leap-15-6/man3/ngettext.3 new file mode 100644 index 00000000..d2c72301 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ngettext.3 @@ -0,0 +1,60 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" 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. +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" GNU gettext source code and manual +.\" LI18NUX 2000 Globalization Specification +.\" +.TH NGETTEXT 3 "May 2001" "GNU gettext 20220912" +.SH NAME +ngettext, dngettext, dcngettext \- translate message and choose plural form +.SH SYNOPSIS +.nf +.B #include +.sp +.BI "char * ngettext (const char * " msgid ", const char * " msgid_plural , +.BI " unsigned long int " n ); +.BI "char * dngettext (const char * " domainname , +.BI " const char * " msgid ", const char * " msgid_plural , +.BI " unsigned long int " n ); +.BI "char * dcngettext (const char * " domainname , +.BI " const char * " msgid ", const char * " msgid_plural , +.BI " unsigned long int " n ", int " category ); +.fi +.SH DESCRIPTION +The \fBngettext\fP, \fBdngettext\fP and \fBdcngettext\fP functions attempt to +translate a text string into the user's native language, by looking up the +appropriate plural form of the translation in a message catalog. +.PP +Plural forms are grammatical variants depending on the a number. Some languages +have two forms, called singular and plural. Other languages have three forms, +called singular, dual and plural. There are also languages with four forms. +.PP +The \fBngettext\fP, \fBdngettext\fP and \fBdcngettext\fP functions work like +the \fBgettext\fP, \fBdgettext\fP and \fBdcgettext\fP functions, respectively. +Additionally, they choose the appropriate plural form, which depends on the +number \fIn\fP and the language of the message catalog where the translation +was found. +.PP +In the "C" locale, or if none of the used catalogs contain a translation for +\fImsgid\fP, the \fBngettext\fP, \fBdngettext\fP and \fBdcngettext\fP functions +return \fImsgid\fP if \fIn\fP == 1, or \fImsgid_plural\fP if \fIn\fP != 1. +.SH "RETURN VALUE" +If a translation was found in one of the specified catalogs, the appropriate +plural form is converted to the locale's codeset and returned. The resulting +string is statically allocated and must not be modified or freed. Otherwise +\fImsgid\fP or \fImsgid_plural\fP is returned, as described above. +.SH ERRORS +\fBerrno\fP is not modified. +.SH BUGS +The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid +warnings in C code predating ANSI C. +.SH "SEE ALSO" +.BR gettext (3), +.BR dgettext (3), +.BR dcgettext (3) diff --git a/upstream/opensuse-leap-15-6/man3/nl_langinfo.3 b/upstream/opensuse-leap-15-6/man3/nl_langinfo.3 new file mode 100644 index 00000000..9d88f545 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/nl_langinfo.3 @@ -0,0 +1,356 @@ +'\" t +.\" Copyright (c) 2001 Markus Kuhn +.\" and Copyright (c) 2015 Sam Varshavchik +.\" and Copyright (c) 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" References consulted: +.\" GNU glibc-2 manual +.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html +.\" +.\" Corrected prototype, 2002-10-18, aeb +.\" +.TH nl_langinfo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +nl_langinfo, nl_langinfo_l \- query language and locale information +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *nl_langinfo(nl_item " item ); +.BI "char *nl_langinfo_l(nl_item " item ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR nl_langinfo_l (): +.nf + Since glibc 2.24: + _POSIX_C_SOURCE >= 200809L + glibc 2.23 and earlier: + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR nl_langinfo () +and +.BR nl_langinfo_l () +functions provide access to locale information +in a more flexible way than +.BR localeconv (3). +.BR nl_langinfo () +returns a string which is the value corresponding to +\fIitem\fP in the program's current global +locale. +.BR nl_langinfo_l () +returns a string which is the value corresponding to \fIitem\fP +for the locale identified by the locale object \fIlocale\fP, +which was previously created by +.BR newlocale (3). +Individual and additional elements of the locale categories can +be queried. +.PP +Examples for the locale elements that can be specified in \fIitem\fP +using the constants defined in \fI\fP are: +.TP +.BR CODESET \ (LC_CTYPE) +Return a string with the name of the character encoding used in the +selected locale, such as "UTF-8", "ISO-8859-1", or "ANSI_X3.4-1968" +(better known as US-ASCII). +This is the same string that you get with +"locale charmap". +For a list of character encoding names, +try "locale \-m" (see +.BR locale (1)). +.TP +.BR D_T_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +to represent time and date in a locale-specific way +.RB ( %c +conversion specification). +.TP +.BR D_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +to represent a date in a locale-specific way +.RB ( %x +conversion specification). +.TP +.BR T_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +to represent a time in a locale-specific way +.RB ( %X +conversion specification). +.TP +.BR AM_STR \ (LC_TIME) +Return a string that represents affix for ante meridiem (before noon, "AM") +time. +(Used in +.B %p +.BR strftime (3) +conversion specification.) +.TP +.BR PM_STR \ (LC_TIME) +Return a string that represents affix for post meridiem (before midnight, "PM") +time. +(Used in +.B %p +.BR strftime (3) +conversion specification.) +.TP +.BR T_FMT_AMPM \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +to represent a time in a.m. or p.m. notation in a locale-specific way +.RB ( %r +conversion specification). +.TP +.BR ERA \ (LC_TIME) +Return era description, which contains information about how years are counted +and displayed for each era in a locale. +Each era description segment shall have the format: +.RS +.IP +.IR direction : offset : start_date : end_date : era_name : era_format +.RE +.IP +according to the definitions below: +.RS +.TP 12 +.I direction +Either a +.RB \[dq] + "\[dq] or a \[dq]" - \[dq] +character. +The +.RB \[dq] + \[dq] +means that years increase from the +.I start_date +towards the +.IR end_date , +.RB \[dq] - \[dq] +means the opposite. +.TP +.I offset +The epoch year of the +.IR start_date . +.TP +.I start_date +A date in the form +.IR yyyy / mm / dd , +where +.IR yyyy ", " mm ", and " dd +are the year, month, and day numbers respectively of the start of the era. +.TP +.I end_date +The ending date of the era, in the same format as the +.IR start_date , +or one of the two special values +.RB \[dq] -* \[dq] +(minus infinity) or +.RB \[dq] +* \[dq] +(plus infinity). +.TP +.I era_name +The name of the era, corresponding to the +.B %EC +.BR strftime (3) +conversion specification. +.TP +.I era_format +The format of the year in the era, corresponding to the +.B %EY +.BR strftime (3) +conversion specification. +.RE +.IP +Era description segments are separated by semicolons. +Most locales do not define this value. +Examples of locales that do define this value are the Japanese and Thai +locales. +.TP +.BR ERA_D_T_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +for alternative representation of time and date in a locale-specific way +.RB ( %Ec +conversion specification). +.TP +.BR ERA_D_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +for alternative representation of a date in a locale-specific way +.RB ( %Ex +conversion specification). +.TP +.BR ERA_T_FMT \ (LC_TIME) +Return a string that can be used as a format string for +.BR strftime (3) +for alternative representation of a time in a locale-specific way +.RB ( %EX +conversion specification). +.TP +.BR DAY_ "{1\[en]7} (LC_TIME)" +Return name of the \fIn\fP-th day of the week. +[Warning: this follows +the US convention DAY_1 = Sunday, not the international convention +(ISO 8601) that Monday is the first day of the week.] +(Used in +.B %A +.BR strftime (3) +conversion specification.) +.TP +.BR ABDAY_ "{1\[en]7} (LC_TIME)" +Return abbreviated name of the \fIn\fP-th day of the week. +(Used in +.B %a +.BR strftime (3) +conversion specification.) +.TP +.BR MON_ "{1\[en]12} (LC_TIME)" +Return name of the \fIn\fP-th month. +(Used in +.B %B +.BR strftime (3) +conversion specification.) +.TP +.BR ABMON_ "{1\[en]12} (LC_TIME)" +Return abbreviated name of the \fIn\fP-th month. +(Used in +.B %b +.BR strftime (3) +conversion specification.) +.TP +.BR RADIXCHAR \ (LC_NUMERIC) +Return radix character (decimal dot, decimal comma, etc.). +.TP +.BR THOUSEP \ (LC_NUMERIC) +Return separator character for thousands (groups of three digits). +.TP +.BR YESEXPR \ (LC_MESSAGES) +Return a regular expression that can be used with the +.BR regex (3) +function to recognize a positive response to a yes/no question. +.TP +.BR NOEXPR \ (LC_MESSAGES) +Return a regular expression that can be used with the +.BR regex (3) +function to recognize a negative response to a yes/no question. +.TP +.BR CRNCYSTR \ (LC_MONETARY) +Return the currency symbol, preceded by "\-" if the symbol should +appear before the value, "+" if the symbol should appear after the +value, or "." if the symbol should replace the radix character. +.PP +The above list covers just some examples of items that can be requested. +For a more detailed list, consult +.IR "The GNU C Library Reference Manual" . +.SH RETURN VALUE +On success, these functions return a pointer to a string which +is the value corresponding to +.I item +in the specified locale. +.PP +If no locale has been selected by +.BR setlocale (3) +for the appropriate category, +.BR nl_langinfo () +return a pointer to the corresponding string in the "C" locale. +The same is true of +.BR nl_langinfo_l () +if +.I locale +specifies a locale where +.I langinfo +data is not defined. +.PP +If \fIitem\fP is not valid, a pointer to an empty string is returned. +.PP +The pointer returned by these functions may point to static data that +may be overwritten, or the pointer itself may be invalidated, +by a subsequent call to +.BR nl_langinfo (), +.BR nl_langinfo_l (), +or +.BR setlocale (3). +The same statements apply to +.BR nl_langinfo_l () +if the locale object referred to by +.I locale +is freed or modified by +.BR freelocale (3) +or +.BR newlocale (3). +.PP +POSIX specifies that the application may not modify +the string returned by these functions. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nl_langinfo () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SUSv2. +.SH NOTES +The behavior of +.BR nl_langinfo_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +or is not a valid locale object handle. +.SH EXAMPLES +The following program sets the character type and the numeric locale +according to the environment and queries the terminal character set and +the radix character. +.PP +.\" SRC BEGIN (nl_langinfo.c) +.EX +#include +#include +#include +#include + +int +main(void) +{ + setlocale(LC_CTYPE, ""); + setlocale(LC_NUMERIC, ""); + + printf("%s\en", nl_langinfo(CODESET)); + printf("%s\en", nl_langinfo(RADIXCHAR)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR locale (1), +.BR localeconv (3), +.BR setlocale (3), +.BR charsets (7), +.BR locale (7) +.PP +The GNU C Library Reference Manual diff --git a/upstream/opensuse-leap-15-6/man3/ntp_gettime.3 b/upstream/opensuse-leap-15-6/man3/ntp_gettime.3 new file mode 100644 index 00000000..93e587f1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ntp_gettime.3 @@ -0,0 +1,138 @@ +'\" t +.\" Copyright (c) 2016 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH ntp_gettime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ntp_gettime, ntp_gettimex \- get time parameters (NTP daemon interface) +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int ntp_gettime(struct ntptimeval *" ntv ); +.BI "int ntp_gettimex(struct ntptimeval *" ntv ); +.fi +.SH DESCRIPTION +Both of these APIs return information to the caller via the +.I ntv +argument, a structure of the following type: +.PP +.in +4n +.EX +struct ntptimeval { + struct timeval time; /* Current time */ + long maxerror; /* Maximum error */ + long esterror; /* Estimated error */ + long tai; /* TAI offset */ + + /* Further padding bytes allowing for future expansion */ +}; +.EE +.in +.PP +The fields of this structure are as follows: +.TP +.I time +The current time, expressed as a +.I timeval +structure: +.IP +.in +4n +.EX +struct timeval { + time_t tv_sec; /* Seconds since the Epoch */ + suseconds_t tv_usec; /* Microseconds */ +}; +.EE +.in +.TP +.I maxerror +Maximum error, in microseconds. +This value can be initialized by +.BR ntp_adjtime (3), +and is increased periodically (on Linux: each second), +but is clamped to an upper limit (the kernel constant +.BR NTP_PHASE_MAX , +with a value of 16,000). +.TP +.I esterror +Estimated error, in microseconds. +This value can be set via +.BR ntp_adjtime (3) +to contain an estimate of the difference between the system clock +and the true time. +This value is not used inside the kernel. +.TP +.I tai +TAI (Atomic International Time) offset. +.PP +.BR ntp_gettime () +returns an +.I ntptimeval +structure in which the +.IR time , +.IR maxerror , +and +.I esterror +fields are filled in. +.PP +.BR ntp_gettimex () +performs the same task as +.BR ntp_gettime (), +but also returns information in the +.I tai +field. +.SH RETURN VALUE +The return values for +.BR ntp_gettime () +and +.BR ntp_gettimex () +are as for +.BR adjtimex (2). +Given a correct pointer argument, these functions always succeed. +.\" FIXME . the info page incorrectly describes the return values. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ntp_gettime (), +.BR ntp_gettimex () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR ntp_gettime () +NTP Kernel Application Program Interface. +.TP +.BR ntp_gettimex () +GNU. +.SH HISTORY +.TP +.BR ntp_gettime () +glibc 2.1. +.TP +.BR ntp_gettimex () +glibc 2.12. +.SH SEE ALSO +.BR adjtimex (2), +.BR ntp_adjtime (3), +.BR time (7) +.PP +.ad l +.UR http://www.slac.stanford.edu/comp/unix/\:package/\:rtems/\:src/\:ssrlApps/\:ntpNanoclock/\:api.htm +NTP "Kernel Application Program Interface" +.UE diff --git a/upstream/opensuse-leap-15-6/man3/offsetof.3 b/upstream/opensuse-leap-15-6/man3/offsetof.3 new file mode 100644 index 00000000..10dac5de --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/offsetof.3 @@ -0,0 +1,110 @@ +.\" Copyright (C) 2006 Justin Pryzby +.\" and Copyright (C) 2006 Michael Kerrisk +.\" +.\" %%%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: +.\" /usr/lib/gcc/i486-linux-gnu/4.1.1/include/stddef.h +.\" glibc-doc +.TH offsetof 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +offsetof \- offset of a structure member +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t offsetof(" type ", " member ); +.fi +.SH DESCRIPTION +The macro +.BR offsetof () +returns the offset of the field +.I member +from the start of the structure +.IR type . +.PP +This macro is useful because the sizes of the fields that compose +a structure can vary across implementations, +and compilers may insert different numbers of padding +bytes between fields. +Consequently, an element's offset is not necessarily +given by the sum of the sizes of the previous elements. +.PP +A compiler error will result if +.I member +is not aligned to a byte boundary +(i.e., it is a bit field). +.SH RETURN VALUE +.BR offsetof () +returns the offset of the given +.I member +within the given +.IR type , +in units of bytes. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.SH EXAMPLES +On a Linux/i386 system, when compiled using the default +.BR gcc (1) +options, the program below produces the following output: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +offsets: i=0; c=4; d=8 a=16 +sizeof(struct s)=16 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (offsetof.c) +.EX +#include +#include +#include + +int +main(void) +{ + struct s { + int i; + char c; + double d; + char a[]; + }; + + /* Output is compiler dependent */ + + printf("offsets: i=%zu; c=%zu; d=%zu a=%zu\en", + offsetof(struct s, i), offsetof(struct s, c), + offsetof(struct s, d), offsetof(struct s, a)); + printf("sizeof(struct s)=%zu\en", sizeof(struct s)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END diff --git a/upstream/opensuse-leap-15-6/man3/on_exit.3 b/upstream/opensuse-leap-15-6/man3/on_exit.3 new file mode 100644 index 00000000..dfeb575a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/on_exit.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH on_exit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +on_exit \- register a function to be called at normal process termination +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int on_exit(void (*" function ")(int, void *), void *" arg ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR on_exit (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR on_exit () +function registers the given +.I function +to be +called at normal process termination, whether via +.BR exit (3) +or via return from the program's +.IR main (). +The +.I function +is passed the status argument given to the last call to +.BR exit (3) +and the +.I arg +argument from +.BR on_exit (). +.PP +The same function may be registered multiple times: +it is called once for each registration. +.PP +When a child process is created via +.BR fork (2), +it inherits copies of its parent's registrations. +Upon a successful call to one of the +.BR exec (3) +functions, all registrations are removed. +.SH RETURN VALUE +The +.BR on_exit () +function returns the value 0 if successful; otherwise +it returns a nonzero value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR on_exit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SunOS 4, glibc. +Removed in Solaris (SunOS 5). +Use the standard +.BR atexit (3) +instead. +.SH CAVEATS +By the time +.I function +is executed, stack +.RI ( auto ) +variables may already have gone out of scope. +Therefore, +.I arg +should not be a pointer to a stack variable; +it may however be a pointer to a heap variable or a global variable. +.SH SEE ALSO +.BR _exit (2), +.BR atexit (3), +.BR exit (3) diff --git a/upstream/opensuse-leap-15-6/man3/opaque.3ncurses b/upstream/opensuse-leap-15-6/man3/opaque.3ncurses new file mode 100644 index 00000000..9573c806 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/opaque.3ncurses @@ -0,0 +1,154 @@ +.\"*************************************************************************** +.\" Copyright (c) 2007-2014,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_opaque.3x,v 1.13 2015/12/05 20:05:45 tom Exp $ +.TH opaque 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fBis_cleared\fR, +\fBis_idlok\fR, +\fBis_idcok\fR, +\fBis_immedok\fR, +\fBis_keypad\fR, +\fBis_leaveok\fR, +\fBis_nodelay\fR, +\fBis_notimeout\fR, +\fBis_pad\fR, +\fBis_scrollok\fR, +\fBis_subwin\fR, +\fBis_syncok\fR, +\fBwgetdelay\fR, +\fBwgetparent\fR, +\fBwgetscrreg\fR \- \fBcurses\fR window properties +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBbool is_cleared(const WINDOW *win);\fR +.br +\fBbool is_idcok(const WINDOW *win);\fR +.br +\fBbool is_idlok(const WINDOW *win);\fR +.br +\fBbool is_immedok(const WINDOW *win);\fR +.br +\fBbool is_keypad(const WINDOW *win);\fR +.br +\fBbool is_leaveok(const WINDOW *win);\fR +.br +\fBbool is_nodelay(const WINDOW *win);\fR +.br +\fBbool is_notimeout(const WINDOW *win);\fR +.br +\fBbool is_pad(const WINDOW *win);\fR +.br +\fBbool is_scrollok(const WINDOW *win);\fR +.br +\fBbool is_subwin(const WINDOW *win);\fR +.br +\fBbool is_syncok(const WINDOW *win);\fR +.br +\fBWINDOW * wgetparent(const WINDOW *win);\fR +.br +\fBint wgetdelay(const WINDOW *win);\fR +.br +\fBint wgetscrreg(const WINDOW *win, int *top, int *bottom);\fR +.br +.SH DESCRIPTION +This implementation provides functions which return properties +set in the WINDOW structure, allowing it to be \*(``opaque\*('' if +the symbol \fBNCURSES_OPAQUE\fR is defined: +.TP 5 +\fBis_cleared\fR +returns the value set in \fBclearok\fR +.TP 5 +\fBis_idcok\fR +returns the value set in \fBidcok\fR +.TP 5 +\fBis_idlok\fR +returns the value set in \fBidlok\fR +.TP 5 +\fBis_immedok\fR +returns the value set in \fBimmedok\fR +.TP 5 +\fBis_keypad\fR +returns the value set in \fBkeypad\fR +.TP 5 +\fBis_leaveok\fR +returns the value set in \fBleaveok\fR +.TP 5 +\fBis_nodelay\fR +returns the value set in \fBnodelay\fR +.TP 5 +\fBis_notimeout\fR +returns the value set in \fBnotimeout\fR +.TP 5 +\fBis_pad\fR +returns \fBTRUE\fP if the window is a pad +i.e., created by \fBnewpad\fP +.TP 5 +\fBis_scrollok\fR +returns the value set in \fBscrollok\fR +.TP 5 +\fBis_subwin\fR +returns \fBTRUE\fP if the window is a subwindow, +i.e., created by \fBsubwin\fP or \fBderwin\fP +.TP 5 +\fBis_syncok\fR +returns the value set in \fBsyncok\fR +.TP 5 +\fBwgetdelay\fR +returns the delay timeout as set in \fBwtimeout\fP. +.TP 5 +\fBwgetparent\fR +returns the parent WINDOW pointer for subwindows, +or NULL for windows having no parent. +.TP 5 +\fBwgetscrreg\fR +returns the top and bottom rows for the scrolling margin +as set in \fBwsetscrreg\fP. +.SH RETURN VALUE +These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted. +.SH NOTES +Both a macro and a function are provided for each name. +.SH PORTABILITY +These routines are specific to ncurses. +They were not supported on Version 7, BSD or System V implementations. +It is recommended that any code depending on ncurses extensions +be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinopts\fR(3NCURSES), +\fBoutopts\fR(3NCURSES), +\fBwindow\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/open_memstream.3 b/upstream/opensuse-leap-15-6/man3/open_memstream.3 new file mode 100644 index 00000000..07fbc6df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/open_memstream.3 @@ -0,0 +1,144 @@ +'\" t +.\" Copyright 2005, 2012, 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" 2008-12-04, Petr Baudis : Document open_wmemstream() +.\" +.TH open_memstream 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +open_memstream, open_wmemstream \- open a dynamic memory buffer stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "FILE *open_memstream(char **" ptr ", size_t *" sizeloc ); +.PP +.B #include +.PP +.BI "FILE *open_wmemstream(wchar_t **" ptr ", size_t *" sizeloc ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR open_memstream (), +.BR open_wmemstream (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR open_memstream () +function opens a stream for writing to a memory buffer. +The function dynamically allocates the buffer, +and the buffer automatically grows as needed. +Initially, the buffer has a size of zero. +After closing the stream, the caller should +.BR free (3) +this buffer. +.PP +The locations pointed to by +.I ptr +and +.I sizeloc +are used to report, respectively, +the current location and the size of the buffer. +The locations referred to by these pointers are updated +each time the stream is flushed +.RB ( fflush (3)) +and when the stream is closed +.RB ( fclose (3)). +These values remain valid only as long as the caller +performs no further output on the stream. +If further output is performed, then the stream +must again be flushed before trying to access these values. +.PP +A null byte is maintained at the end of the buffer. +This byte is +.I not +included in the size value stored at +.IR sizeloc . +.PP +The stream maintains the notion of a current position, +which is initially zero (the start of the buffer). +Each write operation implicitly adjusts the buffer position. +The stream's buffer position can be explicitly changed with +.BR fseek (3) +or +.BR fseeko (3). +Moving the buffer position past the end +of the data already written fills the intervening space with +null characters. +.PP +The +.BR open_wmemstream () +is similar to +.BR open_memstream (), +but operates on wide characters instead of bytes. +.SH RETURN VALUE +Upon successful completion, +.BR open_memstream () +and +.BR open_wmemstream () +return a +.I FILE +pointer. +Otherwise, NULL is returned and +.I errno +is set to indicate the error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR open_memstream (), +.BR open_wmemstream () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +.TP +.BR open_memstream () +glibc 1.0.x. +.TP +.BR open_wmemstream () +glibc 2.4. +.SH NOTES +There is no file descriptor associated with the file stream +returned by these functions +(i.e., +.BR fileno (3) +will return an error if called on the returned stream). +.SH BUGS +Before glibc 2.7, seeking past the end of a stream created by +.BR open_memstream () +does not enlarge the buffer; instead the +.BR fseek (3) +call fails, returning \-1. +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=1996 +.SH EXAMPLES +See +.BR fmemopen (3). +.SH SEE ALSO +.BR fmemopen (3), +.BR fopen (3), +.BR setbuf (3) diff --git a/upstream/opensuse-leap-15-6/man3/opendir.3 b/upstream/opensuse-leap-15-6/man3/opendir.3 new file mode 100644 index 00000000..c525757a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/opendir.3 @@ -0,0 +1,148 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 : document fdopendir(). +.TH opendir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +opendir, fdopendir \- open a directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "DIR *opendir(const char *" name ); +.BI "DIR *fdopendir(int " fd ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR fdopendir (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR opendir () +function opens a directory stream corresponding to the +directory \fIname\fP, and returns a pointer to the directory stream. +The stream is positioned at the first entry in the directory. +.PP +The +.BR fdopendir () +function +is like +.BR opendir (), +but returns a directory stream for the directory referred +to by the open file descriptor +.IR fd . +After a successful call to +.BR fdopendir (), +.I fd +is used internally by the implementation, +and should not otherwise be used by the application. +.SH RETURN VALUE +The +.BR opendir () +and +.BR fdopendir () +functions return a pointer to the directory stream. +On error, NULL is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EACCES +Permission denied. +.TP +.B EBADF +.I fd +is not a valid file descriptor opened for reading. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOENT +Directory does not exist, or \fIname\fP is an empty string. +.TP +.B ENOMEM +Insufficient memory to complete the operation. +.TP +.B ENOTDIR +\fIname\fP is not a directory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR opendir (), +.BR fdopendir () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH STANDARDS +.TP +.BR opendir () +SVr4, 4.3BSD, POSIX.1-2001. +.TP +.BR fdopendir () +POSIX.1-2008. +glibc 2.4. +.SH NOTES +Filename entries can be read from a directory stream using +.BR readdir (3). +.PP +The underlying file descriptor of the directory stream can be obtained using +.BR dirfd (3). +.PP +The +.BR opendir () +function sets the close-on-exec flag for the file descriptor underlying the +.IR "DIR *" . +The +.BR fdopendir () +function leaves the setting of the close-on-exec +flag unchanged for the file descriptor, +.IR fd . +POSIX.1-200x leaves it unspecified whether a successful call to +.BR fdopendir () +will set the close-on-exec flag for the file descriptor, +.IR fd . +.SH SEE ALSO +.BR open (2), +.BR closedir (3), +.BR dirfd (3), +.BR readdir (3), +.BR rewinddir (3), +.BR scandir (3), +.BR seekdir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/openpty.3 b/upstream/opensuse-leap-15-6/man3/openpty.3 new file mode 100644 index 00000000..648a4472 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/openpty.3 @@ -0,0 +1,180 @@ +'\" t +.\" Copyright (c) OpenBSD Group +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" Converted into a manpage again by Martin Schulze +.\" +.\" Added -lutil remark, 030718 +.\" +.TH openpty 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +openpty, login_tty, forkpty \- terminal utility functions +.SH LIBRARY +System utilities library +.RI ( libutil ", " \-lutil ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int openpty(int *" amaster ", int *" aslave ", char *" name , +.BI " const struct termios *" termp , +.BI " const struct winsize *" winp ); +.BI "pid_t forkpty(int *" amaster ", char *" name , +.BI " const struct termios *" termp , +.BI " const struct winsize *" winp ); +.PP +.B #include +.PP +.BI "int login_tty(int " fd ); +.fi +.SH DESCRIPTION +The +.BR openpty () +function finds an available pseudoterminal and returns file descriptors +for the master and slave in +.I amaster +and +.IR aslave . +If +.I name +is not NULL, the filename of the slave is returned in +.IR name . +If +.I termp +is not NULL, the terminal parameters of the slave will be set to the +values in +.IR termp . +If +.I winp +is not NULL, the window size of the slave will be set to the values in +.IR winp . +.PP +The +.BR login_tty () +function prepares for a login on the terminal +referred to by the file descriptor +.I fd +(which may be a real terminal device, or the slave of a pseudoterminal as +returned by +.BR openpty ()) +by creating a new session, making +.I fd +the controlling terminal for the calling process, setting +.I fd +to be the standard input, output, and error streams of the current +process, and closing +.IR fd . +.PP +The +.BR forkpty () +function combines +.BR openpty (), +.BR fork (2), +and +.BR login_tty () +to create a new process operating in a pseudoterminal. +A file descriptor referring to +master side of the pseudoterminal is returned in +.IR amaster . +If +.I name +is not NULL, the buffer it points to is used to return the +filename of the slave. +The +.I termp +and +.I winp +arguments, if not NULL, +will determine the terminal attributes and window size of the slave +side of the pseudoterminal. +.SH RETURN VALUE +If a call to +.BR openpty (), +.BR login_tty (), +or +.BR forkpty () +is not successful, \-1 is returned and +.I errno +is set to indicate the error. +Otherwise, +.BR openpty (), +.BR login_tty (), +and the child process of +.BR forkpty () +return 0, and the parent process of +.BR forkpty () +returns the process ID of the child process. +.SH ERRORS +.BR openpty () +fails if: +.TP +.B ENOENT +There are no available terminals. +.PP +.BR login_tty () +fails if +.BR ioctl (2) +fails to set +.I fd +to the controlling terminal of the calling process. +.PP +.BR forkpty () +fails if either +.BR openpty () +or +.BR fork (2) +fails. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR forkpty (), +.BR openpty () +T} Thread safety MT-Safe locale +T{ +.BR login_tty () +T} Thread safety MT-Unsafe race:ttyname +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +The +.B const +modifiers were added to the structure pointer arguments of +.BR openpty () +and +.BR forkpty () +in glibc 2.8. +.PP +Before glibc 2.0.92, +.BR openpty () +returns file descriptors for a BSD pseudoterminal pair; +since glibc 2.0.92, +it first attempts to open a UNIX 98 pseudoterminal pair, +and falls back to opening a BSD pseudoterminal pair if that fails. +.SH BUGS +Nobody knows how much space should be reserved for +.IR name . +So, calling +.BR openpty () +or +.BR forkpty () +with non-NULL +.I name +may not be secure. +.SH SEE ALSO +.BR fork (2), +.BR ttyname (3), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/opts.3form b/upstream/opensuse-leap-15-6/man3/opts.3form new file mode 100644 index 00000000..15d372f5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/opts.3form @@ -0,0 +1,87 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_opts.3x,v 1.12 2015/12/05 23:55:51 tom Exp $ +.TH opts 3FORM "" +.SH NAME +\fBset_form_opts\fP, +\fBform_opts_on\fP, +\fBform_opts_off\fP, +\fBform_opts\fR \- set and get form options +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_opts(FORM *form, Field_Options opts); +.br +int form_opts_on(FORM *form, Field_Options opts); +.br +int form_opts_off(FORM *form, Field_Options opts); +.br +Field_Options form_opts(const FORM *form); +.br +.SH DESCRIPTION +The function \fBset_form_opts\fR sets all the given form's option bits (form +option bits may be logically-OR'ed together). +.PP +The function \fBform_opts_on\fR turns on the given option bits, and leaves +others alone. +.PP +The function \fBform_opts_off\fR turns off the given option bits, and leaves +others alone. +.PP +The function \fBform_opts\fR returns the form's current option bits. +.PP +The following options are defined (all are on by default): +.TP 5 +O_NL_OVERLOAD +Overload the \fBREQ_NEW_LINE\fR forms driver request so that calling it at the +end of a field goes to the next field. +.TP 5 +O_BS_OVERLOAD +Overload the \fBREQ_DEL_PREV\fR forms driver request so that calling it at the +beginning of a field goes to the previous field. +.SH RETURN VALUE +Except for \fBform_opts\fR, each routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/opts.3menu b/upstream/opensuse-leap-15-6/man3/opts.3menu new file mode 100644 index 00000000..2366e96e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/opts.3menu @@ -0,0 +1,107 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_opts.3x,v 1.14 2016/03/26 22:42:41 tom Exp $ +.TH opts 3MENU "" +.SH NAME +\fBset_menu_opts\fP, +\fBmenu_opts_on\fP, +\fBmenu_opts_off\fP, +\fBmenu_opts\fR \- set and get menu options +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_opts(MENU *menu, Menu_Options opts); +.br +int menu_opts_on(MENU *menu, Menu_Options opts); +.br +int menu_opts_off(MENU *menu, Menu_Options opts); +.br +Menu_Options menu_opts(const MENU *menu); +.br +.SH DESCRIPTION +The function \fBset_menu_opts\fR sets all the given menu's option bits (menu +option bits may be logically-OR'ed together). +.PP +The function \fBmenu_opts_on\fR turns on the given option bits, and leaves +others alone. +.PP +The function \fBmenu_opts_off\fR turns off the given option bits, and leaves +others alone. +.PP +The function \fBmenu_opts\fR returns the menu's current option bits. +.PP +The following options are defined (all are on by default): +.TP 5 +O_ONEVALUE +Only one item can be selected for this menu. +.TP 5 +O_SHOWDESC +Display the item descriptions when the menu is posted. +.TP 5 +O_ROWMAJOR +Display the menu in row-major order. +.TP 5 +O_IGNORECASE +Ignore the case when pattern-matching. +.TP 5 +O_SHOWMATCH +Move the cursor to within the item name while pattern-matching. +.TP 5 +O_NONCYCLIC +Don't wrap around next-item and previous-item, +requests to the other end of the menu. +.TP 5 +O_MOUSE_MENU +If user clicks with the mouse +and it does not fall on the currently active menu, +push \fBKEY_MOUSE\fP and the \fBMEVENT\fP data +back on the queue to allow processing in another part of the calling program. +.SH RETURN VALUE +Except for \fBmenu_opts\fR, each routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_POSTED +The menu is already posted. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/ordchr.3am b/upstream/opensuse-leap-15-6/man3/ordchr.3am new file mode 100644 index 00000000..186cf616 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ordchr.3am @@ -0,0 +1,79 @@ +.TH ORDCHR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +ordchr \- convert characters to strings and vice versa +.SH SYNOPSIS +.ft CW +@load "ordchr" +.sp +number = ord("A") +.br +string = chr(65) +.ft R +.SH DESCRIPTION +The +.I ordchr +extension adds two functions named +.BR ord() . +and +.BR chr() , +as follows. +.TP +.B ord() +This function takes a string argument, and returns the +numeric value of the first character in the string. +.TP +.B chr() +This function takes a numeric argument and returns a string +whose first character is that represented by the number. +.PP +These functions are inspired by the Pascal language functions +of the same name. +.\" .SH NOTES +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "ordchr" +\&... +printf("The numeric value of 'A' is %d\en", ord("A")) +printf("The string value of 65 is %s\en", chr(65)) +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/outopts.3ncurses b/upstream/opensuse-leap-15-6/man3/outopts.3ncurses new file mode 100644 index 00000000..76242ad6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/outopts.3ncurses @@ -0,0 +1,231 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_outopts.3x,v 1.28 2017/01/07 19:25:15 tom Exp $ +.TH outopts 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBclearok\fR, +\fBidlok\fR, +\fBidcok\fR, +\fBimmedok\fR, +\fBleaveok\fR, +\fBsetscrreg\fR, +\fBwsetscrreg\fR, +\fBscrollok\fR, +\fBnl\fR, +\fBnonl\fR \- \fBcurses\fR output options +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint clearok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBint idlok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBvoid idcok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBvoid immedok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBint leaveok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBint setscrreg(int \fP\fItop\fP\fB, int \fP\fIbot\fP\fB);\fR +.br +\fBint wsetscrreg(WINDOW *\fP\fIwin\fP\fB, int \fP\fItop\fP\fB, int \fP\fIbot\fP\fB);\fR +.br +\fBint scrollok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBint nl(void);\fR +.br +\fBint nonl(void);\fR +.br +.SH DESCRIPTION +These routines set options that change the style of output within +\fBcurses\fR. +All options are initially \fBFALSE\fR, unless otherwise stated. +It is not necessary to turn these options off before calling \fBendwin\fR(3X). +.SS clearok +.PP +If \fBclearok\fR is called with \fBTRUE\fR as argument, the next +call to \fBwrefresh\fR with this window will clear the screen completely and +redraw the entire screen from scratch. +This is useful when the contents of the +screen are uncertain, or in some cases for a more pleasing visual effect. +If +the \fIwin\fR argument to \fBclearok\fR is the global variable \fBcurscr\fR, +the next call to \fBwrefresh\fR with any window causes the screen to be cleared +and repainted from scratch. +.SS idlok +.PP +If \fBidlok\fR is called with \fBTRUE\fR as second argument, \fBcurses\fR +considers using the hardware insert/delete line feature of terminals so +equipped. +Calling \fBidlok\fR with \fBFALSE\fR as second argument disables use +of line insertion and deletion. +This option should be enabled only if the +application needs insert/delete line, for example, for a screen editor. +It is +disabled by default because insert/delete line tends to be visually annoying +when used in applications where it is not really needed. +If insert/delete line +cannot be used, \fBcurses\fR redraws the changed portions of all lines. +.SS idcok +.PP +If \fBidcok\fR is called with \fBFALSE\fR as second argument, \fBcurses\fR +no longer considers using the hardware insert/delete character feature of +terminals so equipped. +Use of character insert/delete is enabled by default. +Calling \fBidcok\fR with \fBTRUE\fR as second argument re-enables use +of character insertion and deletion. +.SS immedok +.PP +If \fBimmedok\fR is called with \fBTRUE as argument\fR, any change +in the window image, such as the ones caused by \fBwaddch, wclrtobot, wscrl\fR, +etc., automatically cause a call to \fBwrefresh\fR. +However, it may +degrade performance considerably, due to repeated calls to \fBwrefresh\fR. +It is disabled by default. +.SS leaveok +.PP +Normally, the hardware cursor is left at the location of the window cursor +being refreshed. +The \fBleaveok\fR option allows the cursor to be left +wherever the update happens to leave it. +It is useful for applications where +the cursor is not used, since it reduces the need for cursor motions. +.SS setscrreg +.PP +The \fBsetscrreg\fR and \fBwsetscrreg\fR routines allow the application +programmer to set a software scrolling region in a window. +The \fItop\fR and +\fIbot\fR parameters +are the line numbers of the top and bottom margin of the scrolling +region. +(Line 0 is the top line of the window.) If this option and +\fBscrollok\fR are enabled, an attempt to move off the bottom margin line +causes all lines in the scrolling region to scroll one line in the direction +of the first line. +Only the text of the window is scrolled. +(Note that this +has nothing to do with the use of a physical scrolling region capability in the +terminal, like that in the VT100. +If \fBidlok\fR is enabled and the terminal +has either a scrolling region or insert/delete line capability, they will +probably be used by the output routines.) +.SS scrollok +.PP +The \fBscrollok\fR option controls what happens when the cursor of a window is +moved off the edge of the window or scrolling region, either as a result of a +newline action on the bottom line, or typing the last character of the last +line. +If disabled, (\fIbf\fR is \fBFALSE\fR), the cursor is left on the bottom +line. +If enabled, (\fIbf\fR is \fBTRUE\fR), the window is scrolled up one line +(Note that to get the physical scrolling effect on the terminal, it is +also necessary to call \fBidlok\fR). +.SS nl, nonl +.PP +The \fBnl\fR and \fBnonl\fR routines control whether the underlying display +device translates the return key into newline on input, and whether it +translates newline into return and line-feed on output (in either case, the +call \fBaddch('\\n')\fR does the equivalent of return and line feed on the +virtual screen). +Initially, these translations do occur. +If you disable them +using \fBnonl\fR, \fBcurses\fR will be able to make better use of the line-feed +capability, resulting in faster cursor motion. +Also, \fBcurses\fR will then be +able to detect the return key. +.SH RETURN VALUE +The functions \fBsetscrreg\fR and \fBwsetscrreg\fR return \fBOK\fR upon success +and \fBERR\fR upon failure. +All other routines that return an integer always +return \fBOK\fR. +.PP +X/Open Curses does not define any error conditions. +.PP +In this implementation, those functions that have a window pointer +will return an error if the window pointer is null. +.RS +.TP 5 +.B wclrtoeol +returns an error +if the cursor position is about to wrap. +.TP 5 +.B wsetscrreg +returns an error if the scrolling region limits extend outside the window. +.RE +.PP +X/Open does not define any error conditions. +This implementation returns an error +if the window pointer is null. +.SH PORTABILITY +These functions are described in the XSI Curses standard, Issue 4. +.PP +The XSI Curses standard is ambiguous on the question of whether \fBraw\fR +should disable the CRLF translations controlled by \fBnl\fR and \fBnonl\fR. +BSD curses did turn off these translations; AT&T curses (at least as late as +SVr1) did not. +We choose to do so, on the theory that a programmer requesting +raw input wants a clean (ideally 8-bit clean) connection that the operating +system will not alter. +.PP +Some historic curses implementations had, as an undocumented feature, the +ability to do the equivalent of \fBclearok(..., 1)\fR by saying +\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. +This will not work under +ncurses. +.PP +Earlier System V curses implementations specified that with \fBscrollok\fR +enabled, any window modification triggering a scroll also forced a physical +refresh. +XSI Curses does not require this, and \fBncurses\fR avoids doing +it to perform better vertical-motion optimization at \fBwrefresh\fR +time. +.PP +The XSI Curses standard does not mention that the cursor should be +made invisible as a side-effect of \fBleaveok\fR. +SVr4 curses documentation does this, but the code does not. +Use \fBcurs_set\fR to make the cursor invisible. +.SH NOTES +Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR, +\fBnonl\fR and \fBsetscrreg\fR may be macros. +.PP +The \fBimmedok\fR routine is useful for windows that are used as terminal +emulators. +.SH SEE ALSO +.na +\fBncurses\fR(3NCURSES), +\fBaddch\fR(3NCURSES), +\fBclear\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBscroll\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/overlay.3ncurses b/upstream/opensuse-leap-15-6/man3/overlay.3ncurses new file mode 100644 index 00000000..944737e2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/overlay.3ncurses @@ -0,0 +1,87 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2013,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_overlay.3x,v 1.18 2015/07/21 00:51:31 tom Exp $ +.TH overlay 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBoverlay\fR, +\fBoverwrite\fR, +\fBcopywin\fR \- overlay and manipulate overlapped \fBcurses\fR windows +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint overlay(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fR +.br +\fBint overwrite(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB);\fR +.br +\fBint copywin(const WINDOW *\fP\fIsrcwin\fP\fB, WINDOW *\fP\fIdstwin\fP\fB, int \fP\fIsminrow\fP\fB,\fR + \fBint \fP\fIsmincol\fP\fB, int \fP\fIdminrow\fP\fB, int \fP\fIdmincol\fP\fB, int \fP\fIdmaxrow\fP\fB,\fR + \fBint \fP\fIdmaxcol\fP\fB, int \fP\fIoverlay\fP\fB);\fR +.SH DESCRIPTION +.SS overlay, overwrite +The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on +top of \fIdstwin\fR. +\fIscrwin\fR and \fIdstwin\fR are not required +to be the same size; only text where the two windows overlap is copied. +The difference is that \fBoverlay\fR is non-destructive +(blanks are not copied) whereas \fBoverwrite\fR is destructive. +.SS copywin +.PP +The \fBcopywin\fR routine provides a finer granularity of control over the +\fBoverlay\fR and \fBoverwrite\fR routines. +As in the \fBprefresh\fR routine, +a rectangle is specified in the destination window, (\fIdminrow\fR, +\fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner +coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR). +If the argument \fIoverlay\fR is \fBtrue\fR, +then copying is non-destructive, +as in \fBoverlay\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +X/Open defines no error conditions. +In this implementation, +\fBcopywin\fP, +\fBoverlay\fP and \fBoverwrite\fP return an error +if either of the window pointers are null, or +if some part of the window would be placed off-screen. +.SH NOTES +Note that \fBoverlay\fR and \fBoverwrite\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions (adding the const +qualifiers). +It further specifies their behavior in the presence of characters +with multibyte renditions (not yet supported in this implementation). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBpad\fR(3NCURSES), \fBrefresh\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/pad.3ncurses b/upstream/opensuse-leap-15-6/man3/pad.3ncurses new file mode 100644 index 00000000..d17c7b28 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pad.3ncurses @@ -0,0 +1,237 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_pad.3x,v 1.24 2017/11/21 01:16:26 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH pad 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBnewpad\fR, +\fBsubpad\fR, +\fBprefresh\fR, +\fBpnoutrefresh\fR, +\fBpechochar\fR, +\fBpecho_wchar\fR \- create and display \fBcurses\fR pads +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBWINDOW *newpad(int \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB);\fR +.br +\fBWINDOW *subpad(WINDOW *\fP\fIorig\fP\fB, int \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fR + \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fR +.br +\fBint prefresh(WINDOW *\fP\fIpad\fP\fB, int \fP\fIpminrow\fP\fB, int \fP\fIpmincol\fP\fB,\fR + \fBint \fP\fIsminrow\fP\fB, int \fP\fIsmincol\fP\fB, int \fP\fIsmaxrow\fP\fB, int \fP\fIsmaxcol\fP\fB);\fR +.br +\fBint pnoutrefresh(WINDOW *\fP\fIpad\fP\fB, int \fP\fIpminrow\fP\fB, int \fP\fIpmincol\fP\fB,\fR + \fBint \fP\fIsminrow\fP\fB, int \fP\fIsmincol\fP\fB, int \fP\fIsmaxrow\fP\fB, int \fP\fIsmaxcol\fP\fB);\fR +.br +\fBint pechochar(WINDOW *\fP\fIpad\fP\fB, chtype \fP\fIch\fP\fB);\fR +.br +\fBint pecho_wchar(WINDOW *\fP\fIpad\fP\fB, const cchar_t *\fP\fIwch\fP\fB);\fR +.SH DESCRIPTION +.SS newpad +The \fBnewpad\fR routine creates and returns a pointer to a new pad data +structure with the given number of lines, \fInlines\fR, and columns, +\fIncols\fR. +A pad is like a window, except that it is not restricted by the +screen size, and is not necessarily associated with a particular part of the +screen. +Pads can be used when a large window is needed, and only a part of the +window will be on the screen at one time. +Automatic refreshes of pads +(e.g., from scrolling or echoing of input) do not occur. +.PP +It is not +legal to call \fBwrefresh\fR with a \fIpad\fR as an argument; the routines +\fBprefresh\fR or \fBpnoutrefresh\fR should be called instead. +Note that these +routines require additional parameters to specify the part of the pad to be +displayed and the location on the screen to be used for the display. +.SS subpad +.PP +The \fBsubpad\fR routine creates and returns a pointer to a subwindow within a +pad with the given number of lines, \fInlines\fR, and columns, \fIncols\fR. +Unlike \fBsubwin\fR, which uses screen coordinates, the window is at position +(\fIbegin\fR_\fIx\fR\fB,\fR \fIbegin\fR_\fIy\fR) on the pad. +The window is +made in the middle of the window \fIorig\fR, so that changes made to one window +affect both windows. +During the use of this routine, it will often be +necessary to call \fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before +calling \fBprefresh\fR. +.SS prefresh, pnoutrefresh +.PP +The \fBprefresh\fR and \fBpnoutrefresh\fR routines are analogous to +\fBwrefresh\fR and \fBwnoutrefresh\fR except that they relate to pads instead +of windows. +The additional parameters are needed to indicate what part of the +pad and screen are involved. +.bP +The \fIpminrow\fR and \fIpmincol\fR parameters specify the upper +left-hand corner of the rectangle to be displayed in the pad. +.bP +The \fIsminrow\fR, +\fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol\fR +parameters specify the edges of the +rectangle to be displayed on the screen. +.PP +The lower right-hand corner of the +rectangle to be displayed in the pad is calculated from the screen coordinates, +since the rectangles must be the same size. +Both rectangles must be entirely +contained within their respective structures. +Negative values of +\fIpminrow\fR, \fIpmincol\fR, \fIsminrow\fR, or \fIsmincol\fR are treated as if +they were zero. +.SS pechochar +.PP +The \fBpechochar\fR routine is functionally equivalent to a call to \fBaddch\fR +followed by a call to \fBrefresh\fR(3X), a call to \fBwaddch\fR followed by a call +to \fBwrefresh\fR, or a call to \fBwaddch\fR followed by a call to +\fBprefresh\fR. +The knowledge that only a single character is being output is +taken into consideration and, for non-control characters, a considerable +performance gain might be seen by using these routines instead of their +equivalents. +In the case of \fBpechochar\fR, the last location of the pad on +the screen is reused for the arguments to \fBprefresh\fR. +.SS pecho_wchar +.PP +The \fBpecho_wchar\fR function is the analogous wide-character +form of \fBpechochar\fR. +It outputs one character to a pad and immediately refreshes the pad. +It does this by a call to \fBwadd_wch\fR followed by a call to \fBprefresh\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +Routines that return pointers return \fBNULL\fR on error, and set \fBerrno\fR +to \fBENOMEM\fR. +.PP +X/Open does not define any error conditions. +In this implementation +.RS 3 +.TP 5 +\fBprefresh\fP and \fBpnoutrefresh\fP +return an error +if the window pointer is null, or +if the window is not really a pad or +if the area to refresh extends off-screen or +if the minimum coordinates are greater than the maximum. +.TP 5 +\fBpechochar\fP +returns an error +if the window is not really a pad, and the associated call +to \fBwechochar\fP returns an error. +.TP 5 +\fBpecho_wchar\fP +returns an error +if the window is not really a pad, and the associated call +to \fBwecho_wchar\fP returns an error. +.RE +.SH NOTES +Note that \fBpechochar\fR may be a macro. +.SH PORTABILITY +BSD curses has no \fIpad\fP feature. +.PP +SVr2 curses (1986) provided the \fBnewpad\fP and related functions, +documenting them in a single line each. +SVr3 (1987) provided more extensive documentation. +.PP +The documentation does not explain the term \fIpad\fP. +However, the Apollo \fIAegis\fP workstation operating system +supported a graphical \fIpad\fP feature: +.bP +These graphical pads could be much larger than the computer's display. +.bP +The read-only output from a command could be scrolled back to inspect, +and select text from the pad. +.PP +The two uses may be related. +.PP +The XSI Curses standard, Issue 4 describes these functions, +without significant change from the SVr3 documentation. +It describes no error conditions. +The behavior of \fBsubpad\fP if the parent window is not +a pad is undocumented, +and is not checked by the vendor Unix implementations: +.bP +SVr4 curses sets a flag in the \fBWINDOW\fP structure in \fBnewpad\fP +which tells if the window is a \fIpad\fP. +.IP +However, it uses this information only in +\fBwaddch\fP (to decide if it should call \fBwrefresh\fP) and +\fBwscrl\fP (to avoid scrolling a pad), +and does not check in \fBwrefresh\fP to ensure that the pad +is refreshed properly. +.bP +Solaris X/Open Curses checks if a window is a pad in \fBwnoutrefresh\fP, +returning \fBERR\fP in that case. +.IP +However, it only sets the flag for subwindows if the parent window is a pad. +Its \fBnewpad\fP function does not set this information. +Consequently, the check will never fail. +.IP +It makes no comparable check in \fBpnoutrefresh\fP, +though interestingly enough, a comment in the source code +states that the lack of a check was an MKS extension. +.bP +NetBSD 7 curses +sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP, +using this to help with the distinction between \fBwnoutrefresh\fP +and \fBpnoutrefresh\fP. +.IP +It does not check for the case where a subwindow is created in +a pad using \fBsubwin\fP or \fBderwin\fP. +.IP +The \fBdupwin\fP function returns a regular window when duplicating a pad. +Likewise, \fBgetwin\fP always returns a window, even if the saved +data was from a pad. +.PP +This implementation +.bP +sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP, +.bP +allows a \fBsubwin\fP or \fBderwin\fP call to succeed having a pad parent by +forcing the subwindow to be a pad, +.bP +checks in both \fBwnoutrefresh\fP and \fBpnoutrefresh\fP to ensure +that pads and windows are handled distinctly, and +.bP +ensures that \fBdupwin\fP and \fBgetwin\fP treat +pads versus windows consistently. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBrefresh\fR(3NCURSES), \fBtouch\fR(3NCURSES), \fBaddch\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/page.3form b/upstream/opensuse-leap-15-6/man3/page.3form new file mode 100644 index 00000000..7a12d917 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/page.3form @@ -0,0 +1,98 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_page.3x,v 1.14 2016/10/29 22:27:24 tom Exp $ +.TH page 3FORM "" +.SH NAME +\fBform_page\fR \- set and get form page number +.SH SYNOPSIS +\fB#include \fR +.br +int set_current_field(FORM *form, FIELD *field); +.br +FIELD *current_field(const FORM *); +.br +int unfocus_current_field(FORM *form); +.br +int set_form_page(FORM *form, int n); +.br +int form_page(const FORM *form); +.br +int field_index(const FIELD *field); +.br +.SH DESCRIPTION +The function \fBset_current_field\fR sets the current field of the given +form; \fBcurrent_field\fR returns the current field of the given form. +.PP +The function \fBunfocus_current_field\fR removes the focus from the current +field of the form. In such state, inquiries via \fBcurrent_field\fR shall return +a NULL pointer. +.PP +The function \fBset_form_page\fR sets the form's page number (goes to page +\fIn\fR of the form). +.PP +The function \fBform_page\fR returns the form's current page number. +.PP +The function \fBfield_index\fR returns the index of the field in the +field array of the form it is connected to. It returns \fBERR\fR if +the argument is the null pointer or the field is not connected. +.SH RETURN VALUE +Except for \fBform_page\fR, each routine returns one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_INVALID_FIELD +Contents of a field are not valid. +.TP 5 +.B E_REQUEST_DENIED +The form driver could not process the request. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +The \fBunfocus_current_field\fP function is an ncurses extension. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/panel.3curses b/upstream/opensuse-leap-15-6/man3/panel.3curses new file mode 100644 index 00000000..c001f2c4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/panel.3curses @@ -0,0 +1,204 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: panel.3x,v 1.24 2017/11/25 20:31:13 tom Exp $ +.TH panel 3CURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.SH NAME +panel \- panel stack extension for curses +.SH SYNOPSIS +\fB#include \fR +.P +\fBcc [flags] sourcefiles \-lpanel \-lncurses\fR +.P +\fBPANEL *new_panel(WINDOW *win);\fR +.br +\fBint bottom_panel(PANEL *pan);\fR +.br +\fBint top_panel(PANEL *pan);\fR +.br +\fBint show_panel(PANEL *pan);\fR +.br +\fBvoid update_panels();\fR +.br +\fBint hide_panel(PANEL *pan);\fR +.br +\fBWINDOW *panel_window(const PANEL *pan);\fR +.br +\fBint replace_panel(PANEL *pan, WINDOW *window);\fR +.br +\fBint move_panel(PANEL *pan, int starty, int startx);\fR +.br +\fBint panel_hidden(const PANEL *pan);\fR +.br +\fBPANEL *panel_above(const PANEL *pan);\fR +.br +\fBPANEL *panel_below(const PANEL *pan);\fR +.br +\fBint set_panel_userptr(PANEL *pan, const void *ptr);\fR +.br +\fBconst void *panel_userptr(const PANEL *pan);\fR +.br +\fBint del_panel(PANEL *pan);\fR +.br +.SH DESCRIPTION +Panels are \fBncurses\fR(3NCURSES) windows with the added feature of +depth. Panel functions allow the use of stacked windows and ensure +the proper portions of each window and the curses \fBstdscr\fR window are +hidden or displayed when panels are added, moved, modified or removed. +The set of currently visible panels is the stack of panels. The +\fBstdscr\fR window is beneath all panels, and is not considered part +of the stack. +.P +A window is associated with every panel. The panel routines enable +you to create, move, hide, and show panels, as well as position a +panel at any desired location in the stack. +.P +Panel routines are a functional layer added to \fBncurses\fR(3NCURSES), make only +high-level curses calls, and work anywhere terminfo curses does. +.SH FUNCTIONS +.TP +.B new_panel(win) +allocates a \fBPANEL\fR structure, associates it with +\fBwin\fR, places the panel on the top of the stack (causes it +to be displayed above any other panel) and returns a +pointer to the new panel. +.TP +.B update_panels +refreshes the virtual screen to reflect the relations between the +panels in the stack, but does not call \fBdoupdate\fP to refresh the +physical screen. +Use this function and not \fBwrefresh\fP or \fBwnoutrefresh\fP. +.B update_panels +may be called more than once before a call to +\fBdoupdate\fP, but \fBdoupdate\fP is the function responsible for updating +the physical screen. +.TP +.B del_panel(pan) +removes the given panel from the stack and deallocates the +\fBPANEL\fR structure (but not its associated window). +.TP +.B hide_panel(pan) +removes the given panel from the panel stack and thus hides it from +view. The \fBPANEL\fR structure is not lost, merely removed from the stack. +.TP +.B panel_hidden(pan) +returns \fBTRUE\fP if the panel is in the panel stack, +\fBFALSE\fP if it is not. +If the panel is a null pointer, return \fBERR\fP. +.TP +.B show_panel(pan) +makes a hidden panel visible by placing it on top of the panels in the +panel stack. See COMPATIBILITY below. +.TP +.B top_panel(pan) +puts the given visible panel on top of all panels in the stack. See +COMPATIBILITY below. +.TP +.B bottom_panel(pan) +puts panel at the bottom of all panels. +.TP +.B move_panel(pan,starty,startx) +moves the given panel window so that its upper-left corner is at +\fBstarty\fR, \fBstartx\fR. It does not change the position of the +panel in the stack. Be sure to use this function, not \fBmvwin\fR, +to move a panel window. +.TP +.B replace_panel(pan,window) +replaces the current window of panel with \fBwindow\fR (useful, for +example if you want to resize a panel; if you're using \fBncurses\fR, +you can call \fBreplace_panel\fR on the output of \fBwresize\fR(3NCURSES)). +It does not change the position of the panel in the stack. +.TP +.B panel_above(pan) +returns a pointer to the panel above pan. If the panel argument is +\fB(PANEL *)0\fR, it returns a pointer to the bottom panel in the stack. +.TP +.B panel_below(pan) +returns a pointer to the panel just below pan. If the panel argument +is \fB(PANEL *)0\fR, it returns a pointer to the top panel in the stack. +.TP +.B set_panel_userptr(pan,ptr) +sets the panel's user pointer. +.TP +.B panel_userptr(pan) +returns the user pointer for a given panel. +.TP +.B panel_window(pan) +returns a pointer to the window of the given panel. +.SH DIAGNOSTICS +Each routine that returns a pointer returns \fBNULL\fR if an error +occurs. Each routine that returns an int value returns \fBOK\fR if it +executes successfully and \fBERR\fR if not. +.SH COMPATIBILITY +Reasonable care has been taken to ensure compatibility +with the native panel facility introduced in System V (inspection of +the SVr4 manual pages suggests the programming interface is unchanged). +The \fBPANEL\fR data structures are merely similar. The programmer +is cautioned not to directly use \fBPANEL\fR fields. +.P +The functions \fBshow_panel\fR and \fBtop_panel\fR are identical +in this implementation, and work equally well with displayed or hidden +panels. In the native System V implementation, \fBshow_panel\fR is +intended for making a hidden panel visible (at the top of the stack) +and \fBtop_panel\fR is intended for making an already-visible panel +move to the top of the stack. You are cautioned to use the correct +function to ensure compatibility with native panel libraries. +.SH NOTE +In your library list, libpanel.a should be before libncurses.a; that is, +you should say \*(``\-lpanel \-lncurses\*('', not the other way around +(which would give a link-error with static libraries). +.SH PORTABILITY +.PP +The panel facility was documented in SVr4.2 in +\fICharacter User Interface Programming (UNIX SVR4.2)\fP. +.PP +It is not part of X/Open Curses. +.PP +Aside from ncurses, only systems based on SVr4 source code, +e.g., Solaris provide this library. +.SH FILES +.P +panel.h +interface for the panels library +.P +libpanel.a +the panels library itself +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +.PP +This describes \fBncurses\fR +version 6.1 (patch 20180317). +.SH AUTHOR +Originally written by Warren Tucker , +primarily to assist in porting u386mon to systems without a native +panels library. Repackaged for ncurses by Zeyd ben-Halim. diff --git a/upstream/opensuse-leap-15-6/man3/pattern.3menu b/upstream/opensuse-leap-15-6/man3/pattern.3menu new file mode 100644 index 00000000..3d608140 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pattern.3menu @@ -0,0 +1,86 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_pattern.3x,v 1.14 2015/12/05 23:42:45 tom Exp $ +.TH pattern 3MENU "" +.SH NAME +\fBset_menu_pattern\fP, +\fBmenu_pattern\fR \- set and get a menu's pattern buffer +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_pattern(MENU *menu, const char *pattern); +.br +char *menu_pattern(const MENU *menu); +.br +.SH DESCRIPTION +Every menu has an associated pattern match buffer. As input events that are +printable characters come in, they are appended to this match buffer +and tested for a match, as described in \fBdriver\fR(3MENU). +.PP +The function \fBset_menu_pattern\fR sets the pattern buffer for the given menu +and tries to find the first matching item. If it succeeds, that item becomes +current; if not, the current item does not change. +.PP +The function \fBmenu_pattern\fR returns the pattern buffer of the given +\fImenu\fR. +.SH RETURN VALUE +The function \fBmenu_pattern\fR returns a pointer, which is \fBNULL\fR if the \fImenu\fP parameter is \fBNULL\fP. +Otherwise, it is a pointer to a string which is empty if no pattern has been set. +It does not set errno. +.PP +The function \fBset_menu_pattern\fR may return the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to menu. +.TP 5 +.B E_NO_MATCH +Character failed to match. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/perror.3 b/upstream/opensuse-leap-15-6/man3/perror.3 new file mode 100644 index 00000000..347c9bad --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/perror.3 @@ -0,0 +1,145 @@ +'\" t +.\" Copyright (c) 1994 Michael Haardt (michael@moria.de), 1994-06-04 +.\" Copyright (c) 1995 Michael Haardt +.\" (michael@cantor.informatik.rwth-aachen.de), 1995-03-16 +.\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl), 1996-01-13 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 1996-01-13 aeb: merged in some text contributed by Melvin Smith +.\" (msmith@falcon.mercer.peachnet.edu) and various other changes. +.\" Modified 1996-05-16 by Martin Schulze (joey@infodrom.north.de) +.\" +.TH perror 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +perror \- print a system error message +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void perror(const char *" s ); +.PP +.B #include +.PP +.BI "int " errno "; \fR/* Not really declared this way; see errno(3) */" +.PP +.BI "[[deprecated]] const char *const " sys_errlist []; +.BI "[[deprecated]] int " sys_nerr ; +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.IR sys_errlist , +.IR sys_nerr : +.nf + From glibc 2.19 to glibc 2.31: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR perror () +function produces a message on standard error describing the last +error encountered during a call to a system or library function. +.PP +First (if +.I s +is not NULL and +.I *s +is not a null byte (\[aq]\e0\[aq])), the argument string +.I s +is printed, followed by a colon and a blank. +Then an error message corresponding to the current value of +.I errno +and a new-line. +.PP +To be of most use, the argument string should include the name +of the function that incurred the error. +.PP +The global error list +.IR sys_errlist "[]," +which can be indexed by +.IR errno , +can be used to obtain the error message without the newline. +The largest message number provided in the table is +.IR sys_nerr "\-1." +Be careful when directly accessing this list, because new error values +may not have been added to +.IR sys_errlist "[]." +The use of +.IR sys_errlist "[]" +is nowadays deprecated; use +.BR strerror (3) +instead. +.PP +When a system call fails, it usually returns \-1 and sets the +variable +.I errno +to a value describing what went wrong. +(These values can be found in +.IR .) +Many library functions do likewise. +The function +.BR perror () +serves to translate this error code into human-readable form. +Note that +.I errno +is undefined after a successful system call or library function call: +this call may well change this variable, even though it succeeds, +for example because it internally used some other library function that failed. +Thus, if a failing call is not immediately followed by a call to +.BR perror (), +the value of +.I errno +should be saved. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR perror () +T} Thread safety MT-Safe race:stderr +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.I errno +.TQ +.BR perror () +C11, POSIX.1-2008. +.TP +.I sys_nerr +.TQ +.I sys_errlist +BSD. +.SH HISTORY +.TP +.I errno +.TQ +.BR perror () +POSIX.1-2001, C89, 4.3BSD. +.TP +.I sys_nerr +.TQ +.I sys_errlist +Removed in glibc 2.32. +.SH SEE ALSO +.BR err (3), +.BR errno (3), +.BR error (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/popen.3 b/upstream/opensuse-leap-15-6/man3/popen.3 new file mode 100644 index 00000000..1b56b32d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/popen.3 @@ -0,0 +1,211 @@ +'\" t +.\" Copyright 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)popen.3 6.4 (Berkeley) 4/30/91 +.\" +.\" Converted for Linux, Mon Nov 29 14:45:38 1993, faith@cs.unc.edu +.\" Modified Sat May 18 20:37:44 1996 by Martin Schulze (joey@linux.de) +.\" Modified 7 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) +.\" +.TH popen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +popen, pclose \- pipe stream to or from a process +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "FILE *popen(const char *" command ", const char *" type ); +.BI "int pclose(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR popen (), +.BR pclose (): +.nf + _POSIX_C_SOURCE >= 2 + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR popen () +function opens a process by creating a pipe, forking, and invoking the +shell. +Since a pipe is by definition unidirectional, the +.I type +argument may specify only reading or writing, not both; the resulting +stream is correspondingly read-only or write-only. +.PP +The +.I command +argument is a pointer to a null-terminated string containing a shell +command line. +This command is passed to +.I /bin/sh +using the +.B \-c +flag; interpretation, if any, is performed by the shell. +.PP +The +.I type +argument is a pointer to a null-terminated string which must contain +either the letter \[aq]r\[aq] for reading or the letter \[aq]w\[aq] for writing. +Since glibc 2.9, +this argument can additionally include the letter \[aq]e\[aq], +which causes the close-on-exec flag +.RB ( FD_CLOEXEC ) +to be set on the underlying file descriptor; +see the description of the +.B O_CLOEXEC +flag in +.BR open (2) +for reasons why this may be useful. +.PP +The return value from +.BR popen () +is a normal standard I/O stream in all respects save that it must be closed +with +.BR pclose () +rather than +.BR fclose (3). +Writing to such a stream writes to the standard input of the command; the +command's standard output is the same as that of the process that called +.BR popen (), +unless this is altered by the command itself. +Conversely, reading from +the stream reads the command's standard output, and the command's +standard input is the same as that of the process that called +.BR popen (). +.PP +Note that output +.BR popen () +streams are block buffered by default. +.PP +The +.BR pclose () +function waits for the associated process to terminate and returns the exit +status of the command as returned by +.BR wait4 (2). +.SH RETURN VALUE +.BR popen (): +on success, returns a pointer to an open stream that +can be used to read or write to the pipe; +if the +.BR fork (2) +or +.BR pipe (2) +calls fail, or if the function cannot allocate memory, +NULL is returned. +.PP +.BR pclose (): +on success, returns the exit status of the command; if +.\" These conditions actually give undefined results, so I commented +.\" them out. +.\" .I stream +.\" is not associated with a "popen()ed" command, if +.\".I stream +.\" already "pclose()d", or if +.BR wait4 (2) +returns an error, or some other error is detected, +\-1 is returned. +.PP +On failure, both functions set +.I errno +to indicate the error. +.SH ERRORS +The +.BR popen () +function does not set +.I errno +if memory allocation fails. +If the underlying +.BR fork (2) +or +.BR pipe (2) +fails, +.I errno +is set to indicate the error. +If the +.I type +argument is invalid, and this condition is detected, +.I errno +is set to +.BR EINVAL . +.PP +If +.BR pclose () +cannot obtain the child status, +.I errno +is set to +.BR ECHILD . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR popen (), +.BR pclose () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The \[aq]e\[aq] value for +.I type +is a Linux extension. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH CAVEATS +Carefully read Caveats in +.BR system (3). +.SH BUGS +Since the standard input of a command opened for reading shares its seek +offset with the process that called +.BR popen (), +if the original process has done a buffered read, the command's input +position may not be as expected. +Similarly, the output from a command +opened for writing may become intermingled with that of the original +process. +The latter can be avoided by calling +.BR fflush (3) +before +.BR popen (). +.PP +Failure to execute the shell is indistinguishable from the shell's failure +to execute command, or an immediate exit of the command. +The only hint is an exit status of 127. +.\" .SH HISTORY +.\" A +.\" .BR popen () +.\" and a +.\" .BR pclose () +.\" function appeared in Version 7 AT&T UNIX. +.SH SEE ALSO +.BR sh (1), +.BR fork (2), +.BR pipe (2), +.BR wait4 (2), +.BR fclose (3), +.BR fflush (3), +.BR fopen (3), +.BR stdio (3), +.BR system (3) diff --git a/upstream/opensuse-leap-15-6/man3/posix_fallocate.3 b/upstream/opensuse-leap-15-6/man3/posix_fallocate.3 new file mode 100644 index 00000000..1dd70da2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/posix_fallocate.3 @@ -0,0 +1,182 @@ +'\" t +.\" Copyright (c) 2006, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH posix_fallocate 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +posix_fallocate \- allocate file space +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int posix_fallocate(int " fd ", off_t " offset ", off_t " len ); +.fi +.PP +.ad l +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR posix_fallocate (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The function +.BR posix_fallocate () +ensures that disk space is allocated for the file referred to by the +file descriptor +.I fd +for the bytes in the range starting at +.I offset +and continuing for +.I len +bytes. +After a successful call to +.BR posix_fallocate (), +subsequent writes to bytes in the specified range are +guaranteed not to fail because of lack of disk space. +.PP +If the size of the file is less than +.IR offset + len , +then the file is increased to this size; +otherwise the file size is left unchanged. +.SH RETURN VALUE +.BR posix_fallocate () +returns zero on success, or an error number on failure. +Note that +.I errno +is not set. +.SH ERRORS +.TP +.B EBADF +.I fd +is not a valid file descriptor, or is not opened for writing. +.TP +.B EFBIG +.I offset+len +exceeds the maximum file size. +.TP +.B EINTR +A signal was caught during execution. +.TP +.B EINVAL +.I offset +was less than 0, or +.I len +was less than or equal to 0, or the underlying filesystem does not +support the operation. +.TP +.B ENODEV +.I fd +does not refer to a regular file. +.TP +.B ENOSPC +There is not enough space left on the device containing the file +referred to by +.IR fd . +.TP +.B EOPNOTSUPP +The filesystem containing the file referred to by +.I fd +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 +.B ESPIPE +.I fd +refers to a pipe. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR posix_fallocate () +T} Thread safety T{ +MT-Safe (but see NOTES) +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1.94. +POSIX.1-2001 +.PP +POSIX.1-2008 says that an implementation +.I shall +give the +.B EINVAL +error if +.I len +was 0, or +.I offset +was less than 0. +POSIX.1-2001 says that an implementation +.I shall +give the +.B EINVAL +error if +.I len +is less than 0, or +.I offset +was less than 0, and +.I may +give the error if +.I len +equals zero. +.SH CAVEATS +In the glibc implementation, +.BR posix_fallocate () +is implemented using the +.BR fallocate (2) +system call, which is MT-safe. +If the underlying filesystem does not support +.BR fallocate (2), +then the operation is emulated with the following caveats: +.IP \[bu] 3 +The emulation is inefficient. +.IP \[bu] +There is a race condition where concurrent writes from another thread or +process could be overwritten with null bytes. +.IP \[bu] +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 \[bu] +If +.I fd +has been opened with the +.B O_APPEND +or +.B O_WRONLY +flags, the function fails with the error +.BR EBADF . +.PP +In general, the emulation is not MT-safe. +On Linux, applications may use +.BR fallocate (2) +if they cannot tolerate the emulation caveats. +In general, this is +only recommended if the application plans to terminate the operation if +.B EOPNOTSUPP +is returned, otherwise the application itself will need to implement a +fallback with all the same problems as the emulation provided by glibc. +.SH SEE ALSO +.BR fallocate (1), +.BR fallocate (2), +.BR lseek (2), +.BR posix_fadvise (2) diff --git a/upstream/opensuse-leap-15-6/man3/posix_madvise.3 b/upstream/opensuse-leap-15-6/man3/posix_madvise.3 new file mode 100644 index 00000000..5e7e4d5d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/posix_madvise.3 @@ -0,0 +1,112 @@ +.\" Copyright (C) 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH posix_madvise 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +posix_madvise \- give advice about patterns of memory usage +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int posix_madvise(void " addr [. len "], size_t " len ", int " advice ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR posix_madvise (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR posix_madvise () +function allows an application to advise the system about its expected +patterns of usage of memory in the address range starting at +.I addr +and continuing for +.I len +bytes. +The system is free to use this advice in order to improve the performance +of memory accesses (or to ignore the advice altogether), but calling +.BR posix_madvise () +shall not affect the semantics of access to memory in the specified range. +.PP +The +.I advice +argument is one of the following: +.TP +.B POSIX_MADV_NORMAL +The application has no special advice regarding its memory usage patterns +for the specified address range. +This is the default behavior. +.TP +.B POSIX_MADV_SEQUENTIAL +The application expects to access the specified address range sequentially, +running from lower addresses to higher addresses. +Hence, pages in this region can be aggressively read ahead, +and may be freed soon after they are accessed. +.TP +.B POSIX_MADV_RANDOM +The application expects to access the specified address range randomly. +Thus, read ahead may be less useful than normally. +.TP +.B POSIX_MADV_WILLNEED +The application expects to access the specified address range +in the near future. +Thus, read ahead may be beneficial. +.TP +.B POSIX_MADV_DONTNEED +The application expects that it will not access the specified address range +in the near future. +.SH RETURN VALUE +On success, +.BR posix_madvise () +returns 0. +On failure, it returns a positive error number. +.SH ERRORS +.TP +.B EINVAL +.I addr +is not a multiple of the system page size or +.I len +is negative. +.TP +.B EINVAL +.I advice +is invalid. +.TP +.B ENOMEM +Addresses in the specified range are partially or completely outside +the caller's address space. +.SH VERSIONS +POSIX.1 permits an implementation to generate an error if +.I len +is 0. +On Linux, specifying +.I len +as 0 is permitted (as a successful no-op). +.PP +In glibc, this function is implemented using +.BR madvise (2). +However, since glibc 2.6, +.B POSIX_MADV_DONTNEED +is treated as a no-op, because the corresponding +.BR madvise (2) +value, +.BR MADV_DONTNEED , +has destructive semantics. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.SH SEE ALSO +.BR madvise (2), +.BR posix_fadvise (2) diff --git a/upstream/opensuse-leap-15-6/man3/posix_memalign.3 b/upstream/opensuse-leap-15-6/man3/posix_memalign.3 new file mode 100644 index 00000000..f73acf86 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/posix_memalign.3 @@ -0,0 +1,280 @@ +'\" t +.\" Copyright (c) 2001 by John Levon +.\" Based in part on GNU libc documentation. +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2001-10-11, 2003-08-22, aeb, added some details +.\" 2012-03-23, Michael Kerrisk +.\" Document pvalloc() and aligned_alloc() +.TH posix_memalign 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +posix_memalign, aligned_alloc, memalign, valloc, pvalloc \- +allocate aligned memory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int posix_memalign(void **" memptr ", size_t " alignment ", size_t " size ); +.BI "void *aligned_alloc(size_t " alignment ", size_t " size ); +.BI "[[deprecated]] void *valloc(size_t " size ); +.PP +.B #include +.PP +.BI "[[deprecated]] void *memalign(size_t " alignment ", size_t " size ); +.BI "[[deprecated]] void *pvalloc(size_t " size ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR posix_memalign (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.PP +.BR aligned_alloc (): +.nf + _ISOC11_SOURCE +.fi +.PP +.BR valloc (): +.nf + Since glibc 2.12: + (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200112L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE + Before glibc 2.12: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +The function +.BR posix_memalign () +allocates +.I size +bytes and places the address of the allocated memory in +.IR "*memptr" . +The address of the allocated memory will be a multiple of +.IR "alignment" , +which must be a power of two and a multiple of +.IR "sizeof(void\ *)" . +This address can later be successfully passed to +.BR free (3). +If +.I size +is 0, then +the value placed in +.I *memptr +is either NULL +.\" glibc does this: +or a unique pointer value. +.PP +The obsolete function +.BR memalign () +allocates +.I size +bytes and returns a pointer to the allocated memory. +The memory address will be a multiple of +.IR alignment , +which must be a power of two. +.\" The behavior of memalign() for size==0 is as for posix_memalign() +.\" but no standards govern this. +.PP +The function +.BR aligned_alloc () +is the same as +.BR memalign (), +except for the added restriction that +.I size +should be a multiple of +.IR alignment . +.PP +The obsolete function +.BR valloc () +allocates +.I size +bytes and returns a pointer to the allocated memory. +The memory address will be a multiple of the page size. +It is equivalent to +.IR "memalign(sysconf(_SC_PAGESIZE),size)" . +.PP +The obsolete function +.BR pvalloc () +is similar to +.BR valloc (), +but rounds the size of the allocation up to +the next multiple of the system page size. +.PP +For all of these functions, the memory is not zeroed. +.SH RETURN VALUE +.BR aligned_alloc (), +.BR memalign (), +.BR valloc (), +and +.BR pvalloc () +return a pointer to the allocated memory on success. +On error, NULL is returned, and \fIerrno\fP is set +to indicate the error. +.PP +.BR posix_memalign () +returns zero on success, or one of the error values listed in the +next section on failure. +The value of +.I errno +is not set. +On Linux (and other systems), +.BR posix_memalign () +does not modify +.I memptr +on failure. +A requirement standardizing this behavior was added in POSIX.1-2008 TC2. +.\" http://austingroupbugs.net/view.php?id=520 +.SH ERRORS +.TP +.B EINVAL +The +.I alignment +argument was not a power of two, or was not a multiple of +.IR "sizeof(void\ *)" . +.TP +.B ENOMEM +There was insufficient memory to fulfill the allocation request. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR aligned_alloc (), +.BR memalign (), +.BR posix_memalign () +T} Thread safety MT-Safe +T{ +.BR valloc (), +.BR pvalloc () +T} Thread safety MT-Unsafe init +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR aligned_alloc () +C11. +.TP +.BR posix_memalign () +POSIX.1-2008. +.TP +.BR memalign () +.TQ +.BR valloc () +None. +.TP +.BR pvalloc () +GNU. +.SH HISTORY +.TP +.BR aligned_alloc () +glibc 2.16. +C11. +.TP +.BR posix_memalign () +glibc 2.1.91. +POSIX.1d, POSIX.1-2001. +.TP +.BR memalign () +glibc 2.0. +SunOS 4.1.3. +.TP +.BR valloc () +glibc 2.0. +3.0BSD. +Documented as obsolete in 4.3BSD, +and as legacy in SUSv2. +.TP +.BR pvalloc () +glibc 2.0. +.\" +.SS Headers +Everybody agrees that +.BR posix_memalign () +is declared in \fI\fP. +.PP +On some systems +.BR memalign () +is declared in \fI\fP instead of \fI\fP. +.PP +According to SUSv2, +.BR valloc () +is declared in \fI\fP. +.\" Libc4,5 and +glibc declares it in \fI\fP, and also in +\fI\fP +if suitable feature test macros are defined (see above). +.SH NOTES +On many systems there are alignment restrictions, for example, on buffers +used for direct block device I/O. +POSIX specifies the +.I "pathconf(path,_PC_REC_XFER_ALIGN)" +call that tells what alignment is needed. +Now one can use +.BR posix_memalign () +to satisfy this requirement. +.PP +.BR posix_memalign () +verifies that +.I alignment +matches the requirements detailed above. +.BR memalign () +may not check that the +.I alignment +argument is correct. +.PP +POSIX requires that memory obtained from +.BR posix_memalign () +can be freed using +.BR free (3). +Some systems provide no way to reclaim memory allocated with +.BR memalign () +or +.BR valloc () +(because one can pass to +.BR free (3) +only a pointer obtained from +.BR malloc (3), +while, for example, +.BR memalign () +would call +.BR malloc (3) +and then align the obtained value). +.\" Other systems allow passing the result of +.\" .IR valloc () +.\" to +.\" .IR free (3), +.\" but not to +.\" .IR realloc (3). +The glibc implementation +allows memory obtained from any of these functions to be +reclaimed with +.BR free (3). +.PP +The glibc +.BR malloc (3) +always returns 8-byte aligned memory addresses, so these functions are +needed only if you require larger alignment values. +.SH SEE ALSO +.BR brk (2), +.BR getpagesize (2), +.BR free (3), +.BR malloc (3) diff --git a/upstream/opensuse-leap-15-6/man3/posix_openpt.3 b/upstream/opensuse-leap-15-6/man3/posix_openpt.3 new file mode 100644 index 00000000..a50a858c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/posix_openpt.3 @@ -0,0 +1,110 @@ +'\" t +.\" Copyright (C) 2004 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH posix_openpt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +posix_openpt \- open a pseudoterminal device +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int posix_openpt(int " flags ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR posix_openpt (): +.nf + _XOPEN_SOURCE >= 600 +.fi +.SH DESCRIPTION +The +.BR posix_openpt () +function opens an unused pseudoterminal master device, returning a +file descriptor that can be used to refer to that device. +.PP +The +.I flags +argument is a bit mask that ORs together zero or more of +the following flags: +.TP +.B O_RDWR +Open the device for both reading and writing. +It is usual to specify this flag. +.TP +.B O_NOCTTY +Do not make this device the controlling terminal for the process. +.SH RETURN VALUE +On success, +.BR posix_openpt () +returns a file descriptor (a nonnegative integer) which is the lowest +numbered unused file descriptor. +On failure, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +See +.BR open (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR posix_openpt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2.1. +POSIX.1-2001. +.PP +It is part of the UNIX 98 pseudoterminal support (see +.BR pts (4)). +.SH NOTES +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 +Calling +.BR posix_openpt () +creates a pathname for the corresponding pseudoterminal slave device. +The pathname of the slave device can be obtained using +.BR ptsname (3). +The slave device pathname exists only as long as the master device is open. +.SH SEE ALSO +.BR open (2), +.BR getpt (3), +.BR grantpt (3), +.BR ptsname (3), +.BR unlockpt (3), +.BR pts (4), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/posix_spawn.3 b/upstream/opensuse-leap-15-6/man3/posix_spawn.3 new file mode 100644 index 00000000..30bf7e8f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/posix_spawn.3 @@ -0,0 +1,823 @@ +.\" Copyright (c) 2009 Bill O. Gallmeister (bgallmeister@gmail.com) +.\" and Copyright 2010 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux glibc source code +.\" POSIX 1003.1-2004 documentation +.\" (http://www.opengroup.org/onlinepubs/009695399) +.\" +.TH posix_spawn 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +posix_spawn, posix_spawnp \- spawn a process +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int posix_spawn(pid_t *restrict " pid ", const char *restrict " path , +.BI " const posix_spawn_file_actions_t *restrict " file_actions , +.BI " const posix_spawnattr_t *restrict " attrp , +.BI " char *const " argv [restrict], +.BI " char *const " envp [restrict]); +.BI "int posix_spawnp(pid_t *restrict " pid ", const char *restrict " file , +.BI " const posix_spawn_file_actions_t *restrict " file_actions , +.BI " const posix_spawnattr_t *restrict " attrp , +.BI " char *const " argv [restrict], +.BI " char *const " envp [restrict]); +.fi +.SH DESCRIPTION +The +.BR posix_spawn () +and +.BR posix_spawnp () +functions are used to create a new child process that executes +a specified file. +These functions were specified by POSIX to provide a standardized method +of creating new processes on machines that lack the capability +to support the +.BR fork (2) +system call. +These machines are generally small, embedded systems lacking MMU support. +.PP +The +.BR posix_spawn () +and +.BR posix_spawnp () +functions provide the functionality of a combined +.BR fork (2) +and +.BR exec (3), +with some optional housekeeping steps in the child process before the +.BR exec (3). +These functions are not meant to replace the +.BR fork (2) +and +.BR execve (2) +system calls. +In fact, they provide only a subset of the functionality +that can be achieved by using the system calls. +.PP +The only difference between +.BR posix_spawn () +and +.BR posix_spawnp () +is the manner in which they specify the file to be executed by +the child process. +With +.BR posix_spawn (), +the executable file is specified as a pathname +(which can be absolute or relative). +With +.BR posix_spawnp (), +the executable file is specified as a simple filename; +the system searches for this file in the list of directories specified by +.B PATH +(in the same way as for +.BR execvp (3)). +For the remainder of this page, the discussion is phrased in terms of +.BR posix_spawn (), +with the understanding that +.BR posix_spawnp () +differs only on the point just described. +.PP +The remaining arguments to these two functions are as follows: +.TP +.I pid +points to a buffer that is used to return the process ID +of the new child process. +.TP +.I file_actions +points to a +.I "spawn file actions object" +that specifies file-related actions to be performed in the child +between the +.BR fork (2) +and +.BR exec (3) +steps. +This object is initialized and populated before the +.BR posix_spawn () +call using +.BR posix_spawn_file_actions_init (3) +and the +.BR posix_spawn_file_actions_* () +functions. +.TP +.I attrp +points to an +.I attributes objects +that specifies various attributes of the created child process. +This object is initialized and populated before the +.BR posix_spawn () +call using +.BR posix_spawnattr_init (3) +and the +.BR posix_spawnattr_* () +functions. +.TP +.I argv +.TQ +.I envp +specify the argument list and environment for the program +that is executed in the child process, as for +.BR execve (2). +.PP +Below, the functions are described in terms of a three-step process: the +.BR fork () +step, the +.RB pre- exec () +step (executed in the child), +and the +.BR exec () +step (executed in the child). +.SS fork() step +Since glibc 2.24, the +.BR posix_spawn () +function commences by calling +.BR clone (2) +with +.B CLONE_VM +and +.B CLONE_VFORK +flags. +Older implementations use +.BR fork (2), +or possibly +.BR vfork (2) +(see below). +.PP +The PID of the new child process is placed in +.IR *pid . +The +.BR posix_spawn () +function then returns control to the parent process. +.PP +Subsequently, the parent can use one of the system calls described in +.BR wait (2) +to check the status of the child process. +If the child fails in any of the housekeeping steps described below, +or fails to execute the desired file, +it exits with a status of 127. +.PP +Before glibc 2.24, the child process is created using +.BR vfork (2) +instead of +.BR fork (2) +when either of the following is true: +.IP \[bu] 3 +the +.I spawn-flags +element of the attributes object pointed to by +.I attrp +contains the GNU-specific flag +.BR POSIX_SPAWN_USEVFORK ; +or +.IP \[bu] +.I file_actions +is NULL and the +.I spawn-flags +element of the attributes object pointed to by +.I attrp +does \fInot\fP contain +.BR POSIX_SPAWN_SETSIGMASK , +.BR POSIX_SPAWN_SETSIGDEF , +.BR POSIX_SPAWN_SETSCHEDPARAM , +.BR POSIX_SPAWN_SETSCHEDULER , +.BR POSIX_SPAWN_SETPGROUP , +or +.BR POSIX_SPAWN_RESETIDS . +.PP +In other words, +.BR vfork (2) +is used if the caller requests it, +or if there is no cleanup expected in the child before it +.BR exec (3)s +the requested file. +.SS pre-exec() step: housekeeping +In between the +.B fork() +and the +.B exec() +steps, a child process may need to perform a set of housekeeping actions. +The +.BR posix_spawn () +and +.BR posix_spawnp () +functions support a small, well-defined set of system tasks that the child +process can accomplish before it executes the executable file. +These operations are controlled by the attributes object pointed to by +.I attrp +and the file actions object pointed to by +.IR file_actions . +In the child, processing is done in the following sequence: +.IP (1) 5 +Process attribute actions: signal mask, signal default handlers, +scheduling algorithm and parameters, +process group, and effective user and group IDs +are changed as specified by the attributes object pointed to by +.IR attrp . +.IP (2) +File actions, as specified in the +.I file_actions +argument, +are performed in the order that they were specified using calls to the +.BR posix_spawn_file_actions_add* () +functions. +.IP (3) +File descriptors with the +.B FD_CLOEXEC +flag set are closed. +.PP +All process attributes in the child, +other than those affected by attributes specified in the +object pointed to by +.I attrp +and the file actions in the object pointed to by +.IR file_actions , +will be affected as though the child was created with +.BR fork (2) +and it executed the program with +.BR execve (2). +.PP +The process attributes actions are defined by the attributes object +pointed to by +.IR attrp . +The +.I spawn-flags +attribute (set using +.BR posix_spawnattr_setflags (3)) +controls the general actions that occur, +and other attributes in the object specify values +to be used during those actions. +.PP +The effects of the flags that may be specified in +.I spawn-flags +are as follows: +.TP +.B POSIX_SPAWN_SETSIGMASK +Set the signal mask to the signal set specified in the +.I spawn-sigmask +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setsigmask (3)) +of the object pointed to by +.IR attrp . +If the +.B POSIX_SPAWN_SETSIGMASK +flag is not set, then the child inherits the parent's signal mask. +.TP +.B POSIX_SPAWN_SETSIGDEF +Reset the disposition of all signals in the set specified in the +.I spawn-sigdefault +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setsigdefault (3)) +of the object pointed to by +.I attrp +to the default. +For the treatment of the dispositions of signals not specified in the +.I spawn-sigdefault +attribute, or the treatment when +.B POSIX_SPAWN_SETSIGDEF +is not specified, see +.BR execve (2). +.TP +.B POSIX_SPAWN_SETSCHEDPARAM +.\" (POSIX_PRIORITY_SCHEDULING only) +If this flag is set, and the +.B POSIX_SPAWN_SETSCHEDULER +flag is not set, then set the scheduling parameters +to the parameters specified in the +.I spawn-schedparam +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setschedparam (3)) +of the object pointed to by +.IR attrp . +.TP +.B POSIX_SPAWN_SETSCHEDULER +Set the scheduling policy algorithm and parameters of the child, +as follows: +.RS +.IP \[bu] 3 +The scheduling policy is set to the value specified in the +.I spawn-schedpolicy +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setpolicy (3)) +of the object pointed to by +.IR attrp . +.IP \[bu] +The scheduling parameters are set to the value specified in the +.I spawn-schedparam +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setschedparam (3)) +of the object pointed to by +.I attrp +(but see BUGS). +.PP +If the +.B POSIX_SPAWN_SETSCHEDPARAM +and +.B POSIX_SPAWN_SETSCHEDPOLICY +flags are not specified, +the child inherits the corresponding scheduling attributes from the parent. +.RE +.TP +.B POSIX_SPAWN_RESETIDS +If this flag is set, +reset the effective UID and GID to the +real UID and GID of the parent process. +If this flag is not set, +then the child retains the effective UID and GID of the parent. +In either case, if the set-user-ID and set-group-ID permission +bits are enabled on the executable file, their effect will override +the setting of the effective UID and GID (se +.BR execve (2)). +.TP +.B POSIX_SPAWN_SETPGROUP +Set the process group to the value specified in the +.I spawn-pgroup +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setpgroup (3)) +of the object pointed to by +.IR attrp . +If the +.I spawn-pgroup +attribute has the value 0, +the child's process group ID is made the same as its process ID. +If the +.B POSIX_SPAWN_SETPGROUP +flag is not set, the child inherits the parent's process group ID. +.TP +.B POSIX_SPAWN_USEVFORK +Since glibc 2.24, this flag has no effect. +On older implementations, setting this flag forces the +.B fork() +step to use +.BR vfork (2) +instead of +.BR fork (2). +The +.B _GNU_SOURCE +feature test macro must be defined to obtain the definition of this constant. +.TP +.BR POSIX_SPAWN_SETSID " (since glibc 2.26)" +If this flag is set, +the child process shall create a new session and become the session leader. +The child process shall also become the process group leader of the new process +group in the session (see +.BR setsid (2)). +The +.B _GNU_SOURCE +feature test macro must be defined to obtain the definition of this constant. +.\" This flag has been accepted in POSIX, see: +.\" http://austingroupbugs.net/view.php?id=1044 +.\" and has been implemented since glibc 2.26 +.\" commit daeb1fa2e1b33323e719015f5f546988bd4cc73b +.PP +If +.I attrp +is NULL, then the default behaviors described above for each flag apply. +.\" mtk: I think we probably don't want to say the following, since it +.\" could lead people to do the wrong thing +.\" The POSIX standard tells you to call +.\" this function to de-initialize the attributes object pointed to by +.\" .I attrp +.\" when you are done with it; +.\" however, on Linux systems this operation is a no-op. +.PP +The +.I file_actions +argument specifies a sequence of file operations +that are performed in the child process after +the general processing described above, and before it performs the +.BR exec (3). +If +.I file_actions +is NULL, then no special action is taken, and standard +.BR exec (3) +semantics apply\[em]file descriptors open before the exec +remain open in the new process, +except those for which the +.B FD_CLOEXEC +flag has been set. +File locks remain in place. +.PP +If +.I file_actions +is not NULL, then it contains an ordered set of requests to +.BR open (2), +.BR close (2), +and +.BR dup2 (2) +files. +These requests are added to the +.I file_actions +by +.BR posix_spawn_file_actions_addopen (3), +.BR posix_spawn_file_actions_addclose (3), +and +.BR posix_spawn_file_actions_adddup2 (3). +The requested operations are performed in the order they were added to +.IR file_actions . +.\" FIXME . I think the following is best placed in the +.\" posix_spawn_file_actions_adddup2(3) page, and a similar statement is +.\" also needed in posix_spawn_file_actions_addclose(3) +.\" Note that you can specify file descriptors in +.\" .I posix_spawn_file_actions_adddup2 (3) +.\" which would not be usable if you called +.\" .BR dup2 (2) +.\" at that time--i.e., file descriptors that are opened or +.\" closed by the earlier operations +.\" added to +.\" .I file_actions . +.PP +If any of the housekeeping actions fails +(due to bogus values being passed or other reasons why signal handling, +process scheduling, process group ID functions, +and file descriptor operations might fail), +the child process exits with exit value 127. +.SS exec() step +Once the child has successfully forked and performed +all requested pre-exec steps, +the child runs the requested executable. +.PP +The child process takes its environment from the +.I envp +argument, which is interpreted as if it had been passed to +.BR execve (2). +The arguments to the created process come from the +.I argv +argument, which is processed as for +.BR execve (2). +.SH RETURN VALUE +Upon successful completion, +.BR posix_spawn () +and +.BR posix_spawnp () +place the PID of the child process in +.IR pid , +and return 0. +If there is an error during the +.B fork() +step, +then no child is created, +the contents of +.I *pid +are unspecified, +and these functions return an error number as described below. +.PP +Even when these functions return a success status, +the child process may still fail for a plethora of reasons related to its +pre-\fBexec\fR() initialization. +In addition, the +.BR exec (3) +may fail. +In all of these cases, the child process will exit with the exit value of 127. +.SH ERRORS +The +.BR posix_spawn () +and +.BR posix_spawnp () +functions fail only in the case where the underlying +.BR fork (2), +.BR vfork (2), +or +.BR clone (2) +call fails; in these cases, these functions return an error number, +which will be one of the errors described for +.BR fork (2), +.BR vfork (2), +or +.BR clone (2). +.PP +In addition, these functions fail if: +.TP +.B ENOSYS +Function not supported on this system. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.\" FIXME . This piece belongs in spawnattr_setflags(3) +.\" The +.\" .B POSIX_SPAWN_USEVFORK +.\" flag is a GNU extension; the +.\" .B _GNU_SOURCE +.\" feature test macro must be defined (before including any header files) +.\" to obtain the definition of this constant. +.SH NOTES +The housekeeping activities in the child are controlled by +the objects pointed to by +.I attrp +(for non-file actions) and +.I file_actions +In POSIX parlance, the +.I posix_spawnattr_t +and +.I posix_spawn_file_actions_t +data types are referred to as objects, +and their elements are not specified by name. +Portable programs should initialize these objects using +only the POSIX-specified functions. +(In other words, +although these objects may be implemented as structures containing fields, +portable programs must avoid dependence on such implementation details.) +.PP +According to POSIX, it is unspecified whether fork handlers established with +.BR pthread_atfork (3) +are called when +.BR posix_spawn () +is invoked. +Since glibc 2.24, the fork handlers are not executed in any case. +.\" Tested on glibc 2.12 +On older implementations, +fork handlers are called only if the child is created using +.BR fork (2). +.PP +There is no "posix_fspawn" function (i.e., a function that is to +.BR posix_spawn () +as +.BR fexecve (3) +is to +.BR execve (2)). +However, this functionality can be obtained by specifying the +.I path +argument as one of the files in the caller's +.I /proc/self/fd +directory. +.SH BUGS +POSIX.1 says that when +.B POSIX_SPAWN_SETSCHEDULER +is specified in +.IR spawn-flags , +then the +.B POSIX_SPAWN_SETSCHEDPARAM +(if present) is ignored. +However, before glibc 2.14, calls to +.BR posix_spawn () +failed with an error if +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12052 +.B POSIX_SPAWN_SETSCHEDULER +was specified without also specifying +.BR POSIX_SPAWN_SETSCHEDPARAM . +.SH EXAMPLES +The program below demonstrates the use of various functions in the +POSIX spawn API. +The program accepts command-line attributes that can be used +to create file actions and attributes objects. +The remaining command-line arguments are used as the executable name +and command-line arguments of the program that is executed in the child. +.PP +In the first run, the +.BR date (1) +command is executed in the child, and the +.BR posix_spawn () +call employs no file actions or attributes objects. +.PP +.in +4n +.EX +$ \fB./a.out date\fP +PID of child: 7634 +Tue Feb 1 19:47:50 CEST 2011 +Child status: exited, status=0 +.EE +.in +.PP +In the next run, the +.I \-c +command-line option is used to create a file actions object that closes +standard output in the child. +Consequently, +.BR date (1) +fails when trying to perform output and exits with a status of 1. +.PP +.in +4n +.EX +$ \fB./a.out \-c date\fP +PID of child: 7636 +date: write error: Bad file descriptor +Child status: exited, status=1 +.EE +.in +.PP +In the next run, the +.I \-s +command-line option is used to create an attributes object that +specifies that all (blockable) signals in the child should be blocked. +Consequently, trying to kill child with the default signal sent by +.BR kill (1) +(i.e., +.BR SIGTERM ) +fails, because that signal is blocked. +Therefore, to kill the child, +.B SIGKILL +is necessary +.RB ( SIGKILL +can't be blocked). +.PP +.in +4n +.EX +$ \fB./a.out \-s sleep 60 &\fP +[1] 7637 +$ PID of child: 7638 + +$ \fBkill 7638\fP +$ \fBkill \-KILL 7638\fP +$ Child status: killed by signal 9 +[1]+ Done ./a.out \-s sleep 60 +.EE +.in +.PP +When we try to execute a nonexistent command in the child, the +.BR exec (3) +fails and the child exits with a status of 127. +.PP +.in +4n +.EX +$ \fB./a.out xxxxx +PID of child: 10190 +Child status: exited, status=127 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (posix_spawn.c) +.EX +#include +#include +#include +#include +#include +#include +#include +#include + +#define errExit(msg) do { perror(msg); \e + exit(EXIT_FAILURE); } while (0) + +#define errExitEN(en, msg) \e + do { errno = en; perror(msg); \e + exit(EXIT_FAILURE); } while (0) + +char **environ; + +int +main(int argc, char *argv[]) +{ + pid_t child_pid; + int s, opt, status; + sigset_t mask; + posix_spawnattr_t attr; + posix_spawnattr_t *attrp; + posix_spawn_file_actions_t file_actions; + posix_spawn_file_actions_t *file_actionsp; + + /* Parse command\-line options, which can be used to specify an + attributes object and file actions object for the child. */ + + attrp = NULL; + file_actionsp = NULL; + + while ((opt = getopt(argc, argv, "sc")) != \-1) { + switch (opt) { + case \[aq]c\[aq]: /* \-c: close standard output in child */ + + /* Create a file actions object and add a "close" + action to it. */ + + s = posix_spawn_file_actions_init(&file_actions); + if (s != 0) + errExitEN(s, "posix_spawn_file_actions_init"); + + s = posix_spawn_file_actions_addclose(&file_actions, + STDOUT_FILENO); + if (s != 0) + errExitEN(s, "posix_spawn_file_actions_addclose"); + + file_actionsp = &file_actions; + break; + + case \[aq]s\[aq]: /* \-s: block all signals in child */ + + /* Create an attributes object and add a "set signal mask" + action to it. */ + + s = posix_spawnattr_init(&attr); + if (s != 0) + errExitEN(s, "posix_spawnattr_init"); + s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK); + if (s != 0) + errExitEN(s, "posix_spawnattr_setflags"); + + sigfillset(&mask); + s = posix_spawnattr_setsigmask(&attr, &mask); + if (s != 0) + errExitEN(s, "posix_spawnattr_setsigmask"); + + attrp = &attr; + break; + } + } + + /* Spawn the child. The name of the program to execute and the + command\-line arguments are taken from the command\-line arguments + of this program. The environment of the program execed in the + child is made the same as the parent\[aq]s environment. */ + + s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp, + &argv[optind], environ); + if (s != 0) + errExitEN(s, "posix_spawn"); + + /* Destroy any objects that we created earlier. */ + + if (attrp != NULL) { + s = posix_spawnattr_destroy(attrp); + if (s != 0) + errExitEN(s, "posix_spawnattr_destroy"); + } + + if (file_actionsp != NULL) { + s = posix_spawn_file_actions_destroy(file_actionsp); + if (s != 0) + errExitEN(s, "posix_spawn_file_actions_destroy"); + } + + printf("PID of child: %jd\en", (intmax_t) child_pid); + + /* Monitor status of the child until it terminates. */ + + do { + s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED); + if (s == \-1) + errExit("waitpid"); + + printf("Child status: "); + if (WIFEXITED(status)) { + printf("exited, status=%d\en", WEXITSTATUS(status)); + } else if (WIFSIGNALED(status)) { + printf("killed by signal %d\en", WTERMSIG(status)); + } else if (WIFSTOPPED(status)) { + printf("stopped by signal %d\en", WSTOPSIG(status)); + } else if (WIFCONTINUED(status)) { + printf("continued\en"); + } + } while (!WIFEXITED(status) && !WIFSIGNALED(status)); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.nh \" Disable hyphenation +.ad l +.BR close (2), +.BR dup2 (2), +.BR execl (2), +.BR execlp (2), +.BR fork (2), +.BR open (2), +.BR sched_setparam (2), +.BR sched_setscheduler (2), +.BR setpgid (2), +.BR setuid (2), +.BR sigaction (2), +.BR sigprocmask (2), +.BR posix_spawn_file_actions_addclose (3), +.BR posix_spawn_file_actions_adddup2 (3), +.BR posix_spawn_file_actions_addopen (3), +.BR posix_spawn_file_actions_destroy (3), +.BR posix_spawn_file_actions_init (3), +.BR posix_spawnattr_destroy (3), +.BR posix_spawnattr_getflags (3), +.BR posix_spawnattr_getpgroup (3), +.BR posix_spawnattr_getschedparam (3), +.BR posix_spawnattr_getschedpolicy (3), +.BR posix_spawnattr_getsigdefault (3), +.BR posix_spawnattr_getsigmask (3), +.BR posix_spawnattr_init (3), +.BR posix_spawnattr_setflags (3), +.BR posix_spawnattr_setpgroup (3), +.BR posix_spawnattr_setschedparam (3), +.BR posix_spawnattr_setschedpolicy (3), +.BR posix_spawnattr_setsigdefault (3), +.BR posix_spawnattr_setsigmask (3), +.BR pthread_atfork (3), +.IR , +Base Definitions volume of POSIX.1-2001, +.I http://www.opengroup.org/unix/online.html diff --git a/upstream/opensuse-leap-15-6/man3/post.3form b/upstream/opensuse-leap-15-6/man3/post.3form new file mode 100644 index 00000000..40611f65 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/post.3form @@ -0,0 +1,86 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_post.3x,v 1.11 2017/01/07 19:25:15 tom Exp $ +.TH post 3FORM "" +.SH NAME +\fBpost_form\fR, +\fBunpost_form\fR \- write or erase forms from associated subwindows +.SH SYNOPSIS +\fB#include \fR +.br +int post_form(FORM *form); +.br +int unpost_form(FORM *form); +.br +.SH DESCRIPTION +The function \fBpost_form\fR displays a form to its associated subwindow. To +trigger physical display of the subwindow, use \fBrefresh\fR(3X) or some equivalent +\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR +input request will do). +.PP +The function \fBunpost_form\fR erases form from its associated subwindow. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NOT_POSTED +The form has not been posted. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the form. +.TP 5 +.B E_NO_ROOM +Form is too large for its window. +.TP 5 +.B E_POSTED +The form has already been posted. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/post.3menu b/upstream/opensuse-leap-15-6/man3/post.3menu new file mode 100644 index 00000000..70a041fb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/post.3menu @@ -0,0 +1,86 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_post.3x,v 1.14 2017/01/07 19:25:15 tom Exp $ +.TH post 3MENU "" +.SH NAME +\fBpost_menu\fR, +\fBunpost_menu\fR \- write or erase menus from associated subwindows +.SH SYNOPSIS +\fB#include \fR +.br +int post_menu(MENU *menu); +.br +int unpost_menu(MENU *menu); +.br +.SH DESCRIPTION +The function \fBpost_menu\fR displays a menu to its associated subwindow. To +trigger physical display of the subwindow, use \fBrefresh\fR(3X) or some equivalent +\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR +input request will do). \fBpost_menu\fR resets the selection status of all items. +.PP +The function \fBunpost_menu\fR erases menu from its associated subwindow. +.SH RETURN VALUE +These routines return one of the following: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The menu has already been posted. +.TP 5 +.B E_BAD_STATE +Routine was called from an initialization or termination function. +.TP 5 +.B E_NO_ROOM +Menu is too large for its window. +You should consider using \fBset_menu_format\fR to solve the problem. +.TP 5 +.B E_NOT_POSTED +The menu has not been posted. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/pow.3 b/upstream/opensuse-leap-15-6/man3/pow.3 new file mode 100644 index 00000000..34fbd88c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pow.3 @@ -0,0 +1,386 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" Modified 2002-07-27 by Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.TH pow 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pow, powf, powl \- power functions +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double pow(double " x ", double " y ); +.BI "float powf(float " x ", float " y ); +.BI "long double powl(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR powf (), +.BR powl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the value of +.I x +raised to the +power of +.IR y . +.SH RETURN VALUE +On success, these functions return the value of +.I x +to the power of +.IR y . +.PP +If the result overflows, +a range error occurs, +.\" The range error is generated at least as far back as glibc 2.4 +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the mathematically correct sign. +.PP +If result underflows, and is not representable, +a range error occurs, +and 0.0 with the appropriate sign is returned. +.\" POSIX.1 does not specify the sign of the zero, +.\" but https://www.sourceware.org/bugzilla/show_bug.cgi?id=2678 +.\" points out that the zero has the wrong sign in some cases. +.PP +.\" pow(\(+-0, <0 [[odd]]) = HUGE_VAL* +If +.I x +is +0 or \-0, +and +.I y +is an odd integer less than 0, +a pole error occurs and +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +is returned, +with the same sign as +.IR x . +.PP +.\" pow(\(+-0, <0 [[!odd]]) = HUGE_VAL* +If +.I x +is +0 or \-0, +and +.I y +is less than 0 and not an odd integer, +a pole error occurs and +.\" The pole error is generated at least as far back as glibc 2.4 +.RB + HUGE_VAL , +.RB + HUGE_VALF , +or +.RB + HUGE_VALL , +is returned. +.PP +.\" pow(\(+-0, >0 [[odd]]) = \(+-0 +If +.I x +is +0 (\-0), +and +.I y +is an odd integer greater than 0, +the result is +0 (\-0). +.PP +.\" pow(\(+-0, >0 [[!odd]]) = +0 +If +.I x +is 0, +and +.I y +greater than 0 and not an odd integer, +the result is +0. +.PP +.\" pow(-1, \(+-INFINITY) = 1.0 +If +.I x +is \-1, +and +.I y +is positive infinity or negative infinity, +the result is 1.0. +.PP +.\" pow(+1, y) = 1.0 +If +.I x +is +1, the result is 1.0 (even if +.I y +is a NaN). +.PP +.\" pow(x, \(+-0) = 1.0 +If +.I y +is 0, the result is 1.0 (even if +.I x +is a NaN). +.PP +.\" pow(<0, y) = NaN +If +.I x +is a finite value less than 0, and +.I y +is a finite noninteger, a domain error occurs, +.\" The domain error is generated at least as far back as glibc 2.4 +and a NaN is returned. +.PP +.\" pow(|x|<1, -INFINITY) = INFINITY +If the absolute value of +.I x +is less than 1, +and +.I y +is negative infinity, +the result is positive infinity. +.PP +.\" pow(|x|>1, -INFINITY) = +0 +If the absolute value of +.I x +is greater than 1, +and +.I y +is negative infinity, +the result is +0. +.PP +.\" pow(|x|<1, INFINITY) = +0 +If the absolute value of +.I x +is less than 1, +and +.I y +is positive infinity, +the result is +0. +.PP +.\" pow(|x|>1, INFINITY) = INFINITY +If the absolute value of +.I x +is greater than 1, +and +.I y +is positive infinity, +the result is positive infinity. +.PP +.\" pow(-INFINITY, <0 [[odd]]) = -0 +If +.I x +is negative infinity, +and +.I y +is an odd integer less than 0, +the result is \-0. +.PP +.\" pow(-INFINITY, <0 [[!odd]]) = +0 +If +.I x +is negative infinity, +and +.I y +less than 0 and not an odd integer, +the result is +0. +.PP +.\" pow(-INFINITY, >0 [[odd]]) = -INFINITY +If +.I x +is negative infinity, +and +.I y +is an odd integer greater than 0, +the result is negative infinity. +.PP +.\" pow(-INFINITY, >0 [[!odd]]) = INFINITY +If +.I x +is negative infinity, +and +.I y +greater than 0 and not an odd integer, +the result is positive infinity. +.PP +.\" pow(INFINITY, <0) = +0 +If +.I x +is positive infinity, +and +.I y +less than 0, +the result is +0. +.PP +.\" pow(INFINITY, >0) = INFINITY +If +.I x +is positive infinity, +and +.I y +greater than 0, +the result is positive infinity. +.PP +.\" pow(NaN, y) or pow(x, NaN) = NaN +Except as specified above, if +.I x +or +.I y +is a NaN, the result is a NaN. +.SH ERRORS +.\" FIXME . review status of this error +.\" longstanding bug report for glibc: +.\" https://www.sourceware.org/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) +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is negative, and \fIy\fP is a finite noninteger +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Pole error: \fIx\fP is zero, and \fIy\fP is negative +.I errno +is set to +.B ERANGE +(but see BUGS). +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.TP +Range error: the result overflows +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error: the result underflows +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pow (), +.BR powf (), +.BR powl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH BUGS +.SS Historical bugs (now fixed) +Before glibc 2.28, +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=13932 +on some architectures (e.g., x86-64) +.BR pow () +may be more than 10,000 times slower for some inputs +than for other nearby inputs. +This affects only +.BR pow (), +and not +.BR powf () +nor +.BR powl (). +This problem was fixed +.\" commit c3d466cba1692708a19c6ff829d0386c83a0c6e5 +in glibc 2.28. +.PP +A number of bugs +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=3866 +in the glibc implementation of +.BR pow () +were fixed in glibc 2.16. +.PP +In glibc 2.9 and earlier, +.\" +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6776 +when a pole error occurs, +.I errno +is set to +.B EDOM +instead of the POSIX-mandated +.BR ERANGE . +Since glibc 2.10, +.\" or possibly 2.9, I haven't found the source code change +.\" and I don't have a 2.9 system to test +glibc does the right thing. +.PP +In glibc 2.3.2 and earlier, +.\" Actually, glibc 2.3.2 is the earliest test result I have; so yet +.\" to confirm if this error occurs only in glibc 2.3.2. +when an overflow or underflow error occurs, glibc's +.BR pow () +generates a bogus invalid floating-point exception +.RB ( FE_INVALID ) +in addition to the overflow or underflow exception. +.SH SEE ALSO +.BR cbrt (3), +.BR cpow (3), +.BR sqrt (3) diff --git a/upstream/opensuse-leap-15-6/man3/pow10.3 b/upstream/opensuse-leap-15-6/man3/pow10.3 new file mode 100644 index 00000000..bde4c168 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pow10.3 @@ -0,0 +1,59 @@ +'\" t +.\" Copyright 2004 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pow10 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pow10, pow10f, pow10l \- base-10 power functions +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "double pow10(double " x ); +.BI "float pow10f(float " x ); +.BI "long double pow10l(long double " x ); +.fi +.SH DESCRIPTION +These functions return the value of 10 raised to the power +.IR x . +.PP +.BR "Note well" : +These functions perform exactly the same task as the functions described in +.BR exp10 (3), +with the difference that the latter functions are now standardized +in TS\ 18661-4:2015. +Those latter functions should be used in preference +to the functions described in this page. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pow10 (), +.BR pow10f (), +.BR pow10l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH VERSIONS +glibc 2.1. +Removed in glibc 2.27. +.\" glibc commit 5a80d39d0d2587e9bd8e72f19e92eeb2a66fbe9e +.SH SEE ALSO +.BR exp10 (3), +.BR pow (3) diff --git a/upstream/opensuse-leap-15-6/man3/powerof2.3 b/upstream/opensuse-leap-15-6/man3/powerof2.3 new file mode 100644 index 00000000..0ff2e416 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/powerof2.3 @@ -0,0 +1,46 @@ +.\" Copyright (C) 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH powerof2 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +powerof2 \- test if a value is a power of 2 +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int powerof2(" x ); +.fi +.SH DESCRIPTION +This macro returns true if +.I x +is a power of 2, +and false otherwise. +.PP +.B 0 +is considered a power of 2. +This can make sense considering wrapping of unsigned integers, +and has interesting properties. +.SH RETURN VALUE +True or false, +if +.I x +is a power of 2 or not, +respectively. +.SH STANDARDS +BSD. +.SH CAVEATS +The arguments may be evaluated more than once. +.PP +Because this macro is implemented using bitwise operations, +some negative values can invoke undefined behavior. +For example, +the following invokes undefined behavior: +.IR "powerof2(INT_MIN);". +Call it only with unsigned types to be safe. +.SH SEE ALSO +.BR stdc_bit_ceil (3), +.BR stdc_bit_floor (3) diff --git a/upstream/opensuse-leap-15-6/man3/print.3ncurses b/upstream/opensuse-leap-15-6/man3/print.3ncurses new file mode 100644 index 00000000..1d4c2ea3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/print.3ncurses @@ -0,0 +1,68 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_print.3x,v 1.12 2017/11/20 01:27:30 tom Exp $ +.TH print 3NCURSES "" +.SH NAME +\fBmcprint\fR \- ship binary data to printer +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint mcprint(char *data, int len);\fR +.SH DESCRIPTION +This function uses the \fBmc5p\fR or \fBmc4\fR and \fBmc5\fR capabilities, +if they are present, to ship given data to a printer attached to the terminal. +.PP +Note that the \fBmcprint\fR code has no way to do flow control with the printer +or to know how much buffering it has. Your application is responsible for +keeping the rate of writes to the printer below its continuous throughput rate +(typically about half of its nominal cps rating). Dot-matrix printers and +6-page-per-minute lasers can typically handle 80cps, so a good conservative +rule of thumb is to sleep for a second after shipping each 80-character line. +. +.SH RETURN VALUE +The \fBmcprint\fR function returns \fBERR\fR if the write operation aborted +for some reason. In this case, errno will contain either an error associated +with \fBwrite\fP(2) or one of the following: +.TP 5 +ENODEV +Capabilities for printer redirection do not exist. +.TP 5 +ENOMEM +Couldn't allocate sufficient memory to buffer the printer write. +.PP +When \fBmcprint\fR succeeds, it returns the number of characters actually +sent to the printer. +.SH PORTABILITY +The \fBmcprint\fR call was designed for \fBncurses\fR(3NCURSES), and is not found +in SVr4 curses, 4.4BSD curses, or any other previous version of curses. +.SH BUGS +Padding in the \fBmc5p\fR, \fBmc4\fR and \fBmc5\fR capabilities will not be +interpreted. +.SH SEE ALSO +\fBncurses\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/printf.3 b/upstream/opensuse-leap-15-6/man3/printf.3 new file mode 100644 index 00000000..2b73deef --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/printf.3 @@ -0,0 +1,1242 @@ +'\" t +.\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl) +.\" +.\" Earlier versions of this page influenced the present text. +.\" It was derived from a Berkeley page with version +.\" @(#)printf.3 6.14 (Berkeley) 7/30/91 +.\" converted for Linux by faith@cs.unc.edu, updated by +.\" Helmut.Geyer@iwr.uni-heidelberg.de, agulbra@troll.no and Bruno Haible. +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 1999-11-25 aeb - Rewritten, using SUSv2 and C99. +.\" 2000-07-26 jsm28@hermes.cam.ac.uk - three small fixes +.\" 2000-10-16 jsm28@hermes.cam.ac.uk - more fixes +.\" +.TH printf 3 2023-04-01 "Linux man-pages 6.04" +.SH NAME +printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf, +vsprintf, vsnprintf \- formatted output conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int printf(const char *restrict " format ", ...);" +.BI "int fprintf(FILE *restrict " stream , +.BI " const char *restrict " format ", ...);" +.BI "int dprintf(int " fd , +.BI " const char *restrict " format ", ...);" +.BI "int sprintf(char *restrict " str , +.BI " const char *restrict " format ", ...);" +.BI "int snprintf(char " str "[restrict ." size "], size_t " size , +.BI " const char *restrict " format ", ...);" +.PP +.BI "int vprintf(const char *restrict " format ", va_list " ap ); +.BI "int vfprintf(FILE *restrict " stream , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vdprintf(int " fd , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vsprintf(char *restrict " str , +.BI " const char *restrict " format ", va_list " ap ); +.BI "int vsnprintf(char " str "[restrict ." size "], size_t " size , +.BI " const char *restrict " format ", va_list " ap ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR snprintf (), +.BR vsnprintf (): +.nf + _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE +.fi +.PP +.BR dprintf (), +.BR vdprintf (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The functions in the +.BR printf () +family produce output according to a +.I format +as described below. +The functions +.BR printf () +and +.BR vprintf () +write output to +.IR stdout , +the standard output stream; +.BR fprintf () +and +.BR vfprintf () +write output to the given output +.IR stream ; +.BR sprintf (), +.BR snprintf (), +.BR vsprintf (), +and +.BR vsnprintf () +write to the character string +.IR str . +.PP +The function +.BR dprintf () +is the same as +.BR fprintf () +except that it outputs to a file descriptor, +.IR fd , +instead of to a +.BR stdio (3) +stream. +.PP +The functions +.BR snprintf () +and +.BR vsnprintf () +write at most +.I size +bytes (including the terminating null byte (\[aq]\e0\[aq])) to +.IR str . +.PP +The functions +.BR vprintf (), +.BR vfprintf (), +.BR vdprintf (), +.BR vsprintf (), +.BR vsnprintf () +are equivalent to the functions +.BR printf (), +.BR fprintf (), +.BR dprintf (), +.BR sprintf (), +.BR snprintf (), +respectively, except that they are called with a +.I va_list +instead of a variable number of arguments. +These functions do not call the +.I va_end +macro. +Because they invoke the +.I va_arg +macro, the value of +.I ap +is undefined after the call. +See +.BR stdarg (3). +.PP +All of these functions write the output under the control of a +.I format +string that specifies how subsequent arguments (or arguments accessed via +the variable-length argument facilities of +.BR stdarg (3)) +are converted for output. +.PP +C99 and POSIX.1-2001 specify that the results are undefined if a call to +.BR sprintf (), +.BR snprintf (), +.BR vsprintf (), +or +.BR vsnprintf () +would cause copying to take place between objects that overlap +(e.g., if the target string array and one of the supplied input arguments +refer to the same buffer). +See NOTES. +.SS Format of the format string +The format string is a character string, beginning and ending +in its initial shift state, if any. +The format string is composed of zero or more directives: ordinary +characters (not +.BR % ), +which are copied unchanged to the output stream; +and conversion specifications, each of which results in fetching zero or +more subsequent arguments. +Each conversion specification is introduced by +the character +.BR % , +and ends with a +.IR "conversion specifier" . +In between there may be (in this order) zero or more +.IR flags , +an optional minimum +.IR "field width" , +an optional +.I precision +and an optional +.IR "length modifier" . +.PP +The overall syntax of a conversion specification is: +.PP +.in +4n +.nf +%[$][flags][width][.precision][length modifier]conversion +.fi +.in +.PP +The arguments must correspond properly (after type promotion) with the +conversion specifier. +By default, the arguments are used in the order +given, where each \[aq]*\[aq] (see +.I "Field width" +and +.I Precision +below) and each conversion specifier asks for the next +argument (and it is an error if insufficiently many arguments are given). +One can also specify explicitly which argument is taken, +at each place where an argument is required, by writing "%m$" instead +of \[aq]%\[aq] and "*m$" instead of \[aq]*\[aq], +where the decimal integer \fIm\fP denotes +the position in the argument list of the desired argument, indexed starting +from 1. +Thus, +.PP +.in +4n +.EX +printf("%*d", width, num); +.EE +.in +.PP +and +.PP +.in +4n +.EX +printf("%2$*1$d", width, num); +.EE +.in +.PP +are equivalent. +The second style allows repeated references to the +same argument. +The C99 standard does not include the style using \[aq]$\[aq], +which comes from the Single UNIX Specification. +If the style using +\[aq]$\[aq] is used, it must be used throughout for all conversions taking an +argument and all width and precision arguments, but it may be mixed +with "%%" formats, which do not consume an argument. +There may be no +gaps in the numbers of arguments specified using \[aq]$\[aq]; for example, if +arguments 1 and 3 are specified, argument 2 must also be specified +somewhere in the format string. +.PP +For some numeric conversions a radix character ("decimal point") or +thousands' grouping character is used. +The actual character used +depends on the +.B LC_NUMERIC +part of the locale. +(See +.BR setlocale (3).) +The POSIX locale +uses \[aq].\[aq] as radix character, and does not have a grouping character. +Thus, +.PP +.in +4n +.EX +printf("%\[aq].2f", 1234567.89); +.EE +.in +.PP +results in "1234567.89" in the POSIX locale, in "1234567,89" in the +nl_NL locale, and in "1.234.567,89" in the da_DK locale. +.SS Flag characters +The character % is followed by zero or more of the following flags: +.TP +.B # +The value should be converted to an "alternate form". +For +.B o +conversions, the first character of the output string is made zero +(by prefixing a 0 if it was not zero already). +For +.B x +and +.B X +conversions, a nonzero result has the string "0x" (or "0X" for +.B X +conversions) prepended to it. +For +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +.BR F , +.BR g , +and +.B G +conversions, the result will always contain a decimal point, even if no +digits follow it (normally, a decimal point appears in the results of those +conversions only if a digit follows). +For +.B g +and +.B G +conversions, trailing zeros are not removed from the result as they would +otherwise be. +For +.BR m , +if +.I errno +contains a valid error code, +the output of +.I strerrorname_np(errno) +is printed; +otherwise, the value stored in +.I errno +is printed as a decimal number. +For other conversions, the result is undefined. +.TP +.B \&0 +The value should be zero padded. +For +.BR d , +.BR i , +.BR o , +.BR u , +.BR x , +.BR X , +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +.BR F , +.BR g , +and +.B G +conversions, the converted value is padded on the left with zeros rather +than blanks. +If the +.B \&0 +and +.B \- +flags both appear, the +.B \&0 +flag is ignored. +If a precision is given with an integer conversion +.RB ( d , +.BR i , +.BR o , +.BR u , +.BR x , +and +.BR X ), +the +.B \&0 +flag is ignored. +For other conversions, the behavior is undefined. +.TP +.B \- +The converted value is to be left adjusted on the field boundary. +(The default is right justification.) +The converted value is padded on the right with blanks, rather +than on the left with blanks or zeros. +A +.B \- +overrides a +.B \&0 +if both are given. +.TP +.B \[aq] \[aq] +(a space) A blank should be left before a positive number +(or empty string) produced by a signed conversion. +.TP +.B + +A sign (+ or \-) should always be placed before a number produced by a signed +conversion. +By default, a sign is used only for negative numbers. +A +.B + +overrides a space if both are used. +.PP +The five flag characters above are defined in the C99 standard. +The Single UNIX Specification specifies one further flag character. +.TP +.B \[aq] +For decimal conversion +.RB ( i , +.BR d , +.BR u , +.BR f , +.BR F , +.BR g , +.BR G ) +the output is to be grouped with thousands' grouping characters +if the locale information indicates any. +(See +.BR setlocale (3).) +Note that many versions of +.BR gcc (1) +cannot parse this option and will issue a warning. +(SUSv2 did not +include \fI%\[aq]F\fP, but SUSv3 added it.) +Note also that the default locale of a C program is "C" +whose locale information indicates no thousands' grouping character. +Therefore, without a prior call to +.BR setlocale (3), +no thousands' grouping characters will be printed. +.PP +glibc 2.2 adds one further flag character. +.TP +.B I +For decimal integer conversion +.RB ( i , +.BR d , +.BR u ) +the output uses the locale's alternative output digits, if any. +For example, since glibc 2.2.3 this will give Arabic-Indic digits +in the Persian ("fa_IR") locale. +.\" outdigits keyword in locale file +.SS Field width +An optional decimal digit string (with nonzero first digit) specifying +a minimum field width. +If the converted value has fewer characters +than the field width, it will be padded with spaces on the left +(or right, if the left-adjustment flag has been given). +Instead of a decimal digit string one may write "*" or "*m$" +(for some decimal integer \fIm\fP) to specify that the field width +is given in the next argument, or in the \fIm\fP-th argument, respectively, +which must be of type +.IR int . +A negative field width is taken as a \[aq]\-\[aq] flag followed by a +positive field width. +In no case does a nonexistent or small field width cause truncation of a +field; if the result of a conversion is wider than the field width, the +field is expanded to contain the conversion result. +.SS Precision +An optional precision, in the form of a period (\[aq].\[aq]) followed by an +optional decimal digit string. +Instead of a decimal digit string one may write "*" or "*m$" +(for some decimal integer \fIm\fP) to specify that the precision +is given in the next argument, or in the \fIm\fP-th argument, respectively, +which must be of type +.IR int . +If the precision is given as just \[aq].\[aq], the precision is taken to +be zero. +A negative precision is taken as if the precision were omitted. +This gives the minimum number of digits to appear for +.BR d , +.BR i , +.BR o , +.BR u , +.BR x , +and +.B X +conversions, the number of digits to appear after the radix character for +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +and +.B F +conversions, the maximum number of significant digits for +.B g +and +.B G +conversions, or the maximum number of characters to be printed from a +string for +.B s +and +.B S +conversions. +.SS Length modifier +Here, "integer conversion" stands for +.BR d , +.BR i , +.BR o , +.BR u , +.BR x , +or +.B X +conversion. +.TP +.B hh +A following integer conversion corresponds to a +.I signed char +or +.I unsigned char +argument, or a following +.B n +conversion corresponds to a pointer to a +.I signed char +argument. +.TP +.B h +A following integer conversion corresponds to a +.I short +or +.I unsigned short +argument, or a following +.B n +conversion corresponds to a pointer to a +.I short +argument. +.TP +.B l +(ell) A following integer conversion corresponds to a +.I long +or +.I unsigned long +argument, or a following +.B n +conversion corresponds to a pointer to a +.I long +argument, or a following +.B c +conversion corresponds to a +.I wint_t +argument, or a following +.B s +conversion corresponds to a pointer to +.I wchar_t +argument. +On a following +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +.BR F , +.BR g , +or +.B G +conversion, this length modifier is ignored (C99; not in SUSv2). +.TP +.B ll +(ell-ell). +A following integer conversion corresponds to a +.I long long +or +.I unsigned long long +argument, or a following +.B n +conversion corresponds to a pointer to a +.I long long +argument. +.TP +.B q +A synonym for +.BR ll . +This is a nonstandard extension, derived from BSD; +avoid its use in new code. +.TP +.B L +A following +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +.BR F , +.BR g , +or +.B G +conversion corresponds to a +.I long double +argument. +(C99 allows %LF, but SUSv2 does not.) +.TP +.B j +A following integer conversion corresponds to an +.I intmax_t +or +.I uintmax_t +argument, or a following +.B n +conversion corresponds to a pointer to an +.I intmax_t +argument. +.TP +.B z +A following integer conversion corresponds to a +.I size_t +or +.I ssize_t +argument, or a following +.B n +conversion corresponds to a pointer to a +.I size_t +argument. +.TP +.B Z +A nonstandard synonym for +.B z +that predates the appearance of +.BR z . +Do not use in new code. +.TP +.B t +A following integer conversion corresponds to a +.I ptrdiff_t +argument, or a following +.B n +conversion corresponds to a pointer to a +.I ptrdiff_t +argument. +.PP +SUSv3 specifies all of the above, +except for those modifiers explicitly noted as being nonstandard extensions. +SUSv2 specified only the length modifiers +.B h +(in +.BR hd , +.BR hi , +.BR ho , +.BR hx , +.BR hX , +.BR hn ) +and +.B l +(in +.BR ld , +.BR li , +.BR lo , +.BR lx , +.BR lX , +.BR ln , +.BR lc , +.BR ls ) +and +.B L +(in +.BR Le , +.BR LE , +.BR Lf , +.BR Lg , +.BR LG ). +.PP +As a nonstandard extension, the GNU implementations treats +.B ll +and +.B L +as synonyms, so that one can, for example, write +.B llg +(as a synonym for the standards-compliant +.BR Lg ) +and +.B Ld +(as a synonym for the standards compliant +.BR lld ). +Such usage is nonportable. +.\" +.SS Conversion specifiers +A character that specifies the type of conversion to be applied. +The conversion specifiers and their meanings are: +.TP +.BR d ", " i +The +.I int +argument is converted to signed decimal notation. +The precision, if any, gives the minimum number of digits +that must appear; if the converted value requires fewer digits, it is +padded on the left with zeros. +The default precision is 1. +When 0 is printed with an explicit precision 0, the output is empty. +.TP +.BR o ", " u ", " x ", " X +The +.I "unsigned int" +argument is converted to unsigned octal +.RB ( o ), +unsigned decimal +.RB ( u ), +or unsigned hexadecimal +.RB ( x +and +.BR X ) +notation. +The letters +.B abcdef +are used for +.B x +conversions; the letters +.B ABCDEF +are used for +.B X +conversions. +The precision, if any, gives the minimum number of digits +that must appear; if the converted value requires fewer digits, it is +padded on the left with zeros. +The default precision is 1. +When 0 is printed with an explicit precision 0, the output is empty. +.TP +.BR e ", " E +The +.I double +argument is rounded and converted in the style +.RB [\-]d \&. ddd e \(+-dd +where there is one digit (which is nonzero if the argument is nonzero) +before the decimal-point character and the number +of digits after it is equal to the precision; if the precision is missing, +it is taken as 6; if the precision is zero, no decimal-point character +appears. +An +.B E +conversion uses the letter +.B E +(rather than +.BR e ) +to introduce the exponent. +The exponent always contains at least two +digits; if the value is zero, the exponent is 00. +.TP +.BR f ", " F +The +.I double +argument is rounded and converted to decimal notation in the style +.RB [\-]ddd \&. ddd, +where the number of digits after the decimal-point character is equal to +the precision specification. +If the precision is missing, it is taken as +6; if the precision is explicitly zero, no decimal-point character appears. +If a decimal point appears, at least one digit appears before it. +.IP +(SUSv2 does not know about +.B F +and says that character string representations for infinity and NaN +may be made available. +SUSv3 adds a specification for +.BR F . +The C99 standard specifies "[\-]inf" or "[\-]infinity" +for infinity, and a string starting with "nan" for NaN, in the case of +.B f +conversion, and "[\-]INF" or "[\-]INFINITY" or "NAN" in the case of +.B F +conversion.) +.TP +.BR g ", " G +The +.I double +argument is converted in style +.B f +or +.B e +(or +.B F +or +.B E +for +.B G +conversions). +The precision specifies the number of significant digits. +If the precision is missing, 6 digits are given; if the precision is zero, +it is treated as 1. +Style +.B e +is used if the exponent from its conversion is less than \-4 or greater +than or equal to the precision. +Trailing zeros are removed from the +fractional part of the result; a decimal point appears only if it is +followed by at least one digit. +.TP +.BR a ", " A +(C99; not in SUSv2, but added in SUSv3) +For +.B a +conversion, the +.I double +argument is converted to hexadecimal notation (using the letters abcdef) +in the style +.RB [\-] 0x h \&. hhhh p \(+-d; +for +.B A +conversion the prefix +.BR 0X , +the letters ABCDEF, and the exponent separator +.B P +is used. +There is one hexadecimal digit before the decimal point, +and the number of digits after it is equal to the precision. +The default precision suffices for an exact representation of the value +if an exact representation in base 2 exists +and otherwise is sufficiently large to distinguish values of type +.IR double . +The digit before the decimal point is unspecified for nonnormalized +numbers, and nonzero but otherwise unspecified for normalized numbers. +The exponent always contains at least one +digit; if the value is zero, the exponent is 0. +.TP +.B c +If no +.B l +modifier is present, the +.I int +argument is converted to an +.IR "unsigned char" , +and the resulting character is written. +If an +.B l +modifier is present, the +.I wint_t +(wide character) argument is converted to a multibyte sequence by a call +to the +.BR wcrtomb (3) +function, with a conversion state starting in the initial state, and the +resulting multibyte string is written. +.TP +.B s +If no +.B l +modifier is present: the +.I "const char\ *" +argument is expected to be a pointer to an array of character type (pointer +to a string). +Characters from the array are written up to (but not +including) a terminating null byte (\[aq]\e0\[aq]); +if a precision is specified, no more than the number specified +are written. +If a precision is given, no null byte need be present; +if the precision is not specified, or is greater than the size of the +array, the array must contain a terminating null byte. +.IP +If an +.B l +modifier is present: the +.I "const wchar_t\ *" +argument is expected to be a pointer to an array of wide characters. +Wide characters from the array are converted to multibyte characters +(each by a call to the +.BR wcrtomb (3) +function, with a conversion state starting in the initial state before +the first wide character), up to and including a terminating null +wide character. +The resulting multibyte characters are written up to +(but not including) the terminating null byte. +If a precision is +specified, no more bytes than the number specified are written, but +no partial multibyte characters are written. +Note that the precision +determines the number of +.I bytes +written, not the number of +.I wide characters +or +.IR "screen positions" . +The array must contain a terminating null wide character, unless a +precision is given and it is so small that the number of bytes written +exceeds it before the end of the array is reached. +.TP +.B C +(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) +Synonym for +.BR lc . +Don't use. +.TP +.B S +(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) +Synonym for +.BR ls . +Don't use. +.TP +.B p +The +.I "void\ *" +pointer argument is printed in hexadecimal (as if by +.B %#x +or +.BR %#lx ). +.TP +.B n +The number of characters written so far is stored into the integer +pointed to by the corresponding argument. +That argument shall be an +.IR "int\ *" , +or variant whose size matches the (optionally) +supplied integer length modifier. +No argument is converted. +(This specifier is not supported by the bionic C library.) +The behavior is undefined if the conversion specification includes +any flags, a field width, or a precision. +.TP +.B m +(glibc extension; supported by uClibc and musl.) +Print output of +.I strerror(errno) +(or +.I strerrorname_np(errno) +in the alternate form). +No argument is required. +.TP +.B % +A \[aq]%\[aq] is written. +No argument is converted. +The complete conversion +specification is \[aq]%%\[aq]. +.SH RETURN VALUE +Upon successful return, these functions return the number of characters +printed (excluding the null byte used to end output to strings). +.PP +The functions +.BR snprintf () +and +.BR vsnprintf () +do not write more than +.I size +bytes (including the terminating null byte (\[aq]\e0\[aq])). +If the output was truncated due to this limit, then the return value +is the number of characters (excluding the terminating null byte) +which would have been written to the final string if enough space +had been available. +Thus, a return value of +.I size +or more means that the output was truncated. +(See also below under NOTES.) +.PP +If an output error is encountered, a negative value is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR printf (), +.BR fprintf (), +.BR sprintf (), +.BR snprintf (), +.BR vprintf (), +.BR vfprintf (), +.BR vsprintf (), +.BR vsnprintf () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR fprintf () +.TQ +.BR printf () +.TQ +.BR sprintf () +.TQ +.BR vprintf () +.TQ +.BR vfprintf () +.TQ +.BR vsprintf () +.TQ +.BR snprintf () +.TQ +.BR vsnprintf () +C11, POSIX.1-2008. +.TP +.BR dprintf () +.TQ +.BR vdprintf () +GNU, POSIX.1-2008. +.SH HISTORY +.TP +.BR fprintf () +.TQ +.BR printf () +.TQ +.BR sprintf () +.TQ +.BR vprintf () +.TQ +.BR vfprintf () +.TQ +.BR vsprintf () +C89, POSIX.1-2001. +.TP +.BR snprintf () +.TQ +.BR vsnprintf () +SUSv2, C99, POSIX.1-2001. +.IP +Concerning the return value of +.BR snprintf (), +SUSv2 and C99 contradict each other: when +.BR snprintf () +is called with +.IR size =0 +then SUSv2 stipulates an unspecified return value less than 1, +while C99 allows +.I str +to be NULL in this case, and gives the return value (as always) +as the number of characters that would have been written in case +the output string has been large enough. +POSIX.1-2001 and later align their specification of +.BR snprintf () +with C99. +.TP +.BR dprintf () +.TQ +.BR vdprintf () +GNU, POSIX.1-2008. +.PP +.\" Linux libc4 knows about the five C standard flags. +.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, +.\" and the conversions +.\" \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP, +.\" \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP, +.\" \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP, +.\" where \fBF\fP is a synonym for \fBf\fP. +.\" Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms +.\" for \fBld\fP, \fBlo\fP, and \fBlu\fP. +.\" (This is bad, and caused serious bugs later, when +.\" support for \fB%D\fP disappeared.) +.\" No locale-dependent radix character, +.\" no thousands' separator, no NaN or infinity, no "%m$" and "*m$". +.\" .PP +.\" Linux libc5 knows about the five C standard flags and the \[aq] flag, +.\" locale, "%m$" and "*m$". +.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP, +.\" \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP +.\" both for \fIlong double\fP and for \fIlong long\fP (this is a bug). +.\" It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP, +.\" but adds the conversion character +.\" .BR m , +.\" which outputs +.\" .IR strerror(errno) . +.\" .PP +.\" glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP. +.\" .PP +glibc 2.1 adds length modifiers \fBhh\fP, \fBj\fP, \fBt\fP, and \fBz\fP +and conversion characters \fBa\fP and \fBA\fP. +.PP +glibc 2.2 adds the conversion character \fBF\fP with C99 semantics, +and the flag character \fBI\fP. +.PP +glibc 2.35 gives a meaning to the alternate form +.RB ( # ) +of the +.B m +conversion specifier, that is +.IR %#m . +.SH CAVEATS +Some programs imprudently rely on code such as the following +.PP +.in +4n +.EX +sprintf(buf, "%s some further text", buf); +.EE +.in +.PP +to append text to +.IR buf . +However, the standards explicitly note that the results are undefined +if source and destination buffers overlap when calling +.BR sprintf (), +.BR snprintf (), +.BR vsprintf (), +and +.BR vsnprintf (). +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7075 +Depending on the version of +.BR gcc (1) +used, and the compiler options employed, calls such as the above will +.B not +produce the expected results. +.PP +The glibc implementation of the functions +.BR snprintf () +and +.BR vsnprintf () +conforms to the C99 standard, that is, behaves as described above, +since glibc 2.1. +Until glibc 2.0.6, they would return \-1 +when the output was truncated. +.\" .SH HISTORY +.\" UNIX V7 defines the three routines +.\" .BR printf (), +.\" .BR fprintf (), +.\" .BR sprintf (), +.\" and has the flag \-, the width or precision *, the length modifier l, +.\" and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx. +.\" This is still true for 2.9.1BSD, but 2.10BSD has the flags +.\" #, + and and no longer mentions D,O,U,X. +.\" 2.11BSD has +.\" .BR vprintf (), +.\" .BR vfprintf (), +.\" .BR vsprintf (), +.\" and warns not to use D,O,U,X. +.\" 4.3BSD Reno has the flag 0, the length modifiers h and L, +.\" and the conversions n, p, E, G, X (with current meaning) +.\" and deprecates D,O,U. +.\" 4.4BSD introduces the functions +.\" .BR snprintf () +.\" and +.\" .BR vsnprintf (), +.\" and the length modifier q. +.\" FreeBSD also has functions +.\" .BR asprintf () +.\" and +.\" .BR vasprintf (), +.\" that allocate a buffer large enough for +.\" .BR sprintf (). +.\" In glibc there are functions +.\" .BR dprintf () +.\" and +.\" .BR vdprintf () +.\" that print to a file descriptor instead of a stream. +.SH BUGS +Because +.BR sprintf () +and +.BR vsprintf () +assume an arbitrarily long string, callers must be careful not to overflow +the actual space; this is often impossible to assure. +Note that the length +of the strings produced is locale-dependent and difficult to predict. +Use +.BR snprintf () +and +.BR vsnprintf () +instead (or +.BR asprintf (3) +and +.BR vasprintf (3)). +.\" .PP +.\" Linux libc4.[45] does not have a +.\" .BR snprintf (), +.\" but provides a libbsd that contains an +.\" .BR snprintf () +.\" equivalent to +.\" .BR sprintf (), +.\" that is, one that ignores the +.\" .I size +.\" argument. +.\" Thus, the use of +.\" .BR snprintf () +.\" with early libc4 leads to serious security problems. +.PP +Code such as +.BI printf( foo ); +often indicates a bug, since +.I foo +may contain a % character. +If +.I foo +comes from untrusted user input, it may contain \fB%n\fP, causing the +.BR printf () +call to write to memory and creating a security hole. +.\" .PP +.\" Some floating-point conversions under early libc4 +.\" caused memory leaks. +.SH EXAMPLES +To print +.I Pi +to five decimal places: +.PP +.in +4n +.EX +#include +#include +fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0)); +.EE +.in +.PP +To print a date and time in the form "Sunday, July 3, 10:02", +where +.I weekday +and +.I month +are pointers to strings: +.PP +.in +4n +.EX +#include +fprintf(stdout, "%s, %s %d, %.2d:%.2d\en", + weekday, month, day, hour, min); +.EE +.in +.PP +Many countries use the day-month-year order. +Hence, an internationalized version must be able to print +the arguments in an order specified by the format: +.PP +.in +4n +.EX +#include +fprintf(stdout, format, + weekday, month, day, hour, min); +.EE +.in +.PP +where +.I format +depends on locale, and may permute the arguments. +With the value: +.PP +.in +4n +.EX +"%1$s, %3$d. %2$s, %4$d:%5$.2d\en" +.EE +.in +.PP +one might obtain "Sonntag, 3. Juli, 10:02". +.PP +To allocate a sufficiently large string and print into it +(code correct for both glibc 2.0 and glibc 2.1): +.PP +.EX +#include +#include +#include + +char * +make_message(const char *fmt, ...) +{ + int n = 0; + size_t size = 0; + char *p = NULL; + va_list ap; + + /* Determine required size. */ + + va_start(ap, fmt); + n = vsnprintf(p, size, fmt, ap); + va_end(ap); + + if (n < 0) + return NULL; + + size = (size_t) n + 1; /* One extra byte for \[aq]\e0\[aq] */ + p = malloc(size); + if (p == NULL) + return NULL; + + va_start(ap, fmt); + n = vsnprintf(p, size, fmt, ap); + va_end(ap); + + if (n < 0) { + free(p); + return NULL; + } + + return p; +} +.EE +.PP +If truncation occurs in glibc versions prior to glibc 2.0.6, +this is treated as an error instead of being handled gracefully. +.SH SEE ALSO +.BR printf (1), +.BR asprintf (3), +.BR puts (3), +.BR scanf (3), +.BR setlocale (3), +.BR strfromd (3), +.BR wcrtomb (3), +.BR wprintf (3), +.BR locale (5) diff --git a/upstream/opensuse-leap-15-6/man3/printw.3ncurses b/upstream/opensuse-leap-15-6/man3/printw.3ncurses new file mode 100644 index 00000000..b15f42cb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/printw.3ncurses @@ -0,0 +1,92 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_printw.3x,v 1.21 2017/01/07 17:33:45 tom Exp $ +.TH printw 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBprintw\fR, +\fBwprintw\fR, +\fBmvprintw\fR, +\fBmvwprintw\fR, +\fBvwprintw\fR, \fBvw_printw\fR \- print formatted output in \fBcurses\fR windows +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint printw(const char *fmt, ...);\fR +.br +\fBint wprintw(WINDOW *win, const char *fmt, ...);\fR +.br +\fBint mvprintw(int y, int x, const char *fmt, ...);\fR +.br +\fBint mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);\fR +.br +\fBint vwprintw(WINDOW *win, const char *fmt, va_list varglist);\fR +.br +\fBint vw_printw(WINDOW *win, const char *fmt, va_list varglist);\fR +.br +.SH DESCRIPTION +The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR +routines are analogous to \fBprintf\fR [see \fBprintf\fR(3)]. In +effect, the string that would be output by \fBprintf\fR is output +instead as though \fBwaddstr\fR were used on the given window. +.PP +The \fBvwprintw\fR and \fBwv_printw\fR routines are analogous +to \fBvprintf\fR [see \fBprintf\fR(3)] +and perform a \fBwprintw\fR using a variable argument list. +The third argument is a \fBva_list\fR, a pointer to a +list of arguments, as defined in \fB\fR. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +X/Open defines no error conditions. +In this implementation, +an error may be returned if it cannot allocate enough memory for the +buffer used to format the results. +It will return an error if the window pointer is null. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. The function +\fBvwprintw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function +\fBvw_printw\fR using the \fB\fR interface. +The Single Unix Specification, Version 2 states that +\fBvw_printw\fR is preferred to \fBvwprintw\fR since the latter requires +including \fB\fR, which +cannot be used in the same file as \fB\fR. +This implementation uses \fB\fR for both, because that header +is included in \fB. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBprintf\fR(3), \fBvprintf\fR(3). diff --git a/upstream/opensuse-leap-15-6/man3/profil.3 b/upstream/opensuse-leap-15-6/man3/profil.3 new file mode 100644 index 00000000..8416bb3b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/profil.3 @@ -0,0 +1,97 @@ +'\" t +.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer +.\" (prompted by Bas V. de Bakker ) +.\" Corrected (and moved to man3), 980612, aeb +.TH profil 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +profil \- execution time profile +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int profil(unsigned short *" buf ", size_t " bufsiz , +.BI " size_t " offset ", unsigned int " scale ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR profil (): +.nf + Since glibc 2.21: +.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 + _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 DESCRIPTION +This routine provides a means to find out in what areas your program +spends most of its time. +The argument +.I buf +points to +.I bufsiz +bytes of core. +Every virtual 10 milliseconds, the user's program counter (PC) +is examined: +.I offset +is subtracted and the result is multiplied by +.I scale +and divided by 65536. +If the resulting value is less than +.IR bufsiz , +then the corresponding entry in +.I buf +is incremented. +If +.I buf +is NULL, profiling is disabled. +.SH RETURN VALUE +Zero is always returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR profil () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +Similar to a call in SVr4. +.SH BUGS +.BR profil () +cannot be used on a program that also uses +.B ITIMER_PROF +interval timers (see +.BR setitimer (2)). +.PP +True kernel profiling provides more accurate results. +.\" Libc 4.4 contained a kernel patch providing a system call profil. +.SH SEE ALSO +.BR gprof (1), +.BR sprof (1), +.BR setitimer (2), +.BR sigaction (2), +.BR signal (2) diff --git a/upstream/opensuse-leap-15-6/man3/program_invocation_name.3 b/upstream/opensuse-leap-15-6/man3/program_invocation_name.3 new file mode 100644 index 00000000..4b35afa2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/program_invocation_name.3 @@ -0,0 +1,66 @@ +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" %%%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 +.\" +.TH program_invocation_name 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +program_invocation_name, program_invocation_short_name \- \ +obtain name used to invoke calling program +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "extern char *" program_invocation_name ; +.BI "extern char *" program_invocation_short_name ; +.fi +.SH DESCRIPTION +.I program_invocation_name +contains the name that was used to invoke the calling program. +This is the same as the value of +.I argv[0] +in +.IR main (), +with the difference that the scope of +.I program_invocation_name +is global. +.PP +.I program_invocation_short_name +contains the basename component of name that was used to invoke +the calling program. +That is, it is the same value as +.IR program_invocation_name , +with all text up to and including the final slash (/), if any, removed. +.PP +These variables are automatically initialized by the glibc run-time +startup code. +.SH VERSIONS +The Linux-specific +.IR /proc/ pid /cmdline +file provides access to similar information. +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR proc (5) diff --git a/upstream/opensuse-leap-15-6/man3/psignal.3 b/upstream/opensuse-leap-15-6/man3/psignal.3 new file mode 100644 index 00000000..ae531ee6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/psignal.3 @@ -0,0 +1,117 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH psignal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +psignal, psiginfo \- print signal description +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void psignal(int " sig ", const char *" s ); +.BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR psignal (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR psiginfo (): +.nf + _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +The +.BR psignal () +function displays a message on \fIstderr\fP +consisting of the string \fIs\fP, a colon, a space, a string +describing the signal number \fIsig\fP, and a trailing newline. +If the string \fIs\fP is NULL or empty, the colon and space are omitted. +If \fIsig\fP is invalid, +the message displayed will indicate an unknown signal. +.PP +The +.BR psiginfo () +function is like +.BR psignal (), +except that it displays information about the signal described by +.IR pinfo , +which should point to a valid +.I siginfo_t +structure. +As well as the signal description, +.BR psiginfo () +displays information about the origin of the signal, +and other information relevant to the signal +(e.g., the relevant memory address for hardware-generated signals, +the child process ID for +.BR SIGCHLD , +and the user ID and process ID of the sender, for signals set using +.BR kill (2) +or +.BR sigqueue (3)). +.SH RETURN VALUE +The +.BR psignal () +and +.BR psiginfo () +functions return no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR psignal (), +.BR psiginfo () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.10. +POSIX.1-2008, 4.3BSD. +.SH BUGS +Up to glibc 2.12, +.BR psiginfo () +had the following bugs: +.IP \[bu] 3 +In some circumstances, a trailing newline is not printed. +.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107 +.\" Reportedly now fixed; check glibc 2.13 +.IP \[bu] +Additional details are not displayed for real-time signals. +.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108 +.\" Reportedly now fixed; check glibc 2.13 +.SH SEE ALSO +.BR sigaction (2), +.BR perror (3), +.BR strsignal (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_atfork.3 b/upstream/opensuse-leap-15-6/man3/pthread_atfork.3 new file mode 100644 index 00000000..e81f7085 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_atfork.3 @@ -0,0 +1,108 @@ +.\" Copyright (C) 2017 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_atfork 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_atfork \- register fork handlers +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_atfork(void (*" prepare ")(void), void (*" parent ")(void)," +.BI " void (*" child ")(void));" +.fi +.SH DESCRIPTION +The +.BR pthread_atfork () +function registers fork handlers that are to be executed when +.BR fork (2) +is called by any thread in a process. +The handlers are executed in the context of the thread that calls +.BR fork (2). +.PP +Three kinds of handler can be registered: +.IP \[bu] 3 +.I prepare +specifies a handler that is executed in the parent process before +.BR fork (2) +processing starts. +.IP \[bu] +.I parent +specifies a handler that is executed in the parent process after +.BR fork (2) +processing completes. +.IP \[bu] +.I child +specifies a handler that is executed in the child process after +.BR fork (2) +processing completes. +.PP +Any of the three arguments may be NULL if no handler is needed +in the corresponding phase of +.BR fork (2) +processing. +.SH RETURN VALUE +On success, +.BR pthread_atfork () +returns zero. +On error, it returns an error number. +.BR pthread_atfork () +may be called multiple times by a process +to register additional handlers. +The handlers for each phase are called in a specified order: the +.I prepare +handlers are called in reverse order of registration; the +.I parent +and +.I child +handlers are called in the order of registration. +.SH ERRORS +.TP +.B ENOMEM +Could not allocate memory to record the fork handler list entry. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +When +.BR fork (2) +is called in a multithreaded process, +only the calling thread is duplicated in the child process. +The original intention of +.BR pthread_atfork () +was to allow the child process to be returned to a consistent state. +For example, at the time of the call to +.BR fork (2), +other threads may have locked mutexes that are visible in the +user-space memory duplicated in the child. +Such mutexes would never be unlocked, +since the threads that placed the locks are not duplicated in the child. +The intent of +.BR pthread_atfork () +was to provide a mechanism whereby the application (or a library) +could ensure that mutexes and other process and thread state would be +restored to a consistent state. +In practice, this task is generally too difficult to be practicable. +.PP +After a +.BR fork (2) +in a multithreaded process returns in the child, +the child should call only async-signal-safe functions (see +.BR signal\-safety (7)) +until such time as it calls +.BR execve (2) +to execute a new program. +.PP +POSIX.1 specifies that +.BR pthread_atfork () +shall not fail with the error +.BR EINTR . +.SH SEE ALSO +.BR fork (2), +.BR atexit (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_init.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_init.3 new file mode 100644 index 00000000..c451cc2c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_init.3 @@ -0,0 +1,316 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_init 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_init, pthread_attr_destroy \- initialize and destroy +thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_init(pthread_attr_t *" attr ); +.BI "int pthread_attr_destroy(pthread_attr_t *" attr ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_init () +function initializes the thread attributes object pointed to by +.I attr +with default attribute values. +After this call, individual attributes of the object can be set +using various related functions (listed under SEE ALSO), +and then the object can be used in one or more +.BR pthread_create (3) +calls that create threads. +.PP +Calling +.BR pthread_attr_init () +on a thread attributes object that has already been initialized +results in undefined behavior. +.PP +When a thread attributes object is no longer required, +it should be destroyed using the +.BR pthread_attr_destroy () +function. +Destroying a thread attributes object has no effect +on threads that were created using that object. +.PP +Once a thread attributes object has been destroyed, +it can be reinitialized using +.BR pthread_attr_init (). +Any other use of a destroyed thread attributes object +has undefined results. +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +POSIX.1 documents an +.B ENOMEM +error for +.BR pthread_attr_init (); +on Linux these functions always succeed +(but portable and future-proof applications should nevertheless +handle a possible error return). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_init (), +.BR pthread_attr_destroy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The +.I pthread_attr_t +type should be treated as opaque: +any access to the object other than via pthreads functions +is nonportable and produces undefined results. +.SH EXAMPLES +The program below optionally makes use of +.BR pthread_attr_init () +and various related functions to initialize a thread attributes +object that is used to create a single thread. +Once created, the thread uses the +.BR pthread_getattr_np (3) +function (a nonstandard GNU extension) to retrieve the thread's +attributes, and then displays those attributes. +.PP +If the program is run with no command-line argument, +then it passes NULL as the +.I attr +argument of +.BR pthread_create (3), +so that the thread is created with default attributes. +Running the program on Linux/x86-32 with the NPTL threading implementation, +we see the following: +.PP +.in +4n +.EX +.\" Results from glibc 2.8, SUSE 11.0; Oct 2008 +.RB "$" " ulimit \-s" " # No stack limit ==> default stack size is 2 MB" +unlimited +.RB "$" " ./a.out" +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 +When we supply a stack size as a command-line argument, +the program initializes a thread attributes object, +sets various attributes in that object, +and passes a pointer to the object in the call to +.BR pthread_create (3). +Running the program on Linux/x86-32 with the NPTL threading implementation, +we see the following: +.PP +.in +4n +.EX +.\" Results from glibc 2.8, SUSE 11.0; Oct 2008 +.RB "$" " ./a.out 0x3000000" +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 Program source +\& +.\" SRC BEGIN (pthread_attr_init.c) +.EX +#define _GNU_SOURCE /* To get pthread_getattr_np() declaration */ +#include +#include +#include +#include +#include +#include + +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) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, s, "pthread_attr_getschedparam"); + printf("%sScheduling priority = %d\en", prefix, sp.sched_priority); + + s = pthread_attr_getguardsize(attr, &v); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getguardsize"); + printf("%sGuard size = %zu bytes\en", prefix, v); + + s = pthread_attr_getstack(attr, &stkaddr, &v); + if (s != 0) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, 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) + errc(EXIT_FAILURE, s, "pthread_attr_init"); + + s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setdetachstate"); + + s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setinheritsched"); + + stack_size = strtoul(argv[1], NULL, 0); + + s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "posix_memalign"); + + printf("posix_memalign() allocated at %p\en", sp); + + s = pthread_attr_setstack(&attr, sp, stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setstack"); + } + + s = pthread_create(&thr, attrp, &thread_start, NULL); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_create"); + + if (attrp != NULL) { + s = pthread_attr_destroy(attrp); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_destroy"); + } + + pause(); /* Terminates when other thread calls exit() */ +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_setaffinity_np (3), +.BR pthread_attr_setdetachstate (3), +.BR pthread_attr_setguardsize (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_attr_setscope (3), +.BR pthread_attr_setsigmask_np (3), +.BR pthread_attr_setstack (3), +.BR pthread_attr_setstackaddr (3), +.BR pthread_attr_setstacksize (3), +.BR pthread_create (3), +.BR pthread_getattr_np (3), +.BR pthread_setattr_default_np (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setaffinity_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setaffinity_np.3 new file mode 100644 index 00000000..22fde125 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setaffinity_np.3 @@ -0,0 +1,123 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setaffinity_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setaffinity_np, pthread_attr_getaffinity_np \- set/get +CPU affinity attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_attr_setaffinity_np(pthread_attr_t *" attr , +.BI " size_t " cpusetsize ", const cpu_set_t *" cpuset ); +.BI "int pthread_attr_getaffinity_np(const pthread_attr_t *" attr , +.BI " size_t " cpusetsize ", cpu_set_t *" cpuset ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setaffinity_np () +function +sets the CPU affinity mask attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR cpuset . +This attribute determines the CPU affinity mask +of a thread created using the thread attributes object +.IR attr . +.PP +The +.BR pthread_attr_getaffinity_np () +function +returns the CPU affinity mask attribute of the thread attributes object +referred to by +.I attr +in the buffer pointed to by +.IR cpuset . +.PP +The argument +.I cpusetsize +is the length (in bytes) of the buffer pointed to by +.IR cpuset . +Typically, this argument would be specified as +.IR sizeof(cpu_set_t) . +.PP +For more details on CPU affinity masks, see +.BR sched_setaffinity (2). +For a description of a set of macros +that can be used to manipulate and inspect CPU sets, see +.BR CPU_SET (3). +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.TP +.B EINVAL +.RB ( pthread_attr_setaffinity_np ()) +.I cpuset +specified a CPU that was outside the set supported by the kernel. +(The kernel configuration option +.B CONFIG_NR_CPUS +defines the range of the set supported by the kernel data type +.\" cpumask_t +used to represent CPU sets.) +.\" The raw sched_getaffinity() system call returns the size (in bytes) +.\" of the cpumask_t type. +.TP +.B EINVAL +.RB ( pthread_attr_getaffinity_np ()) +A CPU in the affinity mask of the thread attributes object referred to by +.I attr +lies outside the range specified by +.I cpusetsize +(i.e., +.IR cpuset / cpusetsize +is too small). +.TP +.B ENOMEM +.RB ( pthread_attr_setaffinity_np ()) +Could not allocate memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setaffinity_np (), +.BR pthread_attr_getaffinity_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.3.4. +.SH NOTES +In glibc 2.3.3 only, +versions of these functions were provided that did not have a +.I cpusetsize +argument. +Instead the CPU set size given to the underlying system calls was always +.IR sizeof(cpu_set_t) . +.SH SEE ALSO +.BR sched_setaffinity (2), +.BR pthread_attr_init (3), +.BR pthread_setaffinity_np (3), +.BR cpuset (7), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setdetachstate.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setdetachstate.3 new file mode 100644 index 00000000..cd50e23e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setdetachstate.3 @@ -0,0 +1,118 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setdetachstate 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setdetachstate, pthread_attr_getdetachstate \- +set/get detach state attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setdetachstate(pthread_attr_t *" attr \ +", int " detachstate ); +.BI "int pthread_attr_getdetachstate(const pthread_attr_t *" attr , +.BI " int *" detachstate ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setdetachstate () +function sets the detach state attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR detachstate . +The detach state attribute determines whether a thread created using +the thread attributes object +.I attr +will be created in a joinable or a detached state. +.PP +The following values may be specified in +.IR detachstate : +.TP +.B PTHREAD_CREATE_DETACHED +Threads that are created using +.I attr +will be created in a detached state. +.TP +.B PTHREAD_CREATE_JOINABLE +Threads that are created using +.I attr +will be created in a joinable state. +.PP +The default setting of the detach state attribute in a newly initialized +thread attributes object is +.BR PTHREAD_CREATE_JOINABLE . +.PP +The +.BR pthread_attr_getdetachstate () +returns the detach state attribute of the thread attributes object +.I attr +in the buffer pointed to by +.IR detachstate . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setdetachstate () +can fail with the following error: +.TP +.B EINVAL +An invalid value was specified in +.IR detachstate . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setdetachstate (), +.BR pthread_attr_getdetachstate () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +See +.BR pthread_create (3) +for more details on detached and joinable threads. +.PP +A thread that is created in a joinable state should +eventually either be joined using +.BR pthread_join (3) +or detached using +.BR pthread_detach (3); +see +.BR pthread_create (3). +.PP +It is an error to specify the thread ID of +a thread that was created in a detached state +in a later call to +.BR pthread_detach (3) +or +.BR pthread_join (3). +.SH EXAMPLES +See +.BR pthread_attr_init (3). +.SH SEE ALSO +.BR pthread_attr_init (3), +.BR pthread_create (3), +.BR pthread_detach (3), +.BR pthread_join (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setguardsize.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setguardsize.3 new file mode 100644 index 00000000..40e80145 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setguardsize.3 @@ -0,0 +1,166 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setguardsize 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setguardsize, pthread_attr_getguardsize \- set/get guard size +attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setguardsize(pthread_attr_t *" attr \ +", size_t " guardsize ); +.BI "int pthread_attr_getguardsize(const pthread_attr_t *restrict " attr , +.BI " size_t *restrict " guardsize ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setguardsize () +function sets the guard size attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR guardsize . +.PP +If +.I guardsize +is greater than 0, +then for each new thread created using +.I attr +the system allocates an additional region of at least +.I guardsize +bytes at the end of the thread's stack to act as the guard area +for the stack (but see BUGS). +.PP +If +.I guardsize +is 0, then new threads created with +.I attr +will not have a guard area. +.PP +The default guard size is the same as the system page size. +.PP +If the stack address attribute has been set in +.I attr +(using +.BR pthread_attr_setstack (3) +or +.BR pthread_attr_setstackaddr (3)), +meaning that the caller is allocating the thread's stack, +then the guard size attribute is ignored +(i.e., no guard area is created by the system): +it is the application's responsibility to handle stack overflow +(perhaps by using +.BR mprotect (2) +to manually define a guard area at the end of the stack +that it has allocated). +.PP +The +.BR pthread_attr_getguardsize () +function returns the guard size attribute of the +thread attributes object referred to by +.I attr +in the buffer pointed to by +.IR guardsize . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +POSIX.1 documents an +.B EINVAL +error if +.I attr +or +.I guardsize +is invalid. +On Linux these functions always succeed +(but portable and future-proof applications should nevertheless +handle a possible error return). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setguardsize (), +.BR pthread_attr_getguardsize () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +A guard area consists of virtual memory pages that are protected +to prevent read and write access. +If a thread overflows its stack into the guard area, +then, on most hard architectures, it receives a +.B SIGSEGV +signal, thus notifying it of the overflow. +Guard areas start on page boundaries, +and the guard size is internally rounded up to +the system page size when creating a thread. +(Nevertheless, +.BR pthread_attr_getguardsize () +returns the guard size that was set by +.BR pthread_attr_setguardsize ().) +.PP +Setting a guard size of 0 may be useful to save memory +in an application that creates many threads +and knows that stack overflow can never occur. +.PP +Choosing a guard size larger than the default size +may be necessary for detecting stack overflows +if a thread allocates large data structures on the stack. +.SH BUGS +As at glibc 2.8, the NPTL threading implementation includes +the guard area within the stack size allocation, +rather than allocating extra space at the end of the stack, +as POSIX.1 requires. +(This can result in an +.B EINVAL +error from +.BR pthread_create (3) +if the guard size value is too large, +leaving no space for the actual stack.) +.PP +The obsolete LinuxThreads implementation did the right thing, +allocating extra space at the end of the stack for the guard area. +.\" glibc includes the guardsize within the allocated stack size, +.\" which looks pretty clearly to be in violation of POSIX. +.\" +.\" Filed bug, 22 Oct 2008: +.\" https://www.sourceware.org/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 +.SH EXAMPLES +See +.BR pthread_getattr_np (3). +.SH SEE ALSO +.BR mmap (2), +.BR mprotect (2), +.BR pthread_attr_init (3), +.BR pthread_attr_setstack (3), +.BR pthread_attr_setstacksize (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setinheritsched.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setinheritsched.3 new file mode 100644 index 00000000..d1cc55df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setinheritsched.3 @@ -0,0 +1,143 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setinheritsched 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setinheritsched, pthread_attr_getinheritsched \- set/get +inherit-scheduler attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setinheritsched(pthread_attr_t *" attr , +.BI " int " inheritsched ); +.BI "int pthread_attr_getinheritsched(const pthread_attr_t *restrict " attr , +.BI " int *restrict " inheritsched ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setinheritsched () +function sets the inherit-scheduler attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR inheritsched . +The inherit-scheduler attribute determines whether a thread created using +the thread attributes object +.I attr +will inherit its scheduling attributes from the calling thread +or whether it will take them from +.IR attr . +.PP +The following scheduling attributes are affected by the +inherit-scheduler attribute: +scheduling policy +.RB ( pthread_attr_setschedpolicy (3)), +scheduling priority +.RB ( pthread_attr_setschedparam (3)), +and contention scope +.RB ( pthread_attr_setscope (3)). +.PP +The following values may be specified in +.IR inheritsched : +.TP +.B PTHREAD_INHERIT_SCHED +Threads that are created using +.I attr +inherit scheduling attributes from the creating thread; +the scheduling attributes in +.I attr +are ignored. +.TP +.B PTHREAD_EXPLICIT_SCHED +Threads that are created using +.I attr +take their scheduling attributes from the values specified +by the attributes object. +.\" FIXME Document the defaults for scheduler settings +.PP +The default setting of the inherit-scheduler attribute in +a newly initialized thread attributes object is +.BR PTHREAD_INHERIT_SCHED . +.PP +The +.BR pthread_attr_getinheritsched () +returns the inherit-scheduler attribute of the thread attributes object +.I attr +in the buffer pointed to by +.IR inheritsched . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setinheritsched () +can fail with the following error: +.TP +.B EINVAL +Invalid value in +.IR inheritsched . +.PP +POSIX.1 also documents an optional +.B ENOTSUP +error ("attempt was made to set the attribute to an unsupported value") for +.BR pthread_attr_setinheritsched (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setinheritsched (), +.BR pthread_attr_getinheritsched () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0. +POSIX.1-2001. +.SH BUGS +As at glibc 2.8, if a thread attributes object is initialized using +.BR pthread_attr_init (3), +then the scheduling policy of the attributes object is set to +.B SCHED_OTHER +and the scheduling priority is set to 0. +However, if the inherit-scheduler attribute is then set to +.BR PTHREAD_EXPLICIT_SCHED , +then a thread created using the attribute object +wrongly inherits its scheduling attributes from the creating thread. +This bug does not occur if either the scheduling policy or +scheduling priority attribute is explicitly set +in the thread attributes object before calling +.BR pthread_create (3). +.\" FIXME . Track status of the following bug: +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7007 +.SH EXAMPLES +See +.BR pthread_setschedparam (3). +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_init (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_attr_setscope (3), +.BR pthread_create (3), +.BR pthread_setschedparam (3), +.BR pthread_setschedprio (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedparam.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedparam.3 new file mode 100644 index 00000000..417081b4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedparam.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setschedparam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setschedparam, pthread_attr_getschedparam \- set/get +scheduling parameter attributes in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setschedparam(pthread_attr_t *restrict " attr , +.BI " const struct sched_param *restrict " param ); +.BI "int pthread_attr_getschedparam(const pthread_attr_t *restrict " attr , +.BI " struct sched_param *restrict " param ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setschedparam () +function sets the scheduling parameter attributes of the +thread attributes object referred to by +.I attr +to the values specified in the buffer pointed to by +.IR param . +These attributes determine the scheduling parameters of +a thread created using the thread attributes object +.IR attr . +.PP +The +.BR pthread_attr_getschedparam () +returns the scheduling parameter attributes of the thread attributes object +.I attr +in the buffer pointed to by +.IR param . +.PP +Scheduling parameters are maintained in the following structure: +.PP +.in +4n +.EX +struct sched_param { + int sched_priority; /* Scheduling priority */ +}; +.EE +.in +.PP +As can be seen, only one scheduling parameter is supported. +For details of the permitted ranges for scheduling priorities +in each scheduling policy, see +.BR sched (7). +.PP +In order for the parameter setting made by +.BR pthread_attr_setschedparam () +to have effect when calling +.BR pthread_create (3), +the caller must use +.BR pthread_attr_setinheritsched (3) +to set the inherit-scheduler attribute of the attributes object +.I attr +to +.BR PTHREAD_EXPLICIT_SCHED . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setschedparam () +can fail with the following error: +.TP +.B EINVAL +The priority specified in +.I param +does not make sense for the current scheduling policy of +.IR attr . +.PP +POSIX.1 also documents an +.B ENOTSUP +error for +.BR pthread_attr_setschedparam (). +This value is never returned on Linux +(but portable and future-proof applications should nevertheless +handle this error return value). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setschedparam (), +.BR pthread_attr_getschedparam () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +glibc 2.0. +.SH NOTES +See +.BR pthread_attr_setschedpolicy (3) +for a list of the thread scheduling policies supported on Linux. +.SH EXAMPLES +See +.BR pthread_setschedparam (3). +.SH SEE ALSO +.ad l +.nh +.BR sched_get_priority_min (2), +.BR pthread_attr_init (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_create (3), +.BR pthread_setschedparam (3), +.BR pthread_setschedprio (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedpolicy.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedpolicy.3 new file mode 100644 index 00000000..8f1566ad --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setschedpolicy.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setschedpolicy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setschedpolicy, pthread_attr_getschedpolicy \- set/get +scheduling policy attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setschedpolicy(pthread_attr_t *" attr ", int " policy ); +.BI "int pthread_attr_getschedpolicy(const pthread_attr_t *restrict " attr , +.BI " int *restrict " policy ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setschedpolicy () +function sets the scheduling policy attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR policy . +This attribute determines the scheduling policy of +a thread created using the thread attributes object +.IR attr . +.PP +The supported values for +.I policy +are +.BR SCHED_FIFO , +.BR SCHED_RR , +and +.BR SCHED_OTHER , +with the semantics described in +.BR sched (7). +.\" 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 +.PP +The +.BR pthread_attr_getschedpolicy () +returns the scheduling policy attribute of the thread attributes object +.I attr +in the buffer pointed to by +.IR policy . +.PP +In order for the policy setting made by +.BR pthread_attr_setschedpolicy () +to have effect when calling +.BR pthread_create (3), +the caller must use +.BR pthread_attr_setinheritsched (3) +to set the inherit-scheduler attribute of the attributes object +.I attr +to +.BR PTHREAD_EXPLICIT_SCHED . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setschedpolicy () +can fail with the following error: +.TP +.B EINVAL +Invalid value in +.IR policy . +.PP +POSIX.1 also documents an optional +.B ENOTSUP +error ("attempt was made to set the attribute to an unsupported value") for +.BR pthread_attr_setschedpolicy (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setschedpolicy (), +.BR pthread_attr_getschedpolicy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0. +POSIX.1-2001. +.SH EXAMPLES +See +.BR pthread_setschedparam (3). +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_init (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_create (3), +.BR pthread_setschedparam (3), +.BR pthread_setschedprio (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setscope.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setscope.3 new file mode 100644 index 00000000..249f084a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setscope.3 @@ -0,0 +1,142 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setscope 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setscope, pthread_attr_getscope \- set/get contention scope +attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setscope(pthread_attr_t *" attr ", int " scope ); +.BI "int pthread_attr_getscope(const pthread_attr_t *restrict " attr , +.BI " int *restrict " scope ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setscope () +function sets the contention scope attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR scope . +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 +.IR scope : +.TP +.B PTHREAD_SCOPE_SYSTEM +The thread competes for resources with all other threads +in all processes on the system that are in the same scheduling +allocation domain (a group of one or more processors). +.B PTHREAD_SCOPE_SYSTEM +threads are scheduled relative to one another +according to their scheduling policy and priority. +.TP +.B PTHREAD_SCOPE_PROCESS +The thread competes for resources with all other threads +in the same process that were also created with the +.B PTHREAD_SCOPE_PROCESS +contention scope. +.B PTHREAD_SCOPE_PROCESS +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 +.B PTHREAD_SCOPE_SYSTEM +contention scope. +.PP +POSIX.1 requires that an implementation support at least one of these +contention scopes. +Linux supports +.BR PTHREAD_SCOPE_SYSTEM , +but not +.BR PTHREAD_SCOPE_PROCESS . +.PP +On systems that support multiple contention scopes, then, +in order for the parameter setting made by +.BR pthread_attr_setscope () +to have effect when calling +.BR pthread_create (3), +the caller must use +.BR pthread_attr_setinheritsched (3) +to set the inherit-scheduler attribute of the attributes object +.I attr +to +.BR PTHREAD_EXPLICIT_SCHED . +.PP +The +.BR pthread_attr_getscope () +function returns the contention scope attribute of the +thread attributes object referred to by +.I attr +in the buffer pointed to by +.IR scope . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setscope () +can fail with the following errors: +.TP +.B EINVAL +An invalid value was specified in +.IR scope . +.TP +.B ENOTSUP +.I scope +specified the value +.BR PTHREAD_SCOPE_PROCESS , +which is not supported on Linux. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setscope (), +.BR pthread_attr_getscope () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The +.B PTHREAD_SCOPE_SYSTEM +contention scope typically indicates that a user-space thread is +bound directly to a single kernel-scheduling entity. +This is the case on Linux for the obsolete LinuxThreads implementation +and the modern NPTL implementation, +which are both 1:1 threading implementations. +.PP +POSIX.1 specifies that the default contention scope is +implementation-defined. +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_init (3), +.BR pthread_attr_setaffinity_np (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setsigmask_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setsigmask_np.3 new file mode 100644 index 00000000..01f9eb2d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setsigmask_np.3 @@ -0,0 +1,133 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setsigmask_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setsigmask_np, pthread_attr_getsigmask_np \- set/get +signal mask attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_attr_setsigmask_np(pthread_attr_t *" attr , +.BI " const sigset_t *" sigmask ); +.BI "int pthread_attr_getsigmask_np(const pthread_attr_t *" attr , +.BI " sigset_t *" sigmask ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setsigmask_np () +function sets the signal mask attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR *sigmask . +If +.I sigmask +is specified as NULL, then any existing signal mask attribute in +.I attr +is unset. +.PP +The +.BR pthread_attr_getsigmask_np () +function returns the signal mask attribute of the thread attributes object +referred to by +.I attr +in the buffer pointed to by +.IR sigmask . +If the signal mask attribute is currently unset, +then this function returns the special value +.B PTHREAD_ATTR_NO_SIGMASK_NP +as its result. +.SH RETURN VALUE +The +.BR pthread_attr_setsigmask_np () +function returns 0 on success, or a nonzero error number on failure. +.PP +the +.BR pthread_attr_getsigmask_np () +function returns either 0 or +.BR PTHREAD_ATTR_NO_SIGMASK_NP . +When 0 is returned, the signal mask attribute is returned via +.IR sigmask . +A return value of +.B PTHREAD_ATTR_NO_SIGMASK_NP +indicates that the signal mask attribute is not set in +.IR attr . +.PP +On error, these functions return a positive error number. +.SH ERRORS +.TP +.B ENOMEM +.RB ( pthread_attr_setsigmask_np ()) +Could not allocate memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setsigmask_np (), +.BR pthread_attr_getsigmask_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.32. +.SH NOTES +The signal mask attribute determines the signal mask that will be assigned to +a thread created using the thread attributes object +.IR attr . +If this attribute is not set, then a thread created using +.I attr +will inherit a copy of the creating thread's signal mask. +.PP +For more details on signal masks, see +.BR sigprocmask (2). +For a description of a set of macros +that can be used to manipulate and inspect signal sets, see +.BR sigsetops (3). +.PP +In the absence of +.BR pthread_attr_setsigmask_np () +it is possible to create a thread with a desired signal mask as follows: +.IP \[bu] 3 +The creating thread uses +.BR pthread_sigmask (3) +to save its current signal mask and set its mask to block all signals. +.IP \[bu] +The new thread is then created using +.BR pthread_create (); +the new thread will inherit the creating thread's signal mask. +.IP \[bu] +The new thread sets its signal mask to the desired value using +.BR pthread_sigmask (3). +.IP \[bu] +The creating thread restores its signal mask to the original value. +.PP +Following the above steps, +there is no possibility for the new thread to receive a signal +before it has adjusted its signal mask to the desired value. +.SH SEE ALSO +.BR sigprocmask (2), +.BR pthread_attr_init (3), +.BR pthread_sigmask (3), +.BR pthreads (7), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setstack.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstack.3 new file mode 100644 index 00000000..0149ac7f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstack.3 @@ -0,0 +1,167 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setstack 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setstack, pthread_attr_getstack \- set/get stack +attributes in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setstack(pthread_attr_t *" attr , +.BI " void " stackaddr [. stacksize ], +.BI " size_t " stacksize ); +.BI "int pthread_attr_getstack(const pthread_attr_t *restrict " attr , +.BI " void **restrict " stackaddr , +.BI " size_t *restrict " stacksize ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_attr_getstack (), +.BR pthread_attr_setstack (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setstack () +function sets the stack address and stack size attributes of the +thread attributes object referred to by +.I attr +to the values specified in +.I stackaddr +and +.IR stacksize , +respectively. +These attributes specify the location and size of the stack that should +be used by a thread that is created using the thread attributes object +.IR attr . +.PP +.I stackaddr +should point to the lowest addressable byte of a buffer of +.I stacksize +bytes that was allocated by the caller. +The pages of the allocated buffer should be both readable and writable. +.PP +The +.BR pthread_attr_getstack () +function returns the stack address and stack size attributes of the +thread attributes object referred to by +.I attr +in the buffers pointed to by +.I stackaddr +and +.IR stacksize , +respectively. +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setstack () +can fail with the following error: +.TP +.B EINVAL +.I stacksize +is less than +.B PTHREAD_STACK_MIN +(16384) bytes. +On some systems, this error may also occur if +.I stackaddr +or +.I stackaddr\~+\~stacksize +is not suitably aligned. +.PP +POSIX.1 also documents an +.B EACCES +error if the stack area described by +.I stackaddr +and +.I stacksize +is not both readable and writable by the caller. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setstack (), +.BR pthread_attr_getstack () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.SH NOTES +These functions are provided for applications that must ensure that +a thread's stack is placed in a particular location. +For most applications, this is not necessary, +and the use of these functions should be avoided. +(Use +.BR pthread_attr_setstacksize (3) +if an application simply requires a stack size other than the default.) +.PP +When an application employs +.BR pthread_attr_setstack (), +it takes over the responsibility of allocating the stack. +Any guard size value that was set using +.BR pthread_attr_setguardsize (3) +is ignored. +If deemed necessary, +it is the application's responsibility to allocate a guard area +(one or more pages protected against reading and writing) +to handle the possibility of stack overflow. +.PP +The address specified in +.I stackaddr +should be suitably aligned: +for full portability, align it on a page boundary +.RI ( sysconf(_SC_PAGESIZE) ). +.BR posix_memalign (3) +may be useful for allocation. +Probably, +.I stacksize +should also be a multiple of the system page size. +.PP +If +.I attr +is used to create multiple threads, then the caller must change the +stack address attribute between calls to +.BR pthread_create (3); +otherwise, the threads will attempt to use the same memory area +for their stacks, and chaos will ensue. +.SH EXAMPLES +See +.BR pthread_attr_init (3). +.SH SEE ALSO +.ad l +.nh +.BR mmap (2), +.BR mprotect (2), +.BR posix_memalign (3), +.BR pthread_attr_init (3), +.BR pthread_attr_setguardsize (3), +.BR pthread_attr_setstackaddr (3), +.BR pthread_attr_setstacksize (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setstackaddr.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstackaddr.3 new file mode 100644 index 00000000..007875ce --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstackaddr.3 @@ -0,0 +1,118 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setstackaddr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setstackaddr, pthread_attr_getstackaddr \- +set/get stack address attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B [[deprecated]] +.BI "int pthread_attr_setstackaddr(pthread_attr_t *" attr \ +", void *" stackaddr ); +.B [[deprecated]] +.BI "int pthread_attr_getstackaddr(const pthread_attr_t *restrict " attr , +.BI " void **restrict " stackaddr ); +.fi +.SH DESCRIPTION +These functions are obsolete: +.B do not use them. +Use +.BR pthread_attr_setstack (3) +and +.BR pthread_attr_getstack (3) +instead. +.PP +The +.BR pthread_attr_setstackaddr () +function sets the stack address attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR stackaddr . +This attribute specifies the location of the stack that should +be used by a thread that is created using the thread attributes object +.IR attr . +.PP +.I stackaddr +should point to a buffer of at least +.B PTHREAD_STACK_MIN +bytes that was allocated by the caller. +The pages of the allocated buffer should be both readable and writable. +.PP +The +.BR pthread_attr_getstackaddr () +function returns the stack address attribute of the +thread attributes object referred to by +.I attr +in the buffer pointed to by +.IR stackaddr . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +No errors are defined +(but applications should nevertheless +handle a possible error return). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setstackaddr (), +.BR pthread_attr_getstackaddr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +glibc 2.1. +Marked obsolete in POSIX.1-2001. +Removed in POSIX.1-2008. +.SH NOTES +.I Do not use these functions! +They cannot be portably used, since they provide no way of specifying +the direction of growth or the range of the stack. +For example, on architectures with a stack that grows downward, +.I stackaddr +specifies the next address past the +.I highest +address of the allocated stack area. +However, on architectures with a stack that grows upward, +.I stackaddr +specifies the +.I lowest +address in the allocated stack area. +By contrast, the +.I stackaddr +used by +.BR pthread_attr_setstack (3) +and +.BR pthread_attr_getstack (3), +is always a pointer to the lowest address in the allocated stack area +(and the +.I stacksize +argument specifies the range of the stack). +.SH SEE ALSO +.BR pthread_attr_init (3), +.BR pthread_attr_setstack (3), +.BR pthread_attr_setstacksize (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_attr_setstacksize.3 b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstacksize.3 new file mode 100644 index 00000000..4d5ea53c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_attr_setstacksize.3 @@ -0,0 +1,117 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_attr_setstacksize 3 2023-03-17 "Linux man-pages 6.04" +.SH NAME +pthread_attr_setstacksize, pthread_attr_getstacksize \- set/get stack size +attribute in thread attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_attr_setstacksize(pthread_attr_t *" attr \ +", size_t " stacksize ); +.BI "int pthread_attr_getstacksize(const pthread_attr_t *restrict " attr , +.BI " size_t *restrict " stacksize ); +.fi +.SH DESCRIPTION +The +.BR pthread_attr_setstacksize () +function sets the stack size attribute of the +thread attributes object referred to by +.I attr +to the value specified in +.IR stacksize . +.PP +The stack size attribute determines the minimum size (in bytes) that +will be allocated for threads created using the thread attributes object +.IR attr . +.PP +The +.BR pthread_attr_getstacksize () +function returns the stack size attribute of the +thread attributes object referred to by +.I attr +in the buffer pointed to by +.IR stacksize . +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.BR pthread_attr_setstacksize () +can fail with the following error: +.TP +.B EINVAL +The stack size is less than +.B PTHREAD_STACK_MIN +(16384) bytes. +.PP +On some systems, +.\" e.g., MacOS +.BR pthread_attr_setstacksize () +can fail with the error +.B EINVAL +if +.I stacksize +is not a multiple of the system page size. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_attr_setstacksize (), +.BR pthread_attr_getstacksize () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +These functions are provided since glibc 2.1. +.SH STANDARDS +POSIX.1-2001, POSIX.1-2008. +.SH NOTES +For details on the default stack size of new threads, see +.BR pthread_create (3). +.PP +A thread's stack size is fixed at the time of thread creation. +Only the main thread can dynamically grow its stack. +.PP +The +.BR pthread_attr_setstack (3) +function allows an application to set both the size and location +of a caller-allocated stack that is to be used by a thread. +.SH BUGS +As at glibc 2.8, +if the specified +.I stacksize +is not a multiple of +.B STACK_ALIGN +(16 bytes on most architectures), it may be rounded +.IR downward , +in violation of POSIX.1, which says that the allocated stack will +be at least +.I stacksize +bytes. +.SH EXAMPLES +See +.BR pthread_create (3). +.SH SEE ALSO +.BR getrlimit (2), +.BR pthread_attr_init (3), +.BR pthread_attr_setguardsize (3), +.BR pthread_attr_setstack (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_cancel.3 b/upstream/opensuse-leap-15-6/man3/pthread_cancel.3 new file mode 100644 index 00000000..58b46f9f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_cancel.3 @@ -0,0 +1,240 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_cancel 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_cancel \- send a cancelation request to a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_cancel(pthread_t " thread ); +.fi +.SH DESCRIPTION +The +.BR pthread_cancel () +function sends a cancelation request to the thread +.IR thread . +Whether and when the target thread +reacts to the cancelation request depends on +two attributes that are under the control of that thread: +its cancelability +.I state +and +.IR type . +.PP +A thread's cancelability state, determined by +.BR pthread_setcancelstate (3), +can be +.I enabled +(the default for new threads) or +.IR disabled . +If a thread has disabled cancelation, +then a cancelation request remains queued until the thread +enables cancelation. +If a thread has enabled cancelation, +then its cancelability type determines when cancelation occurs. +.PP +A thread's cancelation type, determined by +.BR pthread_setcanceltype (3), +may be either +.I asynchronous +or +.I deferred +(the default for new threads). +Asynchronous cancelability +means that the thread can be canceled at any time +(usually immediately, but the system does not guarantee this). +Deferred cancelability means that cancelation will be delayed until +the thread next calls a function that is a +.IR "cancelation point" . +A list of functions that are or may be cancelation points is provided in +.BR pthreads (7). +.PP +When a cancelation requested is acted on, the following steps occur for +.I thread +(in this order): +.IP (1) 5 +Cancelation clean-up handlers are popped +(in the reverse of the order in which they were pushed) and called. +(See +.BR pthread_cleanup_push (3).) +.IP (2) +Thread-specific data destructors are called, +in an unspecified order. +(See +.BR pthread_key_create (3).) +.IP (3) +The thread is terminated. +(See +.BR pthread_exit (3).) +.PP +The above steps happen asynchronously with respect to the +.BR pthread_cancel () +call; +the return status of +.BR pthread_cancel () +merely informs the caller whether the cancelation request +was successfully queued. +.PP +After a canceled thread has terminated, +a join with that thread using +.BR pthread_join (3) +obtains +.B PTHREAD_CANCELED +as the thread's exit status. +(Joining with a thread is the only way to know that cancelation +has completed.) +.SH RETURN VALUE +On success, +.BR pthread_cancel () +returns 0; +on error, it returns a nonzero error number. +.SH ERRORS +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_cancel () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, cancelation is implemented using signals. +Under the NPTL threading implementation, +the first real-time signal (i.e., signal 32) is used for this purpose. +On LinuxThreads, the second real-time signal is used, +if real-time signals are available, otherwise +.B SIGUSR2 +is used. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0 +POSIX.1-2001. +.SH EXAMPLES +The program below creates a thread and then cancels it. +The main thread joins with the canceled thread to check +that its exit status was +.BR PTHREAD_CANCELED . +The following shell session shows what happens when we run the program: +.PP +.in +4n +.EX +$ ./a.out +thread_func(): started; cancelation disabled +main(): sending cancelation request +thread_func(): about to enable cancelation +main(): thread was canceled +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_cancel.c) +.EX +#include +#include +#include +#include +#include + +#define handle_error_en(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) + +static void * +thread_func(void *ignored_argument) +{ + int s; + + /* Disable cancelation for a while, so that we don\[aq]t + immediately react to a cancelation request. */ + + s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); + if (s != 0) + handle_error_en(s, "pthread_setcancelstate"); + + printf("%s(): started; cancelation disabled\en", __func__); + sleep(5); + printf("%s(): about to enable cancelation\en", __func__); + + s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + if (s != 0) + handle_error_en(s, "pthread_setcancelstate"); + + /* sleep() is a cancelation point. */ + + sleep(1000); /* Should get canceled while we sleep */ + + /* Should never get here. */ + + printf("%s(): not canceled!\en", __func__); + return NULL; +} + +int +main(void) +{ + pthread_t thr; + void *res; + int s; + + /* Start a thread and then send it a cancelation request. */ + + s = pthread_create(&thr, NULL, &thread_func, NULL); + if (s != 0) + handle_error_en(s, "pthread_create"); + + sleep(2); /* Give thread a chance to get started */ + + printf("%s(): sending cancelation request\en", __func__); + s = pthread_cancel(thr); + if (s != 0) + handle_error_en(s, "pthread_cancel"); + + /* Join with thread to see what its exit status was. */ + + s = pthread_join(thr, &res); + if (s != 0) + handle_error_en(s, "pthread_join"); + + if (res == PTHREAD_CANCELED) + printf("%s(): thread was canceled\en", __func__); + else + printf("%s(): thread wasn\[aq]t canceled (shouldn\[aq]t happen!)\en", + __func__); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR pthread_cleanup_push (3), +.BR pthread_create (3), +.BR pthread_exit (3), +.BR pthread_join (3), +.BR pthread_key_create (3), +.BR pthread_setcancelstate (3), +.BR pthread_setcanceltype (3), +.BR pthread_testcancel (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push.3 b/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push.3 new file mode 100644 index 00000000..ab83ed06 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push.3 @@ -0,0 +1,322 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_cleanup_push 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_cleanup_push, pthread_cleanup_pop \- push and pop +thread cancelation clean-up handlers +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void pthread_cleanup_push(void (*" routine ")(void *), void *" arg ); +.BI "void pthread_cleanup_pop(int " execute ); +.fi +.SH DESCRIPTION +These functions manipulate the calling thread's stack of +thread-cancelation clean-up handlers. +A clean-up handler is a function that is automatically executed +when a thread is canceled (or in various other circumstances +described below); +it might, for example, unlock a mutex so that +it becomes available to other threads in the process. +.PP +The +.BR pthread_cleanup_push () +function pushes +.I routine +onto the top of the stack of clean-up handlers. +When +.I routine +is later invoked, it will be given +.I arg +as its argument. +.PP +The +.BR pthread_cleanup_pop () +function removes the routine at the top of the stack of clean-up handlers, +and optionally executes it if +.I execute +is nonzero. +.PP +A cancelation clean-up handler is popped from the stack +and executed in the following circumstances: +.IP \[bu] 3 +When a thread is canceled, +all of the stacked clean-up handlers are popped and executed in +the reverse of the order in which they were pushed onto the stack. +.IP \[bu] +When a thread terminates by calling +.BR pthread_exit (3), +all clean-up handlers are executed as described in the preceding point. +(Clean-up handlers are +.I not +called if the thread terminates by +performing a +.I return +from the thread start function.) +.IP \[bu] +When a thread calls +.BR pthread_cleanup_pop () +with a nonzero +.I execute +argument, the top-most clean-up handler is popped and executed. +.PP +POSIX.1 permits +.BR pthread_cleanup_push () +and +.BR pthread_cleanup_pop () +to be implemented as macros that expand to text +containing \[aq]\fB{\fP\[aq] and \[aq]\fB}\fP\[aq], respectively. +For this reason, the caller must ensure that calls to these +functions are paired within the same function, +and at the same lexical nesting level. +(In other words, a clean-up handler is established only +during the execution of a specified section of code.) +.PP +Calling +.BR longjmp (3) +.RB ( siglongjmp (3)) +produces undefined results if any call has been made to +.BR pthread_cleanup_push () +or +.BR pthread_cleanup_pop () +without the matching call of the pair since the jump buffer +was filled by +.BR setjmp (3) +.RB ( sigsetjmp (3)). +Likewise, calling +.BR longjmp (3) +.RB ( siglongjmp (3)) +from inside a clean-up handler produces undefined results +unless the jump buffer was also filled by +.BR setjmp (3) +.RB ( sigsetjmp (3)) +inside the handler. +.SH RETURN VALUE +These functions do not return a value. +.SH ERRORS +There are no errors. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_cleanup_push (), +.BR pthread_cleanup_pop () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On glibc, the +.BR pthread_cleanup_push () +and +.BR pthread_cleanup_pop () +functions +.I are +implemented as macros that expand to text +containing \[aq]\fB{\fP\[aq] and \[aq]\fB}\fP\[aq], respectively. +This means that variables declared within the scope of +paired calls to these functions will be visible within only that scope. +.PP +POSIX.1 +.\" The text was actually added in the 2004 TC2 +says that the effect of using +.IR return , +.IR break , +.IR continue , +or +.I goto +to prematurely leave a block bracketed +.BR pthread_cleanup_push () +and +.BR pthread_cleanup_pop () +is undefined. +Portable applications should avoid doing this. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +glibc 2.0. +.SH EXAMPLES +The program below provides a simple example of the use of the functions +described in this page. +The program creates a thread that executes a loop bracketed by +.BR pthread_cleanup_push () +and +.BR pthread_cleanup_pop (). +This loop increments a global variable, +.IR cnt , +once each second. +Depending on what command-line arguments are supplied, +the main thread sends the other thread a cancelation request, +or sets a global variable that causes the other thread +to exit its loop and terminate normally (by doing a +.IR return ). +.PP +In the following shell session, +the main thread sends a cancelation request to the other thread: +.PP +.in +4n +.EX +$ \fB./a.out\fP +New thread started +cnt = 0 +cnt = 1 +Canceling thread +Called clean\-up handler +Thread was canceled; cnt = 0 +.EE +.in +.PP +From the above, we see that the thread was canceled, +and that the cancelation clean-up handler was called +and it reset the value of the global variable +.I cnt +to 0. +.PP +In the next run, the main program sets a +global variable that causes other thread to terminate normally: +.PP +.in +4n +.EX +$ \fB./a.out x\fP +New thread started +cnt = 0 +cnt = 1 +Thread terminated normally; cnt = 2 +.EE +.in +.PP +From the above, we see that the clean-up handler was not executed (because +.I cleanup_pop_arg +was 0), and therefore the value of +.I cnt +was not reset. +.PP +In the next run, the main program sets a global variable that +causes the other thread to terminate normally, +and supplies a nonzero value for +.IR cleanup_pop_arg : +.PP +.in +4n +.EX +$ \fB./a.out x 1\fP +New thread started +cnt = 0 +cnt = 1 +Called clean\-up handler +Thread terminated normally; cnt = 0 +.EE +.in +.PP +In the above, we see that although the thread was not canceled, +the clean-up handler was executed, because the argument given to +.BR pthread_cleanup_pop () +was nonzero. +.SS Program source +\& +.\" SRC BEGIN (pthread_cleanup_push.c) +.EX +#include +#include +#include +#include +#include +#include + +#define handle_error_en(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) + +static int done = 0; +static int cleanup_pop_arg = 0; +static int cnt = 0; + +static void +cleanup_handler(void *arg) +{ + printf("Called clean\-up handler\en"); + cnt = 0; +} + +static void * +thread_start(void *arg) +{ + time_t curr; + + printf("New thread started\en"); + + pthread_cleanup_push(cleanup_handler, NULL); + + curr = time(NULL); + + while (!done) { + pthread_testcancel(); /* A cancelation point */ + if (curr < time(NULL)) { + curr = time(NULL); + printf("cnt = %d\en", cnt); /* A cancelation point */ + cnt++; + } + } + + pthread_cleanup_pop(cleanup_pop_arg); + return NULL; +} + +int +main(int argc, char *argv[]) +{ + pthread_t thr; + int s; + void *res; + + s = pthread_create(&thr, NULL, thread_start, NULL); + if (s != 0) + handle_error_en(s, "pthread_create"); + + sleep(2); /* Allow new thread to run a while */ + + if (argc > 1) { + if (argc > 2) + cleanup_pop_arg = atoi(argv[2]); + done = 1; + + } else { + printf("Canceling thread\en"); + s = pthread_cancel(thr); + if (s != 0) + handle_error_en(s, "pthread_cancel"); + } + + s = pthread_join(thr, &res); + if (s != 0) + handle_error_en(s, "pthread_join"); + + if (res == PTHREAD_CANCELED) + printf("Thread was canceled; cnt = %d\en", cnt); + else + printf("Thread terminated normally; cnt = %d\en", cnt); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR pthread_cancel (3), +.BR pthread_cleanup_push_defer_np (3), +.BR pthread_setcancelstate (3), +.BR pthread_testcancel (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push_defer_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push_defer_np.3 new file mode 100644 index 00000000..964893e6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_cleanup_push_defer_np.3 @@ -0,0 +1,100 @@ +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_cleanup_push_defer_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np \- push and pop +thread cancelation clean-up handlers while saving cancelability type +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void pthread_cleanup_push_defer_np(void (*" routine ")(void *), void *" arg ); +.BI "void pthread_cleanup_pop_restore_np(int " execute ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_cleanup_push_defer_np (), +.BR pthread_cleanup_pop_defer_np (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +These functions are the same as +.BR pthread_cleanup_push (3) +and +.BR pthread_cleanup_pop (3), +except for the differences noted on this page. +.PP +Like +.BR pthread_cleanup_push (3), +.BR pthread_cleanup_push_defer_np () +pushes +.I routine +onto the thread's stack of cancelation clean-up handlers. +In addition, it also saves the thread's current cancelability type, +and sets the cancelability type to "deferred" (see +.BR pthread_setcanceltype (3)); +this ensures that cancelation clean-up will occur +even if the thread's cancelability type was "asynchronous" +before the call. +.PP +Like +.BR pthread_cleanup_pop (3), +.BR pthread_cleanup_pop_restore_np () +pops the top-most clean-up handler from the thread's +stack of cancelation clean-up handlers. +In addition, it restores the thread's cancelability +type to its value at the time of the matching +.BR pthread_cleanup_push_defer_np (). +.PP +The caller must ensure that calls to these +functions are paired within the same function, +and at the same lexical nesting level. +Other restrictions apply, as described in +.BR pthread_cleanup_push (3). +.PP +This sequence of calls: +.PP +.in +4n +.EX +pthread_cleanup_push_defer_np(routine, arg); +pthread_cleanup_pop_restore_np(execute); +.EE +.in +.PP +is equivalent to (but shorter and more efficient than): +.PP +.\" As far as I can see, LinuxThreads reverses the two substeps +.\" in the push and pop below. +.in +4n +.EX +int oldtype; + +pthread_cleanup_push(routine, arg); +pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); +\&... +pthread_setcanceltype(oldtype, NULL); +pthread_cleanup_pop(execute); +.EE +.in +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.0 +.SH SEE ALSO +.BR pthread_cancel (3), +.BR pthread_cleanup_push (3), +.BR pthread_setcancelstate (3), +.BR pthread_testcancel (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_create.3 b/upstream/opensuse-leap-15-6/man3/pthread_create.3 new file mode 100644 index 00000000..d2012305 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_create.3 @@ -0,0 +1,412 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_create 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_create \- create a new thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_create(pthread_t *restrict " thread , +.BI " const pthread_attr_t *restrict " attr , +.BI " void *(*" start_routine ")(void *)," +.BI " void *restrict " arg ); +.fi +.SH DESCRIPTION +The +.BR pthread_create () +function starts a new thread in the calling process. +The new thread starts execution by invoking +.IR start_routine (); +.I arg +is passed as the sole argument of +.IR start_routine (). +.PP +The new thread terminates in one of the following ways: +.IP \[bu] 3 +It calls +.BR pthread_exit (3), +specifying an exit status value that is available to another thread +in the same process that calls +.BR pthread_join (3). +.IP \[bu] +It returns from +.IR start_routine (). +This is equivalent to calling +.BR pthread_exit (3) +with the value supplied in the +.I return +statement. +.IP \[bu] +It is canceled (see +.BR pthread_cancel (3)). +.IP \[bu] +Any of the threads in the process calls +.BR exit (3), +or the main thread performs a return from +.IR main (). +This causes the termination of all threads in the process. +.PP +The +.I attr +argument points to a +.I pthread_attr_t +structure whose contents are used at thread creation time to +determine attributes for the new thread; +this structure is initialized using +.BR pthread_attr_init (3) +and related functions. +If +.I attr +is NULL, +then the thread is created with default attributes. +.PP +Before returning, a successful call to +.BR pthread_create () +stores the ID of the new thread in the buffer pointed to by +.IR thread ; +this identifier is used to refer to the thread +in subsequent calls to other pthreads functions. +.PP +The new thread inherits a copy of the creating thread's signal mask +.RB ( pthread_sigmask (3)). +The set of pending signals for the new thread is empty +.RB ( sigpending (2)). +The new thread does not inherit the creating thread's +alternate signal stack +.RB ( sigaltstack (2)). +.PP +The new thread inherits the calling thread's floating-point environment +.RB ( fenv (3)). +.PP +The initial value of the new thread's CPU-time clock is 0 +(see +.BR pthread_getcpuclockid (3)). +.\" CLOCK_THREAD_CPUTIME_ID in clock_gettime(2) +.SS Linux-specific details +The new thread inherits copies of the calling thread's capability sets +(see +.BR capabilities (7)) +and CPU affinity mask (see +.BR sched_setaffinity (2)). +.SH RETURN VALUE +On success, +.BR pthread_create () +returns 0; +on error, it returns an error number, and the contents of +.I *thread +are undefined. +.SH ERRORS +.TP +.B EAGAIN +Insufficient resources to create another thread. +.TP +.B EAGAIN +.\" NOTE! The following should match the description in fork(2) +A system-imposed limit on the number of threads was encountered. +There are a number of limits that may trigger this error: the +.B RLIMIT_NPROC +soft resource limit (set via +.BR setrlimit (2)), +which limits the number of processes and threads for a real user ID, +was reached; +the kernel's system-wide limit on the number of processes and threads, +.IR /proc/sys/kernel/threads\-max , +was reached (see +.BR proc (5)); +or the maximum number of PIDs, +.IR /proc/sys/kernel/pid_max , +was reached (see +.BR proc (5)). +.TP +.B EINVAL +Invalid settings in +.IR attr . +.TP +.\" FIXME . Test the following +.B EPERM +No permission to set the scheduling policy and parameters specified in +.IR attr . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_create () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +See +.BR pthread_self (3) +for further information on the thread ID returned in +.I *thread +by +.BR pthread_create (). +Unless real-time scheduling policies are being employed, +after a call to +.BR pthread_create (), +it is indeterminate which thread\[em]the caller or the new thread\[em]will +next execute. +.PP +A thread may either be +.I joinable +or +.IR detached . +If a thread is joinable, then another thread can call +.BR pthread_join (3) +to wait for the thread to terminate and fetch its exit status. +Only when a terminated joinable thread has been joined are +the last of its resources released back to the system. +When a detached thread terminates, +its resources are automatically released back to the system: +it is not possible to join with the thread in order to obtain +its exit status. +Making a thread detached is useful for some types of daemon threads +whose exit status the application does not need to care about. +By default, a new thread is created in a joinable state, unless +.I attr +was set to create the thread in a detached state (using +.BR pthread_attr_setdetachstate (3)). +.PP +Under the NPTL threading implementation, if the +.B RLIMIT_STACK +soft resource limit +.I at the time the program started +has any value other than "unlimited", +then it determines the default stack size of new threads. +Using +.BR pthread_attr_setstacksize (3), +the stack size attribute can be explicitly set in the +.I attr +argument used to create a thread, +in order to obtain a stack size other than the default. +If the +.B RLIMIT_STACK +resource limit is set to "unlimited", +a per-architecture value is used for the stack size. +Here is the value for a few architectures: +.RS +.TS +allbox; +lb lb +l r. +Architecture Default stack size +i386 2 MB +IA-64 32 MB +PowerPC 4 MB +S/390 2 MB +Sparc-32 2 MB +Sparc-64 4 MB +x86_64 2 MB +.TE +.RE +.SH BUGS +In the obsolete LinuxThreads implementation, +each of the threads in a process has a different process ID. +This is in violation of the POSIX threads specification, +and is the source of many other nonconformances to the standard; see +.BR pthreads (7). +.SH EXAMPLES +The program below demonstrates the use of +.BR pthread_create (), +as well as a number of other functions in the pthreads API. +.PP +In the following run, +on a system providing the NPTL threading implementation, +the stack size defaults to the value given by the +"stack size" resource limit: +.PP +.in +4n +.EX +.RB "$" " ulimit \-s" +8192 # The stack size limit is 8 MB (0x800000 bytes) +.RB "$" " ./a.out hola salut servus" +Thread 1: top of stack near 0xb7dd03b8; argv_string=hola +Thread 2: top of stack near 0xb75cf3b8; argv_string=salut +Thread 3: top of stack near 0xb6dce3b8; argv_string=servus +Joined with thread 1; returned value was HOLA +Joined with thread 2; returned value was SALUT +Joined with thread 3; returned value was SERVUS +.EE +.in +.PP +In the next run, the program explicitly sets a stack size of 1\ MB (using +.BR pthread_attr_setstacksize (3)) +for the created threads: +.PP +.in +4n +.EX +.RB "$" " ./a.out \-s 0x100000 hola salut servus" +Thread 1: top of stack near 0xb7d723b8; argv_string=hola +Thread 2: top of stack near 0xb7c713b8; argv_string=salut +Thread 3: top of stack near 0xb7b703b8; argv_string=servus +Joined with thread 1; returned value was HOLA +Joined with thread 2; returned value was SALUT +Joined with thread 3; returned value was SERVUS +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_create.c) +.EX +#include +#include +#include +#include +#include +#include +#include + +#define handle_error_en(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) + +#define handle_error(msg) \e + do { perror(msg); exit(EXIT_FAILURE); } while (0) + +struct thread_info { /* Used as argument to thread_start() */ + pthread_t thread_id; /* ID returned by pthread_create() */ + int thread_num; /* Application\-defined thread # */ + char *argv_string; /* From command\-line argument */ +}; + +/* Thread start function: display address near top of our stack, + and return upper\-cased copy of argv_string. */ + +static void * +thread_start(void *arg) +{ + struct thread_info *tinfo = arg; + char *uargv; + + printf("Thread %d: top of stack near %p; argv_string=%s\en", + tinfo\->thread_num, (void *) &tinfo, tinfo\->argv_string); + + uargv = strdup(tinfo\->argv_string); + if (uargv == NULL) + handle_error("strdup"); + + for (char *p = uargv; *p != \[aq]\e0\[aq]; p++) + *p = toupper(*p); + + return uargv; +} + +int +main(int argc, char *argv[]) +{ + int s, opt; + void *res; + size_t num_threads; + ssize_t stack_size; + pthread_attr_t attr; + struct thread_info *tinfo; + + /* The "\-s" option specifies a stack size for our threads. */ + + stack_size = \-1; + while ((opt = getopt(argc, argv, "s:")) != \-1) { + switch (opt) { + case \[aq]s\[aq]: + stack_size = strtoul(optarg, NULL, 0); + break; + + default: + fprintf(stderr, "Usage: %s [\-s stack\-size] arg...\en", + argv[0]); + exit(EXIT_FAILURE); + } + } + + num_threads = argc \- optind; + + /* Initialize thread creation attributes. */ + + s = pthread_attr_init(&attr); + if (s != 0) + handle_error_en(s, "pthread_attr_init"); + + if (stack_size > 0) { + s = pthread_attr_setstacksize(&attr, stack_size); + if (s != 0) + handle_error_en(s, "pthread_attr_setstacksize"); + } + + /* Allocate memory for pthread_create() arguments. */ + + tinfo = calloc(num_threads, sizeof(*tinfo)); + if (tinfo == NULL) + handle_error("calloc"); + + /* Create one thread for each command\-line argument. */ + + for (size_t tnum = 0; tnum < num_threads; tnum++) { + tinfo[tnum].thread_num = tnum + 1; + tinfo[tnum].argv_string = argv[optind + tnum]; + + /* The pthread_create() call stores the thread ID into + corresponding element of tinfo[]. */ + + s = pthread_create(&tinfo[tnum].thread_id, &attr, + &thread_start, &tinfo[tnum]); + if (s != 0) + handle_error_en(s, "pthread_create"); + } + + /* Destroy the thread attributes object, since it is no + longer needed. */ + + s = pthread_attr_destroy(&attr); + if (s != 0) + handle_error_en(s, "pthread_attr_destroy"); + + /* Now join with each thread, and display its returned value. */ + + for (size_t tnum = 0; tnum < num_threads; tnum++) { + s = pthread_join(tinfo[tnum].thread_id, &res); + if (s != 0) + handle_error_en(s, "pthread_join"); + + printf("Joined with thread %d; returned value was %s\en", + tinfo[tnum].thread_num, (char *) res); + free(res); /* Free memory allocated by thread */ + } + + free(tinfo); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR getrlimit (2), +.BR pthread_attr_init (3), +.BR pthread_cancel (3), +.BR pthread_detach (3), +.BR pthread_equal (3), +.BR pthread_exit (3), +.BR pthread_getattr_np (3), +.BR pthread_join (3), +.BR pthread_self (3), +.BR pthread_setattr_default_np (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_detach.3 b/upstream/opensuse-leap-15-6/man3/pthread_detach.3 new file mode 100644 index 00000000..f014a7e6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_detach.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_detach 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_detach \- detach a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_detach(pthread_t " thread ); +.fi +.SH DESCRIPTION +The +.BR pthread_detach () +function marks the thread identified by +.I thread +as detached. +When a detached thread terminates, +its resources are automatically released back to the system without +the need for another thread to join with the terminated thread. +.PP +Attempting to detach an already detached thread results +in unspecified behavior. +.SH RETURN VALUE +On success, +.BR pthread_detach () +returns 0; +on error, it returns an error number. +.SH ERRORS +.TP +.B EINVAL +.I thread +is not a joinable thread. +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_detach () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Once a thread has been detached, it can't be joined with +.BR pthread_join (3) +or be made joinable again. +.PP +A new thread can be created in a detached state using +.BR pthread_attr_setdetachstate (3) +to set the detached attribute of the +.I attr +argument of +.BR pthread_create (3). +.PP +The detached attribute merely determines the behavior of the system +when the thread terminates; +it does not prevent the thread from being terminated +if the process terminates using +.BR exit (3) +(or equivalently, if the main thread returns). +.PP +Either +.BR pthread_join (3) +or +.BR pthread_detach () +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 +The following statement detaches the calling thread: +.PP +.in +4n +.EX +pthread_detach(pthread_self()); +.EE +.in +.SH SEE ALSO +.BR pthread_attr_setdetachstate (3), +.BR pthread_cancel (3), +.BR pthread_create (3), +.BR pthread_exit (3), +.BR pthread_join (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_equal.3 b/upstream/opensuse-leap-15-6/man3/pthread_equal.3 new file mode 100644 index 00000000..51d34df6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_equal.3 @@ -0,0 +1,60 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_equal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_equal \- compare thread IDs +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_equal(pthread_t " t1 ", pthread_t " t2 ); +.fi +.SH DESCRIPTION +The +.BR pthread_equal () +function compares two thread identifiers. +.SH RETURN VALUE +If the two thread IDs are equal, +.BR pthread_equal () +returns a nonzero value; otherwise, it returns 0. +.SH ERRORS +This function always succeeds. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_equal () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The +.BR pthread_equal () +function is necessary because thread IDs should be considered opaque: +there is no portable way for applications to directly compare two +.I pthread_t +values. +.SH SEE ALSO +.BR pthread_create (3), +.BR pthread_self (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_exit.3 b/upstream/opensuse-leap-15-6/man3/pthread_exit.3 new file mode 100644 index 00000000..69242bdf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_exit.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_exit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_exit \- terminate calling thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[noreturn]] void pthread_exit(void *" retval ); +.fi +.SH DESCRIPTION +The +.BR pthread_exit () +function terminates the calling thread and returns a value via +.I retval +that (if the thread is joinable) +is available to another thread in the same process that calls +.BR pthread_join (3). +.PP +Any clean-up handlers established by +.BR pthread_cleanup_push (3) +that have not yet been popped, +are popped (in the reverse of the order in which they were pushed) +and executed. +If the thread has any thread-specific data, then, +after the clean-up handlers have been executed, +the corresponding destructor functions are called, +in an unspecified order. +.PP +When a thread terminates, +process-shared resources (e.g., mutexes, condition variables, +semaphores, and file descriptors) are not released, +and functions registered using +.BR atexit (3) +are not called. +.PP +After the last thread in a process terminates, +the process terminates as by calling +.BR exit (3) +with an exit status of zero; +thus, process-shared resources +are released and functions registered using +.BR atexit (3) +are called. +.SH RETURN VALUE +This function does not return to the caller. +.SH ERRORS +This function always succeeds. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_exit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Performing a return from the start function of any thread other +than the main thread results in an implicit call to +.BR pthread_exit (), +using the function's return value as the thread's exit status. +.PP +To allow other threads to continue execution, +the main thread should terminate by calling +.BR pthread_exit () +rather than +.BR exit (3). +.PP +The value pointed to by +.I retval +should not be located on the calling thread's stack, +since the contents of that stack are undefined after the thread terminates. +.SH BUGS +Currently, +.\" Linux 2.6.27 +there are limitations in the kernel implementation logic for +.BR wait (2)ing +on a stopped thread group with a dead thread group leader. +This can manifest in problems such as a locked terminal if a stop signal is +sent to a foreground process whose thread group leader has already called +.BR pthread_exit (). +.\" 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 +.SH SEE ALSO +.BR pthread_create (3), +.BR pthread_join (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_getattr_default_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_getattr_default_np.3 new file mode 100644 index 00000000..3ae3e214 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_getattr_default_np.3 @@ -0,0 +1,195 @@ +'\" t +.\" Copyright (c) 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_getattr_default_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_getattr_default_np, pthread_setattr_default_np, \- +get or set default thread-creation attributes +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_getattr_default_np(pthread_attr_t *" attr ); +.BI "int pthread_setattr_default_np(const pthread_attr_t *" attr ); +.fi +.SH DESCRIPTION +The +.BR pthread_setattr_default_np () +function sets the default attributes used for creation of a new +thread\[em]that is, the attributes that are used when +.BR pthread_create (3) +is called with a second argument that is NULL. +The default attributes are set using the attributes supplied in +.IR *attr , +a previously initialized thread attributes object. +Note the following details about the supplied attributes object: +.IP \[bu] 3 +The attribute settings in the object must be valid. +.IP \[bu] +The +.I stack address +attribute must not be set in the object. +.IP \[bu] +Setting the +.I stack size +attribute to zero means leave the default stack size unchanged. +.PP +The +.BR pthread_getattr_default_np () +function initializes the thread attributes object referred to by +.I attr +so that it contains the default attributes used for thread creation. +.SH ERRORS +.TP +.B EINVAL +.RB ( pthread_setattr_default_np ()) +One of the attribute settings in +.I attr +is invalid, or the stack address attribute is set in +.IR attr . +.TP +.B ENOMEM +.\" Can happen (but unlikely) while trying to allocate memory for cpuset +.RB ( pthread_setattr_default_np ()) +Insufficient memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_getattr_default_np (), +.BR pthread_setattr_default_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in their names. +.SH HISTORY +glibc 2.18. +.SH EXAMPLES +The program below uses +.BR pthread_getattr_default_np () +to fetch the default thread-creation attributes and then displays +various settings from the returned thread attributes object. +When running the program, we see the following output: +.PP +.in +4n +.EX +$ \fB./a.out\fP +Stack size: 8388608 +Guard size: 4096 +Scheduling policy: SCHED_OTHER +Scheduling priority: 0 +Detach state: JOINABLE +Inherit scheduler: INHERIT +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_getattr_default_np.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +static void +display_pthread_attr(pthread_attr_t *attr) +{ + int s; + size_t stacksize; + size_t guardsize; + int policy; + struct sched_param schedparam; + int detachstate; + int inheritsched; + + s = pthread_attr_getstacksize(attr, &stacksize); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getstacksize"); + printf("Stack size: %zd\en", stacksize); + + s = pthread_attr_getguardsize(attr, &guardsize); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getguardsize"); + printf("Guard size: %zd\en", guardsize); + + s = pthread_attr_getschedpolicy(attr, &policy); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getschedpolicy"); + printf("Scheduling policy: %s\en", + (policy == SCHED_FIFO) ? "SCHED_FIFO" : + (policy == SCHED_RR) ? "SCHED_RR" : + (policy == SCHED_OTHER) ? "SCHED_OTHER" : "[unknown]"); + + s = pthread_attr_getschedparam(attr, &schedparam); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getschedparam"); + printf("Scheduling priority: %d\en", schedparam.sched_priority); + + s = pthread_attr_getdetachstate(attr, &detachstate); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getdetachstate"); + printf("Detach state: %s\en", + (detachstate == PTHREAD_CREATE_DETACHED) ? "DETACHED" : + (detachstate == PTHREAD_CREATE_JOINABLE) ? "JOINABLE" : + "???"); + + s = pthread_attr_getinheritsched(attr, &inheritsched); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getinheritsched"); + printf("Inherit scheduler: %s\en", + (inheritsched == PTHREAD_INHERIT_SCHED) ? "INHERIT" : + (inheritsched == PTHREAD_EXPLICIT_SCHED) ? "EXPLICIT" : + "???"); +} + +int +main(void) +{ + int s; + pthread_attr_t attr; + + s = pthread_getattr_default_np(&attr); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_getattr_default_np"); + + display_pthread_attr(&attr); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_getaffinity_np (3), +.BR pthread_attr_getdetachstate (3), +.BR pthread_attr_getguardsize (3), +.BR pthread_attr_getinheritsched (3), +.BR pthread_attr_getschedparam (3), +.BR pthread_attr_getschedpolicy (3), +.BR pthread_attr_getscope (3), +.BR pthread_attr_getstack (3), +.BR pthread_attr_getstackaddr (3), +.BR pthread_attr_getstacksize (3), +.BR pthread_attr_init (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_getattr_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_getattr_np.3 new file mode 100644 index 00000000..728d3d91 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_getattr_np.3 @@ -0,0 +1,359 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_getattr_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_getattr_np \- get attributes of created thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_getattr_np(pthread_t " thread ", pthread_attr_t *" attr ); +.fi +.SH DESCRIPTION +The +.BR pthread_getattr_np () +function initializes the thread attributes object referred to by +.I attr +so that it contains actual attribute values describing the running thread +.IR thread . +.PP +The returned attribute values may differ from +the corresponding attribute values passed in the +.I attr +object that was used to create the thread using +.BR pthread_create (3). +In particular, the following attributes may differ: +.IP \[bu] 3 +the detach state, since a joinable thread may have detached itself +after creation; +.IP \[bu] +the stack size, +which the implementation may align to a suitable boundary. +.IP \[bu] +and the guard size, +which the implementation may round upward to a multiple of the page size, +or ignore (i.e., treat as 0), +if the application is allocating its own stack. +.PP +Furthermore, if the stack address attribute was not set +in the thread attributes object used to create the thread, +then the returned thread attributes object will report the actual +stack address that the implementation selected for the thread. +.PP +When the thread attributes object returned by +.BR pthread_getattr_np () +is no longer required, it should be destroyed using +.BR pthread_attr_destroy (3). +.SH RETURN VALUE +On success, this function returns 0; +on error, it returns a nonzero error number. +.SH ERRORS +.TP +.B ENOMEM +.\" Can happen (but unlikely) while trying to allocate memory for cpuset +Insufficient memory. +.PP +In addition, if +.I thread +refers to the main thread, then +.BR pthread_getattr_np () +can fail because of errors from various underlying calls: +.BR fopen (3), +if +.I /proc/self/maps +can't be opened; +and +.BR getrlimit (2), +if the +.B RLIMIT_STACK +resource limit is not supported. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_getattr_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the name. +.SH HISTORY +glibc 2.2.3. +.SH EXAMPLES +The program below demonstrates the use of +.BR pthread_getattr_np (). +The program creates a thread that then uses +.BR pthread_getattr_np () +to retrieve and display its guard size, stack address, +and stack size attributes. +Command-line arguments can be used to set these attributes +to values other than the default when creating the thread. +The shell sessions below demonstrate the use of the program. +.PP +In the first run, on an x86-32 system, +a thread is created using default attributes: +.PP +.in +4n +.EX +.RB "$" " ulimit \-s" " # No stack limit ==> default stack size is 2 MB" +unlimited +.RB "$" " ./a.out" +Attributes of created thread: + Guard size = 4096 bytes + Stack address = 0x40196000 (EOS = 0x40397000) + Stack size = 0x201000 (2101248) bytes +.EE +.in +.PP +In the following run, we see that if a guard size is specified, +it is rounded up to the next multiple of the system page size +(4096 bytes on x86-32): +.PP +.in +4n +.EX +.RB "$" " ./a.out \-g 4097" +Thread attributes object after initializations: + Guard size = 4097 bytes + Stack address = (nil) + Stack size = 0x0 (0) bytes + +Attributes of created thread: + Guard size = 8192 bytes + Stack address = 0x40196000 (EOS = 0x40397000) + Stack size = 0x201000 (2101248) bytes +.EE +.in +.\".in +4n +.\".nf +.\"$ ./a.out \-s 0x8000 +.\"Thread attributes object after initializations: +.\" Guard size = 4096 bytes +.\" Stack address = 0xffff8000 (EOS = (nil)) +.\" Stack size = 0x8000 (32768) bytes +.\" +.\"Attributes of created thread: +.\" Guard size = 4096 bytes +.\" Stack address = 0x4001e000 (EOS = 0x40026000) +.\" Stack size = 0x8000 (32768) bytes +.\".fi +.\".in +.PP +In the last run, the program manually allocates a stack for the thread. +In this case, the guard size attribute is ignored. +.PP +.in +4n +.EX +.RB "$" " ./a.out \-g 4096 \-s 0x8000 \-a" +Allocated thread stack at 0x804d000 + +Thread attributes object after initializations: + Guard size = 4096 bytes + Stack address = 0x804d000 (EOS = 0x8055000) + Stack size = 0x8000 (32768) bytes + +Attributes of created thread: + Guard size = 0 bytes + Stack address = 0x804d000 (EOS = 0x8055000) + Stack size = 0x8000 (32768) bytes +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_getattr_np.c) +.EX +#define _GNU_SOURCE /* To get pthread_getattr_np() declaration */ +#include +#include +#include +#include +#include +#include + +static void +display_stack_related_attributes(pthread_attr_t *attr, char *prefix) +{ + int s; + size_t stack_size, guard_size; + void *stack_addr; + + s = pthread_attr_getguardsize(attr, &guard_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getguardsize"); + printf("%sGuard size = %zu bytes\en", prefix, guard_size); + + s = pthread_attr_getstack(attr, &stack_addr, &stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_getstack"); + printf("%sStack address = %p", prefix, stack_addr); + if (stack_size > 0) + printf(" (EOS = %p)", (char *) stack_addr + stack_size); + printf("\en"); + printf("%sStack size = %#zx (%zu) bytes\en", + prefix, stack_size, stack_size); +} + +static void +display_thread_attributes(pthread_t thread, char *prefix) +{ + int s; + pthread_attr_t attr; + + s = pthread_getattr_np(thread, &attr); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_getattr_np"); + + display_stack_related_attributes(&attr, prefix); + + s = pthread_attr_destroy(&attr); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_destroy"); +} + +static void * /* Start function for thread we create */ +thread_start(void *arg) +{ + printf("Attributes of created thread:\en"); + display_thread_attributes(pthread_self(), "\et"); + + exit(EXIT_SUCCESS); /* Terminate all threads */ +} + +static void +usage(char *pname, char *msg) +{ + if (msg != NULL) + fputs(msg, stderr); + fprintf(stderr, "Usage: %s [\-s stack\-size [\-a]]" + " [\-g guard\-size]\en", pname); + fprintf(stderr, "\et\et\-a means program should allocate stack\en"); + exit(EXIT_FAILURE); +} + +static pthread_attr_t * /* Get thread attributes from command line */ +get_thread_attributes_from_cl(int argc, char *argv[], + pthread_attr_t *attrp) +{ + int s, opt, allocate_stack; + size_t stack_size, guard_size; + void *stack_addr; + pthread_attr_t *ret_attrp = NULL; /* Set to attrp if we initialize + a thread attributes object */ + allocate_stack = 0; + stack_size = \-1; + guard_size = \-1; + + while ((opt = getopt(argc, argv, "ag:s:")) != \-1) { + switch (opt) { + case \[aq]a\[aq]: allocate_stack = 1; break; + case \[aq]g\[aq]: guard_size = strtoul(optarg, NULL, 0); break; + case \[aq]s\[aq]: stack_size = strtoul(optarg, NULL, 0); break; + default: usage(argv[0], NULL); + } + } + + if (allocate_stack && stack_size == \-1) + usage(argv[0], "Specifying \-a without \-s makes no sense\en"); + + if (argc > optind) + usage(argv[0], "Extraneous command\-line arguments\en"); + + if (stack_size >= 0 || guard_size > 0) { + ret_attrp = attrp; + + s = pthread_attr_init(attrp); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_init"); + } + + if (stack_size >= 0) { + if (!allocate_stack) { + s = pthread_attr_setstacksize(attrp, stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setstacksize"); + } else { + s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE), + stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "posix_memalign"); + printf("Allocated thread stack at %p\en\en", stack_addr); + + s = pthread_attr_setstack(attrp, stack_addr, stack_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setstacksize"); + } + } + + if (guard_size >= 0) { + s = pthread_attr_setguardsize(attrp, guard_size); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_setstacksize"); + } + + return ret_attrp; +} + +int +main(int argc, char *argv[]) +{ + int s; + pthread_t thr; + pthread_attr_t attr; + pthread_attr_t *attrp = NULL; /* Set to &attr if we initialize + a thread attributes object */ + + attrp = get_thread_attributes_from_cl(argc, argv, &attr); + + if (attrp != NULL) { + printf("Thread attributes object after initializations:\en"); + display_stack_related_attributes(attrp, "\et"); + printf("\en"); + } + + s = pthread_create(&thr, attrp, &thread_start, NULL); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_create"); + + if (attrp != NULL) { + s = pthread_attr_destroy(attrp); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_attr_destroy"); + } + + pause(); /* Terminates when other thread calls exit() */ +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR pthread_attr_getaffinity_np (3), +.BR pthread_attr_getdetachstate (3), +.BR pthread_attr_getguardsize (3), +.BR pthread_attr_getinheritsched (3), +.BR pthread_attr_getschedparam (3), +.BR pthread_attr_getschedpolicy (3), +.BR pthread_attr_getscope (3), +.BR pthread_attr_getstack (3), +.BR pthread_attr_getstackaddr (3), +.BR pthread_attr_getstacksize (3), +.BR pthread_attr_init (3), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_getcpuclockid.3 b/upstream/opensuse-leap-15-6/man3/pthread_getcpuclockid.3 new file mode 100644 index 00000000..2d353c7f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_getcpuclockid.3 @@ -0,0 +1,183 @@ +'\" t +.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_getcpuclockid 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_getcpuclockid \- retrieve ID of a thread's CPU time clock +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int pthread_getcpuclockid(pthread_t " thread ", clockid_t *" clockid ); +.fi +.SH DESCRIPTION +The +.BR pthread_getcpuclockid () +function obtains the ID of the CPU-time clock of the thread whose ID is +given in +.IR thread , +and returns it in the location pointed to by +.IR clockid . +.\" The clockid is constructed as follows: +.\" *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE) +.\" where CLOCK_IDFIELD_SIZE is 3. +.SH RETURN VALUE +On success, this function returns 0; +on error, it returns a nonzero error number. +.SH ERRORS +.TP +.B ENOENT +.\" CLOCK_THREAD_CPUTIME_ID not defined +Per-thread CPU time clocks are not supported by the system. +.\" +.\" 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). +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_getcpuclockid () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.SH NOTES +When +.I thread +refers to the calling thread, +this function returns an identifier that refers to the same clock +manipulated by +.BR clock_gettime (2) +and +.BR clock_settime (2) +when given the clock ID +.BR CLOCK_THREAD_CPUTIME_ID . +.SH EXAMPLES +The program below creates a thread and then uses +.BR clock_gettime (2) +to retrieve the total process CPU time, +and the per-thread CPU time consumed by the two threads. +The following shell session shows an example run: +.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 Program source +\& +.\" SRC BEGIN (pthread_getcpuclockid.c) +.EX +/* Link with "\-lrt" */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#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(void) +{ + 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 (unsigned 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 +.\" SRC END +.SH SEE ALSO +.BR clock_gettime (2), +.BR clock_settime (2), +.BR timer_create (2), +.BR clock_getcpuclockid (3), +.BR pthread_self (3), +.BR pthreads (7), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_join.3 b/upstream/opensuse-leap-15-6/man3/pthread_join.3 new file mode 100644 index 00000000..63f81e89 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_join.3 @@ -0,0 +1,137 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_join 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_join \- join with a terminated thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_join(pthread_t " thread ", void **" retval ); +.fi +.SH DESCRIPTION +The +.BR pthread_join () +function waits for the thread specified by +.I thread +to terminate. +If that thread has already terminated, then +.BR pthread_join () +returns immediately. +The thread specified by +.I thread +must be joinable. +.PP +If +.I retval +is not NULL, then +.BR pthread_join () +copies the exit status of the target thread +(i.e., the value that the target thread supplied to +.BR pthread_exit (3)) +into the location pointed to by +.IR retval . +If the target thread was canceled, then +.B PTHREAD_CANCELED +is placed in the location pointed to by +.IR retval . +.PP +If multiple threads simultaneously try to join with the same thread, +the results are undefined. +If the thread calling +.BR pthread_join () +is canceled, then the target thread will remain joinable +(i.e., it will not be detached). +.SH RETURN VALUE +On success, +.BR pthread_join () +returns 0; +on error, it returns an error number. +.SH ERRORS +.TP +.B EDEADLK +A deadlock was detected +.\" The following verified by testing on glibc 2.8/NPTL: +(e.g., two threads tried to join with each other); +or +.\" The following verified by testing on glibc 2.8/NPTL: +.I thread +specifies the calling thread. +.TP +.B EINVAL +.I thread +is not a joinable thread. +.TP +.B EINVAL +Another thread is already waiting to join with this thread. +.\" POSIX.1-2001 does not specify this error case. +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_join () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +After a successful call to +.BR pthread_join (), +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 +Joining with a thread that has previously been joined results in +undefined behavior. +.PP +Failure to join with a thread that is joinable +(i.e., one that is not detached), +produces a "zombie thread". +Avoid doing this, +since each zombie thread consumes some system resources, +and when enough zombie threads have accumulated, +it will no longer be possible to create new threads (or processes). +.PP +There is no pthreads analog of +.IR "waitpid(\-1,\ &status,\ 0)" , +that is, "join with any terminated thread". +If you believe you need this functionality, +you probably need to rethink your application design. +.PP +All of the threads in a process are peers: +any thread can join with any other thread in the process. +.SH EXAMPLES +See +.BR pthread_create (3). +.SH SEE ALSO +.BR pthread_cancel (3), +.BR pthread_create (3), +.BR pthread_detach (3), +.BR pthread_exit (3), +.BR pthread_tryjoin_np (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_kill.3 b/upstream/opensuse-leap-15-6/man3/pthread_kill.3 new file mode 100644 index 00000000..58129d9d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_kill.3 @@ -0,0 +1,111 @@ +'\" t +.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_kill 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_kill \- send a signal to a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_kill(pthread_t " thread ", int " sig ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_kill (): +.nf + _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500 +.fi +.SH DESCRIPTION +The +.BR pthread_kill () +function sends the signal +.I sig +to +.IR thread , +a thread in the same process as the caller. +The signal is asynchronously directed to +.IR thread . +.PP +If +.I sig +is 0, then no signal is sent, but error checking is still performed. +.SH RETURN VALUE +On success, +.BR pthread_kill () +returns 0; +on error, it returns an error number, and no signal is sent. +.SH ERRORS +.TP +.B EINVAL +An invalid signal was specified. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_kill () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The glibc implementation of +.BR pthread_kill () +gives an error +.RB ( EINVAL ) +on attempts to send either of the real-time signals +used internally by the NPTL threading implementation. +See +.BR nptl (7) +for details. +.PP +POSIX.1-2008 recommends that if an implementation detects the use +of a thread ID after the end of its lifetime, +.BR pthread_kill () +should return the error +.BR ESRCH . +The glibc implementation returns this error in the cases where +an invalid thread ID can be detected. +But note also that POSIX says that an attempt to use a thread ID whose +lifetime has ended produces undefined behavior, +and an attempt to use an invalid thread ID in a call to +.BR pthread_kill () +can, for example, cause a segmentation fault. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Signal dispositions are process-wide: +if a signal handler is installed, +the handler will be invoked in the thread +.IR thread , +but if the disposition of the signal is "stop", "continue", or "terminate", +this action will affect the whole process. +.SH SEE ALSO +.BR kill (2), +.BR sigaction (2), +.BR sigpending (2), +.BR pthread_self (3), +.BR pthread_sigmask (3), +.BR raise (3), +.BR pthreads (7), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_kill_other_threads_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_kill_other_threads_np.3 new file mode 100644 index 00000000..51117730 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_kill_other_threads_np.3 @@ -0,0 +1,72 @@ +'\" t +.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_kill_other_threads_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_kill_other_threads_np \- terminate all other threads in process +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void pthread_kill_other_threads_np(void); +.fi +.SH DESCRIPTION +.BR pthread_kill_other_threads_np () +has an effect only in the LinuxThreads threading implementation. +On that implementation, +calling this function causes the immediate termination of +all threads in the application, +except the calling thread. +The cancelation state and cancelation type of the +to-be-terminated threads are ignored, +and the cleanup handlers are not called in those threads. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_kill_other_threads_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +In the NPTL threading implementation, +.BR pthread_kill_other_threads_np () +exists, but does nothing. +(Nothing needs to be done, +because the implementation does the right thing during an +.BR execve (2).) +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the name. +.SH HISTORY +glibc 2.0 +.SH NOTES +.BR pthread_kill_other_threads_np () +is intended to be called just before a thread calls +.BR execve (2) +or a similar function. +This function is designed to address a limitation in the obsolete +LinuxThreads implementation whereby the other threads of an application +are not automatically terminated (as POSIX.1-2001 requires) during +.BR execve (2). +.SH SEE ALSO +.BR execve (2), +.BR pthread_cancel (3), +.BR pthread_setcancelstate (3), +.BR pthread_setcanceltype (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_mutex_consistent.3 b/upstream/opensuse-leap-15-6/man3/pthread_mutex_consistent.3 new file mode 100644 index 00000000..31804d20 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_mutex_consistent.3 @@ -0,0 +1,86 @@ +.\" Copyright (c) 2017, Yubin Ruan +.\" and Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutex_consistent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_mutex_consistent \- make a robust mutex consistent +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_mutex_consistent(pthread_mutex_t *" mutex ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_mutex_consistent (): +.nf + _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +This function makes a robust mutex consistent if it is in an inconsistent +state. +A mutex can be left in an inconsistent state if its owner terminates +while holding the mutex, in which case the next owner who acquires the +mutex will succeed and be notified by a return value of +.B EOWNERDEAD +from a call to +.BR pthread_mutex_lock (). +.SH RETURN VALUE +On success, +.IR pthread_mutex_consistent () +returns 0. +Otherwise, +it returns a positive error number to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The mutex is either not robust or is not in an inconsistent state. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.12. +POSIX.1-2008. +.PP +Before the addition of +.BR pthread_mutex_consistent () +to POSIX, +glibc defined the following equivalent nonstandard function if +.B _GNU_SOURCE +was defined: +.PP +.nf +.B [[deprecated]] +.BI "int pthread_mutex_consistent_np(const pthread_mutex_t *" mutex ); +.fi +.PP +This GNU-specific API, which first appeared in glibc 2.4, +is nowadays obsolete and should not be used in new programs; +since glibc 2.34 it has been marked as deprecated. +.SH NOTES +.BR pthread_mutex_consistent () +simply informs the implementation that the state (shared data) +guarded by the mutex has been restored to a consistent state and that +normal operations can now be performed with the mutex. +It is the application's responsibility to ensure that the +shared data has been restored to a consistent state before calling +.BR pthread_mutex_consistent (). +.SH EXAMPLES +See +.BR pthread_mutexattr_setrobust (3). +.SH SEE ALSO +.ad l +.nh +.BR pthread_mutex_lock (3), +.BR pthread_mutexattr_getrobust (3), +.BR pthread_mutexattr_init (3), +.BR pthread_mutexattr_setrobust (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_getpshared.3 b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_getpshared.3 new file mode 100644 index 00000000..cdab5bdf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_getpshared.3 @@ -0,0 +1,82 @@ +.\" Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutexattr_getpshared 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_mutexattr_getpshared, pthread_mutexattr_setpshared \- get/set +process-shared mutex attribute +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B int pthread_mutexattr_getpshared( +.BI " const pthread_mutexattr_t *restrict " attr , +.BI " int *restrict " pshared ); +.BI "int pthread_mutexattr_setpshared(pthread_mutexattr_t *" attr , +.BI " int " pshared ); +.fi +.SH DESCRIPTION +These functions get and set the process-shared attribute +in a mutex attributes object. +This attribute must be appropriately set to ensure correct, +efficient operation of a mutex created using this attributes object. +.PP +The process-shared attribute can have one of the following values: +.TP +.B PTHREAD_PROCESS_PRIVATE +Mutexes created with this attributes object are to be shared +only among threads in the same process that initialized the mutex. +This is the default value for the process-shared mutex attribute. +.TP +.B PTHREAD_PROCESS_SHARED +Mutexes created with this attributes object can be shared between +any threads that have access to the memory containing the object, +including threads in different processes. +.PP +.BR pthread_mutexattr_getpshared () +places the value of the process-shared attribute of +the mutex attributes object referred to by +.I attr +in the location pointed to by +.IR pshared . +.PP +.BR pthread_mutexattr_setpshared () +sets the value of the process-shared attribute of +the mutex attributes object referred to by +.I attr +to the value specified in +.BR pshared . +.PP +If +.I attr +does not refer to an initialized mutex attributes object, +the behavior is undefined. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return a positive error number. +.SH ERRORS +.BR pthread_mutexattr_setpshared () +can fail with the following errors: +.TP +.B EINVAL +The value specified in +.I pshared +is invalid. +.TP +.B ENOTSUP +.I pshared is +.B PTHREAD_PROCESS_SHARED +but the implementation does not support process-shared mutexes. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.ad l +.nh +.BR pthread_mutexattr_init (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_init.3 b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_init.3 new file mode 100644 index 00000000..e61993d2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_init.3 @@ -0,0 +1,53 @@ +.\" Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutexattr_init 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_mutexattr_init, pthread_mutexattr_destroy \- initialize and +destroy a mutex attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_mutexattr_init(pthread_mutexattr_t *" attr ");" +.BI "int pthread_mutexattr_destroy(pthread_mutexattr_t *" attr ");" +.fi +.SH DESCRIPTION +The +.BR pthread_mutexattr_init () +function initializes the mutex attributes object pointed to by +.I attr +with default values for all attributes defined by the implementation. +.PP +The results of initializing an already initialized mutex attributes +object are undefined. +.PP +The +.BR pthread_mutexattr_destroy () +function destroys a mutex attribute object (making it uninitialized). +Once a mutex attributes object has been destroyed, it can be reinitialized with +.BR pthread_mutexattr_init (). +.PP +The results of destroying an uninitialized mutex attributes +object are undefined. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return a positive error number. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +Subsequent changes to a mutex attributes object do not affect mutex that +have already been initialized using that object. +.SH SEE ALSO +.ad l +.nh +.BR pthread_mutex_init (3), +.BR pthread_mutexattr_getpshared (3), +.BR pthread_mutexattr_getrobust (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_setrobust.3 b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_setrobust.3 new file mode 100644 index 00000000..223755d7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_mutexattr_setrobust.3 @@ -0,0 +1,264 @@ +.\" Copyright (c) 2017, Yubin Ruan +.\" and Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_mutexattr_setrobust 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_mutexattr_getrobust, pthread_mutexattr_setrobust +\- get and set the robustness attribute of a mutex attributes object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_mutexattr_getrobust(const pthread_mutexattr_t *" attr , +.BI " int *" robustness ");" +.BI "int pthread_mutexattr_setrobust(pthread_mutexattr_t *" attr , +.BI " int " robustness ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_mutexattr_getrobust (), +.BR pthread_mutexattr_setrobust (): +.nf + _POSIX_C_SOURCE >= 200809L +.\" FIXME . +.\" But see https://sourceware.org/bugzilla/show_bug.cgi?id=22125 +.fi +.SH DESCRIPTION +The +.BR pthread_mutexattr_getrobust () +function places the value of the robustness attribute of +the mutex attributes object referred to by +.I attr +in +.IR *robustness . +The +.BR pthread_mutexattr_setrobust () +function sets the value of the robustness attribute of +the mutex attributes object referred to by +.I attr +to the value specified in +.IR *robustness . +.PP +The robustness attribute specifies the behavior of the mutex when +the owning thread dies without unlocking the mutex. +The following values are valid for +.IR robustness : +.TP +.B PTHREAD_MUTEX_STALLED +This is the default value for a mutex attributes object. +If a mutex is initialized with the +.B PTHREAD_MUTEX_STALLED +attribute and its owner dies without unlocking it, +the mutex remains locked afterwards and any future attempts to call +.BR pthread_mutex_lock (3) +on the mutex will block indefinitely. +.TP +.B PTHREAD_MUTEX_ROBUST +If a mutex is initialized with the +.B PTHREAD_MUTEX_ROBUST +attribute and its owner dies without unlocking it, +any future attempts to call +.BR pthread_mutex_lock (3) +on this mutex will succeed and return +.B EOWNERDEAD +to indicate that the original owner no longer exists and the mutex is in +an inconsistent state. +Usually after +.B EOWNERDEAD +is returned, the next owner should call +.BR pthread_mutex_consistent (3) +on the acquired mutex to make it consistent again before using it any further. +.IP +If the next owner unlocks the mutex using +.BR pthread_mutex_unlock (3) +before making it consistent, the mutex will be permanently unusable and any +subsequent attempts to lock it using +.BR pthread_mutex_lock (3) +will fail with the error +.BR ENOTRECOVERABLE . +The only permitted operation on such a mutex is +.BR pthread_mutex_destroy (3). +.IP +If the next owner terminates before calling +.BR pthread_mutex_consistent (3), +further +.BR pthread_mutex_lock (3) +operations on this mutex will still return +.BR EOWNERDEAD . +.PP +Note that the +.I attr +argument of +.BR pthread_mutexattr_getrobust () +and +.BR pthread_mutexattr_setrobust () +should refer to a mutex attributes object that was initialized by +.BR pthread_mutexattr_init (3), +otherwise the behavior is undefined. +.SH RETURN VALUE +On success, these functions return 0. +On error, they return a positive error number. +.PP +In the glibc implementation, +.BR pthread_mutexattr_getrobust () +always return zero. +.SH ERRORS +.TP +.B EINVAL +A value other than +.B PTHREAD_MUTEX_STALLED +or +.B PTHREAD_MUTEX_ROBUST +was passed to +.BR pthread_mutexattr_setrobust (). +.SH VERSIONS +In the Linux implementation, +when using process-shared robust mutexes, a waiting thread also receives the +.B EOWNERDEAD +notification if the owner of a robust mutex performs an +.BR execve (2) +without first unlocking the mutex. +POSIX.1 does not specify this detail, +but the same behavior also occurs in at least some +.\" E.g., Solaris, according to its manual page +other implementations. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.12. +POSIX.1-2008. +.PP +Before the addition of +.BR pthread_mutexattr_getrobust () +and +.BR pthread_mutexattr_setrobust () +to POSIX, +glibc defined the following equivalent nonstandard functions if +.B _GNU_SOURCE +was defined: +.PP +.nf +.B [[deprecated]] +.BI "int pthread_mutexattr_getrobust_np(const pthread_mutexattr_t *" attr , +.BI " int *" robustness ");" +.B [[deprecated]] +.BI "int pthread_mutexattr_setrobust_np(const pthread_mutexattr_t *" attr , +.BI " int " robustness ");" +.fi +.PP +Correspondingly, the constants +.B PTHREAD_MUTEX_STALLED_NP +and +.B PTHREAD_MUTEX_ROBUST_NP +were also defined. +.PP +These GNU-specific APIs, which first appeared in glibc 2.4, +are nowadays obsolete and should not be used in new programs; +since glibc 2.34 these APIs are marked as deprecated. +.SH EXAMPLES +The program below demonstrates the use of the robustness attribute of a +mutex attributes object. +In this program, a thread holding the mutex +dies prematurely without unlocking the mutex. +The main thread subsequently acquires the mutex +successfully and gets the error +.BR EOWNERDEAD , +after which it makes the mutex consistent. +.PP +The following shell session shows what we see when running this program: +.PP +.in +4n +.EX +$ \fB./a.out\fP +[original owner] Setting lock... +[original owner] Locked. Now exiting without unlocking. +[main] Attempting to lock the robust mutex. +[main] pthread_mutex_lock() returned EOWNERDEAD +[main] Now make the mutex consistent +[main] Mutex is now consistent; unlocking +.EE +.in +.SS Program source +.\" SRC BEGIN (pthread_mutexattr_setrobust.c) +.EX +#include +#include +#include +#include +#include + +#define handle_error_en(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) + +static pthread_mutex_t mtx; + +static void * +original_owner_thread(void *ptr) +{ + printf("[original owner] Setting lock...\en"); + pthread_mutex_lock(&mtx); + printf("[original owner] Locked. Now exiting without unlocking.\en"); + pthread_exit(NULL); +} + +int +main(void) +{ + pthread_t thr; + pthread_mutexattr_t attr; + int s; + + pthread_mutexattr_init(&attr); + + pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST); + + pthread_mutex_init(&mtx, &attr); + + pthread_create(&thr, NULL, original_owner_thread, NULL); + + sleep(2); + + /* "original_owner_thread" should have exited by now. */ + + printf("[main] Attempting to lock the robust mutex.\en"); + s = pthread_mutex_lock(&mtx); + if (s == EOWNERDEAD) { + printf("[main] pthread_mutex_lock() returned EOWNERDEAD\en"); + printf("[main] Now make the mutex consistent\en"); + s = pthread_mutex_consistent(&mtx); + if (s != 0) + handle_error_en(s, "pthread_mutex_consistent"); + printf("[main] Mutex is now consistent; unlocking\en"); + s = pthread_mutex_unlock(&mtx); + if (s != 0) + handle_error_en(s, "pthread_mutex_unlock"); + + exit(EXIT_SUCCESS); + } else if (s == 0) { + printf("[main] pthread_mutex_lock() unexpectedly succeeded\en"); + exit(EXIT_FAILURE); + } else { + printf("[main] pthread_mutex_lock() unexpectedly failed\en"); + handle_error_en(s, "pthread_mutex_lock"); + } +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR get_robust_list (2), +.BR set_robust_list (2), +.BR pthread_mutex_consistent (3), +.BR pthread_mutex_init (3), +.BR pthread_mutex_lock (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_rwlockattr_setkind_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_rwlockattr_setkind_np.3 new file mode 100644 index 00000000..d6bcc6d2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_rwlockattr_setkind_np.3 @@ -0,0 +1,119 @@ +.\"Copyright (c) 2010 Novell Inc., written by Robert Schweikert +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_rwlockattr_setkind_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_rwlockattr_setkind_np, pthread_rwlockattr_getkind_np \- set/get +the read-write lock kind of the thread read-write lock attribute object +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *" attr , +.BI " int " pref ); +.B int pthread_rwlockattr_getkind_np( +.BI " const pthread_rwlockattr_t *restrict " attr , +.BI " int *restrict " pref ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_rwlockattr_setkind_np (), +.BR pthread_rwlockattr_getkind_np (): +.nf + _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +The +.BR pthread_rwlockattr_setkind_np () +function sets the "lock kind" attribute of the +read-write lock attribute object referred to by +.I attr +to the value specified in +.IR pref . +The argument +.I pref +may be set to one of the following: +.TP +.B PTHREAD_RWLOCK_PREFER_READER_NP +This is the default. +A thread may hold multiple read locks; that is, read locks are recursive. +According to The Single Unix Specification, the behavior is unspecified when a +reader tries to place a lock, and there is no write lock but writers are +waiting. +Giving preference to the reader, as is set by +.BR PTHREAD_RWLOCK_PREFER_READER_NP , +implies that the reader will receive the requested lock, even if +a writer is waiting. +As long as there are readers, the writer will be +starved. +.TP +.B PTHREAD_RWLOCK_PREFER_WRITER_NP +This is intended as the write lock analog of +.BR PTHREAD_RWLOCK_PREFER_READER_NP . +This is ignored by glibc because the POSIX requirement to support +recursive read locks would cause this option to create trivial +deadlocks; instead use +.B PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP +which ensures the application developer will not take recursive +read locks thus avoiding deadlocks. +.\" --- +.\" Here is the relevant wording: +.\" +.\" A thread may hold multiple concurrent read locks on rwlock (that is, +.\" successfully call the pthread_rwlock_rdlock() function n times). If +.\" so, the thread must perform matching unlocks (that is, it must call +.\" the pthread_rwlock_unlock() function n times). +.\" +.\" By making write-priority work correctly, I broke the above requirement, +.\" because I had no clue that recursive read locks are permissible. +.\" +.\" If a thread which holds a read lock tries to acquire another read lock, +.\" and now one or more writers is waiting for a write lock, then the algorithm +.\" will lead to an obvious deadlock. The reader will be suspended, waiting for +.\" the writers to acquire and release the lock, and the writers will be +.\" suspended waiting for every existing read lock to be released. +.\" --- +.\" https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html +.\" https://sourceware.org/legacy-ml/libc-alpha/2000-01/msg00055.html +.\" https://sourceware.org/bugzilla/show_bug.cgi?id=7057 +.TP +.B PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP +Setting the lock kind to this +avoids writer starvation as long as any read locking is not done in a +recursive fashion. +.PP +The +.BR pthread_rwlockattr_getkind_np () +function returns the value of the lock kind attribute of the +read-write lock attribute object referred to by +.I attr +in the pointer +.IR pref . +.SH RETURN VALUE +On success, these functions return 0. +Given valid pointer arguments, +.BR pthread_rwlockattr_getkind_np () +always succeeds. +On error, +.BR pthread_rwlockattr_setkind_np () +returns a nonzero error number. +.SH ERRORS +.TP +.B EINVAL +.I pref +specifies an unsupported value. +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.1. +.SH SEE ALSO +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_self.3 b/upstream/opensuse-leap-15-6/man3/pthread_self.3 new file mode 100644 index 00000000..3562e39f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_self.3 @@ -0,0 +1,80 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_self 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_self \- obtain ID of the calling thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B pthread_t pthread_self(void); +.fi +.SH DESCRIPTION +The +.BR pthread_self () +function returns the ID of the calling thread. +This is the same value that is returned in +.I *thread +in the +.BR pthread_create (3) +call that created this thread. +.SH RETURN VALUE +This function always succeeds, returning the calling thread's ID. +.SH ERRORS +This function always succeeds. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_self () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +POSIX.1 allows an implementation wide freedom in choosing +the type used to represent a thread ID; +for example, representation using either an arithmetic type or +a structure is permitted. +Therefore, variables of type +.I pthread_t +can't portably be compared using the C equality operator (\fB==\fP); +use +.BR pthread_equal (3) +instead. +.PP +Thread identifiers should be considered opaque: +any attempt to use a thread ID other than in pthreads calls +is nonportable and can lead to unspecified results. +.PP +Thread IDs are guaranteed to be unique only within a process. +A thread ID may be reused after a terminated thread has been joined, +or a detached thread has terminated. +.PP +The thread ID returned by +.BR pthread_self () +is not the same thing as the kernel thread ID returned by a call to +.BR gettid (2). +.SH SEE ALSO +.BR pthread_create (3), +.BR pthread_equal (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setaffinity_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_setaffinity_np.3 new file mode 100644 index 00000000..9c2573ab --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setaffinity_np.3 @@ -0,0 +1,210 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setaffinity_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_setaffinity_np, pthread_getaffinity_np \- set/get +CPU affinity of a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_setaffinity_np(pthread_t " thread ", size_t " cpusetsize , +.BI " const cpu_set_t *" cpuset ); +.BI "int pthread_getaffinity_np(pthread_t " thread ", size_t " cpusetsize , +.BI " cpu_set_t *" cpuset ); +.fi +.SH DESCRIPTION +The +.BR pthread_setaffinity_np () +function +sets the CPU affinity mask of the thread +.I thread +to the CPU set pointed to by +.IR cpuset . +If the call is successful, +and the thread is not currently running on one of the CPUs in +.IR cpuset , +then it is migrated to one of those CPUs. +.PP +The +.BR pthread_getaffinity_np () +function returns the CPU affinity mask of the thread +.I thread +in the buffer pointed to by +.IR cpuset . +.PP +For more details on CPU affinity masks, see +.BR sched_setaffinity (2). +For a description of a set of macros +that can be used to manipulate and inspect CPU sets, see +.BR CPU_SET (3). +.PP +The argument +.I cpusetsize +is the length (in bytes) of the buffer pointed to by +.IR cpuset . +Typically, this argument would be specified as +.IR sizeof(cpu_set_t) . +(It may be some other value, if using the macros described in +.BR CPU_SET (3) +for dynamically allocating a CPU set.) +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +.TP +.B EFAULT +A supplied memory address was invalid. +.TP +.B EINVAL +.RB ( pthread_setaffinity_np ()) +The affinity bit mask +.I mask +contains no processors that are currently physically on the system +and permitted to the thread according to any restrictions that +may be imposed by the "cpuset" mechanism described in +.BR cpuset (7). +.TP +.B EINVAL +.RB ( pthread_setaffinity_np ()) +.I cpuset +specified a CPU that was outside the set supported by the kernel. +(The kernel configuration option +.B CONFIG_NR_CPUS +defines the range of the set supported by the kernel data type +.\" cpumask_t +used to represent CPU sets.) +.\" The raw sched_getaffinity() system call returns the size (in bytes) +.\" of the cpumask_t type. +.TP +.B EINVAL +.RB ( pthread_getaffinity_np ()) +.I cpusetsize +is smaller than the size of the affinity mask used by the kernel. +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setaffinity_np (), +.BR pthread_getaffinity_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.3.4. +.PP +In glibc 2.3.3 only, +versions of these functions were provided that did not have a +.I cpusetsize +argument. +Instead the CPU set size given to the underlying system calls was always +.IR sizeof(cpu_set_t) . +.SH NOTES +After a call to +.BR pthread_setaffinity_np (), +the set of CPUs on which the thread will actually run is +the intersection of the set specified in the +.I cpuset +argument and the set of CPUs actually present on the system. +The system may further restrict the set of CPUs on which the thread +runs if the "cpuset" mechanism described in +.BR cpuset (7) +is being used. +These restrictions on the actual set of CPUs on which the thread +will run are silently imposed by the kernel. +.PP +These functions are implemented on top of the +.BR sched_setaffinity (2) +and +.BR sched_getaffinity (2) +system calls. +.PP +A new thread created by +.BR pthread_create (3) +inherits a copy of its creator's CPU affinity mask. +.SH EXAMPLES +In the following program, the main thread uses +.BR pthread_setaffinity_np () +to set its CPU affinity mask to include CPUs 0 to 7 +(which may not all be available on the system), +and then calls +.BR pthread_getaffinity_np () +to check the resulting CPU affinity mask of the thread. +.PP +.\" SRC BEGIN (pthread_setaffinity_np.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +int +main(void) +{ + 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 (size_t j = 0; j < 8; j++) + CPU_SET(j, &cpuset); + + s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_setaffinity_np"); + + /* Check the actual affinity mask assigned to the thread. */ + + s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset); + if (s != 0) + errc(EXIT_FAILURE, s, "pthread_getaffinity_np"); + + printf("Set returned by pthread_getaffinity_np() contained:\en"); + for (size_t j = 0; j < CPU_SETSIZE; j++) + if (CPU_ISSET(j, &cpuset)) + printf(" CPU %zu\en", j); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR sched_setaffinity (2), +.BR CPU_SET (3), +.BR pthread_attr_setaffinity_np (3), +.BR pthread_self (3), +.BR sched_getcpu (3), +.BR cpuset (7), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setcancelstate.3 b/upstream/opensuse-leap-15-6/man3/pthread_setcancelstate.3 new file mode 100644 index 00000000..1cd469a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setcancelstate.3 @@ -0,0 +1,198 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setcancelstate 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_setcancelstate, pthread_setcanceltype \- +set cancelability state and type +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_setcancelstate(int " state ", int *" oldstate ); +.BI "int pthread_setcanceltype(int " type ", int *" oldtype ); +.fi +.SH DESCRIPTION +The +.BR pthread_setcancelstate () +sets the cancelability state of the calling thread to the value +given in +.IR state . +The previous cancelability state of the thread is returned +in the buffer pointed to by +.IR oldstate . +The +.I state +argument must have one of the following values: +.TP +.B PTHREAD_CANCEL_ENABLE +The thread is cancelable. +This is the default cancelability state in all new threads, +including the initial thread. +The thread's cancelability type determines when a cancelable thread +will respond to a cancelation request. +.TP +.B PTHREAD_CANCEL_DISABLE +The thread is not cancelable. +If a cancelation request is received, +it is blocked until cancelability is enabled. +.PP +The +.BR pthread_setcanceltype () +sets the cancelability type of the calling thread to the value +given in +.IR type . +The previous cancelability type of the thread is returned +in the buffer pointed to by +.IR oldtype . +The +.I type +argument must have one of the following values: +.TP +.B PTHREAD_CANCEL_DEFERRED +A cancelation request is deferred until the thread next calls +a function that is a cancelation point (see +.BR pthreads (7)). +This is the default cancelability type in all new threads, +including the initial thread. +.IP +Even with deferred cancelation, a +cancelation point in an asynchronous signal handler may still +be acted upon and the effect is as if it was an asynchronous +cancelation. +.TP +.B PTHREAD_CANCEL_ASYNCHRONOUS +The thread can be canceled at any time. +(Typically, +it will be canceled immediately upon receiving a cancelation request, +but the system doesn't guarantee this.) +.PP +The set-and-get operation performed by each of these functions +is atomic with respect to other threads in the process +calling the same function. +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +The +.BR pthread_setcancelstate () +can fail with the following error: +.TP +.B EINVAL +Invalid value for +.IR state . +.PP +The +.BR pthread_setcanceltype () +can fail with the following error: +.TP +.B EINVAL +Invalid value for +.IR type . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setcancelstate (), +.BR pthread_setcanceltype () +T} Thread safety T{ +MT-Safe +T} +T{ +.BR pthread_setcancelstate (), +.BR pthread_setcanceltype () +T} Async-cancel safety T{ +AC-Safe +T} +.TE +.hy +.ad +.sp 1 +.hy +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0 +POSIX.1-2001. +.SH NOTES +For details of what happens when a thread is canceled, see +.BR pthread_cancel (3). +.PP +Briefly disabling cancelability is useful +if a thread performs some critical action +that must not be interrupted by a cancelation request. +Beware of disabling cancelability for long periods, +or around operations that may block for long periods, +since that will render the thread unresponsive to cancelation requests. +.SS Asynchronous cancelability +Setting the cancelability type to +.B PTHREAD_CANCEL_ASYNCHRONOUS +is rarely useful. +Since the thread could be canceled at +.I any +time, it cannot safely reserve resources (e.g., allocating memory with +.BR malloc (3)), +acquire mutexes, semaphores, or locks, and so on. +Reserving resources is unsafe because the application has no way of +knowing what the state of these resources is when the thread is canceled; +that is, did cancelation occur before the resources were reserved, +while they were reserved, or after they were released? +Furthermore, some internal data structures +(e.g., the linked list of free blocks managed by the +.BR malloc (3) +family of functions) may be left in an inconsistent state +if cancelation occurs in the middle of the function call. +Consequently, clean-up handlers cease to be useful. +.PP +Functions that can be safely asynchronously canceled are called +.IR "async-cancel-safe functions" . +POSIX.1-2001 and POSIX.1-2008 require only that +.BR pthread_cancel (3), +.BR pthread_setcancelstate (), +and +.BR pthread_setcanceltype () +be async-cancel-safe. +In general, other library functions +can't be safely called from an asynchronously cancelable thread. +.PP +One of the few circumstances in which asynchronous cancelability is useful +is for cancelation of a thread that is in a pure compute-bound loop. +.SS Portability notes +The Linux threading implementations permit the +.I oldstate +argument of +.BR pthread_setcancelstate () +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 +.I oldstat +argument, +.\" It looks like at least Solaris, FreeBSD and Tru64 support this. +but POSIX.1 does not specify this point, +so portable applications should always specify a non-NULL value in +.IR oldstate . +A precisely analogous set of statements applies for the +.I oldtype +argument of +.BR pthread_setcanceltype (). +.SH EXAMPLES +See +.BR pthread_cancel (3). +.SH SEE ALSO +.BR pthread_cancel (3), +.BR pthread_cleanup_push (3), +.BR pthread_testcancel (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setconcurrency.3 b/upstream/opensuse-leap-15-6/man3/pthread_setconcurrency.3 new file mode 100644 index 00000000..4c34ca42 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setconcurrency.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright (c) 2009 Michael Kerrisk, +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setconcurrency 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_setconcurrency, pthread_getconcurrency \- set/get +the concurrency level +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_setconcurrency(int " new_level ); +.BI "int pthread_getconcurrency(" void ); +.fi +.SH DESCRIPTION +The +.BR pthread_setconcurrency () +function informs the implementation of the application's +desired concurrency level, specified in +.IR new_level . +The implementation takes this only as a hint: +POSIX.1 does not specify the level of concurrency that +should be provided as a result of calling +.BR pthread_setconcurrency (). +.PP +Specifying +.I new_level +as 0 instructs the implementation to manage the concurrency level +as it deems appropriate. +.PP +.BR pthread_getconcurrency () +returns the current value of the concurrency level for this process. +.SH RETURN VALUE +On success, +.BR pthread_setconcurrency () +returns 0; +on error, it returns a nonzero error number. +.PP +.BR pthread_getconcurrency () +always succeeds, returning the concurrency level set by a previous call to +.BR pthread_setconcurrency (), +or 0, if +.BR pthread_setconcurrency () +has not previously been called. +.SH ERRORS +.BR pthread_setconcurrency () +can fail with the following error: +.TP +.B EINVAL +.I new_level +is negative. +.PP +POSIX.1 also documents an +.B EAGAIN +error ("the value specified by +.I new_level +would cause a system resource to be exceeded"). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setconcurrency (), +.BR pthread_getconcurrency () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH NOTES +The default concurrency level is 0. +.PP +Concurrency levels are meaningful only for M:N threading implementations, +where at any moment a subset of a process's set of user-level threads +may be bound to a smaller number of kernel-scheduling entities. +Setting the concurrency level allows the application to +give the system a hint as to the number of kernel-scheduling entities +that should be provided for efficient execution of the application. +.PP +Both LinuxThreads and NPTL are 1:1 threading implementations, +so setting the concurrency level has no meaning. +In other words, +on Linux these functions merely exist for compatibility with other systems, +and they have no effect on the execution of a program. +.SH SEE ALSO +.BR pthread_attr_setscope (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setname_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_setname_np.3 new file mode 100644 index 00000000..658d67fd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setname_np.3 @@ -0,0 +1,205 @@ +'\" t +.\" Copyright (C) 2012 Chandan Apsangi +.\" and Copyright (C) 2013 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setname_np 3 2023-04-03 "Linux man-pages 6.04" +.SH NAME +pthread_setname_np, pthread_getname_np \- set/get the name of a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_setname_np(pthread_t " thread ", const char *" name ); +.BI "int pthread_getname_np(pthread_t " thread ", char " name [. size "], \ +size_t " size ); +.fi +.SH DESCRIPTION +By default, all the threads created using +.BR pthread_create () +inherit the program name. +The +.BR pthread_setname_np () +function can be used to set a unique name for a thread, +which can be useful for debugging +multithreaded applications. +The thread name is a meaningful C language string, +whose length is restricted to 16 characters, +including the terminating null byte (\[aq]\e0\[aq]). +The +.I thread +argument specifies the thread whose name is to be changed; +.I name +specifies the new name. +.PP +The +.BR pthread_getname_np () +function can be used to retrieve the name of the thread. +The +.I thread +argument specifies the thread whose name is to be retrieved. +The buffer +.I name +is used to return the thread name; +.I size +specifies the number of bytes available in +.IR name . +The buffer specified by +.I name +should be at least 16 characters in length. +The returned thread name in the output buffer will be null terminated. +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +.SH ERRORS +The +.BR pthread_setname_np () +function can fail with the following error: +.TP +.B ERANGE +The length of the string specified pointed to by +.I name +exceeds the allowed limit. +.PP +The +.BR pthread_getname_np () +function can fail with the following error: +.TP +.B ERANGE +The buffer specified by +.I name +and +.I size +is too small to hold the thread name. +.PP +If either of these functions fails to open +.IR /proc/self/task/ tid /comm , +then the call may fail with one of the errors described in +.BR open (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setname_np (), +.BR pthread_getname_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.12. +.SH NOTES +.BR pthread_setname_np () +internally writes to the thread-specific +.I comm +file under the +.I /proc +filesystem: +.IR /proc/self/task/ tid /comm . +.BR pthread_getname_np () +retrieves it from the same location. +.SH EXAMPLES +The program below demonstrates the use of +.BR pthread_setname_np () +and +.BR pthread_getname_np (). +.PP +The following shell session shows a sample run of the program: +.PP +.in +4n +.EX +.RB "$" " ./a.out" +Created a thread. Default name is: a.out +The thread name after setting it is THREADFOO. +\fB\[ha]Z\fP # Suspend the program +[1]+ Stopped ./a.out +.RB "$ " "ps H \-C a.out \-o \[aq]pid tid cmd comm\[aq]" + PID TID CMD COMMAND + 5990 5990 ./a.out a.out + 5990 5991 ./a.out THREADFOO +.RB "$ " "cat /proc/5990/task/5990/comm" +a.out +.RB "$ " "cat /proc/5990/task/5991/comm" +THREADFOO +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_setname_np.c) +.EX +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include + +#define NAMELEN 16 + +static void * +threadfunc(void *parm) +{ + sleep(5); // allow main program to set the thread name + return NULL; +} + +int +main(int argc, char *argv[]) +{ + pthread_t thread; + int rc; + char thread_name[NAMELEN]; + + rc = pthread_create(&thread, NULL, threadfunc, NULL); + if (rc != 0) + errc(EXIT_FAILURE, rc, "pthread_create"); + + rc = pthread_getname_np(thread, thread_name, NAMELEN); + if (rc != 0) + errc(EXIT_FAILURE, rc, "pthread_getname_np"); + + printf("Created a thread. Default name is: %s\en", thread_name); + rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : "THREADFOO"); + if (rc != 0) + errc(EXIT_FAILURE, rc, "pthread_setname_np"); + + sleep(2); + + rc = pthread_getname_np(thread, thread_name, NAMELEN); + if (rc != 0) + errc(EXIT_FAILURE, rc, "pthread_getname_np"); + printf("The thread name after setting it is %s.\en", thread_name); + + rc = pthread_join(thread, NULL); + if (rc != 0) + errc(EXIT_FAILURE, rc, "pthread_join"); + + printf("Done\en"); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR prctl (2), +.BR pthread_create (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setschedparam.3 b/upstream/opensuse-leap-15-6/man3/pthread_setschedparam.3 new file mode 100644 index 00000000..c68f268a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setschedparam.3 @@ -0,0 +1,450 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setschedparam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_setschedparam, pthread_getschedparam \- set/get +scheduling policy and parameters of a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_setschedparam(pthread_t " thread ", int " policy , +.BI " const struct sched_param *" param ); +.BI "int pthread_getschedparam(pthread_t " thread ", int *restrict " policy , +.BI " struct sched_param *restrict " param ); +.fi +.SH DESCRIPTION +The +.BR pthread_setschedparam () +function sets the scheduling policy and parameters of the thread +.IR thread . +.PP +.I policy +specifies the new scheduling policy for +.IR thread . +The supported values for +.IR policy , +and their semantics, are described in +.BR sched (7). +.\" 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 +.PP +The structure pointed to by +.I param +specifies the new scheduling parameters for +.IR thread . +Scheduling parameters are maintained in the following structure: +.PP +.in +4n +.EX +struct sched_param { + int sched_priority; /* Scheduling priority */ +}; +.EE +.in +.PP +As can be seen, only one scheduling parameter is supported. +For details of the permitted ranges for scheduling priorities +in each scheduling policy, see +.BR sched (7). +.PP +The +.BR pthread_getschedparam () +function returns the scheduling policy and parameters of the thread +.IR thread , +in the buffers pointed to by +.I policy +and +.IR param , +respectively. +The returned priority value is that set by the most recent +.BR pthread_setschedparam (), +.BR pthread_setschedprio (3), +or +.BR pthread_create (3) +call that affected +.IR thread . +The returned priority does not reflect any temporary priority adjustments +as a result of calls to any priority inheritance or +priority ceiling functions (see, for example, +.BR pthread_mutexattr_setprioceiling (3) +and +.BR pthread_mutexattr_setprotocol (3)). +.\" FIXME . nptl/pthread_setschedparam.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. +.SH RETURN VALUE +On success, these functions return 0; +on error, they return a nonzero error number. +If +.BR pthread_setschedparam () +fails, the scheduling policy and parameters of +.I thread +are not changed. +.SH ERRORS +Both of these functions can fail with the following error: +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.PP +.BR pthread_setschedparam () +may additionally fail with the following errors: +.TP +.B EINVAL +.I policy +is not a recognized policy, or +.I param +does not make sense for the +.IR policy . +.TP +.B EPERM +The caller does not have appropriate privileges +to set the specified scheduling policy and parameters. +.PP +POSIX.1 also documents an +.B ENOTSUP +("attempt was made to set the policy or scheduling parameters +to an unsupported value") error for +.BR pthread_setschedparam (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setschedparam (), +.BR pthread_getschedparam () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0 +POSIX.1-2001. +.SH NOTES +For a description of the permissions required to, and the effect of, +changing a thread's scheduling policy and priority, +and details of the permitted ranges for priorities +in each scheduling policy, see +.BR sched (7). +.SH EXAMPLES +The program below demonstrates the use of +.BR pthread_setschedparam () +and +.BR pthread_getschedparam (), +as well as the use of a number of other scheduling-related +pthreads functions. +.PP +In the following run, the main thread sets its scheduling policy to +.B SCHED_FIFO +with a priority of 10, +and initializes a thread attributes object with +a scheduling policy attribute of +.B SCHED_RR +and a scheduling priority attribute of 20. +The program then sets (using +.BR pthread_attr_setinheritsched (3)) +the inherit scheduler attribute of the thread attributes object to +.BR PTHREAD_EXPLICIT_SCHED , +meaning that threads created using this attributes object should +take their scheduling attributes from the thread attributes object. +The program then creates a thread using the thread attributes object, +and that thread displays its scheduling policy and priority. +.PP +.in +4n +.EX +$ \fBsu\fP # Need privilege to set real\-time scheduling policies +Password: +# \fB./a.out \-mf10 \-ar20 \-i e\fP +Scheduler settings of main thread + policy=SCHED_FIFO, priority=10 + +Scheduler settings in \[aq]attr\[aq] + policy=SCHED_RR, priority=20 + inheritsched is EXPLICIT + +Scheduler attributes of new thread + policy=SCHED_RR, priority=20 +.EE +.in +.PP +In the above output, one can see that the scheduling policy and priority +were taken from the values specified in the thread attributes object. +.PP +The next run is the same as the previous, +except that the inherit scheduler attribute is set to +.BR PTHREAD_INHERIT_SCHED , +meaning that threads created using the thread attributes object should +ignore the scheduling attributes specified in the attributes object +and instead take their scheduling attributes from the creating thread. +.PP +.in +4n +.EX +# \fB./a.out \-mf10 \-ar20 \-i i\fP +Scheduler settings of main thread + policy=SCHED_FIFO, priority=10 + +Scheduler settings in \[aq]attr\[aq] + policy=SCHED_RR, priority=20 + inheritsched is INHERIT + +Scheduler attributes of new thread + policy=SCHED_FIFO, priority=10 +.EE +.in +.PP +In the above output, one can see that the scheduling policy and priority +were taken from the creating thread, +rather than the thread attributes object. +.PP +Note that if we had omitted the +.I \-i\~i +option, the output would have been the same, since +.B PTHREAD_INHERIT_SCHED +is the default for the inherit scheduler attribute. +.SS Program source +\& +.\" SRC BEGIN (pthreads_sched_test.c) +.EX +/* pthreads_sched_test.c */ + +#include +#include +#include +#include +#include + +#define handle_error_en(en, msg) \e + do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) + +static void +usage(char *prog_name, char *msg) +{ + if (msg != NULL) + fputs(msg, stderr); + + fprintf(stderr, "Usage: %s [options]\en", prog_name); + fprintf(stderr, "Options are:\en"); +#define fpe(msg) fprintf(stderr, "\et%s", msg) /* Shorter */ + fpe("\-a Set scheduling policy and priority in\en"); + fpe(" thread attributes object\en"); + fpe(" can be\en"); + fpe(" f SCHED_FIFO\en"); + fpe(" r SCHED_RR\en"); + fpe(" o SCHED_OTHER\en"); + fpe("\-A Use default thread attributes object\en"); + fpe("\-i {e|i} Set inherit scheduler attribute to\en"); + fpe(" \[aq]explicit\[aq] or \[aq]inherit\[aq]\en"); + fpe("\-m Set scheduling policy and priority on\en"); + fpe(" main thread before pthread_create() call\en"); + exit(EXIT_FAILURE); +} + +static int +get_policy(char p, int *policy) +{ + switch (p) { + case \[aq]f\[aq]: *policy = SCHED_FIFO; return 1; + case \[aq]r\[aq]: *policy = SCHED_RR; return 1; + case \[aq]o\[aq]: *policy = SCHED_OTHER; return 1; + default: return 0; + } +} + +static void +display_sched_attr(int policy, struct sched_param *param) +{ + printf(" policy=%s, priority=%d\en", + (policy == SCHED_FIFO) ? "SCHED_FIFO" : + (policy == SCHED_RR) ? "SCHED_RR" : + (policy == SCHED_OTHER) ? "SCHED_OTHER" : + "???", + param\->sched_priority); +} + +static void +display_thread_sched_attr(char *msg) +{ + int policy, s; + struct sched_param param; + + s = pthread_getschedparam(pthread_self(), &policy, ¶m); + if (s != 0) + handle_error_en(s, "pthread_getschedparam"); + + printf("%s\en", msg); + display_sched_attr(policy, ¶m); +} + +static void * +thread_start(void *arg) +{ + display_thread_sched_attr("Scheduler attributes of new thread"); + + return NULL; +} + +int +main(int argc, char *argv[]) +{ + int s, opt, inheritsched, use_null_attrib, policy; + pthread_t thread; + pthread_attr_t attr; + pthread_attr_t *attrp; + char *attr_sched_str, *main_sched_str, *inheritsched_str; + struct sched_param param; + + /* Process command\-line options. */ + + use_null_attrib = 0; + attr_sched_str = NULL; + main_sched_str = NULL; + inheritsched_str = NULL; + + while ((opt = getopt(argc, argv, "a:Ai:m:")) != \-1) { + switch (opt) { + case \[aq]a\[aq]: attr_sched_str = optarg; break; + case \[aq]A\[aq]: use_null_attrib = 1; break; + case \[aq]i\[aq]: inheritsched_str = optarg; break; + case \[aq]m\[aq]: main_sched_str = optarg; break; + default: usage(argv[0], "Unrecognized option\en"); + } + } + + if (use_null_attrib + && (inheritsched_str != NULL || attr_sched_str != NULL)) + { + usage(argv[0], "Can\[aq]t specify \-A with \-i or \-a\en"); + } + + /* Optionally set scheduling attributes of main thread, + and display the attributes. */ + + if (main_sched_str != NULL) { + if (!get_policy(main_sched_str[0], &policy)) + usage(argv[0], "Bad policy for main thread (\-m)\en"); + param.sched_priority = strtol(&main_sched_str[1], NULL, 0); + + s = pthread_setschedparam(pthread_self(), policy, ¶m); + if (s != 0) + handle_error_en(s, "pthread_setschedparam"); + } + + display_thread_sched_attr("Scheduler settings of main thread"); + printf("\en"); + + /* Initialize thread attributes object according to options. */ + + attrp = NULL; + + if (!use_null_attrib) { + s = pthread_attr_init(&attr); + if (s != 0) + handle_error_en(s, "pthread_attr_init"); + attrp = &attr; + } + + if (inheritsched_str != NULL) { + if (inheritsched_str[0] == \[aq]e\[aq]) + inheritsched = PTHREAD_EXPLICIT_SCHED; + else if (inheritsched_str[0] == \[aq]i\[aq]) + inheritsched = PTHREAD_INHERIT_SCHED; + else + usage(argv[0], "Value for \-i must be \[aq]e\[aq] or \[aq]i\[aq]\en"); + + s = pthread_attr_setinheritsched(&attr, inheritsched); + if (s != 0) + handle_error_en(s, "pthread_attr_setinheritsched"); + } + + if (attr_sched_str != NULL) { + if (!get_policy(attr_sched_str[0], &policy)) + usage(argv[0], "Bad policy for \[aq]attr\[aq] (\-a)\en"); + param.sched_priority = strtol(&attr_sched_str[1], NULL, 0); + + s = pthread_attr_setschedpolicy(&attr, policy); + if (s != 0) + handle_error_en(s, "pthread_attr_setschedpolicy"); + s = pthread_attr_setschedparam(&attr, ¶m); + if (s != 0) + handle_error_en(s, "pthread_attr_setschedparam"); + } + + /* If we initialized a thread attributes object, display + the scheduling attributes that were set in the object. */ + + if (attrp != NULL) { + s = pthread_attr_getschedparam(&attr, ¶m); + if (s != 0) + handle_error_en(s, "pthread_attr_getschedparam"); + s = pthread_attr_getschedpolicy(&attr, &policy); + if (s != 0) + handle_error_en(s, "pthread_attr_getschedpolicy"); + + printf("Scheduler settings in \[aq]attr\[aq]\en"); + display_sched_attr(policy, ¶m); + + pthread_attr_getinheritsched(&attr, &inheritsched); + printf(" inheritsched is %s\en", + (inheritsched == PTHREAD_INHERIT_SCHED) ? "INHERIT" : + (inheritsched == PTHREAD_EXPLICIT_SCHED) ? "EXPLICIT" : + "???"); + printf("\en"); + } + + /* Create a thread that will display its scheduling attributes. */ + + s = pthread_create(&thread, attrp, &thread_start, NULL); + if (s != 0) + handle_error_en(s, "pthread_create"); + + /* Destroy unneeded thread attributes object. */ + + if (!use_null_attrib) { + s = pthread_attr_destroy(&attr); + if (s != 0) + handle_error_en(s, "pthread_attr_destroy"); + } + + s = pthread_join(thread, NULL); + if (s != 0) + handle_error_en(s, "pthread_join"); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.ad l +.nh +.BR getrlimit (2), +.BR sched_get_priority_min (2), +.BR pthread_attr_init (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_create (3), +.BR pthread_self (3), +.BR pthread_setschedprio (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_setschedprio.3 b/upstream/opensuse-leap-15-6/man3/pthread_setschedprio.3 new file mode 100644 index 00000000..c2c2973b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_setschedprio.3 @@ -0,0 +1,104 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_setschedprio 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_setschedprio \- set scheduling priority of a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_setschedprio(pthread_t " thread ", int " prio ); +.fi +.SH DESCRIPTION +The +.BR pthread_setschedprio () +function sets the scheduling priority of the thread +.I thread +to the value specified in +.IR prio . +(By contrast +.BR pthread_setschedparam (3) +changes both the scheduling policy and priority of a thread.) +.\" 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. +.SH RETURN VALUE +On success, this function returns 0; +on error, it returns a nonzero error number. +If +.BR pthread_setschedprio () +fails, the scheduling priority of +.I thread +is not changed. +.SH ERRORS +.TP +.B EINVAL +.I prio +is not valid for the scheduling policy of the specified thread. +.TP +.B EPERM +The caller does not have appropriate privileges +to set the specified priority. +.TP +.B ESRCH +No thread with the ID +.I thread +could be found. +.PP +POSIX.1 also documents an +.B ENOTSUP +("attempt was made to set the priority +to an unsupported value") error for +.BR pthread_setschedparam (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_setschedprio () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.3.4. +POSIX.1-2001. +.SH NOTES +For a description of the permissions required to, and the effect of, +changing a thread's scheduling priority, +and details of the permitted ranges for priorities +in each scheduling policy, see +.BR sched (7). +.SH SEE ALSO +.ad l +.nh +.BR getrlimit (2), +.BR sched_get_priority_min (2), +.BR pthread_attr_init (3), +.BR pthread_attr_setinheritsched (3), +.BR pthread_attr_setschedparam (3), +.BR pthread_attr_setschedpolicy (3), +.BR pthread_create (3), +.BR pthread_self (3), +.BR pthread_setschedparam (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_sigmask.3 b/upstream/opensuse-leap-15-6/man3/pthread_sigmask.3 new file mode 100644 index 00000000..0b0cbfd1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_sigmask.3 @@ -0,0 +1,165 @@ +'\" t +.\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_sigmask 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_sigmask \- examine and change mask of blocked signals +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_sigmask(int " how ", const sigset_t *" set \ +", sigset_t *" oldset ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_sigmask (): +.nf + _POSIX_C_SOURCE >= 199506L || _XOPEN_SOURCE >= 500 +.fi +.SH DESCRIPTION +The +.BR pthread_sigmask () +function is just like +.BR sigprocmask (2), +with the difference that its use in multithreaded programs +is explicitly specified by POSIX.1. +Other differences are noted in this page. +.PP +For a description of the arguments and operation of this function, see +.BR sigprocmask (2). +.SH RETURN VALUE +On success, +.BR pthread_sigmask () +returns 0; +on error, it returns an error number. +.SH ERRORS +See +.BR sigprocmask (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_sigmask () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +A new thread inherits a copy of its creator's signal mask. +.PP +The glibc +.BR pthread_sigmask () +function silently ignores attempts to block the two real-time signals that +are used internally by the NPTL threading implementation. +See +.BR nptl (7) +for details. +.SH EXAMPLES +The program below blocks some signals in the main thread, +and then creates a dedicated thread to fetch those signals via +.BR sigwait (3). +The following shell session demonstrates its use: +.PP +.in +4n +.EX +.RB "$" " ./a.out &" +[1] 5423 +.RB "$" " kill \-QUIT %1" +Signal handling thread got signal 3 +.RB "$" " kill \-USR1 %1" +Signal handling thread got signal 10 +.RB "$" " kill \-TERM %1" +[1]+ Terminated ./a.out +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (pthread_sigmask.c) +.EX +#include +#include +#include +#include +#include +#include + +/* 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(void) +{ + 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 +.\" SRC END +.SH SEE ALSO +.BR sigaction (2), +.BR sigpending (2), +.BR sigprocmask (2), +.BR pthread_attr_setsigmask_np (3), +.BR pthread_create (3), +.BR pthread_kill (3), +.BR sigsetops (3), +.BR pthreads (7), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_sigqueue.3 b/upstream/opensuse-leap-15-6/man3/pthread_sigqueue.3 new file mode 100644 index 00000000..5936bca4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_sigqueue.3 @@ -0,0 +1,112 @@ +'\" t +.\" Copyright (c) 2010 Michael Kerrisk, +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_sigqueue 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_sigqueue \- queue a signal and data to a thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int pthread_sigqueue(pthread_t " thread ", int " sig , +.BI " const union sigval " value ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_sigqueue (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR pthread_sigqueue () +function performs a similar task to +.BR sigqueue (3), +but, rather than sending a signal to a process, +it sends a signal to a thread in the same process as the +calling thread. +.PP +The +.I thread +argument is the ID of a thread in the same process as the caller. +The +.I sig +argument specifies the signal to be sent. +The +.I value +argument specifies data to accompany the signal; see +.BR sigqueue (3) +for details. +.SH RETURN VALUE +On success, +.BR pthread_sigqueue () +returns 0; +on error, it returns an error number. +.SH ERRORS +.TP +.B EAGAIN +The limit of signals which may be queued has been reached. +(See +.BR signal (7) +for further information.) +.TP +.B EINVAL +.I sig +was invalid. +.TP +.B ENOSYS +.BR pthread_sigqueue () +is not supported on this system. +.TP +.B ESRCH +.I thread +is not valid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_sigqueue () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The glibc implementation of +.BR pthread_sigqueue () +gives an error +.RB ( EINVAL ) +on attempts to send either of the real-time signals +used internally by the NPTL threading implementation. +See +.BR nptl (7) +for details. +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.11. +.SH SEE ALSO +.BR rt_tgsigqueueinfo (2), +.BR sigaction (2), +.BR pthread_sigmask (3), +.BR sigqueue (3), +.BR sigwait (3), +.BR pthreads (7), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_spin_init.3 b/upstream/opensuse-leap-15-6/man3/pthread_spin_init.3 new file mode 100644 index 00000000..fbced3c2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_spin_init.3 @@ -0,0 +1,148 @@ +.\" Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_spin_init 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_spin_init, pthread_spin_destroy \- initialize or destroy a spin lock +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_spin_init(pthread_spinlock_t *" lock ", int " pshared ");" +.BI "int pthread_spin_destroy(pthread_spinlock_t *" lock ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_spin_init (), +.BR pthread_spin_destroy (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.IR "General note" : +Most programs should use mutexes +instead of spin locks. +Spin locks are primarily useful in conjunction with real-time +scheduling policies. +See NOTES. +.PP +The +.BR pthread_spin_init () +function allocates any resources required for the use of +the spin lock referred to by +.I lock +and initializes the lock to be in the unlocked state. +The +.I pshared +argument must have one of the following values: +.TP +.B PTHREAD_PROCESS_PRIVATE +The spin lock is to be operated on only by threads in the same process +as the thread that calls +.BR pthread_spin_init (). +(Attempting to share the spin lock between processes +results in undefined behavior.) +.TP +.B PTHREAD_PROCESS_SHARED +The spin lock may be operated on by any thread in any process that +has access to the memory containing the lock +(i.e., the lock may be in a shared memory object that is +shared among multiple processes). +.PP +Calling +.BR pthread_spin_init () +on a spin lock that has already been initialized results +in undefined behavior. +.PP +The +.BR pthread_spin_destroy () +function destroys a previously initialized spin lock, +freeing any resources that were allocated for that lock. +Destroying a spin lock that has not been previously been initialized +or destroying a spin lock while another thread holds the lock +results in undefined behavior. +.PP +Once a spin lock has been destroyed, +performing any operation on the lock other than +once more initializing it with +.BR pthread_spin_init () +results in undefined behavior. +.PP +The result of performing operations such as +.BR pthread_spin_lock (3), +.BR pthread_spin_unlock (3), +and +.BR pthread_spin_destroy () +on +.I copies +of the object referred to by +.I lock +is undefined. +.SH RETURN VALUE +On success, there functions return zero. +On failure, they return an error number. +In the event that +.BR pthread_spin_init () +fails, the lock is not initialized. +.SH ERRORS +.BR pthread_spin_init () +may fail with the following errors: +.\" These errors don't occur on the glibc implementation +.TP +.B EAGAIN +The system has insufficient resources to initialize +a new spin lock. +.TP +.B ENOMEM +Insufficient memory to initialize the spin lock. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.PP +Support for process-shared spin locks is a POSIX option. +The option is supported in the glibc implementation. +.SH NOTES +Spin locks should be employed in conjunction with +real-time scheduling policies +.RB ( SCHED_FIFO , +or possibly +.BR SCHED_RR ). +Use of spin locks with nondeterministic scheduling policies such as +.B SCHED_OTHER +probably indicates a design mistake. +The problem is that if a thread operating under such a policy +is scheduled off the CPU while it holds a spin lock, +then other threads will waste time spinning on the lock +until the lock holder is once more rescheduled and releases the lock. +.PP +If threads create a deadlock situation while employing spin locks, +those threads will spin forever consuming CPU time. +.PP +User-space spin locks are +.I not +applicable as a general locking solution. +They are, by definition, +prone to priority inversion and unbounded spin times. +A programmer using spin locks must be exceptionally careful not +only in the code, but also in terms of system configuration, +thread placement, and priority assignment. +.\" FIXME . When PTHREAD_MUTEX_ADAPTIVE_NP is one day document +.\" make reference to it here +.SH SEE ALSO +.ad l +.nh +.BR pthread_mutex_init (3), +.BR pthread_mutex_lock (3), +.BR pthread_spin_lock (3), +.BR pthread_spin_unlock (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_spin_lock.3 b/upstream/opensuse-leap-15-6/man3/pthread_spin_lock.3 new file mode 100644 index 00000000..d85ed321 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_spin_lock.3 @@ -0,0 +1,102 @@ +.\" Copyright (c) 2017, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_spin_lock 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock \- +lock and unlock a spin lock +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int pthread_spin_lock(pthread_spinlock_t *" lock ); +.BI "int pthread_spin_trylock(pthread_spinlock_t *" lock ); +.BI "int pthread_spin_unlock(pthread_spinlock_t *" lock ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR pthread_spin_lock (), +.BR pthread_spin_trylock (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR pthread_spin_lock () +function locks the spin lock referred to by +.IR lock . +If the spin lock is currently unlocked, +the calling thread acquires the lock immediately. +If the spin lock is currently locked by another thread, +the calling thread spins, testing the lock until it becomes available, +at which point the calling thread acquires the lock. +.PP +Calling +.BR pthread_spin_lock () +on a lock that is already held by the caller +or a lock that has not been initialized with +.BR pthread_spin_init (3) +results in undefined behavior. +.PP +The +.BR pthread_spin_trylock () +function is like +.BR pthread_spin_lock (), +except that if the spin lock referred to by +.I lock +is currently locked, +then, instead of spinning, the call returns immediately with the error +.BR EBUSY . +.PP +The +.BR pthread_spin_unlock () +function unlocks the spin lock referred to +.IR lock . +If any threads are spinning on the lock, +one of those threads will then acquire the lock. +.PP +Calling +.BR pthread_spin_unlock () +on a lock that is not held by the caller results in undefined behavior. +.SH RETURN VALUE +On success, these functions return zero. +On failure, they return an error number. +.SH ERRORS +.BR pthread_spin_lock () +may fail with the following errors: +.TP +.B EDEADLOCK +.\" Not detected in glibc +The system detected a deadlock condition. +.PP +.BR pthread_spin_trylock () +fails with the following errors: +.TP +.B EBUSY +The spin lock is currently locked by another thread. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.SH CAVEATS +Applying any of the functions described on this page to +an uninitialized spin lock results in undefined behavior. +.PP +Carefully read NOTES in +.BR pthread_spin_init (3). +.SH SEE ALSO +.ad l +.nh +.\" FIXME . .BR pthread_mutex_lock (3), +.BR pthread_spin_destroy (3), +.BR pthread_spin_init (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_testcancel.3 b/upstream/opensuse-leap-15-6/man3/pthread_testcancel.3 new file mode 100644 index 00000000..2c8c2e37 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_testcancel.3 @@ -0,0 +1,67 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_testcancel 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_testcancel \- request delivery of any pending cancelation request +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void pthread_testcancel(void); +.fi +.SH DESCRIPTION +Calling +.BR pthread_testcancel () +creates a cancelation point within the calling thread, +so that a thread that is otherwise executing code that contains +no cancelation points will respond to a cancelation request. +.PP +If cancelability is disabled (using +.BR pthread_setcancelstate (3)), +or no cancelation request is pending, +then a call to +.BR pthread_testcancel () +has no effect. +.SH RETURN VALUE +This function does not return a value. +If the calling thread is canceled as a consequence of a call +to this function, then the function does not return. +.SH ERRORS +This function always succeeds. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_testcancel () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.0. +POSIX.1-2001. +.SH EXAMPLES +See +.BR pthread_cleanup_push (3). +.SH SEE ALSO +.BR pthread_cancel (3), +.BR pthread_cleanup_push (3), +.BR pthread_setcancelstate (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_tryjoin_np.3 b/upstream/opensuse-leap-15-6/man3/pthread_tryjoin_np.3 new file mode 100644 index 00000000..35d9de86 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_tryjoin_np.3 @@ -0,0 +1,157 @@ +'\" t +.\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_tryjoin_np 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_tryjoin_np, pthread_timedjoin_np \- try to join with a +terminated thread +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int pthread_tryjoin_np(pthread_t " thread ", void **" retval ); +.BI "int pthread_timedjoin_np(pthread_t " thread ", void **" retval , +.BI " const struct timespec *" abstime ); +.fi +.SH DESCRIPTION +These functions operate in the same way as +.BR pthread_join (3), +except for the differences described on this page. +.PP +The +.BR pthread_tryjoin_np () +function performs a nonblocking join with the thread +.IR thread , +returning the exit status of the thread in +.IR *retval . +If +.I thread +has not yet terminated, then instead of blocking, as is done by +.BR pthread_join (3), +the call returns an error. +.PP +The +.BR pthread_timedjoin_np () +function performs a join-with-timeout. +If +.I thread +has not yet terminated, +then the call blocks until a maximum time, specified in +.IR abstime , +measured against the +.B CLOCK_REALTIME +clock. +If the timeout expires before +.I thread +terminates, +the call returns an error. +The +.I abstime +argument is a +.BR timespec (3) +structure, +specifying an absolute time measured since the Epoch (see +.BR time (2)). +.SH RETURN VALUE +On success, +these functions return 0; +on error, they return an error number. +.SH ERRORS +These functions can fail with the same errors as +.BR pthread_join (3). +.BR pthread_tryjoin_np () +can in addition fail with the following error: +.TP +.B EBUSY +.I thread +had not yet terminated at the time of the call. +.PP +.BR pthread_timedjoin_np () +can in addition fail with the following errors: +.TP +.B EINVAL +.I abstime +value is invalid +.RI ( tv_sec +is less than 0 or +.I tv_nsec +is greater than 1e9). +.TP +.B ETIMEDOUT +The call timed out before +.I thread +terminated. +.PP +.BR pthread_timedjoin_np () +never returns the error +.BR EINTR . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_tryjoin_np (), +.BR pthread_timedjoin_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU; +hence the suffix "_np" (nonportable) in the names. +.SH HISTORY +glibc 2.3.3. +.SH BUGS +The +.BR pthread_timedjoin_np () +function measures time by internally calculating a relative sleep interval +that is then measured against the +.B CLOCK_MONOTONIC +clock instead of the +.B CLOCK_REALTIME +clock. +Consequently, the timeout is unaffected by discontinuous changes to the +.B CLOCK_REALTIME +clock. +.SH EXAMPLES +The following code waits to join for up to 5 seconds: +.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 SEE ALSO +.BR clock_gettime (2), +.BR pthread_exit (3), +.BR pthread_join (3), +.BR timespec (3), +.BR pthreads (7) diff --git a/upstream/opensuse-leap-15-6/man3/pthread_yield.3 b/upstream/opensuse-leap-15-6/man3/pthread_yield.3 new file mode 100644 index 00000000..9c87e92d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/pthread_yield.3 @@ -0,0 +1,81 @@ +'\" t +.\" Copyright (c) 2009 Michael Kerrisk, +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH pthread_yield 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +pthread_yield \- yield the processor +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B [[deprecated]] int pthread_yield(void); +.fi +.SH DESCRIPTION +.BR Note : +This function is deprecated; see below. +.PP +.BR pthread_yield () +causes the calling thread to relinquish the CPU. +The thread is placed at the end of the run queue for its static +priority and another thread is scheduled to run. +For further details, see +.BR sched_yield (2) +.SH RETURN VALUE +On success, +.BR pthread_yield () +returns 0; +on error, it returns an error number. +.SH ERRORS +On Linux, this call always succeeds +(but portable and future-proof applications should nevertheless +handle a possible error return). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR pthread_yield () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, this function is implemented as a call to +.BR sched_yield (2). +.SH STANDARDS +None. +.SH HISTORY +.\" BSD, Tru64, AIX, and Irix. +Deprecated since glibc 2.34. +Use the standardized +.BR sched_yield (2) +instead. +.SH NOTES +.BR pthread_yield () +is intended for use with real-time scheduling policies (i.e., +.B SCHED_FIFO +or +.BR SCHED_RR ). +Use of +.BR pthread_yield () +with nondeterministic scheduling policies such as +.B SCHED_OTHER +is unspecified and very likely means your application design is broken. +.SH SEE ALSO +.BR sched_yield (2), +.\" FIXME . .BR pthread_cond_wait (3), +.BR pthreads (7), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/ptsname.3 b/upstream/opensuse-leap-15-6/man3/ptsname.3 new file mode 100644 index 00000000..3d0c810e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ptsname.3 @@ -0,0 +1,147 @@ +'\" t +.\" %%%LICENSE_START(PUBLIC_DOMAIN) +.\" This page is in the public domain. - aeb +.\" %%%LICENSE_END +.\" +.\" 2004-12-17, mtk, added description of ptsname_r() + ERRORS +.\" +.TH ptsname 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ptsname, ptsname_r \- get the name of the slave pseudoterminal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *ptsname(int " fd ); +.BI "int ptsname_r(int " fd ", char " buf [. buflen "], size_t " buflen ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ptsname (): +.nf + Since glibc 2.24: + _XOPEN_SOURCE >= 500 +.\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) + glibc 2.23 and earlier: + _XOPEN_SOURCE +.fi +.PP +.BR ptsname_r (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR ptsname () +function returns the name of the slave pseudoterminal device +corresponding to the master referred to by the file descriptor +.IR fd . +.PP +The +.BR ptsname_r () +function is the reentrant equivalent of +.BR ptsname (). +It returns the name of the slave pseudoterminal device as a +null-terminated string in the buffer pointed to by +.IR buf . +The +.I buflen +argument specifies the number of bytes available in +.IR buf . +.SH RETURN VALUE +On success, +.BR ptsname () +returns a pointer to a string in static storage which will be +overwritten by subsequent calls. +This pointer must not be freed. +On failure, NULL is returned. +.PP +On success, +.BR ptsname_r () +returns 0. +On failure, an error number is returned to indicate the error. +.\" In glibc, the error number is not only returned as the return value +.\" but also stored in errno. But this is not true for musl libc. +.SH ERRORS +.TP +.B EINVAL +.RB ( ptsname_r () +only) +.I buf +is NULL. +(This error is returned only for +.\" glibc commit 8f0a947cf55f3b0c4ebdf06953c57eff67a22fa9 +glibc 2.25 and earlier.) +.TP +.B ENOTTY +.I fd +does not refer to a pseudoterminal master device. +.TP +.B ERANGE +.RB ( ptsname_r () +only) +.I buf +is too small. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ptsname () +T} Thread safety MT-Unsafe race:ptsname +T{ +.BR ptsname_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +A version of +.BR ptsname_r () +is documented on Tru64 and HP-UX, +but on those implementations, +\-1 is returned on error, with +.I errno +set to indicate the error. +Avoid using this function in portable programs. +.SH STANDARDS +.TP +.BR ptsname (): +POSIX.1-2008. +.PP +.BR ptsname_r () +is a Linux extension, that is proposed for inclusion +.\" FIXME . for later review when Issue 8 is one day released +.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8 +.\" http://austingroupbugs.net/view.php?id=508 +in the next major revision of POSIX.1 (Issue 8). +.SH HISTORY +.TP +.BR ptsname (): +POSIX.1-2001. +glibc 2.1. +.PP +.BR ptsname () +is part of the UNIX 98 pseudoterminal support (see +.BR pts (4)). +.SH SEE ALSO +.BR grantpt (3), +.BR posix_openpt (3), +.BR ttyname (3), +.BR unlockpt (3), +.BR pts (4), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/putenv.3 b/upstream/opensuse-leap-15-6/man3/putenv.3 new file mode 100644 index 00000000..fc1fe6ce --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/putenv.3 @@ -0,0 +1,143 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH putenv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +putenv \- change or add an environment variable +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int putenv(char *" string ); +.\" Not: const char * +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR putenv (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR putenv () +function adds or changes the value of environment +variables. +The argument \fIstring\fP is of the form \fIname\fP=\fIvalue\fP. +If \fIname\fP does not already exist in the environment, then +\fIstring\fP is added to the environment. +If \fIname\fP does exist, +then the value of \fIname\fP in the environment is changed to +\fIvalue\fP. +The string pointed to by \fIstring\fP becomes part of the environment, +so altering the string changes the environment. +.SH RETURN VALUE +The +.BR putenv () +function returns zero on success. +On failure, it returns a nonzero value, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient space to allocate new environment. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR putenv () +T} Thread safety MT-Unsafe const:env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.PP +The +.BR putenv () +function is not required to be reentrant, and the +one in glibc 2.0 is not, but the glibc 2.1 version is. +.\" .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. +.PP +Since glibc 2.1.2, the glibc implementation conforms to SUSv2: +the pointer \fIstring\fP given to +.BR putenv () +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 +.BR putenv () +with an automatic variable +as the argument, then return from the calling function while \fIstring\fP +is still part of the environment.) +However, from glibc 2.0 to glibc 2.1.1, it differs:r +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 +The 4.4BSD version, like glibc 2.0, uses a copy. +.PP +SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3. +.PP +The GNU C library implementation provides a nonstandard extension. +If +.I string +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 SEE ALSO +.BR clearenv (3), +.BR getenv (3), +.BR setenv (3), +.BR unsetenv (3), +.BR environ (7) diff --git a/upstream/opensuse-leap-15-6/man3/putgrent.3 b/upstream/opensuse-leap-15-6/man3/putgrent.3 new file mode 100644 index 00000000..17f31751 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/putgrent.3 @@ -0,0 +1,69 @@ +'\" t +.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH putgrent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +putgrent \- write a group database entry to a file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int putgrent(const struct group *restrict " grp \ +", FILE *restrict " stream ); +.fi +.SH DESCRIPTION +The +.BR putgrent () +function is the counterpart for +.BR fgetgrent (3). +The function writes the content of the provided +.I struct group +into the +.IR stream . +The list of group members must be NULL-terminated or NULL-initialized. +.PP +The +.I struct group +is defined as follows: +.PP +.in +4n +.EX +struct group { + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* group members */ +}; +.EE +.in +.SH RETURN VALUE +The function returns zero on success, and a nonzero value on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR putgrent () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR fgetgrent (3), +.BR getgrent (3), +.BR group (5) diff --git a/upstream/opensuse-leap-15-6/man3/putpwent.3 b/upstream/opensuse-leap-15-6/man3/putpwent.3 new file mode 100644 index 00000000..9e731c87 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/putpwent.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH putpwent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +putpwent \- write a password file entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.BI "int putpwent(const struct passwd *restrict " p \ +", FILE *restrict " stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR putpwent (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR putpwent () +function writes a password entry from the +structure \fIp\fP in the file associated with \fIstream\fP. +.PP +The \fIpasswd\fP structure is defined in \fI\fP as follows: +.PP +.in +4n +.EX +struct passwd { + char *pw_name; /* username */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ +}; +.EE +.in +.SH RETURN VALUE +The +.BR putpwent () +function returns 0 on success. +On failure, it returns \-1, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +Invalid (NULL) argument given. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR putpwent () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr4. +.SH SEE ALSO +.BR endpwent (3), +.BR fgetpwent (3), +.BR getpw (3), +.BR getpwent (3), +.BR getpwnam (3), +.BR getpwuid (3), +.BR setpwent (3) diff --git a/upstream/opensuse-leap-15-6/man3/puts.3 b/upstream/opensuse-leap-15-6/man3/puts.3 new file mode 100644 index 00000000..ff7fd5b4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/puts.3 @@ -0,0 +1,127 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 18:42:59 1993 by Rik Faith (faith@cs.unc.edu) +.TH puts 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +fputc, fputs, putc, putchar, puts \- output of characters and strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int fputc(int " c ", FILE *" stream ); +.BI "int putc(int " c ", FILE *" stream ); +.BI "int putchar(int " c ); +.PP +.BI "int fputs(const char *restrict " s ", FILE *restrict " stream ); +.BI "int puts(const char *" s ); +.fi +.SH DESCRIPTION +.BR fputc () +writes the character +.IR c , +cast to an +.IR "unsigned char" , +to +.IR stream . +.PP +.BR putc () +is equivalent to +.BR fputc () +except that it may be implemented as a macro which evaluates +.I stream +more than once. +.PP +.BI "putchar(" c ) +is equivalent to +.BI "putc(" c ", " stdout ) \fR. +.PP +.BR fputs () +writes the string +.I s +to +.IR stream , +without its terminating null byte (\[aq]\e0\[aq]). +.PP +.BR puts () +writes the string +.I s +and a trailing newline +to +.IR stdout . +.PP +Calls to the functions described here can be mixed with each other and with +calls to other output functions from the +.I stdio +library for the same output stream. +.PP +For nonlocking counterparts, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +.BR fputc (), +.BR putc (), +and +.BR putchar () +return the character written as an +.I unsigned char +cast to an +.I int +or +.B EOF +on error. +.PP +.BR puts () +and +.BR fputs () +return a nonnegative number on success, or +.B EOF +on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR fputc (), +.BR fputs (), +.BR putc (), +.BR putchar (), +.BR puts () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, C99. +.SH BUGS +It is not advisable to mix calls to output functions from the +.I stdio +library with low-level calls to +.BR write (2) +for the file descriptor associated with the same output stream; the results +will be undefined and very probably not what you want. +.SH SEE ALSO +.BR write (2), +.BR ferror (3), +.BR fgets (3), +.BR fopen (3), +.BR fputwc (3), +.BR fputws (3), +.BR fseek (3), +.BR fwrite (3), +.BR putwchar (3), +.BR scanf (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/putwchar.3 b/upstream/opensuse-leap-15-6/man3/putwchar.3 new file mode 100644 index 00000000..95f80fbc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/putwchar.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH putwchar 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +putwchar \- write a wide character to standard output +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t putwchar(wchar_t " wc ); +.fi +.SH DESCRIPTION +The +.BR putwchar () +function is the wide-character equivalent of the +.BR putchar (3) +function. +It writes the wide character +.I wc +to +.IR stdout . +If +.I ferror(stdout) +becomes true, it returns +.BR WEOF . +If a wide character +conversion error occurs, it sets +.I errno +to +.B EILSEQ +and returns +.BR WEOF . +Otherwise, it returns +.IR wc . +.PP +For a nonlocking counterpart, see +.BR unlocked_stdio (3). +.SH RETURN VALUE +The +.BR putwchar () +function returns +.I wc +if no error occurred, or +.B WEOF +to indicate an error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR putwchar () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR putwchar () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +It is reasonable to expect that +.BR putwchar () +will actually write +the multibyte sequence corresponding to the wide character +.IR wc . +.SH SEE ALSO +.BR fputwc (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/qecvt.3 b/upstream/opensuse-leap-15-6/man3/qecvt.3 new file mode 100644 index 00000000..03cfc927 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/qecvt.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" This replaces an earlier man page written by Walter Harms +.\" . +.\" +.TH qecvt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +qecvt, qfcvt, qgcvt \- convert a floating-point number to a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *qecvt(long double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign ); +.BI "[[deprecated]] char *qfcvt(long double " number ", int " ndigits , +.BI " int *restrict " decpt ", int *restrict " sign ); +.BI "[[deprecated]] char *qgcvt(long double " number ", int " ndigit ", char *" buf ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR qecvt (), +.BR qfcvt (), +.BR qgcvt (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + In glibc up to and including 2.19: + _SVID_SOURCE +.fi +.\" FIXME . The full FTM picture looks to have been 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 DESCRIPTION +The functions +.BR qecvt (), +.BR qfcvt (), +and +.BR qgcvt () +are identical to +.BR ecvt (3), +.BR fcvt (3), +and +.BR gcvt (3) +respectively, except that they use a +.I "long double" +argument +.IR number . +See +.BR ecvt (3) +and +.BR gcvt (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR qecvt () +T} Thread safety MT-Unsafe race:qecvt +T{ +.BR qfcvt () +T} Thread safety MT-Unsafe race:qfcvt +T{ +.BR qgcvt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +SVr4, SunOS, GNU. +.\" Not supported by libc4 and libc5. +.PP +These functions are obsolete. +Instead, +.BR snprintf (3) +is recommended. +.SH SEE ALSO +.BR ecvt (3), +.BR ecvt_r (3), +.BR gcvt (3), +.BR sprintf (3) diff --git a/upstream/opensuse-leap-15-6/man3/qsort.3 b/upstream/opensuse-leap-15-6/man3/qsort.3 new file mode 100644 index 00000000..a17d8839 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/qsort.3 @@ -0,0 +1,160 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" and Ben Bacarisse +.\" Document qsort_r() +.\" +.TH qsort 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +qsort, qsort_r \- sort an array +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void qsort(void " base [. size " * ." nmemb "], size_t " nmemb ", \ +size_t " size , +.BI " int (*" compar ")(const void [." size "], \ +const void [." size ])); +.BI "void qsort_r(void " base [. size " * ." nmemb "], size_t " nmemb ", \ +size_t " size , +.BI " int (*" compar ")(const void [." size "], \ +const void [." size "], void *)," +.BI " void *" arg ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR qsort_r (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR qsort () +function sorts an array with \fInmemb\fP elements of +size \fIsize\fP. +The \fIbase\fP argument points to the start of the +array. +.PP +The contents of the array are sorted in ascending order according to a +comparison function pointed to by \fIcompar\fP, which is called with two +arguments that point to the objects being compared. +.PP +The comparison function must return an integer less than, equal to, or +greater than zero if the first argument is considered to be respectively +less than, equal to, or greater than the second. +If two members compare as equal, +their order in the sorted array is undefined. +.PP +The +.BR qsort_r () +function is identical to +.BR qsort () +except that the comparison function +.I compar +takes a third argument. +A pointer is passed to the comparison function via +.IR arg . +In this way, the comparison function does not need to use global variables to +pass through arbitrary arguments, and is therefore reentrant and safe to +use in threads. +.SH RETURN VALUE +The +.BR qsort () +and +.BR qsort_r () +functions return no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR qsort (), +.BR qsort_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR qsort () +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR qsort () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.TP +.BR qsort_r () +glibc 2.8. +.SH NOTES +To compare C strings, the comparison function can call +.BR strcmp (3), +as shown in the example below. +.SH EXAMPLES +For one example of use, see the example under +.BR bsearch (3). +.PP +Another example is the following program, +which sorts the strings given in its command-line arguments: +.PP +.\" SRC BEGIN (qsort.c) +.EX +#include +#include +#include + +static int +cmpstringp(const void *p1, const void *p2) +{ + /* The actual arguments to this function are "pointers to + pointers to char", but strcmp(3) arguments are "pointers + to char", hence the following cast plus dereference. */ + + return strcmp(*(const char **) p1, *(const char **) p2); +} + +int +main(int argc, char *argv[]) +{ + if (argc < 2) { + fprintf(stderr, "Usage: %s ...\en", argv[0]); + exit(EXIT_FAILURE); + } + + qsort(&argv[1], argc \- 1, sizeof(char *), cmpstringp); + + for (size_t j = 1; j < argc; j++) + puts(argv[j]); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR sort (1), +.BR alphasort (3), +.BR strcmp (3), +.BR versionsort (3) diff --git a/upstream/opensuse-leap-15-6/man3/raise.3 b/upstream/opensuse-leap-15-6/man3/raise.3 new file mode 100644 index 00000000..269feac2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/raise.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright (C) 2008 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 1995 by Mike Battersby (mib@deakin.edu.au) +.\" +.TH raise 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +raise \- send a signal to the caller +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int raise(int " sig ); +.fi +.SH DESCRIPTION +The +.BR raise () +function sends a signal to the calling process or thread. +In a single-threaded program it is equivalent to +.PP +.in +4n +.EX +kill(getpid(), sig); +.EE +.in +.PP +In a multithreaded program it is equivalent to +.PP +.in +4n +.EX +pthread_kill(pthread_self(), sig); +.EE +.in +.PP +If the signal causes a handler to be called, +.BR raise () +will return only after the signal handler has returned. +.SH RETURN VALUE +.BR raise () +returns 0 on success, and nonzero for failure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR raise () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.PP +Since glibc 2.3.3, +.BR raise () +is implemented by calling +.BR tgkill (2), +.\" 2.3.2 used the obsolete tkill(), if available. +if the kernel supports that system call. +Older glibc versions implemented +.BR raise () +using +.BR kill (2). +.SH SEE ALSO +.BR getpid (2), +.BR kill (2), +.BR sigaction (2), +.BR signal (2), +.BR pthread_kill (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/rand.3 b/upstream/opensuse-leap-15-6/man3/rand.3 new file mode 100644 index 00000000..0a3247de --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rand.3 @@ -0,0 +1,243 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" with contribution from Francesco Potorti +.\" Modified 2003-11-15, aeb, added rand_r +.\" 2010-09-13, mtk, added example program +.\" +.TH rand 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rand, rand_r, srand \- pseudo-random number generator +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B int rand(void); +.BI "void srand(unsigned int " seed ); +.PP +.BI "[[deprecated]] int rand_r(unsigned int *" seedp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR rand_r (): +.nf + Since glibc 2.24: + _POSIX_C_SOURCE >= 199506L + glibc 2.23 and earlier + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The +.BR rand () +function returns a pseudo-random integer in the range 0 to +.B RAND_MAX +inclusive (i.e., the mathematical range [0,\ \fBRAND_MAX\fR]). +.PP +The +.BR srand () +function sets its argument as the seed for a new +sequence of pseudo-random integers to be returned by +.BR rand (). +These sequences are repeatable by calling +.BR srand () +with the same seed value. +.PP +If no seed value is provided, the +.BR rand () +function is automatically seeded with a value of 1. +.PP +The function +.BR rand () +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 +.BR rand_r (). +.PP +Like +.BR rand (), +.BR rand_r () +returns a pseudo-random integer in the range [0,\ \fBRAND_MAX\fR]. +The +.I seedp +argument is a pointer to an +.I unsigned int +that is used to store state between calls. +If +.BR rand_r () +is called with the same initial value for the integer pointed to by +.IR seedp , +and that value is not modified between calls, +then the same pseudo-random sequence will result. +.PP +The value pointed to by the +.I seedp +argument of +.BR rand_r () +provides only a very small amount of state, +so this function will be a weak pseudo-random generator. +Try +.BR drand48_r (3) +instead. +.SH RETURN VALUE +The +.BR rand () +and +.BR rand_r () +functions return a value between 0 and +.B RAND_MAX +(inclusive). +The +.BR srand () +function returns no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rand (), +.BR rand_r (), +.BR srand () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The versions of +.BR rand () +and +.BR srand () +in the Linux C Library use the same random number generator as +.BR random (3) +and +.BR srandom (3), +so the lower-order bits should be as random as the higher-order bits. +However, on older +.BR rand () +implementations, and on current implementations on different systems, +the lower-order bits are much less random than the higher-order bits. +Do not use this function in applications intended to be portable +when good randomness is needed. +(Use +.BR random (3) +instead.) +.SH STANDARDS +.TP +.BR rand () +.TQ +.BR srand () +C11, POSIX.1-2008. +.TP +.BR rand_r () +POSIX.1-2008. +.SH HISTORY +.TP +.BR rand () +.TQ +.BR srand () +SVr4, 4.3BSD, C89, POSIX.1-2001. +.TP +.BR rand_r () +POSIX.1-2001. +Obsolete in POSIX.1-2008. +.SH EXAMPLES +POSIX.1-2001 gives the following example of an implementation of +.BR rand () +and +.BR srand (), +possibly useful when one needs the same sequence on two different machines. +.PP +.in +4n +.EX +static unsigned long next = 1; + +/* RAND_MAX assumed to be 32767 */ +int myrand(void) { + next = next * 1103515245 + 12345; + return((unsigned)(next/65536) % 32768); +} + +void mysrand(unsigned int seed) { + next = seed; +} +.EE +.in +.PP +The following program can be used to display the +pseudo-random sequence produced by +.BR rand () +when given a particular seed. +When the seed is +.IR \-1 , +the program uses a random seed. +.PP +.in +4n +.\" SRC BEGIN (rand.c) +.EX +#include +#include + +int +main(int argc, char *argv[]) +{ + int r; + unsigned int seed, nloops; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + seed = atoi(argv[1]); + nloops = atoi(argv[2]); + + if (seed == \-1) { + seed = arc4random(); + printf("seed: %u\en", seed); + } + + srand(seed); + for (unsigned int j = 0; j < nloops; j++) { + r = rand(); + printf("%d\en", r); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.SH SEE ALSO +.BR drand48 (3), +.BR random (3) diff --git a/upstream/opensuse-leap-15-6/man3/random.3 b/upstream/opensuse-leap-15-6/man3/random.3 new file mode 100644 index 00000000..5ca7c04f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/random.3 @@ -0,0 +1,196 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Mar 28 00:25:51 1993, David Metcalfe +.\" Modified Sat Jul 24 18:13:39 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Sun Aug 20 21:47:07 2000, aeb +.\" +.TH random 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +random, srandom, initstate, setstate \- random number generator +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B long random(void); +.BI "void srandom(unsigned int " seed ); +.PP +.BI "char *initstate(unsigned int " seed ", char " state [. n "], size_t " n ); +.BI "char *setstate(char *" state ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR random (), +.BR srandom (), +.BR initstate (), +.BR setstate (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR random () +function uses a nonlinear additive feedback random +number generator employing a default table of size 31 long integers to +return successive pseudo-random numbers in +the range from 0 to 2\[ha]31\ \-\ 1. +The period of this random number generator is very large, approximately +.IR "16\ *\ ((2\[ha]31)\ \-\ 1)" . +.PP +The +.BR srandom () +function sets its argument as the seed for a new +sequence of pseudo-random integers to be returned by +.BR random (). +These sequences are repeatable by calling +.BR srandom () +with the same +seed value. +If no seed value is provided, the +.BR random () +function +is automatically seeded with a value of 1. +.PP +The +.BR initstate () +function allows a state array \fIstate\fP to +be initialized for use by +.BR random (). +The size of the state array +\fIn\fP is used by +.BR initstate () +to decide how sophisticated a +random number generator it should use\[em]the larger the state array, +the better the random numbers will be. +Current "optimal" values for the size of the state array \fIn\fP are +8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to +the nearest known amount. +Using less than 8 bytes results in an error. +\fIseed\fP is the seed for the +initialization, which specifies a starting point for the random number +sequence, and provides for restarting at the same point. +.PP +The +.BR setstate () +function changes the state array used by the +.BR random () +function. +The state array \fIstate\fP is used for +random number generation until the next call to +.BR initstate () +or +.BR setstate (). +\fIstate\fP must first have been initialized +using +.BR initstate () +or be the result of a previous call of +.BR setstate (). +.SH RETURN VALUE +The +.BR random () +function returns a value between 0 and +.IR "(2\[ha]31)\ \-\ 1" . +The +.BR srandom () +function returns no value. +.PP +The +.BR initstate () +function returns a pointer to the previous state array. +On failure, it returns NULL, and +.I errno +is set to indicate the error. +.PP +On success, +.BR setstate () +returns a pointer to the previous state array. +On failure, it returns NULL, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The +.I state +argument given to +.BR setstate () +was NULL. +.TP +.B EINVAL +A state array of less than 8 bytes was specified to +.BR initstate (). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR random (), +.BR srandom (), +.BR initstate (), +.BR setstate () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.SH NOTES +Random-number generation is a complex topic. +.I Numerical Recipes in C: The Art of Scientific Computing +(William H.\& Press, Brian P.\& Flannery, Saul A.\& Teukolsky, +William T.\& Vetterling; New York: Cambridge University Press, 2007, 3rd ed.) +provides an excellent discussion of practical random-number generation +issues in Chapter 7 (Random Numbers). +.PP +For a more theoretical discussion which also covers many practical issues +in depth, see Chapter 3 (Random Numbers) in Donald E.\& Knuth's +.IR "The Art of Computer Programming" , +volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts: +Addison-Wesley Publishing Company, 1981. +.SH CAVEATS +The +.BR random () +function should not be used in multithreaded programs +where reproducible behavior is required. +Use +.BR random_r (3) +for that purpose. +.SH BUGS +According to POSIX, +.BR initstate () +should return NULL on error. +In the glibc implementation, +.I errno +is (as specified) set on error, but the function does not return NULL. +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=15380 +.SH SEE ALSO +.BR getrandom (2), +.BR drand48 (3), +.BR rand (3), +.BR random_r (3), +.BR srand (3) diff --git a/upstream/opensuse-leap-15-6/man3/random_r.3 b/upstream/opensuse-leap-15-6/man3/random_r.3 new file mode 100644 index 00000000..90eaadd7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/random_r.3 @@ -0,0 +1,179 @@ +'\" t +.\" Copyright 2008 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" +.TH random_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +random_r, srandom_r, initstate_r, setstate_r \- reentrant +random number generator +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int random_r(struct random_data *restrict " buf , +.BI " int32_t *restrict " result ); +.BI "int srandom_r(unsigned int " seed ", struct random_data *" buf ); +.PP +.BI "int initstate_r(unsigned int " seed ", \ +char " statebuf "[restrict ." statelen ], +.BI " size_t " statelen ", struct random_data *restrict " buf ); +.BI "int setstate_r(char *restrict " statebuf , +.BI " struct random_data *restrict " buf ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR random_r (), +.BR srandom_r (), +.BR initstate_r (), +.BR setstate_r (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +These functions are the reentrant equivalents +of the functions described in +.BR random (3). +They are suitable for use in multithreaded programs where each thread +needs to obtain an independent, reproducible sequence of random numbers. +.PP +The +.BR random_r () +function is like +.BR random (3), +except that instead of using state information maintained +in a global variable, +it uses the state information in the argument pointed to by +.IR buf , +which must have been previously initialized by +.BR initstate_r (). +The generated random number is returned in the argument +.IR result . +.PP +The +.BR srandom_r () +function is like +.BR srandom (3), +except that it initializes the seed for the random number generator +whose state is maintained in the object pointed to by +.IR buf , +which must have been previously initialized by +.BR initstate_r (), +instead of the seed associated with the global state variable. +.PP +The +.BR initstate_r () +function is like +.BR initstate (3) +except that it initializes the state in the object pointed to by +.IR buf , +rather than initializing the global state variable. +Before calling this function, the +.I buf.state +field must be initialized to NULL. +The +.BR initstate_r () +function records a pointer to the +.I statebuf +argument inside the structure pointed to by +.IR buf . +Thus, +.I statebuf +should not be deallocated so long as +.I buf +is still in use. +(So, +.I statebuf +should typically be allocated as a static variable, +or allocated on the heap using +.BR malloc (3) +or similar.) +.PP +The +.BR setstate_r () +function is like +.BR setstate (3) +except that it modifies the state in the object pointed to by +.IR buf , +rather than modifying the global state variable. +\fIstate\fP must first have been initialized +using +.BR initstate_r () +or be the result of a previous call of +.BR setstate_r (). +.SH RETURN VALUE +All of these functions return 0 on success. +On error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +A state array of less than 8 bytes was specified to +.BR initstate_r (). +.TP +.B EINVAL +The +.I statebuf +or +.I buf +argument to +.BR setstate_r () +was NULL. +.TP +.B EINVAL +The +.I buf +or +.I result +argument to +.BR random_r () +was NULL. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR random_r (), +.BR srandom_r (), +.BR initstate_r (), +.BR setstate_r () +T} Thread safety MT-Safe race:buf +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.\" These functions appear to be on Tru64, but don't seem to be on +.\" Solaris, HP-UX, or FreeBSD. +.SH BUGS +The +.BR initstate_r () +interface is confusing. +.\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=3662 +It appears that the +.I random_data +type is intended to be opaque, +but the implementation requires the user to either initialize the +.I buf.state +field to NULL or zero out the entire structure before the call. +.SH SEE ALSO +.BR drand48 (3), +.BR rand (3), +.BR random (3) diff --git a/upstream/opensuse-leap-15-6/man3/rcmd.3 b/upstream/opensuse-leap-15-6/man3/rcmd.3 new file mode 100644 index 00000000..6cc31ed4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rcmd.3 @@ -0,0 +1,303 @@ +'\" t +.\" $NetBSD: rcmd.3,v 1.9 1996/05/28 02:07:39 mrg Exp $ +.\" +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)rcmd.3 8.1 (Berkeley) 6/4/93 +.\" +.\" Contributed as Linux man page by David A. Holland, 970908 +.\" I have not checked whether the Linux situation is exactly the same. +.\" +.\" 2007-12-08, mtk, Converted from mdoc to man macros +.\" +.TH rcmd 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rcmd, rresvport, iruserok, ruserok, rcmd_af, +rresvport_af, iruserok_af, ruserok_af \- routines for returning a +stream to a remote command +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#include " "/* Or on some systems */" +.PP +.BI "int rcmd(char **restrict " ahost ", unsigned short " inport , +.BI " const char *restrict " locuser , +.BI " const char *restrict " remuser , +.BI " const char *restrict " cmd ", int *restrict " fd2p ); +.PP +.BI "int rresvport(int *" port ); +.PP +.BI "int iruserok(uint32_t " raddr ", int " superuser , +.BI " const char *" ruser ", const char *" luser ); +.BI "int ruserok(const char *" rhost ", int " superuser , +.BI " const char *" ruser ", const char *" luser ); +.PP +.BI "int rcmd_af(char **restrict " ahost ", unsigned short " inport , +.BI " const char *restrict " locuser , +.BI " const char *restrict " remuser , +.BI " const char *restrict " cmd ", int *restrict " fd2p , +.BI " sa_family_t " af ); +.PP +.BI "int rresvport_af(int *" port ", sa_family_t " af ); +.PP +.BI "int iruserok_af(const void *restrict " raddr ", int " superuser , +.BI " const char *restrict " ruser ", const char *restrict " luser , +.BI " sa_family_t " af ); +.BI "int ruserok_af(const char *" rhost ", int " superuser , +.BI " const char *" ruser ", const char *" luser , +.BI " sa_family_t " af ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.ad l +.PP +.BR rcmd (), +.BR rcmd_af (), +.BR rresvport (), +.BR rresvport_af (), +.BR iruserok (), +.BR iruserok_af (), +.BR ruserok (), +.BR ruserok_af (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.ad +.SH DESCRIPTION +The +.BR rcmd () +function is used by the superuser to execute a command on +a remote machine using an authentication scheme based +on privileged port numbers. +The +.BR rresvport () +function +returns a file descriptor to a socket +with an address in the privileged port space. +The +.BR iruserok () +and +.BR ruserok () +functions are used by servers +to authenticate clients requesting service with +.BR rcmd (). +All four functions are used by the +.BR rshd (8) +server (among others). +.SS rcmd() +The +.BR rcmd () +function +looks up the host +.I *ahost +using +.BR gethostbyname (3), +returning \-1 if the host does not exist. +Otherwise, +.I *ahost +is set to the standard name of the host +and a connection is established to a server +residing at the well-known Internet port +.IR inport . +.PP +If the connection succeeds, +a socket in the Internet domain of type +.B SOCK_STREAM +is returned to the caller, and given to the remote +command as +.I stdin +and +.IR stdout . +If +.I fd2p +is nonzero, then an auxiliary channel to a control +process will be set up, and a file descriptor for it will be placed +in +.IR *fd2p . +The control process will return diagnostic +output from the command (unit 2) on this channel, and will also +accept bytes on this channel as being UNIX signal numbers, to be +forwarded to the process group of the command. +If +.I fd2p +is 0, then the +.I stderr +(unit 2 of the remote +command) will be made the same as the +.I stdout +and no +provision is made for sending arbitrary signals to the remote process, +although you may be able to get its attention by using out-of-band data. +.PP +The protocol is described in detail in +.BR rshd (8). +.SS rresvport() +The +.BR rresvport () +function is used to obtain a socket with a privileged +port bound to it. +This socket is suitable for use by +.BR rcmd () +and several other functions. +Privileged ports are those in the range 0 to 1023. +Only a privileged process +(on Linux, a process that has the +.B CAP_NET_BIND_SERVICE +capability in the user namespace governing its network namespace) +is allowed to bind to a privileged port. +In the glibc implementation, +this function restricts its search to the ports from 512 to 1023. +The +.I port +argument is value-result: +the value it supplies to the call is used as the starting point +for a circular search of the port range; +on (successful) return, it contains the port number that was bound to. +.\" +.SS iruserok() and ruserok() +The +.BR iruserok () +and +.BR ruserok () +functions take a remote host's IP address or name, respectively, +two usernames and a flag indicating whether the local user's +name is that of the superuser. +Then, if the user is +.I not +the superuser, it checks the +.I /etc/hosts.equiv +file. +If that lookup is not done, or is unsuccessful, the +.I .rhosts +in the local user's home directory is checked to see if the request for +service is allowed. +.PP +If this file does not exist, is not a regular file, is owned by anyone +other than the user or the superuser, is writable by anyone other +than the owner, or is hardlinked anywhere, the check automatically fails. +Zero is returned if the machine name is listed in the +.I hosts.equiv +file, or the host and remote username are found in the +.I .rhosts +file; otherwise +.BR iruserok () +and +.BR ruserok () +return \-1. +If the local domain (as obtained from +.BR gethostname (2)) +is the same as the remote domain, only the machine name need be specified. +.PP +If the IP address of the remote host is known, +.BR iruserok () +should be used in preference to +.BR ruserok (), +as it does not require trusting the DNS server for the remote host's domain. +.SS *_af() variants +All of the functions described above work with IPv4 +.RB ( AF_INET ) +sockets. +The "_af" variants take an extra argument that allows the +socket address family to be specified. +For these functions, the +.I af +argument can be specified as +.B AF_INET +or +.BR AF_INET6 . +In addition, +.BR rcmd_af () +supports the use of +.BR AF_UNSPEC . +.SH RETURN VALUE +The +.BR rcmd () +function +returns a valid socket descriptor on success. +It returns \-1 on error and prints a diagnostic message on the standard error. +.PP +The +.BR rresvport () +function +returns a valid, bound socket descriptor on success. +On failure, it returns \-1 and sets +.I errno +to indicate the error. +The error code +.B EAGAIN +is overloaded to mean: "All network ports in use". +.PP +For information on the return from +.BR ruserok () +and +.BR iruserok (), +see above. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rcmd (), +.BR rcmd_af () +T} Thread safety MT-Unsafe +T{ +.BR rresvport (), +.BR rresvport_af () +T} Thread safety MT-Safe +T{ +.BR iruserok (), +.BR ruserok (), +.BR iruserok_af (), +.BR ruserok_af () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +.TP +.BR iruserok_af () +.TQ +.BR rcmd_af () +.TQ +.BR rresvport_af () +.TQ +.BR ruserok_af () +glibc 2.2. +.PP +Solaris, 4.2BSD. +The "_af" variants are more recent additions, +and are not present on as wide a range of systems. +.SH BUGS +.BR iruserok () +and +.BR iruserok_af () +are declared in glibc headers only since glibc 2.12. +.\" Bug filed 25 Nov 2007: +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=5399 +.SH SEE ALSO +.BR rlogin (1), +.BR rsh (1), +.BR rexec (3), +.BR rexecd (8), +.BR rlogind (8), +.BR rshd (8) diff --git a/upstream/opensuse-leap-15-6/man3/re_comp.3 b/upstream/opensuse-leap-15-6/man3/re_comp.3 new file mode 100644 index 00000000..4713ef37 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/re_comp.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk) +.\" +.TH re_comp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +re_comp, re_exec \- BSD regex functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #define _REGEX_RE_COMP +.B #include +.B #include +.PP +.BI "[[deprecated]] char *re_comp(const char *" regex ); +.BI "[[deprecated]] int re_exec(const char *" string ); +.fi +.SH DESCRIPTION +.BR re_comp () +is used to compile the null-terminated regular expression pointed to by +.IR regex . +The compiled pattern occupies a static area, the pattern buffer, +which is overwritten by subsequent use of +.BR re_comp (). +If +.I regex +is NULL, +no operation is performed and the pattern buffer's contents are not +altered. +.PP +.BR re_exec () +is used to assess whether the null-terminated string pointed to by +.I string +matches the previously compiled +.IR regex . +.SH RETURN VALUE +.BR re_comp () +returns NULL on successful compilation of +.I regex +otherwise it returns a pointer to an appropriate error message. +.PP +.BR re_exec () +returns 1 for a successful match, zero for failure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR re_comp (), +.BR re_exec () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +.PP +These functions are obsolete; the functions documented in +.BR regcomp (3) +should be used instead. +.SH SEE ALSO +.BR regcomp (3), +.BR regex (7), +GNU regex manual diff --git a/upstream/opensuse-leap-15-6/man3/readdir.3 b/upstream/opensuse-leap-15-6/man3/readdir.3 new file mode 100644 index 00000000..55952b1b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/readdir.3 @@ -0,0 +1,307 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2008, 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 16:09:49 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl) +.\" Modified 22 July 1996 by Andries Brouwer (aeb@cwi.nl) +.\" 2007-07-30 Ulrich Drepper , mtk: +.\" Rework discussion of nonstandard structure fields. +.\" +.TH readdir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +readdir \- read a directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "struct dirent *readdir(DIR *" dirp ); +.fi +.SH DESCRIPTION +The +.BR readdir () +function returns a pointer to a \fIdirent\fP structure +representing the next directory entry in the directory stream pointed +to by \fIdirp\fP. +It returns NULL on reaching the end of the directory stream or if +an error occurred. +.PP +In the glibc implementation, the +.I dirent +structure is defined as follows: +.PP +.in +4n +.EX +struct dirent { + ino_t d_ino; /* Inode number */ + off_t d_off; /* Not an offset; see below */ + unsigned short d_reclen; /* Length of this record */ + unsigned char d_type; /* Type of file; not supported + by all filesystem types */ + char d_name[256]; /* Null\-terminated filename */ +}; +.EE +.in +.PP +The only fields in the +.I dirent +structure that are mandated by POSIX.1 are +.I d_name +and +.IR d_ino . +The other fields are unstandardized, and not present on all systems; +see NOTES below for some further details. +.PP +The fields of the +.I dirent +structure are as follows: +.TP +.I d_ino +This is the inode number of the file. +.TP +.I d_off +The value returned in +.I d_off +is the same as would be returned by calling +.BR telldir (3) +at the current position in the directory stream. +Be aware that despite its type and name, the +.I d_off +field is seldom any kind of directory offset on modern filesystems. +.\" https://lwn.net/Articles/544298/ +Applications should treat this field as an opaque value, +making no assumptions about its contents; see also +.BR telldir (3). +.TP +.I d_reclen +This is the size (in bytes) of the returned record. +This may not match the size of the structure definition shown above; +see NOTES. +.TP +.I d_type +This field contains a value indicating the file type, +making it possible to avoid the expense of calling +.BR lstat (2) +if further actions depend on the type of the file. +.IP +When a suitable feature test macro is defined +.RB ( _DEFAULT_SOURCE +since glibc 2.19, or +.B _BSD_SOURCE +on glibc 2.19 and earlier), +glibc defines the following macro constants for the value returned in +.IR d_type : +.RS +.TP 12 +.B DT_BLK +This is a block device. +.TP +.B DT_CHR +This is a character device. +.TP +.B DT_DIR +This is a directory. +.TP +.B DT_FIFO +This is a named pipe (FIFO). +.TP +.B DT_LNK +This is a symbolic link. +.TP +.B DT_REG +This is a regular file. +.TP +.B DT_SOCK +This is a UNIX domain socket. +.TP +.B DT_UNKNOWN +The file type could not be determined. +.RE +.IP +Currently, +.\" kernel 2.6.27 +.\" The same sentence is in getdents.2 +only some filesystems (among them: Btrfs, ext2, ext3, and ext4) +have full support for returning the file type in +.IR d_type . +All applications must properly handle a return of +.BR DT_UNKNOWN . +.TP +.I d_name +This field contains the null terminated filename. +.IR "See NOTES" . +.PP +The data returned by +.BR readdir () +may be overwritten by subsequent calls to +.BR readdir () +for the same directory stream. +.SH RETURN VALUE +On success, +.BR readdir () +returns a pointer to a +.I dirent +structure. +(This structure may be statically allocated; do not attempt to +.BR free (3) +it.) +.PP +If the end of the directory stream is reached, NULL is returned and +.I errno +is not changed. +If an error occurs, NULL is returned and +.I errno +is set to indicate the error. +To distinguish end of stream from an error, set +.I errno +to zero before calling +.BR readdir () +and then check the value of +.I errno +if NULL is returned. +.SH ERRORS +.TP +.B EBADF +Invalid directory stream descriptor \fIdirp\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR readdir () +T} Thread safety MT-Unsafe race:dirstream +.TE +.hy +.ad +.sp 1 +.PP +In the current POSIX.1 specification (POSIX.1-2008), +.BR readdir () +is not required to be thread-safe. +However, in modern implementations (including the glibc implementation), +concurrent calls to +.BR readdir () +that specify different directory streams are thread-safe. +In cases where multiple threads must read from the same directory stream, +using +.BR readdir () +with external synchronization is still preferable to the use of the deprecated +.BR readdir_r (3) +function. +It is expected that a future version of POSIX.1 +.\" FIXME . +.\" http://www.austingroupbugs.net/view.php?id=696 +will require that +.BR readdir () +be thread-safe when concurrently employed on different directory streams. +.SH VERSIONS +Only the fields +.I d_name +and (as an XSI extension) +.I d_ino +are specified in POSIX.1. +.\" POSIX.1-2001, POSIX.1-2008 +Other than Linux, the +.I d_type +field is available mainly only on BSD systems. +The remaining fields are available on many, but not all systems. +Under glibc, +programs can check for the availability of the fields not defined +in POSIX.1 by testing whether the macros +.BR _DIRENT_HAVE_D_NAMLEN , +.BR _DIRENT_HAVE_D_RECLEN , +.BR _DIRENT_HAVE_D_OFF , +or +.B _DIRENT_HAVE_D_TYPE +are defined. +.\" +.SS The d_name field +The +.I dirent +structure definition shown above is taken from the glibc headers, +and shows the +.I d_name +field with a fixed size. +.PP +.IR Warning : +applications should avoid any dependence on the size of the +.I d_name +field. +POSIX defines it as +.IR "char\ d_name[]", +a character array of unspecified size, with at most +.B NAME_MAX +characters preceding the terminating null byte (\[aq]\e0\[aq]). +.PP +POSIX.1 explicitly notes that this field should not be used as an lvalue. +The standard also notes that the use of +.I sizeof(d_name) +is incorrect; use +.I strlen(d_name) +instead. +(On some systems, this field is defined as +.IR char\~d_name[1] !) +By implication, the use +.I sizeof(struct dirent) +to capture the size of the record including the size of +.I d_name +is also incorrect. +.PP +Note that while the call +.PP +.in +4n +.EX +fpathconf(fd, _PC_NAME_MAX) +.EE +.in +.PP +returns the value 255 for most filesystems, +on some filesystems (e.g., CIFS, Windows SMB servers), +the null-terminated filename that is (correctly) returned in +.I d_name +can actually exceed this size. +In such cases, the +.I d_reclen +field will contain a value that exceeds the size of the glibc +.I dirent +structure shown above. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH NOTES +A directory stream is opened using +.BR opendir (3). +.PP +The order in which filenames are read by successive calls to +.BR readdir () +depends on the filesystem implementation; +it is unlikely that the names will be sorted in any fashion. +.SH SEE ALSO +.BR getdents (2), +.BR read (2), +.BR closedir (3), +.BR dirfd (3), +.BR ftw (3), +.BR offsetof (3), +.BR opendir (3), +.BR readdir_r (3), +.BR rewinddir (3), +.BR scandir (3), +.BR seekdir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/readdir.3am b/upstream/opensuse-leap-15-6/man3/readdir.3am new file mode 100644 index 00000000..cbc221df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/readdir.3am @@ -0,0 +1,106 @@ +.TH READDIR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +readdir \- directory input parser for gawk +.SH SYNOPSIS +.ft CW +@load "readdir" +.ft R +.SH DESCRIPTION +The +.I readdir +extension +adds an input parser for directories. +.PP +When this extension is in use, instead of skipping directories named +on the command line (or with +.BR getline ), +they are read, with each entry returned as a record. +.PP +The record consists of three fields. The first two are the inode number and the +filename, separated by a forward slash character. +On systems where the directory entry contains the file type, the record +has a third field which is a single letter indicating the type of the +file: +.B f +for file, +.B d +for directory, +.B b +for a block device, +.B c +for a character device, +.B p +for a FIFO, +.B l +for a symbolic link, +.B s +for a socket, and +.B u +(unknown) for anything else. +.PP +On systems without the file type information, the third field is always +.BR u . +.SH NOTES +On GNU/Linux systems, there are filesystems that don't support the +.B d_type +entry (see +.IR readdir (3)), +and so the file type is always +.BR u . +You can use the +.I filefuncs +extension to call +.I stat() +in order to get correct type information. +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "readdir" +\&... +BEGIN { FS = "/" } +{ print "file name is", $2 } +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.PP +.IR opendir (3), +.IR readdir (3), +.IR stat (2). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/readdir_r.3 b/upstream/opensuse-leap-15-6/man3/readdir_r.3 new file mode 100644 index 00000000..38e2ba61 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/readdir_r.3 @@ -0,0 +1,148 @@ +'\" t +.\" Copyright (C) 2008, 2016 Michael Kerrisk +.\" and Copyright (C) 2016 Florian Weimer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH readdir_r 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +readdir_r \- read a directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int readdir_r(DIR *restrict " dirp , +.BI " struct dirent *restrict " entry , +.BI " struct dirent **restrict " result ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR readdir_r (): +.nf + _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +This function is deprecated; use +.BR readdir (3) +instead. +.PP +The +.BR readdir_r () +function was invented as a reentrant version of +.BR readdir (3). +It reads the next directory entry from the directory stream +.IR dirp , +and returns it in the caller-allocated buffer pointed to by +.IR entry . +For details of the +.I dirent +structure, see +.BR readdir (3). +.PP +A pointer to the returned buffer is placed in +.IR *result ; +if the end of the directory stream was encountered, +then NULL is instead returned in +.IR *result . +.PP +It is recommended that applications use +.BR readdir (3) +instead of +.BR readdir_r (). +Furthermore, since glibc 2.24, glibc deprecates +.BR readdir_r (). +The reasons are as follows: +.IP \[bu] 3 +On systems where +.B NAME_MAX +is undefined, calling +.BR readdir_r () +may be unsafe because the interface does not allow the caller to specify +the length of the buffer used for the returned directory entry. +.IP \[bu] +On some systems, +.BR readdir_r () +can't read directory entries with very long names. +When the glibc implementation encounters such a name, +.BR readdir_r () +fails with the error +.B ENAMETOOLONG +.IR "after the final directory entry has been read" . +On some other systems, +.BR readdir_r () +may return a success status, but the returned +.I d_name +field may not be null terminated or may be truncated. +.IP \[bu] +In the current POSIX.1 specification (POSIX.1-2008), +.BR readdir (3) +is not required to be thread-safe. +However, in modern implementations (including the glibc implementation), +concurrent calls to +.BR readdir (3) +that specify different directory streams are thread-safe. +Therefore, the use of +.BR readdir_r () +is generally unnecessary in multithreaded programs. +In cases where multiple threads must read from the same directory stream, +using +.BR readdir (3) +with external synchronization is still preferable to the use of +.BR readdir_r (), +for the reasons given in the points above. +.IP \[bu] +It is expected that a future version of POSIX.1 +.\" FIXME . +.\" http://www.austingroupbugs.net/view.php?id=696 +will make +.BR readdir_r () +obsolete, and require that +.BR readdir (3) +be thread-safe when concurrently employed on different directory streams. +.SH RETURN VALUE +The +.BR readdir_r () +function returns 0 on success. +On error, it returns a positive error number (listed under ERRORS). +If the end of the directory stream is reached, +.BR readdir_r () +returns 0, and returns NULL in +.IR *result . +.SH ERRORS +.TP +.B EBADF +Invalid directory stream descriptor \fIdirp\fP. +.TP +.B ENAMETOOLONG +A directory entry whose name was too long to be read was encountered. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR readdir_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR readdir (3) diff --git a/upstream/opensuse-leap-15-6/man3/readfile.3am b/upstream/opensuse-leap-15-6/man3/readfile.3am new file mode 100644 index 00000000..a10815a4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/readfile.3am @@ -0,0 +1,88 @@ +.TH READFILE 3am "Mar 24 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +readfile \- return the entire contents of a file as a string +.SH SYNOPSIS +.ft CW +@load "readfile" +.sp +result = readfile("/some/path") +.sp +.ft R +For making whole files be single records: +.sp +.ft CW +@load "readfile" +.br +BEGIN { PROCINFO["readfile"] = 1 } +.ft R +.SH DESCRIPTION +The +.I readfile +extension adds a single function named +.BR readfile() . +The argument is the name of the file to read. +The return value is a string containing the entire contents of +the requested file. +.PP +Upon error, the function returns the empty string and sets +.BR ERRNO . +.PP +In addition, it adds an input parser that is activated if +.ft CW +PROCINFO["readfile"] +.ft R +exists. +When activated, each input file is returned in its entirety as \f(CW$0\fR. +\f(CWRT\fP is set to the null string. +.\" .SH NOTES +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "readfile" +\&... +contents = readfile("/path/to/file"); +if (contents == "" && ERRNO != "") { + print("problem reading file", ERRNO) > "/dev/stderr" + ... +} +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, 2014, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/realpath.3 b/upstream/opensuse-leap-15-6/man3/realpath.3 new file mode 100644 index 00000000..5fa227f8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/realpath.3 @@ -0,0 +1,234 @@ +'\" t +.\" Copyright (C) 1999 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Rewritten old page, 990824, aeb@cwi.nl +.\" 2004-12-14, mtk, added discussion of resolved_path == NULL +.\" +.TH realpath 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +realpath \- return the canonicalized absolute pathname +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "char *realpath(const char *restrict " path , +.BI " char *restrict " resolved_path ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR realpath (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE +.fi +.SH DESCRIPTION +.BR realpath () +expands all symbolic links and resolves references +to +.IR "/./" ", " "/../" +and extra \[aq]/\[aq] +characters in the null-terminated string named by +.I path +to produce a canonicalized absolute pathname. +The resulting pathname is stored as a null-terminated string, +up to a maximum of +.B PATH_MAX +bytes, +in the buffer pointed to by +.IR resolved_path . +The resulting path will have no symbolic link, +.I "/./" +or +.I "/../" +components. +.PP +If +.I resolved_path +is specified as NULL, then +.BR realpath () +uses +.BR malloc (3) +to allocate a buffer of up to +.B PATH_MAX +bytes to hold the resolved pathname, +and returns a pointer to this buffer. +The caller should deallocate this buffer using +.BR free (3). +.\" Even if we use resolved_path == NULL, then realpath() will still +.\" return ENAMETOOLONG if the resolved pathname would exceed PATH_MAX +.\" bytes -- MTK, Dec 04 +.SH RETURN VALUE +If there is no error, +.BR realpath () +returns a pointer to the +.IR resolved_path . +.PP +Otherwise, it returns NULL, the contents +of the array +.I resolved_path +are undefined, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EACCES +Read or search permission was denied for a component of the path prefix. +.TP +.B EINVAL +.I path +is NULL. +.\" (In libc5 this would just cause a segfault.) +(Before glibc 2.3, +this error is also returned if +.I resolved_path +is NULL.) +.TP +.B EIO +An I/O error occurred while reading from the filesystem. +.TP +.B ELOOP +Too many symbolic links were encountered in translating the pathname. +.TP +.B ENAMETOOLONG +A component of a pathname exceeded +.B NAME_MAX +characters, or an entire pathname exceeded +.B PATH_MAX +characters. +.TP +.B ENOENT +The named file does not exist. +.TP +.B ENOMEM +Out of memory. +.TP +.B ENOTDIR +A component of the path prefix is not a directory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR realpath () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.SS GNU extensions +If the call fails with either +.B EACCES +or +.B ENOENT +and +.I resolved_path +is not NULL, then the prefix of +.I path +that is not readable or does not exist is returned in +.IR resolved_path . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +4.4BSD, POSIX.1-2001, Solaris. +.PP +POSIX.1-2001 says that the behavior if +.I resolved_path +is NULL is implementation-defined. +POSIX.1-2008 specifies the behavior described in this page. +.PP +In 4.4BSD and Solaris, the limit on the pathname length is +.B MAXPATHLEN +(found in \fI\fP). +SUSv2 prescribes +.B PATH_MAX +and +.BR NAME_MAX , +as found in \fI\fP or provided by the +.BR pathconf (3) +function. +A typical source fragment would be +.PP +.in +4n +.EX +#ifdef PATH_MAX + path_max = PATH_MAX; +#else + path_max = pathconf(path, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 4096; +#endif +.EE +.in +.PP +(But see the BUGS section.) +.\".PP +.\" 2012-05-05, According to Casper Dik, the statement about +.\" Solaris was not true at least as far back as 1997, and +.\" may never have been true. +.\" +.\" The 4.4BSD, Linux and SUSv2 versions always return an absolute +.\" pathname. +.\" Solaris may return a relative pathname when the +.\" .I path +.\" argument is relative. +.\" The prototype of +.\" .BR realpath () +.\" is given in \fI\fP in libc4 and libc5, +.\" but in \fI\fP everywhere else. +.SH BUGS +The POSIX.1-2001 standard version of this function is broken by design, +since it is impossible to determine a suitable size for the output buffer, +.IR resolved_path . +According to POSIX.1-2001 a buffer of size +.B PATH_MAX +suffices, but +.B PATH_MAX +need not be a defined constant, and may have to be obtained using +.BR pathconf (3). +And asking +.BR pathconf (3) +does not really help, since, on the one hand POSIX warns that +the result of +.BR pathconf (3) +may be huge and unsuitable for mallocing memory, +and on the other hand +.BR pathconf (3) +may return \-1 to signify that +.B PATH_MAX +is not bounded. +The +.I "resolved_path\ ==\ NULL" +feature, not standardized in POSIX.1-2001, +but standardized in POSIX.1-2008, allows this design problem to be avoided. +.\" .LP +.\" The libc4 and libc5 implementation contained a buffer overflow +.\" (fixed in libc-5.4.13). +.\" Thus, set-user-ID programs like +.\" .BR mount (8) +.\" needed a private version. +.SH SEE ALSO +.BR realpath (1), +.BR readlink (2), +.BR canonicalize_file_name (3), +.BR getcwd (3), +.BR pathconf (3), +.BR sysconf (3) diff --git a/upstream/opensuse-leap-15-6/man3/recno.3 b/upstream/opensuse-leap-15-6/man3/recno.3 new file mode 100644 index 00000000..53ff0ed2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/recno.3 @@ -0,0 +1,207 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)recno.3 8.5 (Berkeley) 8/18/94 +.\" +.TH recno 3 2022-12-04 "Linux man-pages 6.04" +.UC 7 +.SH NAME +recno \- record number database access method +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.ft B +#include +#include +.ft R +.fi +.SH DESCRIPTION +.IR "Note well" : +This page documents interfaces provided up until glibc 2.1. +Since glibc 2.2, glibc no longer provides these interfaces. +Probably, you are looking for the APIs provided by the +.I libdb +library instead. +.PP +The routine +.BR dbopen (3) +is the library interface to database files. +One of the supported file formats is record number files. +The general description of the database access methods is in +.BR dbopen (3), +this manual page describes only the recno-specific information. +.PP +The record number data structure is either variable or fixed-length +records stored in a flat-file format, accessed by the logical record +number. +The existence of record number five implies the existence of records +one through four, and the deletion of record number one causes +record number five to be renumbered to record number four, as well +as the cursor, if positioned after record number one, to shift down +one record. +.PP +The recno access-method-specific data structure provided to +.BR dbopen (3) +is defined in the +.I +include file as follows: +.PP +.in +4n +.EX +typedef struct { + unsigned long flags; + unsigned int cachesize; + unsigned int psize; + int lorder; + size_t reclen; + unsigned char bval; + char *bfname; +} RECNOINFO; +.EE +.in +.PP +The elements of this structure are defined as follows: +.TP +.I flags +The flag value is specified by ORing +any of the following values: +.RS +.TP +.B R_FIXEDLEN +The records are fixed-length, not byte delimited. +The structure element +.I reclen +specifies the length of the record, and the structure element +.I bval +is used as the pad character. +Any records, inserted into the database, that are less than +.I reclen +bytes long are automatically padded. +.TP +.B R_NOKEY +In the interface specified by +.BR dbopen (3), +the sequential record retrieval fills in both the caller's key and +data structures. +If the +.B R_NOKEY +flag is specified, the +.I cursor +routines are not required to fill in the key structure. +This permits applications to retrieve records at the end of files without +reading all of the intervening records. +.TP +.B R_SNAPSHOT +This flag requires that a snapshot of the file be taken when +.BR dbopen (3) +is called, instead of permitting any unmodified records to be read from +the original file. +.RE +.TP +.I cachesize +A suggested maximum size, in bytes, of the memory cache. +This value is +.B only +advisory, and the access method will allocate more memory rather than fail. +If +.I cachesize +is 0 (no size is specified), a default cache is used. +.TP +.I psize +The recno access method stores the in-memory copies of its records +in a btree. +This value is the size (in bytes) of the pages used for nodes in that tree. +If +.I psize +is 0 (no page size is specified), a page size is chosen based on the +underlying filesystem I/O block size. +See +.BR btree (3) +for more information. +.TP +.I lorder +The byte order for integers in the stored database metadata. +The number should represent the order as an integer; for example, +big endian order would be the number 4,321. +If +.I lorder +is 0 (no order is specified), the current host order is used. +.TP +.I reclen +The length of a fixed-length record. +.TP +.I bval +The delimiting byte to be used to mark the end of a record for +variable-length records, and the pad character for fixed-length +records. +If no value is specified, newlines ("\en") are used to mark the end +of variable-length records and fixed-length records are padded with +spaces. +.TP +.I bfname +The recno access method stores the in-memory copies of its records +in a btree. +If +.I bfname +is non-NULL, it specifies the name of the btree file, +as if specified as the filename for a +.BR dbopen (3) +of a btree file. +.PP +The data part of the key/data pair used by the +.I recno +access method +is the same as other access methods. +The key is different. +The +.I data +field of the key should be a pointer to a memory location of type +.IR recno_t , +as defined in the +.I +include file. +This type is normally the largest unsigned integral type available to +the implementation. +The +.I size +field of the key should be the size of that type. +.PP +Because there can be no metadata associated with the underlying +recno access method files, any changes made to the default values +(e.g., fixed record length or byte separator value) must be explicitly +specified each time the file is opened. +.PP +In the interface specified by +.BR dbopen (3), +using the +.I put +interface to create a new record will cause the creation of multiple, +empty records if the record number is more than one greater than the +largest record currently in the database. +.SH ERRORS +The +.I recno +access method routines may fail and set +.I errno +for any of the errors specified for the library routine +.BR dbopen (3) +or the following: +.TP +.B EINVAL +An attempt was made to add a record to a fixed-length database that +was too large to fit. +.SH BUGS +Only big and little endian byte order is supported. +.SH SEE ALSO +.BR btree (3), +.BR dbopen (3), +.BR hash (3), +.BR mpool (3) +.PP +.IR "Document Processing in a Relational Database System" , +Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman, +Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982. diff --git a/upstream/opensuse-leap-15-6/man3/refresh.3ncurses b/upstream/opensuse-leap-15-6/man3/refresh.3ncurses new file mode 100644 index 00000000..5505f6dc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/refresh.3ncurses @@ -0,0 +1,143 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_refresh.3x,v 1.17 2016/10/15 16:45:45 tom Exp $ +.TH refresh 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBdoupdate\fR, +\fBredrawwin\fR, +\fBrefresh\fR, +\fBwnoutrefresh\fR, +\fBwredrawln\fR, +\fBwrefresh\fR \- refresh \fBcurses\fR windows and lines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint refresh(void);\fR +.br +\fBint wrefresh(WINDOW *win);\fR +.br +\fBint wnoutrefresh(WINDOW *win);\fR +.br +\fBint doupdate(void);\fR +.br +\fBint redrawwin(WINDOW *win);\fR +.br +\fBint wredrawln(WINDOW *win, int beg_line, int num_lines);\fR +.br +.SH DESCRIPTION +.SS refresh/wrefresh +The \fBrefresh\fR and \fBwrefresh\fR routines (or \fBwnoutrefresh\fR and +\fBdoupdate\fR) must be called to get actual output to the terminal, as other +routines merely manipulate data structures. +The routine \fBwrefresh\fR copies +the named window to the physical terminal screen, taking into account what is +already there to do optimizations. +The \fBrefresh\fR routine is the +same, using \fBstdscr\fR as the default window. +Unless \fBleaveok\fR has been +enabled, the physical cursor of the terminal is left at the location of the +cursor for that window. +.SS wnoutrefresh/doupdate +.PP +The \fBwnoutrefresh\fR and \fBdoupdate\fR routines allow multiple updates with +more efficiency than \fBwrefresh\fR alone. +In addition to all the window +structures, \fBcurses\fR keeps two data structures representing the terminal +screen: a physical screen, describing what is actually on the screen, and a +virtual screen, describing what the programmer wants to have on the screen. +.PP +The routine \fBwrefresh\fR works by first calling \fBwnoutrefresh\fR, which +copies the named window to the virtual screen, and then calling \fBdoupdate\fR, +which compares the virtual screen to the physical screen and does the actual +update. +If the programmer wishes to output several windows at once, a series +of calls to \fBwrefresh\fR results in alternating calls to \fBwnoutrefresh\fR +and \fBdoupdate\fR, causing several bursts of output to the screen. +By first +calling \fBwnoutrefresh\fR for each window, it is then possible to call +\fBdoupdate\fR once, resulting in only one burst of output, with fewer total +characters transmitted and less CPU time used. +If the \fIwin\fR argument to +\fBwrefresh\fR is the global variable \fBcurscr\fR, the screen is immediately +cleared and repainted from scratch. +.PP +The phrase "copies the named window to the virtual screen" above is ambiguous. +What actually happens is that all \fItouched\fR (changed) lines in the window +are copied to the virtual screen. +This affects programs that use overlapping +windows; it means that if two windows overlap, you can refresh them in either +order and the overlap region will be modified only when it is explicitly +changed. +(But see the section on \fBPORTABILITY\fR below for a warning about +exploiting this behavior.) +.SS wredrawln/redrawwin +.PP +The \fBwredrawln\fR routine indicates to \fBcurses\fR that some screen lines +are corrupted and should be thrown away before anything is written over them. +It touches the indicated lines (marking them changed). +The routine \fBredrawwin\fR touches the entire window. +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +X/Open does not define any error conditions. +In this implementation +.RS 3 +.TP 5 +\fBwnoutrefresh\fP +returns an error +if the window pointer is null, or +if the window is really a pad. +.TP 5 +\fBwredrawln\fP +returns an error +if the associated call to \fBtouchln\fP returns an error. +.RE +.SH NOTES +Note that \fBrefresh\fR and \fBredrawwin\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.PP +Whether \fBwnoutrefresh\fR copies to the virtual screen the entire contents +of a window or just its changed portions has never been well-documented in +historic curses versions (including SVr4). +It might be unwise to rely on +either behavior in programs that might have to be linked with other curses +implementations. +Instead, you can do an explicit \fBtouchwin\fR before the +\fBwnoutrefresh\fR call to guarantee an entire-contents copy anywhere. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBoutopts\fR(3NCURSES) +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/regex.3 b/upstream/opensuse-leap-15-6/man3/regex.3 new file mode 100644 index 00000000..306cb633 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/regex.3 @@ -0,0 +1,380 @@ +'\" t +.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.TH regex 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +regcomp, regexec, regerror, regfree \- POSIX regex functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int regcomp(regex_t *restrict " preg ", const char *restrict " regex , +.BI " int " cflags ); +.BI "int regexec(const regex_t *restrict " preg \ +", const char *restrict " string , +.BI " size_t " nmatch ", regmatch_t " pmatch "[restrict ." nmatch ], +.BI " int " eflags ); +.PP +.BI "size_t regerror(int " errcode ", const regex_t *restrict " preg , +.BI " char " errbuf "[restrict ." errbuf_size "], \ +size_t " errbuf_size ); +.BI "void regfree(regex_t *" preg ); +.fi +.SH DESCRIPTION +.SS POSIX regex compiling +.BR regcomp () +is used to compile a regular expression into a form that is suitable +for subsequent +.BR regexec () +searches. +.PP +.BR regcomp () +is supplied with +.IR preg , +a pointer to a pattern buffer storage area; +.IR regex , +a pointer to the null-terminated string and +.IR cflags , +flags used to determine the type of compilation. +.PP +All regular expression searching must be done via a compiled pattern +buffer, thus +.BR regexec () +must always be supplied with the address of a +.BR regcomp ()-initialized +pattern buffer. +.PP +.I cflags +is the +.RB bitwise- or +of zero or more of the following: +.TP +.B REG_EXTENDED +Use +.B POSIX +Extended Regular Expression syntax when interpreting +.IR regex . +If not set, +.B POSIX +Basic Regular Expression syntax is used. +.TP +.B REG_ICASE +Do not differentiate case. +Subsequent +.BR regexec () +searches using this pattern buffer will be case insensitive. +.TP +.B REG_NOSUB +Do not report position of matches. +The +.I nmatch +and +.I pmatch +arguments to +.BR regexec () +are ignored if the pattern buffer supplied was compiled with this flag set. +.TP +.B REG_NEWLINE +Match-any-character operators don't match a newline. +.IP +A nonmatching list +.RB ( [\[ha]...] ) +not containing a newline does not match a newline. +.IP +Match-beginning-of-line operator +.RB ( \[ha] ) +matches the empty string immediately after a newline, regardless of +whether +.IR eflags , +the execution flags of +.BR regexec (), +contains +.BR REG_NOTBOL . +.IP +Match-end-of-line operator +.RB ( $ ) +matches the empty string immediately before a newline, regardless of +whether +.I eflags +contains +.BR REG_NOTEOL . +.SS POSIX regex matching +.BR regexec () +is used to match a null-terminated string +against the precompiled pattern buffer, +.IR preg . +.I nmatch +and +.I pmatch +are used to provide information regarding the location of any matches. +.I eflags +is the +.RB bitwise- or +of zero or more of the following flags: +.TP +.B REG_NOTBOL +The match-beginning-of-line operator always fails to match (but see the +compilation flag +.B REG_NEWLINE +above). +This flag may be used when different portions of a string are passed to +.BR regexec () +and the beginning of the string should not be interpreted as the +beginning of the line. +.TP +.B REG_NOTEOL +The match-end-of-line operator always fails to match (but see the +compilation flag +.B REG_NEWLINE +above). +.TP +.B REG_STARTEND +Use +.I pmatch[0] +on the input string, starting at byte +.I pmatch[0].rm_so +and ending before byte +.IR pmatch[0].rm_eo . +This allows matching embedded NUL bytes +and avoids a +.BR strlen (3) +on large strings. +It does not use +.I nmatch +on input, and does not change +.B REG_NOTBOL +or +.B REG_NEWLINE +processing. +This flag is a BSD extension, not present in POSIX. +.SS Byte offsets +Unless +.B REG_NOSUB +was set for the compilation of the pattern buffer, it is possible to +obtain match addressing information. +.I pmatch +must be dimensioned to have at least +.I nmatch +elements. +These are filled in by +.BR regexec () +with substring match addresses. +The offsets of the subexpression starting at the +.IR i th +open parenthesis are stored in +.IR pmatch[i] . +The entire regular expression's match addresses are stored in +.IR pmatch[0] . +(Note that to return the offsets of +.I N +subexpression matches, +.I nmatch +must be at least +.IR N+1 .) +Any unused structure elements will contain the value \-1. +.PP +The +.I regmatch_t +structure which is the type of +.I pmatch +is defined in +.IR . +.PP +.in +4n +.EX +typedef struct { + regoff_t rm_so; + regoff_t rm_eo; +} regmatch_t; +.EE +.in +.PP +Each +.I rm_so +element that is not \-1 indicates the start offset of the next largest +substring match within the string. +The relative +.I rm_eo +element indicates the end offset of the match, +which is the offset of the first character after the matching text. +.SS POSIX error reporting +.BR regerror () +is used to turn the error codes that can be returned by both +.BR regcomp () +and +.BR regexec () +into error message strings. +.PP +.BR regerror () +is passed the error code, +.IR errcode , +the pattern buffer, +.IR preg , +a pointer to a character string buffer, +.IR errbuf , +and the size of the string buffer, +.IR errbuf_size . +It returns the size of the +.I errbuf +required to contain the null-terminated error message string. +If both +.I errbuf +and +.I errbuf_size +are nonzero, +.I errbuf +is filled in with the first +.I "errbuf_size \- 1" +characters of the error message and a terminating null byte (\[aq]\e0\[aq]). +.SS POSIX pattern buffer freeing +Supplying +.BR regfree () +with a precompiled pattern buffer, +.IR preg , +will free the memory allocated to the pattern buffer by the compiling +process, +.BR regcomp (). +.SH RETURN VALUE +.BR regcomp () +returns zero for a successful compilation or an error code for failure. +.PP +.BR regexec () +returns zero for a successful match or +.B REG_NOMATCH +for failure. +.SH ERRORS +The following errors can be returned by +.BR regcomp (): +.TP +.B REG_BADBR +Invalid use of back reference operator. +.TP +.B REG_BADPAT +Invalid use of pattern operators such as group or list. +.TP +.B REG_BADRPT +Invalid use of repetition operators such as using \[aq]*\[aq] +as the first character. +.TP +.B REG_EBRACE +Un-matched brace interval operators. +.TP +.B REG_EBRACK +Un-matched bracket list operators. +.TP +.B REG_ECOLLATE +Invalid collating element. +.TP +.B REG_ECTYPE +Unknown character class name. +.TP +.B REG_EEND +Nonspecific error. +This is not defined by POSIX.2. +.TP +.B REG_EESCAPE +Trailing backslash. +.TP +.B REG_EPAREN +Un-matched parenthesis group operators. +.TP +.B REG_ERANGE +Invalid use of the range operator; for example, the ending point of the range +occurs prior to the starting point. +.TP +.B REG_ESIZE +Compiled regular expression requires a pattern buffer larger than 64\ kB. +This is not defined by POSIX.2. +.TP +.B REG_ESPACE +The regex routines ran out of memory. +.TP +.B REG_ESUBREG +Invalid back reference to a subexpression. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR regcomp (), +.BR regexec () +T} Thread safety MT-Safe locale +T{ +.BR regerror () +T} Thread safety MT-Safe env +T{ +.BR regfree () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +.EX +#include +#include +#include +#include + +#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(®ex, re, REG_NEWLINE)) + exit(EXIT_FAILURE); + + printf("String = \e"%s\e"\en", str); + printf("Matches:\en"); + + for (unsigned int i = 0; ; i++) { + if (regexec(®ex, s, ARRAY_SIZE(pmatch), pmatch, 0)) + break; + + off = pmatch[0].rm_so + (s \- str); + len = pmatch[0].rm_eo \- pmatch[0].rm_so; + printf("#%zu:\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 SEE ALSO +.BR grep (1), +.BR regex (7) +.PP +The glibc manual section, +.I "Regular Expressions" diff --git a/upstream/opensuse-leap-15-6/man3/remainder.3 b/upstream/opensuse-leap-15-6/man3/remainder.3 new file mode 100644 index 00000000..87d22910 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/remainder.3 @@ -0,0 +1,237 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 Walter Harms +.\" (walter.harms@informatik.uni-oldenburg.de) +.\" Modified 2003-11-18, 2004-10-05 aeb +.\" +.TH remainder 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +drem, dremf, dreml, remainder, remainderf, remainderl \- \ +floating-point remainder function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double remainder(double " x ", double " y ); +.BI "float remainderf(float " x ", float " y ); +.BI "long double remainderl(long double " x ", long double " y ); +.PP +/* Obsolete synonyms */ +.BI "[[deprecated]] double drem(double " x ", double " y ); +.BI "[[deprecated]] float dremf(float " x ", float " y ); +.BI "[[deprecated]] long double dreml(long double " x ", long double " y ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR remainder (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR remainderf (), +.BR remainderl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR drem (), +.BR dremf (), +.BR dreml (): +.nf + /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These +functions compute the remainder of dividing +.I x +by +.IR y . +The return value is +\fIx\fP\-\fIn\fP*\fIy\fP, +where +.I n +is the value +.IR "x\ /\ y" , +rounded to the nearest integer. +If the absolute value of +\fIx\fP\-\fIn\fP*\fIy\fP +is 0.5, +.I n +is chosen to be even. +.PP +These functions are unaffected by the current rounding mode (see +.BR fenv (3)). +.PP +The +.BR drem () +function does precisely the same thing. +.SH RETURN VALUE +On success, these +functions return the floating-point remainder, +\fIx\fP\-\fIn\fP*\fIy\fP. +If the return value is 0, it has the sign of +.IR x . +.PP +If +.I x +or +.I y +is a NaN, a NaN is returned. +.PP +If +.I x +is an infinity, +and +.I y +is not a NaN, +a domain error occurs, and +a NaN is returned. +.PP +If +.I y +is zero, +.\" FIXME . Instead, glibc gives a domain error even if x is a NaN +and +.I x +is not a NaN, +.\" Interestingly, remquo(3) does not have the same problem. +a domain error occurs, and +a NaN is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity and \fIy\fP is not a NaN +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.IP +These functions do not set +.I errno +for this case. +.TP +Domain error: \fIy\fP is zero\" [XXX see bug above] and \fIx\fP is not a NaN +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR drem (), +.BR dremf (), +.BR dreml (), +.BR remainder (), +.BR remainderf (), +.BR remainderl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.\" IEC 60559. +.TP +.BR remainder () +.TQ +.BR remainderf () +.TQ +.BR remainderl () +C11, POSIX.1-2008. +.TP +.BR drem () +.TQ +.BR dremf () +.TQ +.BR dreml () +None. +.SH HISTORY +.\" IEC 60559. +.TP +.BR remainder () +.TQ +.BR remainderf () +.TQ +.BR remainderl () +C99, POSIX.1-2001. +.TP +.BR drem () +4.3BSD. +.TP +.BR dremf () +.TQ +.BR dreml () +Tru64, glibc2. +.SH BUGS +Before glibc 2.15, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779 +the call +.PP +.in +4n +.EX +remainder(nan(""), 0); +.EE +.in +.PP +returned a NaN, as expected, but wrongly caused a domain error. +Since glibc 2.15, a silent NaN (i.e., no domain error) is returned. +.PP +Before glibc 2.15, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6783 +.I errno +was not set to +.B EDOM +for the domain error that occurs when +.I x +is an infinity and +.I y +is not a NaN. +.SH EXAMPLES +The call "remainder(29.0, 3.0)" returns \-1. +.SH SEE ALSO +.BR div (3), +.BR fmod (3), +.BR remquo (3) diff --git a/upstream/opensuse-leap-15-6/man3/remove.3 b/upstream/opensuse-leap-15-6/man3/remove.3 new file mode 100644 index 00000000..ba0cffee --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/remove.3 @@ -0,0 +1,96 @@ +'\" t +.\" This file is derived from unlink.2, which has the following copyright: +.\" +.\" This manpage is Copyright (C) 1992 Drew Eckhardt; +.\" and Copyright (C) 1993 Ian Jackson. +.\" +.\" Edited into remove.3 shape by: +.\" Graeme W. Wilford (G.Wilford@ee.surrey.ac.uk) on 13th July 1994 +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH remove 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +remove \- remove a file or directory +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int remove(const char *" pathname ); +.fi +.SH DESCRIPTION +.BR remove () +deletes a name from the filesystem. +It calls +.BR unlink (2) +for files, and +.BR rmdir (2) +for directories. +.PP +If the removed name was the +last link to a file and no processes have the file open, the file is +deleted and the space it was using is made available for reuse. +.PP +If the name was the last link to a file, +but any processes still have the file open, +the file will remain in existence until the last file +descriptor referring to it is closed. +.PP +If the name referred to a symbolic link, the link is removed. +.PP +If the name referred to a socket, FIFO, or device, the name is removed, +but processes which have the object open may continue to use it. +.SH RETURN VALUE +On success, zero is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +The errors that occur are those for +.BR unlink (2) +and +.BR rmdir (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR remove () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, 4.3BSD. +.\" .SH NOTES +.\" Under libc4 and libc5, +.\" .BR remove () +.\" was an alias for +.\" .BR unlink (2) +.\" (and hence would not remove directories). +.SH BUGS +Infelicities in the protocol underlying NFS can cause the unexpected +disappearance of files which are still being used. +.SH SEE ALSO +.BR rm (1), +.BR unlink (1), +.BR link (2), +.BR mknod (2), +.BR open (2), +.BR rename (2), +.BR rmdir (2), +.BR unlink (2), +.BR mkfifo (3), +.BR symlink (7) diff --git a/upstream/opensuse-leap-15-6/man3/remquo.3 b/upstream/opensuse-leap-15-6/man3/remquo.3 new file mode 100644 index 00000000..deb09850 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/remquo.3 @@ -0,0 +1,141 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" based on glibc infopages +.\" polished, aeb +.\" +.TH remquo 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +remquo, remquof, remquol \- remainder and part of quotient +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double remquo(double " x ", double " y ", int *" quo ); +.BI "float remquof(float " x ", float " y ", int *" quo ); +.BI "long double remquol(long double " x ", long double " y ", int *" quo ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR remquo (), +.BR remquof (), +.BR remquol (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions compute the remainder and part of the quotient +upon division of +.I x +by +.IR y . +A few bits of the quotient are stored via the +.I quo +pointer. +The remainder is returned as the function result. +.PP +The value of the remainder is the same as that computed by the +.BR remainder (3) +function. +.PP +The value stored via the +.I quo +pointer has the sign of +.I x\~/\~y +and agrees with the quotient in at least the low order 3 bits. +.PP +For example, \fIremquo(29.0,\ 3.0)\fP returns \-1.0 and might store 2. +Note that the actual quotient might not fit in an integer. +.\" 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 +.SH RETURN VALUE +On success, these functions return the same value as +the analogous functions described in +.BR remainder (3). +.PP +If +.I x +or +.I y +is a NaN, a NaN is returned. +.PP +If +.I x +is an infinity, +and +.I y +is not a NaN, +a domain error occurs, and +a NaN is returned. +.PP +If +.I y +is zero, +and +.I x +is not a NaN, +a domain error occurs, and +a NaN is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity or \fIy\fP is 0, \ +and the other argument is not a NaN +.\" .I errno +.\" is set to +.\" .BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.PP +These functions do not set +.IR errno . +.\" FIXME . Is it intentional that these functions do not set errno? +.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6802 +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR remquo (), +.BR remquof (), +.BR remquol () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH SEE ALSO +.BR fmod (3), +.BR logb (3), +.BR remainder (3) diff --git a/upstream/opensuse-leap-15-6/man3/requestname.3form b/upstream/opensuse-leap-15-6/man3/requestname.3form new file mode 100644 index 00000000..644bacd1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/requestname.3form @@ -0,0 +1,65 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_requestname.3x,v 1.10 2015/12/05 23:42:45 tom Exp $ +.TH requestname 3FORM "" +.SH NAME +\fBform_request_by_name\fP, +\fBform_request_name\fR \- handle printable form request names +.SH SYNOPSIS +\fB#include \fR +.br +const char *form_request_name(int request); +.br +int form_request_by_name(const char *name); +.br +.SH DESCRIPTION +The function \fBform_request_name\fR returns the printable name of a form +request code. +.br +The function \fBform_request_by_name\fR searches in the name-table for a request +with the given name and returns its request code. Otherwise E_NO_MATCH is returned. +.SH RETURN VALUE +\fBform_request_name\fR returns \fBNULL\fR on error and sets errno +to \fBE_BAD_ARGUMENT\fR. +.br +\fBform_request_by_name\fR returns \fBE_NO_MATCH\fR on error. +It does not set errno. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/requestname.3menu b/upstream/opensuse-leap-15-6/man3/requestname.3menu new file mode 100644 index 00000000..7ff7ffcf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/requestname.3menu @@ -0,0 +1,66 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_requestname.3x,v 1.10 2015/12/05 23:42:45 tom Exp $ +.TH requestname 3MENU "" +.SH NAME +\fBmenu_request_by_name\fP, +\fBmenu_request_name\fR \- handle printable menu request names +.SH SYNOPSIS +\fB#include \fR +.br +const char *menu_request_name(int request); +.br +int menu_request_by_name(const char *name); +.br +.SH DESCRIPTION +The function \fBmenu_request_name\fR returns the printable name of a menu +request code. +.br +The function \fBmenu_request_by_name\fR searches in the name-table for a request +with the given name and returns its request code. +Otherwise E_NO_MATCH is returned. +.SH RETURN VALUE +\fBmenu_request_name\fR returns \fBNULL\fR on error +and sets errno to \fBE_BAD_ARGUMENT\fR. +.br +\fBmenu_request_by_name\fR returns \fBE_NO_MATCH\fR on error. +It does not set errno. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. They were not supported on +Version 7, BSD or System V implementations. It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/resizeterm.3ncurses b/upstream/opensuse-leap-15-6/man3/resizeterm.3ncurses new file mode 100644 index 00000000..a8157fc7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/resizeterm.3ncurses @@ -0,0 +1,130 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1996-on +.\" +.\" $Id: resizeterm.3x,v 1.24 2017/11/18 23:47:37 tom Exp $ +.TH resizeterm 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.SH NAME +\fBis_term_resized\fR, +\fBresize_term\fR, +\fBresizeterm\fR \- change the curses terminal size +.SH SYNOPSIS +\fB#include \fR +.sp +\fBbool is_term_resized(int lines, int columns);\fR +.br +\fBint resize_term(int lines, int columns);\fR +.br +\fBint resizeterm(int lines, int columns);\fR +.SH DESCRIPTION +.PP +This is an extension to the curses library. +It provides callers with a hook into the \fBncurses\fR data to resize windows, +primarily for use by programs running in an X Window terminal (e.g., xterm). +.SS resizeterm +.PP +The function \fBresizeterm\fR resizes the standard and current windows +to the specified dimensions, and adjusts other bookkeeping data used by +the \fBncurses\fR library that record the window dimensions +such as the \fBLINES\fP and \fBCOLS\fP variables. +.SS resize_term +.PP +Most of the work is done by the inner function \fBresize_term\fR. +The outer function \fBresizeterm\fR adds bookkeeping for the \fBSIGWINCH\fP handler. +When resizing the windows, +\fBresize_term\fR blank-fills the areas that are extended. +The calling application should fill in these areas with appropriate data. +The \fBresize_term\fR function attempts to resize all windows. +However, due to the calling convention of pads, +it is not possible to resize these +without additional interaction with the application. +.SS is_term_resized +.PP +A support function \fBis_term_resized\fR is provided so that applications +can check if the \fBresize_term\fR function would modify the window structures. +It returns \fBTRUE\fP if the windows would be modified, and \fBFALSE\fP otherwise. +.SH RETURN VALUE +Except as noted, these functions return +the integer \fBERR\fR upon failure and \fBOK\fR on success. +They will fail if either of the dimensions are less than or equal to zero, +or if an error occurs while (re)allocating memory for the windows. +.SH NOTES +While these functions are intended to be used to support a signal handler +(i.e., for \fBSIGWINCH\fP), care should be taken to avoid invoking them in a +context where \fBmalloc\fR or \fBrealloc\fR may have been interrupted, +since it uses those functions. +.PP +If ncurses is configured to supply its own \fBSIGWINCH\fP handler, +.bP +on receipt of a \fBSIGWINCH\fP, the handler sets a flag +.bP +which is tested in \fBwgetch\fP(3X) and \fBdoupdate\fP, +.bP +in turn, calling the \fBresizeterm\fR function, +.bP +which \fBungetch\fP's a \fBKEY_RESIZE\fR which +will be read on the next call to \fBwgetch\fR. +.IP +The \fBKEY_RESIZE\fP alerts an application that the screen size has changed, +and that it should repaint special features such as pads that cannot +be done automatically. +.IP +Calling \fBresizeterm\fP or \fBresize_term\fP +directly from a signal handler is unsafe. +This indirect method is used to provide a safe way to resize the ncurses +data structures. +.PP +If the environment variables \fBLINES\fP or \fBCOLUMNS\fP are set, +this overrides the library's use of the window size obtained from +the operating system. +Thus, even if a \fBSIGWINCH\fP is received, +no screen size change may be recorded. +.SH PORTABILITY +.PP +It is possible to resize the screen with SVr4 curses, +by +.bP +exiting curses with \fBendwin\fP(3X) and +.bP +resuming using \fBrefresh\fP(3X). +.PP +Doing that clears the screen and is visually distracting. +.PP +This extension of ncurses was introduced in mid-1995. +It was adopted in NetBSD curses (2001) and PDCurses (2003). +.SH SEE ALSO +\fBgetch\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBwresize\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey (from an equivalent function written in 1988 for BSD curses). diff --git a/upstream/opensuse-leap-15-6/man3/resolver.3 b/upstream/opensuse-leap-15-6/man3/resolver.3 new file mode 100644 index 00000000..c5e8911d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/resolver.3 @@ -0,0 +1,512 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and (C) Copyright 2015 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified 1993-07-25 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2004-10-31 by aeb +.\" +.TH resolver 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +res_ninit, res_nquery, res_nsearch, res_nquerydomain, res_nmkquery, res_nsend, +res_nclose, +res_init, res_query, res_search, res_querydomain, res_mkquery, res_send, +dn_comp, dn_expand \- +resolver routines +.SH LIBRARY +Resolver library +.RI ( libresolv ", " \-lresolv ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.PP +.B struct __res_state; +.B typedef struct __res_state *res_state; +.PP +.BI "int res_ninit(res_state " statep ); +.PP +.BI "void res_nclose(res_state " statep ); +.PP +.BI "int res_nquery(res_state " statep , +.BI " const char *" dname ", int " class ", int " type , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.PP +.BI "int res_nsearch(res_state " statep , +.BI " const char *" dname ", int " class ", int " type , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.PP +.BI "int res_nquerydomain(res_state " statep , +.BI " const char *" name ", const char *" domain , +.BI " int " class ", int " type ", unsigned char " answer [. anslen ], +.BI " int " anslen ); +.PP +.BI "int res_nmkquery(res_state " statep , +.BI " int " op ", const char *" dname ", int " class , +.BI " int " type ", const unsigned char " data [. datalen "], \ +int " datalen , +.BI " const unsigned char *" newrr , +.BI " unsigned char " buf [. buflen "], int " buflen ); +.PP +.BI "int res_nsend(res_state " statep , +.BI " const unsigned char " msg [. msglen "], int " msglen , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.PP +.BI "int dn_comp(const char *" exp_dn ", unsigned char " comp_dn [. length ], +.BI " int " length ", unsigned char **" dnptrs , +.BI " unsigned char **" lastdnptr ); +.PP +.BI "int dn_expand(const unsigned char *" msg , +.BI " const unsigned char *" eomorig , +.BI " const unsigned char *" comp_dn ", char " exp_dn [. length ], +.BI " int " length ); +.PP +.B [[deprecated]] extern struct __res_state _res; +.PP +.B [[deprecated]] int res_init(void); +.PP +.B [[deprecated]] +.BI "int res_query(const char *" dname ", int " class ", int " type , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.PP +.B [[deprecated]] +.BI "int res_search(const char *" dname ", int " class ", int " type , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.PP +.B [[deprecated]] +.BI "int res_querydomain(const char *" name ", const char *" domain , +.BI " int " class ", int " type ", unsigned char " answer [. anslen ], +.BI " int " anslen ); +.PP +.B [[deprecated]] +.BI "int res_mkquery(int " op ", const char *" dname ", int " class , +.BI " int " type ", const unsigned char " data [. datalen "], \ +int " datalen , +.BI " const unsigned char *" newrr , +.BI " unsigned char " buf [. buflen "], int " buflen ); +.PP +.B [[deprecated]] +.BI "int res_send(const unsigned char " msg [. msglen "], int " msglen , +.BI " unsigned char " answer [. anslen "], int " anslen ); +.fi +.SH DESCRIPTION +.B Note: +This page is incomplete (various resolver functions provided by glibc +are not described) and likely out of date. +.PP +The functions described below make queries to and interpret +the responses from Internet domain name servers. +.PP +The API consists of a set of more modern, reentrant functions +and an older set of nonreentrant functions that have been superseded. +The traditional resolver interfaces such as +.BR res_init () +and +.BR res_query () +use some static (global) state stored in the +.I _res +structure, rendering these functions non-thread-safe. +BIND 8.2 introduced a set of new interfaces +.BR res_ninit (), +.BR res_nquery (), +and so on, which take a +.I res_state +as their first argument, so you can use a per-thread resolver state. +.PP +The +.BR res_ninit () +and +.BR res_init () +functions read the configuration files (see +.BR resolv.conf (5)) +to get the default domain name and name +server address(es). +If no server is given, the local host is tried. +If no domain is given, that associated with the local host is used. +It can be overridden with the environment variable +.BR LOCALDOMAIN . +.BR res_ninit () +or +.BR res_init () +is normally executed by the first call to one of the +other functions. +Every call to +.BR res_ninit () +requires a corresponding call to +.BR res_nclose () +to free memory allocated by +.BR res_ninit () +and subsequent calls to +.BR res_nquery (). +.PP +The +.BR res_nquery () +and +.BR res_query () +functions query the name server for the +fully qualified domain name \fIname\fP of specified \fItype\fP and +\fIclass\fP. +The reply is left in the buffer \fIanswer\fP of length +\fIanslen\fP supplied by the caller. +.PP +The +.BR res_nsearch () +and +.BR res_search () +functions make a query and waits for the response like +.BR res_nquery () +and +.BR res_query (), +but in addition they implement the default and search +rules controlled by +.B RES_DEFNAMES +and +.B RES_DNSRCH +(see description of +\fI_res\fP options below). +.PP +The +.BR res_nquerydomain () +and +.BR res_querydomain () +functions make a query using +.BR res_nquery ()/ res_query () +on the concatenation of \fIname\fP and \fIdomain\fP. +.PP +The following functions are lower-level routines used by +.BR res_nquery ()/ res_query (). +.PP +The +.BR res_nmkquery () +and +.BR res_mkquery () +functions construct a query message in \fIbuf\fP +of length \fIbuflen\fP for the domain name \fIdname\fP. +The query type +\fIop\fP is one of the following (typically +.BR QUERY ): +.TP +.B QUERY +Standard query. +.TP +.B IQUERY +Inverse query. +This option was removed in glibc 2.26, +.\" commit e4e794841e3140875f2aa86b90e2ada3d61e1244 +since it has not been supported by DNS servers for a very long time. +.TP +.B NS_NOTIFY_OP +Notify secondary of SOA (Start of Authority) change. +.PP +\fInewrr\fP is currently unused. +.PP +The +.BR res_nsend () +and +.BR res_send () +function send a preformatted query given in +\fImsg\fP of length \fImsglen\fP and returns the answer in \fIanswer\fP +which is of length \fIanslen\fP. +They will call +.BR res_ninit ()/ res_init () +if it has not already been called. +.PP +The +.BR dn_comp () +function compresses the domain name \fIexp_dn\fP +and stores it in the buffer \fIcomp_dn\fP of length \fIlength\fP. +The compression uses an array of pointers \fIdnptrs\fP to previously +compressed names in the current message. +The first pointer points +to the beginning of the message and the list ends with NULL. +The limit of the array is specified by \fIlastdnptr\fP. +If \fIdnptr\fP is NULL, domain names are not compressed. +If \fIlastdnptr\fP is NULL, the list +of labels is not updated. +.PP +The +.BR dn_expand () +function expands the compressed domain name +\fIcomp_dn\fP to a full domain name, which is placed in the buffer +\fIexp_dn\fP of size \fIlength\fP. +The compressed name is contained +in a query or reply message, and \fImsg\fP points to the beginning of +the message. +.PP +The resolver routines use configuration and state information +contained in a +.I __res_state +structure (either passed as the +.I statep +argument, or in the global variable +.IR _res , +in the case of the older nonreentrant functions). +The only field of this structure that is normally manipulated by the +user is the +.I options +field. +This field can contain the bitwise "OR" +of the following options: +.TP +.B RES_INIT +True if +.BR res_ninit () +or +.BR res_init () +has been called. +.TP +.B RES_DEBUG +Print debugging messages. +This option is available only if glibc was built with debugging enabled, +.\" See resolv/README. +.\" Support for RES_DEBUG was made conditional in glibc 2.2. +which is not the default. +.TP +.BR RES_AAONLY " (unimplemented; deprecated in glibc 2.25)" +Accept authoritative answers only. +.BR res_send () +continues until +it finds an authoritative answer or returns an error. +This option was present but unimplemented until glibc 2.24; +since glibc 2.25, it is deprecated, and its usage produces a warning. +.TP +.B RES_USEVC +Use TCP connections for queries rather than UDP datagrams. +.TP +.BR RES_PRIMARY " (unimplemented; deprecated in glibc 2.25)" +Query primary domain name server only. +This option was present but unimplemented until glibc 2.24; +since glibc 2.25, it is deprecated, and its usage produces a warning. +.TP +.B RES_IGNTC +Ignore truncation errors. +Don't retry with TCP. +.TP +.B RES_RECURSE +Set the recursion desired bit in queries. +Recursion is carried out +by the domain name server, not by +.BR res_send (). +[Enabled by default]. +.TP +.B RES_DEFNAMES +If set, +.BR res_search () +will append the default domain name to +single component names\[em]that is, those that do not contain a dot. +[Enabled by default]. +.TP +.B RES_STAYOPEN +Used with +.B RES_USEVC +to keep the TCP connection open between queries. +.TP +.B RES_DNSRCH +If set, +.BR res_search () +will search for hostnames in the current +domain and in parent domains. +This option is used by +.BR gethostbyname (3). +[Enabled by default]. +.TP +.B RES_INSECURE1 +Accept a response from a wrong server. +This can be used to detect potential security hazards, +but you need to compile glibc with debugging enabled and use +.B RES_DEBUG +option (for debug purpose only). +.TP +.B RES_INSECURE2 +Accept a response which contains a wrong query. +This can be used to detect potential security hazards, +but you need to compile glibc with debugging enabled and use +.B RES_DEBUG +option (for debug purpose only). +.TP +.B RES_NOALIASES +Disable usage of +.B HOSTALIASES +environment variable. +.TP +.B RES_USE_INET6 +Try an AAAA query before an A query inside the +.BR gethostbyname (3) +function, and map IPv4 responses in IPv6 "tunneled form" if no AAAA records +are found but an A record set exists. +Since glibc 2.25, this option is deprecated, +and its usage produces a warning; +applications should use +.BR getaddrinfo (3), +rather than +.BR gethostbyname (3). +.TP +.B RES_ROTATE +Causes round-robin selection of name servers from among those listed. +This has the effect of spreading the query load among all listed servers, +rather than having all clients try the first listed server first every +time. +.TP +.BR RES_NOCHECKNAME " (unimplemented; deprecated in glibc 2.25)" +Disable the modern BIND checking of incoming hostnames and mail names +for invalid characters such as underscore (_), non-ASCII, +or control characters. +This option was present until glibc 2.24; +since glibc 2.25, it is deprecated, and its usage produces a warning. +.TP +.BR RES_KEEPTSIG " (unimplemented; deprecated in glibc 2.25)" +Do not strip TSIG records. +This option was present but unimplemented until glibc 2.24; +since glibc 2.25, it is deprecated, and its usage produces a warning. +.TP +.BR RES_BLAST " (unimplemented; deprecated in glibc 2.25)" +Send each query simultaneously and recursively to all servers. +This option was present but unimplemented until glibc 2.24; +since glibc 2.25, it is deprecated, and its usage produces a warning. +.TP +.BR RES_USEBSTRING " (glibc 2.3.4 to glibc 2.24)" +Make reverse IPv6 lookups using the bit-label format described in RFC 2673; +if this option is not set (which is the default), then nibble format is used. +This option was removed in glibc 2.25, +since it relied on a backward-incompatible +DNS extension that was never deployed on the Internet. +.TP +.BR RES_NOIP6DOTINT " (glibc 2.24 and earlier)" +Use +.I ip6.arpa +zone in IPv6 reverse lookup instead of +.IR ip6.int , +which is deprecated since glibc 2.3.4. +This option is present up to and including glibc 2.24, +where it is enabled by default. +In glibc 2.25, this option was removed. +.TP +.BR RES_USE_EDNS0 " (since glibc 2.6)" +Enables support for the DNS extensions (EDNS0) described in RFC 2671. +.TP +.BR RES_SNGLKUP " (since glibc 2.10)" +By default, glibc performs IPv4 and IPv6 lookups in parallel +since glibc 2.9. +Some appliance DNS servers cannot handle these queries properly +and make the requests time out. +This option disables the behavior and makes glibc +perform the IPv6 and IPv4 requests sequentially +(at the cost of some slowdown of the resolving process). +.TP +.B RES_SNGLKUPREOP +When +.B RES_SNGLKUP +option is enabled, opens a new socket for the each request. +.TP +.B RES_USE_DNSSEC +Use DNSSEC with OK bit in OPT record. +This option implies +.BR RES_USE_EDNS0 . +.TP +.B RES_NOTLDQUERY +Do not look up unqualified name as a top-level domain (TLD). +.TP +.B RES_DEFAULT +Default option which implies: +.BR RES_RECURSE , +.BR RES_DEFNAMES , +.BR RES_DNSRCH , +and +.BR RES_NOIP6DOTINT . +.\" +.SH RETURN VALUE +The +.BR res_ninit () +and +.BR res_init () +functions return 0 on success, or \-1 if an error +occurs. +.PP +The +.BR res_nquery (), +.BR res_query (), +.BR res_nsearch (), +.BR res_search (), +.BR res_nquerydomain (), +.BR res_querydomain (), +.BR res_nmkquery (), +.BR res_mkquery (), +.BR res_nsend (), +and +.BR res_send () +functions return the length +of the response, or \-1 if an error occurs. +.PP +The +.BR dn_comp () +and +.BR dn_expand () +functions return the length +of the compressed name, or \-1 if an error occurs. +.PP +In the case of an error return from +.BR res_nquery (), +.BR res_query (), +.BR res_nsearch (), +.BR res_search (), +.BR res_nquerydomain (), +or +.BR res_querydomain (), +the global variable +.I h_errno +(see +.BR gethostbyname (3)) +can be consulted to determine the cause of the error. +.SH FILES +.TP +.I /etc/resolv.conf +resolver configuration file +.TP +.I /etc/host.conf +resolver configuration file +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR res_ninit (), +.BR res_nclose (), +.BR res_nquery (), +.BR res_nsearch (), +.BR res_nquerydomain (), +.BR res_nsend () +T} Thread safety MT-Safe locale +T{ +.BR res_nmkquery (), +.BR dn_comp (), +.BR dn_expand () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD. +.SH SEE ALSO +.BR gethostbyname (3), +.BR resolv.conf (5), +.BR resolver (5), +.BR hostname (7), +.BR named (8) +.PP +The GNU C library source file +.IR resolv/README . diff --git a/upstream/opensuse-leap-15-6/man3/revoutput.3am b/upstream/opensuse-leap-15-6/man3/revoutput.3am new file mode 100644 index 00000000..fbf33dbe --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/revoutput.3am @@ -0,0 +1,77 @@ +.TH REVOUTPUT 3am "Aug 02 2015" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +revoutput \- Reverse output strings sample extension +.SH SYNOPSIS +.ft CW +@load "revoutput" +.sp +BEGIN { REVOUT = 1 } # Reverse all output strings +.ft R +.SH DESCRIPTION +The +.I revoutput +extension +adds a simple output wrapper that reverses the characters in each output +line. +It's main purpose is to show how to write an output wrapper, although +it may be mildly amusing for the unwary. +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "revoutput" + +BEGIN { + REVOUT = 1 + print "hello, world" > "/dev/stdout" +} +.fi +.ft R +.PP +The output from this program is: +.PP +.ft CW +.nf +dlrow ,olleh +.fi +.ft R +.SH BUGS +This extension does not affect the default standard output. +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/revtwoway.3am b/upstream/opensuse-leap-15-6/man3/revtwoway.3am new file mode 100644 index 00000000..4aa71f7f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/revtwoway.3am @@ -0,0 +1,65 @@ +.TH REVTWOWAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +revtwoway \- Reverse strings sample two-way processor extension +.SH SYNOPSIS +.ft CW +@load "revtwoway" +.sp +.nf +BEGIN { + cmd = "/magic/mirror" + print "hello, world" |& cmd + cmd |& getline result + print result + close(cmd) +} +.fi +.ft R +.SH DESCRIPTION +The +.I revtwoway +extension +adds a simple two-way processor that reverses the characters +in each line sent to it for reading back by the AWK program. +It's main purpose is to show how to write a two-way extension, although +it may also be mildly amusing. +.\" .SH BUGS +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/rewinddir.3 b/upstream/opensuse-leap-15-6/man3/rewinddir.3 new file mode 100644 index 00000000..a12937dd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rewinddir.3 @@ -0,0 +1,63 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH rewinddir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rewinddir \- reset directory stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "void rewinddir(DIR *" dirp ); +.fi +.SH DESCRIPTION +The +.BR rewinddir () +function resets the position of the directory +stream +.I dirp +to the beginning of the directory. +.SH RETURN VALUE +The +.BR rewinddir () +function returns no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rewinddir () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR closedir (3), +.BR opendir (3), +.BR readdir (3), +.BR scandir (3), +.BR seekdir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/rexec.3 b/upstream/opensuse-leap-15-6/man3/rexec.3 new file mode 100644 index 00000000..ec92aae6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rexec.3 @@ -0,0 +1,164 @@ +'\" t +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)rexec.3 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD: src/lib/libcompat/4.3/rexec.3,v 1.12 2004/07/02 23:52:14 ru Exp $ +.\" +.\" Taken from FreeBSD 5.4; not checked against Linux reality (mtk) +.\" +.\" 2013-06-21, mtk, Converted from mdoc to man macros +.\" +.TH rexec 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rexec, rexec_af \- return stream to a remote command +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B [[deprecated]] +.BI "int rexec(char **restrict " ahost ", int " inport , +.BI " const char *restrict " user ", const char *restrict " passwd , +.BI " const char *restrict " cmd ", int *restrict " fd2p ); +.PP +.B [[deprecated]] +.BI "int rexec_af(char **restrict " ahost ", int " inport , +.BI " const char *restrict " user ", const char *restrict " passwd , +.BI " const char *restrict " cmd ", int *restrict " fd2p , +.BI " sa_family_t " af ); +.fi +.PP +.BR rexec (), +.BR rexec_af (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + In glibc up to and including 2.19: + _BSD_SOURCE +.fi +.SH DESCRIPTION +This interface is obsoleted by +.BR rcmd (3). +.PP +The +.BR rexec () +function +looks up the host +.I *ahost +using +.BR gethostbyname (3), +returning \-1 if the host does not exist. +Otherwise, +.I *ahost +is set to the standard name of the host. +If a username and password are both specified, then these +are used to authenticate to the foreign host; otherwise +the environment and then the +.I .netrc +file in user's +home directory are searched for appropriate information. +If all this fails, the user is prompted for the information. +.PP +The port +.I inport +specifies which well-known DARPA Internet port to use for +the connection; the call +.I "getservbyname(""exec"", ""tcp"")" +(see +.BR getservent (3)) +will return a pointer to a structure that contains the necessary port. +The protocol for connection is described in detail in +.BR rexecd (8). +.PP +If the connection succeeds, +a socket in the Internet domain of type +.B SOCK_STREAM +is returned to +the caller, and given to the remote command as +.I stdin +and +.IR stdout . +If +.I fd2p +is nonzero, then an auxiliary channel to a control +process will be setup, and a file descriptor for it will be placed +in +.IR *fd2p . +The control process will return diagnostic +output from the command (unit 2) on this channel, and will also +accept bytes on this channel as being UNIX signal numbers, to be +forwarded to the process group of the command. +The diagnostic +information returned does not include remote authorization failure, +as the secondary connection is set up after authorization has been +verified. +If +.I fd2p +is 0, then the +.I stderr +(unit 2 of the remote +command) will be made the same as the +.I stdout +and no +provision is made for sending arbitrary signals to the remote process, +although you may be able to get its attention by using out-of-band data. +.SS rexec_af() +The +.BR rexec () +function works over IPv4 +.RB ( AF_INET ). +By contrast, the +.BR rexec_af () +function provides an extra argument, +.IR af , +that allows the caller to select the protocol. +This argument can be specified as +.BR AF_INET , +.BR AF_INET6 , +or +.B AF_UNSPEC +(to allow the implementation to select the protocol). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rexec (), +.BR rexec_af () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR rexec () +4.2BSD, BSD, Solaris. +.TP +.BR rexec_af () +glibc 2.2. +.SH BUGS +The +.BR rexec () +function sends the unencrypted password across the network. +.PP +The underlying service is considered a big security hole and therefore +not enabled on many sites; see +.BR rexecd (8) +for explanations. +.SH SEE ALSO +.BR rcmd (3), +.BR rexecd (8) diff --git a/upstream/opensuse-leap-15-6/man3/rint.3 b/upstream/opensuse-leap-15-6/man3/rint.3 new file mode 100644 index 00000000..dbd49a7b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rint.3 @@ -0,0 +1,148 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH rint 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl \- round +to nearest integer +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double nearbyint(double " x ); +.BI "float nearbyintf(float " x ); +.BI "long double nearbyintl(long double " x ); +.PP +.BI "double rint(double " x ); +.BI "float rintf(float " x ); +.BI "long double rintl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR nearbyint (), +.BR nearbyintf (), +.BR nearbyintl (): +.nf + _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE +.fi +.PP +.BR rint (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR rintf (), +.BR rintl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR nearbyint (), +.BR nearbyintf (), +and +.BR nearbyintl () +functions round their argument to an integer value in floating-point +format, using the current rounding direction (see +.BR fesetround (3)) +and without raising the +.I inexact +exception. +When the current rounding direction is to nearest, these +functions round halfway cases to the even integer in accordance with +IEEE-754. +.PP +The +.BR rint (), +.BR rintf (), +and +.BR rintl () +functions do the same, but will raise the +.I inexact +exception +.RB ( FE_INEXACT , +checkable via +.BR fetestexcept (3)) +when the result differs in value from the argument. +.SH RETURN VALUE +These functions return the rounded integer value. +.PP +If +.I x +is integral, +0, \-0, NaN, or infinite, +.I x +itself is returned. +.SH ERRORS +No errors occur. +POSIX.1-2001 documents a range error for overflows, but see NOTES. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR nearbyint (), +.BR nearbyintf (), +.BR nearbyintl (), +.BR rint (), +.BR rintf (), +.BR rintl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH NOTES +SUSv2 and POSIX.1-2001 contain text about overflow (which might set +.I errno +to +.BR ERANGE , +or raise an +.B FE_OVERFLOW +exception). +In practice, the result cannot overflow on any current machine, +so this error-handling stuff is just nonsense. +(More precisely, overflow can happen only when the maximum value +of the exponent is smaller than the number of mantissa bits. +For the IEEE-754 standard 32-bit and 64-bit floating-point numbers +the maximum value of the exponent is 127 (respectively, 1023), +and the number of mantissa bits +including the implicit bit +is 24 (respectively, 53).) +.PP +If you want to store the rounded value in an integer type, +you probably want to use one of the functions described in +.BR lrint (3) +instead. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lrint (3), +.BR round (3), +.BR trunc (3) diff --git a/upstream/opensuse-leap-15-6/man3/round.3 b/upstream/opensuse-leap-15-6/man3/round.3 new file mode 100644 index 00000000..a3bfcd53 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/round.3 @@ -0,0 +1,113 @@ +'\" t +.\" Copyright 2001 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH round 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +round, roundf, roundl \- round to nearest integer, away from zero +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double round(double " x ); +.BI "float roundf(float " x ); +.BI "long double roundl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR round (), +.BR roundf (), +.BR roundl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions round +.I x +to the nearest integer, but +round halfway cases away from zero (regardless of the current rounding +direction, see +.BR fenv (3)), +instead of to the nearest even integer like +.BR rint (3). +.PP +For example, +.I round(0.5) +is 1.0, and +.I round(\-0.5) +is \-1.0. +.SH RETURN VALUE +These functions return the rounded integer value. +.PP +If +.I x +is integral, +0, \-0, NaN, or infinite, +.I x +itself is returned. +.SH ERRORS +No errors occur. +POSIX.1-2001 documents a range error for overflows, but see NOTES. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR round (), +.BR roundf (), +.BR roundl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH NOTES +POSIX.1-2001 contains text about overflow (which might set +.I errno +to +.BR ERANGE , +or raise an +.B FE_OVERFLOW +exception). +In practice, the result cannot overflow on any current machine, +so this error-handling stuff is just nonsense. +.\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point. +(More precisely, overflow can happen only when the maximum value +of the exponent is smaller than the number of mantissa bits. +For the IEEE-754 standard 32-bit and 64-bit floating-point numbers +the maximum value of the exponent is 127 (respectively, 1023), +and the number of mantissa bits +including the implicit bit +is 24 (respectively, 53).) +.PP +If you want to store the rounded value in an integer type, +you probably want to use one of the functions described in +.BR lround (3) +instead. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lround (3), +.BR nearbyint (3), +.BR rint (3), +.BR trunc (3) diff --git a/upstream/opensuse-leap-15-6/man3/roundup.3 b/upstream/opensuse-leap-15-6/man3/roundup.3 new file mode 100644 index 00000000..49c62ade --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/roundup.3 @@ -0,0 +1,56 @@ +.\" Copyright (C) 2023 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH roundup 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +roundup \- round up in steps +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI roundup( x ", " step ); +.fi +.SH DESCRIPTION +This macro rounds +.I x +to the nearest multiple of +.I step +that is not less than +.IR x . +.PP +It is typically used for +rounding up a pointer to align it or +increasing a buffer to be allocated. +.PP +This API is not designed to be generic, +and doesn't work in some cases +that are not important for the typical use cases described above. +See CAVEATS. +.SH RETURN VALUE +This macro returns the rounded value. +.SH STANDARDS +None. +.SH CAVEATS +The arguments may be evaluated more than once. +.PP +.I x +should be nonnegative, +and +.I step +should be positive. +.PP +If +.I x + step +would overflow or wrap around, +the behavior is undefined. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lrint (3), +.BR rint (3), +.BR lround (3), +.BR round (3) diff --git a/upstream/opensuse-leap-15-6/man3/rpc.3 b/upstream/opensuse-leap-15-6/man3/rpc.3 new file mode 100644 index 00000000..00d6235f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rpc.3 @@ -0,0 +1,1204 @@ +'\" t +.\" 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 +.\" +.TH rpc 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +rpc \- library routines for remote procedure calls +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS AND DESCRIPTION +These routines allow C programs to make procedure +calls on other machines across the network. +First, the client calls a procedure to send a data packet to the server. +Upon receipt of the packet, the server calls a dispatch routine +to perform the requested service, and then sends back a reply. +Finally, the procedure call returns to the client. +.\" .LP +.\" 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. +.PP +To take use of these routines, include the header file +.IR "" . +.PP +The prototypes below make use of the following types: +.PP +.RS 4 +.EX +.BI "typedef int " bool_t ; +.PP +.BI "typedef bool_t (*" xdrproc_t ")(XDR *, void *, ...);" +.PP +.BI "typedef bool_t (*" resultproc_t ")(caddr_t " resp , +.BI " struct sockaddr_in *" raddr ); +.EE +.RE +.PP +See the header files for the declarations of the +.IR AUTH , +.IR CLIENT , +.IR SVCXPRT , +and +.I XDR +types. +.PP +.nf +.BI "void auth_destroy(AUTH *" auth ); +.fi +.IP +A macro that destroys the authentication information associated with +.IR auth . +Destruction usually involves deallocation of private data structures. +The use of +.I auth +is undefined after calling +.BR auth_destroy (). +.PP +.nf +.B AUTH *authnone_create(void); +.fi +.IP +Create and return an RPC +authentication handle that passes nonusable authentication +information with each remote procedure call. +This is the default authentication used by RPC. +.PP +.nf +.BI "AUTH *authunix_create(char *" host ", uid_t " uid ", gid_t " gid , +.BI " int " len ", gid_t " aup_gids [. len ]); +.fi +.IP +Create and return an RPC authentication handle that contains +authentication information. +The parameter +.I host +is the name of the machine on which the information was created; +.I uid +is the user's user ID; +.I gid +is the user's current group ID; +.I len +and +.I aup_gids +refer to a counted array of groups to which the user belongs. +It is easy to impersonate a user. +.PP +.nf +.B AUTH *authunix_create_default(void); +.fi +.IP +Calls +.BR authunix_create () +with the appropriate parameters. +.PP +.nf +.BI "int callrpc(char *" host ", unsigned long " prognum , +.BI " unsigned long " versnum ", unsigned long " procnum , +.BI " xdrproc_t " inproc ", const char *" in , +.BI " xdrproc_t " outproc ", char *" out ); +.fi +.IP +Call the remote procedure associated with +.IR prognum , +.IR versnum , +and +.I procnum +on the machine, +.IR host . +The parameter +.I in +is the address of the procedure's argument(s), and +.I out +is the address of where to place the result(s); +.I inproc +is used to encode the procedure's parameters, and +.I outproc +is used to decode the procedure's results. +This routine returns zero if it succeeds, or the value of +.B "enum clnt_stat" +cast to an integer if it fails. +The routine +.BR clnt_perrno () +is handy for translating failure statuses into messages. +.IP +Warning: calling remote procedures with this routine +uses UDP/IP as a transport; see +.BR clntudp_create () +for restrictions. +You do not have control of timeouts or authentication using this routine. +.PP +.nf +.BI "enum clnt_stat clnt_broadcast(unsigned long " prognum , +.BI " unsigned long " versnum ", unsigned long " procnum , +.BI " xdrproc_t " inproc ", char *" in , +.BI " xdrproc_t " outproc ", char *" out , +.BI " resultproc_t " eachresult ); +.fi +.IP +Like +.BR callrpc (), +except the call message is broadcast to all locally +connected broadcast nets. +Each time it receives a response, this routine calls +.BR eachresult (), +whose form is: +.IP +.in +4n +.EX +.BI "eachresult(char *" out ", struct sockaddr_in *" addr ); +.EE +.in +.IP +where +.I out +is the same as +.I out +passed to +.BR clnt_broadcast (), +except that the remote procedure's output is decoded there; +.I addr +points to the address of the machine that sent the results. +If +.BR eachresult () +returns zero, +.BR clnt_broadcast () +waits for more replies; otherwise it returns with appropriate status. +.IP +Warning: broadcast sockets are limited in size to the +maximum transfer unit of the data link. +For ethernet, this value is 1500 bytes. +.PP +.nf +.BI "enum clnt_stat clnt_call(CLIENT *" clnt ", unsigned long " procnum , +.BI " xdrproc_t " inproc ", char *" in , +.BI " xdrproc_t " outproc ", char *" out , +.BI " struct timeval " tout ); +.fi +.IP +A macro that calls the remote procedure +.I procnum +associated with the client handle, +.IR clnt , +which is obtained with an RPC client creation routine such as +.BR clnt_create (). +The parameter +.I in +is the address of the procedure's argument(s), and +.I out +is the address of where to place the result(s); +.I inproc +is used to encode the procedure's parameters, and +.I outproc +is used to decode the procedure's results; +.I tout +is the time allowed for results to come back. +.PP +.nf +.BI "clnt_destroy(CLIENT *" clnt ); +.fi +.IP +A macro that destroys the client's RPC handle. +Destruction usually involves deallocation +of private data structures, including +.I clnt +itself. +Use of +.I clnt +is undefined after calling +.BR clnt_destroy (). +If the RPC library opened the associated socket, it will close it also. +Otherwise, the socket remains open. +.PP +.nf +.BI "CLIENT *clnt_create(const char *" host ", unsigned long " prog , +.BI " unsigned long " vers ", const char *" proto ); +.fi +.IP +Generic client creation routine. +.I host +identifies the name of the remote host where the server is located. +.I proto +indicates which kind of transport protocol to use. +The currently supported values for this field are \[lq]udp\[rq] +and \[lq]tcp\[rq]. +Default timeouts are set, but can be modified using +.BR clnt_control (). +.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 +.BI "bool_t clnt_control(CLIENT *" cl ", int " req ", char *" info ); +.fi +.IP +A macro used to change or retrieve various information +about a client object. +.I req +indicates the type of operation, and +.I info +is a pointer to the information. +For both UDP and TCP, the supported values of +.I req +and their argument types and what they do are: +.IP +.in +4n +.EX +\fBCLSET_TIMEOUT\fP \fIstruct timeval\fP // set total timeout +\fBCLGET_TIMEOUT\fP \fIstruct timeval\fP // get total timeout +.EE +.in +.IP +Note: if you set the timeout using +.BR clnt_control (), +the timeout parameter passed to +.BR clnt_call () +will be ignored in all future calls. +.IP +.in +4n +.EX +\fBCLGET_SERVER_ADDR\fP \fIstruct sockaddr_in\fP + // get server\[aq]s address +.EE +.in +.IP +The following operations are valid for UDP only: +.IP +.in +4n +.EX +\fBCLSET_RETRY_TIMEOUT\fP \fIstruct timeval\fP // set the retry timeout +\fBCLGET_RETRY_TIMEOUT\fP \fIstruct timeval\fP // get the retry timeout +.EE +.in +.IP +The retry timeout is the time that "UDP RPC" +waits for the server to reply before +retransmitting the request. +.PP +.nf +.BI "clnt_freeres(CLIENT * " clnt ", xdrproc_t " outproc ", char *" out ); +.fi +.IP +A macro that frees any data allocated by the RPC/XDR +system when it decoded the results of an RPC call. +The parameter +.I out +is the address of the results, and +.I outproc +is the XDR routine describing the results. +This routine returns one if the results were successfully freed, +and zero otherwise. +.PP +.nf +.BI "void clnt_geterr(CLIENT *" clnt ", struct rpc_err *" errp ); +.fi +.IP +A macro that copies the error structure out of the client +handle to the structure at address +.IR errp . +.PP +.nf +.BI "void clnt_pcreateerror(const char *" s ); +.fi +.IP +Print a message to standard error indicating why a client RPC +handle could not be created. +The message is prepended with string +.I s +and a colon. +Used when a +.BR clnt_create (), +.BR clntraw_create (), +.BR clnttcp_create (), +or +.BR clntudp_create () +call fails. +.PP +.nf +.BI "void clnt_perrno(enum clnt_stat " stat ); +.fi +.IP +Print a message to standard error corresponding +to the condition indicated by +.IR stat . +Used after +.BR callrpc (). +.PP +.nf +.BI "clnt_perror(CLIENT *" clnt ", const char *" s ); +.fi +.IP +Print a message to standard error indicating why an RPC call failed; +.I clnt +is the handle used to do the call. +The message is prepended with string +.I s +and a colon. +Used after +.BR clnt_call (). +.PP +.nf +.BI "char *clnt_spcreateerror(const char *" s ); +.fi +.IP +Like +.BR clnt_pcreateerror (), +except that it returns a string instead of printing to the standard error. +.IP +Bugs: returns pointer to static data that is overwritten on each call. +.PP +.nf +.BI "char *clnt_sperrno(enum clnt_stat " stat ); +.fi +.IP +Take the same arguments as +.BR clnt_perrno (), +but instead of sending a message to the standard error indicating why an RPC +call failed, return a pointer to a string which contains the message. +The string ends with a NEWLINE. +.IP +.BR clnt_sperrno () +is used instead of +.BR clnt_perrno () +if the program does not have a standard error (as a program +running as a server quite likely does not), or if the programmer +does not want the message to be output with +.BR printf (3), +or if a message format different than that supported by +.BR clnt_perrno () +is to be used. +Note: unlike +.BR clnt_sperror () +and +.BR clnt_spcreateerror (), +.BR clnt_sperrno () +returns pointer to static data, but the +result will not get overwritten on each call. +.PP +.nf +.BI "char *clnt_sperror(CLIENT *" rpch ", const char *" s ); +.fi +.IP +Like +.BR clnt_perror (), +except that (like +.BR clnt_sperrno ()) +it returns a string instead of printing to standard error. +.IP +Bugs: returns pointer to static data that is overwritten on each call. +.PP +.nf +.BI "CLIENT *clntraw_create(unsigned long " prognum \ +", unsigned long " versnum ); +.fi +.IP +This routine creates a toy RPC client for the remote program +.IR prognum , +version +.IR versnum . +The transport used to pass messages to the service is +actually a buffer within the process's address space, so the +corresponding RPC server should live in the same address space; see +.BR svcraw_create (). +This allows simulation of RPC and acquisition of RPC +overheads, such as round trip times, without any kernel interference. +This routine returns NULL if it fails. +.PP +.nf +.BI "CLIENT *clnttcp_create(struct sockaddr_in *" addr , +.BI " unsigned long " prognum ", unsigned long " versnum , +.BI " int *" sockp ", unsigned int " sendsz \ +", unsigned int " recvsz ); +.fi +.IP +This routine creates an RPC client for the remote program +.IR prognum , +version +.IR versnum ; +the client uses TCP/IP as a transport. +The remote program is located at Internet address +.IR *addr . +If +.\"The following inline font conversion is necessary for the hyphen indicator +.I addr\->sin_port +is zero, then it is set to the actual port that the remote +program is listening on (the remote +.B portmap +service is consulted for this information). +The parameter +.I sockp +is a socket; if it is +.BR RPC_ANYSOCK , +then this routine opens a new one and sets +.IR sockp . +Since TCP-based RPC uses buffered I/O, +the user may specify the size of the send and receive buffers +with the parameters +.I sendsz +and +.IR recvsz ; +values of zero choose suitable defaults. +This routine returns NULL if it fails. +.PP +.nf +.BI "CLIENT *clntudp_create(struct sockaddr_in *" addr , +.BI " unsigned long " prognum ", unsigned long " versnum , +.BI " struct timeval " wait ", int *" sockp ); +.fi +.IP +This routine creates an RPC client for the remote program +.IR prognum , +version +.IR versnum ; +the client uses use UDP/IP as a transport. +The remote program is located at Internet address +.IR addr . +If +.I addr\->sin_port +is zero, then it is set to actual port that the remote +program is listening on (the remote +.B portmap +service is consulted for this information). +The parameter +.I sockp +is a socket; if it is +.BR RPC_ANYSOCK , +then this routine opens a new one and sets +.IR sockp . +The UDP transport resends the call message in intervals of +.I wait +time until a response is received or until the call times out. +The total time for the call to time out is specified by +.BR clnt_call (). +.IP +Warning: since 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 +.BI "CLIENT *clntudp_bufcreate(struct sockaddr_in *" addr , +.BI " unsigned long " prognum ", unsigned long " versnum , +.BI " struct timeval " wait ", int *" sockp , +.BI " unsigned int " sendsize ", unsigned int "recosize ); +.fi +.IP +This routine creates an RPC client for the remote program +.IR prognum , +on +.IR versnum ; +the client uses use UDP/IP as a transport. +The remote program is located at Internet address +.IR addr . +If +.I addr\->sin_port +is zero, then it is set to actual port that the remote +program is listening on (the remote +.B portmap +service is consulted for this information). +The parameter +.I sockp +is a socket; if it is +.BR RPC_ANYSOCK , +then this routine opens a new one and sets +.IR sockp . +The UDP transport resends the call message in intervals of +.I wait +time until a response is received or until the call times out. +The total time for the call to time out is specified by +.BR clnt_call (). +.IP +This allows the user to specify the maximum packet +size for sending and receiving UDP-based RPC messages. +.PP +.nf +.BI "void get_myaddress(struct sockaddr_in *" addr ); +.fi +.IP +Stuff the machine's IP address into +.IR *addr , +without consulting the library routines that deal with +.IR /etc/hosts . +The port number is always set to +.BR htons(PMAPPORT) . +.PP +.nf +.BI "struct pmaplist *pmap_getmaps(struct sockaddr_in *" addr ); +.fi +.IP +A user interface to the +.B portmap +service, which returns a list of the current RPC +program-to-port mappings on the host located at IP address +.IR *addr . +This routine can return NULL. +The command +.I rpcinfo\~\-p +uses this routine. +.PP +.nf +.BI "unsigned short pmap_getport(struct sockaddr_in *" addr , +.BI " unsigned long " prognum ", unsigned long " versnum , +.BI " unsigned int " protocol ); +.fi +.IP +A user interface to the +.B portmap +service, which returns the port number +on which waits a service that supports program number +.IR prognum , +version +.IR versnum , +and speaks the transport protocol associated with +.IR protocol . +The value of +.I protocol +is most likely +.B IPPROTO_UDP +or +.BR IPPROTO_TCP . +A return value of zero means that the mapping does not exist +or that the RPC system failed to contact the remote +.B portmap +service. +In the latter case, the global variable +.I rpc_createerr +contains the RPC status. +.PP +.nf +.BI "enum clnt_stat pmap_rmtcall(struct sockaddr_in *" addr , +.BI " unsigned long " prognum ", unsigned long " versnum , +.BI " unsigned long " procnum , +.BI " xdrproc_t " inproc ", char *" in , +.BI " xdrproc_t " outproc ", char *" out , +.BI " struct timeval " tout ", unsigned long *" portp ); +.fi +.IP +A user interface to the +.B portmap +service, which instructs +.B portmap +on the host at IP address +.I *addr +to make an RPC call on your behalf to a procedure on that host. +The parameter +.I *portp +will be modified to the program's port number if the procedure succeeds. +The definitions of other parameters are discussed +in +.BR callrpc () +and +.BR clnt_call (). +This procedure should be used for a \[lq]ping\[rq] and nothing else. +See also +.BR clnt_broadcast (). +.PP +.nf +.BI "bool_t pmap_set(unsigned long " prognum ", unsigned long " versnum , +.BI " int " protocol ", unsigned short " port ); +.fi +.IP +A user interface to the +.B portmap +service, which establishes a mapping between the triple +.RI [ prognum , versnum , protocol ] +and +.I port +on the machine's +.B portmap +service. +The value of +.I protocol +is most likely +.B IPPROTO_UDP +or +.BR IPPROTO_TCP . +This routine returns one if it succeeds, zero otherwise. +Automatically done by +.BR svc_register (). +.PP +.nf +.BI "bool_t pmap_unset(unsigned long " prognum ", unsigned long " versnum ); +.fi +.IP +A user interface to the +.B portmap +service, which destroys all mapping between the triple +.RI [ prognum , versnum , * ] +and +.B ports +on the machine's +.B portmap +service. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "int registerrpc(unsigned long " prognum ", unsigned long " versnum , +.BI " unsigned long " procnum ", char *(*" procname ")(char *)," +.BI " xdrproc_t " inproc ", xdrproc_t " outproc ); +.fi +.IP +Register procedure +.I procname +with the RPC service package. +If a request arrives for program +.IR prognum , +version +.IR versnum , +and procedure +.IR procnum , +.I procname +is called with a pointer to its parameter(s); +.I procname +should return a pointer to its static result(s); +.I inproc +is used to decode the parameters while +.I outproc +is used to encode the results. +This routine returns zero if the registration succeeded, \-1 otherwise. +.IP +Warning: remote procedures registered in this form +are accessed using the UDP/IP transport; see +.BR svcudp_create () +for restrictions. +.PP +.nf +.BI "struct rpc_createerr " rpc_createerr ; +.fi +.IP +A global variable whose value is set by any RPC client creation routine +that does not succeed. +Use the routine +.BR clnt_pcreateerror () +to print the reason why. +.PP +.nf +.BI "void svc_destroy(SVCXPRT *" xprt ); +.fi +.IP +A macro that destroys the RPC service transport handle, +.IR xprt . +Destruction usually involves deallocation +of private data structures, including +.I xprt +itself. +Use of +.I xprt +is undefined after calling this routine. +.PP +.nf +.BI "fd_set " svc_fdset ; +.fi +.IP +A global variable reflecting the RPC service side's +read file descriptor bit mask; it is suitable as a parameter to the +.BR select (2) +system call. +This is of interest only if a service implementor does their own +asynchronous event processing, instead of calling +.BR svc_run (). +This variable is read-only (do not pass its address to +.BR select (2)!), +yet it may change after calls to +.BR svc_getreqset () +or any creation routines. +.PP +.nf +.BI "int " svc_fds ; +.fi +.IP +Similar to +.BR svc_fdset , +but limited to 32 file descriptors. +This interface is obsoleted by +.BR svc_fdset . +.PP +.nf +.BI "svc_freeargs(SVCXPRT *" xprt ", xdrproc_t " inproc ", char *" in ); +.fi +.IP +A macro that frees any data allocated by the RPC/XDR +system when it decoded the arguments to a service procedure using +.BR svc_getargs (). +This routine returns 1 if the results were successfully freed, +and zero otherwise. +.PP +.nf +.BI "svc_getargs(SVCXPRT *" xprt ", xdrproc_t " inproc ", char *" in ); +.fi +.IP +A macro that decodes the arguments of an RPC request +associated with the RPC service transport handle, +.IR xprt . +The parameter +.I in +is the address where the arguments will be placed; +.I inproc +is the XDR routine used to decode the arguments. +This routine returns one if decoding succeeds, and zero otherwise. +.PP +.nf +.BI "struct sockaddr_in *svc_getcaller(SVCXPRT *" xprt ); +.fi +.IP +The approved way of getting the network address of the caller +of a procedure associated with the RPC service transport handle, +.IR xprt . +.PP +.nf +.BI "void svc_getreqset(fd_set *" rdfds ); +.fi +.IP +This routine is of interest only if a service implementor does not call +.BR svc_run (), +but instead implements custom asynchronous event processing. +It is called when the +.BR select (2) +system call has determined that an RPC request has arrived on some +RPC socket(s); +.I rdfds +is the resultant read file descriptor bit mask. +The routine returns when all sockets associated with the value of +.I rdfds +have been serviced. +.PP +.nf +.BI "void svc_getreq(int " rdfds ); +.fi +.IP +Similar to +.BR svc_getreqset (), +but limited to 32 file descriptors. +This interface is obsoleted by +.BR svc_getreqset (). +.PP +.nf +.BI "bool_t svc_register(SVCXPRT *" xprt ", unsigned long " prognum , +.BI " unsigned long " versnum , +.BI " void (*" dispatch ")(struct svc_req *, SVCXPRT *)," +.BI " unsigned long " protocol ); +.fi +.IP +Associates +.I prognum +and +.I versnum +with the service dispatch procedure, +.IR dispatch . +If +.I protocol +is zero, the service is not registered with the +.B portmap +service. +If +.I protocol +is nonzero, then a mapping of the triple +.RI [ prognum , versnum , protocol ] +to +.I xprt\->xp_port +is established with the local +.B portmap +service (generally +.I protocol +is zero, +.B IPPROTO_UDP +or +.BR IPPROTO_TCP ). +The procedure +.I dispatch +has the following form: +.IP +.in +4n +.EX +dispatch(struct svc_req *request, SVCXPRT *xprt); +.EE +.in +.IP +The +.BR svc_register () +routine returns one if it succeeds, and zero otherwise. +.PP +.nf +.B "void svc_run(void);" +.fi +.IP +This routine never returns. +It waits for RPC requests to arrive, and calls the appropriate service +procedure using +.BR svc_getreq () +when one arrives. +This procedure is usually waiting for a +.BR select (2) +system call to return. +.PP +.nf +.BI "bool_t svc_sendreply(SVCXPRT *" xprt ", xdrproc_t " outproc \ +", char *" out ); +.fi +.IP +Called by an RPC service's dispatch routine to send the results of a +remote procedure call. +The parameter +.I xprt +is the request's associated transport handle; +.I outproc +is the XDR routine which is used to encode the results; and +.I out +is the address of the results. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "void svc_unregister(unsigned long " prognum ", unsigned long " versnum ); +.fi +.IP +Remove all mapping of the double +.RI [ prognum , versnum ] +to dispatch routines, and of the triple +.RI [ prognum , versnum , * ] +to port number. +.PP +.nf +.BI "void svcerr_auth(SVCXPRT *" xprt ", enum auth_stat " why ); +.fi +.IP +Called by a service dispatch routine that refuses to perform +a remote procedure call due to an authentication error. +.PP +.nf +.BI "void svcerr_decode(SVCXPRT *" xprt ); +.fi +.IP +Called by a service dispatch routine that cannot successfully +decode its parameters. +See also +.BR svc_getargs (). +.PP +.nf +.BI "void svcerr_noproc(SVCXPRT *" xprt ); +.fi +.IP +Called by a service dispatch routine that does not implement +the procedure number that the caller requests. +.PP +.nf +.BI "void svcerr_noprog(SVCXPRT *" xprt ); +.fi +.IP +Called when the desired program is not registered with the RPC package. +Service implementors usually do not need this routine. +.PP +.nf +.BI "void svcerr_progvers(SVCXPRT *" xprt ", unsigned long " low_vers , +.BI " unsigned long " high_vers ); +.fi +.IP +Called when the desired version of a program is not registered +with the RPC package. +Service implementors usually do not need this routine. +.PP +.nf +.BI "void svcerr_systemerr(SVCXPRT *" xprt ); +.fi +.IP +Called by a service dispatch routine when it detects a system +error not covered by any particular protocol. +For example, if a service can no longer allocate storage, +it may call this routine. +.PP +.nf +.BI "void svcerr_weakauth(SVCXPRT *" xprt ); +.fi +.IP +Called by a service dispatch routine that refuses to perform +a remote procedure call due to insufficient authentication parameters. +The routine calls +.BR "svcerr_auth(xprt, AUTH_TOOWEAK)" . +.PP +.nf +.BI "SVCXPRT *svcfd_create(int " fd ", unsigned int " sendsize , +.BI " unsigned int " recvsize ); +.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. +.I sendsize +and +.I recvsize +indicate sizes for the send and receive buffers. +If they are zero, a reasonable default is chosen. +.PP +.nf +.B SVCXPRT *svcraw_create(void); +.fi +.IP +This routine creates a toy RPC +service transport, to which it returns a pointer. +The transport is really a buffer within the process's address space, +so the corresponding RPC client should live in the same address space; see +.BR clntraw_create (). +This routine allows simulation of RPC and acquisition of RPC +overheads (such as round trip times), without any kernel interference. +This routine returns NULL if it fails. +.PP +.nf +.BI "SVCXPRT *svctcp_create(int " sock ", unsigned int " send_buf_size , +.BI " unsigned int " recv_buf_size ); +.fi +.IP +This routine creates a TCP/IP-based RPC +service transport, to which it returns a pointer. +The transport is associated with the socket +.IR sock , +which may be +.BR RPC_ANYSOCK , +in which case a new socket is created. +If the socket is not bound to a local TCP +port, then this routine binds it to an arbitrary port. +Upon completion, +.I xprt\->xp_sock +is the transport's socket descriptor, and +.I xprt\->xp_port +is the transport's port number. +This routine returns NULL if it fails. +Since TCP-based RPC uses buffered I/O, +users may specify the size of buffers; values of zero +choose suitable defaults. +.PP +.nf +.BI "SVCXPRT *svcudp_bufcreate(int " sock ", unsigned int " sendsize , +.BI " unsigned int " recosize ); +.fi +.IP +This routine creates a UDP/IP-based RPC +service transport, to which it returns a pointer. +The transport is associated with the socket +.IR sock , +which may be +.BR RPC_ANYSOCK , +in which case a new socket is created. +If the socket is not bound to a local UDP +port, then this routine binds it to an arbitrary port. +Upon completion, +.I xprt\->xp_sock +is the transport's socket descriptor, and +.I xprt\->xp_port +is the transport's port number. +This routine returns NULL if it fails. +.IP +This allows the user to specify the maximum packet size for sending and +receiving UDP-based RPC messages. +.PP +.nf +.BI "SVCXPRT *svcudp_create(int " sock ); +.fi +.IP +This call is equivalent to +.I svcudp_bufcreate(sock,SZ,SZ) +for some default size +.IR SZ . +.PP +.nf +.BI "bool_t xdr_accepted_reply(XDR *" xdrs ", struct accepted_reply *" ar ); +.fi +.IP +Used for encoding RPC reply messages. +This routine is useful for users who wish to generate +RPC-style messages without using the RPC package. +.PP +.nf +.BI "bool_t xdr_authunix_parms(XDR *" xdrs ", struct authunix_parms *" aupp ); +.fi +.IP +Used for describing UNIX credentials. +This routine is useful for users +who wish to generate these credentials without using the RPC +authentication package. +.PP +.nf +.BI "void xdr_callhdr(XDR *" xdrs ", struct rpc_msg *" chdr ); +.fi +.IP +Used for describing RPC call header messages. +This routine is useful for users who wish to generate +RPC-style messages without using the RPC package. +.PP +.nf +.BI "bool_t xdr_callmsg(XDR *" xdrs ", struct rpc_msg *" cmsg ); +.fi +.IP +Used for describing RPC call messages. +This routine is useful for users who wish to generate RPC-style +messages without using the RPC package. +.PP +.nf +.BI "bool_t xdr_opaque_auth(XDR *" xdrs ", struct opaque_auth *" ap ); +.fi +.IP +Used for describing RPC authentication information messages. +This routine is useful for users who wish to generate +RPC-style messages without using the RPC package. +.PP +.nf +.BI "bool_t xdr_pmap(XDR *" xdrs ", struct pmap *" regs ); +.fi +.IP +Used for describing parameters to various +.B portmap +procedures, externally. +This routine is useful for users who wish to generate +these parameters without using the +.B pmap +interface. +.PP +.nf +.BI "bool_t xdr_pmaplist(XDR *" xdrs ", struct pmaplist **" rp ); +.fi +.IP +Used for describing a list of port mappings, externally. +This routine is useful for users who wish to generate +these parameters without using the +.B pmap +interface. +.PP +.nf +.BI "bool_t xdr_rejected_reply(XDR *" xdrs ", struct rejected_reply *" rr ); +.fi +.IP +Used for describing RPC reply messages. +This routine is useful for users who wish to generate +RPC-style messages without using the RPC package. +.PP +.nf +.BI "bool_t xdr_replymsg(XDR *" xdrs ", struct rpc_msg *" rmsg ); +.fi +.IP +Used for describing RPC reply messages. +This routine is useful for users who wish to generate +RPC style messages without using the RPC package. +.PP +.nf +.BI "void xprt_register(SVCXPRT *" xprt ); +.fi +.IP +After RPC service transport handles are created, +they should register themselves with the RPC service package. +This routine modifies the global variable +.IR svc_fds . +Service implementors usually do not need this routine. +.PP +.nf +.BI "void xprt_unregister(SVCXPRT *" xprt ); +.fi +.IP +Before an RPC service transport handle is destroyed, +it should unregister itself with the RPC service package. +This routine modifies the global variable +.IR svc_fds . +Service implementors usually do not need this routine. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR auth_destroy (), +.BR authnone_create (), +.BR authunix_create (), +.BR authunix_create_default (), +.BR callrpc (), +.BR clnt_broadcast (), +.BR clnt_call (), +.BR clnt_destroy (), +.BR clnt_create (), +.BR clnt_control (), +.BR clnt_freeres (), +.BR clnt_geterr (), +.BR clnt_pcreateerror (), +.BR clnt_perrno (), +.BR clnt_perror (), +.BR clnt_spcreateerror (), +.BR clnt_sperrno (), +.BR clnt_sperror (), +.BR clntraw_create (), +.BR clnttcp_create (), +.BR clntudp_create (), +.BR clntudp_bufcreate (), +.BR get_myaddress (), +.BR pmap_getmaps (), +.BR pmap_getport (), +.BR pmap_rmtcall (), +.BR pmap_set (), +.BR pmap_unset (), +.BR registerrpc (), +.BR svc_destroy (), +.BR svc_freeargs (), +.BR svc_getargs (), +.BR svc_getcaller (), +.BR svc_getreqset (), +.BR svc_getreq (), +.BR svc_register (), +.BR svc_run (), +.BR svc_sendreply (), +.BR svc_unregister (), +.BR svcerr_auth (), +.BR svcerr_decode (), +.BR svcerr_noproc (), +.BR svcerr_noprog (), +.BR svcerr_progvers (), +.BR svcerr_systemerr (), +.BR svcerr_weakauth (), +.BR svcfd_create (), +.BR svcraw_create (), +.BR svctcp_create (), +.BR svcudp_bufcreate (), +.BR svcudp_create (), +.BR xdr_accepted_reply (), +.BR xdr_authunix_parms (), +.BR xdr_callhdr (), +.BR xdr_callmsg (), +.BR xdr_opaque_auth (), +.BR xdr_pmap (), +.BR xdr_pmaplist (), +.BR xdr_rejected_reply (), +.BR xdr_replymsg (), +.BR xprt_register (), +.BR xprt_unregister () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH SEE ALSO +.\" We don't have an rpc_secure.3 page in the set at the moment -- MTK, 19 Sep 05 +.\" .BR rpc_secure (3), +.BR xdr (3) +.PP +The following manuals: +.RS +Remote Procedure Calls: Protocol Specification +.br +Remote Procedure Call Programming Guide +.br +rpcgen Programming Guide +.br +.RE +.PP +.IR "RPC: Remote Procedure Call Protocol Specification" , +RFC\ 1050, Sun Microsystems, Inc., +USC-ISI. diff --git a/upstream/opensuse-leap-15-6/man3/rpmatch.3 b/upstream/opensuse-leap-15-6/man3/rpmatch.3 new file mode 100644 index 00000000..c786017a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rpmatch.3 @@ -0,0 +1,172 @@ +'\" t +.\" Copyright (C) 2006 Justin Pryzby +.\" +.\" %%%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 +.\" +.TH rpmatch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rpmatch \- determine if the answer to a question is affirmative or negative +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int rpmatch(const char *" response ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR rpmatch (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _SVID_SOURCE +.fi +.SH DESCRIPTION +.BR rpmatch () +handles a user response to yes or no questions, with +support for internationalization. +.PP +.I response +should be a null-terminated string containing a +user-supplied response, perhaps obtained with +.BR fgets (3) +or +.BR getline (3). +.PP +The user's language preference is taken into account per the +environment variables +.BR LANG , +.BR LC_MESSAGES , +and +.BR LC_ALL , +if the program has called +.BR setlocale (3) +to effect their changes. +.PP +Regardless of the locale, responses matching +.B \[ha][Yy] +are always accepted as affirmative, and those matching +.B \[ha][Nn] +are always accepted as negative. +.SH RETURN VALUE +After examining +.IR response , +.BR rpmatch () +returns 0 for a recognized negative response ("no"), 1 +for a recognized positive response ("yes"), and \-1 when the value +of +.I response +is unrecognized. +.SH ERRORS +A return value of \-1 may indicate either an invalid input, or some +other error. +It is incorrect to only test if the return value is nonzero. +.PP +.BR rpmatch () +can fail for any of the reasons that +.BR regcomp (3) +or +.BR regexec (3) +can fail; the cause of the error +is not available from +.I errno +or anywhere else, but indicates a +failure of the regex engine (but this case is indistinguishable from +that of an unrecognized value of +.IR response ). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rpmatch () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +GNU, FreeBSD, AIX. +.SH BUGS +The +.BR YESEXPR " and " NOEXPR +of some locales (including "C") only inspect the first character of the +.IR response . +This can mean that "yno" et al. resolve to +.BR 1 . +This is an unfortunate historical side-effect which should be fixed in time +with proper localisation, and should not deter from +.BR rpmatch () +being the proper way to distinguish between binary answers. +.SH EXAMPLES +The following program displays the results when +.BR rpmatch () +is applied to the string given in the program's command-line argument. +.PP +.\" SRC BEGIN (rpmatch.c) +.EX +#define _DEFAULT_SOURCE +#include +#include +#include +#include + +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 +.\" SRC END +.SH SEE ALSO +.BR fgets (3), +.BR getline (3), +.BR nl_langinfo (3), +.BR regcomp (3), +.BR setlocale (3) diff --git a/upstream/opensuse-leap-15-6/man3/rquota.3 b/upstream/opensuse-leap-15-6/man3/rquota.3 new file mode 100644 index 00000000..8eee71eb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rquota.3 @@ -0,0 +1,34 @@ +.\"@(#)rquota.3; +.TH RQUOTA 3 +.SH NAME +rquota \- implement quotas on remote machines +.SH PROTOCOL +.B /usr/include/rpcsvc/rquota.x +.SH DESCRIPTION +.IX "rquota()" "" "\fLrquota()\fP \(em implement quotas on remote machines" +.LP +The +.B rquota(\|) +protocol inquires about quotas on remote machines. +It is used in conjunction with +.SM NFS\s0, +since +.SM NFS +itself does not implement quotas. +.SH PROGRAMMING +.LP +.B #include +.LP +The following +.SM XDR +routines are available in +.BR librpcsvc : +.nf +.B xdr_getquota_arg +.B xdr_getquota_rslt +.B xdr_rquota +.fi +.SH SEE ALSO +.BR quota (1), +.BR quotactl (2) + diff --git a/upstream/opensuse-leap-15-6/man3/rtime.3 b/upstream/opensuse-leap-15-6/man3/rtime.3 new file mode 100644 index 00000000..6cade609 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rtime.3 @@ -0,0 +1,155 @@ +'\" t +.\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Modified 2003-04-04 Walter Harms +.\" +.\" +.\" Slightly polished, aeb, 2003-04-06 +.\" +.TH rtime 3 2022-12-15 "Linux man-pages 6.04" +.SH NAME +rtime \- get time from a remote machine +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int rtime(struct sockaddr_in *" addrp ", struct rpc_timeval *" timep , +.BI " struct rpc_timeval *" timeout ); +.fi +.SH DESCRIPTION +This function uses the Time Server Protocol as described in +RFC\ 868 to obtain the time from a remote machine. +.PP +The Time Server Protocol gives the time in seconds since +00:00:00 UTC, 1 Jan 1900, +and this function subtracts the appropriate constant in order to +convert the result to seconds since the +Epoch, 1970-01-01 00:00:00 +0000 (UTC). +.PP +When +.I timeout +is non-NULL, the udp/time socket (port 37) is used. +Otherwise, the tcp/time socket (port 37) is used. +.SH RETURN VALUE +On success, 0 is returned, and the obtained 32-bit time value is stored in +.IR timep\->tv_sec . +In case of error \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +All errors for underlying functions +.RB ( sendto (2), +.BR poll (2), +.BR recvfrom (2), +.BR connect (2), +.BR read (2)) +can occur. +Moreover: +.TP +.B EIO +The number of returned bytes is not 4. +.TP +.B ETIMEDOUT +The waiting time as defined in timeout has expired. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR rtime () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH NOTES +Only IPv4 is supported. +.PP +Some +.I in.timed +versions support only TCP. +Try the example program with +.I use_tcp +set to 1. +.\" .PP +.\" Libc5 uses the prototype +.\" .PP +.\" .nf +.\" int rtime(struct sockaddr_in *, struct timeval *, struct timeval *); +.\" .fi +.\" .PP +.\" and requires +.\" .I +.\" instead of +.\" .IR . +.SH BUGS +.BR rtime () +in glibc 2.2.5 and earlier does not work properly on 64-bit machines. +.SH EXAMPLES +This example requires that port 37 is up and open. +You may check +that the time entry within +.I /etc/inetd.conf +is not commented out. +.PP +The program connects to a computer called "linux". +Using "localhost" does not work. +The result is the localtime of the computer "linux". +.PP +.\" SRC BEGIN (rtime.c) +.EX +#include +#include +#include +#include +#include +#include + +#include + +static int use_tcp = 0; +static const char servername[] = "linux"; + +int +main(void) +{ + int ret; + time_t t; + struct hostent *hent; + struct rpc_timeval time1 = {0, 0}; + struct rpc_timeval timeout = {1, 0}; + struct sockaddr_in name; + + memset(&name, 0, sizeof(name)); + sethostent(1); + hent = gethostbyname(servername); + memcpy(&name.sin_addr, hent\->h_addr, hent\->h_length); + + ret = rtime(&name, &time1, use_tcp ? NULL : &timeout); + if (ret < 0) + perror("rtime error"); + else { + t = time1.tv_sec; + printf("%s\en", ctime(&t)); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.\" .BR netdate (1), +.BR ntpdate (1), +.\" .BR rdate (1), +.BR inetd (8) diff --git a/upstream/opensuse-leap-15-6/man3/rtnetlink.3 b/upstream/opensuse-leap-15-6/man3/rtnetlink.3 new file mode 100644 index 00000000..a4e5ded2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rtnetlink.3 @@ -0,0 +1,127 @@ +.\" This man page is Copyright (C) 1999 Andi Kleen . +.\" +.\" %%%LICENSE_START(VERBATIM_ONE_PARA) +.\" Permission is granted to distribute possibly modified copies +.\" of this page provided the header is included verbatim, +.\" and in case of nontrivial modification author and date +.\" of the modification is added to the header. +.\" %%%LICENSE_END +.\" +.\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $ +.\" +.TH rtnetlink 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +rtnetlink \- macros to manipulate rtnetlink messages +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.B #include +.B #include +.PP +.BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type \ +", NETLINK_ROUTE);" +.PP +.BI "int RTA_OK(struct rtattr *" rta ", int " rtabuflen ); +.PP +.BI "void *RTA_DATA(struct rtattr *" rta ); +.BI "unsigned int RTA_PAYLOAD(struct rtattr *" rta ); +.PP +.BI "struct rtattr *RTA_NEXT(struct rtattr *" rta \ +", unsigned int " rtabuflen ); +.PP +.BI "unsigned int RTA_LENGTH(unsigned int " length ); +.BI "unsigned int RTA_SPACE(unsigned int "length ); +.fi +.SH DESCRIPTION +All +.BR rtnetlink (7) +messages consist of a +.BR netlink (7) +message header and appended attributes. +The attributes should be manipulated only using the macros provided here. +.PP +.BI RTA_OK( rta ", " attrlen ) +returns true if +.I rta +points to a valid routing attribute; +.I attrlen +is the running length of the attribute buffer. +When not true then you must assume there are no more attributes in the +message, even if +.I attrlen +is nonzero. +.PP +.BI RTA_DATA( rta ) +returns a pointer to the start of this attribute's data. +.PP +.BI RTA_PAYLOAD( rta ) +returns the length of this attribute's data. +.PP +.BI RTA_NEXT( rta ", " attrlen ) +gets the next attribute after +.IR rta . +Calling this macro will update +.IR attrlen . +You should use +.B RTA_OK +to check the validity of the returned pointer. +.PP +.BI RTA_LENGTH( len ) +returns the length which is required for +.I len +bytes of data plus the header. +.PP +.BI RTA_SPACE( len ) +returns the amount of space which will be needed in a message with +.I len +bytes of data. +.SH STANDARDS +Linux. +.SH BUGS +This manual page is incomplete. +.SH EXAMPLES +.\" FIXME . ? would be better to use libnetlink in the EXAMPLE code here +Creating a rtnetlink message to set the MTU of a device: +.PP +.in +4n +.EX +#include + +\&... + +struct { + struct nlmsghdr nh; + struct ifinfomsg if; + char attrbuf[512]; +} req; + +struct rtattr *rta; +unsigned int mtu = 1000; + +int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + +memset(&req, 0, sizeof(req)); +req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if)); +req.nh.nlmsg_flags = NLM_F_REQUEST; +req.nh.nlmsg_type = RTM_NEWLINK; +req.if.ifi_family = AF_UNSPEC; +req.if.ifi_index = INTERFACE_INDEX; +req.if.ifi_change = 0xffffffff; /* ??? */ +rta = (struct rtattr *)(((char *) &req) + + NLMSG_ALIGN(req.nh.nlmsg_len)); +rta\->rta_type = IFLA_MTU; +rta\->rta_len = RTA_LENGTH(sizeof(mtu)); +req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + + RTA_LENGTH(sizeof(mtu)); +memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); +send(rtnetlink_sk, &req, req.nh.nlmsg_len, 0); +.EE +.in +.SH SEE ALSO +.BR netlink (3), +.BR netlink (7), +.BR rtnetlink (7) diff --git a/upstream/opensuse-leap-15-6/man3/rwarray.3am b/upstream/opensuse-leap-15-6/man3/rwarray.3am new file mode 100644 index 00000000..e8714460 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/rwarray.3am @@ -0,0 +1,104 @@ +.TH RWARRAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +writea, reada \- write and read gawk arrays to/from files +.SH SYNOPSIS +.ft CW +@load "rwarray" +.sp +ret = writea(file, array) +.br +ret = reada(file, array) +.ft R +.SH DESCRIPTION +The +.I rwarray +extension adds two functions named +.BR writea() . +and +.BR reada() , +as follows. +.TP +.B writea() +This function takes a string argument, which is the name of the +file to which dump the array, and the array itself as the second +argument. +.B writea() +understands multidimensional arrays. +It returns one on success, or zero upon failure. +.TP +.B reada() +is the inverse of +.BR writea() ; +it reads the file named as its first argument, filling in +the array named as the second argument. It clears the array +first. +Here too, the return value is one on success and zero upon failure. +.SH NOTES +The array created by +.B reada() +is identical to that written by +.B writea() +in the sense that the contents are the same. However, due +to implementation issues, the array traversal order of the recreated +array will likely be different from that of the original array. +As array traversal order in AWK is by default undefined, this is +not (technically) a problem. If you need to guarantee a particular +traversal order, use the array sorting features in +.I gawk +to do so. +.PP +The file contains binary data. All integral values are written +in network byte order. +However, double precision floating-point values are written as +native binary data. Thus, arrays containing only string data +can theoretically be dumped on systems with one byte order and +restored on systems with a different one, but this has not been tried. +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "rwarray" +\&... +ret = writea("arraydump.bin", array) +\&... +ret = reada("arraydump.bin", array) +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/scalb.3 b/upstream/opensuse-leap-15-6/man3/scalb.3 new file mode 100644 index 00000000..bd47bfc5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scalb.3 @@ -0,0 +1,199 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH scalb 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +scalb, scalbf, scalbl \- multiply floating-point number +by integral power of radix (OBSOLETE) +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] double scalb(double " x ", double " exp ); +.BI "[[deprecated]] float scalbf(float " x ", float " exp ); +.BI "[[deprecated]] long double scalbl(long double " x ", long double " exp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR scalb (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR scalbf (), +.BR scalbl (): +.nf + _XOPEN_SOURCE >= 600 + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions multiply their first argument +.I x +by +.B FLT_RADIX +(probably 2) +to the power of +.IR exp , +that is: +.PP +.nf + x * FLT_RADIX ** exp +.fi +.PP +The definition of +.B FLT_RADIX +can be obtained by including +.IR . +.\" not in /usr/include but in a gcc lib +.SH RETURN VALUE +On success, these functions return +.I x +* +.B FLT_RADIX +** +.IR exp . +.PP +If +.I x +or +.I exp +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity (negative infinity), +and +.I exp +is not negative infinity, +positive infinity (negative infinity) is returned. +.PP +If +.I x +is +0 (\-0), and +.I exp +is not positive infinity, +0 (\-0) is returned. +.PP +If +.I x +is zero, and +.I exp +is positive infinity, +a domain error occurs, and +a NaN is returned. +.PP +If +.I x +is an infinity, +and +.I exp +is negative infinity, +a domain error occurs, and +a NaN is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with a sign the same as +.IR x . +.PP +If the result underflows, +a range error occurs, +and the functions return zero, with a sign the same as +.IR x . +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \ +or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \ +and the other argument is not a NaN +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Range error, overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error, underflow +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR scalb (), +.BR scalbf (), +.BR scalbl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR scalb () +4.3BSD. +Obsolescent in POSIX.1-2001; +Removed in POSIX.1-2008, +recommending the use of +.BR scalbln (3), +.BR scalblnf (3), +or +.BR scalblnl (3) +instead. +.\" Looking at header files: scalbf() is present on the +.\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64. +.SH BUGS +Before glibc 2.20, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803 +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6804 +these functions did not set +.I errno +for domain and range errors. +.SH SEE ALSO +.BR ldexp (3), +.BR scalbln (3) diff --git a/upstream/opensuse-leap-15-6/man3/scalbln.3 b/upstream/opensuse-leap-15-6/man3/scalbln.3 new file mode 100644 index 00000000..d57c50fe --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scalbln.3 @@ -0,0 +1,177 @@ +'\" t +.\" Copyright 2004 Andries Brouwer . +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH scalbln 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl \- +multiply floating-point number by integral power of radix +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double scalbln(double " x ", long " exp ); +.BI "float scalblnf(float " x ", long " exp ); +.BI "long double scalblnl(long double " x ", long " exp ); +.PP +.BI "double scalbn(double " x ", int " exp ); +.BI "float scalbnf(float " x ", int " exp ); +.BI "long double scalbnl(long double " x ", int " exp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR scalbln (), +.BR scalblnf (), +.BR scalblnl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE +.fi +.PP +.BR scalbn (), +.BR scalbnf (), +.BR scalbnl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions multiply their first argument +.I x +by +.B FLT_RADIX +(probably 2) +to the power of +.IR exp , +that is: +.PP +.nf + x * FLT_RADIX ** exp +.fi +.PP +The definition of +.B FLT_RADIX +can be obtained by including +.IR . +.\" not in /usr/include but in a gcc lib +.SH RETURN VALUE +On success, these functions return +.I x +* +.B FLT_RADIX +** +.IR exp . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity (negative infinity), +positive infinity (negative infinity) is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with a sign the same as +.IR x . +.PP +If the result underflows, +a range error occurs, +and the functions return zero, with a sign the same as +.IR x . +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error, overflow +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.TP +Range error, underflow +.I errno +is set to +.BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR scalbn (), +.BR scalbnf (), +.BR scalbnl (), +.BR scalbln (), +.BR scalblnf (), +.BR scalblnl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH HISTORY +These functions differ from the obsolete functions described in +.BR scalb (3) +in the type of their second argument. +The functions described on this page have a second argument +of an integral type, while those in +.BR scalb (3) +have a second argument of type +.IR double . +.SH NOTES +If +.B FLT_RADIX +equals 2 (which is usual), then +.BR scalbn () +is equivalent to +.BR ldexp (3). +.SH BUGS +Before glibc 2.20, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803 +these functions did not set +.I errno +for range errors. +.SH SEE ALSO +.BR ldexp (3), +.BR scalb (3) diff --git a/upstream/opensuse-leap-15-6/man3/scandir.3 b/upstream/opensuse-leap-15-6/man3/scandir.3 new file mode 100644 index 00000000..d9226881 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scandir.3 @@ -0,0 +1,311 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" based on text in mkfifoat.3 Copyright (c) 2006, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH scandir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +scandir, scandirat, alphasort, versionsort \- scan +a directory for matching entries +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int scandir(const char *restrict " dirp , +.BI " struct dirent ***restrict " namelist , +.BI " int (*" filter ")(const struct dirent *)," +.BI " int (*" compar ")(const struct dirent **," +.B " const struct dirent **));" +.PP +.BI "int alphasort(const struct dirent **" a ", const struct dirent **" b ); +.BI "int versionsort(const struct dirent **" a ", const struct dirent **" b ); +.PP +.BR "#include " " /* Definition of AT_* constants */" +.B #include +.PP +.BI "int scandirat(int " dirfd ", const char *restrict " dirp , +.BI " struct dirent ***restrict " namelist , +.BI " int (*" filter ")(const struct dirent *)," +.BI " int (*" compar ")(const struct dirent **," +.B " const struct dirent **));" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR scandir (), +.BR alphasort (): +.nf + /* Since glibc 2.10: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR versionsort (): +.nf + _GNU_SOURCE +.fi +.PP +.BR scandirat (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR scandir () +function scans the directory \fIdirp\fP, calling +\fIfilter\fP() on each directory entry. +Entries for which +\fIfilter\fP() returns nonzero are stored in strings allocated via +.BR malloc (3), +sorted using +.BR qsort (3) +with the comparison +function \fIcompar\fP(), and collected in array \fInamelist\fP +which is allocated via +.BR malloc (3). +If \fIfilter\fP is NULL, all entries are selected. +.PP +The +.BR alphasort () +and +.BR versionsort () +functions can be used as the comparison function +.IR compar (). +The former sorts directory entries using +.BR strcoll (3), +the latter using +.BR strverscmp (3) +on the strings \fI(*a)\->d_name\fP and \fI(*b)\->d_name\fP. +.SS scandirat() +The +.BR scandirat () +function operates in exactly the same way as +.BR scandir (), +except for the differences described here. +.PP +If the pathname given in +.I dirp +is relative, then it is interpreted relative to the directory +referred to by the file descriptor +.I dirfd +(rather than relative to the current working directory of +the calling process, as is done by +.BR scandir () +for a relative pathname). +.PP +If +.I dirp +is relative and +.I dirfd +is the special value +.BR AT_FDCWD , +then +.I dirp +is interpreted relative to the current working +directory of the calling process (like +.BR scandir ()). +.PP +If +.I dirp +is absolute, then +.I dirfd +is ignored. +.PP +See +.BR openat (2) +for an explanation of the need for +.BR scandirat (). +.SH RETURN VALUE +The +.BR scandir () +function returns the number of directory entries +selected. +On error, \-1 is returned, with +.I errno +set to indicate the error. +.PP +The +.BR alphasort () +and +.BR versionsort () +functions return an integer less than, equal to, +or greater than zero if the first argument is considered to be +respectively less than, equal to, or greater than the second. +.SH ERRORS +.TP +.B EBADF +.RB ( scandirat ()) +.I dirp +is relative but +.I dirfd +is neither +.B AT_FDCWD +nor a valid file descriptor. +.TP +.B ENOENT +The path in \fIdirp\fR does not exist. +.TP +.B ENOMEM +Insufficient memory to complete the operation. +.TP +.B ENOTDIR +The path in \fIdirp\fR is not a directory. +.TP +.B ENOTDIR +.RB ( scandirat ()) +.I dirp +is a relative pathname and +.I dirfd +is a file descriptor referring to a file other than a directory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR scandir (), +.BR scandirat () +T} Thread safety MT-Safe +T{ +.BR alphasort (), +.BR versionsort () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR alphasort () +.TQ +.BR scandir () +POSIX.1-2008. +.TP +.BR versionsort () +.TQ +.BR scandirat () +GNU. +.SH HISTORY +.TP +.BR alphasort () +.TQ +.BR scandir () +4.3BSD, POSIX.1-2008. +.TP +.BR versionsort () +glibc 2.1. +.TP +.BR scandirat () +glibc 2.15. +.\" .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. +.SH NOTES +Since glibc 2.1, +.BR alphasort () +calls +.BR strcoll (3); +earlier it used +.BR strcmp (3). +.PP +Before glibc 2.10, the two arguments of +.BR alphasort () +and +.BR versionsort () +were typed as +.IR "const void\ *" . +When +.BR alphasort () +was standardized in POSIX.1-2008, +the argument type was specified as the type-safe +.IR "const struct dirent\ **", +and glibc 2.10 changed the definition of +.BR alphasort () +(and the nonstandard +.BR versionsort ()) +to match the standard. +.SH EXAMPLES +The program below prints a list of the files in the current directory +in reverse order. +.\" +.SS Program source +\& +.\" SRC BEGIN (scandir.c) +.EX +#define _DEFAULT_SOURCE +#include +#include +#include + +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 +.\" SRC END +.SH SEE ALSO +.BR closedir (3), +.BR fnmatch (3), +.BR opendir (3), +.BR readdir (3), +.BR rewinddir (3), +.BR seekdir (3), +.BR strcmp (3), +.BR strcoll (3), +.BR strverscmp (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/scanf.3 b/upstream/opensuse-leap-15-6/man3/scanf.3 new file mode 100644 index 00000000..b4be6e71 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scanf.3 @@ -0,0 +1,145 @@ +'\" t +.\" Copyright 2022 Alejandro Colomar +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH scanf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +scanf, fscanf, vscanf, vfscanf \- input FILE format conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int scanf(const char *restrict " format ", ...);" +.BI "int fscanf(FILE *restrict " stream , +.BI " const char *restrict " format ", ...);" +.PP +.B #include +.PP +.BI "int vscanf(const char *restrict " format ", va_list " ap ); +.BI "int vfscanf(FILE *restrict " stream , +.BI " const char *restrict " format ", va_list " ap ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR vscanf (), +.BR vfscanf (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR scanf () +family of functions scans input like +.BR sscanf (3), +but read from a +.IR FILE . +It is very difficult to use these functions correctly, +and it is preferable to read entire lines with +.BR fgets (3) +or +.BR getline (3) +and parse them later with +.BR sscanf (3) +or more specialized functions such as +.BR strtol (3). +.PP +The +.BR scanf () +function reads input from the standard input stream +.I stdin +and +.BR fscanf () +reads input from the stream pointer +.IR stream . +.PP +The +.BR vfscanf () +function is analogous to +.BR vfprintf (3) +and reads input from the stream pointer +.I stream +using a variable argument list of pointers (see +.BR stdarg (3). +The +.BR vscanf () +function is analogous to +.BR vprintf (3) +and reads from the standard input. +.SH RETURN VALUE +On success, these functions return the number of input items +successfully matched and assigned; +this can be fewer than provided for, +or even zero, in the event of an early matching failure. +.PP +The value +.B EOF +is returned if the end of input is reached before either the first +successful conversion or a matching failure occurs. +.B EOF +is also returned if a read error occurs, +in which case the error indicator for the stream (see +.BR ferror (3)) +is set, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +The file descriptor underlying +.I stream +is marked nonblocking, and the read operation would block. +.TP +.B EBADF +The file descriptor underlying +.I stream +is invalid, or not open for reading. +.TP +.B EILSEQ +Input byte sequence does not form a valid character. +.TP +.B EINTR +The read operation was interrupted by a signal; see +.BR signal (7). +.TP +.B EINVAL +Not enough arguments; or +.I format +is NULL. +.TP +.B ENOMEM +Out of memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR scanf (), +.BR fscanf (), +.BR vscanf (), +.BR vfscanf () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.SH SEE ALSO +.BR fgets (3), +.BR getline (3), +.BR sscanf (3) diff --git a/upstream/opensuse-leap-15-6/man3/scanw.3ncurses b/upstream/opensuse-leap-15-6/man3/scanw.3ncurses new file mode 100644 index 00000000..d2a1d333 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scanw.3ncurses @@ -0,0 +1,95 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scanw.3x,v 1.19 2017/11/21 00:46:31 tom Exp $ +.TH scanw 3NCURSES "" +.SH NAME +\fBscanw\fR, +\fBwscanw\fR, +\fBmvscanw\fR, +\fBmvwscanw\fR, +\fBvwscanw\fR, \fBvw_scanw\fR \- convert formatted input from a \fBcurses\fR window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint scanw(char *fmt, ...);\fR +.br +\fBint wscanw(WINDOW *win, char *fmt, ...);\fR +.br +\fBint mvscanw(int y, int x, char *fmt, ...);\fR +.br +\fBint mvwscanw(WINDOW *win, int y, int x, char *fmt, ...);\fR +.br +\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR +.br +\fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR +.SH DESCRIPTION +The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to +\fBscanf\fR [see \fBscanf\fR(3)]. The effect of these routines is as though +\fBwgetstr\fR were called on the window, and the resulting line used as input +for \fBsscanf\fR(3). Fields which do not map to a variable in the \fIfmt\fR +field are lost. +.PP +The \fBvwscanw\fR and \fBvw_scanw\fR routines are analogous to \fBvscanf\fR(3). +They perform a \fBwscanw\fR using a variable argument list. +The third argument is a \fIva_list\fR, +a pointer to a list of arguments, as defined in \fB\fR. +.SH RETURN VALUE +\fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the +number of fields scanned on success. +.PP +Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR, +\fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields +which were mapped in the call. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. The function +\fBvwscanw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function +\fBvw_scanw\fR using the \fB\fR interface. +The Single Unix Specification, Version 2 states that +\fBvw_scanw\fR is preferred to \fBvwscanw\fR since the latter requires +including \fB\fR, which +cannot be used in the same file as \fB\fR. +This implementation uses \fB\fR for both, because that header +is included in \fB. +.LP +Both XSI and The Single Unix Specification, Version 2 state that these +functions return \fBERR\fP or \fBOK\fP. +Since the underlying \fBscanf\fR(3) can return the number of items scanned, +and the SVr4 code was documented to use this feature, +this is probably an editing error which was introduced in XSI, +rather than being done intentionally. +Portable applications should only test if the return value is \fBERR\fP, +since the \fBOK\fP value (zero) is likely to be misleading. +One possible way to get useful results would be to use a "%n" conversion +at the end of the format string to ensure that something was processed. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBgetstr\fR(3NCURSES), \fBprintw\fR(3NCURSES), \fBscanf\fR(3) diff --git a/upstream/opensuse-leap-15-6/man3/sched_getcpu.3 b/upstream/opensuse-leap-15-6/man3/sched_getcpu.3 new file mode 100644 index 00000000..5b677486 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sched_getcpu.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sched_getcpu 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sched_getcpu \- determine CPU on which the calling thread is running +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B int sched_getcpu(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sched_getcpu (): +.nf + Since glibc 2.14: + _GNU_SOURCE + Before glibc 2.14: + _BSD_SOURCE || _SVID_SOURCE + /* _GNU_SOURCE also suffices */ +.fi +.SH DESCRIPTION +.BR sched_getcpu () +returns the number of the CPU +on which the calling thread is currently executing. +.SH RETURN VALUE +On success, +.BR sched_getcpu () +returns a nonnegative CPU number. +On error, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B ENOSYS +This kernel does not implement +.BR getcpu (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sched_getcpu () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.6. +.SH NOTES +The call +.PP +.in +4n +.EX +cpu = sched_getcpu(); +.EE +.in +.PP +is equivalent to the following +.BR getcpu (2) +call: +.PP +.in +4n +.EX +int c, s; +s = getcpu(&c, NULL, NULL); +cpu = (s == \-1) ? s : c; +.EE +.in +.SH SEE ALSO +.BR getcpu (2), +.BR sched (7) diff --git a/upstream/opensuse-leap-15-6/man3/scr_dump.3ncurses b/upstream/opensuse-leap-15-6/man3/scr_dump.3ncurses new file mode 100644 index 00000000..01665c56 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scr_dump.3ncurses @@ -0,0 +1,100 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scr_dump.3x,v 1.11 2017/04/17 00:41:24 tom Exp $ +.TH scr_dump 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBscr_dump\fR, +\fBscr_restore\fR, +\fBscr_init\fR, +\fBscr_set\fR \- read (write) a \fBcurses\fR screen from (to) a file +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint scr_dump(const char *filename);\fR +.br +\fBint scr_restore(const char *filename);\fR +.br +\fBint scr_init(const char *filename);\fR +.br +\fBint scr_set(const char *filename);\fR +.br +.SH DESCRIPTION +The \fBscr_dump\fR routine dumps the current contents of the virtual screen +to the file \fIfilename\fR. +.PP +The \fBscr_restore\fR routine sets the virtual screen to the contents +of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next +call to \fBdoupdate\fR restores the screen to the way it looked in the dump +file. +.PP +The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses +them to initialize the \fBcurses\fR data structures about what the terminal +currently has on its screen. If the data is determined to be valid, +\fBcurses\fR bases its next update of the screen on this information rather +than clearing the screen and starting from scratch. \fBscr_init\fR is used +after \fBinitscr\fR or a \fBsystem\fR call to share +the screen with another process which has done a \fBscr_dump\fR after its +\fBendwin\fR(3X) call. The data is declared invalid if the terminfo capabilities +\fBrmcup\fR and \fBnrrmc\fR exist; also if the terminal has been written to +since the preceding \fBscr_dump\fR call. +.PP +The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and +\fBscr_init\fR. It tells the program that the information in \fIfilename\fR is +what is currently on the screen, and also what the program wants on the screen. +This can be thought of as a screen inheritance function. +.PP +To read (write) a window from (to) a file, use the \fBgetwin\fR and +\fBputwin\fR routines [see \fButil\fR(3NCURSES)]. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and \fBOK\fR +upon success. +.PP +X/Open defines no error conditions. +In this implementation, +each will return an error if the file cannot be opened. +.SH NOTES +Note that \fBscr_init\fR, \fBscr_set\fR, and \fBscr_restore\fR may be macros. +.SH PORTABILITY +The XSI Curses standard, Issue 4, describes these functions (adding the const +qualifiers). +.PP +The SVr4 docs merely say under \fBscr_init\fR that the dump data is also +considered invalid "if the time-stamp of the tty is old" but do not define +"old". +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fButil\fR(3NCURSES), +\fBscr_dump\fR(5), +\fBsystem\fR(3) diff --git a/upstream/opensuse-leap-15-6/man3/scroll.3ncurses b/upstream/opensuse-leap-15-6/man3/scroll.3ncurses new file mode 100644 index 00000000..8a4300ab --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/scroll.3ncurses @@ -0,0 +1,90 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_scroll.3x,v 1.15 2010/12/04 18:40:45 tom Exp $ +.TH scroll 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBscroll\fR, +\fBscrl\fR, +\fBwscrl\fR \- scroll a \fBcurses\fR window +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint scroll(WINDOW *win);\fR +.br +\fBint scrl(int n);\fR +.br +\fBint wscrl(WINDOW *win, int n);\fR +.br +.SH DESCRIPTION +The \fBscroll\fR routine scrolls the window up one line. +This involves moving +the lines in the window data structure. +As an optimization, if the scrolling +region of the window is the entire screen, the physical screen may be scrolled +at the same time. +.PP +For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the +window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise +scroll the window down \fIn\fR lines. +This involves moving the lines in the +window character image structure. +The current cursor position is not changed. +.PP +For these functions to work, scrolling must be enabled via \fBscrollok\fR. +.SH RETURN VALUE +These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies +"an integer value other than \fBERR\fR") upon successful completion. +.PP +X/Open defines no error conditions. +.PP +This implementation returns an error +if the window pointer is null, or +if scrolling is not enabled in the window, e.g., with \fBscrollok\fP. +.SH NOTES +Note that \fBscrl\fR and \fBscroll\fR may be macros. +.PP +The SVr4 documentation says that the optimization of physically scrolling +immediately if the scroll region is the entire screen "is" performed, not +"may be" performed. +This implementation deliberately does not guarantee +that this will occur, to leave open the possibility of smarter +optimization of multiple scroll actions on the next update. +.PP +Neither the SVr4 nor the XSI documentation specify whether the current +attribute or +current color-pair of blanks generated by the scroll function is zeroed. +Under this implementation it is. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBoutopts\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/seekdir.3 b/upstream/opensuse-leap-15-6/man3/seekdir.3 new file mode 100644 index 00000000..38d929b8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/seekdir.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH seekdir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +seekdir \- set the position of the next readdir() call in the directory +stream. +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void seekdir(DIR *" dirp ", long " loc ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR seekdir (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR seekdir () +function sets the location in the directory stream +from which the next +.BR readdir (2) +call will start. +The +.I loc +argument should be a value returned by a previous call to +.BR telldir (3). +.SH RETURN VALUE +The +.BR seekdir () +function returns no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR seekdir () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.SH CAVEATS +Up to glibc 2.1.1, the type of the +.I loc +argument was +.IR off_t . +POSIX.1-2001 specifies +.IR long , +and this is the type used since glibc 2.1.2. +See +.BR telldir (3) +for information on why you should be careful in making any +assumptions about the value in this argument. +.SH SEE ALSO +.BR lseek (2), +.BR closedir (3), +.BR opendir (3), +.BR readdir (3), +.BR rewinddir (3), +.BR scandir (3), +.BR telldir (3) diff --git a/upstream/opensuse-leap-15-6/man3/sem_close.3 b/upstream/opensuse-leap-15-6/man3/sem_close.3 new file mode 100644 index 00000000..033a4563 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_close.3 @@ -0,0 +1,66 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_close 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_close \- close a named semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_close(sem_t *" sem ); +.fi +.SH DESCRIPTION +.BR sem_close () +closes the named semaphore referred to by +.IR sem , +allowing any resources that the system has allocated to +the calling process for this semaphore to be freed. +.SH RETURN VALUE +On success +.BR sem_close () +returns 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I sem +is not a valid semaphore. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_close () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +All open named semaphores are automatically closed on process +termination, or upon +.BR execve (2). +.SH SEE ALSO +.BR sem_getvalue (3), +.BR sem_open (3), +.BR sem_post (3), +.BR sem_unlink (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_destroy.3 b/upstream/opensuse-leap-15-6/man3/sem_destroy.3 new file mode 100644 index 00000000..6bfd6e23 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_destroy.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_destroy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_destroy \- destroy an unnamed semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_destroy(sem_t *" sem ); +.fi +.SH DESCRIPTION +.BR sem_destroy () +destroys the unnamed semaphore at the address pointed to by +.IR sem . +.PP +Only a semaphore that has been initialized by +.BR sem_init (3) +should be destroyed using +.BR sem_destroy (). +.PP +Destroying a semaphore that other processes or threads are +currently blocked on (in +.BR sem_wait (3)) +produces undefined behavior. +.PP +Using a semaphore that has been destroyed produces undefined results, +until the semaphore has been reinitialized using +.BR sem_init (3). +.SH RETURN VALUE +.BR sem_destroy () +returns 0 on success; +on error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I sem +is not a valid semaphore. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_destroy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +An unnamed semaphore should be destroyed with +.BR sem_destroy () +before the memory in which it is located is deallocated. +Failure to do this can result in resource leaks on some implementations. +.\" But not on NPTL, where sem_destroy () is a no-op.. +.SH SEE ALSO +.BR sem_init (3), +.BR sem_post (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_getvalue.3 b/upstream/opensuse-leap-15-6/man3/sem_getvalue.3 new file mode 100644 index 00000000..48e09750 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_getvalue.3 @@ -0,0 +1,77 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_getvalue 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_getvalue \- get the value of a semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_getvalue(sem_t *restrict " sem ", int *restrict " sval ); +.fi +.SH DESCRIPTION +.BR sem_getvalue () +places the current value of the semaphore pointed to +.I sem +into the integer pointed to by +.IR sval . +.PP +If one or more processes or threads are blocked +waiting to lock the semaphore with +.BR sem_wait (3), +POSIX.1 permits two possibilities for the value returned in +.IR sval : +either 0 is returned; +or a negative number whose absolute value is the count +of the number of processes and threads currently blocked in +.BR sem_wait (3). +Linux adopts the former behavior. +.SH RETURN VALUE +.BR sem_getvalue () +returns 0 on success; +on error, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I sem +is not a valid semaphore. +(The glibc implementation currently does not check whether +.I sem +is valid.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_getvalue () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The value of the semaphore may already have changed by the time +.BR sem_getvalue () +returns. +.SH SEE ALSO +.BR sem_post (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_init.3 b/upstream/opensuse-leap-15-6/man3/sem_init.3 new file mode 100644 index 00000000..96510126 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_init.3 @@ -0,0 +1,111 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_init 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_init \- initialize an unnamed semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_init(sem_t *" sem ", int " pshared ", unsigned int " value ); +.fi +.SH DESCRIPTION +.BR sem_init () +initializes the unnamed semaphore at the address pointed to by +.IR sem . +The +.I value +argument specifies the initial value for the semaphore. +.PP +The +.I pshared +argument indicates whether this semaphore is to be shared +between the threads of a process, or between processes. +.PP +If +.I pshared +has the value 0, +then the semaphore is shared between the threads of a process, +and should be located at some address that is visible to all threads +(e.g., a global variable, or a variable allocated dynamically on +the heap). +.PP +If +.I pshared +is nonzero, then the semaphore is shared between processes, +and should be located in a region of shared memory (see +.BR shm_open (3), +.BR mmap (2), +and +.BR shmget (2)). +(Since a child created by +.BR fork (2) +inherits its parent's memory mappings, it can also access the semaphore.) +Any process that can access the shared memory region +can operate on the semaphore using +.BR sem_post (3), +.BR sem_wait (3), +and so on. +.PP +Initializing a semaphore that has already been initialized +results in undefined behavior. +.SH RETURN VALUE +.BR sem_init () +returns 0 on success; +on error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I value +exceeds +.BR SEM_VALUE_MAX . +.TP +.B ENOSYS +.I pshared +is nonzero, +but the system does not support process-shared semaphores (see +.BR sem_overview (7)). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_init () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +Bizarrely, POSIX.1-2001 does not specify the value that should +be returned by a successful call to +.BR sem_init (). +POSIX.1-2008 rectifies this, specifying the zero return on success. +.SH EXAMPLES +See +.BR shm_open (3) +and +.BR sem_wait (3). +.SH SEE ALSO +.BR sem_destroy (3), +.BR sem_post (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_open.3 b/upstream/opensuse-leap-15-6/man3/sem_open.3 new file mode 100644 index 00000000..f6b0ace5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_open.3 @@ -0,0 +1,178 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_open 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_open \- initialize and open a named semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.BR "#include " " /* For O_* constants */" +.BR "#include " " /* For mode constants */" +.B #include +.PP +.BI "sem_t *sem_open(const char *" name ", int " oflag ); +.BI "sem_t *sem_open(const char *" name ", int " oflag , +.BI " mode_t " mode ", unsigned int " value ); +.fi +.SH DESCRIPTION +.BR sem_open () +creates a new POSIX semaphore or opens an existing semaphore. +The semaphore is identified by +.IR name . +For details of the construction of +.IR name , +see +.BR sem_overview (7). +.PP +The +.I oflag +argument specifies flags that control the operation of the call. +(Definitions of the flags values can be obtained by including +.IR .) +If +.B O_CREAT +is specified in +.IR oflag , +then the semaphore is created if +it does not already exist. +The owner (user ID) of the semaphore is set to the effective +user ID of the calling process. +The group ownership (group ID) is set to the effective group ID +of the calling process. +.\" In reality the filesystem IDs are used on Linux. +If both +.B O_CREAT +and +.B O_EXCL +are specified in +.IR oflag , +then an error is returned if a semaphore with the given +.I name +already exists. +.PP +If +.B O_CREAT +is specified in +.IR oflag , +then two additional arguments must be supplied. +The +.I mode +argument specifies the permissions to be placed on the new semaphore, +as for +.BR open (2). +(Symbolic definitions for the permissions bits can be obtained by including +.IR .) +The permissions settings are masked against the process umask. +Both read and write permission should be granted to each class of +user that will access the semaphore. +The +.I value +argument specifies the initial value for the new semaphore. +If +.B O_CREAT +is specified, and a semaphore with the given +.I name +already exists, then +.I mode +and +.I value +are ignored. +.SH RETURN VALUE +On success, +.BR sem_open () +returns the address of the new semaphore; +this address is used when calling other semaphore-related functions. +On error, +.BR sem_open () +returns +.BR SEM_FAILED , +with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EACCES +The semaphore exists, but the caller does not have permission to +open it. +.TP +.B EEXIST +Both +.B O_CREAT +and +.B O_EXCL +were specified in +.IR oflag , +but a semaphore with this +.I name +already exists. +.TP +.B EINVAL +.I value +was greater than +.BR SEM_VALUE_MAX . +.TP +.B EINVAL +.I name +consists of just "/", followed by no other characters. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENAMETOOLONG +.I name +was too long. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOENT +The +.B O_CREAT +flag was not specified in +.I oflag +and no semaphore with this +.I name +exists; +or, +.\" this error can occur if we have a name of the (nonportable) form +.\" /dir/name, and the directory /dev/shm/dir does not exist. +.B O_CREAT +was specified, but +.I name +wasn't well formed. +.TP +.B ENOMEM +Insufficient memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_open () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR sem_close (3), +.BR sem_getvalue (3), +.BR sem_post (3), +.BR sem_unlink (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_post.3 b/upstream/opensuse-leap-15-6/man3/sem_post.3 new file mode 100644 index 00000000..ce170101 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_post.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_post 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_post \- unlock a semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_post(sem_t *" sem ); +.fi +.SH DESCRIPTION +.BR sem_post () +increments (unlocks) the semaphore pointed to by +.IR sem . +If the semaphore's value consequently becomes greater than zero, +then another process or thread blocked in a +.BR sem_wait (3) +call will be woken up and proceed to lock the semaphore. +.SH RETURN VALUE +.BR sem_post () +returns 0 on success; +on error, the value of the semaphore is left unchanged, +\-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I sem +is not a valid semaphore. +.TP +.B EOVERFLOW +.\" Added in POSIX.1-2008 TC1 (Austin Interpretation 213) +The maximum allowable value for a semaphore would be exceeded. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_post () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +.BR sem_post () +is async-signal-safe: +it may be safely called within a signal handler. +.SH EXAMPLES +See +.BR sem_wait (3) +and +.BR shm_open (3). +.SH SEE ALSO +.BR sem_getvalue (3), +.BR sem_wait (3), +.BR sem_overview (7), +.BR signal\-safety (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_unlink.3 b/upstream/opensuse-leap-15-6/man3/sem_unlink.3 new file mode 100644 index 00000000..eb78b763 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_unlink.3 @@ -0,0 +1,69 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_unlink 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_unlink \- remove a named semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_unlink(const char *" name ); +.fi +.SH DESCRIPTION +.BR sem_unlink () +removes the named semaphore referred to by +.IR name . +The semaphore name is removed immediately. +The semaphore is destroyed once all other processes that have +the semaphore open close it. +.SH RETURN VALUE +On success +.BR sem_unlink () +returns 0; on error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EACCES +The caller does not have permission to unlink this semaphore. +.TP +.B ENAMETOOLONG +.I name +was too long. +.TP +.B ENOENT +There is no semaphore with the given +.IR name . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_unlink () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.BR sem_getvalue (3), +.BR sem_open (3), +.BR sem_post (3), +.BR sem_wait (3), +.BR sem_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/sem_wait.3 b/upstream/opensuse-leap-15-6/man3/sem_wait.3 new file mode 100644 index 00000000..7331241d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sem_wait.3 @@ -0,0 +1,254 @@ +'\" t +.\" Copyright (C) 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sem_wait 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sem_wait, sem_timedwait, sem_trywait \- lock a semaphore +.SH LIBRARY +POSIX threads library +.RI ( libpthread ", " \-lpthread ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sem_wait(sem_t *" sem ); +.BI "int sem_trywait(sem_t *" sem ); +.BI "int sem_timedwait(sem_t *restrict " sem , +.BI " const struct timespec *restrict " abs_timeout ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sem_timedwait (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.BR sem_wait () +decrements (locks) the semaphore pointed to by +.IR sem . +If the semaphore's value is greater than zero, +then the decrement proceeds, and the function returns, immediately. +If the semaphore currently has the value zero, +then the call blocks until either it becomes possible to perform +the decrement (i.e., the semaphore value rises above zero), +or a signal handler interrupts the call. +.PP +.BR sem_trywait () +is the same as +.BR sem_wait (), +except that if the decrement cannot be immediately performed, +then call returns an error +.RI ( errno +set to +.BR EAGAIN ) +instead of blocking. +.PP +.BR sem_timedwait () +is the same as +.BR sem_wait (), +except that +.I abs_timeout +specifies a limit on the amount of time that the call +should block if the decrement cannot be immediately performed. +The +.I abs_timeout +argument points to a +.BR timespec (3) +structure that specifies an absolute timeout +in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). +.PP +If the timeout has already expired by the time of the call, +and the semaphore could not be locked immediately, +then +.BR sem_timedwait () +fails with a timeout error +.RI ( errno +set to +.BR ETIMEDOUT ). +.PP +If the operation can be performed immediately, then +.BR sem_timedwait () +never fails with a timeout error, regardless of the value of +.IR abs_timeout . +Furthermore, the validity of +.I abs_timeout +is not checked in this case. +.SH RETURN VALUE +All of these functions return 0 on success; +on error, the value of the semaphore is left unchanged, +\-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +.RB ( sem_trywait ()) +The operation could not be performed without blocking (i.e., the +semaphore currently has the value zero). +.TP +.B EINTR +The call was interrupted by a signal handler; see +.BR signal (7). +.TP +.B EINVAL +.I sem +is not a valid semaphore. +.TP +.B EINVAL +.RB ( sem_timedwait ()) +The value of +.I abs_timeout.tv_nsecs +is less than 0, or greater than or equal to 1000 million. +.TP +.B ETIMEDOUT +.RB ( sem_timedwait ()) +The call timed out before the semaphore could be locked. +.\" POSIX.1-2001 also allows EDEADLK -- "A deadlock condition +.\" was detected", but this does not occur on Linux(?). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sem_wait (), +.BR sem_trywait (), +.BR sem_timedwait () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The (somewhat trivial) program shown below operates on an +unnamed semaphore. +The program expects two command-line arguments. +The first argument specifies a seconds value that is used to +set an alarm timer to generate a +.B SIGALRM +signal. +This handler performs a +.BR sem_post (3) +to increment the semaphore that is being waited on in +.I main() +using +.BR sem_timedwait (). +The second command-line argument specifies the length +of the timeout, in seconds, for +.BR sem_timedwait (). +The following shows what happens on two different runs of the program: +.PP +.in +4n +.EX +.RB "$" " ./a.out 2 3" +About to call sem_timedwait() +sem_post() from handler +sem_timedwait() succeeded +.RB "$" " ./a.out 2 1" +About to call sem_timedwait() +sem_timedwait() timed out +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (sem_wait.c) +.EX +#include +#include +#include +#include +#include +#include +#include + +#include + +sem_t sem; + +#define handle_error(msg) \e + do { perror(msg); exit(EXIT_FAILURE); } while (0) + +static void +handler(int sig) +{ + write(STDOUT_FILENO, "sem_post() from handler\en", 24); + if (sem_post(&sem) == \-1) { + write(STDERR_FILENO, "sem_post() failed\en", 18); + _exit(EXIT_FAILURE); + } +} + +int +main(int argc, char *argv[]) +{ + struct sigaction sa; + struct timespec ts; + int s; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", + argv[0]); + exit(EXIT_FAILURE); + } + + if (sem_init(&sem, 0, 0) == \-1) + handle_error("sem_init"); + + /* Establish SIGALRM handler; set alarm timer using argv[1]. */ + + sa.sa_handler = handler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + if (sigaction(SIGALRM, &sa, NULL) == \-1) + handle_error("sigaction"); + + alarm(atoi(argv[1])); + + /* Calculate relative interval as current time plus + number of seconds given argv[2]. */ + + if (clock_gettime(CLOCK_REALTIME, &ts) == \-1) + handle_error("clock_gettime"); + + ts.tv_sec += atoi(argv[2]); + + printf("%s() about to call sem_timedwait()\en", __func__); + while ((s = sem_timedwait(&sem, &ts)) == \-1 && errno == EINTR) + continue; /* Restart if interrupted by handler. */ + + /* Check what happened. */ + + if (s == \-1) { + if (errno == ETIMEDOUT) + printf("sem_timedwait() timed out\en"); + else + perror("sem_timedwait"); + } else + printf("sem_timedwait() succeeded\en"); + + exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR clock_gettime (2), +.BR sem_getvalue (3), +.BR sem_post (3), +.BR timespec (3), +.BR sem_overview (7), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/setaliasent.3 b/upstream/opensuse-leap-15-6/man3/setaliasent.3 new file mode 100644 index 00000000..9e44d6cd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setaliasent.3 @@ -0,0 +1,185 @@ +'\" t +.\" Copyright 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Polished a bit, added a little, aeb +.\" +.TH setaliasent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setaliasent, endaliasent, getaliasent, getaliasent_r, +getaliasbyname, getaliasbyname_r \- read an alias entry +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B "void setaliasent(void);" +.B "void endaliasent(void);" +.PP +.B "struct aliasent *getaliasent(void);" +.BI "int getaliasent_r(struct aliasent *restrict " result , +.BI " char " buffer "[restrict ." buflen "], \ +size_t " buflen , +.BI " struct aliasent **restrict " res ); +.PP +.BI "struct aliasent *getaliasbyname(const char *" name ); +.BI "int getaliasbyname_r(const char *restrict " name , +.BI " struct aliasent *restrict " result , +.BI " char " buffer "[restrict ." buflen "], \ +size_t " buflen , +.BI " struct aliasent **restrict " res ); +.fi +.SH DESCRIPTION +One of the databases available with the Name Service Switch (NSS) +is the aliases database, that contains mail aliases. +(To find out which databases are supported, try +.IR "getent \-\-help" .) +Six functions are provided to access the aliases database. +.PP +The +.BR getaliasent () +function returns a pointer to a structure containing +the group information from the aliases database. +The first time it is called it returns the first entry; +thereafter, it returns successive entries. +.PP +The +.BR setaliasent () +function rewinds the file pointer to the beginning of the +aliases database. +.PP +The +.BR endaliasent () +function closes the aliases database. +.PP +.BR getaliasent_r () +is the reentrant version of the previous function. +The requested structure +is stored via the first argument but the programmer needs to fill the other +arguments also. +Not providing enough space causes the function to fail. +.PP +The function +.BR getaliasbyname () +takes the name argument and searches the aliases database. +The entry is returned as a pointer to a +.IR "struct aliasent" . +.PP +.BR getaliasbyname_r () +is the reentrant version of the previous function. +The requested structure +is stored via the second argument but the programmer needs to fill the other +arguments also. +Not providing enough space causes the function to fail. +.PP +The +.I "struct aliasent" +is defined in +.IR : +.PP +.in +4n +.EX +struct aliasent { + char *alias_name; /* alias name */ + size_t alias_members_len; + char **alias_members; /* alias name list */ + int alias_local; +}; +.EE +.in +.SH RETURN VALUE +The functions +.BR getaliasent_r () +and +.BR getaliasbyname_r () +return a nonzero value on error. +.SH FILES +The default alias database is the file +.IR /etc/aliases . +This can be changed in the +.I /etc/nsswitch.conf +file. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setaliasent (), +.BR endaliasent (), +.BR getaliasent_r (), +.BR getaliasbyname_r () +T} Thread safety MT-Safe locale +T{ +.BR getaliasent (), +.BR getaliasbyname () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +The NeXT system has similar routines: +.PP +.in +4n +.EX +#include + +void alias_setent(void); +void alias_endent(void); +alias_ent *alias_getent(void); +alias_ent *alias_getbyname(char *name); +.EE +.in +.SH EXAMPLES +The following example compiles with +.IR "gcc example.c \-o example" . +It will dump all names in the alias database. +.PP +.\" SRC BEGIN (setaliasent.c) +.EX +#include +#include +#include +#include + +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 +.\" SRC END +.SH SEE ALSO +.BR getgrent (3), +.BR getpwent (3), +.BR getspent (3), +.BR aliases (5) +.\" +.\" /etc/sendmail/aliases +.\" Yellow Pages +.\" newaliases, postalias diff --git a/upstream/opensuse-leap-15-6/man3/setbuf.3 b/upstream/opensuse-leap-15-6/man3/setbuf.3 new file mode 100644 index 00000000..bfc04e6b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setbuf.3 @@ -0,0 +1,230 @@ +'\" t +.\" Copyright (c) 1980, 1991 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)setbuf.3 6.10 (Berkeley) 6/29/91 +.\" +.\" Converted for Linux, Mon Nov 29 14:55:24 1993, faith@cs.unc.edu +.\" Added section to BUGS, Sun Mar 12 22:28:33 MET 1995, +.\" Thomas.Koenig@ciw.uni-karlsruhe.de +.\" Correction, Sun, 11 Apr 1999 15:55:18, +.\" Martin Vicente +.\" Correction, 2000-03-03, Andreas Jaeger +.\" Added return value for setvbuf, aeb, +.\" +.TH setbuf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int setvbuf(FILE *restrict " stream ", char " buf "[restrict ." size ], +.BI " int " mode ", size_t " size ); +.PP +.BI "void setbuf(FILE *restrict " stream ", char *restrict " buf ); +.BI "void setbuffer(FILE *restrict " stream ", char " buf "[restrict ." size ], +.BI " size_t " size ); +.BI "void setlinebuf(FILE *" stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR setbuffer (), +.BR setlinebuf (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The three types of buffering available are unbuffered, block buffered, and +line buffered. +When an output stream is unbuffered, information appears on +the destination file or terminal as soon as written; when it is block +buffered, many characters are saved up and written as a block; when it is +line buffered, characters are saved up until a newline is output or input is +read from any stream attached to a terminal device (typically \fIstdin\fP). +The function +.BR fflush (3) +may be used to force the block out early. +(See +.BR fclose (3).) +.PP +Normally all files are block buffered. +If a stream refers to a terminal (as +.I stdout +normally does), it is line buffered. +The standard error stream +.I stderr +is always unbuffered by default. +.PP +The +.BR setvbuf () +function may be used on any open stream to change its buffer. +The +.I mode +argument must be one of the following three macros: +.RS +.TP +.B _IONBF +unbuffered +.TP +.B _IOLBF +line buffered +.TP +.B _IOFBF +fully buffered +.RE +.PP +Except for unbuffered files, the +.I buf +argument should point to a buffer at least +.I size +bytes long; this buffer will be used instead of the current buffer. +If the argument +.I buf +is NULL, +only the mode is affected; a new buffer will be allocated on the next read +or write operation. +The +.BR setvbuf () +function may be used only after opening a stream and before any other +operations have been performed on it. +.PP +The other three calls are, in effect, simply aliases for calls to +.BR setvbuf (). +The +.BR setbuf () +function is exactly equivalent to the call +.PP +.in +4n +setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ); +.in +.PP +The +.BR setbuffer () +function is the same, except that the size of the buffer is up to the +caller, rather than being determined by the default +.BR BUFSIZ . +The +.BR setlinebuf () +function is exactly equivalent to the call: +.PP +.in +4n +setvbuf(stream, NULL, _IOLBF, 0); +.in +.SH RETURN VALUE +The function +.BR setvbuf () +returns 0 on success. +It returns nonzero on failure +.RI ( mode +is invalid or the request cannot be honored). +It may set +.I errno +on failure. +.PP +The other functions do not return a value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setbuf (), +.BR setbuffer (), +.BR setlinebuf (), +.BR setvbuf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR setbuf () +.TQ +.BR setvbuf () +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR setbuf () +.TQ +.BR setvbuf () +C89, POSIX.1-2001. +.SH CAVEATS +POSIX notes +.\" https://www.austingroupbugs.net/view.php?id=397#c799 +.\" 0000397: setbuf and errno +that the value of +.I errno +is unspecified after a call to +.BR setbuf () +and further notes that, since the value of +.I errno +is not required to be unchanged after a successful call to +.BR setbuf (), +applications should instead use +.BR setvbuf () +in order to detect errors. +.SH BUGS +.\" The +.\" .BR setbuffer () +.\" and +.\" .BR setlinebuf () +.\" functions are not portable to versions of BSD before 4.2BSD, and +.\" are available under Linux since libc 4.5.21. +.\" On 4.2BSD and 4.3BSD systems, +.\" .BR setbuf () +.\" always uses a suboptimal buffer size and should be avoided. +.\".PP +You must make sure that the space that +.I buf +points to still exists by the time +.I stream +is closed, which also happens at program termination. +For example, the following is invalid: +.PP +.\" [[invalid]] SRC BEGIN (setbuf.c) +.EX +#include + +int +main(void) +{ + char buf[BUFSIZ]; + + setbuf(stdout, buf); + printf("Hello, world!\en"); + return 0; +} +.EE +.\" SRC END +.SH SEE ALSO +.BR stdbuf (1), +.BR fclose (3), +.BR fflush (3), +.BR fopen (3), +.BR fread (3), +.BR malloc (3), +.BR printf (3), +.BR puts (3) diff --git a/upstream/opensuse-leap-15-6/man3/setenv.3 b/upstream/opensuse-leap-15-6/man3/setenv.3 new file mode 100644 index 00000000..34dcb3d9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setenv.3 @@ -0,0 +1,153 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2004, 2007 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 +.\" 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 +.\" +.TH setenv 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setenv \- change or add an environment variable +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int setenv(const char *" name ", const char *" value ", int " overwrite ); +.BI "int unsetenv(const char *" name ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR setenv (), +.BR unsetenv (): +.nf + _POSIX_C_SOURCE >= 200112L + || /* glibc <= 2.19: */ _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR setenv () +function adds the variable +.I name +to the +environment with the value +.IR value , +if +.I name +does not +already exist. +If +.I name +does exist in the environment, then +its value is changed to +.I value +if +.I overwrite +is nonzero; +if +.I overwrite +is zero, then the value of +.I name +is not changed (and +.BR setenv () +returns a success status). +This function makes copies of the strings pointed to by +.I name +and +.I value +(by contrast with +.BR putenv (3)). +.PP +The +.BR unsetenv () +function deletes the variable +.I name +from +the environment. +If +.I name +does not exist in the environment, +then the function succeeds, and the environment is unchanged. +.SH RETURN VALUE +.BR setenv () +and +.BR unsetenv () +functions return zero on success, +or \-1 on error, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I name +is NULL, points to a string of length 0, +or contains an \[aq]=\[aq] character. +.TP +.B ENOMEM +Insufficient memory to add a new variable to the environment. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setenv (), +.BR unsetenv () +T} Thread safety MT-Unsafe const:env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.PP +Prior to glibc 2.2.2, +.BR unsetenv () +was prototyped +as returning +.IR void ; +more recent glibc versions follow the +POSIX.1-compliant prototype shown in the SYNOPSIS. +.SH CAVEATS +POSIX.1 does not require +.BR setenv () +or +.BR unsetenv () +to be reentrant. +.SH BUGS +POSIX.1 specifies that if +.I name +contains an \[aq]=\[aq] character, then +.BR setenv () +should fail with the error +.BR EINVAL ; +however, versions of glibc before glibc 2.3.4 allowed an \[aq]=\[aq] sign in +.IR name . +.SH SEE ALSO +.BR clearenv (3), +.BR getenv (3), +.BR putenv (3), +.BR environ (7) diff --git a/upstream/opensuse-leap-15-6/man3/setjmp.3 b/upstream/opensuse-leap-15-6/man3/setjmp.3 new file mode 100644 index 00000000..3388e97a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setjmp.3 @@ -0,0 +1,333 @@ +'\" t +.\" Copyright (C) 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH setjmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setjmp, sigsetjmp, longjmp, siglongjmp \- performing a nonlocal goto +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int setjmp(jmp_buf " env ); +.BI "int sigsetjmp(sigjmp_buf " env ", int " savesigs ); +.PP +.BI "[[noreturn]] void longjmp(jmp_buf " env ", int " val ); +.BI "[[noreturn]] void siglongjmp(sigjmp_buf " env ", int " val ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR setjmp (): +see NOTES. +.PP +.BR sigsetjmp (): +.nf + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The functions described on this page are used for performing "nonlocal gotos": +transferring execution from one function to a predetermined location +in another function. +The +.BR setjmp () +function dynamically establishes the target to which control +will later be transferred, and +.BR longjmp () +performs the transfer of execution. +.PP +The +.BR setjmp () +function saves various information about the calling environment +(typically, the stack pointer, the instruction pointer, +possibly the values of other registers and the signal mask) +in the buffer +.I env +for later use by +.BR longjmp (). +In this case, +.BR setjmp () +returns 0. +.PP +The +.BR longjmp () +function uses the information saved in +.I env +to transfer control back to the point where +.BR setjmp () +was called and to restore ("rewind") the stack to its state at the time of the +.BR setjmp () +call. +In addition, and depending on the implementation (see NOTES), +the values of some other registers and the process signal mask +may be restored to their state at the time of the +.BR setjmp () +call. +.PP +Following a successful +.BR longjmp (), +execution continues as if +.BR setjmp () +had returned for a second time. +This "fake" return can be distinguished from a true +.BR setjmp () +call because the "fake" return returns the value provided in +.IR val . +If the programmer mistakenly passes the value 0 in +.IR val , +the "fake" return will instead return 1. +.SS sigsetjmp() and siglongjmp() +.BR sigsetjmp () +and +.BR siglongjmp () +also perform nonlocal gotos, but provide predictable handling of +the process signal mask. +.PP +If, and only if, the +.I savesigs +argument provided to +.BR sigsetjmp () +is nonzero, the process's current signal mask is saved in +.I env +and will be restored if a +.BR siglongjmp () +is later performed with this +.IR env . +.SH RETURN VALUE +.BR setjmp () +and +.BR sigsetjmp () +return 0 when called directly; +on the "fake" return that occurs after +.BR longjmp () +or +.BR siglongjmp (), +the nonzero value specified in +.I val +is returned. +.PP +The +.BR longjmp () +or +.BR siglongjmp () +functions do not return. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setjmp (), +.BR sigsetjmp () +T} Thread safety MT-Safe +T{ +.BR longjmp (), +.BR siglongjmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR setjmp () +.TQ +.BR longjmp () +C11, POSIX.1-2008. +.TP +.BR sigsetjmp () +.TQ +.BR siglongjmp () +POSIX.1-2008. +.SH HISTORY +.TP +.BR setjmp () +.TQ +.BR longjmp () +POSIX.1-2001, C89. +.TP +.BR sigsetjmp () +.TQ +.BR siglongjmp () +POSIX.1-2001. +.PP +POSIX does not specify whether +.BR setjmp () +will save the signal mask +(to be later restored during +.BR longjmp ()). +In System V it will not. +In 4.3BSD it will, and there +is a function +.BR _setjmp () +that will not. +The behavior under Linux depends on the glibc version +and the setting of feature test macros. +Before glibc 2.19, +.BR setjmp () +follows the System V behavior by default, +but the BSD behavior is provided if the +.B _BSD_SOURCE +feature test macro is explicitly defined +.\" so that _FAVOR_BSD is triggered +and none of +.BR _POSIX_SOURCE , +.BR _POSIX_C_SOURCE , +.BR _XOPEN_SOURCE , +.\" .BR _XOPEN_SOURCE_EXTENDED , +.BR _GNU_SOURCE , +or +.B _SVID_SOURCE +is defined. +Since glibc 2.19, +.I +exposes only the System V version of +.BR setjmp (). +Programs that need the BSD semantics should replace calls to +.BR setjmp () +with calls to +.BR sigsetjmp () +with a nonzero +.I savesigs +argument. +.SH NOTES +.BR setjmp () +and +.BR longjmp () +can be useful for dealing with errors inside deeply nested function calls +or to allow a signal handler to pass control to +a specific point in the program, +rather than returning to the point where the handler interrupted +the main program. +In the latter case, +if you want to portably save and restore signal masks, use +.BR sigsetjmp () +and +.BR siglongjmp (). +See also the discussion of program readability below. +.SH CAVEATS +The compiler may optimize variables into registers, and +.BR longjmp () +may restore the values of other registers in addition to the +stack pointer and program counter. +Consequently, the values of automatic variables are unspecified +after a call to +.BR longjmp () +if they meet all the following criteria: +.IP \[bu] 3 +they are local to the function that made the corresponding +.BR setjmp () +call; +.IP \[bu] +their values are changed between the calls to +.BR setjmp () +and +.BR longjmp (); +and +.IP \[bu] +they are not declared as +.IR volatile . +.PP +Analogous remarks apply for +.BR siglongjmp (). +.\" +.SS Nonlocal gotos and program readability +While it can be abused, +the traditional C "goto" statement at least has the benefit that lexical cues +(the goto statement and the target label) +allow the programmer to easily perceive the flow of control. +Nonlocal gotos provide no such cues: multiple +.BR setjmp () +calls might employ the same +.I jmp_buf +variable so that the content of the variable may change +over the lifetime of the application. +Consequently, the programmer may be forced to perform detailed +reading of the code to determine the dynamic target of a particular +.BR longjmp () +call. +(To make the programmer's life easier, each +.BR setjmp () +call should employ a unique +.I jmp_buf +variable.) +.PP +Adding further difficulty, the +.BR setjmp () +and +.BR longjmp () +calls may not even be in the same source code module. +.PP +In summary, nonlocal gotos can make programs harder to understand +and maintain, and an alternative should be used if possible. +.\" +.SS Undefined Behavior +If the function which called +.BR setjmp () +returns before +.BR longjmp () +is called, the behavior is undefined. +Some kind of subtle or unsubtle chaos is sure to result. +.PP +If, in a multithreaded program, a +.BR longjmp () +call employs an +.I env +buffer that was initialized by a call to +.BR setjmp () +in a different thread, the behavior is undefined. +.\" +.\" The following statement appeared in versions up to POSIX.1-2008 TC1, +.\" but is set to be removed in POSIX.1-2008 TC2: +.\" +.\" According to POSIX.1, if a +.\" .BR longjmp () +.\" call is performed from a nested signal handler +.\" (i.e., from a handler that was invoked in response to a signal that was +.\" generated while another signal was already in the process of being +.\" handled), the behavior is undefined. +.PP +POSIX.1-2008 Technical Corrigendum 2 adds +.\" http://austingroupbugs.net/view.php?id=516#c1195 +.BR longjmp () +and +.BR siglongjmp () +to the list of async-signal-safe functions. +However, the standard recommends avoiding the use of these functions +from signal handlers and goes on to point out that +if these functions are called from a signal handler that interrupted +a call to a non-async-signal-safe function (or some equivalent, +such as the steps equivalent to +.BR exit (3) +that occur upon a return from the initial call to +.IR main ()), +the behavior is undefined if the program subsequently makes a call to +a non-async-signal-safe function. +The only way of avoiding undefined behavior is to ensure one of the following: +.IP \[bu] 3 +After long jumping from the signal handler, +the program does not call any non-async-signal-safe functions +and does not return from the initial call to +.IR main (). +.IP \[bu] +Any signal whose handler performs a long jump must be blocked during +.I every +call to a non-async-signal-safe function and +no non-async-signal-safe functions are called after +returning from the initial call to +.IR main (). +.SH SEE ALSO +.BR signal (7), +.BR signal\-safety (7) diff --git a/upstream/opensuse-leap-15-6/man3/setlocale.3 b/upstream/opensuse-leap-15-6/man3/setlocale.3 new file mode 100644 index 00000000..6bc6e2ea --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setlocale.3 @@ -0,0 +1,255 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright 1999 by Bruno Haible (haible@clisp.cons.org) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 18:20:12 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Tue Jul 15 16:49:10 1997 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Sun Jul 4 14:52:16 1999 by Bruno Haible (haible@clisp.cons.org) +.\" Modified Tue Aug 24 17:11:01 1999 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Tue Feb 6 03:31:55 2001 by Andries Brouwer (aeb@cwi.nl) +.\" +.TH setlocale 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setlocale \- set the current locale +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *setlocale(int " category ", const char *" locale ); +.fi +.SH DESCRIPTION +The +.BR setlocale () +function is used to set or query the program's current locale. +.PP +If +.I locale +is not NULL, +the program's current locale is modified according to the arguments. +The argument +.I category +determines which parts of the program's current locale should be modified. +.ad l +.nh +.TS +lB lB +lB lx. +Category Governs +LC_ALL All of the locale +LC_ADDRESS T{ +Formatting of addresses and +geography-related items (*) +T} +LC_COLLATE String collation +LC_CTYPE Character classification +LC_IDENTIFICATION T{ +Metadata describing the locale (*) +T} +LC_MEASUREMENT T{ +Settings related to measurements +(metric versus US customary) (*) +T} +LC_MESSAGES T{ +Localizable natural-language messages +T} +LC_MONETARY T{ +Formatting of monetary values +T} +LC_NAME T{ +Formatting of salutations for persons (*) +T} +LC_NUMERIC T{ +Formatting of nonmonetary numeric values +T} +LC_PAPER T{ +Settings related to the standard paper size (*) +T} +LC_TELEPHONE T{ +Formats to be used with telephone services (*) +T} +LC_TIME T{ +Formatting of date and time values +T} +.TE +.hy +.ad +.PP +The categories marked with an asterisk in the above table +are GNU extensions. +For further information on these locale categories, see +.BR locale (7). +.PP +The argument +.I locale +is a pointer to a character string containing the +required setting of +.IR category . +Such a string is either a well-known constant like "C" or "da_DK" +(see below), or an opaque string that was returned by another call of +.BR setlocale (). +.PP +If +.I locale +is an empty string, +.BR """""" , +each part of the locale that should be modified is set according to the +environment variables. +The details are implementation-dependent. +For glibc, first (regardless of +.IR category ), +the environment variable +.B LC_ALL +is inspected, +next the environment variable with the same name as the category +(see the table above), +and finally the environment variable +.BR LANG . +The first existing environment variable is used. +If its value is not a valid locale specification, the locale +is unchanged, and +.BR setlocale () +returns NULL. +.PP +The locale +.B """C""" +or +.B """POSIX""" +is a portable locale; +it exists on all conforming systems. +.PP +A locale name is typically of the form +.IR language "[_" territory "][." codeset "][@" modifier "]," +where +.I language +is an ISO 639 language code, +.I territory +is an ISO 3166 country code, and +.I codeset +is a character set or encoding identifier like +.B "ISO\-8859\-1" +or +.BR "UTF\-8" . +For a list of all supported locales, try "locale \-a" (see +.BR locale (1)). +.PP +If +.I locale +is NULL, the current locale is only queried, not modified. +.PP +On startup of the main program, the portable +.B """C""" +locale is selected as default. +A program may be made portable to all locales by calling: +.PP +.in +4n +.EX +setlocale(LC_ALL, ""); +.EE +.in +.PP +after program initialization, and then: +.IP \[bu] 3 +using the values returned from a +.BR localeconv (3) +call for locale-dependent information; +.IP \[bu] +using the multibyte and wide character functions for text processing if +.BR "MB_CUR_MAX > 1" ; +.IP \[bu] +using +.BR strcoll (3) +and +.BR strxfrm (3) +to compare strings; and +.IP \[bu] +using +.BR wcscoll (3) +and +.BR wcsxfrm (3) +to compare wide-character strings. +.SH RETURN VALUE +A successful call to +.BR setlocale () +returns an opaque string that corresponds to the locale set. +This string may be allocated in static storage. +The string returned is such that a subsequent call with that string +and its associated category will restore that part of the process's +locale. +The return value is NULL if the request cannot be honored. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setlocale () +T} Thread safety MT-Unsafe const:locale env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SS Categories +.TP +.B LC_ALL +.TQ +.B LC_COLLATE +.TQ +.B LC_CTYPE +.TQ +.B LC_MONETARY +.TQ +.B LC_NUMERIC +.TQ +.B LC_TIME +C11, POSIX.1-2008. +.TP +.BR LC_MESSAGES +POSIX.1-2008. +.TP +Others: +GNU. +.SH HISTORY +POSIX.1-2001, C89. +.SS Categories +.TP +.B LC_ALL +.TQ +.B LC_COLLATE +.TQ +.B LC_CTYPE +.TQ +.B LC_MONETARY +.TQ +.B LC_NUMERIC +.TQ +.B LC_TIME +C89, POSIX.1-2001. +.TP +.BR LC_MESSAGES +POSIX.1-2001. +.TP +Others: +GNU. +.SH SEE ALSO +.BR locale (1), +.BR localedef (1), +.BR isalpha (3), +.BR localeconv (3), +.BR nl_langinfo (3), +.BR rpmatch (3), +.BR strcoll (3), +.BR strftime (3), +.BR charsets (7), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/setlogmask.3 b/upstream/opensuse-leap-15-6/man3/setlogmask.3 new file mode 100644 index 00000000..ccd0486a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setlogmask.3 @@ -0,0 +1,88 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH setlogmask 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setlogmask \- set log priority mask +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int setlogmask(int " mask ); +.fi +.SH DESCRIPTION +A process has a log priority mask that determines which calls to +.BR syslog (3) +may be logged. +All other calls will be ignored. +Logging is enabled for the priorities that have the corresponding +bit set in +.IR mask . +The initial mask is such that logging is enabled for all priorities. +.PP +The +.BR setlogmask () +function sets this logmask for the calling process, +and returns the previous mask. +If the mask argument is 0, the current logmask is not modified. +.PP +The eight priorities are +.BR LOG_EMERG , +.BR LOG_ALERT , +.BR LOG_CRIT , +.BR LOG_ERR , +.BR LOG_WARNING , +.BR LOG_NOTICE , +.BR LOG_INFO , +and +.BR LOG_DEBUG . +The bit corresponding to a priority +.I p +is +.IR LOG_MASK(p) . +Some systems also provide a macro +.I LOG_UPTO(p) +for the mask +of all priorities in the above list up to and including +.IR p . +.SH RETURN VALUE +This function returns the previous log priority mask. +.SH ERRORS +None. +.\" .SH NOTES +.\" The glibc logmask handling was broken before glibc 2.1.1. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR setlogmask () +T} Thread safety MT-Unsafe race:LogMask +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.\" Note that the description in POSIX.1-2001 is flawed. +.PP +.BR LOG_UPTO () +will be included in the next release of the POSIX specification (Issue 8). +.\" FIXME . https://www.austingroupbugs.net/view.php?id=1033 +.SH SEE ALSO +.BR closelog (3), +.BR openlog (3), +.BR syslog (3) diff --git a/upstream/opensuse-leap-15-6/man3/setnetgrent.3 b/upstream/opensuse-leap-15-6/man3/setnetgrent.3 new file mode 100644 index 00000000..5e1d58bf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/setnetgrent.3 @@ -0,0 +1,166 @@ +'\" t +.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" based on glibc infopages +.\" polished - aeb +.\" +.TH setnetgrent 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \- +handle network group entries +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int setnetgrent(const char *" netgroup ); +.B "void endnetgrent(void);" +.PP +.BI "int getnetgrent(char **restrict " host , +.BI " char **restrict " user ", char **restrict " domain ); +.BI "int getnetgrent_r(char **restrict " host , +.BI " char **restrict " user ", char **restrict " domain , +.BI " char " buf "[restrict ." buflen "], size_t " buflen ); +.PP +.BI "int innetgr(const char *" netgroup ", const char *" host , +.BI " const char *" user ", const char *" domain ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.ad l +.PP +.nh +.BR setnetgrent (), +.BR endnetgrent (), +.BR getnetgrent (), +.BR getnetgrent_r (), +.BR innetgr (): +.hy +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.ad +.SH DESCRIPTION +The +.I netgroup +is a SunOS invention. +A netgroup database is a list of string triples +.RI ( hostname ", " username ", " domainname ) +or other netgroup names. +Any of the elements in a triple can be empty, +which means that anything matches. +The functions described here allow access to the netgroup databases. +The file +.I /etc/nsswitch.conf +defines what database is searched. +.PP +The +.BR setnetgrent () +call defines the netgroup that will be searched by subsequent +.BR getnetgrent () +calls. +The +.BR getnetgrent () +function retrieves the next netgroup entry, and returns pointers in +.IR host , +.IR user , +.IR domain . +A null pointer means that the corresponding entry matches any string. +The pointers are valid only as long as there is no call to other +netgroup-related functions. +To avoid this problem you can use the GNU function +.BR getnetgrent_r () +that stores the strings in the supplied buffer. +To free all allocated buffers use +.BR endnetgrent (). +.PP +In most cases you want to check only if the triplet +.RI ( hostname ", " username ", " domainname ) +is a member of a netgroup. +The function +.BR innetgr () +can be used for this without calling the above three functions. +Again, a null pointer is a wildcard and matches any string. +The function is thread-safe. +.SH RETURN VALUE +These functions return 1 on success and 0 for failure. +.SH FILES +.I /etc/netgroup +.br +.I /etc/nsswitch.conf +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR setnetgrent (), +.BR getnetgrent_r (), +.BR innetgr () +T} Thread safety T{ +MT-Unsafe race:netgrent +locale +T} +T{ +.BR endnetgrent () +T} Thread safety T{ +MT-Unsafe race:netgrent +T} +T{ +.BR getnetgrent () +T} Thread safety T{ +MT-Unsafe race:netgrent +race:netgrentbuf locale +T} +.TE +.hy +.ad +.sp 1 +In the above table, +.I netgrent +in +.I race:netgrent +signifies that if any of the functions +.BR setnetgrent (), +.BR getnetgrent_r (), +.BR innetgr (), +.BR getnetgrent (), +or +.BR endnetgrent () +are used in parallel in different threads of a program, +then data races could occur. +.SH VERSIONS +In the BSD implementation, +.BR setnetgrent () +returns void. +.SH STANDARDS +None. +.SH HISTORY +.BR setnetgrent (), +.BR endnetgrent (), +.BR getnetgrent (), +and +.BR innetgr () +are available on most UNIX systems. +.BR getnetgrent_r () +is not widely available on other systems. +.\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs. +.SH SEE ALSO +.BR sethostent (3), +.BR setprotoent (3), +.BR setservent (3) diff --git a/upstream/opensuse-leap-15-6/man3/shm_open.3 b/upstream/opensuse-leap-15-6/man3/shm_open.3 new file mode 100644 index 00000000..b981e02f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/shm_open.3 @@ -0,0 +1,511 @@ +'\" t +.\" Copyright (C) 2002, 2020 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH shm_open 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +shm_open, shm_unlink \- create/open or unlink POSIX shared memory objects +.SH LIBRARY +Real-time library +.RI ( librt ", " \-lrt ) +.SH SYNOPSIS +.nf +.B #include +.BR "#include " " /* For mode constants */" +.BR "#include " " /* For O_* constants */" +.PP +.BI "int shm_open(const char *" name ", int " oflag ", mode_t " mode ); +.BI "int shm_unlink(const char *" name ); +.fi +.SH DESCRIPTION +.BR shm_open () +creates and opens a new, or opens an existing, POSIX shared memory object. +A POSIX shared memory object is in effect a handle which can +be used by unrelated processes to +.BR mmap (2) +the same region of shared memory. +The +.BR shm_unlink () +function performs the converse operation, +removing an object previously created by +.BR shm_open (). +.PP +The operation of +.BR shm_open () +is analogous to that of +.BR open (2). +.I name +specifies the shared memory object to be created or opened. +For portable use, +a shared memory object should be identified by a name of the form +.IR /somename ; +that is, a null-terminated string of up to +.B NAME_MAX +(i.e., 255) characters consisting of an initial slash, +.\" glibc allows the initial slash to be omitted, and makes +.\" multiple initial slashes equivalent to a single slash. +.\" This differs from the implementation of POSIX message queues. +followed by one or more characters, none of which are slashes. +.\" glibc allows subdirectory components in the name, in which +.\" case the subdirectory must exist under /dev/shm, and allow the +.\" required permissions if a user wants to create a shared memory +.\" object in that subdirectory. +.PP +.I oflag +is a bit mask created by ORing together exactly one of +.B O_RDONLY +or +.B O_RDWR +and any of the other flags listed here: +.TP +.B O_RDONLY +Open the object for read access. +A shared memory object opened in this way can be +.BR mmap (2)ed +only for read +.RB ( PROT_READ ) +access. +.TP +.B O_RDWR +Open the object for read-write access. +.TP +.B O_CREAT +Create the shared memory object if it does not exist. +The user and group ownership of the object are taken +from the corresponding effective IDs of the calling process, +.\" In truth it is actually the filesystem IDs on Linux, but these +.\" are nearly always the same as the effective IDs. (MTK, Jul 05) +and the object's +permission bits are set according to the low-order 9 bits of +.IR mode , +except that those bits set in the process file mode +creation mask (see +.BR umask (2)) +are cleared for the new object. +A set of macro constants which can be used to define +.I mode +is listed in +.BR open (2). +(Symbolic definitions of these constants can be obtained by including +.IR .) +.IP +A new shared memory object initially has zero length\[em]the size of the +object can be set using +.BR ftruncate (2). +The newly allocated bytes of a shared memory +object are automatically initialized to 0. +.TP +.B O_EXCL +If +.B O_CREAT +was also specified, and a shared memory object with the given +.I name +already exists, return an error. +The check for the existence of the object, and its creation if it +does not exist, are performed atomically. +.TP +.B O_TRUNC +If the shared memory object already exists, truncate it to zero bytes. +.PP +Definitions of these flag values can be obtained by including +.IR . +.PP +On successful completion +.BR shm_open () +returns a new file descriptor referring to the shared memory object. +This file descriptor is guaranteed to be the lowest-numbered file descriptor +not previously opened within the process. +The +.B FD_CLOEXEC +flag (see +.BR fcntl (2)) +is set for the file descriptor. +.PP +The file descriptor is normally used in subsequent calls +to +.BR ftruncate (2) +(for a newly created object) and +.BR mmap (2). +After a call to +.BR mmap (2) +the file descriptor may be closed without affecting the memory mapping. +.PP +The operation +of +.BR shm_unlink () +is analogous to +.BR unlink (2): +it removes a shared memory object name, and, once all processes +have unmapped the object, deallocates and +destroys the contents of the associated memory region. +After a successful +.BR shm_unlink (), +attempts to +.BR shm_open () +an object with the same +.I name +fail (unless +.B O_CREAT +was specified, in which case a new, distinct object is created). +.SH RETURN VALUE +On success, +.BR shm_open () +returns a file descriptor (a nonnegative integer). +On success, +.BR shm_unlink () +returns 0. +On failure, both functions return \-1 and set +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EACCES +Permission to +.BR shm_unlink () +the shared memory object was denied. +.TP +.B EACCES +Permission was denied to +.BR shm_open () +.I name +in the specified +.IR mode , +or +.B O_TRUNC +was specified and the caller does not have write permission on the object. +.TP +.B EEXIST +Both +.B O_CREAT +and +.B O_EXCL +were specified to +.BR shm_open () +and the shared memory object specified by +.I name +already exists. +.TP +.B EINVAL +The +.I name +argument to +.BR shm_open () +was invalid. +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENAMETOOLONG +The length of +.I name +exceeds +.BR PATH_MAX . +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOENT +An attempt was made to +.BR shm_open () +a +.I name +that did not exist, and +.B O_CREAT +was not specified. +.TP +.B ENOENT +An attempt was to made to +.BR shm_unlink () +a +.I name +that does not exist. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR shm_open (), +.BR shm_unlink () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX leaves the behavior of the combination of +.B O_RDONLY +and +.B O_TRUNC +unspecified. +On Linux, this will successfully truncate an existing +shared memory object\[em]this may not be so on other UNIX systems. +.PP +The POSIX shared memory object implementation on Linux makes use +of a dedicated +.BR tmpfs (5) +filesystem that is normally mounted under +.IR /dev/shm . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2. +POSIX.1-2001. +.PP +POSIX.1-2001 says that the group ownership of a newly created shared +memory object is set to either the calling process's effective group ID +or "a system default group ID". +POSIX.1-2008 says that the group ownership +may be set to either the calling process's effective group ID +or, if the object is visible in the filesystem, +the group ID of the parent directory. +.SH EXAMPLES +The programs below employ POSIX shared memory and POSIX unnamed semaphores +to exchange a piece of data. +The "bounce" program (which must be run first) raises the case +of a string that is placed into the shared memory by the "send" program. +Once the data has been modified, the "send" program then prints +the contents of the modified shared memory. +An example execution of the two programs is the following: +.PP +.in +4n +.EX +$ \fB./pshm_ucase_bounce /myshm &\fP +[1] 270171 +$ \fB./pshm_ucase_send /myshm hello\fP +HELLO +.EE +.in +.PP +Further detail about these programs is provided below. +.\" +.SS Program source: pshm_ucase.h +The following header file is included by both programs below. +Its primary purpose is to define a structure that will be imposed +on the memory object that is shared between the two programs. +.PP +.in +4n +.\" SRC BEGIN (pshm_ucase.h) +.EX +#include +#include +#include +#include +#include +#include +#include + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e + } while (0) + +#define BUF_SIZE 1024 /* Maximum size for exchanged string */ + +/* Define a structure that will be imposed on the shared + memory object */ + +struct shmbuf { + sem_t sem1; /* POSIX unnamed semaphore */ + sem_t sem2; /* POSIX unnamed semaphore */ + size_t cnt; /* Number of bytes used in \[aq]buf\[aq] */ + char buf[BUF_SIZE]; /* Data being transferred */ +}; +.EE +.\" SRC END +.in +.\" +.SS Program source: pshm_ucase_bounce.c +The "bounce" program creates a new shared memory object with the name +given in its command-line argument and sizes the object to +match the size of the +.I shmbuf +structure defined in the header file. +It then maps the object into the process's address space, +and initializes two POSIX semaphores inside the object to 0. +.PP +After the "send" program has posted the first of the semaphores, +the "bounce" program upper cases the data that has been placed +in the memory by the "send" program and then posts the second semaphore +to tell the "send" program that it may now access the shared memory. +.PP +.in +4n +.\" SRC BEGIN (pshm_ucase_bounce.c) +.EX +/* pshm_ucase_bounce.c + + Licensed under GNU General Public License v2 or later. +*/ +#include + +#include "pshm_ucase.h" + +int +main(int argc, char *argv[]) +{ + int fd; + char *shmpath; + struct shmbuf *shmp; + + if (argc != 2) { + fprintf(stderr, "Usage: %s /shm\-path\en", argv[0]); + exit(EXIT_FAILURE); + } + + shmpath = argv[1]; + + /* Create shared memory object and set its size to the size + of our structure. */ + + fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600); + if (fd == \-1) + errExit("shm_open"); + + if (ftruncate(fd, sizeof(struct shmbuf)) == \-1) + errExit("ftruncate"); + + /* Map the object into the caller\[aq]s address space. */ + + shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); + if (shmp == MAP_FAILED) + errExit("mmap"); + + /* Initialize semaphores as process\-shared, with value 0. */ + + if (sem_init(&shmp\->sem1, 1, 0) == \-1) + errExit("sem_init\-sem1"); + if (sem_init(&shmp\->sem2, 1, 0) == \-1) + errExit("sem_init\-sem2"); + + /* Wait for \[aq]sem1\[aq] to be posted by peer before touching + shared memory. */ + + if (sem_wait(&shmp\->sem1) == \-1) + errExit("sem_wait"); + + /* Convert data in shared memory into upper case. */ + + for (size_t j = 0; j < shmp\->cnt; j++) + shmp\->buf[j] = toupper((unsigned char) shmp\->buf[j]); + + /* Post \[aq]sem2\[aq] to tell the peer that it can now + access the modified data in shared memory. */ + + if (sem_post(&shmp\->sem2) == \-1) + errExit("sem_post"); + + /* Unlink the shared memory object. Even if the peer process + is still using the object, this is okay. The object will + be removed only after all open references are closed. */ + + shm_unlink(shmpath); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.\" +.SS Program source: pshm_ucase_send.c +The "send" program takes two command-line arguments: +the pathname of a shared memory object previously created by the "bounce" +program and a string that is to be copied into that object. +.PP +The program opens the shared memory object +and maps the object into its address space. +It then copies the data specified in its second argument +into the shared memory, +and posts the first semaphore, +which tells the "bounce" program that it can now access that data. +After the "bounce" program posts the second semaphore, +the "send" program prints the contents of the shared memory +on standard output. +.PP +.in +4n +.\" SRC BEGIN (pshm_ucase_send.c) +.EX +/* pshm_ucase_send.c + + Licensed under GNU General Public License v2 or later. +*/ +#include + +#include "pshm_ucase.h" + +int +main(int argc, char *argv[]) +{ + int fd; + char *shmpath, *string; + size_t len; + struct shmbuf *shmp; + + if (argc != 3) { + fprintf(stderr, "Usage: %s /shm\-path string\en", argv[0]); + exit(EXIT_FAILURE); + } + + shmpath = argv[1]; + string = argv[2]; + len = strlen(string); + + if (len > BUF_SIZE) { + fprintf(stderr, "String is too long\en"); + exit(EXIT_FAILURE); + } + + /* Open the existing shared memory object and map it + into the caller\[aq]s address space. */ + + fd = shm_open(shmpath, O_RDWR, 0); + if (fd == \-1) + errExit("shm_open"); + + shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); + if (shmp == MAP_FAILED) + errExit("mmap"); + + /* Copy data into the shared memory object. */ + + shmp\->cnt = len; + memcpy(&shmp\->buf, string, len); + + /* Tell peer that it can now access shared memory. */ + + if (sem_post(&shmp\->sem1) == \-1) + errExit("sem_post"); + + /* Wait until peer says that it has finished accessing + the shared memory. */ + + if (sem_wait(&shmp\->sem2) == \-1) + errExit("sem_wait"); + + /* Write modified data in shared memory to standard output. */ + + write(STDOUT_FILENO, &shmp\->buf, len); + write(STDOUT_FILENO, "\en", 1); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.SH SEE ALSO +.BR close (2), +.BR fchmod (2), +.BR fchown (2), +.BR fcntl (2), +.BR fstat (2), +.BR ftruncate (2), +.BR memfd_create (2), +.BR mmap (2), +.BR open (2), +.BR umask (2), +.BR shm_overview (7) diff --git a/upstream/opensuse-leap-15-6/man3/siginterrupt.3 b/upstream/opensuse-leap-15-6/man3/siginterrupt.3 new file mode 100644 index 00000000..5cbe6580 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/siginterrupt.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH siginterrupt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +siginterrupt \- allow signals to interrupt system calls +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int siginterrupt(int " sig ", int " flag ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR siginterrupt (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR siginterrupt () +function changes the restart behavior when +a system call is interrupted by the signal \fIsig\fP. +If the \fIflag\fP +argument is false (0), then system calls will be restarted if interrupted +by the specified signal \fIsig\fP. +This is the default behavior in Linux. +.PP +If the \fIflag\fP argument is true (1) and no data has been transferred, +then a system call interrupted by the signal \fIsig\fP will return \-1 +and \fIerrno\fP will be set to +.BR EINTR . +.PP +If the \fIflag\fP argument is true (1) and data transfer has started, +then the system call will be interrupted and will return the actual +amount of data transferred. +.SH RETURN VALUE +The +.BR siginterrupt () +function returns 0 on success. +It returns \-1 if the +signal number +.I sig +is invalid, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EINVAL +The specified signal number is invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR siginterrupt () +T} Thread safety T{ +MT-Unsafe const:sigintr +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +4.3BSD, POSIX.1-2001. +Obsolete in POSIX.1-2008, +recommending the use of +.BR sigaction (2) +with the +.B SA_RESTART +flag instead. +.SH SEE ALSO +.BR signal (2) diff --git a/upstream/opensuse-leap-15-6/man3/signbit.3 b/upstream/opensuse-leap-15-6/man3/signbit.3 new file mode 100644 index 00000000..a421ffaf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/signbit.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Based on glibc infopages, copyright Free Software Foundation +.\" +.TH signbit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +signbit \- test sign of a real floating-point number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int signbit(" x ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR signbit (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.BR signbit () +is a generic macro which can work on all real floating-point types. +It returns a nonzero value if the value of +.I x +has its sign bit set. +.PP +This is not the same as +.IR "x < 0.0" , +because IEEE 754 floating point allows zero to be signed. +The comparison +.I \-0.0\~<\~0.0 +is false, but +.I signbit(\-0.0) +will return a nonzero value. +.PP +NaNs and infinities have a sign bit. +.SH RETURN VALUE +The +.BR signbit () +macro returns nonzero if the sign of +.I x +is negative; otherwise it returns zero. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR signbit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.PP +This function is defined in IEC 559 (and the appendix with +recommended functions in IEEE 754/IEEE 854). +.SH SEE ALSO +.BR copysign (3) diff --git a/upstream/opensuse-leap-15-6/man3/significand.3 b/upstream/opensuse-leap-15-6/man3/significand.3 new file mode 100644 index 00000000..277b48f3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/significand.3 @@ -0,0 +1,80 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" heavily based on glibc infopages, copyright Free Software Foundation +.\" +.TH significand 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +significand, significandf, significandl \- +get mantissa of floating-point number +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double significand(double " x ); +.BI "float significandf(float " x ); +.BI "long double significandl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR significand (), +.BR significandf (), +.BR significandl (): +.nf + /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the mantissa of +.I x +scaled to the range [1,2). +They are equivalent to +.PP +.in +4n +.EX +scalb(x, (double) \-ilogb(x)) +.EE +.in +.PP +This function exists mainly for use in certain standardized tests +for IEEE 754 conformance. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR significand (), +.BR significandf (), +.BR significandl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.TP +.BR significand () +BSD. +.SH HISTORY +.TP +.BR significand () +BSD. +.SH SEE ALSO +.BR ilogb (3), +.BR scalb (3) diff --git a/upstream/opensuse-leap-15-6/man3/sigpause.3 b/upstream/opensuse-leap-15-6/man3/sigpause.3 new file mode 100644 index 00000000..12a7aca2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigpause.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sigpause 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigpause \- atomically release blocked signals and wait for interrupt +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int sigpause(int " sigmask "); /* BSD (but see NOTES) */" +.PP +.BI "[[deprecated]] int sigpause(int " sig "); /* POSIX.1 / SysV / UNIX 95 */" +.fi +.SH DESCRIPTION +Don't use this function. +Use +.BR sigsuspend (2) +instead. +.PP +The function +.BR sigpause () +is designed to wait for some signal. +It changes the process's signal mask (set of blocked signals), +and then waits for a signal to arrive. +Upon arrival of a signal, the original signal mask is restored. +.SH RETURN VALUE +If +.BR sigpause () +returns, it was interrupted by a signal and the return value is \-1 +with +.I errno +set to +.BR EINTR . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigpause () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.\" 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 VERSIONS +On Linux, this routine is a system call only on the Sparc (sparc64) +architecture. +.PP +.\" Libc4 and libc5 know only about the BSD version. +.\" +glibc uses the BSD version if the +.B _BSD_SOURCE +feature test macro is defined and none of +.BR _POSIX_SOURCE , +.BR _POSIX_C_SOURCE , +.BR _XOPEN_SOURCE , +.BR _GNU_SOURCE , +or +.B _SVID_SOURCE +is defined. +Otherwise, the System V version is used, +and feature test macros must be defined as follows to obtain the declaration: +.IP \[bu] 3 +Since glibc 2.26: +_XOPEN_SOURCE >= 500 +.\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) +.IP \[bu] +glibc 2.25 and earlier: _XOPEN_SOURCE +.PP +Since glibc 2.19, only the System V version is exposed by +.IR ; +applications that formerly used the BSD +.BR sigpause () +should be amended to use +.BR sigsuspend (2). +.\" +.\" For the BSD version, one usually uses a zero +.\" .I sigmask +.\" to indicate that no signals are to be blocked. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +Obsoleted in POSIX.1-2008. +.PP +The classical BSD version of this function appeared in 4.2BSD. +It sets the process's signal mask to +.IR sigmask . +UNIX 95 standardized the incompatible System V version of +this function, which removes only the specified signal +.I sig +from the process's signal mask. +.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG +The unfortunate situation with two incompatible functions with the +same name was solved by the +.BR \%sigsuspend (2) +function, that takes a +.I "sigset_t\ *" +argument (instead of an +.IR int ). +.SH SEE ALSO +.BR kill (2), +.BR sigaction (2), +.BR sigprocmask (2), +.BR sigsuspend (2), +.BR sigblock (3), +.BR sigvec (3), +.BR feature_test_macros (7) diff --git a/upstream/opensuse-leap-15-6/man3/sigqueue.3 b/upstream/opensuse-leap-15-6/man3/sigqueue.3 new file mode 100644 index 00000000..9cf6eb6a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigqueue.3 @@ -0,0 +1,165 @@ +'\" t +.\" Copyright (c) 2002 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" added note on self-signaling, aeb, 2002-06-07 +.\" added note on CAP_KILL, mtk, 2004-06-16 +.\" +.TH sigqueue 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigqueue \- queue a signal and data to a process +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sigqueue(pid_t " pid ", int " sig ", const union sigval " value ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sigqueue (): +.nf + _POSIX_C_SOURCE >= 199309L +.fi +.SH DESCRIPTION +.BR sigqueue () +sends the signal specified in +.I sig +to the process whose PID is given in +.IR pid . +The permissions required to send a signal are the same as for +.BR kill (2). +As with +.BR kill (2), +the null signal (0) can be used to check if a process with a given +PID exists. +.PP +The +.I value +argument is used to specify an accompanying item of data (either an integer +or a pointer value) to be sent with the signal, and has the following type: +.PP +.in +4n +.EX +union sigval { + int sival_int; + void *sival_ptr; +}; +.EE +.in +.PP +If the receiving process has installed a handler for this signal using the +.B SA_SIGINFO +flag to +.BR sigaction (2), +then it can obtain this data via the +.I si_value +field of the +.I siginfo_t +structure passed as the second argument to the handler. +Furthermore, the +.I si_code +field of that structure will be set to +.BR SI_QUEUE . +.SH RETURN VALUE +On success, +.BR sigqueue () +returns 0, indicating that the signal was successfully +queued to the receiving process. +Otherwise, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EAGAIN +The limit of signals which may be queued has been reached. +(See +.BR signal (7) +for further information.) +.TP +.B EINVAL +.I sig +was invalid. +.TP +.B EPERM +The process does not have permission to send the signal +to the receiving process. +For the required permissions, see +.BR kill (2). +.TP +.B ESRCH +No process has a PID matching +.IR pid . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigqueue () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.SS C library/kernel differences +On Linux, +.BR sigqueue () +is implemented using the +.BR rt_sigqueueinfo (2) +system call. +The system call differs in its third argument, which is the +.I siginfo_t +structure that will be supplied to the receiving process's +signal handler or returned by the receiving process's +.BR sigtimedwait (2) +call. +Inside the glibc +.BR sigqueue () +wrapper, this argument, +.IR uinfo , +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 STANDARDS +POSIX.1-2008. +.SH HISTORY +Linux 2.2. +POSIX.1-2001. +.SH NOTES +If this function results in the sending of a signal to the process +that invoked it, and that signal was not blocked by the calling thread, +and no other threads were willing to handle this signal (either by +having it unblocked, or by waiting for it using +.BR sigwait (3)), +then at least some signal must be delivered to this thread before this +function returns. +.SH SEE ALSO +.BR kill (2), +.BR rt_sigqueueinfo (2), +.BR sigaction (2), +.BR signal (2), +.BR pthread_sigqueue (3), +.BR sigwait (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/sigset.3 b/upstream/opensuse-leap-15-6/man3/sigset.3 new file mode 100644 index 00000000..c8aa6d46 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigset.3 @@ -0,0 +1,268 @@ +'\" t +.\" Copyright (c) 2005 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sigset 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigset, sighold, sigrelse, sigignore \- System V signal API +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B typedef void (*sighandler_t)(int); +.PP +.BI "[[deprecated]] sighandler_t sigset(int " sig ", sighandler_t " disp ); +.PP +.BI "[[deprecated]] int sighold(int " sig ); +.BI "[[deprecated]] int sigrelse(int " sig ); +.BI "[[deprecated]] int sigignore(int " sig ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sigset (), +.BR sighold (), +.BR sigrelse (), +.BR sigignore (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +These functions are provided in glibc as a compatibility interface +for programs that make use of the historical System V signal API. +This API is obsolete: new applications should use the POSIX signal API +.RB ( sigaction (2), +.BR sigprocmask (2), +etc.) +.PP +The +.BR sigset () +function modifies the disposition of the signal +.IR sig . +The +.I disp +argument can be the address of a signal handler function, +or one of the following constants: +.TP +.B SIG_DFL +Reset the disposition of +.I sig +to the default. +.TP +.B SIG_IGN +Ignore +.IR sig . +.TP +.B SIG_HOLD +Add +.I sig +to the process's signal mask, but leave the disposition of +.I sig +unchanged. +.PP +If +.I disp +specifies the address of a signal handler, then +.I sig +is added to the process's signal mask during execution of the handler. +.PP +If +.I disp +was specified as a value other than +.BR SIG_HOLD , +then +.I sig +is removed from the process's signal mask. +.PP +The dispositions for +.B SIGKILL +and +.B SIGSTOP +cannot be changed. +.PP +The +.BR sighold () +function adds +.I sig +to the calling process's signal mask. +.PP +The +.BR sigrelse () +function removes +.I sig +from the calling process's signal mask. +.PP +The +.BR sigignore () +function sets the disposition of +.I sig +to +.BR SIG_IGN . +.SH RETURN VALUE +On success, +.BR sigset () +returns +.B SIG_HOLD +if +.I sig +was blocked before the call, +or the signal's previous disposition +if it was not blocked before the call. +On error, +.BR sigset () +returns \-1, with +.I errno +set to indicate the error. +(But see BUGS below.) +.PP +The +.BR sighold (), +.BR sigrelse (), +and +.BR sigignore () +functions return 0 on success; on error, these functions return \-1 and set +.I errno +to indicate the error. +.SH ERRORS +For +.BR sigset () +see the ERRORS under +.BR sigaction (2) +and +.BR sigprocmask (2). +.PP +For +.BR sighold () +and +.BR sigrelse () +see the ERRORS under +.BR sigprocmask (2). +.PP +For +.BR sigignore (), +see the errors under +.BR sigaction (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigset (), +.BR sighold (), +.BR sigrelse (), +.BR sigignore () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.TP +.I sighandler_t +GNU. +POSIX.1 uses the same type but without a +.IR typedef . +.SH HISTORY +glibc 2.1. +SVr4, POSIX.1-2001. +POSIX.1-2008 marks these functions +as obsolete, recommending the use of +.BR sigaction (2), +.BR sigprocmask (2), +.BR pthread_sigmask (3), +and +.BR sigsuspend (2) +instead. +.SH NOTES +The +.BR sigset () +function provides reliable signal handling semantics (as when calling +.BR sigaction (2) +with +.I sa_mask +equal to 0). +.PP +On System V, the +.BR signal () +function provides unreliable semantics (as when calling +.BR sigaction (2) +with +.I sa_mask +equal to +.IR "SA_RESETHAND | SA_NODEFER" ). +On BSD, +.BR signal () +provides reliable semantics. +POSIX.1-2001 leaves these aspects of +.BR signal () +unspecified. +See +.BR signal (2) +for further details. +.PP +In order to wait for a signal, +BSD and System V both provided a function named +.BR sigpause (3), +but this function has a different argument on the two systems. +See +.BR sigpause (3) +for details. +.SH BUGS +Before glibc 2.2, +.BR sigset () +did not unblock +.I sig +if +.I disp +was specified as a value other than +.BR SIG_HOLD . +.PP +Before glibc 2.5, +.BR sigset () +does not correctly return the previous disposition of the signal +in two cases. +First, if +.I disp +is specified as +.BR SIG_HOLD , +then a successful +.BR sigset () +always returns +.BR SIG_HOLD . +Instead, it should return the previous disposition of the signal +(unless the signal was blocked, in which case +.B SIG_HOLD +should be returned). +Second, if the signal is currently blocked, then +the return value of a successful +.BR sigset () +should be +.BR SIG_HOLD . +Instead, the previous disposition of the signal is returned. +These problems have been fixed since glibc 2.5. +.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951 +.SH SEE ALSO +.BR kill (2), +.BR pause (2), +.BR sigaction (2), +.BR signal (2), +.BR sigprocmask (2), +.BR raise (3), +.BR sigpause (3), +.BR sigvec (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/sigsetops.3 b/upstream/opensuse-leap-15-6/man3/sigsetops.3 new file mode 100644 index 00000000..78401d61 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigsetops.3 @@ -0,0 +1,193 @@ +'\" t +.\" Copyright (c) 1994 Mike Battersby +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified by aeb, 960721 +.\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(), +.\" and sigorset() +.\" 2007-10-26 mdw added wording that a sigset_t must be initialized +.\" prior to use +.\" +.TH SIGSETOPS 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX +signal set operations +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sigemptyset(sigset_t *" set ); +.BI "int sigfillset(sigset_t *" set ); +.PP +.BI "int sigaddset(sigset_t *" set ", int " signum ); +.BI "int sigdelset(sigset_t *" set ", int " signum ); +.PP +.BI "int sigismember(const sigset_t *" set ", int " signum ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sigemptyset (), +.BR sigfillset (), +.BR sigaddset (), +.BR sigdelset (), +.BR sigismember (): +.nf + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +These functions allow the manipulation of POSIX signal sets. +.PP +.BR sigemptyset () +initializes the signal set given by +.I set +to empty, with all signals excluded from the set. +.PP +.BR sigfillset () +initializes +.I set +to full, including all signals. +.PP +.BR sigaddset () +and +.BR sigdelset () +add and delete respectively signal +.I signum +from +.IR set . +.PP +.BR sigismember () +tests whether +.I signum +is a member of +.IR set . +.PP +Objects of type +.I sigset_t +must be initialized by a call to either +.BR sigemptyset () +or +.BR sigfillset () +before being passed to the functions +.BR sigaddset (), +.BR sigdelset (), +and +.BR sigismember () +or the additional glibc functions described below +.RB ( sigisemptyset (), +.BR sigandset (), +and +.BR sigorset ()). +The results are undefined if this is not done. +.SH RETURN VALUE +.BR sigemptyset (), +.BR sigfillset (), +.BR sigaddset (), +and +.BR sigdelset () +return 0 on success and \-1 on error. +.PP +.BR sigismember () +returns 1 if +.I signum +is a member of +.IR set , +0 if +.I signum +is not a member, and \-1 on error. +.PP +On error, these functions set +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I signum +is not a valid signal. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigemptyset (), +.BR sigfillset (), +.BR sigaddset (), +.BR sigdelset (), +.BR sigismember (), +.BR sigisemptyset (), +.BR sigorset (), +.BR sigandset () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.SS GNU +If the +.B _GNU_SOURCE +feature test macro is defined, then \fI\fP +exposes three other functions for manipulating signal +sets: +.PP +.nf +.BI "int sigisemptyset(const sigset_t *" set ); +.BI "int sigorset(sigset_t *" dest ", const sigset_t *" left , +.BI " const sigset_t *" right ); +.BI "int sigandset(sigset_t *" dest ", const sigset_t *" left , +.BI " const sigset_t *" right ); +.fi +.PP +.BR sigisemptyset () +returns 1 if +.I set +contains no signals, and 0 otherwise. +.PP +.BR sigorset () +places the union of the sets +.I left +and +.I right +in +.IR dest . +.BR sigandset () +places the intersection of the sets +.I left +and +.I right +in +.IR dest . +Both functions return 0 on success, and \-1 on failure. +.PP +These functions are nonstandard (a few other systems provide similar +functions) and their use should be avoided in portable applications. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +When creating a filled signal set, the glibc +.BR sigfillset () +function does not include the two real-time signals used internally +by the NPTL threading implementation. +See +.BR nptl (7) +for details. +.SH SEE ALSO +.BR sigaction (2), +.BR sigpending (2), +.BR sigprocmask (2), +.BR sigsuspend (2) diff --git a/upstream/opensuse-leap-15-6/man3/sigvec.3 b/upstream/opensuse-leap-15-6/man3/sigvec.3 new file mode 100644 index 00000000..382e9928 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigvec.3 @@ -0,0 +1,285 @@ +'\" t +.\" Copyright (c) 2005 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sigvec 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD signal API +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int sigvec(int " sig ", const struct sigvec *" vec , +.BI " struct sigvec *" ovec ); +.PP +.BI "[[deprecated]] int sigmask(int " signum ); +.PP +.BI "[[deprecated]] int sigblock(int " mask ); +.BI "[[deprecated]] int sigsetmask(int " mask ); +.B [[deprecated]] int siggetmask(void); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +These functions are provided in glibc as a compatibility interface +for programs that make use of the historical BSD signal API. +This API is obsolete: new applications should use the POSIX signal API +.RB ( sigaction (2), +.BR sigprocmask (2), +etc.). +.PP +The +.BR sigvec () +function sets and/or gets the disposition of the signal +.I sig +(like the POSIX +.BR sigaction (2)). +If +.I vec +is not NULL, it points to a +.I sigvec +structure that defines the new disposition for +.IR sig . +If +.I ovec +is not NULL, it points to a +.I sigvec +structure that is used to return the previous disposition of +.IR sig . +To obtain the current disposition of +.I sig +without changing it, specify NULL for +.IR vec , +and a non-null pointer for +.IR ovec . +.PP +The dispositions for +.B SIGKILL +and +.B SIGSTOP +cannot be changed. +.PP +The +.I sigvec +structure has the following form: +.PP +.in +4n +.EX +struct sigvec { + void (*sv_handler)(int); /* Signal disposition */ + int sv_mask; /* Signals to be blocked in handler */ + int sv_flags; /* Flags */ +}; +.EE +.in +.PP +The +.I sv_handler +field specifies the disposition of the signal, and is either: +the address of a signal handler function; +.BR SIG_DFL , +meaning the default disposition applies for the signal; or +.BR SIG_IGN , +meaning that the signal is ignored. +.PP +If +.I sv_handler +specifies the address of a signal handler, then +.I sv_mask +specifies a mask of signals that are to be blocked while +the handler is executing. +In addition, the signal for which the handler is invoked is +also blocked. +Attempts to block +.B SIGKILL +or +.B SIGSTOP +are silently ignored. +.PP +If +.I sv_handler +specifies the address of a signal handler, then the +.I sv_flags +field specifies flags controlling what happens when the handler is called. +This field may contain zero or more of the following flags: +.TP +.B SV_INTERRUPT +If the signal handler interrupts a blocking system call, +then upon return from the handler the system call is not restarted: +instead it fails with the error +.BR EINTR . +If this flag is not specified, then system calls are restarted +by default. +.TP +.B SV_RESETHAND +Reset the disposition of the signal to the default +before calling the signal handler. +If this flag is not specified, then the handler remains established +until explicitly removed by a later call to +.BR sigvec () +or until the process performs an +.BR execve (2). +.TP +.B SV_ONSTACK +Handle the signal on the alternate signal stack +(historically established under BSD using the obsolete +.BR sigstack () +function; the POSIX replacement is +.BR sigaltstack (2)). +.PP +The +.BR sigmask () +macro constructs and returns a "signal mask" for +.IR signum . +For example, we can initialize the +.I vec.sv_mask +field given to +.BR sigvec () +using code such as the following: +.PP +.in +4n +.EX +vec.sv_mask = sigmask(SIGQUIT) | sigmask(SIGABRT); + /* Block SIGQUIT and SIGABRT during + handler execution */ +.EE +.in +.PP +The +.BR sigblock () +function adds the signals in +.I mask +to the process's signal mask +(like POSIX +.IR sigprocmask(SIG_BLOCK) ), +and returns the process's previous signal mask. +Attempts to block +.B SIGKILL +or +.B SIGSTOP +are silently ignored. +.PP +The +.BR sigsetmask () +function sets the process's signal mask to the value given in +.I mask +(like POSIX +.IR sigprocmask(SIG_SETMASK) ), +and returns the process's previous signal mask. +.PP +The +.BR siggetmask () +function returns the process's current signal mask. +This call is equivalent to +.IR sigblock(0) . +.SH RETURN VALUE +The +.BR sigvec () +function returns 0 on success; on error, it returns \-1 and sets +.I errno +to indicate the error. +.PP +The +.BR sigblock () +and +.BR sigsetmask () +functions return the previous signal mask. +.PP +The +.BR sigmask () +macro returns the signal mask for +.IR signum . +.SH ERRORS +See the ERRORS under +.BR sigaction (2) +and +.BR sigprocmask (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigvec (), +.BR sigmask (), +.BR sigblock (), +.BR sigsetmask (), +.BR siggetmask () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +.TP +.BR sigvec () +.TQ +.BR sigblock () +.TQ +.BR sigmask () +.TQ +.BR sigsetmask () +4.3BSD. +.TP +.BR siggetmask () +Unclear origin. +.TP +.BR sigvec () +Removed in glibc 2.21. +.SH NOTES +On 4.3BSD, the +.BR signal () +function provided reliable semantics (as when calling +.BR sigvec () +with +.I vec.sv_mask +equal to 0). +On System V, +.BR signal () +provides unreliable semantics. +POSIX.1 leaves these aspects of +.BR signal () +unspecified. +See +.BR signal (2) +for further details. +.PP +In order to wait for a signal, +BSD and System V both provided a function named +.BR sigpause (3), +but this function has a different argument on the two systems. +See +.BR sigpause (3) +for details. +.SH SEE ALSO +.BR kill (2), +.BR pause (2), +.BR sigaction (2), +.BR signal (2), +.BR sigprocmask (2), +.BR raise (3), +.BR sigpause (3), +.BR sigset (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/sigwait.3 b/upstream/opensuse-leap-15-6/man3/sigwait.3 new file mode 100644 index 00000000..5f9074ba --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sigwait.3 @@ -0,0 +1,110 @@ +'\" t +.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sigwait 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sigwait \- wait for a signal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sigwait(const sigset_t *restrict " set ", int *restrict " sig ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sigwait (): +.nf + Since glibc 2.26: + _POSIX_C_SOURCE >= 199506L + glibc 2.25 and earlier: + _POSIX_C_SOURCE +.fi +.SH DESCRIPTION +The +.BR sigwait () +function suspends execution of the calling thread until +one of the signals specified in the signal set +.I set +becomes pending. +The function accepts the signal +(removes it from the pending list of signals), +and returns the signal number in +.IR sig . +.PP +The operation of +.BR sigwait () +is the same as +.BR sigwaitinfo (2), +except that: +.IP \[bu] 3 +.BR sigwait () +returns only the signal number, rather than a +.I siginfo_t +structure describing the signal. +.IP \[bu] +The return values of the two functions are different. +.SH RETURN VALUE +On success, +.BR sigwait () +returns 0. +On error, it returns a positive error number (listed in ERRORS). +.SH ERRORS +.TP +.B EINVAL +.\" Does not occur for glibc. +.I set +contains an invalid signal number. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sigwait () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +.BR sigwait () +is implemented using +.BR sigtimedwait (2). +.PP +The glibc implementation of +.BR sigwait () +silently ignores attempts to wait for the two real-time signals that +are used internally by the NPTL threading implementation. +See +.BR nptl (7) +for details. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +See +.BR pthread_sigmask (3). +.SH SEE ALSO +.BR sigaction (2), +.BR signalfd (2), +.BR sigpending (2), +.BR sigsuspend (2), +.BR sigwaitinfo (2), +.BR sigsetops (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/sin.3 b/upstream/opensuse-leap-15-6/man3/sin.3 new file mode 100644 index 00000000..8ab70260 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sin.3 @@ -0,0 +1,125 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH sin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sin, sinf, sinl \- sine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double sin(double " x ); +.BI "float sinf(float " x ); +.BI "long double sinl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sinf (), +.BR sinl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the sine of +.IR x , +where +.I x +is +given in radians. +.SH RETURN VALUE +On success, these functions return the sine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, +and a NaN is returned. +.\" +.\" POSIX.1 allows an optional range error for subnormal x +.\" glibc 2.8 doesn't do this +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sin (), +.BR sinf (), +.BR sinl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH BUGS +Before glibc 2.10, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6781 +.I errno +to +.B EDOM +when a domain error occurred. +.SH SEE ALSO +.BR acos (3), +.BR asin (3), +.BR atan (3), +.BR atan2 (3), +.BR cos (3), +.BR csin (3), +.BR sincos (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/sincos.3 b/upstream/opensuse-leap-15-6/man3/sincos.3 new file mode 100644 index 00000000..547bd5a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sincos.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH sincos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sincos, sincosf, sincosl \- calculate sin and cos simultaneously +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void sincos(double " x ", double *" sin ", double *" cos ); +.BI "void sincosf(float " x ", float *" sin ", float *" cos ); +.BI "void sincosl(long double " x ", long double *" sin ", long double *" cos ); +.fi +.SH DESCRIPTION +Several applications need sine and cosine of the same angle +.IR x . +These functions compute both at the same time, and store the results in +.I *sin +and +.IR *cos . +Using this function can be more efficient than two separate calls to +.BR sin (3) +and +.BR cos (3). +.PP +If +.I x +is a NaN, +a NaN is returned in +.I *sin +and +.IR *cos . +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, and +a NaN is returned in +.I *sin +and +.IR *cos . +.SH RETURN VALUE +These functions return +.IR void . +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sincos (), +.BR sincosf (), +.BR sincosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH NOTES +To see the performance advantage of +.BR sincos (), +it may be necessary to disable +.BR gcc (1) +built-in optimizations, using flags such as: +.PP +.in +4n +.EX +cc \-O \-lm \-fno\-builtin prog.c +.EE +.in +.SH BUGS +Before glibc 2.22, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467 +.I errno +to +.B EDOM +when a domain error occurred. +.SH SEE ALSO +.BR cos (3), +.BR sin (3), +.BR tan (3) diff --git a/upstream/opensuse-leap-15-6/man3/sinh.3 b/upstream/opensuse-leap-15-6/man3/sinh.3 new file mode 100644 index 00000000..ebc58341 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sinh.3 @@ -0,0 +1,132 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH sinh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sinh, sinhf, sinhl \- hyperbolic sine function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double sinh(double " x ); +.BI "float sinhf(float " x ); +.BI "long double sinhl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sinhf (), +.BR sinhl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the hyperbolic sine of +.IR x , +which +is defined mathematically as: +.PP +.nf + sinh(x) = (exp(x) \- exp(\-x)) / 2 +.fi +.SH RETURN VALUE +On success, these functions return the hyperbolic sine of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is positive infinity (negative infinity), +positive infinity (negative infinity) is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the same sign as +.IR x . +.\" +.\" POSIX.1-2001 documents an optional range error (underflow) +.\" for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sinh (), +.BR sinhf (), +.BR sinhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR acosh (3), +.BR asinh (3), +.BR atanh (3), +.BR cosh (3), +.BR csinh (3), +.BR tanh (3) diff --git a/upstream/opensuse-leap-15-6/man3/sleep.3 b/upstream/opensuse-leap-15-6/man3/sleep.3 new file mode 100644 index 00000000..1e76cfa5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sleep.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu) +.TH sleep 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sleep \- sleep for a specified number of seconds +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "unsigned int sleep(unsigned int " "seconds" ); +.fi +.SH DESCRIPTION +.BR sleep () +causes the calling thread to sleep either until +the number of real-time seconds specified in +.I seconds +have elapsed or until a signal arrives which is not ignored. +.SH RETURN VALUE +Zero if the requested time has elapsed, +or the number of seconds left to sleep, +if the call was interrupted by a signal handler. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sleep () +T} Thread safety MT-Unsafe sig:SIGCHLD/linux +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On Linux, +.BR sleep () +is implemented via +.BR nanosleep (2). +See the +.BR nanosleep (2) +man page for a discussion of the clock used. +.PP +On some systems, +.BR sleep () +may be implemented using +.BR alarm (2) +and +.B SIGALRM +(POSIX.1 permits this); +mixing calls to +.BR alarm (2) +and +.BR sleep () +is a bad idea. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH CAVEATS +Using +.BR longjmp (3) +from a signal handler or modifying the handling of +.B SIGALRM +while sleeping will cause undefined results. +.SH SEE ALSO +.BR sleep (1), +.BR alarm (2), +.BR nanosleep (2), +.BR signal (2), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/slist.3 b/upstream/opensuse-leap-15-6/man3/slist.3 new file mode 100644 index 00000000..497ea7d5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/slist.3 @@ -0,0 +1,319 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" +.TH SLIST 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +SLIST_EMPTY, +SLIST_ENTRY, +SLIST_FIRST, +SLIST_FOREACH, +.\"SLIST_FOREACH_FROM, +.\"SLIST_FOREACH_FROM_SAFE, +.\"SLIST_FOREACH_SAFE, +SLIST_HEAD, +SLIST_HEAD_INITIALIZER, +SLIST_INIT, +SLIST_INSERT_AFTER, +SLIST_INSERT_HEAD, +SLIST_NEXT, +SLIST_REMOVE, +.\"SLIST_REMOVE_AFTER, +SLIST_REMOVE_HEAD +.\"SLIST_SWAP +\- implementation of a singly linked list +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B SLIST_ENTRY(TYPE); +.PP +.B SLIST_HEAD(HEADNAME, TYPE); +.BI "SLIST_HEAD SLIST_HEAD_INITIALIZER(SLIST_HEAD " head ); +.BI "void SLIST_INIT(SLIST_HEAD *" head ); +.PP +.BI "int SLIST_EMPTY(SLIST_HEAD *" head ); +.PP +.BI "void SLIST_INSERT_HEAD(SLIST_HEAD *" head , +.BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); +.BI "void SLIST_INSERT_AFTER(struct TYPE *" listelm , +.BI " struct TYPE *" elm ", SLIST_ENTRY " NAME ); +.PP +.BI "struct TYPE *SLIST_FIRST(SLIST_HEAD *" head ); +.BI "struct TYPE *SLIST_NEXT(struct TYPE *" elm ", SLIST_ENTRY " NAME ); +.PP +.BI "SLIST_FOREACH(struct TYPE *" var ", SLIST_HEAD *" head ", SLIST_ENTRY " NAME ); +.\" .BI "SLIST_FOREACH_FROM(struct TYPE *" var ", SLIST_HEAD *" head , +.\" .BI " SLIST_ENTRY " NAME ); +.\" .PP +.\" .BI "SLIST_FOREACH_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , +.\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); +.\" .BI "SLIST_FOREACH_FROM_SAFE(struct TYPE *" var ", SLIST_HEAD *" head , +.\" .BI " SLIST_ENTRY " NAME ", struct TYPE *" temp_var ); +.PP +.BI "void SLIST_REMOVE(SLIST_HEAD *" head ", struct TYPE *" elm , +.BI " SLIST_ENTRY " NAME ); +.BI "void SLIST_REMOVE_HEAD(SLIST_HEAD *" head , +.BI " SLIST_ENTRY " NAME ); +.\" .BI "void SLIST_REMOVE_AFTER(struct TYPE *" elm , +.\" .BI " SLIST_ENTRY " NAME ); +.\" .PP +.\" .BI "void SLIST_SWAP(SLIST_HEAD *" head1 ", SLIST_HEAD *" head2 , +.\" .BI " SLIST_ENTRY " NAME ); +.fi +.SH DESCRIPTION +These macros define and operate on doubly linked lists. +.PP +In the macro definitions, +.I TYPE +is the name of a user-defined structure, +that must contain a field of type +.IR SLIST_ENTRY , +named +.IR NAME . +The argument +.I HEADNAME +is the name of a user-defined structure +that must be declared using the macro +.BR SLIST_HEAD (). +.SS Creation +A singly linked list is headed by a structure defined by the +.BR SLIST_HEAD () +macro. +This structure contains a single pointer to the first element on the list. +The elements are singly linked +for minimum space and pointer manipulation overhead +at the expense of O(n) removal for arbitrary elements. +New elements can be added to the list +after an existing element +or at the head of the list. +An +.I SLIST_HEAD +structure is declared as follows: +.PP +.in +4 +.EX +SLIST_HEAD(HEADNAME, TYPE) head; +.EE +.in +.PP +where +.I struct HEADNAME +is the structure to be defined, and +.I struct TYPE +is the type of the elements to be linked into the list. +A pointer to the head of the list can later be declared as: +.PP +.in +4 +.EX +struct HEADNAME *headp; +.EE +.in +.PP +(The names +.I head +and +.I headp +are user selectable.) +.PP +.BR SLIST_ENTRY () +declares a structure that connects the elements in +the list. +.PP +.BR SLIST_HEAD_INITIALIZER () +evaluates to an initializer for the list +.IR head . +.PP +.BR SLIST_INIT () +initializes the list referenced by +.IR head . +.PP +.BR SLIST_EMPTY () +evaluates to true if there are no elements in the list. +.SS Insertion +.BR SLIST_INSERT_HEAD () +inserts the new element +.I elm +at the head of the list. +.PP +.BR SLIST_INSERT_AFTER () +inserts the new element +.I elm +after the element +.IR listelm . +.SS Traversal +.BR SLIST_FIRST () +returns the first element in the list, or NULL if the list is empty. +.PP +.BR SLIST_NEXT () +returns the next element in the list. +.PP +.BR SLIST_FOREACH () +traverses the list referenced by +.I head +in the forward direction, +assigning each element in turn to +.IR var . +.\" .PP +.\" .BR SLIST_FOREACH_FROM () +.\" behaves identically to +.\" .BR SLIST_FOREACH () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found SLIST element and begins the loop at +.\" .I var +.\" instead of the first element in the SLIST referenced by +.\" .IR head . +.\" .Pp +.\" .BR SLIST_FOREACH_SAFE () +.\" traverses the list referenced by +.\" .I head +.\" in the forward direction, assigning each element in +.\" turn to +.\" .IR var . +.\" However, unlike +.\" .BR SLIST_FOREACH () +.\" here it is permitted to both remove +.\" .I var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .PP +.\" .BR SLIST_FOREACH_FROM_SAFE () +.\" behaves identically to +.\" .BR SLIST_FOREACH_SAFE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found SLIST element and begins the loop at +.\" .I var +.\" instead of the first element in the SLIST referenced by +.\" .IR head . +.SS Removal +.BR SLIST_REMOVE () +removes the element +.I elm +from the list. +.PP +.BR SLIST_REMOVE_HEAD () +removes the element +.I elm +from the head of the list. +For optimum efficiency, +elements being removed from the head of the list +should explicitly use this macro instead of the generic +.BR SLIST_REMOVE (). +.\" .PP +.\" .BR SLIST_REMOVE_AFTER () +.\" removes the element after +.\" .I elm +.\" from the list. +.\" Unlike +.\" .IR SLIST_REMOVE , +.\" this macro does not traverse the entire list. +.\" .SS Other features +.\" .BR SLIST_SWAP () +.\" swaps the contents of +.\" .I head1 +.\" and +.\" .IR head2 . +.SH RETURN VALUE +.BR SLIST_EMPTY () +returns nonzero if the list is empty, +and zero if the list contains at least one entry. +.PP +.BR SLIST_FIRST (), +and +.BR SLIST_NEXT () +return a pointer to the first or next +.I TYPE +structure, respectively. +.PP +.BR SLIST_HEAD_INITIALIZER () +returns an initializer that can be assigned to the list +.IR head . +.SH STANDARDS +BSD. +.SH HISTORY +4.4BSD. +.SH BUGS +.BR SLIST_FOREACH () +doesn't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +.BR SLIST_FOREACH_SAFE (), +which is present on the BSDs but is not present in glibc, +fixes this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. +.SH EXAMPLES +.\" SRC BEGIN (slist.c) +.EX +#include +#include +#include +#include + +struct entry { + int data; + SLIST_ENTRY(entry) entries; /* Singly linked list */ +}; + +SLIST_HEAD(slisthead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct slisthead head; /* Singly linked list + head */ + + SLIST_INIT(&head); /* Initialize the queue */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head */ + SLIST_INSERT_HEAD(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after */ + SLIST_INSERT_AFTER(n1, n2, entries); + + SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */ + free(n2); + + n3 = SLIST_FIRST(&head); + SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head */ + free(n3); + + for (unsigned int i = 0; i < 5; i++) { + n1 = malloc(sizeof(struct entry)); + SLIST_INSERT_HEAD(&head, n1, entries); + n1\->data = i; + } + + /* Forward traversal */ + SLIST_FOREACH(np, &head, entries) + printf("%i\en", np\->data); + + while (!SLIST_EMPTY(&head)) { /* List deletion */ + n1 = SLIST_FIRST(&head); + SLIST_REMOVE_HEAD(&head, entries); + free(n1); + } + SLIST_INIT(&head); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR insque (3), +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/slk.3ncurses b/upstream/opensuse-leap-15-6/man3/slk.3ncurses new file mode 100644 index 00000000..c3af350f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/slk.3ncurses @@ -0,0 +1,291 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_slk.3x,v 1.33 2017/11/21 00:46:31 tom Exp $ +.TH slk 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBslk_init\fR, +\fBslk_set\fR, +\fBslk_wset\fR, +\fBslk_refresh\fR, +\fBslk_noutrefresh\fR, +\fBslk_label\fR, +\fBslk_clear\fR, +\fBslk_restore\fR, +\fBslk_touch\fR, +\fBslk_attron\fR, +\fBslk_attrset\fR, +\fBslk_attroff\fR, +\fBslk_attr_on\fR, +\fBslk_attr_set\fR, +\fBslk_attr_off\fR, +\fBslk_attr\fR, +\fBslk_color\fR, +\fBextended_slk_color\fR \- \fBcurses\fR soft label routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint slk_init(int \fP\fIfmt\fP\fB);\fR +.sp +\fBint slk_set(int \fP\fIlabnum\fP\fB, const char *\fP\fIlabel\fP\fB, int \fP\fIfmt\fP\fB);\fR +.br +\fBint slk_wset(int \fP\fIlabnum\fP\fB, const wchar_t *\fP\fIlabel\fP\fB, int \fP\fIfmt\fP\fB);\fR +.sp +\fBchar *slk_label(int \fP\fIlabnum\fP\fB);\fR +.sp +\fBint slk_refresh(void);\fR +.br +\fBint slk_noutrefresh(void);\fR +.br +\fBint slk_clear(void);\fR +.br +\fBint slk_restore(void);\fR +.br +\fBint slk_touch(void);\fR +.sp +\fBint slk_attron(const chtype \fP\fIattrs\fP\fB);\fR +.br +\fBint slk_attroff(const chtype \fP\fIattrs\fP\fB);\fR +.br +\fBint slk_attrset(const chtype \fP\fIattrs\fP\fB);\fR +.br +\fBint slk_attr_on(attr_t \fP\fIattrs\fP\fB, void* \fP\fIopts\fP\fB);\fR +.br +\fBint slk_attr_off(const attr_t \fP\fIattrs\fP\fB, void * \fP\fIopts\fP\fB);\fR +.br +\fBint slk_attr_set(const attr_t \fP\fIattrs\fP\fB, short \fP\fIpair\fP\fB, void* \fP\fIopts\fP\fB);\fR +.sp +\fBattr_t slk_attr(void);\fR +.sp +\fBint slk_color(short \fP\fIpair\fP\fB);\fR +.br +/* extension */ +.br +\fBint extended_slk_color(int \fP\fIpair\fP\fB);\fR +.SH DESCRIPTION +The slk* functions manipulate the set of soft function-key labels that exist on +many terminals. +For those terminals that do not have soft labels, +\fBcurses\fR takes over the bottom line of \fBstdscr\fR, reducing the size of +\fBstdscr\fR and the variable \fBLINES\fR. +\fBcurses\fR standardizes on eight +labels of up to eight characters each. +In addition to this, the ncurses +implementation supports a mode where it simulates 12 labels of up to five +characters each. +This is useful for PC-like enduser devices. +ncurses simulates this mode by taking over up to two lines at +the bottom of the screen; +it does not try to use any hardware support for this +mode. +.SS Initialization +.PP +The \fBslk_init\fR routine must be called before \fBinitscr\fR or \fBnewterm\fR +is called. +If \fBinitscr\fR eventually uses a line from \fBstdscr\fR to +emulate the soft labels, +then \fIfmt\fR determines how the labels are arranged on the screen: +.RS 3 +.TP 3 +.B 0 +indicates a 3\-2\-3 arrangement of +the labels. +.TP 3 +.B 1 +indicates a 4\-4 arrangement +.TP 3 +.B 2 +indicates the PC-like 4\-4\-4 mode. +.TP 3 +.B 3 +is again the PC-like 4\-4\-4 mode, +but in addition an index line is generated, helping the user to +identify the key numbers easily. +.RE +.SS Labels +.PP +The \fBslk_set\fR routine +(and the \fBslk_wset\fR routine for the wide-character library) +has three parameters: +.RS 3 +.TP 5 +.I labnum +is the label number, from \fB1\fR to \fB8\fR +(12 for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP); +.TP +.I label +is be the string to put on the label, +up to eight +(five for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP) +characters in length. +A null string or a null pointer sets up a blank label. +.TP +.I fmt +is either +\fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the label is to be +left-justified, centered, or right-justified, respectively, within the +label. +.RE +.PP +The \fBslk_label\fR routine returns the current label for label number +\fIlabnum\fR, with leading and trailing blanks stripped. +.SS Screen updates +.PP +The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to +the \fBwrefresh\fR and \fBwnoutrefresh\fR routines. +.PP +The \fBslk_clear\fR routine clears the soft labels from the screen. +.PP +The \fBslk_restore\fR routine restores the soft labels to the screen +after a \fBslk_clear\fR has been performed. +.PP +The \fBslk_touch\fR routine forces all the soft labels to be output +the next time a \fBslk_noutrefresh\fR is performed. +.SS Video attributes +.PP +The \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR and \fBslk_attr\fR +routines correspond to \fBattron\fR, \fBattrset\fR, \fBattroff\fR and \fBattr_get\fR. +They have an effect only if soft labels are simulated on the bottom line of +the screen. +The default highlight for soft keys is A_STANDOUT (as in +System V curses, which does not document this fact). +.SS Colors +.PP +The \fBslk_color\fR routine corresponds to \fBcolor_set\fR. +It has an effect only +if soft labels are simulated on the bottom line of the screen. +.PP +Because \fBslk_color\fR accepts only \fBshort\fP (signed 16-bit integer) values, +this implementation provides +\fBextended_slk_color\fR which accepts an integer value, e.g., 32-bits. +. +.SH RETURN VALUE +These routines return \fBERR\fR upon failure and \fBOK\fP (SVr4 specifies only "an +integer value other than \fBERR\fR") upon successful completion. +.PP +X/Open defines no error conditions. +In this implementation +.RS 3 +.TP 5 +\fBslk_attr\fR +returns the attribute used for the soft keys. +.TP 5 +.na +.hy 0 +\fBslk_attroff\fP, \fBslk_attron\fP, \fBslk_clear\fP, \fBslk_noutrefresh\fP, \fBslk_refresh\fP, \fBslk_touch\fP +.ad +.hy +return an error +if the terminal or the softkeys were not initialized. +.TP 5 +\fBslk_attrset\fP +returns an error +if the terminal or the softkeys were not initialized. +.TP 5 +\fBslk_attr_set\fP +returns an error +if the terminal or the softkeys were not initialized, or +the color pair is outside the range 0..COLOR_PAIRS\-1. +.TP 5 +\fBslk_color\fP +returns an error +if the terminal or the softkeys were not initialized, or +the color pair is outside the range 0..COLOR_PAIRS\-1. +.TP 5 +\fBslk_init\fR +returns an error +if the format parameter is outside the range 0..3. +.TP 5 +\fBslk_label\fR +returns \fBNULL\fR on error. +.TP 5 +\fBslk_set\fP +returns an error +if the terminal or the softkeys were not initialized, or +the \fIlabnum\fP parameter is outside the range of label counts, or +if the format parameter is outside the range 0..2, or if +memory for the labels cannot be allocated. +.RE +.SH EXTENSIONS +.PP +X/Open Curses documents the \fIopts\fP argument as reserved for future use, +saying that it must be null. +This implementation +uses that parameter in ABI 6 for the functions which have a color-pair +parameter to support extended color pairs. +.PP +For functions which modify the color, e.g., \fBslk_attr_set\fP, +if \fIopts\fP is set it is treated as a pointer to \fBint\fP, +and used to set the color pair instead of the \fBshort\fP pair parameter. +.SH NOTES +Most applications would use \fBslk_noutrefresh\fR because a +\fBwrefresh\fR is likely to follow soon. +.SH PORTABILITY +The XSI Curses standard, Issue 4, described the soft-key functions, +with some differences from SVr4 curses: +.bP +It added functions like the SVr4 +attribute-manipulation functions \fBslk_attron\fR, +\fBslk_attroff\fR, \fBslk_attrset\fR, +but which use \fBattr_t\fR parameters (rather than \fBchtype\fP), +along with a reserved \fIopts\fP parameter. +.IP +Two of these new functions (unlike the SVr4 functions) have no provision +for color: \fBslk_attr_on\fP and \fBslk_attr_off\fP. +.IP +The third function (\fBslk_attr_set\fP) has a color-pair parameter. +.bP +It added \fBconst\fR qualifiers to parameters (unnecessarily), and +.bP +It added \fBslk_color\fP. +.PP +The format codes \fB2\fR and \fB3\fR for \fBslk_init\fR and the +function \fBslk_attr\fR are specific to ncurses. +.PP +X/Open Curses does not specify a limit for the number of colors and +color pairs which a terminal can support. +However, in its use of \fBshort\fP for the parameters, +it carries over SVr4's implementation detail for the compiled +terminfo database, which uses signed 16-bit numbers. +This implementation provides extended versions of those functions +which use \fBshort\fP parameters, +allowing applications to use larger color- and pair-numbers. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBattr\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/sockatmark.3 b/upstream/opensuse-leap-15-6/man3/sockatmark.3 new file mode 100644 index 00000000..05b9cdc4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sockatmark.3 @@ -0,0 +1,141 @@ +'\" t +.\" Copyright (c) 2006, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sockatmark 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sockatmark \- determine whether socket is at out-of-band mark +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sockatmark(int " sockfd ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sockatmark (): +.nf + _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +.BR sockatmark () +returns a value indicating whether or not the socket referred +to by the file descriptor +.I sockfd +is at the out-of-band mark. +If the socket is at the mark, then 1 is returned; +if the socket is not at the mark, 0 is returned. +This function does not remove the out-of-band mark. +.SH RETURN VALUE +A successful call to +.BR sockatmark () +returns 1 if the socket is at the out-of-band mark, or 0 if it is not. +On error, \-1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I sockfd +is not a valid file descriptor. +.TP +.B EINVAL +.\" POSIX.1 says ENOTTY for this case +.I sockfd +is not a file descriptor to which +.BR sockatmark () +can be applied. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sockatmark () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.2.4. +POSIX.1-2001. +.SH NOTES +If +.BR sockatmark () +returns 1, then the out-of-band data can be read using the +.B MSG_OOB +flag of +.BR recv (2). +.PP +Out-of-band data is supported only on some stream socket protocols. +.PP +.BR sockatmark () +can safely be called from a handler for the +.B SIGURG +signal. +.PP +.BR sockatmark () +is implemented using the +.B SIOCATMARK +.BR ioctl (2) +operation. +.SH BUGS +Prior to glibc 2.4, +.BR sockatmark () +did not work. +.SH EXAMPLES +The following code can be used after receipt of a +.B SIGURG +signal to read (and discard) all data up to the mark, +and then read the byte of data at the mark: +.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 SEE ALSO +.BR fcntl (2), +.BR recv (2), +.BR send (2), +.BR tcp (7) diff --git a/upstream/opensuse-leap-15-6/man3/sp_funcs.3ncurses b/upstream/opensuse-leap-15-6/man3/sp_funcs.3ncurses new file mode 100644 index 00000000..824b7bac --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sp_funcs.3ncurses @@ -0,0 +1,373 @@ +.\"*************************************************************************** +.\" Copyright (c) 2010-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_sp_funcs.3x,v 1.9 2017/03/27 08:35:44 tom Exp $ +.TH sp_funcs 3NCURSES "" +.na +.hy 0 +.SH NAME +curs_sp_funcs \- \fBcurses\fR screen-pointer extension +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.nf +.sp +\fBint alloc_pair_sp(SCREEN*, int, int);\fR +.br +\fBint assume_default_colors_sp(SCREEN*, int, int);\fR +.br +\fBint baudrate_sp(SCREEN*);\fR +.br +\fBint beep_sp(SCREEN*);\fR +.br +\fBbool can_change_color_sp(SCREEN*);\fR +.br +\fBint cbreak_sp(SCREEN*);\fR +.br +\fBint color_content_sp(SCREEN*, short, short*, short*, short*);\fR +.br +\fBint curs_set_sp(SCREEN*, int);\fR +.br +\fBint define_key_sp(SCREEN*, const char *, int);\fR +.br +\fBint def_prog_mode_sp(SCREEN*);\fR +.br +\fBint def_shell_mode_sp(SCREEN*);\fR +.br +\fBint delay_output_sp(SCREEN*, int);\fR +.br +\fBint doupdate_sp(SCREEN*);\fR +.br +\fBint echo_sp(SCREEN*);\fR +.br +\fBint endwin_sp(SCREEN*);\fR +.br +\fBint erasechar_sp(SCREEN*);\fR +.br +\fBint extended_color_content_sp(SCREEN *, int, int *, int *, int *);\fR +.br +\fBint extended_pair_content_sp(SCREEN*, int, int *, int *);\fR +.br +\fBint extended_slk_color_sp(SCREEN*, int);\fR +.br +\fBint filter_sp(SCREEN*);\fR +.br +\fBint find_pair_sp(SCREEN*, int, int);\fR +.br +\fBint free_pair_sp(SCREEN*, int);\fR +.br +\fBint flash_sp(SCREEN*);\fR +.br +\fBint flushinp_sp(SCREEN*);\fR +.br +\fBint get_escdelay_sp(SCREEN*);\fR +.br +\fBint getmouse_sp(SCREEN*, MEVENT*);\fR +.br +\fBWINDOW* getwin_sp(SCREEN*, FILE*);\fR +.br +\fBint halfdelay_sp(SCREEN*);\fR +.br +\fBbool has_colors_sp(SCREEN*);\fR +.br +\fBbool has_ic_sp(SCREEN*);\fR +.br +\fBbool has_il_sp(SCREEN*);\fR +.br +\fBint has_key_sp(SCREEN*, int);\fR +.br +\fBbool has_mouse_sp(SCREEN*);\fR +.br +\fBint init_color_sp(SCREEN*, short, short, short, short);\fR +.br +\fBint init_extended_color_sp(SCREEN*, int, int, int, int);\fR +.br +\fBint init_extended_pair_sp(SCREEN*, int, int, int);\fR +.br +\fBint init_pair_sp(SCREEN*, short, short, short);\fR +.br +\fBint intrflush_sp(SCREEN*, WINDOW*, bool);\fR +.br +\fBbool isendwin_sp(SCREEN*);\fR +.br +\fBbool is_term_resized_sp(SCREEN*, int, int);\fR +.br +\fBchar* keybound_sp(SCREEN*, int, int);\fR +.br +\fBint key_defined_sp(SCREEN*, const char *);\fR +.br +\fBNCURSES_CONST char * keyname_sp(SCREEN*, int);\fR +.br +\fBint keyok_sp(SCREEN*, int, bool);\fR +.br +\fBchar killchar_sp(SCREEN*);\fR +.br +\fBchar* longname_sp(SCREEN*);\fR +.br +\fBint mcprint_sp(SCREEN*, char *, int);\fR +.br +\fBint mouseinterval_sp(SCREEN*, int);\fR +.br +\fBmmask_t mousemask_sp(SCREEN*, mmask_t, mmask_t *);\fR +.br +\fBint mvcur_sp(SCREEN*, int, int, int, int);\fR +.br +\fBint napms_sp(SCREEN*, int);\fR +.br +\fBWINDOW* newpad_sp(SCREEN*, int, int);\fR +.br +\fBSCREEN* new_prescr(void);\fR +.br +\fBSCREEN* newterm_sp(SCREEN*, NCURSES_CONST char *, FILE *, FILE *);\fR +.br +\fBWINDOW* newwin_sp(SCREEN*, int, int, int, int);\fR +.br +\fBint nl_sp(SCREEN*);\fR +.br +\fBint nocbreak_sp(SCREEN*);\fR +.br +\fBint noecho_sp(SCREEN*);\fR +.br +\fBint nofilter_sp(SCREEN*);\fR +.br +\fBint nonl_sp(SCREEN*);\fR +.br +\fBvoid noqiflush_sp(SCREEN*);\fR +.br +\fBint noraw_sp(SCREEN*);\fR +.br +\fBint pair_content_sp(SCREEN*, short, short*, short*);\fR +.br +\fBvoid qiflush_sp(SCREEN*);\fR +.br +\fBint raw_sp(SCREEN*);\fR +.br +\fBint reset_prog_mode_sp(SCREEN*);\fR +.br +\fBint reset_shell_mode_sp(SCREEN*);\fR +.br +\fBint resetty_sp(SCREEN*);\fR +.br +\fBint resize_term_sp(SCREEN*, int, int);\fR +.br +\fBint resizeterm_sp(SCREEN*, int, int);\fR +.br +\fBint restartterm_sp(SCREEN*, NCURSES_CONST char*, int, int *);\fR +.br +\fBint ripoffline_sp(SCREEN*, int, int (*)(WINDOW*, int));\fR +.br +\fBint savetty_sp(SCREEN*);\fR +.br +\fBint scr_init_sp(SCREEN*, const char *);\fR +.br +\fBint scr_restore_sp(SCREEN*, const char *);\fR +.br +\fBint scr_set_sp(SCREEN*, const char *);\fR +.br +\fBTERMINAL* set_curterm_sp(SCREEN*, TERMINAL*);\fR +.br +\fBint set_escdelay_sp(SCREEN*, int);\fR +.br +\fBint set_tabsize_sp(SCREEN*, int);\fR +.br +\fBint slk_attroff_sp(SCREEN*, const chtype);\fR +.br +\fBint slk_attron_sp(SCREEN*, const chtype);\fR +.br +\fBint slk_attr_set_sp(SCREEN*, const attr_t, short, void*);\fR +.br +\fBint slk_attrset_sp(SCREEN*, const chtype);\fR +.br +\fBint slk_attr_sp(SCREEN*);\fR +.br +\fBint slk_clear_sp(SCREEN*);\fR +.br +\fBint slk_color_sp(SCREEN*, short);\fR +.br +\fBint slk_init_sp(SCREEN*, int);\fR +.br +\fBint slk_label_sp(SCREEN*, int);\fR +.br +\fBint slk_noutrefresh_sp(SCREEN*);\fR +.br +\fBint slk_refresh_sp(SCREEN*);\fR +.br +\fBint slk_restore_sp(SCREEN*);\fR +.br +\fBint slk_set_sp(SCREEN*, int, const char *, int);\fR +.br +\fBint slk_touch_sp(SCREEN*);\fR +.br +\fBint start_color_sp(SCREEN*);\fR +.br +\fBattr_t term_attrs_sp(SCREEN*);\fR +.br +\fBchtype termattrs_sp(SCREEN*);\fR +.br +\fBchar* termname_sp(SCREEN*);\fR +.br +\fBint typeahead_sp(SCREEN*, int);\fR +.br +\fBNCURSES_CONST char* unctrl_sp(SCREEN*, chtype);\fR +.br +\fBint ungetch_sp(SCREEN*, int);\fR +.br +\fBint ungetmouse_sp(SCREEN*,MEVENT *);\fR +.br +\fBint unget_wch_sp(SCREEN*, const wchar_t);\fR +.br +\fBint use_default_colors_sp(SCREEN*);\fR +.br +\fBvoid use_env_sp(SCREEN*, bool);\fR +.br +\fBvoid use_tioctl_sp (SCREEN *, bool)\fR +.br +\fBint use_legacy_coding_sp(SCREEN*, int);\fR +.br +\fBint vid_attr_sp(SCREEN*, attr_t, short, void *);\fR +.br +\fBint vidattr_sp(SCREEN*, chtype);\fR +.br +\fBint vid_puts_sp(SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);\fR +.br +\fBint vidputs_sp(SCREEN*, chtype, NCURSES_SP_OUTC);\fR +.br +\fBwchar_t* wunctrl_sp(SCREEN*, cchar_t *);\fR +.sp +\fB#include \fR +.sp +\fBint new_form_sp(SCREEN*, FIELD **);\fR +.sp +\fB#include \fR +.sp +\fBint new_menu_sp(SCREEN*, ITEM **);\fR +.sp +\fB#include \fR +.sp +\fBint ceiling_panel(SCREEN*);\fR +.br +\fBPANEL* ground_panel(SCREEN*);\fR +.br +\fBint update_panels_sp(SCREEN*);\fR +.sp +\fB#include \fR +.sp +\fBint del_curterm_sp(SCREEN*, TERMINAL *);\fR +.br +\fBint putp_sp(SCREEN*, const char *);\fR +.br +\fBint tgetflag_sp(SCREEN*, char *, const char *);\fR +.br +\fBint tgetent_sp(SCREEN*, char *, const char *);\fR +.br +\fBint tgetnum_sp(SCREEN*, NCURSES_CONST char *);\fR +.br +\fBchar* tgetstr_sp(SCREEN*, NCURSES_CONST char *, char **);\fR +.br +\fBint tigetflag_sp(SCREEN*, NCURSES_CONST char *);\fR +.br +\fBint tigetnum_sp(SCREEN*, NCURSES_CONST char *);\fR +.br +\fBchar* tigetstr_sp(SCREEN*, NCURSES_CONST char *);\fR +.br +\fBint tputs_sp(SCREEN*, const char *, int, NCURSES_SP_OUTC);\fR +.ad +.br +.SH DESCRIPTION +This implementation can be configured to provide a set of functions which +improve the ability to manage multiple screens. +This feature can be added to any of the configurations supported by ncurses; +it adds new entrypoints +without changing the meaning of any of the existing ones. +.PP +.\" *************************************************************************** +.SS IMPROVED FUNCTIONS +Most of the functions are new versions of existing functions. +A parameter is added at the front of the parameter list. +It is a SCREEN pointer. +.PP +The existing functions all use the current screen, +which is a static variable. +The extended functions use the specified screen, +thereby reducing the number of variables which must be modified +to update multiple screens. +.\" *************************************************************************** +.SS NEW FUNCTIONS +Here are the new functions: +.TP 5 +ceiling_panel +this returns a pointer to the topmost panel in the given screen. +.TP 5 +ground_panel +this returns a pointer to the lowest panel in the given screen. +.TP 5 +new_prescr +when creating a new screen, the library uses static variables which +have been preset, e.g., by \fBuse_env\fP(3X), \fBfilter\fP(3X), etc. +With the screen-pointer extension, +there are situations where it must create a current screen before +the unextended library does. +The \fBnew_prescr\fP function is used internally to handle these cases. +It is also provided as an entrypoint to allow applications to customize +the library initialization. +.\" *************************************************************************** +.SH NOTES +This extension introduces some new names: +.TP 5 +NCURSES_SP_FUNCS +This is set to the library patch-level number. +In the unextended library, this is zero (0), +to make it useful for checking if the extension is provided. +.TP 5 +NCURSES_SP_NAME +The new functions are named using the macro \fINCURSES_SP_NAME\fP, +which hides the actual implementation. +Currently this adds a "_sp" suffix to the name of the unextended function. +This manual page indexes the extensions showing the full name. +However the proper usage of these functions uses the macro, +to provide for the possibility of changing the naming convention +for specific library configurations. +.TP 5 +NCURSES_SP_OUTC +This is a new function-pointer type to use in the screen-pointer functions +where an \fINCURSES_OUTC\fP is used in the unextended library. +.TP 5 +NCURSES_OUTC +This is a function-pointer type used for the cases where a function passes +characters to the output stream, e.g., \fBvidputs\fP(3X). +.PP +.SH PORTABILITY +These routines are specific to ncurses. +They were not supported on Version 7, BSD or System V implementations. +It is recommended that any code depending on ncurses extensions +be conditioned using \fINCURSES_SP_FUNCS\fP. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBopaque\fR(3NCURSES), +\fBthreads\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/spacing.3menu b/upstream/opensuse-leap-15-6/man3/spacing.3menu new file mode 100644 index 00000000..e26d141b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/spacing.3menu @@ -0,0 +1,89 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_spacing.3x,v 1.13 2015/12/05 23:42:45 tom Exp $ +.TH spacing 3MENU "" +.SH NAME +\fBset_menu_spacing\fP, +\fBmenu_spacing\fR \- set and get spacing between menu items. +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_spacing(MENU *menu, + int spc_description, + int spc_rows, + int spc_columns); +.br +int menu_spacing(const MENU *menu, + int* spc_description, + int* spc_rows, + int* spc_columns); +.br +.SH DESCRIPTION +The function \fBset_menu_spacing\fR sets the spacing information for the menu. +Its parameter \fBspc_description\fR controls the number of spaces between an item name and an item +description. +It must not be larger than \fBTABSIZE\fR. +The menu system puts in the +middle of this spacing area the pad character. +The remaining parts are filled with +spaces. +The \fBspc_rows\fR parameter controls the number of rows that are used for an item. +It must not be larger than 3. +The menu system inserts the blank lines between item rows, these lines +will contain the pad character in the appropriate positions. +The \fBspc_columns\fR parameter controls the number of blanks between columns of items. +It must not be larger than TABSIZE. +A value of 0 for all the spacing values resets them to the default, which is 1 for all +of them. +.br +The function \fBmenu_spacing\fR passes back the spacing info for the menu. +If a +pointer is NULL, this specific info is simply not returned. +.SH RETURN VALUE +Both routines return \fBE_OK\fR on success. +\fBset_menu_spacing\fR may return +\fBE_POSTED\fR if the menu is posted, or \fBE_BAD_ARGUMENT\fR if one of the +spacing values is out of range. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines are specific to ncurses. +They were not supported on +Version 7, BSD or System V implementations. +It is recommended that +any code depending on them be conditioned using NCURSES_VERSION. +.SH AUTHORS +Juergen Pfeifer. +Manual pages and adaptation for new curses by Eric S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/sqrt.3 b/upstream/opensuse-leap-15-6/man3/sqrt.3 new file mode 100644 index 00000000..6a10d1f4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sqrt.3 @@ -0,0 +1,112 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH sqrt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sqrt, sqrtf, sqrtl \- square root function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double sqrt(double " x ); +.BI "float sqrtf(float " x ); +.BI "long double sqrtl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sqrtf (), +.BR sqrtl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the nonnegative square root of +.IR x . +.SH RETURN VALUE +On success, these functions return the square root of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is positive infinity, positive infinity is returned. +.PP +If +.I x +is less than \-0, +a domain error occurs, +and a NaN is returned. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP less than \-0 +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sqrt (), +.BR sqrtf (), +.BR sqrtl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR cbrt (3), +.BR csqrt (3), +.BR hypot (3) diff --git a/upstream/opensuse-leap-15-6/man3/sscanf.3 b/upstream/opensuse-leap-15-6/man3/sscanf.3 new file mode 100644 index 00000000..46eb785d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sscanf.3 @@ -0,0 +1,744 @@ +'\" t +.\" Copyright (c) 1990, 1991 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Chris Torek and the American National Standards Committee X3, +.\" on Information Processing Systems. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)scanf.3 6.14 (Berkeley) 1/8/93 +.\" +.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu +.\" modified to resemble the GNU libio setup used in the Linux libc +.\" used in versions 4.x (x>4) and 5 Helmut.Geyer@iwr.uni-heidelberg.de +.\" Modified, aeb, 970121 +.\" 2005-07-14, mtk, added description of %n$ form; various text +.\" incorporated from the GNU C library documentation ((C) The +.\" Free Software Foundation); other parts substantially rewritten. +.\" +.\" 2008-06-23, mtk +.\" Add ERRORS section. +.\" Document the 'a' and 'm' modifiers for dynamic string allocation. +.\" +.TH sscanf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sscanf, vsscanf \- input string format conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int sscanf(const char *restrict " str , +.BI " const char *restrict " format ", ...);" +.PP +.B #include +.PP +.BI "int vsscanf(const char *restrict " str , +.BI " const char *restrict " format ", va_list " ap ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR vsscanf (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR sscanf () +family of functions scans input according to +.I format +as described below. +This format may contain +.IR "conversion specifications" ; +the results from such conversions, if any, +are stored in the locations pointed to by the +.I pointer +arguments that follow +.IR format . +Each +.I pointer +argument must be of a type that is appropriate for the value returned +by the corresponding conversion specification. +.PP +If the number of conversion specifications in +.I format +exceeds the number of +.I pointer +arguments, the results are undefined. +If the number of +.I pointer +arguments exceeds the number of conversion specifications, then the excess +.I pointer +arguments are evaluated, but are otherwise ignored. +.PP +.BR sscanf () +These functions +read their input from the string pointed to by +.IR str . +.PP +The +.BR vsscanf () +function is analogous to +.BR vsprintf (3). +.PP +The +.I format +string consists of a sequence of +.I directives +which describe how to process the sequence of input characters. +If processing of a directive fails, no further input is read, and +.BR sscanf () +returns. +A "failure" can be either of the following: +.IR "input failure" , +meaning that input characters were unavailable, or +.IR "matching failure" , +meaning that the input was inappropriate (see below). +.PP +A directive is one of the following: +.TP +\[bu] +A sequence of white-space characters (space, tab, newline, etc.; see +.BR isspace (3)). +This directive matches any amount of white space, +including none, in the input. +.TP +\[bu] +An ordinary character (i.e., one other than white space or \[aq]%\[aq]). +This character must exactly match the next character of input. +.TP +\[bu] +A conversion specification, +which commences with a \[aq]%\[aq] (percent) character. +A sequence of characters from the input is converted according to +this specification, and the result is placed in the corresponding +.I pointer +argument. +If the next item of input does not match the conversion specification, +the conversion fails\[em]this is a +.IR "matching failure" . +.PP +Each +.I conversion specification +in +.I format +begins with either the character \[aq]%\[aq] or the character sequence +"\fB%\fP\fIn\fP\fB$\fP" +(see below for the distinction) followed by: +.TP +\[bu] +An optional \[aq]*\[aq] assignment-suppression character: +.BR sscanf () +reads input as directed by the conversion specification, +but discards the input. +No corresponding +.I pointer +argument is required, and this specification is not +included in the count of successful assignments returned by +.BR scanf (). +.TP +\[bu] +For decimal conversions, an optional quote character (\[aq]). +This specifies that the input number may include thousands' +separators as defined by the +.B LC_NUMERIC +category of the current locale. +(See +.BR setlocale (3).) +The quote character may precede or follow the \[aq]*\[aq] +assignment-suppression character. +.TP +\[bu] +An optional \[aq]m\[aq] character. +This is used with string conversions +.RI ( %s , +.IR %c , +.IR %[ ), +and relieves the caller of the +need to allocate a corresponding buffer to hold the input: instead, +.BR sscanf () +allocates a buffer of sufficient size, +and assigns the address of this buffer to the corresponding +.I pointer +argument, which should be a pointer to a +.I "char\ *" +variable (this variable does not need to be initialized before the call). +The caller should subsequently +.BR free (3) +this buffer when it is no longer required. +.TP +\[bu] +An optional decimal integer which specifies the +.IR "maximum field width" . +Reading of characters stops either when this maximum is reached or +when a nonmatching character is found, whichever happens first. +Most conversions discard initial white space characters (the exceptions +are noted below), +and these discarded characters don't count toward the maximum field width. +String input conversions store a terminating null byte (\[aq]\e0\[aq]) +to mark the end of the input; +the maximum field width does not include this terminator. +.TP +\[bu] +An optional +.IR "type modifier character" . +For example, the +.B l +type modifier is used with integer conversions such as +.B %d +to specify that the corresponding +.I pointer +argument refers to a +.I "long" +rather than a pointer to an +.IR int . +.TP +\[bu] +A +.I "conversion specifier" +that specifies the type of input conversion to be performed. +.PP +The conversion specifications in +.I format +are of two forms, either beginning with \[aq]%\[aq] or beginning with +"\fB%\fP\fIn\fP\fB$\fP". +The two forms should not be mixed in the same +.I format +string, except that a string containing +"\fB%\fP\fIn\fP\fB$\fP" +specifications can include +.B %% +and +.BR %* . +If +.I format +contains \[aq]%\[aq] +specifications, then these correspond in order with successive +.I pointer +arguments. +In the +"\fB%\fP\fIn\fP\fB$\fP" +form (which is specified in POSIX.1-2001, but not C99), +.I n +is a decimal integer that specifies that the converted input should +be placed in the location referred to by the +.IR n -th +.I pointer +argument following +.IR format . +.SS Conversions +The following +.I "type modifier characters" +can appear in a conversion specification: +.TP +.B h +Indicates that the conversion will be one of +\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, or \fBn\fP +and the next pointer is a pointer to a +.I short +or +.I unsigned short +(rather than +.IR int ). +.TP +.B hh +As for +.BR h , +but the next pointer is a pointer to a +.I signed char +or +.IR "unsigned char" . +.TP +.B j +As for +.BR h , +but the next pointer is a pointer to an +.I intmax_t +or a +.IR uintmax_t . +This modifier was introduced in C99. +.TP +.B l +Indicates either that the conversion will be one of +\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, \fBX\fP, or \fBn\fP +and the next pointer is a pointer to a +.I long +or +.I unsigned long +(rather than +.IR int ), +or that the conversion will be one of +\fBe\fP, \fBf\fP, or \fBg\fP +and the next pointer is a pointer to +.I double +(rather than +.IR float ). +If used with +.B %c +or +.BR %s , +the corresponding parameter is considered +as a pointer to a wide character or wide-character string respectively. +.\" This use of l was introduced in Amendment 1 to ISO C90. +.TP +.B ll +(ell-ell) +Indicates that the conversion will be one of +.BR b , +.BR d , +.BR i , +.BR o , +.BR u , +.BR x , +.BR X , +or +.B n +and the next pointer is a pointer to a +.I long long +or +.I unsigned long long +(rather than +.IR int ). +.TP +.B L +Indicates that the conversion will be either +\fBe\fP, \fBf\fP, or \fBg\fP +and the next pointer is a pointer to +.I "long double" +or +(as a GNU extension) +the conversion will be +\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, or \fBx\fP +and the next pointer is a pointer to +.IR "long long" . +.\" MTK, Jul 05: The following is no longer true for modern +.\" ANSI C (i.e., C99): +.\" (Note that long long is not an +.\" ANSI C +.\" type. Any program using this will not be portable to all +.\" architectures). +.TP +.B q +equivalent to +.BR L . +This specifier does not exist in ANSI C. +.TP +.B t +As for +.BR h , +but the next pointer is a pointer to a +.IR ptrdiff_t . +This modifier was introduced in C99. +.TP +.B z +As for +.BR h , +but the next pointer is a pointer to a +.IR size_t . +This modifier was introduced in C99. +.PP +The following +.I "conversion specifiers" +are available: +.TP +.B % +Matches a literal \[aq]%\[aq]. +That is, +.B %\&% +in the format string matches a +single input \[aq]%\[aq] character. +No conversion is done (but initial white space characters are discarded), +and assignment does not occur. +.TP +.B d +.IR Deprecated . +Matches an optionally signed decimal integer; +the next pointer must be a pointer to +.IR int . +.\" .TP +.\" .B D +.\" Equivalent to +.\" .IR ld ; +.\" this exists only for backward compatibility. +.\" (Note: thus only in libc4 +.\" In libc5 and glibc the +.\" .B %D +.\" is silently ignored, causing old programs to fail mysteriously.) +.TP +.B i +.IR Deprecated . +Matches an optionally signed integer; the next pointer must be a pointer to +.IR int . +The integer is read in base 16 if it begins with +.I 0x +or +.IR 0X , +in base 8 if it begins with +.IR 0 , +and in base 10 otherwise. +Only characters that correspond to the base are used. +.TP +.B o +.IR Deprecated . +Matches an unsigned octal integer; the next pointer must be a pointer to +.IR "unsigned int" . +.TP +.B u +.IR Deprecated . +Matches an unsigned decimal integer; the next pointer must be a +pointer to +.IR "unsigned int" . +.TP +.B x +.IR Deprecated . +Matches an unsigned hexadecimal integer +(that may optionally begin with a prefix of +.I 0x +or +.IR 0X , +which is discarded); the next pointer must +be a pointer to +.IR "unsigned int" . +.TP +.B X +.IR Deprecated . +Equivalent to +.BR x . +.TP +.B f +.IR Deprecated . +Matches an optionally signed floating-point number; the next pointer must +be a pointer to +.IR float . +.TP +.B e +.IR Deprecated . +Equivalent to +.BR f . +.TP +.B g +.IR Deprecated . +Equivalent to +.BR f . +.TP +.B E +.IR Deprecated . +Equivalent to +.BR f . +.TP +.B a +.IR Deprecated . +(C99) Equivalent to +.BR f . +.TP +.B s +Matches a sequence of non-white-space characters; +the next pointer must be a pointer to the initial element of a +character array that is long enough to hold the input sequence and +the terminating null byte (\[aq]\e0\[aq]), which is added automatically. +The input string stops at white space or at the maximum field +width, whichever occurs first. +.TP +.B c +Matches a sequence of characters whose length is specified by the +.I maximum field width +(default 1); the next pointer must be a pointer to +.IR char , +and there must be enough room for all the characters +(no terminating null byte is added). +The usual skip of leading white space is suppressed. +To skip white space first, use an explicit space in the format. +.TP +.B \&[ +Matches a nonempty sequence of characters from the specified set of +accepted characters; the next pointer must be a pointer to +.IR char , +and there must be enough room for all the characters in the string, plus a +terminating null byte. +The usual skip of leading white space is suppressed. +The string is to be made up of characters in (or not in) a particular set; +the set is defined by the characters between the open bracket +.B [ +character and a close bracket +.B ] +character. +The set +.I excludes +those characters if the first character after the open bracket is a +circumflex +.RB ( \[ha] ). +To include a close bracket in the set, make it the first character after +the open bracket or the circumflex; any other position will end the set. +The hyphen character +.B \- +is also special; when placed between two other characters, it adds all +intervening characters to the set. +To include a hyphen, make it the last +character before the final close bracket. +For instance, +.B [\[ha]]0\-9\-] +means +the set "everything except close bracket, zero through nine, and hyphen". +The string ends with the appearance of a character not in the (or, with a +circumflex, in) set or when the field width runs out. +.TP +.B p +Matches a pointer value (as printed by +.B %p +in +.BR printf (3)); +the next pointer must be a pointer to a pointer to +.IR void . +.TP +.B n +Nothing is expected; instead, the number of characters consumed thus far +from the input is stored through the next pointer, which must be a pointer +to +.IR int , +or variant whose size matches the (optionally) +supplied integer length modifier. +This is +.I not +a conversion and does +.I not +increase the count returned by the function. +The assignment can be suppressed with the +.B * +assignment-suppression character, but the effect on the +return value is undefined. +Therefore +.B %*n +conversions should not be used. +.SH RETURN VALUE +On success, these functions return the number of input items +successfully matched and assigned; +this can be fewer than provided for, +or even zero, in the event of an early matching failure. +.PP +The value +.B EOF +is returned if the end of input is reached before either the first +successful conversion or a matching failure occurs. +.SH ERRORS +.TP +.B EILSEQ +Input byte sequence does not form a valid character. +.TP +.B EINVAL +Not enough arguments; or +.I format +is NULL. +.TP +.B ENOMEM +Out of memory. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sscanf (), +.BR vsscanf () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.PP +The +.B q +specifier is the 4.4BSD notation for +.IR "long long" , +while +.B ll +or the usage of +.B L +in integer conversions is the GNU notation. +.PP +The Linux version of these functions is based on the +.I GNU +.I libio +library. +Take a look at the +.I info +documentation of +.I GNU +.I libc (glibc-1.08) +for a more concise description. +.SH NOTES +.SS The 'a' assignment-allocation modifier +Originally, the GNU C library supported dynamic allocation for string inputs +(as a nonstandard extension) via the +.B a +character. +(This feature is present at least as far back as glibc 2.0.) +Thus, one could write the following to have +.BR sscanf () +allocate a buffer for a string, +with a pointer to that buffer being returned in +.IR *buf : +.PP +.in +4n +.EX +char *buf; +sscanf(str, "%as", &buf); +.EE +.in +.PP +The use of the letter +.B a +for this purpose was problematic, since +.B a +is also specified by the ISO C standard as a synonym for +.B f +(floating-point input). +POSIX.1-2008 instead specifies the +.B m +modifier for assignment allocation (as documented in DESCRIPTION, above). +.PP +Note that the +.B a +modifier is not available if the program is compiled with +.I gcc\~\-std=c99 +or +.I gcc\~\-D_ISOC99_SOURCE +(unless +.B _GNU_SOURCE +is also specified), in which case the +.B a +is interpreted as a specifier for floating-point numbers (see above). +.PP +Support for the +.B m +modifier was added to glibc 2.7, +and new programs should use that modifier instead of +.BR a . +.PP +As well as being standardized by POSIX, the +.B m +modifier has the following further advantages over +the use of +.BR a : +.IP \[bu] 3 +It may also be applied to +.B %c +conversion specifiers (e.g., +.BR %3mc ). +.IP \[bu] +It avoids ambiguity with respect to the +.B %a +floating-point conversion specifier (and is unaffected by +.I gcc\~\-std=c99 +etc.). +.SH BUGS +.SS Numeric conversion specifiers +Use of the numeric conversion specifiers produces Undefined Behavior +for invalid input. +See +.UR https://port70.net/\:%7Ensz/\:c/\:c11/\:n1570.html\:#7.21.6.2p10 +C11 7.21.6.2/10 +.UE . +This is a bug in the ISO C standard, +and not an inherent design issue with the API. +However, +current implementations are not safe from that bug, +so it is not recommended to use them. +Instead, +programs should use functions such as +.BR strtol (3) +to parse numeric input. +This manual page deprecates use of the numeric conversion specifiers +until they are fixed by ISO C. +.SS Nonstandard modifiers +These functions are fully C99 conformant, but provide the +additional modifiers +.B q +and +.B a +as well as an additional behavior of the +.B L +and +.B ll +modifiers. +The latter may be considered to be a bug, as it changes the +behavior of modifiers defined in C99. +.PP +Some combinations of the type modifiers and conversion +specifiers defined by C99 do not make sense +(e.g., +.BR "%Ld" ). +While they may have a well-defined behavior on Linux, this need not +to be so on other architectures. +Therefore it usually is better to use +modifiers that are not defined by C99 at all, that is, use +.B q +instead of +.B L +in combination with +\fBd\fP, \fBi\fP, \fBo\fP, \fBu\fP, \fBx\fP, and \fBX\fP +conversions or +.BR ll . +.PP +The usage of +.B q +is not the same as on 4.4BSD, +as it may be used in float conversions equivalently to +.BR L . +.SH EXAMPLES +To use the dynamic allocation conversion specifier, specify +.B m +as a length modifier (thus +.B %ms +or +\fB%m[\fP\fIrange\fP\fB]\fP). +The caller must +.BR free (3) +the returned string, as in the following example: +.PP +.in +4n +.EX +char *p; +int n; + +errno = 0; +n = sscanf(str, "%m[a\-z]", &p); +if (n == 1) { + printf("read: %s\en", p); + free(p); +} else if (errno != 0) { + perror("sscanf"); +} else { + fprintf(stderr, "No matching characters\en"); +} +.EE +.in +.PP +As shown in the above example, it is necessary to call +.BR free (3) +only if the +.BR sscanf () +call successfully read a string. +.SH SEE ALSO +.BR getc (3), +.BR printf (3), +.BR setlocale (3), +.BR strtod (3), +.BR strtol (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/stailq.3 b/upstream/opensuse-leap-15-6/man3/stailq.3 new file mode 100644 index 00000000..bb9a5c30 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stailq.3 @@ -0,0 +1,377 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" +.TH STAILQ 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +.\"SIMPLEQ_CONCAT, +SIMPLEQ_EMPTY, +SIMPLEQ_ENTRY, +SIMPLEQ_FIRST, +SIMPLEQ_FOREACH, +.\"SIMPLEQ_FOREACH_FROM, +.\"SIMPLEQ_FOREACH_FROM_SAFE, +.\"SIMPLEQ_FOREACH_SAFE, +SIMPLEQ_HEAD, +SIMPLEQ_HEAD_INITIALIZER, +SIMPLEQ_INIT, +SIMPLEQ_INSERT_AFTER, +SIMPLEQ_INSERT_HEAD, +SIMPLEQ_INSERT_TAIL, +.\"SIMPLEQ_LAST, +SIMPLEQ_NEXT, +SIMPLEQ_REMOVE, +.\"SIMPLEQ_REMOVE_AFTER, +SIMPLEQ_REMOVE_HEAD, +.\"SIMPLEQ_SWAP, +STAILQ_CONCAT, +STAILQ_EMPTY, +STAILQ_ENTRY, +STAILQ_FIRST, +STAILQ_FOREACH, +.\"STAILQ_FOREACH_FROM, +.\"STAILQ_FOREACH_FROM_SAFE, +.\"STAILQ_FOREACH_SAFE, +STAILQ_HEAD, +STAILQ_HEAD_INITIALIZER, +STAILQ_INIT, +STAILQ_INSERT_AFTER, +STAILQ_INSERT_HEAD, +STAILQ_INSERT_TAIL, +.\"STAILQ_LAST, +STAILQ_NEXT, +STAILQ_REMOVE, +.\"STAILQ_REMOVE_AFTER, +STAILQ_REMOVE_HEAD, +.\"STAILQ_SWAP +\- implementation of a singly linked tail queue +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B STAILQ_ENTRY(TYPE); +.PP +.B STAILQ_HEAD(HEADNAME, TYPE); +.BI "STAILQ_HEAD STAILQ_HEAD_INITIALIZER(STAILQ_HEAD " head ); +.BI "void STAILQ_INIT(STAILQ_HEAD *" head ); +.PP +.BI "int STAILQ_EMPTY(STAILQ_HEAD *" head ); +.PP +.BI "void STAILQ_INSERT_HEAD(STAILQ_HEAD *" head , +.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); +.BI "void STAILQ_INSERT_TAIL(STAILQ_HEAD *" head , +.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); +.BI "void STAILQ_INSERT_AFTER(STAILQ_HEAD *" head ", struct TYPE *" listelm , +.BI " struct TYPE *" elm ", STAILQ_ENTRY " NAME ); +.PP +.BI "struct TYPE *STAILQ_FIRST(STAILQ_HEAD *" head ); +.\" .BI "struct TYPE *STAILQ_LAST(STAILQ_HEAD *" head ", struct TYPE *" elm , +.\" .BI " STAILQ_ENTRY " NAME ); +.BI "struct TYPE *STAILQ_NEXT(struct TYPE *" elm ", STAILQ_ENTRY " NAME ); +.PP +.BI "STAILQ_FOREACH(struct TYPE *" var ", STAILQ_HEAD *" head ", STAILQ_ENTRY " NAME ); +.\" .BI "STAILQ_FOREACH_FROM(struct TYPE *" var ", STAILQ_HEAD *" head , +.\" .BI " STAILQ_ENTRY " NAME ); +.\" .PP +.\" .BI "STAILQ_FOREACH_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +.\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +.\" .BI "STAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", STAILQ_HEAD *" head , +.\" .BI " STAILQ_ENTRY " NAME ", struct TYPE *" temp_var ); +.PP +.BI "void STAILQ_REMOVE(STAILQ_HEAD *" head ", struct TYPE *" elm ", TYPE," +.BI " STAILQ_ENTRY " NAME ); +.BI "void STAILQ_REMOVE_HEAD(STAILQ_HEAD *" head , +.BI " STAILQ_ENTRY " NAME ); +.\" .BI "void STAILQ_REMOVE_AFTER(STAILQ_HEAD *" head ", struct TYPE *" elm , +.\" .BI " STAILQ_ENTRY " NAME ); +.PP +.BI "void STAILQ_CONCAT(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 ); +.\" .BI "void STAILQ_SWAP(STAILQ_HEAD *" head1 ", STAILQ_HEAD *" head2 , +.\" .BI " STAILQ_ENTRY " NAME ); +.fi +.IR Note : +Identical macros prefixed with SIMPLEQ instead of STAILQ exist; see NOTES. +.SH DESCRIPTION +These macros define and operate on singly linked tail queues. +.PP +In the macro definitions, +.I TYPE +is the name of a user-defined structure, +that must contain a field of type +.IR STAILQ_ENTRY , +named +.IR NAME . +The argument +.I HEADNAME +is the name of a user-defined structure that must be declared +using the macro +.BR STAILQ_HEAD (). +.SS Creation +A singly linked tail queue is headed by a structure defined by the +.BR STAILQ_HEAD () +macro. +This structure contains a pair of pointers, +one to the first element in the tail queue and the other to +the last element in the tail queue. +The elements are singly linked for minimum space and pointer +manipulation overhead at the expense of O(n) removal for arbitrary elements. +New elements can be added to the tail queue after an existing element, +at the head of the tail queue, or at the end of the tail queue. +A +.I STAILQ_HEAD +structure is declared as follows: +.PP +.in +4 +.EX +STAILQ_HEAD(HEADNAME, TYPE) head; +.EE +.in +.PP +where +.I struct HEADNAME +is the structure to be defined, and +.I struct TYPE +is the type of the elements to be linked into the tail queue. +A pointer to the head of the tail queue can later be declared as: +.PP +.in +4 +.EX +struct HEADNAME *headp; +.EE +.in +.PP +(The names +.I head +and +.I headp +are user selectable.) +.PP +.BR STAILQ_ENTRY () +declares a structure that connects the elements in the tail queue. +.PP +.BR STAILQ_HEAD_INITIALIZER () +evaluates to an initializer for the tail queue +.IR head . +.PP +.BR STAILQ_INIT () +initializes the tail queue referenced by +.IR head . +.PP +.BR STAILQ_EMPTY () +evaluates to true if there are no items on the tail queue. +.SS Insertion +.BR STAILQ_INSERT_HEAD () +inserts the new element +.I elm +at the head of the tail queue. +.PP +.BR STAILQ_INSERT_TAIL () +inserts the new element +.I elm +at the end of the tail queue. +.PP +.BR STAILQ_INSERT_AFTER () +inserts the new element +.I elm +after the element +.IR listelm . +.SS Traversal +.BR STAILQ_FIRST () +returns the first item on the tail queue or NULL if the tail queue is empty. +.\" .PP +.\" .BR STAILQ_LAST () +.\" returns the last item on the tail queue. +.\" If the tail queue is empty the return value is NULL . +.PP +.BR STAILQ_NEXT () +returns the next item on the tail queue, or NULL this item is the last. +.PP +.BR STAILQ_FOREACH () +traverses the tail queue referenced by +.I head +in the forward direction, +assigning each element in turn to +.IR var . +.\" .PP +.\" .BR STAILQ_FOREACH_FROM () +.\" behaves identically to +.\" .BR STAILQ_FOREACH () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found STAILQ element and begins the loop at +.\" .I var +.\" instead of the first element in the STAILQ referenced by +.\" .IR head . +.\" .PP +.\" .BR STAILQ_FOREACH_SAFE () +.\" traverses the tail queue referenced by +.\" .I head +.\" in the forward direction, assigning each element +.\" in turn to +.\" .IR var . +.\" However, unlike +.\" .BR STAILQ_FOREACH () +.\" here it is permitted to both remove +.\" .I var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .PP +.\" .BR STAILQ_FOREACH_FROM_SAFE () +.\" behaves identically to +.\" .BR STAILQ_FOREACH_SAFE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found STAILQ element and begins the loop at +.\" .I var +.\" instead of the first element in the STAILQ referenced by +.\" .IR head . +.SS Removal +.BR STAILQ_REMOVE () +removes the element +.I elm +from the tail queue. +.PP +.BR STAILQ_REMOVE_HEAD () +removes the element at the head of the tail queue. +For optimum efficiency, +elements being removed from the head of the tail queue should +use this macro explicitly rather than the generic +.BR STAILQ_REMOVE () +macro. +.\" .PP +.\" .BR STAILQ_REMOVE_AFTER () +.\" removes the element after +.\" .I elm +.\" from the tail queue. +.\" Unlike +.\" .BR STAILQ_REMOVE (), +.\" this macro does not traverse the entire tail queue. +.SS Other features +.BR STAILQ_CONCAT () +concatenates the tail queue headed by +.I head2 +onto the end of the one headed by +.I head1 +removing all entries from the former. +.\" .PP +.\" .BR STAILQ_SWAP () +.\" swaps the contents of +.\" .I head1 +.\" and +.\" .IR head2 . +.SH RETURN VALUE +.BR STAILQ_EMPTY () +returns nonzero if the queue is empty, +and zero if the queue contains at least one entry. +.PP +.BR STAILQ_FIRST (), +and +.BR STAILQ_NEXT () +return a pointer to the first or next +.I TYPE +structure, respectively. +.PP +.BR STAILQ_HEAD_INITIALIZER () +returns an initializer that can be assigned to the queue +.IR head . +.SH VERSIONS +Some BSDs provide SIMPLEQ instead of STAILQ. +They are identical, but for historical reasons +they were named differently on different BSDs. +STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. +For compatibility reasons, some systems provide both sets of macros. +glibc provides both STAILQ and SIMPLEQ, +which are identical except for a missing SIMPLEQ equivalent to +.BR STAILQ_CONCAT (). +.SH BUGS +.BR STAILQ_FOREACH () +doesn't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +.BR STAILQ_FOREACH_SAFE (), +which is present on the BSDs but is not present in glibc, +fixes this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. +.SH STANDARDS +BSD. +.SH HISTORY +4.4BSD. +.SH EXAMPLES +.\" SRC BEGIN (stailq.c) +.EX +#include +#include +#include +#include + +struct entry { + int data; + STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */ +}; + +STAILQ_HEAD(stailhead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct stailhead head; /* Singly linked tail queue + head */ + + STAILQ_INIT(&head); /* Initialize the queue */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head */ + STAILQ_INSERT_HEAD(&head, n1, entries); + + n1 = malloc(sizeof(struct entry)); /* Insert at the tail */ + STAILQ_INSERT_TAIL(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after */ + STAILQ_INSERT_AFTER(&head, n1, n2, entries); + + STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */ + free(n2); + + n3 = STAILQ_FIRST(&head); + STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */ + free(n3); + + n1 = STAILQ_FIRST(&head); + n1\->data = 0; + for (unsigned int i = 1; i < 5; i++) { + n1 = malloc(sizeof(struct entry)); + STAILQ_INSERT_HEAD(&head, n1, entries); + n1\->data = i; + } + /* Forward traversal */ + STAILQ_FOREACH(np, &head, entries) + printf("%i\en", np\->data); + /* TailQ deletion */ + n1 = STAILQ_FIRST(&head); + while (n1 != NULL) { + n2 = STAILQ_NEXT(n1, entries); + free(n1); + n1 = n2; + } + STAILQ_INIT(&head); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR insque (3), +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/static_assert.3 b/upstream/opensuse-leap-15-6/man3/static_assert.3 new file mode 100644 index 00000000..12a63e7b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/static_assert.3 @@ -0,0 +1,119 @@ +.\" Copyright (c) 2022 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH static_assert 3 2023-01-26 "Linux man-pages 6.04" +.SH NAME +static_assert, _Static_assert \- fail compilation if assertion is false +.SH LIBRARY +Standard C library +.RI ( libc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void static_assert(scalar " constant-expression ", const char *" msg ); +.PP +/* Since C23: */ +.BI "void static_assert(scalar " constant-expression ); +.fi +.SH DESCRIPTION +This macro is similar to +.BR \%assert (3), +but it works at compile time, +generating a compilation error (with an optional message) +when the input is false (i.e., compares equal to zero). +.PP +If the input is nonzero, +no code is emitted. +.PP +.I msg +must be a string literal. +Since C23, this argument is optional. +.PP +There's a keyword, +.BR \%_Static_assert (), +that behaves identically, +and can be used without including +.IR . +.SH RETURN VALUE +No value is returned. +.SH VERSIONS +In C11, +the second argument +.RI ( msg ) +was mandatory; +since C23, +it can be omitted. +.SH STANDARDS +C11 and later. +.SH EXAMPLES +.BR static_assert () +can't be used in some places, +like for example at global scope. +For that, +a macro +.BR \%must_be () +can be written in terms of +.BR \%static_assert (). +The following program uses the macro to get the size of an array safely. +.PP +.in +4n +.\" SRC BEGIN (must_be.c) +.EX +#include +#include +#include +#include +#include +#include + +/* + * This macro behaves like static_assert(), failing to + * compile if its argument is not true. However, it always + * returns 0, which allows using it everywhere an expression + * can be used. + */ +#define must_be(e) \e +( \e + 0 * (int) sizeof( \e + struct { \e + static_assert(e); \e + int ISO_C_forbids_a_struct_with_no_members; \e + } \e + ) \e +) + +#define is_same_type(a, b) \e + __builtin_types_compatible_p(typeof(a), typeof(b)) + +#define is_array(arr) (!is_same_type((arr), &*(arr))) +#define must_be_array(arr) must_be(is_array(arr)) + +#define sizeof_array(arr) (sizeof(arr) + must_be_array(arr)) +#define nitems(arr) (sizeof((arr)) / sizeof((arr)[0]) \e + + must_be_array(arr)) + +int foo[10]; +int8_t bar[sizeof_array(foo)]; + +int +main(void) +{ + for (size_t i = 0; i < nitems(foo); i++) { + foo[i] = i; + } + + memcpy(bar, foo, sizeof_array(bar)); + + for (size_t i = 0; i < nitems(bar); i++) { + printf("%d,", bar[i]); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.SH SEE ALSO +.BR assert (3) diff --git a/upstream/opensuse-leap-15-6/man3/statvfs.3 b/upstream/opensuse-leap-15-6/man3/statvfs.3 new file mode 100644 index 00000000..b3e06dd8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/statvfs.3 @@ -0,0 +1,251 @@ +'\" t +.\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" The pathconf note is from Walter Harms +.\" This is not a system call on Linux +.\" +.\" Modified 2004-06-23 by Michael Kerrisk +.\" +.TH statvfs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +statvfs, fstatvfs \- get filesystem statistics +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int statvfs(const char *restrict " path \ +", struct statvfs *restrict " buf ); +.BI "int fstatvfs(int " fd ", struct statvfs *" buf ); +.fi +.SH DESCRIPTION +The function +.BR statvfs () +returns information about a mounted filesystem. +.I path +is the pathname of any file within the mounted filesystem. +.I buf +is a pointer to a +.I statvfs +structure defined approximately as follows: +.PP +.in +4n +.EX +struct statvfs { + unsigned long f_bsize; /* Filesystem block size */ + unsigned long f_frsize; /* Fragment size */ + fsblkcnt_t f_blocks; /* Size of fs in f_frsize units */ + fsblkcnt_t f_bfree; /* Number of free blocks */ + fsblkcnt_t f_bavail; /* Number of free blocks for + unprivileged users */ + fsfilcnt_t f_files; /* Number of inodes */ + fsfilcnt_t f_ffree; /* Number of free inodes */ + fsfilcnt_t f_favail; /* Number of free inodes for + unprivileged users */ + unsigned long f_fsid; /* Filesystem ID */ + unsigned long f_flag; /* Mount flags */ + unsigned long f_namemax; /* Maximum filename length */ +}; +.EE +.in +.PP +Here the types +.I fsblkcnt_t +and +.I fsfilcnt_t +are defined in +.IR . +Both used to be +.IR "unsigned long" . +.PP +The field +.I f_flag +is a bit mask indicating various options that were employed +when mounting this filesystem. +It contains zero or more of the following flags: +.\" XXX Keep this list in sync with statfs(2) +.TP +.B ST_MANDLOCK +Mandatory locking is permitted on the filesystem (see +.BR fcntl (2)). +.TP +.B ST_NOATIME +Do not update access times; see +.BR mount (2). +.TP +.B ST_NODEV +Disallow access to device special files on this filesystem. +.TP +.B ST_NODIRATIME +Do not update directory access times; see +.BR mount (2). +.TP +.B ST_NOEXEC +Execution of programs is disallowed on this filesystem. +.TP +.B ST_NOSUID +The set-user-ID and set-group-ID bits are ignored by +.BR exec (3) +for executable files on this filesystem +.TP +.B ST_RDONLY +This filesystem is mounted read-only. +.TP +.B ST_RELATIME +Update atime relative to mtime/ctime; see +.BR mount (2). +.TP +.B ST_SYNCHRONOUS +Writes are synched to the filesystem immediately (see the description of +.B O_SYNC +in +.BR open (2)). +.PP +It is unspecified whether all members of the returned struct +have meaningful values on all filesystems. +.PP +.BR fstatvfs () +returns the same information about an open file referenced by descriptor +.IR fd . +.SH RETURN VALUE +On success, zero is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EACCES +.RB ( statvfs ()) +Search permission is denied for a component of the path prefix of +.IR path . +(See also +.BR path_resolution (7).) +.TP +.B EBADF +.RB ( fstatvfs ()) +.I fd +is not a valid open file descriptor. +.TP +.B EFAULT +.I Buf +or +.I path +points to an invalid address. +.TP +.B EINTR +This call was interrupted by a signal; see +.BR signal (7). +.TP +.B EIO +An I/O error occurred while reading from the filesystem. +.TP +.B ELOOP +.RB ( statvfs ()) +Too many symbolic links were encountered in translating +.IR path . +.TP +.B ENAMETOOLONG +.RB ( statvfs ()) +.I path +is too long. +.TP +.B ENOENT +.RB ( statvfs ()) +The file referred to by +.I path +does not exist. +.TP +.B ENOMEM +Insufficient kernel memory was available. +.TP +.B ENOSYS +The filesystem does not support this call. +.TP +.B ENOTDIR +.RB ( statvfs ()) +A component of the path prefix of +.I path +is not a directory. +.TP +.B EOVERFLOW +Some values were too large to be represented in the returned struct. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR statvfs (), +.BR fstatvfs () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Only the +.B ST_NOSUID +and +.B ST_RDONLY +flags of the +.I f_flag +field are specified in POSIX.1. +To obtain definitions of the remaining flags, one must define +.BR _GNU_SOURCE . +.SH NOTES +The Linux kernel has system calls +.BR statfs (2) +and +.BR fstatfs (2) +to support this library call. +.PP +The glibc implementations of +.PP +.in +4n +.EX +pathconf(path, _PC_REC_XFER_ALIGN); +pathconf(path, _PC_ALLOC_SIZE_MIN); +pathconf(path, _PC_REC_MIN_XFER_SIZE); +.EE +.in +.PP +respectively use the +.IR f_frsize , +.IR f_frsize , +and +.I f_bsize +fields returned by a call to +.BR statvfs () +with the argument +.IR path . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +Before glibc 2.13, +.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d +.BR statvfs () +populated the bits of the +.I f_flag +field by scanning the mount options shown in +.IR /proc/mounts . +However, starting with Linux 2.6.36, the underlying +.BR statfs (2) +system call provides the necessary information via the +.I f_flags +field, and since glibc 2.13, the +.BR statvfs () +function will use information from that field rather than scanning +.IR /proc/mounts . +.SH SEE ALSO +.BR statfs (2) diff --git a/upstream/opensuse-leap-15-6/man3/stdarg.3 b/upstream/opensuse-leap-15-6/man3/stdarg.3 new file mode 100644 index 00000000..548d6ad0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stdarg.3 @@ -0,0 +1,298 @@ +'\" t +.\" 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)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 +.\" +.TH stdarg 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +stdarg, va_start, va_arg, va_end, va_copy \- variable argument lists +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void va_start(va_list " ap ", " last ); +.IB type " va_arg(va_list " ap ", " type ); +.BI "void va_end(va_list " ap ); +.BI "void va_copy(va_list " dest ", va_list " src ); +.fi +.SH DESCRIPTION +A function may be called with a varying number of arguments of varying +types. +The include file +.I +declares a type +.I va_list +and defines three macros for stepping through a list of arguments whose +number and types are not known to the called function. +.PP +The called function must declare an object of type +.I va_list +which is used by the macros +.BR va_start (), +.BR va_arg (), +and +.BR va_end (). +.SS va_start() +The +.BR va_start () +macro initializes +.I ap +for subsequent use by +.BR va_arg () +and +.BR va_end (), +and must be called first. +.PP +The argument +.I last +is the name of the last argument before the variable argument list, that is, +the last argument of which the calling function knows the type. +.PP +Because the address of this argument may be used in the +.BR va_start () +macro, it should not be declared as a register variable, +or as a function or an array type. +.SS va_arg() +The +.BR va_arg () +macro expands to an expression that has the type and value of the next +argument in the call. +The argument +.I ap +is the +.I va_list +.I ap +initialized by +.BR va_start (). +Each call to +.BR va_arg () +modifies +.I ap +so that the next call returns the next argument. +The argument +.I type +is a type name specified so that the type of a pointer to an object that +has the specified type can be obtained simply by adding a * to +.IR type . +.PP +The first use of the +.BR va_arg () +macro after that of the +.BR va_start () +macro returns the argument after +.IR last . +Successive invocations return the values of the remaining arguments. +.PP +If there is no next argument, or if +.I type +is not compatible with the type of the actual next argument (as promoted +according to the default argument promotions), random errors will occur. +.PP +If +.I ap +is passed to a function that uses +.BI va_arg( ap , type ), +then the value of +.I ap +is undefined after the return of that function. +.SS va_end() +Each invocation of +.BR va_start () +must be matched by a corresponding invocation of +.BR va_end () +in the same function. +After the call +.BI va_end( ap ) +the variable +.I ap +is undefined. +Multiple traversals of the list, each +bracketed by +.BR va_start () +and +.BR va_end () +are possible. +.BR va_end () +may be a macro or a function. +.SS va_copy() +The +.BR va_copy () +macro copies the (previously initialized) variable argument list +.I src +to +.IR dest . +The behavior is as if +.BR va_start () +were applied to +.I dest +with the same +.I last +argument, followed by the same number of +.BR va_arg () +invocations that was used to reach the current state of +.IR src . +.PP +.\" Proposal from clive@demon.net, 1997-02-28 +An obvious implementation would have a +.I va_list +be a pointer to the stack frame of the variadic function. +In such a setup (by far the most common) there seems +nothing against an assignment +.PP +.in +4n +.EX +va_list aq = ap; +.EE +.in +.PP +Unfortunately, there are also systems that make it an +array of pointers (of length 1), and there one needs +.PP +.in +4n +.EX +va_list aq; +*aq = *ap; +.EE +.in +.PP +Finally, on systems where arguments are passed in registers, +it may be necessary for +.BR va_start () +to allocate memory, store the arguments there, and also +an indication of which argument is next, so that +.BR va_arg () +can step through the list. +Now +.BR va_end () +can free the allocated memory again. +To accommodate this situation, C99 adds a macro +.BR va_copy (), +so that the above assignment can be replaced by +.PP +.in +4n +.EX +va_list aq; +va_copy(aq, ap); +\&... +va_end(aq); +.EE +.in +.PP +Each invocation of +.BR va_copy () +must be matched by a corresponding invocation of +.BR va_end () +in the same function. +Some systems that do not supply +.BR va_copy () +have +.B __va_copy +instead, since that was the name used in the draft proposal. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR va_start (), +.BR va_end (), +.BR va_copy () +T} Thread safety MT-Safe +T{ +.BR va_arg () +T} Thread safety MT-Safe race:ap +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR va_start () +.TQ +.BR va_arg () +.TQ +.BR va_end () +C89, POSIX.1-2001. +.TP +.BR va_copy () +C99, POSIX.1-2001. +.SH CAVEATS +Unlike the historical +.B varargs +macros, the +.B stdarg +macros do not permit programmers to code a function with no fixed +arguments. +This problem generates work mainly when converting +.B varargs +code to +.B stdarg +code, but it also creates difficulties for variadic functions that wish to +pass all of their arguments on to a function that takes a +.I va_list +argument, such as +.BR vfprintf (3). +.SH EXAMPLES +The function +.I foo +takes a string of format characters and prints out the argument associated +with each format character based on the type. +.PP +.EX +#include +#include + +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 \[aq]s\[aq]: /* string */ + s = va_arg(ap, char *); + printf("string %s\en", s); + break; + case \[aq]d\[aq]: /* int */ + d = va_arg(ap, int); + printf("int %d\en", d); + break; + case \[aq]c\[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 SEE ALSO +.BR vprintf (3), +.BR vscanf (3), +.BR vsyslog (3) diff --git a/upstream/opensuse-leap-15-6/man3/stdin.3 b/upstream/opensuse-leap-15-6/man3/stdin.3 new file mode 100644 index 00000000..e4a2a6d3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stdin.3 @@ -0,0 +1,160 @@ +.\" From dholland@burgundy.eecs.harvard.edu Tue Mar 24 18:08:15 1998 +.\" +.\" This man page was written in 1998 by David A. Holland +.\" Polished a bit by aeb. +.\" +.\" %%%LICENSE_START(PUBLIC_DOMAIN) +.\" Placed in the Public Domain. +.\" %%%LICENSE_END +.\" +.\" 2005-06-16 mtk, mentioned freopen() +.\" 2007-12-08, mtk, Converted from mdoc to man macros +.\" +.TH stdin 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +stdin, stdout, stderr \- standard I/O streams +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "extern FILE *" stdin ; +.BI "extern FILE *" stdout ; +.BI "extern FILE *" stderr ; +.fi +.SH DESCRIPTION +Under normal circumstances every UNIX program has three streams opened +for it when it starts up, one for input, one for output, and one for +printing diagnostic or error messages. +These are typically attached to +the user's terminal (see +.BR tty (4)) +but might instead refer to files or other devices, depending on what +the parent process chose to set up. +(See also the "Redirection" section of +.BR sh (1).) +.PP +The input stream is referred to as "standard input"; the output stream is +referred to as "standard output"; and the error stream is referred to +as "standard error". +These terms are abbreviated to form the symbols +used to refer to these files, namely +.IR stdin , +.IR stdout , +and +.IR stderr . +.PP +Each of these symbols is a +.BR stdio (3) +macro of type pointer to +.IR FILE , +and can be used with functions like +.BR fprintf (3) +or +.BR fread (3). +.PP +Since +.IR FILE s +are a buffering wrapper around UNIX file descriptors, the +same underlying files may also be accessed using the raw UNIX file +interface, that is, the functions like +.BR read (2) +and +.BR lseek (2). +.PP +On program startup, the integer file descriptors +associated with the streams +.IR stdin , +.IR stdout , +and +.I stderr +are 0, 1, and 2, respectively. +The preprocessor symbols +.BR STDIN_FILENO , +.BR STDOUT_FILENO , +and +.B STDERR_FILENO +are defined with these values in +.IR . +(Applying +.BR freopen (3) +to one of these streams can change the file descriptor number +associated with the stream.) +.PP +Note that mixing use of +.IR FILE s +and raw file descriptors can produce +unexpected results and should generally be avoided. +(For the masochistic among you: POSIX.1, section 8.2.3, describes +in detail how this interaction is supposed to work.) +A general rule is that file descriptors are handled in the kernel, +while stdio is just a library. +This means for example, that after an +.BR exec (3), +the child inherits all open file descriptors, but all old streams +have become inaccessible. +.PP +Since the symbols +.IR stdin , +.IR stdout , +and +.I stderr +are specified to be macros, assigning to them is nonportable. +The standard streams can be made to refer to different files +with help of the library function +.BR freopen (3), +specially introduced to make it possible to reassign +.IR stdin , +.IR stdout , +and +.IR stderr . +The standard streams are closed by a call to +.BR exit (3) +and by normal program termination. +.SH STANDARDS +C11, POSIX.1-2008. +.PP +The standards also stipulate that these three +streams shall be open at program startup. +.SH HISTORY +C89, POSIX.1-2001. +.SH NOTES +The stream +.I stderr +is unbuffered. +The stream +.I stdout +is line-buffered when it points to a terminal. +Partial lines will not +appear until +.BR fflush (3) +or +.BR exit (3) +is called, or a newline is printed. +This can produce unexpected +results, especially with debugging output. +The buffering mode of the standard streams (or any other stream) +can be changed using the +.BR setbuf (3) +or +.BR setvbuf (3) +call. +Note that in case +.I stdin +is associated with a terminal, there may also be input buffering +in the terminal driver, entirely unrelated to stdio buffering. +(Indeed, normally terminal input is line buffered in the kernel.) +This kernel input handling can be modified using calls like +.BR tcsetattr (3); +see also +.BR stty (1), +and +.BR termios (3). +.SH SEE ALSO +.BR csh (1), +.BR sh (1), +.BR open (2), +.BR fopen (3), +.BR stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/stdio.3 b/upstream/opensuse-leap-15-6/man3/stdio.3 new file mode 100644 index 00000000..4029bb80 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stdio.3 @@ -0,0 +1,345 @@ +'\" t +.\" Copyright (c) 1990, 1991 Regents of the University of California. +.\" All rights reserved. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)stdio.3 6.5 (Berkeley) 5/6/91 +.\" +.\" Converted for Linux, Mon Nov 29 16:07:22 1993, faith@cs.unc.edu +.\" Modified, 2001-12-26, aeb +.\" +.TH stdio 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +stdio \- standard input/output library functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "FILE *" stdin ; +.BI "FILE *" stdout ; +.BI "FILE *" stderr ; +.fi +.SH DESCRIPTION +The standard I/O library provides a simple and efficient buffered stream +I/O interface. +Input and output is mapped into logical data streams and the +physical I/O characteristics are concealed. +The functions and macros are +listed below; more information is available from the individual man pages. +.PP +A stream is associated with an external file (which may be a physical +device) by +.I opening +a file, which may involve creating a new file. +Creating an existing file +causes its former contents to be discarded. +If a file can support positioning requests (such as a disk file, +as opposed to a terminal), then a +.I file position indicator +associated with the stream is positioned at the start of the file (byte +zero), unless the file is opened with append mode. +If append mode is used, +it is unspecified whether the position indicator will be placed at the +start or the end of the file. +The position indicator is maintained by +subsequent reads, writes, and positioning requests. +All input occurs as if the characters were read by successive calls to the +.BR fgetc (3) +function; all output takes place as if all characters were written by +successive calls to the +.BR fputc (3) +function. +.PP +A file is disassociated from a stream by +.I closing +the file. +Output streams are flushed (any unwritten buffer contents are +transferred to the host environment) before the stream is disassociated from +the file. +The value of a pointer to a +.I FILE +object is indeterminate after a file is closed (garbage). +.PP +A file may be subsequently reopened, by the same or another program +execution, and its contents reclaimed or modified (if it can be +repositioned at the start). +If the main function returns to its original +caller, or the +.BR exit (3) +function is called, all open files are closed (hence all output streams are +flushed) before program termination. +Other methods of program termination, +such as +.BR abort (3) +do not bother about closing files properly. +.PP +At program startup, three text streams are predefined and need not be +opened explicitly: +.I standard input +(for reading conventional input), +.I standard output +(for writing conventional output), and +.I standard error +(for writing diagnostic output). +These streams are abbreviated +.IR stdin , +.IR stdout , +and +.IR stderr . +When opened, the standard error stream is not fully buffered; the standard +input and output streams are fully buffered if and only if the streams do +not refer to an interactive device. +.PP +Output streams that refer to terminal devices are always line buffered by +default; pending output to such streams is written automatically whenever +an input stream that refers to a terminal device is read. +In cases where a +large amount of computation is done after printing part of a line on an +output terminal, it is necessary to +.BR fflush (3) +the standard output before going off and computing so that the output will +appear. +.PP +The +.I stdio +library is a part of the library +.B libc +and routines are automatically loaded as needed by +.BR cc (1). +The +SYNOPSIS +sections of the following manual pages indicate which include files are to +be used, what the compiler declaration for the function looks like and +which external variables are of interest. +.PP +The following are defined as macros; these names may not be reused without +first removing their current definitions with +.BR #undef : +.BR BUFSIZ , +.BR EOF , +.BR FILENAME_MAX , +.BR FOPEN_MAX , +.BR L_cuserid , +.BR L_ctermid , +.BR L_tmpnam , +.BR NULL , +.BR SEEK_END , +.BR SEEK_SET , +.BR SEEK_CUR , +.BR TMP_MAX , +.BR clearerr , +.BR feof , +.BR ferror , +.BR fileno , +.\" Not on Linux: .BR fropen , +.\" Not on Linux: .BR fwopen , +.BR getc , +.BR getchar , +.BR putc , +.BR putchar , +.BR stderr , +.BR stdin , +.BR stdout . +Function versions of the macro functions +.BR feof , +.BR ferror , +.BR clearerr , +.BR fileno , +.BR getc , +.BR getchar , +.BR putc , +and +.B putchar +exist and will be used if the macros definitions are explicitly removed. +.SS List of functions +.nh +.ad l +.TS +; +lb lbx +l l. +Function Description +_ +\fBclearerr\fP(3) T{ +check and reset stream status +T} +\fBfclose\fP(3) T{ +close a stream +T} +\fBfdopen\fP(3) T{ +stream open functions +T} +\fBfeof\fP(3) T{ +check and reset stream status +T} +\fBferror\fP(3) T{ +check and reset stream status +T} +\fBfflush\fP(3) T{ +flush a stream +T} +\fBfgetc\fP(3) T{ +get next character or word from input stream +T} +\fBfgetpos\fP(3) T{ +reposition a stream +T} +\fBfgets\fP(3) T{ +get a line from a stream +T} +\fBfileno\fP(3) T{ +return the integer descriptor of the argument stream +T} +\fBfopen\fP(3) T{ +stream open functions +T} +\fBfprintf\fP(3) T{ +formatted output conversion +T} +\fBfpurge\fP(3) T{ +flush a stream +T} +\fBfputc\fP(3) T{ +output a character or word to a stream +T} +\fBfputs\fP(3) T{ +output a line to a stream +T} +\fBfread\fP(3) T{ +binary stream input/output +T} +\fBfreopen\fP(3) T{ +stream open functions +T} +\fBfscanf\fP(3) T{ +input format conversion +T} +\fBfseek\fP(3) T{ +reposition a stream +T} +\fBfsetpos\fP(3) T{ +reposition a stream +T} +\fBftell\fP(3) T{ +reposition a stream +T} +\fBfwrite\fP(3) T{ +binary stream input/output +T} +\fBgetc\fP(3) T{ +get next character or word from input stream +T} +\fBgetchar\fP(3) T{ +get next character or word from input stream +T} +\fBgets\fP(3) T{ +get a line from a stream +T} +\fBgetw\fP(3) T{ +get next character or word from input stream +T} +\fBmktemp\fP(3) T{ +make temporary filename (unique) +T} +\fBperror\fP(3) T{ +system error messages +T} +\fBprintf\fP(3) T{ +formatted output conversion +T} +\fBputc\fP(3) T{ +output a character or word to a stream +T} +\fBputchar\fP(3) T{ +output a character or word to a stream +T} +\fBputs\fP(3) T{ +output a line to a stream +T} +\fBputw\fP(3) T{ +output a character or word to a stream +T} +\fBremove\fP(3) T{ +remove directory entry +T} +\fBrewind\fP(3) T{ +reposition a stream +T} +\fBscanf\fP(3) T{ +input format conversion +T} +\fBsetbuf\fP(3) T{ +stream buffering operations +T} +\fBsetbuffer\fP(3) T{ +stream buffering operations +T} +\fBsetlinebuf\fP(3) T{ +stream buffering operations +T} +\fBsetvbuf\fP(3) T{ +stream buffering operations +T} +\fBsprintf\fP(3) T{ +formatted output conversion +T} +\fBsscanf\fP(3) T{ +input format conversion +T} +\fBstrerror\fP(3) T{ +system error messages +T} +\fBsys_errlist\fP(3) T{ +system error messages +T} +\fBsys_nerr\fP(3) T{ +system error messages +T} +\fBtempnam\fP(3) T{ +temporary file routines +T} +\fBtmpfile\fP(3) T{ +temporary file routines +T} +\fBtmpnam\fP(3) T{ +temporary file routines +T} +\fBungetc\fP(3) T{ +un-get character from input stream +T} +\fBvfprintf\fP(3) T{ +formatted output conversion +T} +\fBvfscanf\fP(3) T{ +input format conversion +T} +\fBvprintf\fP(3) T{ +formatted output conversion +T} +\fBvscanf\fP(3) T{ +input format conversion +T} +\fBvsprintf\fP(3) T{ +formatted output conversion +T} +\fBvsscanf\fP(3) T{ +input format conversion +T} +.TE +.ad +.hy +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C89, POSIX.1-2001. +.SH SEE ALSO +.BR close (2), +.BR open (2), +.BR read (2), +.BR write (2), +.BR stdout (3), +.BR unlocked_stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/stdio_ext.3 b/upstream/opensuse-leap-15-6/man3/stdio_ext.3 new file mode 100644 index 00000000..bb7d87a1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stdio_ext.3 @@ -0,0 +1,138 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH stdio_ext 3 2023-01-07 "Linux man-pages 6.04" +.SH NAME +__fbufsize, __flbf, __fpending, __fpurge, __freadable, +__freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \- +interfaces to stdio FILE structure +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "size_t __fbufsize(FILE *" stream ); +.BI "size_t __fpending(FILE *" stream ); +.BI "int __flbf(FILE *" stream ); +.BI "int __freadable(FILE *" stream ); +.BI "int __fwritable(FILE *" stream ); +.BI "int __freading(FILE *" stream ); +.BI "int __fwriting(FILE *" stream ); +.BI "int __fsetlocking(FILE *" stream ", int " type ); +.B "void _flushlbf(void);" +.BI "void __fpurge(FILE *" stream ); +.fi +.SH DESCRIPTION +Solaris introduced routines to allow portable access to the +internals of the +.I FILE +structure, and glibc also implemented these. +.PP +The +.BR __fbufsize () +function returns the size of the buffer currently used +by the given stream. +.PP +The +.BR __fpending () +function returns the number of bytes in the output buffer. +For wide-oriented streams the unit is wide characters. +This function is undefined on buffers in reading mode, +or opened read-only. +.PP +The +.BR __flbf () +function returns a nonzero value if the stream is line-buffered, +and zero otherwise. +.PP +The +.BR __freadable () +function returns a nonzero value if the stream allows reading, +and zero otherwise. +.PP +The +.BR __fwritable () +function returns a nonzero value if the stream allows writing, +and zero otherwise. +.PP +The +.BR __freading () +function returns a nonzero value if the stream is read-only, or +if the last operation on the stream was a read operation, +and zero otherwise. +.PP +The +.BR __fwriting () +function returns a nonzero value if the stream is write-only (or +append-only), or if the last operation on the stream was a write +operation, and zero otherwise. +.PP +The +.BR __fsetlocking () +function can be used to select the desired type of locking on the stream. +It returns the current type. +The +.I type +argument can take the following three values: +.TP +.B FSETLOCKING_INTERNAL +Perform implicit locking around every operation on the given stream +(except for the *_unlocked ones). +This is the default. +.TP +.B FSETLOCKING_BYCALLER +The caller will take care of the locking (possibly using +.BR flockfile (3) +in case there is more than one thread), and the stdio routines +will not do locking until the state is reset to +.BR FSETLOCKING_INTERNAL . +.TP +.B FSETLOCKING_QUERY +Don't change the type of locking. +(Only return it.) +.PP +The +.BR _flushlbf () +function flushes all line-buffered streams. +(Presumably so that +output to a terminal is forced out, say before reading keyboard input.) +.PP +The +.BR __fpurge () +function discards the contents of the stream's buffer. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR __fbufsize (), +.BR __fpending (), +.BR __fpurge (), +.BR __fsetlocking () +T} Thread safety MT-Safe race:stream +T{ +.BR __flbf (), +.BR __freadable (), +.BR __freading (), +.BR __fwritable (), +.BR __fwriting (), +.BR _flushlbf () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH SEE ALSO +.BR flockfile (3), +.BR fpurge (3) diff --git a/upstream/opensuse-leap-15-6/man3/stpncpy.3 b/upstream/opensuse-leap-15-6/man3/stpncpy.3 new file mode 100644 index 00000000..93456d2c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/stpncpy.3 @@ -0,0 +1,165 @@ +'\" t +.\" Copyright 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH stpncpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +stpncpy, strncpy +\- zero a fixed-width buffer and +copy a string into a character sequence with truncation +and zero the rest of it +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strncpy(char " dst "[restrict ." sz "], \ +const char *restrict " src , +.BI " size_t " sz ); +.BI "char *stpncpy(char " dst "[restrict ." sz "], \ +const char *restrict " src , +.BI " size_t " sz ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR stpncpy (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +These functions copy the string pointed to by +.I src +into a null-padded character sequence at the fixed-width buffer pointed to by +.IR dst . +If the destination buffer, +limited by its size, +isn't large enough to hold the copy, +the resulting character sequence is truncated. +For the difference between the two functions, see RETURN VALUE. +.PP +An implementation of these functions might be: +.PP +.in +4n +.EX +char * +strncpy(char *restrict dst, const char *restrict src, size_t sz) +{ + stpncpy(dst, src, sz); + return dst; +} + +char * +stpncpy(char *restrict dst, const char *restrict src, size_t sz) +{ + bzero(dst, sz); + return mempcpy(dst, src, strnlen(src, sz)); +} +.EE +.in +.SH RETURN VALUE +.TP +.BR strncpy () +returns +.IR dst . +.TP +.BR stpncpy () +returns a pointer to +one after the last character in the destination character sequence. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR stpncpy (), +.BR strncpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strncpy () +C11, POSIX.1-2008. +.TP +.BR stpncpy () +POSIX.1-2008. +.SH STANDARDS +.TP +.BR strncpy () +C89, POSIX.1-2001, SVr4, 4.3BSD. +.TP +.BR stpncpy () +glibc 1.07. +POSIX.1-2008. +.SH CAVEATS +The name of these functions is confusing. +These functions produce a null-padded character sequence, +not a string (see +.BR string_copying (7)). +.PP +It's impossible to distinguish truncation by the result of the call, +from a character sequence that just fits the destination buffer; +truncation should be detected by +comparing the length of the input string +with the size of the destination buffer. +.PP +If you're going to use this function in chained calls, +it would be useful to develop a similar function that accepts +a pointer to the end (one after the last element) of the destination buffer +instead of its size. +.SH EXAMPLES +.\" SRC BEGIN (stpncpy.c) +.EX +#include +#include +#include +#include + +int +main(void) +{ + char *p; + char buf1[20]; + char buf2[20]; + size_t len; + + if (sizeof(buf2) < strlen("Hello world!")) + warnx("strncpy: truncating character sequence"); + strncpy(buf2, "Hello world!", sizeof(buf2)); + len = strnlen(buf2, sizeof(buf2)); + + printf("[len = %zu]: ", len); + printf("%.*s\en", (int) len, buf2); // "Hello world!" + + if (sizeof(buf1) < strlen("Hello world!")) + warnx("stpncpy: truncating character sequence"); + p = stpncpy(buf1, "Hello world!", sizeof(buf1)); + len = p \- buf1; + + printf("[len = %zu]: ", len); + printf("%.*s\en", (int) len, buf1); // "Hello world!" + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR wcpncpy (3), +.BR string_copying (7) diff --git a/upstream/opensuse-leap-15-6/man3/strcasecmp.3 b/upstream/opensuse-leap-15-6/man3/strcasecmp.3 new file mode 100644 index 00000000..ee274397 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strcasecmp.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:12:45 1993 by Rik Faith (faith@cs.unc.edu) +.TH strcasecmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strcasecmp, strncasecmp \- compare two strings ignoring case +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int strcasecmp(const char *" s1 ", const char *" s2 ); +.BI "int strncasecmp(const char " s1 [. n "], const char " s2 [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The +.BR strcasecmp () +function performs a byte-by-byte comparison of the strings +.I s1 +and +.IR s2 , +ignoring the case of the characters. +It returns an integer +less than, equal to, or greater than zero if +.I s1 +is found, +respectively, to be less than, to match, or be greater than +.IR s2 . +.PP +The +.BR strncasecmp () +function is similar, except that it compares +no more than +.I n +bytes of +.I s1 +and +.IR s2 . +.SH RETURN VALUE +The +.BR strcasecmp () +and +.BR strncasecmp () +functions return +an integer less than, equal to, or greater than zero if +.I s1 +is, after ignoring case, found to be +less than, to match, or be greater than +.IR s2 , +respectively. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strcasecmp (), +.BR strncasecmp () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +4.4BSD, POSIX.1-2001. +.PP +The +.BR strcasecmp () +and +.BR strncasecmp () +functions first appeared in 4.4BSD, where they were declared in +.IR . +Thus, for reasons of historical compatibility, the glibc +.I +header file also declares these functions, if the +.B _DEFAULT_SOURCE +(or, in glibc 2.19 and earlier, +.BR _BSD_SOURCE ) +feature test macro is defined. +.PP +The POSIX.1-2008 standard says of these functions: +.PP +.RS +When the +.B LC_CTYPE +category of the locale being used is from the POSIX locale, +these functions shall behave as if the strings had been converted +to lowercase and then a byte comparison performed. +Otherwise, the results are unspecified. +.RE +.SH SEE ALSO +.BR memcmp (3), +.BR strcmp (3), +.BR strcoll (3), +.BR string (3), +.BR strncmp (3), +.BR wcscasecmp (3), +.BR wcsncasecmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/strchr.3 b/upstream/opensuse-leap-15-6/man3/strchr.3 new file mode 100644 index 00000000..28fae4ef --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strchr.3 @@ -0,0 +1,132 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Mon Apr 12 12:51:24 1993, David Metcalfe +.\" 2006-05-19, Justin Pryzby +.\" Document strchrnul(3). +.\" +.TH strchr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strchr, strrchr, strchrnul \- locate character in string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strchr(const char *" s ", int " c ); +.BI "char *strrchr(const char *" s ", int " c ); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "char *strchrnul(const char *" s ", int " c ); +.fi +.SH DESCRIPTION +The +.BR strchr () +function returns a pointer to the first occurrence +of the character +.I c +in the string +.IR s . +.PP +The +.BR strrchr () +function returns a pointer to the last occurrence +of the character +.I c +in the string +.IR s . +.PP +The +.BR strchrnul () +function is like +.BR strchr () +except that if +.I c +is not found in +.IR s , +then it returns a pointer to the null byte +at the end of +.IR s , +rather than NULL. +.PP +Here "character" means "byte"; these functions do not work with +wide or multibyte characters. +.SH RETURN VALUE +The +.BR strchr () +and +.BR strrchr () +functions return a pointer to +the matched character or NULL if the character is not found. +The terminating null byte is considered part of the string, +so that if +.I c +is specified as \[aq]\e0\[aq], +these functions return a pointer to the terminator. +.PP +The +.BR strchrnul () +function returns a pointer to the matched character, +or a pointer to the null byte at the end of +.I s +(i.e., +.IR "s+strlen(s)" ) +if the character is not found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strchr (), +.BR strrchr (), +.BR strchrnul () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strchr () +.TQ +.BR strrchr () +C11, POSIX.1-2008. +.TP +.BR strchrnul () +GNU. +.SH HISTORY +.TP +.BR strchr () +.TQ +.BR strrchr () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.TP +.BR strchrnul () +glibc 2.1.1. +.SH SEE ALSO +.BR memchr (3), +.BR string (3), +.BR strlen (3), +.BR strpbrk (3), +.BR strsep (3), +.BR strspn (3), +.BR strstr (3), +.BR strtok (3), +.BR wcschr (3), +.BR wcsrchr (3) diff --git a/upstream/opensuse-leap-15-6/man3/strcmp.3 b/upstream/opensuse-leap-15-6/man3/strcmp.3 new file mode 100644 index 00000000..f6291fbb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strcmp.3 @@ -0,0 +1,211 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2020 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:08:52 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2001-08-31, aeb +.\" +.TH strcmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strcmp, strncmp \- compare two strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int strcmp(const char *" s1 ", const char *" s2 ); +.BI "int strncmp(const char " s1 [. n "], const char " s2 [. n "], size_t " n ); +.fi +.SH DESCRIPTION +The +.BR strcmp () +function compares the two strings +.I s1 +and +.IR s2 . +The locale is not taken into account (for a locale-aware comparison, see +.BR strcoll (3)). +The comparison is done using unsigned characters. +.PP +.BR strcmp () +returns an integer indicating the result of the comparison, as follows: +.IP \[bu] 3 +0, if the +.I s1 +and +.I s2 +are equal; +.IP \[bu] +a negative value if +.I s1 +is less than +.IR s2 ; +.IP \[bu] +a positive value if +.I s1 +is greater than +.IR s2 . +.PP +The +.BR strncmp () +function is similar, except it compares +only the first (at most) +.I n +bytes of +.I s1 +and +.IR s2 . +.SH RETURN VALUE +The +.BR strcmp () +and +.BR strncmp () +functions return an integer +less than, equal to, or greater than zero if +.I s1 +(or the first +.I n +bytes thereof) is found, respectively, to be less than, to +match, or be greater than +.IR s2 . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strcmp (), +.BR strncmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +POSIX.1 specifies only that: +.RS +.PP +The sign of a nonzero return value shall be determined by the sign +of the difference between the values of the first pair of bytes +(both interpreted as type +.IR "unsigned char" ) +that differ in the strings being compared. +.RE +.PP +In glibc, as in most other implementations, +the return value is the arithmetic result of subtracting +the last compared byte in +.I s2 +from the last compared byte in +.IR s1 . +(If the two characters are equal, this difference is 0.) +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH EXAMPLES +The program below can be used to demonstrate the operation of +.BR strcmp () +(when given two arguments) and +.BR strncmp () +(when given three arguments). +First, some examples using +.BR strcmp (): +.PP +.in +4n +.EX +$ \fB./string_comp ABC ABC\fP + and are equal +$ \fB./string_comp ABC AB\fP # \[aq]C\[aq] is ASCII 67; \[aq]C\[aq] \- \[aq]\e0\[aq] = 67 + is greater than (67) +$ \fB./string_comp ABA ABZ\fP # \[aq]A\[aq] is ASCII 65; \[aq]Z\[aq] is ASCII 90 + is less than (\-25) +$ \fB./string_comp ABJ ABC\fP + is greater than (7) +$ .\fB/string_comp $\[aq]\e201\[aq] A\fP # 0201 \- 0101 = 0100 (or 64 decimal) + is greater than (64) +.EE +.in +.PP +The last example uses +.BR bash (1)-specific +syntax to produce a string containing an 8-bit ASCII code; +the result demonstrates that the string comparison uses unsigned +characters. +.PP +And then some examples using +.BR strncmp (): +.PP +.in +4n +.EX +$ \fB./string_comp ABC AB 3\fP + is greater than (67) +$ \fB./string_comp ABC AB 2\fP + and are equal in the first 2 bytes +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (string_comp.c) +.EX +/* string_comp.c + + Licensed under GNU General Public License v2 or later. +*/ +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int res; + + if (argc < 3) { + fprintf(stderr, "Usage: %s []\en", argv[0]); + exit(EXIT_FAILURE); + } + + if (argc == 3) + res = strcmp(argv[1], argv[2]); + else + res = strncmp(argv[1], argv[2], atoi(argv[3])); + + if (res == 0) { + printf(" and are equal"); + if (argc > 3) + printf(" in the first %d bytes\en", atoi(argv[3])); + printf("\en"); + } else if (res < 0) { + printf(" is less than (%d)\en", res); + } else { + printf(" is greater than (%d)\en", res); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR memcmp (3), +.BR strcasecmp (3), +.BR strcoll (3), +.BR string (3), +.BR strncasecmp (3), +.BR strverscmp (3), +.BR wcscmp (3), +.BR wcsncmp (3), +.BR ascii (7) diff --git a/upstream/opensuse-leap-15-6/man3/strcoll.3 b/upstream/opensuse-leap-15-6/man3/strcoll.3 new file mode 100644 index 00000000..d1bf95dc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strcoll.3 @@ -0,0 +1,89 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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:44 1993 by Rik Faith (faith@cs.unc.edu) +.TH strcoll 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strcoll \- compare two strings using the current locale +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int strcoll(const char *" s1 ", const char *" s2 ); +.fi +.SH DESCRIPTION +The +.BR strcoll () +function compares the two strings +.I s1 +and +.IR s2 . +It returns an integer less than, equal to, or greater +than zero if +.I s1 +is found, respectively, to be less than, +to match, or be greater than +.IR s2 . +The comparison is based on +strings interpreted as appropriate for the program's current locale +for category +.BR LC_COLLATE . +(See +.BR setlocale (3).) +.SH RETURN VALUE +The +.BR strcoll () +function returns an integer less than, equal to, +or greater than zero if +.I s1 +is found, respectively, to be less +than, to match, or be greater than +.IR s2 , +when both are interpreted +as appropriate for the current locale. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strcoll () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH NOTES +In the +.I "POSIX" +or +.I "C" +locales +.BR strcoll () +is equivalent to +.BR strcmp (3). +.SH SEE ALSO +.BR memcmp (3), +.BR setlocale (3), +.BR strcasecmp (3), +.BR strcmp (3), +.BR string (3), +.BR strxfrm (3) diff --git a/upstream/opensuse-leap-15-6/man3/strcpy.3 b/upstream/opensuse-leap-15-6/man3/strcpy.3 new file mode 100644 index 00000000..7bfed185 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strcpy.3 @@ -0,0 +1,207 @@ +'\" t +.\" Copyright 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH strcpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +stpcpy, strcpy, strcat \- copy or catenate a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *stpcpy(char *restrict " dst ", const char *restrict " src ); +.BI "char *strcpy(char *restrict " dst ", const char *restrict " src ); +.BI "char *strcat(char *restrict " dst ", const char *restrict " src ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR stpcpy (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +.TP +.BR stpcpy () +.TQ +.BR strcpy () +These functions copy the string pointed to by +.IR src , +into a string +at the buffer pointed to by +.IR dst . +The programmer is responsible for allocating a destination buffer large enough, +that is, +.IR "strlen(src) + 1" . +For the difference between the two functions, see RETURN VALUE. +.TP +.BR strcat () +This function catenates the string pointed to by +.IR src , +after the string pointed to by +.I dst +(overwriting its terminating null byte). +The programmer is responsible for allocating a destination buffer large enough, +that is, +.IR "strlen(dst) + strlen(src) + 1" . +.PP +An implementation of these functions might be: +.PP +.in +4n +.EX +char * +stpcpy(char *restrict dst, const char *restrict src) +{ + char *p; + + p = mempcpy(dst, src, strlen(src)); + *p = \[aq]\e0\[aq]; + + return p; +} + +char * +strcpy(char *restrict dst, const char *restrict src) +{ + stpcpy(dst, src); + return dst; +} + +char * +strcat(char *restrict dst, const char *restrict src) +{ + stpcpy(dst + strlen(dst), src); + return dst; +} +.EE +.in +.SH RETURN VALUE +.TP +.BR stpcpy () +This function returns +a pointer to the terminating null byte of the copied string. +.TP +.BR strcpy () +.TQ +.BR strcat () +These functions return +.IR dst . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR stpcpy (), +.BR strcpy (), +.BR strcat () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR stpcpy () +POSIX.1-2008. +.TP +.BR strcpy () +.TQ +.BR strcat () +C11, POSIX.1-2008. +.SH STANDARDS +.TP +.BR stpcpy () +POSIX.1-2008. +.TP +.BR strcpy () +.TQ +.BR strcat () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH CAVEATS +The strings +.I src +and +.I dst +may not overlap. +.PP +If the destination buffer is not large enough, +the behavior is undefined. +See +.B _FORTIFY_SOURCE +in +.BR feature_test_macros (7). +.PP +.BR strcat () +can be very inefficient. +Read about +.UR https://www.joelonsoftware.com/\:2001/12/11/\:back\-to\-basics/ +Shlemiel the painter +.UE . +.SH EXAMPLES +.\" SRC BEGIN (strcpy.c) +.EX +#include +#include +#include +#include + +int +main(void) +{ + char *p; + char *buf1; + char *buf2; + size_t len, maxsize; + + maxsize = strlen("Hello ") + strlen("world") + strlen("!") + 1; + buf1 = malloc(sizeof(*buf1) * maxsize); + if (buf1 == NULL) + err(EXIT_FAILURE, "malloc()"); + buf2 = malloc(sizeof(*buf2) * maxsize); + if (buf2 == NULL) + err(EXIT_FAILURE, "malloc()"); + + p = buf1; + p = stpcpy(p, "Hello "); + p = stpcpy(p, "world"); + p = stpcpy(p, "!"); + len = p \- buf1; + + printf("[len = %zu]: ", len); + puts(buf1); // "Hello world!" + free(buf1); + + strcpy(buf2, "Hello "); + strcat(buf2, "world"); + strcat(buf2, "!"); + len = strlen(buf2); + + printf("[len = %zu]: ", len); + puts(buf2); // "Hello world!" + free(buf2); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR strdup (3), +.BR string (3), +.BR wcscpy (3), +.BR string_copying (7) diff --git a/upstream/opensuse-leap-15-6/man3/strdup.3 b/upstream/opensuse-leap-15-6/man3/strdup.3 new file mode 100644 index 00000000..c45c02b7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strdup.3 @@ -0,0 +1,148 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Wed Oct 17 01:12:26 2001 by John Levon +.TH strdup 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strdup, strndup, strdupa, strndupa \- duplicate a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strdup(const char *" s ); +.PP +.BI "char *strndup(const char " s [. n "], size_t " n ); +.BI "char *strdupa(const char *" s ); +.BI "char *strndupa(const char " s [. n "], size_t " n ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strdup (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.PP +.BR strndup (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.PP +.BR strdupa (), +.BR strndupa (): +.nf + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR strdup () +function returns a pointer to a new string which +is a duplicate of the string +.IR s . +Memory for the new string is +obtained with +.BR malloc (3), +and can be freed with +.BR free (3). +.PP +The +.BR strndup () +function is similar, but copies at most +.I n +bytes. +If +.I s +is longer than +.IR n , +only +.I n +bytes are copied, and a terminating null byte (\[aq]\e0\[aq]) is added. +.PP +.BR strdupa () +and +.BR strndupa () +are similar, but use +.BR alloca (3) +to allocate the buffer. +.SH RETURN VALUE +On success, the +.BR strdup () +function returns a pointer to the duplicated +string. +It returns NULL if insufficient memory was available, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory available to allocate duplicate string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strdup (), +.BR strndup (), +.BR strdupa (), +.BR strndupa () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strdup () +.TQ +.BR strndup () +POSIX.1-2008. +.TP +.BR strdupa () +.TQ +.BR strndupa () +GNU. +.SH HISTORY +.TP +.BR strdup () +SVr4, 4.3BSD-Reno, POSIX.1-2001. +.TP +.BR strndup () +POSIX.1-2008. +.TP +.BR strdupa () +.TQ +.BR strndupa () +GNU. +.SH SEE ALSO +.BR alloca (3), +.BR calloc (3), +.BR free (3), +.BR malloc (3), +.BR realloc (3), +.BR string (3), +.BR wcsdup (3) diff --git a/upstream/opensuse-leap-15-6/man3/strerror.3 b/upstream/opensuse-leap-15-6/man3/strerror.3 new file mode 100644 index 00000000..bd5caa41 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strerror.3 @@ -0,0 +1,318 @@ +'\" t +.\" Copyright (C) 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2005, 2014, 2020 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:05:30 1993 by Rik Faith +.\" Modified Fri Feb 16 14:25:17 1996 by Andries Brouwer +.\" Modified Sun Jul 21 20:55:44 1996 by Andries Brouwer +.\" Modified Mon Oct 15 21:16:25 2001 by John Levon +.\" Modified Tue Oct 16 00:04:43 2001 by Andries Brouwer +.\" Modified Fri Jun 20 03:04:30 2003 by Andries Brouwer +.\" 2005-12-13, mtk, Substantial rewrite of strerror_r() description +.\" Addition of extra material on portability and standards. +.\" +.TH strerror 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strerror, strerrorname_np, strerrordesc_np, strerror_r, strerror_l \- +return string describing error number +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strerror(int " errnum ); +.BI "const char *strerrorname_np(int " errnum ); +.BI "const char *strerrordesc_np(int " errnum ); +.PP +.BI "int strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen ); + /* XSI-compliant */ +.PP +.BI "char *strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen ); + /* GNU-specific */ +.PP +.BI "char *strerror_l(int " errnum ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strerrorname_np (), +.BR strerrordesc_np (): +.nf + _GNU_SOURCE +.fi +.PP +.BR strerror_r (): +.nf + The XSI-compliant version is provided if: + (_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE + Otherwise, the GNU-specific version is provided. +.fi +.SH DESCRIPTION +The +.BR strerror () +function returns a pointer to a string that describes the error +code passed in the argument +.IR errnum , +possibly using the +.B LC_MESSAGES +part of the current locale to select the appropriate language. +(For example, if +.I errnum +is +.BR EINVAL , +the returned description will be "Invalid argument".) +This string must not be modified by the application, but may be +modified by a subsequent call to +.BR strerror () +or +.BR strerror_l (). +No other library function, including +.BR perror (3), +will modify this string. +.PP +Like +.BR strerror (), +the +.BR strerrordesc_np () +function returns a pointer to a string that describes the error +code passed in the argument +.IR errnum , +with the difference that the returned string is not translated +according to the current locale. +.PP +The +.BR strerrorname_np () +function returns a pointer to a string containing the name of the error +code passed in the argument +.IR errnum . +For example, given +.B EPERM +as an argument, this function returns a pointer to the string "EPERM". +.\" +.SS strerror_r() +The +.BR strerror_r () +function is similar to +.BR strerror (), +but is +thread safe. +This function is available in two versions: +an XSI-compliant version specified in POSIX.1-2001 +(available since glibc 2.3.4, but not POSIX-compliant until glibc 2.13), +and a GNU-specific version (available since glibc 2.0). +The XSI-compliant version is provided with the feature test macros +settings shown in the SYNOPSIS; +otherwise the GNU-specific version is provided. +If no feature test macros are explicitly defined, +then (since glibc 2.4) +.B _POSIX_C_SOURCE +is defined by default with the value +200112L, so that the XSI-compliant version of +.BR strerror_r () +is provided by default. +.PP +The XSI-compliant +.BR strerror_r () +is preferred for portable applications. +It returns the error string in the user-supplied buffer +.I buf +of length +.IR buflen . +.PP +The GNU-specific +.BR strerror_r () +returns a pointer to a string containing the error message. +This may be either a pointer to a string that the function stores in +.IR buf , +or a pointer to some (immutable) static string +(in which case +.I buf +is unused). +If the function stores a string in +.IR buf , +then at most +.I buflen +bytes are stored (the string may be truncated if +.I buflen +is too small and +.I errnum +is unknown). +The string always includes a terminating null byte (\[aq]\e0\[aq]). +.\" +.SS strerror_l() +.BR strerror_l () +is like +.BR strerror (), +but maps +.I errnum +to a locale-dependent error message in the locale specified by +.IR locale . +The behavior of +.BR strerror_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +or is not a valid locale object handle. +.SH RETURN VALUE +The +.BR strerror (), +.BR strerror_l (), +and the GNU-specific +.BR strerror_r () +functions return +the appropriate error description string, +or an "Unknown error nnn" message if the error number is unknown. +.PP +On success, +.BR strerrorname_np () +and +.BR strerrordesc_np () +return the appropriate error description string. +If +.I errnum +is an invalid error number, these functions return NULL. +.PP +The XSI-compliant +.BR strerror_r () +function returns 0 on success. +On error, +a (positive) error number is returned (since glibc 2.13), +or \-1 is returned and +.I errno +is set to indicate the error (before glibc 2.13). +.PP +POSIX.1-2001 and POSIX.1-2008 require that a successful call to +.BR strerror () +or +.BR strerror_l () +shall leave +.I errno +unchanged, and note that, +since no function return value is reserved to indicate an error, +an application that wishes to check for errors should initialize +.I errno +to zero before the call, +and then check +.I errno +after the call. +.SH ERRORS +.TP +.B EINVAL +The value of +.I errnum +is not a valid error number. +.TP +.B ERANGE +Insufficient storage was supplied to contain the error description string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR strerror () +T} Thread safety T{ +MT-Unsafe race:strerror +T} +T{ +.BR strerrorname_np (), +.BR strerrordesc_np () +T} Thread safety MT-Safe +T{ +.BR strerror_r (), +.BR strerror_l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strerror () +C11, POSIX.1-2008. +.TP +.BR strerror_r () +.\" FIXME . for later review when Issue 8 is one day released... +.\" A future POSIX.1 may remove strerror_r() +.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8 +.\" http://austingroupbugs.net/view.php?id=508 +.TQ +.BR strerror_l () +POSIX.1-2008. +.TP +.BR strerrorname_np () +.TQ +.BR strerrordesc_np () +GNU. +.PP +POSIX.1-2001 permits +.BR strerror () +to set +.I errno +if the call encounters an error, but does not specify what +value should be returned as the function result in the event of an error. +On some systems, +.\" e.g., Solaris 8, HP-UX 11 +.BR strerror () +returns NULL if the error number is unknown. +On other systems, +.\" e.g., FreeBSD 5.4, Tru64 5.1B +.BR strerror () +returns a string something like "Error nnn occurred" and sets +.I errno +to +.B EINVAL +if the error number is unknown. +C99 and POSIX.1-2008 require the return value to be non-NULL. +.SH HISTORY +.TP +.BR strerror () +POSIX.1-2001, C89. +.TP +.BR strerror_r () +POSIX.1-2001. +.TP +.BR strerror_l () +glibc 2.6. +POSIX.1-2008. +.TP +.BR strerrorname_np () +.TQ +.BR strerrordesc_np () +glibc 2.32. +.SH NOTES +The GNU C Library uses a buffer of 1024 characters for +.BR strerror (). +This buffer size therefore should be sufficient to avoid an +.B ERANGE +error when calling +.BR strerror_r (). +.PP +.BR strerrorname_np () +and +.BR strerrordesc_np () +are thread-safe and async-signal-safe. +.SH SEE ALSO +.BR err (3), +.BR errno (3), +.BR error (3), +.BR perror (3), +.BR strsignal (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/strfmon.3 b/upstream/opensuse-leap-15-6/man3/strfmon.3 new file mode 100644 index 00000000..cd5483de --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strfmon.3 @@ -0,0 +1,210 @@ +'\" t +.\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH strfmon 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strfmon, strfmon_l \- convert monetary value to a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "ssize_t strfmon(char " s "[restrict ." max "], size_t " max , +.BI " const char *restrict " format ", ...);" +.BI "ssize_t strfmon_l(char " s "[restrict ." max "], size_t " max ", \ +locale_t " locale , +.BI " const char *restrict " format ", ...);" +.fi +.SH DESCRIPTION +The +.BR strfmon () +function formats the specified monetary amount +according to the current locale +and format specification +.I format +and places the +result in the character array +.I s +of size +.IR max . +.PP +The +.BR strfmon_l () +function performs the same task, +but uses +the locale specified by +.IR locale . +The behavior of +.BR strfmon_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)) +or is not a valid locale object handle. +.PP +Ordinary characters in +.I format +are copied to +.I s +without conversion. +Conversion specifiers are introduced by a \[aq]%\[aq] +character. +Immediately following it there can be zero or more +of the following flags: +.TP +.BI = f +The single-byte character +.I f +is used as the numeric fill character (to be used with +a left precision, see below). +When not specified, the space character is used. +.TP +.B \[ha] +Do not use any grouping characters that might be defined +for the current locale. +By default, grouping is enabled. +.TP +.BR ( " or " + +The ( flag indicates that negative amounts should be enclosed between +parentheses. +The + flag indicates that signs should be handled +in the default way, that is, amounts are preceded by the locale's +sign indication, for example, nothing for positive, "\-" for negative. +.TP +.B ! +Omit the currency symbol. +.TP +.B \- +Left justify all fields. +The default is right justification. +.PP +Next, there may be a field width: a decimal digit string specifying +a minimum field width in bytes. +The default is 0. +A result smaller than this width is padded with spaces +(on the left, unless the left-justify flag was given). +.PP +Next, there may be a left precision of the form "#" followed by +a decimal digit string. +If the number of digits left of the +radix character is smaller than this, the representation is +padded on the left with the numeric fill character. +Grouping characters are not counted in this field width. +.PP +Next, there may be a right precision of the form "." followed by +a decimal digit string. +The amount being formatted is rounded to +the specified number of digits prior to formatting. +The default is specified in the +.I frac_digits +and +.I int_frac_digits +items of the current locale. +If the right precision is 0, no radix character is printed. +(The radix character here is determined by +.BR LC_MONETARY , +and may differ from that specified by +.BR LC_NUMERIC .) +.PP +Finally, the conversion specification must be ended with a +conversion character. +The three conversion characters are +.TP +.B % +(In this case, the entire specification must be exactly "%%".) +Put a \[aq]%\[aq] character in the result string. +.TP +.B i +One argument of type +.I double +is converted using the locale's international currency format. +.TP +.B n +One argument of type +.I double +is converted using the locale's national currency format. +.SH RETURN VALUE +The +.BR strfmon () +function returns the number of characters placed +in the array +.IR s , +not including the terminating null byte, +provided the string, including the terminating null byte, fits. +Otherwise, it sets +.I errno +to +.BR E2BIG , +returns \-1, and the contents of the array is undefined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strfmon () +T} Thread safety MT-Safe locale +T{ +.BR strfmon_l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH EXAMPLES +The call +.PP +.in +4n +.EX +strfmon(buf, sizeof(buf), "[%\[ha]=*#6n] [%=*#6i]", + 1234.567, 1234.567); +.EE +.in +.PP +outputs +.PP +.in +4n +.EX +[€ **1234,57] [EUR **1 234,57] +.EE +.in +.PP +in the +.I nl_NL +locale. +The +.IR de_DE , +.IR de_CH , +.IR en_AU , +and +.I en_GB +locales yield +.PP +.in +4n +.EX +[ **1234,57 €] [ **1.234,57 EUR] +[ Fr. **1234.57] [ CHF **1\[aq]234.57] +[ $**1234.57] [ AUD**1,234.57] +[ £**1234.57] [ GBP**1,234.57] +.EE +.in +.SH SEE ALSO +.BR duplocale (3), +.BR setlocale (3), +.BR sprintf (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/strfromd.3 b/upstream/opensuse-leap-15-6/man3/strfromd.3 new file mode 100644 index 00000000..11ccf581 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strfromd.3 @@ -0,0 +1,233 @@ +'\" t +.\" Copyright (c) 2016, IBM Corporation. +.\" Written by Wainer dos Santos Moschetta +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" glibc 2.25 source code and manual. +.\" C99 standard document. +.\" ISO/IEC TS 18661-1 technical specification. +.\" snprintf and other man.3 pages. +.\" +.TH strfromd 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strfromd, strfromf, strfroml \- convert a floating-point value into +a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int strfromd(char " str "[restrict ." n "], size_t " n , +.BI " const char *restrict " format ", double " fp ");" +.BI "int strfromf(char " str "[restrict ." n "], size_t " n , +.BI " const char *restrict " format ", float "fp ");" +.BI "int strfroml(char " str "[restrict ." n "], size_t " n , +.BI " const char *restrict " format ", long double " fp ");" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strfromd (), +.BR strfromf (), +.BR strfroml (): +.nf + __STDC_WANT_IEC_60559_BFP_EXT__ +.fi +.SH DESCRIPTION +These functions convert a floating-point value, +.IR fp , +into a string of characters, +.IR str , +with a configurable +.I format +string. +At most +.I n +characters are stored into +.IR str . +.PP +The terminating null byte ('\e0') is written if and only if +.I n +is sufficiently large, otherwise the written string is truncated at +.I n +characters. +.PP +The +.BR strfromd (), +.BR strfromf (), +and +.BR strfroml () +functions are equivalent to +.PP +.in +4n +.EX +snprintf(str, n, format, fp); +.EE +.in +.PP +except for the +.I format +string. +.SS Format of the format string +The +.I format +string must start with the character \[aq]%\[aq]. +This is followed by an optional precision which starts with the period +character (.), followed by an optional decimal integer. +If no integer is specified after the period character, +a precision of zero is used. +Finally, the format string should have one of the conversion specifiers +.BR a , +.BR A , +.BR e , +.BR E , +.BR f , +.BR F , +.BR g , +or +.BR G . +.PP +The conversion specifier is applied based on the floating-point type +indicated by the function suffix. +Therefore, unlike +.BR snprintf (), +the format string does not have a length modifier character. +See +.BR snprintf (3) +for a detailed description of these conversion specifiers. +.PP +The implementation conforms to the C99 standard on conversion of NaN and +infinity values: +.PP +.RS +If +.I fp +is a NaN, +NaN, or \-NaN, and +.B f +(or +.BR a , +.BR e , +.BR g ) +is the conversion specifier, the conversion is to "nan", "nan", or "\-nan", +respectively. +If +.B F +(or +.BR A , +.BR E , +.BR G ) +is the conversion specifier, the conversion is to "NAN" or "\-NAN". +.PP +Likewise if +.I fp +is infinity, it is converted to [\-]inf or [\-]INF. +.RE +.PP +A malformed +.I format +string results in undefined behavior. +.SH RETURN VALUE +The +.BR strfromd (), +.BR strfromf (), +and +.BR strfroml () +functions return the number of characters that would have been written in +.I str +if +.I n +had enough space, +not counting the terminating null byte. +Thus, a return value of +.I n +or greater means that the output was truncated. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7) +and the +.B POSIX Safety Concepts +section in GNU C Library manual. +.PP +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strfromd (), +.BR strfromf (), +.BR strfroml () +T} Thread safety MT-Safe locale +\^ Async-signal safety AS-Unsafe heap +\^ Async-cancel safety AC-Unsafe mem +.TE +.hy +.ad +.sp 1 +Note: these attributes are preliminary. +.SH STANDARDS +ISO/IEC TS 18661-1. +.SH VERSIONS +.TP +.BR strfromd () +.TQ +.BR strfromf () +.TQ +.BR strfroml () +glibc 2.25. +.SH NOTES +These functions take account of the +.B LC_NUMERIC +category of the current locale. +.SH EXAMPLES +To convert the value 12.1 as a float type to a string using decimal +notation, resulting in "12.100000": +.PP +.in +4n +.EX +#define __STDC_WANT_IEC_60559_BFP_EXT__ +#include +int ssize = 10; +char s[ssize]; +strfromf(s, ssize, "%f", 12.1); +.EE +.in +.PP +To convert the value 12.3456 as a float type to a string using +decimal notation with two digits of precision, resulting in "12.35": +.PP +.in +4n +.EX +#define __STDC_WANT_IEC_60559_BFP_EXT__ +#include +int ssize = 10; +char s[ssize]; +strfromf(s, ssize, "%.2f", 12.3456); +.EE +.in +.PP +To convert the value 12.345e19 as a double type to a string using +scientific notation with zero digits of precision, resulting in "1E+20": +.PP +.in +4n +.EX +#define __STDC_WANT_IEC_60559_BFP_EXT__ +#include +int ssize = 10; +char s[ssize]; +strfromd(s, ssize, "%.E", 12.345e19); +.EE +.in +.SH SEE ALSO +.BR atof (3), +.BR snprintf (3), +.BR strtod (3) diff --git a/upstream/opensuse-leap-15-6/man3/strfry.3 b/upstream/opensuse-leap-15-6/man3/strfry.3 new file mode 100644 index 00000000..b526cefe --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strfry.3 @@ -0,0 +1,58 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:39:43 1993 by Rik Faith (faith@cs.unc.edu) +.TH strfry 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strfry \- randomize a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "char *strfry(char *" string ); +.fi +.SH DESCRIPTION +The +.BR strfry () +function randomizes the contents of +.I string +by randomly swapping characters in the string. +The result is an anagram of +.IR string . +.SH RETURN VALUE +The +.BR strfry () +functions returns a pointer to the randomized +string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strfry () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH SEE ALSO +.BR memfrob (3), +.BR string (3) diff --git a/upstream/opensuse-leap-15-6/man3/strftime.3 b/upstream/opensuse-leap-15-6/man3/strftime.3 new file mode 100644 index 00000000..28bc45df --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strftime.3 @@ -0,0 +1,780 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" GNU texinfo documentation on glibc date/time functions. +.\" Modified Sat Jul 24 18:03:44 1993 by Rik Faith (faith@cs.unc.edu) +.\" Applied fix by Wolfgang Franke, aeb, 961011 +.\" Corrected return value, aeb, 970307 +.\" Added Single UNIX Spec conversions and %z, aeb/esr, 990329. +.\" 2005-11-22 mtk, added glibc Notes covering optional 'flag' and +.\" 'width' components of conversion specifications. +.\" +.TH strftime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strftime \- format date and time +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t strftime(char " s "[restrict ." max "], size_t " max , +.BI " const char *restrict " format , +.BI " const struct tm *restrict " tm ); +.PP +.BI "size_t strftime_l(char " s "[restrict ." max "], size_t " max , +.BI " const char *restrict " format , +.BI " const struct tm *restrict " tm , +.BI " locale_t " locale ); +.fi +.SH DESCRIPTION +The +.BR strftime () +function formats the broken-down time +.I tm +according to the format specification +.I format +and places the +result in the character array +.I s +of size +.IR max . +The broken-down time structure +.I tm +is defined in +.IR . +See also +.BR ctime (3). +.\" FIXME . POSIX says: Local timezone information is used as though +.\" strftime() called tzset(). But this doesn't appear to be the case +.PP +The format specification is a null-terminated string and may contain +special character sequences called +.IR "conversion specifications", +each of which is introduced by a \[aq]%\[aq] character and terminated by +some other character known as a +.IR "conversion specifier character". +All other character sequences are +.IR "ordinary character sequences". +.PP +The characters of ordinary character sequences (including the null byte) +are copied verbatim from +.I format +to +.IR s . +However, the characters +of conversion specifications are replaced as shown in the list below. +In this list, the field(s) employed from the +.I tm +structure are also shown. +.TP +.B %a +The abbreviated name of the day of the week according to the current locale. +(Calculated from +.IR tm_wday .) +(The specific names used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.BR ABDAY_ { 1 \[en] 7 } +as an argument.) +.TP +.B %A +The full name of the day of the week according to the current locale. +(Calculated from +.IR tm_wday .) +(The specific names used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.BR DAY_ { 1 \[en] 7 } +as an argument.) +.TP +.B %b +The abbreviated month name according to the current locale. +(Calculated from +.IR tm_mon .) +(The specific names used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.BR ABMON_ { 1 \[en] 12 } +as an argument.) +.TP +.B %B +The full month name according to the current locale. +(Calculated from +.IR tm_mon .) +(The specific names used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.BR MON_ { 1 \[en] 12 } +as an argument.) +.TP +.B %c +The preferred date and time representation for the current locale. +(The specific format used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.B D_T_FMT +as an argument for the +.B %c +conversion specification, and with +.B ERA_D_T_FMT +for the +.B %Ec +conversion specification.) +(In the POSIX locale this is equivalent to +.BR "%a %b %e %H:%M:%S %Y" .) +.TP +.B %C +The century number (year/100) as a 2-digit integer. (SU) +(The +.B %EC +conversion specification corresponds to the name of the era.) +(Calculated from +.IR tm_year .) +.TP +.B %d +The day of the month as a decimal number (range 01 to 31). +(Calculated from +.IR tm_mday .) +.TP +.B %D +Equivalent to +.BR %m/%d/%y . +(Yecch\[em]for Americans only. +Americans should note that in other countries +.B %d/%m/%y +is rather common. +This means that in international context this format is +ambiguous and should not be used.) (SU) +.TP +.B %e +Like +.BR %d , +the day of the month as a decimal number, but a leading +zero is replaced by a space. (SU) +(Calculated from +.IR tm_mday .) +.TP +.B %E +Modifier: use alternative ("era-based") format, see below. (SU) +.TP +.B %F +Equivalent to +.B %Y\-%m\-%d +(the ISO\ 8601 date format). (C99) +.TP +.B %G +The ISO\ 8601 week-based year (see NOTES) with century as a decimal number. +The 4-digit year corresponding to the ISO week number (see +.BR %V ). +This has the same format and value as +.BR %Y , +except that if the ISO week number belongs to the previous or next year, +that year is used instead. (TZ) +(Calculated from +.IR tm_year , +.IR tm_yday , +and +.IR tm_wday .) +.TP +.B %g +Like +.BR %G , +but without century, that is, with a 2-digit year (00\[en]99). (TZ) +(Calculated from +.IR tm_year , +.IR tm_yday , +and +.IR tm_wday .) +.TP +.B %h +Equivalent to +.BR %b . +(SU) +.TP +.B %H +The hour as a decimal number using a 24-hour clock (range 00 to 23). +(Calculated from +.IR tm_hour .) +.TP +.B %I +The hour as a decimal number using a 12-hour clock (range 01 to 12). +(Calculated from +.IR tm_hour .) +.TP +.B %j +The day of the year as a decimal number (range 001 to 366). +(Calculated from +.IR tm_yday .) +.TP +.B %k +The hour (24-hour clock) as a decimal number (range 0 to 23); +single digits are preceded by a blank. +(See also +.BR %H .) +(Calculated from +.IR tm_hour .) +(TZ) +.TP +.B %l +The hour (12-hour clock) as a decimal number (range 1 to 12); +single digits are preceded by a blank. +(See also +.BR %I .) +(Calculated from +.IR tm_hour .) +(TZ) +.TP +.B %m +The month as a decimal number (range 01 to 12). +(Calculated from +.IR tm_mon .) +.TP +.B %M +The minute as a decimal number (range 00 to 59). +(Calculated from +.IR tm_min .) +.TP +.B %n +A newline character. (SU) +.TP +.B %O +Modifier: use alternative numeric symbols, see below. (SU) +.TP +.B %p +Either "AM" or "PM" according to the given time value, or the +corresponding strings for the current locale. +Noon is treated as "PM" and midnight as "AM". +(Calculated from +.IR tm_hour .) +(The specific string representations used for "AM" and "PM" +in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.BR AM_STR " and " PM_STR , +respectively.) +.TP +.B %P +Like +.B %p +but in lowercase: "am" or "pm" or a corresponding +string for the current locale. +(Calculated from +.IR tm_hour .) +(GNU) +.TP +.B %r +The time in a.m. or p.m. notation. +(SU) +(The specific format used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.B T_FMT_AMPM +as an argument.) +(In the POSIX locale this is equivalent to +.BR "%I:%M:%S %p" .) +.TP +.B %R +The time in 24-hour notation +.RB ( %H:%M ). +(SU) +For a version including the seconds, see +.B %T +below. +.TP +.B %s +The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). (TZ) +(Calculated from +.IR mktime(tm) .) +.TP +.B %S +The second as a decimal number (range 00 to 60). +(The range is up to 60 to allow for occasional leap seconds.) +(Calculated from +.IR tm_sec .) +.TP +.B %t +A tab character. (SU) +.TP +.B %T +The time in 24-hour notation +.RB ( %H:%M:%S ). +(SU) +.TP +.B %u +The day of the week as a decimal, range 1 to 7, Monday being 1. +See also +.BR %w . +(Calculated from +.IR tm_wday .) +(SU) +.TP +.B %U +The week number of the current year as a decimal number, +range 00 to 53, starting with the first Sunday as the first day +of week 01. +See also +.B %V +and +.BR %W . +(Calculated from +.I tm_yday +and +.IR tm_wday .) +.TP +.B %V +The ISO\ 8601 week number (see NOTES) of the current year as a decimal number, +range 01 to 53, where week 1 is the first week that has at least +4 days in the new year. +See also +.B %U +and +.BR %W . +(Calculated from +.IR tm_year , +.IR tm_yday , +and +.IR tm_wday .) +(SU) +.TP +.B %w +The day of the week as a decimal, range 0 to 6, Sunday being 0. +See also +.BR %u . +(Calculated from +.IR tm_wday .) +.TP +.B %W +The week number of the current year as a decimal number, +range 00 to 53, starting with the first Monday as the first day of week 01. +(Calculated from +.I tm_yday +and +.IR tm_wday .) +.TP +.B %x +The preferred date representation for the current locale without the time. +(The specific format used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.B D_FMT +as an argument for the +.B %x +conversion specification, and with +.B ERA_D_FMT +for the +.B %Ex +conversion specification.) +(In the POSIX locale this is equivalent to +.BR %m/%d/%y .) +.TP +.B %X +The preferred time representation for the current locale without the date. +(The specific format used in the current locale can be obtained by calling +.BR nl_langinfo (3) +with +.B T_FMT +as an argument for the +.B %X +conversion specification, and with +.B ERA_T_FMT +for the +.B %EX +conversion specification.) +(In the POSIX locale this is equivalent to +.BR %H:%M:%S .) +.TP +.B %y +The year as a decimal number without a century (range 00 to 99). +(The +.B %Ey +conversion specification corresponds to the year since the beginning of the era +denoted by the +.B %EC +conversion specification.) +(Calculated from +.IR tm_year ) +.TP +.B %Y +The year as a decimal number including the century. +(The +.B %EY +conversion specification corresponds to +the full alternative year representation.) +(Calculated from +.IR tm_year ) +.TP +.B %z +The +.I +hhmm +or +.I \-hhmm +numeric timezone (that is, the hour and minute offset from UTC). (SU) +.TP +.B %Z +The timezone name or abbreviation. +.TP +.B %+ +.\" Nov 05 -- Not in Linux/glibc, but is in some BSDs (according to +.\" their man pages) +The date and time in +.BR date (1) +format. (TZ) +(Not supported in glibc2.) +.TP +.B %% +A literal \[aq]%\[aq] character. +.PP +Some conversion specifications can be modified by preceding the +conversion specifier character by the +.B E +or +.B O +.I modifier +to indicate that an alternative format should be used. +If the alternative format or specification does not exist for +the current locale, the behavior will be as if the unmodified +conversion specification were used. (SU) +The Single UNIX Specification mentions +.BR %Ec , +.BR %EC , +.BR %Ex , +.BR %EX , +.BR %Ey , +.BR %EY , +.BR %Od , +.BR %Oe , +.BR %OH , +.BR %OI , +.BR %Om , +.BR %OM , +.BR %OS , +.BR %Ou , +.BR %OU , +.BR %OV , +.BR %Ow , +.BR %OW , +.BR %Oy , +where the effect of the +.B O +modifier is to use +alternative numeric symbols (say, roman numerals), and that of the +.B E +modifier is to use a locale-dependent alternative representation. +The rules governing date representation with the +.B E +modifier can be obtained by supplying +.B ERA +as an argument to a +.BR nl_langinfo (3). +One example of such alternative forms is the Japanese era calendar scheme in the +.B ja_JP +glibc locale. +.PP +.BR strftime_l () +is equivalent to +.BR strftime (), +except it uses the specified +.I locale +instead of the current locale. +The behaviour is undefined if +.I locale +is invalid or +.BR LC_GLOBAL_LOCALE . +.SH RETURN VALUE +Provided that the result string, +including the terminating null byte, does not exceed +.I max +bytes, +.BR strftime () +returns the number of bytes (excluding the terminating null byte) +placed in the array +.IR s . +If the length of the result string (including the terminating null byte) +would exceed +.I max +bytes, then +.BR strftime () +returns 0, and the contents of the array are undefined. +.\" (This behavior applies since at least libc 4.4.4; +.\" very old versions of libc, such as libc 4.4.1, +.\" would return +.\" .I max +.\" if the array was too small.) +.PP +Note that the return value 0 does not necessarily indicate an error. +For example, in many locales +.B %p +yields an empty string. +An empty +.I format +string will likewise yield an empty string. +.SH ENVIRONMENT +The environment variables +.B TZ +and +.B LC_TIME +are used. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strftime (), +.BR strftime_l () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strftime () +C11, POSIX.1-2008. +.TP +.BR strftime_l () +POSIX.1-2008. +.SH HISTORY +.TP +.BR strftime () +SVr4, C89. +.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details +.\" in the standards changed across versions. Investigate and +.\" write up. +.TP +.BR strftime_l () +POSIX.1-2008. +.PP +There are strict inclusions between the set of conversions +given in ANSI C (unmarked), those given in the Single UNIX Specification +(marked SU), those given in Olson's timezone package (marked TZ), +and those given in glibc (marked GNU), except that +.B %+ +is not supported in glibc2. +On the other hand glibc2 has several more extensions. +POSIX.1 only refers to ANSI C; POSIX.2 describes under +.BR date (1) +several extensions that could apply to +.BR strftime () +as well. +The +.B %F +conversion is in C99 and POSIX.1-2001. +.PP +In SUSv2, the +.B %S +specifier allowed a range of 00 to 61, +to allow for the theoretical possibility of a minute that +included a double leap second +(there never has been such a minute). +.SH NOTES +.SS ISO 8601 week dates +.BR %G , +.BR %g , +and +.B %V +yield values calculated from the week-based year defined by the +ISO\ 8601 standard. +In this system, weeks start on a Monday, and are numbered from 01, +for the first week, up to 52 or 53, for the last week. +Week 1 is the first week where four or more days fall within the +new year (or, synonymously, week 01 is: +the first week of the year that contains a Thursday; +or, the week that has 4 January in it). +When three or fewer days of the first calendar week of the new year fall +within that year, +then the ISO 8601 week-based system counts those days as part of week 52 +or 53 of the preceding year. +For example, 1 January 2010 is a Friday, +meaning that just three days of that calendar week fall in 2010. +Thus, the ISO\ 8601 week-based system considers these days to be part of +week 53 +.RB ( %V ) +of the year 2009 +.RB ( %G ); +week 01 of ISO\ 8601 year 2010 starts on Monday, 4 January 2010. +Similarly, the first two days of January 2011 are considered to be part +of week 52 of the year 2010. +.SS glibc notes +glibc provides some extensions for conversion specifications. +(These extensions are not specified in POSIX.1-2001, but a few other +systems provide similar features.) +.\" HP-UX and Tru64 also have features like this. +Between the \[aq]%\[aq] character and the conversion specifier character, +an optional +.I flag +and field +.I width +may be specified. +(These precede the +.B E +or +.B O +modifiers, if present.) +.PP +The following flag characters are permitted: +.TP +.B _ +(underscore) +Pad a numeric result string with spaces. +.TP +.B \- +(dash) +Do not pad a numeric result string. +.TP +.B 0 +Pad a numeric result string with zeros even if the conversion +specifier character uses space-padding by default. +.TP +.B \[ha] +Convert alphabetic characters in result string to uppercase. +.TP +.B # +Swap the case of the result string. +(This flag works only with certain conversion specifier characters, +and of these, it is only really useful with +.BR %Z .) +.PP +An optional decimal width specifier may follow the (possibly absent) flag. +If the natural size of the field is smaller than this width, +then the result string is padded (on the left) to the specified width. +.SH BUGS +If the output string would exceed +.I max +bytes, +.I errno +is +.I not +set. +This makes it impossible to distinguish this error case from cases where the +.I format +string legitimately produces a zero-length output string. +POSIX.1-2001 +does +.I not +specify any +.I errno +settings for +.BR strftime (). +.PP +Some buggy versions of +.BR gcc (1) +complain about the use of +.BR %c : +.IR "warning: \`%c\[aq] yields only last 2 digits of year in some locales" . +Of course programmers are encouraged to use +.BR %c , +as it gives the preferred date and time representation. +One meets all kinds of strange obfuscations +to circumvent this +.BR gcc (1) +problem. +A relatively clean one is to add an +intermediate function +.PP +.in +4n +.EX +size_t +my_strftime(char *s, size_t max, const char *fmt, + const struct tm *tm) +{ + return strftime(s, max, fmt, tm); +} +.EE +.in +.PP +Nowadays, +.BR gcc (1) +provides the +.I \-Wno\-format\-y2k +option to prevent the warning, +so that the above workaround is no longer required. +.SH EXAMPLES +.B RFC\~2822-compliant date format +(with an English locale for %a and %b) +.PP +.in +4n +.EX +"%a,\ %d\ %b\ %Y\ %T\ %z" +.EE +.in +.PP +.B RFC\~822-compliant date format +(with an English locale for %a and %b) +.PP +.in +4n +.EX +"%a,\ %d\ %b\ %y\ %T\ %z" +.EE +.in +.SS Example program +The program below can be used to experiment with +.BR strftime (). +.PP +Some examples of the result string produced by the glibc implementation of +.BR strftime () +are as follows: +.PP +.in +4n +.EX +.RB "$" " ./a.out \[aq]%m\[aq]" +Result string is "11" +.RB "$" " ./a.out \[aq]%5m\[aq]" +Result string is "00011" +.RB "$" " ./a.out \[aq]%_5m\[aq]" +Result string is " 11" +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (strftime.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + char outstr[200]; + time_t t; + struct tm *tmp; + + t = time(NULL); + tmp = localtime(&t); + if (tmp == NULL) { + perror("localtime"); + exit(EXIT_FAILURE); + } + + if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) { + fprintf(stderr, "strftime returned 0"); + exit(EXIT_FAILURE); + } + + printf("Result string is \e"%s\e"\en", outstr); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR date (1), +.BR time (2), +.BR ctime (3), +.BR nl_langinfo (3), +.BR setlocale (3), +.BR sprintf (3), +.BR strptime (3) diff --git a/upstream/opensuse-leap-15-6/man3/string.3 b/upstream/opensuse-leap-15-6/man3/string.3 new file mode 100644 index 00000000..921d3cc0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/string.3 @@ -0,0 +1,224 @@ +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:54:31 1993, Rik Faith (faith@cs.unc.edu) +.TH string 3 2023-01-22 "Linux man-pages 6.04" +.SH NAME +stpcpy, strcasecmp, strcat, strchr, strcmp, strcoll, strcpy, strcspn, +strdup, strfry, strlen, strncat, strncmp, strncpy, strncasecmp, strpbrk, +strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex +\- string operations +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.B #include +.TP +.BI "int strcasecmp(const char *" s1 ", const char *" s2 ); +Compare the strings +.I s1 +and +.I s2 +ignoring case. +.TP +.BI "int strncasecmp(const char " s1 [. n "], const char " s2 [. n "], \ +size_t " n ); +Compare the first +.I n +bytes of the strings +.I s1 +and +.I s2 +ignoring case. +.TP +.BI "char *index(const char *" s ", int " c ); +Identical to +.BR strchr (3). +.TP +.BI "char *rindex(const char *" s ", int " c ); +Identical to +.BR strrchr (3). +.TP +.B #include +.TP +.BI "char *stpcpy(char *restrict " dest ", const char *restrict " src ); +Copy a string from +.I src +to +.IR dest , +returning a pointer to the end of the resulting string at +.IR dest . +.TP +.BI "char *strcat(char *restrict " dest ", const char *restrict " src ); +Append the string +.I src +to the string +.IR dest , +returning a pointer +.IR dest . +.TP +.BI "char *strchr(const char *" s ", int " c ); +Return a pointer to the first occurrence of the character +.I c +in the string +.IR s . +.TP +.BI "int strcmp(const char *" s1 ", const char *" s2 ); +Compare the strings +.I s1 +with +.IR s2 . +.TP +.BI "int strcoll(const char *" s1 ", const char *" s2 ); +Compare the strings +.I s1 +with +.I s2 +using the current locale. +.TP +.BI "char *strcpy(char *restrict " dest ", const char *restrict " src ); +Copy the string +.I src +to +.IR dest , +returning a pointer to the start of +.IR dest . +.TP +.BI "size_t strcspn(const char *" s ", const char *" reject ); +Calculate the length of the initial segment of the string +.I s +which does not contain any of bytes in the string +.IR reject , +.TP +.BI "char *strdup(const char *" s ); +Return a duplicate of the string +.I s +in memory allocated using +.BR malloc (3). +.TP +.BI "char *strfry(char *" string ); +Randomly swap the characters in +.IR string . +.TP +.BI "size_t strlen(const char *" s ); +Return the length of the string +.IR s . +.TP +.nf +.BI "char *strncat(char " dest "[restrict strlen(." dest ") + ." n " + 1]," +.BI " const char " src "[restrict ." n ], +.BI " size_t " n ); +.fi +Append at most +.I n +bytes from the unterminated string +.I src +to the string +.IR dest , +returning a pointer to +.IR dest . +.TP +.BI "int strncmp(const char " s1 [. n "], const char " s2 [. n "], size_t " n ); +Compare at most +.I n +bytes of the strings +.I s1 +and +.IR s2 . +.TP +.BI "char *strpbrk(const char *" s ", const char *" accept ); +Return a pointer to the first occurrence in the string +.I s +of one of the bytes in the string +.IR accept . +.TP +.BI "char *strrchr(const char *" s ", int " c ); +Return a pointer to the last occurrence of the character +.I c +in the string +.IR s . +.TP +.BI "char *strsep(char **restrict " stringp ", const char *restrict " delim ); +Extract the initial token in +.I stringp +that is delimited by one of the bytes in +.IR delim . +.TP +.BI "size_t strspn(const char *" s ", const char *" accept ); +Calculate the length of the starting segment in the string +.I s +that consists entirely of bytes in +.IR accept . +.TP +.BI "char *strstr(const char *" haystack ", const char *" needle ); +Find the first occurrence of the substring +.I needle +in the string +.IR haystack , +returning a pointer to the found substring. +.TP +.BI "char *strtok(char *restrict " s ", const char *restrict " delim ); +Extract tokens from the string +.I s +that are delimited by one of the bytes in +.IR delim . +.TP +.nf +.BI "size_t strxfrm(char " dest "[restrict ." n "], \ +const char " src "[restrict ." n ], +.BI " size_t " n ); +.fi +Transforms +.I src +to the current locale and copies the first +.I n +bytes to +.IR dest . +.SS Obsolete functions +.TP +.nf +.BI "char *strncpy(char " dest "[restrict ." n "], \ +const char " src "[restrict ." n ], +.BI " size_t " n ); +.fi +Copy at most +.I n +bytes from string +.I src +to +.IR dest , +returning a pointer to the start of +.IR dest . +.SH DESCRIPTION +The string functions perform operations on null-terminated +strings. +See the individual man pages for descriptions of each function. +.SH SEE ALSO +.BR bstring (3), +.BR stpcpy (3), +.BR strcasecmp (3), +.BR strcat (3), +.BR strchr (3), +.BR strcmp (3), +.BR strcoll (3), +.BR strcpy (3), +.BR strcspn (3), +.BR strdup (3), +.BR strfry (3), +.BR strlen (3), +.BR strncasecmp (3), +.BR strncat (3), +.BR strncmp (3), +.BR strncpy (3), +.BR strpbrk (3), +.BR strrchr (3), +.BR strsep (3), +.BR strspn (3), +.BR strstr (3), +.BR strtok (3), +.BR strxfrm (3) diff --git a/upstream/opensuse-leap-15-6/man3/strlen.3 b/upstream/opensuse-leap-15-6/man3/strlen.3 new file mode 100644 index 00000000..6e35a60e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strlen.3 @@ -0,0 +1,64 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:02:26 1993 by Rik Faith (faith@cs.unc.edu) +.TH strlen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strlen \- calculate the length of a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t strlen(const char *" s ); +.fi +.SH DESCRIPTION +The +.BR strlen () +function calculates the length of the string pointed to by +.IR s , +excluding the terminating null byte (\[aq]\e0\[aq]). +.SH RETURN VALUE +The +.BR strlen () +function returns the number of bytes in the string pointed to by +.IR s . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strlen () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH NOTES +In cases where the input buffer may not contain +a terminating null byte, +.BR strnlen (3) +should be used instead. +.SH SEE ALSO +.BR string (3), +.BR strnlen (3), +.BR wcslen (3), +.BR wcsnlen (3) diff --git a/upstream/opensuse-leap-15-6/man3/strncat.3 b/upstream/opensuse-leap-15-6/man3/strncat.3 new file mode 100644 index 00000000..969b241b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strncat.3 @@ -0,0 +1,133 @@ +'\" t +.\" Copyright 2022 Alejandro Colomar +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH strncat 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strncat \- concatenate a null-padded character sequence into a string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strncat(char *restrict " dst ", const char " src "[restrict ." sz ], +.BI " size_t " sz ); +.fi +.SH DESCRIPTION +This function catenates the input character sequence +contained in a null-padded fixed-width buffer, +into a string at the buffer pointed to by +.IR dst . +The programmer is responsible for allocating a destination buffer large enough, +that is, +.IR "strlen(dst) + strnlen(src, sz) + 1" . +.PP +An implementation of this function might be: +.PP +.in +4n +.EX +char * +strncat(char *restrict dst, const char *restrict src, size_t sz) +{ + int len; + char *p; + + len = strnlen(src, sz); + p = dst + strlen(dst); + p = mempcpy(p, src, len); + *p = \[aq]\e0\[aq]; + + return dst; +} +.EE +.in +.SH RETURN VALUE +.BR strncat () +returns +.IR dst . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strncat () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH CAVEATS +The name of this function is confusing. +This function has no relation to +.BR strncpy (3). +.PP +If the destination buffer is not large enough, +the behavior is undefined. +See +.B _FORTIFY_SOURCE +in +.BR feature_test_macros (7). +.SH BUGS +This function can be very inefficient. +Read about +.UR https://www.joelonsoftware.com/\:2001/12/11/\:back\-to\-basics/ +Shlemiel the painter +.UE . +.SH EXAMPLES +.\" SRC BEGIN (strncat.c) +.EX +#include +#include +#include +#include + +#define nitems(arr) (sizeof((arr)) / sizeof((arr)[0])) + +int +main(void) +{ + size_t maxsize; + + // Null-padded fixed-width character sequences + char pre[4] = "pre."; + char new_post[50] = ".foo.bar"; + + // Strings + char post[] = ".post"; + char src[] = "some_long_body.post"; + char *dest; + + maxsize = nitems(pre) + strlen(src) \- strlen(post) + + nitems(new_post) + 1; + dest = malloc(sizeof(*dest) * maxsize); + if (dest == NULL) + err(EXIT_FAILURE, "malloc()"); + + dest[0] = \[aq]\e0\[aq]; // There's no 'cpy' function to this 'cat'. + strncat(dest, pre, nitems(pre)); + strncat(dest, src, strlen(src) \- strlen(post)); + strncat(dest, new_post, nitems(new_post)); + + puts(dest); // "pre.some_long_body.foo.bar" + free(dest); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.in +.SH SEE ALSO +.BR string (3), +.BR string_copying (3) diff --git a/upstream/opensuse-leap-15-6/man3/strnlen.3 b/upstream/opensuse-leap-15-6/man3/strnlen.3 new file mode 100644 index 00000000..0e83eeaf --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strnlen.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" +.TH strnlen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strnlen \- determine the length of a fixed-size string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t strnlen(const char " s [. maxlen "], size_t " maxlen ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strnlen (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR strnlen () +function returns the number of bytes in the string +pointed to by +.IR s , +excluding the terminating null byte (\[aq]\e0\[aq]), +but at most +.IR maxlen . +In doing this, +.BR strnlen () +looks only at the first +.I maxlen +characters in the string pointed to by +.I s +and never beyond +.IR s[maxlen\-1] . +.SH RETURN VALUE +The +.BR strnlen () +function returns +.IR strlen(s) , +if that is less than +.IR maxlen , +or +.I maxlen +if there is no null terminating (\[aq]\e0\[aq]) among the first +.I maxlen +characters pointed to by +.IR s . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strnlen () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2008. +.SH SEE ALSO +.BR strlen (3) diff --git a/upstream/opensuse-leap-15-6/man3/strpbrk.3 b/upstream/opensuse-leap-15-6/man3/strpbrk.3 new file mode 100644 index 00000000..f1401392 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strpbrk.3 @@ -0,0 +1,69 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:01:24 1993 by Rik Faith (faith@cs.unc.edu) +.TH strpbrk 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strpbrk \- search a string for any of a set of bytes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strpbrk(const char *" s ", const char *" accept ); +.fi +.SH DESCRIPTION +The +.BR strpbrk () +function locates the first occurrence in the +string +.I s +of any of the bytes in the string +.IR accept . +.SH RETURN VALUE +The +.BR strpbrk () +function returns a pointer to the byte in +.I s +that matches one of the bytes in +.IR accept , +or NULL +if no such byte is found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strpbrk () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR memchr (3), +.BR strchr (3), +.BR string (3), +.BR strsep (3), +.BR strspn (3), +.BR strstr (3), +.BR strtok (3), +.BR wcspbrk (3) diff --git a/upstream/opensuse-leap-15-6/man3/strptime.3 b/upstream/opensuse-leap-15-6/man3/strptime.3 new file mode 100644 index 00000000..77289256 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strptime.3 @@ -0,0 +1,416 @@ +'\" t +.\" Copyright 1993 Mitchum DSouza +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified, jmv@lucifer.dorms.spbu.ru, 1999-11-08 +.\" Modified, aeb, 2000-04-07 +.\" Updated from glibc docs, C. Scott Ananian, 2001-08-25 +.\" Modified, aeb, 2001-08-31 +.\" Modified, wharms 2001-11-12, remark on white space and example +.\" +.TH strptime 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strptime \- convert a string representation of time to a time tm structure +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "char *strptime(const char *restrict " s ", const char *restrict " format , +.BI " struct tm *restrict " tm ); +.fi +.SH DESCRIPTION +The +.BR strptime () +function is the converse of +.BR strftime (3); +it converts the character string pointed to by +.I s +to values which are stored in the +"broken-down time" +structure pointed to by +.IR tm , +using the format specified by +.IR format . +.PP +The broken-down time structure +.I tm +is described in +.BR tm (3type). +.PP +The +.I format +argument +is a character string that consists of field descriptors and text characters, +reminiscent of +.BR scanf (3). +Each field descriptor consists of a +.B % +character followed by another character that specifies the replacement +for the field descriptor. +All other characters in the +.I format +string must have a matching character in the input string, +except for whitespace, which matches zero or more +whitespace characters in the input string. +There should be white\%space or other alphanumeric characters +between any two field descriptors. +.PP +The +.BR strptime () +function processes the input string from left +to right. +Each of the three possible input elements (whitespace, +literal, or format) are handled one after the other. +If the input cannot be matched to the format string, the function stops. +The remainder of the format and input strings are not processed. +.PP +The supported input field descriptors are listed below. +In case a text string (such as the name of a day of the week or a month name) +is to be matched, the comparison is case insensitive. +In case a number is to be matched, leading zeros are +permitted but not required. +.TP +.B %% +The +.B % +character. +.TP +.BR %a " or " %A +The name of the day of the week according to the current locale, +in abbreviated form or the full name. +.TP +.BR %b " or " %B " or " %h +The month name according to the current locale, +in abbreviated form or the full name. +.TP +.B %c +The date and time representation for the current locale. +.TP +.B %C +The century number (0\[en]99). +.TP +.BR %d " or " %e +The day of month (1\[en]31). +.TP +.B %D +Equivalent to +.BR %m/%d/%y . +(This is the American style date, very confusing +to non-Americans, especially since +.B %d/%m/%y +is widely used in Europe. +The ISO 8601 standard format is +.BR %Y\-%m\-%d .) +.TP +.B %H +The hour (0\[en]23). +.TP +.B %I +The hour on a 12-hour clock (1\[en]12). +.TP +.B %j +The day number in the year (1\[en]366). +.TP +.B %m +The month number (1\[en]12). +.TP +.B %M +The minute (0\[en]59). +.TP +.B %n +Arbitrary whitespace. +.TP +.B %p +The locale's equivalent of AM or PM. +(Note: there may be none.) +.TP +.B %r +The 12-hour clock time (using the locale's AM or PM). +In the POSIX locale equivalent to +.BR "%I:%M:%S %p" . +If +.I t_fmt_ampm +is empty in the +.B LC_TIME +part of the current locale, +then the behavior is undefined. +.TP +.B %R +Equivalent to +.BR %H:%M . +.TP +.B %S +The second (0\[en]60; 60 may occur for leap seconds; +earlier also 61 was allowed). +.TP +.B %t +Arbitrary whitespace. +.TP +.B %T +Equivalent to +.BR %H:%M:%S . +.TP +.B %U +The week number with Sunday the first day of the week (0\[en]53). +The first Sunday of January is the first day of week 1. +.TP +.B %w +The ordinal number of the day of the week (0\[en]6), with Sunday = 0. +.TP +.B %W +The week number with Monday the first day of the week (0\[en]53). +The first Monday of January is the first day of week 1. +.TP +.B %x +The date, using the locale's date format. +.TP +.B %X +The time, using the locale's time format. +.TP +.B %y +The year within century (0\[en]99). +When a century is not otherwise specified, values in the range 69\[en]99 refer +to years in the twentieth century (1969\[en]1999); values in the +range 00\[en]68 refer to years in the twenty-first century (2000\[en]2068). +.TP +.B %Y +The year, including century (for example, 1991). +.PP +Some field descriptors can be modified by the E or O modifier characters +to indicate that an alternative format or specification should be used. +If the +alternative format or specification does not exist in the current locale, the +unmodified field descriptor is used. +.PP +The E modifier specifies that the input string may contain +alternative locale-dependent versions of the date and time representation: +.TP +.B %Ec +The locale's alternative date and time representation. +.TP +.B %EC +The name of the base year (period) in the locale's alternative representation. +.TP +.B %Ex +The locale's alternative date representation. +.TP +.B %EX +The locale's alternative time representation. +.TP +.B %Ey +The offset from +.B %EC +(year only) in the locale's alternative representation. +.TP +.B %EY +The full alternative year representation. +.PP +The O modifier specifies that the numerical input may be in an +alternative locale-dependent format: +.TP +.BR %Od " or " %Oe +The day of the month using the locale's alternative numeric symbols; +leading zeros are permitted but not required. +.TP +.B %OH +The hour (24-hour clock) using the locale's alternative numeric symbols. +.TP +.B %OI +The hour (12-hour clock) using the locale's alternative numeric symbols. +.TP +.B %Om +The month using the locale's alternative numeric symbols. +.TP +.B %OM +The minutes using the locale's alternative numeric symbols. +.TP +.B %OS +The seconds using the locale's alternative numeric symbols. +.TP +.B %OU +The week number of the year (Sunday as the first day of the week) +using the locale's alternative numeric symbols. +.TP +.B %Ow +The ordinal number of the day of the week (Sunday=0), +using the locale's alternative numeric symbols. +.TP +.B %OW +The week number of the year (Monday as the first day of the week) +using the locale's alternative numeric symbols. +.TP +.B %Oy +The year (offset from +.BR %C ) +using the locale's alternative numeric symbols. +.SH RETURN VALUE +The return value of the function is a pointer to the first character +not processed in this function call. +In case the input string +contains more characters than required by the format string, the return +value points right after the last consumed input character. +In case the whole input string is consumed, +the return value points to the null byte at the end of the string. +If +.BR strptime () +fails to match all +of the format string and therefore an error occurred, the function +returns NULL. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strptime () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SUSv2. +.SH NOTES +In principle, this function does not initialize +.I tm +but +stores only the values specified. +This means that +.I tm +should be initialized before the call. +Details differ a bit between different UNIX systems. +The glibc implementation does not touch those fields which are not +explicitly specified, except that it recomputes the +.I tm_wday +and +.I tm_yday +field if any of the year, month, or day elements changed. +.\" .PP +.\" This function is available since libc 4.6.8. +.\" Linux libc4 and libc5 includes define the prototype unconditionally; +.\" glibc2 includes provide a prototype only when +.\" .B _XOPEN_SOURCE +.\" or +.\" .B _GNU_SOURCE +.\" are defined. +.\" .PP +.\" Before libc 5.4.13 whitespace +.\" (and the \[aq]n\[aq] and \[aq]t\[aq] specifications) was not handled, +.\" no \[aq]E\[aq] and \[aq]O\[aq] locale modifier characters were accepted, +.\" and the \[aq]C\[aq] specification was a synonym for the \[aq]c\[aq] specification. +.PP +The \[aq]y\[aq] (year in century) specification is taken to specify a year +.\" in the 20th century by libc4 and libc5. +.\" It is taken to be a year +in the range 1950\[en]2049 by glibc 2.0. +It is taken to be a year in +1969\[en]2068 since glibc 2.1. +.\" In libc4 and libc5 the code for %I is broken (fixed in glibc; +.\" %OI was fixed in glibc 2.2.4). +.SS glibc notes +For reasons of symmetry, glibc tries to support for +.BR strptime () +the same format characters as for +.BR strftime (3). +(In most cases, the corresponding fields are parsed, but no field in +.I tm +is changed.) +This leads to +.TP +.B %F +Equivalent to +.BR %Y\-%m\-%d , +the ISO 8601 date format. +.TP +.B %g +The year corresponding to the ISO week number, but without the century +(0\[en]99). +.TP +.B %G +The year corresponding to the ISO week number. +(For example, 1991.) +.TP +.B %u +The day of the week as a decimal number (1\[en]7, where Monday = 1). +.TP +.B %V +The ISO 8601:1988 week number as a decimal number (1\[en]53). +If the week (starting on Monday) containing 1 January has four or more days +in the new year, then it is considered week 1. +Otherwise, it is the last week +of the previous year, and the next week is week 1. +.TP +.B %z +An RFC-822/ISO 8601 standard timezone specification. +.TP +.B %Z +The timezone name. +.PP +Similarly, because of GNU extensions to +.BR strftime (3), +.B %k +is accepted as a synonym for +.BR %H , +and +.B %l +should be accepted +as a synonym for +.BR %I , +and +.B %P +is accepted as a synonym for +.BR %p . +Finally +.TP +.B %s +The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). +Leap seconds are not counted unless leap second support is available. +.PP +The glibc implementation does not require whitespace between +two field descriptors. +.SH EXAMPLES +The following example demonstrates the use of +.BR strptime () +and +.BR strftime (3). +.PP +.\" SRC BEGIN (strptime.c) +.EX +#define _XOPEN_SOURCE +#include +#include +#include +#include + +int +main(void) +{ + struct tm tm; + char buf[255]; + + memset(&tm, 0, sizeof(tm)); + strptime("2001\-11\-12 18:31:01", "%Y\-%m\-%d %H:%M:%S", &tm); + strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm); + puts(buf); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR time (2), +.BR getdate (3), +.BR scanf (3), +.BR setlocale (3), +.BR strftime (3) diff --git a/upstream/opensuse-leap-15-6/man3/strsep.3 b/upstream/opensuse-leap-15-6/man3/strsep.3 new file mode 100644 index 00000000..e6183a0a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strsep.3 @@ -0,0 +1,165 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 18:00:10 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Mon Jan 20 12:04:18 1997 by Andries Brouwer (aeb@cwi.nl) +.\" Modified Tue Jan 23 20:23:07 2001 by Andries Brouwer (aeb@cwi.nl) +.\" +.TH strsep 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strsep \- extract token from string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strsep(char **restrict " stringp ", const char *restrict " delim ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strsep (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +If +.I *stringp +is NULL, the +.BR strsep () +function returns NULL +and does nothing else. +Otherwise, this function finds the first token +in the string +.I *stringp +that is delimited by one of the bytes in the string +.IR delim . +This token is terminated by overwriting the delimiter +with a null byte (\[aq]\e0\[aq]), +and +.I *stringp +is updated to point past the token. +In case no delimiter was found, the token is taken to be +the entire string +.IR *stringp , +and +.I *stringp +is made NULL. +.SH RETURN VALUE +The +.BR strsep () +function returns a pointer to the token, +that is, it returns the original value of +.IR *stringp . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strsep () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.4BSD. +.PP +The +.BR strsep () +function was introduced as a replacement for +.BR strtok (3), +since the latter cannot handle empty fields. +However, +.BR strtok (3) +conforms to C89/C99 and hence is more portable. +.SH BUGS +Be cautious when using this function. +If you do use it, note that: +.IP \[bu] 3 +This function modifies its first argument. +.IP \[bu] +This function cannot be used on constant strings. +.IP \[bu] +The identity of the delimiting character is lost. +.SH EXAMPLES +The program below is a port of the one found in +.BR strtok (3), +which, however, doesn't discard multiple delimiters or empty tokens: +.PP +.in +4n +.EX +.RB "$" " ./a.out \[aq]a/bbb///cc;xxx:yyy:\[aq] \[aq]:;\[aq] \[aq]/\[aq]" +1: a/bbb///cc + \-\-> a + \-\-> bbb + \-\-> + \-\-> + \-\-> cc +2: xxx + \-\-> xxx +3: yyy + \-\-> yyy +4: + \-\-> +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (strsep.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + char *token, *subtoken; + + if (argc != 4) { + fprintf(stderr, "Usage: %s string delim subdelim\en", argv[0]); + exit(EXIT_FAILURE); + } + + for (unsigned int j = 1; (token = strsep(&argv[1], argv[2])); j++) { + printf("%u: %s\en", j, token); + + while ((subtoken = strsep(&token, argv[3]))) + printf("\et \-\-> %s\en", subtoken); + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR memchr (3), +.BR strchr (3), +.BR string (3), +.BR strpbrk (3), +.BR strspn (3), +.BR strstr (3), +.BR strtok (3) diff --git a/upstream/opensuse-leap-15-6/man3/strsignal.3 b/upstream/opensuse-leap-15-6/man3/strsignal.3 new file mode 100644 index 00000000..eae10970 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strsignal.3 @@ -0,0 +1,168 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright (C) 2020 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 17:59:03 1993 by Rik Faith (faith@cs.unc.edu) +.TH strsignal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strsignal, sigabbrev_np, sigdescr_np, sys_siglist \- +return string describing signal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strsignal(int " sig ); +.BI "const char *sigdescr_np(int " sig ); +.BI "const char *sigabbrev_np(int " sig ); +.PP +.BI "[[deprecated]] extern const char *const " sys_siglist []; +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR sigabbrev_np (), +.BR sigdescr_np (): +.nf + _GNU_SOURCE +.fi +.PP +.BR strsignal (): +.nf + From glibc 2.10 to glibc 2.31: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.PP +.IR sys_siglist : +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR strsignal () +function returns a string describing the signal +number passed in the argument +.IR sig . +The string can be used only until the next call to +.BR strsignal (). +The string returned by +.BR strsignal () +is localized according to the +.B LC_MESSAGES +category in the current locale. +.PP +The +.BR sigdescr_np () +function returns a string describing the signal +number passed in the argument +.IR sig . +Unlike +.BR strsignal () +this string is not influenced by the current locale. +.PP +The +.BR sigabbrev_np () +function returns the abbreviated name of the signal, +.IR sig . +For example, given the value +.BR SIGINT , +it returns the string "INT". +.PP +The (deprecated) array +.I sys_siglist +holds the signal description strings +indexed by signal number. +The +.BR strsignal () +or the +.BR sigdescr_np () +function should be used instead of this array; see also VERSIONS. +.SH RETURN VALUE +The +.BR strsignal () +function returns the appropriate description +string, or an unknown signal message if the signal number is invalid. +On some systems (but not on Linux), NULL may instead be +returned for an invalid signal number. +.PP +The +.BR sigdescr_np () +and +.BR sigabbrev_np () +functions return the appropriate description string. +The returned string is statically allocated and valid for +the lifetime of the program. +These functions return NULL for an invalid signal number. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR strsignal () +T} Thread safety T{ +MT-Unsafe race:strsignal locale +T} +T{ +.BR sigdescr_np (), +.BR sigabbrev_np () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strsignal () +POSIX.1-2008. +.TP +.BR sigdescr_np () +.TQ +.BR sigabbrev_np () +GNU. +.TP +.I sys_siglist +None. +.\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f +.SH HISTORY +.TP +.BR strsignal () +POSIX.1-2008. +Solaris, BSD. +.TP +.BR sigdescr_np () +.TQ +.BR sigabbrev_np () +glibc 2.32. +.TP +.I sys_siglist +Removed in glibc 2.32. +.SH NOTES +.BR sigdescr_np () +and +.BR sigabbrev_np () +are thread-safe and async-signal-safe. +.SH SEE ALSO +.BR psignal (3), +.BR strerror (3) diff --git a/upstream/opensuse-leap-15-6/man3/strspn.3 b/upstream/opensuse-leap-15-6/man3/strspn.3 new file mode 100644 index 00000000..201efb8f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strspn.3 @@ -0,0 +1,88 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 17:57:50 1993 by Rik Faith (faith@cs.unc.edu) +.TH strspn 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strspn, strcspn \- get length of a prefix substring +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t strspn(const char *" s ", const char *" accept ); +.BI "size_t strcspn(const char *" s ", const char *" reject ); +.fi +.SH DESCRIPTION +The +.BR strspn () +function calculates the length (in bytes) of the initial +segment of +.I s +which consists entirely of bytes in +.IR accept . +.PP +The +.BR strcspn () +function calculates the length of the initial +segment of +.I s +which consists entirely of bytes not in +.IR reject . +.SH RETURN VALUE +The +.BR strspn () +function returns the number of bytes in +the initial segment of +.I s +which consist only of bytes +from +.IR accept . +.PP +The +.BR strcspn () +function returns the number of bytes in +the initial segment of +.I s +which are not in the string +.IR reject . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strspn (), +.BR strcspn () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR memchr (3), +.BR strchr (3), +.BR string (3), +.BR strpbrk (3), +.BR strsep (3), +.BR strstr (3), +.BR strtok (3), +.BR wcscspn (3), +.BR wcsspn (3) diff --git a/upstream/opensuse-leap-15-6/man3/strstr.3 b/upstream/opensuse-leap-15-6/man3/strstr.3 new file mode 100644 index 00000000..b830338c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strstr.3 @@ -0,0 +1,99 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 17:56:43 1993 by Rik Faith (faith@cs.unc.edu) +.\" Added history, aeb, 980113. +.\" 2005-05-05 mtk: added strcasestr() +.\" +.TH strstr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strstr, strcasestr \- locate a substring +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strstr(const char *" haystack ", const char *" needle ); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "char *strcasestr(const char *" haystack ", const char *" needle ); +.fi +.SH DESCRIPTION +The +.BR strstr () +function finds the first occurrence of the substring +.I needle +in the string +.IR haystack . +The terminating null bytes (\[aq]\e0\[aq]) are not compared. +.PP +The +.BR strcasestr () +function is like +.BR strstr (), +but ignores the case of both arguments. +.SH RETURN VALUE +These functions return a pointer to the beginning of the +located substring, or NULL if the substring is not found. +.PP +If +.I needle +is the empty string, +the return value is always +.I haystack +itself. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strstr () +T} Thread safety MT-Safe +T{ +.BR strcasestr () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR strstr () +C11, POSIX.1-2008. +.TP +.BR strcasestr () +GNU. +.SH HISTORY +.TP +.BR strstr () +POSIX.1-2001, C89. +.TP +.BR strcasestr () +GNU. +.SH SEE ALSO +.BR memchr (3), +.BR memmem (3), +.BR strcasecmp (3), +.BR strchr (3), +.BR string (3), +.BR strpbrk (3), +.BR strsep (3), +.BR strspn (3), +.BR strtok (3), +.BR wcsstr (3) diff --git a/upstream/opensuse-leap-15-6/man3/strtod.3 b/upstream/opensuse-leap-15-6/man3/strtod.3 new file mode 100644 index 00000000..cdcb7530 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strtod.3 @@ -0,0 +1,208 @@ +'\" t +.\" 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. +.\" +.\" SPDX-License-Identifier: BSD-4-Clause-UC +.\" +.\" @(#)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 +.\" +.TH strtod 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strtod, strtof, strtold \- convert ASCII string to floating-point number +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double strtod(const char *restrict " nptr ", char **restrict " endptr ); +.BI "float strtof(const char *restrict " nptr ", char **restrict " endptr ); +.BI "long double strtold(const char *restrict " nptr \ +", char **restrict " endptr ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strtof (), +.BR strtold (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR strtod (), +.BR strtof (), +and +.BR strtold () +functions convert the initial portion of the string pointed to by +.I nptr +to +.IR double , +.IR float , +and +.I long double +representation, respectively. +.PP +The expected form of the (initial portion of the) string is +optional leading white space as recognized by +.BR isspace (3), +an optional plus (\[aq]+\[aq]) or minus sign (\[aq]\-\[aq]) and then either +(i) a decimal number, or (ii) a hexadecimal number, +or (iii) an infinity, or (iv) a NAN (not-a-number). +.PP +A +.I "decimal number" +consists of a nonempty sequence of decimal digits +possibly containing a radix character (decimal point, locale-dependent, +usually \[aq].\[aq]), optionally followed by a decimal exponent. +A decimal exponent consists of an \[aq]E\[aq] or \[aq]e\[aq], followed by an +optional plus or minus sign, followed by a nonempty sequence of +decimal digits, and indicates multiplication by a power of 10. +.PP +A +.I "hexadecimal number" +consists of a "0x" or "0X" followed by a nonempty sequence of +hexadecimal digits possibly containing a radix character, +optionally followed by a binary exponent. +A binary exponent +consists of a \[aq]P\[aq] or \[aq]p\[aq], followed by an optional +plus or minus sign, followed by a nonempty sequence of +decimal digits, and indicates multiplication by a power of 2. +At least one of radix character and binary exponent must be present. +.PP +An +.I infinity +is either "INF" or "INFINITY", disregarding case. +.PP +A +.I NAN +is "NAN" (disregarding case) optionally followed by a string, +.IR (n-char-sequence) , +where +.I n-char-sequence +specifies in an implementation-dependent +way the type of NAN (see NOTES). +.SH RETURN VALUE +These functions return the converted value, if any. +.PP +If +.I endptr +is not NULL, +a pointer to the character after the last character used in the conversion +is stored in the location referenced by +.IR endptr . +.PP +If no conversion is performed, zero is returned and (unless +.I endptr +is null) the value of +.I nptr +is stored in the location referenced by +.IR endptr . +.PP +If the correct value would cause overflow, plus or minus +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.B HUGE_VALL +is returned (according to the return type and sign of the value), +and +.B ERANGE +is stored in +.IR errno . +.PP +If the correct value would cause underflow, +a value with magnitude no larger than +.BR DBL_MIN , +.BR FLT_MIN , +or +.B LDBL_MIN +is returned and +.B ERANGE +is stored in +.IR errno . +.SH ERRORS +.TP +.B ERANGE +Overflow or underflow occurred. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strtod (), +.BR strtof (), +.BR strtold () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +In the glibc implementation, the +.I n-char-sequence +that optionally follows "NAN" +is interpreted as an integer number +(with an optional '0' or '0x' prefix to select base 8 or 16) +that is to be placed in the +mantissa component of the returned value. +.\" 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." +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR strtod () +C89, POSIX.1-2001. +.TP +.BR strtof () +.TQ +.BR strtold () +C99, POSIX.1-2001. +.SH NOTES +Since +0 can legitimately be returned +on both success and failure, the calling program should set +.I errno +to 0 before the call, +and then determine if an error occurred by checking whether +.I errno +has a nonzero value after the call. +.SH EXAMPLES +See the example on the +.BR strtol (3) +manual page; +the use of the functions described in this manual page is similar. +.SH SEE ALSO +.BR atof (3), +.BR atoi (3), +.BR atol (3), +.BR nan (3), +.BR nanf (3), +.BR nanl (3), +.BR strfromd (3), +.BR strtol (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/strtoimax.3 b/upstream/opensuse-leap-15-6/man3/strtoimax.3 new file mode 100644 index 00000000..bdd217f2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strtoimax.3 @@ -0,0 +1,71 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH strtoimax 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strtoimax, strtoumax \- convert string to integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr , +.BI " int " base ); +.BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr , +.BI " int " base ); +.fi +.SH DESCRIPTION +These functions are just like +.BR strtol (3) +and +.BR strtoul (3), +except that they return a value of type +.I intmax_t +and +.IR uintmax_t , +respectively. +.SH RETURN VALUE +On success, the converted value is returned. +If nothing was found to convert, zero is returned. +On overflow or underflow +.B INTMAX_MAX +or +.B INTMAX_MIN +or +.B UINTMAX_MAX +is returned, and +.I errno +is set to +.BR ERANGE . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strtoimax (), +.BR strtoumax () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR imaxabs (3), +.BR imaxdiv (3), +.BR strtol (3), +.BR strtoul (3), +.BR wcstoimax (3) diff --git a/upstream/opensuse-leap-15-6/man3/strtok.3 b/upstream/opensuse-leap-15-6/man3/strtok.3 new file mode 100644 index 00000000..c79ddc8f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strtok.3 @@ -0,0 +1,289 @@ +'\" t +.\" Copyright (C) 2005, 2013 Michael Kerrisk +.\" a few fragments from an earlier (1996) version by +.\" Andries Brouwer (aeb@cwi.nl) remain. +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Rewritten old page, 960210, aeb@cwi.nl +.\" Updated, added strtok_r. 2000-02-13 Nicolás Lichtmaier +.\" 2005-11-17, mtk: Substantial parts rewritten +.\" 2013-05-19, mtk: added much further detail on the operation of strtok() +.\" +.TH strtok 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strtok, strtok_r \- extract tokens from strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *strtok(char *restrict " str ", const char *restrict " delim ); +.BI "char *strtok_r(char *restrict " str ", const char *restrict " delim , +.BI " char **restrict " saveptr ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strtok_r (): +.nf + _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR strtok () +function breaks a string into a sequence of zero or more nonempty tokens. +On the first call to +.BR strtok (), +the string to be parsed should be +specified in +.IR str . +In each subsequent call that should parse the same string, +.I str +must be NULL. +.PP +The +.I delim +argument specifies a set of bytes that +delimit the tokens in the parsed string. +The caller may specify different strings in +.I delim +in successive +calls that parse the same string. +.PP +Each call to +.BR strtok () +returns a pointer to a +null-terminated string containing the next token. +This string does not include the delimiting byte. +If no more tokens are found, +.BR strtok () +returns NULL. +.PP +A sequence of calls to +.BR strtok () +that operate on the same string maintains a pointer +that determines the point from which to start searching for the next token. +The first call to +.BR strtok () +sets this pointer to point to the first byte of the string. +The start of the next token is determined by scanning forward +for the next nondelimiter byte in +.IR str . +If such a byte is found, it is taken as the start of the next token. +If no such byte is found, +then there are no more tokens, and +.BR strtok () +returns NULL. +(A string that is empty or that contains only delimiters +will thus cause +.BR strtok () +to return NULL on the first call.) +.PP +The end of each token is found by scanning forward until either +the next delimiter byte is found or until the +terminating null byte (\[aq]\e0\[aq]) is encountered. +If a delimiter byte is found, it is overwritten with +a null byte to terminate the current token, and +.BR strtok () +saves a pointer to the following byte; +that pointer will be used as the starting point +when searching for the next token. +In this case, +.BR strtok () +returns a pointer to the start of the found token. +.PP +From the above description, +it follows that a sequence of two or more contiguous delimiter bytes in +the parsed string is considered to be a single delimiter, and that +delimiter bytes at the start or end of the string are ignored. +Put another way: the tokens returned by +.BR strtok () +are always nonempty strings. +Thus, for example, given the string "\fIaaa;;bbb,\fP", +successive calls to +.BR strtok () +that specify the delimiter string "\fI;,\fP" +would return the strings "\fIaaa\fP" and "\fIbbb\fP", +and then a null pointer. +.PP +The +.BR strtok_r () +function is a reentrant version of +.BR strtok (). +The +.I saveptr +argument is a pointer to a +.I char\~* +variable that is used internally by +.BR strtok_r () +in order to maintain context between successive calls that parse the +same string. +.PP +On the first call to +.BR strtok_r (), +.I str +should point to the string to be parsed, and the value of +.I *saveptr +is ignored (but see NOTES). +In subsequent calls, +.I str +should be NULL, and +.I saveptr +(and the buffer that it points to) +should be unchanged since the previous call. +.PP +Different strings may be parsed concurrently using sequences of calls to +.BR strtok_r () +that specify different +.I saveptr +arguments. +.SH RETURN VALUE +The +.BR strtok () +and +.BR strtok_r () +functions return a pointer to +the next token, or NULL if there are no more tokens. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strtok () +T} Thread safety MT-Unsafe race:strtok +T{ +.BR strtok_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +On some implementations, +.\" Tru64, according to its manual page +.I *saveptr +is required to be NULL on the first call to +.BR strtok_r () +that is being used to parse +.IR str . +.SH STANDARDS +.TP +.BR strtok () +C11, POSIX.1-2008. +.TP +.BR strtok_r () +POSIX.1-2008. +.SH HISTORY +.TP +.BR strtok () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.TP +.BR strtok_r () +POSIX.1-2001. +.SH BUGS +Be cautious when using these functions. +If you do use them, note that: +.IP \[bu] 3 +These functions modify their first argument. +.IP \[bu] +These functions cannot be used on constant strings. +.IP \[bu] +The identity of the delimiting byte is lost. +.IP \[bu] +The +.BR strtok () +function uses a static buffer while parsing, so it's not thread safe. +Use +.BR strtok_r () +if this matters to you. +.SH EXAMPLES +The program below uses nested loops that employ +.BR strtok_r () +to break a string into a two-level hierarchy of tokens. +The first command-line argument specifies the string to be parsed. +The second argument specifies the delimiter byte(s) +to be used to separate that string into "major" tokens. +The third argument specifies the delimiter byte(s) +to be used to separate the "major" tokens into subtokens. +.PP +An example of the output produced by this program is the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out \[aq]a/bbb///cc;xxx:yyy:\[aq] \[aq]:;\[aq] \[aq]/\[aq]" +1: a/bbb///cc + \-\-> a + \-\-> bbb + \-\-> cc +2: xxx + \-\-> xxx +3: yyy + \-\-> yyy +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (strtok.c) +.EX +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + char *str1, *str2, *token, *subtoken; + char *saveptr1, *saveptr2; + int j; + + if (argc != 4) { + fprintf(stderr, "Usage: %s string delim subdelim\en", + argv[0]); + exit(EXIT_FAILURE); + } + + for (j = 1, str1 = argv[1]; ; j++, str1 = NULL) { + token = strtok_r(str1, argv[2], &saveptr1); + if (token == NULL) + break; + printf("%d: %s\en", j, token); + + for (str2 = token; ; str2 = NULL) { + subtoken = strtok_r(str2, argv[3], &saveptr2); + if (subtoken == NULL) + break; + printf("\et \-\-> %s\en", subtoken); + } + } + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.PP +Another example program using +.BR strtok () +can be found in +.BR getaddrinfo_a (3). +.SH SEE ALSO +.BR memchr (3), +.BR strchr (3), +.BR string (3), +.BR strpbrk (3), +.BR strsep (3), +.BR strspn (3), +.BR strstr (3), +.BR wcstok (3) diff --git a/upstream/opensuse-leap-15-6/man3/strtol.3 b/upstream/opensuse-leap-15-6/man3/strtol.3 new file mode 100644 index 00000000..d21dcc7c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strtol.3 @@ -0,0 +1,297 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2006 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu) +.\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610 +.TH strtol 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strtol, strtoll, strtoq \- convert a string to a long integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long strtol(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.BI "long long strtoll(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strtoll (): +.nf + _ISOC99_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR strtol () +function converts the initial part of the string +in +.I nptr +to a long integer value according to the given +.IR base , +which must be between 2 and 36 inclusive, or be the special value 0. +.PP +The string may begin with an arbitrary amount of white space (as +determined by +.BR isspace (3)) +followed by a single optional \[aq]+\[aq] or \[aq]\-\[aq] sign. +If +.I base +is zero or 16, the string may then include a +"0x" or "0X" prefix, and the number will be read in base 16; otherwise, a +zero +.I base +is taken as 10 (decimal) unless the next character +is \[aq]0\[aq], in which case it is taken as 8 (octal). +.PP +The remainder of the string is converted to a +.I long +value +in the obvious manner, stopping at the first character which is not a +valid digit in the given base. +(In bases above 10, the letter \[aq]A\[aq] in +either uppercase or lowercase represents 10, \[aq]B\[aq] represents 11, and so +forth, with \[aq]Z\[aq] representing 35.) +.PP +If +.I endptr +is not NULL, +.BR strtol () +stores the address of the +first invalid character in +.IR *endptr . +If there were no digits at +all, +.BR strtol () +stores the original value of +.I nptr +in +.I *endptr +(and returns 0). +In particular, if +.I *nptr +is not \[aq]\e0\[aq] but +.I **endptr +is \[aq]\e0\[aq] on return, the entire string is valid. +.PP +The +.BR strtoll () +function works just like the +.BR strtol () +function but returns a +.I long long +integer value. +.SH RETURN VALUE +The +.BR strtol () +function returns the result of the conversion, +unless the value would underflow or overflow. +If an underflow occurs, +.BR strtol () +returns +.BR LONG_MIN . +If an overflow occurs, +.BR strtol () +returns +.BR LONG_MAX . +In both cases, +.I errno +is set to +.BR ERANGE . +Precisely the same holds for +.BR strtoll () +(with +.B LLONG_MIN +and +.B LLONG_MAX +instead of +.B LONG_MIN +and +.BR LONG_MAX ). +.SH ERRORS +.TP +.B EINVAL +(not in C99) +The given +.I base +contains an unsupported value. +.TP +.B ERANGE +The resulting value was out of range. +.PP +The implementation may also set +.I errno +to +.B EINVAL +in case +no conversion was performed (no digits seen, and 0 returned). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strtol (), +.BR strtoll (), +.BR strtoq () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR strtol () +POSIX.1-2001, C89, SVr4, 4.3BSD. +.TP +.BR strtoll () +POSIX.1-2001, C99. +.SH NOTES +Since +.BR strtol () +can legitimately return 0, +.BR LONG_MAX , +or +.B LONG_MIN +.RB ( LLONG_MAX +or +.B LLONG_MIN +for +.BR strtoll ()) +on both success and failure, the calling program should set +.I errno +to 0 before the call, +and then determine if an error occurred by checking whether +.I errno +has a nonzero value after the call. +.PP +According to POSIX.1, +in locales other than "C" and "POSIX", +these functions may accept other, +implementation-defined numeric strings. +.PP +BSD also has +.PP +.in +4n +.EX +.BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base ); +.EE +.in +.PP +with completely analogous definition. +Depending on the wordsize of the current architecture, this +may be equivalent to +.BR strtoll () +or to +.BR strtol (). +.SH EXAMPLES +The program shown below demonstrates the use of +.BR strtol (). +The first command-line argument specifies a string from which +.BR strtol () +should parse a number. +The second (optional) argument specifies the base to be used for +the conversion. +(This argument is converted to numeric form using +.BR atoi (3), +a function that performs no error checking and +has a simpler interface than +.BR strtol ().) +Some examples of the results produced by this program are the following: +.PP +.in +4n +.EX +.RB "$" " ./a.out 123" +strtol() returned 123 +.RB "$" " ./a.out \[aq] 123\[aq]" +strtol() returned 123 +.RB "$" " ./a.out 123abc" +strtol() returned 123 +Further characters after number: "abc" +.RB "$" " ./a.out 123abc 55" +strtol: Invalid argument +.RB "$" " ./a.out \[aq]\[aq]" +No digits were found +.RB "$" " ./a.out 4000000000" +strtol: Numerical result out of range +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (strtol.c) +.EX +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int base; + char *endptr, *str; + long val; + + if (argc < 2) { + fprintf(stderr, "Usage: %s str [base]\en", argv[0]); + exit(EXIT_FAILURE); + } + + str = argv[1]; + base = (argc > 2) ? atoi(argv[2]) : 0; + + errno = 0; /* To distinguish success/failure after call */ + val = strtol(str, &endptr, base); + + /* Check for various possible errors. */ + + if (errno != 0) { + perror("strtol"); + exit(EXIT_FAILURE); + } + + if (endptr == str) { + fprintf(stderr, "No digits were found\en"); + exit(EXIT_FAILURE); + } + + /* If we got here, strtol() successfully parsed a number. */ + + printf("strtol() returned %ld\en", val); + + if (*endptr != \[aq]\e0\[aq]) /* Not necessarily an error... */ + printf("Further characters after number: \e"%s\e"\en", endptr); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR atof (3), +.BR atoi (3), +.BR atol (3), +.BR strtod (3), +.BR strtoimax (3), +.BR strtoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/strtoul.3 b/upstream/opensuse-leap-15-6/man3/strtoul.3 new file mode 100644 index 00000000..090ae8e1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strtoul.3 @@ -0,0 +1,221 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:54:03 1993 by Rik Faith (faith@cs.unc.edu) +.\" Fixed typo, aeb, 950823 +.\" 2002-02-22, joey, mihtjel: Added strtoull() +.\" +.TH strtoul 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strtoul, strtoull, strtouq \- convert a string to an unsigned long integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "unsigned long strtoul(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.BI "unsigned long long strtoull(const char *restrict " nptr , +.BI " char **restrict " endptr ", int " base ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR strtoull (): +.nf + _ISOC99_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR strtoul () +function converts the initial part of the string +in +.I nptr +to an +.I "unsigned long" +value according to the +given +.IR base , +which must be between 2 and 36 inclusive, or be +the special value 0. +.PP +The string may begin with an arbitrary amount of white space (as +determined by +.BR isspace (3)) +followed by a single optional \[aq]+\[aq] or \[aq]\-\[aq] +sign. +If +.I base +is zero or 16, the string may then include a +"0x" prefix, and the number will be read in base 16; otherwise, a +zero +.I base +is taken as 10 (decimal) unless the next character +is \[aq]0\[aq], in which case it is taken as 8 (octal). +.PP +The remainder of the string is converted to an +.I "unsigned long" +value in the obvious manner, +stopping at the first character which is not a +valid digit in the given base. +(In bases above 10, the letter \[aq]A\[aq] in +either uppercase or lowercase represents 10, \[aq]B\[aq] represents 11, and so +forth, with \[aq]Z\[aq] representing 35.) +.PP +If +.I endptr +is not NULL, +.BR strtoul () +stores the address of the +first invalid character in +.IR *endptr . +If there were no digits at +all, +.BR strtoul () +stores the original value of +.I nptr +in +.I *endptr +(and returns 0). +In particular, if +.I *nptr +is not \[aq]\e0\[aq] but +.I **endptr +is \[aq]\e0\[aq] on return, the entire string is valid. +.PP +The +.BR strtoull () +function works just like the +.BR strtoul () +function but returns an +.I "unsigned long long" +value. +.SH RETURN VALUE +The +.BR strtoul () +function returns either the result of the conversion +or, if there was a leading minus sign, the negation of the result of the +conversion represented as an unsigned value, +unless the original (nonnegated) value would overflow; in +the latter case, +.BR strtoul () +returns +.B ULONG_MAX +and sets +.I errno +to +.BR ERANGE . +Precisely the same holds for +.BR strtoull () +(with +.B ULLONG_MAX +instead of +.BR ULONG_MAX ). +.SH ERRORS +.TP +.B EINVAL +(not in C99) +The given +.I base +contains an unsupported value. +.TP +.B ERANGE +The resulting value was out of range. +.PP +The implementation may also set +.I errno +to +.B EINVAL +in case +no conversion was performed (no digits seen, and 0 returned). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strtoul (), +.BR strtoull (), +.BR strtouq () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +.TP +.BR strtoul () +POSIX.1-2001, C89, SVr4. +.TP +.BR strtoull () +POSIX.1-2001, C99. +.SH NOTES +Since +.BR strtoul () +can legitimately return 0 or +.B ULONG_MAX +.RB ( ULLONG_MAX +for +.BR strtoull ()) +on both success and failure, the calling program should set +.I errno +to 0 before the call, +and then determine if an error occurred by checking whether +.I errno +has a nonzero value after the call. +.PP +In locales other than the "C" locale, other strings may be accepted. +(For example, the thousands separator of the current locale may be +supported.) +.PP +BSD also has +.PP +.in +4n +.EX +.BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base ); +.EE +.in +.PP +with completely analogous definition. +Depending on the wordsize of the current architecture, this +may be equivalent to +.BR strtoull () +or to +.BR strtoul (). +.PP +Negative values are considered valid input and are +silently converted to the equivalent +.I "unsigned long" +value. +.SH EXAMPLES +See the example on the +.BR strtol (3) +manual page; +the use of the functions described in this manual page is similar. +.SH SEE ALSO +.BR a64l (3), +.BR atof (3), +.BR atoi (3), +.BR atol (3), +.BR strtod (3), +.BR strtol (3), +.BR strtoumax (3) diff --git a/upstream/opensuse-leap-15-6/man3/strverscmp.3 b/upstream/opensuse-leap-15-6/man3/strverscmp.3 new file mode 100644 index 00000000..f043d06d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strverscmp.3 @@ -0,0 +1,149 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer +.\" and Copyright (C) 2016 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH strverscmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strverscmp \- compare two version strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int strverscmp(const char *" s1 ", const char *" s2 ); +.fi +.SH DESCRIPTION +Often one has files +.IR jan1 ", " jan2 ", ..., " jan9 ", " jan10 ", ..." +and it feels wrong when +.BR ls (1) +orders them +.IR jan1 ", " jan10 ", ..., " jan2 ", ..., " jan9 . +.\" classical solution: "rename jan jan0 jan?" +In order to rectify this, GNU introduced the +.I \-v +option to +.BR ls (1), +which is implemented using +.BR versionsort (3), +which again uses +.BR strverscmp (). +.PP +Thus, the task of +.BR strverscmp () +is to compare two strings and find the "right" order, while +.BR strcmp (3) +finds only the lexicographic order. +This function does not use +the locale category +.BR LC_COLLATE , +so is meant mostly for situations +where the strings are expected to be in ASCII. +.PP +What this function does is the following. +If both strings are equal, return 0. +Otherwise, find the position +between two bytes with the property that before it both strings are equal, +while directly after it there is a difference. +Find the largest consecutive digit strings containing (or starting at, +or ending at) this position. +If one or both of these is empty, +then return what +.BR strcmp (3) +would have returned (numerical ordering of byte values). +Otherwise, compare both digit strings numerically, where digit strings with +one or more leading zeros are interpreted as if they have a decimal point +in front (so that in particular digit strings with more leading zeros +come before digit strings with fewer leading zeros). +Thus, the ordering is +.IR 000 ", " 00 ", " 01 ", " 010 ", " 09 ", " 0 ", " 1 ", " 9 ", " 10 . +.SH RETURN VALUE +The +.BR strverscmp () +function returns an integer +less than, equal to, or greater than zero if +.I s1 +is found, respectively, to be earlier than, equal to, +or later than +.IR s2 . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strverscmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.\" FIXME: The marking is different from that in the glibc manual, +.\" which has: +.\" +.\" strverscmp: MT-Safe locale +.\" +.\" glibc manual says strverscmp should have marking locale because it calls +.\" isdigit() multiple times and isdigit() uses locale variable. +.\" But isdigit() has two implementations. With different compiling conditions, +.\" we may call isdigit() in macro, then strverscmp() should not have locale +.\" problem. +.SH STANDARDS +GNU. +.SH EXAMPLES +The program below can be used to demonstrate the behavior of +.BR strverscmp (). +It uses +.BR strverscmp () +to compare the two strings given as its command-line arguments. +An example of its use is the following: +.PP +.in +4n +.EX +$ \fB./a.out jan1 jan10\fP +jan1 < jan10 +.EE +.in +.SS Program source +\& +.\" SRC BEGIN (strverscmp.c) +.EX +#define _GNU_SOURCE +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + int res; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \en", argv[0]); + exit(EXIT_FAILURE); + } + + res = strverscmp(argv[1], argv[2]); + + printf("%s %s %s\en", argv[1], + (res < 0) ? "<" : (res == 0) ? "==" : ">", argv[2]); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR rename (1), +.BR strcasecmp (3), +.BR strcmp (3), +.BR strcoll (3) diff --git a/upstream/opensuse-leap-15-6/man3/strxfrm.3 b/upstream/opensuse-leap-15-6/man3/strxfrm.3 new file mode 100644 index 00000000..f10adff1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/strxfrm.3 @@ -0,0 +1,89 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 10:41:28 1993 by Rik Faith (faith@cs.unc.edu) +.TH strxfrm 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +strxfrm \- string transformation +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t strxfrm(char " dest "[restrict ." n "], \ +const char " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR strxfrm () +function transforms the +.I src +string into a +form such that the result of +.BR strcmp (3) +on two strings that have +been transformed with +.BR strxfrm () +is the same as the result of +.BR strcoll (3) +on the two strings before their transformation. +The first +.I n +bytes of the transformed string are placed in +.IR dest . +The transformation is based on the program's current +locale for category +.BR LC_COLLATE . +(See +.BR setlocale (3)). +.SH RETURN VALUE +The +.BR strxfrm () +function returns the number of bytes required to +store the transformed string in +.I dest +excluding the +terminating null byte (\[aq]\e0\[aq]). +If the value returned is +.I n +or more, the +contents of +.I dest +are indeterminate. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR strxfrm () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD. +.SH SEE ALSO +.BR memcmp (3), +.BR setlocale (3), +.BR strcasecmp (3), +.BR strcmp (3), +.BR strcoll (3), +.BR string (3) diff --git a/upstream/opensuse-leap-15-6/man3/swab.3 b/upstream/opensuse-leap-15-6/man3/swab.3 new file mode 100644 index 00000000..ec9f73a0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/swab.3 @@ -0,0 +1,79 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 17:52:15 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2001-12-15, aeb +.TH swab 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +swab \- swap adjacent bytes +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void swab(const void " from "[restrict ." n "], void " to "[restrict ." n ], +.BI " ssize_t " n ); +.fi +.SH DESCRIPTION +The +.BR swab () +function copies +.I n +bytes from the array pointed +to by +.I from +to the array pointed to by +.IR to , +exchanging +adjacent even and odd bytes. +This function is used to exchange data +between machines that have different low/high byte ordering. +.PP +This function does nothing when +.I n +is negative. +When +.I n +is positive and odd, it handles +.I n\-1 +bytes +as above, and does something unspecified with the last byte. +(In other words, +.I n +should be even.) +.SH RETURN VALUE +The +.BR swab () +function returns no value. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR swab () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.SH SEE ALSO +.BR bstring (3) diff --git a/upstream/opensuse-leap-15-6/man3/sysconf.3 b/upstream/opensuse-leap-15-6/man3/sysconf.3 new file mode 100644 index 00000000..3090ce9c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sysconf.3 @@ -0,0 +1,393 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 17:51:42 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified Tue Aug 17 11:42:20 1999 by Ariel Scolnicov (ariels@compugen.co.il) +.TH sysconf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sysconf \- get configuration information at run time +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long sysconf(int " "name" ); +.fi +.SH DESCRIPTION +POSIX allows an application to test at compile or run time +whether certain options are supported, or what the value is +of certain configurable constants or limits. +.PP +At compile time this is done by including +.I +and/or +.I +and testing the value of certain macros. +.PP +At run time, one can ask for numerical values using the present function +.BR sysconf (). +One can ask for numerical values that may depend +on the filesystem in which a file resides using +.BR fpathconf (3) +and +.BR pathconf (3). +One can ask for string values using +.BR confstr (3). +.PP +The values obtained from these functions are system configuration constants. +They do not change during the lifetime of a process. +.\" except that sysconf(_SC_OPEN_MAX) may change answer after a call +.\" to setrlimit( ) which changes the RLIMIT_NOFILE soft limit +.PP +For options, typically, there is a constant +.B _POSIX_FOO +that may be defined in +.IR . +If it is undefined, one should ask at run time. +If it is defined to \-1, then the option is not supported. +If it is defined to 0, then relevant functions and headers exist, +but one has to ask at run time what degree of support is available. +If it is defined to a value other than \-1 or 0, then the option is +supported. +Usually the value (such as 200112L) indicates the year and month +of the POSIX revision describing the option. +glibc uses the value 1 +to indicate support as long as the POSIX revision has not been published yet. +.\" and 999 to indicate support for options no longer present in the latest +.\" standard. (?) +The +.BR sysconf () +argument will be +.BR _SC_FOO . +For a list of options, see +.BR posixoptions (7). +.PP +For variables or limits, typically, there is a constant +.BR _FOO , +maybe defined in +.IR , +or +.BR _POSIX_FOO , +maybe defined in +.IR . +The constant will not be defined if the limit is unspecified. +If the constant is defined, it gives a guaranteed value, and +a greater value might actually be supported. +If an application wants to take advantage of values which may change +between systems, a call to +.BR sysconf () +can be made. +The +.BR sysconf () +argument will be +.BR _SC_FOO . +.SS POSIX.1 variables +We give the name of the variable, the name of the +.BR sysconf () +argument used to inquire about its value, +and a short description. +.PP +First, the POSIX.1 compatible values. +.\" [for the moment: only the things that are unconditionally present] +.\" .TP +.\" .BR AIO_LISTIO_MAX " - " _SC_AIO_LISTIO_MAX +.\" (if _POSIX_ASYNCHRONOUS_IO) +.\" Maximum number of I/O operations in a single list I/O call. +.\" Must not be less than _POSIX_AIO_LISTIO_MAX. +.\" .TP +.\" .BR AIO_MAX " - " _SC_AIO_MAX +.\" (if _POSIX_ASYNCHRONOUS_IO) +.\" Maximum number of outstanding asynchronous I/O operations. +.\" Must not be less than _POSIX_AIO_MAX. +.\" .TP +.\" .BR AIO_PRIO_DELTA_MAX " - " _SC_AIO_PRIO_DELTA_MAX +.\" (if _POSIX_ASYNCHRONOUS_IO) +.\" The maximum amount by which a process can decrease its +.\" asynchronous I/O priority level from its own scheduling priority. +.\" Must be nonnegative. +.TP +.BR ARG_MAX " - " _SC_ARG_MAX +The maximum length of the arguments to the +.BR exec (3) +family of functions. +Must not be less than +.B _POSIX_ARG_MAX +(4096). +.TP +.BR CHILD_MAX " - " _SC_CHILD_MAX +The maximum number of simultaneous processes per user ID. +Must not be less than +.B _POSIX_CHILD_MAX +(25). +.TP +.BR HOST_NAME_MAX " - " _SC_HOST_NAME_MAX +Maximum length of a hostname, not including the terminating null byte, +as returned by +.BR gethostname (2). +Must not be less than +.B _POSIX_HOST_NAME_MAX +(255). +.TP +.BR LOGIN_NAME_MAX " - " _SC_LOGIN_NAME_MAX +Maximum length of a login name, including the terminating null byte. +Must not be less than +.B _POSIX_LOGIN_NAME_MAX +(9). +.TP +.BR NGROUPS_MAX " - " _SC_NGROUPS_MAX +Maximum number of supplementary group IDs. +.TP +.BR "" "clock ticks - " _SC_CLK_TCK +The number of clock ticks per second. +The corresponding variable is obsolete. +It was of course called +.BR CLK_TCK . +(Note: the macro +.B CLOCKS_PER_SEC +does not give information: it must equal 1000000.) +.TP +.BR OPEN_MAX " - " _SC_OPEN_MAX +The maximum number of files that a process can have open at any time. +Must not be less than +.B _POSIX_OPEN_MAX +(20). +.TP +.BR PAGESIZE " - " _SC_PAGESIZE +Size of a page in bytes. +Must not be less than 1. +.TP +.BR PAGE_SIZE " - " _SC_PAGE_SIZE +A synonym for +.BR PAGESIZE / _SC_PAGESIZE . +(Both +.B PAGESIZE +and +.B PAGE_SIZE +are specified in POSIX.) +.TP +.BR RE_DUP_MAX " - " _SC_RE_DUP_MAX +The number of repeated occurrences of a BRE permitted by +.BR regexec (3) +and +.BR regcomp (3). +Must not be less than +.B _POSIX2_RE_DUP_MAX +(255). +.TP +.BR STREAM_MAX " - " _SC_STREAM_MAX +The maximum number of streams that a process can have open at any +time. +If defined, it has the same value as the standard C macro +.BR FOPEN_MAX . +Must not be less than +.B _POSIX_STREAM_MAX +(8). +.TP +.BR SYMLOOP_MAX " - " _SC_SYMLOOP_MAX +The maximum number of symbolic links seen in a pathname before resolution +returns +.BR ELOOP . +Must not be less than +.B _POSIX_SYMLOOP_MAX +(8). +.TP +.BR TTY_NAME_MAX " - " _SC_TTY_NAME_MAX +The maximum length of terminal device name, +including the terminating null byte. +Must not be less than +.B _POSIX_TTY_NAME_MAX +(9). +.TP +.BR TZNAME_MAX " - " _SC_TZNAME_MAX +The maximum number of bytes in a timezone name. +Must not be less than +.B _POSIX_TZNAME_MAX +(6). +.TP +.BR _POSIX_VERSION " - " _SC_VERSION +indicates the year and month the POSIX.1 standard was approved in the +format +.BR YYYYMML ; +the value +.B 199009L +indicates the Sept. 1990 revision. +.SS POSIX.2 variables +Next, the POSIX.2 values, giving limits for utilities. +.TP +.BR BC_BASE_MAX " - " _SC_BC_BASE_MAX +indicates the maximum +.I obase +value accepted by the +.BR bc (1) +utility. +.TP +.BR BC_DIM_MAX " - " _SC_BC_DIM_MAX +indicates the maximum value of elements permitted in an array by +.BR bc (1). +.TP +.BR BC_SCALE_MAX " - " _SC_BC_SCALE_MAX +indicates the maximum +.I scale +value allowed by +.BR bc (1). +.TP +.BR BC_STRING_MAX " - " _SC_BC_STRING_MAX +indicates the maximum length of a string accepted by +.BR bc (1). +.TP +.BR COLL_WEIGHTS_MAX " - " _SC_COLL_WEIGHTS_MAX +indicates the maximum numbers of weights that can be assigned to an +entry of the +.B LC_COLLATE order +keyword in the locale definition file. +.TP +.BR EXPR_NEST_MAX " - " _SC_EXPR_NEST_MAX +is the maximum number of expressions which can be nested within +parentheses by +.BR expr (1). +.TP +.BR LINE_MAX " - " _SC_LINE_MAX +The maximum length of a utility's input line, either from +standard input or from a file. +This includes space for a trailing +newline. +.TP +.BR RE_DUP_MAX " - " _SC_RE_DUP_MAX +The maximum number of repeated occurrences of a regular expression when +the interval notation +.B \e{m,n\e} +is used. +.TP +.BR POSIX2_VERSION " - " _SC_2_VERSION +indicates the version of the POSIX.2 standard in the format of +YYYYMML. +.TP +.BR POSIX2_C_DEV " - " _SC_2_C_DEV +indicates whether the POSIX.2 C language development facilities are +supported. +.TP +.BR POSIX2_FORT_DEV " - " _SC_2_FORT_DEV +indicates whether the POSIX.2 FORTRAN development utilities are +supported. +.TP +.BR POSIX2_FORT_RUN " - " _SC_2_FORT_RUN +indicates whether the POSIX.2 FORTRAN run-time utilities are supported. +.TP +.BR _POSIX2_LOCALEDEF " - " _SC_2_LOCALEDEF +indicates whether the POSIX.2 creation of locales via +.BR localedef (1) +is supported. +.TP +.BR POSIX2_SW_DEV " - " _SC_2_SW_DEV +indicates whether the POSIX.2 software development utilities option is +supported. +.PP +These values also exist, but may not be standard. +.TP +.BR "" " - " _SC_PHYS_PAGES +The number of pages of physical memory. +Note that it is possible +for the product of this value and the value of +.B _SC_PAGESIZE +to overflow. +.TP +.BR "" " - " _SC_AVPHYS_PAGES +The number of currently available pages of physical memory. +.TP +.BR "" " - " _SC_NPROCESSORS_CONF +The number of processors configured. +See also +.BR get_nprocs_conf (3). +.TP +.BR "" " - " _SC_NPROCESSORS_ONLN +The number of processors currently online (available). +See also +.BR get_nprocs_conf (3). +.SH RETURN VALUE +The return value of +.BR sysconf () +is one of the following: +.IP \[bu] 3 +On error, \-1 is returned and +.I errno +is set to indicate the error +(for example, +.BR EINVAL , +indicating that +.I name +is invalid). +.IP \[bu] +If +.I name +corresponds to a maximum or minimum limit, and that limit is indeterminate, +\-1 is returned and +.I errno +is not changed. +(To distinguish an indeterminate limit from an error, set +.I errno +to zero before the call, and then check whether +.I errno +is nonzero when \-1 is returned.) +.IP \[bu] +If +.I name +corresponds to an option, +a positive value is returned if the option is supported, +and \-1 is returned if the option is not supported. +.IP \[bu] +Otherwise, +the current value of the option or limit is returned. +This value will not be more restrictive than +the corresponding value that was described to the application in +.I +or +.I +when the application was compiled. +.SH ERRORS +.TP +.B EINVAL +.I name +is invalid. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sysconf () +T} Thread safety MT-Safe env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH BUGS +It is difficult to use +.B ARG_MAX +because it is not specified how much of the argument space for +.BR exec (3) +is consumed by the user's environment variables. +.PP +Some returned values may be huge; they are not suitable for allocating +memory. +.SH SEE ALSO +.BR bc (1), +.BR expr (1), +.BR getconf (1), +.BR locale (1), +.BR confstr (3), +.BR fpathconf (3), +.BR pathconf (3), +.BR posixoptions (7) diff --git a/upstream/opensuse-leap-15-6/man3/syslog.3 b/upstream/opensuse-leap-15-6/man3/syslog.3 new file mode 100644 index 00000000..17926289 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/syslog.3 @@ -0,0 +1,360 @@ +'\" t +.\" Written Feb 1994 by Steve Greenland (stevegr@neosoft.com) +.\" and Copyright 2001, 2017 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Updated 1999.12.19 by Karl M. Hegbloom +.\" +.\" Updated 13 Oct 2001, Michael Kerrisk +.\" Added description of vsyslog +.\" Added descriptions of LOG_ODELAY and LOG_NOWAIT +.\" Added brief description of facility and option arguments +.\" Added CONFORMING TO section +.\" 2001-10-13, aeb, minor changes +.\" Modified 13 Dec 2001, Martin Schulze +.\" Modified 3 Jan 2002, Michael Kerrisk +.\" +.TH syslog 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +closelog, openlog, syslog, vsyslog \- send messages to the system logger +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void openlog(const char *" ident ", int " option ", int " facility ); +.BI "void syslog(int " priority ", const char *" format ", ...);" +.B "void closelog(void);" +.PP +.BI "void vsyslog(int " priority ", const char *" format ", va_list " ap ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR vsyslog (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +.SS openlog() +.BR openlog () +opens a connection to the system logger for a program. +.PP +The string pointed to by +.I ident +is prepended to every message, and is typically set to the program name. +If +.I ident +is NULL, the program name is used. +(POSIX.1-2008 does not specify the behavior when +.I ident +is NULL.) +.PP +The +.I option +argument specifies flags which control the operation of +.BR openlog () +and subsequent calls to +.BR syslog (). +The +.I facility +argument establishes a default to be used if +none is specified in subsequent calls to +.BR syslog (). +The values that may be specified for +.I option +and +.I facility +are described below. +.PP +The use of +.BR openlog () +is optional; it will automatically be called by +.BR syslog () +if necessary, in which case +.I ident +will default to NULL. +.\" +.SS syslog() and vsyslog() +.BR syslog () +generates a log message, which will be distributed by +.BR syslogd (8). +.PP +The +.I priority +argument is formed by ORing together a +.I facility +value and a +.I level +value (described below). +If no +.I facility +value is ORed into +.IR priority , +then the default value set by +.BR openlog () +is used, or, if there was no preceding +.BR openlog () +call, a default of +.B LOG_USER +is employed. +.PP +The remaining arguments are a +.IR format , +as in +.BR printf (3), +and any arguments required by the +.IR format , +except that the two-character sequence +.B %m +will be replaced by +the error message string +.IR strerror ( errno ). +The format string need not include a terminating newline character. +.PP +The function +.BR vsyslog () +performs the same task as +.BR syslog () +with the difference that it takes a set of arguments which have +been obtained using the +.BR stdarg (3) +variable argument list macros. +.\" +.SS closelog() +.BR closelog () +closes the file descriptor being used to write to the system logger. +The use of +.BR closelog () +is optional. +.\" +.SS Values for \fIoption\fP +The +.I option +argument to +.BR openlog () +is a bit mask constructed by ORing together any of the following values: +.TP 15 +.B LOG_CONS +Write directly to the system console if there is an error while sending to +the system logger. +.TP +.B LOG_NDELAY +Open the connection immediately (normally, the connection is opened when +the first message is logged). +This may be useful, for example, if a subsequent +.BR chroot (2) +would make the pathname used internally by the logging facility unreachable. +.TP +.B LOG_NOWAIT +Don't wait for child processes that may have been created while logging +the message. +(The GNU C library does not create a child process, so this +option has no effect on Linux.) +.TP +.B LOG_ODELAY +The converse of +.BR LOG_NDELAY ; +opening of the connection is delayed until +.BR syslog () +is called. +(This is the default, and need not be specified.) +.TP +.B LOG_PERROR +(Not in POSIX.1-2001 or POSIX.1-2008.) +Also log the message to +.IR stderr . +.TP +.B LOG_PID +Include the caller's PID with each message. +.\" +.SS Values for \fIfacility\fP +The +.I facility +argument is used to specify what type of program is logging the message. +This lets the configuration file specify that messages from different +facilities will be handled differently. +.TP 15 +.B LOG_AUTH +security/authorization messages +.TP +.B LOG_AUTHPRIV +security/authorization messages (private) +.TP +.B LOG_CRON +clock daemon +.RB ( cron " and " at ) +.TP +.B LOG_DAEMON +system daemons without separate facility value +.TP +.B LOG_FTP +ftp daemon +.TP +.B LOG_KERN +kernel messages (these can't be generated from user processes) +.\" LOG_KERN has the value 0; if used as a facility, zero translates to: +.\" "use the default facility". +.TP +.BR LOG_LOCAL0 " through " LOG_LOCAL7 +reserved for local use +.TP +.B LOG_LPR +line printer subsystem +.TP +.B LOG_MAIL +mail subsystem +.TP +.B LOG_NEWS +USENET news subsystem +.TP +.B LOG_SYSLOG +messages generated internally by +.BR syslogd (8) +.TP +.BR LOG_USER " (default)" +generic user-level messages +.TP +.B LOG_UUCP +UUCP subsystem +.\" +.SS Values for \fIlevel\fP +This determines the importance of the message. +The levels are, in order of decreasing importance: +.TP 15 +.B LOG_EMERG +system is unusable +.TP +.B LOG_ALERT +action must be taken immediately +.TP +.B LOG_CRIT +critical conditions +.TP +.B LOG_ERR +error conditions +.TP +.B LOG_WARNING +warning conditions +.TP +.B LOG_NOTICE +normal, but significant, condition +.TP +.B LOG_INFO +informational message +.TP +.B LOG_DEBUG +debug-level message +.PP +The function +.BR setlogmask (3) +can be used to restrict logging to specified levels only. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR openlog (), +.BR closelog () +T} Thread safety MT-Safe +T{ +.BR syslog (), +.BR vsyslog () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR syslog () +.TQ +.BR openlog () +.TQ +.BR closelog () +POSIX.1-2008. +.TP +.BR vsyslog () +None. +.SH HISTORY +.TP +.BR syslog () +4.2BSD, SUSv2, POSIX.1-2001. +.TP +.BR openlog () +.TQ +.BR closelog () +4.3BSD, SUSv2, POSIX.1-2001. +.\" .SH HISTORY +.\" 4.3BSD documents +.\" .BR setlogmask (). +.TP +.BR vsyslog () +4.3BSD-Reno. +.\" Of course early v* functions used the +.\" .I +.\" mechanism, which is not compatible with +.\" .IR . +.PP +POSIX.1-2001 specifies only the +.B LOG_USER +and +.B LOG_LOCAL* +values for +.IR facility . +However, with the exception of +.B LOG_AUTHPRIV +and +.BR LOG_FTP , +the other +.I facility +values appear on most UNIX systems. +.PP +The +.B LOG_PERROR +value for +.I option +is not specified by POSIX.1-2001 or POSIX.1-2008, but is available +in most versions of UNIX. +.SH NOTES +The argument +.I ident +in the call of +.BR openlog () +is probably stored as-is. +Thus, if the string it points to +is changed, +.BR syslog () +may start prepending the changed string, and if the string +it points to ceases to exist, the results are undefined. +Most portable is to use a string constant. +.PP +Never pass a string with user-supplied data as a format, +use the following instead: +.PP +.in +4n +.EX +syslog(priority, "%s", string); +.EE +.in +.SH SEE ALSO +.BR journalctl (1), +.BR logger (1), +.BR setlogmask (3), +.BR syslog.conf (5), +.BR syslogd (8) diff --git a/upstream/opensuse-leap-15-6/man3/system.3 b/upstream/opensuse-leap-15-6/man3/system.3 new file mode 100644 index 00000000..3b81e7b7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/system.3 @@ -0,0 +1,272 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright (c) 2014 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 17:51:15 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 11 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk) +.\" Modified 14 May 2001, 23 Sep 2001 by aeb +.\" 2004-12-20, mtk +.\" +.TH system 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +system \- execute a shell command +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int system(const char *" "command" ); +.fi +.SH DESCRIPTION +The +.BR system () +library function behaves as if it used +.BR fork (2) +to create a child process that executed the shell command specified in +.I command +using +.BR execl (3) +as follows: +.PP +.in +4n +.EX +execl("/bin/sh", "sh", "\-c", command, (char *) NULL); +.EE +.in +.PP +.BR system () +returns after the command has been completed. +.PP +During execution of the command, +.B SIGCHLD +will be blocked, and +.B SIGINT +and +.B SIGQUIT +will be ignored, in the process that calls +.BR system (). +(These signals will be handled according to their defaults inside +the child process that executes +.IR command .) +.PP +If +.I command +is NULL, then +.BR system () +returns a status indicating whether a shell is available on the system. +.SH RETURN VALUE +The return value of +.BR system () +is one of the following: +.IP \[bu] 3 +If +.I command +is NULL, then a nonzero value if a shell is available, +or 0 if no shell is available. +.IP \[bu] +If a child process could not be created, +or its status could not be retrieved, +the return value is \-1 and +.I errno +is set to indicate the error. +.IP \[bu] +If a shell could not be executed in the child process, +then the return value is as though the child shell terminated by calling +.BR _exit (2) +with the status 127. +.IP \[bu] +If all system calls succeed, +then the return value is the termination status of the child shell +used to execute +.IR command . +(The termination status of a shell is the termination status of +the last command it executes.) +.PP +In the last two cases, +the return value is a "wait status" that can be examined using +the macros described in +.BR waitpid (2). +(i.e., +.BR WIFEXITED (), +.BR WEXITSTATUS (), +and so on). +.PP +.BR system () +does not affect the wait status of any other children. +.SH ERRORS +.BR system () +can fail with any of the same errors as +.BR fork (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR system () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89. +.SH NOTES +.BR system () +provides simplicity and convenience: +it handles all of the details of calling +.BR fork (2), +.BR execl (3), +and +.BR waitpid (2), +as well as the necessary manipulations of signals; +in addition, +the shell performs the usual substitutions and I/O redirections for +.IR command . +The main cost of +.BR system () +is inefficiency: +additional system calls are required to create the process that +runs the shell and to execute the shell. +.PP +If the +.B _XOPEN_SOURCE +feature test macro is defined +(before including +.I any +header files), +then the macros described in +.BR waitpid (2) +.RB ( WEXITSTATUS (), +etc.) are made available when including +.IR . +.PP +As mentioned, +.BR system () +ignores +.B SIGINT +and +.BR SIGQUIT . +This may make programs that call it +from a loop uninterruptible, unless they take care themselves +to check the exit status of the child. +For example: +.PP +.in +4n +.EX +while (something) { + int ret = system("foo"); + + if (WIFSIGNALED(ret) && + (WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT)) + break; +} +.EE +.in +.PP +According to POSIX.1, it is unspecified whether handlers registered using +.BR pthread_atfork (3) +are called during the execution of +.BR system (). +In the glibc implementation, such handlers are not called. +.PP +Before glibc 2.1.3, the check for the availability of +.I /bin/sh +was not actually performed if +.I command +was NULL; instead it was always assumed to be available, and +.BR system () +always returned 1 in this case. +Since glibc 2.1.3, this check is performed because, even though +POSIX.1-2001 requires a conforming implementation to provide +a shell, that shell may not be available or executable if +the calling program has previously called +.BR chroot (2) +(which is not specified by POSIX.1-2001). +.PP +It is possible for the shell command to terminate with a status of 127, +which yields a +.BR system () +return value that is indistinguishable from the case +where a shell could not be executed in the child process. +.\" +.SS Caveats +Do not use +.BR system () +from a privileged program +(a set-user-ID or set-group-ID program, or a program with capabilities) +because strange values for some environment variables +might be used to subvert system integrity. +For example, +.B PATH +could be manipulated so that an arbitrary program +is executed with privilege. +Use the +.BR exec (3) +family of functions instead, but not +.BR execlp (3) +or +.BR execvp (3) +(which also use the +.B PATH +environment variable to search for an executable). +.PP +.BR system () +will not, in fact, work properly from programs with set-user-ID or +set-group-ID privileges on systems on which +.I /bin/sh +is bash version 2: as a security measure, bash 2 drops privileges on startup. +(Debian uses a different shell, +.BR dash (1), +which does not do this when invoked as +.BR sh .) +.PP +Any user input that is employed as part of +.I command +should be +.I carefully +sanitized, to ensure that unexpected shell commands or command options +are not executed. +Such risks are especially grave when using +.BR system () +from a privileged program. +.SH BUGS +.\" [BUG 211029](https://bugzilla.kernel.org/show_bug.cgi?id=211029) +.\" [glibc bug](https://sourceware.org/bugzilla/show_bug.cgi?id=27143) +.\" [POSIX bug](https://www.austingroupbugs.net/view.php?id=1440) +If the command name starts with a hyphen, +.BR sh (1) +interprets the command name as an option, +and the behavior is undefined. +(See the +.B \-c +option to +.BR sh (1).) +To work around this problem, +prepend the command with a space as in the following call: +.PP +.in +4n +.EX + system(" \-unfortunate\-command\-name"); +.EE +.in +.SH SEE ALSO +.BR sh (1), +.BR execve (2), +.BR fork (2), +.BR sigaction (2), +.BR sigprocmask (2), +.BR wait (2), +.BR exec (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/sysv_signal.3 b/upstream/opensuse-leap-15-6/man3/sysv_signal.3 new file mode 100644 index 00000000..426c085d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sysv_signal.3 @@ -0,0 +1,93 @@ +'\" t +.\" Copyright (c) 2007 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH sysv_signal 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sysv_signal \- signal handling with System V semantics +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.B typedef void (*sighandler_t)(int); +.PP +.BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler ); +.fi +.SH DESCRIPTION +The +.BR sysv_signal () +function takes the same arguments, and performs the same task, as +.BR signal (2). +.PP +However +.BR sysv_signal () +provides the System V unreliable signal semantics, that is: +a) the disposition of the signal is reset to the default +when the handler is invoked; +b) delivery of further instances of the signal is not blocked while +the signal handler is executing; and +c) if the handler interrupts (certain) blocking system calls, +then the system call is not automatically restarted. +.SH RETURN VALUE +The +.BR sysv_signal () +function returns the previous value of the signal handler, or +.B SIG_ERR +on error. +.SH ERRORS +As for +.BR signal (2). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sysv_signal () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +Use of +.BR sysv_signal () +should be avoided; use +.BR sigaction (2) +instead. +.PP +On older Linux systems, +.BR sysv_signal () +and +.BR signal (2) +were equivalent. +But on newer systems, +.BR signal (2) +provides reliable signal semantics; see +.BR signal (2) +for details. +.PP +The use of +.I sighandler_t +is a GNU extension; +this type is defined only if +the +.B _GNU_SOURCE +feature test macro is defined. +.SH STANDARDS +None. +.SH SEE ALSO +.BR sigaction (2), +.BR signal (2), +.BR bsd_signal (3), +.BR signal (7) diff --git a/upstream/opensuse-leap-15-6/man3/tailq.3 b/upstream/opensuse-leap-15-6/man3/tailq.3 new file mode 100644 index 00000000..716f229a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tailq.3 @@ -0,0 +1,397 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" and Copyright (c) 2020 by Alejandro Colomar +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" +.\" +.TH TAILQ 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +TAILQ_CONCAT, +TAILQ_EMPTY, +TAILQ_ENTRY, +TAILQ_FIRST, +TAILQ_FOREACH, +.\"TAILQ_FOREACH_FROM, +.\"TAILQ_FOREACH_FROM_SAFE, +TAILQ_FOREACH_REVERSE, +.\"TAILQ_FOREACH_REVERSE_FROM, +.\"TAILQ_FOREACH_REVERSE_FROM_SAFE, +.\"TAILQ_FOREACH_REVERSE_SAFE, +.\"TAILQ_FOREACH_SAFE, +TAILQ_HEAD, +TAILQ_HEAD_INITIALIZER, +TAILQ_INIT, +TAILQ_INSERT_AFTER, +TAILQ_INSERT_BEFORE, +TAILQ_INSERT_HEAD, +TAILQ_INSERT_TAIL, +TAILQ_LAST, +TAILQ_NEXT, +TAILQ_PREV, +TAILQ_REMOVE +.\"TAILQ_SWAP +\- implementation of a doubly linked tail queue +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B TAILQ_ENTRY(TYPE); +.PP +.B TAILQ_HEAD(HEADNAME, TYPE); +.BI "TAILQ_HEAD TAILQ_HEAD_INITIALIZER(TAILQ_HEAD " head ); +.BI "void TAILQ_INIT(TAILQ_HEAD *" head ); +.PP +.BI "int TAILQ_EMPTY(TAILQ_HEAD *" head ); +.PP +.BI "void TAILQ_INSERT_HEAD(TAILQ_HEAD *" head , +.BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); +.BI "void TAILQ_INSERT_TAIL(TAILQ_HEAD *" head , +.BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); +.BI "void TAILQ_INSERT_BEFORE(struct TYPE *" listelm , +.BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); +.BI "void TAILQ_INSERT_AFTER(TAILQ_HEAD *" head ", struct TYPE *" listelm , +.BI " struct TYPE *" elm ", TAILQ_ENTRY " NAME ); +.PP +.BI "struct TYPE *TAILQ_FIRST(TAILQ_HEAD *" head ); +.BI "struct TYPE *TAILQ_LAST(TAILQ_HEAD *" head ", HEADNAME);" +.BI "struct TYPE *TAILQ_PREV(struct TYPE *" elm ", HEADNAME, TAILQ_ENTRY " NAME ); +.BI "struct TYPE *TAILQ_NEXT(struct TYPE *" elm ", TAILQ_ENTRY " NAME ); +.PP +.BI "TAILQ_FOREACH(struct TYPE *" var ", TAILQ_HEAD *" head , +.BI " TAILQ_ENTRY " NAME ); +.\" .BI "TAILQ_FOREACH_FROM(struct TYPE *" var ", TAILQ_HEAD *" head , +.\" .BI " TAILQ_ENTRY " NAME ); +.BI "TAILQ_FOREACH_REVERSE(struct TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME," +.BI " TAILQ_ENTRY " NAME ); +.\" .BI "TAILQ_FOREACH_REVERSE_FROM(struct TYPE *" var ", TAILQ_HEAD *" head ", HEADNAME," +.\" .BI " TAILQ_ENTRY " NAME ); +.\" .PP +.\" .BI "TAILQ_FOREACH_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , +.\" .BI " TAILQ_ENTRY " NAME , +.\" .BI " struct TYPE *" temp_var ); +.\" .BI "TAILQ_FOREACH_FROM_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , +.\" .BI " TAILQ_ENTRY " NAME , +.\" .BI " struct TYPE *" temp_var ); +.\" .BI "TAILQ_FOREACH_REVERSE_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , +.\" .BI " HEADNAME, TAILQ_ENTRY " NAME , +.\" .BI " struct TYPE *" temp_var ); +.\" .BI "TAILQ_FOREACH_REVERSE_FROM_SAFE(struct TYPE *" var ", TAILQ_HEAD *" head , +.\" .BI " HEADNAME, TAILQ_ENTRY " NAME , +.\" .BI " struct TYPE *" temp_var ); +.PP +.BI "void TAILQ_REMOVE(TAILQ_HEAD *" head ", struct TYPE *" elm , +.BI " TAILQ_ENTRY " NAME ); +.PP +.BI "void TAILQ_CONCAT(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 , +.BI " TAILQ_ENTRY " NAME ); +.\" .BI "void TAILQ_SWAP(TAILQ_HEAD *" head1 ", TAILQ_HEAD *" head2 ", TYPE," +.\" .BI " TAILQ_ENTRY " NAME ); +.fi +.SH DESCRIPTION +These macros define and operate on doubly linked tail queues. +.PP +In the macro definitions, +.I TYPE +is the name of a user defined structure, +that must contain a field of type +.IR TAILQ_ENTRY , +named +.IR NAME . +The argument +.I HEADNAME +is the name of a user defined structure that must be declared +using the macro +.BR TAILQ_HEAD (). +.SS Creation +A tail queue is headed by a structure defined by the +.BR TAILQ_HEAD () +macro. +This structure contains a pair of pointers, +one to the first element in the queue +and the other to the last element in the queue. +The elements are doubly linked +so that an arbitrary element can be removed without traversing the queue. +New elements can be added to the queue +after an existing element, +before an existing element, +at the head of the queue, +or at the end of the queue. +A +.I TAILQ_HEAD +structure is declared as follows: +.PP +.in +4 +.EX +TAILQ_HEAD(HEADNAME, TYPE) head; +.EE +.in +.PP +where +.I struct HEADNAME +is the structure to be defined, and +.I struct TYPE +is the type of the elements to be linked into the queue. +A pointer to the head of the queue can later be declared as: +.PP +.in +4 +.EX +struct HEADNAME *headp; +.EE +.in +.PP +(The names +.I head +and +.I headp +are user selectable.) +.PP +.BR TAILQ_ENTRY () +declares a structure that connects the elements in the queue. +.PP +.BR TAILQ_HEAD_INITIALIZER () +evaluates to an initializer for the queue +.IR head . +.PP +.BR TAILQ_INIT () +initializes the queue referenced by +.PP +.BR TAILQ_EMPTY () +evaluates to true if there are no items on the queue. +.IR head . +.SS Insertion +.BR TAILQ_INSERT_HEAD () +inserts the new element +.I elm +at the head of the queue. +.PP +.BR TAILQ_INSERT_TAIL () +inserts the new element +.I elm +at the end of the queue. +.PP +.BR TAILQ_INSERT_BEFORE () +inserts the new element +.I elm +before the element +.IR listelm . +.PP +.BR TAILQ_INSERT_AFTER () +inserts the new element +.I elm +after the element +.IR listelm . +.SS Traversal +.BR TAILQ_FIRST () +returns the first item on the queue, or NULL if the queue is empty. +.PP +.BR TAILQ_LAST () +returns the last item on the queue. +If the queue is empty the return value is NULL. +.PP +.BR TAILQ_PREV () +returns the previous item on the queue, or NULL if this item is the first. +.PP +.BR TAILQ_NEXT () +returns the next item on the queue, or NULL if this item is the last. +.PP +.BR TAILQ_FOREACH () +traverses the queue referenced by +.I head +in the forward direction, +assigning each element in turn to +.IR var . +.I var +is set to NULL if the loop completes normally, +or if there were no elements. +.\" .PP +.\" .BR TAILQ_FOREACH_FROM () +.\" behaves identically to +.\" .BR TAILQ_FOREACH () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found TAILQ element and begins the loop at +.\" .I var +.\" instead of the first element in the TAILQ referenced by +.\" .IR head . +.PP +.BR TAILQ_FOREACH_REVERSE () +traverses the queue referenced by +.I head +in the reverse direction, +assigning each element in turn to +.IR var . +.\" .PP +.\" .BR TAILQ_FOREACH_REVERSE_FROM () +.\" behaves identically to +.\" .BR TAILQ_FOREACH_REVERSE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found TAILQ element and begins the reverse loop at +.\" .I var +.\" instead of the last element in the TAILQ referenced by +.\" .IR head . +.\" .PP +.\" .BR TAILQ_FOREACH_SAFE () +.\" and +.\" .BR TAILQ_FOREACH_REVERSE_SAFE () +.\" traverse the list referenced by +.\" .I head +.\" in the forward or reverse direction respectively, +.\" assigning each element in turn to +.\" .IR var . +.\" However, unlike their unsafe counterparts, +.\" .BR TAILQ_FOREACH () +.\" and +.\" .BR TAILQ_FOREACH_REVERSE () +.\" permit to both remove +.\" .I var +.\" as well as free it from within the loop safely without interfering with the +.\" traversal. +.\" .PP +.\" .BR TAILQ_FOREACH_FROM_SAFE () +.\" behaves identically to +.\" .BR TAILQ_FOREACH_SAFE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found TAILQ element and begins the loop at +.\" .I var +.\" instead of the first element in the TAILQ referenced by +.\" .IR head . +.\" .PP +.\" .BR TAILQ_FOREACH_REVERSE_FROM_SAFE () +.\" behaves identically to +.\" .BR TAILQ_FOREACH_REVERSE_SAFE () +.\" when +.\" .I var +.\" is NULL, else it treats +.\" .I var +.\" as a previously found TAILQ element and begins the reverse loop at +.\" .I var +.\" instead of the last element in the TAILQ referenced by +.\" .IR head . +.SS Removal +.BR TAILQ_REMOVE () +removes the element +.I elm +from the queue. +.SS Other features +.\" .BR TAILQ_SWAP () +.\" swaps the contents of +.\" .I head1 +.\" and +.\" .IR head2 . +.\" .PP +.BR TAILQ_CONCAT () +concatenates the queue headed by +.I head2 +onto the end of the one headed by +.I head1 +removing all entries from the former. +.SH RETURN VALUE +.BR TAILQ_EMPTY () +returns nonzero if the queue is empty, +and zero if the queue contains at least one entry. +.PP +.BR TAILQ_FIRST (), +.BR TAILQ_LAST (), +.BR TAILQ_PREV (), +and +.BR TAILQ_NEXT () +return a pointer to the first, last, previous, or next +.I TYPE +structure, respectively. +.PP +.BR TAILQ_HEAD_INITIALIZER () +returns an initializer that can be assigned to the queue +.IR head . +.SH STANDARDS +BSD. +.SH HISTORY +4.4BSD. +.SH CAVEATS +.BR TAILQ_FOREACH () +and +.BR TAILQ_FOREACH_REVERSE () +don't allow +.I var +to be removed or freed within the loop, +as it would interfere with the traversal. +.BR TAILQ_FOREACH_SAFE () +and +.BR TAILQ_FOREACH_REVERSE_SAFE (), +which are present on the BSDs but are not present in glibc, +fix this limitation by allowing +.I var +to safely be removed from the list and freed from within the loop +without interfering with the traversal. +.SH EXAMPLES +.\" SRC BEGIN (tailq.c) +.EX +#include +#include +#include +#include + +struct entry { + int data; + TAILQ_ENTRY(entry) entries; /* Tail queue */ +}; + +TAILQ_HEAD(tailhead, entry); + +int +main(void) +{ + struct entry *n1, *n2, *n3, *np; + struct tailhead head; /* Tail queue head */ + int i; + + TAILQ_INIT(&head); /* Initialize the queue */ + + n1 = malloc(sizeof(struct entry)); /* Insert at the head */ + TAILQ_INSERT_HEAD(&head, n1, entries); + + n1 = malloc(sizeof(struct entry)); /* Insert at the tail */ + TAILQ_INSERT_TAIL(&head, n1, entries); + + n2 = malloc(sizeof(struct entry)); /* Insert after */ + TAILQ_INSERT_AFTER(&head, n1, n2, entries); + + n3 = malloc(sizeof(struct entry)); /* Insert before */ + TAILQ_INSERT_BEFORE(n2, n3, entries); + + TAILQ_REMOVE(&head, n2, entries); /* Deletion */ + free(n2); + /* Forward traversal */ + i = 0; + TAILQ_FOREACH(np, &head, entries) + np\->data = i++; + /* Reverse traversal */ + TAILQ_FOREACH_REVERSE(np, &head, tailhead, entries) + printf("%i\en", np\->data); + /* TailQ deletion */ + n1 = TAILQ_FIRST(&head); + while (n1 != NULL) { + n2 = TAILQ_NEXT(n1, entries); + free(n1); + n1 = n2; + } + TAILQ_INIT(&head); + + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR insque (3), +.BR queue (7) diff --git a/upstream/opensuse-leap-15-6/man3/tan.3 b/upstream/opensuse-leap-15-6/man3/tan.3 new file mode 100644 index 00000000..a3458fe7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tan.3 @@ -0,0 +1,149 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH tan 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tan, tanf, tanl \- tangent function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double tan(double " x ); +.BI "float tanf(float " x ); +.BI "long double tanl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tanf (), +.BR tanl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the tangent of +.IR x , +where +.I x +is +given in radians. +.SH RETURN VALUE +On success, these functions return the tangent of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, +and a NaN is returned. +.PP +If the correct result would overflow, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the mathematically correct sign. +.\" 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 +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Range error: result overflow +.\" 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 . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tan (), +.BR tanf (), +.BR tanl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH BUGS +Before glibc 2.10, the glibc implementation did not set +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6782 +.I errno +to +.B EDOM +when a domain error occurred. +.SH SEE ALSO +.BR acos (3), +.BR asin (3), +.BR atan (3), +.BR atan2 (3), +.BR cos (3), +.BR ctan (3), +.BR sin (3) diff --git a/upstream/opensuse-leap-15-6/man3/tanh.3 b/upstream/opensuse-leap-15-6/man3/tanh.3 new file mode 100644 index 00000000..1bfbd14c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tanh.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.\" +.TH tanh 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tanh, tanhf, tanhl \- hyperbolic tangent function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double tanh(double " x ); +.BI "float tanhf(float " x ); +.BI "long double tanhl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tanhf (), +.BR tanhl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +These functions return the hyperbolic tangent of +.IR x , +which +is defined mathematically as: +.PP +.nf + tanh(x) = sinh(x) / cosh(x) +.fi +.SH RETURN VALUE +On success, these functions return the hyperbolic tangent of +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is +0 (\-0), +0 (\-0) is returned. +.PP +If +.I x +is positive infinity (negative infinity), ++1 (\-1) is returned. +.\" +.\" POSIX.1-2001 documents an optional range error (underflow) +.\" for subnormal x; +.\" glibc 2.8 does not do this. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tanh (), +.BR tanhf (), +.BR tanhl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +C99, POSIX.1-2001. +.PP +The variant returning +.I double +also conforms to +SVr4, 4.3BSD, C89. +.SH SEE ALSO +.BR acosh (3), +.BR asinh (3), +.BR atanh (3), +.BR cosh (3), +.BR ctanh (3), +.BR sinh (3) diff --git a/upstream/opensuse-leap-15-6/man3/tcgetpgrp.3 b/upstream/opensuse-leap-15-6/man3/tcgetpgrp.3 new file mode 100644 index 00000000..b01c0a26 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tcgetpgrp.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH tcgetpgrp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tcgetpgrp, tcsetpgrp \- get and set terminal foreground process group +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "pid_t tcgetpgrp(int " fd ); +.BI "int tcsetpgrp(int " fd ", pid_t " pgrp ); +.fi +.SH DESCRIPTION +The function +.BR tcgetpgrp () +returns the process group ID of the foreground process group on the +terminal associated to +.IR fd , +which must be the controlling terminal of the calling process. +.\" The process itself may be a background process. +.PP +The function +.BR tcsetpgrp () +makes the process group with process group ID +.I pgrp +the foreground process group on the terminal associated to +.IR fd , +which must be the controlling terminal of the calling process, +and still be associated with its session. +Moreover, +.I pgrp +must be a (nonempty) process group belonging to +the same session as the calling process. +.PP +If +.BR tcsetpgrp () +is called by a member of a background process group in its session, +and the calling process is not blocking or ignoring +.BR SIGTTOU , +a +.B SIGTTOU +signal is sent to all members of this background process group. +.SH RETURN VALUE +When +.I fd +refers to the controlling terminal of the calling process, +the function +.BR tcgetpgrp () +will return the foreground process group ID of that terminal +if there is one, and some value larger than 1 that is not +presently a process group ID otherwise. +When +.I fd +does not refer to the controlling terminal of the calling process, +\-1 is returned, and +.I errno +is set to indicate the error. +.PP +When successful, +.BR tcsetpgrp () +returns 0. +Otherwise, it returns \-1, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I fd +is not a valid file descriptor. +.TP +.B EINVAL +.I pgrp +has an unsupported value. +.TP +.B ENOTTY +The calling process does not have a controlling terminal, or +it has one but it is not described by +.IR fd , +or, for +.BR tcsetpgrp (), +this controlling terminal is no longer associated with the session +of the calling process. +.TP +.B EPERM +.I pgrp +has a supported value, but is not the process group ID of a +process in the same session as the calling process. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tcgetpgrp (), +.BR tcsetpgrp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +These functions are implemented via the +.B TIOCGPGRP +and +.B TIOCSPGRP +ioctls. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +The ioctls appeared in 4.2BSD. +The functions are POSIX inventions. +.SH SEE ALSO +.BR setpgid (2), +.BR setsid (2), +.BR credentials (7) diff --git a/upstream/opensuse-leap-15-6/man3/tcgetsid.3 b/upstream/opensuse-leap-15-6/man3/tcgetsid.3 new file mode 100644 index 00000000..fe357ded --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tcgetsid.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH tcgetsid 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tcgetsid \- get session ID +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE 500" " /* See feature_test_macros(7) */" +.B "#include " +.PP +.BI "pid_t tcgetsid(int " fd ); +.fi +.SH DESCRIPTION +The function +.BR tcgetsid () +returns the session ID of the current session that has the +terminal associated to +.I fd +as controlling terminal. +This terminal must be the controlling terminal of the calling process. +.SH RETURN VALUE +When +.I fd +refers to the controlling terminal of our session, +the function +.BR tcgetsid () +will return the session ID of this session. +Otherwise, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +.I fd +is not a valid file descriptor. +.TP +.B ENOTTY +The calling process does not have a controlling terminal, or +it has one but it is not described by +.IR fd . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tcgetsid () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.PP +This function is implemented via the +.B TIOCGSID +.BR ioctl (2), +present +since Linux 2.1.71. +.SH SEE ALSO +.BR getsid (2) diff --git a/upstream/opensuse-leap-15-6/man3/telldir.3 b/upstream/opensuse-leap-15-6/man3/telldir.3 new file mode 100644 index 00000000..2477b110 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/telldir.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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) +.TH telldir 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +telldir \- return current location in directory stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "long telldir(DIR *" dirp ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR telldir (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR telldir () +function returns the current location associated with +the directory stream \fIdirp\fP. +.SH RETURN VALUE +On success, the +.BR telldir () +function returns the current location +in the directory stream. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EBADF +Invalid directory stream descriptor \fIdirp\fP. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR telldir () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.3BSD. +.PP +Up to glibc 2.1.1, the return type of +.BR telldir () +was +.IR off_t . +POSIX.1-2001 specifies +.IR long , +and this is the type used since glibc 2.1.2. +.PP +In early filesystems, the value returned by +.BR telldir () +was a simple file offset within a directory. +Modern filesystems use tree or hash structures, rather than flat tables, +to represent directories. +On such filesystems, the value returned by +.BR telldir () +(and used internally by +.BR readdir (3)) +is a "cookie" that is used by the implementation +to derive a position within a directory. +.\" https://lwn.net/Articles/544298/ +Application programs should treat this strictly as an opaque value, making +.I no +assumptions about its contents. +.SH SEE ALSO +.BR closedir (3), +.BR opendir (3), +.BR readdir (3), +.BR rewinddir (3), +.BR scandir (3), +.BR seekdir (3) diff --git a/upstream/opensuse-leap-15-6/man3/tempnam.3 b/upstream/opensuse-leap-15-6/man3/tempnam.3 new file mode 100644 index 00000000..15e207ed --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tempnam.3 @@ -0,0 +1,178 @@ +'\" t +.\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH tempnam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tempnam \- create a name for a temporary file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *tempnam(const char *" dir ", const char *" pfx ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tempnam (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +.I "Never use this function." +Use +.BR mkstemp (3) +or +.BR tmpfile (3) +instead. +.PP +The +.BR tempnam () +function returns a pointer to a string that is a valid filename, +and such that a file with this name did not exist when +.BR tempnam () +checked. +The filename suffix of the pathname generated will start with +.I pfx +in case +.I pfx +is a non-NULL string of at most five bytes. +The directory prefix part of the pathname generated is required to +be "appropriate" (often that at least implies writable). +.PP +Attempts to find an appropriate directory go through the following +steps: +.TP 3 +a) +In case the environment variable +.B TMPDIR +exists and +contains the name of an appropriate directory, that is used. +.TP +b) +Otherwise, if the +.I dir +argument is non-NULL and appropriate, it is used. +.TP +c) +Otherwise, +.I P_tmpdir +(as defined in +.IR ) +is used when appropriate. +.TP +d) +Finally an implementation-defined directory may be used. +.PP +The string returned by +.BR tempnam () +is allocated using +.BR malloc (3) +and hence should be freed by +.BR free (3). +.SH RETURN VALUE +On success, the +.BR tempnam () +function returns a pointer to a unique temporary filename. +It returns NULL if a unique name cannot be generated, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Allocation of storage failed. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tempnam () +T} Thread safety MT-Safe env +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +SVr4, 4.3BSD, POSIX.1-2001. +Obsoleted in POSIX.1-2008. +.SH NOTES +Although +.BR tempnam () +generates names that are difficult to guess, +it is nevertheless possible that between the time that +.BR tempnam () +returns a pathname, and the time that the program opens it, +another program might create that pathname using +.BR open (2), +or create it as a symbolic link. +This can lead to security holes. +To avoid such possibilities, use the +.BR open (2) +.B O_EXCL +flag to open the pathname. +Or better yet, use +.BR mkstemp (3) +or +.BR tmpfile (3). +.PP +SUSv2 does not mention the use of +.BR TMPDIR ; +glibc will use it only +when the program is not set-user-ID. +On SVr4, the directory used under \fBd)\fP is +.I /tmp +(and this is what glibc does). +.PP +Because it dynamically allocates memory used to return the pathname, +.BR tempnam () +is reentrant, and thus thread safe, unlike +.BR tmpnam (3). +.PP +The +.BR tempnam () +function generates a different string each time it is called, +up to +.B TMP_MAX +(defined in +.IR ) +times. +If it is called more than +.B TMP_MAX +times, +the behavior is implementation defined. +.PP +.BR tempnam () +uses at most the first five bytes from +.IR pfx . +.PP +The glibc implementation of +.BR tempnam () +fails with the error +.B EEXIST +upon failure to find a unique name. +.SH BUGS +The precise meaning of "appropriate" is undefined; +it is unspecified how accessibility of a directory is determined. +.SH SEE ALSO +.BR mkstemp (3), +.BR mktemp (3), +.BR tmpfile (3), +.BR tmpnam (3) diff --git a/upstream/opensuse-leap-15-6/man3/termattrs.3ncurses b/upstream/opensuse-leap-15-6/man3/termattrs.3ncurses new file mode 100644 index 00000000..4000e92c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/termattrs.3ncurses @@ -0,0 +1,135 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_termattrs.3x,v 1.13 2015/07/21 00:03:34 tom Exp $ +.TH termattrs 3NCURSES "" +.SH NAME +\fBbaudrate\fR, +\fBerasechar\fR, +\fBerasewchar\fR, +\fBhas_ic\fR, +\fBhas_il\fR, +\fBkillchar\fR, +\fBkillwchar\fR, +\fBlongname\fR, +\fBterm_attrs\fR, +\fBtermattrs\fR, +\fBtermname\fR \- \fBcurses\fR environment query routines +.SH SYNOPSIS +\fB#include \fR +.PP +\fBint baudrate(void);\fR +.br +\fBchar erasechar(void);\fR +.br +\fBint erasewchar(wchar_t *\fR\fIch\fR\fB);\fR +.br +\fBbool has_ic(void);\fR +.br +\fBbool has_il(void);\fR +.br +\fBchar killchar(void);\fR +.br +\fBint killwchar(wchar_t *\fR\fIch\fR\fB);\fR +.br +\fBchar *longname(void);\fR +.br +\fBattr_t term_attrs(void);\fR +.br +\fBchtype termattrs(void);\fR +.br +\fBchar *termname(void);\fR +.br +.SH DESCRIPTION +.SS baudrate +The \fBbaudrate\fR routine returns the output speed of the terminal. The +number returned is in bits per second, for example \fB9600\fR, and is an +integer. +.SS erasechar, erasewchar +.PP +The \fBerasechar\fR routine returns the user's current erase character. +.PP +The \fBerasewchar\fR routine stores the current erase character +in the location referenced by \fIch\fR. +If no erase character has been defined, the routine fails +and the location referenced by \fIch\fR is not changed. +.SS has_is, has_il +.PP +The \fBhas_ic\fR routine is true if the terminal has insert- and delete- +character capabilities. +.PP +The \fBhas_il\fR routine is true if the terminal has insert- and delete-line +capabilities, or can simulate them using scrolling regions. This might +be used to determine if it would be appropriate to turn on physical +scrolling using \fBscrollok\fR. +.SS killchar, killwchar +.PP +The \fBkillchar\fR routine returns the user's current line kill character. +.PP +The \fBkillwchar\fR routine stores the current line-kill character +in the location referenced by \fIch\fR. +If no line-kill character has been defined, +the routine fails and the location referenced by \fIch\fR is not changed. +.SS longname +.PP +The \fBlongname\fR routine returns a pointer to a static area +containing a verbose description of the current terminal. The maximum +length of a verbose description is 128 characters. It is defined only +after the call to \fBinitscr\fR or \fBnewterm\fR. The area is +overwritten by each call to \fBnewterm\fR and is not restored by +\fBset_term\fR, so the value should be saved between calls to +\fBnewterm\fR if \fBlongname\fR is going to be used with multiple +terminals. +.SS termattrs, term_attrs +.PP +If a given terminal does not support a video attribute that an +application program is trying to use, \fBcurses\fR may substitute a +different video attribute for it. +The \fBtermattrs\fR and \fBterm_attrs\fR functions +return a logical \fBOR\fR of all video attributes supported by the +terminal using \fIA_\fR and \fIWA_\fR constants respectively. +This information is useful when a \fBcurses\fR program +needs complete control over the appearance of the screen. +.SS termname +.PP +The \fBtermname\fR routine returns the terminal name used by \fBsetupterm\fR. +.SH RETURN VALUE +\fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error. +.PP +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.SH NOTES +Note that \fBtermattrs\fR may be a macro. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. It changes the +return type of \fBtermattrs\fR to the new type \fBattr_t\fR. +Most versions of curses truncate the result returned by \fBtermname\fR to +14 characters. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBinitscr\fR(3NCURSES), \fBoutopts\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/termcap.3ncurses b/upstream/opensuse-leap-15-6/man3/termcap.3ncurses new file mode 100644 index 00000000..3ffed2cb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/termcap.3ncurses @@ -0,0 +1,262 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_termcap.3x,v 1.37 2018/01/23 10:14:38 tom Exp $ +.TH termcap 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.ds n 5 +.SH NAME +\fBPC\fR, +\fBUP\fR, +\fBBC\fR, +\fBospeed\fR, +\fBtgetent\fR, +\fBtgetflag\fR, +\fBtgetnum\fR, +\fBtgetstr\fR, +\fBtgoto\fR, +\fBtputs\fR \- direct \fBcurses\fR interface to the terminfo capability database +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.br +\fB#include \fR +.sp +\fBextern char PC;\fR +.br +\fBextern char * UP;\fR +.br +\fBextern char * BC;\fR +.br +\fBextern speed_t ospeed;\fR +.sp +\fBint tgetent(char *bp, const char *name);\fR +.br +\fBint tgetflag(char *id);\fR +.br +\fBint tgetnum(char *id);\fR +.br +\fBchar *tgetstr(char *id, char **area);\fR +.br +\fBchar *tgoto(const char *cap, int col, int row);\fR +.br +\fBint tputs(const char *str, int affcnt, int (*putc)(int));\fR +.br +.SH DESCRIPTION +These routines are included as a conversion aid for programs that use +the \fItermcap\fR library. Their parameters are the same and the +routines are emulated using the \fIterminfo\fR database. Thus, they +can only be used to query the capabilities of entries for which a +terminfo entry has been compiled. +.SS INITIALIZATION +.PP +The \fBtgetent\fR routine loads the entry for \fIname\fR. +It returns: +.RS 3 +.TP 3 +1 +on success, +.TP 3 +0 +if there is no such entry +(or that it is a generic type, having too little information for curses +applications to run), and +.TP 3 +\-1 +if the terminfo database could not be found. +.RE +.PP +This differs from the \fItermcap\fP library in two ways: +.RS 3 +.bP +The emulation ignores the buffer pointer \fIbp\fR. +The \fItermcap\fP library would store a copy of the terminal +description in the area referenced by this pointer. +However, ncurses stores its terminal descriptions in compiled +binary form, which is not the same thing. +.bP +There is a difference in return codes. +The \fItermcap\fP library does not check if the terminal +description is marked with the \fIgeneric\fP capability, +or if the terminal description has cursor-addressing. +.RE +.SS CAPABILITY VALUES +.PP +The \fBtgetflag\fR routine gets the boolean entry for \fIid\fR, +or zero if it is not available. +.PP +The \fBtgetnum\fR routine gets the numeric entry for \fIid\fR, +or \-1 if it is not available. +.PP +The \fBtgetstr\fR routine returns the string entry for \fIid\fR, +or zero if it is not available. +Use \fBtputs\fR to output the returned string. +The \fIarea\fP parameter is used as follows: +.RS 3 +.bP +It is assumed to be the address of a pointer to a buffer managed by the +calling application. +.bP +However, ncurses checks to ensure that \fBarea\fP is not NULL, +and also that the resulting buffer pointer is not NULL. +If either check fails, the \fIarea\fP parameter is ignored. +.bP +If the checks succeed, ncurses also copies the return value to +the buffer pointed to by \fIarea\fR, +and the \fIarea\fR value will be updated to point past the null ending +this value. +.bP +The return value itself is an address in the terminal description which +is loaded into memory. +.RE +.PP +Only the first two characters of the \fBid\fR parameter of +\fBtgetflag\fR, +\fBtgetnum\fR and +\fBtgetstr\fR are compared in lookups. +.SS FORMATTING CAPABILITIES +.PP +The \fBtgoto\fR routine expands the given capability using the parameters. +.bP +Because the capability may have padding characters, +the output of \fBtgoto\fP should be passed to \fBtputs\fR +rather than some other output function such as \fBprintf\fP. +.bP +While \fBtgoto\fP is assumed to be used for the two-parameter +cursor positioning capability, +termcap applications also use it for single-parameter capabilities. +.IP +Doing this shows a quirk in \fBtgoto\fP: most hardware +terminals use cursor addressing with \fIrow\fP first, +but the original developers of the termcap interface chose to +put the \fIcolumn\fP parameter first. +The \fBtgoto\fP function swaps the order of parameters. +It does this also for calls requiring only a single parameter. +In that case, the first parameter is merely a placeholder. +.bP +Normally the ncurses library is compiled with terminfo support. +In that case, \fBtgoto\fP uses \fBtparm\fP(3X) (a more capable formatter). +.IP +However, \fBtparm\fP is not a \fItermcap\fP feature, +and portable \fItermcap\fP applications should not rely upon its availability. +.PP +The \fBtputs\fR routine is described on the \fBterminfo\fR(3NCURSES) manual +page. It can retrieve capabilities by either termcap or terminfo name. +.SS GLOBAL VARIABLES +.PP +The variables +\fBPC\fR, +\fBUP\fR and +\fBBC\fR +are set by \fBtgetent\fR to the terminfo entry's data for +\fBpad_char\fR, +\fBcursor_up\fR and +\fBbackspace_if_not_bs\fR, +respectively. +\fBUP\fR is not used by ncurses. +\fBPC\fR is used in the \fBtdelay_output\fR function. +\fBBC\fR is used in the \fBtgoto\fR emulation. +The variable \fBospeed\fR is set by ncurses in a system-specific coding +to reflect the terminal speed. +. +.SH RETURN VALUE +Except where explicitly noted, +routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful +completion. +.PP +Routines that return pointers return \fBNULL\fR on error. +.SH BUGS +If you call \fBtgetstr\fR to fetch \fBca\fR or any other parameterized string, +be aware that it will be returned in terminfo notation, not the older and +not-quite-compatible termcap notation. This will not cause problems if all +you do with it is call \fBtgoto\fR or \fBtparm\fR, which both expand +terminfo-style strings as terminfo. +(The \fBtgoto\fR function, if configured to support termcap, will check +if the string is indeed terminfo-style by looking for "%p" parameters or +"$<..>" delays, and invoke a termcap-style parser if the string does not +appear to be terminfo). +.PP +Because terminfo conventions for representing padding in string capabilities +differ from termcap's, \fBtputs("50");\fR will put out a literal "50" rather +than busy-waiting for 50 milliseconds. Cope with it. +.PP +Note that termcap has nothing analogous to terminfo's \fBsgr\fR string. +One consequence of this is that termcap applications assume \fRme\fR +(terminfo \fBsgr0\fR) does not reset the alternate character set. +This implementation checks for, and modifies the data shown to the +termcap interface to accommodate termcap's limitation in this respect. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. However, they +are marked TO BE WITHDRAWN and may be removed in future versions. +.PP +Neither the XSI Curses standard nor the SVr4 man pages documented the return +values of \fBtgetent\fR correctly, though all three were in fact returned ever +since SVr1. +In particular, an omission in the XSI Curses documentation has been +misinterpreted to mean that \fBtgetent\fR returns \fBOK\fR or \fBERR\fR. +Because the purpose of these functions is to provide compatibility with +the \fItermcap\fR library, that is a defect in XCurses, Issue 4, Version 2 +rather than in ncurses. +.PP +External variables are provided for support of certain termcap applications. +However, termcap applications' use of those variables is poorly documented, +e.g., not distinguishing between input and output. +In particular, some applications are reported to declare and/or +modify \fBospeed\fR. +.PP +The comment that only the first two characters of the \fBid\fR parameter +are used escapes many application developers. +The original BSD 4.2 termcap library (and historical relics thereof) +did not require a trailing null NUL on the parameter name passed +to \fBtgetstr\fP, \fBtgetnum\fP and \fBtgetflag\fP. +Some applications assume that the termcap interface does not require +the trailing NUL for the parameter name. +Taking into account these issues: +.bP +As a special case, +\fBtgetflag\fP matched against a single-character identifier +provided that was at the end of the terminal description. +You should not rely upon this behavior in portable programs. +This implementation disallows matches against single-character capability names. +.bP +This implementation disallows matches by the termcap interface against +extended capability names which are longer than two characters. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBterminfo\fR(\*n), +\fBterminfo_variables\fR(3NCURSES), +\fBputc\fR(3). +.sp +https://invisible-island.net/ncurses/tctest.html diff --git a/upstream/opensuse-leap-15-6/man3/terminfo.3ncurses b/upstream/opensuse-leap-15-6/man3/terminfo.3ncurses new file mode 100644 index 00000000..db4a9389 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/terminfo.3ncurses @@ -0,0 +1,528 @@ +.\"*************************************************************************** +.\" Copyright (c) 1999-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_terminfo.3x,v 1.57 2017/11/21 00:46:31 tom Exp $ +.TH terminfo 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.ds n 5 +.na +.hy 0 +.SH NAME +\fBdel_curterm\fR, +\fBmvcur\fR, +\fBputp\fR, +\fBrestartterm\fR, +\fBset_curterm\fR, +\fBsetterm\fR, +\fBsetupterm\fR, +\fBtigetflag\fR, +\fBtigetnum\fR, +\fBtigetstr\fR, +\fBtiparm\fR, +\fBtparm\fR, +\fBtputs\fR, +\fBvid_attr\fR, +\fBvid_puts\fR, +\fBvidattr\fR, +\fBvidputs\fR \- \fBcurses\fR interfaces to terminfo database +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.br +\fB#include \fR +.sp +\fBTERMINAL *cur_term;\fR +.sp +\fBconst char * const boolnames[];\fP +\fBconst char * const boolcodes[];\fP +\fBconst char * const boolfnames[];\fP +\fBconst char * const numnames[];\fP +\fBconst char * const numcodes[];\fP +\fBconst char * const numfnames[];\fP +\fBconst char * const strnames[];\fP +\fBconst char * const strcodes[];\fP +\fBconst char * const strfnames[];\fP +.sp +\fBint setupterm(const char *\fR\fIterm\fR\fB, int \fR\fIfiledes\fR\fB, int *\fR\fIerrret\fR\fB);\fR +.br +\fBint setterm(const char *\fR\fIterm\fR\fB);\fR +.br +\fBTERMINAL *set_curterm(TERMINAL *\fR\fInterm\fR\fB);\fR +.br +\fBint del_curterm(TERMINAL *\fR\fIoterm\fR\fB);\fR +.br +\fBint restartterm(const char *\fR\fIterm\fR\fB, int \fR\fIfiledes\fR\fB, int *\fR\fIerrret\fR\fB);\fR +.sp +\fBchar *tparm(const char *\fR\fIstr\fR\fB, ...);\fR +.br +\fBint tputs(const char *\fR\fIstr\fR\fB, int \fR\fIaffcnt\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR +.br +\fBint putp(const char *\fR\fIstr\fR\fB);\fR +.sp +\fBint vidputs(chtype \fR\fIattrs\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR +.br +\fBint vidattr(chtype \fR\fIattrs\fR\fB);\fR +.br +\fBint vid_puts(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR +.br +\fBint vid_attr(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB);\fR +.sp +\fBint mvcur(int \fR\fIoldrow\fR\fB, int \fR\fIoldcol\fR\fB, int \fR\fInewrow\fR, int \fR\fInewcol\fR\fB);\fR +.sp +\fBint tigetflag(const char *\fR\fIcapname\fR\fB);\fR +.br +\fBint tigetnum(const char *\fR\fIcapname\fR\fB);\fR +.br +\fBchar *tigetstr(const char *\fR\fIcapname\fR\fB);\fR +.sp +\fBchar *tiparm(const char *\fR\fIstr\fR\fB, ...);\fR +.br +.fi +.SH DESCRIPTION +These low-level routines must be called by programs that have to deal +directly with the \fBterminfo\fR database to handle certain terminal +capabilities, such as programming function keys. For all other +functionality, \fBcurses\fR routines are more suitable and their use is +recommended. +.SS Initialization +.PP +Initially, \fBsetupterm\fR should be called. +The high-level curses functions \fBinitscr\fR and +\fBnewterm\fR call \fBsetupterm\fP to initialize the +low-level set of terminal-dependent variables +[listed in \fBterminfo\fR(\*n)]. +.PP +Applications can use the +terminal capabilities either directly (via header definitions), +or by special functions. +The header files \fBcurses.h\fR and \fBterm.h\fR should be included (in this +order) to get the definitions for these strings, numbers, and flags. +.PP +The \fBterminfo\fR variables +\fBlines\fR and \fBcolumns\fR are initialized by \fBsetupterm\fR as +follows: +.bP +If \fBuse_env(FALSE)\fR has been called, values for +\fBlines\fR and \fBcolumns\fR specified in \fBterminfo\fR are used. +.bP +Otherwise, if the environment variables \fBLINES\fR and \fBCOLUMNS\fR +exist, their values are used. If these environment variables do not +exist and the program is running in a window, the current window size +is used. Otherwise, if the environment variables do not exist, the +values for \fBlines\fR and \fBcolumns\fR specified in the +\fBterminfo\fR database are used. +.PP +Parameterized strings should be passed through \fBtparm\fR to instantiate them. +All \fBterminfo\fR strings [including the output of \fBtparm\fR] should be printed +with \fBtputs\fR or \fBputp\fR. +Call \fBreset_shell_mode\fR to restore the +tty modes before exiting [see \fBkernel\fR(3NCURSES)]. +.PP +Programs which use +cursor addressing should +.bP +output \fBenter_ca_mode\fR upon startup and +.bP +output \fBexit_ca_mode\fR before exiting. +.PP +Programs which execute shell subprocesses should +.bP +call \fBreset_shell_mode\fR and +output \fBexit_ca_mode\fR before the shell +is called and +.bP +output \fBenter_ca_mode\fR and +call \fBreset_prog_mode\fR after returning from the shell. +.PP +The \fBsetupterm\fR routine reads in the \fBterminfo\fR database, +initializing the \fBterminfo\fR structures, but does not set up the +output virtualization structures used by \fBcurses\fR. +These are its parameters: +.RS 3 +.TP 5 +\fIterm\fP +is the terminal type, a character string. +If \fIterm\fR is null, the environment variable \fBTERM\fR is used. +.TP 5 +\fIfiledes\fP +is the file descriptor used for all output. +.TP 5 +\fIerrret\fP +points to an optional location where an error status can be returned to +the caller. +If \fIerrret\fR is not null, +then \fBsetupterm\fR returns \fBOK\fR or +\fBERR\fR and stores a status value in the integer pointed to by +\fIerrret\fR. +A return value of \fBOK\fR combined with status of \fB1\fR in \fIerrret\fR +is normal. +.IP +If \fBERR\fR is returned, examine \fIerrret\fR: +.RS +.TP 5 +.B 1 +means that the terminal is hardcopy, cannot be used for curses applications. +.IP +\fBsetupterm\fP determines if the entry is a hardcopy type by +checking the \fBhc\fP (\fBhardcopy\fP) capability. +.TP 5 +.B 0 +means that the terminal could not be found, +or that it is a generic type, +having too little information for curses applications to run. +.IP +\fBsetupterm\fP determines if the entry is a generic type by +checking the \fBgn\fP (\fBgeneric\fP) capability. +.TP 5 +.B \-1 +means that the \fBterminfo\fR database could not be found. +.RE +.IP +If \fIerrret\fR is +null, \fBsetupterm\fR prints an error message upon finding an error +and exits. Thus, the simplest call is: +.sp + \fBsetupterm((char *)0, 1, (int *)0);\fR, +.sp +which uses all the defaults and sends the output to \fBstdout\fR. +.RE +.PP +The \fBsetterm\fR routine was replaced by \fBsetupterm\fR. The call: +.sp + \fBsetupterm(\fR\fIterm\fR\fB, 1, (int *)0)\fR +.sp +provides the same functionality as \fBsetterm(\fR\fIterm\fR\fB)\fR. +The \fBsetterm\fR routine is provided for BSD compatibility, and +is not recommended for new programs. +.\" *************************************************************************** +.SS The Terminal State +.PP +The \fBsetupterm\fR routine stores its information about the terminal +in a \fBTERMINAL\fP structure pointed to by the global variable \fBcur_term\fP. +If it detects an error, +or decides that the terminal is unsuitable (hardcopy or generic), +it discards this information, +making it not available to applications. +.PP +If \fBsetupterm\fP is called repeatedly for the same terminal type, +it will reuse the information. +It maintains only one copy of a given terminal's capabilities in memory. +If it is called for different terminal types, +\fBsetupterm\fP allocates new storage for each set of terminal capabilities. +.PP +The \fBset_curterm\fR routine sets \fBcur_term\fR to +\fInterm\fR, and makes all of the \fBterminfo\fR boolean, numeric, and +string variables use the values from \fInterm\fR. +It returns the old value of \fBcur_term\fR. +.PP +The \fBdel_curterm\fR routine frees the space pointed to by +\fIoterm\fR and makes it available for further use. If \fIoterm\fR is +the same as \fBcur_term\fR, references to any of the \fBterminfo\fR +boolean, numeric, and string variables thereafter may refer to invalid +memory locations until another \fBsetupterm\fR has been called. +.PP +The \fBrestartterm\fR routine is similar to \fBsetupterm\fR and \fBinitscr\fR, +except that it is called after restoring memory to a previous state (for +example, when reloading a game saved as a core image dump). +\fBrestartterm\fP assumes that the windows and the input and output options +are the same as when memory was saved, +but the terminal type and baud rate may be different. +Accordingly, \fBrestartterm\fP saves various tty state bits, +calls \fBsetupterm\fP, and then restores the bits. +.\" *************************************************************************** +.SS Formatting Output +.PP +The \fBtparm\fR routine instantiates the string \fIstr\fR with +parameters \fIpi\fR. A pointer is returned to the result of \fIstr\fR +with the parameters applied. +Application developers should keep in mind these quirks of the interface: +.bP +Although \fBtparm\fP's actual parameters may be integers or strings, +the prototype expects \fBlong\fP (integer) values. +.bP +Aside from the \fBset_attributes\fP (\fBsgr\fP) capability, +most terminal capabilities require no more than one or two parameters. +.PP +\fBtiparm\fP is a newer form of \fBtparm\fP which uses \fI\fP +rather than a fixed-parameter list. +Its numeric parameters are integers (int) rather than longs. +.\" *************************************************************************** +.SS Output Functions +.PP +The \fBtputs\fR routine applies padding information to the string +\fIstr\fR and outputs it: +.bP +The \fIstr\fR must be a terminfo string +variable or the return value from \fBtparm\fR, \fBtgetstr\fR, or +\fBtgoto\fR. +.bP +\fIaffcnt\fR is the number of lines affected, or 1 if +not applicable. +.bP +\fIputc\fR is a \fBputchar\fR-like routine to which +the characters are passed, one at a time. +.PP +The \fBputp\fR routine calls \fBtputs(\fR\fIstr\fR\fB, 1, putchar)\fR. +The output of \fBputp\fR always goes to \fBstdout\fR, rather than +the \fIfiledes\fR specified in \fBsetupterm\fR. +.PP +The \fBvidputs\fR routine displays the string on the terminal in the +video attribute mode \fIattrs\fR, which is any combination of the +attributes listed in \fBncurses\fR(3NCURSES). The characters are passed to +the \fBputchar\fR-like routine \fIputc\fR. +.PP +The \fBvidattr\fR routine is like the \fBvidputs\fR routine, except +that it outputs through \fBputchar\fR. +.PP +The \fBvid_attr\fR and \fBvid_puts\fR routines correspond to vidattr and vidputs, +respectively. +They use a set of arguments for representing the video attributes plus color, +i.e., +.bP +\fIattrs\fP of type \fBattr_t\fP for the attributes and +.bP +\fIpair\fP of type \fBshort\fP for the color-pair number. +.PP +The \fBvid_attr\fR and \fBvid_puts\fR routines +are designed to use the attribute constants with the \fIWA_\fR prefix. +.PP +X/Open Curses reserves the \fIopts\fP argument for future use, +saying that applications must provide a null pointer for that argument. +As an extension, +this implementation allows \fIopts\fP to be used as a pointer to \fBint\fP, +which overrides the \fIpair\fP (\fBshort\fP) argument. +.PP +The \fBmvcur\fR routine provides low-level cursor motion. It takes +effect immediately (rather than at the next refresh). +.\" *************************************************************************** +.SS Terminal Capability Functions +.PP +The \fBtigetflag\fR, \fBtigetnum\fR and \fBtigetstr\fR routines return +the value of the capability corresponding to the \fBterminfo\fR +\fIcapname\fR passed to them, such as \fBxenl\fR. +The \fIcapname\fR for each capability is given in the table column entitled +\fIcapname\fR code in the capabilities section of \fBterminfo\fR(\*n). +.PP +These routines return special values to denote errors. +.PP +The \fBtigetflag\fR routine returns +.TP +\fB\-1\fR +if \fIcapname\fR is not a boolean capability, +or +.TP +\fB0\fR +if it is canceled or absent from the terminal description. +.PP +The \fBtigetnum\fR routine returns +.TP +\fB\-2\fR +if \fIcapname\fR is not a numeric capability, or +.TP +\fB\-1\fR +if it is canceled or absent from the terminal description. +.PP +The \fBtigetstr\fR routine returns +.TP +\fB(char *)\-1\fR +if \fIcapname\fR is not a string capability, +or +.TP +\fB0\fR +if it is canceled or absent from the terminal description. +.\" *************************************************************************** +.SS Terminal Capability Names +.PP +These null-terminated arrays contain +.bP +the short terminfo names (\*(``codes\*(''), +.bP +the \fBtermcap\fR names (\*(``names\*('', and +.bP +the long terminfo names (\*(``fnames\*('') +.PP +for each of the predefined \fBterminfo\fR variables: +.sp +.RS +\fBconst char *boolnames[]\fR, \fB*boolcodes[]\fR, \fB*boolfnames[]\fR +.br +\fBconst char *numnames[]\fR, \fB*numcodes[]\fR, \fB*numfnames[]\fR +.br +\fBconst char *strnames[]\fR, \fB*strcodes[]\fR, \fB*strfnames[]\fR +.RE +.SH RETURN VALUE +Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR +(SVr4 only specifies \*(``an integer value other than \fBERR\fR\*('') upon successful +completion, unless otherwise noted in the preceding routine descriptions. +.PP +Routines that return pointers always return \fBNULL\fR on error. +.PP +X/Open defines no error conditions. +In this implementation +.RS 3 +.TP 5 +\fBdel_curterm\fP +returns an error +if its terminal parameter is null. +.TP 5 +\fBputp\fP +calls \fBtputs\fP, returning the same error-codes. +.TP 5 +\fBrestartterm\fP +returns an error +if the associated call to \fBsetupterm\fP returns an error. +.TP 5 +\fBsetupterm\fP +returns an error +if it cannot allocate enough memory, or +create the initial windows (stdscr, curscr, newscr). +Other error conditions are documented above. +.TP 5 +\fBtputs\fP +returns an error if the string parameter is null. +It does not detect I/O errors: +X/Open states that \fBtputs\fP ignores the return value +of the output function \fIputc\fP. +.RE +.SH PORTABILITY +.SS Legacy functions +.PP +X/Open notes that \fBvidattr\fR and \fBvidputs\fR may be macros. +.PP +The function \fBsetterm\fR is not described by X/Open and must +be considered non-portable. +All other functions are as described by X/Open. +.SS Legacy data +.PP +\fBsetupterm\fP copies the terminal name to the array \fBttytype\fP. +This is not part of X/Open Curses, but is assumed by some applications. +.PP +Other implementions may not declare the capability name arrays. +Some provide them without declaring them. +X/Open does not specify them. +.PP +Extended terminal capability names, e.g., as defined by \fBtic\ \-x\fP, +are not stored in the arrays described here. +.SS Output buffering +.PP +Older versions of \fBncurses\fP assumed that the file descriptor passed to +\fBsetupterm\fP from \fBinitscr\fP or \fBnewterm\fP uses buffered I/O, +and would write to the corresponding stream. +In addition to the limitation that the terminal was left in block-buffered +mode on exit (like System V curses), +it was problematic because \fBncurses\fP +did not allow a reliable way to cleanup on receiving SIGTSTP. +.PP +The current version (ncurses6) +uses output buffers managed directly by \fBncurses\fP. +Some of the low-level functions described in this manual page write +to the standard output. +They are not signal-safe. +The high-level functions in \fBncurses\fP use +alternate versions of these functions +using the more reliable buffering scheme. +.SS Function prototypes +.PP +The X/Open Curses prototypes are based on the SVr4 curses header declarations, +which were defined at the same time the C language was first standardized in +the late 1980s. +.bP +X/Open Curses uses \fBconst\fP less effectively than a later design might, +in some cases applying it needlessly to values are already constant, +and in most cases overlooking parameters which normally would use \fBconst\fP. +Using constant parameters for functions which do not use \fBconst\fP +may prevent the program from compiling. +On the other hand, \fIwritable strings\fP are an obsolescent feature. +.IP +As an extension, this implementation can be configured to change the +function prototypes to use the \fBconst\fP keyword. +The ncurses ABI 6 enables this feature by default. +.bP +X/Open Curses prototypes \fBtparm\fR with a fixed number of parameters, +rather than a variable argument list. +.IP +This implementation uses a variable argument list, but can be +configured to use the fixed-parameter list. +Portable applications should provide 9 parameters after the format; +zeroes are fine for this purpose. +.IP +In response to review comments by Thomas E. Dickey, +X/Open Curses Issue 7 proposed the \fBtiparm\fP function in mid-2009. +.SS Special TERM treatment +.PP +If configured to use the terminal-driver, +e.g., for the MinGW port, +.bP +\fBsetupterm\fP interprets a missing/empty TERM variable as the +special value \*(``unknown\*(''. +.bP +\fBsetupterm\fP allows explicit use of the +the windows console driver by checking if $TERM is set to +\*(``#win32con\*('' or an abbreviation of that string. +.SS Other portability issues +.PP +In System V Release 4, \fBset_curterm\fR has an \fBint\fR return type and +returns \fBOK\fR or \fBERR\fR. We have chosen to implement the X/Open Curses +semantics. +.PP +In System V Release 4, the third argument of \fBtputs\fR has the type +\fBint (*putc)(char)\fR. +.PP +At least one implementation of X/Open Curses (Solaris) returns a value +other than \fBOK\fP/\fBERR\fP from \fBtputs\fP. +That returns the length of the string, and does no error-checking. +.PP +X/Open notes that after calling \fBmvcur\fR, the curses state may not match the +actual terminal state, and that an application should touch and refresh +the window before resuming normal curses calls. +Both \fBncurses\fP and System V Release 4 curses implement \fBmvcur\fR using +the SCREEN data allocated in either \fBinitscr\fR or \fBnewterm\fR. +So though it is documented as a terminfo function, +\fBmvcur\fR is really a curses function which is not well specified. +.PP +X/Open states that the old location must be given for \fBmvcur\fP. +This implementation allows the caller to use \-1's for the old ordinates. +In that case, the old location is unknown. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBkernel\fR(3NCURSES), +\fBtermcap\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBterminfo_variables\fR(3NCURSES), +\fBputc\fR(3), +\fBterminfo\fR(\*n) diff --git a/upstream/opensuse-leap-15-6/man3/terminfo_variables.3ncurses b/upstream/opensuse-leap-15-6/man3/terminfo_variables.3ncurses new file mode 100644 index 00000000..50f1c81a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/terminfo_variables.3ncurses @@ -0,0 +1,193 @@ +.\"*************************************************************************** +.\" Copyright (c) 2011-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: term_variables.3x,v 1.9 2017/04/14 08:33:25 tom Exp $ +.TH terminfo_variables 3NCURSES "" +.ds n 5 +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.na +.hy 0 +.SH NAME +\fBSP\fP, +\fBacs_map\fP, +\fBboolcodes\fP, +\fBboolfnames\fP, +\fBboolnames\fP, +\fBcur_term\fP, +\fBnumcodes\fP, +\fBnumfnames\fP, +\fBnumnames\fP, +\fBstrcodes\fP, +\fBstrfnames\fP, +\fBstrnames\fP, +\fBttytype\fP +\- \fBcurses\fR terminfo global variables +.ad +.hy +.SH SYNOPSIS +.nf +\fB#include \fR +.br +\fB#include \fR +.PP +\fBchtype acs_map[];\fR +.sp +\fBSCREEN * SP;\fR +.sp +\fBTERMINAL * cur_term;\fR +.sp +\fBchar ttytype[];\fR +.sp +\fBNCURSES_CONST char * const * boolcodes;\fR +.br +\fBNCURSES_CONST char * const * boolfnames;\fR +.br +\fBNCURSES_CONST char * const * boolnames;\fR +.sp +\fBNCURSES_CONST char * const * numcodes;\fR +.br +\fBNCURSES_CONST char * const * numfnames;\fR +.br +\fBNCURSES_CONST char * const * numnames;\fR +.sp +\fBNCURSES_CONST char * const * strcodes;\fR +.br +\fBNCURSES_CONST char * const * strfnames;\fR +.br +\fBNCURSES_CONST char * const * strnames;\fR +.br +.fi +.SH DESCRIPTION +This page summarizes variables provided by the \fBcurses\fP library's +low-level terminfo interface. +A more complete description is given in the \fBcurs_terminfo\fP(3X) manual page. +.PP +Depending on the configuration, these may be actual variables, +or macros (see \fBthreads\fR(3NCURSES)) +which provide read-only access to \fIcurses\fP's state. +In either case, applications should treat them as read-only to avoid +confusing the library. +.SS Alternate Character Set Mapping +After initializing the curses or terminfo interfaces, +the \fBacs_map\fP array holds information used to translate cells +with the \fBA_ALTCHARSET\fP video attribute into line-drawing characters. +.PP +The encoding of the information in this array has changed periodically. +Application developers need only know that it is used for the "ACS_" +constants in . +.PP +The comparable data for the wide-character library is a private variable. +.SS Current Terminal Data +After initializing the curses or terminfo interfaces, +the \fBcur_term\fP contains data describing the current terminal. +This variable is also set as a side-effect of \fBset_term\fP(3X) +and \fBdelscreen\fP(3X). +.PP +It is possible to save a value of \fBcur_term\fP for subsequent +use as a parameter to \fBset_term\fP, for switching between screens. +Alternatively, one can save the return value from \fBnewterm\fP +or \fBsetupterm\fP(3X) to reuse in \fBset_term\fP. +.SS Terminfo Names +The \fBtic\fP(1) and \fBinfocmp\fP(1) programs use lookup tables for +the long and short names of terminfo capabilities, +as well as the corresponding names for termcap capabilities. +These are available to other applications, +although the hash-tables used by +the terminfo and termcap functions are not available. +.PP +The long terminfo capability names use a "l" (ell) in their names: +\fBboolfnames\fP, +\fBnumfnames\fP, and +\fBstrfnames\fP. +.PP +These are the short names for terminfo capabilities: +\fBboolnames\fP, +\fBnumnames\fP, and +\fBstrnames\fP. +.PP +These are the corresponding names used for termcap descriptions: +\fBboolcodes\fP, +\fBnumcodes\fP, and +\fBstrcodes\fP. +.\" +.SS Terminal Type +A terminal description begins with one or more terminal names +separated by \*(``|\*('' (vertical bars). +On initialization of the curses or terminfo interfaces, +\fBsetupterm\fP(3X) copies the terminal names to the array \fBttytype\fP. +.\" +.SS Terminfo Names +.PP +In addition to the variables, \fB\fP also defines a symbol for each +terminfo capability \fIlong name\fP. +These are in terms of the symbol \fBCUR\fP, +which is defined +.PP +.nf +.ft CW +#define CUR ((TERMTYPE *)(cur_term))-> +.fi +.ft R +.PP +These symbols provide a faster method of accessing terminfo capabilities +than using \fBtigetstr\fR(3X), etc. +.PP +The actual definition of \fBCUR\fP depends upon the implementation, +but each terminfo library provides these long names defined to point +into the current terminal description loaded into memory. +.\" +.SH NOTES +The low-level terminfo interface is initialized using +.hy 0 +\fBsetupterm\fR(3X). +.hy +The upper-level curses interface uses the low-level terminfo interface, +internally. +.\" +.SH PORTABILITY +X/Open Curses does not describe any of these except for \fBcur_term\fP. +(The inclusion of \fBcur_term\fP appears to be an oversight, +since other comparable low-level information is omitted by X/Open). +.PP +Other implementations may have comparable variables. +Some implementations provide the variables in their libraries, +but omit them from the header files. +.PP +All implementations which provide terminfo interfaces add definitions +as described in the \fBTerminfo Names\fP section. +Most, but not all, base the definition upon the \fBcur_term\fP variable. +.SH SEE ALSO +.hy 0 +\fBncurses\fR(3NCURSES), +\fBterminfo\fR(3NCURSES), +\fBthreads\fR(3NCURSES), +\fBterminfo\fR(\*n). +.hy diff --git a/upstream/opensuse-leap-15-6/man3/termios.3 b/upstream/opensuse-leap-15-6/man3/termios.3 new file mode 100644 index 00000000..6e36322e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/termios.3 @@ -0,0 +1,1240 @@ +'\" t +.\" Copyright (c) 1993 Michael Haardt (michael@moria.de) +.\" Fri Apr 2 11:32:09 MET DST 1993 +.\" Copyright (c) 2006-2015, Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified 1993-07-24 by Rik Faith +.\" Modified 1995-02-25 by Jim Van Zandt +.\" Modified 1995-09-02 by Jim Van Zandt +.\" moved to man3, aeb, 950919 +.\" Modified 2001-09-22 by Michael Kerrisk +.\" Modified 2001-12-17, aeb +.\" Modified 2004-10-31, aeb +.\" 2006-12-28, mtk: +.\" Added .SS headers to give some structure to this page; and a +.\" small amount of reordering. +.\" Added a section on canonical and noncanonical mode. +.\" Enhanced the discussion of "raw" mode for cfmakeraw(). +.\" Document CMSPAR. +.\" +.TH termios 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, +cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \- +get and set terminal attributes, line control, get and set baud rate +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int tcgetattr(int " fd ", struct termios *" termios_p ); +.BI "int tcsetattr(int " fd ", int " optional_actions , +.BI " const struct termios *" termios_p ); +.PP +.BI "int tcsendbreak(int " fd ", int " duration ); +.BI "int tcdrain(int " fd ); +.BI "int tcflush(int " fd ", int " queue_selector ); +.BI "int tcflow(int " fd ", int " action ); +.PP +.BI "void cfmakeraw(struct termios *" termios_p ); +.PP +.BI "speed_t cfgetispeed(const struct termios *" termios_p ); +.BI "speed_t cfgetospeed(const struct termios *" termios_p ); +.PP +.BI "int cfsetispeed(struct termios *" termios_p ", speed_t " speed ); +.BI "int cfsetospeed(struct termios *" termios_p ", speed_t " speed ); +.BI "int cfsetspeed(struct termios *" termios_p ", speed_t " speed ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR cfsetspeed (), +.BR cfmakeraw (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The termios functions describe a general terminal interface that is +provided to control asynchronous communications ports. +.SS The termios structure +Many of the functions described here have a \fItermios_p\fP argument +that is a pointer to a \fItermios\fP structure. +This structure contains at least the following members: +.PP +.in +4n +.EX +tcflag_t c_iflag; /* input modes */ +tcflag_t c_oflag; /* output modes */ +tcflag_t c_cflag; /* control modes */ +tcflag_t c_lflag; /* local modes */ +cc_t c_cc[NCCS]; /* special characters */ +.EE +.in +.PP +The values that may be assigned to these fields are described below. +In the case of the first four bit-mask fields, +the definitions of some of the associated flags that may be set are +exposed only if a specific feature test macro (see +.BR feature_test_macros (7)) +is defined, as noted in brackets ("[]"). +.PP +In the descriptions below, "not in POSIX" means that the +value is not specified in POSIX.1-2001, +and "XSI" means that the value is specified in POSIX.1-2001 +as part of the XSI extension. +.PP +\fIc_iflag\fP flag constants: +.TP +.B IGNBRK +Ignore BREAK condition on input. +.TP +.B BRKINT +If \fBIGNBRK\fP is set, a BREAK is ignored. +If it is not set +but \fBBRKINT\fP is set, then a BREAK causes the input and output +queues to be flushed, and if the terminal is the controlling +terminal of a foreground process group, it will cause a +\fBSIGINT\fP to be sent to this foreground process group. +When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK +reads as a null byte (\[aq]\e0\[aq]), except when \fBPARMRK\fP is set, +in which case it reads as the sequence \e377 \e0 \e0. +.TP +.B IGNPAR +Ignore framing errors and parity errors. +.TP +.B PARMRK +If this bit is set, input bytes with parity or framing errors are +marked when passed to the program. +This bit is meaningful only when +\fBINPCK\fP is set and \fBIGNPAR\fP is not set. +The way erroneous bytes are marked is with two preceding bytes, +\e377 and \e0. +Thus, the program actually reads three bytes for one +erroneous byte received from the terminal. +If a valid byte has the value \e377, +and \fBISTRIP\fP (see below) is not set, +the program might confuse it with the prefix that marks a +parity error. +Therefore, a valid byte \e377 is passed to the program as two +bytes, \e377 \e377, in this case. +.IP +If neither \fBIGNPAR\fP nor \fBPARMRK\fP +is set, read a character with a parity error or framing error +as \e0. +.TP +.B INPCK +Enable input parity checking. +.TP +.B ISTRIP +Strip off eighth bit. +.TP +.B INLCR +Translate NL to CR on input. +.TP +.B IGNCR +Ignore carriage return on input. +.TP +.B ICRNL +Translate carriage return to newline on input (unless \fBIGNCR\fP is set). +.TP +.B IUCLC +(not in POSIX) Map uppercase characters to lowercase on input. +.TP +.B IXON +Enable XON/XOFF flow control on output. +.TP +.B IXANY +(XSI) Typing any character will restart stopped output. +(The default is to allow just the START character to restart output.) +.TP +.B IXOFF +Enable XON/XOFF flow control on input. +.TP +.B IMAXBEL +(not in POSIX) Ring bell when input queue is full. +Linux does not implement this bit, and acts as if it is always set. +.TP +.BR IUTF8 " (since Linux 2.6.4)" +(not in POSIX) Input is UTF8; +this allows character-erase to be correctly performed in cooked mode. +.PP +.I c_oflag +flag constants: +.TP +.B OPOST +Enable implementation-defined output processing. +.TP +.B OLCUC +(not in POSIX) Map lowercase characters to uppercase on output. +.TP +.B ONLCR +(XSI) Map NL to CR-NL on output. +.TP +.B OCRNL +Map CR to NL on output. +.TP +.B ONOCR +Don't output CR at column 0. +.TP +.B ONLRET +The NL character is assumed to do the carriage-return function; +the kernel's idea of the current column is set to 0 +after both NL and CR. +.TP +.B OFILL +Send fill characters for a delay, rather than using a timed delay. +.TP +.B OFDEL +Fill character is ASCII DEL (0177). +If unset, fill character is ASCII NUL (\[aq]\e0\[aq]). +(Not implemented on Linux.) +.TP +.B NLDLY +Newline delay mask. +Values are \fBNL0\fP and \fBNL1\fP. +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.TP +.B CRDLY +Carriage return delay mask. +Values are \fBCR0\fP, \fBCR1\fP, \fBCR2\fP, or \fBCR3\fP. +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.TP +.B TABDLY +Horizontal tab delay mask. +Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (or \fBXTABS\fP, +but see the +.B BUGS +section). +A value of TAB3, that is, XTABS, expands tabs to spaces +(with tab stops every eight columns). +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.TP +.B BSDLY +Backspace delay mask. +Values are \fBBS0\fP or \fBBS1\fP. +(Has never been implemented.) +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.TP +.B VTDLY +Vertical tab delay mask. +Values are \fBVT0\fP or \fBVT1\fP. +.TP +.B FFDLY +Form feed delay mask. +Values are \fBFF0\fP or \fBFF1\fP. +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.PP +\fIc_cflag\fP flag constants: +.TP +.B CBAUD +(not in POSIX) Baud speed mask (4+1 bits). +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B CBAUDEX +(not in POSIX) Extra baud speed mask (1 bit), included in +.BR CBAUD . +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.IP +(POSIX says that the baud speed is stored in the +.I termios +structure without specifying where precisely, and provides +.BR cfgetispeed () +and +.BR cfsetispeed () +for getting at it. +Some systems use bits selected by +.B CBAUD +in +.IR c_cflag , +other systems use separate fields, for example, +.I sg_ispeed +and +.IR sg_ospeed .) +.TP +.B CSIZE +Character size mask. +Values are \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, or \fBCS8\fP. +.TP +.B CSTOPB +Set two stop bits, rather than one. +.TP +.B CREAD +Enable receiver. +.TP +.B PARENB +Enable parity generation on output and parity checking for input. +.TP +.B PARODD +If set, then parity for input and output is odd; +otherwise even parity is used. +.TP +.B HUPCL +Lower modem control lines after last process closes the device (hang up). +.TP +.B CLOCAL +Ignore modem control lines. +.TP +.B LOBLK +(not in POSIX) Block output from a noncurrent shell layer. +For use by \fBshl\fP (shell layers). +(Not implemented on Linux.) +.TP +.B CIBAUD +(not in POSIX) Mask for input speeds. +The values for the +.B CIBAUD +bits are +the same as the values for the +.B CBAUD +bits, shifted left +.B IBSHIFT +bits. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +(Not implemented in glibc, supported on Linux via +.BR TCGET * +and +.BR TCSET * +ioctls; see +.BR ioctl_tty (2)) +.TP +.B CMSPAR +(not in POSIX) +Use "stick" (mark/space) parity (supported on certain serial +devices): if +.B PARODD +is set, the parity bit is always 1; if +.B PARODD +is not set, then the parity bit is always 0. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B CRTSCTS +(not in POSIX) Enable RTS/CTS (hardware) flow control. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.PP +\fIc_lflag\fP flag constants: +.TP +.B ISIG +When any of the characters INTR, QUIT, SUSP, or DSUSP are received, +generate the corresponding signal. +.TP +.B ICANON +Enable canonical mode (described below). +.TP +.B XCASE +(not in POSIX; not supported under Linux) +If \fBICANON\fP is also set, terminal is uppercase only. +Input is converted to lowercase, except for characters preceded by \e. +On output, uppercase characters are preceded by \e and lowercase +characters are converted to uppercase. +[requires +.B _BSD_SOURCE +or +.B _SVID_SOURCE +or +.BR _XOPEN_SOURCE ] +.\" glibc is probably now wrong to allow +.\" Define +.\" .B _XOPEN_SOURCE +.\" to expose +.\" .BR XCASE . +.TP +.B ECHO +Echo input characters. +.TP +.B ECHOE +If \fBICANON\fP is also set, the ERASE character erases the preceding +input character, and WERASE erases the preceding word. +.TP +.B ECHOK +If \fBICANON\fP is also set, the KILL character erases the current line. +.TP +.B ECHONL +If \fBICANON\fP is also set, echo the NL character even if ECHO is not set. +.TP +.B ECHOCTL +(not in POSIX) If \fBECHO\fP is also set, +terminal special characters other than +TAB, NL, START, and STOP are echoed as \fB\[ha]X\fP, +where X is the character with +ASCII code 0x40 greater than the special character. +For example, character +0x08 (BS) is echoed as \fB\[ha]H\fP. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B ECHOPRT +(not in POSIX) If \fBICANON\fP and \fBECHO\fP are also set, characters +are printed as they are being erased. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B ECHOKE +(not in POSIX) If \fBICANON\fP is also set, KILL is echoed by erasing +each character on the line, as specified by \fBECHOE\fP and \fBECHOPRT\fP. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B DEFECHO +(not in POSIX) Echo only when a process is reading. +(Not implemented on Linux.) +.TP +.B FLUSHO +(not in POSIX; not supported under Linux) +Output is being flushed. +This flag is toggled by typing +the DISCARD character. +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B NOFLSH +Disable flushing the input and output queues when generating signals for the +INT, QUIT, and SUSP characters. +.\" Stevens lets SUSP only flush the input queue +.TP +.B TOSTOP +Send the +.B SIGTTOU +signal to the process group of a background process +which tries to write to its controlling terminal. +.TP +.B PENDIN +(not in POSIX; not supported under Linux) +All characters in the input queue are reprinted when +the next character is read. +.RB ( bash (1) +handles typeahead this way.) +[requires +.B _BSD_SOURCE +or +.BR _SVID_SOURCE ] +.TP +.B IEXTEN +Enable implementation-defined input processing. +This flag, as well as \fBICANON\fP must be enabled for the +special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted, +and for the \fBIUCLC\fP flag to be effective. +.PP +The \fIc_cc\fP array defines the terminal special characters. +The symbolic indices (initial values) and meaning are: +.TP +.B VDISCARD +(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) +Toggle: start/stop discarding pending output. +Recognized when +.B IEXTEN +is set, and then not passed as input. +.TP +.B VDSUSP +(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) +Delayed suspend character (DSUSP): +send +.B SIGTSTP +signal when the character is read by the user program. +Recognized when +.B IEXTEN +and +.B ISIG +are set, and the system supports +job control, and then not passed as input. +.TP +.B VEOF +(004, EOT, Ctrl-D) +End-of-file character (EOF). +More precisely: this character causes the pending tty buffer to be sent +to the waiting user program without waiting for end-of-line. +If it is the first character of the line, the +.BR read (2) +in the user program returns 0, which signifies end-of-file. +Recognized when +.B ICANON +is set, and then not passed as input. +.TP +.B VEOL +(0, NUL) +Additional end-of-line character (EOL). +Recognized when +.B ICANON +is set. +.TP +.B VEOL2 +(not in POSIX; 0, NUL) +Yet another end-of-line character (EOL2). +Recognized when +.B ICANON +is set. +.TP +.B VERASE +(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) +Erase character (ERASE). +This erases the previous not-yet-erased character, +but does not erase past EOF or beginning-of-line. +Recognized when +.B ICANON +is set, and then not passed as input. +.TP +.B VINTR +(003, ETX, Ctrl-C, or also 0177, DEL, rubout) +Interrupt character (INTR). +Send a +.B SIGINT +signal. +Recognized when +.B ISIG +is set, and then not passed as input. +.TP +.B VKILL +(025, NAK, Ctrl-U, or Ctrl-X, or also @) +Kill character (KILL). +This erases the input since the last EOF or beginning-of-line. +Recognized when +.B ICANON +is set, and then not passed as input. +.TP +.B VLNEXT +(not in POSIX; 026, SYN, Ctrl-V) +Literal next (LNEXT). +Quotes the next input character, depriving it of +a possible special meaning. +Recognized when +.B IEXTEN +is set, and then not passed as input. +.TP +.B VMIN +Minimum number of characters for noncanonical read (MIN). +.TP +.B VQUIT +(034, FS, Ctrl-\e) +Quit character (QUIT). +Send +.B SIGQUIT +signal. +Recognized when +.B ISIG +is set, and then not passed as input. +.TP +.B VREPRINT +(not in POSIX; 022, DC2, Ctrl-R) +Reprint unread characters (REPRINT). +Recognized when +.B ICANON +and +.B IEXTEN +are set, and then not passed as input. +.TP +.B VSTART +(021, DC1, Ctrl-Q) +Start character (START). +Restarts output stopped by the Stop character. +Recognized when +.B IXON +is set, and then not passed as input. +.TP +.B VSTATUS +(not in POSIX; not supported under Linux; +status request: 024, DC4, Ctrl-T). +Status character (STATUS). +Display status information at terminal, +including state of foreground process and amount of CPU time it has consumed. +Also sends a +.B SIGINFO +signal (not supported on Linux) to the foreground process group. +.TP +.B VSTOP +(023, DC3, Ctrl-S) +Stop character (STOP). +Stop output until Start character typed. +Recognized when +.B IXON +is set, and then not passed as input. +.TP +.B VSUSP +(032, SUB, Ctrl-Z) +Suspend character (SUSP). +Send +.B SIGTSTP +signal. +Recognized when +.B ISIG +is set, and then not passed as input. +.TP +.B VSWTCH +(not in POSIX; not supported under Linux; 0, NUL) +Switch character (SWTCH). +Used in System V to switch shells in +.IR "shell layers" , +a predecessor to shell job control. +.TP +.B VTIME +Timeout in deciseconds for noncanonical read (TIME). +.TP +.B VWERASE +(not in POSIX; 027, ETB, Ctrl-W) +Word erase (WERASE). +Recognized when +.B ICANON +and +.B IEXTEN +are set, and then not passed as input. +.PP +An individual terminal special character can be disabled by setting +the value of the corresponding +.I c_cc +element to +.BR _POSIX_VDISABLE . +.PP +The above symbolic subscript values are all different, except that +.BR VTIME , +.B VMIN +may have the same value as +.BR VEOL , +.BR VEOF , +respectively. +In noncanonical mode the special character meaning is replaced +by the timeout meaning. +For an explanation of +.B VMIN +and +.BR VTIME , +see the description of +noncanonical mode below. +.SS Retrieving and changing terminal settings +.BR tcgetattr () +gets the parameters associated with the object referred by \fIfd\fP and +stores them in the \fItermios\fP structure referenced by +\fItermios_p\fP. +This function may be invoked from a background process; +however, the terminal attributes may be subsequently changed by a +foreground process. +.PP +.BR tcsetattr () +sets the parameters associated with the terminal (unless support is +required from the underlying hardware that is not available) from the +\fItermios\fP structure referred to by \fItermios_p\fP. +\fIoptional_actions\fP specifies when the changes take effect: +.TP +.B TCSANOW +the change occurs immediately. +.TP +.B TCSADRAIN +the change occurs after all output written to +.I fd +has been transmitted. +This option should be used when changing +parameters that affect output. +.TP +.B TCSAFLUSH +the change occurs after all output written to the object referred by +.I fd +has been transmitted, and all input that has been received but not read +will be discarded before the change is made. +.SS Canonical and noncanonical mode +The setting of the +.B ICANON +canon flag in +.I c_lflag +determines whether the terminal is operating in canonical mode +.RB ( ICANON +set) or +noncanonical mode +.RB ( ICANON +unset). +By default, +.B ICANON +is set. +.PP +In canonical mode: +.IP \[bu] 3 +Input is made available line by line. +An input line is available when one of the line delimiters +is typed (NL, EOL, EOL2; or EOF at the start of line). +Except in the case of EOF, the line delimiter is included +in the buffer returned by +.BR read (2). +.IP \[bu] +Line editing is enabled (ERASE, KILL; +and if the +.B IEXTEN +flag is set: WERASE, REPRINT, LNEXT). +A +.BR read (2) +returns at most one line of input; if the +.BR read (2) +requested fewer bytes than are available in the current line of input, +then only as many bytes as requested are read, +and the remaining characters will be available for a future +.BR read (2). +.IP \[bu] +The maximum line length is 4096 chars +(including the terminating newline character); +lines longer than 4096 chars are truncated. +After 4095 characters, input processing (e.g., +.B ISIG +and +.B ECHO* +processing) continues, but any input data after 4095 characters up to +(but not including) any terminating newline is discarded. +This ensures that the terminal can always receive +more input until at least one line can be read. +.PP +In noncanonical mode input is available immediately (without +the user having to type a line-delimiter character), +no input processing is performed, +and line editing is disabled. +The read buffer will only accept 4095 chars; this provides the +necessary space for a newline char if the input mode is switched +to canonical. +The settings of MIN +.RI ( c_cc[VMIN] ) +and TIME +.RI ( c_cc[VTIME] ) +determine the circumstances in which a +.BR read (2) +completes; there are four distinct cases: +.TP +MIN == 0, TIME == 0 (polling read) +If data is available, +.BR read (2) +returns immediately, with the lesser of the number of bytes +available, or the number of bytes requested. +If no data is available, +.BR read (2) +returns 0. +.TP +MIN > 0, TIME == 0 (blocking read) +.BR read (2) +blocks until MIN bytes are available, +and returns up to the number of bytes requested. +.TP +MIN == 0, TIME > 0 (read with timeout) +TIME specifies the limit for a timer in tenths of a second. +The timer is started when +.BR read (2) +is called. +.BR read (2) +returns either when at least one byte of data is available, +or when the timer expires. +If the timer expires without any input becoming available, +.BR read (2) +returns 0. +If data is already available at the time of the call to +.BR read (2), +the call behaves as though the data was received immediately after the call. +.TP +MIN > 0, TIME > 0 (read with interbyte timeout) +TIME specifies the limit for a timer in tenths of a second. +Once an initial byte of input becomes available, +the timer is restarted after each further byte is received. +.BR read (2) +returns when any of the following conditions is met: +.RS +.IP \[bu] 3 +MIN bytes have been received. +.IP \[bu] +The interbyte timer expires. +.IP \[bu] +The number of bytes requested by +.BR read (2) +has been received. +(POSIX does not specify this termination condition, +and on some other implementations +.\" e.g., Solaris +.BR read (2) +does not return in this case.) +.RE +.IP +Because the timer is started only after the initial byte +becomes available, at least one byte will be read. +If data is already available at the time of the call to +.BR read (2), +the call behaves as though the data was received immediately after the call. +.PP +POSIX +.\" POSIX.1-2008 XBD 11.1.7 +does not specify whether the setting of the +.B O_NONBLOCK +file status flag takes precedence over the MIN and TIME settings. +If +.B O_NONBLOCK +is set, a +.BR read (2) +in noncanonical mode may return immediately, +regardless of the setting of MIN or TIME. +Furthermore, if no data is available, +POSIX permits a +.BR read (2) +in noncanonical mode to return either 0, or \-1 with +.I errno +set to +.BR EAGAIN . +.SS Raw mode +.BR cfmakeraw () +sets the terminal to something like the +"raw" mode of the old Version 7 terminal driver: +input is available character by character, +echoing is disabled, and all special processing of +terminal input and output characters is disabled. +The terminal attributes are set as follows: +.PP +.in +4n +.EX +termios_p\->c_iflag &= \[ti](IGNBRK | BRKINT | PARMRK | ISTRIP + | INLCR | IGNCR | ICRNL | IXON); +termios_p\->c_oflag &= \[ti]OPOST; +termios_p\->c_lflag &= \[ti](ECHO | ECHONL | ICANON | ISIG | IEXTEN); +termios_p\->c_cflag &= \[ti](CSIZE | PARENB); +termios_p\->c_cflag |= CS8; +.EE +.in +.\" +.SS Line control +.BR tcsendbreak () +transmits a continuous stream of zero-valued bits for a specific +duration, if the terminal is using asynchronous serial data +transmission. +If \fIduration\fP is zero, it transmits zero-valued bits +for at least 0.25 seconds, and not more than 0.5 seconds. +If \fIduration\fP is not zero, it sends zero-valued bits for some +implementation-defined length of time. +.PP +If the terminal is not using asynchronous serial data transmission, +.BR tcsendbreak () +returns without taking any action. +.PP +.BR tcdrain () +waits until all output written to the object referred to by +.I fd +has been transmitted. +.PP +.BR tcflush () +discards data written to the object referred to by +.I fd +but not transmitted, or data received but not read, depending on the +value of +.IR queue_selector : +.TP +.B TCIFLUSH +flushes data received but not read. +.TP +.B TCOFLUSH +flushes data written but not transmitted. +.TP +.B TCIOFLUSH +flushes both data received but not read, and data written but not +transmitted. +.PP +.BR tcflow () +suspends transmission or reception of data on the object referred to by +.IR fd , +depending on the value of +.IR action : +.TP +.B TCOOFF +suspends output. +.TP +.B TCOON +restarts suspended output. +.TP +.B TCIOFF +transmits a STOP character, which stops the terminal device from +transmitting data to the system. +.TP +.B TCION +transmits a START character, which starts the terminal device +transmitting data to the system. +.PP +The default on open of a terminal file is that neither its input nor its +output is suspended. +.SS Line speed +The baud rate functions are provided for getting and setting the values +of the input and output baud rates in the \fItermios\fP structure. +The new values do not take effect +until +.BR tcsetattr () +is successfully called. +.PP +Setting the speed to \fBB0\fP instructs the modem to "hang up". +The actual bit rate corresponding to \fBB38400\fP may be altered with +.BR setserial (8). +.PP +The input and output baud rates are stored in the \fItermios\fP +structure. +.PP +.BR cfgetospeed () +returns the output baud rate stored in the \fItermios\fP structure +pointed to by +.IR termios_p . +.PP +.BR cfsetospeed () +sets the output baud rate stored in the \fItermios\fP structure pointed +to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants: +.RS +.TP +.B B0 +.TQ +.B B50 +.TQ +.B B75 +.TQ +.B B110 +.TQ +.B B134 +.TQ +.B B150 +.TQ +.B B200 +.TQ +.B B300 +.TQ +.B B600 +.TQ +.B B1200 +.TQ +.B B1800 +.TQ +.B B2400 +.TQ +.B B4800 +.TQ +.B B9600 +.TQ +.B B19200 +.TQ +.B B38400 +.TQ +.B B57600 +.TQ +.B B115200 +.TQ +.B B230400 +.TQ +.B B460800 +.TQ +.B B500000 +.TQ +.B B576000 +.TQ +.B B921600 +.TQ +.B B1000000 +.TQ +.B B1152000 +.TQ +.B B1500000 +.TQ +.B B2000000 +.RE +.PP +These constants are additionally supported on the SPARC architecture: +.RS +.TP +.B B76800 +.TQ +.B B153600 +.TQ +.B B307200 +.TQ +.B B614400 +.RE +.PP +These constants are additionally supported on non-SPARC architectures: +.RS +.TP +.B B2500000 +.TQ +.B B3000000 +.TQ +.B B3500000 +.TQ +.B B4000000 +.RE +.PP +Due to differences between architectures, portable applications should check +if a particular +.BI B nnn +constant is defined prior to using it. +.PP +The zero baud rate, +.BR B0 , +is used to terminate the connection. +If +.B B0 +is specified, the modem control lines shall no longer be asserted. +Normally, this will disconnect the line. +.B CBAUDEX +is a mask +for the speeds beyond those defined in POSIX.1 (57600 and above). +Thus, +.BR B57600 " & " CBAUDEX +is nonzero. +.PP +Setting the baud rate to a value other than those defined by +.BI B nnn +constants is possible via the +.B TCSETS2 +ioctl; see +.BR ioctl_tty (2). +.PP +.BR cfgetispeed () +returns the input baud rate stored in the +.I termios +structure. +.PP +.BR cfsetispeed () +sets the input baud rate stored in the +.I termios +structure to +.IR speed , +which must be specified as one of the +.BI B nnn +constants listed above for +.BR cfsetospeed (). +If the input baud rate is set to the literal constant +.B 0 +(not the symbolic constant +.BR B0 ), +the input baud rate will be +equal to the output baud rate. +.PP +.BR cfsetspeed () +is a 4.4BSD extension. +It takes the same arguments as +.BR cfsetispeed (), +and sets both input and output speed. +.SH RETURN VALUE +.BR cfgetispeed () +returns the input baud rate stored in the +\fItermios\fP +structure. +.PP +.BR cfgetospeed () +returns the output baud rate stored in the \fItermios\fP structure. +.PP +All other functions return: +.TP +.B 0 +on success. +.TP +.B \-1 +on failure and set +.I errno +to indicate the error. +.PP +Note that +.BR tcsetattr () +returns success if \fIany\fP of the requested changes could be +successfully carried out. +Therefore, when making multiple changes +it may be necessary to follow this call with a further call to +.BR tcgetattr () +to check that all changes have been performed successfully. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.nh +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tcgetattr (), +.BR tcsetattr (), +.BR tcdrain (), +.BR tcflush (), +.BR tcflow (), +.BR tcsendbreak (), +.BR cfmakeraw (), +.BR cfgetispeed (), +.BR cfgetospeed (), +.BR cfsetispeed (), +.BR cfsetospeed (), +.BR cfsetspeed () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.\" FIXME: The markings are different from that in the glibc manual. +.\" markings in glibc manual are more detailed: +.\" +.\" tcsendbreak: MT-Unsafe race:tcattr(filedes)/bsd +.\" tcflow: MT-Unsafe race:tcattr(filedes)/bsd +.\" +.\" glibc manual says /bsd indicate the preceding marker only applies +.\" when the underlying kernel is a BSD kernel. +.\" So, it is safety in Linux kernel. +.hy +.SH STANDARDS +.TP +.BR tcgetattr () +.TQ +.BR tcsetattr () +.TQ +.BR tcsendbreak () +.TQ +.BR tcdrain () +.TQ +.BR tcflush () +.TQ +.BR tcflow () +.TQ +.BR cfgetispeed () +.TQ +.BR cfgetospeed () +.TQ +.BR cfsetispeed () +.TQ +.BR cfsetospeed () +POSIX.1-2008. +.TP +.BR cfmakeraw () +.TQ +.BR cfsetspeed () +BSD. +.SH HISTORY +.TP +.BR tcgetattr () +.TQ +.BR tcsetattr () +.TQ +.BR tcsendbreak () +.TQ +.BR tcdrain () +.TQ +.BR tcflush () +.TQ +.BR tcflow () +.TQ +.BR cfgetispeed () +.TQ +.BR cfgetospeed () +.TQ +.BR cfsetispeed () +.TQ +.BR cfsetospeed () +POSIX.1-2001. +.TP +.BR cfmakeraw () +.TQ +.BR cfsetspeed () +BSD. +.SH NOTES +UNIX\ V7 and several later systems have a list of baud rates +where after the values +.B B0 +through +.B B9600 +one finds the two constants +.BR EXTA , +.B EXTB +("External A" and "External B"). +Many systems extend the list with much higher baud rates. +.PP +The effect of a nonzero \fIduration\fP with +.BR tcsendbreak () +varies. +SunOS specifies a break of +.I "duration\ *\ N" +seconds, where \fIN\fP is at least 0.25, and not more than 0.5. +Linux, AIX, DU, Tru64 send a break of +.I duration +milliseconds. +FreeBSD and NetBSD and HP-UX and MacOS ignore the value of +.IR duration . +Under Solaris and UnixWare, +.BR tcsendbreak () +with nonzero +.I duration +behaves like +.BR tcdrain (). +.\" libc4 until 4.7.5, glibc for sysv: EINVAL for duration > 0. +.\" libc4.7.6, libc5, glibc for unix: duration in ms. +.\" glibc for bsd: duration in us +.\" glibc for sunos4: ignore duration +.SH BUGS +.\" kernel 77e5bff1640432f28794a00800955e646dcd7455 +.\" glibc 573963e32ffac46d9891970ddebde2ac3212c5c0 +On the Alpha architecture before Linux 4.16 (and glibc before glibc 2.28), the +.B XTABS +value was different from +.B TAB3 +and it was ignored by the +.B N_TTY +line discipline code of the terminal driver as a result +(because as it wasn't part of the +.B TABDLY +mask). +.SH SEE ALSO +.BR reset (1), +.BR setterm (1), +.BR stty (1), +.BR tput (1), +.BR tset (1), +.BR tty (1), +.BR ioctl_console (2), +.BR ioctl_tty (2), +.BR cc_t (3type), +.BR speed_t (3type), +.BR tcflag_t (3type), +.BR setserial (8) diff --git a/upstream/opensuse-leap-15-6/man3/textdomain.3 b/upstream/opensuse-leap-15-6/man3/textdomain.3 new file mode 100644 index 00000000..108a1e52 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/textdomain.3 @@ -0,0 +1,57 @@ +.\" Copyright (c) Bruno Haible +.\" +.\" 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. +.\" +.\" References consulted: +.\" GNU glibc-2 source code and manual +.\" GNU gettext source code and manual +.\" LI18NUX 2000 Globalization Specification +.\" +.TH TEXTDOMAIN 3 "May 2001" "GNU gettext 20220912" +.SH NAME +textdomain \- set domain for future gettext() calls +.SH SYNOPSIS +.nf +.B #include +.sp +.BI "char * textdomain (const char * " domainname ); +.fi +.SH DESCRIPTION +The \fBtextdomain\fP function sets or retrieves the current message domain. +.PP +A message domain is a set of translatable \fImsgid\fP messages. Usually, +every software package has its own message domain. The domain name is used +to determine the message catalog where a translation is looked up; it must +be a non-empty string. +.PP +The current message domain is used by the \fBgettext\fP, \fBngettext\fP +functions, and by the \fBdgettext\fP, \fBdcgettext\fP, \fBdngettext\fP and +\fBdcngettext\fP functions when called with a NULL domainname argument. +.PP +If \fIdomainname\fP is not NULL, the current message domain is set to +\fIdomainname\fP. The string the function stores internally is a copy of the +\fIdomainname\fP argument. +.PP +If \fIdomainname\fP is NULL, the function returns the current message domain. +.SH "RETURN VALUE" +If successful, the \fBtextdomain\fP function returns the current message +domain, after possibly changing it. The resulting string is valid until the +next \fBtextdomain\fP call and must not be modified or freed. If a memory +allocation failure occurs, it sets \fBerrno\fP to \fBENOMEM\fP and returns +NULL. +.SH ERRORS +The following error can occur, among others: +.TP +.B ENOMEM +Not enough memory available. +.SH BUGS +The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid +warnings in C code predating ANSI C. +.SH "SEE ALSO" +.BR gettext (3), +.BR ngettext (3), +.BR bindtextdomain (3), +.BR bind_textdomain_codeset (3) diff --git a/upstream/opensuse-leap-15-6/man3/tgamma.3 b/upstream/opensuse-leap-15-6/man3/tgamma.3 new file mode 100644 index 00000000..db275243 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tgamma.3 @@ -0,0 +1,219 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" Based on glibc infopages +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" Modified 2004-11-15, fixed error noted by Fabian Kreutz +.\" +.\" +.TH tgamma 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tgamma, tgammaf, tgammal \- true gamma function +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double tgamma(double " x ); +.BI "float tgammaf(float " x ); +.BI "long double tgammal(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tgamma (), +.BR tgammaf (), +.BR tgammal (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions calculate the Gamma function of +.IR x . +.PP +The Gamma function is defined by +.PP +.RS +Gamma(x) = integral from 0 to infinity of t\[ha](x\-1) e\[ha]\-t dt +.RE +.PP +It is defined for every real number except for nonpositive integers. +For nonnegative integral +.I m +one has +.PP +.RS +Gamma(m+1) = m! +.RE +.PP +and, more generally, for all +.IR x : +.PP +.RS +Gamma(x+1) = x * Gamma(x) +.RE +.PP +Furthermore, the following is valid for all values of +.I x +outside the poles: +.PP +.RS +Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x) +.RE +.SH RETURN VALUE +On success, these functions return Gamma(x). +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is positive infinity, positive infinity is returned. +.PP +If +.I x +is a negative integer, or is negative infinity, +a domain error occurs, +and a NaN is returned. +.PP +If the result overflows, +a range error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the correct mathematical sign. +.PP +If the result underflows, +a range error occurs, +and the functions return 0, with the correct mathematical sign. +.PP +If +.I x +is \-0 or +0, +a pole error occurs, +and the functions return +.BR HUGE_VAL , +.BR HUGE_VALF , +or +.BR HUGE_VALL , +respectively, with the same sign as the 0. +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is a negative integer, or negative infinity +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised (but see BUGS). +.TP +Pole error: \fIx\fP is +0 or \-0 +.I errno +is set to +.BR ERANGE . +A divide-by-zero floating-point exception +.RB ( FE_DIVBYZERO ) +is raised. +.TP +Range error: result overflow +.I errno +is set to +.BR ERANGE . +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.PP +glibc also gives the following error which is not specified +in C99 or POSIX.1-2001. +.TP +Range error: result underflow +.\" e.g., tgamma(-172.5) on glibc 2.8/x86-32 +.\" .I errno +.\" is set to +.\" .BR ERANGE . +An underflow floating-point exception +.RB ( FE_UNDERFLOW ) +is raised, and +.I errno +is set to +.BR ERANGE . +.\" glibc (as at 2.8) also supports an inexact +.\" exception for various cases. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tgamma (), +.BR tgammaf (), +.BR tgammal () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH NOTES +This function had to be called "true gamma function" +since there is already a function +.BR gamma (3) +that returns something else (see +.BR gamma (3) +for details). +.SH BUGS +Before glibc 2.18, the glibc implementation of these functions did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6809 +.I errno +to +.B EDOM +when +.I x +is negative infinity. +.PP +Before glibc 2.19, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6810 +the glibc implementation of these functions did not set +.I errno +to +.B ERANGE +on an underflow range error. +.PP +.\" +In glibc versions 2.3.3 and earlier, +an argument of +0 or \-0 incorrectly produced a domain error +.RI ( errno +set to +.B EDOM +and an +.B FE_INVALID +exception raised), rather than a pole error. +.SH SEE ALSO +.BR gamma (3), +.BR lgamma (3) diff --git a/upstream/opensuse-leap-15-6/man3/threads.3ncurses b/upstream/opensuse-leap-15-6/man3/threads.3ncurses new file mode 100644 index 00000000..855664cd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/threads.3ncurses @@ -0,0 +1,602 @@ +.\"*************************************************************************** +.\" Copyright (c) 2008-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_threads.3x,v 1.24 2017/11/18 23:56:00 tom Exp $ +.TH threads 3NCURSES "" +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBcurs_threads\fR \- \fBcurses\fR thread support +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);\fR +.br +\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);\fR +.br +\fBint get_escdelay(void);\fR +.br +\fBint set_escdelay(int size);\fR +.br +\fBint set_tabsize(int size);\fR +.br +\fBint use_screen(SCREEN *scr, NCURSES_SCREEN_CB func, void *data);\fR +.br +\fBint use_window(WINDOW *win, NCURSES_WINDOW_CB func, void *data);\fR +.br +.SH DESCRIPTION +This implementation can be configured to provide rudimentary support +for multi-threaded applications. +This makes a different set of libraries, e.g., \fIlibncursest\fP since +the binary interfaces are different. +.PP +Rather than modify the interfaces to pass a thread specifier to +each function, it adds a few functions which can be used in any +configuration which hide the mutex's needed to prevent concurrent +use of the global variables when configured for threading. +.PP +In addition to forcing access to members of the \fBWINDOW\fP structure +to be via functions (see \fBcurs_opaque\fP(3X)), +it makes functions of the common global variables, +e.g., +COLORS, +COLOR_PAIRS, +COLS, +ESCDELAY, +LINES, +TABSIZE +curscr, +newscr and +ttytype. +Those variables are maintained as read-only values, stored in the \fBSCREEN\fP +structure. +.PP +Even this is not enough to make a thread-safe application using curses. +A multi-threaded application would be expected to have threads updating +separate windows (within the same device), +or updating on separate screens (on different devices). +Also, a few of the global variables are considered writable by some +applications. +The functions described here address these special situations. +.PP +The ESCDELAY and TABSIZE global variables are modified by some applications. +To modify them in any configuration, +use the \fBset_escdelay\fP or \fBset_tabsize\fP functions. +Other global variables are not modifiable. +.PP +The \fBget_escdelay\fP function returns the value for ESCDELAY. +.PP +The \fBuse_window\fP and \fBuse_screen\fP functions provide coarse +granularity mutexes for their respective \fBWINDOW\fP and \fBSCREEN\fP +parameters, and call a user-supplied function, +passing it a \fIdata\fP parameter, +and returning the value from the user-supplied function to the application. +.\" *************************************************************************** +.SS USAGE +All of the ncurses library functions assume that the locale is not +altered during operation. +In addition, +they use data which is maintained within a hierarchy of scopes. +.RS 3 +.bP +global data, e.g., used in the low-level terminfo or termcap interfaces. +.bP +terminal data, e.g., associated with a call to \fIset_curterm\fP. +The terminal data are initialized when screens are created. +.bP +screen data, e.g., associated with a call to \fInewterm\fP or \fIinitscr\fP. +.bP +window data, e.g., associated with a call to \fInewwin\fP or \fIsubwin\fP. +Windows are associated with screens. +Pads are not necessarily associated with a particular screen. +.IP +Most curses applications operate on one or more windows within a single screen. +.bP +reentrant, i.e., it uses only the data passed as parameters. +.RE +.PP +This table lists the scope of data used for each symbol in the +ncurses library when it is configured to support threading: +.TS +center tab(/); +l l +l l . +Symbol/Scope += +BC/global +COLORS/screen (readonly) +COLOR_PAIR/reentrant +COLOR_PAIRS/screen (readonly) +COLS/screen (readonly) +ESCDELAY/screen (readonly, see \fIset_escdelay\fP) +LINES/screen (readonly) +PAIR_NUMBER/reentrant +PC/global +SP/global +TABSIZE/screen (readonly) +UP/global +acs_map/screen (readonly) +add_wch/window (stdscr) +add_wchnstr/window (stdscr) +add_wchstr/window (stdscr) +addch/window (stdscr) +addchnstr/window (stdscr) +addchstr/window (stdscr) +addnstr/window (stdscr) +addnwstr/window (stdscr) +addstr/window (stdscr) +addwstr/window (stdscr) +assume_default_colors/screen +attr_get/window (stdscr) +attr_off/window (stdscr) +attr_on/window (stdscr) +attr_set/window (stdscr) +attroff/window (stdscr) +attron/window (stdscr) +attrset/window (stdscr) +baudrate/screen +beep/screen +bkgd/window (stdscr) +bkgdset/window (stdscr) +bkgrnd/window (stdscr) +bkgrndset/window (stdscr) +boolcodes/global (readonly) +boolfnames/global (readonly) +boolnames/global (readonly) +border/window (stdscr) +border_set/window (stdscr) +box/window (stdscr) +box_set/window (stdscr) +can_change_color/terminal +cbreak/screen +chgat/window (stdscr) +clear/window (stdscr) +clearok/window +clrtobot/window (stdscr) +clrtoeol/window (stdscr) +color_content/screen +color_set/window (stdscr) +copywin/window locks(source, target) +cur_term/terminal +curs_set/screen +curscr/screen (readonly) +curses_version/global (readonly) +def_prog_mode/terminal +def_shell_mode/terminal +define_key/screen +del_curterm/screen +delay_output/screen +delch/window (stdscr) +deleteln/window (stdscr) +delscreen/global locks(screenlist, screen) +delwin/global locks(windowlist) +derwin/screen +doupdate/screen +dupwin/screen locks(window) +echo/screen +echo_wchar/window (stdscr) +echochar/window (stdscr) +endwin/screen +erase/window (stdscr) +erasechar/window (stdscr) +erasewchar/window (stdscr) +filter/global +flash/terminal +flushinp/screen +get_wch/screen (input-operation) +get_wstr/screen (input-operation) +getattrs/window +getbegx/window +getbegy/window +getbkgd/window +getbkgrnd/window +getcchar/reentrant +getch/screen (input-operation) +getcurx/window +getcury/window +getmaxx/window +getmaxy/window +getmouse/screen (input-operation) +getn_wstr/screen (input-operation) +getnstr/screen (input-operation) +getparx/window +getpary/window +getstr/screen (input-operation) +getwin/screen (input-operation) +halfdelay/screen +has_colors/terminal +has_ic/terminal +has_il/terminal +has_key/screen +hline/window (stdscr) +hline_set/window (stdscr) +idcok/window +idlok/window +immedok/window +in_wch/window (stdscr) +in_wchnstr/window (stdscr) +in_wchstr/window (stdscr) +inch/window (stdscr) +inchnstr/window (stdscr) +inchstr/window (stdscr) +init_color/screen +init_pair/screen +initscr/global locks(screenlist) +innstr/window (stdscr) +innwstr/window (stdscr) +ins_nwstr/window (stdscr) +ins_wch/window (stdscr) +ins_wstr/window (stdscr) +insch/window (stdscr) +insdelln/window (stdscr) +insertln/window (stdscr) +insnstr/window (stdscr) +insstr/window (stdscr) +instr/window (stdscr) +intrflush/terminal +inwstr/window (stdscr) +is_cleared/window +is_idcok/window +is_idlok/window +is_immedok/window +is_keypad/window +is_leaveok/window +is_linetouched/window +is_nodelay/window +is_notimeout/window +is_scrollok/window +is_syncok/window +is_term_resized/terminal +is_wintouched/window +isendwin/screen +key_defined/screen +key_name/global (static data) +keybound/screen +keyname/global (static data) +keyok/screen +keypad/window +killchar/terminal +killwchar/terminal +leaveok/window +longname/screen +mcprint/terminal +meta/screen +mouse_trafo/window (stdscr) +mouseinterval/screen +mousemask/screen +move/window (stdscr) +mvadd_wch/window (stdscr) +mvadd_wchnstr/window (stdscr) +mvadd_wchstr/window (stdscr) +mvaddch/window (stdscr) +mvaddchnstr/window (stdscr) +mvaddchstr/window (stdscr) +mvaddnstr/window (stdscr) +mvaddnwstr/window (stdscr) +mvaddstr/window (stdscr) +mvaddwstr/window (stdscr) +mvchgat/window (stdscr) +mvcur/screen +mvdelch/window (stdscr) +mvderwin/window (stdscr) +mvget_wch/screen (input-operation) +mvget_wstr/screen (input-operation) +mvgetch/screen (input-operation) +mvgetn_wstr/screen (input-operation) +mvgetnstr/screen (input-operation) +mvgetstr/screen (input-operation) +mvhline/window (stdscr) +mvhline_set/window (stdscr) +mvin_wch/window (stdscr) +mvin_wchnstr/window (stdscr) +mvin_wchstr/window (stdscr) +mvinch/window (stdscr) +mvinchnstr/window (stdscr) +mvinchstr/window (stdscr) +mvinnstr/window (stdscr) +mvinnwstr/window (stdscr) +mvins_nwstr/window (stdscr) +mvins_wch/window (stdscr) +mvins_wstr/window (stdscr) +mvinsch/window (stdscr) +mvinsnstr/window (stdscr) +mvinsstr/window (stdscr) +mvinstr/window (stdscr) +mvinwstr/window (stdscr) +mvprintw/window (stdscr) +mvscanw/screen +mvvline/window (stdscr) +mvvline_set/window (stdscr) +mvwadd_wch/window +mvwadd_wchnstr/window +mvwadd_wchstr/window +mvwaddch/window +mvwaddchnstr/window +mvwaddchstr/window +mvwaddnstr/window +mvwaddnwstr/window +mvwaddstr/window +mvwaddwstr/window +mvwchgat/window +mvwdelch/window +mvwget_wch/screen (input-operation) +mvwget_wstr/screen (input-operation) +mvwgetch/screen (input-operation) +mvwgetn_wstr/screen (input-operation) +mvwgetnstr/screen (input-operation) +mvwgetstr/screen (input-operation) +mvwhline/window +mvwhline_set/window +mvwin/window +mvwin_wch/window +mvwin_wchnstr/window +mvwin_wchstr/window +mvwinch/window +mvwinchnstr/window +mvwinchstr/window +mvwinnstr/window +mvwinnwstr/window +mvwins_nwstr/window +mvwins_wch/window +mvwins_wstr/window +mvwinsch/window +mvwinsnstr/window +mvwinsstr/window +mvwinstr/window +mvwinwstr/window +mvwprintw/window +mvwscanw/screen +mvwvline/window +mvwvline_set/window +napms/reentrant +newpad/global locks(windowlist) +newscr/screen (readonly) +newterm/global locks(screenlist) +newwin/global locks(windowlist) +nl/screen +nocbreak/screen +nodelay/window +noecho/screen +nofilter/global +nonl/screen +noqiflush/terminal +noraw/screen +notimeout/window +numcodes/global (readonly) +numfnames/global (readonly) +numnames/global (readonly) +ospeed/global +overlay/window locks(source, target) +overwrite/window locks(source, target) +pair_content/screen +pecho_wchar/screen +pechochar/screen +pnoutrefresh/screen +prefresh/screen +printw/window +putp/global +putwin/window +qiflush/terminal +raw/screen +redrawwin/window +refresh/screen +reset_prog_mode/screen +reset_shell_mode/screen +resetty/terminal +resize_term/screen locks(windowlist) +resizeterm/screen +restartterm/screen +ripoffline/global (static data) +savetty/terminal +scanw/screen +scr_dump/screen +scr_init/screen +scr_restore/screen +scr_set/screen +scrl/window (stdscr) +scroll/window +scrollok/window +set_curterm/screen +set_escdelay/screen +set_tabsize/screen +set_term/global locks(screenlist, screen) +setcchar/reentrant +setscrreg/window (stdscr) +setupterm/global +slk_attr/screen +slk_attr_off/screen +slk_attr_on/screen +slk_attr_set/screen +slk_attroff/screen +slk_attron/screen +slk_attrset/screen +slk_clear/screen +slk_color/screen +slk_init/screen +slk_label/screen +slk_noutrefresh/screen +slk_refresh/screen +slk_restore/screen +slk_set/screen +slk_touch/screen +slk_wset/screen +standend/window +standout/window +start_color/screen +stdscr/screen (readonly) +strcodes/global (readonly) +strfnames/global (readonly) +strnames/global (readonly) +subpad/window +subwin/window +syncok/window +term_attrs/screen +termattrs/screen +termname/terminal +tgetent/global +tgetflag/global +tgetnum/global +tgetstr/global +tgoto/global +tigetflag/terminal +tigetnum/terminal +tigetstr/terminal +timeout/window (stdscr) +touchline/window +touchwin/window +tparm/global (static data) +tputs/screen +trace/global (static data) +ttytype/screen (readonly) +typeahead/screen +unctrl/screen +unget_wch/screen (input-operation) +ungetch/screen (input-operation) +ungetmouse/screen (input-operation) +untouchwin/window +use_default_colors/screen +use_env/global (static data) +use_extended_names/global (static data) +use_legacy_coding/screen +use_screen/global locks(screenlist, screen) +use_window/global locks(windowlist, window) +vid_attr/screen +vid_puts/screen +vidattr/screen +vidputs/screen +vline/window (stdscr) +vline_set/window (stdscr) +vw_printw/window +vw_scanw/screen +vwprintw/window +vwscanw/screen +wadd_wch/window +wadd_wchnstr/window +wadd_wchstr/window +waddch/window +waddchnstr/window +waddchstr/window +waddnstr/window +waddnwstr/window +waddstr/window +waddwstr/window +wattr_get/window +wattr_off/window +wattr_on/window +wattr_set/window +wattroff/window +wattron/window +wattrset/window +wbkgd/window +wbkgdset/window +wbkgrnd/window +wbkgrndset/window +wborder/window +wborder_set/window +wchgat/window +wclear/window +wclrtobot/window +wclrtoeol/window +wcolor_set/window +wcursyncup/screen (affects window plus parents) +wdelch/window +wdeleteln/window +wecho_wchar/window +wechochar/window +wenclose/window +werase/window +wget_wch/screen (input-operation) +wget_wstr/screen (input-operation) +wgetbkgrnd/window +wgetch/screen (input-operation) +wgetdelay/window +wgetn_wstr/screen (input-operation) +wgetnstr/screen (input-operation) +wgetparent/window +wgetscrreg/window +wgetstr/screen (input-operation) +whline/window +whline_set/window +win_wch/window +win_wchnstr/window +win_wchstr/window +winch/window +winchnstr/window +winchstr/window +winnstr/window +winnwstr/window +wins_nwstr/window +wins_wch/window +wins_wstr/window +winsch/window +winsdelln/window +winsertln/window +winsnstr/window +winsstr/window +winstr/window +winwstr/window +wmouse_trafo/window +wmove/window +wnoutrefresh/screen +wprintw/window +wredrawln/window +wrefresh/screen +wresize/window locks(windowlist) +wscanw/screen +wscrl/window +wsetscrreg/window +wstandend/window +wstandout/window +wsyncdown/screen (affects window plus parents) +wsyncup/screen (affects window plus parents) +wtimeout/window +wtouchln/window +wunctrl/global (static data) +wvline/window +wvline_set/window +.TE +.\" *************************************************************************** +.SH RETURN VALUE +These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted. +.SH NOTES +Both a macro and a function are provided for each name. +.SH PORTABILITY +These routines are specific to ncurses. +They were not supported on Version 7, BSD or System V implementations. +It is recommended that any code depending on ncurses extensions +be conditioned using NCURSES_VERSION. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBopaque\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/time.3am b/upstream/opensuse-leap-15-6/man3/time.3am new file mode 100644 index 00000000..9d397f7b --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/time.3am @@ -0,0 +1,90 @@ +.TH TIME 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +time \- time functions for gawk +.SH SYNOPSIS +.ft CW +@load "time" +.sp +time = gettimeofday() +.br +ret = sleep(amount) +.ft R +.SH DESCRIPTION +The +.I time +extension adds two functions named +.B gettimeofday() +and +.BR sleep() , +as follows. +.TP +.B gettimeofday() +This function returns the number of seconds since the Epoch +as a floating-point value. It should have subsecond precision. +It returns \-1 upon error and sets +.B ERRNO +to indicate the problem. +.TP +.BI sleep( seconds ) +This function attempts to sleep for the given amount of seconds, which +may include a fractional portion. +If +.I seconds +is negative, or the attempt to sleep fails, +then it returns \-1 and sets +.BR ERRNO . +Otherwise, the function should return 0 after sleeping +for the indicated amount of time. +.\" .SH NOTES +.\" .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "time" +\&... +printf "It is now %g seconds since the Epoch\en", gettimeofday() +printf "Pausing for a while... " ; sleep(2.5) ; print "done" +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR inplace (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR revoutput (3am), +.IR rwarray (3am). +.PP +.IR gettimeofday (2), +.IR nanosleep (2), +.IR select (2). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012, 2013, +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page 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. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. +.\" vim: set filetype=nroff : diff --git a/upstream/opensuse-leap-15-6/man3/timegm.3 b/upstream/opensuse-leap-15-6/man3/timegm.3 new file mode 100644 index 00000000..9cb38064 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/timegm.3 @@ -0,0 +1,95 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH timegm 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +timegm, timelocal \- inverses of gmtime and localtime +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] time_t timelocal(struct tm *" tm ); +.BI "time_t timegm(struct tm *" tm ); +.PP +.fi +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR timelocal (), +.BR timegm (): +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +The functions +.BR timelocal () +and +.BR timegm () +are the inverses of +.BR localtime (3) +and +.BR gmtime (3). +Both functions take a broken-down time and convert it to calendar time +(seconds since the Epoch, 1970-01-01 00:00:00 +0000, UTC). +The difference between the two functions is that +.BR timelocal () +takes the local timezone into account when doing the conversion, while +.BR timegm () +takes the input value to be Coordinated Universal Time (UTC). +.SH RETURN VALUE +On success, +these functions return the calendar time (seconds since the Epoch), +expressed as a value of type +.IR time_t . +On error, they return the value +.I (time_t)\ \-1 +and set +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EOVERFLOW +The result cannot be represented. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR timelocal (), +.BR timegm () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +BSD. +.SH HISTORY +GNU, BSD. +.PP +The +.BR timelocal () +function is equivalent to the POSIX standard function +.BR mktime (3). +There is no reason to ever use it. +.SH SEE ALSO +.BR gmtime (3), +.BR localtime (3), +.BR mktime (3), +.BR tzset (3) diff --git a/upstream/opensuse-leap-15-6/man3/timeradd.3 b/upstream/opensuse-leap-15-6/man3/timeradd.3 new file mode 100644 index 00000000..add489a1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/timeradd.3 @@ -0,0 +1,143 @@ +.\" Copyright (c) 2007 by Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2007-07-31, mtk, Created +.\" +.TH timeradd 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +timeradd, timersub, timercmp, timerclear, timerisset \- timeval operations +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void timeradd(struct timeval *" a ", struct timeval *" b , +.BI " struct timeval *" res ); +.BI "void timersub(struct timeval *" a ", struct timeval *" b , +.BI " struct timeval *" res ); +.PP +.BI "void timerclear(struct timeval *" tvp ); +.BI "int timerisset(struct timeval *" tvp ); +.PP +.BI "int timercmp(struct timeval *" a ", struct timeval *" b ", " CMP ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + glibc 2.19 and earlier: + _BSD_SOURCE +.fi +.SH DESCRIPTION +The macros are provided to operate on +.I timeval +structures, defined in +.I +as: +.PP +.in +4n +.EX +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ +}; +.EE +.in +.PP +.BR timeradd () +adds the time values in +.I a +and +.IR b , +and places the sum in the +.I timeval +pointed to by +.IR res . +The result is normalized such that +.I res\->tv_usec +has a value in the range 0 to 999,999. +.PP +.BR timersub () +subtracts the time value in +.I b +from the time value in +.IR a , +and places the result in the +.I timeval +pointed to by +.IR res . +The result is normalized such that +.I res\->tv_usec +has a value in the range 0 to 999,999. +.PP +.BR timerclear () +zeros out the +.I timeval +structure pointed to by +.IR tvp , +so that it represents the Epoch: 1970-01-01 00:00:00 +0000 (UTC). +.PP +.BR timerisset () +returns true (nonzero) if either field of the +.I timeval +structure pointed to by +.I tvp +contains a nonzero value. +.PP +.BR timercmp () +compares the timer values in +.I a +and +.I b +using the comparison operator +.IR CMP , +and returns true (nonzero) or false (0) depending on +the result of the comparison. +Some systems (but not Linux/glibc), +have a broken +.BR timercmp () +implementation, +.\" HP-UX, Tru64, Irix have a definition like: +.\"#define timercmp(tvp, uvp, cmp) \ +.\" ((tvp)->tv_sec cmp (uvp)->tv_sec || \ +.\" (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) +in which +.I CMP +of +.IR >= , +.IR <= , +and +.I == +do not work; +portable applications can instead use +.PP +.in +4n +.EX +!timercmp(..., <) +!timercmp(..., >) +!timercmp(..., !=) +.EE +.in +.SH RETURN VALUE +.BR timerisset () +and +.BR timercmp () +return true (nonzero) or false (0). +.SH ERRORS +No errors are defined. +.SH STANDARDS +None. +.SH HISTORY +BSD. +.SH SEE ALSO +.BR gettimeofday (2), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/tmpfile.3 b/upstream/opensuse-leap-15-6/man3/tmpfile.3 new file mode 100644 index 00000000..d5b1c0c4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tmpfile.3 @@ -0,0 +1,106 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sat Jul 24 17:46:57 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2001-11-17, aeb +.TH tmpfile 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tmpfile \- create a temporary file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B FILE *tmpfile(void); +.fi +.SH DESCRIPTION +The +.BR tmpfile () +function opens a unique temporary file +in binary read/write (w+b) mode. +The file will be automatically deleted when it is closed or the +program terminates. +.SH RETURN VALUE +The +.BR tmpfile () +function returns a stream descriptor, or NULL if +a unique filename cannot be generated or the unique file cannot be +opened. +In the latter case, +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EACCES +Search permission denied for directory in file's path prefix. +.TP +.B EEXIST +Unable to generate a unique filename. +.TP +.B EINTR +The call was interrupted by a signal; see +.BR signal (7). +.TP +.B EMFILE +The per-process limit on the number of open file descriptors has been reached. +.TP +.B ENFILE +The system-wide limit on the total number of open files has been reached. +.TP +.B ENOSPC +There was no room in the directory to add the new filename. +.TP +.B EROFS +Read-only filesystem. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tmpfile () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The standard does not specify the directory that +.BR tmpfile () +will use. +glibc will try the path prefix +.I P_tmpdir +defined +in +.IR , +and if that fails, then the directory +.IR /tmp . +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C89, SVr4, 4.3BSD, SUSv2. +.SH NOTES +POSIX.1-2001 specifies: +an error message may be written to +.I stdout +if the stream +cannot be opened. +.SH SEE ALSO +.BR exit (3), +.BR mkstemp (3), +.BR mktemp (3), +.BR tempnam (3), +.BR tmpnam (3) diff --git a/upstream/opensuse-leap-15-6/man3/tmpnam.3 b/upstream/opensuse-leap-15-6/man3/tmpnam.3 new file mode 100644 index 00000000..f83ef0d9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tmpnam.3 @@ -0,0 +1,169 @@ +'\" t +.\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 2003-11-15, aeb, added tmpnam_r +.\" +.TH tmpnam 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tmpnam, tmpnam_r \- create a name for a temporary file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] char *tmpnam(char *" s ); +.BI "[[deprecated]] char *tmpnam_r(char *" s ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tmpnam_r () +.nf + Since glibc 2.19: + _DEFAULT_SOURCE + Up to and including glibc 2.19: + _BSD_SOURCE || _SVID_SOURCE +.fi +.SH DESCRIPTION +.B Note: +avoid using these functions; use +.BR mkstemp (3) +or +.BR tmpfile (3) +instead. +.PP +The +.BR tmpnam () +function returns a pointer to a string that is a valid filename, +and such that a file with this name did not exist at some point +in time, so that naive programmers may think it +a suitable name for a temporary file. +If the argument +.I s +is NULL, this name is generated in an internal static buffer +and may be overwritten by the next call to +.BR tmpnam (). +If +.I s +is not NULL, the name is copied to the character array (of length +at least +.IR L_tmpnam ) +pointed to by +.I s +and the value +.I s +is returned in case of success. +.PP +The created pathname has a directory prefix +.IR P_tmpdir . +(Both +.I L_tmpnam +and +.I P_tmpdir +are defined in +.IR , +just like the +.B TMP_MAX +mentioned below.) +.PP +The +.BR tmpnam_r () +function performs the same task as +.BR tmpnam (), +but returns NULL (to indicate an error) if +.I s +is NULL. +.SH RETURN VALUE +These functions return a pointer to a unique temporary +filename, or NULL if a unique name cannot be generated. +.SH ERRORS +No errors are defined. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tmpnam () +T} Thread safety MT-Unsafe race:tmpnam/!s +T{ +.BR tmpnam_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR tmpnam () +C11, POSIX.1-2008. +.TP +.BR tmpnam_r () +None. +.SH HISTORY +.TP +.BR tmpnam () +SVr4, 4.3BSD, C89, POSIX.1-2001. +Obsolete in POSIX.1-2008. +.TP +.BR tmpnam_r () +Solaris. +.SH NOTES +The +.BR tmpnam () +function generates a different string each time it is called, +up to +.B TMP_MAX +times. +If it is called more than +.B TMP_MAX +times, +the behavior is implementation defined. +.PP +Although these functions generate names that are difficult to guess, +it is nevertheless possible that between the time that +the pathname is returned and the time that the program opens it, +another program might create that pathname using +.BR open (2), +or create it as a symbolic link. +This can lead to security holes. +To avoid such possibilities, use the +.BR open (2) +.B O_EXCL +flag to open the pathname. +Or better yet, use +.BR mkstemp (3) +or +.BR tmpfile (3). +.PP +Portable applications that use threads cannot call +.BR tmpnam () +with a NULL argument if either +.B _POSIX_THREADS +or +.B _POSIX_THREAD_SAFE_FUNCTIONS +is defined. +.SH BUGS +Never use these functions. +Use +.BR mkstemp (3) +or +.BR tmpfile (3) +instead. +.SH SEE ALSO +.BR mkstemp (3), +.BR mktemp (3), +.BR tempnam (3), +.BR tmpfile (3) diff --git a/upstream/opensuse-leap-15-6/man3/toascii.3 b/upstream/opensuse-leap-15-6/man3/toascii.3 new file mode 100644 index 00000000..1299f9ca --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/toascii.3 @@ -0,0 +1,71 @@ +'\" t +.\" Copyright (c) 1995 by Jim Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Added BUGS section, aeb, 950919 +.\" +.TH toascii 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +toascii \- convert character to ASCII +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] int toascii(int " c ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR toascii (): +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +.BR toascii () +converts +.I c +to a 7-bit +.I "unsigned char" +value that fits into the ASCII character set, by clearing the +high-order bits. +.SH RETURN VALUE +The value returned is that of the converted character. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR toascii () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +SVr4, BSD, POSIX.1-2001. +Obsolete in POSIX.1-2008, +noting that it cannot be used portably in a localized application. +.SH BUGS +Many people will be unhappy if you use this function. +This function will convert accented letters into random characters. +.SH SEE ALSO +.BR isascii (3), +.BR tolower (3), +.BR toupper (3) diff --git a/upstream/opensuse-leap-15-6/man3/touch.3ncurses b/upstream/opensuse-leap-15-6/man3/touch.3ncurses new file mode 100644 index 00000000..4dc88115 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/touch.3ncurses @@ -0,0 +1,126 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_touch.3x,v 1.20 2017/11/25 16:19:42 tom Exp $ +.TH touch 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBtouchwin\fR, +\fBtouchline\fR, +\fBuntouchwin\fR, +\fBwtouchln\fR, +\fBis_linetouched\fR, +\fBis_wintouched\fR \- \fBcurses\fR refresh control routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.br +\fBint touchwin(WINDOW *win);\fR +.br +\fBint touchline(WINDOW *win, int start, int count);\fR +.br +\fBint untouchwin(WINDOW *win);\fR +.br +\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR +.br +\fBbool is_linetouched(WINDOW *win, int line);\fR +.br +\fBbool is_wintouched(WINDOW *win);\fR +.br +.SH DESCRIPTION +The \fBtouchwin\fR and \fBtouchline\fR routines throw away all +optimization information about which parts of the window have been +touched, by pretending that the entire window has been drawn on. This +is sometimes necessary when using overlapping windows, since a change +to one window affects the other window, but the records of which lines +have been changed in the other window do not reflect the change. The +routine \fBtouchline\fR only pretends that \fIcount\fR lines have been +changed, beginning with line \fIstart\fR. +.PP +The \fBuntouchwin\fR routine marks all lines in the window as unchanged since +the last call to \fBwrefresh\fR. +.PP +The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting +at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have +not (\fIchanged\fR\fB=0\fR) been changed since the last call to +\fBwrefresh\fR. +.PP +The \fBis_linetouched\fR and \fBis_wintouched\fR routines return +\fBTRUE\fR if the specified line/window was modified since the last +call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In +addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not +valid for the given window. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR upon successful completion, unless otherwise noted in the +preceding routine descriptions. +.PP +X/Open does not define any error conditions. +In this implementation +.RS 3 +.TP 5 +\fBis_linetouched\fP +returns an error +if the window pointer is null, or +if the line number is outside the window. +.IP +The constant \fBERR\fP is distinct from \fBTRUE\fP and \fBFALSE\fP, +which are the normal return values of this function. +Because the function returns a \fBbool\fP, +returning \fBERR\fP (which is neither \fBTRUE\fP nor \fBFALSE\fP) +may not be supported by the compiler. +.IP +To provide error-checking and also match the X/Open function prototype, +the \fBERR\fP is provided by a macro named \fBis_linetouched\fP. +The actual function returns \fBFALSE\fP when it detects an error. +.TP 5 +\fBwtouchln\fP +returns an error +if the window pointer is null, or +if the line number is outside the window. +.RE +.SH PORTABILITY +.PP +These functions were introduced by SVr4. +The Solaris curses header file, +for instance, defines both an actual function and macro for each. +The macros give the same result as the actual functions. +SVr4 curses does not check the window parameter \fIwin\fP to ensure +that it is not \fBNULL\fP; +otherwise this implementation behaves the same as SVr4. +.PP +The XSI Curses standard, Issue 4 describes these functions, +but defines no error conditions. +.SH NOTES +All of these routines except \fBwtouchln\fR may be macros. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/toupper.3 b/upstream/opensuse-leap-15-6/man3/toupper.3 new file mode 100644 index 00000000..d009c00d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/toupper.3 @@ -0,0 +1,188 @@ +'\" t +.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) +.\" and Copyright 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Modified Sat Jul 24 17:45:39 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2000-02-13 by Nicolás Lichtmaier +.TH toupper 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +toupper, tolower, toupper_l, tolower_l \- convert uppercase or lowercase +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int toupper(int " "c" ); +.BI "int tolower(int " "c" ); +.PP +.BI "int toupper_l(int " c ", locale_t " locale ); +.BI "int tolower_l(int " c ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR toupper_l (), +.BR tolower_l (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +These functions convert lowercase letters to uppercase, and vice versa. +.PP +If +.I c +is a lowercase letter, +.BR toupper () +returns its uppercase equivalent, +if an uppercase representation exists in the current locale. +Otherwise, it returns +.IR c . +The +.BR toupper_l () +function performs the same task, +but uses the locale referred to by the locale handle +.IR locale . +.PP +If +.I c +is an uppercase letter, +.BR tolower () +returns its lowercase equivalent, +if a lowercase representation exists in the current locale. +Otherwise, it returns +.IR c . +The +.BR tolower_l () +function performs the same task, +but uses the locale referred to by the locale handle +.IR locale . +.PP +If +.I c +is neither an +.I "unsigned char" +value nor +.BR EOF , +the behavior of these functions +is undefined. +.PP +The behavior of +.BR toupper_l () +and +.BR tolower_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)) +or is not a valid locale object handle. +.SH RETURN VALUE +The value returned is that of the converted letter, or +.I c +if the conversion was not possible. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR toupper (), +.BR tolower (), +.BR toupper_l (), +.BR tolower_l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR toupper () +.TQ +.BR tolower () +C11, POSIX.1-2008. +.TP +.BR toupper_l () +.TQ +.BR tolower_l () +POSIX.1-2008. +.SH HISTORY +.TP +.BR toupper () +.TQ +.BR tolower () +C89, 4.3BSD, POSIX.1-2001. +.TP +.BR toupper_l () +.TQ +.BR tolower_l () +POSIX.1-2008. +.SH NOTES +The standards require that the argument +.I c +for these functions is either +.B EOF +or a value that is representable in the type +.IR "unsigned char" . +If the argument +.I c +is of type +.IR char , +it must be cast to +.IR "unsigned char" , +as in the following example: +.PP +.in +4n +.EX +char c; +\&... +res = toupper((unsigned char) c); +.EE +.in +.PP +This is necessary because +.I char +may be the equivalent +.IR "signed char" , +in which case a byte where the top bit is set would be sign extended when +converting to +.IR int , +yielding a value that is outside the range of +.IR "unsigned char" . +.PP +The details of what constitutes an uppercase or lowercase letter depend +on the locale. +For example, the default +.B """C""" +locale does not know about umlauts, so no conversion is done for them. +.PP +In some non-English locales, there are lowercase letters with no +corresponding uppercase equivalent; +.\" 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 +the German sharp s is one example. +.SH SEE ALSO +.BR isalpha (3), +.BR newlocale (3), +.BR setlocale (3), +.BR towlower (3), +.BR towupper (3), +.BR uselocale (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/towctrans.3 b/upstream/opensuse-leap-15-6/man3/towctrans.3 new file mode 100644 index 00000000..c2870e8d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/towctrans.3 @@ -0,0 +1,85 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH towctrans 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +towctrans \- wide-character transliteration +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t towctrans(wint_t " wc ", wctrans_t " desc ); +.fi +.SH DESCRIPTION +If +.I wc +is a wide character, then the +.BR towctrans () +function +translates it according to the transliteration descriptor +.IR desc . +If +.I wc +is +.BR WEOF , +.B WEOF +is returned. +.PP +.I desc +must be a transliteration descriptor returned by +the +.BR wctrans (3) +function. +.SH RETURN VALUE +The +.BR towctrans () +function returns the translated wide character, +or +.B WEOF +if +.I wc +is +.BR WEOF . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR towctrans () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR towctrans () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR towlower (3), +.BR towupper (3), +.BR wctrans (3) diff --git a/upstream/opensuse-leap-15-6/man3/towlower.3 b/upstream/opensuse-leap-15-6/man3/towlower.3 new file mode 100644 index 00000000..05cb4687 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/towlower.3 @@ -0,0 +1,132 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" and Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH towlower 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +towlower, towlower_l \- convert a wide character to lowercase +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t towlower(wint_t " wc ); +.BI "wint_t towlower_l(wint_t " wc ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR towlower_l (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR towlower () +function is the wide-character equivalent of the +.BR tolower (3) +function. +If +.I wc +is an uppercase wide character, +and there exists a lowercase equivalent in the current locale, +it returns the lowercase equivalent of +.IR wc . +In all other cases, +.I wc +is returned unchanged. +.PP +The +.BR towlower_l () +function performs the same task, +but performs the conversion based on the character type information in +the locale specified by +.IR locale . +The behavior of +.BR towlower_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)) +or is not a valid locale object handle. +.PP +The argument +.I wc +must be representable as a +.I wchar_t +and be a valid character in the locale or be the value +.BR WEOF . +.SH RETURN VALUE +If +.I wc +was convertible to lowercase, +.BR towlower () +returns its lowercase equivalent; +otherwise it returns +.IR wc . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR towlower () +T} Thread safety MT-Safe locale +T{ +.BR towlower_l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR towlower () +C11, POSIX.1-2008 (XSI). +.TP +.BR towlower_l () +POSIX.1-2008. +.SH STANDARDS +.TP +.BR towlower () +C99, POSIX.1-2001 (XSI). +Obsolete in POSIX.1-2008 (XSI). +.TP +.BR towlower_l () +glibc 2.3. +POSIX.1-2008. +.SH NOTES +The behavior of these functions depends on the +.B LC_CTYPE +category of the locale. +.PP +These functions are not very appropriate for dealing with Unicode characters, +because Unicode knows about three cases: upper, lower, and title case. +.SH SEE ALSO +.BR iswlower (3), +.BR towctrans (3), +.BR towupper (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/towupper.3 b/upstream/opensuse-leap-15-6/man3/towupper.3 new file mode 100644 index 00000000..a5dcc534 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/towupper.3 @@ -0,0 +1,131 @@ +'\" t +.\" and Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH towupper 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +towupper, towupper_l \- convert a wide character to uppercase +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t towupper(wint_t " wc ); +.BI "wint_t towupper_l(wint_t " wc ", locale_t " locale ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR towupper_l (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR towupper () +function is the wide-character equivalent of the +.BR toupper (3) +function. +If +.I wc +is a lowercase wide character, +and there exists an uppercase equivalent in the current locale, +it returns the uppercase equivalent of +.IR wc . +In all other cases, +.I wc +is returned unchanged. +.PP +The +.BR towupper_l () +function performs the same task, +but performs the conversion based on the character type information in +the locale specified by +.IR locale . +The behavior of +.BR towupper_l () +is undefined if +.I locale +is the special locale object +.B LC_GLOBAL_LOCALE +(see +.BR duplocale (3)) +or is not a valid locale object handle. +.PP +The argument +.I wc +must be representable as a +.I wchar_t +and be a valid character in the locale or be the value +.BR WEOF . +.SH RETURN VALUE +If +.I wc +was convertible to uppercase, +.BR towupper () +returns its uppercase equivalent; +otherwise it returns +.IR wc . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR towupper () +T} Thread safety MT-Safe locale +T{ +.BR towupper_l () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR towupper () +C11, POSIX.1-2008 (XSI). +.TP +.BR towupper_l () +POSIX.1-2008. +.SH HISTORY +.TP +.BR towupper () +C99, POSIX.1-2001 (XSI). +Obsolete in POSIX.1-2008 (XSI). +.TP +.BR towupper_l () +POSIX.1-2008. +glibc 2.3. +.SH NOTES +The behavior of these functions depends on the +.B LC_CTYPE +category of the locale. +.PP +These functions are not very appropriate for dealing with Unicode characters, +because Unicode knows about three cases: upper, lower, and title case. +.SH SEE ALSO +.BR iswupper (3), +.BR towctrans (3), +.BR towlower (3), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/trace.3ncurses b/upstream/opensuse-leap-15-6/man3/trace.3ncurses new file mode 100644 index 00000000..ae8cf59f --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/trace.3ncurses @@ -0,0 +1,230 @@ +.\"*************************************************************************** +.\" Copyright (c) 2000-2016,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_trace.3x,v 1.19 2017/11/18 23:47:37 tom Exp $ +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.TH trace 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBtrace\fR, +\fB_tracef\fR, +\fB_traceattr\fR, +\fB_traceattr2\fR, +\fB_tracecchar_t\fR, +\fB_tracecchar_t2\fR, +\fB_tracechar\fR, +\fB_tracechtype\fR, +\fB_tracechtype2\fR, +\fB_nc_tracebits\fR, +\fB_tracedump\fR, +\fB_tracemouse\fR \- \fBcurses\fR debugging routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBvoid trace(const unsigned int \fP\fIparam\fP\fB);\fR +.sp +\fBvoid _tracef(const char *\fP\fIformat\fP\fB, ...);\fR +.sp +\fBchar *_traceattr(attr_t \fP\fIattr\fP\fB);\fR +.br +\fBchar *_traceattr2(int \fP\fIbuffer\fP\fB, chtype \fP\fIch\fP\fB);\fR +.br +\fBchar *_tracecchar_t(const cchar_t *\fP\fIstring\fP\fB);\fR +.br +\fBchar *_tracecchar_t2(int \fP\fIbuffer\fP\fB, const cchar_t *\fP\fIstring\fP\fB);\fR +.br +\fBchar *_tracechar(int \fP\fIch\fP\fB);\fR +.br +\fBchar *_tracechtype(chtype \fP\fIch\fP\fB);\fR +.br +\fBchar *_tracechtype2(int \fP\fIbuffer\fP\fB, chtype \fP\fIch\fP\fB);\fR +.sp +\fBvoid _tracedump(const char *\fP\fIlabel\fP\fB, WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBchar *_nc_tracebits(void);\fR +.br +\fBchar *_tracemouse(const MEVENT *\fP\fIevent\fP\fB);\fR +.SH DESCRIPTION +The \fBtrace\fR routines are used for debugging the ncurses libraries, +as well as applications which use the ncurses libraries. +These functions are normally available only with the debugging library +e.g., \fIlibncurses_g.a\fR, but may be compiled into any model (shared, static, +profile) by defining the symbol \fBTRACE\fR. +Additionally, some functions are only available with the wide-character +configuration of the libraries. +.SS Functions +The principal parts of this interface are +.bP +\fBtrace\fR, which selectively enables different tracing features, and +.bP +\fB_tracef\fR, which writes formatted data to the \fItrace\fR file. +.PP +Calling \fBtrace\fR with a nonzero parameter creates the file \fBtrace\fR +in the current directory for output. +If the file already exists, no tracing is done. +.PP +The other functions either return a pointer to a string-area +(allocated by the corresponding function), +or return no value (such as \fB_tracedump\fP, which implements the +screen dump for \fBTRACE_UPDATE\fP). +The caller should not free these +strings, since the allocation is reused on successive calls. +To work around the problem of a single string-area per function, +some use a buffer-number parameter, telling the library to allocate +additional string-areas. +.SS Trace Parameter +The trace parameter is formed by OR'ing +values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB\fR. +These include: +.TP 5 +.B TRACE_DISABLE +turn off tracing by passing a zero parameter. +.IP +The library flushes the output file, +but retains an open file-descriptor to the trace file +so that it can resume tracing later if a nonzero parameter is passed +to the \fBtrace\fP function. +.TP 5 +.B TRACE_TIMES +trace user and system times of updates. +.TP 5 +.B TRACE_TPUTS +trace \fBtputs\fP(3X) calls. +.TP 5 +.B TRACE_UPDATE +trace update actions, old & new screens. +.TP 5 +.B TRACE_MOVE +trace cursor movement and scrolling. +.TP 5 +.B TRACE_CHARPUT +trace all character outputs. +.TP 5 +.B TRACE_ORDINARY +trace all update actions. +The old and new screen contents are written to the trace file +for each refresh. +.TP 5 +.B TRACE_CALLS +trace all curses calls. +The parameters for each call are traced, as well as return values. +.TP 5 +.B TRACE_VIRTPUT +trace virtual character puts, i.e., calls to \fBaddch\fR. +.TP 5 +.B TRACE_IEVENT +trace low-level input processing, including timeouts. +.TP 5 +.B TRACE_BITS +trace state of TTY control bits. +.TP 5 +.B TRACE_ICALLS +trace internal/nested calls. +.TP 5 +.B TRACE_CCALLS +trace per-character calls. +.TP 5 +.B TRACE_DATABASE +trace read/write of terminfo/termcap data. +.TP 5 +.B TRACE_ATTRS +trace changes to video attributes and colors. +.TP 5 +.B TRACE_MAXIMUM +maximum trace level, enables all of the separate trace features. +.PP +Some tracing features are enabled whenever the \fBtrace\fR parameter +is nonzero. +Some features overlap. +The specific names are used as a guideline. +.SS Initialization +These functions check the \fBNCURSES_TRACE\fP environment variable, +to set the tracing feature as if \fBtrace\fP was called: +.RS 4 +.PP +.na +.hy 0 +filter, +initscr, +new_prescr, +newterm, +nofilter, +restartterm, +ripoffline, +setupterm, +slk_init, +tgetent, +use_env, +use_extended_names, +use_tioctl +.hy +.ad +.RE +.SS Command-line Utilities +.PP +The command-line utilities such as \fBtic\fP(1) provide a verbose option +which extends the set of messages written using the \fBtrace\fP function. +Both of these (\fB\-v\fP and \fBtrace\fP) +use the same variable (\fB_nc_tracing\fP), +which determines the messages which are written. +.PP +Because the command-line utilities may call initialization functions +such as \fBsetupterm\fP, \fBtgetent\fP or \fBuse_extended_names\fP, +some of their debugging output may be directed to the \fItrace\fP file +if the \fBNCURSES_TRACE\fP environment variable is set: +.bP +messages produced in the utility are written to the standard error. +.bP +messages produced by the underlying library are written to \fItrace\fP. +.PP +If ncurses is built without tracing, none of the latter are produced, +and fewer diagnostics are provided by the command-line utilities. +.SH RETURN VALUE +Routines which return a value are designed to be used as parameters +to the \fB_tracef\fR routine. +.SH PORTABILITY +These functions are not part of the XSI interface. +Some other curses implementations are known to +have similar, undocumented features, +but they are not compatible with ncurses. +.PP +A few functions are not provided when symbol versioning is used: +.RS 4 +.PP +_nc_tracebits, +_tracedump, +_tracemouse +.RE +.SH SEE ALSO +\fBncurses\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/trunc.3 b/upstream/opensuse-leap-15-6/man3/trunc.3 new file mode 100644 index 00000000..18e95610 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/trunc.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH trunc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +trunc, truncf, truncl \- round to integer, toward zero +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double trunc(double " x ); +.BI "float truncf(float " x ); +.BI "long double truncl(long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR trunc (), +.BR truncf (), +.BR truncl (): +.nf + _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +These functions round +.I x +to the nearest integer value that is not larger in magnitude than +.IR x . +.SH RETURN VALUE +These functions return the rounded integer value, in floating format. +.PP +If +.I x +is integral, infinite, or NaN, +.I x +itself is returned. +.SH ERRORS +No errors occur. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR trunc (), +.BR truncf (), +.BR truncl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +glibc 2.1. +C99, POSIX.1-2001. +.SH NOTES +The integral value returned by these functions may be too large +to store in an integer type +.RI ( int , +.IR long , +etc.). +To avoid an overflow, which will produce undefined results, +an application should perform a range check on the returned value +before assigning it to an integer type. +.SH SEE ALSO +.BR ceil (3), +.BR floor (3), +.BR lrint (3), +.BR nearbyint (3), +.BR rint (3), +.BR round (3) diff --git a/upstream/opensuse-leap-15-6/man3/tsearch.3 b/upstream/opensuse-leap-15-6/man3/tsearch.3 new file mode 100644 index 00000000..1b5e8256 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tsearch.3 @@ -0,0 +1,353 @@ +'\" t +.\" Copyright 1995 by Jim Van Zandt +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH tsearch 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tsearch, tfind, tdelete, twalk, twalk_r, tdestroy \- manage a binary search tree +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B typedef enum { preorder, postorder, endorder, leaf } VISIT; +.PP +.BI "void *tsearch(const void *" key ", void **" rootp , +.BI " int (*" compar ")(const void *, const void *));" +.BI "void *tfind(const void *" key ", void *const *" rootp , +.BI " int (*" compar ")(const void *, const void *));" +.BI "void *tdelete(const void *restrict " key ", void **restrict " rootp , +.BI " int (*" compar ")(const void *, const void *));" +.BI "void twalk(const void *" root , +.BI " void (*" action ")(const void *" nodep ", VISIT " which , +.BI " int " depth )); +.PP +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "void twalk_r(const void *" root , +.BI " void (*" action ")(const void *" nodep ", VISIT " which , +.BI " void *" closure ), +.BI " void *" closure ); +.BI "void tdestroy(void *" root ", void (*" free_node ")(void *" nodep )); +.fi +.SH DESCRIPTION +.BR tsearch (), +.BR tfind (), +.BR twalk (), +and +.BR tdelete () +manage a +binary search tree. +They are generalized from Knuth (6.2.2) Algorithm T. +The first field in each node of the tree is a pointer to the +corresponding data item. +(The calling program must store the actual data.) +.I compar +points to a comparison routine, which takes +pointers to two items. +It should return an integer which is negative, +zero, or positive, depending on whether the first item is less than, +equal to, or greater than the second. +.PP +.BR tsearch () +searches the tree for an item. +.I key +points to the item to be searched for. +.I rootp +points to a variable which points to the root of the tree. +If the tree is empty, +then the variable that +.I rootp +points to should be set to NULL. +If the item is found in the tree, then +.BR tsearch () +returns a pointer +to the corresponding tree node. +(In other words, +.BR tsearch () +returns a pointer to a pointer to the data item.) +If the item is not found, then +.BR tsearch () +adds it, and returns a +pointer to the corresponding tree node. +.PP +.BR tfind () +is like +.BR tsearch (), +except that if the item is not +found, then +.BR tfind () +returns NULL. +.PP +.BR tdelete () +deletes an item from the tree. +Its arguments are the same as for +.BR tsearch (). +.PP +.BR twalk () +performs depth-first, left-to-right traversal of a binary +tree. +.I root +points to the starting node for the traversal. +If that node is not the root, then only part of the tree will be visited. +.BR twalk () +calls the user function +.I action +each time a node is +visited (that is, three times for an internal node, and once for a +leaf). +.IR action , +in turn, takes three arguments. +The first argument is a pointer to the node being visited. +The structure of the node is unspecified, +but it is possible to cast the pointer to a pointer-to-pointer-to-element +in order to access the element stored within the node. +The application must not modify the structure pointed to by this argument. +The second argument is an integer which +takes one of the values +.BR preorder , +.BR postorder , +or +.B endorder +depending on whether this is the first, second, or +third visit to the internal node, +or the value +.B leaf +if this is the single visit to a leaf node. +(These symbols are defined in +.IR .) +The third argument is the depth of the node; +the root node has depth zero. +.PP +(More commonly, +.BR preorder , +.BR postorder , +and +.B endorder +are known as +.BR preorder , +.BR inorder , +and +.BR postorder : +before visiting the children, after the first and before the second, +and after visiting the children. +Thus, the choice of name +.B post\%order +is rather confusing.) +.PP +.BR twalk_r () +is similar to +.BR twalk (), +but instead of the +.I depth +argument, the +.I closure +argument pointer is passed to each invocation of the action callback, +unchanged. +This pointer can be used to pass information to and from +the callback function in a thread-safe fashion, without resorting +to global variables. +.PP +.BR tdestroy () +removes the whole tree pointed to by +.IR root , +freeing all resources allocated by the +.BR tsearch () +function. +For the data in each tree node the function +.I free_node +is called. +The pointer to the data is passed as the argument to the function. +If no such work is necessary, +.I free_node +must point to a function +doing nothing. +.SH RETURN VALUE +.BR tsearch () +returns a pointer to a matching node in the tree, or to +the newly added node, or NULL if there was insufficient memory +to add the item. +.BR tfind () +returns a pointer to the node, or +NULL if no match is found. +If there are multiple items that match the key, +the item whose node is returned is unspecified. +.PP +.BR tdelete () +returns a pointer to the parent of the node deleted, or +NULL if the item was not found. +If the deleted node was the root node, +.BR tdelete () +returns a dangling pointer that must not be accessed. +.PP +.BR tsearch (), +.BR tfind (), +and +.BR tdelete () +also +return NULL if +.I rootp +was NULL on entry. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tsearch (), +.BR tfind (), +.BR tdelete () +T} Thread safety MT-Safe race:rootp +T{ +.BR twalk () +T} Thread safety MT-Safe race:root +T{ +.BR twalk_r () +T} Thread safety MT-Safe race:root +T{ +.BR tdestroy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR tsearch () +.TQ +.BR tfind () +.TQ +.BR tdelete () +.TQ +.BR twalk () +POSIX.1-2008. +.TP +.BR tdestroy () +.TQ +.BR twalk_r () +GNU. +.SH HISTORY +.TP +.BR tsearch () +.TQ +.BR tfind () +.TQ +.BR tdelete () +.TQ +.BR twalk () +POSIX.1-2001, POSIX.1-2008, SVr4. +.TP +.BR twalk_r () +glibc 2.30. +.SH NOTES +.BR twalk () +takes a pointer to the root, while the other functions +take a pointer to a variable which points to the root. +.PP +.BR tdelete () +frees the memory required for the node in the tree. +The user is responsible for freeing the memory for the corresponding +data. +.PP +The example program depends on the fact that +.BR twalk () +makes no +further reference to a node after calling the user function with +argument "endorder" or "leaf". +This works with the GNU library +implementation, but is not in the System V documentation. +.SH EXAMPLES +The following program inserts twelve random numbers into a binary +tree, where duplicate numbers are collapsed, then prints the numbers +in order. +.PP +.\" SRC BEGIN (tsearch.c) +.EX +#define _GNU_SOURCE /* Expose declaration of tdestroy() */ +#include +#include +#include +#include +#include + +static void *root = NULL; + +static void * +xmalloc(size_t n) +{ + void *p; + + p = malloc(n); + if (p) + return p; + fprintf(stderr, "insufficient memory\en"); + exit(EXIT_FAILURE); +} + +static int +compare(const void *pa, const void *pb) +{ + if (*(int *) pa < *(int *) pb) + return \-1; + if (*(int *) pa > *(int *) pb) + return 1; + return 0; +} + +static void +action(const void *nodep, VISIT which, int depth) +{ + int *datap; + + switch (which) { + case preorder: + break; + case postorder: + datap = *(int **) nodep; + printf("%6d\en", *datap); + break; + case endorder: + break; + case leaf: + datap = *(int **) nodep; + printf("%6d\en", *datap); + break; + } +} + +int +main(void) +{ + int *ptr; + int **val; + + srand(time(NULL)); + for (unsigned int i = 0; i < 12; i++) { + ptr = xmalloc(sizeof(*ptr)); + *ptr = rand() & 0xff; + val = tsearch(ptr, &root, compare); + if (val == NULL) + exit(EXIT_FAILURE); + if (*val != ptr) + free(ptr); + } + twalk(root, action); + tdestroy(root, free); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR bsearch (3), +.BR hsearch (3), +.BR lsearch (3), +.BR qsort (3) diff --git a/upstream/opensuse-leap-15-6/man3/ttyname.3 b/upstream/opensuse-leap-15-6/man3/ttyname.3 new file mode 100644 index 00000000..d66bdee2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ttyname.3 @@ -0,0 +1,112 @@ +'\" t +.\" Copyright (c) 1995 Jim Van Zandt +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified 2001-12-13, Martin Schulze +.\" Added ttyname_r, aeb, 2002-07-20 +.\" +.TH ttyname 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ttyname, ttyname_r \- return name of a terminal +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "char *ttyname(int " fd ); +.BI "int ttyname_r(int " fd ", char " buf [. buflen "], size_t " buflen ); +.fi +.SH DESCRIPTION +The function +.BR ttyname () +returns a pointer to the null-terminated pathname of the terminal device +that is open on the file descriptor \fIfd\fP, or NULL on error +(for example, if \fIfd\fP is not connected to a terminal). +The return value may point to static data, possibly overwritten by the +next call. +The function +.BR ttyname_r () +stores this pathname in the buffer +.I buf +of length +.IR buflen . +.SH RETURN VALUE +The function +.BR ttyname () +returns a pointer to a pathname on success. +On error, NULL is returned, and +.I errno +is set to indicate the error. +The function +.BR ttyname_r () +returns 0 on success, and an error number upon error. +.SH ERRORS +.TP +.B EBADF +Bad file descriptor. +.TP +.\" glibc commit 15e9a4f378c8607c2ae1aa465436af4321db0e23 +.B ENODEV +.I fd +refers to a slave pseudoterminal device +but the corresponding pathname could not be found (see NOTES). +.TP +.B ENOTTY +.I fd +does not refer to a terminal device. +.TP +.B ERANGE +.RB ( ttyname_r ()) +.I buflen +was too small to allow storing the pathname. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ttyname () +T} Thread safety MT-Unsafe race:ttyname +T{ +.BR ttyname_r () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, 4.2BSD. +.SH NOTES +A process that keeps a file descriptor that refers to a +.BR pts (4) +device open when switching to another mount namespace that uses a different +.I /dev/ptmx +instance may still accidentally find that a device path of the same name +for that file descriptor exists. +However, this device path refers to a different device and thus +can't be used to access the device that the file descriptor refers to. +Calling +.BR ttyname () +or +.BR ttyname_r () +on the file descriptor in the new mount namespace will cause these +functions to return NULL and set +.I errno +to +.BR ENODEV . +.SH SEE ALSO +.BR tty (1), +.BR fstat (2), +.BR ctermid (3), +.BR isatty (3), +.BR pts (4) diff --git a/upstream/opensuse-leap-15-6/man3/ttyslot.3 b/upstream/opensuse-leap-15-6/man3/ttyslot.3 new file mode 100644 index 00000000..d486f723 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ttyslot.3 @@ -0,0 +1,172 @@ +'\" t +.\" Copyright (C) 2002 Andries Brouwer +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" This replaces an earlier man page written by Walter Harms +.\" . +.\" +.TH ttyslot 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ttyslot \- find the slot of the current user's terminal in some file +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#include " " /* See NOTES */" +.PP +.B "int ttyslot(void);" +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ttyslot (): +.nf + Since glibc 2.24: + _DEFAULT_SOURCE + From glibc 2.20 to glibc 2.23: + _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) + glibc 2.19 and earlier: + _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) +.fi +.SH DESCRIPTION +The legacy function +.BR ttyslot () +returns the index of the current user's entry in some file. +.PP +Now "What file?" you ask. +Well, let's first look at some history. +.SS Ancient history +There used to be a file +.I /etc/ttys +in UNIX\ V6, that was read by the +.BR init (1) +program to find out what to do with each terminal line. +Each line consisted of three characters. +The first character was either \[aq]0\[aq] or \[aq]1\[aq], +where \[aq]0\[aq] meant "ignore". +The second character denoted the terminal: \[aq]8\[aq] stood for "/dev/tty8". +The third character was an argument to +.BR getty (8) +indicating the sequence of line speeds to try (\[aq]\-\[aq] was: start trying +110 baud). +Thus a typical line was "18\-". +A hang on some line was solved by changing the \[aq]1\[aq] to a \[aq]0\[aq], +signaling init, changing back again, and signaling init again. +.PP +In UNIX\ V7 the format was changed: here the second character +was the argument to +.BR getty (8) +indicating the sequence of line speeds to try (\[aq]0\[aq] was: cycle through +300-1200-150-110 baud; \[aq]4\[aq] was for the on-line console DECwriter) +while the rest of the line contained the name of the tty. +Thus a typical line was "14console". +.PP +Later systems have more elaborate syntax. +System V-like systems have +.I /etc/inittab +instead. +.SS Ancient history (2) +On the other hand, there is the file +.I /etc/utmp +listing the people currently logged in. +It is maintained by +.BR login (1). +It has a fixed size, and the appropriate index in the file was +determined by +.BR login (1) +using the +.BR ttyslot () +call to find the number of the line in +.I /etc/ttys +(counting from 1). +.SS The semantics of ttyslot +Thus, the function +.BR ttyslot () +returns the index of the controlling terminal of the calling process +in the file +.IR /etc/ttys , +and that is (usually) the same as the index of the entry for the +current user in the file +.IR /etc/utmp . +BSD still has the +.I /etc/ttys +file, but System V-like systems do not, and hence cannot refer to it. +Thus, on such systems the documentation says that +.BR ttyslot () +returns the current user's index in the user accounting data base. +.SH RETURN VALUE +If successful, this function returns the slot number. +On error (e.g., if none of the file descriptors 0, 1, or 2 is +associated with a terminal that occurs in this data base) +it returns 0 on UNIX\ V6 and V7 and BSD-like systems, +but \-1 on System V-like systems. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ttyslot () +T} Thread safety MT-Unsafe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The utmp file is found in various places on various systems, such as +.IR /etc/utmp , +.IR /var/adm/utmp , +.IR /var/run/utmp . +.SH STANDARDS +None. +.SH HISTORY +SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001. +SUSv2 requires \-1 on error. +.PP +The glibc2 implementation of this function reads the file +.BR _PATH_TTYS , +defined in +.I +as "/etc/ttys". +It returns 0 on error. +Since Linux systems do not usually have "/etc/ttys", it will +always return 0. +.PP +On BSD-like systems and Linux, the declaration of +.BR ttyslot () +is provided by +.IR . +On System V-like systems, the declaration is provided by +.IR . +Since glibc 2.24, +.I +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 +Minix also has +.IR fttyslot ( fd ). +.\" .SH HISTORY +.\" .BR ttyslot () +.\" appeared in UNIX V7. +.SH SEE ALSO +.BR getttyent (3), +.BR ttyname (3), +.BR utmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/tzset.3 b/upstream/opensuse-leap-15-6/man3/tzset.3 new file mode 100644 index 00000000..768f78b5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/tzset.3 @@ -0,0 +1,247 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" References consulted: +.\" Linux libc source code +.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) +.\" 386BSD man pages +.\" Modified Sun Jul 25 11:01:58 1993 by Rik Faith (faith@cs.unc.edu) +.\" Modified 2001-11-13, aeb +.\" Modified 2004-12-01 mtk and Martin Schulze +.\" +.TH tzset 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +tzset, tzname, timezone, daylight \- initialize time conversion information +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.B void tzset(void); +.PP +.BI "extern char *" tzname [2]; +.BI "extern long " timezone ; +.BI "extern int " daylight ; +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR tzset (): +.nf + _POSIX_C_SOURCE +.fi +.PP +.IR tzname : +.nf + _POSIX_C_SOURCE +.fi +.PP +.IR timezone , +.IR daylight : +.nf + _XOPEN_SOURCE + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE +.fi +.SH DESCRIPTION +The +.BR tzset () +function initializes the \fItzname\fP variable from the +.B TZ +environment variable. +This function is automatically called by the +other time conversion functions that depend on the timezone. +In a System-V-like environment, it will also set the variables \fItimezone\fP +(seconds West of UTC) and \fIdaylight\fP (to 0 if this timezone does not +have any daylight saving time rules, or to nonzero if there is a time, +past, present, or future when daylight saving time applies). +.PP +If the +.B TZ +variable does not appear in the environment, the system timezone is used. +The system timezone is configured by copying, or linking, a file in the +.BR tzfile (5) +format to +.IR /etc/localtime . +A timezone database of these files may be located in the system +timezone directory (see the \fBFILES\fP section below). +.PP +If the +.B TZ +variable does appear in the environment, but its value is empty, +or its value cannot be interpreted using any of the formats specified +below, then Coordinated Universal Time (UTC) is used. +.PP +The value of +.B TZ +can be one of two formats. +The first format is a string of characters that directly represent the +timezone to be used: +.PP +.in +4n +.EX +.IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]] +.EE +.in +.PP +There are no spaces in the specification. +The \fIstd\fP string specifies an abbreviation for the timezone and must be +three or more alphabetic characters. +When enclosed between the less-than (<) and greater-than (>) signs, the +character set is expanded to include the plus (+) sign, the minus (\-) +sign, and digits. +The \fIoffset\fP string immediately +follows \fIstd\fP and specifies the time value to be added to the local +time to get Coordinated Universal Time (UTC). +The \fIoffset\fP is positive +if the local timezone is west of the Prime Meridian and negative if it is +east. +The hour must be between 0 and 24, and the minutes and seconds 00 and 59: +.PP +.in +4n +.EX +.RI [ + | \- ] hh [ :mm [ :ss ]] +.EE +.in +.PP +The \fIdst\fP string and \fIoffset\fP specify the name and offset for the +corresponding daylight saving timezone. +If the offset is omitted, +it defaults to one hour ahead of standard time. +.PP +The \fIstart\fP field specifies when daylight saving time goes into +effect and the \fIend\fP field specifies when the change is made back to +standard time. +These fields may have the following formats: +.TP +J\fIn\fP +This specifies the Julian day with \fIn\fP between 1 and 365. +Leap days are not counted. +In this format, February 29 can't be represented; +February 28 is day 59, and March 1 is always day 60. +.TP +.I n +This specifies the zero-based Julian day with \fIn\fP between 0 and 365. +February 29 is counted in leap years. +.TP +M\fIm\fP.\fIw\fP.\fId\fP +This specifies day \fId\fP (0 <= \fId\fP <= 6) of week \fIw\fP +(1 <= \fIw\fP <= 5) of month \fIm\fP (1 <= \fIm\fP <= 12). +Week 1 is +the first week in which day \fId\fP occurs and week 5 is the last week +in which day \fId\fP occurs. +Day 0 is a Sunday. +.PP +The \fItime\fP fields specify when, in the local time currently in effect, +the change to the other time occurs. +If omitted, the default is 02:00:00. +.PP +Here is an example for New Zealand, +where the standard time (NZST) is 12 hours ahead of UTC, +and daylight saving time (NZDT), 13 hours ahead of UTC, +runs from the first Sunday in October to the third Sunday in March, +and the changeovers happen at the default time of 02:00:00: +.PP +.in +4n +.EX +TZ="NZST\-12:00:00NZDT\-13:00:00,M10.1.0,M3.3.0" +.EE +.in +.PP +The second format specifies that the timezone information should be read +from a file: +.PP +.in +4n +.EX +:[filespec] +.EE +.in +.PP +If the file specification \fIfilespec\fP is omitted, or its value cannot +be interpreted, then Coordinated Universal Time (UTC) is used. +If \fIfilespec\fP is given, it specifies another +.BR tzfile (5)-format +file to read the timezone information from. +If \fIfilespec\fP does not begin with a \[aq]/\[aq], the file specification is +relative to the system timezone directory. +If the colon is omitted each +of the above \fBTZ\fP formats will be tried. +.PP +Here's an example, once more for New Zealand: +.PP +.in +4n +.EX +TZ=":Pacific/Auckland" +.EE +.in +.SH ENVIRONMENT +.TP +.B TZ +If this variable is set its value takes precedence over the system +configured timezone. +.TP +.B TZDIR +If this variable is set its value takes precedence over the system +configured timezone database directory path. +.SH FILES +.TP +.I /etc/localtime +The system timezone file. +.TP +.I /usr/share/zoneinfo/ +The system timezone database directory. +.TP +.I /usr/share/zoneinfo/posixrules +When a TZ string includes a dst timezone without anything following it, +then this file is used for the start/end rules. +It is in the +.BR tzfile (5) +format. +By default, the zoneinfo Makefile hard links it to the +.IR America/New_York " tzfile." +.PP +Above are the current standard file locations, but they are +configurable when glibc is compiled. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR tzset () +T} Thread safety MT-Safe env locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4, 4.3BSD. +.PP +4.3BSD had a function +.BI "char *timezone(" zone ", " dst ) +that returned the +name of the timezone corresponding to its first argument (minutes +West of UTC). +If the second argument was 0, the standard name was used, +otherwise the daylight saving time version. +.SH SEE ALSO +.BR date (1), +.BR gettimeofday (2), +.BR time (2), +.BR ctime (3), +.BR getenv (3), +.BR tzfile (5) diff --git a/upstream/opensuse-leap-15-6/man3/ualarm.3 b/upstream/opensuse-leap-15-6/man3/ualarm.3 new file mode 100644 index 00000000..2360f052 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ualarm.3 @@ -0,0 +1,143 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH ualarm 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ualarm \- schedule signal after given number of microseconds +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "useconds_t ualarm(useconds_t " usecs ", useconds_t " interval ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR ualarm (): +.nf + Since glibc 2.12: + (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE + Before glibc 2.12: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +The +.BR ualarm () +function causes the signal +.B SIGALRM +to be sent to the invoking process after (not less than) +.I usecs +microseconds. +The delay may be lengthened slightly by any system activity +or by the time spent processing the call or by the +granularity of system timers. +.PP +Unless caught or ignored, the +.B SIGALRM +signal will terminate the process. +.PP +If the +.I interval +argument is nonzero, further +.B SIGALRM +signals will be sent every +.I interval +microseconds after the first. +.SH RETURN VALUE +This function returns the number of microseconds remaining for +any alarm that was previously set, or 0 if no alarm was pending. +.SH ERRORS +.TP +.B EINTR +Interrupted by a signal; see +.BR signal (7). +.TP +.B EINVAL +\fIusecs\fP or \fIinterval\fP is not smaller than 1000000. +(On systems where that is considered an error.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ualarm () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD, POSIX.1-2001. +POSIX.1-2001 marks it as obsolete. +Removed in POSIX.1-2008. +.PP +4.3BSD, SUSv2, and POSIX do not define any errors. +.PP +POSIX.1-2001 does not specify what happens if the +.I usecs +argument is 0. +.\" This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD! +On Linux (and probably most other systems), +the effect is to cancel any pending alarm. +.PP +The type +.I useconds_t +is an unsigned integer type capable of holding integers +in the range [0,1000000]. +On the original BSD implementation, and in glibc before glibc 2.1, +the arguments to +.BR ualarm () +were instead typed as +.IR "unsigned int" . +Programs will be more portable if they never mention +.I useconds_t +explicitly. +.PP +The interaction of this function with +other timer functions such as +.BR alarm (2), +.BR sleep (3), +.BR nanosleep (2), +.BR setitimer (2), +.BR timer_create (2), +.BR timer_delete (2), +.BR timer_getoverrun (2), +.BR timer_gettime (2), +.BR timer_settime (2), +.BR usleep (3) +is unspecified. +.PP +This function is obsolete. +Use +.BR setitimer (2) +or POSIX interval timers +.RB ( timer_create (2), +etc.) +instead. +.SH SEE ALSO +.BR alarm (2), +.BR getitimer (2), +.BR nanosleep (2), +.BR select (2), +.BR setitimer (2), +.BR usleep (3), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/ulimit.3 b/upstream/opensuse-leap-15-6/man3/ulimit.3 new file mode 100644 index 00000000..a6171b8d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ulimit.3 @@ -0,0 +1,90 @@ +'\" t +.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" Moved to man3, aeb, 980612 +.\" +.TH ulimit 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ulimit \- get and set user limits +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "[[deprecated]] long ulimit(int " cmd ", long " newlimit ); +.fi +.SH DESCRIPTION +Warning: this routine is obsolete. +Use +.BR getrlimit (2), +.BR setrlimit (2), +and +.BR sysconf (3) +instead. +For the shell command +.BR ulimit , +see +.BR bash (1). +.PP +The +.BR ulimit () +call will get or set some limit for the calling process. +The +.I cmd +argument can have one of the following values. +.TP +.B UL_GETFSIZE +Return the limit on the size of a file, in units of 512 bytes. +.TP +.B UL_SETFSIZE +Set the limit on the size of a file. +.TP +.B 3 +(Not implemented for Linux.) +Return the maximum possible address of the data segment. +.TP +.B 4 +(Implemented but no symbolic constant provided.) +Return the maximum number of files that the calling process can open. +.SH RETURN VALUE +On success, +.BR ulimit () +returns a nonnegative value. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EPERM +An unprivileged process tried to increase a limit. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ulimit () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +SVr4, POSIX.1-2001. +POSIX.1-2008 marks it as obsolete. +.SH SEE ALSO +.BR bash (1), +.BR getrlimit (2), +.BR setrlimit (2), +.BR sysconf (3) diff --git a/upstream/opensuse-leap-15-6/man3/undocumented.3 b/upstream/opensuse-leap-15-6/man3/undocumented.3 new file mode 100644 index 00000000..78e56534 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/undocumented.3 @@ -0,0 +1,164 @@ +.\" Copyright 1995 Jim Van Zandt +.\" From jrv@vanzandt.mv.com Mon Sep 4 21:11:50 1995 +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 1996-11-08, meem@sherilyn.wustl.edu, corrections +.\" 2004-10-31, aeb, changed maintainer address, updated list +.\" 2015-04-20, william@tuffbizz.com, updated list +.\" +.TH undocumented 3 2022-10-30 "Linux man-pages 6.04" +.SH NAME +undocumented \- undocumented library functions +.SH SYNOPSIS +.nf +Undocumented library functions +.fi +.SH DESCRIPTION +This man page mentions those library functions which are implemented in +the standard libraries but not yet documented in man pages. +.SS Solicitation +If you have information about these functions, +please look in the source code, write a man page (using a style +similar to that of the other Linux section 3 man pages), and send it to +.B mtk.manpages@gmail.com +for inclusion in the next man page release. +.SS The list +.BR authdes_create (3), +.BR authdes_getucred (3), +.BR authdes_pk_create (3), +.\" .BR chflags (3), +.BR clntunix_create (3), +.BR creat64 (3), +.BR dn_skipname (3), +.\" .BR fattach (3), +.\" .BR fchflags (3), +.\" .BR fclean (3), +.BR fcrypt (3), +.\" .BR fdetach (3), +.BR fp_nquery (3), +.BR fp_query (3), +.BR fp_resstat (3), +.BR freading (3), +.BR freopen64 (3), +.BR fseeko64 (3), +.BR ftello64 (3), +.BR ftw64 (3), +.BR fwscanf (3), +.BR get_avphys_pages (3), +.BR getdirentries64 (3), +.BR getmsg (3), +.BR getnetname (3), +.BR get_phys_pages (3), +.BR getpublickey (3), +.BR getsecretkey (3), +.BR h_errlist (3), +.BR host2netname (3), +.BR hostalias (3), +.BR inet_nsap_addr (3), +.BR inet_nsap_ntoa (3), +.BR init_des (3), +.BR libc_nls_init (3), +.BR mstats (3), +.BR netname2host (3), +.BR netname2user (3), +.BR nlist (3), +.BR obstack_free (3), +.\" .BR obstack stuff (3), +.BR parse_printf_format (3), +.BR p_cdname (3), +.BR p_cdnname (3), +.BR p_class (3), +.BR p_fqname (3), +.BR p_option (3), +.BR p_query (3), +.BR printf_size (3), +.BR printf_size_info (3), +.BR p_rr (3), +.BR p_time (3), +.BR p_type (3), +.BR putlong (3), +.BR putshort (3), +.BR re_compile_fastmap (3), +.BR re_compile_pattern (3), +.BR register_printf_function (3), +.BR re_match (3), +.BR re_match_2 (3), +.BR re_rx_search (3), +.BR re_search (3), +.BR re_search_2 (3), +.BR re_set_registers (3), +.BR re_set_syntax (3), +.BR res_send_setqhook (3), +.BR res_send_setrhook (3), +.BR ruserpass (3), +.BR setfileno (3), +.BR sethostfile (3), +.BR svc_exit (3), +.BR svcudp_enablecache (3), +.BR tell (3), +.BR thrd_create (3), +.BR thrd_current (3), +.BR thrd_equal (3), +.BR thrd_sleep (3), +.BR thrd_yield (3), +.BR tr_break (3), +.BR tzsetwall (3), +.BR ufc_dofinalperm (3), +.BR ufc_doit (3), +.BR user2netname (3), +.BR wcschrnul (3), +.BR wcsftime (3), +.BR wscanf (3), +.BR xdr_authdes_cred (3), +.BR xdr_authdes_verf (3), +.BR xdr_cryptkeyarg (3), +.BR xdr_cryptkeyres (3), +.BR xdr_datum (3), +.BR xdr_des_block (3), +.BR xdr_domainname (3), +.BR xdr_getcredres (3), +.BR xdr_keybuf (3), +.BR xdr_keystatus (3), +.BR xdr_mapname (3), +.BR xdr_netnamestr (3), +.BR xdr_netobj (3), +.BR xdr_passwd (3), +.BR xdr_peername (3), +.BR xdr_rmtcall_args (3), +.BR xdr_rmtcallres (3), +.BR xdr_unixcred (3), +.BR xdr_yp_buf (3), +.BR xdr_yp_inaddr (3), +.BR xdr_ypbind_binding (3), +.BR xdr_ypbind_resp (3), +.BR xdr_ypbind_resptype (3), +.BR xdr_ypbind_setdom (3), +.BR xdr_ypdelete_args (3), +.BR xdr_ypmaplist (3), +.BR xdr_ypmaplist_str (3), +.BR xdr_yppasswd (3), +.BR xdr_ypreq_key (3), +.BR xdr_ypreq_nokey (3), +.BR xdr_ypresp_all (3), +.BR xdr_ypresp_all_seq (3), +.BR xdr_ypresp_key_val (3), +.BR xdr_ypresp_maplist (3), +.BR xdr_ypresp_master (3), +.BR xdr_ypresp_order (3), +.BR xdr_ypresp_val (3), +.BR xdr_ypstat (3), +.BR xdr_ypupdate_args (3), +.BR yp_all (3), +.BR yp_bind (3), +.BR yperr_string (3), +.BR yp_first (3), +.BR yp_get_default_domain (3), +.BR yp_maplist (3), +.BR yp_master (3), +.BR yp_match (3), +.BR yp_next (3), +.BR yp_order (3), +.BR ypprot_err (3), +.BR yp_unbind (3), +.BR yp_update (3) diff --git a/upstream/opensuse-leap-15-6/man3/ungetwc.3 b/upstream/opensuse-leap-15-6/man3/ungetwc.3 new file mode 100644 index 00000000..83267fe3 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/ungetwc.3 @@ -0,0 +1,105 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH ungetwc 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +ungetwc \- push back a wide character onto a FILE stream +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wint_t ungetwc(wint_t " wc ", FILE *" stream ); +.fi +.SH DESCRIPTION +The +.BR ungetwc () +function is the wide-character equivalent of the +.BR ungetc (3) +function. +It pushes back a wide character onto +.I stream +and returns it. +.PP +If +.I wc +is +.BR WEOF , +it returns +.BR WEOF . +If +.I wc +is an invalid wide character, +it sets +.I errno +to +.B EILSEQ +and returns +.BR WEOF . +.PP +If +.I wc +is a valid wide character, it is pushed back onto the stream +and thus becomes available for future wide-character read operations. +The file-position indicator is decremented by one or more. +The end-of-file +indicator is cleared. +The backing storage of the file is not affected. +.PP +Note: +.I wc +need not be the last wide-character read from the stream; +it can be any other valid wide character. +.PP +If the implementation supports multiple push-back operations in a row, the +pushed-back wide characters will be read in reverse order; however, only one +level of push-back is guaranteed. +.SH RETURN VALUE +The +.BR ungetwc () +function returns +.I wc +when successful, or +.B WEOF +upon +failure. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR ungetwc () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR ungetwc () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR fgetwc (3) diff --git a/upstream/opensuse-leap-15-6/man3/unlocked_stdio.3 b/upstream/opensuse-leap-15-6/man3/unlocked_stdio.3 new file mode 100644 index 00000000..185c16e8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/unlocked_stdio.3 @@ -0,0 +1,197 @@ +'\" t +.\" Copyright (C) 2001 Andries Brouwer . +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH unlocked_stdio 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +getc_unlocked, getchar_unlocked, putc_unlocked, +putchar_unlocked \- nonlocking stdio functions +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int getc_unlocked(FILE *" stream ); +.B "int getchar_unlocked(void);" +.BI "int putc_unlocked(int " c ", FILE *" stream ); +.BI "int putchar_unlocked(int " c ); +.PP +.BI "void clearerr_unlocked(FILE *" stream ); +.BI "int feof_unlocked(FILE *" stream ); +.BI "int ferror_unlocked(FILE *" stream ); +.BI "int fileno_unlocked(FILE *" stream ); +.BI "int fflush_unlocked(FILE *" stream ); +.PP +.BI "int fgetc_unlocked(FILE *" stream ); +.BI "int fputc_unlocked(int " c ", FILE *" stream ); +.PP +.BI "size_t fread_unlocked(void " ptr "[restrict ." size " * ." n ], +.BI " size_t " size ", size_t " n , +.BI " FILE *restrict " stream ); +.BI "size_t fwrite_unlocked(const void " ptr "[restrict ." size " * ." n ], +.BI " size_t " size ", size_t " n , +.BI " FILE *restrict " stream ); +.PP +.BI "char *fgets_unlocked(char " s "[restrict ." n "], int " n \ +", FILE *restrict " stream ); +.BI "int fputs_unlocked(const char *restrict " s ", FILE *restrict " stream ); +.PP +.B #include +.PP +.BI "wint_t getwc_unlocked(FILE *" stream ); +.B "wint_t getwchar_unlocked(void);" +.BI "wint_t fgetwc_unlocked(FILE *" stream ); +.PP +.BI "wint_t fputwc_unlocked(wchar_t " wc ", FILE *" stream ); +.BI "wint_t putwc_unlocked(wchar_t " wc ", FILE *" stream ); +.BI "wint_t putwchar_unlocked(wchar_t " wc ); +.PP +.BI "wchar_t *fgetws_unlocked(wchar_t " ws "[restrict ." n "], int " n , +.BI " FILE *restrict " stream ); +.BI "int fputws_unlocked(const wchar_t *restrict " ws , +.BI " FILE *restrict " stream ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.nh +.RE +.ad l +.PP +.BR getc_unlocked (), +.BR getchar_unlocked (), +.BR putc_unlocked (), +.BR putchar_unlocked (): +.nf + /* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L + || /* glibc <= 2.23: */ _POSIX_C_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR clearerr_unlocked (), +.BR feof_unlocked (), +.BR ferror_unlocked (), +.BR fileno_unlocked (), +.BR fflush_unlocked (), +.BR fgetc_unlocked (), +.BR fputc_unlocked (), +.BR fread_unlocked (), +.BR fwrite_unlocked (): +.nf + /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR fgets_unlocked (), +.BR fputs_unlocked (), +.BR getwc_unlocked (), +.BR getwchar_unlocked (), +.BR fgetwc_unlocked (), +.BR fputwc_unlocked (), +.BR putwchar_unlocked (), +.BR fgetws_unlocked (), +.BR fputws_unlocked (): +.nf + _GNU_SOURCE +.fi +.hy +.ad +.SH DESCRIPTION +Each of these functions has the same behavior as its counterpart +without the "_unlocked" suffix, except that they do not use locking +(they do not set locks themselves, and do not test for the presence +of locks set by others) and hence are thread-unsafe. +See +.BR flockfile (3). +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR getc_unlocked (), +.BR putc_unlocked (), +.BR clearerr_unlocked (), +.BR fflush_unlocked (), +.BR fgetc_unlocked (), +.BR fputc_unlocked (), +.BR fread_unlocked (), +.BR fwrite_unlocked (), +.BR fgets_unlocked (), +.BR fputs_unlocked (), +.BR getwc_unlocked (), +.BR fgetwc_unlocked (), +.BR fputwc_unlocked (), +.BR putwc_unlocked (), +.BR fgetws_unlocked (), +.BR fputws_unlocked () +T} Thread safety T{ +MT-Safe race:stream +T} +T{ +.BR getchar_unlocked (), +.BR getwchar_unlocked () +T} Thread safety T{ +MT-Unsafe race:stdin +T} +T{ +.BR putchar_unlocked (), +.BR putwchar_unlocked () +T} Thread safety T{ +MT-Unsafe race:stdout +T} +T{ +.BR feof_unlocked (), +.BR ferror_unlocked (), +.BR fileno_unlocked () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR getc_unlocked () +.TQ +.BR getchar_unlocked () +.TQ +.BR putc_unlocked () +.TQ +.BR putchar_unlocked () +POSIX.1-2008. +.TP +Others: +None. +.SH HISTORY +.TP +.BR getc_unlocked () +.TQ +.BR getchar_unlocked () +.TQ +.BR putc_unlocked () +.TQ +.BR putchar_unlocked () +POSIX.1-2001. +.\" E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and +.\" moved to a compatibility library. +.\" Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked, +.\" feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked, +.\" fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked, +.\" fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked, +.\" ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked, +.\" getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked, +.\" putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked, +.\" putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked, +.\" ungetc_unlocked, ungetwc_unlocked. +.SH SEE ALSO +.BR flockfile (3), +.BR stdio (3) diff --git a/upstream/opensuse-leap-15-6/man3/unlockpt.3 b/upstream/opensuse-leap-15-6/man3/unlockpt.3 new file mode 100644 index 00000000..953dbbb7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/unlockpt.3 @@ -0,0 +1,87 @@ +'\" t +.\" %%%LICENSE_START(PUBLIC_DOMAIN) +.\" This page is in the public domain. - aeb +.\" %%%LICENSE_END +.\" +.TH unlockpt 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +unlockpt \- unlock a pseudoterminal master/slave pair +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #define _XOPEN_SOURCE +.B #include +.PP +.BI "int unlockpt(int " fd ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR unlockpt (): +.nf + Since glibc 2.24: + _XOPEN_SOURCE >= 500 +.\" || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) + glibc 2.23 and earlier: + _XOPEN_SOURCE +.fi +.SH DESCRIPTION +The +.BR unlockpt () +function unlocks the slave pseudoterminal device +corresponding to the master pseudoterminal referred to by the file descriptor +.IR fd . +.PP +.BR unlockpt () +should be called before opening the slave side of a pseudoterminal. +.SH RETURN VALUE +When successful, +.BR unlockpt () +returns 0. +Otherwise, it returns \-1 and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EBADF +The +.I fd +argument is not a file descriptor open for writing. +.TP +.B EINVAL +The +.I fd +argument is not associated with a master pseudoterminal. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR unlockpt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +POSIX.1-2001. +.SH SEE ALSO +.BR grantpt (3), +.BR posix_openpt (3), +.BR ptsname (3), +.BR pts (4), +.BR pty (7) diff --git a/upstream/opensuse-leap-15-6/man3/updwtmp.3 b/upstream/opensuse-leap-15-6/man3/updwtmp.3 new file mode 100644 index 00000000..1e9cc88c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/updwtmp.3 @@ -0,0 +1,84 @@ +'\" t +.\" Copyright 1997 Nicolás Lichtmaier +.\" Created Wed Jul 2 23:27:34 ART 1997 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Added info on availability, aeb, 971207 +.\" Added -lutil remark, 030718 +.\" 2008-07-02, mtk, document updwtmpx() +.\" +.TH updwtmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +updwtmp, logwtmp \- append an entry to the wtmp file +.SH LIBRARY +System utilities library +.RI ( libutil ", " \-lutil ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut ); +.BI "void logwtmp(const char *" line ", const char *" name \ +", const char *" host ); +.fi +.SH DESCRIPTION +.BR updwtmp () +appends the utmp structure +.I ut +to the wtmp file. +.PP +.BR logwtmp () +constructs a utmp structure using +.IR line ", " name ", " host , +current time, and current process ID. +Then it calls +.BR updwtmp () +to append the structure to the wtmp file. +.SH FILES +.TP +.I /var/log/wtmp +database of past user logins +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR updwtmp (), +.BR logwtmp () +T} Thread safety MT-Unsafe sig:ALRM timer +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +For consistency with the other "utmpx" functions (see +.BR getutxent (3)), +glibc provides (since glibc 2.1): +.PP +.in +4n +.EX +.BR "#define _GNU_SOURCE " "/* See feature_test_macros(7) */" +.B #include +.BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); +.EE +.in +.PP +This function performs the same task as +.BR updwtmp (), +but differs in that it takes a +.I utmpx +structure as its last argument. +.SH STANDARDS +None. +.SH HISTORY +Solaris, NetBSD. +.SH SEE ALSO +.BR getutxent (3), +.BR wtmp (5) diff --git a/upstream/opensuse-leap-15-6/man3/uselocale.3 b/upstream/opensuse-leap-15-6/man3/uselocale.3 new file mode 100644 index 00000000..dee723ca --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uselocale.3 @@ -0,0 +1,102 @@ +.\" Copyright (C) 2014 Michael Kerrisk +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.TH uselocale 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +uselocale \- set/get the locale for the calling thread +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "locale_t uselocale(locale_t " newloc ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR uselocale (): +.nf + Since glibc 2.10: + _XOPEN_SOURCE >= 700 + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR uselocale () +function sets the current locale for the calling thread, +and returns the thread's previously current locale. +After a successful call to +.BR uselocale (), +any calls by this thread to functions that depend on the locale +will operate as though the locale has been set to +.IR newloc . +.PP +The +.I newloc +argument can have one of the following values: +.TP +A handle returned by a call to \fBnewlocale\fP(3) or \fBduplocale\fP(3) +The calling thread's current locale is set to the specified locale. +.TP +The special locale object handle \fBLC_GLOBAL_LOCALE\fP +The calling thread's current locale is set to the global locale determined by +.BR setlocale (3). +.TP +.I "(locale_t) 0" +The calling thread's current locale is left unchanged +(and the current locale is returned as the function result). +.SH RETURN VALUE +On success, +.BR uselocale () +returns the locale handle that was set by the previous call to +.BR uselocale () +in this thread, or +.B LC_GLOBAL_LOCALE +if there was no such previous call. +On error, it returns +.IR "(locale_t)\ 0" , +and sets +.I errno +to indicate the error. +.SH ERRORS +.TP +.B EINVAL +.I newloc +does not refer to a valid locale object. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.3. +POSIX.1-2008. +.SH NOTES +Unlike +.BR setlocale (3), +.BR uselocale () +does not allow selective replacement of individual locale categories. +To employ a locale that differs in only a few categories from the current +locale, use calls to +.BR duplocale (3) +and +.BR newlocale (3) +to obtain a locale object equivalent to the current locale and +modify the desired categories in that object. +.SH EXAMPLES +See +.BR newlocale (3) +and +.BR duplocale (3). +.SH SEE ALSO +.BR locale (1), +.BR duplocale (3), +.BR freelocale (3), +.BR newlocale (3), +.BR setlocale (3), +.BR locale (5), +.BR locale (7) diff --git a/upstream/opensuse-leap-15-6/man3/userptr.3form b/upstream/opensuse-leap-15-6/man3/userptr.3form new file mode 100644 index 00000000..d3d52762 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/userptr.3form @@ -0,0 +1,64 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_userptr.3x,v 1.14 2015/12/05 23:42:45 tom Exp $ +.TH userptr 3FORM "" +.SH NAME +\fBset_form_userptr\fP, +\fBform_userptr\fR \- associate application data with a form item +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_userptr(FORM *form, void *userptr); +.br +void* form_userptr(const FORM *form); +.br +.SH DESCRIPTION +Every form and every form item has a field that can be used to hold +application-specific data (that is, the form-driver code leaves it alone). +These functions get and set the form user pointer field. +.SH RETURN VALUE +The function \fBform_userptr\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +The function \fBset_form_userptr\fR returns \fBE_OK\fP (success). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.PP +The user pointer is a void pointer. +We chose not to leave it as a char pointer for SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/userptr.3menu b/upstream/opensuse-leap-15-6/man3/userptr.3menu new file mode 100644 index 00000000..2538851e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/userptr.3menu @@ -0,0 +1,64 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_userptr.3x,v 1.11 2015/12/05 23:42:45 tom Exp $ +.TH userptr 3MENU "" +.SH NAME +\fBset_menu_userptr\fP, +\fBmenu_userptr\fR \- associate application data with a menu item +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_userptr(MENU *menu, void *userptr); +.br +void *menu_userptr(const MENU *menu); +.br +.SH DESCRIPTION +Every menu and every menu item has a field that can be used to hold +application-specific data (that is, the menu-driver code leaves it alone). +These functions get and set the menu user pointer field. +.SH RETURN VALUE +\fBmenu_userptr\fR returns a pointer (which may be \fBNULL\fR). +It does not set errno. +.PP +\fBset_menu_userptr\fP returns \fBE_OK\fP (success). +.SH SEE ALSO +\fBncurses\fR(3NCURSES), \fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.PP +The user pointer is a void pointer. +We chose not to leave it as a char pointer for SVr4 compatibility. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/usleep.3 b/upstream/opensuse-leap-15-6/man3/usleep.3 new file mode 100644 index 00000000..8e7ffefc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/usleep.3 @@ -0,0 +1,126 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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 2001-04-01 by aeb +.\" Modified 2003-07-23 by aeb +.\" +.TH usleep 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +usleep \- suspend execution for microsecond intervals +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int usleep(useconds_t " usec ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR usleep (): +.nf + Since glibc 2.12: + (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L) + || /* glibc >= 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _BSD_SOURCE + Before glibc 2.12: + _BSD_SOURCE || _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED +.fi +.SH DESCRIPTION +The +.BR usleep () +function suspends execution of the calling thread for +(at least) \fIusec\fP microseconds. +The sleep may be lengthened slightly +by any system activity or by the time spent processing the call or by the +granularity of system timers. +.SH RETURN VALUE +The +.BR usleep () +function returns 0 on success. +On error, \-1 is returned, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EINTR +Interrupted by a signal; see +.BR signal (7). +.TP +.B EINVAL +\fIusec\fP is greater than or equal to 1000000. +(On systems where that is considered an error.) +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR usleep () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +None. +.SH HISTORY +4.3BSD, POSIX.1-2001. +POSIX.1-2001 declares it obsolete, suggesting +.BR nanosleep (2) +instead. +Removed in POSIX.1-2008. +.PP +On the original BSD implementation, +and before glibc 2.2.2, the return type of this function is +.IR void . +The POSIX version returns +.IR int , +and this is also the prototype used since glibc 2.2.2. +.PP +Only the +.B EINVAL +error return is documented by SUSv2 and POSIX.1-2001. +.SH CAVEATS +The interaction of this function with the +.B SIGALRM +signal, and with other timer functions such as +.BR alarm (2), +.BR sleep (3), +.BR nanosleep (2), +.BR setitimer (2), +.BR timer_create (2), +.BR timer_delete (2), +.BR timer_getoverrun (2), +.BR timer_gettime (2), +.BR timer_settime (2), +.BR ualarm (3) +is unspecified. +.SH SEE ALSO +.BR alarm (2), +.BR getitimer (2), +.BR nanosleep (2), +.BR select (2), +.BR setitimer (2), +.BR sleep (3), +.BR ualarm (3), +.BR useconds_t (3type), +.BR time (7) diff --git a/upstream/opensuse-leap-15-6/man3/util.3ncurses b/upstream/opensuse-leap-15-6/man3/util.3ncurses new file mode 100644 index 00000000..ae840fbb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/util.3ncurses @@ -0,0 +1,396 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_util.3x,v 1.52 2017/11/18 23:47:37 tom Exp $ +.TH util 3NCURSES "" +.ie \n(.g .ds `` \(lq +.el .ds `` `` +.ie \n(.g .ds '' \(rq +.el .ds '' '' +.de bP +.ie n .IP \(bu 4 +.el .IP \(bu 2 +.. +.na +.hy 0 +.SH NAME +\fBdelay_output\fR, +\fBfilter\fR, +\fBflushinp\fR, +\fBgetwin\fR, +\fBkey_name\fR, +\fBkeyname\fR, +\fBnofilter\fR, +\fBputwin\fR, +\fBunctrl\fR, +\fBuse_env\fR, +\fBuse_tioctl\fR, +\fBwunctrl\fR \- miscellaneous \fBcurses\fR utility routines +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBchar *unctrl(chtype c);\fR +.br +\fBwchar_t *wunctrl(cchar_t *c);\fR +.br +\fBchar *keyname(int c);\fR +.br +\fBchar *key_name(wchar_t w);\fR +.br +\fBvoid filter(void);\fR +.br +\fBvoid nofilter(void);\fR +.br +\fBvoid use_env(bool f);\fR +.br +\fBvoid use_tioctl(bool f);\fR +.br +\fBint putwin(WINDOW *win, FILE *filep);\fR +.br +\fBWINDOW *getwin(FILE *filep);\fR +.br +\fBint delay_output(int ms);\fR +.br +\fBint flushinp(void);\fR +.br +.SH DESCRIPTION +.SS unctrl +.PP +The \fBunctrl\fR routine returns a character string which is a printable +representation of the character \fIc\fR, ignoring attributes. +Control characters are displayed in the \fB^\fR\fIX\fR notation. +Printing characters are displayed as is. +The corresponding \fBwunctrl\fR returns a printable representation of +a wide character. +.SS keyname/key_name +.PP +The \fBkeyname\fR routine returns a character string +corresponding to the key \fIc\fR: +.bP +Printable characters are displayed as themselves, +e.g., a one-character string containing the key. +.bP +Control characters are displayed in the \fB^\fR\fIX\fR notation. +.bP +DEL (character 127) is displayed as \fB^?\fP. +.bP +Values above 128 are either meta characters +(if the screen has not been initialized, +or if \fBmeta\fP(3X) has been called with a \fBTRUE\fP parameter), +shown in the \fBM\-\fR\fIX\fR notation, +or are displayed as themselves. +In the latter case, the values may not be printable; +this follows the X/Open specification. +.bP +Values above 256 may be the names of the names of function keys. +.bP +Otherwise (if there is no corresponding name) the function returns null, +to denote an error. +X/Open also lists an "UNKNOWN KEY" return value, which some implementations +return rather than null. +.LP +The corresponding \fBkey_name\fR returns a character string corresponding +to the wide-character value \fIw\fR. +The two functions do not return the same set of strings; +the latter returns null where the former would display a meta character. +.SS filter/nofilter +.PP +The \fBfilter\fR routine, if used, must be called before \fBinitscr\fR or +\fBnewterm\fR are called. +Calling \fBfilter\fP causes these changes in initialization: +.bP +\fBLINES\fR is set to 1; +.bP +the capabilities +\fBclear\fR, +\fBcud1\fR, +\fBcud\fR, +\fBcup\fR, +\fBcuu1\fR, +\fBcuu\fR, +\fBvpa\fR +are disabled; +.bP +the capability \fBed\fP is disabled if \fBbce\fP is set; +.bP +and the \fBhome\fR string is set to the value of \fBcr\fR. +.PP +The \fBnofilter\fP routine cancels the effect of a preceding \fBfilter\fP +call. +That allows the caller to initialize a screen on a different device, +using a different value of \fB$TERM\fP. +The limitation arises because the \fBfilter\fP routine modifies the +in-memory copy of the terminal information. +.SS use_env +.PP +The \fBuse_env\fR routine, if used, +should be called before \fBinitscr\fR or +\fBnewterm\fR are called +(because those compute the screen size). +It modifies the way \fBncurses\fP treats environment variables +when determining the screen size. +.bP +Normally \fBncurses\fP looks first at the terminal database for the screen size. +.IP +If \fBuse_env\fP was called with \fBFALSE\fP for parameter, +it stops here unless +\fBuse_tioctl\fP was also called with \fBTRUE\fP for parameter. +.bP +Then it asks for the screen size via operating system calls. +If successful, +it overrides the values from the terminal database. +.bP +Finally (unless \fBuse_env\fP was called with \fBFALSE\fP parameter), +\fBncurses\fP examines the \fBLINES\fR or \fBCOLUMNS\fR environment variables, +using a value in those to override the results +from the operating system or terminal database. +.IP +\fBNcurses\fP also updates the screen size in response to \fBSIGWINCH\fP, +unless overridden by the \fBLINES\fR or \fBCOLUMNS\fR environment variables, +.SS use_tioctl +.PP +The \fBuse_tioctl\fR routine, if used, +should be called before \fBinitscr\fR or \fBnewterm\fR are called +(because those compute the screen size). +After \fBuse_tioctl\fR is called with \fBTRUE\fR as an argument, +\fBncurses\fP modifies the last step in its computation of screen size as follows: +.bP +checks if the \fBLINES\fR and \fBCOLUMNS\fR environment variables +are set to a number greater than zero. +.bP +for each, \fBncurses\fP updates the corresponding environment variable +with the value that it has obtained via operating system call +or from the terminal database. +.bP +\fBncurses\fP re-fetches the value of the environment variables so that +it is still the environment variables which set the screen size. +.PP +The \fBuse_env\fP and \fBuse_tioctl\fP routines combine as +summarized here: +.TS +center tab(/); +l l l +_ _ _ +lw7 lw7 lw40. +\fIuse_env\fR/\fIuse_tioctl\fR/\fISummary\fR +TRUE/FALSE/T{ +This is the default behavior. +\fBncurses\fP uses operating system calls +unless overridden by $LINES or $COLUMNS environment variables. +T} +TRUE/TRUE/T{ +\fBncurses\fP updates $LINES and $COLUMNS based on operating system calls. +T} +FALSE/TRUE/T{ +\fBncurses\fP ignores $LINES and $COLUMNS, uses operating system calls to obtain size. +T} +FALSE/FALSE/T{ +\fBncurses\fP relies on the terminal database to determine size. +T} +.TE +.SS putwin/getwin +.PP +The \fBputwin\fR routine writes all data associated +with window (or pad) \fIwin\fR into +the file to which \fIfilep\fR points. +This information can be later retrieved +using the \fBgetwin\fR function. +.PP +The \fBgetwin\fR routine reads window related data stored in the file by +\fBputwin\fR. +The routine then creates and initializes a new window using that +data. +It returns a pointer to the new window. +There are a few caveats: +.bP +the data written is a copy of the \fBWINDOW\fP structure, +and its associated character cells. +The format differs between the wide-character (ncursesw) and +non-wide (ncurses) libraries. +You can transfer data between the two, however. +.bP +the retrieved window is always created as a top-level window (or pad), +rather than a subwindow. +.bP +the window's character cells contain the color pair \fIvalue\fP, +but not the actual color \fInumbers\fP. +If cells in the retrieved window use color pairs which have not been +created in the application using \fBinit_pair\fP, +they will not be colored when the window is refreshed. +.SS delay_output +.PP +The \fBdelay_output\fR routine inserts an \fIms\fR millisecond pause +in output. +This routine should not be used extensively because +padding characters are used rather than a CPU pause. +If no padding character is specified, +this uses \fBnapms\fR to perform the delay. +.SS flushinp +.PP +The \fBflushinp\fR routine throws away any typeahead that has been typed by the +user and has not yet been read by the program. +.SH RETURN VALUE +Except for \fBflushinp\fR, routines that return an integer return \fBERR\fR +upon failure and \fBOK\fR (SVr4 specifies only "an integer value other than +\fBERR\fR") upon successful completion. +.PP +Routines that return pointers return \fBNULL\fR on error. +.PP +X/Open does not define any error conditions. +In this implementation +.RS 3 +.TP 5 +\fBflushinp\fR +returns an error if the terminal was not initialized. +.TP 5 +\fBputwin\fP +returns an error if the associated \fBfwrite\fP calls return an error. +.RE +.SH PORTABILITY +.SS filter +.PP +The SVr4 documentation describes the action of \fBfilter\fR only in the vaguest +terms. +The description here is adapted from the XSI Curses standard (which +erroneously fails to describe the disabling of \fBcuu\fR). +.SS keyname +.PP +The \fBkeyname\fP function may return the names of user-defined +string capabilities which are defined in the terminfo entry via the \fB\-x\fP +option of \fBtic\fP. +This implementation automatically assigns at run-time keycodes to +user-defined strings which begin with "k". +The keycodes start at KEY_MAX, but are not guaranteed to be +the same value for different runs because user-defined codes are +merged from all terminal descriptions which have been loaded. +The \fBuse_extended_names\fP(3X) function controls whether this data is +loaded when the terminal description is read by the library. +.SS nofilter/use_tioctl +.PP +The \fBnofilter\fP and \fBuse_tioctl\fP routines are specific to \fBncurses\fP. +They were not supported on Version 7, BSD or System V implementations. +It is recommended that any code depending on \fBncurses\fP extensions +be conditioned using NCURSES_VERSION. +.SS putwin/getwin +.PP +The \fBputwin\fP and \fBgetwin\fP functions have several issues with +portability: +.bP +The files written and read by these functions +use an implementation-specific format. +Although the format is an obvious target for standardization, +it has been overlooked. +.IP +Interestingly enough, according to the copyright dates in Solaris source, +the functions (along with \fBscr_init\fP, etc.) originated with +the University of California, Berkeley (in 1982) +and were later (in 1988) incorporated into SVr4. +Oddly, there are no such functions in the 4.3BSD curses sources. +.bP +Most implementations simply dump the binary \fBWINDOW\fP structure to the file. +These include SVr4 curses, NetBSD and PDCurses, as well as older \fBncurses\fP versions. +This implementation (as well as the X/Open variant of Solaris curses, dated 1995) +uses textual dumps. +.IP +The implementations which use binary dumps use block-I/O +(the \fBfwrite\fP and \fBfread\fP functions). +Those that use textual dumps use buffered-I/O. +A few applications may happen to write extra data in the file using +these functions. +Doing that can run into problems mixing block- and buffered-I/O. +This implementation reduces the problem on writes by flushing the output. +However, reading from a file written using mixed schemes may not be successful. +.SS unctrl/wunctrl +.PP +The XSI Curses standard, Issue 4 describes these functions. +It states that \fBunctrl\fR and \fBwunctrl\fR will return a null pointer if +unsuccessful, but does not define any error conditions. +This implementation checks for three cases: +.bP +the parameter is a 7-bit US\-ASCII code. +This is the case that X/Open Curses documented. +.bP +the parameter is in the range 128\-159, i.e., a C1 control code. +If \fBuse_legacy_coding\fP has been called with a \fB2\fP parameter, +\fBunctrl\fP returns the parameter, i.e., a one-character string with +the parameter as the first character. +Otherwise, it returns \*(``~@\*('', \*(``~A\*('', etc., +analogous to \*(``^@\*('', \*(``^A\*('', C0 controls. +.IP +X/Open Curses does not document whether \fBunctrl\fP can be called before +initializing curses. +This implementation permits that, +and returns the \*(``~@\*('', etc., values in that case. +.bP +parameter values outside the 0 to 255 range. +\fBunctrl\fP returns a null pointer. +.PP +The strings returned by \fBunctrl\fR in this implementation are determined +at compile time, +showing C1 controls from the upper-128 codes with a \*(``~\*('' prefix rather than \*(``^\*(''. +Other implementations have different conventions. +For example, they may show both sets of control characters with \*(``^\*('', +and strip the parameter to 7 bits. +Or they may ignore C1 controls and treat all of the upper-128 codes as +printable. +This implementation uses 8 bits but does not modify the string to reflect +locale. +The \fBuse_legacy_coding\fP function allows the caller to +change the output of \fBunctrl\fP. +.PP +Likewise, the \fBmeta\fP(3X) function allows the caller to change the +output of \fBkeyname\fP, i.e., +it determines whether to use the \*(``M\-\*('' prefix +for \*(``meta\*('' keys (codes in the range 128 to 255). +Both \fBuse_legacy_coding\fP and \fBmeta\fP succeed only after +curses is initialized. +X/Open Curses does not document the treatment of codes 128 to 159. +When treating them as \*(``meta\*('' keys +(or if \fBkeyname\fP is called before initializing curses), +this implementation returns strings \*(``M\-^@\*('', \*(``M\-^A\*('', etc. +.SS use_env/use_tioctl +.PP +If \fBncurses\fP is configured to provide the sp-functions extension, +the state of \fBuse_env\fP and \fBuse_tioctl\fP may be updated before +creating each \fIscreen\fP rather than once only +(\fBsp_funcs\fR(3NCURSES)). +This feature of \fBuse_env\fP +is not provided by other implementation of curses. +.SH SEE ALSO +\fBlegacy_coding\fR(3NCURSES), +\fBncurses\fR(3NCURSES), +\fBinitscr\fR(3NCURSES), +\fBinopts\fR(3NCURSES), +\fBkernel\fR(3NCURSES), +\fBscr_dump\fR(3NCURSES), +\fBsp_funcs\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBlegacy_coding\fR(3NCURSES). diff --git a/upstream/opensuse-leap-15-6/man3/uuid++.3ossp b/upstream/opensuse-leap-15-6/man3/uuid++.3ossp new file mode 100644 index 00000000..17daac56 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid++.3ossp @@ -0,0 +1,307 @@ +.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title ".::uuid++ 3" +.TH .::uuid++ 3 "OSSP uuid 1.6.2" "04-Jul-2008" "Universally Unique Identifier" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +\&\fB\s-1OSSP\s0 uuid\fR \- \fBUniversally Unique Identifier\fR (\*(C+ \s-1API\s0) +.SH "VERSION" +.IX Header "VERSION" +\&\s-1OSSP\s0 uuid \s-11.6.2 (04-Jul-2008)\s0 +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fBuuid++\fR is the \s-1ISO\-\*(C+\s0 language binding of the \fB\s-1OSSP\s0 uuid\fR C \s-1API\s0. +It provides a thin \s-1ISO\-\*(C+\s0 class \fBuuid\fR wrapping the ISO-C \s-1API\s0 type +\&\fBuuid_t\fR. +.SH "APPLICATION PROGRAMMING INTERFACE" +.IX Header "APPLICATION PROGRAMMING INTERFACE" +The \s-1ISO\-\*(C+\s0 Application Programming Interface (\s-1API\s0) of \fB\s-1OSSP\s0 uuid\fR +consists of the following components: +.Sh "\s-1CONSTANTS\s0" +.IX Subsection "CONSTANTS" +The constants are the same to those provided by the ISO-C \s-1API\s0. +See \fIuuid\fR\|(3) for details. +.Sh "\s-1CLASSES\s0" +.IX Subsection "CLASSES" +The following classes are provided: +.IP "\fBuuid\fR" 4 +.IX Item "uuid" +This is the class corresponding to the C \s-1API\s0 type \fBuuid_t\fR. +It is the main object. +.IP "\fBuuid_error_t\fR" 4 +.IX Item "uuid_error_t" +This is the class corresponding to the C \s-1API\s0 function \fBuuid_error\fR. +It is the object thrown as an exception in case of any errors. +.Sh "\s-1METHODS\s0" +.IX Subsection "METHODS" +The following methods are provided: +.IP "\fBuuid\fR();" 4 +.IX Item "uuid();" +The standard constructor. +.IP "\fBuuid\fR(const uuid &_obj);" 4 +.IX Item "uuid(const uuid &_obj);" +The copy constructor for \fBuuid\fR class. +.IP "\fBuuid\fR(const uuid_t *_obj);" 4 +.IX Item "uuid(const uuid_t *_obj);" +The import constructor for C \s-1API\s0 objects. +.IP "\fBuuid\fR(const void *_bin);" 4 +.IX Item "uuid(const void *_bin);" +The import constructor for binary representation. +.IP "\fBuuid\fR(const char *_str);" 4 +.IX Item "uuid(const char *_str);" +The import constructor for string representation. +.IP "~\fBuuid\fR();" 4 +.IX Item "~uuid();" +The standard destructor for \fBuuid\fR class. +.IP "uuid &\fBuuid::operator=\fR(const uuid &_obj);" 4 +.IX Item "uuid &uuid::operator=(const uuid &_obj);" +The assignment operator corresponding to the copy constructor. +.IP "uuid &\fBuuid::operator=\fR(const uuid_t *_obj);" 4 +.IX Item "uuid &uuid::operator=(const uuid_t *_obj);" +The assignment operator corresponding to the import constructor for C \s-1API\s0 objects. +.IP "uuid &\fBuuid::operator=\fR(const void *_bin);" 4 +.IX Item "uuid &uuid::operator=(const void *_bin);" +The assignment operator corresponding to the import constructor for binary representation. +.IP "uuid &\fBuuid::operator=\fR(const char *_str);" 4 +.IX Item "uuid &uuid::operator=(const char *_str);" +The assignment operator corresponding to the import constructor for string and single integer value representation. +.IP "uuid \fBuuid::clone\fR(void);" 4 +.IX Item "uuid uuid::clone(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_clone\fR. +.IP "void \fBuuid::load\fR(const char *_name);" 4 +.IX Item "void uuid::load(const char *_name);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_load\fR. +.IP "void \fBuuid::make\fR(unsigned int _mode, ...);" 4 +.IX Item "void uuid::make(unsigned int _mode, ...);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_make\fR. +.IP "int \fBuuid::isnil\fR(void);" 4 +.IX Item "int uuid::isnil(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_isnil\fR. +.IP "int \fBuuid::compare\fR(const uuid &_obj);" 4 +.IX Item "int uuid::compare(const uuid &_obj);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_compare\fR. +.IP "int \fBuuid::operator==\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator==(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for equality. +.IP "int \fBuuid::operator!=\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator!=(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for inequality. +.IP "int \fBuuid::operator<\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator<(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for less-than. +.IP "int \fBuuid::operator<=\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator<=(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for less-than-or-equal. +.IP "int \fBuuid::operator>\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator>(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for greater-than. +.IP "int \fBuuid::operator>=\fR(const uuid &_obj);" 4 +.IX Item "int uuid::operator>=(const uuid &_obj);" +The comparison operator corresponding to \fBuuid_compare\fR usage for greater-than-or-equal. +.IP "void \fBuuid::import\fR(const void *_bin);" 4 +.IX Item "void uuid::import(const void *_bin);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_import\fR for binary representation usage. +.IP "void \fBuuid::import\fR(const char *_str);" 4 +.IX Item "void uuid::import(const char *_str);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_import\fR for string representation usage. +.IP "void *\fBuuid::binary\fR(void);" 4 +.IX Item "void *uuid::binary(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_export\fR for binary representation usage. +.IP "char *\fBuuid::string\fR(void);" 4 +.IX Item "char *uuid::string(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_export\fR for string representation usage. +.IP "char *\fBuuid::integer\fR(void);" 4 +.IX Item "char *uuid::integer(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_export\fR for single integer value representation usage. +.IP "char *\fBuuid::summary\fR(void);" 4 +.IX Item "char *uuid::summary(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_export\fR for textual summary representation usage. +.IP "unsigned long \fBuuid::version\fR(void);" 4 +.IX Item "unsigned long uuid::version(void);" +Regular method corresponding to the C \s-1API\s0 function \fBuuid_version\fR. +.IP "\fBuuid_error_t\fR()" 4 +.IX Item "uuid_error_t()" +The standard constructor for \fBuuid_error_t\fR class. +.IP "\fBuuid_error_t\fR(uuid_rc_t _code)" 4 +.IX Item "uuid_error_t(uuid_rc_t _code)" +The standard constructor for \fBuuid_error_t\fR class with return code initialization. +.IP "~\fBuuid_error_t\fR()" 4 +.IX Item "~uuid_error_t()" +The standard destructor for \fBuuid_error_t\fR class. +.IP "void \fBuuid_error_t::code\fR(uuid_rc_t _code)" 4 +.IX Item "void uuid_error_t::code(uuid_rc_t _code)" +Regular method for setting the return code. +.IP "uuid_rc_t \fBuuid_error_t::code\fR(void)" 4 +.IX Item "uuid_rc_t uuid_error_t::code(void)" +Regular method for fetching the return code. +.IP "char *\fBuuid_error_t::string\fR(void)" 4 +.IX Item "char *uuid_error_t::string(void)" +Regular method for fetching the string corresponding to the current return code. +.SH "EXAMPLE" +.IX Header "EXAMPLE" +The following shows an example usage of the \*(C+ \s-1API\s0. Exception handling is +omitted for code simplification and has to be re-added for production +code. +.PP +.Vb 5 +\& /* generate a DCE 1.1 v1 UUID from system environment */ +\& char *uuid_v1(void) +\& { +\& uuid id; +\& char *str; +\& +\& id.make(UUID_MAKE_V1); +\& str = id.string(); +\& return str; +\& } +\& +\& /* generate a DCE 1.1 v3 UUID from an URL */ +\& char *uuid_v3(const char *url) +\& { +\& uuid id; +\& uuid id_ns; +\& char *str; +\& +\& id_ns.load("ns:URL"); +\& id.make(UUID_MAKE_V3, &id_ns, url); +\& str = id.string(); +\& return str; +\& } +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIuuid\fR\|(3). diff --git a/upstream/opensuse-leap-15-6/man3/uuid.3 b/upstream/opensuse-leap-15-6/man3/uuid.3 new file mode 100644 index 00000000..31221bb8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid.3 @@ -0,0 +1,64 @@ +'\" t +.\" Title: uuid +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid \- DCE compatible Universally Unique Identifier library +.SH "SYNOPSIS" +.sp +\fB#include \fP +.SH "DESCRIPTION" +.sp +The UUID library is used to generate unique identifiers for objects that may be accessible beyond the local system. This library generates UUIDs compatible with those created by the Open Software Foundation (OSF) Distributed Computing Environment (DCE) utility \fBuuidgen\fP(1). +.sp +The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all systems. They could be used, for instance, to generate unique HTTP cookies across multiple web servers without communication between the servers, and without fear of a name clash. +.SH "CONFORMING TO" +.sp +This library generates UUIDs compatible with OSF DCE 1.1, and hash based UUIDs V3 and V5 compatible with \c +.URL "https://tools.ietf.org/html/rfc4122" "RFC\-4122" "." +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_time\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid.3ossp b/upstream/opensuse-leap-15-6/man3/uuid.3ossp new file mode 100644 index 00000000..3116d73e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid.3ossp @@ -0,0 +1,578 @@ +.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` +. ds C' +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title ".::uuid 3" +.TH .::uuid 3 "OSSP uuid 1.6.2" "04-Jul-2008" "Universally Unique Identifier" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +\&\fB\s-1OSSP\s0 uuid\fR \- \fBUniversally Unique Identifier\fR +.SH "VERSION" +.IX Header "VERSION" +\&\s-1OSSP\s0 uuid \s-11.6.2 (04-Jul-2008)\s0 +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +\&\fB\s-1OSSP\s0 uuid\fR is a \s-1ISO\-C:1999\s0 application programming interface (\s-1API\s0) and +corresponding command line interface (\s-1CLI\s0) for the generation of \s-1DCE\s0 +1.1, \s-1ISO/IEC\s0 11578:1996 and \s-1IETF\s0 \s-1RFC\-4122\s0 compliant \fIUniversally Unique +Identifier\fR (\s-1UUID\s0). It supports \s-1DCE\s0 1.1 variant UUIDs of version 1 (time +and node based), version 3 (name based, \s-1MD5\s0), version 4 (random number +based) and version 5 (name based, \s-1SHA\-1\s0). Additional \s-1API\s0 bindings are +provided for the languages \s-1ISO\-\*(C+:1998\s0, Perl:5 and \s-1PHP:4/5\s0. Optional +backward compatibility exists for the ISO-C \s-1DCE\-1\s0.1 and Perl Data::UUID +APIs. +.PP +UUIDs are 128 bit numbers which are intended to have a high likelihood +of uniqueness over space and time and are computationally difficult +to guess. They are globally unique identifiers which can be locally +generated without contacting a global registration authority. UUIDs +are intended as unique identifiers for both mass tagging objects +with an extremely short lifetime and to reliably identifying very +persistent objects across a network. +.PP +This is the ISO-C application programming interface (\s-1API\s0) of \fB\s-1OSSP\s0 uuid\fR. +.Sh "\s-1UUID\s0 Binary Representation" +.IX Subsection "UUID Binary Representation" +According to the \s-1DCE\s0 1.1, \s-1ISO/IEC\s0 11578:1996 and \s-1IETF\s0 \s-1RFC\-4122\s0 +standards, a \s-1DCE\s0 1.1 variant \s-1UUID\s0 is a 128 bit number defined out of 7 +fields, each field a multiple of an octet in size and stored in network +byte order: +.PP +.Vb 11 +\& [4] +\& version +\& \-\->| |<\-\- +\& | | +\& | | [16] +\& [32] [16] | |time_hi +\& time_low time_mid | _and_version +\& |<\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->||<\-\-\-\-\-\-\-\-\-\-\-\->||<\-\-\-\-\-\-\-\-\-\-\-\->| +\& | MSB || || | | +\& | / || || | | +\& |/ || || | | +\& +\& +\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-+~~ +\& | 15 || 14 || 13 || 12 || 11 || 10 |####9 || 8 | +\& | MSO || || || || || |#### || | +\& +\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-+~~ +\& 7654321076543210765432107654321076543210765432107654321076543210 +\& +\& ~~+\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-+ +\& ##* 7 || 6 || 5 || 4 || 3 || 2 || 1 || 0 | +\& ##* || || || || || || || LSO | +\& ~~+\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-++\-\-\-\-\-\-+ +\& 7654321076543210765432107654321076543210765432107654321076543210 +\& +\& | | || || /| +\& | | || || / | +\& | | || || LSB | +\& |<\-\-\-\->||<\-\-\-\->||<\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\->| +\& |clk_seq clk_seq node +\& |_hi_res _low [48] +\& |[5\-6] [8] +\& | | +\& \-\->| |<\-\- +\& variant +\& [2\-3] +.Ve +.PP +An example of a \s-1UUID\s0 binary representation is the octet stream \f(CW\*(C`0xF8 +0x1D 0x4F 0xAE 0x7D 0xEC 0x11 0xD0 0xA7 0x65 0x00 0xA0 0xC9 0x1E 0x6B +0xF6\*(C'\fR. The binary representation format is exactly what the \fB\s-1OSSP\s0 uuid\fR +\&\s-1API\s0 functions \fBuuid_import\fR() and \fBuuid_export\fR() deal with under +\&\f(CW\*(C`UUID_FMT_BIN\*(C'\fR. +.Sh "\s-1UUID\s0 \s-1ASCII\s0 String Representation" +.IX Subsection "UUID ASCII String Representation" +According to the \s-1DCE\s0 1.1, \s-1ISO/IEC\s0 11578:1996 and \s-1IETF\s0 \s-1RFC\-4122\s0 +standards, a \s-1DCE\s0 1.1 variant \s-1UUID\s0 is represented as an \s-1ASCII\s0 string +consisting of 8 hexadecimal digits followed by a hyphen, then three +groups of 4 hexadecimal digits each followed by a hyphen, then 12 +hexadecimal digits. Formally, the string representation is defined by +the following grammar: +.PP +.Vb 10 +\& uuid = "\-" +\& "\-" +\& "\-" +\& +\& "\-" +\& +\& time_low = 4* +\& time_mid = 2* +\& time_high_and_version = 2* +\& clock_seq_high_and_reserved = +\& clock_seq_low = +\& node = 6* +\& hex_octet = +\& hex_digit = "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9" +\& |"a"|"b"|"c"|"d"|"e"|"f" +\& |"A"|"B"|"C"|"D"|"E"|"F" +.Ve +.PP +An example of a \s-1UUID\s0 string representation is the \s-1ASCII\s0 string +"\f(CW\*(C`f81d4fae\-7dec\-11d0\-a765\-00a0c91e6bf6\*(C'\fR". The string representation +format is exactly what the \fB\s-1OSSP\s0 uuid\fR \s-1API\s0 functions \fBuuid_import\fR() +and \fBuuid_export\fR() deal with under \f(CW\*(C`UUID_FMT_STR\*(C'\fR. +.PP +Notice: a corresponding \s-1URL\s0 can be generated out of a \s-1ASCII\s0 string +representation of an \s-1UUID\s0 by prefixing with "\f(CW\*(C`urn:uuid:\*(C'\fR\*(L" as in +\&\*(R"\f(CW\*(C`urn:uuid:f81d4fae\-7dec\-11d0\-a765\-00a0c91e6bf6\*(C'\fR". +.Sh "\s-1UUID\s0 Single Integer Value Representation" +.IX Subsection "UUID Single Integer Value Representation" +According to the \s-1ISO/IEC\s0 11578:1996 and ITU-T Rec. X.667 standards, a +\&\s-1DCE\s0 1.1 variant \s-1UUID\s0 can be also represented as a single integer value +consisting of a decimal number with up to 39 digits. +.PP +An example of a \s-1UUID\s0 single integer value representation is the decimal +number "\f(CW329800735698586629295641978511506172918\fR". The string +representation format is exactly what the \fB\s-1OSSP\s0 uuid\fR \s-1API\s0 functions +\&\fBuuid_import\fR() and \fBuuid_export\fR() deal with under \f(CW\*(C`UUID_FMT_SIV\*(C'\fR. +.PP +Notice: a corresponding \s-1ISO\s0 \s-1OID\s0 can be generated under the +\&\*(L"{\fIjoint\-iso\-itu\-t\fR\|(2) uuid(25)}\*(R" arc out of a single integer value +representation of a \s-1UUID\s0 by prefixing with "\f(CW2.25.\fR\*(L". An example \s-1OID\s0 +is \*(R"\f(CW2.25.329800735698586629295641978511506172918\fR\*(L". Additionally, +an \s-1URL\s0 can be generated by further prefixing with \*(R"\f(CW\*(C`urn:oid:\*(C'\fR\*(L" as in +\&\*(R"\f(CW\*(C`urn:oid:2.25.329800735698586629295641978511506172918\*(C'\fR". +.Sh "\s-1UUID\s0 Variants and Versions" +.IX Subsection "UUID Variants and Versions" +A \s-1UUID\s0 has a variant and version. The variant defines the layout of the +\&\s-1UUID\s0. The version defines the content of the \s-1UUID\s0. The \s-1UUID\s0 variant +supported in \fB\s-1OSSP\s0 uuid\fR is the \s-1DCE\s0 1.1 variant only. The \s-1DCE\s0 1.1 \s-1UUID\s0 +variant versions supported in \fB\s-1OSSP\s0 uuid\fR are: +.IP "\fBVersion 1\fR (time and node based)" 4 +.IX Item "Version 1 (time and node based)" +These are the classical UUIDs, created out of a 60\-bit system time, +a 14\-bit local clock sequence and 48\-bit system \s-1MAC\s0 address. The \s-1MAC\s0 +address can be either the real one of a physical network interface card +(\s-1NIC\s0) or a random multi-cast \s-1MAC\s0 address. Version 1 UUIDs are usually +used as one-time global unique identifiers. +.IP "\fBVersion 3\fR (name based, \s-1MD5\s0)" 4 +.IX Item "Version 3 (name based, MD5)" +These are UUIDs which are based on the 128\-bit \s-1MD5\s0 message digest of the +concatenation of a 128\-bit namespace \s-1UUID\s0 and a name string of arbitrary +length. Version 3 UUIDs are usually used for non-unique but repeatable +message digest identifiers. +.IP "\fBVersion 4\fR (random data based)" 4 +.IX Item "Version 4 (random data based)" +These are UUIDs which are based on just 128\-bit of random data. Version +4 UUIDs are usually used as one-time local unique identifiers. +.IP "\fBVersion 5\fR (name based, \s-1SHA\-1\s0)" 4 +.IX Item "Version 5 (name based, SHA-1)" +These are UUIDs which are based on the 160\-bit \s-1SHA\-1\s0 message digest of the +concatenation of a 128\-bit namespace \s-1UUID\s0 and a name string of arbitrary +length. Version 5 UUIDs are usually used for non-unique but repeatable +message digest identifiers. +.Sh "\s-1UUID\s0 Uniqueness" +.IX Subsection "UUID Uniqueness" +Version 1 UUIDs are guaranteed to be unique through combinations of +hardware addresses, time stamps and random seeds. There is a reference +in the \s-1UUID\s0 to the hardware (\s-1MAC\s0) address of the first network interface +card (\s-1NIC\s0) on the host which generated the \s-1UUID\s0 \*(-- this reference +is intended to ensure the \s-1UUID\s0 will be unique in space as the \s-1MAC\s0 +address of every network card is assigned by a single global authority +(\s-1IEEE\s0) and is guaranteed to be unique. The next component in a \s-1UUID\s0 +is a timestamp which, as clock always (should) move forward, will +be unique in time. Just in case some part of the above goes wrong +(the hardware address cannot be determined or the clock moved steps +backward), there is a random clock sequence component placed into the +\&\s-1UUID\s0 as a \*(L"catch-all\*(R" for uniqueness. +.PP +Version 3 and version 5 UUIDs are guaranteed to be inherently globally +unique if the combination of namespace and name used to generate them is +unique. +.PP +Version 4 UUIDs are not guaranteed to be globally unique, because they +are generated out of locally gathered pseudo-random numbers only. +Nevertheless there is still a high likelihood of uniqueness over space +and time and that they are computationally difficult to guess. +.Sh "Nil \s-1UUID\s0" +.IX Subsection "Nil UUID" +There is a special \fINil\fR \s-1UUID\s0 consisting of all octets set to zero in +the binary representation. It can be used as a special \s-1UUID\s0 value which does +not conflict with real UUIDs. +.SH "APPLICATION PROGRAMMING INTERFACE" +.IX Header "APPLICATION PROGRAMMING INTERFACE" +The ISO-C Application Programming Interface (\s-1API\s0) of \fB\s-1OSSP\s0 uuid\fR +consists of the following components. +.Sh "\s-1CONSTANTS\s0" +.IX Subsection "CONSTANTS" +The following constants are provided: +.IP "\fB\s-1UUID_VERSION\s0\fR" 4 +.IX Item "UUID_VERSION" +The hexadecimal encoded \fB\s-1OSSP\s0 uuid\fR version. This allows compile-time +checking of the \fB\s-1OSSP\s0 uuid\fR version. For run-time checking use +\&\fBuuid_version\fR() instead. +.Sp +The hexadecimal encoding for a version "$\fIv\fR.$\fIr\fR$\fIt\fR$\fIl\fR" is +calculated with the \fB\s-1GNU\s0 shtool\fR \fBversion\fR command and is (in +Perl-style for concise description) "sprintf('0x%x%02x%d%02x', $\fIv\fR, +$\fIr\fR, {qw(s 9 . 2 b 1 a 0)}\->{$\fIt\fR}, ($\fIt\fR eq 's' ? 99 : $\fIl\fR))\*(L", +i.e., the version 0.9.6 is encoded as \*(R"0x009206". +.IP "\fB\s-1UUID_LEN_BIN\s0\fR, \fB\s-1UUID_LEN_STR\s0\fR, \fB\s-1UUID_LEN_SIV\s0\fR" 4 +.IX Item "UUID_LEN_BIN, UUID_LEN_STR, UUID_LEN_SIV" +The number of octets of the \s-1UUID\s0 binary and string representations. +Notice that the lengths of the string representation (\fB\s-1UUID_LEN_STR\s0\fR) +and the lengths of the single integer value representation +(\fB\s-1UUID_LEN_SIV\s0\fR) does \fInot\fR include the necessary \f(CW\*(C`NUL\*(C'\fR termination +character. +.IP "\fB\s-1UUID_MAKE_V1\s0\fR, \fB\s-1UUID_MAKE_V3\s0\fR, \fB\s-1UUID_MAKE_V4\s0\fR, \fB\s-1UUID_MAKE_V5\s0\fR, \fB\s-1UUID_MAKE_MC\s0\fR" 4 +.IX Item "UUID_MAKE_V1, UUID_MAKE_V3, UUID_MAKE_V4, UUID_MAKE_V5, UUID_MAKE_MC" +The \fImode\fR bits for use with \fBuuid_make\fR(). The \fB\s-1UUID_MAKE_V\s0\fR\fIN\fR +specify which \s-1UUID\s0 version to generate. The \fB\s-1UUID_MAKE_MC\s0\fR forces the +use of a random multi-cast \s-1MAC\s0 address instead of the real physical \s-1MAC\s0 +address in version 1 UUIDs. +.IP "\fB\s-1UUID_RC_OK\s0\fR, \fB\s-1UUID_RC_ARG\s0\fR, \fB\s-1UUID_RC_MEM\s0\fR, \fB\s-1UUID_RC_SYS\s0\fR, \fB\s-1UUID_RC_INT\s0\fR, \fB\s-1UUID_RC_IMP\s0\fR" 4 +.IX Item "UUID_RC_OK, UUID_RC_ARG, UUID_RC_MEM, UUID_RC_SYS, UUID_RC_INT, UUID_RC_IMP" +The possible numerical return-codes of \s-1API\s0 functions. +The \f(CW\*(C`UUID_RC_OK\*(C'\fR indicates success, the others indicate errors. +Use \fBuuid_error\fR() to translate them into string versions. +.IP "\fB\s-1UUID_FMT_BIN\s0\fR, \fB\s-1UUID_FMT_STR\s0\fR, \fB\s-1UUID_FMT_SIV\s0\fR, \fB\s-1UUID_FMT_TXT\s0\fR" 4 +.IX Item "UUID_FMT_BIN, UUID_FMT_STR, UUID_FMT_SIV, UUID_FMT_TXT" +The \fIfmt\fR formats for use with \fBuuid_import\fR() and \fBuuid_export\fR(). +The \fB\s-1UUID_FMT_BIN\s0\fR indicates the \s-1UUID\s0 binary representation (of +length \fB\s-1UUID_LEN_BIN\s0\fR), the \fB\s-1UUID_FMT_STR\s0\fR indicates the \s-1UUID\s0 string +representation (of length \fB\s-1UUID_LEN_STR\s0\fR), the \fB\s-1UUID_FMT_SIV\s0\fR +indicates the \s-1UUID\s0 single integer value representation (of maximum +length \fB\s-1UUID_LEN_SIV\s0\fR) and the \fB\s-1UUID_FMT_TXT\s0\fR indicates the textual +description (of arbitrary length) of a \s-1UUID\s0. +.Sh "\s-1FUNCTIONS\s0" +.IX Subsection "FUNCTIONS" +The following functions are provided: +.IP "uuid_rc_t \fBuuid_create\fR(uuid_t **\fIuuid\fR);" 4 +.IX Item "uuid_rc_t uuid_create(uuid_t **uuid);" +Create a new \s-1UUID\s0 object and store a pointer to it in \f(CW\*(C`*\*(C'\fR\fIuuid\fR. +A \s-1UUID\s0 object consists of an internal representation of a \s-1UUID\s0, the +internal \s-1PRNG\s0 and \s-1MD5\s0 generator contexts, and cached \s-1MAC\s0 address and +timestamp information. The initial \s-1UUID\s0 is the \fINil\fR \s-1UUID\s0. +.IP "uuid_rc_t \fBuuid_destroy\fR(uuid_t *\fIuuid\fR);" 4 +.IX Item "uuid_rc_t uuid_destroy(uuid_t *uuid);" +Destroy \s-1UUID\s0 object \fIuuid\fR. +.IP "uuid_rc_t \fBuuid_clone\fR(const uuid_t *\fIuuid\fR, uuid_t **\fIuuid_clone\fR);" 4 +.IX Item "uuid_rc_t uuid_clone(const uuid_t *uuid, uuid_t **uuid_clone);" +Clone \s-1UUID\s0 object \fIuuid\fR and store new \s-1UUID\s0 object in \fIuuid_clone\fR. +.IP "uuid_rc_t \fBuuid_isnil\fR(const uuid_t *\fIuuid\fR, int *\fIresult\fR);" 4 +.IX Item "uuid_rc_t uuid_isnil(const uuid_t *uuid, int *result);" +Checks whether the \s-1UUID\s0 in \fIuuid\fR is the \fINil\fR \s-1UUID\s0. +If this is the case, it returns \fItrue\fR in \f(CW\*(C`*\*(C'\fR\fIresult\fR. +Else it returns \fIfalse\fR in \f(CW\*(C`*\*(C'\fR\fIresult\fR. +.IP "uuid_rc_t \fBuuid_compare\fR(const uuid_t *\fIuuid\fR, const uuid_t *\fIuuid2\fR, int *\fIresult\fR);" 4 +.IX Item "uuid_rc_t uuid_compare(const uuid_t *uuid, const uuid_t *uuid2, int *result);" +Compares the order of the two UUIDs in \fIuuid1\fR and \fIuuid2\fR +and returns the result in \f(CW\*(C`*\*(C'\fR\fIresult\fR: \f(CW\*(C`\-1\*(C'\fR if \fIuuid1\fR is +smaller than \fIuuid2\fR, \f(CW0\fR if \fIuuid1\fR is equal to \fIuuid2\fR +and \f(CW+1\fR if \fIuuid1\fR is greater than \fIuuid2\fR. +.IP "uuid_rc_t \fBuuid_import\fR(uuid_t *\fIuuid\fR, uuid_fmt_t \fIfmt\fR, const void *\fIdata_ptr\fR, size_t \fIdata_len\fR);" 4 +.IX Item "uuid_rc_t uuid_import(uuid_t *uuid, uuid_fmt_t fmt, const void *data_ptr, size_t data_len);" +Imports a \s-1UUID\s0 \fIuuid\fR from an external representation of format \fIfmt\fR. +The data is read from the buffer at \fIdata_ptr\fR which contains at least +\&\fIdata_len\fR bytes. +.Sp +The format of the external representation is specified by \fIfmt\fR and the +minimum expected length in \fIdata_len\fR depends on it. Valid values for +\&\fIfmt\fR are \fB\s-1UUID_FMT_BIN\s0\fR, \fB\s-1UUID_FMT_STR\s0\fR and \fB\s-1UUID_FMT_SIV\s0\fR. +.IP "uuid_rc_t \fBuuid_export\fR(const uuid_t *\fIuuid\fR, uuid_fmt_t \fIfmt\fR, void *\fIdata_ptr\fR, size_t *\fIdata_len\fR);" 4 +.IX Item "uuid_rc_t uuid_export(const uuid_t *uuid, uuid_fmt_t fmt, void *data_ptr, size_t *data_len);" +Exports a \s-1UUID\s0 \fIuuid\fR into an external representation of format +\&\fIfmt\fR. Valid values for \fIfmt\fR are \fB\s-1UUID_FMT_BIN\s0\fR, \fB\s-1UUID_FMT_STR\s0\fR, +\&\fB\s-1UUID_FMT_SIV\s0\fR and \fB\s-1UUID_FMT_TXT\s0\fR. +.Sp +The data is written to the buffer whose location is obtained +by dereferencing \fIdata_ptr\fR after a \*(L"cast\*(R" to the appropriate +pointer-to-pointer type. Hence the generic pointer argument \fIdata_ptr\fR +is expected to be a pointer to a \*(L"pointer of a particular type\*(R", i.e., +it has to be of type "\f(CW\*(C`unsigned char **\*(C'\fR" for \fB\s-1UUID_FMT_BIN\s0\fR and +"\f(CW\*(C`char **\*(C'\fR" for \fB\s-1UUID_FMT_STR\s0\fR, \fB\s-1UUID_FMT_SIV\s0\fR and \fB\s-1UUID_FMT_TXT\s0\fR. +.Sp +The buffer has to be room for at least \f(CW\*(C`*\*(C'\fR\fIdata_len\fR bytes. If the +value of the pointer after \*(L"casting\*(R" and dereferencing \fIdata_ptr\fR +is \f(CW\*(C`NULL\*(C'\fR, \fIdata_len\fR is ignored as input and a new buffer is +allocated and returned in the pointer after \*(L"casting\*(R" and dereferencing +\&\fIdata_ptr\fR (the caller has to \fIfree\fR\|(3) it later on). +.Sp +If \fIdata_len\fR is not \f(CW\*(C`NULL\*(C'\fR, the number of available bytes in the +buffer has to be provided in \f(CW\*(C`*\*(C'\fR\fIdata_len\fR and the number of actually +written bytes are returned in \f(CW\*(C`*\*(C'\fR\fIdata_len\fR again. The minimum +required buffer length depends on the external representation as +specified by \fIfmt\fR and is at least \fB\s-1UUID_LEN_BIN\s0\fR for \fB\s-1UUID_FMT_BIN\s0\fR, +\&\fB\s-1UUID_LEN_STR\s0\fR for \fB\s-1UUID_FMT_STR\s0\fR and \fB\s-1UUID_LEN_SIV\s0\fR for +\&\fB\s-1UUID_FMT_SIV\s0\fR. For \fB\s-1UUID_FMT_TXT\s0\fR a buffer of unspecified length is +required and hence it is recommended to allow \fB\s-1OSSP\s0 uuid\fR to allocate +the buffer as necessary. +.IP "uuid_rc_t \fBuuid_load\fR(uuid_t *\fIuuid\fR, const char *\fIname\fR);" 4 +.IX Item "uuid_rc_t uuid_load(uuid_t *uuid, const char *name);" +Loads a pre-defined \s-1UUID\s0 value into the \s-1UUID\s0 object \fIuuid\fR. The +following \fIname\fR arguments are currently known: +.RS 4 +.IP "\fIname\fR \fI\s-1UUID\s0\fR" 4 +.IX Item "name UUID" +.PD 0 +.IP "nil 00000000\-0000\-0000\-0000\-000000000000" 4 +.IX Item "nil 00000000-0000-0000-0000-000000000000" +.IP "ns:DNS 6ba7b810\-9dad\-11d1\-80b4\-00c04fd430c8" 4 +.IX Item "ns:DNS 6ba7b810-9dad-11d1-80b4-00c04fd430c8" +.IP "ns:URL 6ba7b811\-9dad\-11d1\-80b4\-00c04fd430c8" 4 +.IX Item "ns:URL 6ba7b811-9dad-11d1-80b4-00c04fd430c8" +.IP "ns:OID 6ba7b812\-9dad\-11d1\-80b4\-00c04fd430c8" 4 +.IX Item "ns:OID 6ba7b812-9dad-11d1-80b4-00c04fd430c8" +.IP "ns:X500 6ba7b814\-9dad\-11d1\-80b4\-00c04fd430c8" 4 +.IX Item "ns:X500 6ba7b814-9dad-11d1-80b4-00c04fd430c8" +.RE +.RS 4 +.PD +.Sp +The "\f(CW\*(C`ns:\*(C'\fR\fI\s-1XXX\s0\fR" are names of pre-defined name-space UUIDs for use in +the generation of \s-1DCE\s0 1.1 version 3 and version 5 UUIDs. +.RE +.IP "uuid_rc_t \fBuuid_make\fR(uuid_t *\fIuuid\fR, unsigned int \fImode\fR, ...);" 4 +.IX Item "uuid_rc_t uuid_make(uuid_t *uuid, unsigned int mode, ...);" +Generates a new \s-1UUID\s0 in \fIuuid\fR according to \fImode\fR and optional +arguments (dependent on \fImode\fR). +.Sp +If \fImode\fR contains the \f(CW\*(C`UUID_MAKE_V1\*(C'\fR bit, a \s-1DCE\s0 1.1 variant \s-1UUID\s0 of +version 1 is generated. Then optionally the bit \f(CW\*(C`UUID_MAKE_MC\*(C'\fR forces +the use of random multi-cast \s-1MAC\s0 address instead of the real physical +\&\s-1MAC\s0 address (the default). The \s-1UUID\s0 is generated out of the 60\-bit current +system time, a 12\-bit clock sequence and the 48\-bit \s-1MAC\s0 address. +.Sp +If \fImode\fR contains the \f(CW\*(C`UUID_MAKE_V3\*(C'\fR or \f(CW\*(C`UUID_MAKE_V5\*(C'\fR bit, a \s-1DCE\s0 +1.1 variant \s-1UUID\s0 of version 3 or 5 is generated and two additional +arguments are expected: first, a namespace \s-1UUID\s0 object (\f(CW\*(C`uuid_t *\*(C'\fR). +Second, a name string of arbitrary length (\f(CW\*(C`const char *\*(C'\fR). The \s-1UUID\s0 is +generated out of the 128\-bit \s-1MD5\s0 or 160\-bit \s-1SHA\-1\s0 from the concatenated +octet stream of namespace \s-1UUID\s0 and name string. +.Sp +If \fImode\fR contains the \f(CW\*(C`UUID_MAKE_V4\*(C'\fR bit, a \s-1DCE\s0 1.1 variant \s-1UUID\s0 +of version 4 is generated. The \s-1UUID\s0 is generated out of 128\-bit random +data. +.IP "char *\fBuuid_error\fR(uuid_rc_t \fIrc\fR);" 4 +.IX Item "char *uuid_error(uuid_rc_t rc);" +Returns a constant string representation corresponding to the +return-code \fIrc\fR for use in displaying \fB\s-1OSSP\s0 uuid\fR errors. +.IP "unsigned long \fBuuid_version\fR(void);" 4 +.IX Item "unsigned long uuid_version(void);" +Returns the hexadecimal encoded \fB\s-1OSSP\s0 uuid\fR version as compiled into +the library object files. This allows run-time checking of the \fB\s-1OSSP\s0 +uuid\fR version. For compile-time checking use \f(CW\*(C`UUID_VERSION\*(C'\fR instead. +.SH "EXAMPLE" +.IX Header "EXAMPLE" +The following shows an example usage of the \s-1API\s0. Error handling is +omitted for code simplification and has to be re-added for production +code. +.PP +.Vb 5 +\& /* generate a DCE 1.1 v1 UUID from system environment */ +\& char *uuid_v1(void) +\& { +\& uuid_t *uuid; +\& char *str; +\& +\& uuid_create(&uuid); +\& uuid_make(uuid, UUID_MAKE_V1); +\& str = NULL; +\& uuid_export(uuid, UUID_FMT_STR, &str, NULL); +\& uuid_destroy(uuid); +\& return str; +\& } +\& +\& /* generate a DCE 1.1 v3 UUID from an URL */ +\& char *uuid_v3(const char *url) +\& { +\& uuid_t *uuid; +\& uuid_t *uuid_ns; +\& char *str; +\& +\& uuid_create(&uuid); +\& uuid_create(&uuid_ns); +\& uuid_load(uuid_ns, "ns:URL"); +\& uuid_make(uuid, UUID_MAKE_V3, uuid_ns, url); +\& str = NULL; +\& uuid_export(uuid, UUID_FMT_STR, &str, NULL); +\& uuid_destroy(uuid_ns); +\& uuid_destroy(uuid); +\& return str; +\& } +.Ve +.SH "SEE ALSO" +.IX Header "SEE ALSO" +The following are references to \fB\s-1UUID\s0\fR documentation and specifications: +.IP "\(bu" 4 +\&\fBA Universally Unique IDentifier (\s-1UUID\s0) \s-1URN\s0 Namespace\fR, +P. Leach, M. Mealling, R. Salz, +\&\s-1IETF\s0 \s-1RFC\-4122\s0, +July 2005, 32 pages, +http://www.ietf.org/rfc/rfc4122.txt +.IP "\(bu" 4 +Information Technology \*(-- Open Systems Interconnection (\s-1OSI\s0), +\&\fBProcedures for the operation of \s-1OSI\s0 Registration Authorities: +Generation and Registration of Universally Unique Identifiers (UUIDs) +and their Use as \s-1ASN\s0.1 Object Identifier Components\fR, +\&\s-1ISO/IEC\s0 9834\-8:2004 / ITU-T Rec. X.667, 2004, +December 2004, 25 pages, +http://www.itu.int/ITU\-T/studygroups/com17/oid/X.667\-E.pdf +.IP "\(bu" 4 +\&\fB\s-1DCE\s0 1.1: Remote Procedure Call\fR, +appendix \fBUniversally Unique Identifier\fR, +Open Group Technical Standard +Document Number C706, August 1997, 737 pages, +(supersedes C309 \s-1DCE:\s0 Remote Procedure Call 8/1994, +which was basis for \s-1ISO/IEC\s0 11578:1996 specification), +http://www.opengroup.org/publications/catalog/c706.htm +.IP "\(bu" 4 +Information technology \*(-- Open Systems Interconnection (\s-1OSI\s0), +\&\fBRemote Procedure Call (\s-1RPC\s0)\fR, +\&\s-1ISO/IEC\s0 11578:1996, +August 2001, 570 pages, (\s-1CHF\s0 340,00), +http://www.iso.ch/cate/d2229.html +.IP "\(bu" 4 +\&\fB\s-1HTTP\s0 Extensions for Distributed Authoring (WebDAV)\fR, +section \fB6.4.1 Node Field Generation Without the \s-1IEEE\s0 802 Address\fR, +\&\s-1IETF\s0 \s-1RFC\-2518\s0, +February 1999, 94 pages, +http://www.ietf.org/rfc/rfc2518.txt +.IP "\(bu" 4 +\&\fB\s-1DCE\s0 1.1 compliant \s-1UUID\s0 functions\fR, +FreeBSD manual pages \fIuuid\fR\|(3) and \fIuuidgen\fR\|(2), +http://www.freebsd.org/cgi/man.cgi?query=uuid&manpath=FreeBSD+6.0\-RELEASE +.SH "HISTORY" +.IX Header "HISTORY" +\&\fB\s-1OSSP\s0 uuid\fR was implemented in January 2004 by Ralf S. Engelschall +. It was prompted by the use of UUIDs +in the \fB\s-1OSSP\s0 as\fR and \fBOpenPKG\fR projects. It is a clean room +implementation intended to be strictly standards compliant and maximum +portable. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIuuid\fR\|(1), \fIuuid\-config\fR\|(1), \fIOSSP::uuid\fR\|(3). diff --git a/upstream/opensuse-leap-15-6/man3/uuid_clear.3 b/upstream/opensuse-leap-15-6/man3/uuid_clear.3 new file mode 100644 index 00000000..10bc2aa7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_clear.3 @@ -0,0 +1,59 @@ +'\" t +.\" Title: uuid_clear +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_CLEAR" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_clear \- reset value of UUID variable to the NULL value +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBvoid uuid_clear(uuid_t \fIuu\fP);\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_clear\fP() function sets the value of the supplied uuid variable \fIuu\fP to the NULL value. +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_compare.3 b/upstream/opensuse-leap-15-6/man3/uuid_compare.3 new file mode 100644 index 00000000..f251661d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_compare.3 @@ -0,0 +1,58 @@ +'\" t +.\" Title: uuid_compare +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_COMPARE" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_compare \- compare whether two UUIDs are the same +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBint uuid_compare(uuid_t \fIuu1\fP, uuid_t \fIuu2\fP)\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_compare\fP() function compares the two supplied uuid variables \fIuu1\fP and \fIuu2\fP to each other. +.SH "RETURN VALUE" +.sp +Returns an integer less than, equal to, or greater than zero if \fIuu1\fP is found, respectively, to be lexicographically less than, equal, or greater than \fIuu2\fP. +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_unparse\fP(3) +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_copy.3 b/upstream/opensuse-leap-15-6/man3/uuid_copy.3 new file mode 100644 index 00000000..650bd5ae --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_copy.3 @@ -0,0 +1,62 @@ +'\" t +.\" Title: uuid_copy +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_COPY" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_copy \- copy a UUID value +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBvoid uuid_copy(uuid_t \fIdst\fP, uuid_t \fIsrc\fP;\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_copy\fP() function copies the UUID variable \fIsrc\fP to \fIdst\fP. +.SH "RETURN VALUE" +.sp +The copied UUID is returned in the location pointed to by \fIdst\fP. +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_generate.3 b/upstream/opensuse-leap-15-6/man3/uuid_generate.3 new file mode 100644 index 00000000..0552da4a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_generate.3 @@ -0,0 +1,90 @@ +'\" t +.\" Title: uuid_generate +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-02-14 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_GENERATE" "3" "2022-02-14" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_generate, uuid_generate_random, uuid_generate_time, uuid_generate_time_safe \- create a new unique UUID value +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBvoid uuid_generate(uuid_t \fIout\fP);\fP +.br +\fBvoid uuid_generate_random(uuid_t \fIout\fP);\fP +.br +\fBvoid uuid_generate_time(uuid_t \fIout\fP);\fP +.br +\fBint uuid_generate_time_safe(uuid_t \fIout\fP);\fP +.br +\fBvoid uuid_generate_md5(uuid_t \fIout\fP, const uuid_t \fIns\fP, const char \fI*name\fP, size_t \fIlen\fP);\fP +.br +\fBvoid uuid_generate_sha1(uuid_t \fIout\fP, const uuid_t \fIns\fP, const char \fI*name\fP, size_t \fIlen\fP);\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_generate\fP() function creates a new universally unique identifier (UUID). The uuid will be generated based on high\-quality randomness from \fBgetrandom\fP(2), \fI/dev/urandom\fP, or \fI/dev/random\fP if available. If it is not available, then \fBuuid_generate\fP() will use an alternative algorithm which uses the current time, the local ethernet MAC address (if available), and random data generated using a pseudo\-random generator. +.sp +The \fBuuid_generate_random\fP() function forces the use of the all\-random UUID format, even if a high\-quality random number generator is not available, in which case a pseudo\-random generator will be substituted. Note that the use of a pseudo\-random generator may compromise the uniqueness of UUIDs generated in this fashion. +.sp +The \fBuuid_generate_time\fP() function forces the use of the alternative algorithm which uses the current time and the local ethernet MAC address (if available). This algorithm used to be the default one used to generate UUIDs, but because of the use of the ethernet MAC address, it can leak information about when and where the UUID was generated. This can cause privacy problems in some applications, so the \fBuuid_generate\fP() function only uses this algorithm if a high\-quality source of randomness is not available. To guarantee uniqueness of UUIDs generated by concurrently running processes, the uuid library uses a global clock state counter (if the process has permissions to gain exclusive access to this file) and/or the \fBuuidd\fP daemon, if it is running already or can be spawned by the process (if installed and the process has enough permissions to run it). If neither of these two synchronization mechanisms can be used, it is theoretically possible that two concurrently running processes obtain the same UUID(s). To tell whether the UUID has been generated in a safe manner, use \fBuuid_generate_time_safe\fP. +.sp +The \fBuuid_generate_time_safe\fP() function is similar to \fBuuid_generate_time\fP(), except that it returns a value which denotes whether any of the synchronization mechanisms (see above) has been used. +.sp +The UUID is 16 bytes (128 bits) long, which gives approximately 3.4x10^38 unique values (there are approximately 10^80 elementary particles in the universe according to Carl Sagan\(cqs \fICosmos\fP). The new UUID can reasonably be considered unique among all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future. +.sp +The \fBuuid_generate_md5\fP() and \fBuuid_generate_sha1\fP() functions generate an MD5 and SHA1 hashed (predictable) UUID based on a well\-known UUID providing the namespace and an arbitrary binary string. The UUIDs conform to V3 and V5 UUIDs per \c +.URL "https://tools.ietf.org/html/rfc4122" "RFC\-4122" "." +.SH "RETURN VALUE" +.sp +The newly created UUID is returned in the memory location pointed to by \fIout\fP. \fBuuid_generate_time_safe\fP() returns zero if the UUID has been generated in a safe manner, \-1 otherwise. +.SH "CONFORMING TO" +.sp +This library generates UUIDs compatible with OSF DCE 1.1, and hash based UUIDs V3 and V5 compatible with \c +.URL "https://tools.ietf.org/html/rfc4122" "RFC\-4122" "." +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuidgen\fP(1), +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_time\fP(3), +\fBuuid_unparse\fP(3), +\fBuuidd\fP(8) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_is_null.3 b/upstream/opensuse-leap-15-6/man3/uuid_is_null.3 new file mode 100644 index 00000000..68606166 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_is_null.3 @@ -0,0 +1,60 @@ +'\" t +.\" Title: uuid_is_null +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_IS_NULL" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_is_null \- compare the value of the UUID to the NULL value +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBint uuid_is_null(uuid_t \fIuu\fP);\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_is_null\fP() function compares the value of the supplied UUID variable \fIuu\fP to the NULL value. If the value is equal to the NULL UUID, 1 is returned, otherwise 0 is returned. +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_time\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_parse.3 b/upstream/opensuse-leap-15-6/man3/uuid_parse.3 new file mode 100644 index 00000000..5d0a8581 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_parse.3 @@ -0,0 +1,71 @@ +'\" t +.\" Title: uuid_parse +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_PARSE" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_parse \- convert an input UUID string into binary representation +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBint uuid_parse(char *\fIin\fP, uuid_t \fIuu\fP);\fP +.br +\fBint uuid_parse_range(char *\fIin_start\fP, char *\fIin_end\fP, uuid_t \fIuu\fP);\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_parse\fP() function converts the UUID string given by \fIin\fP into the binary representation. The input UUID is a string of the form 1b4e28ba\-2fa1\-11d2\-883f\-b9a761bde3fb (in \fBprintf\fP(3) format "%08x\-%04x\-%04x\-%04x\-%012x", 36 bytes plus the trailing \(aq\(rs0\(aq). +.sp +The \fBuuid_parse_range\fP() function works like \fBuuid_parse\fP() but parses only range in string specified by \fIin_start\fP and \fIin_end\fP pointers. +.SH "RETURN VALUE" +.sp +Upon successfully parsing the input string, 0 is returned, and the UUID is stored in the location pointed to by \fIuu\fP, otherwise \-1 is returned. +.SH "CONFORMING TO" +.sp +This library parses UUIDs compatible with OSF DCE 1.1, and hash based UUIDs V3 and V5 compatible with \c +.URL "https://tools.ietf.org/html/rfc4122" "RFC\-4122" "." +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_time\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_time.3 b/upstream/opensuse-leap-15-6/man3/uuid_time.3 new file mode 100644 index 00000000..07d823e5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_time.3 @@ -0,0 +1,63 @@ +'\" t +.\" Title: uuid_time +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_TIME" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_time \- extract the time at which the UUID was created +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBtime_t uuid_time(uuid_t \fIuu\fP, struct timeval *\fIret_tv\fP)\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_time\fP() function extracts the time at which the supplied time\-based UUID \fIuu\fP was created. Note that the UUID creation time is only encoded within certain types of UUIDs. This function can only reasonably expect to extract the creation time for UUIDs created with the \fBuuid_generate_time\fP(3) and \fBuuid_generate_time_safe\fP(3) functions. It may or may not work with UUIDs created by other mechanisms. +.SH "RETURN VALUE" +.sp +The time at which the UUID was created, in seconds since January 1, 1970 GMT (the epoch), is returned (see \fBtime\fP(2)). The time at which the UUID was created, in seconds and microseconds since the epoch, is also stored in the location pointed to by \fIret_tv\fP (see \fBgettimeofday\fP(2)). +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3), +\fBuuid_unparse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/uuid_unparse.3 b/upstream/opensuse-leap-15-6/man3/uuid_unparse.3 new file mode 100644 index 00000000..7332e05e --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/uuid_unparse.3 @@ -0,0 +1,69 @@ +'\" t +.\" Title: uuid_unparse +.\" Author: [see the "AUTHOR(S)" section] +.\" Generator: Asciidoctor 2.0.15 +.\" Date: 2022-01-06 +.\" Manual: Programmer's Manual +.\" Source: util-linux 2.37.4 +.\" Language: English +.\" +.TH "UUID_UNPARSE" "3" "2022-01-06" "util\-linux 2.37.4" "Programmer\(aqs Manual" +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.ss \n[.ss] 0 +.nh +.ad l +.de URL +\fI\\$2\fP <\\$1>\\$3 +.. +.als MTO URL +.if \n[.g] \{\ +. mso www.tmac +. am URL +. ad l +. . +. am MTO +. ad l +. . +. LINKSTYLE blue R < > +.\} +.SH "NAME" +uuid_unparse \- convert a UUID from binary representation to a string +.SH "SYNOPSIS" +.sp +\fB#include \fP +.sp +\fBvoid uuid_unparse(uuid_t \fIuu\fP, char *\fIout\fP);\fP +.br +\fBvoid uuid_unparse_upper(uuid_t \fIuu\fP, char *\fIout\fP);\fP +.br +\fBvoid uuid_unparse_lower(uuid_t \fIuu\fP, char *\fIout\fP);\fP +.SH "DESCRIPTION" +.sp +The \fBuuid_unparse\fP() function converts the supplied UUID \fIuu\fP from the binary representation into a 36\-byte string (plus trailing \(aq\(rs0\(aq) of the form 1b4e28ba\-2fa1\-11d2\-883f\-0016d3cca427 and stores this value in the character string pointed to by \fIout\fP. The case of the hex digits returned by \fBuuid_unparse\fP() may be upper or lower case, and is dependent on the system\-dependent local default. +.sp +If the case of the hex digits is important then the functions \fBuuid_unparse_upper\fP() and \fBuuid_unparse_lower\fP() may be used. +.SH "CONFORMING TO" +.sp +This library unparses UUIDs compatible with OSF DCE 1.1. +.SH "AUTHORS" +.sp +Theodore Y. Ts\(cqo +.SH "SEE ALSO" +.sp +\fBuuid\fP(3), +\fBuuid_clear\fP(3), +\fBuuid_compare\fP(3), +\fBuuid_copy\fP(3), +\fBuuid_generate\fP(3), +\fBuuid_time\fP(3), +\fBuuid_is_null\fP(3), +\fBuuid_parse\fP(3) +.SH "REPORTING BUGS" +.sp +For bug reports, use the issue tracker at \c +.URL "https://github.com/karelzak/util\-linux/issues" "" "." +.SH "AVAILABILITY" +.sp +The \fBlibuuid\fP library is part of the util\-linux package since version 2.15.1. It can be downloaded from \c +.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file diff --git a/upstream/opensuse-leap-15-6/man3/wcpcpy.3 b/upstream/opensuse-leap-15-6/man3/wcpcpy.3 new file mode 100644 index 00000000..af2a634c --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcpcpy.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcpcpy 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +wcpcpy \- copy a wide-character string, returning a pointer to its end +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcpcpy(wchar_t *restrict " dest \ +", const wchar_t *restrict " src ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcpcpy (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcpcpy () +function is the wide-character equivalent of the +.BR stpcpy (3) +function. +It copies the wide-character string pointed to by +.IR src , +including the terminating null wide character (L\[aq]\e0\[aq]), +to the array pointed to by +.IR dest . +.PP +The strings may not overlap. +.PP +The programmer must ensure that there +is room for at least +.I wcslen(src)+1 +wide characters at +.IR dest . +.SH RETURN VALUE +.BR wcpcpy () +returns a pointer to the end of the wide-character string +.IR dest , +that is, a pointer to the terminating null wide character. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcpcpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH SEE ALSO +.BR strcpy (3), +.BR wcscpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcpncpy.3 b/upstream/opensuse-leap-15-6/man3/wcpncpy.3 new file mode 100644 index 00000000..b9f8ca98 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcpncpy.3 @@ -0,0 +1,109 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcpncpy 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +wcpncpy \- copy a fixed-size string of wide characters, +returning a pointer to its end +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcpncpy(wchar_t " dest "[restrict ." n ], +.BI " const wchar_t " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcpncpy (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcpncpy () +function is the wide-character equivalent +of the +.BR stpncpy (3) +function. +It copies at most +.I n +wide characters from the wide-character +string pointed to by +.IR src , +including the terminating null wide (L\[aq]\e0\[aq]), +to the array pointed to by +.IR dest . +Exactly +.I n +wide characters are +written at +.IR dest . +If the length +.I wcslen(src) +is smaller than +.IR n , +the remaining wide characters in the array pointed to +by +.I dest +are filled with L\[aq]\e0\[aq] characters. +If the length +.I wcslen(src) +is greater than or equal +to +.IR n , +the string pointed to by +.I dest +will +not be L\[aq]\e0\[aq] terminated. +.PP +The strings may not overlap. +.PP +The programmer must ensure that there is room for at least +.I n +wide +characters at +.IR dest . +.SH RETURN VALUE +.BR wcpncpy () +returns a pointer to the last wide character written, that is, +.IR dest + n \-1. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcpncpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH SEE ALSO +.BR stpncpy (3), +.BR wcsncpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcrtomb.3 b/upstream/opensuse-leap-15-6/man3/wcrtomb.3 new file mode 100644 index 00000000..d67f7886 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcrtomb.3 @@ -0,0 +1,147 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcrtomb 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcrtomb \- convert a wide character to a multibyte sequence +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcrtomb(char *restrict " s ", wchar_t " wc \ +", mbstate_t *restrict " ps ); +.fi +.SH DESCRIPTION +The main case for this function is when +.I s +is +not NULL and +.I wc +is not a null wide character (L\[aq]\e0\[aq]). +In this case, the +.BR wcrtomb () +function +converts the wide character +.I wc +to its multibyte representation and stores it +at the beginning of the character +array pointed to by +.IR s . +It updates the shift state +.IR *ps , +and +returns the length of said multibyte representation, +that is, the number of bytes +written at +.IR s . +.PP +A different case is when +.I s +is not NULL, +but +.I wc +is a null wide character (L\[aq]\e0\[aq]). +In this case, the +.BR wcrtomb () +function stores at +the character array pointed to by +.I s +the shift sequence needed to +bring +.I *ps +back to the initial state, +followed by a \[aq]\e0\[aq] byte. +It updates the shift state +.I *ps +(i.e., brings +it into the initial state), +and returns the length of the shift sequence plus +one, that is, the number of bytes written at +.IR s . +.PP +A third case is when +.I s +is NULL. +In this case, +.I wc +is ignored, +and the function effectively returns +.PP +.in +4n +.EX +wcrtomb(buf, L\[aq]\e0\[aq], ps) +.EE +.in +.PP +where +.I buf +is an internal anonymous buffer. +.PP +In all of the above cases, if +.I ps +is NULL, a static anonymous +state known only to the +.BR wcrtomb () +function is used instead. +.SH RETURN VALUE +The +.BR wcrtomb () +function returns the number of +bytes that have been or would +have been written to the byte array at +.IR s . +If +.I wc +can not be +represented as a multibyte sequence (according to the current locale), +.I (size_t)\ \-1 +is returned, and +.I errno +set to +.BR EILSEQ . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcrtomb () +T} Thread safety MT-Unsafe race:wcrtomb/!ps +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wcrtomb () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +Passing NULL as +.I ps +is not multithread safe. +.SH SEE ALSO +.BR mbsinit (3), +.BR wcsrtombs (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcscasecmp.3 b/upstream/opensuse-leap-15-6/man3/wcscasecmp.3 new file mode 100644 index 00000000..0b3d1236 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcscasecmp.3 @@ -0,0 +1,102 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcscasecmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcscasecmp \- compare two wide-character strings, ignoring case +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wcscasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcscasecmp (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcscasecmp () +function is the wide-character equivalent of the +.BR strcasecmp (3) +function. +It compares the wide-character string pointed to +by +.I s1 +and the wide-character string pointed to by +.IR s2 , +ignoring +case differences +.RB ( towupper (3), +.BR towlower (3)). +.SH RETURN VALUE +The +.BR wcscasecmp () +function returns zero if the wide-character strings at +.I s1 +and +.I s2 +are equal except for case distinctions. +It returns a +positive integer if +.I s1 +is greater than +.IR s2 , +ignoring case. +It +returns a negative integer if +.I s1 +is smaller +than +.IR s2 , +ignoring case. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcscasecmp () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +.SH NOTES +The behavior of +.BR wcscasecmp () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR strcasecmp (3), +.BR wcscmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcscat.3 b/upstream/opensuse-leap-15-6/man3/wcscat.3 new file mode 100644 index 00000000..fd7023a6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcscat.3 @@ -0,0 +1,73 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcscat 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcscat \- concatenate two wide-character strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcscat(wchar_t *restrict " dest \ +", const wchar_t *restrict " src ); +.fi +.SH DESCRIPTION +The +.BR wcscat () +function is the wide-character equivalent +of the +.BR strcat (3) +function. +It copies the wide-character string pointed to by +.IR src , +including the terminating null wide character (L\[aq]\e0\[aq]), +to the end of the wide-character string pointed to by +.IR dest . +.PP +The strings may not overlap. +.PP +The programmer must ensure that there is room for at least +.IR wcslen(dest) + wcslen(src) +1 +wide characters at +.IR dest . +.SH RETURN VALUE +.BR wcscat () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcscat () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strcat (3), +.BR wcpcpy (3), +.BR wcscpy (3), +.BR wcsncat (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcschr.3 b/upstream/opensuse-leap-15-6/man3/wcschr.3 new file mode 100644 index 00000000..dd1ad6cb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcschr.3 @@ -0,0 +1,72 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcschr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcschr \- search a wide character in a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcschr(const wchar_t *" wcs ", wchar_t " wc ); +.fi +.SH DESCRIPTION +The +.BR wcschr () +function is the wide-character equivalent +of the +.BR strchr (3) +function. +It searches the first occurrence of +.I wc +in the wide-character +string pointed to by +.IR wcs . +.SH RETURN VALUE +The +.BR wcschr () +function returns a pointer to the first occurrence of +.I wc +in the wide-character string pointed to by +.IR wcs , +or NULL if +.I wc +does not occur in the string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcschr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strchr (3), +.BR wcspbrk (3), +.BR wcsrchr (3), +.BR wcsstr (3), +.BR wmemchr (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcscmp.3 b/upstream/opensuse-leap-15-6/man3/wcscmp.3 new file mode 100644 index 00000000..bc6dd8a0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcscmp.3 @@ -0,0 +1,82 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcscmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcscmp \- compare two wide-character strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wcscmp(const wchar_t *" s1 ", const wchar_t *" s2 ); +.fi +.SH DESCRIPTION +The +.BR wcscmp () +function is the wide-character equivalent +of the +.BR strcmp (3) +function. +It compares the wide-character string pointed to by +.I s1 +and the +wide-character string pointed to by +.IR s2 . +.SH RETURN VALUE +The +.BR wcscmp () +function returns zero if the wide-character strings at +.I s1 +and +.I s2 +are equal. +It returns an integer greater than zero if +at the first differing position +.IR i , +the corresponding wide-character +.I s1[i] +is greater than +.IR s2[i] . +It returns an integer less than zero if +at the first differing position +.IR i , +the corresponding wide-character +.I s1[i] +is less than +.IR s2[i] . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcscmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strcmp (3), +.BR wcscasecmp (3), +.BR wmemcmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcscpy.3 b/upstream/opensuse-leap-15-6/man3/wcscpy.3 new file mode 100644 index 00000000..2440a026 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcscpy.3 @@ -0,0 +1,75 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcscpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcscpy \- copy a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcscpy(wchar_t *restrict " dest \ +", const wchar_t *restrict " src ); +.fi +.SH DESCRIPTION +The +.BR wcscpy () +function is the wide-character equivalent +of the +.BR strcpy (3) +function. +It copies the wide-character string pointed to by +.IR src , +including the terminating null wide character (L\[aq]\e0\[aq]), +to the array pointed to by +.IR dest . +.PP +The strings may not overlap. +.PP +The programmer must ensure that there is +room for at least +.I wcslen(src)+1 +wide characters at +.IR dest . +.SH RETURN VALUE +.BR wcscpy () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcscpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strcpy (3), +.BR wcpcpy (3), +.BR wcscat (3), +.BR wcsdup (3), +.BR wmemcpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcscspn.3 b/upstream/opensuse-leap-15-6/man3/wcscspn.3 new file mode 100644 index 00000000..38377cb7 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcscspn.3 @@ -0,0 +1,84 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcscspn 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcscspn \- search a wide-character string for any of a set of wide characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcscspn(const wchar_t *" wcs ", const wchar_t *" reject ); +.fi +.SH DESCRIPTION +The +.BR wcscspn () +function is the wide-character equivalent +of the +.BR strcspn (3) +function. +It determines the length of the longest initial segment of +.I wcs +which consists entirely of wide-characters not listed in +.IR reject . +In +other words, it searches for the first occurrence in the wide-character +string +.I wcs +of any of the characters in the wide-character string +.IR reject . +.SH RETURN VALUE +The +.BR wcscspn () +function returns the number of +wide characters in the longest +initial segment of +.I wcs +which consists entirely of wide-characters not +listed in +.IR reject . +In other words, it returns the position of the first +occurrence in the wide-character string +.I wcs +of any of the characters in +the wide-character string +.IR reject , +or +.I wcslen(wcs) +if there is none. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcscspn () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strcspn (3), +.BR wcspbrk (3), +.BR wcsspn (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsdup.3 b/upstream/opensuse-leap-15-6/man3/wcsdup.3 new file mode 100644 index 00000000..ea0304c9 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsdup.3 @@ -0,0 +1,86 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsdup 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsdup \- duplicate a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcsdup(const wchar_t *" s ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcsdup (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcsdup () +function is the wide-character equivalent +of the +.BR strdup (3) +function. +It allocates and returns a new wide-character string whose initial +contents is a duplicate of the wide-character string pointed to by +.IR s . +.PP +Memory for the new wide-character string is +obtained with +.BR malloc (3), +and should be freed with +.BR free (3). +.SH RETURN VALUE +On success, +.BR wcsdup () +returns a pointer to the new wide-character string. +On error, it returns NULL, with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B ENOMEM +Insufficient memory available to allocate duplicate string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsdup () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +libc5, glibc 2.0. +.SH SEE ALSO +.BR strdup (3), +.BR wcscpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcslen.3 b/upstream/opensuse-leap-15-6/man3/wcslen.3 new file mode 100644 index 00000000..034f1634 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcslen.3 @@ -0,0 +1,68 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcslen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcslen \- determine the length of a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcslen(const wchar_t *" s ); +.fi +.SH DESCRIPTION +The +.BR wcslen () +function is the wide-character equivalent +of the +.BR strlen (3) +function. +It determines the length of the wide-character string pointed to +by +.IR s , +excluding the terminating null wide character (L\[aq]\e0\[aq]). +.SH RETURN VALUE +The +.BR wcslen () +function returns the +number of wide characters in +.IR s . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcslen () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +In cases where the input buffer may not contain +a terminating null wide character, +.BR wcsnlen (3) +should be used instead. +.SH SEE ALSO +.BR strlen (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsncasecmp.3 b/upstream/opensuse-leap-15-6/man3/wcsncasecmp.3 new file mode 100644 index 00000000..8be437fb --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsncasecmp.3 @@ -0,0 +1,108 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsncasecmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wcsncasecmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], s\ +ize_t " n ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcsncasecmp (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcsncasecmp () +function is the wide-character equivalent of the +.BR strncasecmp (3) +function. +It compares the wide-character string pointed to +by +.I s1 +and the wide-character string +pointed to by +.IR s2 , +but at most +.I n +wide characters from each string, ignoring case differences +.RB ( towupper (3), +.BR towlower (3)). +.SH RETURN VALUE +The +.BR wcsncasecmp () +function returns zero +if the wide-character strings at +.I s1 +and +.IR s2 , +truncated to at most length +.IR n , +are equal except +for case distinctions. +It returns a positive integer if truncated +.I s1 +is +greater than truncated +.IR s2 , +ignoring case. +It returns a negative integer +if truncated +.I s1 +is smaller than truncated +.IR s2 , +ignoring case. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsncasecmp () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +.SH NOTES +The behavior of +.BR wcsncasecmp () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR strncasecmp (3), +.BR wcsncmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsncat.3 b/upstream/opensuse-leap-15-6/man3/wcsncat.3 new file mode 100644 index 00000000..d78ddcf2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsncat.3 @@ -0,0 +1,75 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsncat 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsncat \- concatenate two wide-character strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcsncat(wchar_t " dest "[restrict ." n ], +.BI " const wchar_t " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wcsncat () +function is the wide-character equivalent of the +.BR strncat (3) +function. +It copies at most +.I n +wide characters from the wide-character +string pointed to by +.I src +to the end of the wide-character string pointed +to by +.IR dest , +and adds a terminating null wide character (L\[aq]\e0\[aq]). +.PP +The strings may not overlap. +.PP +The programmer must ensure that there is room for at least +.IR wcslen(dest) + n +1 +wide characters at +.IR dest . +.SH RETURN VALUE +.BR wcsncat () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsncat () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strncat (3), +.BR wcscat (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsncmp.3 b/upstream/opensuse-leap-15-6/man3/wcsncmp.3 new file mode 100644 index 00000000..f309a809 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsncmp.3 @@ -0,0 +1,96 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsncmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsncmp \- compare two fixed-size wide-character strings +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wcsncmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wcsncmp () +function is the wide-character equivalent of the +.BR strncmp (3) +function. +It compares the wide-character string pointed to by +.I s1 +and the +wide-character string pointed to by +.IR s2 , +but at most +.I n +wide +characters from each string. +In each string, the comparison extends only up +to the first occurrence of a null wide character (L\[aq]\e0\[aq]), if any. +.SH RETURN VALUE +The +.BR wcsncmp () +function returns zero if the wide-character strings at +.I s1 +and +.IR s2 , +truncated to at most length +.IR n , +are equal. +It returns an integer greater than zero if at the first differing position +.I i +.RI ( i +< +.IR n ), +the corresponding wide-character +.I s1[i] +is +greater than +.IR s2[i] . +It returns an integer less than zero if at the first +differing position +.I i +.RI ( i +< +.IR n ), +the corresponding +wide-character +.I s1[i] +is less than +.IR s2[i] . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsncmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strncmp (3), +.BR wcsncasecmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsncpy.3 b/upstream/opensuse-leap-15-6/man3/wcsncpy.3 new file mode 100644 index 00000000..ef80839d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsncpy.3 @@ -0,0 +1,92 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsncpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsncpy \- copy a fixed-size string of wide characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcsncpy(wchar_t " dest "[restrict ." n ], +.BI " const wchar_t " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wcsncpy () +function is the wide-character equivalent of the +.BR strncpy (3) +function. +It copies at most +.I n +wide characters from the wide-character +string pointed to by +.IR src , +including the terminating null wide character (L\[aq]\e0\[aq]), +to the array pointed to by +.IR dest . +Exactly +.I n +wide characters are +written at +.IR dest . +If the length \fIwcslen(src)\fP is smaller than +.IR n , +the remaining wide characters in the array +pointed to by +.I dest +are filled +with null wide characters. +If the length \fIwcslen(src)\fP is greater than or equal +to +.IR n , +the string pointed to by +.I dest +will not be terminated by a null wide character. +.PP +The strings may not overlap. +.PP +The programmer must ensure that there is room for at least +.I n +wide +characters at +.IR dest . +.SH RETURN VALUE +.BR wcsncpy () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsncpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strncpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsnlen.3 b/upstream/opensuse-leap-15-6/man3/wcsnlen.3 new file mode 100644 index 00000000..17ea8c74 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsnlen.3 @@ -0,0 +1,94 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsnlen 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsnlen \- determine the length of a fixed-size wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcsnlen(const wchar_t " s [. maxlen "], size_t " maxlen ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcsnlen (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcsnlen () +function is the wide-character equivalent +of the +.BR strnlen (3) +function. +It returns the number of wide-characters in the string pointed to by +.IR s , +not including the terminating null wide character (L\[aq]\e0\[aq]), +but at most +.I maxlen +wide characters (note: this parameter is not a byte count). +In doing this, +.BR wcsnlen () +looks at only the first +.I maxlen +wide characters at +.I s +and never beyond +.IR s[maxlen\-1] . +.SH RETURN VALUE +The +.BR wcsnlen () +function returns +.IR wcslen(s) , +if that is less than +.IR maxlen , +or +.I maxlen +if there is no null wide character among the +first +.I maxlen +wide characters pointed to by +.IR s . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsnlen () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +glibc 2.1. +.SH SEE ALSO +.BR strnlen (3), +.BR wcslen (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsnrtombs.3 b/upstream/opensuse-leap-15-6/man3/wcsnrtombs.3 new file mode 100644 index 00000000..5a9dd9a1 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsnrtombs.3 @@ -0,0 +1,190 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsnrtombs 3 2023-02-05 "Linux man-pages 6.04" +.SH NAME +wcsnrtombs \- convert a wide-character string to a multibyte string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcsnrtombs(char " dest "[restrict ." len "], \ +const wchar_t **restrict " src , +.BI " size_t " nwc ", size_t " len ", \ +mbstate_t *restrict " ps ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wcsnrtombs (): +.nf + Since glibc 2.10: + _POSIX_C_SOURCE >= 200809L + Before glibc 2.10: + _GNU_SOURCE +.fi +.SH DESCRIPTION +The +.BR wcsnrtombs () +function is like the +.BR wcsrtombs (3) +function, +except that the number of wide characters to be converted, +starting at +.IR *src , +is limited to +.IR nwc . +.PP +If +.I dest +is not NULL, +the +.BR wcsnrtombs () +function converts +at most +.I nwc +wide characters from +the wide-character string +.I *src +to a multibyte string starting at +.IR dest . +At most +.I len +bytes are written to +.IR dest . +The shift state +.I *ps +is updated. +The conversion is effectively performed by repeatedly +calling +.IR "wcrtomb(dest, *src, ps)" , +as long as this call succeeds, +and then incrementing +.I dest +by the +number of bytes written and +.I *src +by one. +The conversion can stop for three reasons: +.IP \[bu] 3 +A wide character has been encountered that can not be represented as a +multibyte sequence (according to the current locale). +In this case, +.I *src +is left pointing to the invalid wide character, +.I (size_t)\ \-1 +is returned, +and +.I errno +is set to +.BR EILSEQ . +.IP \[bu] +.I nwc +wide characters have been +converted without encountering a null wide character (L\[aq]\e0\[aq]), +or the length limit forces a stop. +In this case, +.I *src +is left pointing +to the next wide character to be converted, and the number of bytes written +to +.I dest +is returned. +.IP \[bu] +The wide-character string has been completely converted, including the +terminating null wide character (which has the side effect of bringing back +.I *ps +to the initial state). +In this case, +.I *src +is set to NULL, and the number +of bytes written to +.IR dest , +excluding the terminating null byte (\[aq]\e0\[aq]), is +returned. +.PP +If +.I dest +is NULL, +.I len +is ignored, +and the conversion proceeds as above, +except that the converted bytes are not written out to memory, and that +no destination length limit exists. +.PP +In both of the above cases, +if +.I ps +is NULL, a static anonymous +state known only to the +.BR wcsnrtombs () +function is used instead. +.PP +The programmer must ensure that there is room for at least +.I len +bytes +at +.IR dest . +.SH RETURN VALUE +The +.BR wcsnrtombs () +function returns +the number of bytes that make up the +converted part of multibyte sequence, +not including the terminating null byte. +If a wide character was encountered which +could not be converted, +.I (size_t)\ \-1 +is returned, and +.I errno +set to +.BR EILSEQ . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR wcsnrtombs () +T} Thread safety T{ +MT-Unsafe race:wcsnrtombs/!ps +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH NOTES +The behavior of +.BR wcsnrtombs () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +Passing NULL as +.I ps +is not multithread safe. +.SH SEE ALSO +.BR iconv (3), +.BR mbsinit (3), +.BR wcsrtombs (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcspbrk.3 b/upstream/opensuse-leap-15-6/man3/wcspbrk.3 new file mode 100644 index 00000000..9ecf25c2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcspbrk.3 @@ -0,0 +1,72 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcspbrk 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcspbrk \- search a wide-character string for any of a set of wide characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcspbrk(const wchar_t *" wcs ", const wchar_t *" accept ); +.fi +.SH DESCRIPTION +The +.BR wcspbrk () +function is the wide-character equivalent +of the +.BR strpbrk (3) +function. +It searches for the first occurrence in the wide-character +string pointed to by +.I wcs +of any of the +characters in the wide-character +string pointed to by +.IR accept . +.SH RETURN VALUE +The +.BR wcspbrk () +function returns a pointer to the first occurrence in +.I wcs +of any of the characters listed in +.IR accept . +If +.I wcs +contains none of these characters, NULL is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcspbrk () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strpbrk (3), +.BR wcschr (3), +.BR wcscspn (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsrchr.3 b/upstream/opensuse-leap-15-6/man3/wcsrchr.3 new file mode 100644 index 00000000..db5fde7a --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsrchr.3 @@ -0,0 +1,69 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsrchr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsrchr \- search a wide character in a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcsrchr(const wchar_t *" wcs ", wchar_t " wc ); +.fi +.SH DESCRIPTION +The +.BR wcsrchr () +function is the wide-character equivalent +of the +.BR strrchr (3) +function. +It searches the last occurrence of +.I wc +in the wide-character +string pointed to by +.IR wcs . +.SH RETURN VALUE +The +.BR wcsrchr () +function returns a pointer to the last occurrence of +.I wc +in the wide-character string pointed to by +.IR wcs , +or NULL if +.I wc +does not occur in the string. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsrchr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strrchr (3), +.BR wcschr (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsrtombs.3 b/upstream/opensuse-leap-15-6/man3/wcsrtombs.3 new file mode 100644 index 00000000..85e97301 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsrtombs.3 @@ -0,0 +1,165 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsrtombs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsrtombs \- convert a wide-character string to a multibyte string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcsrtombs(char " dest "[restrict ." len "], \ +const wchar_t **restrict " src , +.BI " size_t " len ", mbstate_t *restrict " ps ); +.fi +.SH DESCRIPTION +If +.I dest +is not NULL, +the +.BR wcsrtombs () +function converts +the wide-character string +.I *src +to a multibyte string starting at +.IR dest . +At most +.I len +bytes are written to +.IR dest . +The shift state +.I *ps +is updated. +The conversion is effectively performed by repeatedly +calling +.IR "wcrtomb(dest, *src, ps)" , +as long as this call succeeds, +and then incrementing +.I dest +by the +number of bytes written and +.I *src +by one. +The conversion can stop for three reasons: +.IP \[bu] 3 +A wide character has been encountered that can not be represented as a +multibyte sequence (according to the current locale). +In this case, +.I *src +is left pointing to the invalid wide character, +.I (size_t)\ \-1 +is returned, +and +.I errno +is set to +.BR EILSEQ . +.IP \[bu] +The length limit forces a stop. +In this case, +.I *src +is left pointing +to the next wide character to be converted, +and the number of bytes written to +.I dest +is returned. +.IP \[bu] +The wide-character string has been completely converted, including the +terminating null wide character (L\[aq]\e0\[aq]), +which has the side effect of bringing back +.I *ps +to the initial state. +In this case, +.I *src +is set to NULL, and the number +of bytes written to +.IR dest , +excluding the terminating null byte (\[aq]\e0\[aq]), +is returned. +.PP +If +.I dest +is NULL, +.I len +is ignored, +and the conversion proceeds as above, except that the converted bytes +are not written out to memory, and that +no length limit exists. +.PP +In both of the above cases, +if +.I ps +is NULL, a static anonymous +state known only to the +.BR wcsrtombs () +function is used instead. +.PP +The programmer must ensure that there is room for at least +.I len +bytes +at +.IR dest . +.SH RETURN VALUE +The +.BR wcsrtombs () +function returns +the number of bytes that make up the +converted part of multibyte sequence, +not including the terminating null byte. +If a wide character was encountered +which could not be converted, +.I (size_t)\ \-1 +is returned, and +.I errno +set to +.BR EILSEQ . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR wcsrtombs () +T} Thread safety T{ +MT-Unsafe race:wcsrtombs/!ps +T} +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wcsrtombs () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +Passing NULL as +.I ps +is not multithread safe. +.SH SEE ALSO +.BR iconv (3), +.BR mbsinit (3), +.BR wcrtomb (3), +.BR wcsnrtombs (3), +.BR wcstombs (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsspn.3 b/upstream/opensuse-leap-15-6/man3/wcsspn.3 new file mode 100644 index 00000000..f97877c5 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsspn.3 @@ -0,0 +1,81 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsspn 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsspn \- get length of a prefix wide-character substring +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcsspn(const wchar_t *" wcs ", const wchar_t *" accept ); +.fi +.SH DESCRIPTION +The +.BR wcsspn () +function is the wide-character equivalent of the +.BR strspn (3) +function. +It determines the length of the longest initial segment of +.I wcs +which consists entirely of wide-characters listed in +.IR accept . +In other +words, it searches for the first occurrence in the wide-character string +.I wcs +of a wide-character not contained in the wide-character string +.IR accept . +.SH RETURN VALUE +The +.BR wcsspn () +function returns the number of +wide characters in the longest +initial segment of +.I wcs +which consists entirely of wide-characters listed +in +.IR accept . +In other words, it returns the position of the first +occurrence in the wide-character string +.I wcs +of a wide-character not +contained in the wide-character string +.IR accept , +or +.I wcslen(wcs) +if there is none. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsspn () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strspn (3), +.BR wcscspn (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcsstr.3 b/upstream/opensuse-leap-15-6/man3/wcsstr.3 new file mode 100644 index 00000000..c7f76ec6 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcsstr.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcsstr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcsstr \- locate a substring in a wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcsstr(const wchar_t *" haystack ", const wchar_t *" needle ); +.fi +.SH DESCRIPTION +The +.BR wcsstr () +function is the wide-character equivalent of the +.BR strstr (3) +function. +It searches for the first occurrence of the wide-character string +.I needle +(without its terminating null wide character (L\[aq]\e0\[aq])) +as a substring in the wide-character string +.IR haystack . +.SH RETURN VALUE +The +.BR wcsstr () +function returns a pointer to the first occurrence of +.I needle +in +.IR haystack . +It returns NULL if +.I needle +does not occur +as a substring in +.IR haystack . +.PP +Note the special case: +If +.I needle +is the empty wide-character string, +the return value is always +.I haystack +itself. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcsstr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR strstr (3), +.BR wcschr (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcstoimax.3 b/upstream/opensuse-leap-15-6/man3/wcstoimax.3 new file mode 100644 index 00000000..e3ec3735 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcstoimax.3 @@ -0,0 +1,61 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH wcstoimax 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcstoimax, wcstoumax \- convert wide-character string to integer +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "intmax_t wcstoimax(const wchar_t *restrict " nptr , +.BI " wchar_t **restrict " endptr ", int " base ); +.BI "uintmax_t wcstoumax(const wchar_t *restrict " nptr , +.BI " wchar_t **restrict " endptr ", int " base ); +.fi +.SH DESCRIPTION +These functions are just like +.BR wcstol (3) +and +.BR wcstoul (3), +except that they return a value of type +.I intmax_t +and +.IR uintmax_t , +respectively. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcstoimax (), +.BR wcstoumax () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR imaxabs (3), +.BR imaxdiv (3), +.BR strtoimax (3), +.BR strtoumax (3), +.\" FIXME . the pages referred to by the following xrefs are not yet written +.BR wcstol (3), +.BR wcstoul (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcstok.3 b/upstream/opensuse-leap-15-6/man3/wcstok.3 new file mode 100644 index 00000000..31d1c598 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcstok.3 @@ -0,0 +1,120 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcstok 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcstok \- split wide-character string into tokens +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wcstok(wchar_t *restrict " wcs \ +", const wchar_t *restrict " delim , +.BI " wchar_t **restrict " ptr ); +.fi +.SH DESCRIPTION +The +.BR wcstok () +function is the wide-character equivalent of the +.BR strtok (3) +function, +with an added argument to make it multithread-safe. +It can be used +to split a wide-character string +.I wcs +into tokens, where a token is +defined as a substring not containing any wide-characters from +.IR delim . +.PP +The search starts at +.IR wcs , +if +.I wcs +is not NULL, +or at +.IR *ptr , +if +.I wcs +is NULL. +First, any delimiter wide-characters are skipped, that is, the +pointer is advanced beyond any wide-characters which occur in +.IR delim . +If the end of the wide-character string is now +reached, +.BR wcstok () +returns NULL, to indicate that no tokens +were found, and stores an appropriate value in +.IR *ptr , +so that subsequent calls to +.BR wcstok () +will continue to return NULL. +Otherwise, the +.BR wcstok () +function recognizes the beginning of a token +and returns a pointer to it, but before doing that, it zero-terminates the +token by replacing the next wide-character which occurs in +.I delim +with +a null wide character (L\[aq]\e0\[aq]), +and it updates +.I *ptr +so that subsequent calls will +continue searching after the end of recognized token. +.SH RETURN VALUE +The +.BR wcstok () +function returns a pointer to the next token, +or NULL if no further token was found. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcstok () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The original +.I wcs +wide-character string is destructively modified during +the operation. +.SH EXAMPLES +The following code loops over the tokens contained in a wide-character string. +.PP +.EX +wchar_t *wcs = ...; +wchar_t *token; +wchar_t *state; +for (token = wcstok(wcs, L" \et\en", &state); + token != NULL; + token = wcstok(NULL, L" \et\en", &state)) { + ... +} +.EE +.SH SEE ALSO +.BR strtok (3), +.BR wcschr (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcstombs.3 b/upstream/opensuse-leap-15-6/man3/wcstombs.3 new file mode 100644 index 00000000..6e25fc86 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcstombs.3 @@ -0,0 +1,128 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcstombs 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcstombs \- convert a wide-character string to a multibyte string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "size_t wcstombs(char " dest "[restrict ." n "], \ +const wchar_t *restrict " src , +.BI " size_t " n ); +.fi +.SH DESCRIPTION +If +.I dest +is not NULL, the +.BR wcstombs () +function converts +the wide-character string +.I src +to a multibyte string starting at +.IR dest . +At most +.I n +bytes are written to +.IR dest . +The sequence of characters placed in +.I dest +begins in the initial shift state. +The conversion can stop for three reasons: +.IP \[bu] 3 +A wide character has been encountered that can not be represented as a +multibyte sequence (according to the current locale). +In this case, +.I (size_t)\ \-1 +is returned. +.IP \[bu] +The length limit forces a stop. +In this case, the number of bytes written to +.I dest +is returned, but the shift state at this point is lost. +.IP \[bu] +The wide-character string has been completely converted, including the +terminating null wide character (L\[aq]\e0\[aq]). +In this case, the conversion ends in the initial shift state. +The number of bytes written to +.IR dest , +excluding the terminating null byte (\[aq]\e0\[aq]), is returned. +.PP +The programmer must ensure that there is room for at least +.I n +bytes +at +.IR dest . +.PP +If +.I dest +is NULL, +.I n +is ignored, and the conversion proceeds as +above, except that the converted bytes are not written out to memory, +and no length limit exists. +.PP +In order to avoid the case 2 above, the programmer should make sure +.I n +is greater than or equal to +.IR "wcstombs(NULL,src,0)+1" . +.SH RETURN VALUE +The +.BR wcstombs () +function returns the number of bytes that make up the +converted part of a multibyte sequence, +not including the terminating null byte. +If a wide character was encountered which could not be +converted, +.I (size_t)\ \-1 +is returned. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcstombs () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The function +.BR wcsrtombs (3) +provides a better interface to the same functionality. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wcstombs () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR mblen (3), +.BR mbstowcs (3), +.BR mbtowc (3), +.BR wcsrtombs (3), +.BR wctomb (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcswidth.3 b/upstream/opensuse-leap-15-6/man3/wcswidth.3 new file mode 100644 index 00000000..7c91d540 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcswidth.3 @@ -0,0 +1,76 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcswidth 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcswidth \- determine columns needed for a fixed-size wide-character string +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int wcswidth(const wchar_t *" s ", size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wcswidth () +function returns the +number of columns needed to represent +the wide-character string pointed to by +.IR s , +but at most +.I n +wide +characters. +If a nonprintable wide character occurs among these characters, +\-1 is returned. +.SH RETURN VALUE +The +.BR wcswidth () +function +returns the number of column positions for the +wide-character string +.IR s , +truncated to at most length +.IR n . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcswidth () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH NOTES +The behavior of +.BR wcswidth () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iswprint (3), +.BR wcwidth (3) diff --git a/upstream/opensuse-leap-15-6/man3/wctob.3 b/upstream/opensuse-leap-15-6/man3/wctob.3 new file mode 100644 index 00000000..bf687800 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wctob.3 @@ -0,0 +1,89 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wctob 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wctob \- try to represent a wide character as a single byte +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wctob(wint_t " c ); +.fi +.SH DESCRIPTION +The +.BR wctob () +function tests whether +the multibyte representation of the +wide character +.IR c , +starting in the initial state, consists of a single +byte. +If so, it is returned as an +.IR "unsigned char" . +.PP +Never use this function. +It cannot help you in writing internationalized +programs. +Internationalized programs must never distinguish single-byte and +multibyte characters. +.SH RETURN VALUE +The +.BR wctob () +function returns the single-byte representation of +.IR c , +if it exists, or +.B EOF +otherwise. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wctob () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wctob () +depends on the +.B LC_CTYPE +category of the +current locale. +.PP +This function should never be used. +Internationalized programs must never +distinguish single-byte and multibyte characters. +Use either +.BR wctomb (3) +or the thread-safe +.BR wcrtomb (3) +instead. +.SH SEE ALSO +.BR btowc (3), +.BR wcrtomb (3), +.BR wctomb (3) diff --git a/upstream/opensuse-leap-15-6/man3/wctomb.3 b/upstream/opensuse-leap-15-6/man3/wctomb.3 new file mode 100644 index 00000000..c90fc484 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wctomb.3 @@ -0,0 +1,122 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wctomb 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wctomb \- convert a wide character to a multibyte sequence +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wctomb(char *" s ", wchar_t " wc ); +.fi +.SH DESCRIPTION +If +.I s +is not NULL, +the +.BR wctomb () +function converts the wide character +.I wc +to its multibyte representation and stores it at the beginning of +the character array pointed to by +.IR s . +It updates the shift state, which +is stored in a static anonymous variable +known only to the +.BR wctomb () +function, +and returns the length of said multibyte representation, +that is, the number of +bytes written at +.IR s . +.PP +The programmer must ensure that there is +room for at least +.B MB_CUR_MAX +bytes at +.IR s . +.PP +If +.I s +is NULL, the +.BR wctomb () +function +.\" The Dinkumware doc and the Single UNIX specification say this, but +.\" glibc doesn't implement this. +resets the shift state, known only to this function, +to the initial state, and +returns nonzero if the encoding has nontrivial shift state, +or zero if the encoding is stateless. +.SH RETURN VALUE +If +.I s +is not NULL, the +.BR wctomb () +function +returns the number of bytes +that have been written to the byte array at +.IR s . +If +.I wc +can not be +represented as a multibyte sequence (according +to the current locale), \-1 is returned. +.PP +If +.I s +is NULL, the +.BR wctomb () +function returns nonzero if the +encoding has nontrivial shift state, or zero if the encoding is stateless. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wctomb () +T} Thread safety MT-Unsafe race +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +The function +.BR wcrtomb (3) +provides +a better interface to the same functionality. +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wctomb () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR MB_CUR_MAX (3), +.BR mblen (3), +.BR mbstowcs (3), +.BR mbtowc (3), +.BR wcrtomb (3), +.BR wcstombs (3) diff --git a/upstream/opensuse-leap-15-6/man3/wctrans.3 b/upstream/opensuse-leap-15-6/man3/wctrans.3 new file mode 100644 index 00000000..153f73bc --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wctrans.3 @@ -0,0 +1,91 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wctrans 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wctrans \- wide-character translation mapping +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wctrans_t wctrans(const char *" name ); +.fi +.SH DESCRIPTION +The +.I wctrans_t +type represents a mapping +which can map a wide character to +another wide character. +Its nature is implementation-dependent, but the special +value +.I (wctrans_t)\ 0 +denotes an invalid mapping. +Nonzero +.I wctrans_t +values can be passed to the +.BR towctrans (3) +function to actually perform +the wide-character mapping. +.PP +The +.BR wctrans () +function returns a mapping, given by its name. +The set of +valid names depends on the +.B LC_CTYPE +category of the current locale, but the +following names are valid in all locales. +.PP +.nf + "tolower" \- realizes the \fBtolower\fP(3) mapping + "toupper" \- realizes the \fBtoupper\fP(3) mapping +.fi +.SH RETURN VALUE +The +.BR wctrans () +function returns a mapping descriptor if the +.I name +is valid. +Otherwise, it returns +.IR "(wctrans_t)\ 0" . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wctrans () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wctrans () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR towctrans (3) diff --git a/upstream/opensuse-leap-15-6/man3/wctype.3 b/upstream/opensuse-leap-15-6/man3/wctype.3 new file mode 100644 index 00000000..ba46a4e2 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wctype.3 @@ -0,0 +1,103 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wctype 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wctype \- wide-character classification +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wctype_t wctype(const char *" name ); +.fi +.SH DESCRIPTION +The +.I wctype_t +type represents a property which a wide character may or +may not have. +In other words, it represents a class of wide characters. +This type's nature is implementation-dependent, but the special value +.I "(wctype_t) 0" +denotes an invalid property. +Nonzero +.I wctype_t +values +can be passed to the +.BR iswctype (3) +function +to actually test whether a given +wide character has the property. +.PP +The +.BR wctype () +function returns a property, given by its name. +The set of +valid names depends on the +.B LC_CTYPE +category of the current locale, but the +following names are valid in all locales. +.PP +.nf + "alnum" \- realizes the \fBisalnum\fP(3) classification function + "alpha" \- realizes the \fBisalpha\fP(3) classification function + "blank" \- realizes the \fBisblank\fP(3) classification function + "cntrl" \- realizes the \fBiscntrl\fP(3) classification function + "digit" \- realizes the \fBisdigit\fP(3) classification function + "graph" \- realizes the \fBisgraph\fP(3) classification function + "lower" \- realizes the \fBislower\fP(3) classification function + "print" \- realizes the \fBisprint\fP(3) classification function + "punct" \- realizes the \fBispunct\fP(3) classification function + "space" \- realizes the \fBisspace\fP(3) classification function + "upper" \- realizes the \fBisupper\fP(3) classification function + "xdigit" \- realizes the \fBisxdigit\fP(3) classification function +.fi +.SH RETURN VALUE +The +.BR wctype () +function returns a property descriptor +if the +.I name +is valid. +Otherwise, it returns +.IR "(wctype_t) 0" . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wctype () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wctype () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iswctype (3) diff --git a/upstream/opensuse-leap-15-6/man3/wcwidth.3 b/upstream/opensuse-leap-15-6/man3/wcwidth.3 new file mode 100644 index 00000000..db68dd54 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wcwidth.3 @@ -0,0 +1,80 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wcwidth 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wcwidth \- determine columns needed for a wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */" +.B #include +.PP +.BI "int wcwidth(wchar_t " c ); +.fi +.SH DESCRIPTION +The +.BR wcwidth () +function returns the number of columns +needed to represent the wide character +.IR c . +If +.I c +is a printable wide character, the value +is at least 0. +If +.I c +is null wide character (L\[aq]\e0\[aq]), the value is 0. +Otherwise, \-1 is returned. +.SH RETURN VALUE +The +.BR wcwidth () +function returns the number of +column positions for +.IR c . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wcwidth () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.PP +Note that before glibc 2.2.5, glibc used the prototype +.PP +.nf +.BI "int wcwidth(wint_t " c ); +.fi +.SH NOTES +The behavior of +.BR wcwidth () +depends on the +.B LC_CTYPE +category of the +current locale. +.SH SEE ALSO +.BR iswprint (3), +.BR wcswidth (3) diff --git a/upstream/opensuse-leap-15-6/man3/win.3form b/upstream/opensuse-leap-15-6/man3/win.3form new file mode 100644 index 00000000..9a91c11d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/win.3form @@ -0,0 +1,91 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: form_win.3x,v 1.13 2010/12/04 18:38:55 tom Exp $ +.TH win 3FORM "" +.SH NAME +\fBform_win\fR \- make and break form window and subwindow associations +.SH SYNOPSIS +\fB#include \fR +.br +int set_form_win(FORM *form, WINDOW *win); +.br +WINDOW *form_win(const FORM *form); +.br +int set_form_sub(FORM *form, WINDOW *sub); +.br +WINDOW *form_sub(const FORM *form); +.br +int scale_form(const FORM *form, int *rows, int *columns); +.br +.SH DESCRIPTION +Every form has an associated pair of \fBcurses\fR windows. The form window +displays any title and border associated with the window; the form subwindow +displays the items of the form that are currently available for selection. +.PP +The first four functions get and set those windows. It is not necessary to set +either window; by default, the driver code uses \fBstdscr\fR for both. +.PP +In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though +it were \fBstsdcr\fR. A form argument of \fBNULL\fR is treated as a request +to change the system default form window or subwindow. +.PP +The function \fBscale_form\fR returns the minimum size required for the +subwindow of \fIform\fR. +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The form has already been posted. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the form. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBform\fR(3FORM). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V forms library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/win.3menu b/upstream/opensuse-leap-15-6/man3/win.3menu new file mode 100644 index 00000000..f9655c27 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/win.3menu @@ -0,0 +1,91 @@ +'\" t +.\"*************************************************************************** +.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: menu_win.3x,v 1.11 2010/12/04 18:38:55 tom Exp $ +.TH win 3MENU "" +.SH NAME +\fBmenu_win\fR \- make and break menu window and subwindow associations +.SH SYNOPSIS +\fB#include \fR +.br +int set_menu_win(MENU *menu, WINDOW *win); +.br +WINDOW *menu_win(const MENU *menu); +.br +int set_menu_sub(MENU *menu, WINDOW *sub); +.br +WINDOW *menu_sub(const MENU *menu); +.br +int scale_menu(const MENU *menu, int *rows, int *columns); +.br +.SH DESCRIPTION +Every menu has an associated pair of \fBcurses\fR windows. The menu window +displays any title and border associated with the window; the menu subwindow +displays the items of the menu that are currently available for selection. +.PP +The first four functions get and set those windows. It is not necessary to set +either window; by default, the driver code uses \fBstdscr\fR for both. +.PP +In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though +it were \fBstsdcr\fR. A menu argument of \fBNULL\fR is treated as a request +to change the system default menu window or subwindow. +.PP +The function \fBscale_menu\fR returns the minimum size required for the +subwindow of \fImenu\fR. +.SH RETURN VALUE +Routines that return pointers return \fBNULL\fR on error. Routines that return +an integer return one of the following error codes: +.TP 5 +.B E_OK +The routine succeeded. +.TP 5 +.B E_SYSTEM_ERROR +System error occurred (see \fBerrno\fR). +.TP 5 +.B E_BAD_ARGUMENT +Routine detected an incorrect or out-of-range argument. +.TP 5 +.B E_POSTED +The menu has already been posted. +.TP 5 +.B E_NOT_CONNECTED +No items are connected to the menu. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES), +\fBmenu\fR(3MENU). +.SH NOTES +The header file \fB\fR automatically includes the header file +\fB\fR. +.SH PORTABILITY +These routines emulate the System V menu library. They were not supported on +Version 7 or BSD versions. +.SH AUTHORS +Juergen Pfeifer. Manual pages and adaptation for new curses by Eric +S. Raymond. diff --git a/upstream/opensuse-leap-15-6/man3/window.3ncurses b/upstream/opensuse-leap-15-6/man3/window.3ncurses new file mode 100644 index 00000000..631dc5c4 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/window.3ncurses @@ -0,0 +1,235 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" $Id: curs_window.3x,v 1.20 2016/10/15 17:26:09 tom Exp $ +.TH window 3NCURSES "" +.na +.hy 0 +.SH NAME +\fBnewwin\fR, +\fBdelwin\fR, +\fBmvwin\fR, +\fBsubwin\fR, +\fBderwin\fR, +\fBmvderwin\fR, +\fBdupwin\fR, +\fBwsyncup\fR, +\fBsyncok\fR, +\fBwcursyncup\fR, +\fBwsyncdown\fR \- create \fBcurses\fR windows +.ad +.hy +.SH SYNOPSIS +\fB#include \fR +.sp +\fBWINDOW *newwin(\fR + \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fR + \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fR +.br +\fBint delwin(WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBint mvwin(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR +.br +\fBWINDOW *subwin(WINDOW *\fP\fIorig\fP\fB,\fR + \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fR + \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fR +.br +\fBWINDOW *derwin(WINDOW *\fP\fIorig\fP\fB,\fR + \fBint \fP\fInlines\fP\fB, int \fP\fIncols\fP\fB,\fR + \fBint \fP\fIbegin_y\fP\fB, int \fP\fIbegin_x\fP\fB);\fR +.br +\fBint mvderwin(WINDOW *\fP\fIwin\fP\fB, int \fP\fIpar_y\fP\fB, int \fP\fIpar_x\fP\fB);\fR +.br +\fBWINDOW *dupwin(WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBvoid wsyncup(WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBint syncok(WINDOW *\fP\fIwin\fP\fB, bool \fP\fIbf\fP\fB);\fR +.br +\fBvoid wcursyncup(WINDOW *\fP\fIwin\fP\fB);\fR +.br +\fBvoid wsyncdown(WINDOW *\fP\fIwin\fP\fB);\fR +.br +.SH DESCRIPTION +.SS newwin +Calling \fBnewwin\fR creates and returns a pointer to a new window with the +given number of lines and columns. +The upper left-hand corner of the window is +at +.RS +line \fIbegin\fR_\fIy\fR, +.br +column \fIbegin\fR_\fIx\fR +.RE +.PP +If either +\fInlines\fR or \fIncols\fR is zero, they default to +.RS +\fBLINES \-\fR \fIbegin\fR_\fIy\fR and +.br +\fBCOLS \-\fR \fIbegin\fR_\fIx\fR. +.RE +.PP +A new full-screen window is created by calling \fBnewwin(0,0,0,0)\fR. +.SS delwin +.PP +Calling \fBdelwin\fR deletes the named window, freeing all memory +associated with it (it does not actually erase the window's screen +image). +Subwindows must be deleted before the main window can be deleted. +.SS mvwin +.PP +Calling \fBmvwin\fR moves the window so that the upper left-hand +corner is at position (\fIx\fR, \fIy\fR). +If the move would cause the window to be off the screen, +it is an error and the window is not moved. +Moving subwindows is allowed, but should be avoided. +.SS subwin +.PP +Calling \fBsubwin\fR creates and returns a pointer to a new window +with the given number of lines, \fInlines\fR, and columns, \fIncols\fR. +The window is at position (\fIbegin\fR_\fIy\fR, +\fIbegin\fR_\fIx\fR) on the screen. +The subwindow shares memory with the window \fIorig\fR, +so that changes made to one window +will affect both windows. +When using this routine, it is necessary to call +\fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before calling +\fBwrefresh\fR on the subwindow. +.SS derwin +.PP +Calling \fBderwin\fR is the same as calling \fBsubwin,\fR except that +\fIbegin\fR_\fIy\fR and \fIbegin\fR_\fIx\fR are relative to the origin +of the window \fIorig\fR rather than the screen. +There is no difference between the subwindows and the derived windows. +.PP +Calling \fBmvderwin\fR moves a derived window (or subwindow) +inside its parent window. +The screen-relative parameters of the window are not changed. +This routine is used to display different +parts of the parent window at the same physical position on the +screen. +.SS dupwin +.PP +Calling \fBdupwin\fR creates an exact duplicate of the window \fIwin\fR. +.SS wsyncup +.PP +Calling \fBwsyncup\fR touches all locations in ancestors of \fIwin\fR that are +changed in \fIwin\fR. +If \fBsyncok\fR is called with second argument +\fBTRUE\fR then \fBwsyncup\fR is called automatically whenever there is a +change in the window. +.SS wsyncdown +.PP +The \fBwsyncdown\fR routine touches each location in \fIwin\fR that has been +touched in any of its ancestor windows. +This routine is called by +\fBwrefresh\fR, so it should almost never be necessary to call it manually. +.SS wcursyncup +.PP +The routine \fBwcursyncup\fR updates the current cursor position of all the +ancestors of the window to reflect the current cursor position of the +window. +.SH RETURN VALUE +Routines that return an integer return the integer \fBERR\fR upon failure and +\fBOK\fR (SVr4 only specifies "an integer value other than \fBERR\fR") upon +successful completion. +.PP +Routines that return pointers return \fBNULL\fR on error. +.PP +X/Open defines no error conditions. +In this implementation +.TP 5 +\fBdelwin\fR +returns an error if the window pointer is null, or +if the window is the parent of another window. +.TP 5 +\fBderwin\fP +returns an error if the parent window pointer is null, or +if any of its ordinates or dimensions is negative, or +if the resulting window does not fit inside the parent window. +.TP 5 +\fBdupwin\fP +returns an error if the window pointer is null. +.IP +This implementation also maintains a list of windows, +and checks that the pointer passed to \fBdelwin\fP is one that +it created, returning an error if it was not.. +.TP 5 +\fBmvderwin\fP +returns an error +if the window pointer is null, or +if some part of the window would be placed off-screen. +.TP 5 +\fBmvwin\fP +returns an error +if the window pointer is null, or +if the window is really a pad, or +if some part of the window would be placed off-screen. +.TP 5 +\fBnewwin\fP +will fail if either of its beginning ordinates is negative, or +if either the number of lines or columns is negative. +.TP 5 +\fBsyncok\fP +returns an error +if the window pointer is null. +.TP 5 +\fBsubwin\fP +returns an error if the parent window pointer is null, or +if any of its ordinates or dimensions is negative, or +if the resulting window does not fit inside the parent window. +.PP +The functions which return a window pointer +may also fail if there is insufficient memory for its data structures. +Any of these functions will fail if the screen has not been initialized, +i.e., with \fBinitscr\fP or \fBnewterm\fP. +.SH NOTES +If many small changes are made to the window, the \fBwsyncup\fR option could +degrade performance. +.PP +Note that \fBsyncok\fR may be a macro. +.SH BUGS +The subwindow functions (\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, +\fBwsyncup\fR, \fBwsyncdown\fR, \fBwcursyncup\fR, \fBsyncok\fR) are flaky, +incompletely implemented, and not well tested. +.PP +The System V curses documentation is very unclear about what \fBwsyncup\fR +and \fBwsyncdown\fR actually do. +It seems to imply that they are only +supposed to touch exactly those lines that are affected by ancestor changes. +The language here, and the behavior of the \fBcurses\fR implementation, +is patterned on the XPG4 curses standard. +The weaker XPG4 spec may result in slower updates. +.SH PORTABILITY +The XSI Curses standard, Issue 4 describes these functions. +.SH SEE ALSO +\fBncurses\fR(3NCURSES), +\fBrefresh\fR(3NCURSES), +\fBtouch\fR(3NCURSES), +\fBcurses_variables\fR(3NCURSES) diff --git a/upstream/opensuse-leap-15-6/man3/wmemchr.3 b/upstream/opensuse-leap-15-6/man3/wmemchr.3 new file mode 100644 index 00000000..978760f8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wmemchr.3 @@ -0,0 +1,73 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wmemchr 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wmemchr \- search a wide character in a wide-character array +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wmemchr(const wchar_t " s [. n "], wchar_t " c ", size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wmemchr () +function is the wide-character equivalent of the +.BR memchr (3) +function. +It searches the +.I n +wide characters starting at +.I s +for +the first occurrence of the wide character +.IR c . +.SH RETURN VALUE +The +.BR wmemchr () +function returns a pointer to the first occurrence of +.I c +among the +.I n +wide characters starting at +.IR s , +or NULL if +.I c +does +not occur among these. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wmemchr () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR memchr (3), +.BR wcschr (3) diff --git a/upstream/opensuse-leap-15-6/man3/wmemcmp.3 b/upstream/opensuse-leap-15-6/man3/wmemcmp.3 new file mode 100644 index 00000000..9b9195d0 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wmemcmp.3 @@ -0,0 +1,93 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wmemcmp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wmemcmp \- compare two arrays of wide-characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int wmemcmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wmemcmp () +function is the wide-character equivalent of the +.BR memcmp (3) +function. +It compares the +.I n +wide-characters starting at +.I s1 +and the +.I n +wide-characters starting at +.IR s2 . +.SH RETURN VALUE +The +.BR wmemcmp () +function returns +zero if the wide-character arrays of size +.I n +at +.I s1 +and +.I s2 +are equal. +It returns an integer greater than +zero if at the first differing position +.I i +.RI ( i " <" +.IR n ), +the +corresponding wide-character +.I s1[i] +is greater than +.IR s2[i] . +It returns an integer less than zero if +at the first differing position +.I i +.RI ( i +< +.IR n ), +the corresponding +wide-character +.I s1[i] +is less than +.IR s2[i] . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wmemcmp () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR memcmp (3), +.BR wcscmp (3) diff --git a/upstream/opensuse-leap-15-6/man3/wmemcpy.3 b/upstream/opensuse-leap-15-6/man3/wmemcpy.3 new file mode 100644 index 00000000..721ed888 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wmemcpy.3 @@ -0,0 +1,78 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wmemcpy 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wmemcpy \- copy an array of wide-characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wmemcpy(wchar_t " dest "[restrict ." n ], +.BI " const wchar_t " src "[restrict ." n ], +.BI " size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wmemcpy () +function is the wide-character equivalent of the +.BR memcpy (3) +function. +It copies +.I n +wide characters from the array starting at +.I src +to the array starting at +.IR dest . +.PP +The arrays may not overlap; use +.BR wmemmove (3) +to copy between overlapping +arrays. +.PP +The programmer must ensure that there is room for at least +.I n +wide +characters at +.IR dest . +.SH RETURN VALUE +.BR wmemcpy () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wmemcpy () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR memcpy (3), +.BR wcscpy (3), +.BR wmemmove (3), +.BR wmempcpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wmemmove.3 b/upstream/opensuse-leap-15-6/man3/wmemmove.3 new file mode 100644 index 00000000..dc637a41 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wmemmove.3 @@ -0,0 +1,73 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wmemmove 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wmemmove \- copy an array of wide-characters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wmemmove(wchar_t " dest [. n "], const wchar_t " src [. n "], \ +size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wmemmove () +function is the wide-character equivalent of the +.BR memmove (3) +function. +It copies +.I n +wide characters from the array +starting at +.I src +to the array starting at +.IR dest . +The arrays may +overlap. +.PP +The programmer must ensure that there is room for at least +.I n +wide +characters at +.IR dest . +.SH RETURN VALUE +.BR wmemmove () +returns +.IR dest . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wmemmove () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR memmove (3), +.BR wmemcpy (3) diff --git a/upstream/opensuse-leap-15-6/man3/wmemset.3 b/upstream/opensuse-leap-15-6/man3/wmemset.3 new file mode 100644 index 00000000..4ca1d444 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wmemset.3 @@ -0,0 +1,64 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wmemset 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wmemset \- fill an array of wide-characters with a constant wide character +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "wchar_t *wmemset(wchar_t " wcs [. n "], wchar_t " wc ", size_t " n ); +.fi +.SH DESCRIPTION +The +.BR wmemset () +function is the wide-character equivalent of the +.BR memset (3) +function. +It fills the array of +.I n +wide-characters starting at +.I wcs +with +.I n +copies of the wide character +.IR wc . +.SH RETURN VALUE +.BR wmemset () +returns +.IR wcs . +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wmemset () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH SEE ALSO +.BR memset (3) diff --git a/upstream/opensuse-leap-15-6/man3/wordexp.3 b/upstream/opensuse-leap-15-6/man3/wordexp.3 new file mode 100644 index 00000000..dea0338d --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wordexp.3 @@ -0,0 +1,243 @@ +'\" t +.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.TH wordexp 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wordexp, wordfree \- perform word expansion like a posix-shell +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "int wordexp(const char *restrict " s ", wordexp_t *restrict " p \ +", int " flags ); +.BI "void wordfree(wordexp_t *" p ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR wordexp (), +.BR wordfree (): +.nf + _XOPEN_SOURCE +.fi +.SH DESCRIPTION +The function +.BR wordexp () +performs a shell-like expansion of the string +.I s +and returns the result in the structure pointed to by +.IR p . +The data type +.I wordexp_t +is a structure that at least has the fields +.IR we_wordc , +.IR we_wordv , +and +.IR we_offs . +The field +.I we_wordc +is a +.I size_t +that gives the number of words in the expansion of +.IR s . +The field +.I we_wordv +is a +.I "char\ **" +that points to the array of words found. +The field +.I we_offs +of type +.I size_t +is sometimes (depending on +.IR flags , +see below) used to indicate the number of initial elements in the +.I we_wordv +array that should be filled with NULLs. +.PP +The function +.BR wordfree () +frees the allocated memory again. +More precisely, it does not free +its argument, but it frees the array +.I we_wordv +and the strings that points to. +.SS The string argument +Since the expansion is the same as the expansion by the shell (see +.BR sh (1)) +of the parameters to a command, the string +.I s +must not contain characters that would be illegal in shell command +parameters. +In particular, there must not be any unescaped +newline or |, &, ;, <, >, (, ), {, } characters +outside a command substitution or parameter substitution context. +.PP +If the argument +.I s +contains a word that starts with an unquoted comment character #, +then it is unspecified whether that word and all following words +are ignored, or the # is treated as a non-comment character. +.SS The expansion +The expansion done consists of the following stages: +tilde expansion (replacing \[ti]user 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 +The result of expansion of special parameters +($@, $*, $#, $?, $\-, $$, $!, $0) is unspecified. +.PP +Field splitting is done using the environment variable $IFS. +If it is not set, the field separators are space, tab, and newline. +.SS The output array +The array +.I we_wordv +contains the words found, followed by a NULL. +.SS The flags argument +The +.I flag +argument is a bitwise inclusive OR of the following values: +.TP +.B WRDE_APPEND +Append the words found to the array resulting from a previous call. +.TP +.B WRDE_DOOFFS +Insert +.I we_offs +initial NULLs in the array +.IR we_wordv . +(These are not counted in the returned +.IR we_wordc .) +.TP +.B WRDE_NOCMD +Don't do command substitution. +.TP +.B WRDE_REUSE +The argument +.I p +resulted from a previous call to +.BR wordexp (), +and +.BR wordfree () +was not called. +Reuse the allocated storage. +.TP +.B WRDE_SHOWERR +Normally during command substitution +.I stderr +is redirected to +.IR /dev/null . +This flag specifies that +.I stderr +is not to be redirected. +.TP +.B WRDE_UNDEF +Consider it an error if an undefined shell variable is expanded. +.SH RETURN VALUE +On success, +.BR wordexp () +returns 0. +On failure, +.BR wordexp () +returns one of the following nonzero values: +.TP +.B WRDE_BADCHAR +Illegal occurrence of newline or one of |, &, ;, <, >, (, ), {, }. +.TP +.B WRDE_BADVAL +An undefined shell variable was referenced, and the +.B WRDE_UNDEF +flag +told us to consider this an error. +.TP +.B WRDE_CMDSUB +Command substitution requested, but the +.B WRDE_NOCMD +flag told us to consider this an error. +.TP +.B WRDE_NOSPACE +Out of memory. +.TP +.B WRDE_SYNTAX +Shell syntax error, such as unbalanced parentheses or +unmatched quotes. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lb lb lbx +l l l. +Interface Attribute Value +T{ +.BR wordexp () +T} Thread safety T{ +MT-Unsafe race:utent const:env +env sig:ALRM timer locale +T} +T{ +.BR wordfree () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +In the above table, +.I utent +in +.I race:utent +signifies that if any of the functions +.BR setutent (3), +.BR getutent (3), +or +.BR endutent (3) +are used in parallel in different threads of a program, +then data races could occur. +.BR wordexp () +calls those functions, +so we use race:utent to remind users. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +glibc 2.1. +.SH EXAMPLES +The output of the following example program +is approximately that of "ls [a-c]*.c". +.PP +.\" SRC BEGIN (wordexp.c) +.EX +#include +#include +#include + +int +main(void) +{ + wordexp_t p; + char **w; + + wordexp("[a\-c]*.c", &p, 0); + w = p.we_wordv; + for (size_t i = 0; i < p.we_wordc; i++) + printf("%s\en", w[i]); + wordfree(&p); + exit(EXIT_SUCCESS); +} +.EE +.\" SRC END +.SH SEE ALSO +.BR fnmatch (3), +.BR glob (3) diff --git a/upstream/opensuse-leap-15-6/man3/wprintf.3 b/upstream/opensuse-leap-15-6/man3/wprintf.3 new file mode 100644 index 00000000..eee7a104 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wprintf.3 @@ -0,0 +1,276 @@ +'\" t +.\" Copyright (c) Bruno Haible +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 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 +.\" +.TH wprintf 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- formatted +wide-character output conversion +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include +.B #include +.PP +.BI "int wprintf(const wchar_t *restrict " format ", ...);" +.BI "int fwprintf(FILE *restrict " stream , +.BI " const wchar_t *restrict " format ", ...);" +.BI "int swprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen , +.BI " const wchar_t *restrict " format ", ...);" +.PP +.BI "int vwprintf(const wchar_t *restrict " format ", va_list " args ); +.BI "int vfwprintf(FILE *restrict " stream , +.BI " const wchar_t *restrict " format ", va_list " args ); +.BI "int vswprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen , +.BI " const wchar_t *restrict " format ", va_list " args ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +All functions shown above: +.\" .BR wprintf (), +.\" .BR fwprintf (), +.\" .BR swprintf (), +.\" .BR vwprintf (), +.\" .BR vfwprintf (), +.\" .BR vswprintf (): +.nf + _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE + || _POSIX_C_SOURCE >= 200112L +.fi +.SH DESCRIPTION +The +.BR wprintf () +family of functions is +the wide-character equivalent of the +.BR printf (3) +family of functions. +It performs formatted output of wide +characters. +.PP +The +.BR wprintf () +and +.BR vwprintf () +functions +perform wide-character output to +.IR stdout . +.I stdout +must not be byte oriented; see +.BR fwide (3) +for more information. +.PP +The +.BR fwprintf () +and +.BR vfwprintf () +functions +perform wide-character output to +.IR stream . +.I stream +must not be byte oriented; see +.BR fwide (3) +for more information. +.PP +The +.BR swprintf () +and +.BR vswprintf () +functions +perform wide-character output +to an array of wide characters. +The programmer must ensure that there is +room for at least +.I maxlen +wide +characters at +.IR wcs . +.PP +These functions are like +the +.BR printf (3), +.BR vprintf (3), +.BR fprintf (3), +.BR vfprintf (3), +.BR sprintf (3), +.BR vsprintf (3) +functions except for the +following differences: +.TP +.B \[bu] +The +.I format +string is a wide-character string. +.TP +.B \[bu] +The output consists of wide characters, not bytes. +.TP +.B \[bu] +.BR swprintf () +and +.BR vswprintf () +take a +.I maxlen +argument, +.BR sprintf (3) +and +.BR vsprintf (3) +do not. +.RB ( snprintf (3) +and +.BR vsnprintf (3) +take a +.I maxlen +argument, but these functions do not return \-1 upon +buffer overflow on Linux.) +.PP +The treatment of the conversion characters +.B c +and +.B s +is different: +.TP +.B c +If no +.B l +modifier is present, the +.I int +argument is converted to a wide character by a call to the +.BR btowc (3) +function, and the resulting wide character is written. +If an +.B l +modifier is present, the +.I wint_t +(wide character) argument is written. +.TP +.B s +If no +.B l +modifier is present: the +.I "const\ char\ *" +argument is expected to be a pointer to an array of character type +(pointer to a string) containing a multibyte character sequence beginning +in the initial shift state. +Characters from the array are converted to +wide characters (each by a call to the +.BR mbrtowc (3) +function with a conversion state starting in the initial state before +the first byte). +The resulting wide characters are written up to +(but not including) the terminating null wide character (L\[aq]\e0\[aq]). +If a precision is +specified, no more wide characters than the number specified are written. +Note that the precision determines the number of +.I wide characters +written, not the number of +.I bytes +or +.IR "screen positions" . +The array must contain a terminating null byte (\[aq]\e0\[aq]), +unless a precision is given +and it is so small that the number of converted wide characters reaches it +before the end of the array is reached. +If an +.B l +modifier is present: the +.I "const\ wchar_t\ *" +argument is expected to be a pointer to an array of wide characters. +Wide characters from the array are written up to (but not including) a +terminating null wide character. +If a precision is specified, no more than +the number specified are written. +The array must contain a terminating null +wide character, unless a precision is given and it is smaller than or equal +to the number of wide characters in the array. +.SH RETURN VALUE +The functions return the number of wide characters written, excluding the +terminating null wide character in +case of the functions +.BR swprintf () +and +.BR vswprintf (). +They return \-1 when an error occurs. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR wprintf (), +.BR fwprintf (), +.BR swprintf (), +.BR vwprintf (), +.BR vfwprintf (), +.BR vswprintf () +T} Thread safety MT-Safe locale +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +C11, POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, C99. +.SH NOTES +The behavior of +.BR wprintf () +et al. depends +on the +.B LC_CTYPE +category of the +current locale. +.PP +If the +.I format +string contains non-ASCII wide characters, the program +will work correctly only if the +.B LC_CTYPE +category of the current locale at +run time is the same as the +.B LC_CTYPE +category of the current locale at +compile time. +This is because the +.I wchar_t +representation is platform- and locale-dependent. +(The glibc represents +wide characters using their Unicode (ISO/IEC 10646) code point, but other +platforms don't do this. +Also, the use of C99 universal character names +of the form \eunnnn does not solve this problem.) +Therefore, in +internationalized programs, the +.I format +string should consist of ASCII +wide characters only, or should be constructed at run time in an +internationalized way (e.g., using +.BR gettext (3) +or +.BR iconv (3), +followed by +.BR mbstowcs (3)). +.SH SEE ALSO +.BR fprintf (3), +.BR fputwc (3), +.BR fwide (3), +.BR printf (3), +.BR snprintf (3) +.\" .BR wscanf (3) diff --git a/upstream/opensuse-leap-15-6/man3/wresize.3ncurses b/upstream/opensuse-leap-15-6/man3/wresize.3ncurses new file mode 100644 index 00000000..39ee6d27 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/wresize.3ncurses @@ -0,0 +1,65 @@ +.\"*************************************************************************** +.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" * +.\" 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, distribute with modifications, 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 ABOVE 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. * +.\" * +.\" Except as contained in this notice, the name(s) of the above copyright * +.\" holders shall not be used in advertising or otherwise to promote the * +.\" sale, use or other dealings in this Software without prior written * +.\" authorization. * +.\"*************************************************************************** +.\" +.\" Author: Thomas E. Dickey 1996 +.\" +.\" $Id: wresize.3x,v 1.14 2015/09/26 19:57:24 tom Exp $ +.TH wresize 3NCURSES "" +.SH NAME +\fBwresize\fR \- resize a curses window +.SH SYNOPSIS +\fB#include \fR +.sp +\fBint wresize(WINDOW *win, int lines, int columns);\fR +.SH DESCRIPTION +This is an extension to the curses library. +It reallocates storage for an \fBncurses\fR +window to adjust its dimensions to the specified values. +If either dimension is larger than the current values, the +window's data is filled with blanks that have the current background rendition +(as set by \fBwbkgdset\fR) merged into them. +.SH RETURN VALUE +The function returns the integer \fBERR\fR upon failure and \fBOK\fR on success. +It will fail if either of the dimensions less than or equal to zero, +or if an error occurs while (re)allocating memory for the window. +.SH NOTES +The only restriction placed on the dimensions is that they be greater than zero. +The dimensions are not compared to \fBcurses\fR screen dimensions to +simplify the logic of \fBresizeterm\fR. +The caller must ensure that the window's dimensions fit within the +actual screen dimensions. +.SH PORTABILITY +.PP +It is not possible to resize windows with SVr4 curses. +.PP +This extension of ncurses was introduced in mid-1995. +It was adopted in NetBSD curses (2001) and PDCurses (2003). +.SH SEE ALSO +\fBresizeterm\fR(3NCURSES). +.SH AUTHOR +Thomas Dickey (from an equivalent function written in 1988 for BSD curses). diff --git a/upstream/opensuse-leap-15-6/man3/xcrypt.3 b/upstream/opensuse-leap-15-6/man3/xcrypt.3 new file mode 100644 index 00000000..589bdebd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/xcrypt.3 @@ -0,0 +1,98 @@ +'\" t +.\" Copyright 2003 walter harms (walter.harms@informatik.uni-oldenburg.de) +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.\" 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 :( +.\" +.TH XCRYPT 3 2023-03-17 "Linux man-pages 6.04" +.SH NAME +xencrypt, xdecrypt, passwd2des \- RFS password encryption +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B "#include " +.PP +.BI "void passwd2des(char " *passwd ", char *" key ");" +.PP +.BI "int xencrypt(char *" secret ", char *" passwd ");" +.BI "int xdecrypt(char *" secret ", char *" passwd ");" +.fi +.SH DESCRIPTION +.BR WARNING : +Do not use these functions in new code. +They do not achieve any type of acceptable cryptographic security guarantees. +.PP +The function +.BR passwd2des () +takes a character string +.I passwd +of arbitrary length and fills a character array +.I key +of length 8. +The array +.I key +is suitable for use as DES key. +It has odd parity set in bit 0 of each byte. +Both other functions described here use this function to turn their +argument +.I passwd +into a DES key. +.PP +The +.BR xencrypt () +function takes the ASCII character string +.I secret +given in hex, +.\" (over the alphabet 0123456789abcdefABCDEF), +which must have a length that is a multiple of 16, +encrypts it using the DES key derived from +.I passwd +by +.BR passwd2des (), +and outputs the result again in +.I secret +as a hex string +.\" (over the alphabet 0123456789abcdef) +of the same length. +.PP +The +.BR xdecrypt () +function performs the converse operation. +.SH RETURN VALUE +The functions +.BR xencrypt () +and +.BR xdecrypt () +return 1 on success and 0 on error. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR passwd2des (), +.BR xencrypt (), +.BR xdecrypt () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH VERSIONS +These functions are available since glibc 2.1. +.SH BUGS +The prototypes are missing from the abovementioned include file. +.SH SEE ALSO +.BR cbc_crypt (3) diff --git a/upstream/opensuse-leap-15-6/man3/xdr.3 b/upstream/opensuse-leap-15-6/man3/xdr.3 new file mode 100644 index 00000000..ce2b18fd --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/xdr.3 @@ -0,0 +1,612 @@ +'\" t +.\" 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 +.\" +.TH xdr 3 2022-12-15 "Linux man-pages 6.04" +.SH NAME +xdr \- library routines for external data representation +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS AND DESCRIPTION +These routines allow C programmers to describe +arbitrary data structures in a machine-independent fashion. +Data for remote procedure calls are transmitted using these +routines. +.PP +The prototypes below are declared in +.I +and make use of the following types: +.PP +.RS 4 +.EX +.BI "typedef int " bool_t ; +.PP +.BI "typedef bool_t (*" xdrproc_t ")(XDR *, void *,...);" +.EE +.RE +.PP +For the declaration of the +.I XDR +type, see +.IR . +.PP +.nf +.BI "bool_t xdr_array(XDR *" xdrs ", char **" arrp ", unsigned int *" sizep , +.BI " unsigned int " maxsize ", unsigned int " elsize , +.BI " xdrproc_t " elproc ); +.fi +.IP +A filter primitive that translates between variable-length arrays +and their corresponding external representations. +The argument +.I arrp +is the address of the pointer to the array, while +.I sizep +is the address of the element count of the array; +this element count cannot exceed +.IR maxsize . +The argument +.I elsize +is the +.I sizeof +each of the array's elements, and +.I elproc +is an XDR filter that translates between +the array elements' C form, and their external +representation. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_bool(XDR *" xdrs ", bool_t *" bp ); +.fi +.IP +A filter primitive that translates between booleans (C +integers) +and their external representations. +When encoding data, this +filter produces values of either one or zero. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_bytes(XDR *" xdrs ", char **" sp ", unsigned int *" sizep , +.BI " unsigned int " maxsize ); +.fi +.IP +A filter primitive that translates between counted byte +strings and their external representations. +The argument +.I sp +is the address of the string pointer. +The length of the +string is located at address +.IR sizep ; +strings cannot be longer than +.IR maxsize . +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_char(XDR *" xdrs ", char *" cp ); +.fi +.IP +A filter primitive that translates between C characters +and their external representations. +This routine returns one if it succeeds, zero otherwise. +Note: encoded characters are not packed, and occupy 4 bytes each. +For arrays of characters, it is worthwhile to +consider +.BR xdr_bytes (), +.BR xdr_opaque (), +or +.BR xdr_string (). +.PP +.nf +.BI "void xdr_destroy(XDR *" xdrs ); +.fi +.IP +A macro that invokes the destroy routine associated with the XDR stream, +.IR xdrs . +Destruction usually involves freeing private data structures +associated with the stream. +Using +.I xdrs +after invoking +.BR xdr_destroy () +is undefined. +.PP +.nf +.BI "bool_t xdr_double(XDR *" xdrs ", double *" dp ); +.fi +.IP +A filter primitive that translates between C +.I double +precision numbers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_enum(XDR *" xdrs ", enum_t *" ep ); +.fi +.IP +A filter primitive that translates between C +.IR enum s +(actually integers) and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_float(XDR *" xdrs ", float *" fp ); +.fi +.IP +A filter primitive that translates between C +.IR float s +and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "void xdr_free(xdrproc_t " proc ", char *" objp ); +.fi +.IP +Generic freeing routine. +The first argument is the XDR routine for the object being freed. +The second argument is a pointer to the object itself. +Note: the pointer passed to this routine is +.I not +freed, but what it points to +.I is +freed (recursively). +.PP +.nf +.BI "unsigned int xdr_getpos(XDR *" xdrs ); +.fi +.IP +A macro that invokes the get-position routine +associated with the XDR stream, +.IR xdrs . +The routine returns an unsigned integer, +which indicates the position of the XDR byte stream. +A desirable feature of XDR +streams is that simple arithmetic works with this number, +although the XDR stream instances need not guarantee this. +.PP +.nf +.BI "long *xdr_inline(XDR *" xdrs ", int " len ); +.fi +.IP +A macro that invokes the inline routine associated with the XDR stream, +.IR xdrs . +The routine returns a pointer +to a contiguous piece of the stream's buffer; +.I len +is the byte length of the desired buffer. +Note: pointer is cast to +.IR "long\ *" . +.IP +Warning: +.BR xdr_inline () +may return NULL (0) +if it cannot allocate a contiguous piece of a buffer. +Therefore the behavior may vary among stream instances; +it exists for the sake of efficiency. +.PP +.nf +.BI "bool_t xdr_int(XDR *" xdrs ", int *" ip ); +.fi +.IP +A filter primitive that translates between C integers +and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_long(XDR *" xdrs ", long *" lp ); +.fi +.IP +A filter primitive that translates between C +.I long +integers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "void xdrmem_create(XDR *" xdrs ", char *" addr ", unsigned int " size , +.BI " enum xdr_op " op ); +.fi +.IP +This routine initializes the XDR stream object pointed to by +.IR xdrs . +The stream's data is written to, or read from, +a chunk of memory at location +.I addr +whose length is no more than +.I size +bytes long. +The +.I op +determines the direction of the XDR stream (either +.BR XDR_ENCODE , +.BR XDR_DECODE , +or +.BR XDR_FREE ). +.PP +.nf +.BI "bool_t xdr_opaque(XDR *" xdrs ", char *" cp ", unsigned int " cnt ); +.fi +.IP +A filter primitive that translates between fixed size opaque data +and its external representation. +The argument +.I cp +is the address of the opaque object, and +.I cnt +is its size in bytes. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_pointer(XDR *" xdrs ", char **" objpp , +.BI " unsigned int " objsize ", xdrproc_t " xdrobj ); +.fi +.IP +Like +.BR xdr_reference () +except that it serializes null pointers, whereas +.BR xdr_reference () +does not. +Thus, +.BR xdr_pointer () +can represent +recursive data structures, such as binary trees or +linked lists. +.PP +.nf +.BI "void xdrrec_create(XDR *" xdrs ", unsigned int " sendsize , +.BI " unsigned int " recvsize ", char *" handle , +.BI " int (*" readit ")(char *, char *, int)," +.BI " int (*" writeit ")(char *, char *, int));" +.fi +.IP +This routine initializes the XDR stream object pointed to by +.IR xdrs . +The stream's data is written to a buffer of size +.IR sendsize ; +a value of zero indicates the system should use a suitable default. +The stream's data is read from a buffer of size +.IR recvsize ; +it too can be set to a suitable default by passing a zero value. +When a stream's output buffer is full, +.I writeit +is called. +Similarly, when a stream's input buffer is empty, +.I readit +is called. +The behavior of these two routines is similar to +the system calls +.BR read (2) +and +.BR write (2), +except that +.I handle +is passed to the former routines as the first argument. +Note: the XDR stream's +.I op +field must be set by the caller. +.IP +Warning: to read from an XDR stream created by this API, +you'll need to call +.BR xdrrec_skiprecord () +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 +.B xdr*_create +APIs are not compatible for the same reason. +.PP +.nf +.BI "bool_t xdrrec_endofrecord(XDR *" xdrs ", int " sendnow ); +.fi +.IP +This routine can be invoked only on streams created by +.BR xdrrec_create (). +The data in the output buffer is marked as a completed record, +and the output buffer is optionally written out if +.I sendnow +is nonzero. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdrrec_eof(XDR *" xdrs ); +.fi +.IP +This routine can be invoked only on streams created by +.BR xdrrec_create (). +After consuming the rest of the current record in the stream, +this routine returns one if the stream has no more input, +zero otherwise. +.PP +.nf +.BI "bool_t xdrrec_skiprecord(XDR *" xdrs ); +.fi +.IP +This routine can be invoked only on +streams created by +.BR xdrrec_create (). +It tells the XDR implementation that the rest of the current record +in the stream's input buffer should be discarded. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_reference(XDR *" xdrs ", char **" pp ", unsigned int " size , +.BI " xdrproc_t " proc ); +.fi +.IP +A primitive that provides pointer chasing within structures. +The argument +.I pp +is the address of the pointer; +.I size +is the +.I sizeof +the structure that +.I *pp +points to; and +.I proc +is an XDR procedure that filters the structure +between its C form and its external representation. +This routine returns one if it succeeds, zero otherwise. +.IP +Warning: this routine does not understand null pointers. +Use +.BR xdr_pointer () +instead. +.PP +.nf +.BI "xdr_setpos(XDR *" xdrs ", unsigned int " pos ); +.fi +.IP +A macro that invokes the set position routine associated with +the XDR stream +.IR xdrs . +The argument +.I pos +is a position value obtained from +.BR xdr_getpos (). +This routine returns one if the XDR stream could be repositioned, +and zero otherwise. +.IP +Warning: it is difficult to reposition some types of XDR +streams, so this routine may fail with one +type of stream and succeed with another. +.PP +.nf +.BI "bool_t xdr_short(XDR *" xdrs ", short *" sp ); +.fi +.IP +A filter primitive that translates between C +.I short +integers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "void xdrstdio_create(XDR *" xdrs ", FILE *" file ", enum xdr_op " op ); +.fi +.IP +This routine initializes the XDR stream object pointed to by +.IR xdrs . +The XDR stream data is written to, or read from, the +.I stdio +stream +.IR file . +The argument +.I op +determines the direction of the XDR stream (either +.BR XDR_ENCODE , +.BR XDR_DECODE , +or +.BR XDR_FREE ). +.IP +Warning: the destroy routine associated with such XDR streams calls +.BR fflush (3) +on the +.I file +stream, but never +.BR fclose (3). +.PP +.nf +.BI "bool_t xdr_string(XDR *" xdrs ", char **" sp ", unsigned int " maxsize ); +.fi +.IP +A filter primitive that translates between C strings and +their corresponding external representations. +Strings cannot be longer than +.IR maxsize . +Note: +.I sp +is the address of the string's pointer. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_u_char(XDR *" xdrs ", unsigned char *" ucp ); +.fi +.IP +A filter primitive that translates between +.I unsigned +C characters and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_u_int(XDR *" xdrs ", unsigned int *" up ); +.fi +.IP +A filter primitive that translates between C +.I unsigned +integers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_u_long(XDR *" xdrs ", unsigned long *" ulp ); +.fi +.IP +A filter primitive that translates between C +.I "unsigned long" +integers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_u_short(XDR *" xdrs ", unsigned short *" usp ); +.fi +.IP +A filter primitive that translates between C +.I "unsigned short" +integers and their external representations. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_union(XDR *" xdrs ", enum_t *" dscmp ", char *" unp , +.BI " const struct xdr_discrim *" choices , +.BI " xdrproc_t " defaultarm "); /* may equal NULL */" +.fi +.IP +A filter primitive that translates between a discriminated C +.I union +and its corresponding external representation. +It first +translates the discriminant of the union located at +.IR dscmp . +This discriminant is always an +.IR enum_t . +Next the union located at +.I unp +is translated. +The argument +.I choices +is a pointer to an array of +.BR xdr_discrim () +structures. +Each structure contains an ordered pair of +.RI [ value , proc ]. +If the union's discriminant is equal to the associated +.IR value , +then the +.I proc +is called to translate the union. +The end of the +.BR xdr_discrim () +structure array is denoted by a routine of value NULL. +If the discriminant is not found in the +.I choices +array, then the +.I defaultarm +procedure is called (if it is not NULL). +Returns one if it succeeds, zero otherwise. +.PP +.nf +.BI "bool_t xdr_vector(XDR *" xdrs ", char *" arrp ", unsigned int " size , +.BI " unsigned int " elsize ", xdrproc_t " elproc ); +.fi +.IP +A filter primitive that translates between fixed-length arrays +and their corresponding external representations. +The argument +.I arrp +is the address of the pointer to the array, while +.I size +is the element count of the array. +The argument +.I elsize +is the +.I sizeof +each of the array's elements, and +.I elproc +is an XDR filter that translates between +the array elements' C form, and their external +representation. +This routine returns one if it succeeds, zero otherwise. +.PP +.nf +.B bool_t xdr_void(void); +.fi +.IP +This routine always returns one. +It may be passed to RPC routines that require a function argument, +where nothing is to be done. +.PP +.nf +.BI "bool_t xdr_wrapstring(XDR *" xdrs ", char **" sp ); +.fi +.IP +A primitive that calls +.B "xdr_string(xdrs, sp,MAXUN.UNSIGNED );" +where +.B MAXUN.UNSIGNED +is the maximum value of an unsigned integer. +.BR xdr_wrapstring () +is handy because the RPC package passes a maximum of two XDR +routines as arguments, and +.BR xdr_string (), +one of the most frequently used primitives, requires three. +Returns one if it succeeds, zero otherwise. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR xdr_array (), +.BR xdr_bool (), +.BR xdr_bytes (), +.BR xdr_char (), +.BR xdr_destroy (), +.BR xdr_double (), +.BR xdr_enum (), +.BR xdr_float (), +.BR xdr_free (), +.BR xdr_getpos (), +.BR xdr_inline (), +.BR xdr_int (), +.BR xdr_long (), +.BR xdrmem_create (), +.BR xdr_opaque (), +.BR xdr_pointer (), +.BR xdrrec_create (), +.BR xdrrec_eof (), +.BR xdrrec_endofrecord (), +.BR xdrrec_skiprecord (), +.BR xdr_reference (), +.BR xdr_setpos (), +.BR xdr_short (), +.BR xdrstdio_create (), +.BR xdr_string (), +.BR xdr_u_char (), +.BR xdr_u_int (), +.BR xdr_u_long (), +.BR xdr_u_short (), +.BR xdr_union (), +.BR xdr_vector (), +.BR xdr_void (), +.BR xdr_wrapstring () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH SEE ALSO +.BR rpc (3) +.PP +The following manuals: +.RS +eXternal Data Representation Standard: Protocol Specification +.br +eXternal Data Representation: Sun Technical Notes +.br +.IR "XDR: External Data Representation Standard" , +RFC\ 1014, Sun Microsystems, Inc., +USC-ISI. +.RE diff --git a/upstream/opensuse-leap-15-6/man3/y0.3 b/upstream/opensuse-leap-15-6/man3/y0.3 new file mode 100644 index 00000000..7f169e35 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/y0.3 @@ -0,0 +1,275 @@ +'\" t +.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" +.\" +.\" SPDX-License-Identifier: Linux-man-pages-copyleft +.\" +.\" 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, created this page, based on material from j0.3. +.\" +.TH y0 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- +Bessel functions of the second kind +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "double y0(double " x ); +.BI "double y1(double " x ); +.BI "double yn(int " n ", double " x ); +.PP +.BI "float y0f(float " x ); +.BI "float y1f(float " x ); +.BI "float ynf(int " n ", float " x ); +.PP +.BI "long double y0l(long double " x ); +.BI "long double y1l(long double " x ); +.BI "long double ynl(int " n ", long double " x ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR y0 (), +.BR y1 (), +.BR yn (): +.nf + _XOPEN_SOURCE + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.PP +.BR y0f (), +.BR y0l (), +.BR y1f (), +.BR y1l (), +.BR ynf (), +.BR ynl (): +.nf + _XOPEN_SOURCE >= 600 + || (_ISOC99_SOURCE && _XOPEN_SOURCE) + || /* Since glibc 2.19: */ _DEFAULT_SOURCE + || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE +.fi +.SH DESCRIPTION +The +.BR y0 () +and +.BR y1 () +functions return Bessel functions of +.I x +of the second kind of orders 0 and 1, respectively. +The +.BR yn () +function +returns the Bessel function of +.I x +of the second kind of order +.IR n . +.PP +The value of +.I x +must be positive. +.PP +The +.BR y0f (), +.BR y1f (), +and +.BR ynf () +functions are versions that take and return +.I float +values. +The +.BR y0l (), +.BR y1l (), +and +.BR ynl () +functions are versions that take and return +.I "long double" +values. +.SH RETURN VALUE +On success, these functions return the appropriate +Bessel value of the second kind for +.IR x . +.PP +If +.I x +is a NaN, a NaN is returned. +.PP +If +.I x +is negative, +a domain error occurs, +and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +(POSIX.1-2001 also allows a NaN return for this case.) +.PP +If +.I x +is 0.0, +a pole error occurs, +and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +.PP +If the result underflows, +a range error occurs, +and the functions return 0.0 +.PP +If the result overflows, +a range error occurs, +and the functions return +.RB \- HUGE_VAL , +.RB \- HUGE_VALF , +or +.RB \- HUGE_VALL , +respectively. +(POSIX.1-2001 also allows a 0.0 return for this case.) +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is negative +.I errno +is set to +.BR EDOM . +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.TP +Pole error: \fIx\fP is 0.0 +.\" Before POSIX.1-2001 TC2, this was (inconsistently) specified +.\" as a range error. +.I errno +is set to +.B ERANGE +and an +.B FE_DIVBYZERO +exception is raised +(but see BUGS). +.TP +Range error: result underflow +.\" e.g., y0(1e33) on glibc 2.8/x86-32 +.I errno +is set to +.BR ERANGE . +No +.B FE_UNDERFLOW +exception is returned by +.\" This is intended behavior +.\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6806 +.BR fetestexcept (3) +for this case. +.TP +Range error: result overflow +.\" e.g., yn(10, 1e-40) on glibc 2.8/x86-32 +.I errno +is set to +.B ERANGE +(but see BUGS). +An overflow floating-point exception +.RB ( FE_OVERFLOW ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR y0 (), +.BR y0f (), +.BR y0l () +T} Thread safety MT-Safe +T{ +.BR y1 (), +.BR y1f (), +.BR y1l () +T} Thread safety MT-Safe +T{ +.BR yn (), +.BR ynf (), +.BR ynl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +.TP +.BR y0 () +.TQ +.BR y1 () +.TQ +.BR yn () +POSIX.1-2008. +.TP +Others: +BSD. +.SH HISTORY +.TP +.BR y0 () +.TQ +.BR y1 () +.TQ +.BR yn () +SVr4, 4.3BSD, +POSIX.1-2001. +.TP +Others: +BSD. +.SH BUGS +Before glibc 2.19, +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807 +these functions misdiagnosed pole errors: +.I errno +was set to +.BR EDOM , +instead of +.B ERANGE +and no +.B FE_DIVBYZERO +exception was raised. +.PP +Before glibc 2.17, +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6808 +did not set +.I errno +for "range error: result underflow". +.PP +In glibc 2.3.2 and earlier, +.\" Actually, 2.3.2 is the earliest test result I have; so yet +.\" to confirm if this error occurs only in glibc 2.3.2. +these functions do not raise an invalid floating-point exception +.RB ( FE_INVALID ) +when a domain error occurs. +.SH SEE ALSO +.BR j0 (3) -- cgit v1.2.3