📄 macros.3
字号:
.\" Copyright (c) 1987-1990 Entropic Speech, Inc..\" Copyright (c) 1997 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)macros.3 1.6 18 Apr 1997 ESI/ERL.ds ]W (c) 1997 Entropic Research Laboratory, Inc..TH MACROS 3\-ESPSu 18 Apr 1997.SH NAMEmacros \- useful macros for ESPS programs.SH SYNOPSIS.ft B#include <esps/esps.h>.spTRYOPEN(prog,filename,mode,fd).brchar *prog,*filename,*mode;.brFILE *fd;.spCANTOPEN(prog,filename).brchar *prog, *filename;.spUSAGE(text).brchar *text;.spNOTSPS(prog,filename).brchar *prog,*filename;.spBOOL(arg).brint arg;.spROUND (arg).brfloat arg;.spLROUND (arg).brfloat arg;.spMAX (a,b).spMIN (a,b).sp.ft.SH DESCRIPTION.PPThe TRYOPEN macro attempts to open a file with fopen(3), using the givenmode, which may be "r", "w", or any other mode allowed by fopen(3). If thefile cannot be opened, a message is printed on the error output of theform.nfprogram: can't open filename: reason.fiand the program exits with error status 1. The reason text is obtained fromthe perror(3) call, which interprets the system error status. Examples include"no such file or directory" or "permission denied"..PPThe CANTOPEN macro is invoked by TRYOPEN; it may also be invoked directly.It just prints the error message described above and causes an exit witherror status 1..PPThe USAGE macro prints the message.nfUsage: text.fion the error output and causes a program exit with error status 1..PPThe NOTSPS macro prints an error message of the form.nfprogram: filename is not an ESPS file.fion the error output and causes an exit with error status 1..PPThe BOOL macro returns true (1) if the argument is 1, 'y', or 'Y', and false(0) otherwise. It is useful for testing ESPS header values or parameter filevalues..PPThe ROUND macro is used to round a floating value to the nearest integervalue. This is used for floating to integer conversions when roundingis desired, rather than truncation..PPThe LROUND macro is like ROUND, but it returns a type LONG..PPMIN and MAX return the maximum or minimum of their arguments. They canbe used with any data type.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -