Examples of message source files

This topic will show you examples of message source files.

The following example message source file uses numbers for message ID numbers and for message set numbers:
$ This is a message source file sample.
$ Define the Quote Character.
$quote "
$set 1 This is the set 1 of messages.
1 "The specified file does not have read permission on\n"
2 "The %1$s file and the %2$s file are same\n"
3 "Hello world!\n"
$Define the quote character
$quote '
$set 2 This is the set 2 of messages
1       'fieldef: Cannot open %1$s \n'
2       'Hello world\n'
The following example message source file uses symbolic identifiers for message ID numbers and for message set numbers:
$ This is a message source file sample.
$ Define the Quote Character.
$quote "
$set MS_SET1 This is the set 1 of messages.
MSG_1   "The specified file does not have read permission on\n"
MSG_2   "The %1$s file and the %2$s file are same\n"
MSG_3   "Hello world\n"
$Define the quote character
$quote
$set 2 This is the set 2 of messages.
$EMSG_1 'fieldef: Cannot open %1$s\n'
$EMSG_2 'Hello world!\n'
The following examples show how symbolic identifiers can make the specification of a message more understandable:
catgets(cd, 1, 1, "default message")
catgets(cd, MS_SET1, MSG_1, "default message")