diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 2001-04-26 13:33:01 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 2001-04-26 13:33:01 +0000 |
| commit | bb7963a8c8ec30ed68bbf9c85f4dbcddbac4489a (patch) | |
| tree | 67ef55cce7095c116f3a37ddf40b534eb1f98a5d | |
| parent | 3ed7791369a5842a8c5919e9fc11fec2caa7057d (diff) | |
Notes
| -rw-r--r-- | contrib/file/Magdir/mips | 177 | ||||
| -rw-r--r-- | contrib/groff/src/roff/nroff/nroff.man | 120 | ||||
| -rwxr-xr-x | contrib/groff/src/roff/nroff/nroff.sh | 99 | ||||
| -rwxr-xr-x | etc/periodic/daily/470.status-named | 71 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/font/devkoi8-r/R.proto | 315 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/koi8-r | 149 | ||||
| -rw-r--r-- | gnu/usr.bin/groff/tmac/mdoc.local | 63 | ||||
| -rw-r--r-- | lib/libc/gen/fmtcheck.3 | 106 | ||||
| -rw-r--r-- | sbin/fsck/fsutil.c | 406 | ||||
| -rw-r--r-- | sbin/fsck/fsutil.h | 65 | ||||
| -rw-r--r-- | sys/dev/sound/pci/als4000.h | 96 | ||||
| -rw-r--r-- | sys/modules/sound/driver/als4000/Makefile | 9 | ||||
| -rw-r--r-- | usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg | 187 |
13 files changed, 1863 insertions, 0 deletions
diff --git a/contrib/file/Magdir/mips b/contrib/file/Magdir/mips new file mode 100644 index 000000000000..9333bde9fcb4 --- /dev/null +++ b/contrib/file/Magdir/mips @@ -0,0 +1,177 @@ + +#------------------------------------------------------------------------------ +# mips: file(1) magic for Silicon Graphics (MIPS, IRIS, IRIX, etc.) +# Dec Ultrix (MIPS) +# all of SGI's *current* machines and OSes run in big-endian mode on the +# MIPS machines, as far as I know. +# +# XXX - what is the blank "-" line? +# +# kbd file definitions +0 string kbd!map kbd map file +>8 byte >0 Ver %d: +>10 short >0 with %d table(s) +0 belong 0407 old SGI 68020 executable +0 belong 0410 old SGI 68020 pure executable +0 beshort 0x8765 disk quotas file +0 beshort 0x0506 IRIS Showcase file +>2 byte 0x49 - +>3 byte x - version %ld +0 beshort 0x0226 IRIS Showcase template +>2 byte 0x63 - +>3 byte x - version %ld +0 belong 0x5343464d IRIS Showcase file +>4 byte x - version %ld +0 belong 0x5443464d IRIS Showcase template +>4 byte x - version %ld +0 belong 0xdeadbabe IRIX Parallel Arena +>8 belong >0 - version %ld +# +0 beshort 0x0160 MIPSEB ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>22 byte x - version %ld +>23 byte x .%ld +# +0 beshort 0x0162 MIPSEL-BE ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %d +>22 byte x .%ld +# +0 beshort 0x6001 MIPSEB-LE ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %d +>22 byte x .%ld +# +0 beshort 0x6201 MIPSEL ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %ld +>22 byte x .%ld +# +# MIPS 2 additions +# +0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>22 byte x - version %ld +>23 byte x .%ld +# +0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>22 byte x - version %ld +>23 byte x .%ld +# +0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %ld +>22 byte x .%ld +# +0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %ld +>22 byte x .%ld +# +# MIPS 3 additions +# +0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>22 byte x - version %ld +>23 byte x .%ld +# +0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable +>20 beshort 0407 (impure) +>20 beshort 0410 (swapped) +>20 beshort 0413 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>22 byte x - version %ld +>23 byte x .%ld +# +0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %ld +>22 byte x .%ld +# +0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable +>20 beshort 03401 (impure) +>20 beshort 04001 (swapped) +>20 beshort 05401 (paged) +>8 belong >0 not stripped +>8 belong 0 stripped +>23 byte x - version %ld +>22 byte x .%ld +# +0 beshort 0x180 MIPSEB Ucode +0 beshort 0x182 MIPSEL-BE Ucode +# 32bit core file +0 belong 0xdeadadb0 IRIX core dump +>4 belong 1 of +>16 string >\0 '%s' +# 64bit core file +0 belong 0xdeadad40 IRIX 64-bit core dump +>4 belong 1 of +>16 string >\0 '%s' +# N32bit core file +0 belong 0xbabec0bb IRIX N32 core dump +>4 belong 1 of +>16 string >\0 '%s' +# New style crash dump file +0 string \x43\x72\x73\x68\x44\x75\x6d\x70 IRIX vmcore dump of +>36 string >\0 '%s' +# Trusted IRIX info +0 string SGIAUDIT SGI Audit file +>8 byte x - version %d +>9 byte x .%ld +# +0 string WNGZWZSC Wingz compiled script +0 string WNGZWZSS Wingz spreadsheet +0 string WNGZWZHP Wingz help file +# +0 string \#Inventor V IRIS Inventor 1.0 file +0 string \#Inventor V2 Open Inventor 2.0 file +# GLF is OpenGL stream encoding +0 string glfHeadMagic(); GLF_TEXT +4 belong 0x7d000000 GLF_BINARY_LSB_FIRST +4 belong 0x0000007d GLF_BINARY_MSB_FIRST +# GLS is OpenGL stream encoding; GLS is the successor of GLF +0 string glsBeginGLS( GLS_TEXT +4 belong 0x10000000 GLS_BINARY_LSB_FIRST +4 belong 0x00000010 GLS_BINARY_MSB_FIRST diff --git a/contrib/groff/src/roff/nroff/nroff.man b/contrib/groff/src/roff/nroff/nroff.man new file mode 100644 index 000000000000..2f4270222c37 --- /dev/null +++ b/contrib/groff/src/roff/nroff/nroff.man @@ -0,0 +1,120 @@ +.ig \"-*- nroff -*- +Copyright (C) 1989-2000 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the +entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + +Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be included in +translations approved by the Free Software Foundation instead of in +the original English. + + $FreeBSD$ + +.. +.TH @G@NROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" +.SH NAME +@g@nroff \- emulate nroff command with groff +.SH SYNOPSIS +.nr a \n(.j +.ad l +.nr i \n(.i +.in +\w'\fB@g@nroff 'u +.ti \niu +.B @g@nroff +.de OP +.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" +.el .RB "[\ " "\\$1" "\ ]" +.. +.OP \-v +.OP \-h +.OP \-i +.OP \-m name +.OP \-n num +.OP \-o list +.OP \-p +.OP \-r cn +.OP \-t +.OP \-T name +.RI "[\ " file\|.\|.\|. "\ ]" +.br +.ad \na +.SH DESCRIPTION +The +.B @g@nroff +script emulates the +.B nroff +command using groff. +The +.B \-T +option with an argument other than +.BR ascii , +.BR latin1 , +.BR koi8-r , +.BR utf8 , +or +.B cp1047 +will be ignored (and +.B \-Tascii +will be used). +The +.B \-h +option +is equivalent to the +.B grotty +.B \-h +option. +The +.BR \-i , +.BR \-n , +.BR \-m , +.B \-o +and +.B \-r +options have the effect described in +.BR @g@troff (@MAN1EXT@). +In addition +.B @g@nroff +silently ignores options of +.BR \-e , +.B \-q +or +.BR \-s . +Options +.B \-p +(pic), +.B \-t +(tbl), +.B \-S +(safer) and +.B \-U +(unsafe) are passed to +.BR groff . +.B \-S +is passed by default. +.B \-v +shows the version number. +.SH ENVIRONMENT +.TP +.SM +.B GROFF_BIN_PATH +A colon separated list of directories in which to search for the +.B groff +executable before searching in PATH. If unset, `@BINDIR@' is used. +.SH NOTES +This shell script is basically intended for use with +.BR man (1), +so warnings are suppressed. +nroff-style character definitions (in the file tty-char.tmac) are also +loaded to emulate unrepresentable glyphs. +.SH "SEE ALSO" +.BR groff (@MAN1EXT@), +.BR @g@troff (@MAN1EXT@), +.BR grotty (@MAN1EXT@) diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh new file mode 100755 index 000000000000..e16472e61617 --- /dev/null +++ b/contrib/groff/src/roff/nroff/nroff.sh @@ -0,0 +1,99 @@ +#!/bin/sh +# Emulate nroff with groff. +# $FreeBSD$ + +prog="$0" +# Default device. +# First try the "locale charmap" command, because it's most reliable. +# On systems where it doesn't exist, look at the environment variables. +case "`#locale charmap 2>/dev/null`" in + UTF-8) + T=-Tutf8 ;; + ISO-8859-1) + T=-Tlatin1 ;; + IBM-1047) + T=-Tcp1047 ;; + *) + case "${LC_ALL-${LC_CTYPE-${LANG}}}" in + *.UTF-8) + T=-Tutf8 ;; + iso_8859_1 | *.ISO-8859-1 | *.ISO_8859-1) + T=-Tlatin1 ;; + *.IBM-1047) + T=-Tcp1047 ;; + *.KOI8-R) + T=-Tkoi8-r ;; + *) + case "$LESSCHARSET" in + utf-8) + T=-Tutf8 ;; + latin1) + T=-Tlatin1 ;; + cp1047) + T=-Tcp1047 ;; + *) + T=-Tascii ;; + esac ;; + esac ;; +esac +opts= +safer=-S + +# `for i; do' doesn't work with some versions of sh + +for i + do + case $1 in + -h) + opts="$opts -P-h" ;; + -[eq] | -s*) + # ignore these options + ;; + -[mrnoT]) + echo "$prog: option $1 requires an argument" >&2 + exit 1 ;; + -[ipt] | -[mrno]*) + opts="$opts $1" ;; + -Tascii | -Tlatin1 | -Tkoi8-r | -Tutf8 | -Tcp1047) + T=$1 ;; + -T*) + # ignore other devices + ;; + -S) + # safer behaviour + safer=-S ;; + -U) + # unsafe behaviour + safer=-U ;; + -u*) + # Solaris 2.2 `man' uses -u0; ignore it, + # since `less' and `more' can use the emboldening info. + ;; + -v | --version) + echo "GNU nroff (groff) version @VERSION@" + exit 0 ;; + --help) + echo "usage: nroff [-h] [-i] [-mNAME] [-nNUM] [-oLIST] [-p] [-rCN] [-t] [-Tname] [FILE...]" + exit 0 ;; + --) + shift + break ;; + -) + break ;; + -*) + echo "$prog: invalid option $1" >&2 + exit 1 ;; + *) + break ;; + esac + shift +done + +# This shell script is intended for use with man, so warnings are +# probably not wanted. Also load nroff-style character definitions. + +: ${GROFF_BIN_PATH=@BINDIR@} +export GROFF_BIN_PATH +PATH=$GROFF_BIN_PATH:$PATH groff $safer -Wall -mtty-char $T $opts ${1+"$@"} + +# eof diff --git a/etc/periodic/daily/470.status-named b/etc/periodic/daily/470.status-named new file mode 100755 index 000000000000..d3396fa2f415 --- /dev/null +++ b/etc/periodic/daily/470.status-named @@ -0,0 +1,71 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_named_enable" in + [Yy][Ee][Ss]) + if [ "$daily_status_named_logs" -le 0 ] + then + echo '$daily_status_named_enable is set but ' \ + '$daily_status_named_logs is not greater than zero' + rc=2 + else + echo + echo 'Checking for denied zone transfers (AXFR and IXFR):' + + start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'` + n=$(($daily_status_named_logs - 2)) + rc=$({ + while [ $n -ge 0 ] + do + if [ -f /var/log/messages.$n ] + then + cat /var/log/messages.$n + elif [ -f /var/log/messages.$n.gz ] + then + zcat -fc /var/log/messages.$n.gz + fi + n=$(($n - 1)) + done + cat /var/log/messages + } | + perl -ne 'print "$2 from $1\n" + if (/$start.*named\[\d+\]: denied [AI]XFR from \[(.*)\]\.\d+ for "(.*)"/);' | + sort -f | uniq -ic | + perl -e ' + use Socket; + + while (<STDIN>) { + if (/^.*from (.*)$/) { + $ip_addr = $1; + chomp; + if ($ARGV[0] =~ /^yes$/i) { + ($host) = gethostbyaddr(inet_aton($ip_addr), AF_INET); + } else { + $host = ""; + } + + if ($host) { + print "$_ ($host)\n"; + } else { + print "$_\n"; + } + } + } + ' $daily_status_named_usedns | tee /dev/stderr | wc -l) + [ $rc -gt 0 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/gnu/usr.bin/groff/font/devkoi8-r/R.proto b/gnu/usr.bin/groff/font/devkoi8-r/R.proto new file mode 100644 index 000000000000..5d07a6af691c --- /dev/null +++ b/gnu/usr.bin/groff/font/devkoi8-r/R.proto @@ -0,0 +1,315 @@ +# $FreeBSD$ +name R +internalname 0 +spacewidth 24 +charset +! 24 0 0041 +" 24 0 0042 +dq " +lq " +rq " +# 24 0 0043 +sh " +$ 24 0 0044 +Do " +% 24 0 0045 +& 24 0 0046 +' 24 0 0047 +aa " +fm " +aq " +cq " +( 24 0 0050 +) 24 0 0051 +* 24 0 0052 +** " ++ 24 0 0053 +pl " +, 24 0 0054 +\- 24 0 0055 +hy " +- " +mi " +en " +. 24 0 0056 +/ 24 0 0057 +sl " +f/ " +0 24 0 0060 +1 24 0 0061 +2 24 0 0062 +3 24 0 0063 +4 24 0 0064 +5 24 0 0065 +6 24 0 0066 +7 24 0 0067 +8 24 0 0070 +9 24 0 0071 +: 24 0 0072 +; 24 0 0073 +< 24 0 0074 +la " +fo " += 24 0 0075 +eq " +> 24 0 0076 +ra " +fc " +? 24 0 0077 +@ 24 0 0100 +at " +A 24 0 0101 +*A " +B 24 0 0102 +*B " +C 24 0 0103 +D 24 0 0104 +E 24 0 0105 +*E " +F 24 0 0106 +G 24 0 0107 +H 24 0 0110 +*Y " +I 24 0 0111 +*I " +J 24 0 0112 +K 24 0 0113 +*K " +L 24 0 0114 +M 24 0 0115 +*M " +N 24 0 0116 +*N " +O 24 0 0117 +ci " +*O " +P 24 0 0120 +*R " +Q 24 0 0121 +R 24 0 0122 +S 24 0 0123 +T 24 0 0124 +*T " +U 24 0 0125 +V 24 0 0126 +W 24 0 0127 +X 24 0 0130 +*X " +Y 24 0 0131 +*U " +Z 24 0 0132 +*Z " +[ 24 0 0133 +lB " +\ 24 0 0134 +rs " +] 24 0 0135 +rB " +a^ 24 0 0136 +^ " +ha " +_ 24 0 0137 +ru " +ul " +` 24 0 0140 +oq " +ga " +a 24 0 0141 +b 24 0 0142 +c 24 0 0143 +d 24 0 0144 +e 24 0 0145 +f 24 0 0146 +g 24 0 0147 +h 24 0 0150 +i 24 0 0151 +.i " +j 24 0 0152 +k 24 0 0153 +l 24 0 0154 +m 24 0 0155 +n 24 0 0156 +o 24 0 0157 +*o " +p 24 0 0160 +q 24 0 0161 +r 24 0 0162 +s 24 0 0163 +t 24 0 0164 +u 24 0 0165 +v 24 0 0166 +w 24 0 0167 +x 24 0 0170 +mu " +y 24 0 0171 +z 24 0 0172 +lC 24 0 0173 +{ " +ba 24 0 0174 +or " +bv " +br " +| " +lb " +lc " +lf " +lk " +lt " +rb " +rc " +rf " +rk " +rt " +rC 24 0 0175 +} " +a~ 24 0 0176 +~ " +ap " +ti " +char128 24 0 0200 +char129 24 0 0201 +char130 24 0 0202 +char131 24 0 0203 +char132 24 0 0204 +char133 24 0 0205 +char134 24 0 0206 +char135 24 0 0207 +char136 24 0 0210 +char137 24 0 0211 +char138 24 0 0212 +char139 24 0 0213 +char140 24 0 0214 +char141 24 0 0215 +char142 24 0 0216 +char143 24 0 0217 +char144 24 0 0220 +char145 24 0 0221 +char146 24 0 0222 +char147 24 0 0223 +char148 24 0 0224 +bu 24 0 0225 +char149 " +sr 24 0 0226 +char150 " +~~ 24 0 0227 +~= " +char151 " +<= 24 0 0230 +char152 " +>= 24 0 0231 +char153 " +\ 24 0 0232 +char154 " +char155 24 0 0233 +de 24 0 0234 +char156 " +S2 24 0 0235 +char157 " +pc 24 0 0236 +char158 " +di 24 0 0237 +char159 " +char160 24 0 0240 +char161 24 0 0241 +char162 24 0 0242 +:e 24 0 0243 +char163 " +char164 24 0 0244 +char165 24 0 0245 +char166 24 0 0246 +char167 24 0 0247 +char168 24 0 0250 +char169 24 0 0251 +char170 24 0 0252 +char171 24 0 0253 +char172 24 0 0254 +char173 24 0 0255 +char174 24 0 0256 +char175 24 0 0257 +char176 24 0 0260 +char177 24 0 0261 +char178 24 0 0262 +:E 24 0 0263 +char179 " +char180 24 0 0264 +char181 24 0 0265 +char182 24 0 0266 +char183 24 0 0267 +char184 24 0 0270 +char185 24 0 0271 +char186 24 0 0272 +char187 24 0 0273 +char188 24 0 0274 +char189 24 0 0275 +char190 24 0 0276 +co 24 0 0277 +char191 " +char192 24 0 0300 +char193 24 0 0301 +char194 24 0 0302 +char195 24 0 0303 +char196 24 0 0304 +char197 24 0 0305 +*f 24 0 0306 +char198 " +char199 24 0 0307 +char200 24 0 0310 +char201 24 0 0311 +char202 24 0 0312 +char203 24 0 0313 +char204 24 0 0314 +char205 24 0 0315 +char206 24 0 0316 +char207 24 0 0317 +*p 24 0 0320 +char208 " +char209 24 0 0321 +char210 24 0 0322 +char211 24 0 0323 +char212 24 0 0324 +char213 24 0 0325 +char214 24 0 0326 +char215 24 0 0327 +char216 24 0 0330 +char217 24 0 0331 +char218 24 0 0332 +char219 24 0 0333 +char220 24 0 0334 +char221 24 0 0335 +char222 24 0 0336 +char223 24 0 0337 +char224 24 0 0340 +char225 24 0 0341 +char226 24 0 0342 +char227 24 0 0343 +char228 24 0 0344 +char229 24 0 0345 +*F 24 0 0346 +char230 " +*G 24 0 0347 +char231 " +char232 24 0 0350 +char233 24 0 0351 +char234 24 0 0352 +char235 24 0 0353 +char236 24 0 0354 +char237 24 0 0355 +char238 24 0 0356 +char239 24 0 0357 +*P 24 0 0360 +char240 " +char241 24 0 0361 +char242 24 0 0362 +char243 24 0 0363 +char244 24 0 0364 +char245 24 0 0365 +char246 24 0 0366 +char247 24 0 0367 +char248 24 0 0370 +char249 24 0 0371 +char250 24 0 0372 +char251 24 0 0373 +char252 24 0 0374 +char253 24 0 0375 +char254 24 0 0376 +char255 24 0 0377 diff --git a/gnu/usr.bin/groff/tmac/koi8-r b/gnu/usr.bin/groff/tmac/koi8-r new file mode 100644 index 000000000000..66ad1543dcd2 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/koi8-r @@ -0,0 +1,149 @@ +.\" Copyright (c) 2001 Ruslan Ermilov <ru@FreeBSD.org>. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.\" %beginstrip% +. +.\" локализация .Dt +.ds doc-volume-ds-1 Справочник основных команд FreeBSD +.ds doc-volume-ds-2 Справочник системных вызовов FreeBSD +.ds doc-volume-ds-3 Справочник библиотечных функций FreeBSD +.ds doc-volume-ds-4 Справочник интерфейсов ядра FreeBSD +.ds doc-volume-ds-5 Справочник форматов файлов FreeBSD +.ds doc-volume-ds-6 Справочник игр FreeBSD +.ds doc-volume-ds-7 Справочник разной информации FreeBSD +.ds doc-volume-ds-8 Справочник системного администратора +.ds doc-volume-ds-9 Справочник разработчика ядра FreeBSD +. +.ds doc-volume-ds-USD Дополнительные документы для пользователя +.ds doc-volume-ds-PS1 Дополнительные документы для программиста +.ds doc-volume-ds-AMD Документы унаследованного справочника +.ds doc-volume-ds-SMM Руководство системного администратора +.ds doc-volume-ds-URM Справочное руководство +.ds doc-volume-ds-PRM Руководство программиста +.ds doc-volume-ds-KM Руководство по ядру +.ds doc-volume-ds-IND Основной предметный указатель справочника +.ds doc-volume-ds-LOCAL Локальный справочник +.ds doc-volume-ds-CON Справочник по дополнительному ПО +. +.ds doc-volume-as-alpha (архитектура Alpha) +.ds doc-volume-as-amiga (архитектура Amiga) +.ds doc-volume-as-arc (архитектура Arc) +.ds doc-volume-as-arm26 (архитектура ARM26) +.ds doc-volume-as-arm32 (архитектура ARM32) +.ds doc-volume-as-atari (архитектура Atari) +.ds doc-volume-as-bebox (архитектура BEbox) +.ds doc-volume-as-cobalt (архитектура Cobalt) +.ds doc-volume-as-evbsh3 (архитектура Evbsh3) +.ds doc-volume-as-hp300 (архитектура HP300) +.ds doc-volume-as-hpcmips (архитектура HPcmips) +.ds doc-volume-as-i386 (архитектура i386) +.ds doc-volume-as-luna68k (архитектура luna68k) +.ds doc-volume-as-m68k (архитектура m68k) +.ds doc-volume-as-mac68k (архитектура mac68k) +.ds doc-volume-as-macppc (архитектура macppc) +.ds doc-volume-as-mips (архитектура MIPS) +.ds doc-volume-as-mmeye (архитектура mmeye) +.ds doc-volume-as-mvme68k (архитектура mvme68k) +.ds doc-volume-as-news68k (архитектура news68k) +.ds doc-volume-as-newsmips (архитектура newsmips) +.ds doc-volume-as-next68k (архитектура next68k) +.ds doc-volume-as-ofppc (архитектура ofppc) +.ds doc-volume-as-pc532 (архитектура pc532) +.ds doc-volume-as-pmax (архитектура pmax) +.ds doc-volume-as-powerpc (архитектура powerpc) +.ds doc-volume-as-prep (архитектура prep) +.ds doc-volume-as-sgimips (архитектура sgimips) +.ds doc-volume-as-sh3 (архитектура sh3) +.ds doc-volume-as-sparc (архитектура SPARC) +.ds doc-volume-as-sparc64 (архитектура sparc64) +.ds doc-volume-as-sun3 (архитектура sun3) +.ds doc-volume-as-tahoe (архитектура Tahoe) +.ds doc-volume-as-vax (архитектура VAX) +.ds doc-volume-as-x68k (архитектура x68k) +. +.\" локализация .Os +.ds doc-operating-system-ATT-7 7я\~редакция +.ds doc-operating-system-BSD-3 3й\~дистрибутив Беркли +.ds doc-operating-system-BSD-4 4й\~дистрибутив Беркли +.ds doc-operating-system-BSD-4.1 4.1\~дистрибутив Беркли +.ds doc-operating-system-BSD-4.2 4.2\~дистрибутив Беркли +.ds doc-operating-system-BSD-4.3 4.3\~дистрибутив Беркли +.ds doc-operating-system-BSD-4.3T 4.3-Tahoe дистрибутив Беркли +.ds doc-operating-system-BSD-4.3R 4.3-Reno дистрибутив Беркли +. +.\" локализация .Sh +.ds doc-section-name НАЗВАНИЕ +.ds doc-section-synopsis СИНТАКСИС +.ds doc-section-description ОПИСАНИЕ +.ds doc-section-see-also СМОТРИ +.ds doc-section-files ФАЙЛЫ +.ds doc-section-authors АВТОРЫ +. +.\" локализация .Lb (XXX) +.ds doc-str-Lb-libarm32 Библиотека архитектуры ARM32 (libarm32, \-larm32) +.ds doc-str-Lb-libc Стандартная библиотека\~C (libc, \-lc) +.ds doc-str-Lb-libc_r Реентерабельная библиотека\~C (libc_r, \-pthread) +.ds doc-str-Lb-libcalendar Библиотека календарной арифметики (libcalendar, \-lcalendar) +.ds doc-str-Lb-libcam Пользовательская библиотека CAM (libcam, \-lcam) +.ds doc-str-Lb-libcipher Библиотека криптографии FreeSec (libcipher, \-lcipher) +.ds doc-str-Lb-libcompat Библиотека совместимости (libcompat, \-lcompat) +.ds doc-str-Lb-libcrypt Библиотека криптографии (libcrypt, \-lcrypt) +.ds doc-str-Lb-libcurses Curses Library (libcurses, \-lcurses) +.ds doc-str-Lb-libdevstat Библиотека статистики устройств (libdevstat, \-ldevstat) +.ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) +.ds doc-str-Lb-libedit Библиотека редактора командной строки (libedit, \-ledit) +.ds doc-str-Lb-libfetch Библиотека файловой передачи (libfetch, \-lfetch) +.ds doc-str-Lb-libi386 Библиотека архитектуры i386 (libi386, \-li386) +.ds doc-str-Lb-libipsec Библиотека управления IPsec Policy (libipsec, \-lipsec) +.ds doc-str-Lb-libipx Библиотека поддержки конверсии адресов IPX (libipx, \-lipx) +.ds doc-str-Lb-libkvm Библиотека доступа к данным ядра (libkvm, \-lkvm) +.ds doc-str-Lb-libm Библиотека математических функций (libm, \-lm) +.ds doc-str-Lb-libmd Message Digest (MD4, MD5, и т.д.) Support Library (libmd, \-lmd) +.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) +.ds doc-str-Lb-libnetgraph Пользовательская библиотека Netgraph (libnetgraph, \-lnetgraph) +.ds doc-str-Lb-libossaudio Библиотека эмуляции OSS Audio (libossaudio, \-lossaudio) +.ds doc-str-Lb-libposix Библиотека \*[Px]\-совместимости (libposix, \-lposix) +.ds doc-str-Lb-libresolv DNS Resolver Library (libresolv, \-lresolv) +.ds doc-str-Lb-librpcsvc Библиотека служб RPC (librpcsvc, \-lrpcsvc) +.ds doc-str-Lb-libskey S/Key Password Control Table Access Library (libskey, \-lskey) +.ds doc-str-Lb-libtermcap Библиотека доступа к termcap (libtermcap, \-ltermcap) +.ds doc-str-Lb-libusb Библиотека функций доступа к USB HID (libusb, \-lusb) +.ds doc-str-Lb-libutil Библиотека системных утилит (libutil, \-lutil) +.ds doc-str-Lb-libvgl Библиотека видео-графики (libvgl, \-lvgl) +.ds doc-str-Lb-libz Библиотека компрессии (libz, \-lz) +. +.\" локализация .Rv +.ds doc-str-Rv-prefix "Функция +.ds doc-str-Rv-suffix "возвращает\~0 в случае успешного завершения; +.as doc-str-Rv-suffix " в противном случае она возвращает\~-1, +.as doc-str-Rv-suffix " а код ошибки сохраняется в глобальной +.as doc-str-Rv-suffix " переменной \*[doc-Va-font]errno\f[P]. +. +.\" локализация .Ar +.ds doc-str-Ar-default "файл\ .\|.\|. +. +.\" локализация .%A +.ds doc-str-dpra "и diff --git a/gnu/usr.bin/groff/tmac/mdoc.local b/gnu/usr.bin/groff/tmac/mdoc.local new file mode 100644 index 000000000000..7a5221fb0750 --- /dev/null +++ b/gnu/usr.bin/groff/tmac/mdoc.local @@ -0,0 +1,63 @@ +.\" Copyright (c) 2001 Ruslan Ermilov <ru@FreeBSD.org>. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.\" %beginstrip% +. +.\" FreeBSD section names +.ds doc-volume-ds-1 FreeBSD General Commands Manual +.ds doc-volume-ds-2 FreeBSD System Calls Manual +.ds doc-volume-ds-3 FreeBSD Library Functions Manual +.ds doc-volume-ds-4 FreeBSD Kernel Interfaces Manual +.ds doc-volume-ds-5 FreeBSD File Formats Manual +.ds doc-volume-ds-6 FreeBSD Games Manual +.ds doc-volume-ds-7 FreeBSD Miscellaneous Information Manual +.ds doc-volume-ds-8 FreeBSD System Manager's Manual +.ds doc-volume-ds-9 FreeBSD Kernel Developer's Manual +. +.\" FreeBSD .Lb values +.ds doc-str-Lb-libc_r Reentrant C\~Library (libc_r, \-lc_r) +.ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar) +.ds doc-str-Lb-libcam Common Access Method User Library (libcam, \-lcam) +.ds doc-str-Lb-libcipher FreeSec Crypt Library (libcipher, \-lcipher) +.ds doc-str-Lb-libdevinfo Device and Resource Information Utility Library (libdevinfo, \-ldevinfo) +.ds doc-str-Lb-libdevstat Device Statistics Library (libdevstat, \-ldevstat) +.ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) +.ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) +.ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) +.ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) +.ds doc-str-Lb-libmd Message Digest (MD4, MD5, etc.) Support Library (libmd, \-lmd) +.ds doc-str-Lb-libnetgraph Netgraph User Library (libnetgraph, \-lnetgraph) +.ds doc-str-Lb-librpcsvc RPC Service Library (librpcsvc, \-lrpcsvc) +.ds doc-str-Lb-libskey S/Key Password Control Table Access Library (libskey, \-lskey) +.ds doc-str-Lb-libusb USB HID access routines library (libusb, \-lusb) +.ds doc-str-Lb-libvgl Video Graphics Library (libvgl, \-lvgl) +. +.\" Default .Os value +.ds doc-operating-system FreeBSD\~5.0 +. +. +.\" KOI8-R locale support +.if "\*[.T]"koi8-r" .mso mdoc/koi8-r diff --git a/lib/libc/gen/fmtcheck.3 b/lib/libc/gen/fmtcheck.3 new file mode 100644 index 000000000000..f8a7eb966612 --- /dev/null +++ b/lib/libc/gen/fmtcheck.3 @@ -0,0 +1,106 @@ +.\" Copyright (c) 2000 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This file was contributed to The NetBSD Foundation by Allen Briggs. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the NetBSD +.\" Foundation, Inc. and its contributors. +.\" 4. Neither the name of The NetBSD Foundation nor the names of its +.\" contributors may be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.Dd October 17, 2000 +.Os +.Dt FMTCHECK 3 +.Sh NAME +.Nm fmtcheck +.Nd sanitizes user-supplied printf(3)-style format string +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.Fd #include <stdio.h> +.Ft const char * +.Fn fmtcheck "const char *fmt_suspect" "const char *fmt_default" +.Sh DESCRIPTION +The +.Fn fmtcheck +scans +.Fa fmt_suspect +and +.Fa fmt_default +to determine if +.Fa fmt_suspect +will consume the same argument types as +.Fa fmt_default +and to ensure that +.Fa fmt_suspect +is a valid format string. +.Pp +The +.Xr printf 3 +family of functions can not verify the types of arguments that they are +passed at run-time. In some cases, like +.Xr catgets 3 , +it is useful or necessary to use a user-supplied format string with no +guarantee that the format string matches the specified parameters. +.Pp +The +.Fn fmtcheck +was designed to be used in these cases, as in: +.Bd -literal -offset indent +printf(fmtcheck(user_format, standard_format), arg1, arg2); +.Ed +.Pp +In the check, field widths, fillers, precisions, etc. are ignored (unless +the field width or precision is an asterisk +.Ql * +instead of a digit string). Also, any text other than the format specifiers +is completely ignored. +.Pp +Note that the formats may be quite different as long as they accept the +same parameters. For example, +.Qq Li "%p %o %30s %#llx %-10.*e %n" +is compatible with +.Qq Li "This number %lu %d%% and string %s has %qd numbers and %.*g floats (%n)" . +However, +.Qq Li %o +is not equivalent to +.Qq Li %lx +because +the first requires an integer and the second requires a long. +.Sh RETURN VALUES +If +.Fa fmt_suspect +is a valid format and consumes the same argument types as +.Fa fmt_default , +then the +.Fn fmtcheck +will return +.Fa fmt_suspect . +Otherwise, it will return +.Fa fmt_default . +.Sh SEE ALSO +.Xr printf 3 diff --git a/sbin/fsck/fsutil.c b/sbin/fsck/fsutil.c new file mode 100644 index 000000000000..a7a89aa4683d --- /dev/null +++ b/sbin/fsck/fsutil.c @@ -0,0 +1,406 @@ +/* $NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $ */ + +/* + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/cdefs.h> +#ifndef lint +__RCSID("$NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $"); +#endif /* not lint */ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#if __STDC__ +#include <stdarg.h> +#else +#include <varargs.h> +#endif +#include <errno.h> +#include <fstab.h> +#include <err.h> +#include <paths.h> + +#include <sys/param.h> +#include <sys/stat.h> +#include <sys/mount.h> + +#include "fsutil.h" + +static const char *dev = NULL; +static int hot = 0; +static int preen = 0; + +extern char *__progname; + +static void vmsg __P((int, const char *, va_list)); + +void +setcdevname(cd, pr) + const char *cd; + int pr; +{ + dev = cd; + preen = pr; +} + +const char * +cdevname() +{ + return dev; +} + +int +hotroot() +{ + return hot; +} + +/*VARARGS*/ +void +#if __STDC__ +errexit(const char *fmt, ...) +#else +errexit(va_alist) + va_dcl +#endif +{ + va_list ap; + +#if __STDC__ + va_start(ap, fmt); +#else + const char *fmt; + + va_start(ap); + fmt = va_arg(ap, const char *); +#endif + (void) vfprintf(stderr, fmt, ap); + va_end(ap); + exit(8); +} + +static void +vmsg(fatal, fmt, ap) + int fatal; + const char *fmt; + va_list ap; +{ + if (!fatal && preen) + (void) printf("%s: ", dev); + + (void) vprintf(fmt, ap); + + if (fatal && preen) + (void) printf("\n"); + + if (fatal && preen) { + (void) printf( + "%s: UNEXPECTED INCONSISTENCY; RUN %s MANUALLY.\n", + dev, __progname); + exit(8); + } +} + +/*VARARGS*/ +void +#if __STDC__ +pfatal(const char *fmt, ...) +#else +pfatal(va_alist) + va_dcl +#endif +{ + va_list ap; + +#if __STDC__ + va_start(ap, fmt); +#else + const char *fmt; + + va_start(ap); + fmt = va_arg(ap, const char *); +#endif + vmsg(1, fmt, ap); + va_end(ap); +} + +/*VARARGS*/ +void +#if __STDC__ +pwarn(const char *fmt, ...) +#else +pwarn(va_alist) + va_dcl +#endif +{ + va_list ap; +#if __STDC__ + va_start(ap, fmt); +#else + const char *fmt; + + va_start(ap); + fmt = va_arg(ap, const char *); +#endif + vmsg(0, fmt, ap); + va_end(ap); +} + +void +perror(s) + const char *s; +{ + pfatal("%s (%s)", s, strerror(errno)); +} + +void +#if __STDC__ +panic(const char *fmt, ...) +#else +panic(va_alist) + va_dcl +#endif +{ + va_list ap; + +#if __STDC__ + va_start(ap, fmt); +#else + const char *fmt; + + va_start(ap); + fmt = va_arg(ap, const char *); +#endif + vmsg(1, fmt, ap); + va_end(ap); + exit(8); +} + +const char * +unrawname(name) + const char *name; +{ + static char unrawbuf[32]; + const char *dp; + struct stat stb; + + if ((dp = strrchr(name, '/')) == 0) + return (name); + if (stat(name, &stb) < 0) + return (name); + if (!S_ISCHR(stb.st_mode)) + return (name); + if (dp[1] != 'r') + return (name); + (void)snprintf(unrawbuf, 32, "%.*s/%s", (int)(dp - name), name, dp + 2); + return (unrawbuf); +} + +const char * +rawname(name) + const char *name; +{ + static char rawbuf[32]; + const char *dp; + + if ((dp = strrchr(name, '/')) == 0) + return (0); + (void)snprintf(rawbuf, 32, "%.*s/r%s", (int)(dp - name), name, dp + 1); + return (rawbuf); +} + +const char * +devcheck(origname) + const char *origname; +{ + struct stat stslash, stchar; + + if (stat("/", &stslash) < 0) { + perror("/"); + printf("Can't stat root\n"); + return (origname); + } + if (stat(origname, &stchar) < 0) { + perror(origname); + printf("Can't stat %s\n", origname); + return (origname); + } + if (!S_ISCHR(stchar.st_mode)) { + perror(origname); + printf("%s is not a char device\n", origname); + } + return (origname); +} + +/* + * Get the mount point information for name. + */ +struct statfs * +getmntpt(name) + const char *name; +{ + struct stat devstat, mntdevstat; + char device[sizeof(_PATH_DEV) - 1 + MNAMELEN]; + char *devname; + struct statfs *mntbuf, *statfsp; + int i, mntsize, isdev; + + if (stat(name, &devstat) != 0) + return (NULL); + if (S_ISCHR(devstat.st_mode) || S_ISBLK(devstat.st_mode)) + isdev = 1; + else + isdev = 0; + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); + for (i = 0; i < mntsize; i++) { + statfsp = &mntbuf[i]; + devname = statfsp->f_mntfromname; + if (*devname != '/') { + strcpy(device, _PATH_DEV); + strcat(device, devname); + strcpy(statfsp->f_mntfromname, device); + } + if (isdev == 0) { + if (strcmp(name, statfsp->f_mntonname)) + continue; + return (statfsp); + } + if (stat(devname, &mntdevstat) == 0 && + mntdevstat.st_rdev == devstat.st_rdev) + return (statfsp); + } + statfsp = NULL; + return (statfsp); +} + +#if 0 +/* + * XXX this code is from NetBSD, but fails in FreeBSD because we + * don't have blockdevs. I don't think its needed. + */ +const char * +blockcheck(origname) + const char *origname; +{ + struct stat stslash, stblock, stchar; + const char *newname, *raw; + struct fstab *fsp; + int retried = 0; + + hot = 0; + if (stat("/", &stslash) < 0) { + perror("/"); + printf("Can't stat root\n"); + return (origname); + } + newname = origname; +retry: + if (stat(newname, &stblock) < 0) { + perror(newname); + printf("Can't stat %s\n", newname); + return (origname); + } + if (S_ISBLK(stblock.st_mode)) { + if (stslash.st_dev == stblock.st_rdev) + hot++; + raw = rawname(newname); + if (stat(raw, &stchar) < 0) { + perror(raw); + printf("Can't stat %s\n", raw); + return (origname); + } + if (S_ISCHR(stchar.st_mode)) { + return (raw); + } else { + printf("%s is not a character device\n", raw); + return (origname); + } + } else if (S_ISCHR(stblock.st_mode) && !retried) { + newname = unrawname(newname); + retried++; + goto retry; + } else if ((fsp = getfsfile(newname)) != 0 && !retried) { + newname = fsp->fs_spec; + retried++; + goto retry; + } + /* + * Not a block or character device, just return name and + * let the user decide whether to use it. + */ + return (origname); +} +#endif + + +void * +emalloc(s) + size_t s; +{ + void *p; + + p = malloc(s); + if (p == NULL) + err(1, "malloc failed"); + return (p); +} + + +void * +erealloc(p, s) + void *p; + size_t s; +{ + void *q; + + q = realloc(p, s); + if (q == NULL) + err(1, "realloc failed"); + return (q); +} + + +char * +estrdup(s) + const char *s; +{ + char *p; + + p = strdup(s); + if (p == NULL) + err(1, "strdup failed"); + return (p); +} diff --git a/sbin/fsck/fsutil.h b/sbin/fsck/fsutil.h new file mode 100644 index 000000000000..19f85fd946be --- /dev/null +++ b/sbin/fsck/fsutil.h @@ -0,0 +1,65 @@ +/* $NetBSD: fsutil.h,v 1.4 1998/07/26 20:02:36 mycroft Exp $ */ + +/* + * Copyright (c) 1996 Christos Zoulas. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christos Zoulas. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +void perror __P((const char *)); +void errexit __P((const char *, ...)) + __attribute__((__noreturn__,__format__(__printf__,1,2))); +void pfatal __P((const char *, ...)) + __attribute__((__format__(__printf__,1,2))); +void pwarn __P((const char *, ...)) + __attribute__((__format__(__printf__,1,2))); +void panic __P((const char *, ...)) + __attribute__((__noreturn__,__format__(__printf__,1,2))); +const char *rawname __P((const char *)); +const char *unrawname __P((const char *)); +#if 0 +const char *blockcheck __P((const char *)); +#endif +const char *devcheck __P((const char *)); +const char *cdevname __P((void)); +void setcdevname __P((const char *, int)); +struct statfs *getmntpt __P((const char *)); +int hotroot __P((void)); +void *emalloc __P((size_t)); +void *erealloc __P((void *, size_t)); +char *estrdup __P((const char *)); + +#define CHECK_PREEN 0x0001 +#define CHECK_VERBOSE 0x0002 +#define CHECK_DEBUG 0x0004 +#define CHECK_BACKGRD 0x0008 +#define DO_BACKGRD 0x0010 + +struct fstab; +int checkfstab __P((int, int (*)(struct fstab *), + int (*) (const char *, const char *, const char *, char *, pid_t *))); diff --git a/sys/dev/sound/pci/als4000.h b/sys/dev/sound/pci/als4000.h new file mode 100644 index 000000000000..c9ff8c14750a --- /dev/null +++ b/sys/dev/sound/pci/als4000.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2001 Orion Hodson <O.Hodson@cs.ucl.ac.uk> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define ALS_PCI_ID0 0x40004005 +#define ALS_PCI_POWERREG 0xe0 + +#define ALS_CONFIG_SPACE_BYTES 128 +#define ALS_BUFFER_SIZE 8192 + +#define ALS_GCR_DATA 0x08 +#define ALS_GCR_INDEX 0x0c +# define ALS_GCR_MISC 0x8c +# define ALS_GCR_TEST 0x90 +# define ALS_GCR_DMA0_START 0x91 +# define ALS_GCR_DMA0_MODE 0x92 +# define ALS_GCR_DMA1_START 0x93 +# define ALS_GCR_DMA1_MODE 0x94 +# define ALS_GCR_DMA3_START 0x95 +# define ALS_GCR_DMA3_MODE 0x96 +# define ALS_GCR_DMA_EMULATION 0x99 +# define ALS_GCR_FIFO0_CURRENT 0xa0 +# define ALS_GCR_FIFO0_STATUS 0xa1 +# define ALS_GCR_FIFO1_START 0xa2 +# define ALS_GCR_FIFO1_COUNT 0xa3 +# define ALS_GCR_FIFO1_CURRENT 0xa4 +# define ALS_GCR_FIFO1_STATUS 0xa5 +# define ALS_GCR_POWER 0xa6 +# define ALS_GCR_PIC_ACCESS 0xa7 + +#define ALS_SB_MPU_IRQ 0x0e + +#define ALS_MIXER_DATA 0x15 +#define ALS_MIXER_INDEX 0x14 +# define ALS_SB16_RESET 0x00 +# define ALS_SB16_DMA_SETUP 0x81 +# define ALS_CONTROL 0xc0 +# define ALS_SB16_CONFIG ALS_CONTROL + 0x00 +# define ALS_MISC_CONTROL ALS_CONTROL + 0x02 +# define ALS_FIFO1_LENGTH_LO ALS_CONTROL + 0x1c +# define ALS_FIFO1_LENGTH_HI ALS_CONTROL + 0x1d +# define ALS_FIFO1_CONTROL ALS_CONTROL + 0x1e +# define ALS_FIFO1_STOP 0x00 +# define ALS_FIFO1_RUN 0x80 +# define ALS_FIFO1_PAUSE 0x40 +# define ALS_FIFO1_STEREO 0x20 +# define ALS_FIFO1_SIGNED 0x10 +# define ALS_FIFO1_8BIT 0x04 + +#define ALS_ESP_RST 0x16 +#define ALS_CR1E_ACK_PORT 0x16 + +#define ALS_ESP_RD_DATA 0x1a +#define ALS_ESP_WR_DATA 0x1c +#define ALS_ESP_WR_STATUS 0x1c +#define ALS_ESP_RD_STATUS8 0x1e +#define ALS_ESP_RD_STATUS16 0x1f +# define ALS_ESP_SAMPLE_RATE 0x41 + +#define ALS_MIDI_DATA 0x30 +#define ALS_MIDI_STATUS 0x31 + +/* Interrupt masks */ +#define ALS_IRQ_STATUS8 0x01 +#define ALS_IRQ_STATUS16 0x02 +#define ALS_IRQ_MPUIN 0x04 +#define ALS_IRQ_CR1E 0x20 + +/* Sample Rate Locks */ +#define ALS_RATE_LOCK_PLAYBACK 0x01 +#define ALS_RATE_LOCK_CAPTURE 0x02 +#define ALS_RATE_LOCK 0x03 diff --git a/sys/modules/sound/driver/als4000/Makefile b/sys/modules/sound/driver/als4000/Makefile new file mode 100644 index 000000000000..414c139f4426 --- /dev/null +++ b/sys/modules/sound/driver/als4000/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../../dev/sound/pci + +KMOD= snd_als4000 +SRCS= device_if.h bus_if.h isa_if.h pci_if.h +SRCS+= als4000.c + +.include <bsd.kmod.mk> diff --git a/usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg b/usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg new file mode 100644 index 000000000000..99aa34392ac8 --- /dev/null +++ b/usr.bin/ee/nls/ru_RU.KOI8-R/ee.msg @@ -0,0 +1,187 @@ +$ This file contains the messages for ee ("easy editor"). See the file +$ ee.i18n.guide for more information +$ +$ Based on uk_UA.KOI8-U translation by Olexander Kunytsa <kunia@istc.kiev.ua> +$ +$ For ee patchlevel 3 +$ +$ $FreeBSD$ +$ +$ +$set 1 +$quote " +1 "Меню параметров" +2 "табуляция пробелами " +3 "поиск с учётом регистра " +4 "авто-перевод строки " +5 "авто-формат абзаца " +6 "8-битные символы " +7 "окно подсказки " +8 "ширина текста " +9 "Файл изменён!" +10 "сохранить и выйти" +11 "не сохранять" +12 "Меню файловых операций" +13 "прочесть файл" +14 "записать в файл" +15 "сохранить файл" +16 "распечатать" +17 "Меню поиска" +18 "что искать..." +19 "повторить поиск" +20 "Меню проверки правописания" +21 "запустить 'spell'" +22 "запустить 'ispell'" +23 "Дополнительные операции" +24 "форматировать абзац" +25 "команда оболочки" +26 "проверить правописание" +27 "Главное меню" +28 "выйти из редактора" +29 "подсказка" +30 "операции с файлами" +31 "обновить экран" +32 "параметры" +33 "поиск" +34 "разное" +35 "Клавиши управления: " +36 "^a ascii-код ^i табуляция ^r вправо " +37 "^b в самый низ ^j новая строка ^t в самый верх " +38 "^c команда ^k удалить символ ^u вверх " +39 "^d вниз ^l влево ^v вернуть слово " +40 "^e поиск... ^m новая строка ^w удалить слово " +41 "^f вернуть символ ^n следующая страница ^x повтор поиска " +42 "^g в начало строки ^o в конец строки ^y удалить строку " +43 "^h забой ^p предыдущая страница ^z вернуть строку " +44 "^[ (Esc) вызов меню Esc-Enter: выйти из редактора " +45 " " +46 "Команды: " +47 "help : эта подсказка file : показать имя файла " +48 "read : прочесть файл char : ascii-код символа " +49 "write : записать в файл case : поиск с учётом регистра " +50 "exit : выйти с сохранением nocase : поиск без учёта регистра " +51 "quit : выйти без сохранения !команда: вызвать команду оболочки " +52 "line : показать номер строки 0-9 : перейти к строке N " +53 "expand : заменять табуляцию пробелами noexpand: не заменять табуляцию " +54 " " +55 " ee [+#] [-i] [-e] [-h] [файлы(ы)] " +56 "+# :к строке N -i :без инфо-окна -e :не заменять табы -h :без выделения рамок " +57 "^[ (Esc) меню ^e поиск ^y удалить строку ^u вверх ^p пред. стр. " +58 "^a ascii-код ^x повтор поиска ^z вернуть строку ^d вниз ^n след. стр. " +59 "^b в самый низ ^g в начало строки ^w удалить слово ^l влево " +60 "^t в самый верх ^o в конец строки ^v вернуть слово ^r вправо " +61 "^c команда ^k удалить символ ^f вернуть символ Esc-Enter выход из 'ee'" +62 "help : подсказка |file : показать имя файла |line: номер строки " +63 "read : прочесть файл |char : ascii-код символа |0-9 : перейти к строке " +64 "write: записать файл |case : поиск с учётом регистра |exit: сохранить и выйти" +65 "!кмд : выполнить кмд. |nocase:поиск без учёта регистра |quit: отменить и выйти" +66 "expand: заменять табы |noexpand: не заменять табы пробелами " +67 " нажмите Esc (^[) для вызова меню" +68 "файл не указан" +69 "ascii-код: " +70 "передаю содержимое буфера в \"%s\" " +71 "команда: " +72 "записать в файл: " +73 "прочесть файл: " +74 "ascii-код символа = %d" +75 "неверная команда \"%s\"" +76 "неоднозначное сокращение команды" +77 "строка %d " +78 "длина = %d симв." +79 "текущий файл: \"%s\" " +80 "использование: %s [-i] [-e] [-h] [+номер_строки] [файл(ы)]\n" +81 " -i отключить окно подсказки\n" +82 " -e не заменять табуляцию пробелами\n" +83 " -h не выделять рамки\n" +84 "\"%s\" является каталогом" +85 "новый файл \"%s\"" +86 "не могу открыть \"%s\"" +87 "файл \"%s\", %d строк" +88 "файл \"%s\" прочитан" +89 "читаем файл \"%s\"" +90 ", только для чтения" +91 "файл \"%s\", %d строк" +92 "введите имя файла: " +93 "имя файла не задано: файл не сохранён" +94 "Вы уверены, что хотите отменить свои изменения? (y/n [n]) " +95 "y" +96 "файл уже существует, переписать поверх? (y/n) [n] " +97 "не могу создать файл \"%s\"" +98 "записываю файл \"%s\"" +99 "\"%s\" %d строк, %d символов" +100 " ...идёт поиск" +101 "подстрока \"%s\" не найдена" +102 "что искать: " +103 "не могу запустить %s" +104 "для продолжения нажмите Enter" +105 "для отмены нажмите Esc" +106 "слишком большое меню - не помещается в экран" +107 "для продолжения нажмите любую клавишу" +108 "команда оболочки: " +109 "...форматирую абзац..." +110 "<!echo 'список подозрительных слов'; echo -=-=-=-=-=-" +111 "проверяю правописание с помощью 'spell'" +112 "ширина текста: " +113 "Действует строгий режим: не имею права выполнять эту операцию" +114 " ДА" +115 "НЕТ" +116 "HELP" +117 "WRITE" +118 "READ" +119 "LINE" +120 "FILE" +121 "CHARACTER" +122 "REDRAW" +123 "RESEQUENCE" +124 "AUTHOR" +125 "VERSION" +126 "CASE" +127 "NOCASE" +128 "EXPAND" +129 "NOEXPAND" +130 "EXIT" +131 "QUIT" +132 "INFO" +133 "NOINFO" +134 "MARGINS" +135 "NOMARGINS" +136 "AUTOFORMAT" +137 "NOAUTOFORMAT" +138 "ECHO" +139 "PRINTCOMMAND" +140 "RIGHTMARGIN" +141 "HIGHLIGHT" +142 "NOHIGHLIGHT" +143 "EIGHTBIT" +144 "NOEIGHTBIT" +145 "клавишы как в Emacs " +146 "^a в начало строки ^i табуляция ^r вернуть слово " +147 "^b влево ^j вернуть символ ^t в самый верх " +148 "^c команда ^k удалить строку ^u в самый низ " +149 "^d удалить символ ^l вернуть строку ^v следующая страница " +150 "^e в конец строки ^m новая строка ^w удалить слово " +151 "^f вправо ^n вниз ^x повтор поиска " +152 "^g пред. страница ^o символ по ascii-коду ^y поиск... " +153 "^h забой ^p вверх ^z следующее слово " +154 "^[ (Esc) меню ^y поиск... ^k удалить строку ^p вверх ^g пред. стр." +155 "^o ascii-код ^x повтор поиска ^l вернуть строку ^n вниз ^v след. стр." +156 "^u в самый низ ^a в начало строки ^w удалить слово ^b влево " +157 "^t в самый верх ^e в конец строки ^r вернуть слово ^f вправо " +158 "^c команда ^d удалить символ ^j вернуть символ ^z следующее слово " +159 "EMACS" +160 "NOEMACS" +161 " +# перейти к строке #\n" +162 "не могу сохранить установки параметров в файл .init.ee!" +163 "параметры 'ee' сохранены в файле %s" +164 "сохранить установки" +165 "Установки параметров 'ee'" +166 "сохранить в текущем каталоге" +167 "сохранить в домашнем каталоге" +168 "установки параметров 'ee' не сохранены" +169 "при запуске 'ree' необходимо указать файл для редактирования" +180 "слишком большое меню - не помещается в экран" +181 "^^дальше^^" +182 "VVдальшеVV" +183 "16-битные символы " +184 "16BIT" +185 "NO16BIT" |
