Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37434217
en ru br
Репозитории ALT
S:6.05.01-alt1
5.1: 3.23-alt2.M50P.1
4.1: 2.78-alt1
4.0: 2.43-alt1
3.0: 2.07-alt1
www.altlinux.org/Changes

Группа :: Документация
Пакет: man-pages

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

man-pages-3.66/000075500000000000000000000000001233441571000133165ustar00rootroot00000000000000man-pages-3.66/man1/000075500000000000000000000000001233441571000141525ustar00rootroot00000000000000man-pages-3.66/man1/catchsegv.1000064400000000000000000000112011233441571000161760ustar00rootroot00000000000000.rn '' }`
''' $RCSfile$$Revision$$Date$
'''
''' $Log$
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
''' Set up \*(-- to give an unbreakable dash;
''' string Tr holds user defined translation string.
''' Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.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" ""
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
''' \*(L" and \*(R", except that they are used on ".xx" lines,
''' such as .IP and .SH, which do another additional levels of
''' double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\" If the F register is turned on, we'll generate
.\" index entries out stderr for the following things:
.\" TH Title
.\" SH Header
.\" Sh Subsection
.\" Ip Item
.\" X<> Xref (embedded
.\" Of course, you have to process the output yourself
.\" in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH CATCHSEGV 1 "ALT Linux" "7/Jan/2001" "ALT Linux"
.UC
.if n .hy 0
.if n .na
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
. \" AM - accent mark definitions
.bd B 3
. \" 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 ? ?
. ds ! !
. ds /
. ds q
.\}
.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 ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
. \" 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 v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.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
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'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 v \h'-1'\o'\(aa\(ga'
. ds _ \h'-1'^
. ds . \h'-1'.
. ds 3 3
. 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
. ds oe oe
. ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
catchsegv \- Catch segmentation faults in programs
.SH "SYNOPSIS"
\fBcatchsegv\fR \fBprogram\fR [\fBargs\fR]
.SH "DESCRIPTION"
Used to debug segmentation faults in programs. The output is the
content of registers, plus a backtrace. Basically you call your
program and its arguments as the arguments to catchsegv.
.SH "AUTHOR"
\fIcatchsegv\fR was written by Ulrich Drepper for the GNU C Library
.PP
This man page was written by Ben Collins <bcollins@debian.org> for
the Debian GNU/Linux system.

.rn }` ''
.IX Title "CATCHSEGV 1"
.IX Name "catchsegv - Catch segmentation faults in programs"

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Header "AUTHOR"

man-pages-3.66/man1/getconf.1000064400000000000000000000117501233441571000156650ustar00rootroot00000000000000.rn '' }`
''' $RCSfile$$Revision$$Date$
'''
''' $Log$
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
''' Set up \*(-- to give an unbreakable dash;
''' string Tr holds user defined translation string.
''' Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.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" ""
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
''' \*(L" and \*(R", except that they are used on ".xx" lines,
''' such as .IP and .SH, which do another additional levels of
''' double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\" If the F register is turned on, we'll generate
.\" index entries out stderr for the following things:
.\" TH Title
.\" SH Header
.\" Sh Subsection
.\" Ip Item
.\" X<> Xref (embedded
.\" Of course, you have to process the output yourself
.\" in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH GETCONF 1 "ALT Linux" "7/Jan/2001" "ALT Linux"
.UC
.if n .hy 0
.if n .na
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
. \" AM - accent mark definitions
.bd B 3
. \" 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 ? ?
. ds ! !
. ds /
. ds q
.\}
.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 ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
. \" 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 v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.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
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'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 v \h'-1'\o'\(aa\(ga'
. ds _ \h'-1'^
. ds . \h'-1'.
. ds 3 3
. 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
. ds oe oe
. ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
getconf \- Query system configuration variables
.SH "SYNOPSIS"
\fBgetconf\fR [\fB\-v specification\fR] system_var
.PP
\fBgetconf\fR [\fB\-v specification\fR] path_var pathname
.SH "DESCRIPTION"
\fB\-v\fR
.PP
.Vb 2
\& Indicate the specification and version for which to obtain
\& configuration variables.
.Ve
\fBsystem_var\fR
.PP
.Vb 2
\& A system configuration variable, as defined by sysconf(3) or
\& confstr(3).
.Ve
\fBpath_var\fR
.PP
.Vb 2
\& A system configuration variable as defined by pathconf(3). This
\& must be used with a pathname.
.Ve
.SH "AUTHOR"
\fIgetconf\fR was written by Roland McGrath for the GNU C Library
.PP
This man page was written by Ben Collins <bcollins@debian.org> for
the Debian GNU/Linux system.
.SH "SEE ALSO"
\fBsysconf\fR(3), \fBpathconf\fR(3), \fBconfstr\fR(3)

.rn }` ''
.IX Title "GETCONF 1"
.IX Name "getconf - Query system configuration variables"

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Header "AUTHOR"

.IX Header "SEE ALSO"

man-pages-3.66/man1/iconv.1000064400000000000000000000034201233441571000153510ustar00rootroot00000000000000.TH iconv 1 "July 06, 2005" "iconv(1)" "ALT Linux"
.SH NAME
\fBiconv\fR - Convert encoding of given files from one encoding to another
.SH SYNOPSIS
\fBiconv\fR [\fB-r\fR,\fB--replace\fR[=\fISYMBOL\fR]] [\fB-s\fR|\fB--silent\fR] [\fB--verbose\fR] [\fB-f\fR,\fB--from-code\fR=\fINAME\fR] [\fB-t\fR,\fB--to-code\fR=\fINAME\fR] [\fB-o\fR,\fB--output\fR=\fIFILE\fR] \fIINPUTIFILE\fh
.PP
\fBiconv\fR [\fB-l\fR|\fB--list\fR] [\fB-V\fR|\fB--version\fR] [\fB--usage\fR] [\fB-?\fR|\fB--help\fR]
.SH DESCRIPTION
The iconv program converts the encoding of characters in \fIINPUTFILE\fR from
one coded character set to another. The result is written to standard
output unless otherwise specified by the \fB--output\fR option.
.SH OPTIONS
.SH Input/Output format specification:
.IP "\fB-f\fR, \fB--from-code\fR=\fINAME\fR"
Encoding of original text
.IP "\fB-t\fR, \fB--to-code\fR=\fINAME\fR"
Encoding for output text
.SH Information:
.IP "\fB-l\fR, \fB--list\fR"
List all known coded character sets
.SH Output control:
.IP "\fB-c\fR"
Omit invalid characters from output
.IP "\fB-o\fR, \fB--output\fR=\fIFILE\fR"
Specify output file (instead of stdin)
.IP "\fB-r\fR, \fB--replace\fR[=\fISYMBOL\fR]"
Replace invalid characters with specified symbol
.IP "\fB-s\fR, \fB--silent\fR"
Suppress warnings
.IP "\fB--verbose\fR"
Print progress information
.SH Help:
.IP "\fB-?\fR, \fB--help\fR"
Give help list and exit
.IP "\fB--usage\fR"
Give a short usage message
.IP "\fB-V\fR, \fB--version\fR"
Print program version
.SH AUTHOR
iconv is written by Ulrich Drepper as part of the GNU C Library.

This man page is written by Joel Klecker <\fIespy@debian.org\fR>, for the
Debian GNU/Linux system. Updated by php-coder <\fIphp-coder@altlinux.ru\fR> for ALT Linux.
.SH SEE ALSO
\fIiconv(3)\fR, \fIiconv_open(3)\fR, \fIiconv_close(3)\fR
man-pages-3.66/man1/locale.1000064400000000000000000000142651233441571000155030ustar00rootroot00000000000000.rn '' }`
''' $RCSfile: locale.1,v $$Revision: 1.1 $$Date: 2001/04/30 18:03:09 $
'''
''' $Log: locale.1,v $
''' Revision 1.1 2001/04/30 18:03:09 mci
''' - Disabled patch 3 (now we haven't this paths)
''' - added man for ld-linux.so
''' - remove time.1 (it is in time package)
''' - man-pages-extralocale.tar.bz2, man2.tar.gz replaced
''' by just non packed files (this better for storing in CVS)
''' - patch to replace cc(1) -> gcc(1), ld.so -> ld-linux.so
'''
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
''' Set up \*(-- to give an unbreakable dash;
''' string Tr holds user defined translation string.
''' Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.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" ""
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
''' \*(L" and \*(R", except that they are used on ".xx" lines,
''' such as .IP and .SH, which do another additional levels of
''' double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\" If the F register is turned on, we'll generate
.\" index entries out stderr for the following things:
.\" TH Title
.\" SH Header
.\" Sh Subsection
.\" Ip Item
.\" X<> Xref (embedded
.\" Of course, you have to process the output yourself
.\" in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH LOCALE 1 "ALT Linux" "March 2001" "ALT Linux"
.UC
.if n .hy 0
.if n .na
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
. \" AM - accent mark definitions
.bd B 3
. \" 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 ? ?
. ds ! !
. ds /
. ds q
.\}
.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 ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
. \" 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 v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.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
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'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 v \h'-1'\o'\(aa\(ga'
. ds _ \h'-1'^
. ds . \h'-1'.
. ds 3 3
. 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
. ds oe oe
. ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
locale \- Get locale-specific information.
.SH "SYNOPSIS"
\fBlocale\fR \fB[\fR \f(CW-a\fR | \f(CW-m\fR\fB]\fR
.PP
\fBlocale\fR \fB[\fR \-ck \fB]\fR \fIname\fR...
.SH "DESCRIPTION"
The \fIlocale\fR program writes information about the current locale
environment, or all locales, to standard output.
.PP
When invoked without arguments, \fIlocale\fR summarizes the current
locale environment for each locale category defined by the LC_*
environment variables.
.PP
\fB\-a\fR, \fB--all-locales\fR
.PP
.Vb 1
\& Write names of available locales.
.Ve
\fB\-m\fR, \fB--charmaps\fR
.PP
.Vb 1
\& Write names of available charmaps.
.Ve
.Sh "Output Format:"
\fB\-c\fR, \fB--category-name\fR
.PP
.Vb 1
\& Write names of selected categories.
.Ve
\fB\-k\fR, \fB--keyword-name\fR
.PP
.Vb 1
\& Write names and values of selected keywords.
.Ve
.SH "ENVIRONMENT VARIABLES"
LC_CTYPE
.PP
.Vb 1
\& Character classification and case conversion.
.Ve
LC_COLLATE
.PP
.Vb 1
\& Collation order.
.Ve
LC_TIME
.PP
.Vb 1
\& Date and time formats.
.Ve
LC_NUMERIC
.PP
.Vb 1
\& Non-monetary numeric formats.
.Ve
LC_MONETARY
.PP
.Vb 1
\& Monetary formats.
.Ve
LC_MESSAGES
.Ip "\ \ \ \ \ \ \ \ Formats\ of\ informative\ and\ diagnostic\ messages\ and \ \ \ \ \ \ \ \ interactive\ responses." 0
.SH "AUTHOR"
\fIlocale\fR is written by Ulrich Drepper for the GNU C Library.
.PP
This manpage is written by Joel Klecker <espy@debian.org> for
the Debian GNU/Linux system.

.rn }` ''
.IX Title "LOCALE 1"
.IX Name "locale - Get locale-specific information."

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Subsection "Output Format:"

.IX Header "ENVIRONMENT VARIABLES"

.IX Item "\ \ \ \ \ \ \ \ Formats\ of\ informative\ and\ diagnostic\ messages\ and \ \ \ \ \ \ \ \ interactive\ responses."

.IX Header "AUTHOR"

man-pages-3.66/man1/localedef.1000064400000000000000000000117521233441571000161600ustar00rootroot00000000000000.TH LOCALEDEF 1 "ALT Linux" "Feb 10, 2002" "ALT Linux"
.SH NAME
localedef \- compile locale definition files
.SH SYNOPSIS
.B localedef
.RB [ \-f
.IR charmapfile ]
.\" This option is ignored by the localedef program.
.\" To avoid confusion, I decided not to list it in the synopsis.
.\" .RB [ \-u
.\" .IR codeset ]
.RB [ \-i
.IR inputfile ]
.RB [ \-\-force ]
.RB [ \-\-verbose ]
.RB [ \-\-posix ]
.RB [ \-\-quiet ]
.I outputpath
.br
.B "localedef \-\-version"
.br
.B "localedef \-\-help"
.SH DESCRIPTION
The
.B localedef
program reads the indicated
.I charmap
and
.I input
files, compiles them to a form usable by the
.BR locale (7)
functions in the C library, and places the six output files in the
.I outputpath
directory.
.PP
If no
.I charmapfile
is given,
.I POSIX
is used by default.
If no
.I inputfile
is given, or if it is given as
.BR \- ,
.B localedef
reads from standard input.
.SH OPTIONS
Most options can have either short or long forms. If multiple short
options are used, they can be combined in one word (e.g.
.BR \-cv ).
If an option takes an argument, the argument can be given separately
as the next word, or it can be written as option=argument.
.TP
.BI \-f " charmapfile" ", \-\-charmap=" charmapfile
Specify the file that defines the symbolic character names that are
used by the input file. If the file is in the default directory for
character maps, it is not necessary to specify the full pathname.
This default directory is printed by
.BR "localedef \-\-help" .
.TP
.BI \-i " inputfile" ", \-\-inputfile=" inputfile
Specify the locale definition file to compile. If
.I inputfile
is not absolute,
.B localedef
will also look in the directory specified by the environment variable
.B I18NPATH
and in the default directory for locale definition files. This default
directory is printed by
.BR "localedef \-\-help" .
.TP
.B "\-c, \-\-force"
Write the output files even if warnings were generated about the input
file.
.TP
.B "\-v, \-\-verbose"
Generate extra warnings about errors that are normally ignored.
.TP
.B \-\-quiet
Suppress all notifications and warnings, and report only fatal errors.
.TP
.B \-\-posix
Be strictly POSIX conformant. Implies
.BR \-\-verbose .
This option currently has no other effect. Posix conformance is
assumed if the environment variable
.B POSIXLY_CORRECT
is set.
.TP
.BI \-u " codeset" ", \-\-code\-set\-name=" codeset
This option is accepted but ignored.
.TP
.B "\-h, \-\-help"
Print a usage summary and exit. Also prints the default paths used by
.BR localedef .
.TP
.B "\-V, \-\-version"
Print the version number, license, and disclaimer of warranty for
.BR localedef .
.SH ENVIRONMENT
.TP
.B POSIXLY_CORRECT
The
.B \-\-posix
flag is assumed if this environment variable is set.
.TP
.B I18NPATH
The default directory for locale definition files.
.SH FILES
.TP
.B /usr/share/i18n/charmaps
Usual default charmap path.
.TP
.B /usr/share/locale
Usual default output path. See the output from
.B "localedef \-\-help"
for the paths used in your version.
.TP
.IB outputpath/ LC_COLLATE
One of the output files. It describes the rules for comparing strings
in the locale's alphabet.
.TP
.IB outputpath/ LC_CTYPE
One of the output files. It contains information about character
cases and case conversions for the locale.
.TP
.IB outputpath/ LC_MONETARY
One of the output files. It describes the way monetary values should
be formatted in the locale.
.TP
.IB outputpath/ LC_MESSAGES/SYS_LC_MESSAGES
One of the output files. It contains information about the language
messages should be printed in, and what an affirmative or negative
answer looks like.
.TP
.IB outputpath/ LC_NUMERIC
One of the output files. It describes the rules for formatting
numbers in the locale.
.TP
.IB outputpath/ LC_TIME
One of the output files. It describes the rules for formatting
times and dates in the locale.
.TP
.IB outputpath/ LC_PAPER
One of the output files. It describes the default paper size
in the locale.
.TP
.IB outputpath/ LC_NAME
One of the output files. It describes the rules for formatting
names in the locale.
.TP
.IB outputpath/ LC_ADDRESS
One of the output files. It describes the rules for formatting
addresses, and other location information in the locale.
.TP
.IB outputpath/ LC_TELEPHONE
One of the output files. It describes the rules for formatting
telephone numbers in the locale.
.TP
.IB outputpath/ LC_MEASUREMENT
One of the output files. It describes the rules for measurement in the
locale, e.g. Metric or other units.
.TP
.IB outputpath/ LC_IDENTIFICATION
One of the output files. It identifies the elements within the locale.
.SH "SEE ALSO"
.BR locale "(5), " locale "(7), " locale (1)
.SH AUTHOR
The program was written by Ulrich Drepper.
.PP
This manpage was written by Richard Braakman <dark@xs4all.nl> on
behalf of the Debian GNU/Linux Project and anyone else who wants it.
It was amended by Alastair McKinstry <mckinstry@computer.org> to
explain new ISO 14652 elements.
The manpage is not supported by the GNU libc maintainers and may be
out of date.
.SH STANDARDS
This program conforms to the POSIX standard P1003.2
man-pages-3.66/man1/rpcgen.1000064400000000000000000000241351233441571000155170ustar00rootroot00000000000000.\" @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89
.\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved.
.nr X
.if \nX=0 .ds x} rpcgen 1 "" "\&"
.if \nX=1 .ds x} rpcgen 1 ""
.if \nX=2 .ds x} rpcgen 1 "" "\&"
.if \nX=3 .ds x} rpcgen "" "" "\&"
.TH \*(x}
.SH NAME
\f4rpcgen\f1 \- an RPC protocol compiler
.SH SYNOPSIS
.ft 4
.nf
rpcgen \f2infile\f4
.fi
.ft 1
.br
.ft 4
.nf
rpcgen [\-D\f2name\f4[=\f2value\f4]] [\-T] [\-K \f2secs\fP] \f2infile\f4
.fi
.ft 1
.br
.ft 4
.nf
rpcgen \-c|\-h|\-l|\-m|\-t [\-o \f2outfile\f4 ] \f2infile\f4
.fi
.ft 1
.br
.ft 4
.nf
rpcgen [\-I] \-s \f2nettype\f4 [\-o \f2outfile\f4] \f2infile\f4
.fi
.ft 1
.br
.ft 4
.nf
rpcgen \-n \f2netid\f4 [\-o \f2outfile\f4] \f2infile\f4
.ft 1
.SH DESCRIPTION
.P
\f4rpcgen\f1
is a tool that generates C code to implement an RPC protocol.
The input to
\f4rpcgen\f1
is a language similar to C known as
RPC Language (Remote Procedure Call Language).
.P
\f4rpcgen\f1
is normally used as in the first synopsis where
it takes an input file and generates up to four output files.
If the
\f2infile\f1
is named
\f4proto.x\f1,
then
\f4rpcgen\f1
will generate a header file in
\f4proto.h\f1,
XDR routines in
\f4proto_xdr.c\f1,
server-side stubs in
\f4proto_svc.c\f1,
and client-side stubs in
\f4proto_clnt.c\f1.
With the
\f4\-T\f1
option,
it will also generate the RPC dispatch table in
\f4proto_tbl.i\f1.
With the
\f4\-Sc\f1
option,
it will also generate sample code which would illustrate how to use the
remote procedures on the client side. This code would be created in
\f4proto_client.c\f1.
With the
\f4\-Ss\f1
option,
it will also generate a sample server code which would illustrate how to write
the remote procedures. This code would be created in
\f4proto_server.c\f1.
.P
The server created can be started both by the port monitors
(for example, \f4inetd\f1 or \f4listen\f1)
or by itself.
When it is started by a port monitor,
it creates servers only for the transport for which
the file descriptor \f40\fP was passed.
The name of the transport must be specified
by setting up the environmental variable
\f4PM_TRANSPORT\f1.
When the server generated by
\f4rpcgen\f1
is executed,
it creates server handles for all the transports
specified in
\f4NETPATH\f1
environment variable,
or if it is unset,
it creates server handles for all the visible transports from
\f4/etc/netconfig\f1
file.
Note:
the transports are chosen at run time and not at compile time.
When the server is self-started,
it backgrounds itself by default.
A special define symbol
\f4RPC_SVC_FG\f1
can be used to run the server process in foreground.
.P
The second synopsis provides special features which allow
for the creation of more sophisticated RPC servers.
These features include support for user provided
\f4#defines\f1
and RPC dispatch tables.
The entries in the RPC dispatch table contain:
.RS
.PD 0
.TP 3
\(bu
pointers to the service routine corresponding to that procedure,
.TP
\(bu
a pointer to the input and output arguments
.TP
\(bu
the size of these routines
.PD
.RE
A server can use the dispatch table to check authorization
and then to execute the service routine;
a client library may use it to deal with the details of storage
management and XDR data conversion.
.P
The other three synopses shown above are used when
one does not want to generate all the output files,
but only a particular one.
Some examples of their usage is described in the
EXAMPLE
section below.
When
\f4rpcgen\f1
is executed with the
\f4\-s\f1
option,
it creates servers for that particular class of transports.
When
executed with the
\f4\-n\f1
option,
it creates a server for the transport specified by
\f2netid\f1.
If
\f2infile\f1
is not specified,
\f4rpcgen\f1
accepts the standard input.
.P
The C preprocessor,
\f4cc \-E\f1
[see \f4cc\fP(1)],
is run on the input file before it is actually interpreted by
\f4rpcgen\f1.
For each type of output file,
\f4rpcgen\f1
defines a special preprocessor symbol for use by the
\f4rpcgen\f1
programmer:
.P
.PD 0
.TP 12
\f4RPC_HDR\f1
defined when compiling into header files
.TP
\f4RPC_XDR\f1
defined when compiling into XDR routines
.TP
\f4RPC_SVC\f1
defined when compiling into server-side stubs
.TP
\f4RPC_CLNT\f1
defined when compiling into client-side stubs
.TP
\f4RPC_TBL\f1
defined when compiling into RPC dispatch tables
.PD
.P
Any line beginning with
`\f4%\f1'
is passed directly into the output file,
uninterpreted by
\f4rpcgen\f1.
.P
For every data type referred to in
\f2infile\f1,
\f4rpcgen\f1
assumes that there exists a
routine with the string
\f4xdr_\f1
prepended to the name of the data type.
If this routine does not exist in the RPC/XDR
library, it must be provided.
Providing an undefined data type
allows customization of XDR routines.
.br
.ne 10
.P
The following options are available:
.TP
\f4\-a\f1
Generate all the files including sample code for client and server side.
.TP
\f4\-b\f1
This generates code for the SunOS4.1 style of rpc. It is
for backward compatibilty. This is the default.
.TP
\f4\-5\f1
This generates code for the SysVr4 style of rpc. It is used by the
Transport Independent RPC that is in Svr4 systems.
By default rpcgen generates code for SunOS4.1 stype of rpc.
.TP
\f4\-c\f1
Compile into XDR routines.
.TP
\f4\-C\f1
Generate code in ANSI C. This option also generates code that could be
compiled with the C++ compiler. This is the default.
.TP
\f4\-k\f1
Generate code in K&R C. The default is ANSI C.
.TP
\f4\-D\f2name\f4[=\f2value\f4]\f1
Define a symbol
\f2name\f1.
Equivalent to the
\f4#define\f1
directive in the source.
If no
\f2value\f1
is given,
\f2value\f1
is defined as \f41\f1.
This option may be specified more than once.
.TP
\f4\-h\f1
Compile into
\f4C\f1
data-definitions (a header file).
\f4\-T\f1
option can be used in conjunction to produce a
header file which supports RPC dispatch tables.
.TP
\f4\-I\f1
Generate a service that can be started from inetd. The default is
to generate a static service that handles transports selected with \f4\-s\f1.
Using \f4\-I\f1 allows starting a service by either method.
.TP
\f4-K\f2 secs\f1
By default, services created using \f4rpcgen\fP wait \f4120\fP seconds
after servicing a request before exiting.
That interval can be changed using the \f4-K\fP flag.
To create a server that exits immediately upon servicing a request,
\f4-K\ 0\fP can be used.
To create a server that never exits, the appropriate argument is
\f4-K\ -1\fP.
.IP
When monitoring for a server,
some portmonitors, like
\f4listen\fP(1M),
.I always
spawn a new process in response to a service request.
If it is known that a server will be used with such a monitor, the
server should exit immediately on completion.
For such servers, \f4rpcgen\fP should be used with \f4-K\ -1\fP.
.TP
\f4\-l\f1
Compile into client-side stubs.
.TP
\f4\-m\f1
Compile into server-side stubs,
but do not generate a \(lqmain\(rq routine.
This option is useful for doing callback-routines
and for users who need to write their own
\(lqmain\(rq routine to do initialization.
.TP
\f4\-n \f2netid\f1
Compile into server-side stubs for the transport
specified by
\f2netid\f1.
There should be an entry for
\f2netid\f1
in the
netconfig database.
This option may be specified more than once,
so as to compile a server that serves multiple transports.
.TP
\f4\-N\f1
Use the newstyle of rpcgen. This allows procedures to have multiple arguments.
It also uses the style of parameter passing that closely resembles C. So, when
passing an argument to a remote procedure you do not have to pass a pointer to
the argument but the argument itself. This behaviour is different from the oldstyle
of rpcgen generated code. The newstyle is not the default case because of
backward compatibility.
.TP
\f4\-o \f2outfile\f1
Specify the name of the output file.
If none is specified,
standard output is used
(\f4\-c\f1,
\f4\-h\f1,
\f4\-l\f1,
\f4\-m\f1,
\f4\-n\f1,
\f4\-s\f1,
\f4\-s\Sc,
\f4\-s\Ss
and
\f4\-t\f1
modes only).
.TP
\f4\-s \f2nettype\f1
Compile into server-side stubs for all the
transports belonging to the class
\f2nettype\f1.
The supported classes are
\f4netpath\f1,
\f4visible\f1,
\f4circuit_n\f1,
\f4circuit_v\f1,
\f4datagram_n\f1,
\f4datagram_v\f1,
\f4tcp\f1,
and
\f4udp\f1
[see \f4rpc\fP(3N)
for the meanings associated with these classes].
This option may be specified more than once.
Note:
the transports are chosen at run time and not at compile time.
.TP
\f4\-Sc\f1
Generate sample code to show the use of remote procedure and how to bind
to the server before calling the client side stubs generated by rpcgen.
.TP
\f4\-Ss\f1
Generate skeleton code for the remote procedures on the server side. You would need
to fill in the actual code for the remote procedures.
.TP
\f4\-t\f1
Compile into RPC dispatch table.
.TP
\f4\-T\f1
Generate the code to support RPC dispatch tables.
.P
The options
\f4\-c\f1,
\f4\-h\f1,
\f4\-l\f1,
\f4\-m\f1,
\f4\-s\f1
and
\f4\-t\f1
are used exclusively to generate a particular type of file,
while the options
\f4\-D\f1
and
\f4\-T\f1
are global and can be used with the other options.
.br
.ne 5
.SH NOTES
The RPC Language does not support nesting of structures.
As a work-around,
structures can be declared at the top-level,
and their name used inside other structures in
order to achieve the same effect.
.P
Name clashes can occur when using program definitions,
since the apparent scoping does not really apply.
Most of these can be avoided by giving
unique names for programs,
versions,
procedures and types.
.P
The server code generated with
\f4\-n\f1
option refers to the transport indicated by
\f2netid\f1
and hence is very site specific.
.SH EXAMPLE
The following example:
.IP
.ft 4
$ rpcgen \-T prot.x
.ft 1
.P
generates the five files:
\f4prot.h\f1,
\f4prot_clnt.c\f1,
\f4prot_svc.c\f1,
\f4prot_xdr.c\f1
and
\f4prot_tbl.i\f1.
.P
The following example sends the C data-definitions (header file)
to the standard output.
.IP
.ft 4
$ rpcgen \-h prot.x
.ft 1
.P
To send the test version of the
\f4-DTEST\f1,
server side stubs for
all the transport belonging to the class
\f4datagram_n\f1
to standard output, use:
.IP
.ft 4
$ rpcgen \-s datagram_n \-DTEST prot.x
.ft 1
.P
To create the server side stubs for the transport indicated
by
\f2netid\f1
\f4tcp\f1,
use:
.IP
.ft 4
$ rpcgen \-n tcp \-o prot_svc.c prot.x
.ft 1
.SH "SEE ALSO"
\f4gcc\fP(1).
man-pages-3.66/man1/sprof.1000064400000000000000000000121431233441571000153660ustar00rootroot00000000000000.rn '' }`
''' $RCSfile: sprof.1,v $$Revision: 1.1 $$Date: 2001/04/30 18:03:09 $
'''
''' $Log: sprof.1,v $
''' Revision 1.1 2001/04/30 18:03:09 mci
''' - Disabled patch 3 (now we haven't this paths)
''' - added man for ld-linux.so
''' - remove time.1 (it is in time package)
''' - man-pages-extralocale.tar.bz2, man2.tar.gz replaced
''' by just non packed files (this better for storing in CVS)
''' - patch to replace cc(1) -> gcc(1), ld.so -> ld-linux.so
'''
'''
.de Sh
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Ip
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R

.fi
..
'''
'''
''' Set up \*(-- to give an unbreakable dash;
''' string Tr holds user defined translation string.
''' Bell System Logo is used as a dummy character.
'''
.tr \(*W-|\(bv\*(Tr
.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" ""
''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
''' \*(L" and \*(R", except that they are used on ".xx" lines,
''' such as .IP and .SH, which do another additional levels of
''' double-quote interpretation
.ds M" """
.ds S" """
.ds N" """""
.ds T" """""
.ds L' '
.ds R' '
.ds M' '
.ds S' '
.ds N' '
.ds T' '
'br\}
.el\{\
.ds -- \(em\|
.tr \*(Tr
.ds L" ``
.ds R" ''
.ds M" ``
.ds S" ''
.ds N" ``
.ds T" ''
.ds L' `
.ds R' '
.ds M' `
.ds S' '
.ds N' `
.ds T' '
.ds PI \(*p
'br\}
.\" If the F register is turned on, we'll generate
.\" index entries out stderr for the following things:
.\" TH Title
.\" SH Header
.\" Sh Subsection
.\" Ip Item
.\" X<> Xref (embedded
.\" Of course, you have to process the output yourself
.\" in some meaninful fashion.
.if \nF \{
.de IX
.tm Index:\\$1\t\\n%\t"\\$2"
..
.nr % 0
.rr F
.\}
.TH SPROF 1 "ALT Linux" "March 2001" "ALT Linux"
.UC
.if n .hy 0
.if n .na
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.de CQ \" put $1 in typewriter font
.ft CW
'if n "\c
'if t \\&\\$1\c
'if n \\&\\$1\c
'if n \&"
\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
'.ft R
..
.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
. \" AM - accent mark definitions
.bd B 3
. \" 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 ? ?
. ds ! !
. ds /
. ds q
.\}
.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 ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
. ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
. ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
.\}
. \" 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 v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
.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
.ds oe o\h'-(\w'o'u*4/10)'e
.ds Oe O\h'-(\w'O'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 v \h'-1'\o'\(aa\(ga'
. ds _ \h'-1'^
. ds . \h'-1'.
. ds 3 3
. 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
. ds oe oe
. ds Oe OE
.\}
.rm #[ #] #H #V #F C
.SH "NAME"
sprof \- Read and display shared object profiling data
.SH "SYNOPSIS"
\fBsprof\fR \fB\-p\fR|\fB\-c\fR [\fB\-q\fR]
.SH "DESCRIPTION"
\fB--call-pairs\fR, \fB\-c\fR
.PP
.Vb 1
\& print list of count paths and their number of use
.Ve
\fB--flat-profile\fR, \fB\-p\fR
.PP
.Vb 1
\& generate flat profile with counts and ticks
.Ve
\fB--graph\fR, \fB\-q\fR
.PP
.Vb 1
\& generate call graph
.Ve
.SH "AUTHOR"
sprof is written by Ulrich Drepper for the GNU C Library
.PP
This man page is written by Joel Klecker <espy@debian.org> for
the Debian GNU/Linux system.

.rn }` ''
.IX Title "SPROF 1"
.IX Name "sprof - Read and display shared object profiling data"

.IX Header "NAME"

.IX Header "SYNOPSIS"

.IX Header "DESCRIPTION"

.IX Header "AUTHOR"

man-pages-3.66/man3/000075500000000000000000000000001233441571000141545ustar00rootroot00000000000000man-pages-3.66/man3/crypt-owl.3000064400000000000000000000345141233441571000162070ustar00rootroot00000000000000.\" Written by Solar Designer and placed in the public domain.
.\"
.\" This manual page in its current form is intended for use on systems
.\" based on the GNU C Library with crypt_blowfish patched into libcrypt.
.\"
.TH CRYPT 3 "22 February 2005" "Openwall Project" "Library functions"
.ad l
.\" No macros in NAME to keep makewhatis happy.
.SH NAME
\fBcrypt\fR, \fBcrypt_r\fR, \fBcrypt_rn\fR, \fBcrypt_ra\fR,
\fBcrypt_gensalt\fR, \fBcrypt_gensalt_rn\fR, \fBcrypt_gensalt_ra\fR
\- password hashing
.SH SYNOPSIS
.B #define _XOPEN_SOURCE
.br
.B #include <unistd.h>
.sp
.in +8
.ti -8
.BI "char *crypt(const char *" key ", const char *" setting );
.in -8
.sp
.B #define _GNU_SOURCE
.br
.B #include <crypt.h>
.sp
.in +8
.ti -8
.BI "char *crypt_r(const char *" key ", const char *" setting ", struct crypt_data *" data );
.in -8
.sp
.B #define _OW_SOURCE
.br
.B #include <crypt.h>
.sp
.in +8
.ti -8
.BI "char *crypt_rn(const char *" key ", const char *" setting ", void *" data ", int " size );
.ti -8
.BI "char *crypt_ra(const char *" key ", const char *" setting ", void **" data ", int *" size );
.ti -8
.BI "char *crypt_gensalt(const char *" prefix ", unsigned long " count ", const char *" input ", int " size );
.ti -8
.BI "char *crypt_gensalt_rn(const char *" prefix ", unsigned long " count ", const char *" input ", int " size ", char *" output ", int " output_size );
.ti -8
.BI "char *crypt_gensalt_ra(const char *" prefix ", unsigned long " count ", const char *" input ", int " size );
.ad b
.de crypt
.BR crypt ,
.BR crypt_r ,
.BR crypt_rn ", \\$1"
.ie "\\$2"" .B crypt_ra
.el .BR crypt_ra "\\$2"
..
.de crypt_gensalt
.BR crypt_gensalt ,
.BR crypt_gensalt_rn ", \\$1"
.ie "\\$2"" .B crypt_gensalt_ra
.el .BR crypt_gensalt_ra "\\$2"
..
.SH DESCRIPTION
The
.crypt and
functions calculate a cryptographic hash function of
.I key
with one of a number of supported methods as requested with
.IR setting ,
which is also used to pass a salt and possibly other parameters to
the chosen method.
The hashing methods are explained below.
.PP
Unlike
.BR crypt ,
the functions
.BR crypt_r ,
.BR crypt_rn " and"
.B crypt_ra
are reentrant.
They place their result and possibly their private data in a
.I data
area of
.I size
bytes as passed to them by an application and/or in memory they
allocate dynamically. Some hashing algorithms may use the data area to
cache precomputed intermediate values across calls. Thus, applications
must properly initialize the data area before its first use.
.B crypt_r
requires that only
.I data->initialized
be reset to zero;
.BR crypt_rn " and " crypt_ra
require that either the entire data area is zeroed or, in the case of
.BR crypt_ra ,
.I *data
is NULL. When called with a NULL
.I *data
or insufficient
.I *size
for the requested hashing algorithm,
.B crypt_ra
uses
.BR realloc (3)
to allocate the required amount of memory dynamically. Thus,
.B crypt_ra
has the additional requirement that
.IR *data ,
when non-NULL, must point to an area allocated either with a previous
call to
.B crypt_ra
or with a
.BR malloc (3)
family call.
The memory allocated by
.B crypt_ra
should be freed with
.BR free "(3)."
.PP
The
.crypt_gensalt and
functions compile a string for use as
.I setting
\- with the given
.I prefix
(used to choose a hashing method), the iteration
.I count
(if supported by the chosen method) and up to
.I size
cryptographically random
.I input
bytes for use as the actual salt.
If
.I count
is 0, a low default will be picked.
The random bytes may be obtained from
.BR /dev/urandom .
Unlike
.BR crypt_gensalt ,
the functions
.BR crypt_gensalt_rn " and " crypt_gensalt_ra
are reentrant.
.B crypt_gensalt_rn
places its result in the
.I output
buffer of
.I output_size
bytes.
.B crypt_gensalt_ra
allocates memory for its result dynamically. The memory should be
freed with
.BR free "(3)."
.SH RETURN VALUE
Upon successful completion, the functions
.crypt and
return a pointer to a string containing the setting that was actually used
and a printable encoding of the hash function value.
The entire string is directly usable as
.I setting
with other calls to
.crypt and
and as
.I prefix
with calls to
.crypt_gensalt and .
.PP
The behavior of
.B crypt
on errors isn't well standardized. Some implementations simply can't fail
(unless the process dies, in which case they obviously can't return),
others return NULL or a fixed string. Most implementations don't set
.IR errno ,
but some do. SUSv2 specifies only returning NULL and setting
.I errno
as a valid behavior, and defines only one possible error
.RB "(" ENOSYS ,
"The functionality is not supported on this implementation.")
Unfortunately, most existing applications aren't prepared to handle
NULL returns from
.BR crypt .
The description below corresponds to this implementation of
.BR crypt " and " crypt_r
only, and to
.BR crypt_rn " and " crypt_ra .
The behavior may change to match standards, other implementations or
existing applications.
.PP
.BR crypt " and " crypt_r
may only fail (and return) when passed an invalid or unsupported
.IR setting ,
in which case they return a pointer to a magic string that is
shorter than 13 characters and is guaranteed to differ from
.IR setting .
This behavior is safe for older applications which assume that
.B crypt
can't fail, when both setting new passwords and authenticating against
existing password hashes.
.BR crypt_rn " and " crypt_ra
return NULL to indicate failure. All four functions set
.I errno
when they fail.
.PP
The functions
.crypt_gensalt and
return a pointer to the compiled string for
.IR setting ,
or NULL on error in which case
.I errno
is set.
.SH ERRORS
.TP
.B EINVAL
.crypt "" :
.I setting
is invalid or not supported by this implementation;
.sp
.crypt_gensalt "" :
.I prefix
is invalid or not supported by this implementation;
.I count
is invalid for the requested
.IR prefix ;
the input
.I size
is insufficient for the smallest valid salt with the requested
.IR prefix ;
.I input
is NULL.
.TP
.B ERANGE
.BR crypt_rn :
the provided data area
.I size
is insufficient for the requested hashing algorithm;
.sp
.BR crypt_gensalt_rn :
.I output_size
is too small to hold the compiled
.I setting
string.
.TP
.B ENOMEM
.B crypt
(original glibc only):
failed to allocate memory for the output buffer (which subsequent calls
would re-use);
.sp
.BR crypt_ra :
.I *data
is NULL or
.I *size
is insufficient for the requested hashing algorithm and
.BR realloc (3)
failed;
.sp
.BR crypt_gensalt_ra :
failed to allocate memory for the compiled
.I setting
string.
.TP
.B ENOSYS
.B crypt
(SUSv2):
the functionality is not supported on this implementation;
.sp
.BR crypt ,
.B crypt_r
(glibc 2.0 to 2.0.1 only):
.de no-crypt-add-on
the crypt add-on is not compiled in and
.I setting
requests something other than the MD5-based algorithm.
..
.no-crypt-add-on
.TP
.B EOPNOTSUPP
.BR crypt ,
.B crypt_r
(glibc 2.0.2 to 2.1.3 only):
.no-crypt-add-on
.SH HASHING METHODS
The implemented hashing methods are intended specifically for processing
user passwords for storage and authentication;
they are at best inefficient for most other purposes.
.PP
It is important to understand that password hashing is not a replacement
for strong passwords.
It is always possible for an attacker with access to password hashes
to try guessing candidate passwords against the hashes.
There are, however, certain properties a password hashing method may have
which make these key search attacks somewhat harder.
.PP
All of the hashing methods use salts such that the same
.I key
may produce many possible hashes.
Proper use of salts may defeat a number of attacks, including:
.TP
1.
The ability to try candidate passwords against multiple hashes at the
price of one.
.TP
2.
The use of pre-hashed lists of candidate passwords.
.TP
3.
The ability to determine whether two users (or two accounts of one user)
have the same or different passwords without actually having to guess
one of the passwords.
.PP
The key search attacks depend on computing hashes of large numbers of
candidate passwords.
Thus, the computational cost of a good password hashing method must be
high \- but of course not too high to render it impractical.
.PP
All hashing methods implemented within the
.crypt and
interfaces use multiple iterations of an underlying cryptographic
primitive specifically in order to increase the cost of trying a
candidate password.
Unfortunately, due to hardware improvements, the hashing methods which
have a fixed cost become increasingly less secure over time.
.PP
In addition to salts, modern password hashing methods accept a variable
iteration
.IR count .
This makes it possible to adapt their cost to the hardware improvements
while still maintaining compatibility.
.PP
The following hashing methods are or may be implemented within the
described interfaces:
.PP
.de hash
.ad l
.TP
.I prefix
.ie "\\$1"" \{\
"" (empty string);
.br
a string matching ^[./0-9A-Za-z]{2} (see
.BR regex (7))
.\}
.el "\\$1"
.TP
.B Encoding syntax
\\$2
.TP
.B Maximum password length
\\$3 (uses \\$4-bit characters)
.TP
.B Effective key size
.ie "\\$5"" limited by the hash size only
.el up to \\$5 bits
.TP
.B Hash size
\\$6 bits
.TP
.B Salt size
\\$7 bits
.TP
.B Iteration count
\\$8
.ad b
..
.ti -2
.B Traditional DES-based
.br
This method is supported by almost all implementations of
.BR crypt .
Unfortunately, it no longer offers adequate security because of its many
limitations.
Thus, it should not be used for new passwords unless you absolutely have
to be able to migrate the password hashes to other systems.
.hash "" "[./0-9A-Za-z]{13}" 8 7 56 64 12 25
.PP
.ti -2
.B Extended BSDI-style DES-based
.br
This method is used on BSDI and is also available on at least NetBSD,
OpenBSD, and FreeBSD due to the use of David Burren's FreeSec library.
.hash _ "_[./0-9A-Za-z]{19}" unlimited 7 56 64 24 "1 to 2**24-1 (must be odd)"
.PP
.ti -2
.B FreeBSD-style MD5-based
.br
This is Poul-Henning Kamp's MD5-based password hashing method originally
developed for FreeBSD.
It is currently supported on many free Unix-like systems, on Solaris 10,
and it is a part of the official glibc.
Its main disadvantage is the fixed iteration count, which is already
too low for the currently available hardware.
.hash "$1$" "\e$1\e$[^$]{1,8}\e$[./0-9A-Za-z]{22}" unlimited 8 "" 128 "6 to 48" 1000
.PP
.ti -2
.BR "OpenBSD-style Blowfish-based" " (" bcrypt )
.br
.B bcrypt
was originally developed by Niels Provos and David Mazieres for OpenBSD
and is also supported on recent versions of FreeBSD and NetBSD,
on Solaris 10, and on several GNU/*/Linux distributions.
It is, however, not a part of the official glibc.
.PP
While both
.B bcrypt
and the BSDI-style DES-based hashing offer a variable iteration count,
.B bcrypt
may scale to even faster hardware, doesn't allow for certain optimizations
specific to password cracking only, doesn't have the effective key size
limitation, and uses 8-bit characters in passwords.
.hash "$2a$" "\e$2a\e$[0-9]{2}\e$[./A-Za-z0-9]{53}" 72 8 "" 184 128 "2**4 to 2**99 (current implementations are limited to 2**31 iterations)"
.PP
With
.BR bcrypt ,
the
.I count
passed to
.crypt_gensalt and
is the base-2 logarithm of the actual iteration count.
.SH PORTABILITY NOTES
Programs using any of these functions on a glibc 2.x system must be
linked against
.BR libcrypt .
However, many Unix-like operating systems and older versions of the
GNU C Library include the
.BR crypt " function in " libc .
.PP
The
.BR crypt_r ,
.BR crypt_rn ,
.BR crypt_ra ,
.crypt_gensalt and
functions are very non-portable.
.PP
The set of supported hashing methods is implementation-dependent.
.SH CONFORMING TO
The
.B crypt
function conforms to SVID, X/OPEN, and is available on BSD 4.3.
The strings returned by
.B crypt
are not required to be portable among conformant systems.
.PP
.B crypt_r
is a GNU extension.
There's also a
.B crypt_r
function on HP-UX and MKS Toolkit, but the prototypes and semantics differ.
.PP
.B crypt_gensalt
is an Openwall extension.
There's also a
.B crypt_gensalt
function on Solaris 10, but the prototypes and semantics differ.
.PP
.BR crypt_rn ,
.BR crypt_ra ,
.BR crypt_gensalt_rn ,
and
.B crypt_gensalt_ra
are Openwall extensions.
.SH HISTORY
A rotor-based
.B crypt
function appeared in Version 6 AT&T UNIX.
The "traditional"
.B crypt
first appeared in Version 7 AT&T UNIX.
.PP
The
.B crypt_r
function was introduced during glibc 2.0 development.
.SH BUGS
The return values of
.BR crypt " and " crypt_gensalt
point to static buffers that are overwritten by subsequent calls.
These functions are not thread-safe.
.RB ( crypt
on recent versions of Solaris uses thread-specific data and actually is
thread-safe.)
.PP
The strings returned by certain other implementations of
.B crypt
on error may be stored in read-only locations or only initialized once,
which makes it unsafe to always attempt to zero out the buffer normally
pointed to by the
.B crypt
return value as it would otherwise be preferable for security reasons.
The problem could be avoided with the use of
.BR crypt_r ,
.BR crypt_rn ,
or
.B crypt_ra
where the application has full control over output buffers of these functions
(and often over some of their private data as well).
Unfortunately, the functions aren't (yet?) available on platforms where
.B crypt
has this undesired property.
.PP
Applications using the thread-safe
.B crypt_r
need to allocate address space for the large (over 128 KB)
.I struct crypt_data
structure. Each thread needs a separate instance of the structure. The
.B crypt_r
interface makes it impossible to implement a hashing algorithm which
would need to keep an even larger amount of private data, without breaking
binary compatibility.
.B crypt_ra
allows for dynamically increasing the allocation size as required by the
hashing algorithm that is actually used. Unfortunately,
.B crypt_ra
is even more non-portable than
.BR crypt_r .
.PP
Multi-threaded applications or library functions which are meant to be
thread-safe should use
.BR crypt_gensalt_rn " or " crypt_gensalt_ra
rather than
.BR crypt_gensalt .
.SH SEE ALSO
.BR login (1),
.BR passwd (1),
.BR crypto (3),
.BR encrypt (3),
.BR free (3),
.BR getpass (3),
.BR getpwent (3),
.BR malloc (3),
.BR realloc (3),
.BR shadow (3),
.BR passwd (5),
.BR shadow (5),
.BR regex (7),
.BR pam (8)
.sp
Niels Provos and David Mazieres. A Future-Adaptable Password Scheme.
Proceedings of the 1999 USENIX Annual Technical Conference, June 1999.
.br
http://www.usenix.org/events/usenix99/provos.html
.sp
Robert Morris and Ken Thompson. Password Security: A Case History.
Unix Seventh Edition Manual, Volume 2, April 1978.
.br
http://plan9.bell-labs.com/7thEdMan/vol2/password
man-pages-3.66/man3/crypt_gensalt.3000064400000000000000000000000211233441571000171070ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/crypt_gensalt_ra.3000064400000000000000000000000211233441571000175710ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/crypt_gensalt_rn.3000064400000000000000000000000211233441571000176060ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/crypt_r.3000064400000000000000000000000211233441571000157130ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/crypt_ra.3000064400000000000000000000000211233441571000160540ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/crypt_rn.3000064400000000000000000000000211233441571000160710ustar00rootroot00000000000000.so man3/crypt.3
man-pages-3.66/man3/strlcat.3000064400000000000000000000000221233441571000157060ustar00rootroot00000000000000.so man3/strlcpy.3man-pages-3.66/man3/strlcpy.3000064400000000000000000000116141233441571000157430ustar00rootroot00000000000000.\" $OpenBSD: strlcpy.3,v 1.13 2001/06/18 22:29:59 millert Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd June 22, 1998
.Dt STRLCPY 3
.Os
.Sh NAME
.Nm strlcpy ,
.Nm strlcat
.Nd size-bounded string copying and concatenation
.Sh SYNOPSIS
.Fd #include <string.h>
.Ft size_t
.Fn strlcpy "char *dst" "const char *src" "size_t size"
.Ft size_t
.Fn strlcat "char *dst" "const char *src" "size_t size"
.Sh DESCRIPTION
The
.Fn strlcpy
and
.Fn strlcat
functions copy and concatenate strings respectively.
They are designed
to be safer, more consistent, and less error prone replacements for
.Xr strncpy 3
and
.Xr strncat 3 .
Unlike those functions,
.Fn strlcpy
and
.Fn strlcat
take the full size of the buffer (not just the length) and guarantee to
NUL-terminate the result (as long as
.Fa size
is larger than 0 or, in the case of
.Fn strlcat ,
as long as there is at least one byte free in
.Fa dst ) .
Note that you should include a byte for the NUL in
.Fa size .
Also note that
.Fn strlcpy
and
.Fn strlcat
only operate on true
.Dq C
strings.
This means that for
.Fn strlcpy
.Fa src
must be NUL-terminated and for
.Fn strlcat
both
.Fa src
and
.Fa dst
must be NUL-terminated.
.Pp
The
.Fn strlcpy
function copies up to
.Fa size
- 1 characters from the NUL-terminated string
.Fa src
to
.Fa dst ,
NUL-terminating the result.
.Pp
The
.Fn strlcat
function appends the NUL-terminated string
.Fa src
to the end of
.Fa dst .
It will append at most
.Fa size
- strlen(dst) - 1 bytes, NUL-terminating the result.
.Sh RETURN VALUES
The
.Fn strlcpy
and
.Fn strlcat
functions return the total length of the string they tried to create.
For
.Fn strlcpy
that means the length of
.Fa src .
For
.Fn strlcat
that means the initial length of
.Fa dst
plus
the length of
.Fa src .
While this may seem somewhat confusing it was done to make
truncation detection simple.
.Pp
Note however, that if
.Fn strlcat
traverses
.Fa size
characters without finding a NUL, the length of the string is considered
to be
.Fa size
and the destination string will not be NUL-terminated (since there was
no space for the NUL).
This keeps
.Fn strlcat
from running off the end of a string.
In practice this should not happen (as it means that either
.Fa size
is incorrect or that
.Fa dst
is not a proper
.Dq C
string).
The check exists to prevent potential security problems in incorrect code.
.Sh EXAMPLES
The following code fragment illustrates the simple case:
.Bd -literal -offset indent
char *s, *p, buf[BUFSIZ];

\&...

(void)strlcpy(buf, s, sizeof(buf));
(void)strlcat(buf, p, sizeof(buf));
.Ed
.Pp
To detect truncation, perhaps while building a pathname, something
like the following might be used:
.Bd -literal -offset indent
char *dir, *file, pname[MAXPATHLEN];

\&...

if (strlcpy(pname, dir, sizeof(pname)) >= sizeof(pname))
goto toolong;
if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname))
goto toolong;
.Ed
.Pp
Since we know how many characters we copied the first time, we can
speed things up a bit by using a copy instead of an append:
.Bd -literal -offset indent
char *dir, *file, pname[MAXPATHLEN];
size_t n;

\&...

n = strlcpy(pname, dir, sizeof(pname));
if (n >= sizeof(pname))
goto toolong;
if (strlcpy(pname + n, file, sizeof(pname) - n) >= sizeof(pname) - n)
goto toolong;
.Ed
.Pp
However, one may question the validity of such optimizations, as they
defeat the whole purpose of
.Fn strlcpy
and
.Fn strlcat .
As a matter of fact, the first version of this manual page got it wrong.
.Sh SEE ALSO
.Xr snprintf 3 ,
.Xr strncat 3 ,
.Xr strncpy 3
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin