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
October 2007
----- 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
20 participants
708 discussions
Start a n
N
ew thread
[gedmurphy] 29469: add wine's wordpad as the default
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue Oct 9 13:00:56 2007 New Revision: 29469 URL:
http://svn.reactos.org/svn/reactos?rev=29469&view=rev
Log: add wine's wordpad as the default Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Tue Oct 9 13:00:56 2007 @@ -67,7 +67,7 @@ base\applications\shutdown\shutdown.exe 1 base\applications\sndvol32\sndvol32.exe 1 base\applications\taskmgr\taskmgr.exe 1 -base\applications\wordpad\wordpad.exe 1 +base\applications\wine_wordpad\wordpad.exe 1 base\services\dhcp\dhcp.exe 1 base\services\eventlog\eventlog.exe 1
17 years, 2 months
1
0
0
0
[hpoussin] 29468: Fix indentation
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Oct 9 13:00:04 2007 New Revision: 29468 URL:
http://svn.reactos.org/svn/reactos?rev=29468&view=rev
Log: Fix indentation Modified: trunk/reactos/base/applications/notepad/settings.c Modified: trunk/reactos/base/applications/notepad/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/settings.c (original) +++ trunk/reactos/base/applications/notepad/settings.c Tue Oct 9 13:00:04 2007 @@ -57,19 +57,19 @@ LPVOID pvResult, DWORD dwResultSize) { DWORD dwType, cbData; - LPVOID *pTemp = _alloca(dwResultSize); + LPVOID *pTemp = _alloca(dwResultSize); - ZeroMemory(pTemp, dwResultSize); + ZeroMemory(pTemp, dwResultSize); cbData = dwResultSize; if (RegQueryValueEx(hKey, pszValueNameT, NULL, &dwType, (LPBYTE) pTemp, &cbData) != ERROR_SUCCESS) - return FALSE; + return FALSE; if (dwType != dwExpectedType) - return FALSE; + return FALSE; memcpy(pvResult, pTemp, cbData); - return TRUE; + return TRUE; } static BOOL QueryDword(HKEY hKey, LPCTSTR pszValueName, DWORD *pdwResult) @@ -99,7 +99,7 @@ static BOOL QueryString(HKEY hKey, LPCTSTR pszValueName, LPTSTR pszResult, DWORD dwResultSize) { - return QueryGeneric(hKey, pszValueName, REG_SZ, pszResult, dwResultSize * sizeof(TCHAR)); + return QueryGeneric(hKey, pszValueName, REG_SZ, pszResult, dwResultSize * sizeof(TCHAR)); } void LoadSettings(void) @@ -110,20 +110,20 @@ if (RegOpenKey(HKEY_CURRENT_USER, s_szRegistryKey, &hKey) == ERROR_SUCCESS) { - QueryByte(hKey, _T("lfCharSet"), &Globals.lfFont.lfCharSet); - QueryByte(hKey, _T("lfClipPrecision"), &Globals.lfFont.lfClipPrecision); - QueryDword(hKey, _T("lfEscapement"), (DWORD*)&Globals.lfFont.lfEscapement); - QueryString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName, sizeof(Globals.lfFont.lfFaceName) / sizeof(Globals.lfFont.lfFaceName[0])); - QueryByte(hKey, _T("lfItalic"), &Globals.lfFont.lfItalic); - QueryDword(hKey, _T("lfOrientation"), (DWORD*)&Globals.lfFont.lfOrientation); - QueryByte(hKey, _T("lfOutPrecision"), &Globals.lfFont.lfOutPrecision); - QueryByte(hKey, _T("lfPitchAndFamily"), &Globals.lfFont.lfPitchAndFamily); - QueryByte(hKey, _T("lfQuality"), &Globals.lfFont.lfQuality); - QueryByte(hKey, _T("lfStrikeOut"), &Globals.lfFont.lfStrikeOut); - QueryByte(hKey, _T("lfUnderline"), &Globals.lfFont.lfUnderline); - QueryDword(hKey, _T("lfWeight"), (DWORD*)&Globals.lfFont.lfWeight); - QueryDword(hKey, _T("iPointSize"), &dwPointSize); - QueryBool(hKey, _T("fWrap"), &Globals.bWrapLongLines); + QueryByte(hKey, _T("lfCharSet"), &Globals.lfFont.lfCharSet); + QueryByte(hKey, _T("lfClipPrecision"), &Globals.lfFont.lfClipPrecision); + QueryDword(hKey, _T("lfEscapement"), (DWORD*)&Globals.lfFont.lfEscapement); + QueryString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName, sizeof(Globals.lfFont.lfFaceName) / sizeof(Globals.lfFont.lfFaceName[0])); + QueryByte(hKey, _T("lfItalic"), &Globals.lfFont.lfItalic); + QueryDword(hKey, _T("lfOrientation"), (DWORD*)&Globals.lfFont.lfOrientation); + QueryByte(hKey, _T("lfOutPrecision"), &Globals.lfFont.lfOutPrecision); + QueryByte(hKey, _T("lfPitchAndFamily"), &Globals.lfFont.lfPitchAndFamily); + QueryByte(hKey, _T("lfQuality"), &Globals.lfFont.lfQuality); + QueryByte(hKey, _T("lfStrikeOut"), &Globals.lfFont.lfStrikeOut); + QueryByte(hKey, _T("lfUnderline"), &Globals.lfFont.lfUnderline); + QueryDword(hKey, _T("lfWeight"), (DWORD*)&Globals.lfFont.lfWeight); + QueryDword(hKey, _T("iPointSize"), &dwPointSize); + QueryBool(hKey, _T("fWrap"), &Globals.bWrapLongLines); if (dwPointSize != 0) Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize); @@ -158,20 +158,20 @@ if (RegCreateKeyEx(HKEY_CURRENT_USER, s_szRegistryKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition) == ERROR_SUCCESS) { - SaveDword(hKey, _T("lfCharSet"), Globals.lfFont.lfCharSet); - SaveDword(hKey, _T("lfClipPrecision"), Globals.lfFont.lfClipPrecision); - SaveDword(hKey, _T("lfEscapement"), Globals.lfFont.lfEscapement); - SaveString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName); - SaveDword(hKey, _T("lfItalic"), Globals.lfFont.lfItalic); - SaveDword(hKey, _T("lfOrientation"), Globals.lfFont.lfOrientation); - SaveDword(hKey, _T("lfOutPrecision"), Globals.lfFont.lfOutPrecision); - SaveDword(hKey, _T("lfPitchAndFamily"), Globals.lfFont.lfPitchAndFamily); - SaveDword(hKey, _T("lfQuality"), Globals.lfFont.lfQuality); - SaveDword(hKey, _T("lfStrikeOut"), Globals.lfFont.lfStrikeOut); - SaveDword(hKey, _T("lfUnderline"), Globals.lfFont.lfUnderline); - SaveDword(hKey, _T("lfWeight"), Globals.lfFont.lfWeight); - SaveDword(hKey, _T("iPointSize"), PointSizeFromHeight(Globals.lfFont.lfHeight)); - SaveDword(hKey, _T("fWrap"), Globals.bWrapLongLines ? 1 : 0); + SaveDword(hKey, _T("lfCharSet"), Globals.lfFont.lfCharSet); + SaveDword(hKey, _T("lfClipPrecision"), Globals.lfFont.lfClipPrecision); + SaveDword(hKey, _T("lfEscapement"), Globals.lfFont.lfEscapement); + SaveString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName); + SaveDword(hKey, _T("lfItalic"), Globals.lfFont.lfItalic); + SaveDword(hKey, _T("lfOrientation"), Globals.lfFont.lfOrientation); + SaveDword(hKey, _T("lfOutPrecision"), Globals.lfFont.lfOutPrecision); + SaveDword(hKey, _T("lfPitchAndFamily"), Globals.lfFont.lfPitchAndFamily); + SaveDword(hKey, _T("lfQuality"), Globals.lfFont.lfQuality); + SaveDword(hKey, _T("lfStrikeOut"), Globals.lfFont.lfStrikeOut); + SaveDword(hKey, _T("lfUnderline"), Globals.lfFont.lfUnderline); + SaveDword(hKey, _T("lfWeight"), Globals.lfFont.lfWeight); + SaveDword(hKey, _T("iPointSize"), PointSizeFromHeight(Globals.lfFont.lfHeight)); + SaveDword(hKey, _T("fWrap"), Globals.bWrapLongLines ? 1 : 0); RegCloseKey(hKey); }
17 years, 2 months
1
0
0
0
[gedmurphy] 29467: Add a much more complete wordpad from one of Wine's SOC projects
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue Oct 9 13:00:02 2007 New Revision: 29467 URL:
http://svn.reactos.org/svn/reactos?rev=29467&view=rev
Log: Add a much more complete wordpad from one of Wine's SOC projects Added: trunk/reactos/base/applications/wine_wordpad/ trunk/reactos/base/applications/wine_wordpad/De.rc (with props) trunk/reactos/base/applications/wine_wordpad/En.rc (with props) trunk/reactos/base/applications/wine_wordpad/Fr.rc (with props) trunk/reactos/base/applications/wine_wordpad/Hu.rc (with props) trunk/reactos/base/applications/wine_wordpad/Ko.rc (with props) trunk/reactos/base/applications/wine_wordpad/Nl.rc (with props) trunk/reactos/base/applications/wine_wordpad/No.rc (with props) trunk/reactos/base/applications/wine_wordpad/Pl.rc (with props) trunk/reactos/base/applications/wine_wordpad/Ru.rc (with props) trunk/reactos/base/applications/wine_wordpad/Tr.rc (with props) trunk/reactos/base/applications/wine_wordpad/formatbar.bmp (with props) trunk/reactos/base/applications/wine_wordpad/resource.h (with props) trunk/reactos/base/applications/wine_wordpad/rsrc.rc (with props) trunk/reactos/base/applications/wine_wordpad/rtf.ico (with props) trunk/reactos/base/applications/wine_wordpad/toolbar.bmp (with props) trunk/reactos/base/applications/wine_wordpad/txt.ico (with props) trunk/reactos/base/applications/wine_wordpad/wine_wordpad.rbuild (with props) trunk/reactos/base/applications/wine_wordpad/wordpad.c (with props) trunk/reactos/base/applications/wine_wordpad/wordpad.ico (with props) trunk/reactos/base/applications/wine_wordpad/wri.ico (with props) Modified: trunk/reactos/base/applications/applications.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/applications.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/applicat…
Added: trunk/reactos/base/applications/wine_wordpad/De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Hu.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Nl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Ru.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/Tr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/formatbar.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/rtf.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/toolbar.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/txt.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/wine_wordpad.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/wordpad.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/wordpad.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
Added: trunk/reactos/base/applications/wine_wordpad/wri.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wine_wor…
17 years, 2 months
1
0
0
0
[hpoussin] 29466: Patch by Carlo Bramini, carlo dot bramix at libero dot it Fixes for non unicode build See issue #2711 for more details.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Oct 9 12:53:25 2007 New Revision: 29466 URL:
http://svn.reactos.org/svn/reactos?rev=29466&view=rev
Log: Patch by Carlo Bramini, carlo dot bramix at libero dot it Fixes for non unicode build See issue #2711 for more details. Modified: trunk/reactos/base/applications/notepad/ChangeLog (props changed) trunk/reactos/base/applications/notepad/dialog.c (contents, props changed) trunk/reactos/base/applications/notepad/dialog.h (contents, props changed) trunk/reactos/base/applications/notepad/license.c (props changed) trunk/reactos/base/applications/notepad/main.c (contents, props changed) trunk/reactos/base/applications/notepad/main.h (contents, props changed) trunk/reactos/base/applications/notepad/notepad.h trunk/reactos/base/applications/notepad/notepad.rbuild trunk/reactos/base/applications/notepad/notepad_res.h (props changed) trunk/reactos/base/applications/notepad/rsrc.rc (props changed) trunk/reactos/base/applications/notepad/settings.c (contents, props changed) Propchange: trunk/reactos/base/applications/notepad/ChangeLog ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/dialog.c (original) +++ trunk/reactos/base/applications/notepad/dialog.c Tue Oct 9 12:53:25 2007 @@ -22,17 +22,81 @@ #include <notepad.h> -static const WCHAR helpfileW[] = { 'n','o','t','e','p','a','d','.','h','l','p',0 }; +static const TCHAR helpfile[] = _T("notepad.hlp"); +static const TCHAR empty_str[] = _T(""); +static const TCHAR szDefaultExt[] = _T("txt"); +static const TCHAR txt_files[] = _T("*.txt"); static INT_PTR WINAPI DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam); + +#ifndef UNICODE +static LPSTR ConvertToASCII(LPSTR pszText) +{ + int sz; + LPWSTR pszTextW = (LPWSTR)pszText; + + /* default return value */ + pszText = NULL; + do { + /* query about requested size for conversion */ + sz = WideCharToMultiByte(CP_ACP, 0, pszTextW, -1, NULL, 0, NULL, NULL); + if (!sz) + break; + + /* get space for ASCII buffer */ + pszText = (LPSTR)HeapAlloc(GetProcessHeap(), 0, sz); + if (pszText == NULL) + break; + + /* if previous diagnostic call worked fine, + * then this one will work too, + * so no need to test return value here + */ + WideCharToMultiByte(CP_ACP, 0, pszTextW, -1, pszText, sz, NULL, NULL); + } while (0); + + HeapFree(GetProcessHeap(), 0, pszTextW); + return pszText; +} + +static LPWSTR ConvertToUNICODE(LPSTR pszText, DWORD *pdwSize) +{ + int sz; + LPWSTR pszTextW = NULL; + + do { + /* query about requested size for conversion */ + sz = MultiByteToWideChar(CP_ACP, 0, pszText, -1, NULL, 0); + if (!sz) + break; + + /* get space for UNICODE buffer */ + pszTextW = HeapAlloc(GetProcessHeap(), 0, sz*sizeof(WCHAR)); + if (pszText == NULL) + break; + + /* if previous diagnostic call worked fine, + * then this one will work too, + * so no need to test return value here + */ + MultiByteToWideChar(CP_ACP, 0, pszText, -1, pszTextW, sz); + + /* report the new size of the text to the caller */ + *pdwSize = sz; + } while (0); + + HeapFree(GetProcessHeap(), 0, pszText); + return pszTextW; +} +#endif VOID ShowLastError(void) { DWORD error = GetLastError(); if (error != NO_ERROR) { - LPWSTR lpMsgBuf; - WCHAR szTitle[MAX_STRING_LEN]; + LPTSTR lpMsgBuf = NULL; + TCHAR szTitle[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_ERROR, szTitle, SIZEOF(szTitle)); FormatMessage( @@ -51,33 +115,33 @@ */ static void UpdateWindowCaption(void) { - WCHAR szCaption[MAX_STRING_LEN]; - WCHAR szUntitled[MAX_STRING_LEN]; + TCHAR szCaption[MAX_STRING_LEN]; + TCHAR szUntitled[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_NOTEPAD, szCaption, SIZEOF(szCaption)); if (Globals.szFileTitle[0] != '\0') { - static const WCHAR bracket_lW[] = { ' ','-',' ','[',0 }; - static const WCHAR bracket_rW[] = { ']',0 }; - lstrcat(szCaption, bracket_lW); - lstrcat(szCaption, Globals.szFileTitle); - lstrcat(szCaption, bracket_rW); + static const TCHAR bracket_l[] = _T(" - ["); + static const TCHAR bracket_r[] = _T("]"); + _tcscat(szCaption, bracket_l); + _tcscat(szCaption, Globals.szFileTitle); + _tcscat(szCaption, bracket_r); } else { - static const WCHAR hyphenW[] = { ' ','-',' ',0 }; + static const TCHAR hyphen[] = _T(" - "); LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, SIZEOF(szUntitled)); - lstrcat(szCaption, hyphenW); - lstrcat(szCaption, szUntitled); + _tcscat(szCaption, hyphen); + _tcscat(szCaption, szUntitled); } SetWindowText(Globals.hMainWnd, szCaption); } -static void AlertFileNotFound(LPCWSTR szFileName) -{ - WCHAR szMessage[MAX_STRING_LEN]; - WCHAR szResource[MAX_STRING_LEN]; +static void AlertFileNotFound(LPCTSTR szFileName) +{ + TCHAR szMessage[MAX_STRING_LEN]; + TCHAR szResource[MAX_STRING_LEN]; /* Load and format szMessage */ LoadString(Globals.hInstance, STRING_NOTFOUND, szResource, SIZEOF(szResource)); @@ -90,11 +154,11 @@ MessageBox(Globals.hMainWnd, szMessage, szResource, MB_ICONEXCLAMATION); } -static int AlertFileNotSaved(LPCWSTR szFileName) -{ - WCHAR szMessage[MAX_STRING_LEN]; - WCHAR szResource[MAX_STRING_LEN]; - WCHAR szUntitled[MAX_STRING_LEN]; +static int AlertFileNotSaved(LPCTSTR szFileName) +{ + TCHAR szMessage[MAX_STRING_LEN]; + TCHAR szResource[MAX_STRING_LEN]; + TCHAR szUntitled[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_UNTITLED, szUntitled, SIZEOF(szUntitled)); @@ -114,7 +178,7 @@ * TRUE - if file exists * FALSE - if file does not exist */ -BOOL FileExists(LPCWSTR szFilename) +BOOL FileExists(LPCTSTR szFilename) { WIN32_FIND_DATA entry; HANDLE hFile; @@ -126,21 +190,21 @@ } -BOOL HasFileExtension(LPCWSTR szFilename) -{ - LPCWSTR s; - - s = wcsrchr(szFilename, '\\'); +BOOL HasFileExtension(LPCTSTR szFilename) +{ + LPCTSTR s; + + s = _tcsrchr(szFilename, _T('\\')); if (s) szFilename = s; - return wcsrchr(szFilename, '.') != NULL; + return _tcsrchr(szFilename, _T('.')) != NULL; } static VOID DoSaveFile(VOID) { HANDLE hFile; - LPWSTR pTemp; + LPTSTR pTemp; DWORD size; hFile = CreateFile(Globals.szFileName, GENERIC_WRITE, FILE_SHARE_WRITE, @@ -151,7 +215,7 @@ return; } - size = GetWindowTextLengthW(Globals.hEdit) + 1; + size = GetWindowTextLength(Globals.hEdit) + 1; pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*pTemp)); if (!pTemp) { @@ -159,9 +223,19 @@ ShowLastError(); return; } - size = GetWindowTextW(Globals.hEdit, pTemp, size); - - if (!WriteText(hFile, pTemp, size, Globals.iEncoding, Globals.iEoln)) + size = GetWindowText(Globals.hEdit, pTemp, size); + +#ifndef UNICODE + pTemp = (LPTSTR)ConvertToUNICODE(pTemp, &size); + if (!pTemp) { + /* original "pTemp" already freed */ + CloseHandle(hFile); + ShowLastError(); + return; + } +#endif + + if (!WriteText(hFile, (LPWSTR)pTemp, size, Globals.iEncoding, Globals.iEoln)) ShowLastError(); else SendMessage(Globals.hEdit, EM_SETMODIFY, FALSE, 0); @@ -178,7 +252,6 @@ BOOL DoCloseFile(void) { int nResult; - static const WCHAR empty_strW[] = { 0 }; if (SendMessage(Globals.hEdit, EM_GETMODIFY, 0, 0)) { @@ -198,20 +271,19 @@ } /* switch */ } /* if */ - SetFileName(empty_strW); + SetFileName(empty_str); UpdateWindowCaption(); return(TRUE); } - -void DoOpenFile(LPCWSTR szFileName) -{ - static const WCHAR dotlog[] = { '.','L','O','G',0 }; +void DoOpenFile(LPCTSTR szFileName) +{ + static const TCHAR dotlog[] = _T(".LOG"); HANDLE hFile; - LPWSTR pszText; + LPTSTR pszText; DWORD dwTextLen; - WCHAR log[5]; + TCHAR log[5]; /* Close any files and prompt to save changes */ if (!DoCloseFile()) @@ -225,13 +297,19 @@ goto done; } - if (!ReadText(hFile, &pszText, &dwTextLen, &Globals.iEncoding, &Globals.iEoln)) + if (!ReadText(hFile, (LPWSTR *)&pszText, &dwTextLen, &Globals.iEncoding, &Globals.iEoln)) { ShowLastError(); goto done; } - - SetWindowTextW(Globals.hEdit, pszText); +#ifndef UNICODE + pszText = ConvertToASCII(pszText); + if (pszText == NULL) { + ShowLastError(); + goto done; + } +#endif + SetWindowText(Globals.hEdit, pszText); SendMessage(Globals.hEdit, EM_SETMODIFY, FALSE, 0); SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0); @@ -240,13 +318,13 @@ /* If the file starts with .LOG, add a time/date at the end and set cursor after * See
http://support.microsoft.com/?kbid=260563
*/ - if (GetWindowTextW(Globals.hEdit, log, sizeof(log)/sizeof(log[0])) && !lstrcmp(log, dotlog)) - { - static const WCHAR lfW[] = { '\r','\n',0 }; + if (GetWindowText(Globals.hEdit, log, SIZEOF(log)) && !_tcscmp(log, dotlog)) + { + static const TCHAR lf[] = _T("\r\n"); SendMessage(Globals.hEdit, EM_SETSEL, GetWindowTextLength(Globals.hEdit), -1); - SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)lfW); + SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)lf); DIALOG_EditTimeDate(); - SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)lfW); + SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)lf); } SetFileName(szFileName); @@ -261,11 +339,9 @@ VOID DIALOG_FileNew(VOID) { - static const WCHAR empty_strW[] = { 0 }; - /* Close any files and prompt to save changes */ if (DoCloseFile()) { - SetWindowText(Globals.hEdit, empty_strW); + SetWindowText(Globals.hEdit, empty_str); SendMessage(Globals.hEdit, EM_EMPTYUNDOBUFFER, 0, 0); SetFocus(Globals.hEdit); } @@ -274,18 +350,16 @@ VOID DIALOG_FileOpen(VOID) { OPENFILENAME openfilename; - WCHAR szDir[MAX_PATH]; - WCHAR szPath[MAX_PATH]; - static const WCHAR szDefaultExt[] = { 't','x','t',0 }; - static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; + TCHAR szDir[MAX_PATH]; + TCHAR szPath[MAX_PATH]; ZeroMemory(&openfilename, sizeof(openfilename)); GetCurrentDirectory(SIZEOF(szDir), szDir); if (Globals.szFileName[0] == 0) - lstrcpy(szPath, txt_files); + _tcscpy(szPath, txt_files); else - lstrcpy(szPath, Globals.szFileName); + _tcscpy(szPath, Globals.szFileName); openfilename.lStructSize = sizeof(openfilename); openfilename.hwndOwner = Globals.hMainWnd; @@ -318,7 +392,7 @@ static UINT_PTR CALLBACK DIALOG_FileSaveAs_Hook(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - WCHAR szText[128]; + TCHAR szText[128]; HWND hCombo; OFNOTIFY *pNotify; @@ -378,18 +452,16 @@ VOID DIALOG_FileSaveAs(VOID) { OPENFILENAME saveas; - WCHAR szDir[MAX_PATH]; - WCHAR szPath[MAX_PATH]; - static const WCHAR szDefaultExt[] = { 't','x','t',0 }; - static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; + TCHAR szDir[MAX_PATH]; + TCHAR szPath[MAX_PATH]; ZeroMemory(&saveas, sizeof(saveas)); GetCurrentDirectory(SIZEOF(szDir), szDir); if (Globals.szFileName[0] == 0) - lstrcpy(szPath, txt_files); + _tcscpy(szPath, txt_files); else - lstrcpy(szPath, Globals.szFileName); + _tcscpy(szPath, Globals.szFileName); saveas.lStructSize = sizeof(OPENFILENAME); saveas.hwndOwner = Globals.hMainWnd; @@ -422,24 +494,19 @@ LOGFONT hdrFont; HFONT font, old_font=0; DWORD size; - LPWSTR pTemp; - static const WCHAR times_new_romanW[] = { 'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n',0 }; + LPTSTR pTemp; + static const TCHAR times_new_roman[] = _T("Times New Roman"); /* Get a small font and print some header info on each page */ + ZeroMemory(&hdrFont, sizeof(hdrFont)); hdrFont.lfHeight = 100; - hdrFont.lfWidth = 0; - hdrFont.lfEscapement = 0; - hdrFont.lfOrientation = 0; hdrFont.lfWeight = FW_BOLD; - hdrFont.lfItalic = 0; - hdrFont.lfUnderline = 0; - hdrFont.lfStrikeOut = 0; hdrFont.lfCharSet = ANSI_CHARSET; hdrFont.lfOutPrecision = OUT_DEFAULT_PRECIS; hdrFont.lfClipPrecision = CLIP_DEFAULT_PRECIS; hdrFont.lfQuality = PROOF_QUALITY; hdrFont.lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN; - lstrcpy(hdrFont.lfFaceName, times_new_romanW); + _tcscpy(hdrFont.lfFaceName, times_new_roman); font = CreateFontIndirect(&hdrFont); @@ -478,21 +545,21 @@ cHeightPels = GetDeviceCaps(printer.hDC, VERTRES); /* Get the file text */ - size = GetWindowTextLengthW(Globals.hEdit) + 1; - pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); + size = GetWindowTextLength(Globals.hEdit) + 1; + pTemp = HeapAlloc(GetProcessHeap(), 0, size * sizeof(TCHAR)); if (!pTemp) { ShowLastError(); return; } - size = GetWindowTextW(Globals.hEdit, pTemp, size); + size = GetWindowText(Globals.hEdit, pTemp, size); border = 150; for (copycount=1; copycount <= printer.nCopies; copycount++) { i = 0; pagecount = 1; do { - static const WCHAR letterM[] = { 'M',0 }; + static const TCHAR letterM[] = _T("M"); if (pagecount >= printer.nFromPage && /* ((printer.Flags & PD_PAGENUMS) == 0 || pagecount <= printer.nToPage))*/ @@ -506,9 +573,9 @@ if (dopage) { if (StartPage(printer.hDC) <= 0) { - static const WCHAR failedW[] = { 'S','t','a','r','t','P','a','g','e',' ','f','a','i','l','e','d',0 }; - static const WCHAR errorW[] = { 'P','r','i','n','t',' ','E','r','r','o','r',0 }; - MessageBox(Globals.hMainWnd, failedW, errorW, MB_ICONEXCLAMATION); + static const TCHAR failed[] = _T("StartPage failed"); + static const TCHAR error[] = _T("Print Error"); + MessageBox(Globals.hMainWnd, failed, error, MB_ICONEXCLAMATION); return; } /* Write a rectangle and header at the top of each page */ @@ -604,15 +671,15 @@ VOID DIALOG_EditTimeDate(VOID) { SYSTEMTIME st; - WCHAR szDate[MAX_STRING_LEN]; - static const WCHAR spaceW[] = { ' ',0 }; + TCHAR szDate[MAX_STRING_LEN]; + static const TCHAR space[] = _T(" "); GetLocalTime(&st); GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, szDate, MAX_STRING_LEN); SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)szDate); - SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)spaceW); + SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)space); GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, szDate, MAX_STRING_LEN); SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)szDate); @@ -620,11 +687,11 @@ VOID DIALOG_EditWrap(VOID) { - static const WCHAR editW[] = { 'e','d','i','t',0 }; + static const TCHAR edit[] = _T("edit"); DWORD dwStyle; RECT rc, rcstatus; DWORD size; - LPWSTR pTemp; + LPTSTR pTemp; Globals.bWrapLongLines = !Globals.bWrapLongLines; @@ -652,12 +719,12 @@ ShowWindow(Globals.hStatusBar, SW_SHOW); } } - Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, editW, NULL, dwStyle, + Globals.hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, edit, NULL, dwStyle, 0, 0, rc.right, rc.bottom, Globals.hMainWnd, NULL, Globals.hInstance, NULL); SendMessage(Globals.hEdit, WM_SETFONT, (WPARAM)Globals.hFont, (LPARAM)FALSE); SendMessage(Globals.hEdit, EM_LIMITTEXT, 0, 0); - SetWindowTextW(Globals.hEdit, pTemp); + SetWindowText(Globals.hEdit, pTemp); SetFocus(Globals.hEdit); HeapFree(GetProcessHeap(), 0, pTemp); DrawMenuBar(Globals.hMainWnd); @@ -732,7 +799,7 @@ switch(uMsg) { case WM_INITDIALOG: hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER); - _sntprintf(szText, sizeof(szText) / sizeof(szText[0]), _T("%d"), lParam); + _sntprintf(szText, SIZEOF(szText), _T("%d"), lParam); SetWindowText(hTextBox, szText); break; case WM_COMMAND: @@ -741,7 +808,7 @@ if (LOWORD(wParam) == IDOK) { hTextBox = GetDlgItem(hwndDialog, ID_LINENUMBER); - GetWindowText(hTextBox, szText, sizeof(szText) / sizeof(szText[0])); + GetWindowText(hTextBox, szText, SIZEOF(szText)); EndDialog(hwndDialog, _ttoi(szText)); bResult = TRUE; } @@ -842,7 +909,7 @@ VOID DIALOG_HelpContents(VOID) { - WinHelp(Globals.hMainWnd, helpfileW, HELP_INDEX, 0); + WinHelp(Globals.hMainWnd, helpfile, HELP_INDEX, 0); } VOID DIALOG_HelpSearch(VOID) @@ -852,7 +919,7 @@ VOID DIALOG_HelpHelp(VOID) { - WinHelp(Globals.hMainWnd, helpfileW, HELP_HELPONHELP, 0); + WinHelp(Globals.hMainWnd, helpfile, HELP_HELPONHELP, 0); } #ifdef _MSC_VER @@ -862,7 +929,7 @@ AboutDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { HWND hLicenseEditWnd; - TCHAR strLicense[0x1000]; + TCHAR *strLicense; switch (message) { @@ -870,6 +937,8 @@ hLicenseEditWnd = GetDlgItem(hDlg, IDC_LICENSE); + /* 0x1000 should be enought */ + strLicense = (TCHAR *)_alloca(0x1000); LoadString(GetModuleHandle(NULL), STRING_LICENSE, strLicense, 0x1000); SetWindowText(hLicenseEditWnd, strLicense); @@ -894,11 +963,11 @@ VOID DIALOG_HelpAboutWine(VOID) { - static const WCHAR notepadW[] = { 'N','o','t','e','p','a','d','\n',0 }; - WCHAR szNotepad[MAX_STRING_LEN]; + static const TCHAR notepad[] = _T("Notepad\n"); + TCHAR szNotepad[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, SIZEOF(szNotepad)); - ShellAbout(Globals.hMainWnd, szNotepad, notepadW, 0); + ShellAbout(Globals.hMainWnd, szNotepad, notepad, 0); } @@ -947,9 +1016,9 @@ case IDHELP: { /* FIXME: Bring this to work */ - static const WCHAR sorryW[] = { 'S','o','r','r','y',',',' ','n','o',' ','h','e','l','p',' ','a','v','a','i','l','a','b','l','e',0 }; - static const WCHAR helpW[] = { 'H','e','l','p',0 }; - MessageBox(Globals.hMainWnd, sorryW, helpW, MB_ICONEXCLAMATION); + static const TCHAR sorry[] = _T("Sorry, no help available"); + static const TCHAR help[] = _T("Help"); + MessageBox(Globals.hMainWnd, sorry, help, MB_ICONEXCLAMATION); return TRUE; } Propchange: trunk/reactos/base/applications/notepad/dialog.c ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/dialog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/dialog.h (original) +++ trunk/reactos/base/applications/notepad/dialog.h Tue Oct 9 12:53:25 2007 @@ -59,7 +59,7 @@ /* utility functions */ VOID ShowLastError(void); -BOOL FileExists(LPCWSTR szFilename); -BOOL HasFileExtension(LPCWSTR szFilename); +BOOL FileExists(LPCTSTR szFilename); +BOOL HasFileExtension(LPCTSTR szFilename); BOOL DoCloseFile(void); -void DoOpenFile(LPCWSTR szFileName); +void DoOpenFile(LPCTSTR szFileName); Propchange: trunk/reactos/base/applications/notepad/dialog.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/base/applications/notepad/license.c ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/main.c (original) +++ trunk/reactos/base/applications/notepad/main.c Tue Oct 9 12:53:25 2007 @@ -33,11 +33,11 @@ * * Sets Global File Name. */ -VOID SetFileName(LPCWSTR szFileName) -{ - lstrcpy(Globals.szFileName, szFileName); +VOID SetFileName(LPCTSTR szFileName) +{ + _tcscpy(Globals.szFileName, szFileName); Globals.szFileTitle[0] = 0; - GetFileTitle(szFileName, Globals.szFileTitle, sizeof(Globals.szFileTitle) / sizeof(Globals.szFileTitle[0])); + GetFileTitle(szFileName, Globals.szFileTitle, SIZEOF(Globals.szFileTitle)); } /*********************************************************************** @@ -244,18 +244,17 @@ */ static VOID NOTEPAD_InitData(VOID) { - LPWSTR p = Globals.szFilter; - static const WCHAR txt_files[] = { '*','.','t','x','t',0 }; - static const WCHAR all_files[] = { '*','.','*',0 }; - - LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN); - p += lstrlen(p) + 1; - lstrcpy(p, txt_files); - p += lstrlen(p) + 1; - LoadString(Globals.hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN); - p += lstrlen(p) + 1; - lstrcpy(p, all_files); - p += lstrlen(p) + 1; + LPTSTR p = Globals.szFilter; + static const TCHAR txt_files[] = _T("*.txt"); + static const TCHAR all_files[] = _T("*.*"); + + p += LoadString(Globals.hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN)+1; + _tcscpy(p, txt_files); + p += SIZEOF(txt_files); + + p += LoadString(Globals.hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN)+1; + _tcscpy(p, all_files); + p += SIZEOF(all_files); *p = '\0'; Globals.find.lpstrFindWhat = NULL; } @@ -302,10 +301,10 @@ case WM_CREATE: { - static const WCHAR editW[] = { 'e','d','i','t',0 }; + static const TCHAR edit[] = _T("edit"); RECT rc; GetClientRect(hWnd, &rc); - Globals.hEdit = CreateWindowEx(EDIT_EXSTYLE, editW, NULL, Globals.bWrapLongLines ? EDIT_STYLE_WRAP : EDIT_STYLE, + Globals.hEdit = CreateWindowEx(EDIT_EXSTYLE, edit, NULL, Globals.bWrapLongLines ? EDIT_STYLE_WRAP : EDIT_STYLE, 0, 0, rc.right, rc.bottom, hWnd, NULL, Globals.hInstance, NULL); if (!Globals.hEdit) @@ -379,7 +378,7 @@ case WM_DROPFILES: { - WCHAR szFileName[MAX_PATH]; + TCHAR szFileName[MAX_PATH]; HDROP hDrop = (HDROP) wParam; DragQueryFile(hDrop, 0, szFileName, SIZEOF(szFileName)); @@ -413,11 +412,11 @@ return 0; } -static int AlertFileDoesNotExist(LPCWSTR szFileName) +static int AlertFileDoesNotExist(LPCTSTR szFileName) { int nResult; - WCHAR szMessage[MAX_STRING_LEN]; - WCHAR szResource[MAX_STRING_LEN]; + TCHAR szMessage[MAX_STRING_LEN]; + TCHAR szResource[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_DOESNOTEXIST, szResource, SIZEOF(szResource)); wsprintf(szMessage, szResource, szFileName); @@ -430,16 +429,16 @@ return(nResult); } -static void HandleCommandLine(LPWSTR cmdline) -{ - WCHAR delimiter; +static void HandleCommandLine(LPTSTR cmdline) +{ + TCHAR delimiter; int opt_print=0; /* skip white space */ while (*cmdline == ' ') cmdline++; /* skip executable name */ - delimiter = (*cmdline == '"' ? '"' : ' '); + delimiter = (*cmdline == _T('"') ? _T('"') : _T(' ')); do { @@ -448,15 +447,15 @@ while (*cmdline && *cmdline != delimiter); if (*cmdline == delimiter) cmdline++; - while (*cmdline == ' ' || *cmdline == '-' || *cmdline == '/') - { - WCHAR option; - - if (*cmdline++ == ' ') continue; + while (*cmdline == _T(' ') || *cmdline == _T('-') || *cmdline == _T('/')) + { + TCHAR option; + + if (*cmdline++ == _T(' ')) continue; option = *cmdline; if (option) cmdline++; - while (*cmdline == ' ') cmdline++; + while (*cmdline == _T(' ')) cmdline++; switch(option) { @@ -470,11 +469,11 @@ if (*cmdline) { /* file name is passed in the command line */ - LPCWSTR file_name = NULL; + LPCTSTR file_name = NULL; BOOL file_exists = FALSE; - WCHAR buf[MAX_PATH]; - - if (cmdline[0] == '"') + TCHAR buf[MAX_PATH]; + + if (cmdline[0] == _T('"')) { cmdline++; cmdline[lstrlen(cmdline) - 1] = 0; @@ -487,17 +486,17 @@ } else if (!HasFileExtension(cmdline)) { - static const WCHAR txtW[] = { '.','t','x','t',0 }; + static const TCHAR txt[] = _T(".txt"); /* try to find file with ".txt" extension */ - if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW))) + if (!_tcscmp(txt, cmdline + _tcslen(cmdline) - _tcslen(txt))) { file_exists = FALSE; } else { - lstrcpyn(buf, cmdline, MAX_PATH - lstrlen(txtW) - 1); - lstrcat(buf, txtW); + _tcsncpy(buf, cmdline, MAX_PATH - _tcslen(txt) - 1); + _tcscat(buf, txt); file_name = buf; file_exists = FileExists(file_name); } @@ -528,16 +527,15 @@ * * WinMain */ -int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) +int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int show) { MSG msg; HACCEL hAccel; WNDCLASSEX wndclass; - static const WCHAR className[] = {'N','P','C','l','a','s','s',0}; - static const WCHAR winName[] = {'N','o','t','e','p','a','d',0}; + static const TCHAR className[] = _T("NPClass"); + static const TCHAR winName[] = _T("Notepad"); UNREFERENCED_PARAMETER(prev); - UNREFERENCED_PARAMETER(cmdline); aFINDMSGSTRING = (ATOM) RegisterWindowMessage(FINDMSGSTRING); @@ -578,7 +576,7 @@ UpdateWindow(Globals.hMainWnd); DragAcceptFiles(Globals.hMainWnd, TRUE); - HandleCommandLine(GetCommandLine()); + HandleCommandLine(cmdline); hAccel = LoadAccelerators( hInstance, MAKEINTRESOURCE(ID_ACCEL) ); Propchange: trunk/reactos/base/applications/notepad/main.c ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/main.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/main.h (original) +++ trunk/reactos/base/applications/notepad/main.h Tue Oct 9 12:53:25 2007 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define SIZEOF(a) sizeof(a)/sizeof((a)[0]) +#define SIZEOF(a) (sizeof(a)/sizeof((a)[0])) #include "notepad_res.h" @@ -50,19 +50,19 @@ LOGFONT lfFont; BOOL bWrapLongLines; BOOL bShowStatusBar; - WCHAR szFindText[MAX_PATH]; - WCHAR szReplaceText[MAX_PATH]; - WCHAR szFileName[MAX_PATH]; - WCHAR szFileTitle[MAX_PATH]; - WCHAR szFilter[2 * MAX_STRING_LEN + 100]; - WCHAR szMarginTop[MAX_PATH]; - WCHAR szMarginBottom[MAX_PATH]; - WCHAR szMarginLeft[MAX_PATH]; - WCHAR szMarginRight[MAX_PATH]; - WCHAR szHeader[MAX_PATH]; - WCHAR szFooter[MAX_PATH]; - WCHAR szStatusBarLine[MAX_PATH]; - WCHAR szStatusBarCol[MAX_PATH]; + TCHAR szFindText[MAX_PATH]; + TCHAR szReplaceText[MAX_PATH]; + TCHAR szFileName[MAX_PATH]; + TCHAR szFileTitle[MAX_PATH]; + TCHAR szFilter[2 * MAX_STRING_LEN + 100]; + TCHAR szMarginTop[MAX_PATH]; + TCHAR szMarginBottom[MAX_PATH]; + TCHAR szMarginLeft[MAX_PATH]; + TCHAR szMarginRight[MAX_PATH]; + TCHAR szHeader[MAX_PATH]; + TCHAR szFooter[MAX_PATH]; + TCHAR szStatusBarLine[MAX_PATH]; + TCHAR szStatusBarCol[MAX_PATH]; int iEncoding; int iEoln; @@ -71,7 +71,7 @@ extern NOTEPAD_GLOBALS Globals; -VOID SetFileName(LPCWSTR szFileName); +VOID SetFileName(LPCTSTR szFileName); /* from text.c */ BOOL ReadText(HANDLE hFile, LPWSTR *ppszText, DWORD *pdwTextLen, int *piEncoding, int *piEoln); Propchange: trunk/reactos/base/applications/notepad/main.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/notepad.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/notepad.h (original) +++ trunk/reactos/base/applications/notepad/notepad.h Tue Oct 9 12:53:25 2007 @@ -1,6 +1,3 @@ -#define UNICODE -#define _UNICODE - #include <assert.h> #include <stdio.h> #include <windows.h> @@ -8,6 +5,7 @@ #include <commctrl.h> #include <tchar.h> #include <richedit.h> +#include <malloc.h> #include "main.h" #include "dialog.h" Modified: trunk/reactos/base/applications/notepad/notepad.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/notepad.rbuild (original) +++ trunk/reactos/base/applications/notepad/notepad.rbuild Tue Oct 9 12:53:25 2007 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> -<module name="notepad" type="win32gui" installbase="system32" installname="notepad.exe"> +<module name="notepad" type="win32gui" installbase="system32" installname="notepad.exe" unicode="yes"> <include base="notepad">.</include> <define name="__USE_W32API" /> <define name="_WIN32_IE">0x0501</define> Propchange: trunk/reactos/base/applications/notepad/notepad_res.h ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Propchange: trunk/reactos/base/applications/notepad/rsrc.rc ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision Modified: trunk/reactos/base/applications/notepad/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/settings.c (original) +++ trunk/reactos/base/applications/notepad/settings.c Tue Oct 9 12:53:25 2007 @@ -22,9 +22,7 @@ #include <notepad.h> -static const TCHAR s_szRegistryKey[] = { 'S','o','f','t','w','a','r','e', - '\\','M','i','c','r','o','s','o','f','t', - '\\','N','o','t','e','p','a','d',0 }; +static LPCTSTR s_szRegistryKey = _T("Software\\Microsoft\\Notepad"); static LONG HeightFromPointSize(DWORD dwPointSize) @@ -55,49 +53,31 @@ return dwPointSize; } -static BOOL QueryGeneric(HKEY hKey, LPCSTR pszValueName, DWORD dwExpectedType, +static BOOL QueryGeneric(HKEY hKey, LPCTSTR pszValueNameT, DWORD dwExpectedType, LPVOID pvResult, DWORD dwResultSize) { - WCHAR szValueW[32]; - LPCTSTR pszValueNameT; DWORD dwType, cbData; - LPVOID *pTemp; - BOOL bSuccess = FALSE; + LPVOID *pTemp = _alloca(dwResultSize); -#ifdef UNICODE - MultiByteToWideChar(CP_ACP, 0, pszValueName, -1, szValueW, sizeof(szValueW) / sizeof(szValueW[0])); - pszValueNameT = szValueW; -#else - pszValueNameT = pszValueName; -#endif - - pTemp = HeapAlloc(GetProcessHeap(), 0, dwResultSize); - if (!pTemp) - goto done; - memset(pTemp, 0, dwResultSize); + ZeroMemory(pTemp, dwResultSize); cbData = dwResultSize; if (RegQueryValueEx(hKey, pszValueNameT, NULL, &dwType, (LPBYTE) pTemp, &cbData) != ERROR_SUCCESS) - goto done; + return FALSE; if (dwType != dwExpectedType) - goto done; + return FALSE; memcpy(pvResult, pTemp, cbData); - bSuccess = TRUE; - -done: - if (pTemp) - HeapFree(GetProcessHeap(), 0, pTemp); - return bSuccess; + return TRUE; } -static BOOL QueryDword(HKEY hKey, LPCSTR pszValueName, DWORD *pdwResult) +static BOOL QueryDword(HKEY hKey, LPCTSTR pszValueName, DWORD *pdwResult) { return QueryGeneric(hKey, pszValueName, REG_DWORD, pdwResult, sizeof(*pdwResult)); } -static BOOL QueryByte(HKEY hKey, LPCSTR pszValueName, BYTE *pbResult) +static BOOL QueryByte(HKEY hKey, LPCTSTR pszValueName, BYTE *pbResult) { DWORD dwResult; if (!QueryGeneric(hKey, pszValueName, REG_DWORD, &dwResult, sizeof(dwResult))) @@ -108,7 +88,7 @@ return TRUE; } -static BOOL QueryBool(HKEY hKey, LPCSTR pszValueName, BOOL *pbResult) +static BOOL QueryBool(HKEY hKey, LPCTSTR pszValueName, BOOL *pbResult) { DWORD dwResult; if (!QueryDword(hKey, pszValueName, &dwResult)) @@ -117,9 +97,9 @@ return TRUE; } -static BOOL QueryString(HKEY hKey, LPCSTR pszValueName, LPTSTR pszResult, DWORD dwResultSize) +static BOOL QueryString(HKEY hKey, LPCTSTR pszValueName, LPTSTR pszResult, DWORD dwResultSize) { - return QueryGeneric(hKey, pszValueName, REG_SZ, pszResult, dwResultSize * sizeof(*pszResult)); + return QueryGeneric(hKey, pszValueName, REG_SZ, pszResult, dwResultSize * sizeof(TCHAR)); } void LoadSettings(void) @@ -130,20 +110,20 @@ if (RegOpenKey(HKEY_CURRENT_USER, s_szRegistryKey, &hKey) == ERROR_SUCCESS) { - QueryByte(hKey, "lfCharSet", &Globals.lfFont.lfCharSet); - QueryByte(hKey, "lfClipPrecision", &Globals.lfFont.lfClipPrecision); - QueryDword(hKey, "lfEscapement", (DWORD*)&Globals.lfFont.lfEscapement); - QueryString(hKey, "lfFaceName", Globals.lfFont.lfFaceName, sizeof(Globals.lfFont.lfFaceName) / sizeof(Globals.lfFont.lfFaceName[0])); - QueryByte(hKey, "lfItalic", &Globals.lfFont.lfItalic); - QueryDword(hKey, "lfOrientation", (DWORD*)&Globals.lfFont.lfOrientation); - QueryByte(hKey, "lfOutPrecision", &Globals.lfFont.lfOutPrecision); - QueryByte(hKey, "lfPitchAndFamily", &Globals.lfFont.lfPitchAndFamily); - QueryByte(hKey, "lfQuality", &Globals.lfFont.lfQuality); - QueryByte(hKey, "lfStrikeOut", &Globals.lfFont.lfStrikeOut); - QueryByte(hKey, "lfUnderline", &Globals.lfFont.lfUnderline); - QueryDword(hKey, "lfWeight", (DWORD*)&Globals.lfFont.lfWeight); - QueryDword(hKey, "iPointSize", &dwPointSize); - QueryBool(hKey, "fWrap", &Globals.bWrapLongLines); + QueryByte(hKey, _T("lfCharSet"), &Globals.lfFont.lfCharSet); + QueryByte(hKey, _T("lfClipPrecision"), &Globals.lfFont.lfClipPrecision); + QueryDword(hKey, _T("lfEscapement"), (DWORD*)&Globals.lfFont.lfEscapement); + QueryString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName, sizeof(Globals.lfFont.lfFaceName) / sizeof(Globals.lfFont.lfFaceName[0])); + QueryByte(hKey, _T("lfItalic"), &Globals.lfFont.lfItalic); + QueryDword(hKey, _T("lfOrientation"), (DWORD*)&Globals.lfFont.lfOrientation); + QueryByte(hKey, _T("lfOutPrecision"), &Globals.lfFont.lfOutPrecision); + QueryByte(hKey, _T("lfPitchAndFamily"), &Globals.lfFont.lfPitchAndFamily); + QueryByte(hKey, _T("lfQuality"), &Globals.lfFont.lfQuality); + QueryByte(hKey, _T("lfStrikeOut"), &Globals.lfFont.lfStrikeOut); + QueryByte(hKey, _T("lfUnderline"), &Globals.lfFont.lfUnderline); + QueryDword(hKey, _T("lfWeight"), (DWORD*)&Globals.lfFont.lfWeight); + QueryDword(hKey, _T("iPointSize"), &dwPointSize); + QueryBool(hKey, _T("fWrap"), &Globals.bWrapLongLines); if (dwPointSize != 0) Globals.lfFont.lfHeight = HeightFromPointSize(dwPointSize); @@ -160,33 +140,13 @@ } } -static BOOL SaveDword(HKEY hKey, LPCSTR pszValueName, DWORD dwValue) +static BOOL SaveDword(HKEY hKey, LPCTSTR pszValueNameT, DWORD dwValue) { - WCHAR szValueW[32]; - LPCTSTR pszValueNameT; - -#ifdef UNICODE - MultiByteToWideChar(CP_ACP, 0, pszValueName, -1, szValueW, sizeof(szValueW) / sizeof(szValueW[0])); - pszValueNameT = szValueW; -#else - pszValueNameT = pszValueName; -#endif - return RegSetValueEx(hKey, pszValueNameT, 0, REG_DWORD, (LPBYTE) &dwValue, sizeof(dwValue)) == ERROR_SUCCESS; } -static BOOL SaveString(HKEY hKey, LPCSTR pszValueName, LPCTSTR pszValue) +static BOOL SaveString(HKEY hKey, LPCTSTR pszValueNameT, LPCTSTR pszValue) { - WCHAR szValueW[32]; - LPCTSTR pszValueNameT; - -#ifdef UNICODE - MultiByteToWideChar(CP_ACP, 0, pszValueName, -1, szValueW, sizeof(szValueW) / sizeof(szValueW[0])); - pszValueNameT = szValueW; -#else - pszValueNameT = pszValueName; -#endif - return RegSetValueEx(hKey, pszValueNameT, 0, REG_SZ, (LPBYTE) pszValue, (DWORD) _tcslen(pszValue) * sizeof(*pszValue)) == ERROR_SUCCESS; } @@ -198,20 +158,20 @@ if (RegCreateKeyEx(HKEY_CURRENT_USER, s_szRegistryKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition) == ERROR_SUCCESS) { - SaveDword(hKey, "lfCharSet", Globals.lfFont.lfCharSet); - SaveDword(hKey, "lfClipPrecision", Globals.lfFont.lfClipPrecision); - SaveDword(hKey, "lfEscapement", Globals.lfFont.lfEscapement); - SaveString(hKey, "lfFaceName", Globals.lfFont.lfFaceName); - SaveDword(hKey, "lfItalic", Globals.lfFont.lfItalic); - SaveDword(hKey, "lfOrientation", Globals.lfFont.lfOrientation); - SaveDword(hKey, "lfOutPrecision", Globals.lfFont.lfOutPrecision); - SaveDword(hKey, "lfPitchAndFamily", Globals.lfFont.lfPitchAndFamily); - SaveDword(hKey, "lfQuality", Globals.lfFont.lfQuality); - SaveDword(hKey, "lfStrikeOut", Globals.lfFont.lfStrikeOut); - SaveDword(hKey, "lfUnderline", Globals.lfFont.lfUnderline); - SaveDword(hKey, "lfWeight", Globals.lfFont.lfWeight); - SaveDword(hKey, "iPointSize", PointSizeFromHeight(Globals.lfFont.lfHeight)); - SaveDword(hKey, "fWrap", Globals.bWrapLongLines ? 1 : 0); + SaveDword(hKey, _T("lfCharSet"), Globals.lfFont.lfCharSet); + SaveDword(hKey, _T("lfClipPrecision"), Globals.lfFont.lfClipPrecision); + SaveDword(hKey, _T("lfEscapement"), Globals.lfFont.lfEscapement); + SaveString(hKey, _T("lfFaceName"), Globals.lfFont.lfFaceName); + SaveDword(hKey, _T("lfItalic"), Globals.lfFont.lfItalic); + SaveDword(hKey, _T("lfOrientation"), Globals.lfFont.lfOrientation); + SaveDword(hKey, _T("lfOutPrecision"), Globals.lfFont.lfOutPrecision); + SaveDword(hKey, _T("lfPitchAndFamily"), Globals.lfFont.lfPitchAndFamily); + SaveDword(hKey, _T("lfQuality"), Globals.lfFont.lfQuality); + SaveDword(hKey, _T("lfStrikeOut"), Globals.lfFont.lfStrikeOut); + SaveDword(hKey, _T("lfUnderline"), Globals.lfFont.lfUnderline); + SaveDword(hKey, _T("lfWeight"), Globals.lfFont.lfWeight); + SaveDword(hKey, _T("iPointSize"), PointSizeFromHeight(Globals.lfFont.lfHeight)); + SaveDword(hKey, _T("fWrap"), Globals.bWrapLongLines ? 1 : 0); RegCloseKey(hKey); } Propchange: trunk/reactos/base/applications/notepad/settings.c ------------------------------------------------------------------------------ --- svn:keywords (original) +++ svn:keywords (removed) @@ -1,1 +1,0 @@ -author date id revision
17 years, 2 months
1
0
0
0
[hpoussin] 29465: Put .asm files at the end of the module See issue #2702 for more details.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Oct 9 11:10:05 2007 New Revision: 29465 URL:
http://svn.reactos.org/svn/reactos?rev=29465&view=rev
Log: Put .asm files at the end of the module See issue #2702 for more details. Modified: trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/rbuild.h Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Tue Oct 9 11:10:05 2007 @@ -183,6 +183,11 @@ return filename; } +IfableData::IfableData( ) + : asmFiles ( 0 ) +{ +} + void IfableData::ExtractModules( std::vector<Module*> &modules ) { size_t i; @@ -582,11 +587,27 @@ parseContext.ifData->data.compilationUnits.push_back ( pCompilationUnit ); else { - string ext = GetExtension ( e.value ); - if ( !stricmp ( ext.c_str(), ".idl" ) ) - non_if_data.compilationUnits.insert ( non_if_data.compilationUnits.begin(), pCompilationUnit ); + string ext = ToLower ( GetExtension ( e.value ) ); + if ( ext == ".idl" ) + { + // put .idl files at the start of the module + non_if_data.compilationUnits.insert ( + non_if_data.compilationUnits.begin(), + pCompilationUnit ); + } + else if ( ext == ".asm" || ext == ".s" ) + { + // put .asm files at the end of the module + non_if_data.compilationUnits.push_back ( pCompilationUnit ); + non_if_data.asmFiles++; + } else - non_if_data.compilationUnits.push_back ( pCompilationUnit ); + { + // put other files in the middle + non_if_data.compilationUnits.insert ( + non_if_data.compilationUnits.end() - non_if_data.asmFiles, + pCompilationUnit ); + } } } if ( parseContext.ifData ) Modified: trunk/reactos/tools/rbuild/rbuild.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Tue Oct 9 11:10:05 2007 @@ -214,7 +214,9 @@ std::vector<Module*> modules; std::vector<CompilerFlag*> compilerFlags; std::vector<If*> ifs; - + int asmFiles; // number of .asm files in compilationUnits + + IfableData(); ~IfableData(); void ProcessXML(); void ExtractModules( std::vector<Module*> &modules );
17 years, 2 months
1
0
0
0
[janderwald] 29464: - use -nographic option
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 9 02:08:29 2007 New Revision: 29464 URL:
http://svn.reactos.org/svn/reactos?rev=29464&view=rev
Log: - use -nographic option Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 9 02:08:29 2007 @@ -360,7 +360,7 @@ m_PidFile += "/pid.txt"; m_BootCmd += " -pidfile "; m_BootCmd += m_PidFile; - //m_BootCmd += " -nographic"; + m_BootCmd += " -nographic"; #else if (hasQemuNoRebootOption())
17 years, 2 months
1
0
0
0
[janderwald] 29463: - fix linux build for build server trial #2
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 9 01:59:49 2007 New Revision: 29463 URL:
http://svn.reactos.org/svn/reactos?rev=29463&view=rev
Log: - fix linux build for build server trial #2 Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 9 01:59:49 2007 @@ -598,10 +598,13 @@ #ifdef __LINUX__ if (mkfifo(m_Src.c_str(), 400)) { +/* if (errno != EEXIST) { cerr <<"Error: mkfifo failed with " << errno << endl; } +*/ + return false; } #endif
17 years, 2 months
1
0
0
0
[janderwald] 29462: -include errno.h - temporarly deactivate -vnc 0 option
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 9 01:38:14 2007 New Revision: 29462 URL:
http://svn.reactos.org/svn/reactos?rev=29462&view=rev
Log: -include errno.h - temporarly deactivate -vnc 0 option Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 9 01:38:14 2007 @@ -29,6 +29,7 @@ #include <signal.h> #ifndef __LINUX__ #include <io.h> +#include <errno.h> #endif namespace Sysreg_ @@ -359,7 +360,7 @@ m_PidFile += "/pid.txt"; m_BootCmd += " -pidfile "; m_BootCmd += m_PidFile; - m_BootCmd += " -vnc :0"; + //m_BootCmd += " -nographic"; #else if (hasQemuNoRebootOption())
17 years, 2 months
1
0
0
0
[cfinck] 29461: Force the initial state of bugs to be UNCONFIRMED. After this update has been applied to the Web server, the new workflow for our Bugzilla will be UNCONFIRMED --> NEW --> ASSIGNED --> RESOLVED. If you want to try this yourself, please note that "usevotes" needs to be enabled in the Bugzilla Parameters and all products need "Confirmation threshold" set to 1.
by cfinck@svn.reactos.org
Author: cfinck Date: Tue Oct 9 01:26:06 2007 New Revision: 29461 URL:
http://svn.reactos.org/svn/reactos?rev=29461&view=rev
Log: Force the initial state of bugs to be UNCONFIRMED. After this update has been applied to the Web server, the new workflow for our Bugzilla will be UNCONFIRMED --> NEW --> ASSIGNED --> RESOLVED. If you want to try this yourself, please note that "usevotes" needs to be enabled in the Bugzilla Parameters and all products need "Confirmation threshold" set to 1. Modified:
trunk/web/reactos.org/htdocs/bugzilla/enter_bug.cgi
Modified:
trunk/web/reactos.org/htdocs/bugzilla/enter_bug.cgi
URL:
http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/bugzilla/en…
============================================================================== ---
trunk/web/reactos.org/htdocs/bugzilla/enter_bug.cgi
(original) +++
trunk/web/reactos.org/htdocs/bugzilla/enter_bug.cgi
Tue Oct 9 01:26:06 2007 @@ -486,15 +486,7 @@ # to let them mark bugs as ASSIGNED) my @status; -if ($has_editbugs || $has_canconfirm) { - @status = ('NEW', 'ASSIGNED'); -} -elsif (!$product->votes_to_confirm) { - @status = ('NEW'); -} -if ($product->votes_to_confirm) { - push(@status, 'UNCONFIRMED'); -} +@status = ('UNCONFIRMED'); $vars->{'bug_status'} = \@status;
17 years, 2 months
1
0
0
0
[janderwald] 29460: - remove stdio debugging (not efficient and unused) - call mkfifo for randomly created named pipes (linux only) - sysreg hangs in 2nd stage due to the -vnc 0 option
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 9 01:22:57 2007 New Revision: 29460 URL:
http://svn.reactos.org/svn/reactos?rev=29460&view=rev
Log: - remove stdio debugging (not efficient and unused) - call mkfifo for randomly created named pipes (linux only) - sysreg hangs in 2nd stage due to the -vnc 0 option Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 9 01:22:57 2007 @@ -27,7 +27,9 @@ #include <assert.h> #include <math.h> #include <signal.h> +#ifndef __LINUX__ #include <io.h> +#endif namespace Sysreg_ { @@ -291,8 +293,9 @@ } else { + pipe = "pipe:/tmp/qemu"; - m_Src = "/tmp/qemu"; + m_Src = "/tmp/qemu"; } qemudir = "/usr/share/qemu"; @@ -356,7 +359,7 @@ m_PidFile += "/pid.txt"; m_BootCmd += " -pidfile "; m_BootCmd += m_PidFile; - m_BootCmd += " -vnc :0"; + m_BootCmd += " -vnc :0"; #else if (hasQemuNoRebootOption()) @@ -369,46 +372,27 @@ //---------------------------------------------------------------------------------------- bool RosBootTest::extractPipeFromBootCmd() { - string::size_type pos = m_BootCmd.find("-serial"); + string::size_type pos = m_BootCmd.find("-serial pipe:"); if (pos == string::npos) { - /* no debug options provided */ - return false; - } - - string pipe = m_BootCmd.substr(pos + 7, m_BootCmd.size() - pos -7); - pos = pipe.find("pipe:"); - if (pos == 0) - { - pipe = pipe.substr(pos + 5, pipe.size() - pos - 5); - pos = pipe.find(" "); - if (pos != string::npos) - { - pipe = pipe.substr(0, pos); - } + /* no debug options provided */ + cerr << "Error: provided boot cmd does not specify a pipe debugging port" << endl; + return false; + } + + string pipe = m_BootCmd.substr(pos + 13, m_BootCmd.size() - pos - 13); + pos = pipe.find(" "); + if (pos != string::npos) + { + pipe = pipe.substr(0, pos); + } #ifdef __LINUX__ - m_Src = pipe; + m_Src = pipe; #else - m_Src = "\\\\.\\pipe\\" + pipe.substr(0, pos); -#endif - m_DebugPort = "pipe"; - return true; - } - pos = pipe.find("stdio"); - if (pos == 0) - { -#ifdef __LINUX__ - m_Src = m_BootCmd; - m_DebugPort = "stdio"; - return true; -#else - cerr << "Error: reading from stdio is not supported for windows hosts - use pipes" << endl; - return false; -#endif - } - - cerr << "Error: no valid debug port specified - use stdio / pipes" << endl; - return false; + m_Src = "\\\\.\\pipe\\" + pipe.substr(0, pos); +#endif + m_DebugPort = "pipe"; + return true; } //---------------------------------------------------------------------------------------- bool RosBootTest::configureHDDImage() @@ -610,11 +594,23 @@ return false; } } +#ifdef __LINUX__ + if (mkfifo(m_Src.c_str(), 400)) + { + if (errno != EEXIST) + { + cerr <<"Error: mkfifo failed with " << errno << endl; + } + } + +#endif if (m_PidFile.length () && isFileExisting(m_PidFile)) { cerr << "Deleting pid file " << m_PidFile << endl; remove(m_PidFile.c_str ()); } + + cerr << "Opening Data Source:" << m_BootCmd << endl; m_DataSource = new NamedPipeReader();
17 years, 2 months
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
71
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
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200