📄 prefs.hpp
字号:
//*************************************************************************// MODULE : System Initialization Parameters support module *// AUTHOR : Ron Chernich *// PURPOSE: Define function protos and any constants *// HISTORY: *// 21-MAR-95 First Version (MS Visual C++ 1.5) *//*************************************************************************#ifndef _INI_PREFS_ #include <fstream.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include "rcos.hpp" ////////////////////// // define the constants which identify the private preferences file // and the user selectable variables.. // #define PREFS_NAME "rcos.ini" #define PREFS_TTYS "terminals" #define PREFS_QUAN "quantum" #define PREFS_VIEW "display" #define SPACE ' ' #define MAX_PREF 128 #define PREFS_MODE (ios::in | ios::nocreate ) ////////////////// // Borland and MS have different ways of testing for an open stream.. // #if defined(MSC700) #define __OPEN_TEST (ini.is_open() ? TRUE : FALSE) #endif // BC31 not tested yet #if defined(BC20) || defined (BC31) #define __OPEN_TEST ((ini.rdbuf())->is_open() ? TRUE : FALSE) #endif #ifdef UNIX #define __OPEN_TEST (ini.is_open() ? TRUE : FALSE ) #endif //////////////// // A class to hold private INI file data // class Preferences { ifstream ini; BOOL bOpen; char *pBuffer; char *FindKey (const char*); public: Preferences (void); ~Preferences (void); UINT16 GetPrefInt (const char*, UINT16); UINT16 GetPrefStr (const char*, const char*, char*, UINT16); }; #define _INI_PREFS_#endif///////////////////////////////// EOF //////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -