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

📄 warn.h

📁 伯克利做的SFTP安全文件传输协议
💻 H
字号:
// warn.h// module to facilitate providing operational warnings to the user// copyright SafeTP Development Group, Inc., 2000  Terms of use are as specified in license.txt#ifndef __WARN_H#define __WARN_H// non-disjoint warning classification scheme// (add more classes as necessary)enum WarnLevel {  WARN_PERFORMANCE     = 0x01,    // may cause suboptimal performance  WARN_SECURITY        = 0x02,    // possible compromise of private data, unauthrorized    // access, authentication warning, etc.  WARN_COMPATIBILITY   = 0x04,    // interoperability with other software (including    // different versions of this software) may be    // adversely affected  WARN_DEBUG           = 0x08,    // of use during debugging only; setting this flag means    // the warning handler should alert an attached debugger  WARN_INFORMATION     = 0x10,    // I'm not sure when/why this would be used...    // Note: This is *not* to be used as a diagnostic 'printf'.   WARN_ALL             = 0x1F,    // logical-or of all flags  WARN_NONE            = 0x0,    // no warnings};// user interface// --------------// call this to report a warning//   level   - logical-or of applicable conditions//   message - user-intelligible message (should *not* contain a newline)void warning(WarnLevel level, char const *message);// handler interface// -----------------// the warning() function calls warningHandler(), so new// handlers are installed by changing that valuetypedef void (*WarningHandler)(WarnLevel level, char const *message);extern WarningHandler warningHandler;// default handler// ---------------// the default warning handler masks the input level with two// global variables://   logWarnLevel - messages are written to a log file, "warning.log"//   displayWarnLevel - messages are written to stderr via stdio 'stderr'extern WarnLevel logWarnLevel;       // default: WARN_ALL, minus WARN_DEBUG ifdef NDEBUGextern WarnLevel displayWarnLevel;   // default: ifdef NDEBUG, WARN_NONE, else WARN_ALL// handler functions (handler dispatches to logger and printer)void defaultWarningHandler(WarnLevel level, char const *message);void defaultWarningLogger(WarnLevel level, char const *message);void defaultWarningPrinter(WarnLevel level, char const *message);#endif // __WARN_H

⌨️ 快捷键说明

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