strextract.1int

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1INT 代码 · 共 200 行

1INT
200
字号
.TH strextract 1int.SH Namestrextract \- batch string extraction.SH Syntax.B strextract[.B \-p.I patternfile] [.B \-i.I ignorefile] [.B \-d] [.I source-program...].SH Description.NXR "strextract utility"The .PN strextractcommand extracts text strings from source programs. This command also writes the string it extracts to a message text file. The message text file contains the text for each message extracted from your input source program. The .PN strextractcommand names the file by appending .msg to the name of the input source program..PPIn the .I source-programargument, you name one or more source programsfrom which you want messages extracted. The .PN strextractcommand does not extract messages from source programs included using the.PN #include directive. Therefore, you might want a source program and all the sourceprograms it includes on a single .PN strextractcommand line..PPYou can create a patterns file (as specified by .I patternfile) to control how the .PN strextract command extracts text. The patterns file is divided into several sections,each of which is identified by a keyword. The keyword must start at thebeginning of a new line, and its first character must be a dollar sign ($).Following the identifier, you specify a number of patterns. Each patternbegins on a new line and follows the regular expression syntax you use inthe .MS regex 3routine. For more information on the patterns file, see the.PN patterns(5int) reference page..PPIn addition to the patterns file, you can create a file that indicatesstrings that.PN extractignores.  Each line in this ignore file contains a single string to beignored thatfollows the syntax of the.MS regex 3routine..PPWhen you invoke the.PN strextractcommand, it reads the patterns file and the file that contains stringsit ignores.  You can specify a patterns file and an ignore file on the.PN strextract command line.  Otherwise, the.PN strextractcommand matches all strings and uses the default patterns file..PPIf .PN strextractfinds strings which match the.PN ERRORdirective in the pattern file, it reports the strings to standard error (stderr.) but does not write the string to the message file..PPAfter running.PN strextract ,you can edit the message text file to remove text strings which do not need translating before running.PN strmerge ..PPIt is  recommended that you use.PN extractcommand  as a visual front end to the.PN strextractcommand rather than running.PN strextractdirectly..SH Options.IP \fB\-i\fR 5Ignore text strings specified in.I ignorefile.By default, the .PN strextractcommand searches for .I ignorefile in the current working directory, your home directory, and .PN /usr/lib/intln ..IPIf you omit the .PN \-ioption, .PN strextractrecognizes all strings specified in the patterns file..IP \fB\-p\fR 5Use \fIpatternfile\fR to match strings in the input source program. By default,the command searches for the pattern file in the current working directory,your home directory, and finally .PN /usr/lib/intln ..IPIf you omit the .PN \-poption, the .PN strextractcommand uses a default patterns file that is stored in .PN /usr/lib/intln/patterns ..IP \fB\-d\fR 5Disables warnings of duplicate strings. If you omit the .PN \-d option, .PN strextractprints warnings of duplicate strings in your source program..SH RestrictionsGiven the default pattern file, you cannot cause .PN strextractto ignore strings in comments that are longer than one line..PPYou can specify only one rewrite string for all classes of pattern matches..PPThe .PN strextract command does not extract strings from files include with .PN #include directive. You must run the .PN strextractcommands on these files separately..EX % strextract \-p c_patterns prog.c prog2.c% vi prog.msg% strmerge \-p c_patterns prog.c prog2.c% gencat prog.cat prog.msf prog2.msf% vi nl_prog.c% vi nl_prog2.c% cc nl_prog.c nl_prog2.c \-li.EE .PPIn this example, the.PN strextract command uses the .PN c_patterns file to determine which strings to match. The input source programs are named.PN prog.cand.PN prog2.c ..PPIf you need to remove any of the messages or extract one of the created strings, edit the resulting message file, .PN prog.msg .Under no conditions should you add to this file. Doing so could result in unpredictable behavior..PPYou issue the .PN strmergecommand to replace the extracted strings with calls to the message catalog.In response to this command, .PN strmerge ,creates the source message catalogs,.PN prog.msfand .PN prog2.msf ,and the output source programs,.PN nl_prog.cand .PN nl_prog2.c ..PPYou must edit .PN nl_prog.cand.PN nl_prog2.cto include the appropriate .PN catopenand .PN catclosefunction calls..PPThe .PN gencatcommand creates a message catalog and the .PN cccommand creates an executable program..SH See Alsointro(3int), gencat(1int), extract(1int), strmerge(1int), regex(3),catopen(3int), patterns(5int).br \fIGuide to Developing International Software\fP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?