📄 crlflex.h
字号:
// crlflex.h// declarations common to *lf*.lex// copyright SafeTP Development Group, Inc., 2000 Terms of use are as specified in license.txt#ifndef __CRLFLEX_H#define __CRLFLEX_H#include "inputsrc.h" // StreamInputSource, StreamOutputDest// translate between LF-terminated lines and CRLF-terminated linesvoid LF_to_CRLF(StreamInputSource &source, StreamOutputDest &dest, int &CRs);// translate the other wayvoid CRLF_to_LF(StreamInputSource &source, StreamOutputDest &dest, int &bareCRs, int &bareLFs);// same thing, but output format is same as inputvoid CRLF_to_CRLF(StreamInputSource &source, StreamOutputDest &dest, int &bareCRs, int &bareLFs);// NOTE: for the above, the 'warnings' counters (CRs, bareCRs, bareLFs)// should be set to 0 before the call// type covering both CRLF_to_*typedef void (*FromCRLFTranslator)(StreamInputSource &source, StreamOutputDest &dest, int &bareCRs, int &bareLFs);// stuff only the scanner should see#ifdef FLEX_SCANNER // turn off "condition is always true" warning, provoked by %option noyywrap #ifdef __BORLANDC__ #pragma warn -ccc #endif // used by the lexer to read from a StreamInputSource #define YY_INPUT(buf, result, max_size) \ result = streamSource->read(buf, max_size); // unfortunately, we seem to need a global variable for this; // the flex lexers aren't reentrant anyway (they use global state // variables), so the publicly-declared functions above internally // acquire and release the lock static StreamInputSource *streamSource; // this is what we want, and also happens to avoid a warning // about the 'fileno' fn under Linux #define YY_NEVER_INTERACTIVE 1#endif#endif // __CRLFLEX_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -