components/ksh93/files/msggen.1
author Edwin Beasant <Edwin.Beasant@oracle.com>
Mon, 23 Apr 2012 08:30:27 -0700
changeset 789 5f074ca23733
child 5799 3115259fd185
permissions -rw-r--r--
7106955 move ksh93 from ON to userland

'\" te
.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
.TH msggen 1 "9 Oct 2007" "SunOS 5.11" "User Commands"
.SH NAME
msggen \- generate a machine independent formatted message catalog
.SH SYNOPSIS
.LP
.nf
\fBmsggen\fR [\fB-fls\fR] \fIcatfile\fR [\fImsgfile\fR]
.fi

.SH DESCRIPTION
.sp
.LP
\fBmsggen\fR merges the message text source file \fImsgfile\fR into a machine independent formatted message catalog \fIcatfile\fR. The file \fIcatfile\fR is created if it does not already exist. If \fIcatfile\fR does exist, its messages are included in the new \fIcatfile\fR. If set and message numbers collide, the new message text defined in \fImsgfile\fR replaces the old message text currently contained in \fIcatfile\fR. 
.sp
.LP
Non-ASCII characters must be UTF-8 encoded. \fBiconv\fR(1) can be used to convert to/from UTF-8.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.mk
.na
\fB\fB-f\fR\fR
.ad
.br
.na
\fB\fB--format\fR\fR
.ad
.RS 12n
.rt  
List the \fBprintf\fR(3C) format signature for each message in \fIcatfile\fR. A format signature is one line containing one character for each format specification:
.sp
.ne 2
.mk
.na
\fB\fBc\fR\fR
.ad
.RS 5n
.rt  
char
.RE

.sp
.ne 2
.mk
.na
\fB\fBd\fR\fR
.ad
.RS 5n
.rt  
double
.RE

.sp
.ne 2
.mk
.na
\fB\fBD\fR\fR
.ad
.RS 5n
.rt  
long double
.RE

.sp
.ne 2
.mk
.na
\fB\fBf\fR\fR
.ad
.RS 5n
.rt  
float
.RE

.sp
.ne 2
.mk
.na
\fB\fBh\fR\fR
.ad
.RS 5n
.rt  
short
.RE

.sp
.ne 2
.mk
.na
\fB\fBi\fR\fR
.ad
.RS 5n
.rt  
int
.RE

.sp
.ne 2
.mk
.na
\fB\fBj\fR\fR
.ad
.RS 5n
.rt  
long long
.RE

.sp
.ne 2
.mk
.na
\fB\fBl\fR\fR
.ad
.RS 5n
.rt  
long
.RE

.sp
.ne 2
.mk
.na
\fB\fBp\fR\fR
.ad
.RS 5n
.rt  
void*
.RE

.sp
.ne 2
.mk
.na
\fB\fBs\fR\fR
.ad
.RS 5n
.rt  
string
.RE

.sp
.ne 2
.mk
.na
\fB\fBt\fR\fR
.ad
.RS 5n
.rt  
ptrdiff_t
.RE

.sp
.ne 2
.mk
.na
\fB\fBz\fR\fR
.ad
.RS 5n
.rt  
size_t
.RE

.sp
.ne 2
.mk
.na
\fB\fB?\fR\fR
.ad
.RS 5n
.rt  
unknown
.RE

.RE

.sp
.ne 2
.mk
.na
\fB\fB-l\fR\fR
.ad
.br
.na
\fB\fB--list\fR\fR
.ad
.RS 12n
.rt  
List \fIcatfile\fR in UTF-8 msgfile form.
.RE

.sp
.ne 2
.mk
.na
\fB\fB-s\fR\fR
.ad
.br
.na
\fB\fB--set\fR\fR
.ad
.RS 12n
.rt  
Convert the \fIcatfile\fR to a message set number and print the number on the standard output.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.mk
.na
\fB\fIcatfile\fR\fR
.ad
.RS 11n
.rt  
Machine independent formatted message catalog file.
.RE

.sp
.ne 2
.mk
.na
\fB\fImsgfile\fR\fR
.ad
.RS 11n
.rt  
Message text source file.
.RE

.SH USAGE
.sp
.LP
Message text source files are in \fBgencat\fR(1) format, defined as follows. The fields of a message text source line are separated by a single blank character. Any other blank characters are considered to be part of the subsequent field. The \fBNL_*\fR constants are defined in one or both of \fB<limits.h>\fR and \fB<nl_types.h>\fR\&.
.sp
.ne 2
.mk
.na
\fB\fB$\fR \fIcomment\fR\fR
.ad
.sp .6
.RS 4n
A line beginning with a \fB$\fR followed by a blank character is treated as a comment.
.RE

.sp
.ne 2
.mk
.na
\fB\fB$delset\fR \fIn comment\fR\fR
.ad
.sp .6
.RS 4n
This line deletes message set \fIn\fR from an existing message catalog. \fIn\fR denotes the set number \fB[1, NL_SETMAX]\fR. Any text following the set number is treated as a comment.
.RE

.sp
.ne 2
.mk
.na
\fB\fB$quote\fR \fIc\fR\fR
.ad
.sp .6
.RS 4n
This line specifies an optional quote character \fIc\fR, which can be used to surround message-text so that trailing spaces or empty messages are visible in a message source line. By default, or if an empty \fB$quote\fR directive is supplied, no quoting of message-text is recognized.
.RE

.sp
.ne 2
.mk
.na
\fB\fB$set\fR \fIn comment\fR\fR
.ad
.sp .6
.RS 4n
This line specifies the set identifier of the following messages until the next \fB$set\fR or end-of-file (\fBEOF\fR) appears. \fIn\fR denotes the set identifier, which is defined as a number in the range \fB[1, NL_SETMAX]\fR. Set numbers need not be contiguous. Any text following the set identifier is treated as a comment. If no \fB$set\fR directive is specified in a message text source file, all messages are located in message set 1.
.RE

.sp
.ne 2
.mk
.na
\fB\fB$translation\fR \fIidentification YYYY-MM-DD\fR\fB[,...]\fR\fR
.ad
.sp .6
.RS 4n
Append translation information to the message catalog header. Only the newest date for a given identification is retained in the catalog. Multiple translation lines are combined into a single, comma-separated list.
.RE

.sp
.ne 2
.mk
.na
\fB\fBm\fR \fImessage-text\fR\fR
.ad
.sp .6
.RS 4n
\fBm\fR denotes the message identifier, which is defined as a number in the range \fB[1, NL_MSGMAX]\fR. The message-text is stored in the message catalogue with the set identifier specified by the last \fB$set\fR directive, and with message identifier \fBm\fR. If the message-text is empty, and a blank character field separator is present, an empty string is stored in the message catalogue. If a message source line has a message number, but neither a field separator nor message-text, the existing message with that number (if any) is deleted from the catalogue. Message identifiers need not be contiguous. There are no \fImessage-text\fR length restrictions.
.RE

.SH EXIT STATUS
.sp
.ne 2
.mk
.na
\fB\fB0\fR\fR
.ad
.RS 6n
.rt  
Successful completion.
.RE

.sp
.ne 2
.mk
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
.rt  
One or more specified jobs does not exist.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRUsing \fBmsggen\fR
.sp
.LP
The following example generates a message catalog \fBxxx\fR from the message file \fBxxx.msg\fR:

.sp
.in +2
.nf
example% msggen xxx xxx.msg
.fi
.in -2
.sp

.SH AUTHORS
.sp
.LP
Glenn Fowler, \[email protected]\fR
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Availabilitydeveloper/astdev
_
Interface StabilityVolatile
.TE

.SH SEE ALSO
.sp
.LP
\fBgencat\fR(1), \fBiconv\fR(1), \fBmsgcc\fR(1), \fBprintf\fR(3C), \fBattributes\fR(5)