⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xstr.1

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 1
字号:
.\" SCCSID: @(#)xstr.1	8.1	9/11/90.TH xstr 1.SH Namexstr \- extract strings from C program .SH Syntax.B xstr[\fB\-c\fR] [\fB\-\fR] [\fI\|file\fR\|].SH Description.NXR "xstr command".NXA "xstr command" "mkstr command".NXA "mkstr command" "xstr command".NXR "C program" "implementing shared constant strings"The.PN xstrcommand maintains a file.I stringsinto which strings in component parts of a large program are hashed.These strings are replaced with references to this common area.This serves to implement shared constant strings, most useful if theyare also read-only..PPThe command.EXxstr \-c name.EE.PPwill extract the strings from the C source in name, replacingstring references by expressions of the form (&xstr[number])for some number.An appropriate declaration of.PN xstris prepended to the file.The resulting C text is placed in the file x.c,to then be compiled.The strings from this file are placed in the.I stringsdata base if they are not there already.Repeated strings and strings which are suffices of existing stringsdo not cause changes to the data base..PPAfter all components of a large program have been compiled a filexs.c declaring the common.PN xstrspace can be created by a command of the form.EXxstr.EE.PPThis xs.c file should then be compiled and loaded with the restof the program.If possible, the array can be made read-only (shared) savingspace and swap overhead..PPThe.PN xstrcommand can also be used on a single file.A command.EXxstr name.EE.PPcreates files x.cand xs.cas before, without using or affecting any.I stringsfile in the same directory..PPIt may be useful to run.PN xstrafter the C preprocessor if any macro definitions yield stringsor if there is conditional code which contains stringswhich may not, in fact, be needed.The.PN xstrcommandreads from its standard input when the argument `\-' is given.An appropriate command sequence for running.PN xstrafter the C preprocessor is:.EXcc \-E name.c | xstr \-c \-cc \-c x.cmv x.o name.o.EE.PPThe.PN xstrcommand does not touch the file.I stringsunless new items are added, thus.PN makecan avoid remaking xs.o unless truly necessary..SH Options.IP \fB\-\fR 0.3iReads stdin..IP \fB\-c\fR 0.3iExtracts strings from specified Csource (next argument)..SH Restrictions.NXR "xstr command" "restricted"If a string is a suffix of another string in the data base,but the shorter string is seen first by.PN xstrboth strings will be placed in the data base, when justplacing the longer one there will do..SH Files.DTstrings		Data base of strings.brx.c		Massaged C source.brxs.c		C source for definition of array `xstr'.br/tmp/xs*	Temp file when `xstr name' doesn't touch.I strings.SH See Alsomkstr(1)

⌨️ 快捷键说明

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