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

📄 mshell.h

📁 very famous terminal, i use it test cli in vxworks many times, very useful
💻 H
字号:
/* * mShell * Copyright 2006, Julien Lecomte * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from the * use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: *   1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software in a * product, an acknowledgment in the product documentation would be appreciated * but is not required. *   2. Altered source versions must be plainly marked as such, and must not * be misrepresented as being the original software. *   3. This notice may not be removed or altered from any source distribution. * * $Id: mshell.h,v 1.2 2006/04/06 10:56:57 julienlecomte Exp $ */#ifndef _MSHELL_H#define _MSHELL_H/* Switch this to the path of mSys installation if you wish to easily debug * under Code::Blocks * ie: if mSys bash is 'M:\bin\bash.exe', set this to 'M:\\' */#ifdef DEBUG# include <stdio.h># define DEBUG_FIXED_PATH TEXT("M:\\")# define DEBUG_PRINTF(format, args...) printf(" **** %s: ", __func__); printf(format, ##args); printf("\n");# define DEBUG_ECHO(format, args...) printf(format, ##args);#else# define DEBUG_PRINTF(format, args...)# define DEBUG_ECHO(format, args...)#endif/* Possible shells */#define SHELL_NONE    0#define SHELL_BASH    1#define SHELL_SH      2#define WNDCLASS_MDIPARENT  TEXT("mShell MDI Window")#define WNDCLASS_TERMINAL   TEXT("mShell Terminal Window")#define TERMINAL_PROP       TEXT("mShell Terminal Property")typedef struct {  unsigned int type;  LPCTSTR name;  LPCTSTR caption;} POSSHELLS, *LPPOSSHELLS;typedef struct {  /* Terminal information */  HWND     hTerminal;     /* rxvt window */  HWND     hMdiChild;     /* MDI child that handles rxvt window */  BOOL  ismsys;  BOOL  ismingw;  PROCESS_INFORMATION   pi;  TCHAR  szCmdLine[MAX_PATH];  TCHAR  szSysDir[MAX_PATH];  TCHAR  szCurDir[MAX_PATH];  LPVOID lpEnv;} TERMINAL_INFO, *LPTERMINAL_INFO;void LoadMDIWindow (void);/* Dialog procedures, dlg_funcs.c */void InitDlgFont (HWND);void InitDlgCenter (HWND);/* Callback function */INT_PTR CALLBACK NewShellDlgProc (HWND, UINT, WPARAM, LPARAM);INT_PTR CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM);LRESULT CALLBACK TerminalWndProc (HWND, UINT, WPARAM, LPARAM);/* Global functions, mshell_funcs.c */BOOL FindSystemDLL (void);BOOL PopulateShells (HWND);BOOL ValidateShellInfo (LPTERMINAL_INFO, HWND, HWND);#define MSGBOX_RETURN(hwnd,str,val) \ { MessageBox (hwnd, TEXT( str ), TEXT("mShell error"), MB_ICONERROR | MB_OK); \   return val; }#define IFFAIL_MSGBOX_RETURN(ifval, hwnd, str, val) \  if ( ifval ) \    MSGBOX_RETURN (hwnd, str, val)#endif

⌨️ 快捷键说明

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