docpkge.par.lib
来自「su 的源代码库」· LIB 代码 · 共 43 行
LIB
43 行
DOCPKGE - Function to implement the CWP self-documentation facilityrequestdoc give selfdoc on user request (i.e. when name of main is typed)pagedoc print self documentation stringFunction Prototypes:void requestdoc(flag);void pagedoc();requestoc:Input:flag integer specifying i.o. casespagedoc():Returns: the self-documentation, an array of stringsNotes:requestdoc:In the usual case, stdin is used to pass in data. However,some programs (eg. synthetic data generators) don't use stdinto pass in data and some programs require two or more argumentsbesides the command itself (eg. sudiff) and don't use stdin.In this last case, we give selfdoc whenever too few argumentsare given, since these usages violate the usual SU syntax.In all cases, selfdoc can be requested by giving only theprogram name.The flag argument distinguishes these cases: flag = 0; fully defaulted, no stdin flag = 1; usual case flag = n > 1; no stdin and n extra args requiredpagedoc:Intended to be called by requesdoc(), but conceivably could beused directly as in: if (xargc != 3) selfdoc();Based on earlier versions by:SEP: Einar Kjartansson, Stew Levin CWP: Jack Cohen, Shuki RonenHRC: LyleAuthor: Jack K. Cohen, Center for Wave Phenomena
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?