📄 ver.c
字号:
/* * VER.C - ver internal command. * * * History: * * 06/30/98 (Rob Lake) * rewrote ver command to accept switches, now ver alone prints * copyright notice only. * * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>) * added config.h include * * 30-Jul-1998 (John P Price <linux-guru@gcfl.net>) * added text about where to send bug reports and get updates. * * 20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>) * Unicode and redirection safe! * * 26-Feb-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>) * New version info and some output changes. */#include "config.h"#include "cmd.h"VOID ShortVersion (VOID){ ConOutPuts (_T("\n") SHELLINFO _T("\n") SHELLVER _T("\n"));}#ifdef INCLUDE_CMD_VER/* * display shell version info internal command. * * */INT cmd_ver (LPTSTR cmd, LPTSTR param){ INT i; if (_tcsstr (param, _T("/?")) != NULL) { ConOutPuts (_T("Displays shell version information\n") _T("\n") _T("VER [/C][/R][/W]\n") _T("\n") _T(" /C Displays credits.\n") _T(" /R Displays redistribution information.\n") _T(" /W Displays warranty information.")); return 0; } ConOutPuts (_T("\n") SHELLINFO _T("\n") SHELLVER _T("\n") _T("\n") _T("Copyright (C) 1994-1998 Tim Norman and others.")); ConOutPuts (_T("Copyright (C) 1998-2001 Eric Kohl and others.")); ConOutPuts (_T("Copyright (C) 2002 SymbolicTools")); /* Basic copyright notice */ if (param[0] == _T('\0')) { ConOutPuts (_T("\n")SHELLINFO _T(" comes with ABSOLUTELY NO WARRANTY; for details\n") _T("type: `ver /w'. This is free software, and you are welcome to redistribute\n") _T("it under certain conditions; type `ver /r' for details. Type `ver /c' for a\n") _T("listing of credits.")); } else { for (i = 0; param[i]; i++) { /* skip spaces */ if (param[i] == _T(' ')) continue; if (param[i] == _T('/')) { /* is this a lone '/' ? */ if (param[i + 1] == 0) { error_invalid_switch (_T(' ')); return 1; } continue; } if (_totupper (param[i]) == _T('W')) { /* Warranty notice */ ConOutPuts (_T("\n This program is distributed in the hope that it will be useful,\n") _T(" but WITHOUT ANY WARRANTY; without even the implied warranty of\n") _T(" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n") _T(" GNU General Public License for more details.")); } else if (_totupper (param[i]) == _T('R')) { /* Redistribution notice */ ConOutPuts (_T("\n This program is free software; you can redistribute it and/or modify\n") _T(" it under the terms of the GNU General Public License as published by\n") _T(" the Free Software Foundation; either version 2 of the License, or\n") _T(" (at your option) any later version.")); } else if (_totupper (param[i]) == _T('C')) { /* Developer listing */ ConOutPuts (_T("\n") _T("FreeDOS version written by:\n") _T(" Tim Norman Matt Rains\n") _T(" Evan Jeffrey Steffen Kaiser\n") _T(" Svante Frey Oliver Mueller\n") _T(" Aaron Kaufman Marc Desrochers\n") _T(" Rob Lake John P Price\n") _T(" Hans B Pufal\n") _T("\n") _T("ReactOS version written by:\n") _T(" Eric Kohl Emanuele Aliberti\n") _T(" Paolo Pantaleo\n")); } else { error_invalid_switch ((TCHAR)_totupper (param[i])); return 1; } } } ConOutPuts (_T("\n") _T("Send bug reports to <ekohl@rz-online.de>.\n") _T("Updates are available at: http://www.reactos.com")); return 0;}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -