mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
Synchronize with trunk.
svn path=/branches/ntvdm/; revision=59499
This commit is contained in:
+1
-1
@@ -202,8 +202,8 @@ else()
|
||||
include/psdk
|
||||
include/dxsdk
|
||||
${REACTOS_BINARY_DIR}/include
|
||||
${REACTOS_BINARY_DIR}/include/dxsdk
|
||||
${REACTOS_BINARY_DIR}/include/psdk
|
||||
${REACTOS_BINARY_DIR}/include/dxsdk
|
||||
${REACTOS_BINARY_DIR}/include/reactos
|
||||
include/crt
|
||||
include/ddk
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
|
||||
set_cpp()
|
||||
|
||||
add_definitions(-DUSER_MODE)
|
||||
include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata)
|
||||
add_executable(atactl atactl.cpp atactl.rc)
|
||||
@@ -9,7 +11,6 @@ if(NOT MSVC)
|
||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
||||
#allow_warnings(atactl)
|
||||
set_source_files_properties(atactl.cpp PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||
target_link_libraries(atactl gcc)
|
||||
endif()
|
||||
|
||||
add_cd_file(TARGET atactl DESTINATION reactos/system32 FOR all)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
// Dialog
|
||||
@@ -547,7 +551,7 @@ BEGIN
|
||||
IDS_ENERGY_KILOJOULES "Kilojul"
|
||||
IDS_ENERGY_KILOWATT_HOURS "Kilovat-saat"
|
||||
IDS_ENERGY_NUTRITION_CALORIES "Besin kalorisi"
|
||||
IDS_ENERGY_TH_CALORIES "Termokimyasal kalori"
|
||||
IDS_ENERGY_TH_CALORIES "Termokimyevî kalori"
|
||||
END
|
||||
|
||||
// TYPES OF LENGTHS
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_CHARMAP DIALOGEX 6, 6, 292, 224
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Çeviri: Arda Tanrıkulu ([email protected]), Erdem Ersoy ([email protected])
|
||||
* TRANSLATORS: 2012 - Arda Tanrıkulu ([email protected])
|
||||
* 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280
|
||||
@@ -153,7 +155,7 @@ FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "ReactInput Aygıtları", -1, 10, 10, 452, 80
|
||||
CONTROL "", IDC_LIST_DEVICE, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60
|
||||
GROUPBOX "Girişle İlgili Aygıtlar", -1, 10, 100, 452, 60
|
||||
GROUPBOX "Giriş Aygıtları", -1, 10, 100, 452, 60
|
||||
CONTROL "", IDC_TREE_PORT, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 20, 112, 432, 40, 0x00000200
|
||||
GROUPBOX "Notlar", -1, 10, 170, 452, 50
|
||||
EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP
|
||||
@@ -175,55 +177,55 @@ END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_MAIN_DIALOG "ReactX Tanı Aracı"
|
||||
IDS_SYSTEM_DIALOG "Dizge"
|
||||
IDS_DISPLAY_DIALOG "Görüntü"
|
||||
IDS_SOUND_DIALOG "Ses"
|
||||
IDS_MUSIC_DIALOG "Mûsiki"
|
||||
IDS_INPUT_DIALOG "Giriş"
|
||||
IDS_NETWORK_DIALOG "Ağ"
|
||||
IDS_HELP_DIALOG "Yardım"
|
||||
IDS_FORMAT_MB "%I64u MB RAM"
|
||||
IDS_FORMAT_SWAP "%I64u MB kullanıldı, %I64u MB kullanılabilir"
|
||||
IDS_FORMAT_UNIPROC "%s (%u CPU)"
|
||||
IDS_FORMAT_MPPROC "%s (%u CPU)"
|
||||
IDS_VERSION_UNKNOWN "Bilinmeyen Sürüm"
|
||||
IDS_DEVICE_STATUS_ATTACHED "Bağlı"
|
||||
IDS_DEVICE_STATUS_MISSING "Bağlı değil"
|
||||
IDS_DEVICE_STATUS_UNKNOWN "Bilinmiyor"
|
||||
IDS_DEVICE_NAME "Aygıt Adı"
|
||||
IDS_DEVICE_STATUS "Durum"
|
||||
IDS_DEVICE_CONTROLLER "Denetleyici Kimliği"
|
||||
IDS_DEVICE_MANUFACTURER "Üretici Kimliği"
|
||||
IDS_DEVICE_PRODUCT "Ürün Kimliği"
|
||||
IDS_DEVICE_FORCEFEEDBACK "Güç Geribildirimli Sürücüsü"
|
||||
IDS_NOT_APPLICABLE "Uygulanamaz"
|
||||
IDS_OPTION_YES "Evet"
|
||||
IDS_DIRECTPLAY_COL_NAME1 "Ad"
|
||||
IDS_DIRECTPLAY_COL_NAME2 "Değer"
|
||||
IDS_DIRECTPLAY_COL_NAME3 "Kütük"
|
||||
IDS_DIRECTPLAY_COL_NAME4 "Sürüm"
|
||||
IDS_DIRECTPLAY8_MODEMSP "ReactPlay8 Çevirge Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_SERIALSP "ReactPlay8 Dizi Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_IPXSP "ReactPlay8 IPX Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_TCPSP "ReactPlay8 TCP/IP Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY_TCPCONN "ReactPlay için Genelağ TCP/IP Bağlantısı"
|
||||
IDS_DIRECTPLAY_IPXCONN "ReactPlay için IPX Bağlantısı"
|
||||
IDS_DIRECTPLAY_MODEMCONN "ReactPlay için Çeivrge Bağlantısı"
|
||||
IDS_DIRECTPLAY_SERIALCONN "ReactPlay için Dizi Bağlantısı"
|
||||
IDS_REG_SUCCESS "Tamam"
|
||||
IDS_REG_FAIL "Hata"
|
||||
IDS_DDTEST_ERROR "Sınama başarısız oldu."
|
||||
IDS_DDTEST_DESCRIPTION "ReactDraw arayüz sınaması başlatılacak. Sürdürülsün mü?"
|
||||
IDS_DDPRIMARY_DESCRIPTION "Bu sınama, ReactDraw'ı birincil yüzeye çizmek için kullanacak. Ekrana ak ve kara dikdörtgenler çizilecek. Sürdürülsün mü?"
|
||||
IDS_DDPRIMARY_RESULT "Ekranda ak ve kara dikdörtgenler gördünüz mü?"
|
||||
IDS_DDOFFSCREEN_DESCRIPTION "Bu sınama, ReactDraw'ı ekran dışı arabelleğe çizmek için kullanacak. Ekranda devinen bir ak dikdörtgen göreceksiniz. Sürdürülsün mü?"
|
||||
IDS_DDOFFSCREEN_RESULT "Ekranda devinen bir ak dikdörtgen gördünüz mü?"
|
||||
IDS_DDFULLSCREEN_DESCRIPTION "Bu sınama, ReactDraw'ı tam ekranda çizmek için kullanacak. Tam ekranda devinen bir ak dikdörtgen göreceksiniz. Sürdürülsün mü?"
|
||||
IDS_DDFULLSCREEN_RESULT "Tam ekranda devinen bir ak dikdörtgen gördünüz mü?"
|
||||
IDS_FORMAT_ADAPTER_MEM "%u MB"
|
||||
IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u ikillik) (%uHz)"
|
||||
IDS_OPTION_NO "Hayır"
|
||||
IDS_D3DTEST_DESCRIPTION "React3D arayüz sınaması başlatılacak. Sürdürülsün mü?"
|
||||
IDS_D3DTEST_D3Dx "Bu sınama, donanım hızlandırmalı React3D %u arayüzünü kullanacak."
|
||||
IDS_MAIN_DIALOG "ReactX Tanı Aracı"
|
||||
IDS_SYSTEM_DIALOG "Dizge"
|
||||
IDS_DISPLAY_DIALOG "Görüntü"
|
||||
IDS_SOUND_DIALOG "Ses"
|
||||
IDS_MUSIC_DIALOG "Mûsiki"
|
||||
IDS_INPUT_DIALOG "Giriş"
|
||||
IDS_NETWORK_DIALOG "Ağ"
|
||||
IDS_HELP_DIALOG "Yardım"
|
||||
IDS_FORMAT_MB "%I64u MB RAM"
|
||||
IDS_FORMAT_SWAP "%I64u MB kullanıldı, %I64u MB kullanılabilir"
|
||||
IDS_FORMAT_UNIPROC "%s (%u CPU)"
|
||||
IDS_FORMAT_MPPROC "%s (%u CPU)"
|
||||
IDS_VERSION_UNKNOWN "Bilinmeyen Sürüm"
|
||||
IDS_DEVICE_STATUS_ATTACHED "Bağlı"
|
||||
IDS_DEVICE_STATUS_MISSING "Bağlı değil"
|
||||
IDS_DEVICE_STATUS_UNKNOWN "Bilinmiyor"
|
||||
IDS_DEVICE_NAME "Aygıt Adı"
|
||||
IDS_DEVICE_STATUS "Durum"
|
||||
IDS_DEVICE_CONTROLLER "Denetleyici Kimliği"
|
||||
IDS_DEVICE_MANUFACTURER "Üretici Kimliği"
|
||||
IDS_DEVICE_PRODUCT "Ürün Kimliği"
|
||||
IDS_DEVICE_FORCEFEEDBACK "Güç Dönütlü Sürücüsü"
|
||||
IDS_NOT_APPLICABLE "Uygulanamaz"
|
||||
IDS_OPTION_YES "Evet"
|
||||
IDS_DIRECTPLAY_COL_NAME1 "Ad"
|
||||
IDS_DIRECTPLAY_COL_NAME2 "Değer"
|
||||
IDS_DIRECTPLAY_COL_NAME3 "Kütük"
|
||||
IDS_DIRECTPLAY_COL_NAME4 "Sürüm"
|
||||
IDS_DIRECTPLAY8_MODEMSP "ReactPlay8 Çevirge Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_SERIALSP "ReactPlay8 Dizilik Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_IPXSP "ReactPlay8 IPX Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY8_TCPSP "ReactPlay8 TCP/IP Hizmeti Sağlayıcısı"
|
||||
IDS_DIRECTPLAY_TCPCONN "ReactPlay için Örütbağ TCP/IP Bağlantısı"
|
||||
IDS_DIRECTPLAY_IPXCONN "ReactPlay için IPX Bağlantısı"
|
||||
IDS_DIRECTPLAY_MODEMCONN "ReactPlay için Çeivrge Bağlantısı"
|
||||
IDS_DIRECTPLAY_SERIALCONN "ReactPlay için Dizilik Bağlantı"
|
||||
IDS_REG_SUCCESS "Tamam"
|
||||
IDS_REG_FAIL "Hatâ"
|
||||
IDS_DDTEST_ERROR "Sınama başarısız oldu."
|
||||
IDS_DDTEST_DESCRIPTION "ReactDraw arayüz sınaması başlatılacak. Sürdürülsün mü?"
|
||||
IDS_DDPRIMARY_DESCRIPTION "Bu sınama, ReactDraw'ı birincil yüzeye çizmek için kullanacak. Ekrana ak ve kara dikdörtgenler çizilecek. Sürdürülsün mü?"
|
||||
IDS_DDPRIMARY_RESULT "Ekranda ak ve kara dikdörtgenler gördünüz mü?"
|
||||
IDS_DDOFFSCREEN_DESCRIPTION "Bu sınama, ReactDraw'ı ekran dışı arabelleğe çizmek için kullanacak. Ekranda devinen bir ak dikdörtgen göreceksiniz. Sürdürülsün mü?"
|
||||
IDS_DDOFFSCREEN_RESULT "Ekranda devinen bir ak dikdörtgen gördünüz mü?"
|
||||
IDS_DDFULLSCREEN_DESCRIPTION "Bu sınama, ReactDraw'ı tam ekranda çizmek için kullanacak. Tam ekranda devinen bir ak dikdörtgen göreceksiniz. Sürdürülsün mü?"
|
||||
IDS_DDFULLSCREEN_RESULT "Tam ekranda devinen bir ak dikdörtgen gördünüz mü?"
|
||||
IDS_FORMAT_ADAPTER_MEM "%u MB"
|
||||
IDS_FORMAT_ADAPTER_MODE "%04u x %04u (%u ikillik) (%uHz)"
|
||||
IDS_OPTION_NO "Hayır"
|
||||
IDS_D3DTEST_DESCRIPTION "React3D arayüz sınaması başlatılacak. Sürdürülsün mü?"
|
||||
IDS_D3DTEST_D3Dx "Bu sınama, donanım hızlandırmalı React3D %u arayüzünü kullanacak."
|
||||
END
|
||||
|
||||
@@ -94,7 +94,17 @@ WinMain (HINSTANCE hThisInstance,
|
||||
HINSTANCE hDLL;
|
||||
PGFRI GetFontResourceInfoW;
|
||||
LPCWSTR fileName;
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
g_hInstance = hThisInstance;
|
||||
|
||||
/* Get unicode command line */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winnls.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
@@ -66,6 +66,9 @@ END
|
||||
#ifdef LANGUAGE_SV_SE
|
||||
#include "lang/sv-SE.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_INSTALL, "Kur..."
|
||||
IDS_PRINT, "Yazdır..."
|
||||
IDS_STRING, "ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ 1234567890"
|
||||
IDS_OPEN, "Yazı Türü Aç..."
|
||||
IDS_ERROR, "Hatâ"
|
||||
IDS_ERROR_NOMEM, "Bu işlemin tamamlanması için yeterli bellek yok."
|
||||
IDS_ERROR_NOFONT, "%1 kütüğü, geçerli bir yazı türü kütüğü değil."
|
||||
IDS_ERROR_NOCLASS, "Pencere sınıfı başlatılamadı."
|
||||
END
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
set_cpp()
|
||||
set_cpp(WITH_RUNTIME)
|
||||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* PROJECT: Solitaire
|
||||
* PROJECT: ReactOS Solitaire
|
||||
* LICENSE: Freeware, permission to use under Public Domain
|
||||
* FILE: base/applications/games/solitaire/lang/tr-TR.rc
|
||||
* PURPOSE: Turkish Language File for Solitaire
|
||||
* PURPOSE: Turkish Resource File for ReactOS Solitaire
|
||||
* PROGRAMMERS: Daniel "EmuandCo" Reimer ([email protected])
|
||||
* TRANSLATOR: Erdem Ersoy (eersoy93)
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
set_cpp()
|
||||
set_cpp(WITH_RUNTIME)
|
||||
|
||||
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(
|
||||
${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_executable(spider
|
||||
spider.cpp
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* PROJECT: Spider Solitaire
|
||||
* LICENSE: See COPYING in top level directory
|
||||
* FILE: base/applications/games/spider/lang/tr-TR.rc
|
||||
* PURPOSE: Turkish Language File for Spider Solitaire
|
||||
* TRANSLATOR: Erdem Ersoy (eersoy93)
|
||||
* PROJECT: ReactOS Spider Solitaire
|
||||
* LICENSE: See COPYING in top level directory
|
||||
* FILE: base/applications/games/spider/lang/tr-TR.rc
|
||||
* PURPOSE: Turkish Resource File for ReactOS Spider Solitaire
|
||||
* PROGRAMMERS:
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
/*
|
||||
* WineMine
|
||||
* Turkish Language Support
|
||||
* Turkish Resources for ReactOS Winmine
|
||||
*
|
||||
* Copyright 2006 Fatih Aşıcı
|
||||
* Copyright 2013 Erdem Ersoy (eersoy93)
|
||||
* Copyrights: 2006 Fatih Aşıcı
|
||||
* 2013 Erdem Ersoy (eersoy93) ([email protected])
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -81,8 +80,8 @@ STYLE DS_MODALFRAME | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP | DS_SHEL
|
||||
CAPTION "Özel"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Satır Sayısı:", -1, 5, 5, 30, 10
|
||||
LTEXT "S&ütun Sayısı:", -1, 5, 35, 30, 10
|
||||
LTEXT "&Yataç Sayısı:", -1, 5, 5, 30, 10
|
||||
LTEXT "&Dikeç Sayısı:", -1, 5, 35, 30, 10
|
||||
LTEXT "&Mayın Sayısı:", -1, 5, 65, 30, 10
|
||||
EDITTEXT IDC_EDITROWS, 5, 15, 20, 12, ES_NUMBER
|
||||
EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER
|
||||
|
||||
@@ -518,6 +518,15 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdSh
|
||||
MSG msg;
|
||||
HANDLE hMutex;
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
hMutex = CreateMutex(NULL, FALSE, szKbSwitcherName);
|
||||
if (!hMutex)
|
||||
return 1;
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDR_POPUP MENU
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
* PROJECT: ReactOS Magnifier
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: base/applications/magnify/lang/tr-TR.rc
|
||||
* PURPOSE: Turkish Language File for Magnifier
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93)
|
||||
* PURPOSE: Turkish Resource File for RecatOS Magnifier
|
||||
* PROGRAMMERS:
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
@@ -49,6 +49,16 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Initialize global strings
|
||||
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
MyRegisterClass(hInstance);
|
||||
@@ -170,7 +180,7 @@ void Draw(HDC aDc)
|
||||
HDC HdcStrech;
|
||||
HANDLE hOld;
|
||||
HBITMAP HbmpStrech;
|
||||
|
||||
|
||||
RECT R;
|
||||
RECT appRect;
|
||||
DWORD rop = SRCCOPY;
|
||||
@@ -202,7 +212,7 @@ void Draw(HDC aDc)
|
||||
|
||||
/* Select our bitmap in memory DC and save the old one.*/
|
||||
hOld = SelectObject (HdcStrech , HbmpStrech);
|
||||
|
||||
|
||||
/* Paint the screen bitmap to our in memory DC */
|
||||
BitBlt(
|
||||
HdcStrech,
|
||||
@@ -214,7 +224,7 @@ void Draw(HDC aDc)
|
||||
0,
|
||||
0,
|
||||
SRCCOPY);
|
||||
|
||||
|
||||
/* Draw the mouse pointer in the right position */
|
||||
DrawIcon(
|
||||
HdcStrech ,
|
||||
@@ -271,8 +281,9 @@ void Draw(HDC aDc)
|
||||
blitAreaY,
|
||||
blitAreaWidth,
|
||||
blitAreaHeight,
|
||||
rop);
|
||||
|
||||
rop | NOMIRRORBITMAP);
|
||||
|
||||
|
||||
/* Cleanup.*/
|
||||
if (iinfo.hbmMask)
|
||||
DeleteObject(iinfo.hbmMask);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <winreg.h>
|
||||
#include <wingdi.h>
|
||||
#include <tchar.h>
|
||||
#include <winnls.h> //test
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDM_CONSOLEROOT MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış\tAlt+F4", ID_FILE_EXIT
|
||||
END
|
||||
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Hakkında...", ID_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APPTITLE "Yönetim Konsolu"
|
||||
IDS_CONSOLETITLE "Konsol%1!u!"
|
||||
END
|
||||
@@ -58,6 +58,9 @@
|
||||
#ifdef LANGUAGE_SV_SE
|
||||
#include "lang/sv-SE.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDR_MAINMENU MENU
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Aç...", IDM_OPEN_FILE
|
||||
MENUITEM "&Kapat", IDM_CLOSE_FILE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", IDM_EXIT
|
||||
END
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Hakkında", IDM_ABOUT
|
||||
END
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Aç...", IDM_OPEN_FILE
|
||||
MENUITEM "&Kapat", IDM_CLOSE_FILE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", IDM_EXIT
|
||||
END
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Hakkında", IDM_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ALL_TYPES_FILTER "Desteklenen Kütükler (*.wav, *.cda, *.mid, *.midi, *.avi)\0*.wav;*.cda;*.mid;*.midi;*.avi\0"
|
||||
IDS_TOOLTIP_PLAY "Çal"
|
||||
IDS_TOOLTIP_STOP "Durdur"
|
||||
IDS_TOOLTIP_EJECT "Çıkar"
|
||||
IDS_TOOLTIP_BACKWARD "Bir Önceki"
|
||||
IDS_TOOLTIP_SEEKBACK "Geri Sar"
|
||||
IDS_TOOLTIP_SEEKFORW "İleri Sar"
|
||||
IDS_TOOLTIP_FORWARD "Bir Sonraki"
|
||||
IDS_APPTITLE "Ortam Oynatıcısı"
|
||||
IDS_PLAY "Çal"
|
||||
IDS_ALL_TYPES_FILTER "Desteklenen Kütükler (*.wav, *.cda, *.mid, *.midi, *.avi)\0*.wav;*.cda;*.mid;*.midi;*.avi\0"
|
||||
IDS_TOOLTIP_PLAY "Çal"
|
||||
IDS_TOOLTIP_STOP "Durdur"
|
||||
IDS_TOOLTIP_EJECT "Çıkar"
|
||||
IDS_TOOLTIP_BACKWARD "Bir Önceki"
|
||||
IDS_TOOLTIP_SEEKBACK "Geri Sar"
|
||||
IDS_TOOLTIP_SEEKFORW "İleri Sar"
|
||||
IDS_TOOLTIP_FORWARD "Bir Sonraki"
|
||||
IDS_APPTITLE "Ortam Oynatıcısı"
|
||||
IDS_PLAY "Çal"
|
||||
END
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220
|
||||
STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
|
||||
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
|
||||
WS_THICKFRAME
|
||||
CAPTION "Dizge Yapılandırıcı"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "Tab1",IDC_TAB,"SysTabControl32", WS_TABSTOP, 2, 2, 374, 195
|
||||
DEFPUSHBUTTON "Tamam", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "&Yardım", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
PUSHBUTTON "&Uygula", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List3",IDC_STARTUP_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
|
||||
PUSHBUTTON "&Hepsini Etkinleştir", IDC_BTN_STARTUP_ACTIVATE, 223, 155, 66, 14
|
||||
PUSHBUTTON "H&epsini Devre Dışı Bırak", IDC_BTN_STARTUP_DEACTIVATE, 295, 155, 66, 14
|
||||
END
|
||||
|
||||
IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "", IDC_SYSTEM_TREE, "SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 2, 1, 280, 148
|
||||
PUSHBUTTON "B&ir Yukarı Taşı", IDC_BTN_SYSTEM_UP, 290, 5, 66, 14
|
||||
PUSHBUTTON "Bi&r Aşağı Taşı", IDC_BTN_SYSTEM_DOWN, 290, 25, 66, 14
|
||||
|
||||
PUSHBUTTON "E&tkinleştir", IDC_BTN_SYSTEM_ENABLE, 290, 50, 66, 14
|
||||
PUSHBUTTON "&Devre Dışı Bırak", IDC_BTN_SYSTEM_DISABLE, 290, 70, 66, 14
|
||||
|
||||
PUSHBUTTON "&Ara", IDC_BTN_SYSTEM_FIND, 290, 95, 66, 14
|
||||
PUSHBUTTON "Ye&ni", IDC_BTN_SYSTEM_NEW, 290, 115, 66, 14
|
||||
PUSHBUTTON "De&ğiştir", IDC_BTN_SYSTEM_EDIT, 290, 135, 66, 14
|
||||
|
||||
PUSHBUTTON "&Hepsini Etkinleştir", IDC_BTN_SYSTEM_ACTIVATE, 123, 155, 66, 14
|
||||
PUSHBUTTON "H&epsini Devre Dışı Bırak",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14
|
||||
END
|
||||
|
||||
IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List2",IDC_TOOLS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 2, 1, 360, 134
|
||||
EDITTEXT IDC_TOOLS_CMDLINE, 1, 139, 360, 12, ES_READONLY
|
||||
PUSHBUTTON "&Çalıştır", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List1",IDC_SERVICES_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 2, 1, 360, 148
|
||||
PUSHBUTTON "&Hepsini Etkinleştir", IDC_BTN_SERVICES_ACTIVATE, 223, 155, 66, 14
|
||||
PUSHBUTTON "H&epsini Devre Dışı Bırak", IDC_BTN_SERVICES_DEACTIVATE, 295, 155, 66, 14
|
||||
END
|
||||
|
||||
IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "Başlangıç Seçenekleri", -1, 10, 10, 340, 150,0, WS_EX_TRANSPARENT
|
||||
CONTROL "&Bilindik Başlangıç (Sürücülerin ve hizmetlerin tümü yüklensin.)", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 180, 10
|
||||
CONTROL "&Tanılık Başlangıç (Yalnızca sürücülerin ve hizmetlerin zorunluları yüklensin.)", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 195, 10
|
||||
CONTROL "&Seçmeli Başlangıç", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 70, 10
|
||||
AUTOCHECKBOX "syst&em.ini Kütüğünü Yükle", IDC_CBX_SYSTEM_INI, 30, 80, 95, 10
|
||||
AUTOCHECKBOX "&Hizmetleri Yükle", IDC_CBX_SYSTEM_SERVICE, 30, 95, 90, 10
|
||||
AUTOCHECKBOX "B&aşlangıç Öğelerini Yükle", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10
|
||||
END
|
||||
|
||||
IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
|
||||
PUSHBUTTON "&Tüm Ön Yükleme Yollarını Denetle", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12
|
||||
PUSHBUTTON "&Ön Tanımlı Yap", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12
|
||||
PUSHBUTTON "B&ir Yukarı Taşı", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12
|
||||
PUSHBUTTON "Bi&r Aşağı Taşı", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12
|
||||
GROUPBOX "Ön Yükleme Seçenekleri", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT
|
||||
CHECKBOX "/SA&FEBOOT", IDC_CBX_SAFE_BOOT, 15, 90, 55, 10
|
||||
CHECKBOX "/&NOGUIBOOT", IDC_CBX_NO_GUI_BOOT, 15, 105, 60, 10
|
||||
CHECKBOX "/&BOOTLOG", IDC_CBX_BOOT_LOG, 15, 120, 50, 10
|
||||
CHECKBOX "/BAS&EVIDEO", IDC_CBX_BASE_VIDEO, 15, 135, 55, 10
|
||||
CHECKBOX "/S&OS", IDC_CBX_SOS, 15, 150, 50, 10
|
||||
PUSHBUTTON "&Gelişmiş Seçenekler...", IDC_BTN_ADVANCED_OPTIONS, 100, 150, 70, 12
|
||||
LTEXT "&Verilen Süre:", -1, 280, 91, 30, 10
|
||||
EDITTEXT IDC_TXT_BOOT_TIMEOUT, 310, 90, 25, 12, ES_LEFT
|
||||
LTEXT "sec.", -1, 340, 91, 15, 10
|
||||
END
|
||||
|
||||
IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CHECKBOX "/&MAXMEM=", IDC_CBX_MAX_MEM, 10, 10, 50, 10
|
||||
EDITTEXT IDC_TXT_MAX_MEM, 80, 10, 60, 12
|
||||
CONTROL "",IDC_SCR_MAX_MEM, "msctls_updown32", 0x50000000, 140, 10, 11, 11
|
||||
CHECKBOX "/&NUMPROC=", IDC_CBX_NUM_PROC, 10, 25, 50, 10
|
||||
COMBOBOX IDC_DRP_NUM_PROC, 80, 25, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
CHECKBOX "/&PCILOCK", IDC_CBX_PCI_LOCK, 10, 40, 50, 10
|
||||
CHECKBOX "/P&ROFILE", IDC_CBX_PROFILE, 10, 55, 50, 10
|
||||
CHECKBOX "/&IRQ", IDC_CBX_IRQ, 10, 70, 40, 12
|
||||
EDITTEXT IDC_TXT_IRQ, 80, 70, 60, 12, ES_LEFT
|
||||
CHECKBOX "/&DEBUG", IDC_CBX_DEBUG, 10, 85, 40, 10
|
||||
CHECKBOX "/D&EBUGPORT", IDC_CBX_DEBUG_PORT, 20, 100, 60, 10
|
||||
COMBOBOX IDC_DRP_DEBUG_PORT, 80, 100, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
CHECKBOX "/&BAUDRATE", IDC_CBX_BAUD_RATE, 20, 115, 50, 10
|
||||
COMBOBOX IDC_DRP_DRP_BAUD_RATE, 80, 115, 60, 10, CBS_DROPDOWNLIST | CBS_SORT | WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
||||
CHECKBOX "/&CHANNEL", IDC_CBX_CHANNEL, 20, 130, 50, 10
|
||||
EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT
|
||||
CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11
|
||||
PUSHBUTTON "Tamam", IDC_OK, 20, 160, 50, 12
|
||||
PUSHBUTTON "Vazgeç", IDC_CANCEL, 100, 160, 50, 12
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_MSCONFIG "Dizge Yapılandırıcı"
|
||||
IDS_TAB_GENERAL "Umûmî"
|
||||
IDS_TAB_SYSTEM "system.ini"
|
||||
IDS_TAB_FREELDR "freeldr.ini"
|
||||
IDS_TAB_SERVICES "Hizmetler"
|
||||
IDS_TAB_STARTUP "Başlangıç"
|
||||
IDS_TAB_TOOLS "Araçlar"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SERVICES_COLUMN_SERVICE "Hizmet"
|
||||
IDS_SERVICES_COLUMN_REQ "Gerekli"
|
||||
IDS_SERVICES_COLUMN_VENDOR "Sağlayıcı"
|
||||
IDS_SERVICES_COLUMN_STATUS "Durum"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TOOLS_COLUMN_NAME "Ad"
|
||||
IDS_TOOLS_COLUMN_DESCR "Tanım"
|
||||
|
||||
IDS_TOOLS_CMD_NAME "Komut İstemi"
|
||||
IDS_TOOLS_CMD_DESCR "Komut İstemi'ni açar."
|
||||
IDS_TOOLS_CMD_CMD "cmd.exe"
|
||||
|
||||
IDS_TOOLS_INFO_NAME "ReactOS Sürümü Bilgisi"
|
||||
IDS_TOOLS_INFO_DESCR "ReactOS'un sürüm bilgisini görüntüler."
|
||||
IDS_TOOLS_INFO_CMD "winver.exe"
|
||||
|
||||
IDS_TOOLS_REGEDIT_NAME "Değer Defteri Düzenleyicisi"
|
||||
IDS_TOOLS_REGEDIT_DESCR "Değer Defteri Düzenleyicisi'ni açar."
|
||||
IDS_TOOLS_REGEDIT_CMD "regedit.exe"
|
||||
|
||||
IDS_TOOLS_SYSDM_NAME "Dizge Özellikleri"
|
||||
IDS_TOOLS_SYSDM_DESCR "Bu bilgisayarla ilgili bilgi verir."
|
||||
IDS_TOOLS_SYSDM_CMD "control.exe"
|
||||
IDS_TOOLS_SYSDM_PARAM "sysdm.cpl"
|
||||
|
||||
IDS_STARTUP_COLUMN_ELEMENT "Öğe"
|
||||
IDS_STARTUP_COLUMN_CMD "Komut"
|
||||
IDS_STARTUP_COLUMN_PATH "Yol"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_SERVICES_STATUS_RUNNING "Çalışıyor"
|
||||
IDS_SERVICES_STATUS_STOPPED "Durduruldu"
|
||||
IDS_SERVICES_YES "Evet"
|
||||
IDS_SERVICES_UNKNOWN "Bilinmiyor"
|
||||
END
|
||||
@@ -71,6 +71,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#ifdef LANGUAGE_TH_TH
|
||||
#include "lang/th-TH.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,17 @@ _tWinMain(HINSTANCE hThisInstance,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
hInstance = hThisInstance;
|
||||
ProcessHeap = GetProcessHeap();
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <winuser.h>
|
||||
#include <winreg.h>
|
||||
#include <wingdi.h>
|
||||
#include <winnls.h>
|
||||
#include <windowsx.h>
|
||||
#include <tchar.h>
|
||||
#include <setupapi.h>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <wingdi.h>
|
||||
#include <winnls.h>
|
||||
#include <winsvc.h>
|
||||
#include <winuser.h>
|
||||
#include <windowsx.h> /* GET_X/Y_LPARAM */
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
HINSTANCE hInstance;
|
||||
HANDLE ProcessHeap;
|
||||
|
||||
@@ -23,7 +22,17 @@ _tWinMain(HINSTANCE hThisInstance,
|
||||
MSG Msg;
|
||||
int Ret = 1;
|
||||
INITCOMMONCONTROLSEX icex;
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
hInstance = hThisInstance;
|
||||
ProcessHeap = GetProcessHeap();
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* PROJECT: PAINT for ReactOS
|
||||
* PROJECT: ReactOS Paint
|
||||
* LICENSE: unknown (LGPL assumed)
|
||||
* FILE: base/applications/mspaint/lang/tr-TR.rc
|
||||
* PURPOSE: Turkish Language resource file
|
||||
* TRANSLATORS: 2013 - Erdem Ersoy (eersoy93)
|
||||
* PURPOSE: Turkish Resource file for ReactOS Paint
|
||||
* PROGRAMMERS:
|
||||
* TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
@@ -71,8 +72,8 @@ BEGIN
|
||||
MENUITEM "&Döndür ya da Evir...\tCtrl+R", IDM_IMAGEROTATEMIRROR
|
||||
MENUITEM "&Boyutlandır...\tCtrl+W", IDM_IMAGECHANGESIZE
|
||||
MENUITEM "&Kırp", IDM_IMAGECROP
|
||||
MENUITEM "&Renkleri Evir...\tCtrl+I", IDM_IMAGEINVERTCOLORS
|
||||
MENUITEM "&Öz Nitelikler\tCtrl+E", IDM_IMAGEATTRIBUTES
|
||||
MENUITEM "&Renkleri Evir\tCtrl+I", IDM_IMAGEINVERTCOLORS
|
||||
MENUITEM "&Öz Nitelikler...\tCtrl+E", IDM_IMAGEATTRIBUTES
|
||||
MENUITEM "R&esmi Temizle\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE
|
||||
MENUITEM "D&onuk Çiz", IDM_IMAGEDRAWOPAQUE
|
||||
END
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_GENERAL DIALOGEX 0, 0, 242, 175
|
||||
@@ -50,7 +54,7 @@ END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_TAB_GENERAL "Genel"
|
||||
IDS_TAB_GENERAL "Umûmî"
|
||||
IDS_TAB_DISPLAY "Görüntü"
|
||||
IDS_256COLORS "256 Renk"
|
||||
IDS_HIGHCOLOR15 "32,768 (15 İkillik) Renk"
|
||||
|
||||
@@ -10,9 +10,7 @@ add_subdirectory(netstat)
|
||||
add_subdirectory(nslookup)
|
||||
add_subdirectory(ping)
|
||||
add_subdirectory(route)
|
||||
if(NOT MSVC)
|
||||
add_subdirectory(telnet) # FIXME: fix msvc build
|
||||
endif()
|
||||
add_subdirectory(telnet)
|
||||
add_subdirectory(tracert)
|
||||
add_subdirectory(whois)
|
||||
add_subdirectory(wlanconf)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
set_cpp(WITH_EXCEPTIONS WITH_STL)
|
||||
|
||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
|
||||
set_cpp()
|
||||
|
||||
add_executable(telnet
|
||||
src/ansiprsr.cpp
|
||||
src/keytrans.cpp
|
||||
@@ -27,5 +27,9 @@ add_executable(telnet
|
||||
|
||||
set_module_type(telnet win32cui)
|
||||
add_pch(telnet src/precomp.h)
|
||||
add_importlibs(telnet ws2_32 user32 msvcrt kernel32)
|
||||
add_importlibs(telnet ws2_32 user32 msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET telnet DESTINATION reactos/system32 FOR all)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_compile_flags_language("-Wno-narrowing" "CXX")
|
||||
endif()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
//#include <stdio.h>
|
||||
//#include <stdarg.h>
|
||||
//#include <string.h>
|
||||
//#include <locale.h>
|
||||
#include <locale.h>
|
||||
#include <io.h>
|
||||
#include <time.h>
|
||||
//#include <ctype.h>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Notepad (Turkish resources)
|
||||
* Turkish Resources for ReactOS Notepad
|
||||
*
|
||||
* Copyright 2012 Arda Tanrıkulu <[email protected]>
|
||||
* Copyright 2013 Erdem Ersoy (eersoy93)
|
||||
* Copyrights: 2012 Arda Tanrıkulu ([email protected])
|
||||
* 2013 Erdem Ersoy (eersoy93) ([email protected])
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -69,12 +69,12 @@ BEGIN
|
||||
MENUITEM "G&it...\tCtrl+G", CMD_GOTO
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Tümünü Seç\tCtrl+A", CMD_SELECT_ALL
|
||||
MENUITEM "&Şimdiki Zamanı Koy\tF5", CMD_TIME_DATE
|
||||
MENUITEM "&Şimdiki Zamânı Koy\tF5", CMD_TIME_DATE
|
||||
END
|
||||
POPUP "&Biçim"
|
||||
BEGIN
|
||||
MENUITEM "&Satır Kaydır", CMD_WRAP
|
||||
MENUITEM "&Yazı Türü...", CMD_FONT
|
||||
MENUITEM "&Yataç Kaydır", CMD_WRAP
|
||||
MENUITEM "Y&azı Türü...", CMD_FONT
|
||||
END
|
||||
POPUP "&Görünüm"
|
||||
BEGIN
|
||||
@@ -83,7 +83,7 @@ BEGIN
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Yardım Konuları", CMD_HELP_CONTENTS
|
||||
MENUITEM "Y&ardımda Ara...", CMD_HELP_SEARCH
|
||||
MENUITEM "Y&ardımda Ara", CMD_HELP_SEARCH
|
||||
MENUITEM "Ya&rdım İçin Yardım", CMD_HELP_ON_HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Bilgi", CMD_ABOUT
|
||||
@@ -133,10 +133,10 @@ END
|
||||
DIALOG_GOTO DIALOGEX 0,0,165,50
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg"
|
||||
CAPTION "Satıra Git"
|
||||
CAPTION "Yataca Git"
|
||||
BEGIN
|
||||
EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP
|
||||
LTEXT "Satır Nu:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER
|
||||
LTEXT "Yataç Numarası:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER
|
||||
DEFPUSHBUTTON "Tamam",IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP
|
||||
END
|
||||
@@ -171,7 +171,7 @@ STRING_PAGESETUP_TOPVALUE, "25 mm" /* FIXME */
|
||||
STRING_PAGESETUP_BOTTOMVALUE, "25 mm" /* FIXME */
|
||||
|
||||
STRING_NOTEPAD, "Metin Düzenleyicisi"
|
||||
STRING_ERROR, "HATA"
|
||||
STRING_ERROR, "HATÂ"
|
||||
STRING_WARNING, "UYARI"
|
||||
STRING_INFO, "Bilgi"
|
||||
|
||||
@@ -194,5 +194,5 @@ STRING_UTF8, "UTF-8"
|
||||
STRING_CRLF, "Windows"
|
||||
STRING_LF, "UNIX"
|
||||
STRING_CR, "Mac"
|
||||
STRING_LINE_COLUMN, "%d. Satır, %d. Sütun"
|
||||
STRING_LINE_COLUMN, "%d. Yataç, %d. Dikeç"
|
||||
END
|
||||
|
||||
@@ -554,9 +554,19 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
|
||||
HMONITOR monitor;
|
||||
MONITORINFO info;
|
||||
INT x, y;
|
||||
|
||||
|
||||
static const TCHAR className[] = _T("NPClass");
|
||||
static const TCHAR winName[] = _T("Notepad");
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
UNREFERENCED_PARAMETER(prev);
|
||||
|
||||
|
||||
@@ -1,55 +1,60 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDR_MAINMENU MENU
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Ayarlar...", ID_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", ID_EXIT
|
||||
END
|
||||
POPUP "&Yazılım"
|
||||
BEGIN
|
||||
MENUITEM "&Kur", ID_INSTALL
|
||||
MENUITEM "K&aldır", ID_UNINSTALL
|
||||
MENUITEM "&Değiştir", ID_MODIFY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Bu Bilgiyi Değer Defteri'nden Kaldır.", ID_REGREMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yenile", ID_REFRESH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Update Da&tabase", ID_RESETDB
|
||||
END
|
||||
POPUP "Y&ardım"
|
||||
BEGIN
|
||||
MENUITEM "&Yardım Konuları", ID_HELP, GRAYED
|
||||
MENUITEM "&Hakkında", ID_ABOUT
|
||||
END
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Ayarlar...", ID_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", ID_EXIT
|
||||
END
|
||||
POPUP "&Yazılım"
|
||||
BEGIN
|
||||
MENUITEM "&Kur", ID_INSTALL
|
||||
MENUITEM "K&aldır", ID_UNINSTALL
|
||||
MENUITEM "&Değiştir", ID_MODIFY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Girişi Değer Defteri'nden Kaldır", ID_REGREMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yenile", ID_REFRESH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Y&azılım Veritabanını Güncelle", ID_RESETDB
|
||||
END
|
||||
POPUP "Y&ardım"
|
||||
BEGIN
|
||||
MENUITEM "&Yardım Konuları", ID_HELP, GRAYED
|
||||
MENUITEM "&Hakkında", ID_ABOUT
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
IDR_LINKMENU MENU
|
||||
BEGIN
|
||||
POPUP "popup"
|
||||
BEGIN
|
||||
MENUITEM "&Tarayıcıda Aç", ID_OPEN_LINK
|
||||
MENUITEM "&Panoya Çoğalt", ID_COPY_LINK
|
||||
END
|
||||
POPUP "popup"
|
||||
BEGIN
|
||||
MENUITEM "&Tarayıcıda Aç", ID_OPEN_LINK
|
||||
MENUITEM "&Panoya Çoğalt", ID_COPY_LINK
|
||||
END
|
||||
END
|
||||
|
||||
IDR_APPLICATIONMENU MENU
|
||||
BEGIN
|
||||
POPUP "popup"
|
||||
BEGIN
|
||||
MENUITEM "&Kur", ID_INSTALL
|
||||
MENUITEM "K&aldır", ID_UNINSTALL
|
||||
MENUITEM "&Değiştir", ID_MODIFY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Bu Bilgiyi Değer Defteri'nden Kaldır", ID_REGREMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yenile", ID_REFRESH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Update Da&tabase", ID_RESETDB
|
||||
END
|
||||
POPUP "popup"
|
||||
BEGIN
|
||||
MENUITEM "&Kur", ID_INSTALL
|
||||
MENUITEM "K&aldır", ID_UNINSTALL
|
||||
MENUITEM "&Değiştir", ID_MODIFY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Girişi Değer Defteri'nden Kaldır", ID_REGREMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yenile", ID_REFRESH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Y&azılım Veritabanını Güncelle", ID_RESETDB
|
||||
END
|
||||
END
|
||||
|
||||
IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144
|
||||
@@ -57,20 +62,20 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS
|
||||
CAPTION "Ayarlar"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "Genel", -1, 4, 2, 240, 61
|
||||
AUTOCHECKBOX "&Pencere Konumunu Kaydet", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
|
||||
AUTOCHECKBOX "&Her Başlangıçta Erişilebilir Yazılım Dizelgesini Güncelle", IDC_UPDATE_AVLIST, 15, 29, 222, 12
|
||||
AUTOCHECKBOX "&Yazılımların Kuruluş ve Kaldırılışlarını Kaydet", IDC_LOG_ENABLED, 15, 46, 219, 12
|
||||
GROUPBOX "Umûmî", -1, 4, 2, 240, 61
|
||||
AUTOCHECKBOX "&Pencere Konumunu Kaydet", IDC_SAVE_WINDOW_POS, 15, 12, 219, 12
|
||||
AUTOCHECKBOX "&Her Başlangıçta Erişilebilir Yazılım Dizelgesini Güncelle", IDC_UPDATE_AVLIST, 15, 29, 222, 12
|
||||
AUTOCHECKBOX "&Yazılımların Kuruluş ve Kaldırılışlarını Kaydet", IDC_LOG_ENABLED, 15, 46, 219, 12
|
||||
|
||||
GROUPBOX "İndirme", -1, 4, 65, 240, 51
|
||||
LTEXT "İndirme Dizini:", -1, 16, 75, 100, 9
|
||||
EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
|
||||
PUSHBUTTON "&Seç", IDC_CHOOSE, 187, 85, 50, 14
|
||||
AUTOCHECKBOX "&Kurulumdan Sonra Yazılımın Kurulum Kütüğünü Sil", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
|
||||
GROUPBOX "İndirme", -1, 4, 65, 240, 51
|
||||
LTEXT "İndirme Dizini:", -1, 16, 75, 100, 9
|
||||
EDITTEXT IDC_DOWNLOAD_DIR_EDIT, 15, 86, 166, 12, WS_CHILD | WS_VISIBLE | WS_GROUP
|
||||
PUSHBUTTON "&Seç", IDC_CHOOSE, 187, 85, 50, 14
|
||||
AUTOCHECKBOX "&Kurulumdan Sonra Yazılımın Kurulum Kütüğünü Sil", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12
|
||||
|
||||
PUSHBUTTON "Ön Tanımlılar", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
|
||||
PUSHBUTTON "Tamam", IDOK, 116, 124, 60, 14
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 181, 124, 60, 14
|
||||
PUSHBUTTON "Ön Tanımlılar", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14
|
||||
PUSHBUTTON "Tamam", IDOK, 116, 124, 60, 14
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 181, 124, 60, 14
|
||||
END
|
||||
|
||||
IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97
|
||||
@@ -78,13 +83,13 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS
|
||||
CAPTION "Yazılım Kurulumu"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
|
||||
LTEXT "...", IDC_INSTALL_TEXT, 4, 5, 209, 35
|
||||
|
||||
AUTORADIOBUTTON "&Bir Diskten Kur", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
|
||||
AUTORADIOBUTTON "&İndir ve Kur", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP
|
||||
AUTORADIOBUTTON "&Bir Diskten Kur", IDC_CD_INSTALL, 10, 46, 197, 11, WS_GROUP
|
||||
AUTORADIOBUTTON "&İndir ve Kur", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP
|
||||
|
||||
PUSHBUTTON "Tamam", IDOK, 86, 78, 60, 14
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 150, 78, 60, 14
|
||||
PUSHBUTTON "Tamam", IDOK, 86, 78, 60, 14
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 150, 78, 60, 14
|
||||
END
|
||||
|
||||
IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76
|
||||
@@ -102,96 +107,96 @@ STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME
|
||||
CAPTION "Hakkında"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "ReactOS Yazılım Yöneticisi\nTelif Hakkı: 2009\nDmitry Chapyshev ([email protected]) tarafından yazılmıştır.", IDC_STATIC, 48, 7, 130, 39
|
||||
PUSHBUTTON "Tamam", IDOK, 133, 46, 50, 14
|
||||
ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30
|
||||
LTEXT "ReactOS Yazılım Yöneticisi\nTelif Hakkı: 2009\nDmitry Chapyshev ([email protected]) tarafından yazılmıştır.", IDC_STATIC, 48, 7, 130, 39
|
||||
PUSHBUTTON "Tamam", IDOK, 133, 46, 50, 14
|
||||
ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TOOLTIP_INSTALL "Kur"
|
||||
IDS_TOOLTIP_UNINSTALL "Kaldır"
|
||||
IDS_TOOLTIP_MODIFY "Değiştir"
|
||||
IDS_TOOLTIP_SETTINGS "Ayarlar"
|
||||
IDS_TOOLTIP_REFRESH "Yenile"
|
||||
IDS_TOOLTIP_EXIT "Çıkış"
|
||||
IDS_TOOLTIP_INSTALL "Kur"
|
||||
IDS_TOOLTIP_UNINSTALL "Kaldır"
|
||||
IDS_TOOLTIP_MODIFY "Değiştir"
|
||||
IDS_TOOLTIP_SETTINGS "Ayarlar"
|
||||
IDS_TOOLTIP_REFRESH "Yenile"
|
||||
IDS_TOOLTIP_EXIT "Çıkış"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APP_NAME "Yazılımın Adı"
|
||||
IDS_APP_INST_VERSION "Sürüm"
|
||||
IDS_APP_DESCRIPTION "Ek Bilgi"
|
||||
IDS_APP_NAME "Yazılımın Adı"
|
||||
IDS_APP_INST_VERSION "Sürüm"
|
||||
IDS_APP_DESCRIPTION "Ek Bilgi"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_INFO_VERSION "\nSürüm: "
|
||||
IDS_INFO_DESCRIPTION "\nEk Bilgi: "
|
||||
IDS_INFO_PUBLISHER "\nYayımcı: "
|
||||
IDS_INFO_HELPLINK "\nYardım Bağlantısı: "
|
||||
IDS_INFO_HELPPHONE "\nYardım Telefonu: "
|
||||
IDS_INFO_README "\nBenioku: "
|
||||
IDS_INFO_REGOWNER "\nKayıtlı Olduğu Kullanıcısı: "
|
||||
IDS_INFO_PRODUCTID "\nÜrün Kimliği: "
|
||||
IDS_INFO_CONTACT "\nİletişim: "
|
||||
IDS_INFO_UPDATEINFO "\nGücnelleme Bilgisi: "
|
||||
IDS_INFO_INFOABOUT "\nHakkında Bilgi: "
|
||||
IDS_INFO_COMMENTS "\nYorumlar: "
|
||||
IDS_INFO_INSTLOCATION "\nKurulum Konumu: "
|
||||
IDS_INFO_INSTALLSRC "\nKurulum Kaynağı: "
|
||||
IDS_INFO_UNINSTALLSTR "\nKaldırma Dizgisi: "
|
||||
IDS_INFO_MODIFYPATH "\nDeğiştirme Yolu: "
|
||||
IDS_INFO_INSTALLDATE "\nKurulum Zamanı: "
|
||||
IDS_INFO_VERSION "\nSürüm: "
|
||||
IDS_INFO_DESCRIPTION "\nEk Bilgi: "
|
||||
IDS_INFO_PUBLISHER "\nYayımcı: "
|
||||
IDS_INFO_HELPLINK "\nYardım Bağlantısı: "
|
||||
IDS_INFO_HELPPHONE "\nYardım Telefonu: "
|
||||
IDS_INFO_README "\nBenioku: "
|
||||
IDS_INFO_REGOWNER "\nKayıtlı Olduğu Kullanıcısı: "
|
||||
IDS_INFO_PRODUCTID "\nÜrün Kimliği: "
|
||||
IDS_INFO_CONTACT "\nİletişim: "
|
||||
IDS_INFO_UPDATEINFO "\nGücnelleme Bilgisi: "
|
||||
IDS_INFO_INFOABOUT "\nHakkında Bilgi: "
|
||||
IDS_INFO_COMMENTS "\nYorumlar: "
|
||||
IDS_INFO_INSTLOCATION "\nKurulum Konumu: "
|
||||
IDS_INFO_INSTALLSRC "\nKurulum Kaynağı: "
|
||||
IDS_INFO_UNINSTALLSTR "\nKaldırma Dizgisi: "
|
||||
IDS_INFO_MODIFYPATH "\nDeğiştirme Yolu: "
|
||||
IDS_INFO_INSTALLDATE "\nKurulum Zamanı: "
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_AINFO_VERSION "\nSürüm: "
|
||||
IDS_AINFO_DESCRIPTION "\nEk Bilgi: "
|
||||
IDS_AINFO_SIZE "\nBoyut: "
|
||||
IDS_AINFO_URLSITE "\nAna Sayfa: "
|
||||
IDS_AINFO_LICENCE "\nLisans: "
|
||||
IDS_AINFO_VERSION "\nSürüm: "
|
||||
IDS_AINFO_DESCRIPTION "\nEk Bilgi: "
|
||||
IDS_AINFO_SIZE "\nBoyut: "
|
||||
IDS_AINFO_URLSITE "\nAna Sayfa: "
|
||||
IDS_AINFO_LICENCE "\nLisans: "
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_CAT_AUDIO "Ses"
|
||||
IDS_CAT_DEVEL "Geliştirme"
|
||||
IDS_CAT_DRIVERS "Sürücüler"
|
||||
IDS_CAT_EDU "Eğitim"
|
||||
IDS_CAT_ENGINEER "Mühendislik"
|
||||
IDS_CAT_FINANCE "Mâli"
|
||||
IDS_CAT_GAMES "Oyun ve Eğlence"
|
||||
IDS_CAT_GRAPHICS "Çizge"
|
||||
IDS_CAT_INTERNET "Ağ"
|
||||
IDS_CAT_LIBS "Kitaplıklar"
|
||||
IDS_CAT_OFFICE "Büro"
|
||||
IDS_CAT_OTHER "Diğer"
|
||||
IDS_CAT_SCIENCE "Bilim"
|
||||
IDS_CAT_TOOLS "Araçlar"
|
||||
IDS_CAT_VIDEO "Vidyo"
|
||||
IDS_CAT_AUDIO "Ses"
|
||||
IDS_CAT_DEVEL "Geliştirme"
|
||||
IDS_CAT_DRIVERS "Sürücüler"
|
||||
IDS_CAT_EDU "Eğitim"
|
||||
IDS_CAT_ENGINEER "Mühendislik"
|
||||
IDS_CAT_FINANCE "Mâli"
|
||||
IDS_CAT_GAMES "Oyun ve Eğlence"
|
||||
IDS_CAT_GRAPHICS "Çizge"
|
||||
IDS_CAT_INTERNET "Ağ"
|
||||
IDS_CAT_LIBS "Kitaplıklar"
|
||||
IDS_CAT_OFFICE "Büro"
|
||||
IDS_CAT_OTHER "Diğer"
|
||||
IDS_CAT_SCIENCE "Bilim"
|
||||
IDS_CAT_TOOLS "Araçlar"
|
||||
IDS_CAT_VIDEO "Vidyo"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APPTITLE "ReactOS Yazılım Yöneticisi"
|
||||
IDS_SEARCH_TEXT "Ara"
|
||||
IDS_INSTALL "Kur"
|
||||
IDS_UNINSTALL "Kaldır"
|
||||
IDS_MODIFY "Değiştir"
|
||||
IDS_APPS_COUNT "Yazılım Sayısı: %d"
|
||||
IDS_WELCOME_TITLE "ReactOS Yazılım Yöneticisi'ne hoşgeldiniz.\n\n"
|
||||
IDS_WELCOME_TEXT "Soldaki herhangi bir ulamı seçip ulamdaki herhangi bir yazılımı kaldırabilir veya kurabilrisiniz.\nReactOS'un genelağ sitesi: "
|
||||
IDS_WELCOME_URL "http://www.reactos.org"
|
||||
IDS_INSTALLED "Kurulanlar"
|
||||
IDS_AVAILABLEFORINST "Kurulabilenler"
|
||||
IDS_UPDATES "Güncellemeler"
|
||||
IDS_APPLICATIONS "Yazılımlar"
|
||||
IDS_CHOOSE_FOLDER_TEXT "İndirme dizinini seçiniz:"
|
||||
IDS_CHOOSE_FOLDER_ERROR "Belirttiğiniz dizin yok. Belirttiğiniz dizin oluşturulsun mu?"
|
||||
IDS_USER_NOT_ADMIN "ReactOS Yazılım Yöneticisi'ni yönetici olarak çalıştırmalısınız."
|
||||
IDS_APP_REG_REMOVE "Bu yazılımın bilgilerini Değer Defteri'nden kaldırmaya emin misiniz?"
|
||||
IDS_INFORMATION "Bilgi"
|
||||
IDS_UNABLE_TO_REMOVE "Bu yazılımın bilgileri Değer Defteri'nden kaldırılamıyor."
|
||||
IDS_APPTITLE "ReactOS Yazılım Yöneticisi"
|
||||
IDS_SEARCH_TEXT "Ara"
|
||||
IDS_INSTALL "Kur"
|
||||
IDS_UNINSTALL "Kaldır"
|
||||
IDS_MODIFY "Değiştir"
|
||||
IDS_APPS_COUNT "Yazılım Sayısı: %d"
|
||||
IDS_WELCOME_TITLE "ReactOS Yazılım Yöneticisi'ne hoşgeldiniz.\n\n"
|
||||
IDS_WELCOME_TEXT "Soldaki herhangi bir ulamı seçip ulamdaki herhangi bir yazılımı kaldırabilir veya kurabilrisiniz.\nReactOS'un örütbağ sitesi: "
|
||||
IDS_WELCOME_URL "http://www.reactos.org"
|
||||
IDS_INSTALLED "Kurulanlar"
|
||||
IDS_AVAILABLEFORINST "Kurulabilenler"
|
||||
IDS_UPDATES "Güncellemeler"
|
||||
IDS_APPLICATIONS "Yazılımlar"
|
||||
IDS_CHOOSE_FOLDER_TEXT "İndirme dizinini seçiniz:"
|
||||
IDS_CHOOSE_FOLDER_ERROR "Belirttiğiniz dizin yok. Belirttiğiniz dizin oluşturulsun mu?"
|
||||
IDS_USER_NOT_ADMIN "ReactOS Yazılım Yöneticisi'ni yönetici olarak çalıştırmalısınız."
|
||||
IDS_APP_REG_REMOVE "Bu yazılımın bilgilerini Değer Defteri'nden kaldırmaya emin misiniz?"
|
||||
IDS_INFORMATION "Bilgi"
|
||||
IDS_UNABLE_TO_REMOVE "Bu yazılımın bilgileri Değer Defteri'nden kaldırılamıyor."
|
||||
END
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = 7-Zip
|
||||
Version = 9.25
|
||||
Version = 9.30a
|
||||
Licence = LGPL
|
||||
Description = Utility to create and open 7zip, zip, tar, rar and other archive files.
|
||||
Size = 1.03MB
|
||||
Size = 1.1MB
|
||||
Category = 12
|
||||
URLSite = http://www.7-zip.org/
|
||||
URLDownload = http://dl.7-zip.org/7z925.exe
|
||||
URLDownload = http://dl.7-zip.org/7z930.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
[Section]
|
||||
Name = Abyss Web server X1
|
||||
Version = 2.8
|
||||
Version = 2.9
|
||||
Licence = Freeware
|
||||
Description = Abyss Web Server enables you to host your Web sites on your computer. It supports secure SSL/TLS connections (HTTPS) as well as a wide range of Web technologies. It can also run advanced PHP, Perl, Python, ASP, ASP.NET, and Ruby on Rails Web applications, which can be backed by databases such as MySQL, SQLite, MS SQL Server, MS Access, or Oracle.
|
||||
Size = 1.94MB
|
||||
Size = 2.1MB
|
||||
Category = 5
|
||||
URLSite = http://www.aprelium.com/
|
||||
URLDownload = http://www.aprelium.com/data/abwsx1.exe
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Double Commander
|
||||
Version = 0.5.4
|
||||
Version = 0.5.5
|
||||
Licence = GPL
|
||||
Description = Double Commander is an open source file manager with two panels side by side. You need 7-Zip or a similar Utility to extract it.
|
||||
Size = 6.5MB
|
||||
Size = 7.5MB
|
||||
Category = 12
|
||||
URLSite = http://doublecmd.sourceforge.net/
|
||||
URLDownload = http://freefr.dl.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.4%20beta/doublecmd-0.5.4.i386-win32.exe
|
||||
URLDownload = http://freefr.dl.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.5%20beta/doublecmd-0.5.5.i386-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
; UTF-8
|
||||
|
||||
[Section]
|
||||
Name = DVD Write Now
|
||||
Version = 1.5.12 sp2
|
||||
Licence = Freeware
|
||||
Description = A free direct CD/DVD recording software. Once installed, you can use your CD/DVD RW as USB Flash or removable hard drives. Along with this you can write to CD/DVD RW recorded with UDF filesystem. You can also read UDF disks created with other software. (Microsoft DVD−ROMs, RW disks recorded with Ahead InCD). You need a ZIP decompression program to install it.
|
||||
Size = 1.2MB
|
||||
Category = 13
|
||||
URLDownload = http://dwn.alter.org.ua/downloads/dwn_1_5_12_sp2.zip
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Eine kostenlose CD/DVD Brennsoftware. Sobald es installiert ist, kann man CD/DVD RW als USB Flash oder Wechseldatenträger beschreiben. Auch kann man hiermit auf CD/DVD RW schreiben, welche mit dem UDF Dateisystem beschrieben wurden. Auch kann man mit dieser Software UDF Disks, welche mit anderer Software erstellt wurden, lesen. (Microsoft DVD−ROMs, RW Disks erstellt mit Ahead InCD). Es wird für die Installation ein ZIP Dekomprimierprogramm benötigt.
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Fox Audio Player
|
||||
Version = 0.9.2
|
||||
Version = 0.10.0
|
||||
Licence = GPL
|
||||
Description = Simple and lightweight audio player.
|
||||
Size = 1.86MB
|
||||
Size = 1.89MB
|
||||
Category = 1
|
||||
URLSite = http://foxaudioplayer.sourceforge.net/
|
||||
URLDownload = http://svn.reactos.org/packages/fap-0.9.2-win32-bin.exe
|
||||
URLDownload = http://svn.reactos.org/packages/fap-0.10.0-win32-bin.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
@@ -19,7 +19,7 @@ Description = Reproductor de audio simple y ligero.
|
||||
|
||||
[Section.040c]
|
||||
Description = Lecteur audio simple et léger.
|
||||
Size = 1,86 Mo
|
||||
Size = 1,89 Mo
|
||||
|
||||
[Section.0410]
|
||||
Description = Un semplice e leggero lettore audio.
|
||||
@@ -32,7 +32,7 @@ Description = Prosty i lekki odtwarzacz audio.
|
||||
|
||||
[Section.0418]
|
||||
Description = Un lector audio simplu și ușor.
|
||||
Size = 1,86 Mo
|
||||
Size = 1,89 Mo
|
||||
|
||||
[Section.0422]
|
||||
Description = Простий та маленький програвач аудіо файлів.
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
; UTF-8
|
||||
|
||||
[Section]
|
||||
Name = Mozilla Firefox 21
|
||||
Version = 21.0
|
||||
Name = Mozilla Firefox 22
|
||||
Version = 22.0
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Web Browsers out there.
|
||||
Size = 20.3MB
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla.org/en-US/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/en-US/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/en-US/Firefox%20Setup%2022.0.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Webbrowser.
|
||||
Size = 20.17MB
|
||||
URLSite = http://www.mozilla-europe.org/de/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/de/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/de/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores navegadores web gratuitos que hay.
|
||||
Size = 20.13MB
|
||||
URLSite = http://www.mozilla-europe.org/es/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/es-ES/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/es-ES/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.040c]
|
||||
Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs.
|
||||
Size = 20,46 Mo
|
||||
URLSite = http://www.mozilla-europe.org/fr/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/fr/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/fr/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0410]
|
||||
Description = Il più popolare e uno dei migliori web browser gratuiti.
|
||||
Size = 20.1MB
|
||||
URLSite = http://www.mozilla-europe.org/it/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/it/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/it/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0413]
|
||||
Description = De meest populaire en een van de beste gratis Web browsers.
|
||||
Size = 20.82MB
|
||||
URLSite = http://www.mozilla-europe.org/nl/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/nl/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/nl/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0414]
|
||||
Description = Mest populære og best også gratis nettleserene der ute.
|
||||
Size = 20.18MB
|
||||
URLSite = http://www.mozilla-europe.org/no/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/nb-NO/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/nb-NO/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych.
|
||||
Size = 21.03MB
|
||||
URLSite = http://www.mozilla-europe.org/pl/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/pl/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/pl/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0418]
|
||||
Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente.
|
||||
Size = 20,65 Mo
|
||||
URLSite = http://www.mozilla-europe.org/ro/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/ro/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/ro/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных браузеров.
|
||||
Size = 20.59MB
|
||||
URLSite = http://www.mozilla-europe.org/ru/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/ru/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/ru/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.041b]
|
||||
Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov.
|
||||
Size = 20.84MB
|
||||
URLSite = http://www.mozilla-europe.org/sk/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/sk/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/sk/Firefox%20Setup%2022.0.exe
|
||||
|
||||
[Section.0422]
|
||||
Description = Найпопулярніший та один з кращих безплатних веб-браузерів.
|
||||
Size = 20.6MB
|
||||
URLSite = http://www.mozilla-europe.org/uk/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/21.0/win32/uk/Firefox%20Setup%2021.0.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/uk/Firefox%20Setup%2022.0.exe
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = FreeBASIC
|
||||
Version = 0.24.0
|
||||
Version = 0.90.0
|
||||
Licence = GPL/LGPL
|
||||
Description = Open Source BASIC Compiler. The BASIC syntax is compatible to QBASIC.
|
||||
Size = 8.65MB
|
||||
Size = 7.3MB
|
||||
Category = 7
|
||||
URLSite = http://www.freebasic.net/
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-0.24.0-win32.exe
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-0.90.0-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
@@ -19,7 +19,7 @@ Description = Compilador BASIC de código abierto. El lenguaje BASIC es compatib
|
||||
|
||||
[Section.040c]
|
||||
Description = Compilateur BASIC open source. La syntaxe du BASIC est compatible avec le QBASIC.
|
||||
Size = 8,65 Mo
|
||||
Size = 7,3 Mo
|
||||
|
||||
[Section.0410]
|
||||
Description = Compilatore BASIC open source. La sintassi del BASIC è compatibile con il QBASIC.
|
||||
@@ -29,7 +29,7 @@ Description = Otwarty kompilator BASIC, ze składnią kompatybilną z QBASIC.
|
||||
|
||||
[Section.0419]
|
||||
Description = Compilator (open-source) BASIC. Sintaxa BASIC este compatibilă cu QBASIC.
|
||||
Size = 8,65 Mo
|
||||
Size = 7,3 Mo
|
||||
|
||||
[Section.0422]
|
||||
Description = Відкритий компілятор BASIC. Синтаксис сумісний з QBASIC.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = IrfanView
|
||||
Version = 4.35
|
||||
Version = 4.36
|
||||
Licence = Freeware (for personal use)
|
||||
Description = Viewer for all kinds of graphics/audio files/video files.
|
||||
Size = 1.57MB
|
||||
Size = 1.77MB
|
||||
Category = 3
|
||||
URLSite = http://www.irfanview.com/
|
||||
URLDownload = http://irfanview.tuwien.ac.at/iview435_setup.exe
|
||||
URLDownload = http://ring.maffin.ad.jp/archives/pc/forest/i/irfanview/10829/iview436_setup.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -8,7 +8,7 @@ Description = Additional Plugins for supporting more file types.
|
||||
Size = 9.85MB
|
||||
Category = 3
|
||||
URLSite = http://www.irfanview.com/
|
||||
URLDownload = http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_435_setup.exe
|
||||
URLDownload = http://ring.maffin.ad.jp/archives/pc/forest/i/irfanview/10830/irfanview_plugins_436_setup.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
; UTF-8
|
||||
|
||||
[Section]
|
||||
Name = Lazarus
|
||||
Version = 1.0.10
|
||||
Licence = modified LGPL, GPL
|
||||
Description = A cross-platform integrated development environment (IDE) that lets you create visual (GUI) and non-visual Object Pascal programs, and uses the Free Pascal compiler to generate your executable.
|
||||
Size = 106MB
|
||||
Category = 7
|
||||
URLSite = http://www.lazarus.freepascal.org/
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/lazarus/Lazarus%20Windows%2032%20bits/Lazarus%201.0.10/lazarus-1.0.10-fpc-2.6.2-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Eine plattformunabhängige, integrierte Entwicklungsumgebung (IDE), mit der man grafische (GUI) und nicht-grafische Pascal-Programme erstellen kann. Es verwendet den Free Pascal Compiler um die Programme zu erzeugen.
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = LibreOffice
|
||||
Version = 4.0.3
|
||||
Version = 4.0.4
|
||||
Licence = LGPL
|
||||
Description = Former called OpenOffice. Open Source Office Suite.
|
||||
Size = 182.5MB
|
||||
Category = 6
|
||||
URLSite = http://www.documentfoundation.org/
|
||||
URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.0.3/win/x86/LibreOffice_4.0.3_Win_x86.msi
|
||||
URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.0.4/win/x86/LibreOffice_4.0.4_Win_x86.msi
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Miranda IM
|
||||
Version = 0.10.13
|
||||
Version = 0.10.14
|
||||
Licence = GPL
|
||||
Description = Open source multiprotocol instant messaging application - May not work completely.
|
||||
Size = 2.81MB
|
||||
Category = 5
|
||||
URLSite = http://www.miranda-im.org/
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.13-unicode.exe
|
||||
URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.14-unicode.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Media Player Classic Home Cinema
|
||||
Version = 1.6.7.7114
|
||||
Version = 1.6.8
|
||||
Licence = GPL
|
||||
Description = A media player.
|
||||
Size = 7.08MB
|
||||
Category = 1
|
||||
URLSite = http://mpc-hc.sourceforge.net/
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.6.7.7114_x86/MPC-HC.1.6.7.7114.x86.exe
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.6.8_x86/MPC-HC.1.6.8.x86.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = Notepad++
|
||||
Version = 6.3.3
|
||||
Version = 6.4.1
|
||||
Licence = GPL
|
||||
Description = A text editor.
|
||||
Size = 6.7MB
|
||||
Size = 7.1MB
|
||||
Category = 6
|
||||
URLSite = http://notepad-plus-plus.org/
|
||||
URLDownload = http://download.tuxfamily.org/notepadplus/6.3.3/npp.6.3.3.Installer.exe
|
||||
URLDownload = http://download.tuxfamily.org/notepadplus/6.4.1/npp.6.4.1.Installer.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
@@ -19,7 +19,7 @@ Description = Un editor de text.
|
||||
|
||||
[Section.040c]
|
||||
Description = Un éditeur de texte.
|
||||
Size = 6,7 Mo
|
||||
Size = 7,1 Mo
|
||||
|
||||
[Section.0410]
|
||||
Description = Un editor di testo.
|
||||
@@ -32,7 +32,7 @@ Description = Edytor tekstu.
|
||||
|
||||
[Section.0418]
|
||||
Description = A text editor.
|
||||
Size = 6,7 Mo
|
||||
Size = 7,1 Mo
|
||||
|
||||
[Section.0419]
|
||||
Description = Текстовый редактор.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = OpenTTD
|
||||
Version = 1.3.0
|
||||
Version = 1.3.1
|
||||
Licence = GPL v2
|
||||
Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.
|
||||
Size = 4.74MB
|
||||
Size = 4.9MB
|
||||
Category = 4
|
||||
URLSite = http://www.openttd.org/
|
||||
URLDownload = http://binaries.openttd.org/releases/1.3.0/openttd-1.3.0-windows-win32.exe
|
||||
URLDownload = http://binaries.openttd.org/releases/1.3.1/openttd-1.3.1-windows-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
@@ -19,7 +19,7 @@ Description = Clon del motor de juegos "Transport Tycoon Deluxe" de código abie
|
||||
|
||||
[Section.040c]
|
||||
Description = Clone open source du moteur de jeu "Transport Tycoon Deluxe". Vous aurez besoin d'une copie de Transport Tycoon.
|
||||
Size = 4,74 Mo
|
||||
Size = 4,9 Mo
|
||||
|
||||
[Section.0410]
|
||||
Description = Clone open source del motore di gioco di "Transport Tycoon Deluxe". Hai bisogno di una copia di Transport Tycoon.
|
||||
@@ -32,7 +32,7 @@ Description = Otwarty klon silnika gry "Transport Tycoon Deluxe". Do poprawnego
|
||||
|
||||
[Section.0418]
|
||||
Description = Clona (open-source a) motorului de joc "Transport Tycoon Deluxe". Este necesară o copie a jocului Transport Tycoon.
|
||||
Size = 4,74 Mo
|
||||
Size = 4,9 Mo
|
||||
|
||||
[Section.0422]
|
||||
Description = Відкритий клон двигуна гри "Transport Tycoon Deluxe". Вам потрібна копія гри Transport Tycoon.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = SciTE
|
||||
Version = 3.3.2
|
||||
Version = 3.3.3
|
||||
Licence = Freeware
|
||||
Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs.
|
||||
Size = 700kB
|
||||
Size = 702kB
|
||||
Category = 7
|
||||
URLSite = http://www.scintilla.org/
|
||||
URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.3.2/Sc332.exe
|
||||
URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.3.3/Sc333.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
@@ -19,7 +19,7 @@ Description = Editor de texto basado en SCIntilla. Originalmente creado para dem
|
||||
|
||||
[Section.040c]
|
||||
Description = SciTE est un éditeur de texte basé sur SCIntilla. Originelement réalisé pour montrer Scintilla, il a évolué pour devenir un éditeur généralement utile avec des options pour compiler et lancer des programmes.
|
||||
Size = 700 ko
|
||||
Size = 702 ko
|
||||
|
||||
[Section.0410]
|
||||
Description = SciTE è un editor di testo basato scintilla. Originariamente costruito per dimostrare Scintilla, è cresciuto fino a essere un editor generalmente utile con strutture per la creazione e l'esecuzione di programmi.
|
||||
@@ -33,7 +33,7 @@ Description = SciTE to edytor tekstu bazowany na SCIntilla. Oryginalnie stworzon
|
||||
[Section.0418]
|
||||
Licence = Gratuită
|
||||
Description = SciTE este un editor de text bazat pe SCIntilla. Construit inițial pentru a demonstra Scintilla, a crescut ulterior într-un editor de uz general cu funcționalități de compilare și execuție a programelor.
|
||||
Size = 700 ko
|
||||
Size = 702 ko
|
||||
|
||||
[Section.0422]
|
||||
Description = Текстовий редактор на основі SCIntilla. Був зібраний як презентація Scintilla, але виріс до редактора загального користування з засобами збирання та запуску програм.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = ScummVM
|
||||
Version = 1.5.0
|
||||
Version = 1.6.0
|
||||
Licence = GPL
|
||||
Description = Sam and Max, Day of the Tentacle, etc on ReactOS.
|
||||
Size = 6.28MB
|
||||
Category = 4
|
||||
URLSite = http://scummvm.org/
|
||||
URLDownload = http://heanet.dl.sourceforge.net/project/scummvm/scummvm/1.5.0/scummvm-1.5.0-win32.exe
|
||||
URLDownload = http://heanet.dl.sourceforge.net/project/scummvm/scummvm/1.6.0/scummvm-1.6.0-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -2,65 +2,65 @@
|
||||
|
||||
[Section]
|
||||
Name = Mozilla Thunderbird 17
|
||||
Version = 17.0.6
|
||||
Version = 17.0.7
|
||||
Licence = MPL/GPL/LGPL
|
||||
Description = The most popular and one of the best free Mail Clients out there.
|
||||
Size = 18.91MB
|
||||
Category = 5
|
||||
URLSite = http://www.mozilla.org/en/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/en-US/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/en-US/Thunderbird%20Setup%2017.0.7.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
Description = Der populärste und einer der besten freien Mail-Clients.
|
||||
Size = 18.77MB
|
||||
URLSite = http://www.mozilla-europe.org/de/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/de/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/de/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.040a]
|
||||
Description = El más popular y uno de los mejores clientes mail que hay.
|
||||
Size = 18.73MB
|
||||
URLSite = http://www.mozilla-europe.org/es/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/es-ES/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/es-ES/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.040c]
|
||||
Description = Le plus populaire et l'un des meilleurs clients mail gratuits disponible.
|
||||
Size = 19,06 Mo
|
||||
URLSite = http://www.mozilla-europe.org/fr/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/fr/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/fr/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0410]
|
||||
Description = Il più popolare e il migliore Clients mail gratuito.
|
||||
Size = 18.7MB
|
||||
URLSite = http://www.mozilla-europe.org/it/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/it/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/it/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0413]
|
||||
Description = De meest populaire en een van de beste gratis e-mail-programma's.
|
||||
Size = 19.28MB
|
||||
URLSite = http://www.mozilla-europe.org/nl/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/nl/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/nl/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0415]
|
||||
Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty.
|
||||
Size = 19.62MB
|
||||
URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/pl/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/pl/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0418]
|
||||
Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică.
|
||||
Size = 19,28 Mo
|
||||
URLSite = http://www.mozilla-europe.org/ro/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/ro/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/ro/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0419]
|
||||
Description = Один из самых популярных и лучших бесплатных почтовых клиентов.
|
||||
Size = 19.19MB
|
||||
URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/ru/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/ru/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
[Section.0422]
|
||||
Description = Найпопулярніший та один з кращих поштових клієнтів.
|
||||
Size = 19.21MB
|
||||
URLSite = http://www.mozillamessaging.com/uk/thunderbird/
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.6/win32/uk/Thunderbird%20Setup%2017.0.6.exe
|
||||
URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/uk/Thunderbird%20Setup%2017.0.7.exe
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
[Section]
|
||||
Name = VLC media player
|
||||
Version = 2.0.6
|
||||
Version = 2.0.7
|
||||
Licence = GPL
|
||||
Description = A media player.
|
||||
Size = 21.88MB
|
||||
Category = 1
|
||||
URLSite = http://www.videolan.org/vlc/
|
||||
URLDownload = http://garr.dl.sourceforge.net/project/vlc/2.0.6/win32/vlc-2.0.6-win32.exe
|
||||
URLDownload = http://mirror.de.leaseweb.net/videolan/vlc/2.0.7/win32/vlc-2.0.7-win32.exe
|
||||
CDPath = none
|
||||
|
||||
[Section.0407]
|
||||
|
||||
@@ -763,7 +763,17 @@ wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nSh
|
||||
WCHAR szErrorText[MAX_STR_LEN];
|
||||
HANDLE hMutex = NULL;
|
||||
MSG Msg;
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
hInst = hInstance;
|
||||
|
||||
if (!IsUserAnAdmin())
|
||||
|
||||
@@ -439,8 +439,8 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
goto def;
|
||||
case WM_DESTROY:
|
||||
DestroyTreeView();
|
||||
DestroyListView(g_pChildWnd->hListWnd);
|
||||
DestroyTreeView(g_pChildWnd->hTreeWnd);
|
||||
DestroyMainMenu();
|
||||
HeapFree(GetProcessHeap(), 0, g_pChildWnd);
|
||||
g_pChildWnd = NULL;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDD_COLUMNLISTBOXSTYLES DIALOGEX 0, 0, 227, 215
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dikeçli Dizelge Kutusu Biçimleri"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
BEGIN
|
||||
GROUPBOX "Dikeçli Dizelge Kutusu Biçimleri", -1, 6, 7, 158, 71
|
||||
CHECKBOX "&Ölçünlü", 1710, 10, 20, 42, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Sınırlar", 1713, 10, 30, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "S&ırala", 1705, 10, 40, 26, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Bildirme", 1706, 10, 50, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Dikey Kaydırma Çubuğu", 1707, 10, 60, 64, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Çoklu Seçim", -1, 79, 20, 72, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED
|
||||
CHECKBOX "&Genişletilmiş Seçim", -1, 79, 30, 77, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP | WS_DISABLED
|
||||
CHECKBOX "&Açılan Başlıklar", 1714, 79, 40, 68, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "&Esnek Dikeçler", 1715, 79, 50, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
GROUPBOX "Temel Biçimler", -1, 6, 80, 158, 34
|
||||
CHECKBOX "Gö&rünür", 1701, 10, 92, 34, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "De&vre Dışı", 1702, 10, 102, 41, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "K&üme", 1703, 79, 92, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "Se&kme Durağı", 1704, 79, 102, 44, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Tamam", IDOK, 37, 125, 40, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 93, 125, 40, 14, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP
|
||||
CHECKBOX "Ka&ydırmayı Etkinleştir", 1708, 79, 60, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
|
||||
END
|
||||
|
||||
@@ -64,6 +64,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#ifdef LANGUAGE_TH_TH
|
||||
#include "lang/th-TH.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,598 @@
|
||||
/*
|
||||
* Turkish Resources for ReactOS Regedit
|
||||
*
|
||||
* Copyright: 2013 Erdem Ersoy (eersoy93) ([email protected])
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
ID_ACCEL ACCELERATORS
|
||||
BEGIN
|
||||
VK_DELETE, ID_EDIT_DELETE, VIRTKEY, NOINVERT
|
||||
"^F", ID_EDIT_FIND
|
||||
VK_F3, ID_EDIT_FINDNEXT, VIRTKEY, NOINVERT
|
||||
VK_F5, ID_VIEW_REFRESH, VIRTKEY, NOINVERT
|
||||
VK_F1, ID_HELP_HELPTOPICS, VIRTKEY, NOINVERT
|
||||
END
|
||||
|
||||
/*
|
||||
* Menu
|
||||
*/
|
||||
|
||||
IDC_REGEDIT MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Çıkış", ID_REGISTRY_EXIT
|
||||
END
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Hakkında", ID_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
IDR_REGEDIT_MENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Al...", ID_REGISTRY_IMPORTREGISTRYFILE
|
||||
|
||||
MENUITEM "&Ver...", ID_REGISTRY_EXPORTREGISTRYFILE
|
||||
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yığın Yükle...", ID_REGISTRY_LOADHIVE, GRAYED
|
||||
MENUITEM "Y&ığını kaldır...", ID_REGISTRY_UNLOADHIVE, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "A&ğ Değerlerine Bağlan...", ID_REGISTRY_CONNECTNETWORKREGISTRY
|
||||
MENUITEM "Ağ &Değerlerine Bağlantıyı Kes...", ID_REGISTRY_DISCONNECTNETWORKREGISTRY, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Ya&zdır...\tCtrl+P", ID_REGISTRY_PRINT, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", ID_REGISTRY_EXIT
|
||||
END
|
||||
POPUP "&Düzen"
|
||||
BEGIN
|
||||
MENUITEM "&Değiştir...", ID_EDIT_MODIFY
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Yeni"
|
||||
BEGIN
|
||||
MENUITEM "&Dizin", ID_EDIT_NEW_KEY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "D&izgi Değeri", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&32 İkillik Değer", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Çok Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "&Genişletilebilir Dizgi Değeri", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&İzinler...", ID_EDIT_PERMISSIONS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Sil\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Adını Değiştir", ID_EDIT_RENAME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Y&olunu Çoğalt", ID_EDIT_COPYKEYNAME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "A&ra...\tCtrl+F", ID_EDIT_FIND
|
||||
MENUITEM "So&nrakini Ara\tF3", ID_EDIT_FINDNEXT
|
||||
END
|
||||
POPUP "&Görünüm"
|
||||
BEGIN
|
||||
MENUITEM "&Durum Çubuğu", ID_VIEW_STATUSBAR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Ayırıcının Yerini Değiştir", ID_VIEW_SPLIT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yenile\tF5", ID_VIEW_REFRESH
|
||||
END
|
||||
POPUP "Y&er İmleri"
|
||||
BEGIN
|
||||
MENUITEM "&Yer İmlerine Ekle...", ID_FAVOURITES_ADDTOFAVOURITES, GRAYED
|
||||
MENUITEM "Y&er İmlerinden Çıkar...", ID_FAVOURITES_REMOVEFAVOURITE, GRAYED
|
||||
END
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Yardım Konuları\tF1", ID_HELP_HELPTOPICS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Hakkında", ID_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
IDR_POPUP_MENUS MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "&Değiştir...", ID_EDIT_MODIFY
|
||||
MENUITEM "&İkili Olarak Değiştir...", ID_EDIT_MODIFY_BIN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Sil\tDel", ID_EDIT_DELETE
|
||||
MENUITEM "&Adını Değiştir", ID_EDIT_RENAME
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
POPUP "&Yeni"
|
||||
BEGIN
|
||||
MENUITEM "&Dizin", ID_EDIT_NEW_KEY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "D&izgi Değeri", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&32 İkillik Değer", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Çoklu Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "&Genişletilebilir Dizgi Değeri", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "&Genişlet ya da Daralt", ID_TREE_EXPANDBRANCH
|
||||
POPUP "&Yeni"
|
||||
BEGIN
|
||||
MENUITEM "&Dizin", ID_EDIT_NEW_KEY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "D&izgi Değeri", ID_EDIT_NEW_STRINGVALUE
|
||||
MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE
|
||||
MENUITEM "&32 İkillik Değer", ID_EDIT_NEW_DWORDVALUE
|
||||
MENUITEM "&Çoklu Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE
|
||||
MENUITEM "&Genişletilebilir Dizgi Değeri", ID_EDIT_NEW_EXPANDABLESTRINGVALUE
|
||||
END
|
||||
MENUITEM "A&ra...", ID_EDIT_FIND
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Sil", ID_TREE_DELETE
|
||||
MENUITEM "&Adını Değiştir", ID_TREE_RENAME
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Ver...", ID_TREE_EXPORT
|
||||
MENUITEM "&İzinler...", ID_TREE_PERMISSIONS, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Dizin Yolunu Çoğalt", ID_EDIT_COPYKEYNAME
|
||||
END
|
||||
POPUP ""
|
||||
BEGIN
|
||||
MENUITEM "&Kes", ID_HEXEDIT_CUT
|
||||
MENUITEM "&Çoğalt", ID_HEXEDIT_COPY
|
||||
MENUITEM "&Yapıştır", ID_HEXEDIT_PASTE
|
||||
MENUITEM "&Sil", ID_HEXEDIT_DELETE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Tümünü Seç", ID_HEXEDIT_SELECT_ALL
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/*
|
||||
* Dialog
|
||||
*/
|
||||
|
||||
IDD_EDIT_STRING DIALOGEX 32, 24, 252, 84
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dizgi Değerini Düzenle"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Değer Adı:",IDC_STATIC,6,6,134,8
|
||||
EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8
|
||||
EDITTEXT IDC_VALUE_DATA,6,46,240,12,ES_AUTOHSCROLL
|
||||
DEFPUSHBUTTON "Tamam",IDOK,142,64,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,196,64,50,14
|
||||
END
|
||||
|
||||
IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Çoklu Dizeli Dizgi Değerini Düzenle"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Değer Adı:",IDC_STATIC,6,6,134,8
|
||||
EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8
|
||||
EDITTEXT IDC_VALUE_DATA,6,46,240,102,ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL | WS_VSCROLL
|
||||
DEFPUSHBUTTON "Tamam",IDOK,142,154,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,196,154,50,14
|
||||
END
|
||||
|
||||
IDD_EDIT_BIN_DATA DIALOGEX 32, 24, 252, 174
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "İkili Değeri Düzenle"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Değer Adı:",IDC_STATIC,6,6,134,8
|
||||
EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8
|
||||
CONTROL "",IDC_VALUE_DATA,"HexEdit32",WS_VSCROLL | WS_BORDER | WS_TABSTOP,6,46,240,102
|
||||
DEFPUSHBUTTON "Tamam",IDOK,142,154,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,196,154,50,14
|
||||
END
|
||||
|
||||
|
||||
IDD_EDIT_DWORD DIALOGEX 32, 24, 252, 104
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "32 İkillik Değeri Düzenle"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "&Değer Adı:",IDC_STATIC,6,6,134,8
|
||||
EDITTEXT IDC_VALUE_NAME,6,17,240,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "D&eğer:",IDC_STATIC,6,35,161,8
|
||||
EDITTEXT IDC_VALUE_DATA,6,46,116,12,ES_AUTOHSCROLL
|
||||
GROUPBOX "Şimdi Girilen Değer",IDC_STATIC,130,35,116,39
|
||||
AUTORADIOBUTTON "&Onaltılık",IDC_FORMAT_HEX,141,46,60,10,WS_GROUP
|
||||
AUTORADIOBUTTON "O&nluk",IDC_FORMAT_DEC,141,59,60,10
|
||||
DEFPUSHBUTTON "Tamam",IDOK,142,82,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,196,82,50,14
|
||||
END
|
||||
|
||||
|
||||
IDD_EDIT_RESOURCE_LIST DIALOGEX 32, 24, 170, 120
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Kaynak Dizelgesi"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
CONTROL "", IDC_RESOURCE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 10, 150, 75
|
||||
DEFPUSHBUTTON "Tamam", IDOK, 27, 100, 50, 14
|
||||
PUSHBUTTON "Göster...", IDC_SHOW_RESOURCE, 93, 100, 50, 14, WS_DISABLED
|
||||
}
|
||||
|
||||
|
||||
IDD_EDIT_RESOURCE DIALOGEX 6, 18, 281, 283
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP |
|
||||
WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Kaynaklar"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "DMA:", IDC_STATIC, 10, 5, 20, 8
|
||||
CONTROL "", IDC_DMA_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 15, 261, 31
|
||||
LTEXT "Kesme:", IDC_STATIC, 10, 48, 35, 8
|
||||
CONTROL "", IDC_IRQ_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 58, 261, 31
|
||||
LTEXT "Bellek:", IDC_STATIC, 10, 91, 32, 8
|
||||
CONTROL "", IDC_MEMORY_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 101, 261, 31
|
||||
LTEXT "Giriş:", IDC_STATIC, 10, 134, 38, 8
|
||||
CONTROL "", IDC_PORT_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 144, 261, 31
|
||||
LTEXT "Özel Aygıt Bilgisi:", IDC_STATIC, 10, 177, 80, 8
|
||||
CONTROL "", IDC_DEVICE_LIST, "SysListView32", LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP, 10, 188, 261, 31
|
||||
GROUPBOX "Kullanım", IDC_STATIC, 10, 219, 125, 39
|
||||
LTEXT "Belirsiz:", IDC_UNDETERMINED, 18, 230, 46, 8, WS_DISABLED
|
||||
LTEXT "Paylaşılan:", IDC_SHARED, 18, 240, 48, 8, WS_DISABLED
|
||||
LTEXT "Özel Aygıt", IDC_DEVICE_EXCLUSIVE, 72, 230, 58, 8, WS_DISABLED
|
||||
LTEXT "Özel Sürücü", IDC_DRIVER_EXCLUSIVE, 72, 240, 54, 8, WS_DISABLED
|
||||
RTEXT "Arayüz Türü:", IDC_STATIC, 144, 220, 58, 8
|
||||
LTEXT "", IDC_INTERFACETYPE, 205, 220, 66, 8
|
||||
RTEXT "Veri Yolu Numarası:", IDC_STATIC, 151, 230, 51, 8
|
||||
LTEXT "", IDC_BUSNUMBER, 205, 230, 66, 8
|
||||
RTEXT "Sürüm:", IDC_STATIC, 151, 240, 51, 8
|
||||
LTEXT "", IDC_VERSION, 205, 240, 66, 8
|
||||
RTEXT "Düzeltme:", IDC_STATIC, 151, 250, 51, 8
|
||||
LTEXT "", IDC_REVISION, 205, 250, 66, 8
|
||||
DEFPUSHBUTTON "Tamam",IDOK, 92, 263, 40, 14
|
||||
PUSHBUTTON "Kaynak Bilgisi...", IDC_SHOW_RESOURCE_DATA, 148, 263, 40, 14, WS_DISABLED
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* String Table
|
||||
*/
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_LIST_COLUMN_NAME "Değerin Adı"
|
||||
IDS_LIST_COLUMN_TYPE "Değerin Türü"
|
||||
IDS_LIST_COLUMN_DATA "Değer"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APP_TITLE "Değer Defteri Düzenleyicisi"
|
||||
IDC_REGEDIT "REGEDIT"
|
||||
IDC_REGEDIT_FRAME "REGEDIT_FRAME"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_REGISTRY_MENU "Bu seçke, bütün Değer Defteri ile çalışma komutlarını içerir."
|
||||
ID_EDIT_MENU "Bu seçke, dizinleri veya değerleri düzenleme komutlarını içerir."
|
||||
ID_VIEW_MENU "Bu seçke, Değer Defteri Düzenleyicisi'nin penceresini özelleştirme komutlarını içerir."
|
||||
ID_FAVOURITES_MENU "Bu seçke, yer imleri ile ilgili komutları içerir."
|
||||
ID_HELP_MENU "Bu seçke, Değer Defteri Düzenleyicisi ile ilgili bilgi veya yardım alma komutlarını içerir."
|
||||
ID_EDIT_NEW_MENU "Bu seçke, yeni bir dizin veya yeni bir değer oluşturma komutlarını içerir."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_EDIT_MODIFY "Değeri değiştirir."
|
||||
ID_EDIT_NEW_KEY "Yeni bir dizin oluşturur."
|
||||
ID_EDIT_NEW_STRINGVALUE "Yeni bir dizgi değeri oluşturur."
|
||||
ID_EDIT_NEW_BINARYVALUE "Yeni bir ikili değer oluşturur."
|
||||
ID_EDIT_NEW_DWORDVALUE "Yeni bir 32 ikillik değer oluşturur."
|
||||
ID_REGISTRY_IMPORTREGISTRYFILE "Uygun bir kütükten bilgiler alır."
|
||||
ID_REGISTRY_EXPORTREGISTRYFILE "Değer Defteri'nin tümünü ya da bir bölümünü bir kütüğe kaydeder."
|
||||
ID_REGISTRY_LOADHIVE "Değer Defteri'ne bir yığın yükler."
|
||||
ID_REGISTRY_UNLOADHIVE "Değer Defteri'nden bir yığın kaldırır."
|
||||
ID_REGISTRY_CONNECTNETWORKREGISTRY "Uzaktaki bir bilgisyarın değerlerine bağlanır."
|
||||
ID_REGISTRY_DISCONNECTNETWORKREGISTRY "Uzaktaki bir bilgisayarın değerlerine olan bağlantıyı keser."
|
||||
ID_REGISTRY_PRINT "Değer Defteri'nin tümünü ya da bir bölümünü yazdırır."
|
||||
/*ID_HELP_HELPTOPICS "Değer Defteri Düzenleyicisi ile ilgili yardım konularını açar."*/
|
||||
ID_HELP_ABOUT "Değer Defteri Düzenleyicisi ile ilgili bilgi görüntüler."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_REGISTRY_EXIT "Değer Defteri Düzenleyicisi'nden çıkar."
|
||||
ID_FAVOURITES_ADDTOFAVOURITES "Bir dizini yer imlerine ekler."
|
||||
ID_FAVOURITES_REMOVEFAVOURITE "Dizinleri yer imlerinden kaldırır."
|
||||
ID_VIEW_STATUSBAR "Durum çubuğunu gizler ya da gösterir."
|
||||
ID_VIEW_SPLIT "Ayırıcının yerini değiştirir."
|
||||
ID_VIEW_REFRESH "Pencereyi yeniler."
|
||||
ID_EDIT_DELETE "Seçilen öğeyi siler."
|
||||
ID_EDIT_RENAME "Seçilen öğenin adını değiştirir."
|
||||
ID_EDIT_COPYKEYNAME "Seçilen öğenin dizin yolunu çoğaltır."
|
||||
ID_EDIT_FIND "Belirtilen dizgiyi dizinlerin adlarında, değerlerde veya değer adlarında arar."
|
||||
ID_EDIT_FINDNEXT "Bulunan dizgiyi bulunduğu yerden başlayarak bir daha arar."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ERROR "Hatâ"
|
||||
IDS_WARNING "Uyarı"
|
||||
IDS_BAD_KEY "Dizin sorgulanamıyor: %s"
|
||||
IDS_BAD_VALUE "Değer sorgulanamıyor: %s"
|
||||
IDS_UNSUPPORTED_TYPE "Bu türdeki dizinler değiştirilemez: %ld"
|
||||
IDS_TOO_BIG_VALUE "Değer çok büyük: %ld"
|
||||
IDS_MULTI_SZ_EMPTY_STRING "REG_MULTI_SZ boş dizgi içeremez.\nBoş dizgiler dizelgeden silinmiştir."
|
||||
IDS_QUERY_DELETE_KEY_ONE "Bu dizini silmeye emin misiniz?"
|
||||
IDS_QUERY_DELETE_KEY_MORE "Bu dizinleri silmeye emin misiniz?"
|
||||
IDS_QUERY_DELETE_KEY_CONFIRM "Emin Misiniz?"
|
||||
IDS_QUERY_DELETE_ONE "Bu değeri silmeye emin misiniz?"
|
||||
IDS_QUERY_DELETE_MORE "Bu değerleri silmeye emin misiniz?"
|
||||
IDS_QUERY_DELETE_CONFIRM "Emin Misiniz?"
|
||||
IDS_ERR_DELVAL_CAPTION "Değerlerin Silinmesi"
|
||||
IDS_ERR_DELETEVALUE "Belirtilmiş değerler silinemiyor."
|
||||
IDS_ERR_RENVAL_CAPTION "Değerin Adının Değiştirilmesi"
|
||||
IDS_ERR_RENVAL_TOEMPTY "Yeni bir ad girmediğinizden dolayı bu değerin adı değiştirilemiyor: %s"
|
||||
IDS_QUERY_IMPORT_HIVE_CAPTION "Emin Misiniz?"
|
||||
IDS_QUERY_IMPORT_HIVE_MSG "Bu dizin, seçili dizinle yenilenecektir.\nBu yüzden bu dizinin tüm alt dizinleri ve değerleri silinecektir.\nİşlemi sürdürmek istiyor musunuz?"
|
||||
IDS_NEW_KEY "%d. Yeni Dizin"
|
||||
IDS_NEW_VALUE "%d. Yeni Değer"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_BINARY_EMPTY "(Bu değer sıfır uzunluktadır.)"
|
||||
IDS_DEFAULT_VALUE_NAME "(Ön tanımlı)"
|
||||
IDS_VALUE_NOT_SET "(Bu değer belirtilmemiştir.)"
|
||||
IDS_UNKNOWN_TYPE "Bilinmeyen tür: (0x%lx)"
|
||||
IDS_MY_COMPUTER "Bilgisayar"
|
||||
IDS_IMPORT_REG_FILE "Değer Kütüğünden Al"
|
||||
IDS_EXPORT_REG_FILE "Değer Kütüğüne Ver"
|
||||
IDS_LOAD_HIVE "Yığın Yükle"
|
||||
IDS_UNLOAD_HIVE "Yığını Kaldır"
|
||||
IDS_INVALID_DWORD "(Bu 32 ikillik değer geçersizdir.)"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_FLT_REGFILE "Değer Kütüğü"
|
||||
IDS_FLT_REGFILES "Değer Kütükleri (*.reg)"
|
||||
IDS_FLT_REGFILES_FLT "*.reg"
|
||||
IDS_FLT_HIVFILES "Yığın Dosyaları (*.*)"
|
||||
IDS_FLT_HIVFILES_FLT "*.*"
|
||||
IDS_FLT_REGEDIT4 "Windows 9x ve Windows NT 4.0 Türündeki Değer Kütükleri (*.reg)"
|
||||
IDS_FLT_REGEDIT4_FLT "*.reg"
|
||||
IDS_FLT_ALLFILES "Tüm Kütükler (*.*)"
|
||||
IDS_FLT_ALLFILES_FLT "*.*"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_ACCESS_FULLCONTROL "Tam Denetim"
|
||||
IDS_ACCESS_READ "Okuma"
|
||||
IDS_ACCESS_QUERYVALUE "Değer Sorgulama"
|
||||
IDS_ACCESS_SETVALUE "Değer Atama"
|
||||
IDS_ACCESS_CREATESUBKEY "Alt Dizin Oluşturma"
|
||||
IDS_ACCESS_ENUMERATESUBKEYS "Alt Dizinleri Sıralama"
|
||||
IDS_ACCESS_NOTIFY "Bildirme"
|
||||
IDS_ACCESS_CREATELINK "Bağlantı Oluşturma"
|
||||
IDS_ACCESS_DELETE "Silme"
|
||||
IDS_ACCESS_WRITEDAC "DAC Yazma"
|
||||
IDS_ACCESS_WRITEOWNER "Sahibi Yazma"
|
||||
IDS_ACCESS_READCONTROL "Okuma Denetimi"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_INHERIT_THISKEYONLY "Yalnızca bu dizin"
|
||||
IDS_INHERIT_THISKEYANDSUBKEYS "Alt dizinleriyle birlikte bu dizin"
|
||||
IDS_INHERIT_SUBKEYSONLY "Yalnızca bu dizinin alt dizinleri"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_EXPAND "&Genişlet"
|
||||
IDS_COLLAPSE "&Daralt"
|
||||
IDS_GOTO_SUGGESTED_KEY "G&it: %s"
|
||||
IDS_FINISHEDFIND "Değer defterinde arama tamamlandı."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_IMPORT_PROMPT "Eklenen bilgiler değerleri değiştirebilir veya bileşenlerin doğru çalışmasını engelleyebilir.\nEğer %s kütüğündeki bilgilerin kaynağını bilmiyorsanız bu bilgileri değer defterine eklemeyiniz.\n\nSürdürmek istiyor musunuz?"
|
||||
IDS_IMPORT_OK "Bilgiler, %s kütüğünden başarıyla alındı."
|
||||
IDS_IMPORT_ERROR "%s alınamıyor. Disk hatâsı, kütük dizgesi hatâsı ya da belirtilen kütüğün olmamasından dolayı bilgi alınacak kütük açılamıyor."
|
||||
IDS_EXPORT_ERROR "%s verilemiyor. Disk hatâsı ya da kütük dizgesi hatâsından dolayı belirtilen kütük oluşturulamıyor ya da bilgiler bu kütüğün üzerine yazılamıyor."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_BUSNUMBER "Veri Yolu Numarası"
|
||||
IDS_INTERFACE "Arayüz"
|
||||
IDS_DMA_CHANNEL "Kanal"
|
||||
IDS_DMA_PORT "Giriş"
|
||||
IDS_INTERRUPT_VECTOR "Yöney"
|
||||
IDS_INTERRUPT_LEVEL "Düzey"
|
||||
IDS_INTERRUPT_AFFINITY "Benzerlik"
|
||||
IDS_INTERRUPT_TYPE "Tür"
|
||||
IDS_MEMORY_ADDRESS "Fiziksel Erişki"
|
||||
IDS_MEMORY_LENGTH "Uzunluk"
|
||||
IDS_MEMORY_ACCESS "Erişim"
|
||||
IDS_PORT_ADDRESS "Fiziksel Erişki"
|
||||
IDS_PORT_LENGTH "Uzunluk"
|
||||
IDS_PORT_ACCESS "Erişim"
|
||||
IDS_SPECIFIC_RESERVED1 "Ayrılmış 1"
|
||||
IDS_SPECIFIC_RESERVED2 "Ayrılmış 2"
|
||||
IDS_SPECIFIC_DATASIZE "Veri Niceliği"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_PORT_PORT_IO "Giriş"
|
||||
IDS_PORT_MEMORY_IO "Bellek"
|
||||
IDS_INTERRUPT_EDGE_SENSITIVE "Kenar Duyarlılığı"
|
||||
IDS_INTERRUPT_LEVEL_SENSITIVE "Düzey Duyarlılığı"
|
||||
IDS_MEMORY_READ_ONLY "Salt Okunur"
|
||||
IDS_MEMORY_WRITE_ONLY "Salt Yazılır"
|
||||
IDS_MEMORY_READ_WRITE "Okuma/Yazma"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_BUS_UNDEFINED "Tanımlanmamış"
|
||||
IDS_BUS_INTERNAL "Dâhilî"
|
||||
IDS_BUS_ISA "ISA"
|
||||
IDS_BUS_EISA "EISA"
|
||||
IDS_BUS_MICROCHANNEL "MikroKanal"
|
||||
IDS_BUS_TURBOCHANNEL "TurboKanal"
|
||||
IDS_BUS_PCIBUS "PCI"
|
||||
IDS_BUS_VMEBUS "VME"
|
||||
IDS_BUS_NUBUS "Nu Veri Yolu"
|
||||
IDS_BUS_PCMCIABUS "PCMCIA"
|
||||
IDS_BUS_CBUS "C Veri Yolu"
|
||||
IDS_BUS_MPIBUS "MPI Veri Yolu"
|
||||
IDS_BUS_MPSABUS "MPSA Veri Yolu"
|
||||
IDS_BUS_PROCESSORINTERNAL "Dâhilî İşlemci"
|
||||
IDS_BUS_INTERNALPOWERBUS "Dâhilî Güç Veri Yolu"
|
||||
IDS_BUS_PNPISABUS "PnP-ISA Veri Yolu"
|
||||
IDS_BUS_PNPBUS "PnP Veri Yolu"
|
||||
IDS_BUS_UNKNOWNTYPE "Bilinmeyen Arayüz Türü"
|
||||
END
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
* Dialog
|
||||
*/
|
||||
|
||||
IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "Verme Kapsamı",IDC_STATIC,2,0,366,48
|
||||
CONTROL "&Tümü",IDC_EXPORT_ALL,"Button",BS_AUTORADIOBUTTON,10,10, 29,11
|
||||
CONTROL "&Seçili Dal",IDC_EXPORT_BRANCH,"Button",BS_AUTORADIOBUTTON,10,22, 100,11
|
||||
EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12
|
||||
END
|
||||
|
||||
//
|
||||
// Dialog resources
|
||||
//
|
||||
IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Yığın Yükleme"
|
||||
FONT 8, "Ms Shell Dlg"
|
||||
{
|
||||
LTEXT "Dizin:", IDC_STATIC, 4, 4, 15, 8, SS_LEFT
|
||||
EDITTEXT IDC_EDIT_KEY, 23, 2, 167, 13
|
||||
DEFPUSHBUTTON "Tamam", IDOK, 140, 17, 50, 14
|
||||
PUSHBUTTON "Vazgeç", IDCANCEL, 89, 17, 50, 14
|
||||
}
|
||||
|
||||
IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Yer İmlerine Ekleme"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Tamam",IDOK,129,7,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,129,24,50,14
|
||||
LTEXT "Yer İmi Adı:",IDC_STATIC,7,7,70,10
|
||||
EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL
|
||||
END
|
||||
|
||||
IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Yer İmlerini Silme"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Tamam",IDOK,107,114,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,7,114,50,14
|
||||
CONTROL "List1",IDC_FAVORITESLIST,"SysListView32",LVS_LIST |
|
||||
WS_BORDER | WS_TABSTOP,7,20,150,90
|
||||
LTEXT "Yer İmlerini Seç:",IDC_STATIC,7,7,99,12
|
||||
END
|
||||
|
||||
IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Ara"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "&Sonrakini Ara",IDOK,197,7,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,197,24,50,14
|
||||
GROUPBOX "Şunlara Bak",IDC_STATIC,7,25,63,51
|
||||
LTEXT "Şunu Ara:",IDC_STATIC,7,8,37,10
|
||||
EDITTEXT IDC_FINDWHAT,47,7,142,13,ES_AUTOHSCROLL
|
||||
CONTROL "D&iznler",IDC_LOOKAT_KEYS,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,14,36,35,8
|
||||
CONTROL "D&eğer Adları",IDC_LOOKAT_VALUES,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,14,48,36,8
|
||||
CONTROL "&Değerler",IDC_LOOKAT_DATA,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,14,60,42,8
|
||||
CONTROL "Aranan, bir şeyin tam adı olsun.",IDC_MATCHSTRING,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,83,32,94,13
|
||||
CONTROL "Büyük-küçük hârf ayrımı olsun.",IDC_MATCHCASE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,83,48,90,12
|
||||
END
|
||||
|
||||
IDD_FINDING DIALOGEX 0, 0, 145, 50
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP |
|
||||
WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Arama"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDI_REGEDIT,IDC_STATIC,7,7,20,20
|
||||
DEFPUSHBUTTON "Vazgeç",IDCANCEL,93,29,45,14
|
||||
LTEXT "Aranıyor...",IDC_STATIC,33,12,83,8
|
||||
END
|
||||
|
||||
/*
|
||||
* TEXTINCLUDE
|
||||
*/
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* String Table
|
||||
*/
|
||||
|
||||
/*
|
||||
*STRINGTABLE DISCARDABLE
|
||||
*BEGIN
|
||||
* ID_HELP_HELPTOPICS "Değer Defteri Düzenleyicisi ile ilgili yardım konularını açar."
|
||||
* ID_HELP_ABOUT "Değer Defteri Düzenleyicisi ile ilgili bilgi görüntüler."
|
||||
*END
|
||||
*/
|
||||
|
||||
/*****************************************************************/
|
||||
@@ -207,6 +207,16 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
||||
LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, MAX_LOADSTRING);
|
||||
LoadStringW(hInstance, IDC_REGEDIT, szChildClass, MAX_LOADSTRING);
|
||||
|
||||
|
||||
switch (GetUserDefaultUILanguage())
|
||||
{
|
||||
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):
|
||||
SetProcessDefaultLayout(LAYOUT_RTL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* Store instance handle in our global variable */
|
||||
hInst = hInstance;
|
||||
|
||||
|
||||
@@ -129,9 +129,9 @@ extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
|
||||
extern HWND StartKeyRename(HWND hwndTV);
|
||||
extern BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem);
|
||||
extern BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
|
||||
extern void DestroyTreeView( void );
|
||||
extern void DestroyListView( HWND hwndLV );
|
||||
extern void DestroyMainMenu( void );
|
||||
extern void DestroyTreeView(HWND hwndTV);
|
||||
extern void DestroyListView(HWND hwndLV);
|
||||
extern void DestroyMainMenu(void);
|
||||
|
||||
/* edit.c */
|
||||
extern BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
|
||||
|
||||
@@ -98,6 +98,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#ifdef LANGUAGE_TH_TH
|
||||
#include "lang/th-TH.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ extern void SaveSettings(void)
|
||||
|
||||
/* Get program window settings */
|
||||
tConfig.tPlacement.length = sizeof(WINDOWPLACEMENT);
|
||||
GetWindowPlacement(hFrameWnd , &tConfig.tPlacement);
|
||||
GetWindowPlacement(hFrameWnd, &tConfig.tPlacement);
|
||||
|
||||
/* Save all the data */
|
||||
RegSetValueExW(hKey, L"View", 0, REG_BINARY, (LPBYTE)&tConfig, iBufferSize);
|
||||
|
||||
@@ -651,10 +651,15 @@ HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
|
||||
return hwndTV;
|
||||
}
|
||||
|
||||
void DestroyTreeView()
|
||||
void DestroyTreeView(HWND hwndTV)
|
||||
{
|
||||
if (pathBuffer)
|
||||
HeapFree(GetProcessHeap(), 0, pathBuffer);
|
||||
HIMAGELIST himl;
|
||||
|
||||
if (pathBuffer) HeapFree(GetProcessHeap(), 0, pathBuffer);
|
||||
|
||||
/* Destroy the image list associated with the tree view control */
|
||||
himl = TreeView_GetImageList(hwndTV, TVSIL_NORMAL);
|
||||
if (himl) ImageList_Destroy(himl);
|
||||
}
|
||||
|
||||
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
set_cpp()
|
||||
set_cpp(WITH_RUNTIME)
|
||||
|
||||
add_executable(sndrec32
|
||||
audio_format.cpp
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDC_REACTOS_SNDREC32 ACCELERATORS
|
||||
@@ -47,7 +51,7 @@ BEGIN
|
||||
IDS_STRPOS "Konum: %.2f s"
|
||||
IDS_STRDUR "Uzunluk: %.2f s"
|
||||
IDS_STRBUF "Ara Bellek: %.2f KB"
|
||||
IDS_STRFMT "%.1f kHz, %u bitlik"
|
||||
IDS_STRFMT "%.1f kHz, %u ikillik"
|
||||
IDS_STRMONO "Tek Yollu"
|
||||
IDS_STRSTEREO "Çift Yollu"
|
||||
IDS_STRCHAN "%s"
|
||||
|
||||
@@ -0,0 +1,619 @@
|
||||
/*
|
||||
* TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) ([email protected])
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
|
||||
|
||||
IDR_TASKMANAGER MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&Kütük"
|
||||
BEGIN
|
||||
MENUITEM "&Yeni Görev Çalıştır...", ID_FILE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Çıkış", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Seçenekler"
|
||||
BEGIN
|
||||
MENUITEM "&Her Zaman Üstte", ID_OPTIONS_ALWAYSONTOP, CHECKED
|
||||
MENUITEM "&Kullanımda Simge Durumuna Küçült", ID_OPTIONS_MINIMIZEONUSE, CHECKED
|
||||
MENUITEM "&Simge Durumuna Küçültüldüğünde Gizle", ID_OPTIONS_HIDEWHENMINIMIZED, CHECKED
|
||||
MENUITEM "&16 İkillik Görevleri Göster", ID_OPTIONS_SHOW16BITTASKS, CHECKED
|
||||
END
|
||||
POPUP "&Görünüm"
|
||||
BEGIN
|
||||
MENUITEM "&Yenile", ID_VIEW_REFRESH
|
||||
POPUP "&Gücelleme Hızı"
|
||||
BEGIN
|
||||
MENUITEM "&Yüksek", ID_VIEW_UPDATESPEED_HIGH
|
||||
MENUITEM "&Orta", ID_VIEW_UPDATESPEED_NORMAL, CHECKED
|
||||
MENUITEM "&Düşük", ID_VIEW_UPDATESPEED_LOW
|
||||
MENUITEM "&Sıfır", ID_VIEW_UPDATESPEED_PAUSED
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Büyük Simgeler", ID_VIEW_LARGE
|
||||
MENUITEM "&Küçük Simgeler", ID_VIEW_SMALL
|
||||
MENUITEM "&Ayrıntılar", ID_VIEW_DETAILS, CHECKED
|
||||
MENUITEM "&Dikeçleri Seç...", ID_VIEW_SELECTCOLUMNS
|
||||
POPUP "&CPU Geçmişi"
|
||||
BEGIN
|
||||
MENUITEM "&Tüm CPU'lar İçin Aynı Çizge", ID_VIEW_CPUHISTORY_ONEGRAPHALL
|
||||
MENUITEM "&Her CPU'ya Birer Çizge", ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU, CHECKED
|
||||
END
|
||||
MENUITEM "&Çekirdek Zamanlarını Göster", ID_VIEW_SHOWKERNELTIMES
|
||||
END
|
||||
POPUP "&Pencereler"
|
||||
BEGIN
|
||||
MENUITEM "&Yatay Olarak Sırala", ID_WINDOWS_TILEHORIZONTALLY
|
||||
MENUITEM "&Dikey Olarak Sırala", ID_WINDOWS_TILEVERTICALLY
|
||||
MENUITEM "&Küçült", ID_WINDOWS_MINIMIZE
|
||||
MENUITEM "&Büyüt", ID_WINDOWS_MAXIMIZE
|
||||
MENUITEM "B&asamakla", ID_WINDOWS_CASCADE
|
||||
MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT
|
||||
END
|
||||
POPUP "&Yardım"
|
||||
BEGIN
|
||||
MENUITEM "&Yardım Konuları", ID_HELP_TOPICS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Hakkında", ID_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
IDR_WINDOWSMENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
MENUITEM "&Yatay Olarak Sırala", ID_WINDOWS_TILEHORIZONTALLY
|
||||
MENUITEM "&Dikey Olarak Sırala", ID_WINDOWS_TILEVERTICALLY
|
||||
MENUITEM "&Küçült", ID_WINDOWS_MINIMIZE
|
||||
MENUITEM "&Büyüt", ID_WINDOWS_MAXIMIZE
|
||||
MENUITEM "B&asamakla", ID_WINDOWS_CASCADE
|
||||
MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT
|
||||
END
|
||||
|
||||
IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "SAHTE"
|
||||
BEGIN
|
||||
MENUITEM "&Yeni Görev Çalıştır...", ID_FILE_NEW
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Büyük Simgeler", ID_VIEW_LARGE
|
||||
MENUITEM "&Küçük Simgeler", ID_VIEW_SMALL
|
||||
MENUITEM "&Ayrıntılar", ID_VIEW_DETAILS, CHECKED
|
||||
END
|
||||
END
|
||||
|
||||
IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "SAHTE"
|
||||
BEGIN
|
||||
MENUITEM "&Geçiş Yap", ID_APPLICATION_PAGE_SWITCHTO
|
||||
MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Yatay Olarak Sırala", ID_WINDOWS_TILEHORIZONTALLY
|
||||
MENUITEM "&Dikey Olarak Sırala", ID_WINDOWS_TILEVERTICALLY
|
||||
MENUITEM "&Küçült", ID_WINDOWS_MINIMIZE
|
||||
MENUITEM "&Büyüt", ID_WINDOWS_MAXIMIZE
|
||||
MENUITEM "B&asamakla", ID_WINDOWS_CASCADE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Gö&revi Sonlandır", ID_APPLICATION_PAGE_ENDTASK
|
||||
MENUITEM "&İşleme Git", ID_APPLICATION_PAGE_GOTOPROCESS
|
||||
|
||||
END
|
||||
END
|
||||
|
||||
IDR_TRAY_POPUP MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "SAHTE"
|
||||
BEGIN
|
||||
MENUITEM "&Önceki Boyutuna Getir", ID_RESTORE
|
||||
MENUITEM "&Kapat", ID_FILE_EXIT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Her Zaman Üstte", ID_OPTIONS_ALWAYSONTOP
|
||||
END
|
||||
END
|
||||
|
||||
IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "SAHTE"
|
||||
BEGIN
|
||||
MENUITEM "&İşlemi Sonlandır", ID_PROCESS_PAGE_ENDPROCESS
|
||||
MENUITEM "İ&şlem Ağacını Sonlandır", ID_PROCESS_PAGE_ENDPROCESSTREE
|
||||
|
||||
MENUITEM "&Hatâ Ayıkla", ID_PROCESS_PAGE_DEBUG
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Öncelik Ata"
|
||||
BEGIN
|
||||
MENUITEM "&Eş Zamanlı", ID_PROCESS_PAGE_SETPRIORITY_REALTIME
|
||||
MENUITEM "&Yüksek", ID_PROCESS_PAGE_SETPRIORITY_HIGH
|
||||
MENUITEM "&Orta-Yüksek", ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL
|
||||
MENUITEM "O&rta", ID_PROCESS_PAGE_SETPRIORITY_NORMAL
|
||||
MENUITEM "Or&ta-Düşük", ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL
|
||||
MENUITEM "&Düşük", ID_PROCESS_PAGE_SETPRIORITY_LOW
|
||||
END
|
||||
MENUITEM "&CPU'larla İlişkisini Ayarla...", ID_PROCESS_PAGE_SETAFFINITY
|
||||
MENUITEM "H&atâ Ayıklama Kanallarını Düzenle...", ID_PROCESS_PAGE_DEBUGCHANNELS
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246
|
||||
STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP |
|
||||
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU |
|
||||
WS_THICKFRAME
|
||||
CAPTION "Görev Yöneticisi"
|
||||
MENU IDR_TASKMANAGER
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228
|
||||
END
|
||||
|
||||
IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List2",IDC_APPLIST,"SysListView32",LVS_REPORT |
|
||||
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,7,233,177
|
||||
PUSHBUTTON "&Yeni Görev...",IDC_NEWTASK,187,189,53,14
|
||||
PUSHBUTTON "&Geçiş Yap",IDC_SWITCHTO,131,189,53,14,WS_DISABLED
|
||||
PUSHBUTTON "G&örevi Sonlandır",IDC_ENDTASK,75,189,53,14,WS_DISABLED
|
||||
END
|
||||
|
||||
IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List2",IDC_PROCESSLIST,"SysListView32",LVS_REPORT |
|
||||
LVS_SINGLESEL | LVS_SHOWSELALWAYS |
|
||||
WS_BORDER | WS_TABSTOP,7,7,233,177
|
||||
PUSHBUTTON "&İşlemi Sonlandır",IDC_ENDPROCESS,171,189,69,14
|
||||
CONTROL "&Her Kullanıcıda Çalışan İşlemleri Göster",IDC_SHOWALLPROCESSES,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,191,111,10
|
||||
END
|
||||
|
||||
//IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210
|
||||
IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210
|
||||
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
GROUPBOX "CPU Kullanımı",IDC_CPU_USAGE_FRAME,5,5,60,54,0,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Bellek Kullanımı",IDC_MEM_USAGE_FRAME,5,63,60,54,BS_LEFTTEXT,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Toplam",IDC_TOTALS_FRAME,5,122,111,39,0,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Ayrılmış Bellek (KB)",IDC_COMMIT_CHARGE_FRAME,5,166,111,39,0,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Fiziksel Bellek (KB)",IDC_PHYSICAL_MEMORY_FRAME,131,122,111,39,0,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Çekirdek Belleği (KB)",IDC_KERNEL_MEMORY_FRAME,131,166,111,39,0,WS_EX_TRANSPARENT
|
||||
LTEXT "İşleçler",IDS_TOTALS_HANDLE_COUNT,12,131,27,8
|
||||
LTEXT "İş Parçacıkları",IDS_TOTALS_THREAD_COUNT,12,140,27,8
|
||||
LTEXT "İşlemler",IDS_TOTALS_PROCESS_COUNT,12,149,34,8
|
||||
EDITTEXT IDC_TOTALS_HANDLE_COUNT,65,131,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_TOTALS_THREAD_COUNT,65,140,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_TOTALS_PROCESS_COUNT,65,149,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
LTEXT "Toplam",IDS_COMMIT_CHARGE_TOTAL,12,175,27,8
|
||||
LTEXT "Sınır",IDS_COMMIT_CHARGE_LIMIT,12,184,15,8,NOT WS_BORDER
|
||||
LTEXT "En Yüksek",IDS_COMMIT_CHARGE_PEAK,12,193,34,8
|
||||
EDITTEXT IDC_COMMIT_CHARGE_TOTAL,65,174,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_COMMIT_CHARGE_LIMIT,65,184,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_COMMIT_CHARGE_PEAK,65,193,45,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
LTEXT "Toplam",IDS_PHYSICAL_MEMORY_TOTAL,137,131,27,8
|
||||
LTEXT "Kullanılabilir",IDS_PHYSICAL_MEMORY_AVAILABLE,137,140,30,8
|
||||
LTEXT "Dizge Ön Belleği",IDS_PHYSICAL_MEMORY_SYSTEM_CACHE,137,149,46,8
|
||||
EDITTEXT IDC_PHYSICAL_MEMORY_TOTAL,185,131,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_PHYSICAL_MEMORY_AVAILABLE,185,140,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_PHYSICAL_MEMORY_SYSTEM_CACHE,185,149,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
LTEXT "Toplam",IDS_KERNEL_MEMORY_TOTAL,137,174,27,8
|
||||
LTEXT "Sayfalanmış",IDS_KERNEL_MEMORY_PAGED,137,184,21,8
|
||||
LTEXT "Sayfalanmamış",IDS_KERNEL_MEMORY_NONPAGED,137,193,34,8
|
||||
EDITTEXT IDC_KERNEL_MEMORY_TOTAL,185,174,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_KERNEL_MEMORY_PAGED,185,184,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_KERNEL_MEMORY_NONPAGED,185,193,48,8,ES_RIGHT |
|
||||
ES_READONLY | ES_NUMBER | NOT WS_BORDER | NOT WS_TABSTOP
|
||||
GROUPBOX "CPU Kullanım Geçmişi",IDC_CPU_USAGE_HISTORY_FRAME,74,5,168,54,0,WS_EX_TRANSPARENT
|
||||
GROUPBOX "Sayfalama Dosyası Kullanım Geçmişi",IDC_MEMORY_USAGE_HISTORY_FRAME,74,63,168,54,0,WS_EX_TRANSPARENT
|
||||
PUSHBUTTON "CPU Kullanım Çizgesi",IDC_CPU_USAGE_GRAPH,12,17,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "Sayfalama Dosyası Kullanım Çizgesi",IDC_MEM_USAGE_GRAPH,12,75,47,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "CPU Kullanım Geçmişi Çizgesi",IDC_CPU_USAGE_HISTORY_GRAPH,81,17,
|
||||
153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE
|
||||
PUSHBUTTON "Sayfalama Dosyası Kullanım Geçmişi Çizgesi",IDC_MEM_USAGE_HISTORY_GRAPH,81,75,
|
||||
153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE
|
||||
END
|
||||
|
||||
IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Hatâ Ayıklama Kanalları"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CONTROL "List2",IDC_DEBUG_CHANNELS_LIST,"SysListView32",LVS_REPORT |
|
||||
LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP |
|
||||
LVS_SORTASCENDING,7,7,233,177
|
||||
PUSHBUTTON "Kapat",IDOK,171,189,69,14
|
||||
END
|
||||
|
||||
IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "CPU'larla İlişkisini Ayarla"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Tamam",IDOK,120,133,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,174,133,50,14
|
||||
LTEXT "Bu ayar, bu işlemin hangi CPU'larla yürütüleceğini ayarlar.",
|
||||
IDC_STATIC,5,5,220,16
|
||||
CONTROL "0. CPU",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
|
||||
11,28,37,10
|
||||
CONTROL "1. CPU",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,41,37,10
|
||||
CONTROL "2. CPU",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,54,37,10
|
||||
CONTROL "3. CPU",IDC_CPU3,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,67,37,10
|
||||
CONTROL "4. CPU",IDC_CPU4,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,80,37,10
|
||||
CONTROL "5. CPU",IDC_CPU5,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,93,37,10
|
||||
CONTROL "6. CPU",IDC_CPU6,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,106,37,10
|
||||
CONTROL "7. CPU",IDC_CPU7,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,11,119,37,10
|
||||
CONTROL "8. CPU",IDC_CPU8,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,61,28,37,10
|
||||
CONTROL "9. CPU",IDC_CPU9,"Button",BS_AUTOCHECKBOX | WS_DISABLED |
|
||||
WS_TABSTOP,61,41,37,10
|
||||
CONTROL "10. CPU",IDC_CPU10,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,54,41,10
|
||||
CONTROL "11. CPU",IDC_CPU11,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,67,41,10
|
||||
CONTROL "12. CPU",IDC_CPU12,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,80,41,10
|
||||
CONTROL "13. CPU",IDC_CPU13,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,93,41,10
|
||||
CONTROL "14. CPU",IDC_CPU14,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,106,41,10
|
||||
CONTROL "15. CPU",IDC_CPU15,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,61,119,41,10
|
||||
CONTROL "16. CPU",IDC_CPU16,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,28,41,10
|
||||
CONTROL "17. CPU",IDC_CPU17,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,41,41,10
|
||||
CONTROL "18. CPU",IDC_CPU18,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,54,41,10
|
||||
CONTROL "19. CPU",IDC_CPU19,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,67,41,10
|
||||
CONTROL "20. CPU",IDC_CPU20,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,80,41,10
|
||||
CONTROL "21. CPU",IDC_CPU21,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,93,41,10
|
||||
CONTROL "22. CPU",IDC_CPU22,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,106,41,10
|
||||
CONTROL "23. CPU",IDC_CPU23,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,116,119,41,10
|
||||
CONTROL "24. CPU",IDC_CPU24,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,28,41,10
|
||||
CONTROL "25. CPU",IDC_CPU25,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,41,41,10
|
||||
CONTROL "26. CPU",IDC_CPU26,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,54,41,10
|
||||
CONTROL "27. CPU",IDC_CPU27,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,67,41,10
|
||||
CONTROL "28. CPU",IDC_CPU28,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,80,41,10
|
||||
CONTROL "29. CPU",IDC_CPU29,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,93,41,10
|
||||
CONTROL "30. CPU",IDC_CPU30,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,106,41,10
|
||||
CONTROL "31. CPU",IDC_CPU31,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,175,119,41,10
|
||||
END
|
||||
|
||||
IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dikeçleri Seç"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Tamam",IDOK,84,178,50,14
|
||||
PUSHBUTTON "Vazgeç",IDCANCEL,138,178,50,14
|
||||
LTEXT "Bu ayar, ""İşlemci"" sekmesindeki dikeçlerin hangisinin görüntülenip görüntülenmeyeceğini belirler.",
|
||||
IDC_STATIC,7,7,181,17
|
||||
CONTROL "Yansıma Adı",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX |
|
||||
WS_DISABLED | WS_TABSTOP,7,28,56,10
|
||||
CONTROL "PID (İşlem Tanımlayıcı)",IDC_PID,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,39,88,10
|
||||
CONTROL "CPU Kullanımı",IDC_CPUUSAGE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,50,53,10
|
||||
CONTROL "CPU Çalışma Süresi",IDC_CPUTIME,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,61,48,10
|
||||
CONTROL "Bellek Kullanımı",IDC_MEMORYUSAGE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,72,63,10
|
||||
CONTROL "Bellek Kullanım Aralığı",IDC_MEMORYUSAGEDELTA,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,83,82,10
|
||||
CONTROL "En Yüksek Bellek Kullanımı",IDC_PEAKMEMORYUSAGE,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,94,82,10
|
||||
CONTROL "Sayfa Hatâları",IDC_PAGEFAULTS,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,105,53,10
|
||||
CONTROL "Kullanıcı Nesneleri",IDC_USEROBJECTS,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,116,62,10
|
||||
CONTROL "G/Ç Okuma",IDC_IOREADS,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,127,49,10
|
||||
CONTROL "G/Ç Okuma Sekizlikleri",IDC_IOREADBYTES,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10
|
||||
CONTROL "Oturum Kimliği",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,149,50,10
|
||||
CONTROL "Kullanıcı Adı",IDC_USERNAME,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,7,160,51,10
|
||||
CONTROL "Sayfa Hatâları Aralığı",IDC_PAGEFAULTSDELTA,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,28,72,10
|
||||
CONTROL "Farazî Bellek Boyutu",IDC_VIRTUALMEMORYSIZE,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,39,77,10
|
||||
CONTROL "Sayfalanmış Havuz",IDC_PAGEDPOOL,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,50,53,10
|
||||
CONTROL "Sayfalanmamış Havuz",IDC_NONPAGEDPOOL,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,61,67,10
|
||||
CONTROL "Öncelik",IDC_BASEPRIORITY,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,72,55,10
|
||||
CONTROL "İşleçler",IDC_HANDLECOUNT,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,83,59,10
|
||||
CONTROL "İş Parçacıkları",IDC_THREADCOUNT,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,94,59,10
|
||||
CONTROL "GDI Nesneleri",IDC_GDIOBJECTS,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,105,55,10
|
||||
CONTROL "G/Ç Yazma",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,116,49,10
|
||||
CONTROL "G/Ç Yazma Sekizlikleri",IDC_IOWRITEBYTES,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,127,65,10
|
||||
CONTROL "G/Ç Diğer",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,107,138,46,10
|
||||
CONTROL "G/Ç Diğer Sekizlikler",IDC_IOOTHERBYTES,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,107,149,65,10
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""resource.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 252
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 203
|
||||
END
|
||||
|
||||
IDD_TASKMGR_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 3
|
||||
RIGHTMARGIN, 260
|
||||
TOPMARGIN, 3
|
||||
BOTTOMMARGIN, 231
|
||||
END
|
||||
|
||||
IDD_APPLICATION_PAGE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 240
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 203
|
||||
END
|
||||
|
||||
IDD_PROCESS_PAGE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 240
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 203
|
||||
END
|
||||
|
||||
IDD_PERFORMANCE_PAGE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 242
|
||||
VERTGUIDE, 12
|
||||
VERTGUIDE, 65
|
||||
VERTGUIDE, 110
|
||||
TOPMARGIN, 5
|
||||
BOTTOMMARGIN, 205
|
||||
END
|
||||
|
||||
IDD_AFFINITY_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 224
|
||||
VERTGUIDE, 11
|
||||
VERTGUIDE, 61
|
||||
VERTGUIDE, 116
|
||||
VERTGUIDE, 175
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 147
|
||||
HORZGUIDE, 28
|
||||
HORZGUIDE, 38
|
||||
HORZGUIDE, 51
|
||||
HORZGUIDE, 64
|
||||
HORZGUIDE, 77
|
||||
HORZGUIDE, 90
|
||||
HORZGUIDE, 103
|
||||
HORZGUIDE, 116
|
||||
HORZGUIDE, 129
|
||||
END
|
||||
|
||||
IDD_COLUMNS_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 188
|
||||
VERTGUIDE, 107
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 192
|
||||
HORZGUIDE, 28
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_APP_TITLE "Görev Yöneticisi"
|
||||
IDC_TASKMGR "Görev Yöneticisi"
|
||||
IDS_IDLE_PROCESS "Çalışmayan İşlemci Yüzdesi İşlemi"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_FILE_NEW "Yeni görev çalıştırır."
|
||||
ID_OPTIONS_ALWAYSONTOP "Görev Yöneticisi'ni diğer pencerelerin üstünde tutar."
|
||||
ID_OPTIONS_MINIMIZEONUSE "Geçiş yapılırken Görev Yöneticisi'ni simge durumuna küçültür."
|
||||
ID_OPTIONS_HIDEWHENMINIMIZED "Görev Yöneticisi simge durumuna küçültüldüğünde Görev Yöneticisi'ni gizler."
|
||||
ID_VIEW_REFRESH "Görev Yöneticisi'ndeki bilgileri yeniler."
|
||||
ID_VIEW_LARGE "Görevleri büyük simgelerle gösterir."
|
||||
ID_VIEW_SMALL "Görevleri küçük simgelerle gösterir."
|
||||
ID_VIEW_DETAILS "Görevleri küçük simgelerle, ayrıntılı olarak gösterir."
|
||||
ID_VIEW_UPDATESPEED_HIGH "Her yarım sâniyede bir Görev Yöneticisi'ndeki bilgileri yeniler."
|
||||
ID_VIEW_UPDATESPEED_NORMAL "Her iki sâniyede bir Görev Yöneticisi'ndeki bilgileri yeniler."
|
||||
ID_VIEW_UPDATESPEED_LOW "Her dört sâniyede bir Görev Yöneticisi'ndeki bilgileri yeniler."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_VIEW_UPDATESPEED_PAUSED "Görev Yöneticisi'ndeki bilgilerin kendiliğinden yenilenmesini durdurur. "
|
||||
ID_WINDOWS_TILEHORIZONTALLY "Masaüstündeki pencereleri yatay olarak sıralar."
|
||||
ID_WINDOWS_TILEVERTICALLY "Masaüstündeki pencereleri dikey olarak sıralar."
|
||||
ID_WINDOWS_MINIMIZE "Pencereleri simge durumuna küçültür."
|
||||
ID_WINDOWS_MAXIMIZE "Pencereleri her bir pencerenin ekranı kaplayacağı şekilde büyütür."
|
||||
ID_WINDOWS_CASCADE "Pencereleri masaüstünde çapraz olarak sıralar."
|
||||
ID_WINDOWS_BRINGTOFRONT "Pencereyi öne getirir ancak o pencereye geçiş yapmaz."
|
||||
ID_HELP_TOPICS "Görev Yöneticisi ile ilgili yardım konularını görüntüler."
|
||||
ID_HELP_ABOUT "Görev Yöneticisi ile ilgili bilgi görüntüler."
|
||||
ID_FILE_EXIT "Görev Yöneticisi'nden çıkar."
|
||||
ID_OPTIONS_SHOW16BITTASKS "Farazî DOS makinesi (ntvdm.exe) altında çalışan 16 ikillik uygulamaları da görüntüler."
|
||||
ID_VIEW_SELECTCOLUMNS """İşlemler"" sekmesinde hangi dikeçlerin görüntülenip görüntülenmeyeceğini belirler."
|
||||
ID_VIEW_SHOWKERNELTIMES "İşlemci çizgelerinde çekirdek zamanlarını gösterir."
|
||||
ID_VIEW_CPUHISTORY_ONEGRAPHALL "Toplam CPU kullanımını tek çizgede gösterir."
|
||||
ID_VIEW_CPUHISTORY_ONEGRAPHPERCPU "Her CPU'nun kullanımını ayrı çizgelerde gösterir."
|
||||
ID_APPLICATION_PAGE_SWITCHTO "Seçilen görevi öne getirip o göreve odaklatır."
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
ID_ENDTASK "Seçili görevi sonlandırmaya çalışır."
|
||||
ID_GOTOPROCESS "Seçili görevin işlemine gider."
|
||||
ID_RESTORE "Görev Yöneticisi'ni gizli olmaktan çıkarır."
|
||||
ID_PROCESS_PAGE_ENDPROCESS "Seçili işlemi sonlandırır."
|
||||
ID_PROCESS_PAGE_ENDPROCESSTREE "Seçili işlemi ve bu işlemin bağlı olduğu tüm işlemleri sonlandırır."
|
||||
ID_PROCESS_PAGE_DEBUG "Seçili işleme bir hatâ ayıklayıcı bağlar."
|
||||
ID_PROCESS_PAGE_SETAFFINITY "Seçili işlemin hangi CPU'larla yürütüleceğini ayarlar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_REALTIME "Seçili işlemin öncelik sırasını EŞ ZAMANLI yapar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_HIGH "Seçili işlemin öncelik sırasını YÜKSEK yapar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL "Seçili işlemin öncelik sırasını ORTA-YÜKSEK yapar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_NORMAL "Seçili işlemin öncelik sırasını ORTA yapar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Seçili işlemin öncelik sırasını ORTA-DÜŞÜK yapar."
|
||||
ID_PROCESS_PAGE_SETPRIORITY_LOW "Seçili işlemin öncelik sırasını DÜŞÜK yapar."
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_TAB_APPS "Görevler"
|
||||
IDS_TAB_PROCESSES "İşlemler"
|
||||
IDS_TAB_PERFORMANCE "Başarım"
|
||||
IDS_TAB_TASK "Görev"
|
||||
IDS_TAB_STATUS "Durum"
|
||||
IDS_TAB_IMAGENAME "Yansıma Adı"
|
||||
IDS_TAB_PID "PID"
|
||||
IDS_TAB_USERNAME "Kullanıcı Adı"
|
||||
IDS_TAB_SESSIONID "Oturum Kimliği"
|
||||
IDS_TAB_CPU "CPU Kullanımı"
|
||||
IDS_TAB_CPUTIME "CPU Çalışma Süresi"
|
||||
IDS_TAB_MEMUSAGE "Bellek Kullanımı"
|
||||
IDS_TAB_PEAKMEMUSAGE "En Yüksek Bellek Kullanımı"
|
||||
IDS_TAB_MEMDELTA "Bellek Kullanım Aralığı"
|
||||
IDS_TAB_PAGEFAULT "Sayfa Hatâları"
|
||||
IDS_TAB_PFDELTA "Sayfa Hatâları Aralığı"
|
||||
IDS_TAB_VMSIZE "Farazî Bellek Boyutu"
|
||||
IDS_TAB_PAGEDPOOL "Sayfalanmış Havuz"
|
||||
IDS_TAB_NPPOOL "Sayfalanmamış Havuz"
|
||||
IDS_TAB_BASEPRI "Öncelik"
|
||||
IDS_TAB_HANDLES "İşleçler"
|
||||
IDS_TAB_THREADS "İş Parçacıkları"
|
||||
IDS_TAB_USERPBJECTS "Kullanıcı Nesneleri"
|
||||
IDS_TAB_GDIOBJECTS "GDI Nesneleri"
|
||||
IDS_TAB_IOREADS "G/Ç Okuma"
|
||||
IDS_TAB_IOWRITES "G/Ç Yazma"
|
||||
IDS_TAB_IOOTHER "G/Ç Diğer"
|
||||
IDS_TAB_IOREADBYTES "G/Ç Okuma Sekizlikleri"
|
||||
IDS_TAB_IOWRITESBYTES "G/Ç Yazma Sekizlikleri"
|
||||
IDS_TAB_IOOTHERBYTES "G/Ç Diğer Sekizlikler"
|
||||
IDS_MENU_SELECTCOLUMNS "&Dikeçleri Seç..."
|
||||
IDS_MENU_16BITTASK "&16 İkillik Görevleri Göster"
|
||||
IDS_MENU_WINDOWS "&Pencereler"
|
||||
IDS_MENU_LARGEICONS "&Büyük Simgeler"
|
||||
IDS_MENU_SMALLICONS "&Küçük Simgeler"
|
||||
IDS_MENU_DETAILS "&Ayrıntılar"
|
||||
IDS_MENU_ONEGRAPHALLCPUS "&Tüm CPU'lar İçin Aynı Çizge"
|
||||
IDS_MENU_ONEGRAPHPERCPU "&Her CPU'ya Birer Çizge"
|
||||
IDS_MENU_CPUHISTORY "&CPU Geçmişi"
|
||||
IDS_MENU_SHOWKERNELTIMES "&Çekirdek Zamanlarını Göster"
|
||||
IDS_CREATENEWTASK "Yeni Görev Oluşturma"
|
||||
IDS_CREATENEWTASK_DESC "Çalıştırılacak görevin konumunu yazınız:"
|
||||
IDS_MSG_ACCESSPROCESSAFF "CPU'larla ilişkisi erişilemez veya ayarlanamaz."
|
||||
IDS_MSG_PROCESSONEPRO "Herhangi bir işlem, en az bir CPU ile ilişkili olmalıdır."
|
||||
IDS_MSG_INVALIDOPTION "Geçersiz seçenek."
|
||||
IDS_MSG_UNABLEDEBUGPROCESS "Hatâ ayıklama işlemi yapılamaz."
|
||||
IDS_MSG_WARNINGDEBUG "UYARI: Bu işlemde hatâ ayıklama, veri yitimine neden olabilir.\nBu işleme bir hatâ ayıklayıcı bağlamaya emin misiniz?"
|
||||
IDS_MSG_TASKMGRWARNING "Uyarı"
|
||||
IDS_MSG_WARNINGTERMINATING "UYARI: Bir işlemin sonlandırılması, dizge\nkararsızlığı veya veri yitimi gibi istenmeyen durumlara neden olabilir. Bu\nişlemi sonlandırmaya emin misiniz?"
|
||||
IDS_MSG_UNABLETERMINATEPRO "İşlem sonlandırma yapılamaz."
|
||||
IDS_MSG_UNABLECHANGEPRIORITY "İşlemci önceliği değiştirilemez."
|
||||
IDS_MSG_WARNINGCHANGEPRIORITY "UYARI: İşlemci önceliğinin değiştirilmesi, dizge\nkararsızlığı gibi istenmeyen durumlara neden olabilir. Bu işlemin\nişlemci önceliğini değiştirmeye emin misiniz?"
|
||||
IDS_MSG_TRAYICONCPUUSAGE "CPU Kullanımı: %%%d"
|
||||
IDS_STATUS_MEMUSAGE "Bellek Kullanımı: %d KB / %d KB"
|
||||
IDS_STATUS_CPUUSAGE "CPU Kullanımı: %%%3d"
|
||||
IDS_STATUS_PROCESSES "İşlem Sayısı: %d"
|
||||
IDS_Not_Responding "Yanıt Vermiyor"
|
||||
IDS_Running "Çalışıyor"
|
||||
END
|
||||
@@ -67,6 +67,9 @@
|
||||
#ifdef LANGUAGE_SV_SE
|
||||
#include "lang/sv-SE.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_TR_TR
|
||||
#include "lang/tr-TR.rc"
|
||||
#endif
|
||||
#ifdef LANGUAGE_UK_UA
|
||||
#include "lang/uk-UA.rc"
|
||||
#endif
|
||||
|
||||
+234
-193
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* PROJECT: ReactOS SvcHost
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: /base/services/svchost/svchost.c
|
||||
* PURPOSE: Provide dll service loader
|
||||
* PROGRAMMERS: Gregor Brunmar ([email protected])
|
||||
* PROJECT: ReactOS SvcHost
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: /base/services/svchost/svchost.c
|
||||
* PURPOSE: Provide dll service loader
|
||||
* PROGRAMMERS: Gregor Brunmar ([email protected])
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
@@ -15,248 +15,289 @@
|
||||
|
||||
/* DEFINES *******************************************************************/
|
||||
|
||||
static LPCTSTR SVCHOST_REG_KEY = _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SvcHost");
|
||||
static LPCTSTR SERVICE_KEY = _T("SYSTEM\\CurrentControlSet\\Services\\");
|
||||
static LPCTSTR PARAMETERS_KEY = _T("\\Parameters");
|
||||
static PCWSTR SVCHOST_REG_KEY = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SvcHost";
|
||||
static PCWSTR SERVICE_KEY = L"SYSTEM\\CurrentControlSet\\Services\\";
|
||||
static PCWSTR PARAMETERS_KEY = L"\\Parameters";
|
||||
|
||||
#define SERVICE_KEY_LENGTH _tcslen(SERVICE_KEY);
|
||||
#define REG_MAX_DATA_SIZE 2048
|
||||
#define REG_MAX_DATA_SIZE 2048
|
||||
|
||||
static PSERVICE FirstService = NULL;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
BOOL PrepareService(LPCTSTR ServiceName)
|
||||
BOOL PrepareService(PCWSTR ServiceName)
|
||||
{
|
||||
HKEY hServiceKey;
|
||||
TCHAR ServiceKeyBuffer[MAX_PATH + 1];
|
||||
DWORD LeftOfBuffer = sizeof(ServiceKeyBuffer) / sizeof(ServiceKeyBuffer[0]);
|
||||
DWORD KeyType;
|
||||
PTSTR Buffer = NULL;
|
||||
DWORD BufferSize = MAX_PATH + 1;
|
||||
LONG RetVal;
|
||||
HINSTANCE hServiceDll;
|
||||
TCHAR DllPath[MAX_PATH + 2]; /* See MSDN on ExpandEnvironmentStrings() for ANSI strings for more details on + 2 */
|
||||
LPSERVICE_MAIN_FUNCTION ServiceMainFunc;
|
||||
PSERVICE Service;
|
||||
HKEY hServiceKey;
|
||||
WCHAR ServiceKeyBuffer[512];
|
||||
HRESULT Result;
|
||||
DWORD ValueType;
|
||||
PWSTR Buffer;
|
||||
DWORD BufferSize;
|
||||
LONG RetVal;
|
||||
HINSTANCE hServiceDll;
|
||||
PWSTR DllPath;
|
||||
DWORD DllPathSize;
|
||||
LPSERVICE_MAIN_FUNCTION ServiceMainFunc;
|
||||
PSERVICE Service;
|
||||
DWORD ServiceNameSize;
|
||||
|
||||
/* Compose the registry path to the service's "Parameter" key */
|
||||
_tcsncpy(ServiceKeyBuffer, SERVICE_KEY, LeftOfBuffer);
|
||||
LeftOfBuffer -= _tcslen(SERVICE_KEY);
|
||||
_tcsncat(ServiceKeyBuffer, ServiceName, LeftOfBuffer);
|
||||
LeftOfBuffer -= _tcslen(ServiceName);
|
||||
_tcsncat(ServiceKeyBuffer, PARAMETERS_KEY, LeftOfBuffer);
|
||||
LeftOfBuffer -= _tcslen(PARAMETERS_KEY);
|
||||
/* Compose the registry path to the service's "Parameter" key */
|
||||
Result = StringCbCopy(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), SERVICE_KEY);
|
||||
if (FAILED(Result))
|
||||
{
|
||||
DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
Result = StringCbCat(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), ServiceName);
|
||||
if (FAILED(Result))
|
||||
{
|
||||
DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
Result = StringCbCat(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), PARAMETERS_KEY);
|
||||
if (FAILED(Result))
|
||||
{
|
||||
DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (LeftOfBuffer < 0)
|
||||
{
|
||||
DPRINT1("Buffer overflow for service name: '%s'\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
/* Open the service registry key to find the dll name */
|
||||
RetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, ServiceKeyBuffer, 0, KEY_READ, &hServiceKey);
|
||||
if (RetVal != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("Could not open service key (%ls)\n", ServiceKeyBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Open the service registry key to find the dll name */
|
||||
if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, ServiceKeyBuffer, 0, KEY_READ, &hServiceKey))
|
||||
{
|
||||
DPRINT1("Could not open service key (%s)\n", ServiceKeyBuffer);
|
||||
return FALSE;
|
||||
}
|
||||
BufferSize = 0;
|
||||
RetVal = RegQueryValueEx(hServiceKey, L"ServiceDll", NULL, &ValueType, NULL, &BufferSize);
|
||||
if (RetVal != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hServiceKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (Buffer)
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize);
|
||||
if (Buffer == NULL)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %ls\n", ServiceName);
|
||||
RegCloseKey(hServiceKey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize);
|
||||
if (NULL == Buffer)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %s\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
RetVal = RegQueryValueEx(hServiceKey, L"ServiceDll", NULL, &ValueType, (LPBYTE)Buffer, &BufferSize);
|
||||
if (RetVal != ERROR_SUCCESS || BufferSize == 0)
|
||||
{
|
||||
DPRINT1("Could not read 'ServiceDll' value from service: %ls, ErrorCode: 0x%lx\n", ServiceName, RetVal);
|
||||
RegCloseKey(hServiceKey);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
RegCloseKey(hServiceKey);
|
||||
|
||||
RetVal = RegQueryValueEx(hServiceKey, _T("ServiceDll"), NULL, &KeyType, (LPBYTE)Buffer, &BufferSize);
|
||||
if (ValueType == REG_EXPAND_SZ)
|
||||
{
|
||||
/* Convert possible %SystemRoot% to a real path */
|
||||
DllPathSize = ExpandEnvironmentStrings(Buffer, NULL, 0);
|
||||
if (DllPathSize == 0)
|
||||
{
|
||||
DPRINT1("Invalid ServiceDll path: %ls, ErrorCode: %lu\n", Buffer, GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
DllPath = HeapAlloc(GetProcessHeap(), 0, DllPathSize * sizeof(WCHAR));
|
||||
if (DllPath == NULL)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %ls\n", ServiceName);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
if (ExpandEnvironmentStrings(Buffer, DllPath, DllPathSize) != DllPathSize)
|
||||
{
|
||||
DPRINT1("Invalid ServiceDll path: %ls, ErrorCode: %lu\n", Buffer, GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, DllPath);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
} while (ERROR_MORE_DATA == RetVal);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
}
|
||||
else if (ValueType == REG_SZ)
|
||||
{
|
||||
DllPath = Buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Invalid ServiceDll value type %lu for service: %ls, ErrorCode: %lu\n", ValueType, ServiceName, GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Load the service dll */
|
||||
DPRINT("Trying to load dll\n");
|
||||
hServiceDll = LoadLibrary(DllPath);
|
||||
if (hServiceDll == NULL)
|
||||
{
|
||||
DPRINT1("Unable to load ServiceDll: %ls, ErrorCode: %lu\n", DllPath, GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, DllPath);
|
||||
return FALSE;
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, DllPath);
|
||||
|
||||
RegCloseKey(hServiceKey);
|
||||
ServiceMainFunc = (LPSERVICE_MAIN_FUNCTION)GetProcAddress(hServiceDll, "ServiceMain");
|
||||
|
||||
if (ERROR_SUCCESS != RetVal || 0 == BufferSize)
|
||||
{
|
||||
DPRINT1("Could not read 'ServiceDll' value from service: %s, ErrorCode: 0x%x\n", ServiceName, RetVal);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
/* Allocate a service node in the linked list */
|
||||
Service = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SERVICE));
|
||||
if (Service == NULL)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %ls\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Convert possible %SystemRoot% to a real path */
|
||||
BufferSize = ExpandEnvironmentStrings(Buffer, DllPath, _countof(DllPath));
|
||||
if (0 == BufferSize)
|
||||
{
|
||||
DPRINT1("Invalid ServiceDll path: %s\n", Buffer);
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
ServiceNameSize = (wcslen(ServiceName) + 1) * sizeof(WCHAR);
|
||||
Service->Name = HeapAlloc(GetProcessHeap(), 0, ServiceNameSize);
|
||||
if (Service->Name == NULL)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %ls\n", ServiceName);
|
||||
HeapFree(GetProcessHeap(), 0, Service);
|
||||
return FALSE;
|
||||
}
|
||||
Result = StringCbCopy(Service->Name, ServiceNameSize, ServiceName);
|
||||
ASSERT(SUCCEEDED(Result));
|
||||
(VOID)Result;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, Buffer);
|
||||
Service->hServiceDll = hServiceDll;
|
||||
Service->ServiceMainFunc = ServiceMainFunc;
|
||||
|
||||
/* Load the service dll */
|
||||
DPRINT("Trying to load dll\n");
|
||||
hServiceDll = LoadLibrary(DllPath);
|
||||
Service->Next = FirstService;
|
||||
FirstService = Service;
|
||||
|
||||
if (NULL == hServiceDll)
|
||||
{
|
||||
DPRINT1("Unable to load ServiceDll: %s, ErrorCode: %u\n", DllPath, GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ServiceMainFunc = (LPSERVICE_MAIN_FUNCTION)GetProcAddress(hServiceDll, "ServiceMain");
|
||||
|
||||
/* Allocate a service node in the linked list */
|
||||
Service = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE));
|
||||
if (NULL == Service)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %s\n", ServiceName);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
memset(Service, 0, sizeof(SERVICE));
|
||||
Service->Name = HeapAlloc(GetProcessHeap(), 0, (_tcslen(ServiceName)+1) * sizeof(TCHAR));
|
||||
if (NULL == Service->Name)
|
||||
{
|
||||
DPRINT1("Not enough memory for service: %s\n", ServiceName);
|
||||
HeapFree(GetProcessHeap(), 0, Service);
|
||||
return FALSE;
|
||||
}
|
||||
_tcscpy(Service->Name, ServiceName);
|
||||
|
||||
Service->hServiceDll = hServiceDll;
|
||||
Service->ServiceMainFunc = ServiceMainFunc;
|
||||
|
||||
Service->Next = FirstService;
|
||||
FirstService = Service;
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID FreeServices(VOID)
|
||||
{
|
||||
while (FirstService)
|
||||
{
|
||||
PSERVICE Service = FirstService;
|
||||
FirstService = Service->Next;
|
||||
while (FirstService)
|
||||
{
|
||||
PSERVICE Service = FirstService;
|
||||
FirstService = Service->Next;
|
||||
|
||||
FreeLibrary(Service->hServiceDll);
|
||||
FreeLibrary(Service->hServiceDll);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, Service->Name);
|
||||
HeapFree(GetProcessHeap(), 0, Service);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, Service->Name);
|
||||
HeapFree(GetProcessHeap(), 0, Service);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the number of services successfully loaded from the category
|
||||
*/
|
||||
DWORD LoadServiceCategory(LPCTSTR ServiceCategory)
|
||||
DWORD LoadServiceCategory(PCWSTR ServiceCategory)
|
||||
{
|
||||
HKEY hServicesKey;
|
||||
DWORD KeyType;
|
||||
DWORD BufferSize = REG_MAX_DATA_SIZE;
|
||||
TCHAR Buffer[REG_MAX_DATA_SIZE];
|
||||
LPCTSTR ServiceName;
|
||||
DWORD BufferIndex = 0;
|
||||
DWORD NrOfServices = 0;
|
||||
HKEY hServicesKey;
|
||||
DWORD ValueType;
|
||||
WCHAR Buffer[REG_MAX_DATA_SIZE];
|
||||
DWORD BufferSize = sizeof(Buffer);
|
||||
PCWSTR ServiceName;
|
||||
DWORD BufferIndex = 0;
|
||||
DWORD NrOfServices = 0;
|
||||
LONG RetVal;
|
||||
|
||||
/* Get all the services in this category */
|
||||
if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, SVCHOST_REG_KEY, 0, KEY_READ, &hServicesKey))
|
||||
{
|
||||
DPRINT1("Could not open service category: %s\n", ServiceCategory);
|
||||
return 0;
|
||||
}
|
||||
/* Get all the services in this category */
|
||||
RetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, SVCHOST_REG_KEY, 0, KEY_READ, &hServicesKey);
|
||||
if (RetVal != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("Could not open service category: %ls\n", ServiceCategory);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ERROR_SUCCESS != RegQueryValueEx(hServicesKey, ServiceCategory, NULL, &KeyType, (LPBYTE)Buffer, &BufferSize))
|
||||
{
|
||||
DPRINT1("Could not open service category (2): %s\n", ServiceCategory);
|
||||
RegCloseKey(hServicesKey);
|
||||
return 0;
|
||||
}
|
||||
RetVal = RegQueryValueEx(hServicesKey, ServiceCategory, NULL, &ValueType, (LPBYTE)Buffer, &BufferSize);
|
||||
if (RetVal != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("Could not open service category (2): %ls\n", ServiceCategory);
|
||||
RegCloseKey(hServicesKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Clean up */
|
||||
RegCloseKey(hServicesKey);
|
||||
/* Clean up */
|
||||
RegCloseKey(hServicesKey);
|
||||
|
||||
/* Load services in the category */
|
||||
ServiceName = Buffer;
|
||||
while (_T('\0') != ServiceName[0])
|
||||
{
|
||||
size_t Length;
|
||||
|
||||
Length = _tcslen(ServiceName);
|
||||
if (0 == Length)
|
||||
break;
|
||||
/* Load services in the category */
|
||||
ServiceName = Buffer;
|
||||
while (ServiceName[0] != UNICODE_NULL)
|
||||
{
|
||||
size_t Length;
|
||||
|
||||
if (TRUE == PrepareService(ServiceName))
|
||||
++NrOfServices;
|
||||
Length = wcslen(ServiceName);
|
||||
if (Length == 0)
|
||||
break;
|
||||
|
||||
BufferIndex += Length + 1;
|
||||
if (PrepareService(ServiceName))
|
||||
++NrOfServices;
|
||||
|
||||
ServiceName = &Buffer[BufferIndex];
|
||||
}
|
||||
BufferIndex += Length + 1;
|
||||
|
||||
return NrOfServices;
|
||||
ServiceName = &Buffer[BufferIndex];
|
||||
}
|
||||
|
||||
return NrOfServices;
|
||||
}
|
||||
|
||||
int _tmain (int argc, LPTSTR argv [])
|
||||
int wmain(int argc, wchar_t **argv)
|
||||
{
|
||||
DWORD NrOfServices;
|
||||
LPSERVICE_TABLE_ENTRY ServiceTable;
|
||||
DWORD NrOfServices;
|
||||
LPSERVICE_TABLE_ENTRY ServiceTable;
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
/* MS svchost.exe doesn't seem to print help, should we? */
|
||||
return 0;
|
||||
}
|
||||
if (argc < 3)
|
||||
{
|
||||
/* MS svchost.exe doesn't seem to print help, should we? */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_tcscmp(argv[1], _T("-k")) != 0)
|
||||
{
|
||||
/* For now, we only handle "-k" */
|
||||
return 0;
|
||||
}
|
||||
if (wcscmp(argv[1], L"-k"))
|
||||
{
|
||||
/* For now, we only handle "-k" */
|
||||
return 0;
|
||||
}
|
||||
|
||||
NrOfServices = LoadServiceCategory(argv[2]);
|
||||
NrOfServices = LoadServiceCategory(argv[2]);
|
||||
|
||||
DPRINT("NrOfServices: %lu\n", NrOfServices);
|
||||
if (0 == NrOfServices)
|
||||
return 0;
|
||||
DPRINT("NrOfServices: %lu\n", NrOfServices);
|
||||
if (NrOfServices == 0)
|
||||
return 0;
|
||||
|
||||
ServiceTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1));
|
||||
ServiceTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1));
|
||||
if (ServiceTable != NULL)
|
||||
{
|
||||
DWORD i;
|
||||
PSERVICE Service = FirstService;
|
||||
|
||||
if (NULL != ServiceTable)
|
||||
{
|
||||
DWORD i;
|
||||
PSERVICE Service = FirstService;
|
||||
/* Fill the service table */
|
||||
for (i = 0; i < NrOfServices; i++)
|
||||
{
|
||||
DPRINT("Loading service: %ls\n", Service->Name);
|
||||
ServiceTable[i].lpServiceName = Service->Name;
|
||||
ServiceTable[i].lpServiceProc = Service->ServiceMainFunc;
|
||||
Service = Service->Next;
|
||||
}
|
||||
ASSERT(Service == NULL);
|
||||
|
||||
/* Fill the service table */
|
||||
for (i = 0; i < NrOfServices; i++)
|
||||
{
|
||||
DPRINT("Loading service: %s\n", Service->Name);
|
||||
ServiceTable[i].lpServiceName = Service->Name;
|
||||
ServiceTable[i].lpServiceProc = Service->ServiceMainFunc;
|
||||
Service = Service->Next;
|
||||
}
|
||||
/* Set a NULL entry to end the service table */
|
||||
ServiceTable[i].lpServiceName = NULL;
|
||||
ServiceTable[i].lpServiceProc = NULL;
|
||||
|
||||
/* Set a NULL entry to end the service table */
|
||||
ServiceTable[i].lpServiceName = NULL;
|
||||
ServiceTable[i].lpServiceProc = NULL;
|
||||
if (!StartServiceCtrlDispatcher(ServiceTable))
|
||||
DPRINT1("Failed to start service control dispatcher, ErrorCode: %lu\n", GetLastError());
|
||||
|
||||
if (FALSE == StartServiceCtrlDispatcher(ServiceTable))
|
||||
DPRINT1("Failed to start service control dispatcher, ErrorCode: %lu\n", GetLastError());
|
||||
HeapFree(GetProcessHeap(), 0, ServiceTable);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Not enough memory for the service table, trying to allocate %u bytes\n", sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1));
|
||||
}
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, ServiceTable);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("Not enough memory for the service table, trying to allocate %u bytes\n", sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1));
|
||||
}
|
||||
|
||||
DPRINT("Freeing services...\n");
|
||||
FreeServices();
|
||||
DPRINT("Freeing services...\n");
|
||||
FreeServices();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,39 +1,32 @@
|
||||
/*
|
||||
* PROJECT: ReactOS SvcHost
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: /base/services/svchost/svchost.h
|
||||
* PURPOSE: Provide dll service loader
|
||||
* PROGRAMMERS: Gregor Brunmar ([email protected])
|
||||
* PROJECT: ReactOS SvcHost
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: /base/services/svchost/svchost.h
|
||||
* PURPOSE: Provide dll service loader
|
||||
* PROGRAMMERS: Gregor Brunmar ([email protected])
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#if 0
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winreg.h>
|
||||
#include <winsvc.h>
|
||||
#include <tchar.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
/* DEFINES *******************************************************************/
|
||||
|
||||
#define CS_TIMEOUT 1000
|
||||
|
||||
typedef struct _SERVICE {
|
||||
PTSTR Name;
|
||||
HINSTANCE hServiceDll;
|
||||
LPSERVICE_MAIN_FUNCTION ServiceMainFunc;
|
||||
struct _SERVICE *Next;
|
||||
PWSTR Name;
|
||||
HINSTANCE hServiceDll;
|
||||
LPSERVICE_MAIN_FUNCTION ServiceMainFunc;
|
||||
struct _SERVICE *Next;
|
||||
} SERVICE, *PSERVICE;
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
|
||||
add_subdirectory(cmd)
|
||||
if(NOT MSVC)
|
||||
add_subdirectory(explorer)
|
||||
endif()
|
||||
add_subdirectory(explorer-new)
|
||||
|
||||
|
||||
+133
-133
@@ -25,10 +25,10 @@
|
||||
* 24-Jan-1998 Eric Kohl
|
||||
* Redirection safe!
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*
|
||||
* 02-Feb-2008 (Christoph von Wittich) <[email protected]>)
|
||||
* 02-Feb-2008 (Christoph von Wittich <[email protected]>)
|
||||
* rewrote alias handling for doskey compat
|
||||
*/
|
||||
|
||||
@@ -42,168 +42,168 @@
|
||||
static VOID
|
||||
partstrlwr (LPTSTR str)
|
||||
{
|
||||
LPTSTR c = str;
|
||||
while (*c && !_istspace (*c) && *c != _T('='))
|
||||
{
|
||||
*c = _totlower (*c);
|
||||
c++;
|
||||
}
|
||||
LPTSTR c = str;
|
||||
while (*c && !_istspace (*c) && *c != _T('='))
|
||||
{
|
||||
*c = _totlower (*c);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
static VOID
|
||||
PrintAlias (VOID)
|
||||
{
|
||||
LPTSTR Aliases;
|
||||
LPTSTR ptr;
|
||||
DWORD len;
|
||||
LPTSTR Aliases;
|
||||
LPTSTR ptr;
|
||||
DWORD len;
|
||||
|
||||
len = GetConsoleAliasesLength(_T("cmd.exe"));
|
||||
if (len <= 0)
|
||||
return;
|
||||
len = GetConsoleAliasesLength(_T("cmd.exe"));
|
||||
if (len <= 0)
|
||||
return;
|
||||
|
||||
/* allocate memory for an extra \0 char to make parsing easier */
|
||||
ptr = cmd_alloc(len + sizeof(TCHAR));
|
||||
if (!ptr)
|
||||
return;
|
||||
/* allocate memory for an extra \0 char to make parsing easier */
|
||||
ptr = cmd_alloc(len + sizeof(TCHAR));
|
||||
if (!ptr)
|
||||
return;
|
||||
|
||||
Aliases = ptr;
|
||||
Aliases = ptr;
|
||||
|
||||
ZeroMemory(Aliases, len + sizeof(TCHAR));
|
||||
ZeroMemory(Aliases, len + sizeof(TCHAR));
|
||||
|
||||
if (GetConsoleAliases(Aliases, len, _T("cmd.exe")) != 0)
|
||||
{
|
||||
while (*Aliases != '\0')
|
||||
{
|
||||
ConOutPrintf(_T("%s\n"), Aliases);
|
||||
Aliases = Aliases + lstrlen(Aliases);
|
||||
Aliases++;
|
||||
}
|
||||
}
|
||||
cmd_free(ptr);
|
||||
if (GetConsoleAliases(Aliases, len, _T("cmd.exe")) != 0)
|
||||
{
|
||||
while (*Aliases != '\0')
|
||||
{
|
||||
ConOutPrintf(_T("%s\n"), Aliases);
|
||||
Aliases = Aliases + lstrlen(Aliases);
|
||||
Aliases++;
|
||||
}
|
||||
}
|
||||
cmd_free(ptr);
|
||||
}
|
||||
|
||||
/* specified routines */
|
||||
VOID ExpandAlias (LPTSTR cmd, INT maxlen)
|
||||
{
|
||||
LPTSTR buffer;
|
||||
TCHAR *position, *in, *out;
|
||||
LPTSTR Token;
|
||||
LPTSTR tmp;
|
||||
LPTSTR buffer;
|
||||
TCHAR *position, *in, *out;
|
||||
LPTSTR Token;
|
||||
LPTSTR tmp;
|
||||
|
||||
tmp = cmd_dup(cmd);
|
||||
if (!tmp)
|
||||
return;
|
||||
tmp = cmd_dup(cmd);
|
||||
if (!tmp)
|
||||
return;
|
||||
|
||||
/* first part is the macro name */
|
||||
position = tmp + _tcscspn(tmp, _T(" \n"));
|
||||
if (position == tmp)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
return;
|
||||
}
|
||||
*position++ = _T('\0');
|
||||
position += _tcsspn(position, _T(" "));
|
||||
/* first part is the macro name */
|
||||
position = tmp + _tcscspn(tmp, _T(" \n"));
|
||||
if (position == tmp)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
return;
|
||||
}
|
||||
*position++ = _T('\0');
|
||||
position += _tcsspn(position, _T(" "));
|
||||
|
||||
buffer = cmd_alloc(maxlen);
|
||||
if (!buffer)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetConsoleAlias(tmp, buffer, maxlen, _T("cmd.exe")) == 0)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
cmd_free(buffer);
|
||||
return;
|
||||
}
|
||||
buffer = cmd_alloc(maxlen);
|
||||
if (!buffer)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
return;
|
||||
}
|
||||
|
||||
in = buffer;
|
||||
out = cmd;
|
||||
while (*in)
|
||||
{
|
||||
if (*in == _T('$'))
|
||||
{
|
||||
Token = position;
|
||||
if (in[1] >= _T('1') && in[1] <= _T('9'))
|
||||
{
|
||||
/* Copy a single space-delimited token from the input line */
|
||||
INT num;
|
||||
for (num = in[1] - _T('1'); num > 0; num--)
|
||||
{
|
||||
Token += _tcscspn(Token, _T(" \n"));
|
||||
Token += _tcsspn(Token, _T(" "));
|
||||
}
|
||||
while (!_tcschr(_T(" \n"), *Token))
|
||||
{
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *Token++;
|
||||
}
|
||||
in += 2;
|
||||
continue;
|
||||
}
|
||||
else if (in[1] == _T('*'))
|
||||
{
|
||||
/* Copy the entire remainder of the line */
|
||||
while (*Token && *Token != _T('\n'))
|
||||
{
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *Token++;
|
||||
}
|
||||
in += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *in++;
|
||||
}
|
||||
*out++ = _T('\n');
|
||||
*out = _T('\0');
|
||||
if (GetConsoleAlias(tmp, buffer, maxlen, _T("cmd.exe")) == 0)
|
||||
{
|
||||
cmd_free(tmp);
|
||||
cmd_free(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
cmd_free(buffer);
|
||||
cmd_free(tmp);
|
||||
in = buffer;
|
||||
out = cmd;
|
||||
while (*in)
|
||||
{
|
||||
if (*in == _T('$'))
|
||||
{
|
||||
Token = position;
|
||||
if (in[1] >= _T('1') && in[1] <= _T('9'))
|
||||
{
|
||||
/* Copy a single space-delimited token from the input line */
|
||||
INT num;
|
||||
for (num = in[1] - _T('1'); num > 0; num--)
|
||||
{
|
||||
Token += _tcscspn(Token, _T(" \n"));
|
||||
Token += _tcsspn(Token, _T(" "));
|
||||
}
|
||||
while (!_tcschr(_T(" \n"), *Token))
|
||||
{
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *Token++;
|
||||
}
|
||||
in += 2;
|
||||
continue;
|
||||
}
|
||||
else if (in[1] == _T('*'))
|
||||
{
|
||||
/* Copy the entire remainder of the line */
|
||||
while (*Token && *Token != _T('\n'))
|
||||
{
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *Token++;
|
||||
}
|
||||
in += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (out >= &cmd[maxlen - 1])
|
||||
break;
|
||||
*out++ = *in++;
|
||||
}
|
||||
*out++ = _T('\n');
|
||||
*out = _T('\0');
|
||||
|
||||
cmd_free(buffer);
|
||||
cmd_free(tmp);
|
||||
}
|
||||
|
||||
INT CommandAlias (LPTSTR param)
|
||||
{
|
||||
LPTSTR ptr;
|
||||
LPTSTR ptr;
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ALIAS_HELP);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ALIAS_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
nErrorLevel = 0;
|
||||
|
||||
if (param[0] == _T('\0'))
|
||||
{
|
||||
PrintAlias ();
|
||||
return 0;
|
||||
}
|
||||
if (param[0] == _T('\0'))
|
||||
{
|
||||
PrintAlias ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
nErrorLevel = 0;
|
||||
|
||||
/* error if no '=' found */
|
||||
if ((ptr = _tcschr (param, _T('='))) == 0)
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
/* error if no '=' found */
|
||||
if ((ptr = _tcschr (param, _T('='))) == 0)
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Split rest into name and substitute */
|
||||
*ptr++ = _T('\0');
|
||||
/* Split rest into name and substitute */
|
||||
*ptr++ = _T('\0');
|
||||
|
||||
partstrlwr (param);
|
||||
partstrlwr (param);
|
||||
|
||||
if (ptr[0] == _T('\0'))
|
||||
AddConsoleAlias(param, NULL, _T("cmd.exe"));
|
||||
else
|
||||
AddConsoleAlias(param, ptr, _T("cmd.exe"));
|
||||
if (ptr[0] == _T('\0'))
|
||||
AddConsoleAlias(param, NULL, _T("cmd.exe"));
|
||||
else
|
||||
AddConsoleAlias(param, ptr, _T("cmd.exe"));
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+162
-163
@@ -24,236 +24,235 @@
|
||||
static INT
|
||||
PrintAssociation(LPTSTR extension)
|
||||
{
|
||||
DWORD return_val;
|
||||
HKEY hKey = NULL, hInsideKey = NULL;
|
||||
DWORD return_val;
|
||||
HKEY hKey = NULL, hInsideKey = NULL;
|
||||
|
||||
DWORD fileTypeLength = 0;
|
||||
LPTSTR fileType = NULL;
|
||||
DWORD fileTypeLength = 0;
|
||||
LPTSTR fileType = NULL;
|
||||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return_val = RegOpenKeyEx(hKey, extension, 0, KEY_READ, &hInsideKey);
|
||||
return_val = RegOpenKeyEx(hKey, extension, 0, KEY_READ, &hInsideKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
RegCloseKey(hInsideKey);
|
||||
return 0;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
RegCloseKey(hInsideKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* obtain string length */
|
||||
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, NULL, &fileTypeLength);
|
||||
/* obtain string length */
|
||||
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, NULL, &fileTypeLength);
|
||||
|
||||
if(return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
}
|
||||
if (return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
|
||||
fileType = cmd_alloc(fileTypeLength * sizeof(TCHAR));
|
||||
fileType = cmd_alloc(fileTypeLength * sizeof(TCHAR));
|
||||
|
||||
/* obtain actual file type */
|
||||
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, (LPBYTE) fileType, &fileTypeLength);
|
||||
/* obtain actual file type */
|
||||
return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, (LPBYTE) fileType, &fileTypeLength);
|
||||
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
RegCloseKey(hInsideKey);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
cmd_free(fileType);
|
||||
return -2;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
cmd_free(fileType);
|
||||
return -2;
|
||||
}
|
||||
|
||||
if(fileTypeLength != 0) /* if there is a default key, display relevant information */
|
||||
{
|
||||
ConOutPrintf(_T("%s=%s\r\n"), extension, fileType);
|
||||
}
|
||||
if (fileTypeLength != 0) /* if there is a default key, display relevant information */
|
||||
{
|
||||
ConOutPrintf(_T("%s=%s\n"), extension, fileType);
|
||||
}
|
||||
|
||||
if(fileTypeLength)
|
||||
cmd_free(fileType);
|
||||
if (fileTypeLength)
|
||||
cmd_free(fileType);
|
||||
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static INT
|
||||
PrintAllAssociations()
|
||||
{
|
||||
DWORD return_val = 0;
|
||||
HKEY hKey = NULL;
|
||||
DWORD numKeys = 0;
|
||||
DWORD return_val = 0;
|
||||
HKEY hKey = NULL;
|
||||
DWORD numKeys = 0;
|
||||
|
||||
DWORD extLength = 0;
|
||||
LPTSTR extName = NULL;
|
||||
DWORD keyCtr = 0;
|
||||
DWORD extLength = 0;
|
||||
LPTSTR extName = NULL;
|
||||
DWORD keyCtr = 0;
|
||||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_READ, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return_val = RegQueryInfoKey(hKey, NULL, NULL, NULL, &numKeys, &extLength, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
return_val = RegQueryInfoKey(hKey, NULL, NULL, NULL, &numKeys, &extLength, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
|
||||
extName = cmd_alloc(extLength * sizeof(TCHAR));
|
||||
extName = cmd_alloc(extLength * sizeof(TCHAR));
|
||||
|
||||
for(keyCtr = 0; keyCtr < numKeys; keyCtr++)
|
||||
{
|
||||
DWORD buffer_size = extLength;
|
||||
return_val = RegEnumKeyEx(hKey, keyCtr, extName, &buffer_size, NULL, NULL, NULL, NULL);
|
||||
for(keyCtr = 0; keyCtr < numKeys; keyCtr++)
|
||||
{
|
||||
DWORD buffer_size = extLength;
|
||||
return_val = RegEnumKeyEx(hKey, keyCtr, extName, &buffer_size, NULL, NULL, NULL, NULL);
|
||||
|
||||
if(return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
|
||||
{
|
||||
if(*extName == _T('.'))
|
||||
PrintAssociation(extName);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd_free(extName);
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
|
||||
{
|
||||
if (*extName == _T('.'))
|
||||
PrintAssociation(extName);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd_free(extName);
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
RegCloseKey(hKey);
|
||||
|
||||
if(extName)
|
||||
cmd_free(extName);
|
||||
if (extName)
|
||||
cmd_free(extName);
|
||||
|
||||
return numKeys;
|
||||
return numKeys;
|
||||
}
|
||||
|
||||
static INT
|
||||
AddAssociation(LPTSTR extension, LPTSTR type)
|
||||
{
|
||||
DWORD return_val;
|
||||
HKEY hKey = NULL, insideKey = NULL;
|
||||
DWORD return_val;
|
||||
HKEY hKey = NULL, insideKey = NULL;
|
||||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
|
||||
return_val = RegCreateKeyEx(hKey, extension, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &insideKey, NULL);
|
||||
return_val = RegCreateKeyEx(hKey, extension, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &insideKey, NULL);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return_val = RegSetValueEx(insideKey, NULL, 0, REG_SZ, (LPBYTE)type, (_tcslen(type) + 1) * sizeof(TCHAR));
|
||||
return_val = RegSetValueEx(insideKey, NULL, 0, REG_SZ, (LPBYTE)type, (_tcslen(type) + 1) * sizeof(TCHAR));
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(insideKey);
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(insideKey);
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
|
||||
RegCloseKey(insideKey);
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
RegCloseKey(insideKey);
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
RemoveAssociation(LPTSTR extension)
|
||||
{
|
||||
DWORD return_val;
|
||||
HKEY hKey;
|
||||
DWORD return_val;
|
||||
HKEY hKey;
|
||||
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0, KEY_ALL_ACCESS, &hKey);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
return -1;
|
||||
|
||||
return_val = RegDeleteKey(hKey, extension);
|
||||
return_val = RegDeleteKey(hKey, extension);
|
||||
|
||||
if(return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
if (return_val != ERROR_SUCCESS)
|
||||
{
|
||||
RegCloseKey(hKey);
|
||||
return -2;
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
RegCloseKey(hKey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
INT CommandAssoc (LPTSTR param)
|
||||
{
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ASSOC_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ASSOC_HELP);
|
||||
return 0;
|
||||
}
|
||||
nErrorLevel = 0;
|
||||
|
||||
nErrorLevel = 0;
|
||||
if (_tcslen(param) == 0)
|
||||
PrintAllAssociations();
|
||||
else
|
||||
{
|
||||
LPTSTR lpEqualSign = _tcschr(param, _T('='));
|
||||
if (lpEqualSign != NULL)
|
||||
{
|
||||
LPTSTR fileType = lpEqualSign + 1;
|
||||
LPTSTR extension = cmd_alloc((lpEqualSign - param + 1) * sizeof(TCHAR));
|
||||
|
||||
if(_tcslen(param) == 0)
|
||||
PrintAllAssociations();
|
||||
else
|
||||
{
|
||||
LPTSTR lpEqualSign = _tcschr(param, _T('='));
|
||||
if(lpEqualSign != NULL)
|
||||
{
|
||||
LPTSTR fileType = lpEqualSign + 1;
|
||||
LPTSTR extension = cmd_alloc((lpEqualSign - param + 1) * sizeof(TCHAR));
|
||||
_tcsncpy(extension, param, lpEqualSign - param);
|
||||
extension[lpEqualSign - param] = (TCHAR)0;
|
||||
|
||||
_tcsncpy(extension, param, lpEqualSign - param);
|
||||
extension[lpEqualSign - param] = (TCHAR)0;
|
||||
if (_tcslen(fileType) == 0)
|
||||
/* if the equal sign is the last character
|
||||
in the string, then delete the key */
|
||||
{
|
||||
RemoveAssociation(extension);
|
||||
}
|
||||
else
|
||||
/* otherwise, add the key and print out the association*/
|
||||
{
|
||||
AddAssociation( extension, fileType);
|
||||
PrintAssociation(extension);
|
||||
}
|
||||
|
||||
if(_tcslen(fileType) == 0)
|
||||
/* if the equal sign is the last character
|
||||
in the string, then delete the key */
|
||||
{
|
||||
RemoveAssociation(extension);
|
||||
}
|
||||
else
|
||||
/* otherwise, add the key and print out the association*/
|
||||
{
|
||||
AddAssociation( extension, fileType);
|
||||
PrintAssociation(extension);
|
||||
}
|
||||
cmd_free(extension);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no equal sign, print all associations */
|
||||
INT retval = PrintAssociation(param);
|
||||
|
||||
cmd_free(extension);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no equal sign, print all associations */
|
||||
INT retval = PrintAssociation(param);
|
||||
if (retval == 0) /* if nothing printed out */
|
||||
ConOutResPrintf(STRING_ASSOC_ERROR, param);
|
||||
}
|
||||
}
|
||||
|
||||
if(retval == 0) /* if nothing printed out */
|
||||
ConOutResPrintf(STRING_ASSOC_ERROR, param);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_ASSOC */
|
||||
|
||||
+245
-245
@@ -28,8 +28,8 @@
|
||||
* 23-Jan-1999 Eric Kohl
|
||||
* Added handling of multiple filenames.
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -39,306 +39,306 @@
|
||||
static VOID
|
||||
PrintAttribute (LPTSTR pszPath, LPTSTR pszFile, BOOL bRecurse)
|
||||
{
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind;
|
||||
TCHAR szFullName[MAX_PATH];
|
||||
LPTSTR pszFileName;
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind;
|
||||
TCHAR szFullName[MAX_PATH];
|
||||
LPTSTR pszFileName;
|
||||
|
||||
/* prepare full file name buffer */
|
||||
_tcscpy (szFullName, pszPath);
|
||||
pszFileName = szFullName + _tcslen (szFullName);
|
||||
/* prepare full file name buffer */
|
||||
_tcscpy (szFullName, pszPath);
|
||||
pszFileName = szFullName + _tcslen (szFullName);
|
||||
|
||||
/* display all subdirectories */
|
||||
if (bRecurse)
|
||||
{
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
/* display all subdirectories */
|
||||
if (bRecurse)
|
||||
{
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
return;
|
||||
}
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
continue;
|
||||
do
|
||||
{
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
continue;
|
||||
|
||||
if (!_tcscmp (findData.cFileName, _T(".")) ||
|
||||
!_tcscmp (findData.cFileName, _T("..")))
|
||||
continue;
|
||||
if (!_tcscmp (findData.cFileName, _T(".")) ||
|
||||
!_tcscmp (findData.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscat (pszFileName, _T("\\"));
|
||||
PrintAttribute (szFullName, pszFile, bRecurse);
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
}
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscat (pszFileName, _T("\\"));
|
||||
PrintAttribute (szFullName, pszFile, bRecurse);
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
}
|
||||
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
|
||||
/* display current directory */
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
return;
|
||||
}
|
||||
/* display current directory */
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
|
||||
ConOutPrintf (_T("%c %c%c%c %s\n"),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ? _T('A') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ? _T('S') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? _T('H') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? _T('R') : _T(' '),
|
||||
szFullName);
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
ConOutPrintf(_T("%c %c%c%c %s\n"),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) ? _T('A') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) ? _T('S') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) ? _T('H') : _T(' '),
|
||||
(findData.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? _T('R') : _T(' '),
|
||||
szFullName);
|
||||
}
|
||||
while (FindNextFile(hFind, &findData));
|
||||
FindClose(hFind);
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
ChangeAttribute (LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask,
|
||||
DWORD dwAttrib, BOOL bRecurse, BOOL bDirectories)
|
||||
ChangeAttribute(LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask,
|
||||
DWORD dwAttrib, BOOL bRecurse, BOOL bDirectories)
|
||||
{
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind;
|
||||
DWORD dwAttribute;
|
||||
TCHAR szFullName[MAX_PATH];
|
||||
LPTSTR pszFileName;
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind;
|
||||
DWORD dwAttribute;
|
||||
TCHAR szFullName[MAX_PATH];
|
||||
LPTSTR pszFileName;
|
||||
|
||||
|
||||
/* prepare full file name buffer */
|
||||
_tcscpy (szFullName, pszPath);
|
||||
pszFileName = szFullName + _tcslen (szFullName);
|
||||
/* prepare full file name buffer */
|
||||
_tcscpy (szFullName, pszPath);
|
||||
pszFileName = szFullName + _tcslen (szFullName);
|
||||
|
||||
/* change all subdirectories */
|
||||
if (bRecurse)
|
||||
{
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, _T("*.*"));
|
||||
/* change all subdirectories */
|
||||
if (bRecurse)
|
||||
{
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, _T("*.*"));
|
||||
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
nErrorLevel = 1;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
if (!_tcscmp (findData.cFileName, _T(".")) ||
|
||||
!_tcscmp (findData.cFileName, _T("..")))
|
||||
continue;
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
if (!_tcscmp (findData.cFileName, _T(".")) ||
|
||||
!_tcscmp (findData.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscat (pszFileName, _T("\\"));
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscat (pszFileName, _T("\\"));
|
||||
|
||||
ChangeAttribute (szFullName, pszFile, dwMask,
|
||||
dwAttrib, bRecurse, bDirectories);
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
}
|
||||
ChangeAttribute (szFullName, pszFile, dwMask,
|
||||
dwAttrib, bRecurse, bDirectories);
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
}
|
||||
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
/* append file name */
|
||||
_tcscpy (pszFileName, pszFile);
|
||||
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
hFind = FindFirstFile (szFullName, &findData);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ErrorMessage (GetLastError (), pszFile);
|
||||
nErrorLevel = 1;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
do
|
||||
{
|
||||
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
_tcscpy (pszFileName, findData.cFileName);
|
||||
|
||||
dwAttribute = GetFileAttributes (szFullName);
|
||||
dwAttribute = GetFileAttributes (szFullName);
|
||||
|
||||
if (dwAttribute != 0xFFFFFFFF)
|
||||
{
|
||||
dwAttribute = (dwAttribute & ~dwMask) | dwAttrib;
|
||||
SetFileAttributes (szFullName, dwAttribute);
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
if (dwAttribute != 0xFFFFFFFF)
|
||||
{
|
||||
dwAttribute = (dwAttribute & ~dwMask) | dwAttrib;
|
||||
SetFileAttributes (szFullName, dwAttribute);
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFind, &findData));
|
||||
FindClose (hFind);
|
||||
}
|
||||
|
||||
|
||||
INT CommandAttrib (LPTSTR param)
|
||||
{
|
||||
LPTSTR *arg;
|
||||
INT argc, i;
|
||||
TCHAR szPath[MAX_PATH];
|
||||
TCHAR szFileName [MAX_PATH];
|
||||
BOOL bRecurse = FALSE;
|
||||
BOOL bDirectories = FALSE;
|
||||
DWORD dwAttrib = 0;
|
||||
DWORD dwMask = 0;
|
||||
LPTSTR *arg;
|
||||
INT argc, i;
|
||||
TCHAR szPath[MAX_PATH];
|
||||
TCHAR szFileName [MAX_PATH];
|
||||
BOOL bRecurse = FALSE;
|
||||
BOOL bDirectories = FALSE;
|
||||
DWORD dwAttrib = 0;
|
||||
DWORD dwMask = 0;
|
||||
|
||||
/* initialize strings */
|
||||
szPath[0] = _T('\0');
|
||||
szFileName[0] = _T('\0');
|
||||
/* initialize strings */
|
||||
szPath[0] = _T('\0');
|
||||
szFileName[0] = _T('\0');
|
||||
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ATTRIB_HELP);
|
||||
return 0;
|
||||
}
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ATTRIB_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
nErrorLevel = 0;
|
||||
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
|
||||
/* check for options */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsicmp (arg[i], _T("/s")) == 0)
|
||||
bRecurse = TRUE;
|
||||
else if (_tcsicmp (arg[i], _T("/d")) == 0)
|
||||
bDirectories = TRUE;
|
||||
}
|
||||
/* check for options */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsicmp (arg[i], _T("/s")) == 0)
|
||||
bRecurse = TRUE;
|
||||
else if (_tcsicmp (arg[i], _T("/d")) == 0)
|
||||
bDirectories = TRUE;
|
||||
}
|
||||
|
||||
/* create attributes and mask */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (*arg[i] == _T('+'))
|
||||
{
|
||||
if (_tcslen (arg[i]) != 2)
|
||||
{
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
/* create attributes and mask */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (*arg[i] == _T('+'))
|
||||
{
|
||||
if (_tcslen (arg[i]) != 2)
|
||||
{
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch ((TCHAR)_totupper (arg[i][1]))
|
||||
{
|
||||
case _T('A'):
|
||||
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
dwAttrib |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
break;
|
||||
switch ((TCHAR)_totupper (arg[i][1]))
|
||||
{
|
||||
case _T('A'):
|
||||
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
dwAttrib |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
break;
|
||||
|
||||
case _T('H'):
|
||||
dwMask |= FILE_ATTRIBUTE_HIDDEN;
|
||||
dwAttrib |= FILE_ATTRIBUTE_HIDDEN;
|
||||
break;
|
||||
case _T('H'):
|
||||
dwMask |= FILE_ATTRIBUTE_HIDDEN;
|
||||
dwAttrib |= FILE_ATTRIBUTE_HIDDEN;
|
||||
break;
|
||||
|
||||
case _T('R'):
|
||||
dwMask |= FILE_ATTRIBUTE_READONLY;
|
||||
dwAttrib |= FILE_ATTRIBUTE_READONLY;
|
||||
break;
|
||||
case _T('R'):
|
||||
dwMask |= FILE_ATTRIBUTE_READONLY;
|
||||
dwAttrib |= FILE_ATTRIBUTE_READONLY;
|
||||
break;
|
||||
|
||||
case _T('S'):
|
||||
dwMask |= FILE_ATTRIBUTE_SYSTEM;
|
||||
dwAttrib |= FILE_ATTRIBUTE_SYSTEM;
|
||||
break;
|
||||
case _T('S'):
|
||||
dwMask |= FILE_ATTRIBUTE_SYSTEM;
|
||||
dwAttrib |= FILE_ATTRIBUTE_SYSTEM;
|
||||
break;
|
||||
|
||||
default:
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (*arg[i] == _T('-'))
|
||||
{
|
||||
if (_tcslen (arg[i]) != 2)
|
||||
{
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
default:
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (*arg[i] == _T('-'))
|
||||
{
|
||||
if (_tcslen (arg[i]) != 2)
|
||||
{
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch ((TCHAR)_totupper (arg[i][1]))
|
||||
{
|
||||
case _T('A'):
|
||||
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_ARCHIVE;
|
||||
break;
|
||||
switch ((TCHAR)_totupper (arg[i][1]))
|
||||
{
|
||||
case _T('A'):
|
||||
dwMask |= FILE_ATTRIBUTE_ARCHIVE;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_ARCHIVE;
|
||||
break;
|
||||
|
||||
case _T('H'):
|
||||
dwMask |= FILE_ATTRIBUTE_HIDDEN;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_HIDDEN;
|
||||
break;
|
||||
case _T('H'):
|
||||
dwMask |= FILE_ATTRIBUTE_HIDDEN;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_HIDDEN;
|
||||
break;
|
||||
|
||||
case _T('R'):
|
||||
dwMask |= FILE_ATTRIBUTE_READONLY;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_READONLY;
|
||||
break;
|
||||
case _T('R'):
|
||||
dwMask |= FILE_ATTRIBUTE_READONLY;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_READONLY;
|
||||
break;
|
||||
|
||||
case _T('S'):
|
||||
dwMask |= FILE_ATTRIBUTE_SYSTEM;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_SYSTEM;
|
||||
break;
|
||||
case _T('S'):
|
||||
dwMask |= FILE_ATTRIBUTE_SYSTEM;
|
||||
dwAttrib &= ~FILE_ATTRIBUTE_SYSTEM;
|
||||
break;
|
||||
|
||||
default:
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
error_invalid_parameter_format (arg[i]);
|
||||
freep (arg);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
DWORD len;
|
||||
if (argc == 0)
|
||||
{
|
||||
DWORD len;
|
||||
|
||||
len = GetCurrentDirectory (MAX_PATH, szPath);
|
||||
if (szPath[len-1] != _T('\\'))
|
||||
{
|
||||
szPath[len] = _T('\\');
|
||||
szPath[len + 1] = 0;
|
||||
}
|
||||
_tcscpy (szFileName, _T("*.*"));
|
||||
PrintAttribute (szPath, szFileName, bRecurse);
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
len = GetCurrentDirectory (MAX_PATH, szPath);
|
||||
if (szPath[len-1] != _T('\\'))
|
||||
{
|
||||
szPath[len] = _T('\\');
|
||||
szPath[len + 1] = 0;
|
||||
}
|
||||
_tcscpy (szFileName, _T("*.*"));
|
||||
PrintAttribute (szPath, szFileName, bRecurse);
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* get full file name */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if ((*arg[i] != _T('+')) && (*arg[i] != _T('-')) && (*arg[i] != _T('/')))
|
||||
{
|
||||
LPTSTR p;
|
||||
GetFullPathName (arg[i], MAX_PATH, szPath, NULL);
|
||||
p = _tcsrchr (szPath, _T('\\')) + 1;
|
||||
_tcscpy (szFileName, p);
|
||||
*p = _T('\0');
|
||||
/* get full file name */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if ((*arg[i] != _T('+')) && (*arg[i] != _T('-')) && (*arg[i] != _T('/')))
|
||||
{
|
||||
LPTSTR p;
|
||||
GetFullPathName (arg[i], MAX_PATH, szPath, NULL);
|
||||
p = _tcsrchr (szPath, _T('\\')) + 1;
|
||||
_tcscpy (szFileName, p);
|
||||
*p = _T('\0');
|
||||
|
||||
if (dwMask == 0)
|
||||
PrintAttribute (szPath, szFileName, bRecurse);
|
||||
else
|
||||
ChangeAttribute (szPath, szFileName, dwMask,
|
||||
dwAttrib, bRecurse, bDirectories);
|
||||
}
|
||||
}
|
||||
if (dwMask == 0)
|
||||
PrintAttribute (szPath, szFileName, bRecurse);
|
||||
else
|
||||
ChangeAttribute (szPath, szFileName, dwMask,
|
||||
dwAttrib, bRecurse, bDirectories);
|
||||
}
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
return 0;
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_ATTRIB */
|
||||
|
||||
+252
-253
@@ -54,8 +54,8 @@
|
||||
* 23-Feb-2001 (Carl Nettelblad <[email protected]>)
|
||||
* Fixes made to get "for" working.
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -65,7 +65,7 @@
|
||||
*/
|
||||
LPBATCH_CONTEXT bc = NULL;
|
||||
|
||||
BOOL bEcho = TRUE; /* The echo flag */
|
||||
BOOL bEcho = TRUE; /* The echo flag */
|
||||
|
||||
|
||||
|
||||
@@ -82,24 +82,24 @@ TCHAR textline[BATCH_BUFFSIZE];
|
||||
|
||||
LPTSTR FindArg(TCHAR Char, BOOL *IsParam0)
|
||||
{
|
||||
LPTSTR pp;
|
||||
INT n = Char - _T('0');
|
||||
LPTSTR pp;
|
||||
INT n = Char - _T('0');
|
||||
|
||||
TRACE ("FindArg: (%d)\n", n);
|
||||
TRACE ("FindArg: (%d)\n", n);
|
||||
|
||||
if (n < 0 || n > 9)
|
||||
return NULL;
|
||||
if (n < 0 || n > 9)
|
||||
return NULL;
|
||||
|
||||
n = bc->shiftlevel[n];
|
||||
*IsParam0 = (n == 0);
|
||||
pp = bc->params;
|
||||
n = bc->shiftlevel[n];
|
||||
*IsParam0 = (n == 0);
|
||||
pp = bc->params;
|
||||
|
||||
/* Step up the strings till we reach the end */
|
||||
/* or the one we want */
|
||||
while (*pp && n--)
|
||||
pp += _tcslen (pp) + 1;
|
||||
/* Step up the strings till we reach the end */
|
||||
/* or the one we want */
|
||||
while (*pp && n--)
|
||||
pp += _tcslen (pp) + 1;
|
||||
|
||||
return pp;
|
||||
return pp;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,51 +108,51 @@ LPTSTR FindArg(TCHAR Char, BOOL *IsParam0)
|
||||
* The parameters consist of null terminated strings with a final
|
||||
* NULL character signalling the end of the parameters.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
LPTSTR BatchParams (LPTSTR s1, LPTSTR s2)
|
||||
{
|
||||
LPTSTR dp = (LPTSTR)cmd_alloc ((_tcslen(s1) + _tcslen(s2) + 3) * sizeof (TCHAR));
|
||||
LPTSTR dp = (LPTSTR)cmd_alloc ((_tcslen(s1) + _tcslen(s2) + 3) * sizeof (TCHAR));
|
||||
|
||||
/* JPP 20-Jul-1998 added error checking */
|
||||
if (dp == NULL)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return NULL;
|
||||
}
|
||||
/* JPP 20-Jul-1998 added error checking */
|
||||
if (dp == NULL)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (s1 && *s1)
|
||||
{
|
||||
s1 = _stpcpy (dp, s1);
|
||||
*s1++ = _T('\0');
|
||||
}
|
||||
else
|
||||
s1 = dp;
|
||||
if (s1 && *s1)
|
||||
{
|
||||
s1 = _stpcpy (dp, s1);
|
||||
*s1++ = _T('\0');
|
||||
}
|
||||
else
|
||||
s1 = dp;
|
||||
|
||||
while (*s2)
|
||||
{
|
||||
BOOL inquotes = FALSE;
|
||||
while (*s2)
|
||||
{
|
||||
BOOL inquotes = FALSE;
|
||||
|
||||
/* Find next parameter */
|
||||
while (_istspace(*s2) || (*s2 && _tcschr(_T(",;="), *s2)))
|
||||
s2++;
|
||||
if (!*s2)
|
||||
break;
|
||||
/* Find next parameter */
|
||||
while (_istspace(*s2) || (*s2 && _tcschr(_T(",;="), *s2)))
|
||||
s2++;
|
||||
if (!*s2)
|
||||
break;
|
||||
|
||||
/* Copy it */
|
||||
do
|
||||
{
|
||||
if (!inquotes && (_istspace(*s2) || _tcschr(_T(",;="), *s2)))
|
||||
break;
|
||||
inquotes ^= (*s2 == _T('"'));
|
||||
*s1++ = *s2++;
|
||||
} while (*s2);
|
||||
*s1++ = _T('\0');
|
||||
}
|
||||
/* Copy it */
|
||||
do
|
||||
{
|
||||
if (!inquotes && (_istspace(*s2) || _tcschr(_T(",;="), *s2)))
|
||||
break;
|
||||
inquotes ^= (*s2 == _T('"'));
|
||||
*s1++ = *s2++;
|
||||
} while (*s2);
|
||||
*s1++ = _T('\0');
|
||||
}
|
||||
|
||||
*s1 = _T('\0');
|
||||
*s1 = _T('\0');
|
||||
|
||||
return dp;
|
||||
return dp;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -160,16 +160,16 @@ LPTSTR BatchParams (LPTSTR s1, LPTSTR s2)
|
||||
*/
|
||||
VOID ClearBatch()
|
||||
{
|
||||
TRACE ("ClearBatch mem = %08x free = %d\n", bc->mem, bc->memfree);
|
||||
TRACE ("ClearBatch mem = %08x free = %d\n", bc->mem, bc->memfree);
|
||||
|
||||
if (bc->mem && bc->memfree)
|
||||
cmd_free(bc->mem);
|
||||
if (bc->mem && bc->memfree)
|
||||
cmd_free(bc->mem);
|
||||
|
||||
if (bc->raw_params)
|
||||
cmd_free(bc->raw_params);
|
||||
if (bc->raw_params)
|
||||
cmd_free(bc->raw_params);
|
||||
|
||||
if (bc->params)
|
||||
cmd_free(bc->params);
|
||||
if (bc->params)
|
||||
cmd_free(bc->params);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -184,20 +184,20 @@ VOID ClearBatch()
|
||||
|
||||
VOID ExitBatch()
|
||||
{
|
||||
ClearBatch();
|
||||
ClearBatch();
|
||||
|
||||
TRACE ("ExitBatch\n");
|
||||
TRACE ("ExitBatch\n");
|
||||
|
||||
UndoRedirection(bc->RedirList, NULL);
|
||||
FreeRedirection(bc->RedirList);
|
||||
UndoRedirection(bc->RedirList, NULL);
|
||||
FreeRedirection(bc->RedirList);
|
||||
|
||||
/* Preserve echo state across batch calls */
|
||||
bEcho = bc->bEcho;
|
||||
/* Preserve echo state across batch calls */
|
||||
bEcho = bc->bEcho;
|
||||
|
||||
while (bc->setlocal)
|
||||
cmd_endlocal(_T(""));
|
||||
while (bc->setlocal)
|
||||
cmd_endlocal(_T(""));
|
||||
|
||||
bc = bc->prev;
|
||||
bc = bc->prev;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -206,26 +206,26 @@ VOID ExitBatch()
|
||||
*/
|
||||
void BatchFile2Mem(HANDLE hBatchFile)
|
||||
{
|
||||
TRACE ("BatchFile2Mem ()\n");
|
||||
TRACE ("BatchFile2Mem ()\n");
|
||||
|
||||
bc->memsize = GetFileSize(hBatchFile, NULL);
|
||||
bc->mem = (char *)cmd_alloc(bc->memsize+1); /* 1 extra for '\0' */
|
||||
|
||||
/* if memory is available, read it in and close the file */
|
||||
if (bc->mem != NULL)
|
||||
{
|
||||
TRACE ("BatchFile2Mem memory %08x - %08x\n",bc->mem,bc->memsize);
|
||||
SetFilePointer (hBatchFile, 0, NULL, FILE_BEGIN);
|
||||
ReadFile(hBatchFile, (LPVOID)bc->mem, bc->memsize, &bc->memsize, NULL);
|
||||
bc->mem[bc->memsize]='\0'; /* end this, so you can dump it as a string */
|
||||
bc->memfree=TRUE; /* this one needs to be freed */
|
||||
}
|
||||
else
|
||||
{
|
||||
bc->memsize=0; /* this will prevent mem being accessed */
|
||||
bc->memfree=FALSE;
|
||||
}
|
||||
bc->mempos = 0; /* set position to the start */
|
||||
bc->memsize = GetFileSize(hBatchFile, NULL);
|
||||
bc->mem = (char *)cmd_alloc(bc->memsize+1); /* 1 extra for '\0' */
|
||||
|
||||
/* if memory is available, read it in and close the file */
|
||||
if (bc->mem != NULL)
|
||||
{
|
||||
TRACE ("BatchFile2Mem memory %08x - %08x\n",bc->mem,bc->memsize);
|
||||
SetFilePointer (hBatchFile, 0, NULL, FILE_BEGIN);
|
||||
ReadFile(hBatchFile, (LPVOID)bc->mem, bc->memsize, &bc->memsize, NULL);
|
||||
bc->mem[bc->memsize]='\0'; /* end this, so you can dump it as a string */
|
||||
bc->memfree=TRUE; /* this one needs to be freed */
|
||||
}
|
||||
else
|
||||
{
|
||||
bc->memsize=0; /* this will prevent mem being accessed */
|
||||
bc->memfree=FALSE;
|
||||
}
|
||||
bc->mempos = 0; /* set position to the start */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -234,97 +234,96 @@ void BatchFile2Mem(HANDLE hBatchFile)
|
||||
* The firstword parameter is the full filename of the batch file.
|
||||
*
|
||||
*/
|
||||
|
||||
INT Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd)
|
||||
{
|
||||
BATCH_CONTEXT new;
|
||||
LPFOR_CONTEXT saved_fc;
|
||||
INT i;
|
||||
INT ret = 0;
|
||||
BOOL same_fn = FALSE;
|
||||
BATCH_CONTEXT new;
|
||||
LPFOR_CONTEXT saved_fc;
|
||||
INT i;
|
||||
INT ret = 0;
|
||||
BOOL same_fn = FALSE;
|
||||
|
||||
HANDLE hFile = 0;
|
||||
SetLastError(0);
|
||||
if (bc && bc->mem)
|
||||
{
|
||||
TCHAR fpname[MAX_PATH];
|
||||
GetFullPathName(fullname, sizeof(fpname) / sizeof(TCHAR), fpname, NULL);
|
||||
if (_tcsicmp(bc->BatchFilePath,fpname)==0)
|
||||
same_fn=TRUE;
|
||||
}
|
||||
TRACE ("Batch: (\'%s\', \'%s\', \'%s\') same_fn = %d\n",
|
||||
debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), same_fn);
|
||||
HANDLE hFile = 0;
|
||||
SetLastError(0);
|
||||
if (bc && bc->mem)
|
||||
{
|
||||
TCHAR fpname[MAX_PATH];
|
||||
GetFullPathName(fullname, sizeof(fpname) / sizeof(TCHAR), fpname, NULL);
|
||||
if (_tcsicmp(bc->BatchFilePath,fpname)==0)
|
||||
same_fn=TRUE;
|
||||
}
|
||||
TRACE ("Batch: (\'%s\', \'%s\', \'%s\') same_fn = %d\n",
|
||||
debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), same_fn);
|
||||
|
||||
if (!same_fn)
|
||||
{
|
||||
hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL |
|
||||
FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
if (!same_fn)
|
||||
{
|
||||
hFile = CreateFile(fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL |
|
||||
FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConErrResPuts(STRING_BATCH_ERROR);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (bc != NULL && Cmd == bc->current)
|
||||
{
|
||||
/* Then we are transferring to another batch */
|
||||
ClearBatch();
|
||||
AddBatchRedirection(&Cmd->Redirections);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct _SETLOCAL *setlocal = NULL;
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ConErrResPuts(STRING_BATCH_ERROR);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (Cmd == NULL)
|
||||
{
|
||||
/* This is a CALL. CALL will set errorlevel to our return value, so
|
||||
* in order to keep the value of errorlevel unchanged in the case
|
||||
* of calling an empty batch file, we must return that same value. */
|
||||
ret = nErrorLevel;
|
||||
}
|
||||
else if (bc)
|
||||
{
|
||||
/* If a batch file runs another batch file as part of a compound command
|
||||
* (e.g. "x.bat & somethingelse") then the first file gets terminated. */
|
||||
if (bc != NULL && Cmd == bc->current)
|
||||
{
|
||||
/* Then we are transferring to another batch */
|
||||
ClearBatch();
|
||||
AddBatchRedirection(&Cmd->Redirections);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct _SETLOCAL *setlocal = NULL;
|
||||
|
||||
/* Get its SETLOCAL stack so it can be migrated to the new context */
|
||||
setlocal = bc->setlocal;
|
||||
bc->setlocal = NULL;
|
||||
ExitBatch();
|
||||
}
|
||||
if (Cmd == NULL)
|
||||
{
|
||||
/* This is a CALL. CALL will set errorlevel to our return value, so
|
||||
* in order to keep the value of errorlevel unchanged in the case
|
||||
* of calling an empty batch file, we must return that same value. */
|
||||
ret = nErrorLevel;
|
||||
}
|
||||
else if (bc)
|
||||
{
|
||||
/* If a batch file runs another batch file as part of a compound command
|
||||
* (e.g. "x.bat & somethingelse") then the first file gets terminated. */
|
||||
|
||||
/* Create a new context. This function will not
|
||||
* return until this context has been exited */
|
||||
new.prev = bc;
|
||||
/* copy some fields in the new structure if it is the same file */
|
||||
if (same_fn) {
|
||||
new.mem = bc->mem;
|
||||
new.memsize = bc->memsize;
|
||||
new.mempos = 0;
|
||||
new.memfree = FALSE; /* don't free this, being used before this */
|
||||
}
|
||||
bc = &new;
|
||||
bc->RedirList = NULL;
|
||||
bc->setlocal = setlocal;
|
||||
}
|
||||
/* Get its SETLOCAL stack so it can be migrated to the new context */
|
||||
setlocal = bc->setlocal;
|
||||
bc->setlocal = NULL;
|
||||
ExitBatch();
|
||||
}
|
||||
|
||||
GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, NULL);
|
||||
/* if a new batch file, load it into memory and close the file */
|
||||
if (!same_fn)
|
||||
{
|
||||
BatchFile2Mem(hFile);
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
||||
bc->mempos = 0; /* goto begin of batch file */
|
||||
bc->bEcho = bEcho; /* Preserve echo across batch calls */
|
||||
for (i = 0; i < 10; i++)
|
||||
bc->shiftlevel[i] = i;
|
||||
|
||||
bc->params = BatchParams (firstword, param);
|
||||
/* Create a new context. This function will not
|
||||
* return until this context has been exited */
|
||||
new.prev = bc;
|
||||
/* copy some fields in the new structure if it is the same file */
|
||||
if (same_fn) {
|
||||
new.mem = bc->mem;
|
||||
new.memsize = bc->memsize;
|
||||
new.mempos = 0;
|
||||
new.memfree = FALSE; /* don't free this, being used before this */
|
||||
}
|
||||
bc = &new;
|
||||
bc->RedirList = NULL;
|
||||
bc->setlocal = setlocal;
|
||||
}
|
||||
|
||||
GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, NULL);
|
||||
/* if a new batch file, load it into memory and close the file */
|
||||
if (!same_fn)
|
||||
{
|
||||
BatchFile2Mem(hFile);
|
||||
CloseHandle(hFile);
|
||||
}
|
||||
|
||||
bc->mempos = 0; /* goto begin of batch file */
|
||||
bc->bEcho = bEcho; /* Preserve echo across batch calls */
|
||||
for (i = 0; i < 10; i++)
|
||||
bc->shiftlevel[i] = i;
|
||||
|
||||
bc->params = BatchParams (firstword, param);
|
||||
//
|
||||
// Allocate enough memory to hold the params and copy them over without modifications
|
||||
//
|
||||
@@ -335,58 +334,58 @@ INT Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Check if this is a "CALL :label" */
|
||||
if (*firstword == _T(':'))
|
||||
cmd_goto(firstword);
|
||||
/* Check if this is a "CALL :label" */
|
||||
if (*firstword == _T(':'))
|
||||
cmd_goto(firstword);
|
||||
|
||||
/* If we are calling from inside a FOR, hide the FOR variables */
|
||||
saved_fc = fc;
|
||||
fc = NULL;
|
||||
/* If we are calling from inside a FOR, hide the FOR variables */
|
||||
saved_fc = fc;
|
||||
fc = NULL;
|
||||
|
||||
/* If we have created a new context, don't return
|
||||
* until this batch file has completed. */
|
||||
while (bc == &new && !bExit)
|
||||
{
|
||||
Cmd = ParseCommand(NULL);
|
||||
if (!Cmd)
|
||||
continue;
|
||||
/* If we have created a new context, don't return
|
||||
* until this batch file has completed. */
|
||||
while (bc == &new && !bExit)
|
||||
{
|
||||
Cmd = ParseCommand(NULL);
|
||||
if (!Cmd)
|
||||
continue;
|
||||
|
||||
/* JPP 19980807 */
|
||||
/* Echo batch file line */
|
||||
if (bEcho && !bDisableBatchEcho && Cmd->Type != C_QUIET)
|
||||
{
|
||||
if (!bIgnoreEcho)
|
||||
ConOutChar(_T('\n'));
|
||||
PrintPrompt();
|
||||
EchoCommand(Cmd);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
/* JPP 19980807 */
|
||||
/* Echo batch file line */
|
||||
if (bEcho && !bDisableBatchEcho && Cmd->Type != C_QUIET)
|
||||
{
|
||||
if (!bIgnoreEcho)
|
||||
ConOutChar(_T('\n'));
|
||||
PrintPrompt();
|
||||
EchoCommand(Cmd);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
|
||||
bc->current = Cmd;
|
||||
ret = ExecuteCommand(Cmd);
|
||||
FreeCommand(Cmd);
|
||||
}
|
||||
bc->current = Cmd;
|
||||
ret = ExecuteCommand(Cmd);
|
||||
FreeCommand(Cmd);
|
||||
}
|
||||
|
||||
TRACE ("Batch: returns TRUE\n");
|
||||
TRACE ("Batch: returns TRUE\n");
|
||||
|
||||
fc = saved_fc;
|
||||
return ret;
|
||||
fc = saved_fc;
|
||||
return ret;
|
||||
}
|
||||
|
||||
VOID AddBatchRedirection(REDIRECTION **RedirList)
|
||||
{
|
||||
REDIRECTION **ListEnd;
|
||||
REDIRECTION **ListEnd;
|
||||
|
||||
/* Prepend the list to the batch context's list */
|
||||
ListEnd = RedirList;
|
||||
while (*ListEnd)
|
||||
ListEnd = &(*ListEnd)->Next;
|
||||
*ListEnd = bc->RedirList;
|
||||
bc->RedirList = *RedirList;
|
||||
/* Prepend the list to the batch context's list */
|
||||
ListEnd = RedirList;
|
||||
while (*ListEnd)
|
||||
ListEnd = &(*ListEnd)->Next;
|
||||
*ListEnd = bc->RedirList;
|
||||
bc->RedirList = *RedirList;
|
||||
|
||||
/* Null out the pointer so that the list will not be cleared prematurely.
|
||||
* These redirections should persist until the batch file exits. */
|
||||
*RedirList = NULL;
|
||||
/* Null out the pointer so that the list will not be cleared prematurely.
|
||||
* These redirections should persist until the batch file exits. */
|
||||
*RedirList = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -395,41 +394,41 @@ VOID AddBatchRedirection(REDIRECTION **RedirList)
|
||||
*/
|
||||
BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength)
|
||||
{
|
||||
LPSTR lpString;
|
||||
INT len = 0;
|
||||
LPSTR lpString;
|
||||
INT len = 0;
|
||||
#ifdef _UNICODE
|
||||
lpString = cmd_alloc(nBufferLength);
|
||||
lpString = cmd_alloc(nBufferLength);
|
||||
#else
|
||||
lpString = lpBuffer;
|
||||
lpString = lpBuffer;
|
||||
#endif
|
||||
/* read all chars from memory until a '\n' is encountered */
|
||||
if (bc->mem)
|
||||
{
|
||||
for (; (bc->mempos < bc->memsize && len < (nBufferLength-1)); len++)
|
||||
{
|
||||
lpString[len] = bc->mem[bc->mempos++];
|
||||
if (lpString[len] == '\n' )
|
||||
{
|
||||
len++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* read all chars from memory until a '\n' is encountered */
|
||||
if (bc->mem)
|
||||
{
|
||||
for (; (bc->mempos < bc->memsize && len < (nBufferLength-1)); len++)
|
||||
{
|
||||
lpString[len] = bc->mem[bc->mempos++];
|
||||
if (lpString[len] == '\n' )
|
||||
{
|
||||
len++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!len)
|
||||
{
|
||||
if (!len)
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
cmd_free(lpString);
|
||||
cmd_free(lpString);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
lpString[len++] = '\0';
|
||||
lpString[len++] = '\0';
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(OutputCodePage, 0, lpString, -1, lpBuffer, len);
|
||||
cmd_free(lpString);
|
||||
MultiByteToWideChar(OutputCodePage, 0, lpString, -1, lpBuffer, len);
|
||||
cmd_free(lpString);
|
||||
#endif
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -442,30 +441,30 @@ BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength)
|
||||
*/
|
||||
LPTSTR ReadBatchLine ()
|
||||
{
|
||||
TRACE ("ReadBatchLine ()\n");
|
||||
TRACE ("ReadBatchLine ()\n");
|
||||
|
||||
/* User halt */
|
||||
if (CheckCtrlBreak (BREAK_BATCHFILE))
|
||||
{
|
||||
while (bc)
|
||||
ExitBatch();
|
||||
return NULL;
|
||||
}
|
||||
/* User halt */
|
||||
if (CheckCtrlBreak (BREAK_BATCHFILE))
|
||||
{
|
||||
while (bc)
|
||||
ExitBatch();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!BatchGetString (textline, sizeof (textline) / sizeof (textline[0]) - 1))
|
||||
{
|
||||
TRACE ("ReadBatchLine(): Reached EOF!\n");
|
||||
/* End of file.... */
|
||||
ExitBatch();
|
||||
return NULL;
|
||||
}
|
||||
if (!BatchGetString (textline, sizeof (textline) / sizeof (textline[0]) - 1))
|
||||
{
|
||||
TRACE ("ReadBatchLine(): Reached EOF!\n");
|
||||
/* End of file.... */
|
||||
ExitBatch();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
||||
|
||||
if (textline[_tcslen(textline) - 1] != _T('\n'))
|
||||
_tcscat(textline, _T("\n"));
|
||||
if (textline[_tcslen(textline) - 1] != _T('\n'))
|
||||
_tcscat(textline, _T("\n"));
|
||||
|
||||
return textline;
|
||||
return textline;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+19
-20
@@ -1,38 +1,37 @@
|
||||
/*
|
||||
* BATCH.H - A structure to preserve the context of a batch file
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct tagBATCHCONTEXT
|
||||
{
|
||||
struct tagBATCHCONTEXT *prev;
|
||||
char *mem; /* batchfile content in memory */
|
||||
DWORD memsize; /* size of batchfile */
|
||||
DWORD mempos; /* current position to read from */
|
||||
BOOL memfree; /* true if it need to be freed when exitbatch is called */
|
||||
TCHAR BatchFilePath[MAX_PATH];
|
||||
LPTSTR params;
|
||||
LPTSTR raw_params; /* Holds the raw params given by the input */
|
||||
INT shiftlevel[10];
|
||||
BOOL bEcho; /* Preserve echo flag across batch calls */
|
||||
REDIRECTION *RedirList;
|
||||
PARSED_COMMAND *current;
|
||||
struct _SETLOCAL *setlocal;
|
||||
struct tagBATCHCONTEXT *prev;
|
||||
char *mem; /* batchfile content in memory */
|
||||
DWORD memsize; /* size of batchfile */
|
||||
DWORD mempos; /* current position to read from */
|
||||
BOOL memfree; /* true if it need to be freed when exitbatch is called */
|
||||
TCHAR BatchFilePath[MAX_PATH];
|
||||
LPTSTR params;
|
||||
LPTSTR raw_params; /* Holds the raw params given by the input */
|
||||
INT shiftlevel[10];
|
||||
BOOL bEcho; /* Preserve echo flag across batch calls */
|
||||
REDIRECTION *RedirList;
|
||||
PARSED_COMMAND *current;
|
||||
struct _SETLOCAL *setlocal;
|
||||
} BATCH_CONTEXT, *LPBATCH_CONTEXT;
|
||||
|
||||
typedef struct tagFORCONTEXT
|
||||
{
|
||||
struct tagFORCONTEXT *prev;
|
||||
TCHAR firstvar;
|
||||
UINT varcount;
|
||||
LPTSTR *values;
|
||||
struct tagFORCONTEXT *prev;
|
||||
TCHAR firstvar;
|
||||
UINT varcount;
|
||||
LPTSTR *values;
|
||||
} FOR_CONTEXT, *LPFOR_CONTEXT;
|
||||
|
||||
|
||||
/* The stack of current batch contexts.
|
||||
/*
|
||||
* The stack of current batch contexts.
|
||||
* NULL when no batch is active
|
||||
*/
|
||||
extern LPBATCH_CONTEXT bc;
|
||||
|
||||
+12
-12
@@ -20,8 +20,8 @@
|
||||
* 20-Jan-1999 (Eric Kohl)
|
||||
* Redirection ready!
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -31,19 +31,19 @@
|
||||
|
||||
INT cmd_beep (LPTSTR param)
|
||||
{
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_BEEP_HELP);
|
||||
return 0;
|
||||
}
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_BEEP_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* check if run in batch mode */
|
||||
if (bc == NULL)
|
||||
return 1;
|
||||
/* check if run in batch mode */
|
||||
if (bc == NULL)
|
||||
return 1;
|
||||
#endif
|
||||
MessageBeep (-1);
|
||||
MessageBeep (-1);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+37
-37
@@ -24,8 +24,8 @@
|
||||
* 20-Jan-1999 (Eric Kohl)
|
||||
* Unicode and redirection safe!
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -36,48 +36,48 @@
|
||||
|
||||
INT cmd_call (LPTSTR param)
|
||||
{
|
||||
TCHAR line[CMDLINE_LENGTH + 1];
|
||||
TCHAR *first;
|
||||
BOOL bInQuote = FALSE;
|
||||
TCHAR line[CMDLINE_LENGTH + 1];
|
||||
TCHAR *first;
|
||||
BOOL bInQuote = FALSE;
|
||||
|
||||
TRACE ("cmd_call: (\'%s\')\n", debugstr_aw(param));
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CALL_HELP);
|
||||
return 0;
|
||||
}
|
||||
TRACE ("cmd_call: (\'%s\')\n", debugstr_aw(param));
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CALL_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Do a second round of %-variable substitutions */
|
||||
if (!SubstituteVars(param, line, _T('%')))
|
||||
return nErrorLevel = 1;
|
||||
/* Do a second round of %-variable substitutions */
|
||||
if (!SubstituteVars(param, line, _T('%')))
|
||||
return nErrorLevel = 1;
|
||||
|
||||
/* Find start and end of first word */
|
||||
first = line;
|
||||
while (_istspace(*first))
|
||||
first++;
|
||||
/* Find start and end of first word */
|
||||
first = line;
|
||||
while (_istspace(*first))
|
||||
first++;
|
||||
|
||||
for (param = first; *param; param++)
|
||||
{
|
||||
if (!bInQuote && (_istspace(*param) || _tcschr(_T(",;="), *param)))
|
||||
break;
|
||||
bInQuote ^= (*param == _T('"'));
|
||||
}
|
||||
for (param = first; *param; param++)
|
||||
{
|
||||
if (!bInQuote && (_istspace(*param) || _tcschr(_T(",;="), *param)))
|
||||
break;
|
||||
bInQuote ^= (*param == _T('"'));
|
||||
}
|
||||
|
||||
/* Separate first word from rest of line */
|
||||
memmove(param + 1, param, (_tcslen(param) + 1) * sizeof(TCHAR));
|
||||
*param++ = _T('\0');
|
||||
/* Separate first word from rest of line */
|
||||
memmove(param + 1, param, (_tcslen(param) + 1) * sizeof(TCHAR));
|
||||
*param++ = _T('\0');
|
||||
|
||||
if (*first == _T(':') && (bc))
|
||||
{
|
||||
/* CALL :label - call a subroutine of the current batch file */
|
||||
while (*param == _T(' '))
|
||||
param++;
|
||||
nErrorLevel = Batch(bc->BatchFilePath, first, param, NULL);
|
||||
return nErrorLevel;
|
||||
}
|
||||
if (*first == _T(':') && (bc))
|
||||
{
|
||||
/* CALL :label - call a subroutine of the current batch file */
|
||||
while (*param == _T(' '))
|
||||
param++;
|
||||
nErrorLevel = Batch(bc->BatchFilePath, first, param, NULL);
|
||||
return nErrorLevel;
|
||||
}
|
||||
|
||||
nErrorLevel = DoCommand(first, param, NULL);
|
||||
return nErrorLevel;
|
||||
nErrorLevel = DoCommand(first, param, NULL);
|
||||
return nErrorLevel;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+49
-50
@@ -7,8 +7,8 @@
|
||||
* 23-Dec-1998 (Eric Kohl)
|
||||
* Started.
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -17,64 +17,63 @@
|
||||
|
||||
INT CommandChcp (LPTSTR param)
|
||||
{
|
||||
LPTSTR *arg;
|
||||
INT args;
|
||||
UINT uNewCodePage;
|
||||
LPTSTR *arg;
|
||||
INT args;
|
||||
UINT uNewCodePage;
|
||||
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CHCP_HELP);
|
||||
return 0;
|
||||
}
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CHCP_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
nErrorLevel = 0;
|
||||
|
||||
/* get parameters */
|
||||
arg = split (param, &args, FALSE, FALSE);
|
||||
/* get parameters */
|
||||
arg = split (param, &args, FALSE, FALSE);
|
||||
|
||||
if (args == 0)
|
||||
{
|
||||
/* display active code page number */
|
||||
ConErrResPrintf(STRING_CHCP_ERROR1, InputCodePage);
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
if (args == 0)
|
||||
{
|
||||
/* display active code page number */
|
||||
ConErrResPrintf(STRING_CHCP_ERROR1, InputCodePage);
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (args >= 2)
|
||||
{
|
||||
/* too many parameters */
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, param);
|
||||
nErrorLevel = 1;
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
if (args >= 2)
|
||||
{
|
||||
/* too many parameters */
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, param);
|
||||
nErrorLevel = 1;
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
uNewCodePage = (UINT)_ttoi(arg[0]);
|
||||
uNewCodePage = (UINT)_ttoi(arg[0]);
|
||||
|
||||
if (uNewCodePage == 0)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, arg[0]);
|
||||
freep (arg);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
if (uNewCodePage == 0)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, arg[0]);
|
||||
freep (arg);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!SetConsoleCP(uNewCodePage))
|
||||
{
|
||||
ConErrResPuts(STRING_CHCP_ERROR4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!SetConsoleCP(uNewCodePage))
|
||||
{
|
||||
ConErrResPuts(STRING_CHCP_ERROR4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
SetConsoleOutputCP (uNewCodePage);
|
||||
InitLocale ();
|
||||
InputCodePage= GetConsoleCP();
|
||||
}
|
||||
SetConsoleOutputCP (uNewCodePage);
|
||||
InitLocale ();
|
||||
InputCodePage= GetConsoleCP();
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
|
||||
return 0;
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_CHCP */
|
||||
|
||||
+211
-212
@@ -13,9 +13,8 @@
|
||||
* 26 Sep 1999 (Paolo Pantaleo)
|
||||
* Fixed timeout.
|
||||
*
|
||||
* 02 Apr 2005 (Magnus Olsen
|
||||
* Remove Hardcode string so
|
||||
* they can be translate
|
||||
* 02 Apr 2005 (Magnus Olsen)
|
||||
* Remove hardcoded strings so that they can be translated.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -24,9 +23,9 @@
|
||||
#ifdef INCLUDE_CMD_CHOICE
|
||||
|
||||
|
||||
#define GC_TIMEOUT -1
|
||||
#define GC_NOKEY 0 //an event occurred but it wasn't a key pressed
|
||||
#define GC_KEYREAD 1 //a key has been read
|
||||
#define GC_TIMEOUT -1
|
||||
#define GC_NOKEY 0 //an event occurred but it wasn't a key pressed
|
||||
#define GC_KEYREAD 1 //a key has been read
|
||||
|
||||
|
||||
static INT
|
||||
@@ -37,275 +36,275 @@ GetCharacterTimeout (LPTCH ch, DWORD dwMilliseconds)
|
||||
// The function will wait a limited amount
|
||||
// of time, then the function returns GC_TIMEOUT.
|
||||
//
|
||||
// dwMilliseconds is the timeout value, that can
|
||||
// be set to INFINITE, so the function works like
|
||||
// stdio.h's getchar()
|
||||
// dwMilliseconds is the timeout value, that can
|
||||
// be set to INFINITE, so the function works like
|
||||
// stdio.h's getchar()
|
||||
|
||||
HANDLE hInput;
|
||||
DWORD dwRead;
|
||||
HANDLE hInput;
|
||||
DWORD dwRead;
|
||||
|
||||
INPUT_RECORD lpBuffer;
|
||||
INPUT_RECORD lpBuffer;
|
||||
|
||||
hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
|
||||
//if the timeout experied return GC_TIMEOUT
|
||||
if (WaitForSingleObject (hInput, dwMilliseconds) == WAIT_TIMEOUT)
|
||||
return GC_TIMEOUT;
|
||||
//if the timeout experied return GC_TIMEOUT
|
||||
if (WaitForSingleObject (hInput, dwMilliseconds) == WAIT_TIMEOUT)
|
||||
return GC_TIMEOUT;
|
||||
|
||||
//otherwise get the event
|
||||
ReadConsoleInput (hInput, &lpBuffer, 1, &dwRead);
|
||||
//otherwise get the event
|
||||
ReadConsoleInput (hInput, &lpBuffer, 1, &dwRead);
|
||||
|
||||
//if the event is a key pressed
|
||||
if ((lpBuffer.EventType == KEY_EVENT) &&
|
||||
(lpBuffer.Event.KeyEvent.bKeyDown == TRUE))
|
||||
{
|
||||
//read the key
|
||||
//if the event is a key pressed
|
||||
if ((lpBuffer.EventType == KEY_EVENT) &&
|
||||
(lpBuffer.Event.KeyEvent.bKeyDown == TRUE))
|
||||
{
|
||||
//read the key
|
||||
#ifdef _UNICODE
|
||||
*ch = lpBuffer.Event.KeyEvent.uChar.UnicodeChar;
|
||||
*ch = lpBuffer.Event.KeyEvent.uChar.UnicodeChar;
|
||||
#else
|
||||
*ch = lpBuffer.Event.KeyEvent.uChar.AsciiChar;
|
||||
*ch = lpBuffer.Event.KeyEvent.uChar.AsciiChar;
|
||||
#endif
|
||||
return GC_KEYREAD;
|
||||
}
|
||||
return GC_KEYREAD;
|
||||
}
|
||||
|
||||
//else return no key
|
||||
return GC_NOKEY;
|
||||
//else return no key
|
||||
return GC_NOKEY;
|
||||
}
|
||||
|
||||
static INT
|
||||
IsKeyInString (LPTSTR lpString, TCHAR cKey, BOOL bCaseSensitive)
|
||||
{
|
||||
LPTCH p = lpString;
|
||||
INT val = 0;
|
||||
LPTCH p = lpString;
|
||||
INT val = 0;
|
||||
|
||||
while (*p)
|
||||
{
|
||||
if (bCaseSensitive)
|
||||
{
|
||||
if (*p == cKey)
|
||||
return val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_totlower (*p) == _totlower (cKey))
|
||||
return val;
|
||||
}
|
||||
while (*p)
|
||||
{
|
||||
if (bCaseSensitive)
|
||||
{
|
||||
if (*p == cKey)
|
||||
return val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_totlower (*p) == _totlower (cKey))
|
||||
return val;
|
||||
}
|
||||
|
||||
val++;
|
||||
p++;
|
||||
}
|
||||
val++;
|
||||
p++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
CommandChoice (LPTSTR param)
|
||||
{
|
||||
LPTSTR lpOptions;
|
||||
TCHAR Options[6];
|
||||
LPTSTR lpText = NULL;
|
||||
BOOL bNoPrompt = FALSE;
|
||||
BOOL bCaseSensitive = FALSE;
|
||||
BOOL bTimeout = FALSE;
|
||||
INT nTimeout = 0;
|
||||
TCHAR cDefault = _T('\0');
|
||||
INPUT_RECORD ir;
|
||||
LPTSTR p, np;
|
||||
LPTSTR *arg;
|
||||
INT argc;
|
||||
INT i;
|
||||
INT val;
|
||||
LPTSTR lpOptions;
|
||||
TCHAR Options[6];
|
||||
LPTSTR lpText = NULL;
|
||||
BOOL bNoPrompt = FALSE;
|
||||
BOOL bCaseSensitive = FALSE;
|
||||
BOOL bTimeout = FALSE;
|
||||
INT nTimeout = 0;
|
||||
TCHAR cDefault = _T('\0');
|
||||
INPUT_RECORD ir;
|
||||
LPTSTR p, np;
|
||||
LPTSTR *arg;
|
||||
INT argc;
|
||||
INT i;
|
||||
INT val;
|
||||
|
||||
INT GCret;
|
||||
TCHAR Ch;
|
||||
DWORD amount,clk;
|
||||
INT GCret;
|
||||
TCHAR Ch;
|
||||
DWORD amount,clk;
|
||||
|
||||
LoadString(CMD_ModuleHandle, STRING_CHOICE_OPTION, Options, 4);
|
||||
lpOptions = Options;
|
||||
LoadString(CMD_ModuleHandle, STRING_CHOICE_OPTION, Options, 4);
|
||||
lpOptions = Options;
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CHOICE_HELP);
|
||||
return 0;
|
||||
}
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CHOICE_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* retrieve text */
|
||||
p = param;
|
||||
/* retrieve text */
|
||||
p = param;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
if (*p == _T('\0'))
|
||||
break;
|
||||
while (TRUE)
|
||||
{
|
||||
if (*p == _T('\0'))
|
||||
break;
|
||||
|
||||
if (*p != _T('/'))
|
||||
{
|
||||
lpText = p;
|
||||
break;
|
||||
}
|
||||
np = _tcschr (p, _T(' '));
|
||||
if (!np)
|
||||
break;
|
||||
p = np + 1;
|
||||
}
|
||||
if (*p != _T('/'))
|
||||
{
|
||||
lpText = p;
|
||||
break;
|
||||
}
|
||||
np = _tcschr (p, _T(' '));
|
||||
if (!np)
|
||||
break;
|
||||
p = np + 1;
|
||||
}
|
||||
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
|
||||
/* evaluate arguments */
|
||||
if (argc > 0)
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsnicmp (arg[i], _T("/c"), 2) == 0)
|
||||
{
|
||||
if (arg[i][2] == _T(':'))
|
||||
lpOptions = &arg[i][3];
|
||||
else
|
||||
lpOptions = &arg[i][2];
|
||||
/* evaluate arguments */
|
||||
if (argc > 0)
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsnicmp (arg[i], _T("/c"), 2) == 0)
|
||||
{
|
||||
if (arg[i][2] == _T(':'))
|
||||
lpOptions = &arg[i][3];
|
||||
else
|
||||
lpOptions = &arg[i][2];
|
||||
|
||||
if (_tcslen (lpOptions) == 0)
|
||||
{
|
||||
ConErrResPuts(STRING_CHOICE_ERROR);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/n"), 2) == 0)
|
||||
{
|
||||
bNoPrompt = TRUE;
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/s"), 2) == 0)
|
||||
{
|
||||
bCaseSensitive = TRUE;
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/t"), 2) == 0)
|
||||
{
|
||||
LPTSTR s;
|
||||
if (_tcslen (lpOptions) == 0)
|
||||
{
|
||||
ConErrResPuts(STRING_CHOICE_ERROR);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/n"), 2) == 0)
|
||||
{
|
||||
bNoPrompt = TRUE;
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/s"), 2) == 0)
|
||||
{
|
||||
bCaseSensitive = TRUE;
|
||||
}
|
||||
else if (_tcsnicmp (arg[i], _T("/t"), 2) == 0)
|
||||
{
|
||||
LPTSTR s;
|
||||
|
||||
if (arg[i][2] == _T(':'))
|
||||
{
|
||||
cDefault = arg[i][3];
|
||||
s = &arg[i][4];
|
||||
}
|
||||
else
|
||||
{
|
||||
cDefault = arg[i][2];
|
||||
s = &arg[i][3];
|
||||
}
|
||||
if (arg[i][2] == _T(':'))
|
||||
{
|
||||
cDefault = arg[i][3];
|
||||
s = &arg[i][4];
|
||||
}
|
||||
else
|
||||
{
|
||||
cDefault = arg[i][2];
|
||||
s = &arg[i][3];
|
||||
}
|
||||
|
||||
if (*s != _T(','))
|
||||
{
|
||||
ConErrResPuts(STRING_CHOICE_ERROR_TXT);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
if (*s != _T(','))
|
||||
{
|
||||
ConErrResPuts(STRING_CHOICE_ERROR_TXT);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s++;
|
||||
nTimeout = _ttoi(s);
|
||||
bTimeout = TRUE;
|
||||
}
|
||||
else if (arg[i][0] == _T('/'))
|
||||
{
|
||||
ConErrResPrintf(STRING_CHOICE_ERROR_OPTION, arg[i]);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
s++;
|
||||
nTimeout = _ttoi(s);
|
||||
bTimeout = TRUE;
|
||||
}
|
||||
else if (arg[i][0] == _T('/'))
|
||||
{
|
||||
ConErrResPrintf(STRING_CHOICE_ERROR_OPTION, arg[i]);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* print text */
|
||||
if (lpText)
|
||||
ConOutPrintf (_T("%s"), lpText);
|
||||
/* print text */
|
||||
if (lpText)
|
||||
ConOutPrintf (_T("%s"), lpText);
|
||||
|
||||
/* print options */
|
||||
if (bNoPrompt == FALSE)
|
||||
{
|
||||
ConOutPrintf (_T("[%c"), lpOptions[0]);
|
||||
/* print options */
|
||||
if (bNoPrompt == FALSE)
|
||||
{
|
||||
ConOutPrintf (_T("[%c"), lpOptions[0]);
|
||||
|
||||
for (i = 1; (unsigned)i < _tcslen (lpOptions); i++)
|
||||
ConOutPrintf (_T(",%c"), lpOptions[i]);
|
||||
for (i = 1; (unsigned)i < _tcslen (lpOptions); i++)
|
||||
ConOutPrintf (_T(",%c"), lpOptions[i]);
|
||||
|
||||
ConOutPrintf (_T("]?"));
|
||||
}
|
||||
ConOutPrintf (_T("]?"));
|
||||
}
|
||||
|
||||
ConInFlush ();
|
||||
ConInFlush ();
|
||||
|
||||
if(!bTimeout)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
ConInKey (&ir);
|
||||
if (!bTimeout)
|
||||
{
|
||||
while (TRUE)
|
||||
{
|
||||
ConInKey (&ir);
|
||||
|
||||
val = IsKeyInString (lpOptions,
|
||||
val = IsKeyInString (lpOptions,
|
||||
#ifdef _UNICODE
|
||||
ir.Event.KeyEvent.uChar.UnicodeChar,
|
||||
ir.Event.KeyEvent.uChar.UnicodeChar,
|
||||
#else
|
||||
ir.Event.KeyEvent.uChar.AsciiChar,
|
||||
ir.Event.KeyEvent.uChar.AsciiChar,
|
||||
#endif
|
||||
bCaseSensitive);
|
||||
bCaseSensitive);
|
||||
|
||||
if (val >= 0)
|
||||
{
|
||||
ConOutPrintf (_T("%c\n"), lpOptions[val]);
|
||||
if (val >= 0)
|
||||
{
|
||||
ConOutPrintf (_T("%c\n"), lpOptions[val]);
|
||||
|
||||
nErrorLevel = val + 1;
|
||||
nErrorLevel = val + 1;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Beep (440, 50);
|
||||
}
|
||||
Beep (440, 50);
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
TRACE ("ErrorLevel: %d\n", nErrorLevel);
|
||||
return 0;
|
||||
}
|
||||
freep (arg);
|
||||
TRACE ("ErrorLevel: %d\n", nErrorLevel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
clk = GetTickCount ();
|
||||
amount = nTimeout*1000;
|
||||
clk = GetTickCount ();
|
||||
amount = nTimeout*1000;
|
||||
|
||||
loop:
|
||||
GCret = GetCharacterTimeout (&Ch, amount - (GetTickCount () - clk));
|
||||
GCret = GetCharacterTimeout (&Ch, amount - (GetTickCount () - clk));
|
||||
|
||||
switch (GCret)
|
||||
{
|
||||
case GC_TIMEOUT:
|
||||
TRACE ("GC_TIMEOUT\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
break;
|
||||
switch (GCret)
|
||||
{
|
||||
case GC_TIMEOUT:
|
||||
TRACE ("GC_TIMEOUT\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
break;
|
||||
|
||||
case GC_NOKEY:
|
||||
TRACE ("GC_NOKEY\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
goto loop;
|
||||
case GC_NOKEY:
|
||||
TRACE ("GC_NOKEY\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
goto loop;
|
||||
|
||||
case GC_KEYREAD:
|
||||
TRACE ("GC_KEYREAD\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
TRACE ("read %c", Ch);
|
||||
if ((val=IsKeyInString(lpOptions,Ch,bCaseSensitive))==-1)
|
||||
{
|
||||
Beep (440, 50);
|
||||
goto loop;
|
||||
}
|
||||
cDefault=Ch;
|
||||
break;
|
||||
}
|
||||
case GC_KEYREAD:
|
||||
TRACE ("GC_KEYREAD\n");
|
||||
TRACE ("elapsed %d msecs\n", GetTickCount () - clk);
|
||||
TRACE ("read %c", Ch);
|
||||
if ((val=IsKeyInString(lpOptions,Ch,bCaseSensitive))==-1)
|
||||
{
|
||||
Beep (440, 50);
|
||||
goto loop;
|
||||
}
|
||||
cDefault=Ch;
|
||||
break;
|
||||
}
|
||||
|
||||
TRACE ("exiting wait loop after %d msecs\n",
|
||||
GetTickCount () - clk);
|
||||
TRACE ("exiting wait loop after %d msecs\n",
|
||||
GetTickCount () - clk);
|
||||
|
||||
val = IsKeyInString (lpOptions, cDefault, bCaseSensitive);
|
||||
ConOutPrintf (_T("%c\n"), lpOptions[val]);
|
||||
val = IsKeyInString (lpOptions, cDefault, bCaseSensitive);
|
||||
ConOutPrintf(_T("%c\n"), lpOptions[val]);
|
||||
|
||||
nErrorLevel = val + 1;
|
||||
nErrorLevel = val + 1;
|
||||
|
||||
freep (arg);
|
||||
freep (arg);
|
||||
|
||||
TRACE ("ErrorLevel: %d\n", nErrorLevel);
|
||||
TRACE ("ErrorLevel: %d\n", nErrorLevel);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
#endif /* INCLUDE_CMD_CHOICE */
|
||||
|
||||
|
||||
+28
-28
@@ -22,8 +22,8 @@
|
||||
* 20-Jan-1998 (Eric Kohl)
|
||||
* Redirection ready!
|
||||
*
|
||||
* 02-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 02-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -32,34 +32,34 @@
|
||||
|
||||
INT cmd_cls (LPTSTR param)
|
||||
{
|
||||
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
DWORD dwWritten;
|
||||
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
DWORD dwWritten;
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CLS_HELP);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CLS_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (GetConsoleScreenBufferInfo(hOutput, &csbi))
|
||||
{
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute(hOutput, csbi.wAttributes,
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos, &dwWritten);
|
||||
FillConsoleOutputCharacter(hOutput, _T(' '),
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos, &dwWritten);
|
||||
SetConsoleCursorPosition(hOutput, coPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutChar(_T('\f'));
|
||||
}
|
||||
if (GetConsoleScreenBufferInfo(hOutput, &csbi))
|
||||
{
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute(hOutput, csbi.wAttributes,
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos, &dwWritten);
|
||||
FillConsoleOutputCharacter(hOutput, _T(' '),
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos, &dwWritten);
|
||||
SetConsoleCursorPosition(hOutput, coPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutChar(_T('\f'));
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1269
-1270
File diff suppressed because it is too large
Load Diff
+40
-39
@@ -129,12 +129,12 @@ BOOL ReadCommand (LPTSTR, INT);
|
||||
|
||||
typedef struct tagCOMMAND
|
||||
{
|
||||
LPTSTR name;
|
||||
INT flags;
|
||||
INT (*func)(LPTSTR);
|
||||
LPTSTR name;
|
||||
INT flags;
|
||||
INT (*func)(LPTSTR);
|
||||
} COMMAND, *LPCOMMAND;
|
||||
|
||||
extern COMMAND cmds[]; /* The internal command table */
|
||||
extern COMMAND cmds[]; /* The internal command table */
|
||||
|
||||
VOID PrintCommandList (VOID);
|
||||
VOID PrintCommandListDetail (VOID);
|
||||
@@ -366,33 +366,33 @@ INT CommandMsgbox (LPTSTR);
|
||||
enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE, C_IF, C_FOR };
|
||||
typedef struct _PARSED_COMMAND
|
||||
{
|
||||
struct _PARSED_COMMAND *Subcommands;
|
||||
struct _PARSED_COMMAND *Next;
|
||||
struct _REDIRECTION *Redirections;
|
||||
BYTE Type;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
TCHAR *Rest;
|
||||
TCHAR First[];
|
||||
} Command;
|
||||
struct
|
||||
{
|
||||
BYTE Flags;
|
||||
BYTE Operator;
|
||||
TCHAR *LeftArg;
|
||||
TCHAR *RightArg;
|
||||
} If;
|
||||
struct
|
||||
{
|
||||
BYTE Switches;
|
||||
TCHAR Variable;
|
||||
LPTSTR Params;
|
||||
LPTSTR List;
|
||||
struct tagFORCONTEXT *Context;
|
||||
} For;
|
||||
};
|
||||
struct _PARSED_COMMAND *Subcommands;
|
||||
struct _PARSED_COMMAND *Next;
|
||||
struct _REDIRECTION *Redirections;
|
||||
BYTE Type;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
TCHAR *Rest;
|
||||
TCHAR First[];
|
||||
} Command;
|
||||
struct
|
||||
{
|
||||
BYTE Flags;
|
||||
BYTE Operator;
|
||||
TCHAR *LeftArg;
|
||||
TCHAR *RightArg;
|
||||
} If;
|
||||
struct
|
||||
{
|
||||
BYTE Switches;
|
||||
TCHAR Variable;
|
||||
LPTSTR Params;
|
||||
LPTSTR List;
|
||||
struct tagFORCONTEXT *Context;
|
||||
} For;
|
||||
};
|
||||
} PARSED_COMMAND;
|
||||
PARSED_COMMAND *ParseCommand(LPTSTR Line);
|
||||
VOID EchoCommand(PARSED_COMMAND *Cmd);
|
||||
@@ -405,6 +405,7 @@ INT cmd_path (LPTSTR);
|
||||
|
||||
|
||||
/* Prototypes from PROMPT.C */
|
||||
VOID InitPrompt (VOID);
|
||||
VOID PrintPrompt (VOID);
|
||||
INT cmd_prompt (LPTSTR);
|
||||
|
||||
@@ -412,17 +413,17 @@ INT cmd_prompt (LPTSTR);
|
||||
/* Prototypes for REDIR.C */
|
||||
typedef enum _REDIR_MODE
|
||||
{
|
||||
REDIR_READ = 0,
|
||||
REDIR_WRITE = 1,
|
||||
REDIR_APPEND = 2
|
||||
REDIR_READ = 0,
|
||||
REDIR_WRITE = 1,
|
||||
REDIR_APPEND = 2
|
||||
} REDIR_MODE;
|
||||
typedef struct _REDIRECTION
|
||||
{
|
||||
struct _REDIRECTION *Next;
|
||||
HANDLE OldHandle;
|
||||
BYTE Number;
|
||||
REDIR_MODE Mode;
|
||||
TCHAR Filename[];
|
||||
struct _REDIRECTION *Next;
|
||||
HANDLE OldHandle;
|
||||
BYTE Number;
|
||||
REDIR_MODE Mode;
|
||||
TCHAR Filename[];
|
||||
} REDIRECTION;
|
||||
BOOL PerformRedirection(REDIRECTION *);
|
||||
VOID UndoRedirection(REDIRECTION *, REDIRECTION *End);
|
||||
|
||||
+14
-14
@@ -3,28 +3,28 @@
|
||||
#include "resource.h"
|
||||
#include "cmdver.h"
|
||||
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Command Processor\0"
|
||||
#define REACTOS_STR_INTERNAL_NAME "cmd\0"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "cmd.exe\0"
|
||||
#define REACTOS_STR_ORIGINAL_COPYRIGHT "Copyright (C) 1994-1998 Tim Norman and others\0"
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Command Processor\0"
|
||||
#define REACTOS_STR_INTERNAL_NAME "cmd\0"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "cmd.exe\0"
|
||||
#define REACTOS_STR_ORIGINAL_COPYRIGHT "Copyright (C) 1994-1998 Tim Norman and others\0"
|
||||
#define REACTOS_STR_LEGAL_COPYRIGHT "Copyright (C) 1998-2006 Eric Kohl and others\0"
|
||||
|
||||
#include <reactos/version.rc>
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
STRING_FREEDOS_DEV, " Tim Norman Matt Rains\n\
|
||||
Evan Jeffrey Steffen Kaiser\n\
|
||||
Svante Frey Oliver Mueller\n\
|
||||
Aaron Kaufman Marc Desrochers\n\
|
||||
Rob Lake John P Price\n\
|
||||
Hans B Pufal\n"
|
||||
STRING_FREEDOS_DEV, " Tim Norman Matt Rains\n\
|
||||
Evan Jeffrey Steffen Kaiser\n\
|
||||
Svante Frey Oliver Mueller\n\
|
||||
Aaron Kaufman Marc Desrochers\n\
|
||||
Rob Lake John P Price\n\
|
||||
Hans B Pufal\n"
|
||||
|
||||
STRING_REACTOS_DEV, " Eric Kohl Emanuele Aliberti\n\
|
||||
Paolo Pantaleo Phillip Susi\n\
|
||||
Sylvain Petreolle\n"
|
||||
STRING_REACTOS_DEV, " Eric Kohl Emanuele Aliberti\n\
|
||||
Paolo Pantaleo Phillip Susi\n\
|
||||
Sylvain Petreolle\n"
|
||||
END
|
||||
|
||||
1 ICON DISCARDABLE res/terminal.ico
|
||||
1 ICON DISCARDABLE res/terminal.ico
|
||||
|
||||
#include "rsrc.rc"
|
||||
|
||||
+412
-424
@@ -112,503 +112,491 @@ static BOOL bInsert = TRUE;
|
||||
|
||||
|
||||
static VOID
|
||||
ClearCommandLine (LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
||||
ClearCommandLine(LPTSTR str, INT maxlen, SHORT orgx, SHORT orgy)
|
||||
{
|
||||
INT count;
|
||||
INT count;
|
||||
|
||||
SetCursorXY (orgx, orgy);
|
||||
for (count = 0; count < (INT)_tcslen (str); count++)
|
||||
ConOutChar (_T(' '));
|
||||
_tcsnset (str, _T('\0'), maxlen);
|
||||
SetCursorXY (orgx, orgy);
|
||||
SetCursorXY (orgx, orgy);
|
||||
for (count = 0; count < (INT)_tcslen (str); count++)
|
||||
ConOutChar (_T(' '));
|
||||
_tcsnset (str, _T('\0'), maxlen);
|
||||
SetCursorXY (orgx, orgy);
|
||||
}
|
||||
|
||||
|
||||
/* read in a command line */
|
||||
BOOL ReadCommand (LPTSTR str, INT maxlen)
|
||||
BOOL ReadCommand(LPTSTR str, INT maxlen)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
SHORT orgx; /* origin x/y */
|
||||
SHORT orgy;
|
||||
SHORT curx; /*current x/y cursor position*/
|
||||
SHORT cury;
|
||||
SHORT tempscreen;
|
||||
INT count; /*used in some for loops*/
|
||||
INT current = 0; /*the position of the cursor in the string (str)*/
|
||||
INT charcount = 0;/*chars in the string (str)*/
|
||||
INPUT_RECORD ir;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
SHORT orgx; /* origin x/y */
|
||||
SHORT orgy;
|
||||
SHORT curx; /*current x/y cursor position*/
|
||||
SHORT cury;
|
||||
SHORT tempscreen;
|
||||
INT count; /*used in some for loops*/
|
||||
INT current = 0; /*the position of the cursor in the string (str)*/
|
||||
INT charcount = 0;/*chars in the string (str)*/
|
||||
INPUT_RECORD ir;
|
||||
#ifdef FEATURE_UNIX_FILENAME_COMPLETION
|
||||
WORD wLastKey = 0;
|
||||
WORD wLastKey = 0;
|
||||
#endif
|
||||
TCHAR ch;
|
||||
BOOL bReturn = FALSE;
|
||||
BOOL bCharInput;
|
||||
TCHAR ch;
|
||||
BOOL bReturn = FALSE;
|
||||
BOOL bCharInput;
|
||||
#ifdef FEATURE_4NT_FILENAME_COMPLETION
|
||||
TCHAR szPath[MAX_PATH];
|
||||
TCHAR szPath[MAX_PATH];
|
||||
#endif
|
||||
#ifdef FEATURE_HISTORY
|
||||
//BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
|
||||
TCHAR PreviousChar;
|
||||
//BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
|
||||
TCHAR PreviousChar;
|
||||
#endif
|
||||
|
||||
if (!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi))
|
||||
{
|
||||
/* No console */
|
||||
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwRead;
|
||||
CHAR chr;
|
||||
do
|
||||
{
|
||||
if (!ReadFile(hStdin, &chr, 1, &dwRead, NULL) || !dwRead)
|
||||
return FALSE;
|
||||
if (!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi))
|
||||
{
|
||||
/* No console */
|
||||
HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwRead;
|
||||
CHAR chr;
|
||||
do
|
||||
{
|
||||
if (!ReadFile(hStdin, &chr, 1, &dwRead, NULL) || !dwRead)
|
||||
return FALSE;
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(InputCodePage, 0, &chr, 1, &str[charcount++], 1);
|
||||
MultiByteToWideChar(InputCodePage, 0, &chr, 1, &str[charcount++], 1);
|
||||
#endif
|
||||
} while (chr != '\n' && charcount < maxlen);
|
||||
str[charcount] = _T('\0');
|
||||
return TRUE;
|
||||
}
|
||||
} while (chr != '\n' && charcount < maxlen);
|
||||
str[charcount] = _T('\0');
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* get screen size */
|
||||
maxx = csbi.dwSize.X;
|
||||
maxy = csbi.dwSize.Y;
|
||||
/* get screen size */
|
||||
maxx = csbi.dwSize.X;
|
||||
maxy = csbi.dwSize.Y;
|
||||
|
||||
curx = orgx = csbi.dwCursorPosition.X;
|
||||
cury = orgy = csbi.dwCursorPosition.Y;
|
||||
curx = orgx = csbi.dwCursorPosition.X;
|
||||
cury = orgy = csbi.dwCursorPosition.Y;
|
||||
|
||||
memset (str, 0, maxlen * sizeof (TCHAR));
|
||||
memset (str, 0, maxlen * sizeof (TCHAR));
|
||||
|
||||
SetCursorType (bInsert, TRUE);
|
||||
SetCursorType (bInsert, TRUE);
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
bReturn = FALSE;
|
||||
|
||||
ConInKey (&ir);
|
||||
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_ALT_PRESSED|LEFT_ALT_PRESSED|
|
||||
RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED) )
|
||||
{
|
||||
|
||||
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
||||
{
|
||||
do
|
||||
{
|
||||
bReturn = FALSE;
|
||||
ConInKey (&ir);
|
||||
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_ALT_PRESSED |LEFT_ALT_PRESSED|
|
||||
RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED) )
|
||||
{
|
||||
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
||||
{
|
||||
#ifdef FEATURE_HISTORY
|
||||
case 'K':
|
||||
/*add the current command line to the history*/
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||
{
|
||||
if (str[0])
|
||||
History(0,str);
|
||||
|
||||
case 'K':
|
||||
/*add the current command line to the history*/
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||
{
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
current = charcount = 0;
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
//bContinue=TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (str[0])
|
||||
History(0,str);
|
||||
case 'D':
|
||||
/*delete current history entry*/
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||
{
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History_del_current_entry(str);
|
||||
current = charcount = _tcslen (str);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
//bContinue=TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
current = charcount = 0;
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
//bContinue=TRUE;
|
||||
break;
|
||||
}
|
||||
#endif /*FEATURE_HISTORY*/
|
||||
}
|
||||
}
|
||||
|
||||
case 'D':
|
||||
/*delete current history entry*/
|
||||
if (ir.Event.KeyEvent.dwControlKeyState &
|
||||
(LEFT_CTRL_PRESSED|RIGHT_CTRL_PRESSED))
|
||||
{
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History_del_current_entry(str);
|
||||
current = charcount = _tcslen (str);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
//bContinue=TRUE;
|
||||
break;
|
||||
}
|
||||
bCharInput = FALSE;
|
||||
|
||||
#endif/*FEATURE_HISTORY*/
|
||||
}
|
||||
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
||||
{
|
||||
case VK_BACK:
|
||||
/* <BACKSPACE> - delete character to left of cursor */
|
||||
if (current > 0 && charcount > 0)
|
||||
{
|
||||
if (current == charcount)
|
||||
{
|
||||
/* if at end of line */
|
||||
str[current - 1] = _T('\0');
|
||||
if (GetCursorX () != 0)
|
||||
{
|
||||
ConOutPrintf (_T("\b \b"));
|
||||
curx--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
cury--;
|
||||
curx = maxx - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (count = current - 1; count < charcount; count++)
|
||||
str[count] = str[count + 1];
|
||||
if (GetCursorX () != 0)
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () - 1), GetCursorY ());
|
||||
curx--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
cury--;
|
||||
curx = maxx - 1;
|
||||
}
|
||||
GetCursorXY (&curx, &cury);
|
||||
ConOutPrintf (_T("%s "), &str[current - 1]);
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
charcount--;
|
||||
current--;
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_INSERT:
|
||||
/* toggle insert/overstrike mode */
|
||||
bInsert ^= TRUE;
|
||||
SetCursorType (bInsert, TRUE);
|
||||
break;
|
||||
|
||||
case VK_DELETE:
|
||||
/* delete character under cursor */
|
||||
if (current != charcount && charcount > 0)
|
||||
{
|
||||
for (count = current; count < charcount; count++)
|
||||
str[count] = str[count + 1];
|
||||
charcount--;
|
||||
GetCursorXY (&curx, &cury);
|
||||
ConOutPrintf (_T("%s "), &str[current]);
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_HOME:
|
||||
/* goto beginning of string */
|
||||
if (current != 0)
|
||||
{
|
||||
SetCursorXY (orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VK_END:
|
||||
/* goto end of string */
|
||||
if (current != charcount)
|
||||
{
|
||||
SetCursorXY (orgx, orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
current = charcount;
|
||||
}
|
||||
break;
|
||||
|
||||
bCharInput = FALSE;
|
||||
|
||||
switch (ir.Event.KeyEvent.wVirtualKeyCode)
|
||||
{
|
||||
case VK_BACK:
|
||||
/* <BACKSPACE> - delete character to left of cursor */
|
||||
if (current > 0 && charcount > 0)
|
||||
{
|
||||
if (current == charcount)
|
||||
{
|
||||
/* if at end of line */
|
||||
str[current - 1] = _T('\0');
|
||||
if (GetCursorX () != 0)
|
||||
{
|
||||
ConOutPrintf (_T("\b \b"));
|
||||
curx--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
cury--;
|
||||
curx = maxx - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (count = current - 1; count < charcount; count++)
|
||||
str[count] = str[count + 1];
|
||||
if (GetCursorX () != 0)
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () - 1), GetCursorY ());
|
||||
curx--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
cury--;
|
||||
curx = maxx - 1;
|
||||
}
|
||||
GetCursorXY (&curx, &cury);
|
||||
ConOutPrintf (_T("%s "), &str[current - 1]);
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
charcount--;
|
||||
current--;
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_INSERT:
|
||||
/* toggle insert/overstrike mode */
|
||||
bInsert ^= TRUE;
|
||||
SetCursorType (bInsert, TRUE);
|
||||
break;
|
||||
|
||||
case VK_DELETE:
|
||||
/* delete character under cursor */
|
||||
if (current != charcount && charcount > 0)
|
||||
{
|
||||
for (count = current; count < charcount; count++)
|
||||
str[count] = str[count + 1];
|
||||
charcount--;
|
||||
GetCursorXY (&curx, &cury);
|
||||
ConOutPrintf (_T("%s "), &str[current]);
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_HOME:
|
||||
/* goto beginning of string */
|
||||
if (current != 0)
|
||||
{
|
||||
SetCursorXY (orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_END:
|
||||
/* goto end of string */
|
||||
if (current != charcount)
|
||||
{
|
||||
SetCursorXY (orgx, orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
current = charcount;
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_TAB:
|
||||
case VK_TAB:
|
||||
#ifdef FEATURE_UNIX_FILENAME_COMPLETION
|
||||
/* expand current file name */
|
||||
if ((current == charcount) ||
|
||||
(current == charcount - 1 &&
|
||||
str[current] == _T('"'))) /* only works at end of line*/
|
||||
{
|
||||
if (wLastKey != VK_TAB)
|
||||
{
|
||||
/* if first TAB, complete filename*/
|
||||
tempscreen = charcount;
|
||||
CompleteFilename (str, charcount);
|
||||
charcount = _tcslen (str);
|
||||
current = charcount;
|
||||
/* expand current file name */
|
||||
if ((current == charcount) ||
|
||||
(current == charcount - 1 &&
|
||||
str[current] == _T('"'))) /* only works at end of line*/
|
||||
{
|
||||
if (wLastKey != VK_TAB)
|
||||
{
|
||||
/* if first TAB, complete filename*/
|
||||
tempscreen = charcount;
|
||||
CompleteFilename (str, charcount);
|
||||
charcount = _tcslen (str);
|
||||
current = charcount;
|
||||
|
||||
SetCursorXY (orgx, orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
SetCursorXY (orgx, orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
|
||||
if (tempscreen > charcount)
|
||||
{
|
||||
GetCursorXY (&curx, &cury);
|
||||
for (count = tempscreen - charcount; count--; )
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
}
|
||||
if (tempscreen > charcount)
|
||||
{
|
||||
GetCursorXY (&curx, &cury);
|
||||
for (count = tempscreen - charcount; count--; )
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
}
|
||||
|
||||
/* set cursor position */
|
||||
SetCursorXY ((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY (&curx, &cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*if second TAB, list matches*/
|
||||
if (ShowCompletionMatches (str, charcount))
|
||||
{
|
||||
PrintPrompt ();
|
||||
GetCursorXY (&orgx, &orgy);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
/* set cursor position */
|
||||
SetCursorXY ((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY (&curx, &cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*if second TAB, list matches*/
|
||||
if (ShowCompletionMatches (str, charcount))
|
||||
{
|
||||
PrintPrompt();
|
||||
GetCursorXY(&orgx, &orgy);
|
||||
ConOutPrintf(_T("%s"), str);
|
||||
|
||||
/* set cursor position */
|
||||
SetCursorXY ((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY (&curx, &cury);
|
||||
}
|
||||
/* set cursor position */
|
||||
SetCursorXY((orgx + current) % maxx,
|
||||
orgy + (orgx + current) / maxx);
|
||||
GetCursorXY(&curx, &cury);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBeep (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBeep(-1);
|
||||
}
|
||||
#endif
|
||||
#ifdef FEATURE_4NT_FILENAME_COMPLETION
|
||||
/* used to later see if we went down to the next line */
|
||||
tempscreen = charcount;
|
||||
szPath[0]=_T('\0');
|
||||
|
||||
/* used to later see if we went down to the next line */
|
||||
tempscreen = charcount;
|
||||
szPath[0]=_T('\0');
|
||||
/* str is the whole things that is on the current line
|
||||
that is and and out. arg 2 is weather it goes back
|
||||
one file or forward one file */
|
||||
CompleteFilename(str, !(ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED), szPath, current);
|
||||
/* Attempt to clear the line */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = charcount = 0;
|
||||
|
||||
/* str is the whole things that is on the current line
|
||||
that is and and out. arg 2 is weather it goes back
|
||||
one file or forward one file */
|
||||
CompleteFilename(str, !(ir.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED), szPath, current);
|
||||
/* Attempt to clear the line */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = charcount = 0;
|
||||
/* Everything is deleted, lets add it back in */
|
||||
_tcscpy(str,szPath);
|
||||
|
||||
/* Everything is deleted, lets add it back in */
|
||||
_tcscpy(str,szPath);
|
||||
/* Figure out where cusor is going to be after we print it */
|
||||
charcount = _tcslen(str);
|
||||
current = charcount;
|
||||
|
||||
/* Figure out where cusor is going to be after we print it */
|
||||
charcount = _tcslen (str);
|
||||
current = charcount;
|
||||
|
||||
SetCursorXY (orgx, orgy);
|
||||
/* Print out what we have now */
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
|
||||
/* Move cursor accordingly */
|
||||
if(tempscreen > charcount)
|
||||
{
|
||||
GetCursorXY (&curx, &cury);
|
||||
for(count = tempscreen - charcount; count--; )
|
||||
ConOutChar (_T(' '));
|
||||
SetCursorXY (curx, cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
}
|
||||
SetCursorXY((short)(((int)orgx + current) % maxx), (short)((int)orgy + ((int)orgx + current) / maxx));
|
||||
GetCursorXY(&curx, &cury);
|
||||
SetCursorXY(orgx, orgy);
|
||||
/* Print out what we have now */
|
||||
ConOutPrintf(_T("%s"), str);
|
||||
|
||||
/* Move cursor accordingly */
|
||||
if (tempscreen > charcount)
|
||||
{
|
||||
GetCursorXY(&curx, &cury);
|
||||
for(count = tempscreen - charcount; count--; )
|
||||
ConOutChar(_T(' '));
|
||||
SetCursorXY(curx, cury);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
}
|
||||
SetCursorXY((short)(((int)orgx + current) % maxx), (short)((int)orgy + ((int)orgx + current) / maxx));
|
||||
GetCursorXY(&curx, &cury);
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
|
||||
case _T('M'):
|
||||
case _T('C'):
|
||||
/* ^M does the same as return */
|
||||
bCharInput = TRUE;
|
||||
if(!(ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
case _T('M'):
|
||||
case _T('C'):
|
||||
/* ^M does the same as return */
|
||||
bCharInput = TRUE;
|
||||
if (!(ir.Event.KeyEvent.dwControlKeyState &
|
||||
(RIGHT_CTRL_PRESSED|LEFT_CTRL_PRESSED)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_RETURN:
|
||||
/* end input, return to main */
|
||||
case VK_RETURN:
|
||||
/* end input, return to main */
|
||||
#ifdef FEATURE_HISTORY
|
||||
/* add to the history */
|
||||
if (str[0])
|
||||
History (0, str);
|
||||
/* add to the history */
|
||||
if (str[0])
|
||||
History (0, str);
|
||||
#endif
|
||||
str[charcount++] = _T('\n');
|
||||
str[charcount] = _T('\0');
|
||||
ConOutChar (_T('\n'));
|
||||
bReturn = TRUE;
|
||||
break;
|
||||
str[charcount++] = _T('\n');
|
||||
str[charcount] = _T('\0');
|
||||
ConOutChar(_T('\n'));
|
||||
bReturn = TRUE;
|
||||
break;
|
||||
|
||||
case VK_ESCAPE:
|
||||
/* clear str Make this callable! */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = charcount = 0;
|
||||
break;
|
||||
case VK_ESCAPE:
|
||||
/* clear str Make this callable! */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
curx = orgx;
|
||||
cury = orgy;
|
||||
current = charcount = 0;
|
||||
break;
|
||||
|
||||
#ifdef FEATURE_HISTORY
|
||||
case VK_F3:
|
||||
History_move_to_bottom();
|
||||
case VK_F3:
|
||||
History_move_to_bottom();
|
||||
#endif
|
||||
case VK_UP:
|
||||
case VK_UP:
|
||||
#ifdef FEATURE_HISTORY
|
||||
/* get previous command from buffer */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History (-1, str);
|
||||
current = charcount = _tcslen (str);
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
/* get previous command from buffer */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History (-1, str);
|
||||
current = charcount = _tcslen (str);
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
|
||||
case VK_DOWN:
|
||||
case VK_DOWN:
|
||||
#ifdef FEATURE_HISTORY
|
||||
/* get next command from buffer */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History (1, str);
|
||||
current = charcount = _tcslen (str);
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
/* get next command from buffer */
|
||||
ClearCommandLine (str, maxlen, orgx, orgy);
|
||||
History (1, str);
|
||||
current = charcount = _tcslen (str);
|
||||
if (((charcount + orgx) / maxx) + orgy > maxy - 1)
|
||||
orgy += maxy - ((charcount + orgx) / maxx + orgy + 1);
|
||||
ConOutPrintf (_T("%s"), str);
|
||||
GetCursorXY (&curx, &cury);
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
|
||||
case VK_LEFT:
|
||||
/* move cursor left */
|
||||
if (current > 0)
|
||||
{
|
||||
current--;
|
||||
if (GetCursorX () == 0)
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
curx = maxx - 1;
|
||||
cury--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () - 1), GetCursorY ());
|
||||
curx--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBeep (-1);
|
||||
}
|
||||
break;
|
||||
case VK_LEFT:
|
||||
/* move cursor left */
|
||||
if (current > 0)
|
||||
{
|
||||
current--;
|
||||
if (GetCursorX () == 0)
|
||||
{
|
||||
SetCursorXY ((SHORT)(maxx - 1), (SHORT)(GetCursorY () - 1));
|
||||
curx = maxx - 1;
|
||||
cury--;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () - 1), GetCursorY ());
|
||||
curx--;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBeep (-1);
|
||||
}
|
||||
break;
|
||||
|
||||
case VK_RIGHT:
|
||||
/* move cursor right */
|
||||
if (current != charcount)
|
||||
{
|
||||
current++;
|
||||
if (GetCursorX () == maxx - 1)
|
||||
{
|
||||
SetCursorXY (0, (SHORT)(GetCursorY () + 1));
|
||||
curx = 0;
|
||||
cury++;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () + 1), GetCursorY ());
|
||||
curx++;
|
||||
}
|
||||
}
|
||||
case VK_RIGHT:
|
||||
/* move cursor right */
|
||||
if (current != charcount)
|
||||
{
|
||||
current++;
|
||||
if (GetCursorX () == maxx - 1)
|
||||
{
|
||||
SetCursorXY (0, (SHORT)(GetCursorY () + 1));
|
||||
curx = 0;
|
||||
cury++;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCursorXY ((SHORT)(GetCursorX () + 1), GetCursorY ());
|
||||
curx++;
|
||||
}
|
||||
}
|
||||
#ifdef FEATURE_HISTORY
|
||||
else
|
||||
{
|
||||
LPCTSTR last = PeekHistory(-1);
|
||||
if (last && charcount < (INT)_tcslen (last))
|
||||
{
|
||||
PreviousChar = last[current];
|
||||
ConOutChar(PreviousChar);
|
||||
GetCursorXY(&curx, &cury);
|
||||
str[current++] = PreviousChar;
|
||||
charcount++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LPCTSTR last = PeekHistory(-1);
|
||||
if (last && charcount < (INT)_tcslen (last))
|
||||
{
|
||||
PreviousChar = last[current];
|
||||
ConOutChar(PreviousChar);
|
||||
GetCursorXY(&curx, &cury);
|
||||
str[current++] = PreviousChar;
|
||||
charcount++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* This input is just a normal char */
|
||||
bCharInput = TRUE;
|
||||
default:
|
||||
/* This input is just a normal char */
|
||||
bCharInput = TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
#ifdef _UNICODE
|
||||
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||
if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
|
||||
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||
if (ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
|
||||
#else
|
||||
ch = ir.Event.KeyEvent.uChar.AsciiChar;
|
||||
if ((UCHAR)ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
|
||||
ch = ir.Event.KeyEvent.uChar.AsciiChar;
|
||||
if ((UCHAR)ch >= 32 && (charcount != (maxlen - 2)) && bCharInput)
|
||||
#endif /* _UNICODE */
|
||||
{
|
||||
/* insert character into string... */
|
||||
if (bInsert && current != charcount)
|
||||
{
|
||||
/* If this character insertion will cause screen scrolling,
|
||||
* adjust the saved origin of the command prompt. */
|
||||
tempscreen = _tcslen(str + current) + curx;
|
||||
if ((tempscreen % maxx) == (maxx - 1) &&
|
||||
(tempscreen / maxx) + cury == (maxy - 1))
|
||||
{
|
||||
orgy--;
|
||||
cury--;
|
||||
}
|
||||
{
|
||||
/* insert character into string... */
|
||||
if (bInsert && current != charcount)
|
||||
{
|
||||
/* If this character insertion will cause screen scrolling,
|
||||
* adjust the saved origin of the command prompt. */
|
||||
tempscreen = _tcslen(str + current) + curx;
|
||||
if ((tempscreen % maxx) == (maxx - 1) &&
|
||||
(tempscreen / maxx) + cury == (maxy - 1))
|
||||
{
|
||||
orgy--;
|
||||
cury--;
|
||||
}
|
||||
|
||||
for (count = charcount; count > current; count--)
|
||||
str[count] = str[count - 1];
|
||||
str[current++] = ch;
|
||||
if (curx == maxx - 1)
|
||||
curx = 0, cury++;
|
||||
else
|
||||
curx++;
|
||||
ConOutPrintf (_T("%s"), &str[current - 1]);
|
||||
SetCursorXY (curx, cury);
|
||||
charcount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (current == charcount)
|
||||
charcount++;
|
||||
str[current++] = ch;
|
||||
if (GetCursorX () == maxx - 1 && GetCursorY () == maxy - 1)
|
||||
orgy--, cury--;
|
||||
if (GetCursorX () == maxx - 1)
|
||||
curx = 0, cury++;
|
||||
else
|
||||
curx++;
|
||||
ConOutChar (ch);
|
||||
}
|
||||
}
|
||||
for (count = charcount; count > current; count--)
|
||||
str[count] = str[count - 1];
|
||||
str[current++] = ch;
|
||||
if (curx == maxx - 1)
|
||||
curx = 0, cury++;
|
||||
else
|
||||
curx++;
|
||||
ConOutPrintf (_T("%s"), &str[current - 1]);
|
||||
SetCursorXY (curx, cury);
|
||||
charcount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (current == charcount)
|
||||
charcount++;
|
||||
str[current++] = ch;
|
||||
if (GetCursorX () == maxx - 1 && GetCursorY () == maxy - 1)
|
||||
orgy--, cury--;
|
||||
if (GetCursorX () == maxx - 1)
|
||||
curx = 0, cury++;
|
||||
else
|
||||
curx++;
|
||||
ConOutChar (ch);
|
||||
}
|
||||
}
|
||||
|
||||
//wLastKey = ir.Event.KeyEvent.wVirtualKeyCode;
|
||||
}
|
||||
while (!bReturn);
|
||||
//wLastKey = ir.Event.KeyEvent.wVirtualKeyCode;
|
||||
}
|
||||
while (!bReturn);
|
||||
|
||||
SetCursorType (bInsert, TRUE);
|
||||
SetCursorType (bInsert, TRUE);
|
||||
|
||||
#ifdef FEATURE_ALIASES
|
||||
/* expand all aliases */
|
||||
ExpandAlias (str, maxlen);
|
||||
/* expand all aliases */
|
||||
ExpandAlias (str, maxlen);
|
||||
#endif /* FEATURE_ALIAS */
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+95
-93
@@ -19,263 +19,265 @@
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
/* a list of all the internal commands, associating their command names */
|
||||
/* to the functions to process them */
|
||||
/*
|
||||
* A list of all the internal commands, associating their command names
|
||||
* to the functions to process them.
|
||||
*/
|
||||
|
||||
|
||||
COMMAND cmds[] =
|
||||
{
|
||||
{_T("?"), 0, CommandShowCommands},
|
||||
{_T("?"), 0, CommandShowCommands},
|
||||
|
||||
|
||||
#ifdef INCLUDE_CMD_ACTIVATE
|
||||
{_T("activate"), 0, CommandActivate},
|
||||
{_T("activate"), 0, CommandActivate},
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_ALIASES
|
||||
{_T("alias"), 0, CommandAlias},
|
||||
{_T("alias"), 0, CommandAlias},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_ASSOC
|
||||
{_T("assoc"), 0, CommandAssoc},
|
||||
{_T("assoc"), 0, CommandAssoc},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_ATTRIB
|
||||
{_T("attrib"), 0, CommandAttrib},
|
||||
{_T("attrib"), 0, CommandAttrib},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_BEEP
|
||||
{_T("beep"), 0, cmd_beep},
|
||||
{_T("beep"), 0, cmd_beep},
|
||||
#endif
|
||||
|
||||
{_T("call"), CMD_BATCHONLY, cmd_call},
|
||||
{_T("call"), CMD_BATCHONLY, cmd_call},
|
||||
|
||||
#ifdef INCLUDE_CMD_CHDIR
|
||||
{_T("cd"), CMD_SPECIAL, cmd_chdir},
|
||||
{_T("chdir"), CMD_SPECIAL, cmd_chdir},
|
||||
{_T("cd"), CMD_SPECIAL, cmd_chdir},
|
||||
{_T("chdir"), CMD_SPECIAL, cmd_chdir},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_CHCP
|
||||
{_T("chcp"), 0, CommandChcp},
|
||||
{_T("chcp"), 0, CommandChcp},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_CHOICE
|
||||
{_T("choice"), 0, CommandChoice},
|
||||
{_T("choice"), 0, CommandChoice},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_CLS
|
||||
{_T("cls"), 0, cmd_cls},
|
||||
{_T("cls"), 0, cmd_cls},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_COLOR
|
||||
{_T("color"), 0, CommandColor},
|
||||
{_T("color"), 0, CommandColor},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_COPY
|
||||
{_T("copy"), 0, cmd_copy},
|
||||
{_T("copy"), 0, cmd_copy},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_DATE
|
||||
{_T("date"), 0, cmd_date},
|
||||
{_T("date"), 0, cmd_date},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_DEL
|
||||
{_T("del"), 0, CommandDelete},
|
||||
{_T("delete"), 0, CommandDelete},
|
||||
{_T("del"), 0, CommandDelete},
|
||||
{_T("delete"), 0, CommandDelete},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_DELAY
|
||||
{_T("delay"), 0, CommandDelay},
|
||||
{_T("delay"), 0, CommandDelay},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_DIR
|
||||
{_T("dir"), CMD_SPECIAL, CommandDir},
|
||||
{_T("dir"), CMD_SPECIAL, CommandDir},
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
{_T("dirs"), 0, CommandDirs},
|
||||
{_T("dirs"), 0, CommandDirs},
|
||||
#endif
|
||||
|
||||
{_T("echo"), CMD_SPECIAL, CommandEcho},
|
||||
{_T("echos"), 0, CommandEchos},
|
||||
{_T("echoerr"), CMD_SPECIAL, CommandEchoerr},
|
||||
{_T("echoserr"), 0, CommandEchoserr},
|
||||
{_T("echo"), CMD_SPECIAL, CommandEcho},
|
||||
{_T("echos"), 0, CommandEchos},
|
||||
{_T("echoerr"), CMD_SPECIAL, CommandEchoerr},
|
||||
{_T("echoserr"), 0, CommandEchoserr},
|
||||
|
||||
{_T("endlocal"), 0, cmd_endlocal},
|
||||
{_T("endlocal"), 0, cmd_endlocal},
|
||||
|
||||
#ifdef INCLUDE_CMD_DEL
|
||||
{_T("erase"), 0, CommandDelete},
|
||||
{_T("erase"), 0, CommandDelete},
|
||||
#endif
|
||||
|
||||
{_T("exit"), 0, CommandExit},
|
||||
{_T("exit"), 0, CommandExit},
|
||||
|
||||
{_T("for"), 0, cmd_for},
|
||||
{_T("for"), 0, cmd_for},
|
||||
|
||||
#ifdef INCLUDE_CMD_FREE
|
||||
{_T("free"), 0, CommandFree},
|
||||
{_T("free"), 0, CommandFree},
|
||||
#endif
|
||||
|
||||
{_T("goto"), CMD_BATCHONLY, cmd_goto},
|
||||
{_T("goto"), CMD_BATCHONLY, cmd_goto},
|
||||
|
||||
{_T("help"), 0, CommandShowCommandsDetail},
|
||||
{_T("help"), 0, CommandShowCommandsDetail},
|
||||
|
||||
#ifdef FEATURE_HISTORY
|
||||
{_T("history"), 0, CommandHistory},
|
||||
{_T("history"), 0, CommandHistory},
|
||||
#endif
|
||||
|
||||
{_T("if"), 0, cmd_if},
|
||||
{_T("if"), 0, cmd_if},
|
||||
|
||||
#ifdef INCLUDE_CMD_LABEL
|
||||
{_T("label"), 0, cmd_label},
|
||||
{_T("label"), 0, cmd_label},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_MEMORY
|
||||
{_T("memory"), 0, CommandMemory},
|
||||
{_T("memory"), 0, CommandMemory},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_MKDIR
|
||||
{_T("md"), CMD_SPECIAL, cmd_mkdir},
|
||||
{_T("mkdir"), CMD_SPECIAL, cmd_mkdir},
|
||||
{_T("md"), CMD_SPECIAL, cmd_mkdir},
|
||||
{_T("mkdir"), CMD_SPECIAL, cmd_mkdir},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_MKLINK
|
||||
{_T("mklink"), 0, cmd_mklink},
|
||||
{_T("mklink"), 0, cmd_mklink},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_MOVE
|
||||
{_T("move"), 0, cmd_move},
|
||||
{_T("move"), 0, cmd_move},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_MSGBOX
|
||||
{_T("msgbox"), 0, CommandMsgbox},
|
||||
{_T("msgbox"), 0, CommandMsgbox},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_PATH
|
||||
{_T("path"), 0, cmd_path},
|
||||
{_T("path"), 0, cmd_path},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_PAUSE
|
||||
{_T("pause"), 0, cmd_pause},
|
||||
{_T("pause"), 0, cmd_pause},
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
{_T("popd"), 0, CommandPopd},
|
||||
{_T("popd"), 0, CommandPopd},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_PROMPT
|
||||
{_T("prompt"), 0, cmd_prompt},
|
||||
{_T("prompt"), 0, cmd_prompt},
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
{_T("pushd"), 0, CommandPushd},
|
||||
{_T("pushd"), 0, CommandPushd},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_RMDIR
|
||||
{_T("rd"), CMD_SPECIAL, cmd_rmdir},
|
||||
{_T("rd"), CMD_SPECIAL, cmd_rmdir},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_REM
|
||||
{_T("rem"), 0, CommandRem},
|
||||
{_T("rem"), 0, CommandRem},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_RENAME
|
||||
{_T("ren"), 0, cmd_rename},
|
||||
{_T("rename"), 0, cmd_rename},
|
||||
{_T("ren"), 0, cmd_rename},
|
||||
{_T("rename"), 0, cmd_rename},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_REPLACE
|
||||
{_T("replace"), 0, cmd_replace},
|
||||
{_T("replace"), 0, cmd_replace},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_RMDIR
|
||||
{_T("rmdir"), CMD_SPECIAL, cmd_rmdir},
|
||||
{_T("rmdir"), CMD_SPECIAL, cmd_rmdir},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_SCREEN
|
||||
{_T("screen"), 0, CommandScreen},
|
||||
{_T("screen"), 0, CommandScreen},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_SET
|
||||
{_T("set"), 0, cmd_set},
|
||||
{_T("set"), 0, cmd_set},
|
||||
#endif
|
||||
|
||||
{_T("setlocal"), 0, cmd_setlocal},
|
||||
{_T("setlocal"), 0, cmd_setlocal},
|
||||
|
||||
{_T("shift"), CMD_BATCHONLY, cmd_shift},
|
||||
{_T("shift"), CMD_BATCHONLY, cmd_shift},
|
||||
|
||||
#ifdef INCLUDE_CMD_START
|
||||
{_T("start"), 0, cmd_start},
|
||||
{_T("start"), 0, cmd_start},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_TIME
|
||||
{_T("time"), 0, cmd_time},
|
||||
{_T("time"), 0, cmd_time},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_TIMER
|
||||
{_T("timer"), 0, CommandTimer},
|
||||
{_T("timer"), 0, CommandTimer},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_TITLE
|
||||
{_T("title"), 0, cmd_title},
|
||||
{_T("title"), 0, cmd_title},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_TYPE
|
||||
{_T("type"), 0, cmd_type},
|
||||
{_T("type"), 0, cmd_type},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_VER
|
||||
{_T("ver"), 0, cmd_ver},
|
||||
{_T("ver"), 0, cmd_ver},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_VERIFY
|
||||
{_T("verify"), 0, cmd_verify},
|
||||
{_T("verify"), 0, cmd_verify},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_VOL
|
||||
{_T("vol"), 0, cmd_vol},
|
||||
{_T("vol"), 0, cmd_vol},
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_CMD_WINDOW
|
||||
{_T("window"), 0, CommandWindow},
|
||||
{_T("window"), 0, CommandWindow},
|
||||
#endif
|
||||
|
||||
{NULL, 0, NULL}
|
||||
{NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
VOID PrintCommandList (VOID)
|
||||
VOID PrintCommandList(VOID)
|
||||
{
|
||||
LPCOMMAND cmdptr;
|
||||
INT y;
|
||||
LPCOMMAND cmdptr;
|
||||
INT y;
|
||||
|
||||
y = 0;
|
||||
cmdptr = cmds;
|
||||
while (cmdptr->name)
|
||||
{
|
||||
if (!(cmdptr->flags & CMD_HIDE))
|
||||
{
|
||||
if (++y == 8)
|
||||
{
|
||||
ConOutPuts (cmdptr->name);
|
||||
y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutPrintf (_T("%-10s"), cmdptr->name);
|
||||
}
|
||||
}
|
||||
y = 0;
|
||||
cmdptr = cmds;
|
||||
while (cmdptr->name)
|
||||
{
|
||||
if (!(cmdptr->flags & CMD_HIDE))
|
||||
{
|
||||
if (++y == 8)
|
||||
{
|
||||
ConOutPuts(cmdptr->name);
|
||||
y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutPrintf (_T("%-10s"), cmdptr->name);
|
||||
}
|
||||
}
|
||||
|
||||
cmdptr++;
|
||||
}
|
||||
cmdptr++;
|
||||
}
|
||||
|
||||
if (y != 0)
|
||||
ConOutChar ('\n');
|
||||
if (y != 0)
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
|
||||
VOID PrintCommandListDetail (VOID)
|
||||
VOID PrintCommandListDetail(VOID)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_HELP1);
|
||||
ConOutResPaging(FALSE,STRING_HELP2);
|
||||
ConOutResPaging(TRUE , STRING_HELP1);
|
||||
ConOutResPaging(FALSE, STRING_HELP2);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+87
-87
@@ -16,8 +16,8 @@
|
||||
* 14-Oct-1999 (Paolo Pantaleo <[email protected]>)
|
||||
* 4nt's syntax implemented.
|
||||
*
|
||||
* 03-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Move all hardcoded strings to En.rc.
|
||||
* 03-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Move all hardcoded strings in En.rc.
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -26,32 +26,32 @@
|
||||
|
||||
BOOL SetScreenColor(WORD wColor, BOOL bNoFill)
|
||||
{
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD dwWritten;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD dwWritten;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
|
||||
/* Foreground and Background colors can't be the same */
|
||||
if ((wColor & 0x0F) == (wColor & 0xF0) >> 4)
|
||||
return FALSE;
|
||||
/* Foreground and Background colors can't be the same */
|
||||
if ((wColor & 0x0F) == (wColor & 0xF0) >> 4)
|
||||
return FALSE;
|
||||
|
||||
/* Fill the whole background if needed */
|
||||
if (bNoFill != TRUE)
|
||||
{
|
||||
GetConsoleScreenBufferInfo(hConsole, &csbi);
|
||||
/* Fill the whole background if needed */
|
||||
if (bNoFill != TRUE)
|
||||
{
|
||||
GetConsoleScreenBufferInfo(hConsole, &csbi);
|
||||
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute(hConsole,
|
||||
wColor & 0x00FF,
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos,
|
||||
&dwWritten);
|
||||
}
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute(hConsole,
|
||||
wColor & 0x00FF,
|
||||
csbi.dwSize.X * csbi.dwSize.Y,
|
||||
coPos,
|
||||
&dwWritten);
|
||||
}
|
||||
|
||||
/* Set the text attribute */
|
||||
SetConsoleTextAttribute(hConsole, wColor & 0x00FF);
|
||||
return TRUE;
|
||||
/* Set the text attribute */
|
||||
SetConsoleTextAttribute(hConsole, wColor & 0x00FF);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -61,76 +61,76 @@ BOOL SetScreenColor(WORD wColor, BOOL bNoFill)
|
||||
*/
|
||||
INT CommandColor(LPTSTR rest)
|
||||
{
|
||||
WORD wColor = 0x00;
|
||||
WORD wColor = 0x00;
|
||||
|
||||
/* The user asked for help */
|
||||
if (_tcsncmp(rest, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
return 0;
|
||||
}
|
||||
/* The user asked for help */
|
||||
if (_tcsncmp(rest, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Let's prepare %ERRORLEVEL% */
|
||||
nErrorLevel = 0;
|
||||
/* Let's prepare %ERRORLEVEL% */
|
||||
nErrorLevel = 0;
|
||||
|
||||
/* No parameter. Set the default colors */
|
||||
if (rest[0] == _T('\0'))
|
||||
{
|
||||
SetScreenColor(wDefColor, FALSE);
|
||||
return 0;
|
||||
}
|
||||
/* No parameter. Set the default colors */
|
||||
if (rest[0] == _T('\0'))
|
||||
{
|
||||
SetScreenColor(wDefColor, FALSE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The parameter is just one character: Set color text */
|
||||
if (_tcslen(rest) == 1)
|
||||
{
|
||||
if ((rest[0] >= _T('0')) && (rest[0] <= _T('9')))
|
||||
{
|
||||
wColor = (WORD)_ttoi(rest);
|
||||
}
|
||||
else if ((rest[0] >= _T('a')) && (rest[0] <= _T('f')))
|
||||
{
|
||||
wColor = (WORD)(rest[0] + 10 - _T('a'));
|
||||
}
|
||||
else if ((rest[0] >= _T('A')) && (rest[0] <= _T('F')))
|
||||
{
|
||||
wColor = (WORD)(rest[0] + 10 - _T('A'));
|
||||
}
|
||||
else /* Invalid character */
|
||||
{
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* Color string: advanced choice: two-digits, "Color ON Color" , "Foreground ON Background" */
|
||||
else if (StringToColor(&wColor, &rest) == FALSE)
|
||||
{
|
||||
/* Invalid color string */
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
/* The parameter is just one character: Set color text */
|
||||
if (_tcslen(rest) == 1)
|
||||
{
|
||||
if ((rest[0] >= _T('0')) && (rest[0] <= _T('9')))
|
||||
{
|
||||
wColor = (WORD)_ttoi(rest);
|
||||
}
|
||||
else if ((rest[0] >= _T('a')) && (rest[0] <= _T('f')))
|
||||
{
|
||||
wColor = (WORD)(rest[0] + 10 - _T('a'));
|
||||
}
|
||||
else if ((rest[0] >= _T('A')) && (rest[0] <= _T('F')))
|
||||
{
|
||||
wColor = (WORD)(rest[0] + 10 - _T('A'));
|
||||
}
|
||||
else /* Invalid character */
|
||||
{
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/* Color string: advanced choice: two-digits, "Color ON Color" , "Foreground ON Background" */
|
||||
else if (StringToColor(&wColor, &rest) == FALSE)
|
||||
{
|
||||
/* Invalid color string */
|
||||
ConOutResPaging(TRUE, STRING_COLOR_HELP1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Print the chosen color if we are in echo mode (NOTE: Not Windows-compliant) */
|
||||
if ((bc && bc->bEcho) || !bc)
|
||||
{
|
||||
ConErrResPrintf(STRING_COLOR_ERROR3, wColor);
|
||||
}
|
||||
/* Print the chosen color if we are in echo mode (NOTE: Not Windows-compliant) */
|
||||
if ((bc && bc->bEcho) || !bc)
|
||||
{
|
||||
ConErrResPrintf(STRING_COLOR_ERROR3, wColor);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the chosen color. Use also the following advanced flag:
|
||||
* /-F to avoid changing already buffered foreground/background.
|
||||
*/
|
||||
if (SetScreenColor(wColor, (_tcsstr(rest, _T("/-F")) || _tcsstr(rest, _T("/-f")))) == FALSE)
|
||||
{
|
||||
/* Failed because foreground and background colors were the same */
|
||||
ConErrResPuts(STRING_COLOR_ERROR1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
* Set the chosen color. Use also the following advanced flag:
|
||||
* /-F to avoid changing already buffered foreground/background.
|
||||
*/
|
||||
if (SetScreenColor(wColor, (_tcsstr(rest, _T("/-F")) || _tcsstr(rest, _T("/-f")))) == FALSE)
|
||||
{
|
||||
/* Failed because foreground and background colors were the same */
|
||||
ConErrResPuts(STRING_COLOR_ERROR1);
|
||||
nErrorLevel = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Return success */
|
||||
return 0;
|
||||
/* Return success */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_COLOR */
|
||||
|
||||
+360
-289
@@ -7,13 +7,13 @@
|
||||
* 20-Jan-1999 (Eric Kohl)
|
||||
* started
|
||||
*
|
||||
* 03-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 03-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*
|
||||
* 01-Jul-2005 (Brandon Turner) <[email protected]>)
|
||||
* 01-Jul-2005 (Brandon Turner <[email protected]>)
|
||||
* Added ConPrintfPaging and ConOutPrintfPaging
|
||||
*
|
||||
* 02-Feb-2007 (Paolo Devoti) <devotip at gmail.com>)
|
||||
* 02-Feb-2007 (Paolo Devoti <devotip at gmail.com>)
|
||||
* Fixed ConPrintfPaging
|
||||
*/
|
||||
|
||||
@@ -26,443 +26,514 @@ UINT InputCodePage;
|
||||
UINT OutputCodePage;
|
||||
|
||||
|
||||
VOID ConInDisable (VOID)
|
||||
BOOL IsConsoleHandle(HANDLE hHandle)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
DWORD dwMode;
|
||||
|
||||
GetConsoleMode (hInput, &dwMode);
|
||||
dwMode &= ~ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (hInput, dwMode);
|
||||
/* Check whether the handle may be that of a console... */
|
||||
if ((GetFileType(hHandle) & FILE_TYPE_CHAR) == 0) return FALSE;
|
||||
|
||||
/*
|
||||
* It may be. Perform another test... The idea comes from the
|
||||
* MSDN description of the WriteConsole API:
|
||||
*
|
||||
* "WriteConsole fails if it is used with a standard handle
|
||||
* that is redirected to a file. If an application processes
|
||||
* multilingual output that can be redirected, determine whether
|
||||
* the output handle is a console handle (one method is to call
|
||||
* the GetConsoleMode function and check whether it succeeds).
|
||||
* If the handle is a console handle, call WriteConsole. If the
|
||||
* handle is not a console handle, the output is redirected and
|
||||
* you should call WriteFile to perform the I/O."
|
||||
*/
|
||||
return GetConsoleMode(hHandle, &dwMode);
|
||||
}
|
||||
|
||||
VOID ConInDisable(VOID)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
|
||||
GetConsoleMode(hInput, &dwMode);
|
||||
dwMode &= ~ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode(hInput, dwMode);
|
||||
}
|
||||
|
||||
|
||||
VOID ConInEnable (VOID)
|
||||
VOID ConInEnable(VOID)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwMode;
|
||||
|
||||
GetConsoleMode (hInput, &dwMode);
|
||||
dwMode |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (hInput, dwMode);
|
||||
GetConsoleMode(hInput, &dwMode);
|
||||
dwMode |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode(hInput, dwMode);
|
||||
}
|
||||
|
||||
|
||||
VOID ConInFlush (VOID)
|
||||
{
|
||||
FlushConsoleInputBuffer (GetStdHandle (STD_INPUT_HANDLE));
|
||||
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
|
||||
}
|
||||
|
||||
|
||||
VOID ConInKey (PINPUT_RECORD lpBuffer)
|
||||
VOID ConInKey(PINPUT_RECORD lpBuffer)
|
||||
{
|
||||
HANDLE hInput = GetStdHandle (STD_INPUT_HANDLE);
|
||||
DWORD dwRead;
|
||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||
DWORD dwRead;
|
||||
|
||||
if (hInput == INVALID_HANDLE_VALUE)
|
||||
WARN ("Invalid input handle!!!\n");
|
||||
if (hInput == INVALID_HANDLE_VALUE)
|
||||
WARN ("Invalid input handle!!!\n");
|
||||
|
||||
do
|
||||
{
|
||||
ReadConsoleInput (hInput, lpBuffer, 1, &dwRead);
|
||||
if ((lpBuffer->EventType == KEY_EVENT) &&
|
||||
(lpBuffer->Event.KeyEvent.bKeyDown == TRUE))
|
||||
break;
|
||||
}
|
||||
while (TRUE);
|
||||
do
|
||||
{
|
||||
ReadConsoleInput(hInput, lpBuffer, 1, &dwRead);
|
||||
if ((lpBuffer->EventType == KEY_EVENT) &&
|
||||
(lpBuffer->Event.KeyEvent.bKeyDown == TRUE))
|
||||
break;
|
||||
}
|
||||
while (TRUE);
|
||||
}
|
||||
|
||||
|
||||
VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
||||
VOID ConInString(LPTSTR lpInput, DWORD dwLength)
|
||||
{
|
||||
DWORD dwOldMode;
|
||||
DWORD dwRead = 0;
|
||||
HANDLE hFile;
|
||||
DWORD dwOldMode;
|
||||
DWORD dwRead = 0;
|
||||
HANDLE hFile;
|
||||
|
||||
LPTSTR p;
|
||||
PCHAR pBuf;
|
||||
LPTSTR p;
|
||||
PCHAR pBuf;
|
||||
|
||||
#ifdef _UNICODE
|
||||
pBuf = (PCHAR)cmd_alloc(dwLength - 1);
|
||||
pBuf = (PCHAR)cmd_alloc(dwLength - 1);
|
||||
#else
|
||||
pBuf = lpInput;
|
||||
pBuf = lpInput;
|
||||
#endif
|
||||
ZeroMemory (lpInput, dwLength * sizeof(TCHAR));
|
||||
hFile = GetStdHandle (STD_INPUT_HANDLE);
|
||||
GetConsoleMode (hFile, &dwOldMode);
|
||||
ZeroMemory(lpInput, dwLength * sizeof(TCHAR));
|
||||
hFile = GetStdHandle(STD_INPUT_HANDLE);
|
||||
GetConsoleMode(hFile, &dwOldMode);
|
||||
|
||||
SetConsoleMode (hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||
SetConsoleMode(hFile, ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT);
|
||||
|
||||
ReadFile (hFile, (PVOID)pBuf, dwLength - 1, &dwRead, NULL);
|
||||
ReadFile(hFile, (PVOID)pBuf, dwLength - 1, &dwRead, NULL);
|
||||
|
||||
#ifdef _UNICODE
|
||||
MultiByteToWideChar(InputCodePage, 0, pBuf, dwRead, lpInput, dwLength - 1);
|
||||
cmd_free(pBuf);
|
||||
MultiByteToWideChar(InputCodePage, 0, pBuf, dwRead, lpInput, dwLength - 1);
|
||||
cmd_free(pBuf);
|
||||
#endif
|
||||
for (p = lpInput; *p; p++)
|
||||
{
|
||||
if (*p == _T('\x0d'))
|
||||
{
|
||||
*p = _T('\0');
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (p = lpInput; *p; p++)
|
||||
{
|
||||
if (*p == _T('\x0d'))
|
||||
{
|
||||
*p = _T('\0');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetConsoleMode (hFile, dwOldMode);
|
||||
SetConsoleMode(hFile, dwOldMode);
|
||||
}
|
||||
|
||||
static VOID ConWrite(TCHAR *str, DWORD len, DWORD nStdHandle)
|
||||
{
|
||||
DWORD dwWritten;
|
||||
HANDLE hOutput = GetStdHandle(nStdHandle);
|
||||
DWORD dwWritten;
|
||||
HANDLE hOutput = GetStdHandle(nStdHandle);
|
||||
PVOID p;
|
||||
|
||||
if (WriteConsole(hOutput, str, len, &dwWritten, NULL))
|
||||
return;
|
||||
/* Check whether we are writing to a console and if so, write to it */
|
||||
if (IsConsoleHandle(hOutput))
|
||||
{
|
||||
if (WriteConsole(hOutput, str, len, &dwWritten, NULL))
|
||||
return;
|
||||
}
|
||||
|
||||
/* We're writing to a file or pipe instead of the console. Convert the
|
||||
* string from TCHARs to the desired output format, if the two differ */
|
||||
if (bUnicodeOutput)
|
||||
{
|
||||
/* We're writing to a file or pipe instead of the console. Convert the
|
||||
* string from TCHARs to the desired output format, if the two differ */
|
||||
if (bUnicodeOutput)
|
||||
{
|
||||
#ifndef _UNICODE
|
||||
WCHAR *buffer = cmd_alloc(len * sizeof(WCHAR));
|
||||
if (!buffer)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return;
|
||||
}
|
||||
len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len);
|
||||
str = (PVOID)buffer;
|
||||
WCHAR *buffer = cmd_alloc(len * sizeof(WCHAR));
|
||||
if (!buffer)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return;
|
||||
}
|
||||
len = (DWORD)MultiByteToWideChar(OutputCodePage, 0, str, (INT)len, buffer, (INT)len);
|
||||
str = (PVOID)buffer;
|
||||
#endif
|
||||
WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
|
||||
/*
|
||||
* Find any newline character in the buffer,
|
||||
* send the part BEFORE the newline, then send
|
||||
* a carriage-return + newline, and then send
|
||||
* the remaining part of the buffer.
|
||||
*
|
||||
* This fixes output in files and serial console.
|
||||
*/
|
||||
while (str && *(PWCHAR)str && len > 0)
|
||||
{
|
||||
p = wcspbrk((PWCHAR)str, L"\r\n");
|
||||
if (p)
|
||||
{
|
||||
len -= ((PWCHAR)p - (PWCHAR)str) + 1;
|
||||
WriteFile(hOutput, str, ((PWCHAR)p - (PWCHAR)str) * sizeof(WCHAR), &dwWritten, NULL);
|
||||
WriteFile(hOutput, L"\r\n", 2 * sizeof(WCHAR), &dwWritten, NULL);
|
||||
str = (PVOID)((PWCHAR)p + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);
|
||||
#ifndef _UNICODE
|
||||
cmd_free(buffer);
|
||||
cmd_free(buffer);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _UNICODE
|
||||
CHAR *buffer = cmd_alloc(len * MB_LEN_MAX * sizeof(CHAR));
|
||||
if (!buffer)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return;
|
||||
}
|
||||
len = WideCharToMultiByte(OutputCodePage, 0, str, len, buffer, len * MB_LEN_MAX, NULL, NULL);
|
||||
str = (PVOID)buffer;
|
||||
CHAR *buffer = cmd_alloc(len * MB_LEN_MAX * sizeof(CHAR));
|
||||
if (!buffer)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return;
|
||||
}
|
||||
len = WideCharToMultiByte(OutputCodePage, 0, str, len, buffer, len * MB_LEN_MAX, NULL, NULL);
|
||||
str = (PVOID)buffer;
|
||||
#endif
|
||||
WriteFile(hOutput, str, len, &dwWritten, NULL);
|
||||
/*
|
||||
* Find any newline character in the buffer,
|
||||
* send the part BEFORE the newline, then send
|
||||
* a carriage-return + newline, and then send
|
||||
* the remaining part of the buffer.
|
||||
*
|
||||
* This fixes output in files and serial console.
|
||||
*/
|
||||
while (str && *(PCHAR)str && len > 0)
|
||||
{
|
||||
p = strpbrk((PCHAR)str, "\r\n");
|
||||
if (p)
|
||||
{
|
||||
len -= ((PCHAR)p - (PCHAR)str) + 1;
|
||||
WriteFile(hOutput, str, ((PCHAR)p - (PCHAR)str), &dwWritten, NULL);
|
||||
WriteFile(hOutput, "\r\n", 2, &dwWritten, NULL);
|
||||
str = (PVOID)((PCHAR)p + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteFile(hOutput, str, len, &dwWritten, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// WriteFile(hOutput, str, len, &dwWritten, NULL);
|
||||
#ifdef _UNICODE
|
||||
cmd_free(buffer);
|
||||
cmd_free(buffer);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VOID ConOutChar (TCHAR c)
|
||||
VOID ConOutChar(TCHAR c)
|
||||
{
|
||||
ConWrite(&c, 1, STD_OUTPUT_HANDLE);
|
||||
ConWrite(&c, 1, STD_OUTPUT_HANDLE);
|
||||
}
|
||||
|
||||
VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
|
||||
{
|
||||
ConWrite(szText, _tcslen(szText), nStdHandle);
|
||||
ConWrite(szText, (DWORD)_tcslen(szText), nStdHandle);
|
||||
}
|
||||
|
||||
VOID ConOutResPaging(BOOL NewPage, UINT resID)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConOutPrintfPaging(NewPage, szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConOutPrintfPaging(NewPage, szMsg);
|
||||
}
|
||||
|
||||
VOID ConOutResPuts (UINT resID)
|
||||
VOID ConOutResPuts(UINT resID)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
|
||||
ConPuts(szMsg, STD_OUTPUT_HANDLE);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPuts(szMsg, STD_OUTPUT_HANDLE);
|
||||
}
|
||||
|
||||
VOID ConOutPuts (LPTSTR szText)
|
||||
VOID ConOutPuts(LPTSTR szText)
|
||||
{
|
||||
ConPuts(szText, STD_OUTPUT_HANDLE);
|
||||
ConPuts(szText, STD_OUTPUT_HANDLE);
|
||||
}
|
||||
|
||||
|
||||
VOID ConPrintf(LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
|
||||
{
|
||||
TCHAR szOut[OUTPUT_BUFFER_SIZE];
|
||||
ConWrite(szOut, _vstprintf(szOut, szFormat, arg_ptr), nStdHandle);
|
||||
TCHAR szOut[OUTPUT_BUFFER_SIZE];
|
||||
DWORD len;
|
||||
|
||||
len = (DWORD)_vstprintf(szOut, szFormat, arg_ptr);
|
||||
ConWrite(szOut, len, nStdHandle);
|
||||
}
|
||||
|
||||
INT ConPrintfPaging(BOOL NewPage, LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
|
||||
{
|
||||
INT len;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
TCHAR szOut[OUTPUT_BUFFER_SIZE];
|
||||
DWORD dwWritten;
|
||||
HANDLE hOutput = GetStdHandle(nStdHandle);
|
||||
INT len;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
TCHAR szOut[OUTPUT_BUFFER_SIZE];
|
||||
DWORD dwWritten;
|
||||
HANDLE hOutput = GetStdHandle(nStdHandle);
|
||||
|
||||
/* used to count number of lines since last pause */
|
||||
static int LineCount = 0;
|
||||
/* used to count number of lines since last pause */
|
||||
static int LineCount = 0;
|
||||
|
||||
/* used to see how big the screen is */
|
||||
int ScreenLines = 0;
|
||||
/* used to see how big the screen is */
|
||||
int ScreenLines = 0;
|
||||
|
||||
/* chars since start of line */
|
||||
int CharSL;
|
||||
/* chars since start of line */
|
||||
int CharSL;
|
||||
|
||||
int from = 0, i = 0;
|
||||
int from = 0, i = 0;
|
||||
|
||||
if(NewPage == TRUE)
|
||||
LineCount = 0;
|
||||
if (NewPage == TRUE)
|
||||
LineCount = 0;
|
||||
|
||||
/* rest LineCount and return if no string have been given */
|
||||
if (szFormat == NULL)
|
||||
return 0;
|
||||
/* rest LineCount and return if no string have been given */
|
||||
if (szFormat == NULL)
|
||||
return 0;
|
||||
|
||||
/* Get the size of the visual screen that can be printed too */
|
||||
if (!IsConsoleHandle(hOutput) || !GetConsoleScreenBufferInfo(hOutput, &csbi))
|
||||
{
|
||||
/* We assume it's a file handle */
|
||||
ConPrintf(szFormat, arg_ptr, nStdHandle);
|
||||
return 0;
|
||||
}
|
||||
/* Subtract 2 to account for "press any key..." and for the blank line at the end of PagePrompt() */
|
||||
ScreenLines = (csbi.srWindow.Bottom - csbi.srWindow.Top) - 4;
|
||||
CharSL = csbi.dwCursorPosition.X;
|
||||
|
||||
//get the size of the visual screen that can be printed too
|
||||
if (!GetConsoleScreenBufferInfo(hOutput, &csbi))
|
||||
{
|
||||
// we assuming its a file handle
|
||||
ConPrintf(szFormat, arg_ptr, nStdHandle);
|
||||
return 0;
|
||||
}
|
||||
//subtract 2 to account for "press any key..." and for the blank line at the end of PagePrompt()
|
||||
ScreenLines = (csbi.srWindow.Bottom - csbi.srWindow.Top) - 4;
|
||||
CharSL = csbi.dwCursorPosition.X;
|
||||
/* Make sure they didn't make the screen to small */
|
||||
if (ScreenLines < 4)
|
||||
{
|
||||
ConPrintf(szFormat, arg_ptr, nStdHandle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//make sure they didnt make the screen to small
|
||||
if(ScreenLines<4)
|
||||
{
|
||||
ConPrintf(szFormat, arg_ptr, nStdHandle);
|
||||
return 0;
|
||||
}
|
||||
len = _vstprintf(szOut, szFormat, arg_ptr);
|
||||
|
||||
len = _vstprintf (szOut, szFormat, arg_ptr);
|
||||
while (i < len)
|
||||
{
|
||||
/* Search until the end of a line is reached */
|
||||
if (szOut[i++] != _T('\n') && ++CharSL < csbi.dwSize.X)
|
||||
continue;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
// Search until the end of a line is reached
|
||||
if (szOut[i++] != _T('\n') && ++CharSL < csbi.dwSize.X)
|
||||
continue;
|
||||
LineCount++;
|
||||
CharSL=0;
|
||||
|
||||
LineCount++;
|
||||
CharSL=0;
|
||||
if (LineCount >= ScreenLines)
|
||||
{
|
||||
WriteConsole(hOutput, &szOut[from], i-from, &dwWritten, NULL);
|
||||
from = i;
|
||||
|
||||
if(LineCount >= ScreenLines)
|
||||
{
|
||||
WriteConsole(hOutput, &szOut[from], i-from, &dwWritten, NULL);
|
||||
from = i;
|
||||
if (PagePrompt() != PROMPT_YES)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
/* Reset the number of lines being printed */
|
||||
LineCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if(PagePrompt() != PROMPT_YES)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//reset the number of lines being printed
|
||||
LineCount = 0;
|
||||
}
|
||||
}
|
||||
WriteConsole(hOutput, &szOut[from], i-from, &dwWritten, NULL);
|
||||
|
||||
WriteConsole(hOutput, &szOut[from], i-from, &dwWritten, NULL);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
VOID ConErrFormatMessage (DWORD MessageId, ...)
|
||||
VOID ConErrFormatMessage(DWORD MessageId, ...)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
DWORD ret;
|
||||
LPTSTR text;
|
||||
va_list arg_ptr;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
DWORD ret;
|
||||
LPTSTR text;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, MessageId);
|
||||
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
MessageId,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR) &text,
|
||||
0,
|
||||
&arg_ptr);
|
||||
va_start(arg_ptr, MessageId);
|
||||
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
MessageId,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR) &text,
|
||||
0,
|
||||
&arg_ptr);
|
||||
|
||||
va_end (arg_ptr);
|
||||
if(ret > 0)
|
||||
{
|
||||
ConErrPuts (text);
|
||||
LocalFree(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(szMsg);
|
||||
}
|
||||
va_end(arg_ptr);
|
||||
if (ret > 0)
|
||||
{
|
||||
ConErrPuts(text);
|
||||
LocalFree(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(szMsg);
|
||||
}
|
||||
}
|
||||
|
||||
VOID ConOutFormatMessage (DWORD MessageId, ...)
|
||||
VOID ConOutFormatMessage(DWORD MessageId, ...)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
DWORD ret;
|
||||
LPTSTR text;
|
||||
va_list arg_ptr;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
DWORD ret;
|
||||
LPTSTR text;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, MessageId);
|
||||
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
MessageId,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR) &text,
|
||||
0,
|
||||
&arg_ptr);
|
||||
va_start(arg_ptr, MessageId);
|
||||
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
MessageId,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR) &text,
|
||||
0,
|
||||
&arg_ptr);
|
||||
|
||||
va_end (arg_ptr);
|
||||
if(ret > 0)
|
||||
{
|
||||
ConErrPuts (text);
|
||||
LocalFree(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(szMsg);
|
||||
}
|
||||
va_end(arg_ptr);
|
||||
if (ret > 0)
|
||||
{
|
||||
ConErrPuts(text);
|
||||
LocalFree(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_CONSOLE_ERROR, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(szMsg);
|
||||
}
|
||||
}
|
||||
|
||||
VOID ConOutResPrintf (UINT resID, ...)
|
||||
VOID ConOutResPrintf(UINT resID, ...)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
va_list arg_ptr;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, resID);
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPrintf(szMsg, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end (arg_ptr);
|
||||
va_start(arg_ptr, resID);
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPrintf(szMsg, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
VOID ConOutPrintf (LPTSTR szFormat, ...)
|
||||
VOID ConOutPrintf(LPTSTR szFormat, ...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, szFormat);
|
||||
ConPrintf(szFormat, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end (arg_ptr);
|
||||
va_start(arg_ptr, szFormat);
|
||||
ConPrintf(szFormat, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
INT ConOutPrintfPaging (BOOL NewPage, LPTSTR szFormat, ...)
|
||||
INT ConOutPrintfPaging(BOOL NewPage, LPTSTR szFormat, ...)
|
||||
{
|
||||
INT iReturn;
|
||||
va_list arg_ptr;
|
||||
INT iReturn;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, szFormat);
|
||||
iReturn = ConPrintfPaging(NewPage, szFormat, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end (arg_ptr);
|
||||
return iReturn;
|
||||
va_start(arg_ptr, szFormat);
|
||||
iReturn = ConPrintfPaging(NewPage, szFormat, arg_ptr, STD_OUTPUT_HANDLE);
|
||||
va_end(arg_ptr);
|
||||
return iReturn;
|
||||
}
|
||||
|
||||
VOID ConErrChar (TCHAR c)
|
||||
VOID ConErrChar(TCHAR c)
|
||||
{
|
||||
ConWrite(&c, 1, STD_ERROR_HANDLE);
|
||||
ConWrite(&c, 1, STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
|
||||
VOID ConErrResPuts (UINT resID)
|
||||
VOID ConErrResPuts(UINT resID)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPuts(szMsg, STD_ERROR_HANDLE);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPuts(szMsg, STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
VOID ConErrPuts (LPTSTR szText)
|
||||
VOID ConErrPuts(LPTSTR szText)
|
||||
{
|
||||
ConPuts(szText, STD_ERROR_HANDLE);
|
||||
ConPuts(szText, STD_ERROR_HANDLE);
|
||||
}
|
||||
|
||||
|
||||
VOID ConErrResPrintf (UINT resID, ...)
|
||||
VOID ConErrResPrintf(UINT resID, ...)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
va_list arg_ptr;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, resID);
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPrintf(szMsg, arg_ptr, STD_ERROR_HANDLE);
|
||||
va_end (arg_ptr);
|
||||
va_start(arg_ptr, resID);
|
||||
LoadString(CMD_ModuleHandle, resID, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConPrintf(szMsg, arg_ptr, STD_ERROR_HANDLE);
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
VOID ConErrPrintf (LPTSTR szFormat, ...)
|
||||
VOID ConErrPrintf(LPTSTR szFormat, ...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start (arg_ptr, szFormat);
|
||||
ConPrintf(szFormat, arg_ptr, STD_ERROR_HANDLE);
|
||||
va_end (arg_ptr);
|
||||
}
|
||||
|
||||
VOID SetCursorXY (SHORT x, SHORT y)
|
||||
{
|
||||
COORD coPos;
|
||||
|
||||
coPos.X = x;
|
||||
coPos.Y = y;
|
||||
SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), coPos);
|
||||
va_start(arg_ptr, szFormat);
|
||||
ConPrintf(szFormat, arg_ptr, STD_ERROR_HANDLE);
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
|
||||
VOID GetCursorXY (PSHORT x, PSHORT y)
|
||||
VOID SetCursorXY(SHORT x, SHORT y)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
|
||||
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
|
||||
*x = csbi.dwCursorPosition.X;
|
||||
*y = csbi.dwCursorPosition.Y;
|
||||
coPos.X = x;
|
||||
coPos.Y = y;
|
||||
SetConsoleCursorPosition(GetStdHandle (STD_OUTPUT_HANDLE), coPos);
|
||||
}
|
||||
|
||||
|
||||
SHORT GetCursorX (VOID)
|
||||
VOID GetCursorXY(PSHORT x, PSHORT y)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
|
||||
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
|
||||
return csbi.dwCursorPosition.X;
|
||||
*x = csbi.dwCursorPosition.X;
|
||||
*y = csbi.dwCursorPosition.Y;
|
||||
}
|
||||
|
||||
|
||||
SHORT GetCursorY (VOID)
|
||||
SHORT GetCursorX(VOID)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
|
||||
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
|
||||
return csbi.dwCursorPosition.Y;
|
||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
return csbi.dwCursorPosition.X;
|
||||
}
|
||||
|
||||
|
||||
VOID GetScreenSize (PSHORT maxx, PSHORT maxy)
|
||||
SHORT GetCursorY(VOID)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
|
||||
if (!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi))
|
||||
{
|
||||
csbi.dwSize.X = 80;
|
||||
csbi.dwSize.Y = 25;
|
||||
}
|
||||
|
||||
if (maxx)
|
||||
*maxx = csbi.dwSize.X;
|
||||
if (maxy)
|
||||
*maxy = csbi.dwSize.Y;
|
||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
return csbi.dwCursorPosition.Y;
|
||||
}
|
||||
|
||||
|
||||
VOID SetCursorType (BOOL bInsert, BOOL bVisible)
|
||||
VOID SetCursorType(BOOL bInsert, BOOL bVisible)
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cci;
|
||||
CONSOLE_CURSOR_INFO cci;
|
||||
|
||||
cci.dwSize = bInsert ? 10 : 99;
|
||||
cci.bVisible = bVisible;
|
||||
cci.dwSize = bInsert ? 10 : 99;
|
||||
cci.bVisible = bVisible;
|
||||
|
||||
SetConsoleCursorInfo (GetStdHandle (STD_OUTPUT_HANDLE), &cci);
|
||||
SetConsoleCursorInfo(GetStdHandle (STD_OUTPUT_HANDLE), &cci);
|
||||
}
|
||||
|
||||
VOID GetScreenSize(PSHORT maxx, PSHORT maxy)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
|
||||
if (!GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi))
|
||||
{
|
||||
csbi.dwSize.X = 80;
|
||||
csbi.dwSize.Y = 25;
|
||||
}
|
||||
|
||||
if (maxx) *maxx = csbi.dwSize.X;
|
||||
if (maxy) *maxy = csbi.dwSize.Y;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+17
-17
@@ -20,13 +20,13 @@
|
||||
* 27-Oct-1998 (Eric Kohl)
|
||||
* Disabled prompting when used in batch mode.
|
||||
*
|
||||
* 03-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* 03-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
*
|
||||
* 13-Jul-2005 (Brandon Turner) <[email protected]>)
|
||||
* 13-Jul-2005 (Brandon Turner <[email protected]>)
|
||||
* Rewrite to clean up copy and support wildcard.
|
||||
*
|
||||
* 20-Jul-2005 (Brandon Turner) <[email protected]>)
|
||||
* 20-Jul-2005 (Brandon Turner <[email protected]>)
|
||||
* Add touch syntax. "copy arp.exe+,,"
|
||||
* Copy command is now completed.
|
||||
*/
|
||||
@@ -68,12 +68,12 @@ copy(TCHAR source[MAX_PATH],
|
||||
SYSTEMTIME CurrentTime;
|
||||
|
||||
/* Check Breaker */
|
||||
if(CheckCtrlBreak(BREAK_INPUT))
|
||||
if (CheckCtrlBreak(BREAK_INPUT))
|
||||
return 0;
|
||||
|
||||
TRACE ("checking mode\n");
|
||||
|
||||
if(bTouch)
|
||||
if (bTouch)
|
||||
{
|
||||
hFileSrc = CreateFile (source, GENERIC_WRITE, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
@@ -86,7 +86,7 @@ copy(TCHAR source[MAX_PATH],
|
||||
|
||||
GetSystemTime(&CurrentTime);
|
||||
SystemTimeToFileTime(&CurrentTime, &NewFileTime);
|
||||
if(SetFileTime(hFileSrc,(LPFILETIME) NULL, (LPFILETIME) NULL, &NewFileTime))
|
||||
if (SetFileTime(hFileSrc,(LPFILETIME) NULL, (LPFILETIME) NULL, &NewFileTime))
|
||||
{
|
||||
CloseHandle(hFileSrc);
|
||||
nErrorLevel = 1;
|
||||
@@ -120,7 +120,7 @@ copy(TCHAR source[MAX_PATH],
|
||||
|
||||
/* Check to see if /D or /Z are true, if so we need a middle
|
||||
man to copy the file too to allow us to use CopyFileEx later */
|
||||
if(lpdwFlags & COPY_DECRYPT)
|
||||
if (lpdwFlags & COPY_DECRYPT)
|
||||
{
|
||||
GetEnvironmentVariable(_T("TEMP"),TempSrc,MAX_PATH);
|
||||
_tcscat(TempSrc,_T("\\"));
|
||||
@@ -134,7 +134,7 @@ copy(TCHAR source[MAX_PATH],
|
||||
which would error when it tried to open the handles for ReadFile
|
||||
and WriteFile */
|
||||
_tcscat(TempSrc,_T(".decrypt"));
|
||||
if(!CopyFileEx(source, TempSrc, NULL, NULL, FALSE, COPY_FILE_ALLOW_DECRYPTED_DESTINATION))
|
||||
if (!CopyFileEx(source, TempSrc, NULL, NULL, FALSE, COPY_FILE_ALLOW_DECRYPTED_DESTINATION))
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
return 0;
|
||||
@@ -143,7 +143,7 @@ copy(TCHAR source[MAX_PATH],
|
||||
}
|
||||
|
||||
|
||||
if(lpdwFlags & COPY_RESTART)
|
||||
if (lpdwFlags & COPY_RESTART)
|
||||
{
|
||||
_tcscpy(TrueDest, dest);
|
||||
GetEnvironmentVariable(_T("TEMP"),dest,MAX_PATH);
|
||||
@@ -260,9 +260,9 @@ copy(TCHAR source[MAX_PATH],
|
||||
SetFileAttributes (dest, dwAttrib);
|
||||
|
||||
/* Now finish off the copy if needed with CopyFileEx */
|
||||
if(lpdwFlags & COPY_RESTART)
|
||||
if (lpdwFlags & COPY_RESTART)
|
||||
{
|
||||
if(!CopyFileEx(dest, TrueDest, NULL, NULL, FALSE, COPY_FILE_RESTARTABLE))
|
||||
if (!CopyFileEx(dest, TrueDest, NULL, NULL, FALSE, COPY_FILE_RESTARTABLE))
|
||||
{
|
||||
nErrorLevel = 1;
|
||||
DeleteFile(dest);
|
||||
@@ -273,7 +273,7 @@ copy(TCHAR source[MAX_PATH],
|
||||
|
||||
}
|
||||
|
||||
if(lpdwFlags & COPY_DECRYPT)
|
||||
if (lpdwFlags & COPY_DECRYPT)
|
||||
DeleteFile(TempSrc);
|
||||
|
||||
return 1;
|
||||
@@ -480,8 +480,8 @@ INT cmd_copy(LPTSTR param)
|
||||
break;
|
||||
|
||||
case _T('-'):
|
||||
if(_tcslen(arg[i]) >= 3)
|
||||
if(_totupper(arg[i][2]) == _T('Y'))
|
||||
if (_tcslen(arg[i]) >= 3)
|
||||
if (_totupper(arg[i][2]) == _T('Y'))
|
||||
{
|
||||
dwFlags &= ~COPY_NO_PROMPT;
|
||||
dwFlags |= COPY_PROMPT;
|
||||
@@ -538,7 +538,7 @@ INT cmd_copy(LPTSTR param)
|
||||
|
||||
bMoreFiles = FALSE;
|
||||
}
|
||||
else if(nDes == -1)
|
||||
else if (nDes == -1)
|
||||
{
|
||||
nDes = i;
|
||||
}
|
||||
@@ -825,7 +825,7 @@ INT cmd_copy(LPTSTR param)
|
||||
_tcscat (tmpSrcPath, findBuffer.cFileName);
|
||||
|
||||
/* Check to see if the file is the same file */
|
||||
if(!bTouch && !_tcscmp(tmpSrcPath, tmpDestPath))
|
||||
if (!bTouch && !_tcscmp(tmpSrcPath, tmpDestPath))
|
||||
{
|
||||
ConOutResPrintf(STRING_COPY_ERROR2);
|
||||
|
||||
@@ -846,7 +846,7 @@ INT cmd_copy(LPTSTR param)
|
||||
dwFlags |= COPY_NO_PROMPT;
|
||||
|
||||
/* Tell weather the copy was successful or not */
|
||||
if(copy(tmpSrcPath,tmpDestPath, bAppend, dwFlags, bTouch))
|
||||
if (copy(tmpSrcPath,tmpDestPath, bAppend, dwFlags, bTouch))
|
||||
{
|
||||
nFiles++;
|
||||
//LoadString(CMD_ModuleHandle, STRING_MOVE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
|
||||
+175
-180
@@ -27,8 +27,8 @@
|
||||
* 04-Feb-1999 (Eric Kohl)
|
||||
* Fixed date input bug.
|
||||
*
|
||||
* 03-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 03-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -38,227 +38,222 @@
|
||||
|
||||
static WORD awMonths[2][13] =
|
||||
{
|
||||
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
|
||||
{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
|
||||
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
|
||||
{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
|
||||
};
|
||||
|
||||
|
||||
static VOID
|
||||
PrintDateString (VOID)
|
||||
{
|
||||
switch (nDateFormat)
|
||||
{
|
||||
case 0: /* mmddyy */
|
||||
default:
|
||||
ConOutResPrintf(STRING_DATE_HELP1, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
switch (nDateFormat)
|
||||
{
|
||||
case 0: /* mmddyy */
|
||||
default:
|
||||
ConOutResPrintf(STRING_DATE_HELP1, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
|
||||
case 1: /* ddmmyy */
|
||||
ConOutResPrintf(STRING_DATE_HELP2, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
case 1: /* ddmmyy */
|
||||
ConOutResPrintf(STRING_DATE_HELP2, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
|
||||
case 2: /* yymmdd */
|
||||
ConOutResPrintf(STRING_DATE_HELP3, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
}
|
||||
case 2: /* yymmdd */
|
||||
ConOutResPrintf(STRING_DATE_HELP3, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
ReadNumber (LPTSTR *s, LPWORD lpwValue)
|
||||
{
|
||||
if (_istdigit (**s))
|
||||
{
|
||||
while (_istdigit (**s))
|
||||
{
|
||||
*lpwValue = *lpwValue * 10 + **s - _T('0');
|
||||
(*s)++;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (_istdigit (**s))
|
||||
{
|
||||
while (_istdigit (**s))
|
||||
{
|
||||
*lpwValue = *lpwValue * 10 + **s - _T('0');
|
||||
(*s)++;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
ReadSeparator (LPTSTR *s)
|
||||
{
|
||||
if (**s == _T('/') || **s == _T('-') || **s == cDateSeparator)
|
||||
{
|
||||
(*s)++;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (**s == _T('/') || **s == _T('-') || **s == cDateSeparator)
|
||||
{
|
||||
(*s)++;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static BOOL
|
||||
ParseDate (LPTSTR s)
|
||||
{
|
||||
SYSTEMTIME d;
|
||||
unsigned char leap;
|
||||
LPTSTR p = s;
|
||||
SYSTEMTIME d;
|
||||
unsigned char leap;
|
||||
LPTSTR p = s;
|
||||
|
||||
if (!*s)
|
||||
return TRUE;
|
||||
if (!*s)
|
||||
return TRUE;
|
||||
|
||||
GetLocalTime (&d);
|
||||
GetLocalTime (&d);
|
||||
|
||||
d.wYear = 0;
|
||||
d.wDay = 0;
|
||||
d.wMonth = 0;
|
||||
d.wYear = 0;
|
||||
d.wDay = 0;
|
||||
d.wMonth = 0;
|
||||
|
||||
switch (nDateFormat)
|
||||
{
|
||||
case 0: /* mmddyy */
|
||||
default:
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
break;
|
||||
switch (nDateFormat)
|
||||
{
|
||||
case 0: /* mmddyy */
|
||||
default:
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case 1: /* ddmmyy */
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
break;
|
||||
case 1: /* ddmmyy */
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case 2: /* yymmdd */
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
case 2: /* yymmdd */
|
||||
if (!ReadNumber (&p, &d.wYear))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wMonth))
|
||||
return FALSE;
|
||||
if (!ReadSeparator (&p))
|
||||
return FALSE;
|
||||
if (!ReadNumber (&p, &d.wDay))
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* if only entered two digits: */
|
||||
/* assume 2000's if value less than 80 */
|
||||
/* assume 1900's if value greater or equal 80 */
|
||||
if (d.wYear <= 99)
|
||||
{
|
||||
if (d.wYear >= 80)
|
||||
d.wYear = 1900 + d.wYear;
|
||||
else
|
||||
d.wYear = 2000 + d.wYear;
|
||||
}
|
||||
/* if only entered two digits: */
|
||||
/* assume 2000's if value less than 80 */
|
||||
/* assume 1900's if value greater or equal 80 */
|
||||
if (d.wYear <= 99)
|
||||
{
|
||||
if (d.wYear >= 80)
|
||||
d.wYear = 1900 + d.wYear;
|
||||
else
|
||||
d.wYear = 2000 + d.wYear;
|
||||
}
|
||||
|
||||
leap = (!(d.wYear % 4) && (d.wYear % 100)) || !(d.wYear % 400);
|
||||
leap = (!(d.wYear % 4) && (d.wYear % 100)) || !(d.wYear % 400);
|
||||
|
||||
if ((d.wMonth >= 1 && d.wMonth <= 12) &&
|
||||
(d.wDay >= 1 && d.wDay <= awMonths[leap][d.wMonth]) &&
|
||||
(d.wYear >= 1980 && d.wYear <= 2099))
|
||||
{
|
||||
SetLocalTime (&d);
|
||||
return TRUE;
|
||||
}
|
||||
if ((d.wMonth >= 1 && d.wMonth <= 12) &&
|
||||
(d.wDay >= 1 && d.wDay <= awMonths[leap][d.wMonth]) &&
|
||||
(d.wYear >= 1980 && d.wYear <= 2099))
|
||||
{
|
||||
SetLocalTime (&d);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
INT cmd_date (LPTSTR param)
|
||||
{
|
||||
LPTSTR *arg;
|
||||
INT argc;
|
||||
INT i;
|
||||
BOOL bPrompt = TRUE;
|
||||
INT nDateString = -1;
|
||||
LPTSTR *arg;
|
||||
INT argc;
|
||||
INT i;
|
||||
BOOL bPrompt = TRUE;
|
||||
INT nDateString = -1;
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_DATE_HELP4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
|
||||
/* check for options */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsicmp (arg[i], _T("/t")) == 0)
|
||||
bPrompt = FALSE;
|
||||
if ((*arg[i] != _T('/')) && (nDateString == -1))
|
||||
nDateString = i;
|
||||
}
|
||||
|
||||
if (nDateString == -1)
|
||||
ConOutPrintf(_T("%s"), GetDateString());
|
||||
|
||||
if (!bPrompt)
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (nDateString == -1)
|
||||
{
|
||||
while (TRUE) /* forever loop */
|
||||
{
|
||||
TCHAR s[40];
|
||||
|
||||
PrintDateString ();
|
||||
ConInString (s, 40);
|
||||
TRACE ("\'%s\'\n", debugstr_aw(s));
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen (s) - 1] = _T('\0');
|
||||
if (ParseDate (s))
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
ConErrResPuts(STRING_DATE_ERROR);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ParseDate (arg[nDateString]))
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
while (TRUE) /* forever loop */
|
||||
{
|
||||
TCHAR s[40];
|
||||
ConErrResPuts(STRING_DATE_ERROR);
|
||||
|
||||
PrintDateString ();
|
||||
ConInString (s, 40);
|
||||
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen (s) - 1] = _T('\0');
|
||||
if (ParseDate (s))
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
ConOutResPaging(TRUE,STRING_DATE_HELP4);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
nErrorLevel = 0;
|
||||
|
||||
return 0;
|
||||
/* build parameter array */
|
||||
arg = split (param, &argc, FALSE, FALSE);
|
||||
|
||||
/* check for options */
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
if (_tcsicmp (arg[i], _T("/t")) == 0)
|
||||
bPrompt = FALSE;
|
||||
if ((*arg[i] != _T('/')) && (nDateString == -1))
|
||||
nDateString = i;
|
||||
}
|
||||
|
||||
if (nDateString == -1)
|
||||
ConOutPrintf(_T("%s"), GetDateString());
|
||||
|
||||
if (!bPrompt)
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (nDateString == -1)
|
||||
{
|
||||
while (TRUE) /* forever loop */
|
||||
{
|
||||
TCHAR s[40];
|
||||
|
||||
PrintDateString ();
|
||||
ConInString (s, 40);
|
||||
TRACE ("\'%s\'\n", debugstr_aw(s));
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen (s) - 1] = _T('\0');
|
||||
if (ParseDate (s))
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
ConErrResPuts(STRING_DATE_ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ParseDate (arg[nDateString]))
|
||||
{
|
||||
while (TRUE) /* forever loop */
|
||||
{
|
||||
TCHAR s[40];
|
||||
ConErrResPuts(STRING_DATE_ERROR);
|
||||
|
||||
PrintDateString ();
|
||||
ConInString (s, 40);
|
||||
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen (s) - 1] = _T('\0');
|
||||
if (ParseDate (s))
|
||||
{
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
#endif /* INCLUDE_CMD_DATE */
|
||||
|
||||
|
||||
+410
-421
@@ -52,28 +52,28 @@
|
||||
|
||||
enum
|
||||
{
|
||||
DEL_ATTRIBUTES = 0x001, /* /A */
|
||||
DEL_NOTHING = 0x004, /* /N */
|
||||
DEL_PROMPT = 0x008, /* /P */
|
||||
DEL_QUIET = 0x010, /* /Q */
|
||||
DEL_SUBDIR = 0x020, /* /S */
|
||||
DEL_TOTAL = 0x040, /* /T */
|
||||
DEL_WIPE = 0x080, /* /W */
|
||||
DEL_EMPTYDIR = 0x100, /* /X : not implemented */
|
||||
DEL_YES = 0x200, /* /Y */
|
||||
DEL_FORCE = 0x800 /* /F */
|
||||
DEL_ATTRIBUTES = 0x001, /* /A */
|
||||
DEL_NOTHING = 0x004, /* /N */
|
||||
DEL_PROMPT = 0x008, /* /P */
|
||||
DEL_QUIET = 0x010, /* /Q */
|
||||
DEL_SUBDIR = 0x020, /* /S */
|
||||
DEL_TOTAL = 0x040, /* /T */
|
||||
DEL_WIPE = 0x080, /* /W */
|
||||
DEL_EMPTYDIR = 0x100, /* /X : not implemented */
|
||||
DEL_YES = 0x200, /* /Y */
|
||||
DEL_FORCE = 0x800 /* /F */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ATTR_ARCHIVE = 0x001, /* /A:A */
|
||||
ATTR_HIDDEN = 0x002, /* /A:H */
|
||||
ATTR_SYSTEM = 0x004, /* /A:S */
|
||||
ATTR_READ_ONLY = 0x008, /* /A:R */
|
||||
ATTR_N_ARCHIVE = 0x010, /* /A:-A */
|
||||
ATTR_N_HIDDEN = 0x020, /* /A:-H */
|
||||
ATTR_N_SYSTEM = 0x040, /* /A:-S */
|
||||
ATTR_N_READ_ONLY = 0x080 /* /A:-R */
|
||||
ATTR_ARCHIVE = 0x001, /* /A:A */
|
||||
ATTR_HIDDEN = 0x002, /* /A:H */
|
||||
ATTR_SYSTEM = 0x004, /* /A:S */
|
||||
ATTR_READ_ONLY = 0x008, /* /A:R */
|
||||
ATTR_N_ARCHIVE = 0x010, /* /A:-A */
|
||||
ATTR_N_HIDDEN = 0x020, /* /A:-H */
|
||||
ATTR_N_SYSTEM = 0x040, /* /A:-S */
|
||||
ATTR_N_READ_ONLY = 0x080 /* /A:-R */
|
||||
};
|
||||
|
||||
static TCHAR szDeleteWipe[RC_STRING_MAX_SIZE];
|
||||
@@ -83,471 +83,460 @@ static BOOLEAN StringsLoaded = FALSE;
|
||||
|
||||
static VOID LoadStrings(VOID)
|
||||
{
|
||||
LoadString( CMD_ModuleHandle, STRING_DELETE_WIPE, szDeleteWipe, RC_STRING_MAX_SIZE);
|
||||
GetModuleFileName(NULL, CMDPath, MAX_PATH);
|
||||
StringsLoaded = TRUE;
|
||||
LoadString( CMD_ModuleHandle, STRING_DELETE_WIPE, szDeleteWipe, RC_STRING_MAX_SIZE);
|
||||
GetModuleFileName(NULL, CMDPath, MAX_PATH);
|
||||
StringsLoaded = TRUE;
|
||||
}
|
||||
|
||||
static BOOL
|
||||
RemoveFile (LPTSTR lpFileName, DWORD dwFlags, WIN32_FIND_DATA* f)
|
||||
{
|
||||
/*This function is called by CommandDelete and
|
||||
does the actual process of deleting the single
|
||||
file*/
|
||||
if(CheckCtrlBreak(BREAK_INPUT))
|
||||
return 1;
|
||||
/*This function is called by CommandDelete and
|
||||
does the actual process of deleting the single
|
||||
file*/
|
||||
if (CheckCtrlBreak(BREAK_INPUT))
|
||||
return 1;
|
||||
|
||||
/*check to see if it is read only and if this is done based on /A
|
||||
if it is done by file name, access is denied. However, if it is done
|
||||
using the /A switch you must un-read only the file and allow it to be
|
||||
deleted*/
|
||||
if((dwFlags & DEL_ATTRIBUTES) || (dwFlags & DEL_FORCE))
|
||||
/*check to see if it is read only and if this is done based on /A
|
||||
if it is done by file name, access is denied. However, if it is done
|
||||
using the /A switch you must un-read only the file and allow it to be
|
||||
deleted*/
|
||||
if ((dwFlags & DEL_ATTRIBUTES) || (dwFlags & DEL_FORCE))
|
||||
{
|
||||
if (f->dwFileAttributes & FILE_ATTRIBUTE_READONLY)
|
||||
{
|
||||
if(f->dwFileAttributes & FILE_ATTRIBUTE_READONLY)
|
||||
{
|
||||
/*setting file to normal, not saving old attrs first
|
||||
because the file is going to be deleted anyways
|
||||
so the only thing that matters is that it isn't
|
||||
read only.*/
|
||||
SetFileAttributes(lpFileName,FILE_ATTRIBUTE_NORMAL);
|
||||
}
|
||||
/*setting file to normal, not saving old attrs first
|
||||
because the file is going to be deleted anyways
|
||||
so the only thing that matters is that it isn't
|
||||
read only.*/
|
||||
SetFileAttributes(lpFileName,FILE_ATTRIBUTE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
if (dwFlags & DEL_WIPE)
|
||||
{
|
||||
|
||||
HANDLE file;
|
||||
DWORD temp;
|
||||
if (dwFlags & DEL_WIPE)
|
||||
{
|
||||
HANDLE file;
|
||||
DWORD temp;
|
||||
#define BufferSize 65536
|
||||
BYTE buffer[BufferSize];
|
||||
LONGLONG i;
|
||||
LARGE_INTEGER FileSize;
|
||||
BYTE buffer[BufferSize];
|
||||
LONGLONG i;
|
||||
LARGE_INTEGER FileSize;
|
||||
|
||||
FileSize.u.HighPart = f->nFileSizeHigh;
|
||||
FileSize.u.LowPart = f->nFileSizeLow;
|
||||
FileSize.u.HighPart = f->nFileSizeHigh;
|
||||
FileSize.u.LowPart = f->nFileSizeLow;
|
||||
|
||||
for(i = 0; i < BufferSize; i++)
|
||||
{
|
||||
buffer[i]=rand() % 256;
|
||||
}
|
||||
file = CreateFile (lpFileName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, NULL);
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
for(i = 0; i < (FileSize.QuadPart - BufferSize); i += BufferSize)
|
||||
{
|
||||
WriteFile (file, buffer, BufferSize, &temp, NULL);
|
||||
ConOutPrintf (_T("%I64d%% %s\r"),(i * (LONGLONG)100)/FileSize.QuadPart,szDeleteWipe);
|
||||
}
|
||||
WriteFile (file, buffer, (DWORD)(FileSize.QuadPart - i), &temp, NULL);
|
||||
ConOutPrintf (_T("100%% %s\n"),szDeleteWipe);
|
||||
CloseHandle (file);
|
||||
}
|
||||
for(i = 0; i < BufferSize; i++)
|
||||
{
|
||||
buffer[i]=rand() % 256;
|
||||
}
|
||||
file = CreateFile (lpFileName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_WRITE_THROUGH, NULL);
|
||||
if (file != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
for(i = 0; i < (FileSize.QuadPart - BufferSize); i += BufferSize)
|
||||
{
|
||||
WriteFile (file, buffer, BufferSize, &temp, NULL);
|
||||
ConOutPrintf (_T("%I64d%% %s\r"),(i * (LONGLONG)100)/FileSize.QuadPart,szDeleteWipe);
|
||||
}
|
||||
WriteFile (file, buffer, (DWORD)(FileSize.QuadPart - i), &temp, NULL);
|
||||
ConOutPrintf (_T("100%% %s\n"),szDeleteWipe);
|
||||
CloseHandle (file);
|
||||
}
|
||||
}
|
||||
|
||||
return DeleteFile (lpFileName);
|
||||
return DeleteFile (lpFileName);
|
||||
}
|
||||
|
||||
|
||||
static DWORD
|
||||
DeleteFiles(LPTSTR FileName, DWORD* dwFlags, DWORD dwAttrFlags)
|
||||
{
|
||||
TCHAR szFullPath[MAX_PATH];
|
||||
TCHAR szFileName[MAX_PATH];
|
||||
LPTSTR pFilePart;
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA f;
|
||||
BOOL bExclusion;
|
||||
INT res;
|
||||
DWORD dwFiles = 0;
|
||||
TCHAR szFullPath[MAX_PATH];
|
||||
TCHAR szFileName[MAX_PATH];
|
||||
LPTSTR pFilePart;
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA f;
|
||||
BOOL bExclusion;
|
||||
INT res;
|
||||
DWORD dwFiles = 0;
|
||||
|
||||
_tcscpy(szFileName, FileName);
|
||||
_tcscpy(szFileName, FileName);
|
||||
|
||||
if(_tcschr (szFileName, _T('*')) == NULL &&
|
||||
IsExistingDirectory (szFileName))
|
||||
if (_tcschr (szFileName, _T('*')) == NULL &&
|
||||
IsExistingDirectory (szFileName))
|
||||
{
|
||||
/* If it doesnt have a \ at the end already then on needs to be added */
|
||||
if (szFileName[_tcslen(szFileName) - 1] != _T('\\'))
|
||||
_tcscat (szFileName, _T("\\"));
|
||||
/* Add a wildcard after the \ */
|
||||
_tcscat (szFileName, _T("*"));
|
||||
}
|
||||
|
||||
if (!_tcscmp (szFileName, _T("*")) ||
|
||||
!_tcscmp (szFileName, _T("*.*")) ||
|
||||
(szFileName[_tcslen(szFileName) - 2] == _T('\\') && szFileName[_tcslen(szFileName) - 1] == _T('*')))
|
||||
{
|
||||
/* well, the user wants to delete everything but if they didnt yes DEL_YES, DEL_QUIET, or DEL_PROMPT
|
||||
then we are going to want to make sure that in fact they want to do that. */
|
||||
|
||||
if (!((*dwFlags & DEL_YES) || (*dwFlags & DEL_QUIET) || (*dwFlags & DEL_PROMPT)))
|
||||
{
|
||||
/* If it doesnt have a \ at the end already then on needs to be added */
|
||||
if(szFileName[_tcslen(szFileName) - 1] != _T('\\'))
|
||||
_tcscat (szFileName, _T("\\"));
|
||||
/* Add a wildcard after the \ */
|
||||
_tcscat (szFileName, _T("*"));
|
||||
res = FilePromptYNA (STRING_DEL_HELP2);
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
return 0x80000000;
|
||||
if (res == PROMPT_ALL)
|
||||
*dwFlags |= DEL_YES;
|
||||
}
|
||||
}
|
||||
|
||||
if(!_tcscmp (szFileName, _T("*")) ||
|
||||
!_tcscmp (szFileName, _T("*.*")) ||
|
||||
(szFileName[_tcslen(szFileName) - 2] == _T('\\') && szFileName[_tcslen(szFileName) - 1] == _T('*')))
|
||||
GetFullPathName(szFileName,
|
||||
MAX_PATH,
|
||||
szFullPath,
|
||||
&pFilePart);
|
||||
|
||||
hFile = FindFirstFile(szFullPath, &f);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
/* well, the user wants to delete everything but if they didnt yes DEL_YES, DEL_QUIET, or DEL_PROMPT
|
||||
then we are going to want to make sure that in fact they want to do that. */
|
||||
bExclusion = FALSE;
|
||||
|
||||
if (!((*dwFlags & DEL_YES) || (*dwFlags & DEL_QUIET) || (*dwFlags & DEL_PROMPT)))
|
||||
{
|
||||
res = FilePromptYNA (STRING_DEL_HELP2);
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
return 0x80000000;
|
||||
if(res == PROMPT_ALL)
|
||||
*dwFlags |= DEL_YES;
|
||||
}
|
||||
}
|
||||
/*if it is going to be excluded by - no need to check attrs*/
|
||||
if (*dwFlags & DEL_ATTRIBUTES && !bExclusion)
|
||||
{
|
||||
/*save if file attr check if user doesnt care about that attr anyways*/
|
||||
if (dwAttrFlags & ATTR_ARCHIVE && !(f.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_HIDDEN && !(f.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_SYSTEM && !(f.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_READ_ONLY && !(f.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_N_ARCHIVE && (f.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_N_HIDDEN && (f.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_N_SYSTEM && (f.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
|
||||
bExclusion = TRUE;
|
||||
if (dwAttrFlags & ATTR_N_READ_ONLY && (f.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
|
||||
bExclusion = TRUE;
|
||||
}
|
||||
if (bExclusion) continue;
|
||||
|
||||
GetFullPathName (szFileName,
|
||||
MAX_PATH,
|
||||
szFullPath,
|
||||
&pFilePart);
|
||||
/* ignore directories */
|
||||
if (f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue;
|
||||
|
||||
hFile = FindFirstFile(szFullPath, &f);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
_tcscpy (pFilePart, f.cFileName);
|
||||
|
||||
/* We cant delete ourselves */
|
||||
if (!_tcscmp (CMDPath,szFullPath)) continue;
|
||||
|
||||
TRACE("Full filename: %s\n", debugstr_aw(szFullPath));
|
||||
|
||||
/* ask for deleting */
|
||||
if (*dwFlags & DEL_PROMPT)
|
||||
{
|
||||
ConErrResPrintf(STRING_DEL_ERROR5, szFullPath);
|
||||
|
||||
res = FilePromptYN (STRING_DEL_ERROR6);
|
||||
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
{
|
||||
bExclusion = FALSE;
|
||||
|
||||
/*if it is going to be excluded by - no need to check attrs*/
|
||||
if(*dwFlags & DEL_ATTRIBUTES && !bExclusion)
|
||||
{
|
||||
|
||||
/*save if file attr check if user doesnt care about that attr anyways*/
|
||||
if(dwAttrFlags & ATTR_ARCHIVE && !(f.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_HIDDEN && !(f.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_SYSTEM && !(f.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_READ_ONLY && !(f.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_N_ARCHIVE && (f.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_N_HIDDEN && (f.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_N_SYSTEM && (f.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
|
||||
bExclusion = TRUE;
|
||||
if(dwAttrFlags & ATTR_N_READ_ONLY && (f.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
|
||||
bExclusion = TRUE;
|
||||
}
|
||||
if(bExclusion)
|
||||
continue;
|
||||
|
||||
/* ignore directories */
|
||||
if (f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
continue;
|
||||
|
||||
|
||||
_tcscpy (pFilePart, f.cFileName);
|
||||
|
||||
/* We cant delete ourselves */
|
||||
if(!_tcscmp (CMDPath,szFullPath))
|
||||
continue;
|
||||
|
||||
|
||||
TRACE("Full filename: %s\n", debugstr_aw(szFullPath));
|
||||
|
||||
/* ask for deleting */
|
||||
if (*dwFlags & DEL_PROMPT)
|
||||
{
|
||||
ConErrResPrintf(STRING_DEL_ERROR5, szFullPath);
|
||||
|
||||
res = FilePromptYN (STRING_DEL_ERROR6);
|
||||
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
{
|
||||
nErrorLevel = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*user cant ask it to be quiet and tell you what it did*/
|
||||
if (!(*dwFlags & DEL_QUIET) && !(*dwFlags & DEL_TOTAL))
|
||||
{
|
||||
ConErrResPrintf(STRING_DEL_ERROR7, szFullPath);
|
||||
}
|
||||
|
||||
/* delete the file */
|
||||
if(*dwFlags & DEL_NOTHING)
|
||||
continue;
|
||||
|
||||
if(RemoveFile (szFullPath, *dwFlags, &f))
|
||||
dwFiles++;
|
||||
else
|
||||
{
|
||||
ErrorMessage (GetLastError(), _T(""));
|
||||
// FindClose(hFile);
|
||||
// return -1;
|
||||
}
|
||||
nErrorLevel = 0;
|
||||
continue;
|
||||
}
|
||||
while (FindNextFile (hFile, &f));
|
||||
FindClose (hFile);
|
||||
}
|
||||
|
||||
/*user cant ask it to be quiet and tell you what it did*/
|
||||
if (!(*dwFlags & DEL_QUIET) && !(*dwFlags & DEL_TOTAL))
|
||||
{
|
||||
ConErrResPrintf(STRING_DEL_ERROR7, szFullPath);
|
||||
}
|
||||
|
||||
/* delete the file */
|
||||
if (*dwFlags & DEL_NOTHING) continue;
|
||||
|
||||
if (RemoveFile (szFullPath, *dwFlags, &f))
|
||||
{
|
||||
dwFiles++;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorMessage (GetLastError(), _T(""));
|
||||
// FindClose(hFile);
|
||||
// return -1;
|
||||
}
|
||||
}
|
||||
else error_sfile_not_found(szFullPath);
|
||||
return dwFiles;
|
||||
while (FindNextFile (hFile, &f));
|
||||
FindClose (hFile);
|
||||
}
|
||||
else error_sfile_not_found(szFullPath);
|
||||
return dwFiles;
|
||||
}
|
||||
|
||||
static DWORD
|
||||
ProcessDirectory(LPTSTR FileName, DWORD* dwFlags, DWORD dwAttrFlags)
|
||||
{
|
||||
TCHAR szFullPath[MAX_PATH];
|
||||
LPTSTR pFilePart;
|
||||
LPTSTR pSearchPart;
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA f;
|
||||
DWORD dwFiles = 0;
|
||||
TCHAR szFullPath[MAX_PATH];
|
||||
LPTSTR pFilePart;
|
||||
LPTSTR pSearchPart;
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA f;
|
||||
DWORD dwFiles = 0;
|
||||
|
||||
GetFullPathName (FileName,
|
||||
MAX_PATH,
|
||||
szFullPath,
|
||||
&pFilePart);
|
||||
GetFullPathName(FileName,
|
||||
MAX_PATH,
|
||||
szFullPath,
|
||||
&pFilePart);
|
||||
|
||||
dwFiles = DeleteFiles(szFullPath, dwFlags, dwAttrFlags);
|
||||
if (dwFiles & 0x80000000)
|
||||
return dwFiles;
|
||||
dwFiles = DeleteFiles(szFullPath, dwFlags, dwAttrFlags);
|
||||
if (dwFiles & 0x80000000) return dwFiles;
|
||||
|
||||
if (*dwFlags & DEL_SUBDIR)
|
||||
if (*dwFlags & DEL_SUBDIR)
|
||||
{
|
||||
/* Get just the file name */
|
||||
pSearchPart = _tcsrchr(FileName,_T('\\'));
|
||||
if (pSearchPart != NULL)
|
||||
pSearchPart++;
|
||||
else
|
||||
pSearchPart = FileName;
|
||||
|
||||
/* Get the full path to the file */
|
||||
GetFullPathName (FileName,MAX_PATH,szFullPath,NULL);
|
||||
|
||||
/* strip the filename off of it */
|
||||
pFilePart = _tcsrchr(szFullPath, _T('\\'));
|
||||
if (pFilePart == NULL)
|
||||
{
|
||||
/* Get just the file name */
|
||||
pSearchPart = _tcsrchr(FileName,_T('\\'));
|
||||
if(pSearchPart != NULL)
|
||||
pSearchPart++;
|
||||
else
|
||||
pSearchPart = FileName;
|
||||
|
||||
/* Get the full path to the file */
|
||||
GetFullPathName (FileName,MAX_PATH,szFullPath,NULL);
|
||||
|
||||
/* strip the filename off of it */
|
||||
pFilePart = _tcsrchr(szFullPath, _T('\\'));
|
||||
if (pFilePart == NULL)
|
||||
{
|
||||
pFilePart = szFullPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
pFilePart++;
|
||||
}
|
||||
|
||||
_tcscpy(pFilePart, _T("*"));
|
||||
|
||||
hFile = FindFirstFile(szFullPath, &f);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (!(f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
|
||||
!_tcscmp(f.cFileName, _T(".")) ||
|
||||
!_tcscmp(f.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
_tcscpy(pFilePart, f.cFileName);
|
||||
_tcscat(pFilePart, _T("\\"));
|
||||
_tcscat(pFilePart, pSearchPart);
|
||||
|
||||
dwFiles +=ProcessDirectory(szFullPath, dwFlags, dwAttrFlags);
|
||||
if (dwFiles & 0x80000000)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFile, &f));
|
||||
FindClose (hFile);
|
||||
}
|
||||
pFilePart = szFullPath;
|
||||
}
|
||||
return dwFiles;
|
||||
else
|
||||
{
|
||||
pFilePart++;
|
||||
}
|
||||
|
||||
_tcscpy(pFilePart, _T("*"));
|
||||
|
||||
hFile = FindFirstFile(szFullPath, &f);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (!(f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
|
||||
!_tcscmp(f.cFileName, _T(".")) ||
|
||||
!_tcscmp(f.cFileName, _T("..")))
|
||||
continue;
|
||||
|
||||
_tcscpy(pFilePart, f.cFileName);
|
||||
_tcscat(pFilePart, _T("\\"));
|
||||
_tcscat(pFilePart, pSearchPart);
|
||||
|
||||
dwFiles +=ProcessDirectory(szFullPath, dwFlags, dwAttrFlags);
|
||||
if (dwFiles & 0x80000000)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (FindNextFile (hFile, &f));
|
||||
FindClose (hFile);
|
||||
}
|
||||
}
|
||||
return dwFiles;
|
||||
}
|
||||
|
||||
|
||||
|
||||
INT CommandDelete (LPTSTR param)
|
||||
{
|
||||
/*cmd is the command that was given, in this case it will always be "del" or "delete"
|
||||
param is whatever is given after the command*/
|
||||
/*cmd is the command that was given, in this case it will always be "del" or "delete"
|
||||
param is whatever is given after the command*/
|
||||
|
||||
LPTSTR *arg = NULL;
|
||||
INT args;
|
||||
INT i;
|
||||
INT nEvalArgs = 0; /* nunber of evaluated arguments */
|
||||
DWORD dwFlags = 0;
|
||||
DWORD dwAttrFlags = 0;
|
||||
DWORD dwFiles = 0;
|
||||
LONG ch;
|
||||
TCHAR szOrginalArg[MAX_PATH];
|
||||
LPTSTR *arg = NULL;
|
||||
INT args;
|
||||
INT i;
|
||||
INT nEvalArgs = 0; /* nunber of evaluated arguments */
|
||||
DWORD dwFlags = 0;
|
||||
DWORD dwAttrFlags = 0;
|
||||
DWORD dwFiles = 0;
|
||||
LONG ch;
|
||||
TCHAR szOrginalArg[MAX_PATH];
|
||||
|
||||
/*checks the first two chars of param to see if it is /?
|
||||
this however allows the following command to not show help
|
||||
"del frog.txt /?" */
|
||||
/*checks the first two chars of param to see if it is /?
|
||||
this however allows the following command to not show help
|
||||
"del frog.txt /?" */
|
||||
|
||||
if (!StringsLoaded)
|
||||
if (!StringsLoaded)
|
||||
{
|
||||
LoadStrings();
|
||||
}
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_DEL_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
|
||||
arg = split (param, &args, FALSE, FALSE);
|
||||
|
||||
if (args == 0)
|
||||
{
|
||||
/* only command given */
|
||||
error_req_param_missing ();
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
/* check for options anywhere in command line */
|
||||
for (i = 0; i < args; i++)
|
||||
{
|
||||
if (*arg[i] == _T('/'))
|
||||
{
|
||||
LoadStrings();
|
||||
/*found a command, but check to make sure it has something after it*/
|
||||
if (_tcslen (arg[i]) >= 2)
|
||||
{
|
||||
ch = _totupper (arg[i][1]);
|
||||
if (ch == _T('N'))
|
||||
{
|
||||
dwFlags |= DEL_NOTHING;
|
||||
}
|
||||
else if (ch == _T('P'))
|
||||
{
|
||||
dwFlags |= DEL_PROMPT;
|
||||
}
|
||||
else if (ch == _T('Q'))
|
||||
{
|
||||
dwFlags |= DEL_QUIET;
|
||||
}
|
||||
else if (ch == _T('F'))
|
||||
{
|
||||
dwFlags |= DEL_FORCE;
|
||||
}
|
||||
else if (ch == _T('S'))
|
||||
{
|
||||
dwFlags |= DEL_SUBDIR;
|
||||
}
|
||||
else if (ch == _T('T'))
|
||||
{
|
||||
dwFlags |= DEL_TOTAL;
|
||||
}
|
||||
else if (ch == _T('W'))
|
||||
{
|
||||
dwFlags |= DEL_WIPE;
|
||||
}
|
||||
else if (ch == _T('Y'))
|
||||
{
|
||||
dwFlags |= DEL_YES;
|
||||
}
|
||||
else if (ch == _T('A'))
|
||||
{
|
||||
dwFlags |= DEL_ATTRIBUTES;
|
||||
/*the proper syntax for /A has a min of 4 chars
|
||||
i.e. /A:R or /A:-H */
|
||||
if (_tcslen (arg[i]) < 4)
|
||||
{
|
||||
error_invalid_parameter_format(arg[i]);
|
||||
return 0;
|
||||
}
|
||||
ch = _totupper (arg[i][3]);
|
||||
if (_tcslen (arg[i]) == 4)
|
||||
{
|
||||
if (ch == _T('A'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_ARCHIVE;
|
||||
}
|
||||
if (ch == _T('H'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_HIDDEN;
|
||||
}
|
||||
if (ch == _T('S'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_SYSTEM;
|
||||
}
|
||||
if (ch == _T('R'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_READ_ONLY;
|
||||
}
|
||||
}
|
||||
if (_tcslen (arg[i]) == 5)
|
||||
{
|
||||
if (ch == _T('-'))
|
||||
{
|
||||
ch = _totupper (arg[i][4]);
|
||||
if (ch == _T('A'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_ARCHIVE;
|
||||
}
|
||||
if (ch == _T('H'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_HIDDEN;
|
||||
}
|
||||
if (ch == _T('S'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_SYSTEM;
|
||||
}
|
||||
if (ch == _T('R'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_READ_ONLY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nEvalArgs++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_DEL_HELP1);
|
||||
return 0;
|
||||
}
|
||||
/* there are only options on the command line --> error!!!
|
||||
there is the same number of args as there is flags, so none of the args were filenames*/
|
||||
if (args == nEvalArgs)
|
||||
{
|
||||
error_req_param_missing ();
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
|
||||
arg = split (param, &args, FALSE, FALSE);
|
||||
|
||||
if (args == 0)
|
||||
{
|
||||
/* only command given */
|
||||
error_req_param_missing ();
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
/* check for options anywhere in command line */
|
||||
for (i = 0; i < args; i++)
|
||||
{
|
||||
if (*arg[i] == _T('/'))
|
||||
{
|
||||
/*found a command, but check to make sure it has something after it*/
|
||||
if (_tcslen (arg[i]) >= 2)
|
||||
{
|
||||
ch = _totupper (arg[i][1]);
|
||||
if (ch == _T('N'))
|
||||
{
|
||||
dwFlags |= DEL_NOTHING;
|
||||
}
|
||||
else if (ch == _T('P'))
|
||||
{
|
||||
dwFlags |= DEL_PROMPT;
|
||||
}
|
||||
else if (ch == _T('Q'))
|
||||
{
|
||||
dwFlags |= DEL_QUIET;
|
||||
}
|
||||
else if (ch == _T('F'))
|
||||
{
|
||||
dwFlags |= DEL_FORCE;
|
||||
}
|
||||
else if (ch == _T('S'))
|
||||
{
|
||||
dwFlags |= DEL_SUBDIR;
|
||||
}
|
||||
else if (ch == _T('T'))
|
||||
{
|
||||
dwFlags |= DEL_TOTAL;
|
||||
}
|
||||
else if (ch == _T('W'))
|
||||
{
|
||||
dwFlags |= DEL_WIPE;
|
||||
}
|
||||
else if (ch == _T('Y'))
|
||||
{
|
||||
dwFlags |= DEL_YES;
|
||||
}
|
||||
else if (ch == _T('A'))
|
||||
{
|
||||
|
||||
dwFlags |= DEL_ATTRIBUTES;
|
||||
/*the proper syntax for /A has a min of 4 chars
|
||||
i.e. /A:R or /A:-H */
|
||||
if (_tcslen (arg[i]) < 4)
|
||||
{
|
||||
error_invalid_parameter_format(arg[i]);
|
||||
return 0;
|
||||
}
|
||||
ch = _totupper (arg[i][3]);
|
||||
if (_tcslen (arg[i]) == 4)
|
||||
{
|
||||
if(ch == _T('A'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_ARCHIVE;
|
||||
}
|
||||
if(ch == _T('H'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_HIDDEN;
|
||||
}
|
||||
if(ch == _T('S'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_SYSTEM;
|
||||
}
|
||||
if(ch == _T('R'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_READ_ONLY;
|
||||
}
|
||||
}
|
||||
if (_tcslen (arg[i]) == 5)
|
||||
{
|
||||
if(ch == _T('-'))
|
||||
{
|
||||
ch = _totupper (arg[i][4]);
|
||||
if(ch == _T('A'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_ARCHIVE;
|
||||
}
|
||||
if(ch == _T('H'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_HIDDEN;
|
||||
}
|
||||
if(ch == _T('S'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_SYSTEM;
|
||||
}
|
||||
if(ch == _T('R'))
|
||||
{
|
||||
dwAttrFlags |= ATTR_N_READ_ONLY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nEvalArgs++;
|
||||
}
|
||||
}
|
||||
|
||||
/* there are only options on the command line --> error!!!
|
||||
there is the same number of args as there is flags, so none of the args were filenames*/
|
||||
if (args == nEvalArgs)
|
||||
{
|
||||
error_req_param_missing ();
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* keep quiet within batch files */
|
||||
if (bc != NULL)
|
||||
dwFlags |= DEL_QUIET;
|
||||
|
||||
/* check for filenames anywhere in command line */
|
||||
for (i = 0; i < args && !(dwFiles & 0x80000000); i++)
|
||||
{
|
||||
/* keep quiet within batch files */
|
||||
if (bc != NULL) dwFlags |= DEL_QUIET;
|
||||
|
||||
/* check for filenames anywhere in command line */
|
||||
for (i = 0; i < args && !(dwFiles & 0x80000000); i++)
|
||||
{
|
||||
/*this checks to see if it is a flag; if it isn't, we assume it is a file name*/
|
||||
if((*arg[i] == _T('/')) || (*arg[i] == _T('-')))
|
||||
continue;
|
||||
|
||||
/* We want to make a copies of the argument */
|
||||
if(_tcslen(arg[i]) == 2 && arg[i][1] == _T(':'))
|
||||
{
|
||||
/* Check for C: D: ... */
|
||||
GetRootPath(arg[i],szOrginalArg,MAX_PATH);
|
||||
}
|
||||
else
|
||||
{
|
||||
_tcscpy(szOrginalArg,arg[i]);
|
||||
}
|
||||
dwFiles += ProcessDirectory(szOrginalArg, &dwFlags, dwAttrFlags);
|
||||
if ((*arg[i] == _T('/')) || (*arg[i] == _T('-')))
|
||||
continue;
|
||||
|
||||
/* We want to make a copies of the argument */
|
||||
if (_tcslen(arg[i]) == 2 && arg[i][1] == _T(':'))
|
||||
{
|
||||
/* Check for C: D: ... */
|
||||
GetRootPath(arg[i], szOrginalArg, MAX_PATH);
|
||||
}
|
||||
else
|
||||
{
|
||||
_tcscpy(szOrginalArg,arg[i]);
|
||||
}
|
||||
dwFiles += ProcessDirectory(szOrginalArg, &dwFlags, dwAttrFlags);
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
freep (arg);
|
||||
|
||||
/*Based on MS cmd, we only tell what files are being deleted when /S is used */
|
||||
if (dwFlags & DEL_TOTAL)
|
||||
{
|
||||
dwFiles &= 0x7fffffff;
|
||||
if (dwFiles < 2)
|
||||
{
|
||||
ConOutResPrintf(STRING_DEL_HELP3, dwFiles);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutResPrintf(STRING_DEL_HELP4, dwFiles);
|
||||
}
|
||||
}
|
||||
/*Based on MS cmd, we only tell what files are being deleted when /S is used */
|
||||
if (dwFlags & DEL_TOTAL)
|
||||
{
|
||||
dwFiles &= 0x7fffffff;
|
||||
if (dwFiles < 2)
|
||||
{
|
||||
ConOutResPrintf(STRING_DEL_HELP3, dwFiles);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConOutResPrintf(STRING_DEL_HELP4, dwFiles);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+21
-21
@@ -16,33 +16,33 @@
|
||||
|
||||
INT CommandDelay (LPTSTR param)
|
||||
{
|
||||
DWORD val;
|
||||
DWORD mul=1000;
|
||||
DWORD val;
|
||||
DWORD mul=1000;
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_DELAY_HELP);
|
||||
return 0;
|
||||
}
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_DELAY_HELP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
nErrorLevel = 0;
|
||||
|
||||
if (*param==0)
|
||||
{
|
||||
error_req_param_missing ();
|
||||
return 1;
|
||||
}
|
||||
if (*param==0)
|
||||
{
|
||||
error_req_param_missing ();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (_tcsnicmp(param,_T("/m"),2) == 0)
|
||||
{
|
||||
mul = 1;
|
||||
param += 2;
|
||||
}
|
||||
if (_tcsnicmp(param,_T("/m"),2) == 0)
|
||||
{
|
||||
mul = 1;
|
||||
param += 2;
|
||||
}
|
||||
|
||||
val = _ttoi(param);
|
||||
Sleep(val * mul);
|
||||
val = _ttoi(param);
|
||||
Sleep(val * mul);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_DELAY */
|
||||
|
||||
+1206
-1215
File diff suppressed because it is too large
Load Diff
+75
-75
@@ -20,9 +20,9 @@
|
||||
|
||||
typedef struct tagDIRENTRY
|
||||
{
|
||||
struct tagDIRENTRY *prev;
|
||||
struct tagDIRENTRY *next;
|
||||
TCHAR szPath[1];
|
||||
struct tagDIRENTRY *prev;
|
||||
struct tagDIRENTRY *next;
|
||||
TCHAR szPath[1];
|
||||
} DIRENTRY, *LPDIRENTRY;
|
||||
|
||||
|
||||
@@ -34,42 +34,42 @@ static LPDIRENTRY lpStackBottom;
|
||||
static INT
|
||||
PushDirectory (LPTSTR pszPath)
|
||||
{
|
||||
LPDIRENTRY lpDir = cmd_alloc(FIELD_OFFSET(DIRENTRY, szPath[_tcslen(pszPath) + 1]));
|
||||
if (!lpDir)
|
||||
{
|
||||
error_out_of_memory ();
|
||||
return -1;
|
||||
}
|
||||
LPDIRENTRY lpDir = cmd_alloc(FIELD_OFFSET(DIRENTRY, szPath[_tcslen(pszPath) + 1]));
|
||||
if (!lpDir)
|
||||
{
|
||||
error_out_of_memory ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
lpDir->prev = NULL;
|
||||
lpDir->next = lpStackTop;
|
||||
if (lpStackTop == NULL)
|
||||
lpStackBottom = lpDir;
|
||||
else
|
||||
lpStackTop->prev = lpDir;
|
||||
lpStackTop = lpDir;
|
||||
lpDir->prev = NULL;
|
||||
lpDir->next = lpStackTop;
|
||||
if (lpStackTop == NULL)
|
||||
lpStackBottom = lpDir;
|
||||
else
|
||||
lpStackTop->prev = lpDir;
|
||||
lpStackTop = lpDir;
|
||||
|
||||
_tcscpy(lpDir->szPath, pszPath);
|
||||
_tcscpy(lpDir->szPath, pszPath);
|
||||
|
||||
nStackDepth++;
|
||||
nStackDepth++;
|
||||
|
||||
return nErrorLevel = 0;
|
||||
return nErrorLevel = 0;
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
PopDirectory (VOID)
|
||||
{
|
||||
LPDIRENTRY lpDir = lpStackTop;
|
||||
lpStackTop = lpDir->next;
|
||||
if (lpStackTop != NULL)
|
||||
lpStackTop->prev = NULL;
|
||||
else
|
||||
lpStackBottom = NULL;
|
||||
LPDIRENTRY lpDir = lpStackTop;
|
||||
lpStackTop = lpDir->next;
|
||||
if (lpStackTop != NULL)
|
||||
lpStackTop->prev = NULL;
|
||||
else
|
||||
lpStackBottom = NULL;
|
||||
|
||||
cmd_free (lpDir);
|
||||
cmd_free (lpDir);
|
||||
|
||||
nStackDepth--;
|
||||
nStackDepth--;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ PopDirectory (VOID)
|
||||
*/
|
||||
VOID InitDirectoryStack (VOID)
|
||||
{
|
||||
nStackDepth = 0;
|
||||
lpStackTop = NULL;
|
||||
lpStackBottom = NULL;
|
||||
nStackDepth = 0;
|
||||
lpStackTop = NULL;
|
||||
lpStackBottom = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,14 +89,14 @@ VOID InitDirectoryStack (VOID)
|
||||
*/
|
||||
VOID DestroyDirectoryStack (VOID)
|
||||
{
|
||||
while (nStackDepth)
|
||||
PopDirectory ();
|
||||
while (nStackDepth)
|
||||
PopDirectory ();
|
||||
}
|
||||
|
||||
|
||||
INT GetDirectoryStackDepth (VOID)
|
||||
{
|
||||
return nStackDepth;
|
||||
return nStackDepth;
|
||||
}
|
||||
|
||||
|
||||
@@ -105,23 +105,23 @@ INT GetDirectoryStackDepth (VOID)
|
||||
*/
|
||||
INT CommandPushd (LPTSTR rest)
|
||||
{
|
||||
TCHAR curPath[MAX_PATH];
|
||||
TCHAR curPath[MAX_PATH];
|
||||
|
||||
if (!_tcsncmp (rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP1);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
GetCurrentDirectory (MAX_PATH, curPath);
|
||||
GetCurrentDirectory (MAX_PATH, curPath);
|
||||
|
||||
if (rest[0] != _T('\0'))
|
||||
{
|
||||
if (!SetRootPath(NULL, rest))
|
||||
return 1;
|
||||
}
|
||||
if (rest[0] != _T('\0'))
|
||||
{
|
||||
if (!SetRootPath(NULL, rest))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return PushDirectory(curPath);
|
||||
return PushDirectory(curPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -130,20 +130,20 @@ INT CommandPushd (LPTSTR rest)
|
||||
*/
|
||||
INT CommandPopd (LPTSTR rest)
|
||||
{
|
||||
INT ret = 0;
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP2);
|
||||
return 0;
|
||||
}
|
||||
INT ret = 0;
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (nStackDepth == 0)
|
||||
return 1;
|
||||
if (nStackDepth == 0)
|
||||
return 1;
|
||||
|
||||
ret = _tchdir(lpStackTop->szPath) != 0;
|
||||
PopDirectory ();
|
||||
ret = _tchdir(lpStackTop->szPath) != 0;
|
||||
PopDirectory ();
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -152,31 +152,31 @@ INT CommandPopd (LPTSTR rest)
|
||||
*/
|
||||
INT CommandDirs (LPTSTR rest)
|
||||
{
|
||||
LPDIRENTRY lpDir;
|
||||
LPDIRENTRY lpDir;
|
||||
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP3);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
nErrorLevel = 0;
|
||||
|
||||
lpDir = lpStackBottom;
|
||||
lpDir = lpStackBottom;
|
||||
|
||||
if (lpDir == NULL)
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP4);
|
||||
return 0;
|
||||
}
|
||||
if (lpDir == NULL)
|
||||
{
|
||||
ConOutResPuts(STRING_DIRSTACK_HELP4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (lpDir != NULL)
|
||||
{
|
||||
ConOutPuts(lpDir->szPath);
|
||||
lpDir = lpDir->prev;
|
||||
}
|
||||
while (lpDir != NULL)
|
||||
{
|
||||
ConOutPuts(lpDir->szPath);
|
||||
lpDir = lpDir->prev;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* FEATURE_DIRECTORY_STACK */
|
||||
|
||||
+73
-73
@@ -22,8 +22,8 @@
|
||||
* 13-Jul-2000 (Eric Kohl)
|
||||
* Implemented 'echo.' and 'echoerr.'.
|
||||
*
|
||||
* 28-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 28-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -31,105 +31,105 @@
|
||||
BOOL
|
||||
OnOffCommand(LPTSTR param, LPBOOL flag, INT message)
|
||||
{
|
||||
TCHAR *p2;
|
||||
if (_tcsnicmp(param, D_OFF, sizeof(D_OFF)/sizeof(TCHAR) - 1) == 0)
|
||||
{
|
||||
p2 = param + sizeof(D_OFF)/sizeof(TCHAR) - 1;
|
||||
while (_istspace(*p2))
|
||||
p2++;
|
||||
if (*p2 == _T('\0'))
|
||||
{
|
||||
*flag = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp(param, D_ON, sizeof(D_ON)/sizeof(TCHAR) - 1) == 0)
|
||||
{
|
||||
p2 = param + sizeof(D_ON)/sizeof(TCHAR) - 1;
|
||||
while (_istspace(*p2))
|
||||
p2++;
|
||||
if (*p2 == _T('\0'))
|
||||
{
|
||||
*flag = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (*param == _T('\0'))
|
||||
{
|
||||
ConOutResPrintf(message, *flag ? D_ON : D_OFF);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
TCHAR *p2;
|
||||
if (_tcsnicmp(param, D_OFF, sizeof(D_OFF)/sizeof(TCHAR) - 1) == 0)
|
||||
{
|
||||
p2 = param + sizeof(D_OFF)/sizeof(TCHAR) - 1;
|
||||
while (_istspace(*p2))
|
||||
p2++;
|
||||
if (*p2 == _T('\0'))
|
||||
{
|
||||
*flag = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp(param, D_ON, sizeof(D_ON)/sizeof(TCHAR) - 1) == 0)
|
||||
{
|
||||
p2 = param + sizeof(D_ON)/sizeof(TCHAR) - 1;
|
||||
while (_istspace(*p2))
|
||||
p2++;
|
||||
if (*p2 == _T('\0'))
|
||||
{
|
||||
*flag = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (*param == _T('\0'))
|
||||
{
|
||||
ConOutResPrintf(message, *flag ? D_ON : D_OFF);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
INT CommandEcho (LPTSTR param)
|
||||
{
|
||||
LPTSTR p1;
|
||||
LPTSTR p1;
|
||||
|
||||
TRACE ("CommandEcho: '%s'\n", debugstr_aw(param));
|
||||
TRACE ("CommandEcho: '%s'\n", debugstr_aw(param));
|
||||
|
||||
/* skip all spaces for the check of '/?', 'ON' and 'OFF' */
|
||||
p1 = param;
|
||||
while(_istspace(*p1))
|
||||
p1++;
|
||||
/* skip all spaces for the check of '/?', 'ON' and 'OFF' */
|
||||
p1 = param;
|
||||
while(_istspace(*p1))
|
||||
p1++;
|
||||
|
||||
if (!_tcsncmp (p1, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ECHO_HELP4);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (p1, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_ECHO_HELP4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!OnOffCommand(p1, &bEcho, STRING_ECHO_HELP5))
|
||||
{
|
||||
/* skip the first character */
|
||||
ConOutPuts(param + 1);
|
||||
ConOutPuts(_T("\r\n"));
|
||||
}
|
||||
return 0;
|
||||
if (!OnOffCommand(p1, &bEcho, STRING_ECHO_HELP5))
|
||||
{
|
||||
/* skip the first character */
|
||||
ConOutPuts(param + 1);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
INT CommandEchos (LPTSTR param)
|
||||
{
|
||||
TRACE ("CommandEchos: '%s'\n", debugstr_aw(param));
|
||||
TRACE ("CommandEchos: '%s'\n", debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP1);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ConOutPrintf (_T("%s"), param);
|
||||
return 0;
|
||||
ConOutPrintf (_T("%s"), param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT CommandEchoerr (LPTSTR param)
|
||||
{
|
||||
TRACE ("CommandEchoerr: '%s'\n", debugstr_aw(param));
|
||||
TRACE ("CommandEchoerr: '%s'\n", debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP2);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ConErrPuts (param);
|
||||
return 0;
|
||||
ConErrPuts (param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INT CommandEchoserr (LPTSTR param)
|
||||
{
|
||||
TRACE ("CommandEchoserr: '%s'\n", debugstr_aw(param));
|
||||
TRACE ("CommandEchoserr: '%s'\n", debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP3);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPuts(STRING_ECHO_HELP3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ConErrPrintf (_T("%s"), param);
|
||||
return 0;
|
||||
ConErrPrintf (_T("%s"), param);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+63
-63
@@ -16,8 +16,8 @@
|
||||
* 02-Feb-1999 (Eric Kohl)
|
||||
* Use FormatMessage() for error reports.
|
||||
*
|
||||
* 28-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 28-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -25,145 +25,145 @@
|
||||
|
||||
VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMessage[1024];
|
||||
LPTSTR szError;
|
||||
va_list arg_ptr;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMessage[1024];
|
||||
LPTSTR szError;
|
||||
va_list arg_ptr;
|
||||
|
||||
if (dwErrorCode == ERROR_SUCCESS)
|
||||
return;
|
||||
if (dwErrorCode == ERROR_SUCCESS)
|
||||
return;
|
||||
|
||||
nErrorLevel = 1;
|
||||
nErrorLevel = 1;
|
||||
|
||||
if (szFormat)
|
||||
{
|
||||
va_start (arg_ptr, szFormat);
|
||||
_vstprintf (szMessage, szFormat, arg_ptr);
|
||||
va_end (arg_ptr);
|
||||
}
|
||||
if (szFormat)
|
||||
{
|
||||
va_start(arg_ptr, szFormat);
|
||||
_vstprintf(szMessage, szFormat, arg_ptr);
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&szError, 0, NULL))
|
||||
{
|
||||
ConErrPrintf (_T("%s %s\n"), szError, szMessage);
|
||||
if(szError)
|
||||
LocalFree (szError);
|
||||
return;
|
||||
}
|
||||
if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
|
||||
NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&szError, 0, NULL))
|
||||
{
|
||||
ConErrPrintf(_T("%s %s\n"), szError, szMessage);
|
||||
if (szError)
|
||||
LocalFree (szError);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fall back just in case the error is not defined */
|
||||
if (szFormat)
|
||||
ConErrPrintf (_T("%s -- %s\n"), szMsg, szMessage);
|
||||
else
|
||||
ConErrPrintf (_T("%s\n"), szMsg);
|
||||
/* Fall back just in case the error is not defined */
|
||||
if (szFormat)
|
||||
ConErrPrintf(_T("%s -- %s\n"), szMsg, szMessage);
|
||||
else
|
||||
ConErrPrintf(_T("%s\n"), szMsg);
|
||||
}
|
||||
|
||||
VOID error_parameter_format(TCHAR ch)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_PARAMETERF_ERROR, ch);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPrintf(STRING_ERROR_PARAMETERF_ERROR, ch);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_switch (TCHAR ch)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_SWITCH, ch);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_SWITCH, ch);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_too_many_parameters (LPTSTR s)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_TOO_MANY_PARAMETERS, s);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPrintf(STRING_ERROR_TOO_MANY_PARAMETERS, s);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_path_not_found (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_PATH_NOT_FOUND);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_PATH_NOT_FOUND);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_file_not_found (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_FILE_NOT_FOUND);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_FILE_NOT_FOUND);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_sfile_not_found (LPTSTR f)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString(CMD_ModuleHandle, STRING_ERROR_FILE_NOT_FOUND, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(_T("%s - %s\n"), szMsg, f);
|
||||
nErrorLevel = 1;
|
||||
LoadString(CMD_ModuleHandle, STRING_ERROR_FILE_NOT_FOUND, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(_T("%s - %s\n"), szMsg, f);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_req_param_missing (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_REQ_PARAM_MISSING);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_drive (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_INVALID_DRIVE);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_INVALID_DRIVE);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_bad_command (LPTSTR s)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_BADCOMMAND, s);
|
||||
nErrorLevel = 9009;
|
||||
ConErrResPrintf(STRING_ERROR_BADCOMMAND, s);
|
||||
nErrorLevel = 9009;
|
||||
}
|
||||
|
||||
|
||||
VOID error_no_pipe (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_CANNOTPIPE);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_CANNOTPIPE);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_out_of_memory (VOID)
|
||||
{
|
||||
ConErrResPuts(STRING_ERROR_OUT_OF_MEMORY);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPuts(STRING_ERROR_OUT_OF_MEMORY);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_parameter_format (LPTSTR s)
|
||||
{
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, s);
|
||||
nErrorLevel = 1;
|
||||
ConErrResPrintf(STRING_ERROR_INVALID_PARAM_FORMAT, s);
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID error_syntax (LPTSTR s)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString(CMD_ModuleHandle, STRING_ERROR_ERROR2, szMsg, RC_STRING_MAX_SIZE);
|
||||
LoadString(CMD_ModuleHandle, STRING_ERROR_ERROR2, szMsg, RC_STRING_MAX_SIZE);
|
||||
|
||||
if (s)
|
||||
ConErrPrintf(_T("%s - %s\n"), szMsg, s);
|
||||
else
|
||||
ConErrPrintf(_T("%s.\n"), szMsg);
|
||||
if (s)
|
||||
ConErrPrintf(_T("%s - %s\n"), szMsg, s);
|
||||
else
|
||||
ConErrPrintf(_T("%s.\n"), szMsg);
|
||||
|
||||
nErrorLevel = 1;
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
||||
|
||||
VOID msg_pause (VOID)
|
||||
{
|
||||
ConOutResPuts(STRING_ERROR_D_PAUSEMSG);
|
||||
ConOutResPuts(STRING_ERROR_D_PAUSEMSG);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+622
-623
File diff suppressed because it is too large
Load Diff
+390
-390
@@ -26,8 +26,8 @@
|
||||
* Implemented preservation of echo flag. Some other for related
|
||||
* code in other files fixed, too.
|
||||
*
|
||||
* 28-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 28-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -36,16 +36,16 @@
|
||||
/* FOR is a special command, so this function is only used for showing help now */
|
||||
INT cmd_for (LPTSTR param)
|
||||
{
|
||||
TRACE ("cmd_for (\'%s\')\n", debugstr_aw(param));
|
||||
TRACE ("cmd_for (\'%s\')\n", debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_FOR_HELP1);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_FOR_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
error_syntax(param);
|
||||
return 1;
|
||||
error_syntax(param);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* The stack of current FOR contexts.
|
||||
@@ -55,322 +55,322 @@ LPFOR_CONTEXT fc = NULL;
|
||||
/* Get the next element of the FOR's list */
|
||||
static BOOL GetNextElement(TCHAR **pStart, TCHAR **pEnd)
|
||||
{
|
||||
TCHAR *p = *pEnd;
|
||||
BOOL InQuotes = FALSE;
|
||||
while (_istspace(*p))
|
||||
p++;
|
||||
if (!*p)
|
||||
return FALSE;
|
||||
*pStart = p;
|
||||
while (*p && (InQuotes || !_istspace(*p)))
|
||||
InQuotes ^= (*p++ == _T('"'));
|
||||
*pEnd = p;
|
||||
return TRUE;
|
||||
TCHAR *p = *pEnd;
|
||||
BOOL InQuotes = FALSE;
|
||||
while (_istspace(*p))
|
||||
p++;
|
||||
if (!*p)
|
||||
return FALSE;
|
||||
*pStart = p;
|
||||
while (*p && (InQuotes || !_istspace(*p)))
|
||||
InQuotes ^= (*p++ == _T('"'));
|
||||
*pEnd = p;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Execute a single instance of a FOR command */
|
||||
static INT RunInstance(PARSED_COMMAND *Cmd)
|
||||
{
|
||||
if (bEcho && !bDisableBatchEcho && Cmd->Subcommands->Type != C_QUIET)
|
||||
{
|
||||
if (!bIgnoreEcho)
|
||||
ConOutChar(_T('\n'));
|
||||
PrintPrompt();
|
||||
EchoCommand(Cmd->Subcommands);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
/* Just run the command (variable expansion is done in DoDelayedExpansion) */
|
||||
return ExecuteCommand(Cmd->Subcommands);
|
||||
if (bEcho && !bDisableBatchEcho && Cmd->Subcommands->Type != C_QUIET)
|
||||
{
|
||||
if (!bIgnoreEcho)
|
||||
ConOutChar(_T('\n'));
|
||||
PrintPrompt();
|
||||
EchoCommand(Cmd->Subcommands);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
/* Just run the command (variable expansion is done in DoDelayedExpansion) */
|
||||
return ExecuteCommand(Cmd->Subcommands);
|
||||
}
|
||||
|
||||
/* Check if this FOR should be terminated early */
|
||||
static BOOL Exiting(PARSED_COMMAND *Cmd)
|
||||
{
|
||||
/* Someone might have removed our context */
|
||||
return bCtrlBreak || fc != Cmd->For.Context;
|
||||
/* Someone might have removed our context */
|
||||
return bCtrlBreak || fc != Cmd->For.Context;
|
||||
}
|
||||
|
||||
/* Read the contents of a text file into memory,
|
||||
* dynamically allocating enough space to hold it all */
|
||||
static LPTSTR ReadFileContents(FILE *InputFile, TCHAR *Buffer)
|
||||
{
|
||||
SIZE_T Len = 0;
|
||||
SIZE_T AllocLen = 1000;
|
||||
LPTSTR Contents = cmd_alloc(AllocLen * sizeof(TCHAR));
|
||||
if (!Contents)
|
||||
return NULL;
|
||||
SIZE_T Len = 0;
|
||||
SIZE_T AllocLen = 1000;
|
||||
LPTSTR Contents = cmd_alloc(AllocLen * sizeof(TCHAR));
|
||||
if (!Contents)
|
||||
return NULL;
|
||||
|
||||
while (_fgetts(Buffer, CMDLINE_LENGTH, InputFile))
|
||||
{
|
||||
ULONG_PTR CharsRead = _tcslen(Buffer);
|
||||
while (Len + CharsRead >= AllocLen)
|
||||
{
|
||||
LPTSTR OldContents = Contents;
|
||||
Contents = cmd_realloc(Contents, (AllocLen *= 2) * sizeof(TCHAR));
|
||||
if (!Contents)
|
||||
{
|
||||
cmd_free(OldContents);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_tcscpy(&Contents[Len], Buffer);
|
||||
Len += CharsRead;
|
||||
}
|
||||
while (_fgetts(Buffer, CMDLINE_LENGTH, InputFile))
|
||||
{
|
||||
ULONG_PTR CharsRead = _tcslen(Buffer);
|
||||
while (Len + CharsRead >= AllocLen)
|
||||
{
|
||||
LPTSTR OldContents = Contents;
|
||||
Contents = cmd_realloc(Contents, (AllocLen *= 2) * sizeof(TCHAR));
|
||||
if (!Contents)
|
||||
{
|
||||
cmd_free(OldContents);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_tcscpy(&Contents[Len], Buffer);
|
||||
Len += CharsRead;
|
||||
}
|
||||
|
||||
Contents[Len] = _T('\0');
|
||||
return Contents;
|
||||
Contents[Len] = _T('\0');
|
||||
return Contents;
|
||||
}
|
||||
|
||||
static INT ForF(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer)
|
||||
{
|
||||
LPTSTR Delims = _T(" \t");
|
||||
TCHAR Eol = _T(';');
|
||||
INT SkipLines = 0;
|
||||
DWORD Tokens = (1 << 1);
|
||||
BOOL RemainderVar = FALSE;
|
||||
TCHAR StringQuote = _T('"');
|
||||
TCHAR CommandQuote = _T('\'');
|
||||
LPTSTR Variables[32];
|
||||
TCHAR *Start, *End;
|
||||
INT i;
|
||||
INT Ret = 0;
|
||||
LPTSTR Delims = _T(" \t");
|
||||
TCHAR Eol = _T(';');
|
||||
INT SkipLines = 0;
|
||||
DWORD Tokens = (1 << 1);
|
||||
BOOL RemainderVar = FALSE;
|
||||
TCHAR StringQuote = _T('"');
|
||||
TCHAR CommandQuote = _T('\'');
|
||||
LPTSTR Variables[32];
|
||||
TCHAR *Start, *End;
|
||||
INT i;
|
||||
INT Ret = 0;
|
||||
|
||||
if (Cmd->For.Params)
|
||||
{
|
||||
TCHAR Quote = 0;
|
||||
TCHAR *Param = Cmd->For.Params;
|
||||
if (*Param == _T('"') || *Param == _T('\''))
|
||||
Quote = *Param++;
|
||||
if (Cmd->For.Params)
|
||||
{
|
||||
TCHAR Quote = 0;
|
||||
TCHAR *Param = Cmd->For.Params;
|
||||
if (*Param == _T('"') || *Param == _T('\''))
|
||||
Quote = *Param++;
|
||||
|
||||
while (*Param && *Param != Quote)
|
||||
{
|
||||
if (*Param <= _T(' '))
|
||||
{
|
||||
Param++;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("delims="), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* delims=xxx: Specifies the list of characters that separate tokens */
|
||||
Delims = Param;
|
||||
while (*Param && *Param != Quote)
|
||||
{
|
||||
if (*Param == _T(' '))
|
||||
{
|
||||
TCHAR *FirstSpace = Param;
|
||||
Param += _tcsspn(Param, _T(" "));
|
||||
/* Exclude trailing spaces if this is not the last parameter */
|
||||
if (*Param && *Param != Quote)
|
||||
*FirstSpace = _T('\0');
|
||||
break;
|
||||
}
|
||||
Param++;
|
||||
}
|
||||
if (*Param == Quote)
|
||||
*Param++ = _T('\0');
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("eol="), 4) == 0)
|
||||
{
|
||||
Param += 4;
|
||||
/* eol=c: Lines starting with this character (may be
|
||||
* preceded by delimiters) are skipped. */
|
||||
Eol = *Param;
|
||||
if (Eol != _T('\0'))
|
||||
Param++;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("skip="), 5) == 0)
|
||||
{
|
||||
/* skip=n: Number of lines to skip at the beginning of each file */
|
||||
SkipLines = _tcstol(Param + 5, &Param, 0);
|
||||
if (SkipLines <= 0)
|
||||
goto error;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("tokens="), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* tokens=x,y,m-n: List of token numbers (must be between
|
||||
* 1 and 31) that will be assigned into variables. */
|
||||
Tokens = 0;
|
||||
while (*Param && *Param != Quote && *Param != _T('*'))
|
||||
{
|
||||
INT First = _tcstol(Param, &Param, 0);
|
||||
INT Last = First;
|
||||
if (First < 1)
|
||||
goto error;
|
||||
if (*Param == _T('-'))
|
||||
{
|
||||
/* It's a range of tokens */
|
||||
Last = _tcstol(Param + 1, &Param, 0);
|
||||
if (Last < First || Last > 31)
|
||||
goto error;
|
||||
}
|
||||
Tokens |= (2 << Last) - (1 << First);
|
||||
while (*Param && *Param != Quote)
|
||||
{
|
||||
if (*Param <= _T(' '))
|
||||
{
|
||||
Param++;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("delims="), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* delims=xxx: Specifies the list of characters that separate tokens */
|
||||
Delims = Param;
|
||||
while (*Param && *Param != Quote)
|
||||
{
|
||||
if (*Param == _T(' '))
|
||||
{
|
||||
TCHAR *FirstSpace = Param;
|
||||
Param += _tcsspn(Param, _T(" "));
|
||||
/* Exclude trailing spaces if this is not the last parameter */
|
||||
if (*Param && *Param != Quote)
|
||||
*FirstSpace = _T('\0');
|
||||
break;
|
||||
}
|
||||
Param++;
|
||||
}
|
||||
if (*Param == Quote)
|
||||
*Param++ = _T('\0');
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("eol="), 4) == 0)
|
||||
{
|
||||
Param += 4;
|
||||
/* eol=c: Lines starting with this character (may be
|
||||
* preceded by delimiters) are skipped. */
|
||||
Eol = *Param;
|
||||
if (Eol != _T('\0'))
|
||||
Param++;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("skip="), 5) == 0)
|
||||
{
|
||||
/* skip=n: Number of lines to skip at the beginning of each file */
|
||||
SkipLines = _tcstol(Param + 5, &Param, 0);
|
||||
if (SkipLines <= 0)
|
||||
goto error;
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("tokens="), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* tokens=x,y,m-n: List of token numbers (must be between
|
||||
* 1 and 31) that will be assigned into variables. */
|
||||
Tokens = 0;
|
||||
while (*Param && *Param != Quote && *Param != _T('*'))
|
||||
{
|
||||
INT First = _tcstol(Param, &Param, 0);
|
||||
INT Last = First;
|
||||
if (First < 1)
|
||||
goto error;
|
||||
if (*Param == _T('-'))
|
||||
{
|
||||
/* It's a range of tokens */
|
||||
Last = _tcstol(Param + 1, &Param, 0);
|
||||
if (Last < First || Last > 31)
|
||||
goto error;
|
||||
}
|
||||
Tokens |= (2 << Last) - (1 << First);
|
||||
|
||||
if (*Param != _T(','))
|
||||
break;
|
||||
Param++;
|
||||
}
|
||||
/* With an asterisk at the end, an additional variable
|
||||
* will be created to hold the remainder of the line
|
||||
* (after the last token specified). */
|
||||
if (*Param == _T('*'))
|
||||
{
|
||||
RemainderVar = TRUE;
|
||||
Param++;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("useback"), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* usebackq: Use alternate quote characters */
|
||||
StringQuote = _T('\'');
|
||||
CommandQuote = _T('`');
|
||||
/* Can be written as either "useback" or "usebackq" */
|
||||
if (_totlower(*Param) == _T('q'))
|
||||
Param++;
|
||||
}
|
||||
else
|
||||
{
|
||||
error:
|
||||
error_syntax(Param);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*Param != _T(','))
|
||||
break;
|
||||
Param++;
|
||||
}
|
||||
/* With an asterisk at the end, an additional variable
|
||||
* will be created to hold the remainder of the line
|
||||
* (after the last token specified). */
|
||||
if (*Param == _T('*'))
|
||||
{
|
||||
RemainderVar = TRUE;
|
||||
Param++;
|
||||
}
|
||||
}
|
||||
else if (_tcsnicmp(Param, _T("useback"), 7) == 0)
|
||||
{
|
||||
Param += 7;
|
||||
/* usebackq: Use alternate quote characters */
|
||||
StringQuote = _T('\'');
|
||||
CommandQuote = _T('`');
|
||||
/* Can be written as either "useback" or "usebackq" */
|
||||
if (_totlower(*Param) == _T('q'))
|
||||
Param++;
|
||||
}
|
||||
else
|
||||
{
|
||||
error:
|
||||
error_syntax(Param);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Count how many variables will be set: one for each token,
|
||||
* plus maybe one for the remainder */
|
||||
fc->varcount = RemainderVar;
|
||||
for (i = 1; i < 32; i++)
|
||||
fc->varcount += (Tokens >> i & 1);
|
||||
fc->values = Variables;
|
||||
/* Count how many variables will be set: one for each token,
|
||||
* plus maybe one for the remainder */
|
||||
fc->varcount = RemainderVar;
|
||||
for (i = 1; i < 32; i++)
|
||||
fc->varcount += (Tokens >> i & 1);
|
||||
fc->values = Variables;
|
||||
|
||||
if (*List == StringQuote || *List == CommandQuote)
|
||||
{
|
||||
/* Treat the entire "list" as one single element */
|
||||
Start = List;
|
||||
End = &List[_tcslen(List)];
|
||||
goto single_element;
|
||||
}
|
||||
if (*List == StringQuote || *List == CommandQuote)
|
||||
{
|
||||
/* Treat the entire "list" as one single element */
|
||||
Start = List;
|
||||
End = &List[_tcslen(List)];
|
||||
goto single_element;
|
||||
}
|
||||
|
||||
End = List;
|
||||
while (GetNextElement(&Start, &End))
|
||||
{
|
||||
FILE *InputFile;
|
||||
LPTSTR FullInput, In, NextLine;
|
||||
INT Skip;
|
||||
single_element:
|
||||
End = List;
|
||||
while (GetNextElement(&Start, &End))
|
||||
{
|
||||
FILE *InputFile;
|
||||
LPTSTR FullInput, In, NextLine;
|
||||
INT Skip;
|
||||
single_element:
|
||||
|
||||
if (*Start == StringQuote && End[-1] == StringQuote)
|
||||
{
|
||||
/* Input given directly as a string */
|
||||
End[-1] = _T('\0');
|
||||
FullInput = cmd_dup(Start + 1);
|
||||
}
|
||||
else if (*Start == CommandQuote && End[-1] == CommandQuote)
|
||||
{
|
||||
/* Read input from a command */
|
||||
End[-1] = _T('\0');
|
||||
InputFile = _tpopen(Start + 1, _T("r"));
|
||||
if (!InputFile)
|
||||
{
|
||||
error_bad_command(Start + 1);
|
||||
return 1;
|
||||
}
|
||||
FullInput = ReadFileContents(InputFile, Buffer);
|
||||
_pclose(InputFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Read input from a file */
|
||||
TCHAR Temp = *End;
|
||||
*End = _T('\0');
|
||||
StripQuotes(Start);
|
||||
InputFile = _tfopen(Start, _T("r"));
|
||||
*End = Temp;
|
||||
if (!InputFile)
|
||||
{
|
||||
error_sfile_not_found(Start);
|
||||
return 1;
|
||||
}
|
||||
FullInput = ReadFileContents(InputFile, Buffer);
|
||||
fclose(InputFile);
|
||||
}
|
||||
if (*Start == StringQuote && End[-1] == StringQuote)
|
||||
{
|
||||
/* Input given directly as a string */
|
||||
End[-1] = _T('\0');
|
||||
FullInput = cmd_dup(Start + 1);
|
||||
}
|
||||
else if (*Start == CommandQuote && End[-1] == CommandQuote)
|
||||
{
|
||||
/* Read input from a command */
|
||||
End[-1] = _T('\0');
|
||||
InputFile = _tpopen(Start + 1, _T("r"));
|
||||
if (!InputFile)
|
||||
{
|
||||
error_bad_command(Start + 1);
|
||||
return 1;
|
||||
}
|
||||
FullInput = ReadFileContents(InputFile, Buffer);
|
||||
_pclose(InputFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Read input from a file */
|
||||
TCHAR Temp = *End;
|
||||
*End = _T('\0');
|
||||
StripQuotes(Start);
|
||||
InputFile = _tfopen(Start, _T("r"));
|
||||
*End = Temp;
|
||||
if (!InputFile)
|
||||
{
|
||||
error_sfile_not_found(Start);
|
||||
return 1;
|
||||
}
|
||||
FullInput = ReadFileContents(InputFile, Buffer);
|
||||
fclose(InputFile);
|
||||
}
|
||||
|
||||
if (!FullInput)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return 1;
|
||||
}
|
||||
if (!FullInput)
|
||||
{
|
||||
error_out_of_memory();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Loop over the input line by line */
|
||||
In = FullInput;
|
||||
Skip = SkipLines;
|
||||
do
|
||||
{
|
||||
DWORD RemainingTokens = Tokens;
|
||||
LPTSTR *CurVar = Variables;
|
||||
/* Loop over the input line by line */
|
||||
In = FullInput;
|
||||
Skip = SkipLines;
|
||||
do
|
||||
{
|
||||
DWORD RemainingTokens = Tokens;
|
||||
LPTSTR *CurVar = Variables;
|
||||
|
||||
NextLine = _tcschr(In, _T('\n'));
|
||||
if (NextLine)
|
||||
*NextLine++ = _T('\0');
|
||||
NextLine = _tcschr(In, _T('\n'));
|
||||
if (NextLine)
|
||||
*NextLine++ = _T('\0');
|
||||
|
||||
if (--Skip >= 0)
|
||||
continue;
|
||||
if (--Skip >= 0)
|
||||
continue;
|
||||
|
||||
/* Ignore lines where the first token starts with the eol character */
|
||||
In += _tcsspn(In, Delims);
|
||||
if (*In == Eol)
|
||||
continue;
|
||||
/* Ignore lines where the first token starts with the eol character */
|
||||
In += _tcsspn(In, Delims);
|
||||
if (*In == Eol)
|
||||
continue;
|
||||
|
||||
while ((RemainingTokens >>= 1) != 0)
|
||||
{
|
||||
/* Save pointer to this token in a variable if requested */
|
||||
if (RemainingTokens & 1)
|
||||
*CurVar++ = In;
|
||||
/* Find end of token */
|
||||
In += _tcscspn(In, Delims);
|
||||
/* Nul-terminate it and advance to next token */
|
||||
if (*In)
|
||||
{
|
||||
*In++ = _T('\0');
|
||||
In += _tcsspn(In, Delims);
|
||||
}
|
||||
}
|
||||
/* Save pointer to remainder of line */
|
||||
*CurVar = In;
|
||||
while ((RemainingTokens >>= 1) != 0)
|
||||
{
|
||||
/* Save pointer to this token in a variable if requested */
|
||||
if (RemainingTokens & 1)
|
||||
*CurVar++ = In;
|
||||
/* Find end of token */
|
||||
In += _tcscspn(In, Delims);
|
||||
/* Nul-terminate it and advance to next token */
|
||||
if (*In)
|
||||
{
|
||||
*In++ = _T('\0');
|
||||
In += _tcsspn(In, Delims);
|
||||
}
|
||||
}
|
||||
/* Save pointer to remainder of line */
|
||||
*CurVar = In;
|
||||
|
||||
/* Don't run unless the line had enough tokens to fill at least one variable */
|
||||
if (*Variables[0])
|
||||
Ret = RunInstance(Cmd);
|
||||
} while (!Exiting(Cmd) && (In = NextLine) != NULL);
|
||||
cmd_free(FullInput);
|
||||
}
|
||||
/* Don't run unless the line had enough tokens to fill at least one variable */
|
||||
if (*Variables[0])
|
||||
Ret = RunInstance(Cmd);
|
||||
} while (!Exiting(Cmd) && (In = NextLine) != NULL);
|
||||
cmd_free(FullInput);
|
||||
}
|
||||
|
||||
return Ret;
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* FOR /L: Do a numeric loop */
|
||||
static INT ForLoop(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer)
|
||||
{
|
||||
enum { START, STEP, END };
|
||||
INT params[3] = { 0, 0, 0 };
|
||||
INT i;
|
||||
INT Ret = 0;
|
||||
enum { START, STEP, END };
|
||||
INT params[3] = { 0, 0, 0 };
|
||||
INT i;
|
||||
INT Ret = 0;
|
||||
|
||||
TCHAR *Start, *End = List;
|
||||
for (i = 0; i < 3 && GetNextElement(&Start, &End); i++)
|
||||
params[i] = _tcstol(Start, NULL, 0);
|
||||
TCHAR *Start, *End = List;
|
||||
for (i = 0; i < 3 && GetNextElement(&Start, &End); i++)
|
||||
params[i] = _tcstol(Start, NULL, 0);
|
||||
|
||||
i = params[START];
|
||||
while (!Exiting(Cmd) &&
|
||||
(params[STEP] >= 0 ? (i <= params[END]) : (i >= params[END])))
|
||||
{
|
||||
_itot(i, Buffer, 10);
|
||||
Ret = RunInstance(Cmd);
|
||||
i += params[STEP];
|
||||
}
|
||||
return Ret;
|
||||
i = params[START];
|
||||
while (!Exiting(Cmd) &&
|
||||
(params[STEP] >= 0 ? (i <= params[END]) : (i >= params[END])))
|
||||
{
|
||||
_itot(i, Buffer, 10);
|
||||
Ret = RunInstance(Cmd);
|
||||
i += params[STEP];
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* Process a FOR in one directory. Stored in Buffer (up to BufPos) is a
|
||||
@@ -378,135 +378,135 @@ static INT ForLoop(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer)
|
||||
* it will be empty, but in FOR /R it will be the directory name. */
|
||||
static INT ForDir(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer, TCHAR *BufPos)
|
||||
{
|
||||
TCHAR *Start, *End = List;
|
||||
INT Ret = 0;
|
||||
while (!Exiting(Cmd) && GetNextElement(&Start, &End))
|
||||
{
|
||||
if (BufPos + (End - Start) > &Buffer[CMDLINE_LENGTH])
|
||||
continue;
|
||||
memcpy(BufPos, Start, (End - Start) * sizeof(TCHAR));
|
||||
BufPos[End - Start] = _T('\0');
|
||||
TCHAR *Start, *End = List;
|
||||
INT Ret = 0;
|
||||
while (!Exiting(Cmd) && GetNextElement(&Start, &End))
|
||||
{
|
||||
if (BufPos + (End - Start) > &Buffer[CMDLINE_LENGTH])
|
||||
continue;
|
||||
memcpy(BufPos, Start, (End - Start) * sizeof(TCHAR));
|
||||
BufPos[End - Start] = _T('\0');
|
||||
|
||||
if (_tcschr(BufPos, _T('?')) || _tcschr(BufPos, _T('*')))
|
||||
{
|
||||
WIN32_FIND_DATA w32fd;
|
||||
HANDLE hFind;
|
||||
TCHAR *FilePart;
|
||||
if (_tcschr(BufPos, _T('?')) || _tcschr(BufPos, _T('*')))
|
||||
{
|
||||
WIN32_FIND_DATA w32fd;
|
||||
HANDLE hFind;
|
||||
TCHAR *FilePart;
|
||||
|
||||
StripQuotes(BufPos);
|
||||
hFind = FindFirstFile(Buffer, &w32fd);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
continue;
|
||||
FilePart = _tcsrchr(BufPos, _T('\\'));
|
||||
FilePart = FilePart ? FilePart + 1 : BufPos;
|
||||
do
|
||||
{
|
||||
if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
|
||||
continue;
|
||||
if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
!= !(Cmd->For.Switches & FOR_DIRS))
|
||||
continue;
|
||||
if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
|
||||
_tcscmp(w32fd.cFileName, _T("..")) == 0)
|
||||
continue;
|
||||
_tcscpy(FilePart, w32fd.cFileName);
|
||||
Ret = RunInstance(Cmd);
|
||||
} while (!Exiting(Cmd) && FindNextFile(hFind, &w32fd));
|
||||
FindClose(hFind);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ret = RunInstance(Cmd);
|
||||
}
|
||||
}
|
||||
return Ret;
|
||||
StripQuotes(BufPos);
|
||||
hFind = FindFirstFile(Buffer, &w32fd);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
continue;
|
||||
FilePart = _tcsrchr(BufPos, _T('\\'));
|
||||
FilePart = FilePart ? FilePart + 1 : BufPos;
|
||||
do
|
||||
{
|
||||
if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
|
||||
continue;
|
||||
if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
!= !(Cmd->For.Switches & FOR_DIRS))
|
||||
continue;
|
||||
if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
|
||||
_tcscmp(w32fd.cFileName, _T("..")) == 0)
|
||||
continue;
|
||||
_tcscpy(FilePart, w32fd.cFileName);
|
||||
Ret = RunInstance(Cmd);
|
||||
} while (!Exiting(Cmd) && FindNextFile(hFind, &w32fd));
|
||||
FindClose(hFind);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ret = RunInstance(Cmd);
|
||||
}
|
||||
}
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* FOR /R: Process a FOR in each directory of a tree, recursively. */
|
||||
static INT ForRecursive(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer, TCHAR *BufPos)
|
||||
{
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA w32fd;
|
||||
INT Ret = 0;
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA w32fd;
|
||||
INT Ret = 0;
|
||||
|
||||
if (BufPos[-1] != _T('\\'))
|
||||
{
|
||||
*BufPos++ = _T('\\');
|
||||
*BufPos = _T('\0');
|
||||
}
|
||||
if (BufPos[-1] != _T('\\'))
|
||||
{
|
||||
*BufPos++ = _T('\\');
|
||||
*BufPos = _T('\0');
|
||||
}
|
||||
|
||||
Ret = ForDir(Cmd, List, Buffer, BufPos);
|
||||
Ret = ForDir(Cmd, List, Buffer, BufPos);
|
||||
|
||||
_tcscpy(BufPos, _T("*"));
|
||||
hFind = FindFirstFile(Buffer, &w32fd);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
return Ret;
|
||||
do
|
||||
{
|
||||
if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
continue;
|
||||
if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
|
||||
_tcscmp(w32fd.cFileName, _T("..")) == 0)
|
||||
continue;
|
||||
Ret = ForRecursive(Cmd, List, Buffer, _stpcpy(BufPos, w32fd.cFileName));
|
||||
} while (!Exiting(Cmd) && FindNextFile(hFind, &w32fd));
|
||||
FindClose(hFind);
|
||||
return Ret;
|
||||
_tcscpy(BufPos, _T("*"));
|
||||
hFind = FindFirstFile(Buffer, &w32fd);
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
return Ret;
|
||||
do
|
||||
{
|
||||
if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
continue;
|
||||
if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
|
||||
_tcscmp(w32fd.cFileName, _T("..")) == 0)
|
||||
continue;
|
||||
Ret = ForRecursive(Cmd, List, Buffer, _stpcpy(BufPos, w32fd.cFileName));
|
||||
} while (!Exiting(Cmd) && FindNextFile(hFind, &w32fd));
|
||||
FindClose(hFind);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
BOOL
|
||||
ExecuteFor(PARSED_COMMAND *Cmd)
|
||||
{
|
||||
TCHAR Buffer[CMDLINE_LENGTH]; /* Buffer to hold the variable value */
|
||||
LPTSTR BufferPtr = Buffer;
|
||||
LPFOR_CONTEXT lpNew;
|
||||
INT Ret;
|
||||
LPTSTR List = DoDelayedExpansion(Cmd->For.List);
|
||||
TCHAR Buffer[CMDLINE_LENGTH]; /* Buffer to hold the variable value */
|
||||
LPTSTR BufferPtr = Buffer;
|
||||
LPFOR_CONTEXT lpNew;
|
||||
INT Ret;
|
||||
LPTSTR List = DoDelayedExpansion(Cmd->For.List);
|
||||
|
||||
if (!List)
|
||||
return 1;
|
||||
if (!List)
|
||||
return 1;
|
||||
|
||||
/* Create our FOR context */
|
||||
lpNew = cmd_alloc(sizeof(FOR_CONTEXT));
|
||||
if (!lpNew)
|
||||
{
|
||||
cmd_free(List);
|
||||
return 1;
|
||||
}
|
||||
lpNew->prev = fc;
|
||||
lpNew->firstvar = Cmd->For.Variable;
|
||||
lpNew->varcount = 1;
|
||||
lpNew->values = &BufferPtr;
|
||||
/* Create our FOR context */
|
||||
lpNew = cmd_alloc(sizeof(FOR_CONTEXT));
|
||||
if (!lpNew)
|
||||
{
|
||||
cmd_free(List);
|
||||
return 1;
|
||||
}
|
||||
lpNew->prev = fc;
|
||||
lpNew->firstvar = Cmd->For.Variable;
|
||||
lpNew->varcount = 1;
|
||||
lpNew->values = &BufferPtr;
|
||||
|
||||
Cmd->For.Context = lpNew;
|
||||
fc = lpNew;
|
||||
Cmd->For.Context = lpNew;
|
||||
fc = lpNew;
|
||||
|
||||
if (Cmd->For.Switches & FOR_F)
|
||||
{
|
||||
Ret = ForF(Cmd, List, Buffer);
|
||||
}
|
||||
else if (Cmd->For.Switches & FOR_LOOP)
|
||||
{
|
||||
Ret = ForLoop(Cmd, List, Buffer);
|
||||
}
|
||||
else if (Cmd->For.Switches & FOR_RECURSIVE)
|
||||
{
|
||||
DWORD Len = GetFullPathName(Cmd->For.Params ? Cmd->For.Params : _T("."),
|
||||
MAX_PATH, Buffer, NULL);
|
||||
Ret = ForRecursive(Cmd, List, Buffer, &Buffer[Len]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ret = ForDir(Cmd, List, Buffer, Buffer);
|
||||
}
|
||||
if (Cmd->For.Switches & FOR_F)
|
||||
{
|
||||
Ret = ForF(Cmd, List, Buffer);
|
||||
}
|
||||
else if (Cmd->For.Switches & FOR_LOOP)
|
||||
{
|
||||
Ret = ForLoop(Cmd, List, Buffer);
|
||||
}
|
||||
else if (Cmd->For.Switches & FOR_RECURSIVE)
|
||||
{
|
||||
DWORD Len = GetFullPathName(Cmd->For.Params ? Cmd->For.Params : _T("."),
|
||||
MAX_PATH, Buffer, NULL);
|
||||
Ret = ForRecursive(Cmd, List, Buffer, &Buffer[Len]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ret = ForDir(Cmd, List, Buffer, Buffer);
|
||||
}
|
||||
|
||||
/* Remove our context, unless someone already did that */
|
||||
if (fc == lpNew)
|
||||
fc = lpNew->prev;
|
||||
/* Remove our context, unless someone already did that */
|
||||
if (fc == lpNew)
|
||||
fc = lpNew->prev;
|
||||
|
||||
cmd_free(lpNew);
|
||||
cmd_free(List);
|
||||
return Ret;
|
||||
cmd_free(lpNew);
|
||||
cmd_free(List);
|
||||
return Ret;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
||||
+75
-76
@@ -7,8 +7,8 @@
|
||||
* 01-Sep-1999 (Eric Kohl)
|
||||
* Started.
|
||||
*
|
||||
* 28-Apr-2005 (Magnus Olsen) <[email protected]>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 28-Apr-2005 (Magnus Olsen <[email protected]>)
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
@@ -18,102 +18,101 @@
|
||||
static VOID
|
||||
PrintDiskInfo (LPTSTR szDisk)
|
||||
{
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szRootPath[4] = _T("A:\\");
|
||||
TCHAR szDrive[2] = _T("A");
|
||||
TCHAR szVolume[64];
|
||||
TCHAR szSerial[10];
|
||||
TCHAR szTotal[40];
|
||||
TCHAR szUsed[40];
|
||||
TCHAR szFree[40];
|
||||
DWORD dwSerial;
|
||||
ULONGLONG uliSize;
|
||||
DWORD dwSecPerCl;
|
||||
DWORD dwBytPerSec;
|
||||
DWORD dwFreeCl;
|
||||
DWORD dwTotCl;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szRootPath[4] = _T("A:\\");
|
||||
TCHAR szDrive[2] = _T("A");
|
||||
TCHAR szVolume[64];
|
||||
TCHAR szSerial[10];
|
||||
TCHAR szTotal[40];
|
||||
TCHAR szUsed[40];
|
||||
TCHAR szFree[40];
|
||||
DWORD dwSerial;
|
||||
ULONGLONG uliSize;
|
||||
DWORD dwSecPerCl;
|
||||
DWORD dwBytPerSec;
|
||||
DWORD dwFreeCl;
|
||||
DWORD dwTotCl;
|
||||
|
||||
if (_tcslen (szDisk) < 2 || szDisk[1] != _T(':'))
|
||||
{
|
||||
ConErrResPrintf(STRING_FREE_ERROR1);
|
||||
return;
|
||||
}
|
||||
if (_tcslen (szDisk) < 2 || szDisk[1] != _T(':'))
|
||||
{
|
||||
ConErrResPrintf(STRING_FREE_ERROR1);
|
||||
return;
|
||||
}
|
||||
|
||||
szRootPath[0] = szDisk[0];
|
||||
szDrive[0] = _totupper (szRootPath[0]);
|
||||
szRootPath[0] = szDisk[0];
|
||||
szDrive[0] = _totupper (szRootPath[0]);
|
||||
|
||||
if (!GetVolumeInformation (szRootPath, szVolume, 64, &dwSerial,
|
||||
NULL, NULL, NULL, 0))
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
if (!GetVolumeInformation (szRootPath, szVolume, 64, &dwSerial,
|
||||
NULL, NULL, NULL, 0))
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
|
||||
if (szVolume[0] == _T('\0'))
|
||||
{
|
||||
if (szVolume[0] == _T('\0'))
|
||||
{
|
||||
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
|
||||
_tcscpy (szVolume, szMsg);
|
||||
}
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR2, szMsg, RC_STRING_MAX_SIZE);
|
||||
_tcscpy (szVolume, szMsg);
|
||||
}
|
||||
|
||||
_stprintf (szSerial,
|
||||
_T("%04X-%04X"),
|
||||
HIWORD(dwSerial),
|
||||
LOWORD(dwSerial));
|
||||
_stprintf (szSerial,
|
||||
_T("%04X-%04X"),
|
||||
HIWORD(dwSerial),
|
||||
LOWORD(dwSerial));
|
||||
|
||||
if (!GetDiskFreeSpace (szRootPath, &dwSecPerCl,
|
||||
&dwBytPerSec, &dwFreeCl, &dwTotCl))
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf (_T("%s %s:\n"), szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
if (!GetDiskFreeSpace (szRootPath, &dwSecPerCl,
|
||||
&dwBytPerSec, &dwFreeCl, &dwTotCl))
|
||||
{
|
||||
LoadString(CMD_ModuleHandle, STRING_FREE_ERROR1, szMsg, RC_STRING_MAX_SIZE);
|
||||
ConErrPrintf(_T("%s %s:\n"), szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)dwTotCl;
|
||||
ConvertULargeInteger(uliSize, szTotal, 40, TRUE);
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)dwTotCl;
|
||||
ConvertULargeInteger(uliSize, szTotal, 40, TRUE);
|
||||
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)(dwTotCl - dwFreeCl);
|
||||
ConvertULargeInteger(uliSize, szUsed, 40, TRUE);
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)(dwTotCl - dwFreeCl);
|
||||
ConvertULargeInteger(uliSize, szUsed, 40, TRUE);
|
||||
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)dwFreeCl;
|
||||
ConvertULargeInteger(uliSize, szFree, 40, TRUE);
|
||||
uliSize = dwSecPerCl * dwBytPerSec * (ULONGLONG)dwFreeCl;
|
||||
ConvertULargeInteger(uliSize, szFree, 40, TRUE);
|
||||
|
||||
|
||||
ConOutResPrintf(STRING_FREE_HELP1, szDrive, szVolume, szSerial, szTotal, szUsed, szFree);
|
||||
ConOutResPrintf(STRING_FREE_HELP1, szDrive, szVolume, szSerial, szTotal, szUsed, szFree);
|
||||
}
|
||||
|
||||
|
||||
INT CommandFree (LPTSTR param)
|
||||
{
|
||||
LPTSTR szParam;
|
||||
TCHAR szDefPath[MAX_PATH];
|
||||
INT argc, i;
|
||||
LPTSTR *arg;
|
||||
LPTSTR szParam;
|
||||
TCHAR szDefPath[MAX_PATH];
|
||||
INT argc, i;
|
||||
LPTSTR *arg;
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_FREE_HELP2);
|
||||
return 0;
|
||||
}
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_FREE_HELP2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!param || *param == _T('\0'))
|
||||
{
|
||||
GetCurrentDirectory (MAX_PATH, szDefPath);
|
||||
szDefPath[2] = _T('\0');
|
||||
szParam = szDefPath;
|
||||
}
|
||||
else
|
||||
szParam = param;
|
||||
if (!param || *param == _T('\0'))
|
||||
{
|
||||
GetCurrentDirectory (MAX_PATH, szDefPath);
|
||||
szDefPath[2] = _T('\0');
|
||||
szParam = szDefPath;
|
||||
}
|
||||
else
|
||||
szParam = param;
|
||||
|
||||
arg = split (szParam, &argc, FALSE, FALSE);
|
||||
arg = split (szParam, &argc, FALSE, FALSE);
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
PrintDiskInfo (arg[i]);
|
||||
for (i = 0; i < argc; i++)
|
||||
PrintDiskInfo (arg[i]);
|
||||
|
||||
freep (arg);
|
||||
freep (arg);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* INCLUDE_CMD_FREE */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user