ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
582 discussions
Start a n
N
ew thread
[greatlrd] 17821: DoCommand()
by greatlrd@svn.reactos.com
DoCommand() Remove one more hardcode buffer size. Remove limit command to MAX_PATH. No check for limit command line- Modified: trunk/reactos/subsys/system/cmd/cmd.c _____ Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-09-12 17:10:00 UTC (rev 17820) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-09-12 19:50:16 UTC (rev 17821) @@ -532,17 +532,26 @@ static VOID DoCommand (LPTSTR line) { - TCHAR com[CMDLINE_LENGTH]; /* the first word in the command */ - LPTSTR cp = com; + TCHAR *com = NULL; /* the first word in the command */ + TCHAR *cp = NULL; LPTSTR cstart; LPTSTR rest; /* pointer to the rest of the command line */ INT cl; LPCOMMAND cmdptr; + #ifdef _DEBUG DebugPrintf (_T("DoCommand: (\'%s\')\n"), line); #endif /* DEBUG */ + com = malloc( (_tcslen(line) +512)*sizeof(TCHAR) ); + if (com == NULL) + { + error_out_of_memory(); + return; + } + + cp = com; /* Skip over initial white space */ while (_istspace (*line)) line++; @@ -574,12 +583,15 @@ /* Terminate first word */ *cp = _T('\0'); - /* commands are limited to MAX_PATH */ + /* Do not limit commands to MAX_PATH */ + /* if(_tcslen(com) > MAX_PATH) { error_bad_command(); + free(com); return; } + */ /* Skip over whitespace to rest of line */ while (_istspace (*rest)) @@ -627,6 +639,7 @@ } } } + free(com); }
19 years, 3 months
1
0
0
0
[gvg] 17820: Bletch <npwoods@mess.org>
by gvg@svn.reactos.com
Bletch <npwoods(a)mess.org> - Implements the Encoding field when you save, allowing the user to save as ANSI, Unicode or UTF-8 - Invoking 'Save As' after saving or loading a file will default to the earlier filename (minor changes by GvG, so mistakes are mine). Modified: trunk/reactos/subsys/system/notepad/En.rc Modified: trunk/reactos/subsys/system/notepad/dialog.c Modified: trunk/reactos/subsys/system/notepad/main.h Modified: trunk/reactos/subsys/system/notepad/notepad_res.h _____ Modified: trunk/reactos/subsys/system/notepad/En.rc --- trunk/reactos/subsys/system/notepad/En.rc 2005-09-12 16:06:53 UTC (rev 17819) +++ trunk/reactos/subsys/system/notepad/En.rc 2005-09-12 17:10:00 UTC (rev 17820) @@ -94,6 +94,17 @@ PUSHBUTTON "&Help", 0x153, 180, 39, 40, 15, WS_TABSTOP } +/* Dialog `Encoding' */ +DIALOG_ENCODING DIALOG 0, 0, 256, 26 +STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | + WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Encoding" +{ +COMBOBOX ID_ENCODING,54,0,156,80,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP +LTEXT "Encoding:",0x155,5,2,41,12 +} + STRINGTABLE DISCARDABLE { STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ @@ -125,5 +136,8 @@ STRING_OUT_OF_MEMORY, "Not enough memory to complete this \ task. \nClose one or more applications to increase the amount of \nfree \ memory." - +STRING_ANSI, "ANSI" +STRING_UNICODE, "Unicode" +STRING_UNICODE_BE, "Unicode (big endian)" +STRING_UTF8, "UTF-8" } _____ Modified: trunk/reactos/subsys/system/notepad/dialog.c --- trunk/reactos/subsys/system/notepad/dialog.c 2005-09-12 16:06:53 UTC (rev 17819) +++ trunk/reactos/subsys/system/notepad/dialog.c 2005-09-12 17:10:00 UTC (rev 17820) @@ -139,8 +139,14 @@ { HANDLE hFile; DWORD dwNumWrite; - LPSTR pTemp; + LPWSTR pTemp; + LPVOID pConverted; DWORD size; + BYTE bom[3]; + int iBomSize = 0; + int iCodePage = -1; + int iNewSize; + int i; hFile = CreateFile(Globals.szFileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -150,23 +156,82 @@ return; } - size = GetWindowTextLengthA(Globals.hEdit) + 1; - pTemp = HeapAlloc(GetProcessHeap(), 0, size); + size = GetWindowTextLengthW(Globals.hEdit) + 1; + pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*pTemp)); if (!pTemp) { - CloseHandle(hFile); + CloseHandle(hFile); ShowLastError(); return; } - size = GetWindowTextA(Globals.hEdit, pTemp, size); + size = GetWindowTextW(Globals.hEdit, pTemp, size); - if (!WriteFile(hFile, pTemp, size, &dwNumWrite, NULL)) + switch(Globals.iEncoding) + { + case ENCODING_ANSI: + iCodePage = CP_ACP; + break; + + case ENCODING_UNICODE: + pConverted = pTemp; + iBomSize = 2; + bom[0] = 0xFF; + bom[1] = 0xFE; + break; + + case ENCODING_UNICODE_BE: + pConverted = pTemp; + iBomSize = 2; + bom[0] = 0xFE; + bom[1] = 0xFF; + + /* flip the endianness */ + for (i = 0; i < size; i++) + { + pTemp[i] = ((pTemp[i] & 0x00FF) << 8) + | ((pTemp[i] & 0xFF00) >> 8); + } + break; + + case ENCODING_UTF8: + iCodePage = CP_UTF8; + iBomSize = 3; + bom[0] = 0xEF; + bom[1] = 0xBB; + bom[2] = 0xBF; + break; + } + + if (iCodePage >= 0) + { + iNewSize = WideCharToMultiByte(iCodePage, 0, pTemp, size, NULL, 0, NULL, NULL); + pConverted = HeapAlloc(GetProcessHeap(), 0, iNewSize); + if (!pConverted) + { + HeapFree(GetProcessHeap(), 0, pTemp); + CloseHandle(hFile); + ShowLastError(); + return; + } + WideCharToMultiByte(iCodePage, 0, pTemp, size, pConverted, iNewSize, NULL, NULL); + } + else + { + iNewSize = size * sizeof(WCHAR); + } + + if ((iBomSize > 0) && !WriteFile(hFile, bom, iBomSize, &dwNumWrite, NULL)) ShowLastError(); + else if (!WriteFile(hFile, pConverted, iNewSize, &dwNumWrite, NULL)) + ShowLastError(); else SendMessage(Globals.hEdit, EM_SETMODIFY, FALSE, 0); CloseHandle(hFile); HeapFree(GetProcessHeap(), 0, pTemp); + + if (iCodePage >= 0) + HeapFree(GetProcessHeap(), 0, pConverted); } /** @@ -208,44 +273,48 @@ { HANDLE hFile; LPSTR pTemp; + LPWSTR pTemp2 = NULL; DWORD size; DWORD dwNumRead; + LPWSTR p; + LPBYTE p2; + int iCodePage; + int iNewSize; /* Close any files and prompt to save changes */ if (!DoCloseFile()) - return; + return; hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(hFile == INVALID_HANDLE_VALUE) { - ShowLastError(); - return; + ShowLastError(); + return; } size = GetFileSize(hFile, NULL); if (size == INVALID_FILE_SIZE) { - CloseHandle(hFile); - ShowLastError(); - return; + CloseHandle(hFile); + ShowLastError(); + return; } - size++; - pTemp = HeapAlloc(GetProcessHeap(), 0, size); + pTemp = HeapAlloc(GetProcessHeap(), 0, size + sizeof(WCHAR)); if (!pTemp) { - CloseHandle(hFile); - ShowLastError(); - return; + CloseHandle(hFile); + ShowLastError(); + return; } if (!ReadFile(hFile, pTemp, size, &dwNumRead, NULL)) { - CloseHandle(hFile); - HeapFree(GetProcessHeap(), 0, pTemp); - ShowLastError(); - return; + CloseHandle(hFile); + HeapFree(GetProcessHeap(), 0, pTemp); + ShowLastError(); + return; } CloseHandle(hFile); @@ -253,15 +322,55 @@ if (IsTextUnicode(pTemp, dwNumRead, NULL)) { - LPWSTR p = (LPWSTR)pTemp; - /* We need to strip BOM Unicode character, SetWindowTextW won't do it for us. */ - if (*p == 0xFEFF || *p == 0xFFFE) p++; - SetWindowTextW(Globals.hEdit, p); + p = (LPWSTR)pTemp; + p[dwNumRead / 2] = 0; + + /* We need to strip BOM Unicode character, SetWindowTextW won't do it for us. */ + if (*p == 0xFEFF) + { + Globals.iEncoding = ENCODING_UNICODE_BE; + p++; + } + else if (*p == 0xFFFE) + { + Globals.iEncoding = ENCODING_UNICODE; + p++; + } } else - SetWindowTextA(Globals.hEdit, pTemp); + { + p2 = pTemp; + if ((p2[0] == 0xEF) && (p2[1] == 0xBB) && (p2[2] == 0xBF)) + { + iCodePage = CP_UTF8; + Globals.iEncoding = ENCODING_UTF8; + p2 += 3; + dwNumRead -= 3; + } + else + { + iCodePage = CP_ACP; + Globals.iEncoding = ENCODING_ANSI; + } + iNewSize = MultiByteToWideChar(iCodePage, 0, p2, dwNumRead, NULL, 0); + pTemp2 = HeapAlloc(GetProcessHeap(), 0, (iNewSize + 1) * sizeof(*pTemp2)); + if (!pTemp2) + { + CloseHandle(hFile); + HeapFree(GetProcessHeap(), 0, pTemp); + ShowLastError(); + return; + } + MultiByteToWideChar(iCodePage, 0, p2, dwNumRead, pTemp2, iNewSize); + pTemp2[iNewSize] = 0; + p = pTemp2; + } + SetWindowTextW(Globals.hEdit, p); + HeapFree(GetProcessHeap(), 0, pTemp); + if (pTemp2) + HeapFree(GetProcessHeap(), 0, pTemp2); SendMessage(Globals.hEdit, EM_SETMODIFY, FALSE, 0); SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0); @@ -286,15 +395,18 @@ VOID DIALOG_FileOpen(VOID) { OPENFILENAME openfilename; + WCHAR szDir[MAX_PATH]; WCHAR szPath[MAX_PATH]; - WCHAR szDir[MAX_PATH]; static const WCHAR szDefaultExt[] = { 't','x','t',0 }; static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; ZeroMemory(&openfilename, sizeof(openfilename)); GetCurrentDirectory(SIZEOF(szDir), szDir); - lstrcpy(szPath, txt_files); + if (Globals.szFileName[0] == 0) + lstrcpy(szPath, txt_files); + else + lstrcpy(szPath, Globals.szFileName); openfilename.lStructSize = sizeof(openfilename); openfilename.hwndOwner = Globals.hMainWnd; @@ -325,18 +437,59 @@ DoSaveFile(); } +static UINT_PTR CALLBACK DIALOG_FileSaveAs_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + WCHAR szText[128]; + HWND hCombo; + OFNOTIFY *pNotify; + + switch(msg) + { + case WM_INITDIALOG: + hCombo = GetDlgItem(hDlg, ID_ENCODING); + + LoadString(Globals.hInstance, STRING_ANSI, szText, SIZEOF(szText)); + SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText); + + LoadString(Globals.hInstance, STRING_UNICODE, szText, SIZEOF(szText)); + SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText); + + LoadString(Globals.hInstance, STRING_UNICODE_BE, szText, SIZEOF(szText)); + SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText); + + LoadString(Globals.hInstance, STRING_UTF8, szText, SIZEOF(szText)); + SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM) szText); + + SendMessage(hCombo, CB_SETCURSEL, Globals.iEncoding, 0); + break; + + case WM_NOTIFY: + if (((NMHDR *) lParam)->code == CDN_FILEOK) + { + pNotify = (OFNOTIFY *) lParam; + hCombo = GetDlgItem(hDlg, ID_ENCODING); + Globals.iEncoding = SendMessage(hCombo, CB_GETCURSEL, 0, 0); + } + break; + } + return 0; +} + VOID DIALOG_FileSaveAs(VOID) { OPENFILENAME saveas; + WCHAR szDir[MAX_PATH]; WCHAR szPath[MAX_PATH]; - WCHAR szDir[MAX_PATH]; static const WCHAR szDefaultExt[] = { 't','x','t',0 }; static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; ZeroMemory(&saveas, sizeof(saveas)); GetCurrentDirectory(SIZEOF(szDir), szDir); - lstrcpy(szPath, txt_files); + if (Globals.szFileName[0] == 0) + lstrcpy(szPath, txt_files); + else + lstrcpy(szPath, Globals.szFileName); saveas.lStructSize = sizeof(OPENFILENAME); saveas.hwndOwner = Globals.hMainWnd; @@ -346,8 +499,10 @@ saveas.nMaxFile = SIZEOF(szPath); saveas.lpstrInitialDir = szDir; saveas.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | - OFN_HIDEREADONLY; + OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLETEMPLATE | OFN_ENABLEHOOK; saveas.lpstrDefExt = szDefaultExt; + saveas.lpTemplateName = MAKEINTRESOURCE(DIALOG_ENCODING); + saveas.lpfnHook = DIALOG_FileSaveAs_Hook; if (GetSaveFileName(&saveas)) { SetFileName(szPath); @@ -423,14 +578,14 @@ cHeightPels = GetDeviceCaps(printer.hDC, VERTRES); /* Get the file text */ - size = GetWindowTextLength(Globals.hEdit) + 1; + size = GetWindowTextLengthW(Globals.hEdit) + 1; pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); if (!pTemp) { ShowLastError(); return; } - size = GetWindowText(Globals.hEdit, pTemp, size); + size = GetWindowTextW(Globals.hEdit, pTemp, size); border = 150; for (copycount=1; copycount <= printer.nCopies; copycount++) { @@ -700,8 +855,8 @@ return TRUE; } - default: - break; + default: + break; } break; _____ Modified: trunk/reactos/subsys/system/notepad/main.h --- trunk/reactos/subsys/system/notepad/main.h 2005-09-12 16:06:53 UTC (rev 17819) +++ trunk/reactos/subsys/system/notepad/main.h 2005-09-12 17:10:00 UTC (rev 17820) @@ -25,6 +25,11 @@ #define MAX_STRING_LEN 255 +#define ENCODING_ANSI 0 +#define ENCODING_UNICODE 1 +#define ENCODING_UNICODE_BE 2 +#define ENCODING_UTF8 3 + typedef struct { HANDLE hInstance; @@ -44,6 +49,7 @@ WCHAR szMarginRight[MAX_PATH]; WCHAR szHeader[MAX_PATH]; WCHAR szFooter[MAX_PATH]; + int iEncoding; FINDREPLACE find; } NOTEPAD_GLOBALS; _____ Modified: trunk/reactos/subsys/system/notepad/notepad_res.h --- trunk/reactos/subsys/system/notepad/notepad_res.h 2005-09-12 16:06:53 UTC (rev 17819) +++ trunk/reactos/subsys/system/notepad/notepad_res.h 2005-09-12 17:10:00 UTC (rev 17820) @@ -22,6 +22,8 @@ #define MAIN_MENU 0x201 #define DIALOG_PAGESETUP 0x202 #define ID_ACCEL 0x203 +#define DIALOG_ENCODING 0x204 +#define ID_ENCODING 0x205 /* Commands */ #define CMD_NEW 0x100 @@ -76,3 +78,9 @@ #define STRING_NOTFOUND 0x17B #define STRING_OUT_OF_MEMORY 0x17C + +#define STRING_ANSI 0x17D +#define STRING_UNICODE 0x17E +#define STRING_UNICODE_BE 0x17F +#define STRING_UTF8 0x180 +
19 years, 3 months
1
0
0
0
[royce] 17819: msvc6 compatibility and small performance improvement in filename completion
by royce@svn.reactos.com
msvc6 compatibility and small performance improvement in filename completion Modified: trunk/reactos/subsys/system/cmd/cmd.c Modified: trunk/reactos/subsys/system/cmd/cmd.h Modified: trunk/reactos/subsys/system/cmd/cmdinput.c Modified: trunk/reactos/subsys/system/cmd/color.c Modified: trunk/reactos/subsys/system/cmd/del.c Modified: trunk/reactos/subsys/system/cmd/dir.c Modified: trunk/reactos/subsys/system/cmd/echo.c Modified: trunk/reactos/subsys/system/cmd/filecomp.c Modified: trunk/reactos/subsys/system/cmd/history.c Modified: trunk/reactos/subsys/system/cmd/internal.c Modified: trunk/reactos/subsys/system/cmd/precomp.h _____ Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -148,9 +148,9 @@ #define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) #endif -typedef NTSTATUS (STDCALL *NtQueryInformationProcessProc)(HANDLE, PROCESSINFOCLASS, +typedef NTSTATUS (WINAPI *NtQueryInformationProcessProc)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG); -typedef NTSTATUS (STDCALL *NtReadVirtualMemoryProc)(HANDLE, PVOID, PVOID, ULONG, PULONG); +typedef NTSTATUS (WINAPI *NtReadVirtualMemoryProc)(HANDLE, PVOID, PVOID, ULONG, PULONG); BOOL bExit = FALSE; /* indicates EXIT was typed */ BOOL bCanExit = TRUE; /* indicates if this shell is exitable */ @@ -356,7 +356,7 @@ } else { - INT i = 0; + UINT i = 0; BOOL bInside = FALSE; rest[0] = _T('\0'); full[0] = _T('\0'); @@ -1392,12 +1392,10 @@ #ifdef _DEBUG - INT x; - DebugPrintf (_T("[command args:\n")); - for (x = 0; x < argc; x++) + for (i = 0; i < argc; i++) { - DebugPrintf (_T("%d. %s\n"), x, argv[x]); + DebugPrintf (_T("%d. %s\n"), i, argv[i]); } DebugPrintf (_T("]\n")); #endif _____ Modified: trunk/reactos/subsys/system/cmd/cmd.h --- trunk/reactos/subsys/system/cmd/cmd.h 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/cmd.h 2005-09-12 16:06:53 UTC (rev 17819) @@ -224,11 +224,11 @@ /* Prototypes for FILECOMP.C */ #ifdef FEATURE_UNIX_FILENAME_COMPLETION -VOID CompleteFilename (LPTSTR, INT); +VOID CompleteFilename (LPTSTR, UINT); INT ShowCompletionMatches (LPTSTR, INT); #endif #ifdef FEATURE_4NT_FILENAME_COMPLETION -VOID CompleteFilename (LPTSTR, BOOL, LPTSTR, INT); +VOID CompleteFilename (LPTSTR, BOOL, LPTSTR, UINT); #endif _____ Modified: trunk/reactos/subsys/system/cmd/cmdinput.c --- trunk/reactos/subsys/system/cmd/cmdinput.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/cmdinput.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -138,6 +138,7 @@ WORD wLastKey = 0; TCHAR ch; BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/ + TCHAR szPath[MAX_PATH]; /* get screen size */ GetScreenSize (&maxx, &maxy); @@ -366,8 +367,7 @@ /* used to later see if we went down to the next line */ tempscreen = charcount; - TCHAR szPath[MAX_PATH]; - szPath[0]=_T('\0'); + 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 @@ -404,7 +404,7 @@ if(((charcount + orgx) / maxx) + orgy > maxy - 1) orgy += maxy - ((charcount + orgx) / maxx + orgy + 1); } - SetCursorXY((orgx + current) % maxx, orgy + (orgx + current) / maxx); + SetCursorXY((short)(((int)orgx + current) % maxx), (short)((int)orgy + ((int)orgx + current) / maxx)); GetCursorXY(&curx, &cury); #endif _____ Modified: trunk/reactos/subsys/system/cmd/color.c --- trunk/reactos/subsys/system/cmd/color.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/color.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -94,12 +94,12 @@ } else if ( (_tcscmp(&rest[0], _T("a")) >=0 ) && (_tcscmp(&rest[0], _T("f")) <=0 ) ) { - SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10) - _T('a') ); + SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10 - _T('a')) ); return 0; } else if ( (_tcscmp(&rest[0], _T("A")) >=0 ) && (_tcscmp(&rest[0], _T("F")) <=0 ) ) { - SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10) - _T('A') ); + SetConsoleTextAttribute (hConsole, (WORD) (rest[0] + 10 - _T('A')) ); return 0; } ConErrResPuts(STRING_COLOR_ERROR2); _____ Modified: trunk/reactos/subsys/system/cmd/del.c --- trunk/reactos/subsys/system/cmd/del.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/del.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -130,7 +130,7 @@ HANDLE file; DWORD temp; - LONG BufferSize = 65536; +#define BufferSize 65536 BYTE buffer[BufferSize]; LONGLONG i; LARGE_INTEGER FileSize; @@ -150,7 +150,7 @@ WriteFile (file, buffer, BufferSize, &temp, NULL); ConOutPrintf (_T("%I64d%% %s\r"),(i * (LONGLONG)100)/FileSize.QuadPart,szDeleteWipe); } - WriteFile (file, buffer, FileSize.QuadPart - i, &temp, NULL); + WriteFile (file, buffer, (DWORD)(FileSize.QuadPart - i), &temp, NULL); ConOutPrintf (_T("100%% %s\n"),szDeleteWipe); CloseHandle (file); } _____ Modified: trunk/reactos/subsys/system/cmd/dir.c --- trunk/reactos/subsys/system/cmd/dir.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/dir.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -199,8 +199,8 @@ } DIRFINDLISTNODE, *PDIRFINDLISTNODE; -typedef BOOL STDCALL -(*PGETFREEDISKSPACEEX)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); +typedef BOOL +(WINAPI *PGETFREEDISKSPACEEX)(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); /* Globally save the # of dirs, files and bytes, @@ -1294,7 +1294,7 @@ { /* Calculate the lines that will be printed */ // iLines = ceil((float)dwCount/(float)iColumns); - iLines = dwCount / iColumns; + iLines = (USHORT)(dwCount / iColumns); for (i = 0;i < iLines;i++) { @@ -1982,22 +1982,25 @@ /* <Debug :> Uncomment this to show the final state of switch flags*/ #ifdef _DEBUG - ConOutPrintf("Attributes mask/value %x/%x\n",stFlags.stAttribs.dwAttribMask,stFlags.stAttribs.dwAttribVal ); - ConOutPrintf("(B) Bare format : %i\n", stFlags.bBareFormat ); - ConOutPrintf("(C) Thousand : %i\n", stFlags.bTSeperator ); - ConOutPrintf("(W) Wide list : %i\n", stFlags.bWideList ); - ConOutPrintf("(D) Wide list sort by column : %i\n", stFlags.bWideListColSort ); - ConOutPrintf("(L) Lowercase : %i\n", stFlags.bLowerCase ); - ConOutPrintf("(N) New : %i\n", stFlags.bNewLongList ); - ConOutPrintf("(O) Order : %i\n", stFlags.stOrderBy.sCriteriaCount ); - for (i =0;i<stFlags.stOrderBy.sCriteriaCount;i++) - ConOutPrintf(" Order Criteria [%i]: %i (Reversed: %i)\n",i, stFlags.stOrderBy.eCriteria[i], stFlags.stOrderBy.bCriteriaRev[i] ); - ConOutPrintf("(P) Pause : %i\n", stFlags.bPause ); - ConOutPrintf("(Q) Owner : %i\n", stFlags.bUser ); - ConOutPrintf("(S) Recursive : %i\n", stFlags.bRecursive ); - ConOutPrintf("(T) Time field : %i\n", stFlags.stTimeField.eTimeField ); - ConOutPrintf("(X) Short names : %i\n", stFlags.bShortName ); - ConOutPrintf("Parameter : %s\n", param ); + { + int i; + ConOutPrintf(_T("Attributes mask/value %x/%x\n"),stFlags.stAttribs.dwAttribMask,stFlags.stAttribs.dwAttribVal ); + ConOutPrintf(_T("(B) Bare format : %i\n"), stFlags.bBareFormat ); + ConOutPrintf(_T("(C) Thousand : %i\n"), stFlags.bTSeperator ); + ConOutPrintf(_T("(W) Wide list : %i\n"), stFlags.bWideList ); + ConOutPrintf(_T("(D) Wide list sort by column : %i\n"), stFlags.bWideListColSort ); + ConOutPrintf(_T("(L) Lowercase : %i\n"), stFlags.bLowerCase ); + ConOutPrintf(_T("(N) New : %i\n"), stFlags.bNewLongList ); + ConOutPrintf(_T("(O) Order : %i\n"), stFlags.stOrderBy.sCriteriaCount ); + for (i =0;i<stFlags.stOrderBy.sCriteriaCount;i++) + ConOutPrintf(_T(" Order Criteria [%i]: %i (Reversed: %i)\n"),i, stFlags.stOrderBy.eCriteria[i], stFlags.stOrderBy.bCriteriaRev[i] ); + ConOutPrintf(_T("(P) Pause : %i\n"), stFlags.bPause ); + ConOutPrintf(_T("(Q) Owner : %i\n"), stFlags.bUser ); + ConOutPrintf(_T("(S) Recursive : %i\n"), stFlags.bRecursive ); + ConOutPrintf(_T("(T) Time field : %i\n"), stFlags.stTimeField.eTimeField ); + ConOutPrintf(_T("(X) Short names : %i\n"), stFlags.bShortName ); + ConOutPrintf(_T("Parameter : %s\n"), param ); + } #endif /* print the header */ _____ Modified: trunk/reactos/subsys/system/cmd/echo.c --- trunk/reactos/subsys/system/cmd/echo.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/echo.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -33,7 +33,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param) { TCHAR szMsg[RC_STRING_MAX_SIZE]; - INT i = 0; + UINT i = 0; #ifdef _DEBUG DebugPrintf (_T("CommandEcho '%s' : '%s'\n"), cmd, param); _____ Modified: trunk/reactos/subsys/system/cmd/filecomp.c --- trunk/reactos/subsys/system/cmd/filecomp.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/filecomp.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -25,7 +25,7 @@ #ifdef FEATURE_UNIX_FILENAME_COMPLETION -VOID CompleteFilename (LPTSTR str, INT charcount) +VOID CompleteFilename (LPTSTR str, UINT charcount) { WIN32_FIND_DATA file; HANDLE hFile; @@ -376,7 +376,7 @@ /* number of quotes in the string */ INT nQuotes = 0; /* used in for loops */ - INT i; + UINT i; /* Char number to break the string at */ INT PBreak = 0; INT SBreak = 0; @@ -509,7 +509,7 @@ return ret; } -VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, INT cusor) +VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, UINT cusor) { /* Length of string before we complete it */ INT StartLength; @@ -534,16 +534,17 @@ /* Number of files */ INT FileListSize = 0; /* Used for loops */ - INT i; + UINT i; /* Editable string of what was passed in */ TCHAR str[MAX_PATH]; /* Keeps track of what element was last selected */ static INT Sel; BOOL NeededQuote = FALSE; - strOut[0] = _T('\0'); BOOL ShowAll = TRUE; - TCHAR * line = strIN; + + strOut[0] = _T('\0'); + while (_istspace (*line)) line++; if(!_tcsncmp (line, _T("rd "), 3) || !_tcsncmp (line, _T("cd "), 3)) @@ -708,14 +709,9 @@ /* insert the quoation and move things around */ if(szPrefix[LastSpace + 1] != _T('\"') && LastSpace != -1) { - /* add another char or you will lose a null char ending */ - _tcsncat(szPrefix,&szPrefix[_tcslen(szPrefix) - 1],1); - for(i = _tcslen(szPrefix) - 1; i > LastSpace; i--) - { - szPrefix[i] = szPrefix[i - 1]; - } + memmove ( &szPrefix[LastSpace+1], &szPrefix[LastSpace], (_tcslen(szPrefix)-LastSpace+1) * sizeof(TCHAR) ); - if(LastSpace + 1 == _tcslen(szPrefix)) + if((UINT)(LastSpace + 1) == _tcslen(szPrefix)) { _tcscat(szPrefix,_T("\"")); } _____ Modified: trunk/reactos/subsys/system/cmd/history.c --- trunk/reactos/subsys/system/cmd/history.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/history.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -193,8 +193,8 @@ if (item==NULL || item==Top || item==Bottom) { #ifdef _DEBUG - DebugPrintf(_T("del in " __FILE__ ": retrning\n" - "item is 0x%08x (Bottom is0x%08x)\n"), + DebugPrintf(_T("del in ") _T(__FILE__) _T(": retrning\n") + _T("item is 0x%08x (Bottom is0x%08x)\n"), item, Bottom); #endif return; _____ Modified: trunk/reactos/subsys/system/cmd/internal.c --- trunk/reactos/subsys/system/cmd/internal.c 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/internal.c 2005-09-12 16:06:53 UTC (rev 17819) @@ -276,7 +276,7 @@ TCHAR * tmpPath; TCHAR szCurrent[MAX_PATH]; TCHAR szMsg[RC_STRING_MAX_SIZE]; - INT i; + UINT i; /* Filter out special cases first */ _____ Modified: trunk/reactos/subsys/system/cmd/precomp.h --- trunk/reactos/subsys/system/cmd/precomp.h 2005-09-12 14:55:55 UTC (rev 17818) +++ trunk/reactos/subsys/system/cmd/precomp.h 2005-09-12 16:06:53 UTC (rev 17819) @@ -1,6 +1,5 @@ #include <windows.h> #include <winnt.h> -#include <winternl.h> #include <shellapi.h> #include <tchar.h> @@ -14,6 +13,9 @@ #include <math.h> #include <time.h> +#define NTOS_MODE_USER +#include <ndk/ntndk.h> + #include "cmd.h" #include "config.h" #include "batch.h"
19 years, 3 months
1
0
0
0
[royce] 17818: io.h only exists for win32 - sorry *nix users
by royce@svn.reactos.com
io.h only exists for win32 - sorry *nix users Modified: trunk/reactos/tools/winebuild/main.c _____ Modified: trunk/reactos/tools/winebuild/main.c --- trunk/reactos/tools/winebuild/main.c 2005-09-12 14:33:57 UTC (rev 17817) +++ trunk/reactos/tools/winebuild/main.c 2005-09-12 14:55:55 UTC (rev 17818) @@ -26,7 +26,9 @@ #include <assert.h> #include <stdio.h> +#ifdef WIN32 #include <io.h> /* unlink() */ +#endif//WIN32 #include <signal.h> #include <errno.h> #include <string.h>
19 years, 3 months
1
0
0
0
[royce] 17817: fix warning about unlink() being undeclared
by royce@svn.reactos.com
fix warning about unlink() being undeclared Modified: trunk/reactos/tools/winebuild/main.c _____ Modified: trunk/reactos/tools/winebuild/main.c --- trunk/reactos/tools/winebuild/main.c 2005-09-12 03:59:03 UTC (rev 17816) +++ trunk/reactos/tools/winebuild/main.c 2005-09-12 14:33:57 UTC (rev 17817) @@ -26,6 +26,7 @@ #include <assert.h> #include <stdio.h> +#include <io.h> /* unlink() */ #include <signal.h> #include <errno.h> #include <string.h>
19 years, 3 months
1
0
0
0
[ion] 17816: Fix previous strangely incomplete NtRaiseException implementation and re-enable the ProbeForRead call that failed
by ion@svn.reactos.com
Fix previous strangely incomplete NtRaiseException implementation and re-enable the ProbeForRead call that failed Modified: trunk/reactos/ntoskrnl/ke/exception.c Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S _____ Modified: trunk/reactos/ntoskrnl/ke/exception.c --- trunk/reactos/ntoskrnl/ke/exception.c 2005-09-12 03:10:08 UTC (rev 17815) +++ trunk/reactos/ntoskrnl/ke/exception.c 2005-09-12 03:59:03 UTC (rev 17816) @@ -23,7 +23,7 @@ CONTEXT LocalContext; /* We'll have to make a copy and probe it */ - //ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); + ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); RtlMoveMemory(&LocalContext, Context, sizeof(CONTEXT)); Context = &LocalContext; _____ Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c --- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-09-12 03:10:08 UTC (rev 17815) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-09-12 03:59:03 UTC (rev 17816) @@ -1017,6 +1017,7 @@ /* Align context size and get stack pointer */ Size = (sizeof(CONTEXT) + 3) & ~3; Stack = (Context.Esp & ~3) - Size; + DPRINT1("Stack: %lx\n", Stack); /* Probe stack and copy Context */ ProbeForWrite((PVOID)Stack, Size, sizeof(ULONG)); @@ -1027,6 +1028,7 @@ (EXCEPTION_MAXIMUM_PARAMETERS - ExceptionRecord->NumberParameters) * sizeof(ULONG) + 3) & ~3; NewStack = Stack - Size; + DPRINT1("NewStack: %lx\n", NewStack); /* Probe stack and copy exception record. Don't forget to add the two params */ ProbeForWrite((PVOID)(NewStack - 2 * sizeof(ULONG_PTR)), _____ Modified: trunk/reactos/ntoskrnl/ke/i386/syscall.S --- trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-09-12 03:10:08 UTC (rev 17815) +++ trunk/reactos/ntoskrnl/ke/i386/syscall.S 2005-09-12 03:59:03 UTC (rev 17816) @@ -498,6 +498,13 @@ pop ebp mov esp, ebp + /* Check the result */ + or eax, eax + jz _KiServiceExit2 + + /* Restore debug registers too */ + jmp _KiServiceExit + .globl _NtContinue@8 _NtContinue@8:
19 years, 3 months
1
0
0
0
[ion] 17815: Fix bug in KiUserExceptionDispatcher
by ion@svn.reactos.com
Fix bug in KiUserExceptionDispatcher Modified: trunk/reactos/lib/ntdll/main/i386/dispatch.S _____ Modified: trunk/reactos/lib/ntdll/main/i386/dispatch.S --- trunk/reactos/lib/ntdll/main/i386/dispatch.S 2005-09-12 02:57:47 UTC (rev 17814) +++ trunk/reactos/lib/ntdll/main/i386/dispatch.S 2005-09-12 03:10:08 UTC (rev 17815) @@ -150,6 +150,10 @@ or al, al jz RaiseException + /* Pop off the records */ + pop ebx + pop ecx + /* We're fine, continue execution */ push 0 push ecx
19 years, 3 months
1
0
0
0
[ion] 17814: Fix RtlpGetStackLimits to get the right limits if called in kernel-mode (separated implementations). Also don't return from _SEH_TRY blocks, because PSEH doesn't support this. Also temporarly disable a ProbeForRead check in KiContinue because it currently causes trouble
by ion@svn.reactos.com
Fix RtlpGetStackLimits to get the right limits if called in kernel-mode (separated implementations). Also don't return from _SEH_TRY blocks, because PSEH doesn't support this. Also temporarly disable a ProbeForRead check in KiContinue because it currently causes trouble Modified: trunk/reactos/lib/ntdll/main/i386/dispatch.S Modified: trunk/reactos/lib/rtl/i386/except.s Modified: trunk/reactos/ntoskrnl/ke/exception.c Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/rtl/i386/seh.s _____ Modified: trunk/reactos/lib/ntdll/main/i386/dispatch.S --- trunk/reactos/lib/ntdll/main/i386/dispatch.S 2005-09-12 01:32:11 UTC (rev 17813) +++ trunk/reactos/lib/ntdll/main/i386/dispatch.S 2005-09-12 02:57:47 UTC (rev 17814) @@ -184,3 +184,19 @@ call _RtlRaiseException@4 ret 8 +.globl _RtlpGetStackLimits@8 +_RtlpGetStackLimits@8: + + /* Get the stack limits */ + mov eax, [fs:TEB_STACK_LIMIT] + mov ecx, [fs:TEB_STACK_BASE] + + /* Return them */ + mov edx, [esp+4] + mov [edx], eax + mov edx, [esp+8] + mov [edx], ecx + + /* return */ + ret 8 + _____ Modified: trunk/reactos/lib/rtl/i386/except.s --- trunk/reactos/lib/rtl/i386/except.s 2005-09-12 01:32:11 UTC (rev 17813) +++ trunk/reactos/lib/rtl/i386/except.s 2005-09-12 02:57:47 UTC (rev 17814) @@ -24,22 +24,6 @@ /* FUNCTIONS ****************************************************************/ -.globl _RtlpGetStackLimits@8 -_RtlpGetStackLimits@8: - - /* Get the stack limits */ - mov eax, [fs:TEB_STACK_LIMIT] - mov ecx, [fs:TEB_STACK_BASE] - - /* Return them */ - mov edx, [esp+4] - mov [edx], eax - mov edx, [esp+8] - mov [edx], ecx - - /* return */ - ret 8 - .globl _RtlpGetExceptionList@0 _RtlpGetExceptionList@0: _____ Modified: trunk/reactos/ntoskrnl/ke/exception.c --- trunk/reactos/ntoskrnl/ke/exception.c 2005-09-12 01:32:11 UTC (rev 17813) +++ trunk/reactos/ntoskrnl/ke/exception.c 2005-09-12 02:57:47 UTC (rev 17814) @@ -23,7 +23,7 @@ CONTEXT LocalContext; /* We'll have to make a copy and probe it */ - ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); + //ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); RtlMoveMemory(&LocalContext, Context, sizeof(CONTEXT)); Context = &LocalContext; @@ -99,6 +99,7 @@ /* Check the previous mode */ if (PreviousMode != KernelMode) { +#if 0 /* Probe the context */ ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); @@ -107,13 +108,14 @@ FIELD_OFFSET(EXCEPTION_RECORD, NumberParameters) + sizeof(ULONG), sizeof(ULONG)); - +#endif /* Validate the maximum parameters */ if ((ParameterCount = ExceptionRecord->NumberParameters) > EXCEPTION_MAXIMUM_PARAMETERS) { /* Too large */ - return STATUS_INVALID_PARAMETER; + Status = STATUS_INVALID_PARAMETER; + _SEH_LEAVE; } /* Probe the entire parameters now*/ _____ Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c --- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-09-12 01:32:11 UTC (rev 17813) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-09-12 02:57:47 UTC (rev 17814) @@ -930,6 +930,7 @@ KD_CONTINUE_TYPE Action; ULONG_PTR Stack, NewStack; ULONG Size; + BOOLEAN UserDispatch = FALSE; DPRINT1("KiDispatchException() called\n"); /* Increase number of Exception Dispatches */ @@ -1042,7 +1043,8 @@ /* Set EIP to the User-mode Dispathcer */ TrapFrame->Eip = (ULONG)KeUserExceptionDispatcher; - return; + UserDispatch = TRUE; + _SEH_LEAVE; } _SEH_HANDLE { @@ -1051,6 +1053,9 @@ _SEH_END; } + /* If we dispatch to user, return now */ + if (UserDispatch) return; + /* FIXME: Forward the exception to the debugger for 2nd chance */ /* 3rd strike, kill the thread */ _____ Modified: trunk/reactos/ntoskrnl/rtl/i386/seh.s --- trunk/reactos/ntoskrnl/rtl/i386/seh.s 2005-09-12 01:32:11 UTC (rev 17813) +++ trunk/reactos/ntoskrnl/rtl/i386/seh.s 2005-09-12 02:57:47 UTC (rev 17814) @@ -9,6 +9,8 @@ * Please keep them in sync. */ +#include <ndk/asm.h> + #define ExceptionContinueExecution 0 #define ExceptionContinueSearch 1 #define ExceptionNestedException 2 @@ -364,3 +366,26 @@ // We should never get here ret + +.intel_syntax noprefix +.globl _RtlpGetStackLimits@8 +_RtlpGetStackLimits@8: + + /* Get the current thread */ + mov eax, [fs:KPCR_CURRENT_THREAD] + + /* Get the stack limits */ + mov ecx, [eax+KTHREAD_STACK_LIMIT] + mov edx, [eax+KTHREAD_INITIAL_STACK] + sub edx, SIZEOF_FX_SAVE_AREA + + /* Return them */ + mov eax, [esp+4] + mov [eax], ecx + + mov eax, [esp+8] + mov [eax], edx + + /* return */ + ret 8 +
19 years, 3 months
1
0
0
0
[royce] 17813: patch by Alex_Ionescu - fixes crash in usb driver on bootup in vmware
by royce@svn.reactos.com
patch by Alex_Ionescu - fixes crash in usb driver on bootup in vmware Modified: trunk/reactos/w32api/include/ddk/winddk.h _____ Modified: trunk/reactos/w32api/include/ddk/winddk.h --- trunk/reactos/w32api/include/ddk/winddk.h 2005-09-12 01:31:24 UTC (rev 17812) +++ trunk/reactos/w32api/include/ddk/winddk.h 2005-09-12 01:32:11 UTC (rev 17813) @@ -4945,14 +4945,15 @@ #endif /* DBG */ -#ifdef _NTSYSTEM_ +/* HACK HACK HACK - GCC (or perhaps LD) is messing this up */ +#if defined(_NTSYSTEM_) || defined(__GNUC__) #define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag #define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag #else #define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag) #define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag) #endif /* _NT_SYSTEM */ - + extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG; extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
19 years, 3 months
1
0
0
0
[royce] 17812: document parameter names
by royce@svn.reactos.com
document parameter names Modified: trunk/reactos/w32api/include/winternl.h _____ Modified: trunk/reactos/w32api/include/winternl.h --- trunk/reactos/w32api/include/winternl.h 2005-09-11 22:32:20 UTC (rev 17811) +++ trunk/reactos/w32api/include/winternl.h 2005-09-12 01:31:24 UTC (rev 17812) @@ -2180,8 +2180,17 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *); NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *); -NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list); -NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list); +ULONG WINAPI +vDbgPrintEx(IN ULONG ComponentId, + IN ULONG Level, + IN LPCSTR Format, + IN va_list ap); +ULONG WINAPI +vDbgPrintExWithPrefix(IN LPCSTR Prefix, + IN ULONG ComponentId, + IN ULONG Level, + IN LPCSTR Format, + IN va_list ap); /* Wine internal functions */
19 years, 3 months
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200