6aedbb7b9c
last.1 (rev 1.15->1.16) mkstr.1 (rev 1.11->1.12) top.1 (remove wrong original revision number)
130 lines
4.2 KiB
Groff
130 lines
4.2 KiB
Groff
.\" Copyright (c) 1980, 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.
|
|
.\"
|
|
.\" @(#)mkstr.1 8.1 (Berkeley) 6/6/93
|
|
.\" %FreeBSD: src/usr.bin/mkstr/mkstr.1,v 1.12 2003/08/22 17:55:56 dds Exp %
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd November 1, 2002
|
|
.Dt MKSTR 1
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm mkstr
|
|
.Nd C ¸À¸ì¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤«¤é¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë
|
|
.Sh ½ñ¼°
|
|
.Nm
|
|
.Op Fl
|
|
.Ar messagefile
|
|
.Ar prefix Ar
|
|
.Sh ²òÀâ
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢C ¸À¸ì¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤«¤é¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤òÃê½Ð¤·¡¢
|
|
¤³¤ì¤ò³ÊǼ¤¹¤ë¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£¤Þ¤¿ºîÀ®¤µ¤ì
|
|
¤¿¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ¹¤ë¤è¤¦¤Ë¡¢¤½¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò½¤Àµ¤·
|
|
¤Þ¤¹¡£mkstr ¤ÏµðÂç¤Ê¥×¥í¥°¥é¥à¤Î¥µ¥¤¥º¤ò¸º¾¯¤µ¤»¡¢¥¹¥ï¥Ã¥×¤ò¸º¤é¤¹¤³¤È
|
|
¤òÌÜŪ¤È¤·¤Æ¤¤¤Þ¤¹
|
|
(
|
|
.Sx ¥Ð¥°
|
|
¤Î¹à¤ò»²¾È)
|
|
¡£
|
|
.Pp
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢
|
|
¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò½èÍý¤·¡¢½¤Àµ¤·¤¿ÆþÎÏ¥Õ¥¡¥¤¥ë¤ò¡¢
|
|
»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë̾¤Ë¡¢»ØÄꤵ¤ì¤¿¥×¥ì¥Õ¥£¥Ã¥¯¥¹¤ò¤Ä¤±¤¿Ì¾Á°¤Î¥Õ¥¡¥¤¥ë
|
|
¤Ç½ÐÎϤ·¤Þ¤¹¡£°Ê²¼¤Î»ÈÍÑÎã¤Ïŵ·¿Åª¤Ê¤â¤Î¤Ç¤¹¡£
|
|
.Bd -literal -offset indent
|
|
mkstr pistrings xx *.c
|
|
.Ed
|
|
.Pp
|
|
.Nm
|
|
¤Ï¡¢¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë¤¹¤Ù¤Æ¤Î C ¸À¸ì¥½¡¼¥¹¤«¤é½¸¤á¤¿
|
|
¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò¡¢¥Õ¥¡¥¤¥ë
|
|
.Ar pistrings
|
|
¤Ë½ÐÎϤ·¡¢½¤Àµ¤µ¤ì¤¿¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¡¢¥Õ¥¡¥¤¥ë̾¤ÎÀèƬ¤Ë
|
|
.Ar \&xx
|
|
¤ò¤Ä¤±¤¿¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤ·¤Þ¤¹¡£
|
|
.Pp
|
|
¥ª¥×¥·¥ç¥ó
|
|
.Bl -tag -width indent
|
|
.It Fl
|
|
»ØÄꤵ¤ì¤¿¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Ë¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬ÃÖ¤«¤ì¤Þ¤¹¡£
|
|
¤³¤ì¤Ï¡¢
|
|
.Nm
|
|
¤Ç½èÍý¤µ¤ì¤¿µðÂç¤Ê¥×¥í¥°¥é¥à¤Î°ìÉô¤òºÆ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤¿¤á¤Ë»ÈÍѤ·¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ëÃæ¤Î
|
|
.Li \&`error("'
|
|
¤È¤¤¤¦Ê¸»úÎó¤ò¤â¤È¤Ë¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤ò¸¡º÷¤·¤Þ¤¹¡£¤³¤Îʸ»úÎ󤬽и½¤¹¤ë¤È¡¢
|
|
.Sq \&"\&
|
|
¤«¤é³«»Ï¤µ¤ì¤ëʸ»úÎ󤪤è¤Ó
|
|
¤½¤Î¸å¤Ë¥Ì¥ëʸ»ú¤È²þ¹Ôʸ»ú¤ò¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤ·¤Þ¤¹;
|
|
Êѹ¹Á°¤Î¥½¡¼¥¹¤Ë¤ª¤¤¤Æʸ»úÎó¤Ç¤¢¤Ã¤¿Éôʬ¤Ï¡¢
|
|
¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤Î¥ª¥Õ¥»¥Ã¥È¤ËÃÖ¤´¹¤¨¤é¤ì
|
|
.Xr lseek 2
|
|
¤Ë¤è¤Ã¤ÆÂбþ¤¹¤ë¥á¥Ã¥»¡¼¥¸¤ò¼è¤ê½Ð¤¹¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
¼ÂºÝ¤Ë¥á¥Ã¥»¡¼¥¸¤ò¼è¤ê½Ð¤¹¾ì¹ç¤Ë¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ê¥³¡¼¥É¤ò»ÈÍѤ·¤Þ¤¹¡£
|
|
.Bd -literal -offset indent
|
|
char efilname = "/usr/lib/pi_strings";
|
|
int efil = -1;
|
|
|
|
error(a1, a2, a3, a4)
|
|
\&{
|
|
char buf[256];
|
|
|
|
if (efil < 0) {
|
|
efil = open(efilname, 0);
|
|
if (efil < 0)
|
|
err(1, "%s", efilname);
|
|
}
|
|
if (lseek(efil, (off_t)a1, SEEK_SET) < 0 ||
|
|
read(efil, buf, 256) <= 0)
|
|
err(1, "%s", efilname);
|
|
printf(buf, a2, a3, a4);
|
|
}
|
|
.Ed
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr gencat 1 ,
|
|
.Xr xstr 1 ,
|
|
.Xr lseek 2
|
|
.Sh Îò»Ë
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï
|
|
.Bx 3.0
|
|
¤ÇÅо줷¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢
|
|
PDP 11 ¥Õ¥¡¥ß¥ê¤ÎÀ©¸Â¤µ¤ì¤¿¥¢¡¼¥¥Æ¥¯¥Á¥ã¤Î¤¿¤á¤Ë³«È¯¤µ¤ì¤Þ¤·¤¿¡£
|
|
¤´¤¯°ìÉô¤Î¥×¥í¥°¥é¥à¤·¤« mkstr ¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤»¤ó¡£
|
|
¸½ºß¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¤³¤ÎÊýË¡¤Ç¥á¥â¥ê¤òÀáÌ󤷤ƤâÈù¡¹¤¿¤ë¤â¤Î¤Ç¤¹¡£
|