GPL sync + delete value implemented

svn path=/trunk/; revision=1419
This commit is contained in:
Nedko Arnaudov 2000-10-24 20:17:42 +00:00
parent 2a81cebc82
commit a248f1e7c3
29 changed files with 510 additions and 134 deletions

View file

@ -1,11 +1,23 @@
/* $Id: ArgumentParser.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ArgumentParser.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ArgumentParser.cpp: implementation of the CArgumentParser class.

View file

@ -1,11 +1,23 @@
/* $Id: Console.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: Console.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// Console.cpp: implementation of the CConsole class.
@ -14,6 +26,10 @@
#include "ph.h"
#include "Console.h"
#define MORE_STRING _T("-- Press space to view more. Press q or Ctrl+break to cancel.--")
#define MORE_EMPTY_STRING _T(" ")
/*
TCHAR * _tcsnchr(const TCHAR *string, TCHAR ch, int count)
{
@ -45,20 +61,30 @@ CConsole::CConsole()
m_pchBuffer2 = NULL;
m_pfReplaceCompletionCallback = NULL;
m_blnMoreMode = TRUE;
m_dwOldInputMode = 0;
m_dwOldOutputMode = 0;
m_blnOldInputModeSaved = FALSE;
m_blnOldOutputModeSaved = FALSE;
}
CConsole::~CConsole()
{
if (m_hStdIn != INVALID_HANDLE_VALUE)
VERIFY(CloseHandle(m_hStdIn));
if (m_hStdOut != INVALID_HANDLE_VALUE)
VERIFY(CloseHandle(m_hStdOut));
if (m_pchBuffer)
delete m_pchBuffer;
if (m_pchBuffer1)
delete m_pchBuffer1;
if (m_pchBuffer2)
delete m_pchBuffer2;
if (m_blnOldInputModeSaved)
SetConsoleMode(m_hStdIn,m_dwOldInputMode);
if (m_blnOldOutputModeSaved)
SetConsoleMode(m_hStdOut,m_dwOldOutputMode);
if (m_hStdIn != INVALID_HANDLE_VALUE)
VERIFY(CloseHandle(m_hStdIn));
if (m_hStdOut != INVALID_HANDLE_VALUE)
VERIFY(CloseHandle(m_hStdOut));
}
BOOL CConsole::Write(const TCHAR *p, DWORD dwChars)
@ -84,7 +110,9 @@ BOOL CConsole::Write(const TCHAR *p, DWORD dwChars)
m_CursorPosition.X = 0;
break;
case _T('\r'):
break;
dwCharsWrittenAdd++;
dwCharsToWrite--;
continue;
case _T('\t'):
do
{
@ -136,12 +164,12 @@ BOOL CConsole::Write(const TCHAR *p, DWORD dwChars)
{
ASSERT(m_Lines == m_BufferSize.Y-1);
m_Lines = 0;
VERIFY(WriteString(_T("-- More --"),m_CursorPosition));
VERIFY(WriteString(MORE_STRING,m_CursorPosition));
VERIFY(FlushInputBuffer());
CONSOLE_CURSOR_INFO cci;
cci.bVisible = FALSE;
cci.dwSize = 10;
cci.dwSize = 100;
VERIFY(SetConsoleCursorInfo(m_hStdOut,&cci));
INPUT_RECORD InputRecord;
@ -149,22 +177,30 @@ BOOL CConsole::Write(const TCHAR *p, DWORD dwChars)
while ((ret = ReadConsoleInput(m_hStdIn,&InputRecord,1,&dwRecordsReaded)) != FALSE)
{
ASSERT(dwRecordsReaded == 1);
if (dwRecordsReaded != 1) break;
if (InputRecord.EventType != KEY_EVENT) continue;
if (!InputRecord.Event.KeyEvent.bKeyDown) continue;
if (dwRecordsReaded != 1)
break;
if (InputRecord.EventType != KEY_EVENT)
continue;
if (!InputRecord.Event.KeyEvent.bKeyDown)
continue;
if ((InputRecord.Event.KeyEvent.wVirtualKeyCode == VK_CANCEL)||
(InputRecord.Event.KeyEvent.wVirtualKeyCode == _T('Q')))
{
VERIFY(GenerateConsoleCtrlEvent(CTRL_C_EVENT,0));
continue;
}
#ifdef UNICODE
TCHAR ch = InputRecord.Event.KeyEvent.uChar.UnicodeChar;
#else
TCHAR ch = InputRecord.Event.KeyEvent.uChar.AsciiChar;
#endif
if (ch == VK_CANCEL)
{
VERIFY(GenerateConsoleCtrlEvent(CTRL_C_EVENT,0));
continue;
}
if (ch) break;
if (ch)
break;
}
VERIFY(WriteString(_T(" "),m_CursorPosition));
// delete "more" msg
VERIFY(WriteString(MORE_EMPTY_STRING,m_CursorPosition));
m_CursorPosition.X = 0;
cci.bVisible = TRUE;
@ -828,6 +864,21 @@ TCHAR * CConsole::Init(DWORD dwBufferSize, DWORD dwMaxHistoryLines)
if (!GetConsoleScreenBufferInfo(m_hStdOut,&info)) goto Abort;
m_wAttributes = info.wAttributes;
if (!m_blnOldInputModeSaved)
{
if (!GetConsoleMode(m_hStdIn,&m_dwOldInputMode))
goto Abort;
m_blnOldInputModeSaved = TRUE;
}
if (!m_blnOldOutputModeSaved)
{
if (!GetConsoleMode(m_hStdOut,&m_dwOldOutputMode))
goto Abort;
m_blnOldOutputModeSaved = TRUE;
}
if (!SetConsoleMode(m_hStdIn,0)) goto Abort;
if (!SetConsoleMode(m_hStdOut,0)) goto Abort;
@ -985,37 +1036,3 @@ void CConsole::EnableWrite()
{
m_blnDisableWrite = FALSE;
}
/* DWORD ofs = dwCurrentCharOffset;
DWORD nLines = (FristCharCursorPosition.X + dwLastCharOffset-1)/m_BufferSize.X;
for (DWORD nLine = 0 ; nLine <= nLines ; nLine++)
{
ASSERT(m_BufferSize.X > pos.X);
DWORD nChars = m_BufferSize.X - pos.X - 1;
if (nChars > dwLastCharOffset - ofs) nChars = dwLastCharOffset - ofs;
if (nChars)
{ // We have some chars to move in this line
_tcsncpy(m_pchBuffer1,m_pchBuffer+ofs,nChars);
m_pchBuffer1[nChars] = 0;
if (!WriteString(m_pchBuffer1,pos)) return FALSE;
}
pos.X = SHORT(pos.X + nChars);
// if current line is not the last line
// Move the first char in next line to end of current line
if (nLine < nLines)
{
ofs += nChars;
m_pchBuffer1[0] = m_pchBuffer[ofs];
m_pchBuffer1[1] = 0;
if (!WriteString(m_pchBuffer1,pos)) return FALSE;
pos.Y++;
pos.X = 0;
ofs++;
}
else // Adjust end of read line
{
m_pchBuffer1[0] = _T(' ');
m_pchBuffer1[1] = 0;
if (!WriteString(m_pchBuffer1,pos)) return FALSE;
}
}*/

View file

@ -51,6 +51,10 @@ private:
BOOL m_blnMoreMode;
CTextHistory m_History;
BOOL m_blnDisableWrite;
DWORD m_dwOldOutputMode;
DWORD m_dwOldInputMode;
BOOL m_blnOldInputModeSaved;
BOOL m_blnOldOutputModeSaved;
};
#endif // !defined(CONSOLE_H__FEF419EC_6EB6_11D3_907D_204C4F4F5020__INCLUDED_)

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.2 2000/10/08 10:48:10 narnaoud Exp $
# $Id: Makefile,v 1.3 2000/10/24 20:17:41 narnaoud Exp $
#
# ReactOS makefile for RegExpl
#
@ -7,6 +7,10 @@ include ../../rules.mak
TARGET_NAME=regexpl
all: $(TARGET_NAME)$(EXE_POSTFIX)
include depend.mak
ROS_DIR=../../../reactos
ROS_INC=$(ROS_DIR)/include
ROS_LIB=$(ROS_DIR)/lib
@ -17,7 +21,9 @@ IMPORT_ADVAPI32=$(ROS_LIB)/advapi32/advapi32.a
IMPORT_USER32=$(ROS_LIB)/user32/user32.a
IMPORT_CRTDLL=$(ROS_LIB)/crtdll/crtdll.a
all: $(TARGET_NAME)$(EXE_POSTFIX)
depend.mak : *.h
$(CC) \
-MM *.cpp *.c > $@
OBJECTS = \
ArgumentParser.o \
@ -51,20 +57,20 @@ CLEAN_FILES = \
*.o \
$(TARGET_NAME)$(EXE_POSTFIX) \
$(TARGET_NAME).sym \
$(TARGET_NAME).coff
$(TARGET_NAME).coff\
depend.mak
$(TARGET_NAME)$(EXE_POSTFIX): $(OBJECTS)
$(CC) \
-Wl,--subsystem,console \
-o $(TARGET_NAME) \
-o $@ \
$(IMPORT_KERNEL32) \
$(IMPORT_CRTDLL) \
$(IMPORT_USER32) \
$(OBJECTS)
$(NM) --numeric-sort $(TARGET_NAME)$(EXE_POSTFIX) > $(TARGET_NAME).sym
clean: $(CLEAN_FILES:%=%_clean)
$(CLEAN_FILES:%=%_clean): %_clean:

View file

@ -1,11 +1,23 @@
/* $Id: RegistryExplorer.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: RegistryExplorer.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// Registry Explorer.cpp : Defines the entry point for the console application.
@ -33,6 +45,7 @@
#include "ShellCommandNewKey.h"
#include "ShellCommandDeleteKey.h"
#include "ShellCommandSetValue.h"
#include "ShellCommandDeleteValue.h"
TCHAR pchCurrentKey[PROMPT_BUFFER_SIZE];
@ -415,6 +428,9 @@ int main ()
CShellCommandSetValue SetValueCommand(Tree);
CommandsList.AddCommand(&SetValueCommand);
CShellCommandDeleteValue DeleteValueCommand(Tree);
CommandsList.AddCommand(&DeleteValueCommand);
CArgumentParser Parser;
int nRetCode = 0;
@ -450,11 +466,12 @@ int main ()
Tree.SetDesiredOpenKeyAccess(KEY_READ);
GetCommand:
// prompt
// TODO: make prompt user-customizable
Console.EnableWrite();
Console.Write(_T("["));
_tcscpy(pchCurrentKey,Tree.GetCurrentPath());
Console.Write(pchCurrentKey);
Console.Write(_T("]"));
Console.Write(_T("\n# "));
Console.FlushInputBuffer();
blnCommandExecutionInProgress = FALSE;

View file

@ -2,7 +2,7 @@
#ifndef _REGISTRY_EXPLORER_H__INCLUDED
#define _REGISTRY_EXPLORER_H__INCLUDED
#define CURRENT_VERSION _T("0.10")
#define CURRENT_VERSION _T("0.10+")
#define EMAIL _T("registryexplorer@yahoo.com")
//#define __L(x) L ## x
@ -12,10 +12,32 @@
_T("Version ") CURRENT_VERSION _T(" Compiled on ") date _T("\n")\
_T("Coded by Nedko Arnaoudov. This product is freeware.\n\n")
*/
#define HELLO_MSG _T("Registry Explorer version ") CURRENT_VERSION _T(" for ReactOS\n")\
_T("Coded by Nedko Arnaoudov. Licence is GNU GPL.\n\n")
#define VER_MSG _T("Please report bugs to ") EMAIL _T("\n")
#define PRODUCT_NAME _T("Registry Explorer")
#define HELLO_MSG _T("ReactOS ") PRODUCT_NAME _T(" version ") CURRENT_VERSION _T("\n")\
_T("License is GNU GPL. Type `help gpl` for details.\n\n")
#define NOWARANTY_MSG _T("Registry Explorer comes with ABSOLUTELY NO WARRANTY\n")\
_T("This is free software, and you are welcome to redistribute it\n")\
_T("under certain conditions; type `help gpl' for details.\n")
#define COPYRIGHT_MSG _T("Copyright (C) 2000 Nedko Arnaoudov\n")
#define CREDITS_MSG _T("Registry Explorer is written by Nedko Arnaoudov\n")\
_T("Special thanks to Emanuele Aliberti\n")
#define BUGS_MSG _T("Please report bugs to ") EMAIL _T("\n")\
_T("Updates are available at http://www.geocities.com/registryexplorer/\n")\
_T("and as part of ReactOS http://www.reactos.com\n")
#define VER_MSG COPYRIGHT_MSG\
_T("\n")\
NOWARANTY_MSG\
_T("\n")\
CREDITS_MSG\
_T("\n")\
BUGS_MSG
#define GOODBYE_MSG _T("\nThank you for using Registry Explorer !!!\n")

View file

@ -1,11 +1,23 @@
/* $Id: RegistryKey.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: RegistryKey.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// RegistryKey.cpp: implementation of the CRegistryKey class.
@ -439,3 +451,8 @@ DWORD CRegistryKey::SetValue(LPCTSTR pszValueName, DWORD dwType, BYTE *lpData, D
{
return RegSetValueEx(m_hKey,pszValueName,0,dwType,lpData,dwDataSize);
}
DWORD CRegistryKey::DeleteValue(LPCTSTR pszValueName)
{
return RegDeleteValue(m_hKey,pszValueName);
}

View file

@ -8,6 +8,7 @@
class CRegistryKey
{
public:
DWORD DeleteValue(LPCTSTR pszValueName);
DWORD SetValue(LPCTSTR pszValueName, DWORD dwType, BYTE *lpData, DWORD dwDataSize);
DWORD Delete(BOOL blnRecursive);
DWORD DeleteSubkey(LPCTSTR pszSubKey, BOOL blnRecursive = FALSE);

View file

@ -1,11 +1,23 @@
/* $Id: RegistryTree.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: RegistryTree.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// RegistryTree.cpp: implementation of the CRegistryTree class.

View file

@ -1,11 +1,23 @@
/* $Id: SecurityDescriptor.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: SecurityDescriptor.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// SecurityDescriptor.cpp: implementation of the CSecurityDescriptor class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommand.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ShellCommand.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommand.cpp: implementation of the CShellCommand class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandChangeKey.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ShellCommandChangeKey.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandChangeKey.cpp: implementation of the CShellCommandChangeKey class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandConnect.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ShellCommandConnect.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandConnect.cpp: implementation of the CShellCommandConnect class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandDACL.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ShellCommandDACL.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandDACL.cpp: implementation of the CShellCommandDACL class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandDOKA.cpp,v 1.1 2000/10/04 21:04:30 ea Exp $
/* $Id: ShellCommandDOKA.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandDOKA.cpp: implementation of the CShellCommandDOKA class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandDeleteKey.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandDeleteKey.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandDeleteKey.cpp: implementation of the CShellCommandDeleteKey class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandDeleteValue.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandDeleteValue.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandDeleteValue.cpp: implementation of the CShellCommandDeleteValue class.
@ -137,6 +149,8 @@ CheckValueArgument:
if (pKey)
{ // not root key ???
if (pKey->DeleteValue(pchValueName) != ERROR_SUCCESS)
rConsole.Write(_T("Cannot set value\n"));
} // if (pKey)
else
{

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandDir.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandDir.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandDir.cpp: implementation of the CShellCommandDir class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandExit.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandExit.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandExit.cpp: implementation of the CShellCommandExit class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandHelp.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandHelp.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandHelp.cpp: implementation of the CShellCommandHelp class.
@ -48,6 +60,42 @@ int CShellCommandHelp::Execute(CConsole &rConsole, CArgumentParser& rArguments)
pCommand = m_rCommandsLinkedList.GetNextCommand(pos);
rConsole.Write(pCommand->GetHelpShortDescriptionString());
}
return 0;
}
if (_tcsicmp(pchArg,_T("GPL")) == 0)
{
HRSRC hrcGPL;
HGLOBAL hGPL;
char *pchGPL;
DWORD dwSize;
if ((hrcGPL = FindResource(NULL, _T("GPL"), _T("LICENSE")))&&
(hGPL = LoadResource(NULL,hrcGPL))&&
(pchGPL = (char *)LockResource(hGPL))&&
(dwSize = SizeofResource(NULL,hrcGPL)))
{
// save last char
char pchSaved[2];
pchSaved[0] = pchGPL[dwSize-1];
pchSaved[1] = 0;
// make null-terminated string
pchGPL[dwSize-1] = 0;
// replace all non-printable chars except CR, LF and HTAB with spaces
for (DWORD i = 0; i < dwSize ; i++)
if ((!isprint(pchGPL[i]))&&(pchGPL[i] != '\r')&&(pchGPL[i] != '\n')&&(pchGPL[i] != '\t'))
pchGPL[i] = ' ';
rConsole.Write(pchGPL);
rConsole.Write(pchSaved);
}
else
{
rConsole.Write(_T("Internal error cannot load GPL.\n"));
}
return 0;
}
while (pchArg)

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandNewKey.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandNewKey.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandNewKey.cpp: implementation of the CShellCommandNewKey class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandOwner.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandOwner.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandOwner.cpp: implementation of the CShellCommandOwner class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandSACL.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandSACL.cpp,v 1.2 2000/10/24 20:17:41 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandSACL.cpp: implementation of the CShellCommandSACL class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandSetValue.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandSetValue.cpp,v 1.2 2000/10/24 20:17:42 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandSetValue.cpp: implementation of the CShellCommandSetValue class.

View file

@ -1,12 +1,25 @@
/* $Id: ShellCommandValue.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandValue.cpp,v 1.2 2000/10/24 20:17:42 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandValue.cpp: implementation of the CShellCommandValue class.
//
//////////////////////////////////////////////////////////////////////

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandVersion.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandVersion.cpp,v 1.2 2000/10/24 20:17:42 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandVersion.cpp: implementation of the CShellCommandVersion class.

View file

@ -1,11 +1,23 @@
/* $Id: ShellCommandsLinkedList.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: ShellCommandsLinkedList.cpp,v 1.2 2000/10/24 20:17:42 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// ShellCommandsLinkedList.cpp: implementation of the CShellCommandsLinkedList class.

View file

@ -1,11 +1,23 @@
/* $Id: TextHistory.cpp,v 1.1 2000/10/04 21:04:31 ea Exp $
/* $Id: TextHistory.cpp,v 1.2 2000/10/24 20:17:42 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
* Copyright (c) 1999-2000 Nedko Arnaoudov <nedkohome@atia.com>
* Copyright (C) 2000 Nedko Arnaoudov <nedkohome@atia.com>
*
* License: GNU GPL
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
// TextHistory.cpp: implementation of the CTextHistory class.

View file

@ -36,3 +36,4 @@ BEGIN
END
END
GPL LICENSE "..\\..\\copying"