diff --git a/base/applications/calc/winmain.c b/base/applications/calc/winmain.c index 6279d3d5091..e9a82c8e895 100644 --- a/base/applications/calc/winmain.c +++ b/base/applications/calc/winmain.c @@ -229,12 +229,12 @@ static void load_config(void) /* Try to load last selected layout */ GetProfileString(TEXT("SciCalc"), TEXT("layout"), TEXT("0"), buf, SIZEOF(buf)); - if (_stscanf(buf, TEXT("%ld"), &calc.layout) != 1) + if (_stscanf(buf, TEXT("%lu"), &calc.layout) != 1) calc.layout = CALC_LAYOUT_STANDARD; /* Try to load last selected formatting option */ GetProfileString(TEXT("SciCalc"), TEXT("UseSep"), TEXT("0"), buf, SIZEOF(buf)); - if (_stscanf(buf, TEXT("%ld"), &tmp) != 1) + if (_stscanf(buf, TEXT("%lu"), &tmp) != 1) calc.usesep = FALSE; else calc.usesep = (tmp == 1) ? TRUE : FALSE; diff --git a/base/applications/cmdutils/dbgprint/dbgprint.c b/base/applications/cmdutils/dbgprint/dbgprint.c index 8699db6dfcd..ed3d76cab9e 100644 --- a/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/base/applications/cmdutils/dbgprint/dbgprint.c @@ -1,5 +1,4 @@ -/* $Id: dbgprint.c 24720 2006-11-11 16:07:35Z janderwald $ - * +/* * PROJECT: ReactOS DbgPrint Utility * LICENSE: GPL - See COPYING in the top level directory * FILE: tools/dbgprint/dbgprint.c diff --git a/base/applications/cmdutils/hostname/hostname.c b/base/applications/cmdutils/hostname/hostname.c index 08f754ba943..759015f5d94 100644 --- a/base/applications/cmdutils/hostname/hostname.c +++ b/base/applications/cmdutils/hostname/hostname.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT : See COPYING in the top level directory * PROJECT : ReactOS/Win32 get host name * FILE : subsys/system/hostname/hostname.c @@ -44,7 +43,7 @@ int main (int argc, char ** argv) printf ("%s\n", ComputerName); return EXIT_SUCCESS; } - fprintf (stderr, "%s: Win32 error %ld.\n", + fprintf (stderr, "%s: Win32 error %lu.\n", argv[0], GetLastError()); return EXIT_FAILURE; }else{ diff --git a/base/applications/games/winmine/main.c b/base/applications/games/winmine/main.c index 9aa0dd25ca8..1260c7b4c40 100644 --- a/base/applications/games/winmine/main.c +++ b/base/applications/games/winmine/main.c @@ -108,7 +108,7 @@ static void LoadBoard( BOARD *p_board ) p_board->IsMarkQ = TRUE; for( i = 0; i < 3; i++ ) { - wsprintf( key_name, "Name%d", i+1 ); + wsprintf( key_name, "Name%u", i+1 ); size = sizeof( data ); if( RegQueryValueEx( hkey, key_name, NULL, &type, (LPBYTE) data, &size ) == ERROR_SUCCESS ) @@ -118,7 +118,7 @@ static void LoadBoard( BOARD *p_board ) } for( i = 0; i < 3; i++ ) { - wsprintf( key_name, "Time%d", i+1 ); + wsprintf( key_name, "Time%u", i+1 ); size = sizeof( p_board->best_time[i] ); if( !RegQueryValueEx( hkey, key_name, NULL, &type, (LPBYTE) &p_board->best_time[i], &size ) == ERROR_SUCCESS ) diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index 628eac0c505..f04b5118621 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -695,7 +695,7 @@ QueryEventMessages(LPWSTR lpMachineName, else _snwprintf(szWindowTitle+i, dwMaxLength, L"%s", lpComputerName); - swprintf(szStatusText, L"%s has %d event(s)", lpLogName, dwTotalRecords); + swprintf(szStatusText, L"%s has %lu event(s)", lpLogName, dwTotalRecords); // Update the status bar SendMessageW(hwndStatus, SB_SETTEXT, (WPARAM)0, (LPARAM)szStatusText); diff --git a/base/applications/rapps/rapps/bittorrent.txt b/base/applications/rapps/rapps/bittorrent.txt index 68dd202d1e2..e5dd543cc13 100644 --- a/base/applications/rapps/rapps/bittorrent.txt +++ b/base/applications/rapps/rapps/bittorrent.txt @@ -2,13 +2,13 @@ [Section] Name = BitTorrent -Version = 7.7.2 +Version = 7.8 Licence = Freeware for non-commercial uses Description = The Original BitTorrent Client. -Size = 956KB +Size = 1012KB Category = 5 URLSite = http://www.bittorrent.com/ -URLDownload = http://download.bittorrent.com/7.7.2/BitTorrent.exe +URLDownload = http://download.bittorrent.com/7.8/BitTorrent.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/firefox5.txt b/base/applications/rapps/rapps/firefox5.txt index c7a488f3f59..c8bc4c6d26d 100644 --- a/base/applications/rapps/rapps/firefox5.txt +++ b/base/applications/rapps/rapps/firefox5.txt @@ -1,33 +1,33 @@ ; UTF-8 [Section] -Name = Mozilla Firefox 17 -Version = 17.0.1 +Name = Mozilla Firefox 19 +Version = 19.0.2 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 15.8MB Category = 5 URLSite = http://www.mozilla.com/en-US/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/en-US/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/en-US/Firefox%20Setup%2019.0.2.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Webbrowser. Size = 15.7MB URLSite = http://www.mozilla-europe.org/de/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/de/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/de/Firefox%20Setup%2019.0.2.exe [Section.040a] Description = El más popular y uno de los mejores navegadores web gratuitos que hay. Size = 15.6MB URLSite = http://www.mozilla-europe.org/es/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/es-ES/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/es-ES/Firefox%20Setup%2019.0.2.exe [Section.040c] Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs. Size = 15.9MB URLSite = http://www.mozilla-europe.org/fr/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/fr/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/fr/Firefox%20Setup%2019.0.2.exe [Section.0413] Description = De meest populaire en een van de beste gratis Web browsers. @@ -38,34 +38,34 @@ URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/14.0. Description = Mest populære og best også gratis nettleserene der ute. Size = 15.6MB URLSite = http://www.mozilla-europe.org/no/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/nb-NO/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/nb-NO/Firefox%20Setup%2019.0.2.exe [Section.0415] Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych. Size = 16.5MB URLSite = http://www.mozilla-europe.org/pl/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/pl/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/pl/Firefox%20Setup%2019.0.2.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente. Size = 16,1 Mo URLSite = http://www.mozilla-europe.org/ro/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ro/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/ro/Firefox%20Setup%2019.0.2.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных браузеров. Size = 16.1MB URLSite = http://www.mozilla-europe.org/ru/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/ru/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/ru/Firefox%20Setup%2019.0.2.exe [Section.041b] Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov. Size = 16.3MB URLSite = http://www.mozilla-europe.org/sk/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/sk/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/sk/Firefox%20Setup%2019.0.2.exe [Section.0422] Description = Найпопулярніший та один з кращих безплатних веб-браузерів. Size = 16.1MB URLSite = http://www.mozilla-europe.org/uk/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/17.0.1/win32/uk/Firefox%20Setup%2017.0.1.exe +URLDownload = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/19.0.2/win32/uk/Firefox%20Setup%2019.0.2.exe diff --git a/base/applications/rapps/rapps/kdewin.txt b/base/applications/rapps/rapps/kdewin.txt index 7d9022d1eb4..fca793b6e07 100644 --- a/base/applications/rapps/rapps/kdewin.txt +++ b/base/applications/rapps/rapps/kdewin.txt @@ -2,13 +2,13 @@ [Section] Name = K Desktop Environment -Version = 0.9.9-7 +Version = 0.9.9-8 Licence = GPL Description = KDE for Windows. Size = 2.21MB Category = 15 URLSite = http://www.winkde.org/ -URLDownload = http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-0.9.9-7.exe +URLDownload = http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-0.9.9-8.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/libreoffice.txt b/base/applications/rapps/rapps/libreoffice.txt index 0fa0fd7c77f..1cb734e1a59 100644 --- a/base/applications/rapps/rapps/libreoffice.txt +++ b/base/applications/rapps/rapps/libreoffice.txt @@ -2,13 +2,13 @@ [Section] Name = LibreOffice -Version = 3.6.4 +Version = 4.0.1 Licence = LGPL Description = Former called OpenOffice. Open Source Office Suite. Size = 200.0MB Category = 6 URLSite = http://www.documentfoundation.org/ -URLDownload = http://download.documentfoundation.org/libreoffice/stable/3.6.4/win/x86/LibO_3.6.4_Win_x86_install_multi.msi +URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.0.1/win/x86/LibreOffice_4.0.1_Win_x86.msi CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mirandaim.txt b/base/applications/rapps/rapps/mirandaim.txt index 694fce29978..1c39c74a722 100644 --- a/base/applications/rapps/rapps/mirandaim.txt +++ b/base/applications/rapps/rapps/mirandaim.txt @@ -2,13 +2,13 @@ [Section] Name = Miranda IM -Version = 0.10.9 +Version = 0.10.11 Licence = GPL Description = Open source multiprotocol instant messaging application - May not work completely. Size = 3.1MB Category = 5 URLSite = http://www.miranda-im.org/ -URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.9-unicode.exe +URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.11-unicode.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mirc.txt b/base/applications/rapps/rapps/mirc.txt index 921a25080cd..953303ca36c 100644 --- a/base/applications/rapps/rapps/mirc.txt +++ b/base/applications/rapps/rapps/mirc.txt @@ -2,13 +2,13 @@ [Section] Name = mIRC 7 -Version = 7.27 +Version = 7.29 Licence = Shareware Description = The most popular client for the Internet Relay Chat (IRC). Size = 1.82MB Category = 5 URLSite = http://www.mirc.com/ -URLDownload = http://download.mirc.com/6/mirc727.exe +URLDownload = http://download.mirc.com/7/mirc729.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mono2.txt b/base/applications/rapps/rapps/mono2.txt index 2794b7076fc..74be2a2fa2e 100644 --- a/base/applications/rapps/rapps/mono2.txt +++ b/base/applications/rapps/rapps/mono2.txt @@ -8,7 +8,7 @@ Description = Open Source .net Framework. Size = 91.9MB Category = 14 URLSite = http://www.mono-project.com/Main_Page -URLDownload = http://download.mono-project.com/archive/2.11.4/windows-installer/mono-2.11.4-gtksharp-2.12.11-win32-0.exe +URLDownload = http://download.mono-project.com/archive/2.10.9/windows-installer/0/mono-2.10.9-gtksharp-2.12.11-win32-0.exe CDPath = none [Section.040a] diff --git a/base/applications/rapps/rapps/opera.txt b/base/applications/rapps/rapps/opera.txt index 96060dc1764..c0eaaab8eb8 100644 --- a/base/applications/rapps/rapps/opera.txt +++ b/base/applications/rapps/rapps/opera.txt @@ -2,13 +2,13 @@ [Section] Name = Opera -Version = 12.12 +Version = 12.14 Licence = Freeware Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client. Size = 12.00MB Category = 5 URLSite = http://www.opera.com/ -URLDownload = http://ftp.opera.com/pub/opera/win/1212/int/Opera_1212_int_Setup.exe +URLDownload = http://ftp.opera.com/pub/opera/win/1214/int/Opera_1214_int_Setup.exe CDPath = none [Section.0405] diff --git a/base/applications/rapps/rapps/scite.txt b/base/applications/rapps/rapps/scite.txt index 6a5ed5d79e8..3d42b09514f 100644 --- a/base/applications/rapps/rapps/scite.txt +++ b/base/applications/rapps/rapps/scite.txt @@ -2,13 +2,13 @@ [Section] Name = SciTE -Version = 3.2.3 +Version = 3.2.5 Licence = Freeware Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. Size = 685kB Category = 7 URLSite = http://www.scintilla.org/ -URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.3/Sc323.exe +URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.2.5/Sc325.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/seamonkey.txt b/base/applications/rapps/rapps/seamonkey.txt index b04482c4bdc..fe171f7e003 100644 --- a/base/applications/rapps/rapps/seamonkey.txt +++ b/base/applications/rapps/rapps/seamonkey.txt @@ -2,39 +2,39 @@ [Section] Name = Mozilla SeaMonkey -Version = 2.14.1 +Version = 2.16.2 Licence = MPL/GPL/LGPL Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need. Size = 20.0MB Category = 5 URLSite = http://www.seamonkey-project.org/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/en-US/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/en-US/SeaMonkey%20Setup%202.16.2.exe CDPath = none [Section.0407] Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen. Size = 20.0MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/de/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/de/SeaMonkey%20Setup%202.16.2.exe [Section.040a] Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás. Size = 19.9MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/es-ES/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/es-ES/SeaMonkey%20Setup%202.16.2.exe [Section.040c] Description = La suite Mozilla est en vie. Ceci est le seul et l'unique package navigateur, client mail, client chat et composer dont vous aurez besoin. Size = 20.2MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/fr/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/fr/SeaMonkey%20Setup%202.16.2.exe [Section.0413] Description = Mozilla Suite bundelt alle applicaties voor het Web: Browser, Mail, Chat, Composer. Size = 20.6MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/nl/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/nl/SeaMonkey%20Setup%202.16.2.exe [Section.0415] Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz. Size = 20.8MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/pl/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/pl/SeaMonkey%20Setup%202.16.2.exe [Section.0418] Description = Suita Mozilla. Acest pachet ce încorporează navigator, poștă electronică, client IRC și editor HTML, acoperind astfel o arie largă de necesități. @@ -43,9 +43,9 @@ Size = 20.59Mo [Section.0419] Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор. Size = 20.5MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/ru/SeaMonkey%20Setup%202.16.2.exe [Section.0422] Description = Продовження Mozilla Suite. Включає в себе браузер, поштовий клієнт, IRC-клієнт та HTML-редактор. Size = 20.5MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.14.1/win32/ru/SeaMonkey%20Setup%202.14.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.16.2/win32/ru/SeaMonkey%20Setup%202.16.2.exe diff --git a/base/applications/rapps/rapps/sumatrapdf.txt b/base/applications/rapps/rapps/sumatrapdf.txt index d1c1465a9a9..9ee530c4a17 100644 --- a/base/applications/rapps/rapps/sumatrapdf.txt +++ b/base/applications/rapps/rapps/sumatrapdf.txt @@ -2,13 +2,13 @@ [Section] Name = SumatraPDF -Version = 2.2 +Version = 2.2.1 Licence = GPLv3 Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box. Size = 4.8MB Category = 6 URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html -URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.2-install.exe +URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.2.1-install.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/thunderbird5.txt b/base/applications/rapps/rapps/thunderbird5.txt index 0a8255f8eb5..e70d751cee0 100644 --- a/base/applications/rapps/rapps/thunderbird5.txt +++ b/base/applications/rapps/rapps/thunderbird5.txt @@ -2,32 +2,32 @@ [Section] Name = Mozilla Thunderbird 17 -Version = 17.0 +Version = 17.0.4 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Mail Clients out there. Size = 17.6MB Category = 5 URLSite = http://www.mozilla-europe.org/en/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/en-US/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/en-US/Thunderbird%20Setup%2017.0.4.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Mail-Clients. Size = 17.5MB URLSite = http://www.mozilla-europe.org/de/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/de/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/de/Thunderbird%20Setup%2017.0.4.exe [Section.040a] Description = El más popular y uno de los mejores clientes mail que hay. Size = 17.4MB URLSite = http://www.mozilla-europe.org/es/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/es-ES/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/es-ES/Thunderbird%20Setup%2017.0.4.exe [Section.040c] Description = Le plus populaire et l'un des meilleurs clients mail gratuits disponible. Size = 17.8MB URLSite = http://www.mozilla-europe.org/fr/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/fr/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/fr/Thunderbird%20Setup%2017.0.4.exe [Section.0413] Description = De meest populaire en een van de beste gratis e-mail-programma's. @@ -39,22 +39,22 @@ URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/1 Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty. Size = 18.3MB URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/pl/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/pl/Thunderbird%20Setup%2017.0.4.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică. Size = 18,0 Mo URLSite = http://www.mozilla-europe.org/ro/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/ro/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/ro/Thunderbird%20Setup%2017.0.4.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных почтовых клиентов. Size = 17.9MB URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/ru/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/ru/Thunderbird%20Setup%2017.0.4.exe [Section.0422] Description = Найпопулярніший та один з кращих поштових клієнтів. Size = 17.9MB URLSite = http://www.mozillamessaging.com/uk/thunderbird/ -URLDownload = http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0/win32/uk/Thunderbird%20Setup%2017.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.4/win32/uk/Thunderbird%20Setup%2017.0.4.exe diff --git a/base/applications/rapps/rapps/utorrent.txt b/base/applications/rapps/rapps/utorrent.txt index 36f0225c13f..434673c5891 100644 --- a/base/applications/rapps/rapps/utorrent.txt +++ b/base/applications/rapps/rapps/utorrent.txt @@ -2,13 +2,13 @@ [Section] Name = µTorrent -Version = 3.2.3 +Version = 3.3 Licence = Freeware for non-commercial uses Description = Small and fast BitTorrent Client. Size = 946.00kB Category = 5 URLSite = http://www.utorrent.com/ -URLDownload = http://download.utorrent.com/3.2.3/uTorrent.exe +URLDownload = http://download.utorrent.com/3.3/uTorrent.exe CDPath = none diff --git a/base/applications/sc/print.c b/base/applications/sc/print.c index ea2c84d5338..276ac7594f2 100644 --- a/base/applications/sc/print.c +++ b/base/applications/sc/print.c @@ -81,10 +81,10 @@ PrintService(LPCTSTR lpServiceName, _tprintf(_T(")\n")); - _tprintf(_T("\tWIN32_EXIT_CODE : %d (0x%x)\n"), + _tprintf(_T("\tWIN32_EXIT_CODE : %u (0x%x)\n"), (unsigned int)pStatus->dwWin32ExitCode, (unsigned int)pStatus->dwWin32ExitCode); - _tprintf(_T("\tSERVICE_EXIT_CODE : %d (0x%x)\n"), + _tprintf(_T("\tSERVICE_EXIT_CODE : %u (0x%x)\n"), (unsigned int)pStatus->dwServiceSpecificExitCode, (unsigned int)pStatus->dwServiceSpecificExitCode); _tprintf(_T("\tCHECKPOINT : 0x%x\n"), diff --git a/base/applications/setup16/main.c b/base/applications/setup16/main.c index 639cd98518e..a3b2ae40f04 100644 --- a/base/applications/setup16/main.c +++ b/base/applications/setup16/main.c @@ -143,7 +143,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, else { WCHAR szMsg[MAX_PATH]; - wsprintf(szMsg, L"Failed to load the installer. Error %d", GetLastError()); + wsprintf(szMsg, L"Failed to load the installer. Error %lu", GetLastError()); MessageBoxW(0, szMsg, L"Error", MB_OK | MB_ICONERROR); DeleteDirectory(szTempPath); return 1; diff --git a/base/applications/shutdown/misc.c b/base/applications/shutdown/misc.c index b26ff706e37..a245bfa37af 100644 --- a/base/applications/shutdown/misc.c +++ b/base/applications/shutdown/misc.c @@ -179,7 +179,7 @@ VOID DisplayError(DWORD dwError) /* Prints out the error message to the user */ fprintf(stderr, resMsg); - fwprintf(stderr, L"Error code: %d\n", dwError); + fwprintf(stderr, L"Error code: %lu\n", dwError); LocalFree(lpMsgBuf); LocalFree(resMsg); diff --git a/base/applications/sndvol32/misc.c b/base/applications/sndvol32/misc.c index 596cd2fafdc..17e3eb265bb 100644 --- a/base/applications/sndvol32/misc.c +++ b/base/applications/sndvol32/misc.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Sound Volume Control * FILE: subsys/system/sndvol32/misc.c diff --git a/base/applications/sndvol32/mixer.c b/base/applications/sndvol32/mixer.c index bafee13dd73..3445184f5eb 100644 --- a/base/applications/sndvol32/mixer.c +++ b/base/applications/sndvol32/mixer.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Sound Volume Control * FILE: subsys/system/sndvol32/mixer.c diff --git a/base/applications/sndvol32/sndvol32.c b/base/applications/sndvol32/sndvol32.c index a31f7d04ba6..a09718fe839 100644 --- a/base/applications/sndvol32/sndvol32.c +++ b/base/applications/sndvol32/sndvol32.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Sound Volume Control * FILE: subsys/system/sndvol32/sndvol32.c diff --git a/base/applications/taskmgr/procpage.c b/base/applications/taskmgr/procpage.c index 99e9af1068b..33ceb8c6e4c 100644 --- a/base/applications/taskmgr/procpage.c +++ b/base/applications/taskmgr/procpage.c @@ -536,13 +536,13 @@ BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCoun if (ColumnDataHints[ColumnIndex] == COLUMN_IMAGENAME) PerfDataGetImageName(Index, lpText, nMaxCount); if (ColumnDataHints[ColumnIndex] == COLUMN_PID) - wsprintfW(lpText, L"%d", PerfDataGetProcessId(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME) PerfDataGetUserName(Index, lpText, nMaxCount); if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID) - wsprintfW(lpText, L"%d", PerfDataGetSessionId(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE) - wsprintfW(lpText, L"%02d", PerfDataGetCPUUsage(Index)); + wsprintfW(lpText, L"%02lu", PerfDataGetCPUUsage(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_CPUTIME) { DWORD dwHours; @@ -551,74 +551,74 @@ BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCoun time = PerfDataGetCPUTime(Index); gethmsfromlargeint(time, &dwHours, &dwMinutes, &dwSeconds); - wsprintfW(lpText, L"%d:%02d:%02d", dwHours, dwMinutes, dwSeconds); + wsprintfW(lpText, L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds); } if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGE) { - wsprintfW(lpText, L"%d", PerfDataGetWorkingSetSizeBytes(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeBytes(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_PEAKMEMORYUSAGE) { - wsprintfW(lpText, L"%d", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_MEMORYUSAGEDELTA) { - wsprintfW(lpText, L"%d", PerfDataGetWorkingSetSizeDelta(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeDelta(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTS) { - wsprintfW(lpText, L"%d", PerfDataGetPageFaultCount(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCount(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEFAULTSDELTA) { - wsprintfW(lpText, L"%d", PerfDataGetPageFaultCountDelta(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCountDelta(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_VIRTUALMEMORYSIZE) { - wsprintfW(lpText, L"%d", PerfDataGetVirtualMemorySizeBytes(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetVirtualMemorySizeBytes(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_PAGEDPOOL) { - wsprintfW(lpText, L"%d", PerfDataGetPagedPoolUsagePages(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetPagedPoolUsagePages(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_NONPAGEDPOOL) { - wsprintfW(lpText, L"%d", PerfDataGetNonPagedPoolUsagePages(Index) / 1024); + wsprintfW(lpText, L"%lu", PerfDataGetNonPagedPoolUsagePages(Index) / 1024); CommaSeparateNumberString(lpText, nMaxCount); wcscat(lpText, L" K"); } if (ColumnDataHints[ColumnIndex] == COLUMN_BASEPRIORITY) - wsprintfW(lpText, L"%d", PerfDataGetBasePriority(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetBasePriority(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_HANDLECOUNT) { - wsprintfW(lpText, L"%d", PerfDataGetHandleCount(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetHandleCount(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_THREADCOUNT) { - wsprintfW(lpText, L"%d", PerfDataGetThreadCount(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetThreadCount(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_USEROBJECTS) { - wsprintfW(lpText, L"%d", PerfDataGetUSERObjectCount(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetUSERObjectCount(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_GDIOBJECTS) { - wsprintfW(lpText, L"%d", PerfDataGetGDIObjectCount(Index)); + wsprintfW(lpText, L"%lu", PerfDataGetGDIObjectCount(Index)); CommaSeparateNumberString(lpText, nMaxCount); } if (ColumnDataHints[ColumnIndex] == COLUMN_IOREADS) diff --git a/base/services/audiosrv/main.c b/base/services/audiosrv/main.c index 13c4a640312..b9324b015d1 100644 --- a/base/services/audiosrv/main.c +++ b/base/services/audiosrv/main.c @@ -149,7 +149,7 @@ ServiceMain(DWORD argc, LPWSTR argv) return; } - logmsg("* Service started"); + logmsg("* Service started\n"); /* Tell SCM we are now running, and we may be stopped */ service_status.dwCurrentState = SERVICE_RUNNING; service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP; diff --git a/base/services/eventlog/eventlog.c b/base/services/eventlog/eventlog.c index 288dcf65286..881594d5e76 100644 --- a/base/services/eventlog/eventlog.c +++ b/base/services/eventlog/eventlog.c @@ -101,7 +101,7 @@ ServiceControlHandler(DWORD dwControl, return ERROR_SUCCESS; default : - DPRINT1(" Control %lu received\n"); + DPRINT1(" Control %lu received\n", dwControl); return ERROR_CALL_NOT_IMPLEMENTED; } } @@ -293,7 +293,7 @@ PLOGFILE LoadLogFile(HKEY hKey, WCHAR * LogName) &ValueLen); if (Result != ERROR_SUCCESS) { - DPRINT1("RegQueryValueEx failed: %d\n", GetLastError()); + DPRINT1("RegQueryValueEx failed: %lu\n", GetLastError()); HeapFree(MyHeap, 0, Buf); return NULL; } @@ -491,17 +491,17 @@ VOID SystemTimeToEventTime(SYSTEMTIME * pSystemTime, DWORD * pEventTime) VOID PRINT_HEADER(PEVENTLOGHEADER header) { - DPRINT("HeaderSize = %d\n", header->HeaderSize); + DPRINT("HeaderSize = %lu\n", header->HeaderSize); DPRINT("Signature = 0x%x\n", header->Signature); - DPRINT("MajorVersion = %d\n", header->MajorVersion); - DPRINT("MinorVersion = %d\n", header->MinorVersion); - DPRINT("StartOffset = %d\n", header->StartOffset); + DPRINT("MajorVersion = %lu\n", header->MajorVersion); + DPRINT("MinorVersion = %lu\n", header->MinorVersion); + DPRINT("StartOffset = %lu\n", header->StartOffset); DPRINT("EndOffset = 0x%x\n", header->EndOffset); - DPRINT("CurrentRecordNumber = %d\n", header->CurrentRecordNumber); - DPRINT("OldestRecordNumber = %d\n", header->OldestRecordNumber); + DPRINT("CurrentRecordNumber = %lu\n", header->CurrentRecordNumber); + DPRINT("OldestRecordNumber = %lu\n", header->OldestRecordNumber); DPRINT("MaxSize = 0x%x\n", header->MaxSize); DPRINT("Retention = 0x%x\n", header->Retention); - DPRINT("EndHeaderSize = %d\n", header->EndHeaderSize); + DPRINT("EndHeaderSize = %lu\n", header->EndHeaderSize); DPRINT("Flags: "); if (header->Flags & ELF_LOGFILE_HEADER_DIRTY) DPRINT("ELF_LOGFILE_HEADER_DIRTY"); if (header->Flags & ELF_LOGFILE_HEADER_WRAP) DPRINT("| ELF_LOGFILE_HEADER_WRAP "); @@ -516,21 +516,21 @@ VOID PRINT_RECORD(PEVENTLOGRECORD pRec) WCHAR *str; SYSTEMTIME time; - DPRINT("Length = %d\n", pRec->Length); + DPRINT("Length = %lu\n", pRec->Length); DPRINT("Reserved = 0x%x\n", pRec->Reserved); - DPRINT("RecordNumber = %d\n", pRec->RecordNumber); + DPRINT("RecordNumber = %lu\n", pRec->RecordNumber); EventTimeToSystemTime(pRec->TimeGenerated, &time); - DPRINT("TimeGenerated = %d.%d.%d %d:%d:%d\n", + DPRINT("TimeGenerated = %hu.%hu.%hu %hu:%hu:%hu\n", time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute, time.wSecond); EventTimeToSystemTime(pRec->TimeWritten, &time); - DPRINT("TimeWritten = %d.%d.%d %d:%d:%d\n", + DPRINT("TimeWritten = %hu.%hu.%hu %hu:%hu:%hu\n", time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute, time.wSecond); - DPRINT("EventID = %d\n", pRec->EventID); + DPRINT("EventID = %lu\n", pRec->EventID); switch (pRec->EventType) { @@ -550,18 +550,18 @@ VOID PRINT_RECORD(PEVENTLOGRECORD pRec) DPRINT("EventType = EVENTLOG_AUDIT_FAILURE\n"); break; default: - DPRINT("EventType = %d\n", pRec->EventType); + DPRINT("EventType = %hu\n", pRec->EventType); } - DPRINT("NumStrings = %d\n", pRec->NumStrings); - DPRINT("EventCategory = %d\n", pRec->EventCategory); + DPRINT("NumStrings = %hu\n", pRec->NumStrings); + DPRINT("EventCategory = %hu\n", pRec->EventCategory); DPRINT("ReservedFlags = 0x%x\n", pRec->ReservedFlags); - DPRINT("ClosingRecordNumber = %d\n", pRec->ClosingRecordNumber); - DPRINT("StringOffset = %d\n", pRec->StringOffset); - DPRINT("UserSidLength = %d\n", pRec->UserSidLength); - DPRINT("UserSidOffset = %d\n", pRec->UserSidOffset); - DPRINT("DataLength = %d\n", pRec->DataLength); - DPRINT("DataOffset = %d\n", pRec->DataOffset); + DPRINT("ClosingRecordNumber = %lu\n", pRec->ClosingRecordNumber); + DPRINT("StringOffset = %lu\n", pRec->StringOffset); + DPRINT("UserSidLength = %lu\n", pRec->UserSidLength); + DPRINT("UserSidOffset = %lu\n", pRec->UserSidOffset); + DPRINT("DataLength = %lu\n", pRec->DataLength); + DPRINT("DataOffset = %lu\n", pRec->DataOffset); DPRINT("SourceName: %S\n", (WCHAR *) (((PBYTE) pRec) + sizeof(EVENTLOGRECORD))); @@ -576,10 +576,10 @@ VOID PRINT_RECORD(PEVENTLOGRECORD pRec) str = (WCHAR *) (((PBYTE) pRec) + pRec->StringOffset); for (i = 0; i < pRec->NumStrings; i++) { - DPRINT("[%d] %S\n", i, str); + DPRINT("[%u] %S\n", i, str); str = str + lstrlenW(str) + 1; } } - DPRINT("Length2 = %d\n", *(PDWORD) (((PBYTE) pRec) + pRec->Length - 4)); + DPRINT("Length2 = %lu\n", *(PDWORD) (((PBYTE) pRec) + pRec->Length - 4)); } diff --git a/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c index 1fbfc4d911e..416c2f304d4 100644 --- a/base/setup/reactos/reactos.c +++ b/base/setup/reactos/reactos.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS GUI first stage setup application * FILE: base/setup/reactos/reactos.c diff --git a/base/setup/usetup/bootsup.h b/base/setup/usetup/bootsup.h index 75c772a2140..33b983a0228 100644 --- a/base/setup/usetup/bootsup.h +++ b/base/setup/usetup/bootsup.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/bootsup.h diff --git a/base/setup/usetup/drivesup.c b/base/setup/usetup/drivesup.c index 526305dfbad..a910e9302ef 100644 --- a/base/setup/usetup/drivesup.c +++ b/base/setup/usetup/drivesup.c @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/drivesup.c diff --git a/base/setup/usetup/drivesup.h b/base/setup/usetup/drivesup.h index 287b5a54e60..37c918cf964 100644 --- a/base/setup/usetup/drivesup.h +++ b/base/setup/usetup/drivesup.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/drivesup.h diff --git a/base/setup/usetup/errorcode.h b/base/setup/usetup/errorcode.h index 79461a7e39c..8bb5a43d308 100644 --- a/base/setup/usetup/errorcode.h +++ b/base/setup/usetup/errorcode.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id: registry.h 21704 2006-04-22 13:55:01Z tretiakov $ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/errcode.h diff --git a/base/setup/usetup/filequeue.h b/base/setup/usetup/filequeue.h index 28829a45fea..7dc8587d548 100644 --- a/base/setup/usetup/filequeue.h +++ b/base/setup/usetup/filequeue.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/filequeue.h diff --git a/base/setup/usetup/filesup.h b/base/setup/usetup/filesup.h index b7aecd8e622..a1d45cb9417 100644 --- a/base/setup/usetup/filesup.h +++ b/base/setup/usetup/filesup.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/filesup.h diff --git a/base/setup/usetup/format.h b/base/setup/usetup/format.h index d2784c16e61..3c7706b2ca2 100644 --- a/base/setup/usetup/format.h +++ b/base/setup/usetup/format.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/format.h diff --git a/base/setup/usetup/genlist.h b/base/setup/usetup/genlist.h index fd5682c9819..2d4cc74fbe2 100644 --- a/base/setup/usetup/genlist.h +++ b/base/setup/usetup/genlist.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/genlist.h diff --git a/base/setup/usetup/inicache.c b/base/setup/usetup/inicache.c index 3010aa64b39..bcff69e1def 100644 --- a/base/setup/usetup/inicache.c +++ b/base/setup/usetup/inicache.c @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/inicache.c diff --git a/base/setup/usetup/progress.h b/base/setup/usetup/progress.h index 630967d24d1..948501c3d62 100644 --- a/base/setup/usetup/progress.h +++ b/base/setup/usetup/progress.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/partlist.h diff --git a/base/setup/usetup/registry.h b/base/setup/usetup/registry.h index 63d2b67ef8b..0d62ac9c25b 100644 --- a/base/setup/usetup/registry.h +++ b/base/setup/usetup/registry.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/registry.h diff --git a/base/setup/usetup/settings.h b/base/setup/usetup/settings.h index 65b59ef8aee..fb8cd3cdd1e 100644 --- a/base/setup/usetup/settings.h +++ b/base/setup/usetup/settings.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS text-mode setup * FILE: subsys/system/usetup/settings.h diff --git a/base/setup/welcome/lang/ru-RU.rc b/base/setup/welcome/lang/ru-RU.rc index 39ec334eaa1..c40e3f18377 100644 --- a/base/setup/welcome/lang/ru-RU.rc +++ b/base/setup/welcome/lang/ru-RU.rc @@ -1,4 +1,3 @@ -/* $Id: En.rc 21257 2006-03-08 23:07:09Z audit $ */ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT diff --git a/base/setup/welcome/welcome.c b/base/setup/welcome/welcome.c index 57da7b6cdba..93335f1d6b8 100644 --- a/base/setup/welcome/welcome.c +++ b/base/setup/welcome/welcome.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS welcome/autorun application * FILE: subsys/system/welcome/welcome.c diff --git a/base/shell/cmd/window.c b/base/shell/cmd/window.c index 504fc0ace9c..42771d572c3 100644 --- a/base/shell/cmd/window.c +++ b/base/shell/cmd/window.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * WINDOW.C - activate & window internal commands. * * clone from 4nt activate command diff --git a/base/system/services/driver.c b/base/system/services/driver.c index 8526b663211..a22ed98820c 100644 --- a/base/system/services/driver.c +++ b/base/system/services/driver.c @@ -141,13 +141,11 @@ ScmGetDriverStatus(PSERVICE lpService, if (lpService->Status.dwServiceType == SERVICE_KERNEL_DRIVER) { - RtlInitUnicodeString(&DirName, - L"\\Driver"); + RtlInitUnicodeString(&DirName, L"\\Driver"); } - else + else // if (lpService->Status.dwServiceType == SERVICE_FILE_SYSTEM_DRIVER) { - RtlInitUnicodeString(&DirName, - L"\\FileSystem"); + RtlInitUnicodeString(&DirName, L"\\FileSystem"); } InitializeObjectAttributes(&ObjectAttributes, diff --git a/base/system/services/lock.c b/base/system/services/lock.c index 1f27d80dc8f..6993e3dcb72 100644 --- a/base/system/services/lock.c +++ b/base/system/services/lock.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS Service Control Manager * LICENSE: GPL - See COPYING in the top level directory * FILE: base/system/services/lock.c - * PURPOSE: Service lock functions + * PURPOSE: User-side Services Start Serialization Lock functions * COPYRIGHT: Copyright 2012 Herms Blusca */ @@ -16,6 +16,7 @@ /* GLOBALS *******************************************************************/ +/* The unique user service start lock of the SCM */ static PSTART_LOCK pServiceStartLock = NULL; diff --git a/base/system/winlogon/setup.h b/base/system/winlogon/setup.h index d16dbf3b134..6f980e0e221 100644 --- a/base/system/winlogon/setup.h +++ b/base/system/winlogon/setup.h @@ -16,7 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS winlogon * FILE: subsys/system/winlogon/setup.h diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index 80fb969952b..d8a76a7718c 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -1059,14 +1059,12 @@ HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FATX",0x00000000,"ufatx.dll" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ConsoleShell",0x00020000,"%SystemRoot%\system32\cmd.exe" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe" -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartServices",0x00010001,0x00000001 -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartLsass",0x00010001,0x00000001 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,"1" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,"Administrator" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,"Secret" -;Time Zone Servers +; Time Zone Servers HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","1",0x00000000,"pool.ntp.org" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","2",0x00000000,"asia.pool.ntp.org" HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","3",0x00000000,"europe.pool.ntp.org" diff --git a/boot/freeldr/freeldr/inifile/parse.c b/boot/freeldr/freeldr/inifile/parse.c index 8af3080f57f..ce9dbdfeb5a 100644 --- a/boot/freeldr/freeldr/inifile/parse.c +++ b/boot/freeldr/freeldr/inifile/parse.c @@ -122,7 +122,7 @@ BOOLEAN IniParseFile(PCHAR IniFileData, ULONG IniFileSize) // First check to make sure we're inside a [section] if (CurrentSection == NULL) { - printf("Error: freeldr.ini:%ld: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine); + printf("Error: freeldr.ini:%lu: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine); printf("Press any key to continue...\n"); MachConsGetCh(); CurrentLineNumber++; diff --git a/dll/cpl/access/access.c b/dll/cpl/access/access.c index 5b33e1436ae..76be27d6a36 100644 --- a/dll/cpl/access/access.c +++ b/dll/cpl/access/access.c @@ -1,5 +1,4 @@ -/* $Id: access.c 29112 2007-09-19 21:31:49Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/access.c diff --git a/dll/cpl/access/display.c b/dll/cpl/access/display.c index cf09292b118..3154da12983 100644 --- a/dll/cpl/access/display.c +++ b/dll/cpl/access/display.c @@ -1,5 +1,4 @@ -/* $Id: display.c 29112 2007-09-19 21:31:49Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/display.c diff --git a/dll/cpl/access/general.c b/dll/cpl/access/general.c index 7fb7cf93770..421348aa726 100644 --- a/dll/cpl/access/general.c +++ b/dll/cpl/access/general.c @@ -1,5 +1,4 @@ -/* $Id: general.c 29112 2007-09-19 21:31:49Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/general.c diff --git a/dll/cpl/access/keyboard.c b/dll/cpl/access/keyboard.c index 1b2f3081eeb..c63711ecba1 100644 --- a/dll/cpl/access/keyboard.c +++ b/dll/cpl/access/keyboard.c @@ -1,5 +1,4 @@ -/* $Id: keyboard.c 29170 2007-09-23 22:59:00Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/keyboard.c diff --git a/dll/cpl/access/mouse.c b/dll/cpl/access/mouse.c index 0fe19e5b6a1..6473718a724 100644 --- a/dll/cpl/access/mouse.c +++ b/dll/cpl/access/mouse.c @@ -1,5 +1,4 @@ -/* $Id: mouse.c 29112 2007-09-19 21:31:49Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/mouse.c diff --git a/dll/cpl/access/sound.c b/dll/cpl/access/sound.c index 9190189ece4..dea63e27054 100644 --- a/dll/cpl/access/sound.c +++ b/dll/cpl/access/sound.c @@ -1,5 +1,4 @@ -/* $Id: sound.c 29112 2007-09-19 21:31:49Z ekohl $ - * +/* * PROJECT: ReactOS Accessibility Control Panel * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/sound.c diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c index 58192618509..2c902011326 100644 --- a/dll/cpl/appwiz/createlink.c +++ b/dll/cpl/appwiz/createlink.c @@ -1,11 +1,10 @@ -/* $Id: appwiz.c 29364 2007-10-02 23:34:00Z janderwald $ - * - * PROJECT: ReactOS Software Control Panel - * FILE: dll/cpl/appwiz/createlink.c - * PURPOSE: ReactOS Software Control Panel - * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com) - * Dmitry Chapyshev (lentind@yandex.ru) - * Johannes Anderwald +/* + * PROJECT: ReactOS Software Control Panel + * FILE: dll/cpl/appwiz/createlink.c + * PURPOSE: ReactOS Software Control Panel + * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com) + * Dmitry Chapyshev (lentind@yandex.ru) + * Johannes Anderwald * UPDATE HISTORY: * 06-17-2004 Created */ diff --git a/dll/cpl/desk/advappdlg.c b/dll/cpl/desk/advappdlg.c index 837bc0b18c2..6ccefacc444 100644 --- a/dll/cpl/desk/advappdlg.c +++ b/dll/cpl/desk/advappdlg.c @@ -1,5 +1,4 @@ -/* $Id: advappdlg.c 24836 2007-02-12 03:12:56Z tkreuzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: dll/cpl/desk/advappdlg.c diff --git a/dll/cpl/desk/background.c b/dll/cpl/desk/background.c index 12c5efefd4e..982312fa2a7 100644 --- a/dll/cpl/desk/background.c +++ b/dll/cpl/desk/background.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: dll/cpl/desk/background.c diff --git a/dll/cpl/desk/desk.c b/dll/cpl/desk/desk.c index dbab35e6b71..0f3727100e6 100644 --- a/dll/cpl/desk/desk.c +++ b/dll/cpl/desk/desk.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: dll/cpl/desk/desk.c diff --git a/dll/cpl/desk/dibitmap.c b/dll/cpl/desk/dibitmap.c index b14b7155cc3..9486d5afd11 100644 --- a/dll/cpl/desk/dibitmap.c +++ b/dll/cpl/desk/dibitmap.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: dll/cpl/desk/dibitmap.c diff --git a/dll/cpl/intl/currency.c b/dll/cpl/intl/currency.c index 53a1067c903..78423688365 100644 --- a/dll/cpl/intl/currency.c +++ b/dll/cpl/intl/currency.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/currency.c * PURPOSE: Currency property page diff --git a/dll/cpl/intl/date.c b/dll/cpl/intl/date.c index 2473ae828ae..166899a05ed 100644 --- a/dll/cpl/intl/date.c +++ b/dll/cpl/intl/date.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/date.c * PURPOSE: Date property page diff --git a/dll/cpl/intl/generalp.c b/dll/cpl/intl/generalp.c index ee347d2c587..885bd90ef96 100644 --- a/dll/cpl/intl/generalp.c +++ b/dll/cpl/intl/generalp.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/generalp.c * PURPOSE: General property page diff --git a/dll/cpl/intl/inplocale.c b/dll/cpl/intl/inplocale.c index 6451e8a10af..0cd3fd12fcd 100644 --- a/dll/cpl/intl/inplocale.c +++ b/dll/cpl/intl/inplocale.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/inplocale.c * PURPOSE: Input Locale property page diff --git a/dll/cpl/intl/intl.c b/dll/cpl/intl/intl.c index eeed1ac4f06..76758edad3d 100644 --- a/dll/cpl/intl/intl.c +++ b/dll/cpl/intl/intl.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/intl.c * PURPOSE: Property sheet code diff --git a/dll/cpl/intl/numbers.c b/dll/cpl/intl/numbers.c index e2d86583b9e..2daf993082a 100644 --- a/dll/cpl/intl/numbers.c +++ b/dll/cpl/intl/numbers.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/numbers.c * PURPOSE: Numbers property page diff --git a/dll/cpl/intl/sort.c b/dll/cpl/intl/sort.c index dc99a40fe7a..52a6fad2bbb 100644 --- a/dll/cpl/intl/sort.c +++ b/dll/cpl/intl/sort.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS International Control Panel * FILE: dll/cpl/intl/sort.c * PURPOSE: Sorting property page diff --git a/dll/cpl/liccpa/liccpa.c b/dll/cpl/liccpa/liccpa.c index a8d224464e6..860954bcf2c 100644 --- a/dll/cpl/liccpa/liccpa.c +++ b/dll/cpl/liccpa/liccpa.c @@ -1,5 +1,4 @@ -/* $Id: appearance.c 13406 2005-02-04 20:39:10Z weiden $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS License Manager * FILE: dll/cpl/liccpa/liccpa.c diff --git a/dll/cpl/liccpa/liccpa.rc b/dll/cpl/liccpa/liccpa.rc index cd33b4bbc90..6e51ca7098b 100644 --- a/dll/cpl/liccpa/liccpa.rc +++ b/dll/cpl/liccpa/liccpa.rc @@ -1,4 +1,3 @@ -/* $Id: cplsample.rc 12852 2005-01-06 13:58:04Z mf $ */ #include #include "resource.h" diff --git a/dll/cpl/main/keyboard.c b/dll/cpl/main/keyboard.c index 2f098a72d05..165d66824fb 100644 --- a/dll/cpl/main/keyboard.c +++ b/dll/cpl/main/keyboard.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS Main Control Panel * FILE: dll/cpl/main/keyboard.c * PURPOSE: Keyboard Control Panel diff --git a/dll/cpl/main/main.c b/dll/cpl/main/main.c index 1853aa410b5..272aafc52b4 100644 --- a/dll/cpl/main/main.c +++ b/dll/cpl/main/main.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS Sample Control Panel * FILE: dll/cpl/main/main.c * PURPOSE: ReactOS Main Control Panel diff --git a/dll/cpl/main/mouse.c b/dll/cpl/main/mouse.c index 2badb9a5797..8197e496195 100644 --- a/dll/cpl/main/mouse.c +++ b/dll/cpl/main/mouse.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS Main Control Panel * FILE: dll/cpl/main/mouse.c * PURPOSE: Mouse Control Panel diff --git a/dll/cpl/mmsys/sounds.c b/dll/cpl/mmsys/sounds.c index f48d8d272be..868606e4574 100644 --- a/dll/cpl/mmsys/sounds.c +++ b/dll/cpl/mmsys/sounds.c @@ -1,5 +1,4 @@ -/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $ - * +/* * PROJECT: ReactOS Multimedia Control Panel * FILE: dll/cpl/mmsys/mmsys.c * PURPOSE: ReactOS Multimedia Control Panel diff --git a/dll/cpl/mmsys/volume.c b/dll/cpl/mmsys/volume.c index efe050a9739..9d1957a0aa9 100644 --- a/dll/cpl/mmsys/volume.c +++ b/dll/cpl/mmsys/volume.c @@ -1,5 +1,4 @@ -/* $Id: main.c 12852 2005-01-06 13:58:04Z mf $ - * +/* * PROJECT: ReactOS Multimedia Control Panel * FILE: dll/cpl/mmsys/mmsys.c * PURPOSE: ReactOS Multimedia Control Panel diff --git a/dll/cpl/odbccp32/odbccp32.c b/dll/cpl/odbccp32/odbccp32.c index 7b3e787869b..ce77120626b 100644 --- a/dll/cpl/odbccp32/odbccp32.c +++ b/dll/cpl/odbccp32/odbccp32.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS ODBC Control Panel Applet * FILE: dll/cpl/main/main.c * PURPOSE: applet initialization diff --git a/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c index 8fffcfdb04b..f615966cc33 100644 --- a/dll/cpl/powercfg/advanced.c +++ b/dll/cpl/powercfg/advanced.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS Power Configuration Applet * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/powercfg/advanced.c diff --git a/dll/cpl/powercfg/alarms.c b/dll/cpl/powercfg/alarms.c index d58293203d9..71f3a2891e7 100644 --- a/dll/cpl/powercfg/alarms.c +++ b/dll/cpl/powercfg/alarms.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS Power Configuration Applet * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/powercfg/alarms.c diff --git a/dll/cpl/powercfg/hibernate.c b/dll/cpl/powercfg/hibernate.c index 1ea6ea3f273..82f54fac114 100644 --- a/dll/cpl/powercfg/hibernate.c +++ b/dll/cpl/powercfg/hibernate.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS Power Configuration Applet * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/powercfg/hibernate.c diff --git a/dll/cpl/powercfg/powercfg.c b/dll/cpl/powercfg/powercfg.c index dca5e78a67d..9e5b441e3ac 100644 --- a/dll/cpl/powercfg/powercfg.c +++ b/dll/cpl/powercfg/powercfg.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS Power Configuration Applet * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/powercfg/powershemes.c diff --git a/dll/cpl/powercfg/powershemes.c b/dll/cpl/powercfg/powershemes.c index 3acbf91e4e4..7a6b3fd50c3 100644 --- a/dll/cpl/powercfg/powershemes.c +++ b/dll/cpl/powercfg/powershemes.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS Power Configuration Applet * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/powercfg/powershemes.c diff --git a/dll/cpl/usrmgr/extra.c b/dll/cpl/usrmgr/extra.c index c057b1380c3..cf9b7c7280f 100644 --- a/dll/cpl/usrmgr/extra.c +++ b/dll/cpl/usrmgr/extra.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS User Manager Control Panel * FILE: dll/cpl/usrmgr/extra.c diff --git a/dll/cpl/usrmgr/usrmgr.c b/dll/cpl/usrmgr/usrmgr.c index 527af2e5375..2668e18a5c7 100644 --- a/dll/cpl/usrmgr/usrmgr.c +++ b/dll/cpl/usrmgr/usrmgr.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS User Manager Control Panel * FILE: dll/cpl/usrmgr/usrmgr.c diff --git a/dll/directx/d3d8/d3d8.rc b/dll/directx/d3d8/d3d8.rc index 5eec7309984..9030b032e64 100644 --- a/dll/directx/d3d8/d3d8.rc +++ b/dll/directx/d3d8/d3d8.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS Direct3D\0" diff --git a/dll/directx/d3d9/d3d9.rc b/dll/directx/d3d9/d3d9.rc index 4be22448cf2..0f08fb03693 100644 --- a/dll/directx/d3d9/d3d9.rc +++ b/dll/directx/d3d9/d3d9.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS Direct3D\0" diff --git a/dll/directx/ddraw/Clipper/clipper_main.c b/dll/directx/ddraw/Clipper/clipper_main.c index 8b20c9c816f..77f3e949d64 100644 --- a/dll/directx/ddraw/Clipper/clipper_main.c +++ b/dll/directx/ddraw/Clipper/clipper_main.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/clipper/clipper_stubs.c diff --git a/dll/directx/ddraw/Clipper/clipper_stubs.c b/dll/directx/ddraw/Clipper/clipper_stubs.c index 6f0714902f5..cc39ee4ed64 100644 --- a/dll/directx/ddraw/Clipper/clipper_stubs.c +++ b/dll/directx/ddraw/Clipper/clipper_stubs.c @@ -1,5 +1,4 @@ -/* $Id: clipper.c 24690 2006-11-05 21:19:53Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/clipper/clipper_stubs.c diff --git a/dll/directx/ddraw/Color/color_stubs.c b/dll/directx/ddraw/Color/color_stubs.c index c4fd61187d9..776832b80dd 100644 --- a/dll/directx/ddraw/Color/color_stubs.c +++ b/dll/directx/ddraw/Color/color_stubs.c @@ -1,5 +1,4 @@ -/* $Id: color.c 24690 2006-11-05 21:19:53Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/color/color.c diff --git a/dll/directx/ddraw/Ddraw/GetCaps.c b/dll/directx/ddraw/Ddraw/GetCaps.c index 59f002dd990..fa0316609dd 100644 --- a/dll/directx/ddraw/Ddraw/GetCaps.c +++ b/dll/directx/ddraw/Ddraw/GetCaps.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/GetCaps.c diff --git a/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c b/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c index 7903c8d494b..105430a8d41 100644 --- a/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c +++ b/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/GetDeviceIdentifier.c diff --git a/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c b/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c index 57c30e346d8..08bdaf04d68 100644 --- a/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c +++ b/dll/directx/ddraw/Ddraw/callbacks_dd_hel.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/callbacks_dd_hel.c diff --git a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c index 6ef2a38628e..ccd655a2fe7 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_displaymode.c +++ b/dll/directx/ddraw/Ddraw/ddraw_displaymode.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/ddraw_displaymode.c diff --git a/dll/directx/ddraw/Ddraw/ddraw_main.c b/dll/directx/ddraw/Ddraw/ddraw_main.c index fe02d0a0d76..5f3355ed35d 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_main.c +++ b/dll/directx/ddraw/Ddraw/ddraw_main.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/ddraw_main.c diff --git a/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c b/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c index 26fa7f9f36d..21b98e02c58 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c +++ b/dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/ddraw_main.c diff --git a/dll/directx/ddraw/Ddraw/ddraw_stubs.c b/dll/directx/ddraw/Ddraw/ddraw_stubs.c index 4f11676ea86..7b152485c99 100644 --- a/dll/directx/ddraw/Ddraw/ddraw_stubs.c +++ b/dll/directx/ddraw/Ddraw/ddraw_stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/ddraw/ddraw_stubs.c diff --git a/dll/directx/ddraw/Gamma/gamma_stubs.c b/dll/directx/ddraw/Gamma/gamma_stubs.c index 4dd97510f32..5069c7f0afd 100644 --- a/dll/directx/ddraw/Gamma/gamma_stubs.c +++ b/dll/directx/ddraw/Gamma/gamma_stubs.c @@ -1,5 +1,4 @@ -/* $Id: gamma.c 24690 2006-11-05 21:19:53Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/gamma/gamma_stubs.c diff --git a/dll/directx/ddraw/Kernel/kernel_stubs.c b/dll/directx/ddraw/Kernel/kernel_stubs.c index 16e30ff78f5..add4f04879a 100644 --- a/dll/directx/ddraw/Kernel/kernel_stubs.c +++ b/dll/directx/ddraw/Kernel/kernel_stubs.c @@ -1,5 +1,4 @@ -/* $Id: kernel.c 24690 2006-11-05 21:19:53Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/kernel/kernel_stubs.c diff --git a/dll/directx/ddraw/Palette/createpalette.c b/dll/directx/ddraw/Palette/createpalette.c index 87bb0a9f141..1b3929c0d29 100644 --- a/dll/directx/ddraw/Palette/createpalette.c +++ b/dll/directx/ddraw/Palette/createpalette.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/surface/createsurface.c diff --git a/dll/directx/ddraw/Palette/palette.c b/dll/directx/ddraw/Palette/palette.c index c366be9206c..1c5bad67406 100644 --- a/dll/directx/ddraw/Palette/palette.c +++ b/dll/directx/ddraw/Palette/palette.c @@ -1,5 +1,4 @@ -/* $Id: palette.c $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/Palette/palette.c diff --git a/dll/directx/ddraw/Palette/palette_stubs.c b/dll/directx/ddraw/Palette/palette_stubs.c index 07590f46411..a0ab80cbf56 100644 --- a/dll/directx/ddraw/Palette/palette_stubs.c +++ b/dll/directx/ddraw/Palette/palette_stubs.c @@ -1,5 +1,4 @@ -/* $Id: palette.c 24690 2006-11-05 21:19:53Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/palette/palette_stubs.c diff --git a/dll/directx/ddraw/Surface/callbacks_surf_hel.c b/dll/directx/ddraw/Surface/callbacks_surf_hel.c index 5a31199f72b..7d8bda38005 100644 --- a/dll/directx/ddraw/Surface/callbacks_surf_hel.c +++ b/dll/directx/ddraw/Surface/callbacks_surf_hel.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/surface/callbacks_surf_hel.c diff --git a/dll/directx/ddraw/Surface/createsurface.c b/dll/directx/ddraw/Surface/createsurface.c index d6d95579a3d..be030e0172f 100644 --- a/dll/directx/ddraw/Surface/createsurface.c +++ b/dll/directx/ddraw/Surface/createsurface.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/surface/createsurface.c diff --git a/dll/directx/ddraw/Surface/surface_main.c b/dll/directx/ddraw/Surface/surface_main.c index 81abdf8f88d..03bdbaa93e1 100644 --- a/dll/directx/ddraw/Surface/surface_main.c +++ b/dll/directx/ddraw/Surface/surface_main.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/surface/surface_main.c diff --git a/dll/directx/ddraw/Surface/surface_stubs.c b/dll/directx/ddraw/Surface/surface_stubs.c index aac63dde585..ffe2d992b04 100644 --- a/dll/directx/ddraw/Surface/surface_stubs.c +++ b/dll/directx/ddraw/Surface/surface_stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/surface/surface_stubs.c diff --git a/dll/directx/ddraw/Videoport/videoport_stubs.c b/dll/directx/ddraw/Videoport/videoport_stubs.c index f40f03c063e..0fba94ff9cf 100644 --- a/dll/directx/ddraw/Videoport/videoport_stubs.c +++ b/dll/directx/ddraw/Videoport/videoport_stubs.c @@ -1,5 +1,4 @@ -/* $Id: videoport.c 22739 2006-07-01 12:08:35Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS DirectX * FILE: ddraw/videoport/videoport_stubs.c diff --git a/dll/directx/ddraw/cleanup.c b/dll/directx/ddraw/cleanup.c index 5b6d70974e6..2e011d8a497 100644 --- a/dll/directx/ddraw/cleanup.c +++ b/dll/directx/ddraw/cleanup.c @@ -1,5 +1,4 @@ -/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: lib/ddraw/ddraw.c diff --git a/dll/directx/ddraw/ddraw.rc b/dll/directx/ddraw/ddraw.rc index 1434f28fb13..5e773bc8910 100644 --- a/dll/directx/ddraw/ddraw.rc +++ b/dll/directx/ddraw/ddraw.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #include "resource.h" diff --git a/dll/directx/ddraw/main.c b/dll/directx/ddraw/main.c index 152de2a9d76..447eaebb074 100644 --- a/dll/directx/ddraw/main.c +++ b/dll/directx/ddraw/main.c @@ -1,6 +1,4 @@ - -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: lib/ddraw/ddraw.c diff --git a/dll/directx/ddraw/startup.c b/dll/directx/ddraw/startup.c index 6a5c6ba9d33..e838959e443 100644 --- a/dll/directx/ddraw/startup.c +++ b/dll/directx/ddraw/startup.c @@ -1,5 +1,4 @@ -/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: lib/ddraw/ddraw.c diff --git a/dll/shellext/slayer/slayer.c b/dll/shellext/slayer/slayer.c index 68a8a42a48f..ee2260ce320 100644 --- a/dll/shellext/slayer/slayer.c +++ b/dll/shellext/slayer/slayer.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Compatibility Layer Shell Extension * FILE: lib/shellext/cplsample/cplsample.c * PURPOSE: ReactOS Compatibility Layer Shell Extension diff --git a/dll/win32/aclui/aclui.c b/dll/win32/aclui/aclui.c index 1802278ae0e..53c32d38dd8 100644 --- a/dll/win32/aclui/aclui.c +++ b/dll/win32/aclui/aclui.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Access Control List Editor * FILE: lib/aclui/aclui.c * PURPOSE: Access Control List Editor diff --git a/dll/win32/aclui/checklist.c b/dll/win32/aclui/checklist.c index a6d445e17fc..f81e453a42f 100644 --- a/dll/win32/aclui/checklist.c +++ b/dll/win32/aclui/checklist.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Access Control List Editor * FILE: lib/aclui/checklist.c * PURPOSE: Access Control List Editor diff --git a/dll/win32/aclui/misc.c b/dll/win32/aclui/misc.c index 4ca54eb744e..59f7605b851 100644 --- a/dll/win32/aclui/misc.c +++ b/dll/win32/aclui/misc.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Access Control List Editor * FILE: lib/aclui/misc.c * PURPOSE: Access Control List Editor diff --git a/dll/win32/aclui/sidcache.c b/dll/win32/aclui/sidcache.c index 7e5ab9b514d..b396ed1a060 100644 --- a/dll/win32/aclui/sidcache.c +++ b/dll/win32/aclui/sidcache.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: aclui.c 19715 2005-11-28 01:10:49Z weiden $ - * +/* * PROJECT: ReactOS Access Control List Editor * FILE: lib/aclui/sidcache.c * PURPOSE: Access Control List Editor diff --git a/dll/win32/advapi32/misc/dllmain.c b/dll/win32/advapi32/misc/dllmain.c index 042e3bf9da1..97ae6d0176b 100644 --- a/dll/win32/advapi32/misc/dllmain.c +++ b/dll/win32/advapi32/misc/dllmain.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/misc/dllmain.c diff --git a/dll/win32/advapi32/sec/ac.c b/dll/win32/advapi32/sec/ac.c index c1b083f3f0a..65b22c26c17 100644 --- a/dll/win32/advapi32/sec/ac.c +++ b/dll/win32/advapi32/sec/ac.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/sec/ac.c diff --git a/dll/win32/advapi32/sec/audit.c b/dll/win32/advapi32/sec/audit.c index afd5a2c41ef..c3b836cb1c0 100644 --- a/dll/win32/advapi32/sec/audit.c +++ b/dll/win32/advapi32/sec/audit.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/sec/audit.c diff --git a/dll/win32/advapi32/sec/sec.c b/dll/win32/advapi32/sec/sec.c index d41e92f62cb..d62edc39481 100644 --- a/dll/win32/advapi32/sec/sec.c +++ b/dll/win32/advapi32/sec/sec.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/sec/sec.c diff --git a/dll/win32/advapi32/sec/trustee.c b/dll/win32/advapi32/sec/trustee.c index 9a2b533be26..9b62f7954aa 100644 --- a/dll/win32/advapi32/sec/trustee.c +++ b/dll/win32/advapi32/sec/trustee.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/sec/trustee.c diff --git a/dll/win32/advapi32/service/scm.c b/dll/win32/advapi32/service/scm.c index f8cc95a7310..29ecebe13e2 100644 --- a/dll/win32/advapi32/service/scm.c +++ b/dll/win32/advapi32/service/scm.c @@ -1675,7 +1675,7 @@ WaitForSCManager(VOID) /* Try to open the existing event */ hEvent = OpenEventW(SYNCHRONIZE, FALSE, - L"SvcctrlStartEvent_A3752DX"); + SCM_START_EVENT); if (hEvent == NULL) { if (GetLastError() != ERROR_FILE_NOT_FOUND) @@ -1685,13 +1685,13 @@ WaitForSCManager(VOID) hEvent = CreateEventW(NULL, TRUE, FALSE, - L"SvcctrlStartEvent_A3752DX"); + SCM_START_EVENT); if (hEvent == NULL) { /* Try to open the existing event again */ hEvent = OpenEventW(SYNCHRONIZE, FALSE, - L"SvcctrlStartEvent_A3752DX"); + SCM_START_EVENT); if (hEvent == NULL) return; } diff --git a/dll/win32/advapi32/token/privilege.c b/dll/win32/advapi32/token/privilege.c index 61a84bd3859..2b0762a1711 100644 --- a/dll/win32/advapi32/token/privilege.c +++ b/dll/win32/advapi32/token/privilege.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/token/privilege.c diff --git a/dll/win32/comctl32/comctl32undoc.c b/dll/win32/comctl32/comctl32undoc.c index 54d5ca8a643..bdf20f554c8 100644 --- a/dll/win32/comctl32/comctl32undoc.c +++ b/dll/win32/comctl32/comctl32undoc.c @@ -147,8 +147,8 @@ DWORD WINAPI GetSize (LPVOID lpMem) * MRU-Functions {COMCTL32} * * NOTES - * The MRU-Api is a set of functions to manipulate lists of M.R.U. (Most Recently - * Used) items. It is an undocumented Api that is used (at least) by the shell + * The MRU-API is a set of functions to manipulate lists of M.R.U. (Most Recently + * Used) items. It is an undocumented API that is used (at least) by the shell * and explorer to implement their recent documents feature. * * Since these functions are undocumented, they are unsupported by MS and diff --git a/dll/win32/comctl32/datetime.c b/dll/win32/comctl32/datetime.c index ff2edede88f..825b4427d1e 100644 --- a/dll/win32/comctl32/datetime.c +++ b/dll/win32/comctl32/datetime.c @@ -205,16 +205,16 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *sy systime->wHour, systime->wMinute, systime->wSecond); if (flag == GDT_VALID) { - if (systime->wYear == 0 || - systime->wMonth < 1 || systime->wMonth > 12 || - systime->wDay < 1 || - systime->wDay > MONTHCAL_MonthLength(systime->wMonth, systime->wYear) || - systime->wHour > 23 || - systime->wMinute > 59 || - systime->wSecond > 59 || - systime->wMilliseconds > 999 - ) - return FALSE; + if (systime->wYear == 0 || + systime->wMonth < 1 || systime->wMonth > 12 || + systime->wDay < 1 || + systime->wDay > MONTHCAL_MonthLength(systime->wMonth, systime->wYear) || + systime->wHour > 23 || + systime->wMinute > 59 || + systime->wSecond > 59 || + systime->wMilliseconds > 999 + ) + return FALSE; /* Windows returns true if the date is valid but outside the limits set */ if (DATETIME_IsDateInValidRange(infoPtr, systime) == FALSE) diff --git a/dll/win32/comctl32/dpa.c b/dll/win32/comctl32/dpa.c index 9566c610658..eceabca1ef4 100644 --- a/dll/win32/comctl32/dpa.c +++ b/dll/win32/comctl32/dpa.c @@ -459,7 +459,7 @@ BOOL WINAPI DPA_Grow (HDPA hdpa, INT nGrow) /************************************************************************** * DPA_Clone [COMCTL32.331] * - * Copies a pointer array to an other one or creates a copy + * Copies a pointer array to another one or creates a copy * * PARAMS * hdpa [I] handle (pointer) to the existing (source) pointer array diff --git a/dll/win32/comctl32/imagelist.c b/dll/win32/comctl32/imagelist.c index 75825764618..dfce617c3bb 100644 --- a/dll/win32/comctl32/imagelist.c +++ b/dll/win32/comctl32/imagelist.c @@ -118,6 +118,7 @@ typedef struct { HWND hwnd; HIMAGELIST himl; + HIMAGELIST himlNoCursor; /* position of the drag image relative to the window */ INT x; INT y; @@ -130,7 +131,7 @@ typedef struct HBITMAP hbmBg; } INTERNALDRAG; -static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 }; +static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, 0, FALSE, 0 }; static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count); static HRESULT ImageListImpl_CreateInstance(const IUnknown *pUnkOuter, REFIID iid, void** ppv); @@ -611,7 +612,7 @@ ImageList_BeginDrag (HIMAGELIST himlTrack, INT iTrack, cx = himlTrack->cx; cy = himlTrack->cy; - InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1); + InternalDrag.himlNoCursor = InternalDrag.himl = ImageList_Create (cx, cy, himlTrack->flags, 1, 1); if (InternalDrag.himl == NULL) { WARN("Error creating drag image list!\n"); return FALSE; @@ -1639,8 +1640,10 @@ ImageList_EndDrag (void) { /* cleanup the InternalDrag struct */ InternalDrag.hwnd = 0; + if (InternalDrag.himl != InternalDrag.himlNoCursor) + ImageList_Destroy (InternalDrag.himlNoCursor); ImageList_Destroy (InternalDrag.himl); - InternalDrag.himl = 0; + InternalDrag.himlNoCursor = InternalDrag.himl = 0; InternalDrag.x= 0; InternalDrag.y= 0; InternalDrag.dxHotspot = 0; @@ -2083,6 +2086,7 @@ ImageList_Merge (HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, INT cxDst, cyDst; INT xOff1, yOff1, xOff2, yOff2; POINT pt1, pt2; + INT newFlags; TRACE("(himl1=%p i1=%d himl2=%p i2=%d dx=%d dy=%d)\n", himl1, i1, himl2, i2, dx, dy); @@ -2122,7 +2126,10 @@ ImageList_Merge (HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, yOff2 = 0; } - himlDst = ImageList_Create (cxDst, cyDst, ILC_MASK | ILC_COLOR, 1, 1); + newFlags = (himl1->flags > himl2->flags ? himl1->flags : himl2->flags) & ILC_COLORDDB; + if (newFlags == ILC_COLORDDB && (himl1->flags & ILC_COLORDDB) == ILC_COLOR16) + newFlags = ILC_COLOR16; /* this is what native (at least v5) does, don't know why */ + himlDst = ImageList_Create (cxDst, cyDst, ILC_MASK | newFlags, 1, 1); if (himlDst) { @@ -2135,8 +2142,13 @@ ImageList_Merge (HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, BitBlt (himlDst->hdcImage, xOff1, yOff1, himl1->cx, himl1->cy, himl1->hdcImage, pt1.x, pt1.y, SRCCOPY); if (i2 >= 0 && i2 < himl2->cCurImage) { - BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND); - BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT); + if (himl2->flags & ILC_MASK) + { + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcMask , pt2.x, pt2.y, SRCAND); + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCPAINT); + } + else + BitBlt (himlDst->hdcImage, xOff2, yOff2, himl2->cx, himl2->cy, himl2->hdcImage, pt2.x, pt2.y, SRCCOPY); } /* copy mask */ @@ -2239,7 +2251,7 @@ HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm) void *image_bits, *mask_bits = NULL; ILHEAD ilHead; HIMAGELIST himl; - int i; + unsigned int i; TRACE("%p\n", pstm); @@ -2703,7 +2715,7 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT iDrag, visible = InternalDrag.bShow; - himlTemp = ImageList_Merge (InternalDrag.himl, 0, himlDrag, iDrag, + himlTemp = ImageList_Merge (InternalDrag.himlNoCursor, 0, himlDrag, iDrag, dxHotspot, dyHotspot); if (visible) { @@ -2717,7 +2729,8 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT iDrag, InternalDrag.hbmBg = 0; } - ImageList_Destroy (InternalDrag.himl); + if (InternalDrag.himl != InternalDrag.himlNoCursor) + ImageList_Destroy (InternalDrag.himl); InternalDrag.himl = himlTemp; if (visible) { diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c index c2869528c0e..675169b326c 100644 --- a/dll/win32/comctl32/listview.c +++ b/dll/win32/comctl32/listview.c @@ -6,8 +6,9 @@ * Copyright 2000 Jason Mawdsley * Copyright 2001 CodeWeavers Inc. * Copyright 2002 Dimitrie O. Paun - * Copyright 2009-2012 Nikolay Sivov + * Copyright 2009-2013 Nikolay Sivov * Copyright 2009 Owen Rudge for CodeWeavers + * Copyright 2012-2013 Daniel Jelinski * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -54,7 +55,6 @@ * -- LVA_SNAPTOGRID not implemented * -- LISTVIEW_ApproximateViewRect partially implemented * -- LISTVIEW_SetColumnWidth ignores header images & bitmap - * -- LISTVIEW_SetIconSpacing is incomplete * -- LISTVIEW_StyleChanged doesn't handle some changes too well * * Speedups @@ -75,7 +75,6 @@ * States * -- LVIS_ACTIVATING (not currently supported by comctl32.dll version 6.0) * -- LVIS_DROPHILITED - * -- LVIS_OVERLAYMASK * * Styles * -- LVS_NOLABELWRAP @@ -99,7 +98,6 @@ * -- LVN_GETINFOTIP * -- LVN_HOTTRACK * -- LVN_SETDISPINFO - * -- LVN_BEGINRDRAG * * Messages: * -- LVM_ENABLEGROUPVIEW @@ -290,6 +288,7 @@ typedef struct tagLISTVIEW_INFO HIMAGELIST himlSmall; HIMAGELIST himlState; SIZE iconSize; + BOOL autoSpacing; SIZE iconSpacing; SIZE iconStateSize; POINT currIconPos; /* this is the position next icon will be placed */ @@ -326,12 +325,12 @@ typedef struct tagLISTVIEW_INFO /* mouse operation */ BOOL bLButtonDown; - BOOL bRButtonDown; BOOL bDragging; POINT ptClickPos; /* point where the user clicked */ INT nLButtonDownItem; /* tracks item to reset multiselection on WM_LBUTTONUP */ DWORD dwHoverTime; HCURSOR hHotCursor; + INT cWheelRemainder; /* keyboard operation */ DWORD lastKeyPressTimestamp; @@ -775,13 +774,11 @@ static int get_ansi_notification(UINT unicodeNotificationCode) } /* forwards header notifications to listview parent */ -static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADERW *lpnmh) +static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, NMHEADERW *lpnmhW) { - NMHEADERA nmhA; - HDITEMA hditema; - HD_TEXTFILTERA textfilter; - LPSTR text = NULL, filter = NULL; + LPCWSTR text = NULL, filter = NULL; LRESULT ret; + NMHEADERA *lpnmh = (NMHEADERA*) lpnmhW; /* on unicode format exit earlier */ if (infoPtr->notifyFormat == NFR_UNICODE) @@ -790,37 +787,38 @@ static LRESULT notify_forward_header(const LISTVIEW_INFO *infoPtr, const NMHEADE /* header always supplies unicode notifications, all we have to do is to convert strings to ANSI */ - nmhA = *(const NMHEADERA*)lpnmh; if (lpnmh->pitem) { - hditema = *(HDITEMA*)lpnmh->pitem; - nmhA.pitem = &hditema; /* convert item text */ if (lpnmh->pitem->mask & HDI_TEXT) { - hditema.pszText = NULL; - Str_SetPtrWtoA(&hditema.pszText, lpnmh->pitem->pszText); - text = hditema.pszText; + text = (LPCWSTR)lpnmh->pitem->pszText; + Str_SetPtrWtoA(&lpnmh->pitem->pszText, text); } /* convert filter text */ if ((lpnmh->pitem->mask & HDI_FILTER) && (lpnmh->pitem->type == HDFT_ISSTRING) && lpnmh->pitem->pvFilter) { - hditema.pvFilter = &textfilter; - textfilter = *(HD_TEXTFILTERA*)(lpnmh->pitem->pvFilter); - textfilter.pszText = NULL; - Str_SetPtrWtoA(&textfilter.pszText, ((HD_TEXTFILTERW*)lpnmh->pitem->pvFilter)->pszText); - filter = textfilter.pszText; + filter = (LPCWSTR)((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText; + Str_SetPtrWtoA(&((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText, filter); } } - nmhA.hdr.code = get_ansi_notification(lpnmh->hdr.code); + lpnmh->hdr.code = get_ansi_notification(lpnmh->hdr.code); - ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmhA.hdr.idFrom, - (LPARAM)&nmhA); + ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmh->hdr.idFrom, + (LPARAM)lpnmh); /* cleanup */ - Free(text); - Free(filter); + if(text) + { + Free(lpnmh->pitem->pszText); + lpnmh->pitem->pszText = (LPSTR)text; + } + if(filter) + { + Free(((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText); + ((HD_TEXTFILTERA*)lpnmh->pitem->pvFilter)->pszText = (LPSTR)filter; + } return ret; } @@ -888,11 +886,13 @@ static inline LRESULT notify_listview(const LISTVIEW_INFO *infoPtr, INT code, LP return notify_hdr(infoPtr, code, (LPNMHDR)plvnm); } +/* Handles NM_DBLCLK, NM_CLICK, NM_RDBLCLK, NM_RCLICK. Only NM_RCLICK return value is used. */ static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTESTINFO *lvht) { NMITEMACTIVATE nmia; LVITEMW item; HWND hwnd = infoPtr->hwndSelf; + LRESULT ret; TRACE("code=%d, lvht=%s\n", code, debuglvhittestinfo(lvht)); ZeroMemory(&nmia, sizeof(nmia)); @@ -903,8 +903,8 @@ static BOOL notify_click(const LISTVIEW_INFO *infoPtr, INT code, const LVHITTEST item.iItem = lvht->iItem; item.iSubItem = 0; if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) nmia.lParam = item.lParam; - notify_hdr(infoPtr, code, (LPNMHDR)&nmia); - return IsWindow(hwnd); + ret = notify_hdr(infoPtr, code, (NMHDR*)&nmia); + return IsWindow(hwnd) && (code == NM_RCLICK ? !ret : TRUE); } static BOOL notify_deleteitem(const LISTVIEW_INFO *infoPtr, INT nItem) @@ -1672,6 +1672,10 @@ static INT LISTVIEW_CreateHeader(LISTVIEW_INFO *infoPtr) /* set header font */ SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, TRUE); + /* set header image list */ + if (infoPtr->himlSmall) + SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)infoPtr->himlSmall); + LISTVIEW_UpdateSize(infoPtr); return 0; @@ -1847,9 +1851,9 @@ static inline INT LISTVIEW_GetCountPerColumn(const LISTVIEW_INFO *infoPtr) static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, LPARAM keyData) { WCHAR buffer[MAX_PATH]; - INT endidx, startidx; DWORD prevTime; LVITEMW item; + int startidx; INT nItem; INT diff; @@ -1889,15 +1893,16 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L infoPtr->nSearchParamLength = 1; } - /* and search from the current position */ - nItem = -1; - endidx = infoPtr->nItemCount; - /* should start from next after focused item, so next item that matches will be selected, if there isn't any and focused matches it will be selected on second search stage from beginning of the list */ if (infoPtr->nFocusedItem >= 0 && infoPtr->nItemCount > 1) - startidx = infoPtr->nFocusedItem + 1; + { + /* with some accumulated search data available start with current focus, otherwise + it's excluded from search */ + startidx = infoPtr->nSearchParamLength > 1 ? infoPtr->nFocusedItem : infoPtr->nFocusedItem + 1; + if (startidx == infoPtr->nItemCount) startidx = 0; + } else startidx = 0; @@ -1917,7 +1922,11 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L } else { - INT i = startidx; + int i = startidx, endidx; + + /* and search from the current position */ + nItem = -1; + endidx = infoPtr->nItemCount; /* first search in [startidx, endidx), on failure continue in [0, startidx) */ while (1) @@ -1939,12 +1948,15 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L item.cchTextMax = MAX_PATH; if (!LISTVIEW_GetItemW(infoPtr, &item)) return 0; - if (lstrncmpiW(item.pszText, infoPtr->szSearchParam, infoPtr->nSearchParamLength) == 0) + if (!lstrncmpiW(item.pszText, infoPtr->szSearchParam, infoPtr->nSearchParamLength)) { nItem = i; break; } - else if (nItem == -1 && lstrncmpiW(item.pszText, infoPtr->szSearchParam, 1) == 0) + /* this is used to find first char match when search string is not available yet, + otherwise every WM_CHAR will search to next item by first char, ignoring that we're + already waiting for user to complete a string */ + else if (nItem == -1 && infoPtr->nSearchParamLength == 1 && !lstrncmpiW(item.pszText, infoPtr->szSearchParam, 1)) { /* this would work but we must keep looking for a longer match */ nItem = i; @@ -2376,7 +2388,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW Icon.top = Box.top; Icon.right = Icon.left; if (infoPtr->himlSmall && - (!lpColumnInfo || lpLVItem->iSubItem == 0 || (lpColumnInfo->fmt & LVCFMT_IMAGE) || + (!lpColumnInfo || lpLVItem->iSubItem == 0 || ((infoPtr->dwLvExStyle & LVS_EX_SUBITEMIMAGES) && lpLVItem->iImage != I_IMAGECALLBACK))) Icon.right += infoPtr->iconSize.cx; Icon.bottom = Icon.top + infoPtr->iconSize.cy; @@ -2967,15 +2979,12 @@ static INT LISTVIEW_CalculateItemHeight(const LISTVIEW_INFO *infoPtr) nItemHeight = infoPtr->iconSpacing.cy; else { - nItemHeight = infoPtr->ntmHeight; - if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES) - nItemHeight++; + nItemHeight = infoPtr->ntmHeight; if (infoPtr->himlState) nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy); if (infoPtr->himlSmall) nItemHeight = max(nItemHeight, infoPtr->iconSize.cy); - if (infoPtr->himlState || infoPtr->himlSmall) - nItemHeight += HEIGHT_PADDING; + nItemHeight += HEIGHT_PADDING; if (infoPtr->nMeasureItemHeight > 0) nItemHeight = infoPtr->nMeasureItemHeight; } @@ -3459,7 +3468,6 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem) return oldFocus != infoPtr->nFocusedItem; } -/* Helper function for LISTVIEW_ShiftIndices *only* */ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, INT direction) { if (nShiftItem < nItem) return nShiftItem; @@ -3471,6 +3479,24 @@ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, I return min(nShiftItem, infoPtr->nItemCount - 1); } +/* This function updates focus index. + +Parameters: + focus : current focus index + item : index of item to be added/removed + direction : add/remove flag +*/ +static void LISTVIEW_ShiftFocus(LISTVIEW_INFO *infoPtr, INT focus, INT item, INT direction) +{ + BOOL old_change = infoPtr->bDoChangeNotify; + + infoPtr->bDoChangeNotify = FALSE; + focus = shift_item(infoPtr, focus, item, direction); + if (focus != infoPtr->nFocusedItem) + LISTVIEW_SetItemFocus(infoPtr, focus); + infoPtr->bDoChangeNotify = old_change; +} + /** * DESCRIPTION: * Updates the various indices after an item has been inserted or deleted. @@ -3485,31 +3511,15 @@ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, I */ static void LISTVIEW_ShiftIndices(LISTVIEW_INFO *infoPtr, INT nItem, INT direction) { - INT nNewFocus; - BOOL bOldChange; - - /* temporarily disable change notification while shifting items */ - bOldChange = infoPtr->bDoChangeNotify; - infoPtr->bDoChangeNotify = FALSE; - - TRACE("Shifting %iu, %i steps\n", nItem, direction); + TRACE("Shifting %i, %i steps\n", nItem, direction); ranges_shift(infoPtr->selectionRanges, nItem, direction, infoPtr->nItemCount); - assert(abs(direction) == 1); - infoPtr->nSelectionMark = shift_item(infoPtr, infoPtr->nSelectionMark, nItem, direction); - nNewFocus = shift_item(infoPtr, infoPtr->nFocusedItem, nItem, direction); - if (nNewFocus != infoPtr->nFocusedItem) - LISTVIEW_SetItemFocus(infoPtr, nNewFocus); - /* But we are not supposed to modify nHotItem! */ - - infoPtr->bDoChangeNotify = bOldChange; } - /** * DESCRIPTION: * Adds a block of selections. @@ -3550,8 +3560,8 @@ static BOOL LISTVIEW_AddGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) ZeroMemory(&nmlv, sizeof(nmlv)); nmlv.iFrom = nFirst; nmlv.iTo = nLast; - nmlv.uNewState = 0; - nmlv.uOldState = item.state; + nmlv.uOldState = 0; + nmlv.uNewState = item.state; notify_hdr(infoPtr, LVN_ODSTATECHANGED, (LPNMHDR)&nmlv); if (!IsWindow(hwndSelf)) @@ -3606,9 +3616,15 @@ static void LISTVIEW_SetGroupSelection(LISTVIEW_INFO *infoPtr, INT nItem) POINT ptItem; rcItem.left = LVIR_BOUNDS; - if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return; + if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) { + ranges_destroy (selection); + return; + } rcSelMark.left = LVIR_BOUNDS; - if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) return; + if (!LISTVIEW_GetItemRect(infoPtr, infoPtr->nSelectionMark, &rcSelMark)) { + ranges_destroy (selection); + return; + } UnionRect(&rcSel, &rcItem, &rcSelMark); iterator_frameditems(&i, infoPtr, &rcSel); while(iterator_next(&i)) @@ -3989,17 +4005,23 @@ static VOID CALLBACK LISTVIEW_ScrollTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent */ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y) { + LVHITTESTINFO ht; + RECT rect; + POINT pt; + if (!(fwKeys & MK_LBUTTON)) infoPtr->bLButtonDown = FALSE; if (infoPtr->bLButtonDown) { - POINT tmp; - RECT rect; - LVHITTESTINFO lvHitTestInfo; - WORD wDragWidth = GetSystemMetrics(SM_CXDRAG); - WORD wDragHeight= GetSystemMetrics(SM_CYDRAG); + rect.left = rect.right = infoPtr->ptClickPos.x; + rect.top = rect.bottom = infoPtr->ptClickPos.y; + InflateRect(&rect, GetSystemMetrics(SM_CXDRAG), GetSystemMetrics(SM_CYDRAG)); + } + + if (infoPtr->bLButtonDown) + { if (infoPtr->bMarqueeSelect) { POINT coords_orig; @@ -4042,22 +4064,17 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN return 0; } - rect.left = infoPtr->ptClickPos.x - wDragWidth; - rect.right = infoPtr->ptClickPos.x + wDragWidth; - rect.top = infoPtr->ptClickPos.y - wDragHeight; - rect.bottom = infoPtr->ptClickPos.y + wDragHeight; + pt.x = x; + pt.y = y; - tmp.x = x; - tmp.y = y; - - lvHitTestInfo.pt = tmp; - LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); + ht.pt = pt; + LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE); /* reset item marker */ - if (infoPtr->nLButtonDownItem != lvHitTestInfo.iItem) + if (infoPtr->nLButtonDownItem != ht.iItem) infoPtr->nLButtonDownItem = -1; - if (!PtInRect(&rect, tmp)) + if (!PtInRect(&rect, pt)) { /* this path covers the following: 1. WM_LBUTTONDOWN over selected item (sets focus on it) @@ -4077,12 +4094,12 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN if (!infoPtr->bDragging) { - lvHitTestInfo.pt = infoPtr->ptClickPos; - LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); + ht.pt = infoPtr->ptClickPos; + LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE); /* If the click is outside the range of an item, begin a highlight. If not, begin an item drag. */ - if (lvHitTestInfo.iItem == -1) + if (ht.iItem == -1) { NMHDR hdr; @@ -4107,7 +4124,7 @@ static LRESULT LISTVIEW_MouseMove(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, IN NMLISTVIEW nmlv; ZeroMemory(&nmlv, sizeof(nmlv)); - nmlv.iItem = lvHitTestInfo.iItem; + nmlv.iItem = ht.iItem; nmlv.ptAction = infoPtr->ptClickPos; notify_listview(infoPtr, LVN_BEGINDRAG, &nmlv); @@ -4158,7 +4175,7 @@ static inline BOOL is_assignable_item(const LVITEMW *lpLVItem, LONG lStyle) /*** * DESCRIPTION: - * Helper for LISTVIEW_SetItemT *only*: sets item attributes. + * Helper for LISTVIEW_SetItemT and LISTVIEW_InsertItemT: sets item attributes. * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure @@ -4227,20 +4244,19 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL if ((lpLVItem->mask & LVIF_TEXT) && textcmpWT(lpItem->hdr.pszText, lpLVItem->pszText, isW)) uChanged |= LVIF_TEXT; - TRACE("uChanged=0x%x\n", uChanged); - if (!uChanged) return TRUE; - *bChanged = TRUE; + TRACE("change mask=0x%x\n", uChanged); - ZeroMemory(&nmlv, sizeof(NMLISTVIEW)); + memset(&nmlv, 0, sizeof(NMLISTVIEW)); nmlv.iItem = lpLVItem->iItem; nmlv.uNewState = (item.state & ~stateMask) | (lpLVItem->state & stateMask); nmlv.uOldState = item.state; - nmlv.uChanged = uChanged; + nmlv.uChanged = uChanged ? uChanged : lpLVItem->mask; nmlv.lParam = item.lParam; - - /* send LVN_ITEMCHANGING notification, if the item is not being inserted */ - /* and we are _NOT_ virtual (LVS_OWNERDATA), and change notifications */ - /* are enabled */ + + /* Send LVN_ITEMCHANGING notification, if the item is not being inserted + and we are _NOT_ virtual (LVS_OWNERDATA), and change notifications + are enabled. Even nothing really changed we still need to send this, + in this case uChanged mask is just set to passed item mask. */ if(lpItem && !isNew && infoPtr->bDoChangeNotify) { HWND hwndSelf = infoPtr->hwndSelf; @@ -4251,6 +4267,18 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL return FALSE; } + /* When item is inserted we need to shift existing focus index if new item has lower index. */ + if (isNew && (stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED) && + /* this means we won't hit a focus change path later */ + ((uChanged & LVIF_STATE) == 0 || (!(lpLVItem->state & LVIS_FOCUSED) && (infoPtr->nFocusedItem != lpLVItem->iItem)))) + { + if (infoPtr->nFocusedItem != -1 && (lpLVItem->iItem <= infoPtr->nFocusedItem)) + infoPtr->nFocusedItem++; + } + + if (!uChanged) return TRUE; + *bChanged = TRUE; + /* copy information */ if (lpLVItem->mask & LVIF_TEXT) textsetptrT(&lpItem->hdr.pszText, lpLVItem->pszText, isW); @@ -4280,7 +4308,14 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL { ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem); } - /* if we are asked to change focus, and we manage it, do it */ + /* If we are asked to change focus, and we manage it, do it. + It's important to have all new item data stored at this point, + because changing existing focus could result in a redrawing operation, + which in turn could ask for disp data, application should see all data + for inserted item when processing LVN_GETDISPINFO. + + The way this works application will see nested item change notifications - + changed item notifications interrupted by ones from item losing focus. */ if (stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED) { if (lpLVItem->state & LVIS_FOCUSED) @@ -4312,7 +4347,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL /* if we're inserting the item, we're done */ if (isNew) return TRUE; - + /* send LVN_ITEMCHANGED notification */ if (lpLVItem->mask & LVIF_PARAM) nmlv.lParam = lpLVItem->lParam; if (infoPtr->bDoChangeNotify) notify_listview(infoPtr, LVN_ITEMCHANGED, &nmlv); @@ -4554,7 +4589,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS NMLVCUSTOMDRAW nmlvcd; HIMAGELIST himl; LVITEMW lvItem; - HFONT hOldFont; TRACE("(hdc=%p, nItem=%d, nSubItem=%d, pos=%s)\n", hdc, nItem, nSubItem, wine_dbgstr_point(&pos)); @@ -4562,7 +4596,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; if (nSubItem == 0) lvItem.mask |= LVIF_STATE; if (infoPtr->uView == LV_VIEW_DETAILS) lvItem.mask |= LVIF_INDENT; - lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED | LVIS_STATEIMAGEMASK | LVIS_CUT; + lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED | LVIS_STATEIMAGEMASK | LVIS_CUT | LVIS_OVERLAYMASK; lvItem.iItem = nItem; lvItem.iSubItem = nSubItem; lvItem.state = 0; @@ -4592,7 +4626,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS /* fill in the custom draw structure */ customdraw_fill(&nmlvcd, infoPtr, hdc, &rcBox, &lvItem); - hOldFont = GetCurrentObject(hdc, OBJ_FONT); if (nSubItem > 0) cdmode = infoPtr->cditemmode; if (cdmode & CDRF_SKIPDEFAULT) goto postpaint; if (cdmode & CDRF_NOTIFYITEMDRAW) @@ -4600,7 +4633,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS if (nSubItem == 0) infoPtr->cditemmode = cdsubitemmode; if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; /* we have to send a CDDS_SUBITEM customdraw explicitly for subitem 0 */ - if (nSubItem == 0 && cdsubitemmode == CDRF_NOTIFYITEMDRAW) + if (nSubItem == 0 && (cdsubitemmode & CDRF_NOTIFYITEMDRAW) != 0) { cdsubitemmode = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd); if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint; @@ -4610,21 +4643,25 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS else if ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) == FALSE) prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE); - /* in full row select, subitems, will just use main item's colors */ - if (nSubItem && infoPtr->uView == LV_VIEW_DETAILS && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) - nmlvcd.clrTextBk = CLR_NONE; - /* FIXME: temporary hack */ rcSelect.left = rcLabel.left; - /* draw the selection background, if we're drawing the main item */ - if (nSubItem == 0) - { - /* in icon mode, the label rect is really what we want to draw the - * background for */ - if (infoPtr->uView == LV_VIEW_ICON) - rcSelect = rcLabel; + /* in icon mode, the label rect is really what we want to draw the + * background for */ + /* in detail mode, we want to paint background for label rect when + * item is not selected or listview has full row select; otherwise paint + * background for text only */ + if (infoPtr->uView == LV_VIEW_ICON || + (infoPtr->uView == LV_VIEW_DETAILS && + (!(lvItem.state & LVIS_SELECTED) || + (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) != 0))) + rcSelect = rcLabel; + if (nmlvcd.clrTextBk != CLR_NONE) + ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, NULL, 0, NULL); + + if(nSubItem == 0 && infoPtr->nFocusedItem == nItem) + { if (infoPtr->uView == LV_VIEW_DETAILS && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT)) { /* we have to update left focus bound too if item isn't in leftmost column @@ -4647,10 +4684,8 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS rcSelect.right = rcBox.right; } - if (nmlvcd.clrTextBk != CLR_NONE) - ExtTextOutW(hdc, rcSelect.left, rcSelect.top, ETO_OPAQUE, &rcSelect, NULL, 0, NULL); /* store new focus rectangle */ - if (infoPtr->nFocusedItem == nItem) infoPtr->rcFocus = rcSelect; + infoPtr->rcFocus = rcSelect; } /* state icons */ @@ -4681,7 +4716,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS ImageList_DrawEx(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top, rcIcon.right - rcIcon.left, rcIcon.bottom - rcIcon.top, infoPtr->clrBk, lvItem.state & LVIS_CUT ? RGB(255, 255, 255) : CLR_DEFAULT, - style); + style | (lvItem.state & LVIS_OVERLAYMASK)); } /* Don't bother painting item being edited */ @@ -4719,8 +4754,6 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS postpaint: if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); - if (cdsubitemmode & CDRF_NEWFONT) - SelectObject(hdc, hOldFont); return TRUE; } @@ -4847,6 +4880,7 @@ static void LISTVIEW_RefreshReport(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, /* iterate through the invalidated rows */ while(iterator_next(i)) { + SelectObject(hdc, infoPtr->hFont); LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position); Position.y += Origin.y; @@ -4969,6 +5003,8 @@ static void LISTVIEW_RefreshReportGrid(LISTVIEW_INFO *infoPtr, HDC hdc) SelectObject( hdc, hOldPen ); DeleteObject( hPen ); } + else + ranges_destroy(colRanges); } /*** @@ -4992,6 +5028,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D while(iterator_prev(i)) { + SelectObject(hdc, infoPtr->hFont); LISTVIEW_GetItemOrigin(infoPtr, i->nItem, &Position); Position.x += Origin.x; Position.y += Origin.y; @@ -5015,7 +5052,7 @@ static void LISTVIEW_RefreshList(LISTVIEW_INFO *infoPtr, ITERATOR *i, HDC hdc, D */ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcErase) { - COLORREF oldTextColor = 0, oldBkColor = 0, oldClrTextBk, oldClrText; + COLORREF oldTextColor = 0, oldBkColor = 0; NMLVCUSTOMDRAW nmlvcd; HFONT hOldFont = 0; DWORD cdmode; @@ -5072,21 +5109,12 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top, SRCCOPY); } - /* FIXME: Shouldn't need to do this */ - oldClrTextBk = infoPtr->clrTextBk; - oldClrText = infoPtr->clrText; - infoPtr->cditemmode = CDRF_DODEFAULT; GetClientRect(infoPtr->hwndSelf, &rcClient); customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0); cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd); if (cdmode & CDRF_SKIPDEFAULT) goto enddraw; - prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE); - - /* Use these colors to draw the items */ - infoPtr->clrTextBk = nmlvcd.clrTextBk; - infoPtr->clrText = nmlvcd.clrText; /* nothing to draw */ if(infoPtr->nItemCount == 0) goto enddraw; @@ -5139,9 +5167,6 @@ enddraw: if (cdmode & CDRF_NOTIFYPOSTPAINT) notify_postpaint(infoPtr, &nmlvcd); - infoPtr->clrTextBk = oldClrTextBk; - infoPtr->clrText = oldClrText; - if(hbmp) { BitBlt(hdcOrig, infoPtr->rcList.left, infoPtr->rcList.top, infoPtr->rcList.right - infoPtr->rcList.left, @@ -5322,6 +5347,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP POINT pos; HDC hdc, hdcOrig; HBITMAP hbmp, hOldbmp; + HFONT hOldFont; HIMAGELIST dragList = 0; TRACE("iItem=%d Count=%d\n", iItem, infoPtr->nItemCount); @@ -5342,6 +5368,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP hdc = CreateCompatibleDC(hdcOrig); hbmp = CreateCompatibleBitmap(hdcOrig, size.cx, size.cy); hOldbmp = SelectObject(hdc, hbmp); + hOldFont = SelectObject(hdc, infoPtr->hFont); rcItem.left = rcItem.top = 0; rcItem.right = size.cx; @@ -5358,6 +5385,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP else SelectObject(hdc, hOldbmp); + SelectObject(hdc, hOldFont); DeleteObject(hbmp); DeleteDC(hdc); ReleaseDC(infoPtr->hwndSelf, hdcOrig); @@ -5642,9 +5670,8 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir) TRACE("rcScroll=%s, dx=%d\n", wine_dbgstr_rect(&rcScroll), dir * infoPtr->nItemHeight); if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList)) { - TRACE("Scrolling rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList)); - ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight, - &rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE); + TRACE("Invalidating rcScroll=%s, rcList=%s\n", wine_dbgstr_rect(&rcScroll), wine_dbgstr_rect(&infoPtr->rcList)); + InvalidateRect(infoPtr->hwndSelf, &rcScroll, TRUE); } /* report has only that column, so we're done */ @@ -5657,8 +5684,7 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir) rcScroll.bottom = nPerCol * infoPtr->nItemHeight; OffsetRect(&rcScroll, Origin.x, Origin.y); if (IntersectRect(&rcScroll, &rcScroll, &infoPtr->rcList)) - ScrollWindowEx(infoPtr->hwndSelf, 0, dir * infoPtr->nItemHeight, - &rcScroll, &rcScroll, 0, 0, SW_ERASE | SW_INVALIDATE); + InvalidateRect(infoPtr->hwndSelf, &rcScroll, TRUE); } /*** @@ -5677,6 +5703,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) { LVITEMW item; const BOOL is_icon = (infoPtr->uView == LV_VIEW_SMALLICON || infoPtr->uView == LV_VIEW_ICON); + INT focus = infoPtr->nFocusedItem; TRACE("(nItem=%d)\n", nItem); @@ -5686,7 +5713,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) item.state = 0; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; LISTVIEW_SetItemState(infoPtr, nItem, &item); - + /* send LVN_DELETEITEM notification. */ if (!notify_deleteitem(infoPtr, nItem)) return FALSE; @@ -5727,6 +5754,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) infoPtr->nItemCount--; LISTVIEW_ShiftIndices(infoPtr, nItem, -1); + LISTVIEW_ShiftFocus(infoPtr, focus, nItem, -1); /* now is the invalidation fun */ if (!is_icon) @@ -6554,7 +6582,7 @@ static BOOL LISTVIEW_GetItemT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, HDPA hdpaSubItems; INT isubitem; - TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW); + TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW); if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount) return FALSE; @@ -7045,65 +7073,61 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT * * NOTE: for subItem = 0, we should return the bounds of the _entire_ item, * not only those of the first column. - * Fortunately, LISTVIEW_GetItemMetrics does the right thing. * * RETURN: * TRUE: success * FALSE: failure */ -static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lprc) +static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT item, LPRECT lprc) { - POINT Position, Origin; - LVITEMW lvItem; - INT nColumn; + RECT rect = { 0, 0, 0, 0 }; + POINT origin; + INT y; if (!lprc) return FALSE; - nColumn = lprc->top; - - TRACE("(nItem=%d, nSubItem=%d, type=%d)\n", nItem, lprc->top, lprc->left); - /* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */ + TRACE("(item=%d, subitem=%d, type=%d)\n", item, lprc->top, lprc->left); + /* Subitem of '0' means item itself, and this works for all control view modes */ if (lprc->top == 0) - return LISTVIEW_GetItemRect(infoPtr, nItem, lprc); + return LISTVIEW_GetItemRect(infoPtr, item, lprc); if (infoPtr->uView != LV_VIEW_DETAILS) return FALSE; - /* special case for header items */ - if (nItem == -1) - { - if (lprc->left != LVIR_BOUNDS) - { - FIXME("Only LVIR_BOUNDS is implemented for header, got %d\n", lprc->left); - return FALSE; - } + LISTVIEW_GetOrigin(infoPtr, &origin); + /* this works for any item index, no matter if it exists or not */ + y = item * infoPtr->nItemHeight + origin.y; - if (infoPtr->hwndHeader) - return SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)lprc); - else - { - memset(lprc, 0, sizeof(RECT)); - return TRUE; - } + if (infoPtr->hwndHeader && SendMessageW(infoPtr->hwndHeader, HDM_GETITEMRECT, lprc->top, (LPARAM)&rect)) + { + rect.top = 0; + rect.bottom = infoPtr->nItemHeight; + } + else + { + /* Native implementation is broken for this case and garbage is left for left and right fields, + we zero them to get predictable output */ + lprc->left = lprc->right = lprc->top = 0; + lprc->bottom = infoPtr->nItemHeight; + OffsetRect(lprc, origin.x, y); + TRACE("return rect %s\n", wine_dbgstr_rect(lprc)); + return TRUE; } - if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE; - LISTVIEW_GetOrigin(infoPtr, &Origin); - - if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; - - lvItem.mask = 0; - lvItem.iItem = nItem; - lvItem.iSubItem = nColumn; - - switch(lprc->left) + switch (lprc->left) { case LVIR_ICON: - LISTVIEW_GetItemMetrics(infoPtr, &lvItem, NULL, NULL, lprc, NULL, NULL); - break; + { + /* it doesn't matter if main item actually has an icon, if imagelist is set icon width is returned */ + if (infoPtr->himlSmall) + rect.right = rect.left + infoPtr->iconSize.cx; + else + rect.right = rect.left; + rect.bottom = rect.top + infoPtr->iconSize.cy; + break; + } case LVIR_LABEL: case LVIR_BOUNDS: - LISTVIEW_GetItemMetrics(infoPtr, &lvItem, lprc, NULL, NULL, NULL, NULL); break; default: @@ -7111,7 +7135,8 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPR return FALSE; } - OffsetRect(lprc, Origin.x, Position.y); + OffsetRect(&rect, origin.x, y); + *lprc = rect; TRACE("return rect %s\n", wine_dbgstr_rect(lprc)); return TRUE; @@ -7680,7 +7705,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, LVITEMW item; HWND hwndSelf = infoPtr->hwndSelf; - TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW); + TRACE("(item=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW); if (infoPtr->dwStyle & LVS_OWNERDATA) return infoPtr->nItemCount++; @@ -7730,7 +7755,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, else nItem = min(lpLVItem->iItem, infoPtr->nItemCount); - TRACE(" inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem); + TRACE("inserting at %d, sorted=%d, count=%d, iItem=%d\n", nItem, is_sorted, infoPtr->nItemCount, lpLVItem->iItem); nItem = DPA_InsertPtr( infoPtr->hdpaItems, nItem, hdpaSubItems ); if (nItem == -1) goto fail; infoPtr->nItemCount++; @@ -7762,6 +7787,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, item.state &= ~LVIS_STATEIMAGEMASK; item.state |= INDEXTOSTATEIMAGEMASK(1); } + if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo; /* make room for the position, if we are in the right mode */ @@ -7775,9 +7801,9 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, goto undo; } } - + /* send LVN_INSERTITEM notification */ - ZeroMemory(&nmlv, sizeof(NMLISTVIEW)); + memset(&nmlv, 0, sizeof(NMLISTVIEW)); nmlv.iItem = nItem; nmlv.lParam = lpItem->lParam; notify_listview(infoPtr, LVN_INSERTITEM, &nmlv); @@ -7803,6 +7829,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, undo: LISTVIEW_ShiftIndices(infoPtr, nItem, -1); + LISTVIEW_ShiftFocus(infoPtr, infoPtr->nFocusedItem, nItem, -1); DPA_DeletePtr(infoPtr->hdpaItems, nItem); infoPtr->nItemCount--; fail: @@ -8283,10 +8310,10 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) lvItem.mask = LVIF_TEXT; lvItem.iItem = 0; lvItem.iSubItem = nColumn; - lvItem.pszText = szDispText; lvItem.cchTextMax = DISP_TEXT_SIZE; for (; lvItem.iItem < infoPtr->nItemCount; lvItem.iItem++) { + lvItem.pszText = szDispText; if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue; nLabelWidth = LISTVIEW_GetStringWidthT(infoPtr, lvItem.pszText, TRUE); if (max_cx < nLabelWidth) max_cx = nLabelWidth; @@ -8570,36 +8597,33 @@ static DWORD LISTVIEW_SetHoverTime(LISTVIEW_INFO *infoPtr, DWORD dwHoverTime) */ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) { + INT iconWidth = 0, iconHeight = 0; DWORD oldspacing = MAKELONG(infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy); TRACE("requested=(%d,%d)\n", cx, cy); - - /* this is supported only for LVS_ICON style */ - if (infoPtr->uView != LV_VIEW_ICON) return oldspacing; - + /* set to defaults, if instructed to */ - if (cx == -1) cx = GetSystemMetrics(SM_CXICONSPACING); - if (cy == -1) cy = GetSystemMetrics(SM_CYICONSPACING); - - /* if 0 then compute width - * FIXME: computed cx and cy is not matching native behaviour */ - if (cx == 0) { - cx = GetSystemMetrics(SM_CXICONSPACING); - if (infoPtr->iconSize.cx + ICON_LR_PADDING > cx) - cx = infoPtr->iconSize.cx + ICON_LR_PADDING; + if (cx == -1 && cy == -1) + { + infoPtr->autoSpacing = TRUE; + if (infoPtr->himlNormal) + ImageList_GetIconSize(infoPtr->himlNormal, &iconWidth, &iconHeight); + cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON) + iconWidth; + cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON) + iconHeight; } + else + infoPtr->autoSpacing = FALSE; - /* if 0 then compute height */ - if (cy == 0) - cy = infoPtr->iconSize.cy + 2 * infoPtr->ntmHeight + - ICON_BOTTOM_PADDING + ICON_TOP_PADDING + LABEL_VERT_PADDING; - + /* if 0 then keep width */ + if (cx != 0) + infoPtr->iconSpacing.cx = cx; - infoPtr->iconSpacing.cx = cx; - infoPtr->iconSpacing.cy = cy; + /* if 0 then keep height */ + if (cy != 0) + infoPtr->iconSpacing.cy = cy; TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n", - LOWORD(oldspacing), HIWORD(oldspacing), cx, cy, + LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy, infoPtr->ntmHeight); @@ -8651,13 +8675,16 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG himlOld = infoPtr->himlNormal; infoPtr->himlNormal = himl; if (infoPtr->uView == LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, FALSE); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); + if (infoPtr->autoSpacing) + LISTVIEW_SetIconSpacing(infoPtr, -1, -1); break; case LVSIL_SMALL: himlOld = infoPtr->himlSmall; infoPtr->himlSmall = himl; if (infoPtr->uView != LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, TRUE); + if (infoPtr->hwndHeader) + SendMessageW(infoPtr->hwndHeader, HDM_SETIMAGELIST, 0, (LPARAM)himl); break; case LVSIL_STATE: @@ -8854,6 +8881,10 @@ static BOOL LISTVIEW_SetItemState(LISTVIEW_INFO *infoPtr, INT nItem, const LVITE UINT oldstate = 0; BOOL notify; + /* special case optimization for recurring attempt to deselect all */ + if (lvItem.state == 0 && lvItem.stateMask == LVIS_SELECTED && !LISTVIEW_GetSelectedCount(infoPtr)) + return TRUE; + /* select all isn't allowed in LVS_SINGLESEL */ if ((lvItem.state & lvItem.stateMask & LVIS_SELECTED) && (infoPtr->dwStyle & LVS_SINGLESEL)) return FALSE; @@ -9039,7 +9070,6 @@ static BOOL LISTVIEW_SetUnicodeFormat( LISTVIEW_INFO *infoPtr, BOOL unicode) */ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) { - SIZE oldIconSize = infoPtr->iconSize; HIMAGELIST himl; if (infoPtr->uView == nView) return 1; @@ -9065,14 +9095,6 @@ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) switch (nView) { case LV_VIEW_ICON: - if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy)) - { - TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", - oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); - } - LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); - break; case LV_VIEW_SMALLICON: LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); break; @@ -9369,11 +9391,13 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->bRedraw = TRUE; infoPtr->bNoItemMetrics = TRUE; infoPtr->bDoChangeNotify = TRUE; - infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING); - infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING); + infoPtr->autoSpacing = TRUE; + infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON); + infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); infoPtr->nEditLabelItem = -1; infoPtr->nLButtonDownItem = -1; infoPtr->dwHoverTime = HOVER_DEFAULT; /* default system hover time */ + infoPtr->cWheelRemainder = 0; infoPtr->nMeasureItemHeight = 0; infoPtr->xTrackLine = -1; /* no track line */ infoPtr->itemEdit.fEnabled = FALSE; @@ -9774,14 +9798,10 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode, static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta) { - INT gcWheelDelta = 0; - INT pulScrollLines = 3; + UINT pulScrollLines = 3; TRACE("(wheelDelta=%d)\n", wheelDelta); - SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0); - gcWheelDelta -= wheelDelta; - switch(infoPtr->uView) { case LV_VIEW_ICON: @@ -9790,21 +9810,31 @@ static LRESULT LISTVIEW_MouseWheel(LISTVIEW_INFO *infoPtr, INT wheelDelta) * listview should be scrolled by a multiple of 37 dependently on its dimension or its visible item number * should be fixed in the future. */ - LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (gcWheelDelta < 0) ? + LISTVIEW_VScroll(infoPtr, SB_INTERNAL, (wheelDelta > 0) ? -LISTVIEW_SCROLL_ICON_LINE_SIZE : LISTVIEW_SCROLL_ICON_LINE_SIZE); break; case LV_VIEW_DETAILS: - if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines) + SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0); + + /* if scrolling changes direction, ignore left overs */ + if ((wheelDelta < 0 && infoPtr->cWheelRemainder < 0) || + (wheelDelta > 0 && infoPtr->cWheelRemainder > 0)) + infoPtr->cWheelRemainder += wheelDelta; + else + infoPtr->cWheelRemainder = wheelDelta; + if (infoPtr->cWheelRemainder && pulScrollLines) { - int cLineScroll = min(LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines); - cLineScroll *= (gcWheelDelta / WHEEL_DELTA); - LISTVIEW_VScroll(infoPtr, SB_INTERNAL, cLineScroll); + int cLineScroll; + pulScrollLines = min((UINT)LISTVIEW_GetCountPerColumn(infoPtr), pulScrollLines); + cLineScroll = pulScrollLines * (float)infoPtr->cWheelRemainder / WHEEL_DELTA; + infoPtr->cWheelRemainder -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines; + LISTVIEW_VScroll(infoPtr, SB_INTERNAL, -cLineScroll); } break; case LV_VIEW_LIST: - LISTVIEW_HScroll(infoPtr, (gcWheelDelta < 0) ? SB_LINELEFT : SB_LINERIGHT, 0); + LISTVIEW_HScroll(infoPtr, (wheelDelta > 0) ? SB_LINELEFT : SB_LINERIGHT, 0); break; } return 0; @@ -9931,7 +9961,10 @@ static LRESULT LISTVIEW_KillFocus(LISTVIEW_INFO *infoPtr) { TRACE("()\n"); - /* if we did not have the focus, there's nothing to do */ + /* drop any left over scroll amount */ + infoPtr->cWheelRemainder = 0; + + /* if we did not have the focus, there's nothing more to do */ if (!infoPtr->bFocus) return 0; /* send NM_KILLFOCUS notification */ @@ -10004,6 +10037,52 @@ static LRESULT LISTVIEW_LButtonDblClk(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, return 0; } +static LRESULT LISTVIEW_TrackMouse(const LISTVIEW_INFO *infoPtr, POINT pt) +{ + MSG msg; + RECT r; + + r.top = r.bottom = pt.y; + r.left = r.right = pt.x; + + InflateRect(&r, GetSystemMetrics(SM_CXDRAG), GetSystemMetrics(SM_CYDRAG)); + + SetCapture(infoPtr->hwndSelf); + + while (1) + { + if (PeekMessageW(&msg, 0, 0, 0, PM_REMOVE | PM_NOYIELD)) + { + if (msg.message == WM_MOUSEMOVE) + { + pt.x = (short)LOWORD(msg.lParam); + pt.y = (short)HIWORD(msg.lParam); + if (PtInRect(&r, pt)) + continue; + else + { + ReleaseCapture(); + return 1; + } + } + else if (msg.message >= WM_LBUTTONDOWN && + msg.message <= WM_RBUTTONDBLCLK) + { + break; + } + + DispatchMessageW(&msg); + } + + if (GetCapture() != infoPtr->hwndSelf) + return 0; + } + + ReleaseCapture(); + return 0; +} + + /*** * DESCRIPTION: * Processes mouse down messages (left mouse button). @@ -10257,9 +10336,9 @@ static LRESULT LISTVIEW_NCDestroy(LISTVIEW_INFO *infoPtr) * RETURN: * Zero */ -static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) +static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) { - const NMHEADERW *lpnmh; + NMHEADERW *lpnmh; TRACE("(lpnmhdr=%p)\n", lpnmhdr); @@ -10267,7 +10346,7 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) /* remember: HDN_LAST < HDN_FIRST */ if (lpnmhdr->code > HDN_FIRST || lpnmhdr->code < HDN_LAST) return 0; - lpnmh = (const NMHEADERW *)lpnmhdr; + lpnmh = (NMHEADERW *)lpnmhdr; if (lpnmh->iItem < 0 || lpnmh->iItem >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return 0; @@ -10292,26 +10371,25 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) LISTVIEW_GetOrigin(infoPtr, &ptOrigin); infoPtr->xTrackLine = x + ptOrigin.x; LISTVIEW_DrawTrackLine(infoPtr); - break; + return notify_forward_header(infoPtr, lpnmh); } - + case HDN_ENDTRACKA: case HDN_ENDTRACKW: /* remove the track line (if any) */ LISTVIEW_DrawTrackLine(infoPtr); infoPtr->xTrackLine = -1; - break; + return notify_forward_header(infoPtr, lpnmh); case HDN_BEGINDRAG: - notify_forward_header(infoPtr, lpnmh); - return (infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0; + if ((infoPtr->dwLvExStyle & LVS_EX_HEADERDRAGDROP) == 0) return 1; + return notify_forward_header(infoPtr, lpnmh); case HDN_ENDDRAG: infoPtr->colRectsDirty = TRUE; LISTVIEW_InvalidateList(infoPtr); - notify_forward_header(infoPtr, lpnmh); - return FALSE; - + return notify_forward_header(infoPtr, lpnmh); + case HDN_ITEMCHANGEDW: case HDN_ITEMCHANGEDA: { @@ -10391,8 +10469,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) LISTVIEW_InvalidateRect(infoPtr, &rcCol); } } - } - break; + break; + } case HDN_ITEMCLICKW: case HDN_ITEMCLICKA: @@ -10404,9 +10482,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) nmlv.iItem = -1; nmlv.iSubItem = lpnmh->iItem; notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv); - notify_forward_header(infoPtr, lpnmh); + return notify_forward_header(infoPtr, lpnmh); } - break; case HDN_DIVIDERDBLCLICKW: case HDN_DIVIDERDBLCLICKA: @@ -10414,10 +10491,8 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, const NMHDR *lpnmhdr) we should use LVSCW_AUTOSIZE_USEHEADER, helper rework or split needed for that */ LISTVIEW_SetColumnWidth(infoPtr, lpnmh->iItem, LVSCW_AUTOSIZE); - notify_forward_header(infoPtr, lpnmh); - break; + return notify_forward_header(infoPtr, lpnmh); } - return 0; } @@ -10612,94 +10687,76 @@ static LRESULT LISTVIEW_RButtonDblClk(const LISTVIEW_INFO *infoPtr, WORD wKey, I /*** * DESCRIPTION: - * Processes mouse down messages (right mouse button). + * Processes WM_RBUTTONDOWN message and corresponding drag operation. * * PARAMETER(S): * [I] infoPtr : valid pointer to the listview structure * [I] wKey : key flag - * [I] x,y : mouse coordinate + * [I] x, y : mouse coordinate * * RETURN: * Zero */ static LRESULT LISTVIEW_RButtonDown(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y) { - LVHITTESTINFO lvHitTestInfo; - INT nItem; + LVHITTESTINFO ht; + INT item; - TRACE("(key=%hu,X=%u,Y=%u)\n", wKey, x, y); + TRACE("(key=%hu, x=%d, y=%d)\n", wKey, x, y); /* send NM_RELEASEDCAPTURE notification */ if (!notify(infoPtr, NM_RELEASEDCAPTURE)) return 0; + /* determine the index of the selected item */ + ht.pt.x = x; + ht.pt.y = y; + item = LISTVIEW_HitTest(infoPtr, &ht, TRUE, TRUE); + /* make sure the listview control window has the focus */ if (!infoPtr->bFocus) SetFocus(infoPtr->hwndSelf); - /* set right button down flag */ - infoPtr->bRButtonDown = TRUE; - - /* determine the index of the selected item */ - lvHitTestInfo.pt.x = x; - lvHitTestInfo.pt.y = y; - nItem = LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, TRUE); - - if ((nItem >= 0) && (nItem < infoPtr->nItemCount)) + if ((item >= 0) && (item < infoPtr->nItemCount)) { - LISTVIEW_SetItemFocus(infoPtr, nItem); + LISTVIEW_SetItemFocus(infoPtr, item); if (!((wKey & MK_SHIFT) || (wKey & MK_CONTROL)) && - !LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED)) - LISTVIEW_SetSelection(infoPtr, nItem); + !LISTVIEW_GetItemState(infoPtr, item, LVIS_SELECTED)) + LISTVIEW_SetSelection(infoPtr, item); + } + else + LISTVIEW_DeselectAll(infoPtr); + + if (LISTVIEW_TrackMouse(infoPtr, ht.pt)) + { + if (ht.iItem != -1) + { + NMLISTVIEW nmlv; + + memset(&nmlv, 0, sizeof(nmlv)); + nmlv.iItem = ht.iItem; + nmlv.ptAction = ht.pt; + + notify_listview(infoPtr, LVN_BEGINRDRAG, &nmlv); + } } else { - LISTVIEW_DeselectAll(infoPtr); + SetFocus(infoPtr->hwndSelf); + + ht.pt.x = x; + ht.pt.y = y; + LISTVIEW_HitTest(infoPtr, &ht, TRUE, FALSE); + + if (notify_click(infoPtr, NM_RCLICK, &ht)) + { + /* Send a WM_CONTEXTMENU message in response to the WM_RBUTTONUP */ + SendMessageW(infoPtr->hwndSelf, WM_CONTEXTMENU, + (WPARAM)infoPtr->hwndSelf, (LPARAM)GetMessagePos()); + } } return 0; } -/*** - * DESCRIPTION: - * Processes mouse up messages (right mouse button). - * - * PARAMETER(S): - * [I] infoPtr : valid pointer to the listview structure - * [I] wKey : key flag - * [I] x,y : mouse coordinate - * - * RETURN: - * Zero - */ -static LRESULT LISTVIEW_RButtonUp(LISTVIEW_INFO *infoPtr, WORD wKey, INT x, INT y) -{ - LVHITTESTINFO lvHitTestInfo; - POINT pt; - - TRACE("(key=%hu,X=%u,Y=%u)\n", wKey, x, y); - - if (!infoPtr->bRButtonDown) return 0; - - /* set button flag */ - infoPtr->bRButtonDown = FALSE; - - /* Send NM_RCLICK notification */ - lvHitTestInfo.pt.x = x; - lvHitTestInfo.pt.y = y; - LISTVIEW_HitTest(infoPtr, &lvHitTestInfo, TRUE, FALSE); - if (!notify_click(infoPtr, NM_RCLICK, &lvHitTestInfo)) return 0; - - /* Change to screen coordinate for WM_CONTEXTMENU */ - pt = lvHitTestInfo.pt; - ClientToScreen(infoPtr->hwndSelf, &pt); - - /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */ - SendMessageW(infoPtr->hwndSelf, WM_CONTEXTMENU, - (WPARAM)infoPtr->hwndSelf, MAKELPARAM(pt.x, pt.y)); - - return 0; -} - - /*** * DESCRIPTION: * Sets the cursor. @@ -10782,6 +10839,7 @@ static LRESULT LISTVIEW_SetFocus(LISTVIEW_INFO *infoPtr, HWND hwndLoseFocus) static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedraw) { HFONT oldFont = infoPtr->hFont; + INT oldHeight = infoPtr->nItemHeight; TRACE("(hfont=%p,redraw=%hu)\n", hFont, fRedraw); @@ -10790,12 +10848,16 @@ static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedra LISTVIEW_SaveTextMetrics(infoPtr); + infoPtr->nItemHeight = LISTVIEW_CalculateItemHeight(infoPtr); + if (infoPtr->uView == LV_VIEW_DETAILS) { SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(fRedraw, 0)); LISTVIEW_UpdateSize(infoPtr); LISTVIEW_UpdateScroll(infoPtr); } + else if (infoPtr->nItemHeight != oldHeight) + LISTVIEW_UpdateScroll(infoPtr); if (fRedraw) LISTVIEW_InvalidateList(infoPtr); @@ -10973,7 +11035,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, if (uNewView != uOldView) { - SIZE oldIconSize = infoPtr->iconSize; HIMAGELIST himl; SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0); @@ -10984,17 +11045,8 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, himl = (uNewView == LVS_ICON ? infoPtr->himlNormal : infoPtr->himlSmall); set_icon_size(&infoPtr->iconSize, himl, uNewView != LVS_ICON); - - if (uNewView == LVS_ICON) - { - if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy)) - { - TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", - oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); - } - } - else if (uNewView == LVS_REPORT) + + if (uNewView == LVS_REPORT) { HDLAYOUT hl; WINDOWPOS wp; @@ -11425,7 +11477,9 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return LISTVIEW_SetHoverTime(infoPtr, (DWORD)lParam); case LVM_SETICONSPACING: - return LISTVIEW_SetIconSpacing(infoPtr, (short)LOWORD(lParam), (short)HIWORD(lParam)); + if(lParam == -1) + return LISTVIEW_SetIconSpacing(infoPtr, -1, -1); + return LISTVIEW_SetIconSpacing(infoPtr, LOWORD(lParam), HIWORD(lParam)); case LVM_SETIMAGELIST: return (LRESULT)LISTVIEW_SetImageList(infoPtr, (INT)wParam, (HIMAGELIST)lParam); @@ -11588,9 +11642,6 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_RBUTTONDOWN: return LISTVIEW_RButtonDown(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); - case WM_RBUTTONUP: - return LISTVIEW_RButtonUp(infoPtr, (WORD)wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); - case WM_SETCURSOR: return LISTVIEW_SetCursor(infoPtr, wParam, lParam); diff --git a/dll/win32/comctl32/monthcal.c b/dll/win32/comctl32/monthcal.c index a9b76d47627..3dba5401b3d 100644 --- a/dll/win32/comctl32/monthcal.c +++ b/dll/win32/comctl32/monthcal.c @@ -1076,7 +1076,8 @@ static void MONTHCAL_PaintFocusAndCircle(const MONTHCAL_INFO *infoPtr, HDC hdc, /* months before first calendar month and after last calendar month */ static void MONTHCAL_PaintLeadTrailMonths(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps) { - INT mask, length, index; + INT mask, index; + UINT length; SYSTEMTIME st_max, st; if (infoPtr->dwStyle & MCS_NOTRAILINGDATES) return; @@ -1116,7 +1117,8 @@ static void MONTHCAL_PaintLeadTrailMonths(const MONTHCAL_INFO *infoPtr, HDC hdc, static void MONTHCAL_PaintCalendar(const MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT *ps, INT calIdx) { const SYSTEMTIME *date = &infoPtr->calendars[calIdx].month; - INT i, j, length; + INT i, j; + UINT length; RECT r, fill_bk_rect; SYSTEMTIME st; WCHAR buf[80]; diff --git a/dll/win32/comctl32/propsheet.c b/dll/win32/comctl32/propsheet.c index a1c5673e58f..03b275f8033 100644 --- a/dll/win32/comctl32/propsheet.c +++ b/dll/win32/comctl32/propsheet.c @@ -168,7 +168,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, int index, int skipdir, HPROPSHEETPAGE hpage); -static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo); +static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo, int original_index); static PADDING_INFO PROPSHEET_GetPaddingInfoWizard(HWND hwndDlg, const PropSheetInfo* psInfo); static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID); static BOOL PROPSHEET_RemovePage(HWND hwndDlg, int index, HPROPSHEETPAGE hpage); @@ -1998,9 +1998,8 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); TRACE("index %d, skipdir %d, hpage %p\n", index, skipdir, hpage); - /* hpage takes precedence over index */ - if (hpage != NULL) - index = PROPSHEET_GetPageIndex(hpage, psInfo); + + index = PROPSHEET_GetPageIndex(hpage, psInfo, index); if (index < 0 || index >= psInfo->nPages) { @@ -2331,13 +2330,8 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg, if (!psInfo) { return FALSE; } - /* - * hpage takes precedence over index. - */ - if (hpage != 0) - { - index = PROPSHEET_GetPageIndex(hpage, psInfo); - } + + index = PROPSHEET_GetPageIndex(hpage, psInfo, index); /* Make sure that index is within range */ if (index < 0 || index >= psInfo->nPages) @@ -2575,16 +2569,11 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex) */ static LRESULT PROPSHEET_PageToIndex(HWND hwndDlg, HPROPSHEETPAGE hPage) { - int index; PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr); TRACE("(%p, %p)\n", hwndDlg, hPage); - for (index = 0; index < psInfo->nPages; index++) - if (psInfo->proppage[index].hpage == hPage) - return index; - WARN("%p not found\n", hPage); - return -1; + return PROPSHEET_GetPageIndex(hPage, psInfo, -1); } /****************************************************************************** @@ -2660,26 +2649,20 @@ static BOOL PROPSHEET_RecalcPageSizes(HWND hwndDlg) * PROPSHEET_GetPageIndex * * Given a HPROPSHEETPAGE, returns the index of the corresponding page from - * the array of PropPageInfo. + * the array of PropPageInfo. If page is not found original index is used + * (page takes precedence over index). */ -static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE hpage, const PropSheetInfo* psInfo) +static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE page, const PropSheetInfo* psInfo, int original_index) { - BOOL found = FALSE; - int index = 0; + int index; - TRACE("hpage %p\n", hpage); - while ((index < psInfo->nPages) && (found == FALSE)) - { - if (psInfo->proppage[index].hpage == hpage) - found = TRUE; - else - index++; - } + TRACE("page %p index %d\n", page, original_index); - if (found == FALSE) - index = -1; + for (index = 0; index < psInfo->nPages; index++) + if (psInfo->proppage[index].hpage == page) + return index; - return index; + return original_index; } /****************************************************************************** diff --git a/dll/win32/comctl32/rebar.c b/dll/win32/comctl32/rebar.c index 2dc99cd784f..592e382cd15 100644 --- a/dll/win32/comctl32/rebar.c +++ b/dll/win32/comctl32/rebar.c @@ -1123,7 +1123,7 @@ REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus) * or infoPtr->uNumBands if none */ static int next_visible(const REBAR_INFO *infoPtr, int i) { - int n; + unsigned int n; for (n = i + 1; n < infoPtr->uNumBands; n++) if (!HIDDENBAND(REBAR_GetBand(infoPtr, n))) break; diff --git a/dll/win32/comctl32/status.c b/dll/win32/comctl32/status.c index d16e16372a0..45df80305ea 100644 --- a/dll/win32/comctl32/status.c +++ b/dll/win32/comctl32/status.c @@ -285,7 +285,6 @@ STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPA static LRESULT STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc) { - int i; RECT rect; HBRUSH hbrBk; HFONT hOldFont; @@ -319,6 +318,8 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc) if (infoPtr->simple) { STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->part0, 0); } else { + unsigned int i; + for (i = 0; i < infoPtr->numParts; i++) { STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->parts[i], i); } @@ -336,7 +337,8 @@ STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc) static int STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const POINT *pt) { - int i; + unsigned int i; + if (infoPtr->simple) return 255; @@ -352,7 +354,7 @@ STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr) { STATUSWINDOWPART *part; RECT rect, *r; - int i; + UINT i; /* get our window size */ GetClientRect (infoPtr->Self, &rect); @@ -883,7 +885,7 @@ STATUSBAR_Simple (STATUS_INFO *infoPtr, BOOL simple) static LRESULT STATUSBAR_WMDestroy (STATUS_INFO *infoPtr) { - int i; + unsigned int i; TRACE("\n"); for (i = 0; i < infoPtr->numParts; i++) { diff --git a/dll/win32/comctl32/toolbar.c b/dll/win32/comctl32/toolbar.c index 9923cdb76ef..702694fbafd 100644 --- a/dll/win32/comctl32/toolbar.c +++ b/dll/win32/comctl32/toolbar.c @@ -5212,9 +5212,9 @@ TOOLBAR_Destroy (TOOLBAR_INFO *infoPtr) if (infoPtr->himlInt) ImageList_Destroy (infoPtr->himlInt); - TOOLBAR_DeleteImageList(&infoPtr->himlDef, &infoPtr->cimlDef); - TOOLBAR_DeleteImageList(&infoPtr->himlDis, &infoPtr->cimlDis); - TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot); + TOOLBAR_DeleteImageList(&infoPtr->himlDef, &infoPtr->cimlDef); + TOOLBAR_DeleteImageList(&infoPtr->himlDis, &infoPtr->cimlDis); + TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot); /* delete default font */ DeleteObject (infoPtr->hDefaultFont); diff --git a/dll/win32/comctl32/tooltips.c b/dll/win32/comctl32/tooltips.c index 34da653c05f..a51fa35483a 100644 --- a/dll/win32/comctl32/tooltips.c +++ b/dll/win32/comctl32/tooltips.c @@ -991,9 +991,17 @@ TOOLTIPS_CheckTool (const TOOLTIPS_INFO *infoPtr, BOOL bShowTest) if (nTool == -1) return -1; - if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) { - if (!TOOLTIPS_IsWindowActive (GetWindow (infoPtr->hwndSelf, GW_OWNER))) - return -1; + if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) + { + TTTOOL_INFO *ti = &infoPtr->tools[nTool]; + HWND hwnd = (ti->uFlags & TTF_IDISHWND) ? (HWND)ti->uId : ti->hwnd; + + if (!TOOLTIPS_IsWindowActive(hwnd)) + { + TRACE("not active: hwnd %p, parent %p, active %p\n", + hwnd, GetParent(hwnd), GetActiveWindow()); + return -1; + } } TRACE("tool %d\n", nTool); diff --git a/dll/win32/comctl32/treeview.c b/dll/win32/comctl32/treeview.c index 8dd0dcabee4..d8a36ce2290 100644 --- a/dll/win32/comctl32/treeview.c +++ b/dll/win32/comctl32/treeview.c @@ -102,6 +102,7 @@ typedef struct tagTREEVIEW_INFO BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */ HIMAGELIST dragList; /* Bitmap of dragged item */ LONG scrollX; + INT wheelRemainder; COLORREF clrBk; COLORREF clrText; COLORREF clrLine; @@ -110,6 +111,7 @@ typedef struct tagTREEVIEW_INFO HFONT hDefaultFont; HFONT hBoldFont; HFONT hUnderlineFont; + HFONT hBoldUnderlineFont; HCURSOR hcurHand; HWND hwndToolTip; @@ -303,11 +305,22 @@ TREEVIEW_CreateUnderlineFont(HFONT hOrigFont) return CreateFontIndirectW(&font); } +static HFONT +TREEVIEW_CreateBoldUnderlineFont(HFONT hfont) +{ + LOGFONTW font; + + GetObjectW(hfont, sizeof(font), &font); + font.lfWeight = FW_BOLD; + font.lfUnderline = TRUE; + return CreateFontIndirectW(&font); +} + static inline HFONT TREEVIEW_FontForItem(const TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item) { if ((infoPtr->dwStyle & TVS_TRACKSELECT) && (item == infoPtr->hotItem)) - return infoPtr->hUnderlineFont; + return item->state & TVIS_BOLD ? infoPtr->hBoldUnderlineFont : infoPtr->hUnderlineFont; if (item->state & TVIS_BOLD) return infoPtr->hBoldFont; return infoPtr->hFont; @@ -1562,7 +1575,7 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM item) newFirstVisible = item->prevSibling; else if (item->parent != infoPtr->root) newFirstVisible = item->parent; - TREEVIEW_SetFirstVisible(infoPtr, NULL, TRUE); + TREEVIEW_SetFirstVisible(infoPtr, NULL, TRUE); } else newFirstVisible = infoPtr->firstVisible; @@ -1903,8 +1916,10 @@ TREEVIEW_SetFont(TREEVIEW_INFO *infoPtr, HFONT hFont, BOOL bRedraw) DeleteObject(infoPtr->hBoldFont); DeleteObject(infoPtr->hUnderlineFont); + DeleteObject(infoPtr->hBoldUnderlineFont); infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont); infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont); + infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont); if (!infoPtr->bHeightSet) infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr); @@ -3155,10 +3170,10 @@ TREEVIEW_Sort(TREEVIEW_INFO *infoPtr, HTREEITEM parent, { int visOrder = infoPtr->firstVisible->visibleOrder; - if (parent == infoPtr->root) - TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL); - else - TREEVIEW_RecalculateVisibleOrder(infoPtr, parent); + if (parent == infoPtr->root) + TREEVIEW_RecalculateVisibleOrder(infoPtr, NULL); + else + TREEVIEW_RecalculateVisibleOrder(infoPtr, parent); if (TREEVIEW_IsChildOf(parent, infoPtr->firstVisible)) { @@ -4916,7 +4931,7 @@ scroll: static LRESULT TREEVIEW_MouseWheel(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { - short gcWheelDelta; + short wheelDelta; UINT pulScrollLines = 3; if (wParam & (MK_SHIFT | MK_CONTROL)) @@ -4927,13 +4942,25 @@ TREEVIEW_MouseWheel(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam) SystemParametersInfoW(SPI_GETWHEELSCROLLLINES, 0, &pulScrollLines, 0); - gcWheelDelta = -(short)HIWORD(wParam); - pulScrollLines *= (gcWheelDelta / WHEEL_DELTA); + wheelDelta = GET_WHEEL_DELTA_WPARAM(wParam); + /* if scrolling changes direction, ignore left overs */ + if ((wheelDelta < 0 && infoPtr->wheelRemainder < 0) || + (wheelDelta > 0 && infoPtr->wheelRemainder > 0)) + infoPtr->wheelRemainder += wheelDelta; + else + infoPtr->wheelRemainder = wheelDelta; - if (abs(gcWheelDelta) >= WHEEL_DELTA && pulScrollLines) + if (infoPtr->wheelRemainder && pulScrollLines) { - int newDy = infoPtr->firstVisible->visibleOrder + pulScrollLines; - int maxDy = infoPtr->maxVisibleOrder; + int newDy; + int maxDy; + int lineScroll; + + lineScroll = pulScrollLines * (float)infoPtr->wheelRemainder / WHEEL_DELTA; + infoPtr->wheelRemainder -= WHEEL_DELTA * lineScroll / (int)pulScrollLines; + + newDy = infoPtr->firstVisible->visibleOrder - lineScroll; + maxDy = infoPtr->maxVisibleOrder; if (newDy > maxDy) newDy = maxDy; @@ -5038,6 +5065,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) /* dragList */ infoPtr->scrollX = 0; + infoPtr->wheelRemainder = 0; infoPtr->clrBk = CLR_NONE; /* use system color */ infoPtr->clrText = CLR_NONE; /* use system color */ @@ -5064,6 +5092,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->hFont = infoPtr->hDefaultFont = CreateFontIndirectW(&lf); infoPtr->hBoldFont = TREEVIEW_CreateBoldFont(infoPtr->hFont); infoPtr->hUnderlineFont = TREEVIEW_CreateUnderlineFont(infoPtr->hFont); + infoPtr->hBoldUnderlineFont = TREEVIEW_CreateBoldUnderlineFont(infoPtr->hFont); infoPtr->hcurHand = LoadCursorW(NULL, (LPWSTR)IDC_HAND); infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr); @@ -5123,6 +5152,7 @@ TREEVIEW_Destroy(TREEVIEW_INFO *infoPtr) DeleteObject(infoPtr->hDefaultFont); DeleteObject(infoPtr->hBoldFont); DeleteObject(infoPtr->hUnderlineFont); + DeleteObject(infoPtr->hBoldUnderlineFont); Free(infoPtr); return 0; diff --git a/dll/win32/comctl32/updown.c b/dll/win32/comctl32/updown.c index d3be2898c54..32162267a9f 100644 --- a/dll/win32/comctl32/updown.c +++ b/dll/win32/comctl32/updown.c @@ -1026,10 +1026,10 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L if (TRACE_ON(updown)) { - INT i; + UINT i; for (i = 0; i < wParam; i++) - TRACE("%d: nSec %u nInc %u\n", i, + TRACE("%u: nSec %u nInc %u\n", i, infoPtr->AccelVect[i].nSec, infoPtr->AccelVect[i].nInc); } diff --git a/dll/win32/devmgr/devprblm.c b/dll/win32/devmgr/devprblm.c index ac432499128..d578b68614e 100644 --- a/dll/win32/devmgr/devprblm.c +++ b/dll/win32/devmgr/devprblm.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: hwpage.c 19599 2005-11-26 02:12:58Z weiden $ - * +/* * PROJECT: ReactOS devmgr.dll * FILE: lib/devmgr/devprblm.c * PURPOSE: ReactOS Device Manager diff --git a/dll/win32/devmgr/hwpage.c b/dll/win32/devmgr/hwpage.c index 794725f4e5e..82ee053340c 100644 --- a/dll/win32/devmgr/hwpage.c +++ b/dll/win32/devmgr/hwpage.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS devmgr.dll * FILE: lib/devmgr/hwpage.c * PURPOSE: ReactOS Device Manager diff --git a/dll/win32/devmgr/misc.c b/dll/win32/devmgr/misc.c index a4a70c534ff..550ea9f21fe 100644 --- a/dll/win32/devmgr/misc.c +++ b/dll/win32/devmgr/misc.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: devmgr.c 12852 2005-01-06 13:58:04Z mf $ - * +/* * PROJECT: ReactOS devmgr.dll * FILE: lib/devmgr/misc.c * PURPOSE: ReactOS Device Manager diff --git a/dll/win32/dhcpcsvc/dhcp/api.c b/dll/win32/dhcpcsvc/dhcp/api.c index 7e8a2b9f4cc..62fd2c56551 100644 --- a/dll/win32/dhcpcsvc/dhcp/api.c +++ b/dll/win32/dhcpcsvc/dhcp/api.c @@ -1,5 +1,4 @@ -/* $Id: $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: subsys/system/dhcp/api.c diff --git a/dll/win32/dhcpcsvc/dhcp/pipe.c b/dll/win32/dhcpcsvc/dhcp/pipe.c index d9ac7db6298..aff1812675c 100644 --- a/dll/win32/dhcpcsvc/dhcp/pipe.c +++ b/dll/win32/dhcpcsvc/dhcp/pipe.c @@ -1,5 +1,4 @@ -/* $Id: $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: subsys/system/dhcp/pipe.c diff --git a/dll/win32/hid/hid.c b/dll/win32/hid/hid.c index bd693d7e000..ea9aeab18f4 100644 --- a/dll/win32/hid/hid.c +++ b/dll/win32/hid/hid.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Hid User Library * FILE: lib/hid/hid.c * PURPOSE: ReactOS Hid User Library diff --git a/dll/win32/hid/stubs.c b/dll/win32/hid/stubs.c index abd58df21cf..ecb87f72235 100644 --- a/dll/win32/hid/stubs.c +++ b/dll/win32/hid/stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Hid User Library * FILE: lib/hid/stubs.c diff --git a/dll/win32/iprtprio/iprtprio.rc b/dll/win32/iprtprio/iprtprio.rc index 3f4caea9211..568748a2ea7 100644 --- a/dll/win32/iprtprio/iprtprio.rc +++ b/dll/win32/iprtprio/iprtprio.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS IP Route Priority API DLL\0" diff --git a/dll/win32/kernel32/client/dosdev.c b/dll/win32/kernel32/client/dosdev.c index 19be52f02cb..bf6c991cbf6 100644 --- a/dll/win32/kernel32/client/dosdev.c +++ b/dll/win32/kernel32/client/dosdev.c @@ -1,5 +1,4 @@ -/* $Id: dosdev.c 54326 2011-11-07 00:18:13Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/dosdev.c diff --git a/dll/win32/kernel32/client/environ.c b/dll/win32/kernel32/client/environ.c index cbc3b1ea775..8948980633a 100644 --- a/dll/win32/kernel32/client/environ.c +++ b/dll/win32/kernel32/client/environ.c @@ -1,5 +1,4 @@ -/* $Id: environ.c 54459 2011-11-20 17:00:39Z pschweitzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/misc/env.c diff --git a/dll/win32/kernel32/client/except.c b/dll/win32/kernel32/client/except.c index 4dc0eaf8a40..9e6e63c900e 100644 --- a/dll/win32/kernel32/client/except.c +++ b/dll/win32/kernel32/client/except.c @@ -1,5 +1,4 @@ -/* $Id: except.c 57269 2012-09-11 03:50:20Z mnordell $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/misc/except.c diff --git a/dll/win32/kernel32/client/file/backup.c b/dll/win32/kernel32/client/file/backup.c index 8162d511e44..14b4b811893 100644 --- a/dll/win32/kernel32/client/file/backup.c +++ b/dll/win32/kernel32/client/file/backup.c @@ -1,5 +1,4 @@ -/* $Id: backup.c 48475 2010-08-07 05:02:58Z sir_richard $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/backup.c diff --git a/dll/win32/kernel32/client/file/cnotify.c b/dll/win32/kernel32/client/file/cnotify.c index 2bc7d9740ce..eb28c5ce9be 100644 --- a/dll/win32/kernel32/client/file/cnotify.c +++ b/dll/win32/kernel32/client/file/cnotify.c @@ -1,5 +1,4 @@ -/* $Id: cnotify.c 55801 2012-02-21 23:27:45Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/find.c diff --git a/dll/win32/kernel32/client/file/copy.c b/dll/win32/kernel32/client/file/copy.c index b123cce38e6..47b81995335 100644 --- a/dll/win32/kernel32/client/file/copy.c +++ b/dll/win32/kernel32/client/file/copy.c @@ -1,5 +1,4 @@ -/* $Id: copy.c 55885 2012-02-27 17:10:44Z sir_richard $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/copy.c diff --git a/dll/win32/kernel32/client/file/create.c b/dll/win32/kernel32/client/file/create.c index af2d0b7ef26..5ee75139e9b 100644 --- a/dll/win32/kernel32/client/file/create.c +++ b/dll/win32/kernel32/client/file/create.c @@ -1,5 +1,4 @@ -/* $Id: create.c 54326 2011-11-07 00:18:13Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/create.c diff --git a/dll/win32/kernel32/client/file/delete.c b/dll/win32/kernel32/client/file/delete.c index c31ff8e47eb..11840a4ac4a 100644 --- a/dll/win32/kernel32/client/file/delete.c +++ b/dll/win32/kernel32/client/file/delete.c @@ -1,5 +1,4 @@ -/* $Id: delete.c 56650 2012-05-23 16:51:22Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/delete.c diff --git a/dll/win32/kernel32/client/file/dir.c b/dll/win32/kernel32/client/file/dir.c index b99a4369ab9..52a5342afd1 100644 --- a/dll/win32/kernel32/client/file/dir.c +++ b/dll/win32/kernel32/client/file/dir.c @@ -1,5 +1,4 @@ -/* $Id: dir.c 55866 2012-02-25 21:09:28Z khornicek $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/client/file/dir.c diff --git a/dll/win32/kernel32/client/file/fileinfo.c b/dll/win32/kernel32/client/file/fileinfo.c index 392347a9426..a7486c60630 100644 --- a/dll/win32/kernel32/client/file/fileinfo.c +++ b/dll/win32/kernel32/client/file/fileinfo.c @@ -1,5 +1,4 @@ -/* $Id: fileinfo.c 54326 2011-11-07 00:18:13Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/file.c diff --git a/dll/win32/kernel32/client/file/hardlink.c b/dll/win32/kernel32/client/file/hardlink.c index b4a43a6a36e..dc1e8a51bf1 100644 --- a/dll/win32/kernel32/client/file/hardlink.c +++ b/dll/win32/kernel32/client/file/hardlink.c @@ -1,5 +1,4 @@ -/* $Id: hardlink.c 55790 2012-02-21 19:18:57Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/client/file/hardlink.c diff --git a/dll/win32/kernel32/client/file/iocompl.c b/dll/win32/kernel32/client/file/iocompl.c index 4d778897b2a..0ee98005894 100644 --- a/dll/win32/kernel32/client/file/iocompl.c +++ b/dll/win32/kernel32/client/file/iocompl.c @@ -1,5 +1,4 @@ -/* $Id: iocompl.c 55793 2012-02-21 21:31:01Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/iocompl.c diff --git a/dll/win32/kernel32/client/file/lfile.c b/dll/win32/kernel32/client/file/lfile.c index abfed1243b8..904e1e207e7 100644 --- a/dll/win32/kernel32/client/file/lfile.c +++ b/dll/win32/kernel32/client/file/lfile.c @@ -1,5 +1,4 @@ -/* $Id: lfile.c 48475 2010-08-07 05:02:58Z sir_richard $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/lfile.c diff --git a/dll/win32/kernel32/client/file/lock.c b/dll/win32/kernel32/client/file/lock.c index 2b71e4e062d..708b6333786 100644 --- a/dll/win32/kernel32/client/file/lock.c +++ b/dll/win32/kernel32/client/file/lock.c @@ -1,5 +1,4 @@ -/* $Id: lock.c 55795 2012-02-21 21:38:08Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/file/lock.c diff --git a/dll/win32/kernel32/client/file/mailslot.c b/dll/win32/kernel32/client/file/mailslot.c index d9875c3ecd2..a6b22d6da0c 100644 --- a/dll/win32/kernel32/client/file/mailslot.c +++ b/dll/win32/kernel32/client/file/mailslot.c @@ -1,5 +1,4 @@ -/* $Id: mailslot.c 55791 2012-02-21 19:19:44Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/mailslot.c diff --git a/dll/win32/kernel32/client/file/move.c b/dll/win32/kernel32/client/file/move.c index 87fbc2f8961..8ddd4bb0f6b 100644 --- a/dll/win32/kernel32/client/file/move.c +++ b/dll/win32/kernel32/client/file/move.c @@ -1,5 +1,4 @@ -/* $Id: move.c 54326 2011-11-07 00:18:13Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/file.c diff --git a/dll/win32/kernel32/client/file/rw.c b/dll/win32/kernel32/client/file/rw.c index 69661da739b..82dc7ca39eb 100644 --- a/dll/win32/kernel32/client/file/rw.c +++ b/dll/win32/kernel32/client/file/rw.c @@ -1,5 +1,4 @@ -/* $Id: rw.c 54326 2011-11-07 00:18:13Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/rw.c diff --git a/dll/win32/kernel32/client/file/tape.c b/dll/win32/kernel32/client/file/tape.c index 37c30668e0a..b0642e873e1 100644 --- a/dll/win32/kernel32/client/file/tape.c +++ b/dll/win32/kernel32/client/file/tape.c @@ -1,5 +1,4 @@ -/* $Id: tape.c 54334 2011-11-07 07:41:52Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/tape.c diff --git a/dll/win32/kernel32/client/file/volume.c b/dll/win32/kernel32/client/file/volume.c index 6b3b4ac6809..3759e1ed6f8 100644 --- a/dll/win32/kernel32/client/file/volume.c +++ b/dll/win32/kernel32/client/file/volume.c @@ -1,5 +1,4 @@ -/* $Id: volume.c 52819 2011-07-23 18:54:29Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/file/volume.c diff --git a/dll/win32/kernel32/client/job.c b/dll/win32/kernel32/client/job.c index 6baf5da5866..e5a20c0bca6 100644 --- a/dll/win32/kernel32/client/job.c +++ b/dll/win32/kernel32/client/job.c @@ -1,5 +1,4 @@ -/* $Id: job.c 54306 2011-11-06 00:09:33Z pschweitzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/process/job.c diff --git a/dll/win32/kernel32/client/time.c b/dll/win32/kernel32/client/time.c index ff729d2c749..44516d4b6ee 100644 --- a/dll/win32/kernel32/client/time.c +++ b/dll/win32/kernel32/client/time.c @@ -1,5 +1,4 @@ -/* $Id: time.c 52770 2011-07-22 02:13:57Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/misc/time.c diff --git a/dll/win32/kernel32/client/toolhelp.c b/dll/win32/kernel32/client/toolhelp.c index 1f221048716..0eae03bb0fe 100644 --- a/dll/win32/kernel32/client/toolhelp.c +++ b/dll/win32/kernel32/client/toolhelp.c @@ -1,5 +1,4 @@ -/* $Id: toolhelp.c 54071 2011-10-10 12:14:12Z tfaber $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/misc/toolhelp.c diff --git a/dll/win32/kernel32/wine/lzexpand.c b/dll/win32/kernel32/wine/lzexpand.c index c24f3e0be14..eb4b4d2e0f9 100644 --- a/dll/win32/kernel32/wine/lzexpand.c +++ b/dll/win32/kernel32/wine/lzexpand.c @@ -1,5 +1,4 @@ -/* $Id: lzexpand.c 52854 2011-07-24 23:42:09Z ion $ - * +/* * LZ Decompression functions * * Copyright 1996 Marcus Meissner diff --git a/dll/win32/kernel32/wine/muldiv.c b/dll/win32/kernel32/wine/muldiv.c index 2f12caa54fa..45a1b872421 100644 --- a/dll/win32/kernel32/wine/muldiv.c +++ b/dll/win32/kernel32/wine/muldiv.c @@ -1,5 +1,4 @@ -/* $Id: muldiv.c 37829 2008-12-03 17:33:13Z dgorbachev $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/misc/muldiv.c diff --git a/dll/win32/kernel32/wine/timezone.c b/dll/win32/kernel32/wine/timezone.c index 6ffc5783d6f..ae0e053e24f 100644 --- a/dll/win32/kernel32/wine/timezone.c +++ b/dll/win32/kernel32/wine/timezone.c @@ -1,5 +1,4 @@ -/* $Id: timezone.c 52819 2011-07-23 18:54:29Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/misc/time.c diff --git a/dll/win32/kernel32/winnls/string/nls.c b/dll/win32/kernel32/winnls/string/nls.c index 7a9081880fb..8bfc515f162 100644 --- a/dll/win32/kernel32/winnls/string/nls.c +++ b/dll/win32/kernel32/winnls/string/nls.c @@ -1,5 +1,4 @@ -/* $Id: nls.c 52854 2011-07-24 23:42:09Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: dll/win32/kernel32/misc/nls.c diff --git a/dll/win32/lsasrv/database.c b/dll/win32/lsasrv/database.c index c74604d69dc..0b9b17bf0ad 100644 --- a/dll/win32/lsasrv/database.c +++ b/dll/win32/lsasrv/database.c @@ -293,8 +293,7 @@ LsapCreateDatabaseObjects(VOID) if (!NT_SUCCESS(Status)) goto done; - Status = LsapCreatePolicySd(&PolicySd, - &PolicySdSize); + Status = LsapCreatePolicySd(&PolicySd, &PolicySdSize); if (!NT_SUCCESS(Status)) goto done; @@ -356,7 +355,7 @@ LsapCreateDatabaseObjects(VOID) /* Set the audit events attribute */ LsapSetObjectAttribute(PolicyObject, L"PolAdtEv", - &AuditEventsInfo, + AuditEventsInfo, AuditEventsSize); /* Set the DNS Domain Name attribute */ @@ -990,7 +989,8 @@ LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject, NULL); if (!NT_SUCCESS(Status)) { - + ERR("NtCreateKey failed for '%S' with status 0x%lx\n", + AttributeName, Status); return Status; } @@ -1001,6 +1001,12 @@ LsapSetObjectAttribute(PLSA_DB_OBJECT DbObject, NtClose(AttributeKey); + if (!NT_SUCCESS(Status)) + { + ERR("RtlpNtSetValueKey failed for '%S' with status 0x%lx\n", + AttributeName, Status); + } + return Status; } diff --git a/dll/win32/msgina/stubs.c b/dll/win32/msgina/stubs.c index 581991b5e48..19fd551e2b8 100644 --- a/dll/win32/msgina/stubs.c +++ b/dll/win32/msgina/stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS msgina.dll * FILE: lib/msgina/stubs.c diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index 23ca3b7c17f..db1d101a047 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -832,7 +832,7 @@ # stub _snprintf_c # stub _snprintf_c_l # stub _snprintf_l -# stub _snprintf_s +@ varargs _snprintf_s(ptr long long ptr) # stub _snprintf_s_l # stub _snscanf # stub _snscanf_l @@ -840,7 +840,7 @@ # stub _snscanf_s_l @ varargs _snwprintf(ptr long wstr) # stub _snwprintf_l -# stub _snwprintf_s +@ varargs _snwprintf_s(ptr long long ptr) # stub _snwprintf_s_l # stub _snwscanf # stub _snwscanf_l @@ -857,7 +857,7 @@ @ cdecl _spawnvp(long str ptr) @ cdecl _spawnvpe(long str ptr ptr) @ cdecl _splitpath(str ptr ptr ptr ptr) -# stub _splitpath_s +@ cdecl _splitpath_s(str ptr long ptr long ptr long ptr long) # stub _sprintf_l # stub _sprintf_p_l # stub _sprintf_s_l @@ -985,11 +985,11 @@ @ cdecl _vsnprintf_c(ptr long str ptr) _vsnprintf # @ cdecl _vsnprintf_c_l(ptr long str ptr ptr) _vsnprintf_l # @ cdecl _vsnprintf_l(ptr long str ptr ptr) -# @ cdecl _vsnprintf_s(ptr long long str ptr) +@ cdecl _vsnprintf_s(ptr long long str ptr) # @ cdecl _vsnprintf_s_l(ptr long long str ptr ptr) @ cdecl _vsnwprintf(ptr long wstr ptr) # @ cdecl _vsnwprintf_l(ptr long wstr ptr ptr) -# @ cdecl _vsnwprintf_s(ptr long long wstr ptr) +@ cdecl _vsnwprintf_s(ptr long long wstr ptr) # @ cdecl _vsnwprintf_s_l(ptr long long wstr ptr ptr) # stub _vsprintf_l @ cdecl _vsprintf_p(ptr long str ptr) @@ -1127,7 +1127,7 @@ @ cdecl _wspawnvp(long wstr ptr) @ cdecl _wspawnvpe(long wstr ptr ptr) @ cdecl _wsplitpath(wstr ptr ptr ptr ptr) -# @ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) +@ cdecl _wsplitpath_s(wstr ptr long ptr long ptr long ptr long) @ cdecl _wstat(wstr ptr) @ cdecl _wstati64(wstr ptr) @ cdecl _wstat64(wstr ptr) @@ -1313,7 +1313,7 @@ @ cdecl -arch=x86_64 sinf(long) @ cdecl sinh(double) @ varargs sprintf(ptr str) -# @ varargs sprintf_s(ptr long str) +@ varargs sprintf_s(ptr long str) @ cdecl sqrt(double) @ cdecl -arch=x86_64 sqrtf(long) @ cdecl srand(long) @@ -1348,7 +1348,7 @@ @ cdecl strtoul(str ptr long) @ cdecl strxfrm(ptr str long) @ varargs swprintf(ptr wstr) -# @ varargs swprintf_s(ptr long wstr) +@ varargs swprintf_s(ptr long wstr) @ varargs swscanf(wstr wstr) # @ varargs swscanf_s(wstr wstr) @ cdecl system(str) @@ -1374,9 +1374,9 @@ @ cdecl vprintf_s(str ptr) # stub vsnprintf @ cdecl vsprintf(ptr str ptr) -# @ cdecl vsprintf_s(ptr long str ptr) +@ cdecl vsprintf_s(ptr long str ptr) @ cdecl vswprintf(ptr wstr ptr) -# @ cdecl vswprintf_s(ptr long wstr ptr) +@ cdecl vswprintf_s(ptr long wstr ptr) @ cdecl vwprintf(wstr ptr) @ cdecl vwprintf_s(wstr ptr) # stub wcrtomb diff --git a/dll/win32/mswsock/extensions.c b/dll/win32/mswsock/extensions.c index acb7ba07794..30642672b97 100644 --- a/dll/win32/mswsock/extensions.c +++ b/dll/win32/mswsock/extensions.c @@ -1,10 +1,9 @@ -/* $Id: stubs.c 12852 2005-01-06 13:58:04Z mf $ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS WinSock DLL - * FILE: stubs.c - * PURPOSE: WSAIoctl wrappers for Microsoft extensions to Winsock - * PROGRAMMERS: KJK::Hyperion +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WinSock DLL + * FILE: stubs.c + * PURPOSE: WSAIoctl wrappers for Microsoft extensions to Winsock + * PROGRAMMERS: KJK::Hyperion * REVISIONS: */ diff --git a/dll/win32/mswsock/stubs.c b/dll/win32/mswsock/stubs.c index fe74b00b187..7661bee08fb 100644 --- a/dll/win32/mswsock/stubs.c +++ b/dll/win32/mswsock/stubs.c @@ -1,10 +1,9 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS WinSock DLL - * FILE: stubs.c - * PURPOSE: Stub functions - * PROGRAMMERS: Ge van Geldorp (ge@gse.nl) +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS WinSock DLL + * FILE: stubs.c + * PURPOSE: Stub functions + * PROGRAMMERS: Ge van Geldorp (ge@gse.nl) * REVISIONS: */ diff --git a/dll/win32/ntmarta/ntmarta.c b/dll/win32/ntmarta/ntmarta.c index 251b6f54882..e45f1e596a3 100644 --- a/dll/win32/ntmarta/ntmarta.c +++ b/dll/win32/ntmarta/ntmarta.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id: ntmarta.c 31176 2007-12-12 07:04:12Z weiden $ - * +/* * PROJECT: ReactOS MARTA provider * FILE: lib/ntmarta/ntmarta.c * PURPOSE: ReactOS MARTA provider diff --git a/dll/win32/psapi/internal.h b/dll/win32/psapi/internal.h index 91579d66694..8d6245ba999 100644 --- a/dll/win32/psapi/internal.h +++ b/dll/win32/psapi/internal.h @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * epsapi.h * diff --git a/dll/win32/psapi/malloc.c b/dll/win32/psapi/malloc.c index 089019e78ec..49357e6b61c 100644 --- a/dll/win32/psapi/malloc.c +++ b/dll/win32/psapi/malloc.c @@ -1,5 +1,3 @@ -/* $Id$ - */ /* * COPYRIGHT: None * LICENSE: Public domain diff --git a/dll/win32/psapi/psapi.c b/dll/win32/psapi/psapi.c index 03734a92295..12a3ba03bab 100644 --- a/dll/win32/psapi/psapi.c +++ b/dll/win32/psapi/psapi.c @@ -1,5 +1,3 @@ -/* $Id$ - */ /* * COPYRIGHT: See COPYING in the top level directory * LICENSE: See LGPL.txt in the top level directory diff --git a/dll/win32/samlib/dllmain.c b/dll/win32/samlib/dllmain.c index e790d30be05..4e66cebdcfd 100644 --- a/dll/win32/samlib/dllmain.c +++ b/dll/win32/samlib/dllmain.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: SAM interface library diff --git a/dll/win32/samlib/samlib.c b/dll/win32/samlib/samlib.c index 74122acade1..9225a8708b2 100644 --- a/dll/win32/samlib/samlib.c +++ b/dll/win32/samlib/samlib.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: SAM interface library diff --git a/dll/win32/samsrv/CMakeLists.txt b/dll/win32/samsrv/CMakeLists.txt index 101748a9f2f..0639b26f9e2 100644 --- a/dll/win32/samsrv/CMakeLists.txt +++ b/dll/win32/samsrv/CMakeLists.txt @@ -8,6 +8,7 @@ add_rpc_files(server ${REACTOS_SOURCE_DIR}/include/reactos/idl/sam.idl) spec2def(samsrv.dll samsrv.spec ADD_IMPORTLIB) list(APPEND SOURCE + alias.c database.c domain.c group.c diff --git a/dll/win32/samsrv/alias.c b/dll/win32/samsrv/alias.c new file mode 100644 index 00000000000..96e70c854a8 --- /dev/null +++ b/dll/win32/samsrv/alias.c @@ -0,0 +1,42 @@ +/* + * PROJECT: Local Security Authority Server DLL + * LICENSE: GPL - See COPYING in the top level directory + * FILE: dll/win32/samsrv/alias.c + * PURPOSE: Alias specific helper functions + * COPYRIGHT: Copyright 2013 Eric Kohl + */ + +/* INCLUDES ****************************************************************/ + +#include "samsrv.h" + +WINE_DEFAULT_DEBUG_CHANNEL(samsrv); + + +/* FUNCTIONS ***************************************************************/ + +NTSTATUS +SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject, + IN ULONG AliasId, + IN ACCESS_MASK DesiredAccess, + OUT PSAM_DB_OBJECT *AliasObject) +{ + WCHAR szRid[9]; + + TRACE("(%p %lu %lx %p)\n", + DomainObject, AliasId, DesiredAccess, AliasObject); + + /* Convert the RID into a string (hex) */ + swprintf(szRid, L"%08lX", AliasId); + + /* Create the user object */ + return SampOpenDbObject(DomainObject, + L"Aliases", + szRid, + AliasId, + SamDbAliasObject, + DesiredAccess, + AliasObject); +} + +/* EOF */ diff --git a/dll/win32/samsrv/database.c b/dll/win32/samsrv/database.c index 3d2a8825ce1..fc459a073fc 100644 --- a/dll/win32/samsrv/database.c +++ b/dll/win32/samsrv/database.c @@ -210,7 +210,7 @@ SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, } NewObject = RtlAllocateHeap(RtlGetProcessHeap(), - 0, + HEAP_ZERO_MEMORY, sizeof(SAM_DB_OBJECT)); if (NewObject == NULL) { @@ -243,6 +243,9 @@ SampCreateDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->RelativeId = RelativeId; NewObject->ParentObject = ParentObject; + if (ParentObject != NULL) + NewObject->Trusted = ParentObject->Trusted; + *DbObject = NewObject; return STATUS_SUCCESS; @@ -359,7 +362,7 @@ SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, } NewObject = RtlAllocateHeap(RtlGetProcessHeap(), - 0, + HEAP_ZERO_MEMORY, sizeof(SAM_DB_OBJECT)); if (NewObject == NULL) { @@ -391,6 +394,9 @@ SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, NewObject->RelativeId = RelativeId; NewObject->ParentObject = ParentObject; + if (ParentObject != NULL) + NewObject->Trusted = ParentObject->Trusted; + *DbObject = NewObject; return STATUS_SUCCESS; diff --git a/dll/win32/samsrv/group.c b/dll/win32/samsrv/group.c index 4b1ab718a3d..9bf0c86168e 100644 --- a/dll/win32/samsrv/group.c +++ b/dll/win32/samsrv/group.c @@ -15,6 +15,30 @@ WINE_DEFAULT_DEBUG_CHANNEL(samsrv); /* FUNCTIONS ***************************************************************/ +NTSTATUS +SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject, + IN ULONG GroupId, + IN ACCESS_MASK DesiredAccess, + OUT PSAM_DB_OBJECT *GroupObject) +{ + WCHAR szRid[9]; + + TRACE("(%p %lu %lx %p)\n", + DomainObject, GroupId, DesiredAccess, GroupObject); + + /* Convert the RID into a string (hex) */ + swprintf(szRid, L"%08lX", GroupId); + + /* Create the user object */ + return SampOpenDbObject(DomainObject, + L"Groups", + szRid, + GroupId, + SamDbGroupObject, + DesiredAccess, + GroupObject); +} + NTSTATUS SampAddMemberToGroup(IN PSAM_DB_OBJECT GroupObject, diff --git a/dll/win32/samsrv/samrpc.c b/dll/win32/samsrv/samrpc.c index ead3344d7c9..24892e596aa 100644 --- a/dll/win32/samsrv/samrpc.c +++ b/dll/win32/samsrv/samrpc.c @@ -57,6 +57,8 @@ static GENERIC_MAPPING UserMapping = USER_ALL_ACCESS }; +PGENERIC_MAPPING pServerMapping = &ServerMapping; + /* FUNCTIONS *****************************************************************/ @@ -203,8 +205,23 @@ NTSTATUS NTAPI SamrShutdownSamServer(IN SAMPR_HANDLE ServerHandle) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PSAM_DB_OBJECT ServerObject; + NTSTATUS Status; + + TRACE("(%p)\n", ServerHandle); + + /* Validate the server handle */ + Status = SampValidateDbObject(ServerHandle, + SamDbServerObject, + SAM_SERVER_SHUTDOWN, + &ServerObject); + if (!NT_SUCCESS(Status)) + return Status; + + /* Shut the server down */ + RpcMgmtStopServerListening(0); + + return STATUS_SUCCESS; } @@ -6043,14 +6060,19 @@ done: } -static NTSTATUS +static +NTSTATUS SampQueryUserInternal1(PSAM_DB_OBJECT UserObject, - PSAMPR_USER_INFO_BUFFER *Buffer) + PSAMPR_USER_INFO_BUFFER *Buffer) { PSAMPR_USER_INFO_BUFFER InfoBuffer = NULL; ULONG Length = 0; NTSTATUS Status = STATUS_SUCCESS; + /* Fail, if the caller is not a trusted caller */ + if (UserObject->Trusted == FALSE) + return STATUS_INVALID_INFO_CLASS; + *Buffer = NULL; InfoBuffer = midl_user_allocate(sizeof(SAMPR_USER_INFO_BUFFER)); diff --git a/dll/win32/samsrv/samsrv.c b/dll/win32/samsrv/samsrv.c index c78cfb856b2..59d5b8718cf 100644 --- a/dll/win32/samsrv/samsrv.c +++ b/dll/win32/samsrv/samsrv.c @@ -25,6 +25,43 @@ WINE_DEFAULT_DEBUG_CHANNEL(samsrv); /* FUNCTIONS ****************************************************************/ +NTSTATUS +NTAPI +SamIConnect(IN PSAMPR_SERVER_NAME ServerName, + OUT SAMPR_HANDLE *ServerHandle, + IN ACCESS_MASK DesiredAccess, + IN BOOLEAN Trusted) +{ + PSAM_DB_OBJECT ServerObject; + NTSTATUS Status; + + TRACE("SamIConnect(%p %p %lx %ld)\n", + ServerName, ServerHandle, DesiredAccess, Trusted); + + /* Map generic access rights */ + RtlMapGenericMask(&DesiredAccess, + pServerMapping); + + /* Open the Server Object */ + Status = SampOpenDbObject(NULL, + NULL, + L"SAM", + 0, + SamDbServerObject, + DesiredAccess, + &ServerObject); + if (NT_SUCCESS(Status)) + { + ServerObject->Trusted = Trusted; + *ServerHandle = (SAMPR_HANDLE)ServerObject; + } + + TRACE("SamIConnect done (Status 0x%08lx)\n", Status); + + return Status; +} + + NTSTATUS NTAPI SamIInitialize(VOID) @@ -64,6 +101,20 @@ SampInitializeRegistry(VOID) } +VOID +NTAPI +SamIFree_SAMPR_PSID_ARRAY(PSAMPR_PSID_ARRAY Ptr) +{ + if (Ptr != NULL) + { + if (Ptr->Sids !=0) + { + MIDL_user_free(Ptr->Sids); + } + } +} + + VOID NTAPI SamIFree_SAMPR_RETURNED_USTRING_ARRAY(PSAMPR_RETURNED_USTRING_ARRAY Ptr) diff --git a/dll/win32/samsrv/samsrv.h b/dll/win32/samsrv/samsrv.h index a9bc13ed5ec..672211b68b4 100644 --- a/dll/win32/samsrv/samsrv.h +++ b/dll/win32/samsrv/samsrv.h @@ -50,6 +50,7 @@ typedef struct _SAM_DB_OBJECT HANDLE KeyHandle; HANDLE MembersKeyHandle; // only used by Aliases ULONG RelativeId; + BOOLEAN Trusted; struct _SAM_DB_OBJECT *ParentObject; } SAM_DB_OBJECT, *PSAM_DB_OBJECT; @@ -68,11 +69,11 @@ typedef struct _SAM_DOMAIN_FIXED_DATA ULONG Reserved; LARGE_INTEGER CreationTime; LARGE_INTEGER DomainModifiedCount; - LARGE_INTEGER MaxPasswordAge; - LARGE_INTEGER MinPasswordAge; - LARGE_INTEGER ForceLogoff; - LARGE_INTEGER LockoutDuration; - LARGE_INTEGER LockoutObservationWindow; + LARGE_INTEGER MaxPasswordAge; /* relative Time */ + LARGE_INTEGER MinPasswordAge; /* relative Time */ + LARGE_INTEGER ForceLogoff; /* relative Time */ + LARGE_INTEGER LockoutDuration; /* relative Time */ + LARGE_INTEGER LockoutObservationWindow; /* relative Time */ LARGE_INTEGER ModifiedCountAtLastPromotion; ULONG NextRid; ULONG PasswordProperties; @@ -113,6 +114,18 @@ typedef struct _SAM_USER_FIXED_DATA } SAM_USER_FIXED_DATA, *PSAM_USER_FIXED_DATA; +extern PGENERIC_MAPPING pServerMapping; + + +/* alias.c */ + +NTSTATUS +SampOpenAliasObject(IN PSAM_DB_OBJECT DomainObject, + IN ULONG AliasId, + IN ACCESS_MASK DesiredAccess, + OUT PSAM_DB_OBJECT *AliasObject); + + /* database.c */ NTSTATUS @@ -188,6 +201,12 @@ SampCheckAccountNameInDomain(IN PSAM_DB_OBJECT DomainObject, /* group.h */ +NTSTATUS +SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject, + IN ULONG GroupId, + IN ACCESS_MASK DesiredAccess, + OUT PSAM_DB_OBJECT *GroupObject); + NTSTATUS SampAddMemberToGroup(IN PSAM_DB_OBJECT GroupObject, IN ULONG MemberId); @@ -297,6 +316,9 @@ SampSetUserGroupAttributes(IN PSAM_DB_OBJECT DomainObject, IN ULONG GroupId, IN ULONG GroupAttributes); +NTSTATUS +SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject); + NTSTATUS SampSetUserPassword(IN PSAM_DB_OBJECT UserObject, IN PENCRYPTED_NT_OWF_PASSWORD NtPassword, diff --git a/dll/win32/samsrv/samsrv.spec b/dll/win32/samsrv/samsrv.spec index a6c9e5a50ae..e4ae0d2b29f 100644 --- a/dll/win32/samsrv/samsrv.spec +++ b/dll/win32/samsrv/samsrv.spec @@ -1,7 +1,22 @@ @ stub SamIAccountRestrictions -@ stub SamIConnect +@ stub SamIAddDSNameToAlias +@ stub SamIAddDSNameToGroup +@ stub SamIAmIGC +@ stub SamIChangePasswordForeignUser +@ stub SamIChangePasswordForeignUser2 +@ stdcall SamIConnect(ptr ptr long long) @ stub SamICreateAccountByRid +@ stub SamIDemote +@ stub SamIDemoteUndo +@ stub SamIDoFSMORoleChange +@ stub SamIDsCreateObjectInDomain +@ stub SamIDsSetObjectInformation @ stub SamIEnumerateAccountRids +@ stub SamIEnumerateInterdomainTrustAccountsForUpgrade +@ stub SamIFloatingSingleMasterOpEx +@ stub SamIFreeSidAndAttributesList +@ stub SamIFreeSidArray +@ stub SamIFreeVoid @ stub SamIFree_SAMPR_ALIAS_INFO_BUFFER @ stub SamIFree_SAMPR_DISPLAY_INFO_BUFFER @ stub SamIFree_SAMPR_DOMAIN_INFO_BUFFER @@ -9,20 +24,88 @@ @ stub SamIFree_SAMPR_GET_GROUPS_BUFFER @ stub SamIFree_SAMPR_GET_MEMBERS_BUFFER @ stub SamIFree_SAMPR_GROUP_INFO_BUFFER -@ stub SamIFree_SAMPR_PSID_ARRAY +@ stdcall SamIFree_SAMPR_PSID_ARRAY(ptr) @ stdcall SamIFree_SAMPR_RETURNED_USTRING_ARRAY(ptr) @ stub SamIFree_SAMPR_SR_SECURITY_DESCRIPTOR @ stdcall SamIFree_SAMPR_ULONG_ARRAY(ptr) @ stub SamIFree_SAMPR_USER_INFO_BUFFER +@ stub SamIFree_UserInternal6Information +@ stub SamIGCLookupNames +@ stub SamIGCLookupSids +@ stub SamIGetAliasMembership +@ stub SamIGetBootKeyInformation +@ stub SamIGetDefaultAdministratorName +@ stub SamIGetFixedAttributes +@ stub SamIGetinterdomainTrustAccountPasswordsForUpgrade @ stub SamIGetPrivateData +@ stub SamIGetResourceGroupmembershipsTransitive @ stub SamIGetSerialNumberDomain +@ stub SamIGetuserLogonInformation +@ stub SamIGetuserLogonInformation2 +@ stub SamIGetuserLogonInformationEx +@ stub SamIImpersonateNullSession +@ stub SamIIncrementPerformanceCounter @ stdcall SamIInitialize() +@ stub SamIIsDownlevelDcUpgrade +@ stub SamIIsExtendedSidMode +@ stub SamIIsRebootAfterPromotion +@ stub SamIIsSetupInProgress +@ stub SamILoadDownlevelDatabase +@ stub SamILoopbackConnect +@ stub SamIMixedDomain +@ stub SamIMixedDomain2 +@ stub SamINT4UpgradeInProgress +@ stub SamINetLogonPing @ stub SamINotifyDelta +@ stub SamINotifyRoleChange +@ stub SamINotifyServerDelta +@ stub SamIOpenAccount +@ stub SamIOpenUserByAlternateId +@ stub SamIPromote +@ stub SamIPromoteUndo +@ stub SamIQueryServerRole +@ stub SamIQueryServerRole2 +@ stub SamIRemoveDSNameFromAlias +@ stub SamIRemoveDSNameFromGroup +@ stub SamIRelaceDownlevelDatabase +@ stub SamIResetBadPwdCountOnPdc +@ stub SamIRetrievePrimaryCredentials +@ stub SamIRevertNullSession +@ stub SamISameSite @ stub SamISetAuditingInformation +@ stub SamISetMixedDomainFlag +@ stub SamISetPasswordForeignUser +@ stub SamISetPasswordForeignUser2 +@ stub SamISetPasswordInfoOnPdc @ stub SamISetPrivateData @ stub SamISetSerialNumberDomain +@ stub SamIStorePrimaryCredentials +@ stub SamIUPNFromUserHandle +@ stub SamIUnLoadDownlevelDatabase +@ stub SamIUpdateLogonStatistics +@ stub SampAbortSingleLoopbackTask +@ stub SampAccountControlToFlags +@ stub SampAcquireSamLockExclusive +@ stub SampAcquireWriteLock +@ stub SampCommitBufferedWrites +@ stub SampConvertNt4SdToNt5Sd +@ stub SampDsChangePasswordUser +@ stub SampFlagsToAccountControl +@ stub SampGetDefaultSecurityDescriptorForClass +@ stub SampGetSerialNumberDomain2 @ stdcall SampInitializeRegistry() +@ stub SampInitializeSdConversion +@ stub SampInvalidateDomainCache +@ stub SampInvalidateRidRange +@ stub SampNetLogonNotificationRequired +@ stub SampNotifyReplicatedInChange +@ stub SampProcessSingleLoopbackTask +@ stub SampReleaseSamLockExclusive +@ stub SampReleaseWriteLock @ stub SampRtlConvertUlongToUnicodeString +@ stub SampSetSerialNumberDomain2 +@ stub SampUsingDsData +@ stub SampWriteGroupType @ stdcall SamrAddMemberToAlias(ptr ptr) @ stdcall SamrAddMemberToGroup(ptr long long) @ stdcall SamrAddMultipleMembersToAlias(ptr ptr) @@ -31,6 +114,7 @@ @ stdcall SamrConnect(ptr ptr long) @ stdcall SamrCreateAliasInDomain(ptr ptr long ptr ptr) @ stdcall SamrCreateGroupInDomain(ptr ptr long ptr ptr) +@ stdcall SamrCreateUser2InDomain(ptr ptr long long ptr ptr ptr) @ stdcall SamrCreateUserInDomain(ptr ptr long ptr ptr) @ stdcall SamrDeleteAlias(ptr) @ stdcall SamrDeleteGroup(ptr) @@ -61,6 +145,7 @@ @ stdcall SamrRemoveMemberFromForeignDomain(ptr ptr) @ stdcall SamrRemoveMemberFromGroup(ptr long) @ stdcall SamrRemoveMultipleMembersFromAlias(ptr ptr) +@ stdcall SamrRidToSid(ptr long ptr) @ stdcall SamrSetInformationAlias(ptr long ptr) @ stdcall SamrSetInformationDomain(ptr long ptr) @ stdcall SamrSetInformationGroup(ptr long ptr) @@ -70,4 +155,5 @@ @ stdcall SamrShutdownSamServer(ptr) @ stdcall SamrTestPrivateFunctionsDomain(ptr) @ stdcall SamrTestPrivateFunctionsUser(ptr) -; EOF \ No newline at end of file +@ stdcall SamrUnicodeChangePasswordUser2(ptr ptr ptr ptr ptr long ptr ptr) +; EOF diff --git a/dll/win32/samsrv/setup.c b/dll/win32/samsrv/setup.c index 6f87a600fc0..bab10fecda2 100644 --- a/dll/win32/samsrv/setup.c +++ b/dll/win32/samsrv/setup.c @@ -13,10 +13,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(samsrv); + /* GLOBALS *****************************************************************/ +#define TICKS_PER_SECOND 10000000LL + SID_IDENTIFIER_AUTHORITY SecurityNtAuthority = {SECURITY_NT_AUTHORITY}; + /* FUNCTIONS ***************************************************************/ BOOL @@ -423,11 +427,11 @@ SampCreateDomain(IN HKEY hDomainsKey, FixedData.Version = 1; NtQuerySystemTime(&FixedData.CreationTime); FixedData.DomainModifiedCount.QuadPart = 0; -// FixedData.MaxPasswordAge // 6 Weeks - FixedData.MinPasswordAge.QuadPart = 0; // Now -// FixedData.ForceLogoff -// FixedData.LockoutDuration // 30 minutes -// FixedData.LockoutObservationWindow // 30 minutes + FixedData.MaxPasswordAge.QuadPart = -(6LL * 7LL * 24LL * 60LL * 60LL * TICKS_PER_SECOND); /* 6 weeks */ + FixedData.MinPasswordAge.QuadPart = 0; /* right now */ +// FixedData.ForceLogoff.QuadPart = // very far in the future aka never + FixedData.LockoutDuration.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */ + FixedData.LockoutObservationWindow.QuadPart = -(30LL * 60LL * TICKS_PER_SECOND); /* 30 minutes */ FixedData.ModifiedCountAtLastPromotion.QuadPart = 0; FixedData.NextRid = 1000; FixedData.PasswordProperties = 0; diff --git a/dll/win32/samsrv/user.c b/dll/win32/samsrv/user.c index 0aa392a4a4d..a80402bd4ab 100644 --- a/dll/win32/samsrv/user.c +++ b/dll/win32/samsrv/user.c @@ -320,6 +320,69 @@ done: } +NTSTATUS +SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject) +{ + PGROUP_MEMBERSHIP GroupsBuffer = NULL; + PSAM_DB_OBJECT GroupObject; + ULONG Length = 0; + ULONG i; + NTSTATUS Status; + + SampGetObjectAttribute(UserObject, + L"Groups", + NULL, + NULL, + &Length); + + if (Length == 0) + return STATUS_SUCCESS; + + GroupsBuffer = midl_user_allocate(Length); + if (GroupsBuffer == NULL) + { + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + Status = SampGetObjectAttribute(UserObject, + L"Groups", + NULL, + GroupsBuffer, + &Length); + if (!NT_SUCCESS(Status)) + goto done; + + for (i = 0; i < (Length / sizeof(GROUP_MEMBERSHIP)); i++) + { + Status = SampOpenGroupObject(UserObject->ParentObject, + GroupsBuffer[i].RelativeId, + 0, + &GroupObject); + if (!NT_SUCCESS(Status)) + { + goto done; + } + + Status = SampRemoveMemberFromGroup(GroupObject, + UserObject->RelativeId); + + SampCloseDbObject(GroupObject); + + if (!NT_SUCCESS(Status)) + { + goto done; + } + } + +done: + if (GroupsBuffer != NULL) + midl_user_free(GroupsBuffer); + + return Status; +} + + NTSTATUS SampSetUserPassword(IN PSAM_DB_OBJECT UserObject, IN PENCRYPTED_NT_OWF_PASSWORD NtPassword, diff --git a/dll/win32/secur32/dllmain.c b/dll/win32/secur32/dllmain.c index 39f8ad0c42d..481cc5c2b2c 100644 --- a/dll/win32/secur32/dllmain.c +++ b/dll/win32/secur32/dllmain.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/secur32/lsa.c diff --git a/dll/win32/smdll/dllmain.c b/dll/win32/smdll/dllmain.c index ade429ad204..604f8944d40 100644 --- a/dll/win32/smdll/dllmain.c +++ b/dll/win32/smdll/dllmain.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS * FILE: lib/smdll/dllmain.c diff --git a/dll/win32/smdll/query.c b/dll/win32/smdll/query.c index 6dff3678abf..a26e8b7b1c9 100644 --- a/dll/win32/smdll/query.c +++ b/dll/win32/smdll/query.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/smdll/query.c diff --git a/dll/win32/smdll/readme.txt b/dll/win32/smdll/readme.txt index e2b8c33ba5f..d5551610031 100644 --- a/dll/win32/smdll/readme.txt +++ b/dll/win32/smdll/readme.txt @@ -1,4 +1,3 @@ -$Id$ This is SMDLL: a helper library to talk to the ReactOS session manager (SM). diff --git a/dll/win32/syssetup/dllmain.c b/dll/win32/syssetup/dllmain.c index 643f8ee855e..731a784ab90 100644 --- a/dll/win32/syssetup/dllmain.c +++ b/dll/win32/syssetup/dllmain.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Main file diff --git a/dll/win32/syssetup/install.c b/dll/win32/syssetup/install.c index 43867e28427..4869e8ee8f8 100644 --- a/dll/win32/syssetup/install.c +++ b/dll/win32/syssetup/install.c @@ -439,10 +439,10 @@ EnableUserModePnpManager(VOID) bRet = TRUE; cleanup: - if (hSCManager != NULL) - CloseServiceHandle(hSCManager); if (hService != NULL) CloseServiceHandle(hService); + if (hSCManager != NULL) + CloseServiceHandle(hSCManager); return bRet; } diff --git a/dll/win32/userenv/desktop.c b/dll/win32/userenv/desktop.c index 55ebba20880..1cc1a8c2cd4 100644 --- a/dll/win32/userenv/desktop.c +++ b/dll/win32/userenv/desktop.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/desktop.c diff --git a/dll/win32/userenv/directory.c b/dll/win32/userenv/directory.c index 0cabeee075c..c42030b5b21 100644 --- a/dll/win32/userenv/directory.c +++ b/dll/win32/userenv/directory.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/directory.c diff --git a/dll/win32/userenv/environment.c b/dll/win32/userenv/environment.c index cab99597406..c07db234bcb 100644 --- a/dll/win32/userenv/environment.c +++ b/dll/win32/userenv/environment.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/environment.c diff --git a/dll/win32/userenv/internal.h b/dll/win32/userenv/internal.h index 526e1589120..07c14980663 100644 --- a/dll/win32/userenv/internal.h +++ b/dll/win32/userenv/internal.h @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/internal.h diff --git a/dll/win32/userenv/misc.c b/dll/win32/userenv/misc.c index 9af05efb794..92e66c126f8 100644 --- a/dll/win32/userenv/misc.c +++ b/dll/win32/userenv/misc.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/misc.c diff --git a/dll/win32/userenv/registry.c b/dll/win32/userenv/registry.c index dec7685802d..cd822f8af1f 100644 --- a/dll/win32/userenv/registry.c +++ b/dll/win32/userenv/registry.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/registry.c diff --git a/dll/win32/userenv/resources.h b/dll/win32/userenv/resources.h index 9f9120c14e1..a78cd0a4a6b 100644 --- a/dll/win32/userenv/resources.h +++ b/dll/win32/userenv/resources.h @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/resource.h diff --git a/dll/win32/userenv/setup.c b/dll/win32/userenv/setup.c index b2a9ff04fd0..f662110982b 100644 --- a/dll/win32/userenv/setup.c +++ b/dll/win32/userenv/setup.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/setup.c diff --git a/dll/win32/userenv/userenv.c b/dll/win32/userenv/userenv.c index d1338cbdf95..6295fd7fae3 100644 --- a/dll/win32/userenv/userenv.c +++ b/dll/win32/userenv/userenv.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/userenv/userenv.c diff --git a/dll/win32/winfax/winfax.c b/dll/win32/winfax/winfax.c index bb1b400c916..3576b7ad893 100644 --- a/dll/win32/winfax/winfax.c +++ b/dll/win32/winfax/winfax.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS FAX API Support * FILE: lib/winfax/winfax.c * PURPOSE: ReactOS FAX API Support diff --git a/dll/win32/winscard/winscard.c b/dll/win32/winscard/winscard.c index 9d993fe6726..e2eb7557c0d 100644 --- a/dll/win32/winscard/winscard.c +++ b/dll/win32/winscard/winscard.c @@ -16,8 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS SmartCard API * FILE: lib/winscard/winscard.c * PURPOSE: ReactOS SmartCard API diff --git a/dll/win32/winscard/winscard.rc b/dll/win32/winscard/winscard.rc index e15de3ac0c7..19959dca71c 100644 --- a/dll/win32/winscard/winscard.rc +++ b/dll/win32/winscard/winscard.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS SmartCard API\0" diff --git a/dll/win32/winspool/stubs.c b/dll/win32/winspool/stubs.c index d1f32d4ec92..35c4518c3ac 100644 --- a/dll/win32/winspool/stubs.c +++ b/dll/win32/winspool/stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS winspool DRV * FILE: stubs.c diff --git a/dll/win32/wsock32/stubs.c b/dll/win32/wsock32/stubs.c index 9bedf5183e2..fb64df3ff2a 100644 --- a/dll/win32/wsock32/stubs.c +++ b/dll/win32/wsock32/stubs.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock DLL * FILE: stubs.c diff --git a/drivers/base/beep/beep.rc b/drivers/base/beep/beep.rc index 7bc431afa99..4d9ae9903c8 100644 --- a/drivers/base/beep/beep.rc +++ b/drivers/base/beep/beep.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "PC Speaker Device Driver\0" diff --git a/drivers/base/bootvid/bootvid.rc b/drivers/base/bootvid/bootvid.rc index e491cb0d9a4..94fc8f0bd01 100644 --- a/drivers/base/bootvid/bootvid.rc +++ b/drivers/base/bootvid/bootvid.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "VGA Boot Driver\0" diff --git a/drivers/base/kdcom/kdcom.rc b/drivers/base/kdcom/kdcom.rc index c33d67fb32d..48cc0b847cb 100644 --- a/drivers/base/kdcom/kdcom.rc +++ b/drivers/base/kdcom/kdcom.rc @@ -1,12 +1,6 @@ -/* $Id: bootvid.rc 24464 2006-10-09 04:00:34Z ion $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS KDBG COM Library\0" #define REACTOS_STR_INTERNAL_NAME "kdcom\0" #define REACTOS_STR_ORIGINAL_FILENAME "kdcom.sys\0" #include - -IDB_BOOTIMAGE BITMAP DISCARDABLE "bootimage.bmp" -IDB_BAR BITMAP DISCARDABLE "bar.bmp" - - diff --git a/drivers/base/null/null.rc b/drivers/base/null/null.rc index 5b0112577f8..fe0e7bf4453 100644 --- a/drivers/base/null/null.rc +++ b/drivers/base/null/null.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Null Device Driver\0" diff --git a/drivers/bus/acpi/acpi.rc b/drivers/bus/acpi/acpi.rc index 7a466943475..82a090ca49a 100644 --- a/drivers/bus/acpi/acpi.rc +++ b/drivers/bus/acpi/acpi.rc @@ -1,4 +1,3 @@ -/* $Id: acpi.rc 21698 2006-04-22 05:55:17Z tretiakov $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ReactOS ACPI Driver\0" diff --git a/drivers/bus/acpi/acpienum.c b/drivers/bus/acpi/acpienum.c index 5e94468c664..4abb3dacfe6 100644 --- a/drivers/bus/acpi/acpienum.c +++ b/drivers/bus/acpi/acpienum.c @@ -1,5 +1,4 @@ -/* $Id: acpienum.c 21698 2006-04-22 05:55:17Z tretiakov $ - * +/* * PROJECT: ReactOS ACPI bus driver * FILE: acpi/ospm/acpienum.c * PURPOSE: ACPI namespace enumerator diff --git a/drivers/bus/isapnp/isapnp.rc b/drivers/bus/isapnp/isapnp.rc index cc52ebe2744..7e49fdbe730 100644 --- a/drivers/bus/isapnp/isapnp.rc +++ b/drivers/bus/isapnp/isapnp.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ISA Plug And Play Bus Driver\0" diff --git a/drivers/bus/pci/pci.rc b/drivers/bus/pci/pci.rc index ed1ed12f38d..0cb65559652 100644 --- a/drivers/bus/pci/pci.rc +++ b/drivers/bus/pci/pci.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "PCI Bus Driver\0" diff --git a/drivers/bus/pci/pcidef.h b/drivers/bus/pci/pcidef.h index 34407c4e856..73f4caf3eb3 100644 --- a/drivers/bus/pci/pcidef.h +++ b/drivers/bus/pci/pcidef.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * PCI defines and function prototypes * Copyright 1994, Drew Eckhardt * Copyright 1997--1999 Martin Mares diff --git a/drivers/filesystems/cdfs/cdfs.c b/drivers/filesystems/cdfs/cdfs.c index 172282eff77..5be1d5c957a 100644 --- a/drivers/filesystems/cdfs/cdfs.c +++ b/drivers/filesystems/cdfs/cdfs.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2003 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: drivers/fs/cdfs/cdfs.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -*/ + * ReactOS kernel + * Copyright (C) 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/fs/cdfs/cdfs.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/cdfs.rc b/drivers/filesystems/cdfs/cdfs.rc index 08da8919a11..d5d0e6270a9 100644 --- a/drivers/filesystems/cdfs/cdfs.rc +++ b/drivers/filesystems/cdfs/cdfs.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ISO9660 Driver\0" diff --git a/drivers/filesystems/cdfs/cleanup.c b/drivers/filesystems/cdfs/cleanup.c index 3e0100f655a..af894fbc89b 100644 --- a/drivers/filesystems/cdfs/cleanup.c +++ b/drivers/filesystems/cdfs/cleanup.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/cleanup.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/cleanup.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/close.c b/drivers/filesystems/cdfs/close.c index 38f7e0aceaf..b5f3510ba97 100644 --- a/drivers/filesystems/cdfs/close.c +++ b/drivers/filesystems/cdfs/close.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/close.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/close.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/common.c b/drivers/filesystems/cdfs/common.c index d73864bb054..2dc126e2308 100644 --- a/drivers/filesystems/cdfs/common.c +++ b/drivers/filesystems/cdfs/common.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2003 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: drivers/fs/cdfs/common.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -*/ + * ReactOS kernel + * Copyright (C) 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/fs/cdfs/common.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/create.c b/drivers/filesystems/cdfs/create.c index d7a6440d820..39e5ca86189 100644 --- a/drivers/filesystems/cdfs/create.c +++ b/drivers/filesystems/cdfs/create.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2003, 2004 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/cdfs.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -*/ + * ReactOS kernel + * Copyright (C) 2002, 2003, 2004 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/cdfs.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/dirctl.c b/drivers/filesystems/cdfs/dirctl.c index 3cb8ada2ba9..9a130a701c7 100644 --- a/drivers/filesystems/cdfs/dirctl.c +++ b/drivers/filesystems/cdfs/dirctl.c @@ -1,31 +1,30 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2004 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/dirctl.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002, 2004 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/dirctl.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/fcb.c b/drivers/filesystems/cdfs/fcb.c index 12bee1dd753..0b5240819ef 100644 --- a/drivers/filesystems/cdfs/fcb.c +++ b/drivers/filesystems/cdfs/fcb.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2004 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/fcb.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002, 2004 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/fcb.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/finfo.c b/drivers/filesystems/cdfs/finfo.c index 3ad68bcd890..c93cbbb4417 100644 --- a/drivers/filesystems/cdfs/finfo.c +++ b/drivers/filesystems/cdfs/finfo.c @@ -1,31 +1,30 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2004 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/finfo.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002, 2004 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/finfo.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/misc.c b/drivers/filesystems/cdfs/misc.c index d1f618a7334..fd48da28270 100644 --- a/drivers/filesystems/cdfs/misc.c +++ b/drivers/filesystems/cdfs/misc.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2004 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/cdfs/misc.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Eric Kohl -* UPDATE HISTORY: -*/ + * ReactOS kernel + * Copyright (C) 2002, 2004 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/cdfs/misc.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Eric Kohl + * UPDATE HISTORY: + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/rw.c b/drivers/filesystems/cdfs/rw.c index ef94d22e3ff..72cd9c3eea0 100644 --- a/drivers/filesystems/cdfs/rw.c +++ b/drivers/filesystems/cdfs/rw.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2003 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: drivers/fs/cdfs/rw.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -*/ + * ReactOS kernel + * Copyright (C) 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: drivers/fs/cdfs/rw.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/cdfs/volinfo.c b/drivers/filesystems/cdfs/volinfo.c index 0198335162d..1a028193518 100644 --- a/drivers/filesystems/cdfs/volinfo.c +++ b/drivers/filesystems/cdfs/volinfo.c @@ -1,30 +1,29 @@ /* -* ReactOS kernel -* Copyright (C) 2002, 2003 ReactOS Team -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ -/* $Id$ -* -* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS kernel -* FILE: services/fs/vfat/volume.c -* PURPOSE: CDROM (ISO 9660) filesystem driver -* PROGRAMMER: Art Yerkes -* Eric Kohl -*/ + * ReactOS kernel + * Copyright (C) 2002, 2003 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/fs/vfat/volume.c + * PURPOSE: CDROM (ISO 9660) filesystem driver + * PROGRAMMER: Art Yerkes + * Eric Kohl + */ /* INCLUDES *****************************************************************/ diff --git a/drivers/filesystems/ext2/ext2fs.rc b/drivers/filesystems/ext2/ext2fs.rc index 0cbc172a885..e5c5721f47b 100644 --- a/drivers/filesystems/ext2/ext2fs.rc +++ b/drivers/filesystems/ext2/ext2fs.rc @@ -1,4 +1,3 @@ -/* $Id: ext2fs.rc 12852 2005-01-06 13:58:04Z mf $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Linux ext2 IFS Driver\0" diff --git a/drivers/filesystems/msfs/msfs.rc b/drivers/filesystems/msfs/msfs.rc index bfbfbd10529..dae5b633e3f 100644 --- a/drivers/filesystems/msfs/msfs.rc +++ b/drivers/filesystems/msfs/msfs.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Mailslot IFS Driver\0" diff --git a/drivers/filesystems/mup/create.c b/drivers/filesystems/mup/create.c index 6a0088bf1a9..e8da7466fea 100644 --- a/drivers/filesystems/mup/create.c +++ b/drivers/filesystems/mup/create.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/mup/create.c diff --git a/drivers/filesystems/mup/mup.c b/drivers/filesystems/mup/mup.c index 9da6cb75d02..a6f7f11aa67 100644 --- a/drivers/filesystems/mup/mup.c +++ b/drivers/filesystems/mup/mup.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/fs/mup/mup.c diff --git a/drivers/filesystems/mup/mup.rc b/drivers/filesystems/mup/mup.rc index bdfd6948e9c..cd270a2ea35 100644 --- a/drivers/filesystems/mup/mup.rc +++ b/drivers/filesystems/mup/mup.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Multi UNC Provider\0" diff --git a/drivers/input/kbdclass/kbdclass.rc b/drivers/input/kbdclass/kbdclass.rc index 49988d987cc..b1229d863ad 100644 --- a/drivers/input/kbdclass/kbdclass.rc +++ b/drivers/input/kbdclass/kbdclass.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Keyboard Device Driver\0" diff --git a/drivers/input/mouclass/mouclass.rc b/drivers/input/mouclass/mouclass.rc index 3721a5288cf..20f4588a932 100644 --- a/drivers/input/mouclass/mouclass.rc +++ b/drivers/input/mouclass/mouclass.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Mouse Class Device Driver\0" diff --git a/drivers/input/sermouse/sermouse.rc b/drivers/input/sermouse/sermouse.rc index 81ab2cd4825..e078a9ee326 100644 --- a/drivers/input/sermouse/sermouse.rc +++ b/drivers/input/sermouse/sermouse.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Serial mouse device driver\0" diff --git a/drivers/multimedia/audio/mpu401_nt4/mpu401.rc b/drivers/multimedia/audio/mpu401_nt4/mpu401.rc index ba6a0d5f32f..9aaccfc1673 100644 --- a/drivers/multimedia/audio/mpu401_nt4/mpu401.rc +++ b/drivers/multimedia/audio/mpu401_nt4/mpu401.rc @@ -1,4 +1,3 @@ -/* $Id: mpu401.rc 21285 2006-03-10 23:22:58Z jimtabor $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "MPU-401 MIDI Driver\0" diff --git a/drivers/multimedia/audio/sndblst.old/sndblst.rc b/drivers/multimedia/audio/sndblst.old/sndblst.rc index 8e9d3519e0f..8ea5f677586 100644 --- a/drivers/multimedia/audio/sndblst.old/sndblst.rc +++ b/drivers/multimedia/audio/sndblst.old/sndblst.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "SoundBlaster Driver\0" diff --git a/drivers/multimedia/audio/sndblst_sys/sndblst.rc b/drivers/multimedia/audio/sndblst_sys/sndblst.rc index 9588d5c78a7..4eacc41d251 100644 --- a/drivers/multimedia/audio/sndblst_sys/sndblst.rc +++ b/drivers/multimedia/audio/sndblst_sys/sndblst.rc @@ -1,4 +1,3 @@ -/* $Id: sndblst.rc 39744 2009-02-25 09:10:46Z silverblade $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "SoundBlaster Driver\0" diff --git a/drivers/multimedia/audio/sound/sb16.c b/drivers/multimedia/audio/sound/sb16.c index ea74f652fee..70cdc4de5d0 100644 --- a/drivers/multimedia/audio/sound/sb16.c +++ b/drivers/multimedia/audio/sound/sb16.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: services/dd/sound/sb16.c diff --git a/drivers/multimedia/audio/sound/sb16.rc b/drivers/multimedia/audio/sound/sb16.rc index 2cc53d9247d..0f4f9cee6f5 100644 --- a/drivers/multimedia/audio/sound/sb16.rc +++ b/drivers/multimedia/audio/sound/sb16.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "SB16 driver\0" diff --git a/drivers/network/afd/afd.rc b/drivers/network/afd/afd.rc index 685f807e2a7..e8f7429028e 100644 --- a/drivers/network/afd/afd.rc +++ b/drivers/network/afd/afd.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Socket Filesystem Driver\0" diff --git a/drivers/network/afd/afd/bind.c b/drivers/network/afd/afd/bind.c index c3e2c149569..0c5b33d69ce 100644 --- a/drivers/network/afd/afd/bind.c +++ b/drivers/network/afd/afd/bind.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/bind.c diff --git a/drivers/network/afd/afd/connect.c b/drivers/network/afd/afd/connect.c index 86ce48f1253..36dd2907dcc 100644 --- a/drivers/network/afd/afd/connect.c +++ b/drivers/network/afd/afd/connect.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/connect.c diff --git a/drivers/network/afd/afd/context.c b/drivers/network/afd/afd/context.c index ce2d9e1e3bd..9dec195c079 100644 --- a/drivers/network/afd/afd/context.c +++ b/drivers/network/afd/afd/context.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/context.c diff --git a/drivers/network/afd/afd/info.c b/drivers/network/afd/afd/info.c index b1e771e2c5e..68cbe2e4bcf 100644 --- a/drivers/network/afd/afd/info.c +++ b/drivers/network/afd/afd/info.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/info.c diff --git a/drivers/network/afd/afd/listen.c b/drivers/network/afd/afd/listen.c index c47bad971c0..5c17fe05dd8 100644 --- a/drivers/network/afd/afd/listen.c +++ b/drivers/network/afd/afd/listen.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/listen.c diff --git a/drivers/network/afd/afd/lock.c b/drivers/network/afd/afd/lock.c index d26fbf24643..4fcfba0a471 100644 --- a/drivers/network/afd/afd/lock.c +++ b/drivers/network/afd/afd/lock.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/lock.c diff --git a/drivers/network/afd/afd/main.c b/drivers/network/afd/afd/main.c index eb050bd3953..4fa43c82309 100644 --- a/drivers/network/afd/afd/main.c +++ b/drivers/network/afd/afd/main.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/main.c diff --git a/drivers/network/afd/afd/read.c b/drivers/network/afd/afd/read.c index fcaea4b3f60..090aed0c072 100644 --- a/drivers/network/afd/afd/read.c +++ b/drivers/network/afd/afd/read.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/read.c diff --git a/drivers/network/afd/afd/tdiconn.c b/drivers/network/afd/afd/tdiconn.c index 517f8861a2d..72b7c3f75ec 100644 --- a/drivers/network/afd/afd/tdiconn.c +++ b/drivers/network/afd/afd/tdiconn.c @@ -1,4 +1,4 @@ -/* $Id$ +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/afd/tdiconn.c diff --git a/drivers/network/afd/include/afd.h b/drivers/network/afd/include/afd.h index 827e057df7e..c05eaede6bc 100644 --- a/drivers/network/afd/include/afd.h +++ b/drivers/network/afd/include/afd.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: drivers/net/afd/include/afd.h diff --git a/drivers/network/dd/ne2000/ne2000.rc b/drivers/network/dd/ne2000/ne2000.rc index 3e0beff2fbb..c20e6350cbb 100644 --- a/drivers/network/dd/ne2000/ne2000.rc +++ b/drivers/network/dd/ne2000/ne2000.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Novell NE2000 network driver\0" diff --git a/drivers/network/dd/pcnet/pcnet.rc b/drivers/network/dd/pcnet/pcnet.rc index 9bf89cdc541..db010eca1b2 100644 --- a/drivers/network/dd/pcnet/pcnet.rc +++ b/drivers/network/dd/pcnet/pcnet.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "PCNet Ethernet PCI Driver\0" diff --git a/drivers/network/lan/lan.rc b/drivers/network/lan/lan.rc index a58d91fefda..f7630a802f2 100644 --- a/drivers/network/lan/lan.rc +++ b/drivers/network/lan/lan.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "TCP/IP protocol driver\0" diff --git a/drivers/network/ndis/ndis.rc b/drivers/network/ndis/ndis.rc index da85ed05b23..3cef52fb0ee 100644 --- a/drivers/network/ndis/ndis.rc +++ b/drivers/network/ndis/ndis.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "NDIS Library\0" diff --git a/drivers/network/tdi/cte/string.c b/drivers/network/tdi/cte/string.c index 2f28750548e..04992c99fd7 100644 --- a/drivers/network/tdi/cte/string.c +++ b/drivers/network/tdi/cte/string.c @@ -1,6 +1,4 @@ -/* $Id$ - * - */ + #include "precomp.h" /* diff --git a/drivers/network/tdi/misc/tdi.rc b/drivers/network/tdi/misc/tdi.rc index 7b6bd1f07e9..bf387831deb 100644 --- a/drivers/network/tdi/misc/tdi.rc +++ b/drivers/network/tdi/misc/tdi.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "TDI wrapper kernel module\0" diff --git a/drivers/network/tdi/tdi/handler.c b/drivers/network/tdi/tdi/handler.c index fe24d0b1f5d..7a64e3f167c 100644 --- a/drivers/network/tdi/tdi/handler.c +++ b/drivers/network/tdi/tdi/handler.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * DESCRIPTION: Default TDI event handlers. */ #include "precomp.h" diff --git a/drivers/network/tdi/tdi/obsolete.c b/drivers/network/tdi/tdi/obsolete.c index 42c3935cea6..98e72adf7eb 100644 --- a/drivers/network/tdi/tdi/obsolete.c +++ b/drivers/network/tdi/tdi/obsolete.c @@ -1,6 +1,3 @@ -/* $Id$ - * - */ #include "precomp.h" diff --git a/drivers/network/tdi/tdi/stubs.c b/drivers/network/tdi/tdi/stubs.c index 8af72d8bb85..4832d7fa4e5 100644 --- a/drivers/network/tdi/tdi/stubs.c +++ b/drivers/network/tdi/tdi/stubs.c @@ -1,7 +1,4 @@ -/* $Id$ - * - */ #include "precomp.h" /* diff --git a/drivers/parallel/parallel/parallel.c b/drivers/parallel/parallel/parallel.c index 25b9b27b219..36e58fe7b08 100644 --- a/drivers/parallel/parallel/parallel.c +++ b/drivers/parallel/parallel/parallel.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: services/parallel/parallel.c diff --git a/drivers/parallel/parallel/parallel.rc b/drivers/parallel/parallel/parallel.rc index 5c9d86226fc..db11bceada9 100644 --- a/drivers/parallel/parallel/parallel.rc +++ b/drivers/parallel/parallel/parallel.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Parallel Port Device Driver\0" diff --git a/drivers/serial/serenum/serenum.rc b/drivers/serial/serenum/serenum.rc index a88af0f20f3..6da34d940e7 100644 --- a/drivers/serial/serenum/serenum.rc +++ b/drivers/serial/serenum/serenum.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Serial port enumerator\0" diff --git a/drivers/serial/serial/serial.rc b/drivers/serial/serial/serial.rc index b72104de0e1..910ccf96ecb 100644 --- a/drivers/serial/serial/serial.rc +++ b/drivers/serial/serial/serial.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Serial Port Device Driver\0" diff --git a/drivers/setup/blue/blue.rc b/drivers/setup/blue/blue.rc index f8fb24274f6..3aec979970c 100644 --- a/drivers/setup/blue/blue.rc +++ b/drivers/setup/blue/blue.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "HAL Console Device Driver\0" diff --git a/drivers/storage/class/cdrom/cdrom.rc b/drivers/storage/class/cdrom/cdrom.rc index 3ad0e51e230..7a60cb19526 100644 --- a/drivers/storage/class/cdrom/cdrom.rc +++ b/drivers/storage/class/cdrom/cdrom.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "CD-ROM Class Driver\0" diff --git a/drivers/storage/class/class2/class2.rc b/drivers/storage/class/class2/class2.rc index e6e694c77d8..4c87c570b69 100644 --- a/drivers/storage/class/class2/class2.rc +++ b/drivers/storage/class/class2/class2.rc @@ -1,4 +1,3 @@ -/* $Id: class2.rc 26227 2007-04-01 16:29:16Z fireball $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "SCSI Class Driver Helper\0" diff --git a/drivers/storage/class/disk/disk.rc b/drivers/storage/class/disk/disk.rc index cce8f8d7b80..88a5f2275a3 100644 --- a/drivers/storage/class/disk/disk.rc +++ b/drivers/storage/class/disk/disk.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "Disk Class Driver\0" diff --git a/drivers/storage/class/include/class2.h b/drivers/storage/class/include/class2.h index 48aa271c2e8..b967c3dfce7 100644 --- a/drivers/storage/class/include/class2.h +++ b/drivers/storage/class/include/class2.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: services/storage/include/class2.h diff --git a/drivers/storage/floppy/floppy.rc b/drivers/storage/floppy/floppy.rc index 307ebb3b629..d239880a1bf 100644 --- a/drivers/storage/floppy/floppy.rc +++ b/drivers/storage/floppy/floppy.rc @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * ReactOS Floppy Driver * Copyright (C) 2004, Vizzini (vizzini@plasmic.com) * diff --git a/drivers/storage/ide/atapi/atapi.rc b/drivers/storage/ide/atapi/atapi.rc index 94e9860bbcd..fb5d6557b0a 100644 --- a/drivers/storage/ide/atapi/atapi.rc +++ b/drivers/storage/ide/atapi/atapi.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "ATAPI IDE Miniport Driver\0" diff --git a/drivers/wmi/wmilib.rc b/drivers/wmi/wmilib.rc index 79ac7929b3e..7756101b354 100644 --- a/drivers/wmi/wmilib.rc +++ b/drivers/wmi/wmilib.rc @@ -1,4 +1,3 @@ -/* $Id: wmilib.rc 21844 2006-05-07 19:34:23Z fireball $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "WmiLib\0" diff --git a/hal/halppc/generic/display.c b/hal/halppc/generic/display.c index 9d82553bdc3..42e3cbd5452 100644 --- a/hal/halppc/generic/display.c +++ b/hal/halppc/generic/display.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id: display.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/display.c diff --git a/hal/halppc/generic/dma.c b/hal/halppc/generic/dma.c index 9ba4bbb0546..53935540ab4 100644 --- a/hal/halppc/generic/dma.c +++ b/hal/halppc/generic/dma.c @@ -1,5 +1,4 @@ -/* $Id: dma.c 24759 2006-11-14 20:59:48Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/dma.c diff --git a/hal/halppc/generic/enum.c b/hal/halppc/generic/enum.c index af8b06d4a87..2a6ea7ccf58 100644 --- a/hal/halppc/generic/enum.c +++ b/hal/halppc/generic/enum.c @@ -1,5 +1,4 @@ -/* $Id: enum.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/enum.c diff --git a/hal/halppc/generic/font.c b/hal/halppc/generic/font.c index 570cc5f1e51..d42794317e2 100644 --- a/hal/halppc/generic/font.c +++ b/hal/halppc/generic/font.c @@ -1,5 +1,4 @@ -/* $Id: font.c 21840 2006-05-07 18:56:52Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: Xbox HAL * FILE: hal/halx86/xbox/font.h diff --git a/hal/halppc/generic/irql.c b/hal/halppc/generic/irql.c index 2a3b404f596..77c06f97d43 100644 --- a/hal/halppc/generic/irql.c +++ b/hal/halppc/generic/irql.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/irql.c diff --git a/hal/halppc/generic/isa.c b/hal/halppc/generic/isa.c index 12d220a7f75..bba345e1839 100644 --- a/hal/halppc/generic/isa.c +++ b/hal/halppc/generic/isa.c @@ -1,5 +1,4 @@ -/* $Id: isa.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/isa.c diff --git a/hal/halppc/generic/portio.c b/hal/halppc/generic/portio.c index 0fe52830de2..f5af0d166f8 100644 --- a/hal/halppc/generic/portio.c +++ b/hal/halppc/generic/portio.c @@ -1,5 +1,4 @@ -/* $Id: portio.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/portio.c diff --git a/hal/halppc/generic/processor.c b/hal/halppc/generic/processor.c index 155769755f6..1c1d0876faa 100644 --- a/hal/halppc/generic/processor.c +++ b/hal/halppc/generic/processor.c @@ -1,5 +1,4 @@ -/* $Id: processor.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/generic/processor.c diff --git a/hal/halppc/generic/reboot.c b/hal/halppc/generic/reboot.c index b43fd1ead90..cd3a8f37c77 100644 --- a/hal/halppc/generic/reboot.c +++ b/hal/halppc/generic/reboot.c @@ -1,5 +1,4 @@ -/* $Id: reboot.c 23907 2006-09-04 05:52:23Z arty $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/reboot.c diff --git a/hal/halppc/include/halirq.h b/hal/halppc/include/halirq.h index c3cc625dca4..e741027db64 100644 --- a/hal/halppc/include/halirq.h +++ b/hal/halppc/include/halirq.h @@ -1,6 +1,3 @@ -/* - * $Id: halirq.h 23669 2006-08-23 16:58:43Z ion $ - */ #pragma once diff --git a/hal/halppc/up/halinit_up.c b/hal/halppc/up/halinit_up.c index cbb18bc665e..d151f8baf0a 100644 --- a/hal/halppc/up/halinit_up.c +++ b/hal/halppc/up/halinit_up.c @@ -1,5 +1,4 @@ -/* $Id: halinit_up.c 24964 2006-11-29 08:28:20Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/halinit.c diff --git a/hal/halx86/apic/halinit_apic.c b/hal/halx86/apic/halinit_apic.c index c432232e969..5c81231dd31 100644 --- a/hal/halx86/apic/halinit_apic.c +++ b/hal/halx86/apic/halinit_apic.c @@ -1,5 +1,4 @@ -/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/halinit.c diff --git a/hal/halx86/include/halirq.h b/hal/halx86/include/halirq.h index ba5f9533d22..6e68f87f627 100644 --- a/hal/halx86/include/halirq.h +++ b/hal/halx86/include/halirq.h @@ -1,6 +1,3 @@ -/* - * $Id$ - */ #pragma once diff --git a/hal/halx86/mp/apic.c b/hal/halx86/mp/apic.c index 6aea485bbc4..88248e429c3 100644 --- a/hal/halx86/mp/apic.c +++ b/hal/halx86/mp/apic.c @@ -16,8 +16,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/apic.c diff --git a/hal/halx86/mp/halinit_mp.c b/hal/halx86/mp/halinit_mp.c index edb910682ac..5c1bc28c44f 100644 --- a/hal/halx86/mp/halinit_mp.c +++ b/hal/halx86/mp/halinit_mp.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/halinit_mp.c diff --git a/hal/halx86/mp/ioapic.c b/hal/halx86/mp/ioapic.c index 15710d93534..bc99c7626a1 100644 --- a/hal/halx86/mp/ioapic.c +++ b/hal/halx86/mp/ioapic.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/ioapic.c diff --git a/hal/halx86/mp/ipi_mp.c b/hal/halx86/mp/ipi_mp.c index c9bbb0e7dee..ca0eae46cf7 100644 --- a/hal/halx86/mp/ipi_mp.c +++ b/hal/halx86/mp/ipi_mp.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/ipi_mp.c diff --git a/hal/halx86/mp/mpconfig.c b/hal/halx86/mp/mpconfig.c index 42e2ac36a47..6f3c5dff590 100644 --- a/hal/halx86/mp/mpconfig.c +++ b/hal/halx86/mp/mpconfig.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/mpconfig.c diff --git a/hal/halx86/mp/processor_mp.c b/hal/halx86/mp/processor_mp.c index 0627e90041e..51607b126ee 100644 --- a/hal/halx86/mp/processor_mp.c +++ b/hal/halx86/mp/processor_mp.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/mp/processor_mp.c diff --git a/hal/halx86/up/halinit_mini.c b/hal/halx86/up/halinit_mini.c index 7b349e42c6e..35939241029 100644 --- a/hal/halx86/up/halinit_mini.c +++ b/hal/halx86/up/halinit_mini.c @@ -1,5 +1,4 @@ -/* $Id: halinit_up.c 53529 2011-09-02 14:45:19Z tkreuzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/halinit.c diff --git a/hal/halx86/up/halinit_up.c b/hal/halx86/up/halinit_up.c index f9be15fe6ce..a2170a8b36e 100644 --- a/hal/halx86/up/halinit_up.c +++ b/hal/halx86/up/halinit_up.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/halinit.c diff --git a/hal/halx86/xbox/halinit_xbox.c b/hal/halx86/xbox/halinit_xbox.c index 6a7e7d71269..1cb9f63555c 100644 --- a/hal/halx86/xbox/halinit_xbox.c +++ b/hal/halx86/xbox/halinit_xbox.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/hal/x86/halinit.c diff --git a/hal/halx86/xbox/halxbox.h b/hal/halx86/xbox/halxbox.h index bbe9d5a1463..b27c6e31c23 100644 --- a/hal/halx86/xbox/halxbox.h +++ b/hal/halx86/xbox/halxbox.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: Xbox HAL * FILE: hal/halx86/xbox/halxbox.h diff --git a/hal/halx86/xbox/part_xbox.c b/hal/halx86/xbox/part_xbox.c index bab0a530bde..261dbe40e16 100644 --- a/hal/halx86/xbox/part_xbox.c +++ b/hal/halx86/xbox/part_xbox.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: hal/halx86/xbox/part_xbox.c diff --git a/include/crt/conio.h b/include/crt/conio.h index 74fbbac7524..74dcf45ae00 100644 --- a/include/crt/conio.h +++ b/include/crt/conio.h @@ -15,27 +15,158 @@ extern "C" { #endif - _CRTIMP char * __cdecl _cgets(char *_Buffer); - _CRTIMP int __cdecl _cprintf(const char *_Format,...); - _CRTIMP int __cdecl _cputs(const char *_Str); - _CRT_INSECURE_DEPRECATE(_cscanf_s) _CRTIMP int __cdecl _cscanf(const char *_Format,...); - _CRT_INSECURE_DEPRECATE(_cscanf_s_l) _CRTIMP int __cdecl _cscanf_l(const char *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _getch(void); - _CRTIMP int __cdecl _getche(void); - _CRTIMP int __cdecl _vcprintf(const char *_Format,va_list _ArgList); - _CRTIMP int __cdecl _cprintf_p(const char *_Format,...); - _CRTIMP int __cdecl _vcprintf_p(const char *_Format,va_list _ArgList); - _CRTIMP int __cdecl _cprintf_l(const char *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _vcprintf_l(const char *_Format,_locale_t _Locale,va_list _ArgList); - _CRTIMP int __cdecl _cprintf_p_l(const char *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _vcprintf_p_l(const char *_Format,_locale_t _Locale,va_list _ArgList); - _CRTIMP int __cdecl _kbhit(void); - _CRTIMP int __cdecl _putch(int _Ch); - _CRTIMP int __cdecl _ungetch(int _Ch); - _CRTIMP int __cdecl _getch_nolock(void); - _CRTIMP int __cdecl _getche_nolock(void); - _CRTIMP int __cdecl _putch_nolock(int _Ch); - _CRTIMP int __cdecl _ungetch_nolock(int _Ch); + _CRTIMP + char* + __cdecl + _cgets( + _Pre_notnull_ _Post_z_ char *_Buffer); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cprintf( + _In_z_ _Printf_format_string_ const char *_Format, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cputs( + _In_z_ const char *_Str); + + _Check_return_opt_ + _CRT_INSECURE_DEPRECATE(_cscanf_s) + _CRTIMP + int + __cdecl + _cscanf( + _In_z_ _Scanf_format_string_ const char *_Format, + ...); + + _Check_return_opt_ + _CRT_INSECURE_DEPRECATE(_cscanf_s_l) + _CRTIMP + int + __cdecl + _cscanf_l( + _In_z_ _Scanf_format_string_ const char *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _Check_return_ + _CRTIMP + int + __cdecl + _getch(void); + + _Check_return_ + _CRTIMP + int + __cdecl + _getche(void); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcprintf( + _In_z_ _Printf_format_string_ const char *_Format, + va_list _ArgList); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cprintf_p( + _In_z_ _Printf_format_string_ const char *_Format, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcprintf_p( + _In_z_ _Printf_format_string_ const char *_Format, + va_list _ArgList); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cprintf_l( + _In_z_ _Printf_format_string_ const char *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcprintf_l( + _In_z_ _Printf_format_string_ const char *_Format, + _In_opt_ _locale_t _Locale, + va_list _ArgList); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cprintf_p_l( + _In_z_ _Printf_format_string_ const char *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcprintf_p_l( + _In_z_ _Printf_format_string_ const char *_Format, + _In_opt_ _locale_t _Locale, + va_list _ArgList); + + _CRTIMP + int + __cdecl + _kbhit(void); + + _CRTIMP + int + __cdecl + _putch( + _In_ int _Ch); + + _CRTIMP + int + __cdecl + _ungetch( + _In_ int _Ch); + + _Check_return_ + _CRTIMP + int + __cdecl + _getch_nolock(void); + + _Check_return_ + _CRTIMP + int + __cdecl + _getche_nolock(void); + + _CRTIMP + int + __cdecl + _putch_nolock( + _In_ int _Ch); + + _CRTIMP + int + __cdecl + _ungetch_nolock( + _In_ int _Ch); #if defined(_X86_) && !defined(__x86_64) int __cdecl _inp(unsigned short); @@ -54,26 +185,153 @@ extern "C" { #define WEOF (wint_t)(0xFFFF) #endif - _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer); - _CRTIMP wint_t __cdecl _getwch(void); - _CRTIMP wint_t __cdecl _getwche(void); - _CRTIMP wint_t __cdecl _putwch(wchar_t _WCh); - _CRTIMP wint_t __cdecl _ungetwch(wint_t _WCh); - _CRTIMP int __cdecl _cputws(const wchar_t *_String); - _CRTIMP int __cdecl _cwprintf(const wchar_t *_Format,...); - _CRT_INSECURE_DEPRECATE(_cwscanf_s) _CRTIMP int __cdecl _cwscanf(const wchar_t *_Format,...); - _CRT_INSECURE_DEPRECATE(_cwscanf_s_l) _CRTIMP int __cdecl _cwscanf_l(const wchar_t *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _vcwprintf(const wchar_t *_Format,va_list _ArgList); - _CRTIMP int __cdecl _cwprintf_p(const wchar_t *_Format,...); - _CRTIMP int __cdecl _vcwprintf_p(const wchar_t *_Format,va_list _ArgList); - _CRTIMP int __cdecl _cwprintf_l(const wchar_t *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _vcwprintf_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); - _CRTIMP int __cdecl _cwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,...); - _CRTIMP int __cdecl _vcwprintf_p_l(const wchar_t *_Format,_locale_t _Locale,va_list _ArgList); - _CRTIMP wint_t __cdecl _putwch_nolock(wchar_t _WCh); - _CRTIMP wint_t __cdecl _getwch_nolock(void); - _CRTIMP wint_t __cdecl _getwche_nolock(void); - _CRTIMP wint_t __cdecl _ungetwch_nolock(wint_t _WCh); + _CRTIMP + wchar_t* + _cgetws( + _Pre_notnull_ _Post_z_ wchar_t *_Buffer); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _getwch(void); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _getwche(void); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _putwch( + wchar_t _WCh); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _ungetwch( + wint_t _WCh); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cputws( + _In_z_ const wchar_t *_String); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cwprintf( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + ...); + + _Check_return_opt_ + _CRT_INSECURE_DEPRECATE(_cwscanf_s) + _CRTIMP + int + __cdecl + _cwscanf( + _In_z_ _Scanf_format_string_ const wchar_t *_Format, + ...); + + _Check_return_opt_ + _CRT_INSECURE_DEPRECATE(_cwscanf_s_l) + _CRTIMP + int + __cdecl + _cwscanf_l( + _In_z_ _Scanf_format_string_ const wchar_t *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcwprintf( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + va_list _ArgList); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _cwprintf_p( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + ...); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _vcwprintf_p( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + va_list _ArgList); + + _CRTIMP + int + __cdecl + _cwprintf_l( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _CRTIMP + int + __cdecl + _vcwprintf_l( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + _In_opt_ _locale_t _Locale, + va_list _ArgList); + + _CRTIMP + int + __cdecl + _cwprintf_p_l( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + _In_opt_ _locale_t _Locale, + ...); + + _CRTIMP + int + __cdecl + _vcwprintf_p_l( + _In_z_ _Printf_format_string_ const wchar_t *_Format, + _In_opt_ _locale_t _Locale, + va_list _ArgList); + + _Check_return_opt_ + _CRTIMP + wint_t + __cdecl + _putwch_nolock( + wchar_t _WCh); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _getwch_nolock(void); + + _Check_return_ + _CRTIMP + wint_t + __cdecl + _getwche_nolock(void); + + _Check_return_opt_ + _CRTIMP + wint_t + __cdecl + _ungetwch_nolock( + wint_t _WCh); + #endif /* _WCONIO_DEFINED */ #ifndef _MT @@ -83,16 +341,79 @@ extern "C" { #define _ungetwch() _ungetwch_nolock() #endif -#ifndef NO_OLDNAMES - _CRT_NONSTDC_DEPRECATE(_cgets) _CRT_INSECURE_DEPRECATE(_cgets_s) _CRTIMP char *__cdecl cgets(char *_Buffer); - _CRT_NONSTDC_DEPRECATE(_cprintf) _CRTIMP int __cdecl cprintf(const char *_Format,...); - _CRT_NONSTDC_DEPRECATE(_cputs) _CRTIMP int __cdecl cputs(const char *_Str); - _CRT_NONSTDC_DEPRECATE(_cscanf) _CRTIMP int __cdecl cscanf(const char *_Format,...); - _CRT_NONSTDC_DEPRECATE(_getch) _CRTIMP int __cdecl getch(void); - _CRT_NONSTDC_DEPRECATE(_getche) _CRTIMP int __cdecl getche(void); - _CRT_NONSTDC_DEPRECATE(_kbhit) _CRTIMP int __cdecl kbhit(void); - _CRT_NONSTDC_DEPRECATE(_putch) _CRTIMP int __cdecl putch(int _Ch); - _CRT_NONSTDC_DEPRECATE(_ungetch) _CRTIMP int __cdecl ungetch(int _Ch); +#ifndef NO_OLDNAMES + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_cgets) + _CRT_INSECURE_DEPRECATE(_cgets_s) + _CRTIMP + char* + __cdecl + cgets( + _Out_writes_z_(_Inexpressible_(*_Buffer + 2)) char *_Buffer); + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_cprintf) + _CRTIMP + int + __cdecl + cprintf( + _In_z_ _Printf_format_string_ const char *_Format, + ...); + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_cputs) + _CRTIMP + int + __cdecl + cputs( + _In_z_ const char *_Str); + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_cscanf) + _CRTIMP + int + __cdecl + cscanf( + _In_z_ _Scanf_format_string_ const char *_Format, + ...); + + _Check_return_ + _CRT_NONSTDC_DEPRECATE(_getch) + _CRTIMP + int + __cdecl + getch(void); + + _Check_return_ + _CRT_NONSTDC_DEPRECATE(_getche) + _CRTIMP + int + __cdecl + getche(void); + + _Check_return_ + _CRT_NONSTDC_DEPRECATE(_kbhit) + _CRTIMP + int + __cdecl + kbhit(void); + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_putch) + _CRTIMP + int + __cdecl + putch( + int _Ch); + + _Check_return_opt_ + _CRT_NONSTDC_DEPRECATE(_ungetch) + _CRTIMP + int + __cdecl + ungetch( + int _Ch); #if (defined(_X86_) && !defined(__x86_64)) _CRT_NONSTDC_DEPRECATE(_inp) _CRTIMP int __cdecl inp(unsigned short); @@ -100,6 +421,7 @@ extern "C" { _CRT_NONSTDC_DEPRECATE(_outp) _CRTIMP int __cdecl outp(unsigned short,int); _CRT_NONSTDC_DEPRECATE(_outpw) _CRTIMP unsigned short __cdecl outpw(unsigned short,unsigned short); #endif + #endif /* !NO_OLDNAMES */ #ifdef __cplusplus diff --git a/include/crt/direct.h b/include/crt/direct.h index e9eb50b4072..05041796e80 100644 --- a/include/crt/direct.h +++ b/include/crt/direct.h @@ -25,40 +25,174 @@ extern "C" { }; #endif - _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes); - _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes); - char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes); - _CRTIMP int __cdecl _chdir(const char *_Path); - _CRTIMP int __cdecl _mkdir(const char *_Path); - _CRTIMP int __cdecl _rmdir(const char *_Path); - _CRTIMP int __cdecl _chdrive(int _Drive); - _CRTIMP int __cdecl _getdrive(void); - _CRTIMP unsigned long __cdecl _getdrives(void); + _Check_return_ + _Ret_opt_z_ + _CRTIMP + char* + __cdecl + _getcwd( + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + + _Check_return_ + _Ret_opt_z_ + _CRTIMP + char* + __cdecl + _getdcwd( + _In_ int _Drive, + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + + _Check_return_ + _Ret_opt_z_ + char* + __cdecl + _getdcwd_nolock( + _In_ int _Drive, + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + + _Check_return_ + _CRTIMP + int + __cdecl + _chdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + _mkdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + _rmdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + _chdrive( + _In_ int _Drive); + + _Check_return_ + _CRTIMP + int + __cdecl + _getdrive(void); + + _Check_return_ + _CRTIMP + unsigned long + __cdecl + _getdrives(void); #ifndef _GETDISKFREE_DEFINED #define _GETDISKFREE_DEFINED - _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree); + _Check_return_ + _CRTIMP + unsigned + __cdecl + _getdiskfree( + _In_ unsigned _Drive, + _Out_ struct _diskfree_t *_DiskFree); #endif #ifndef _WDIRECT_DEFINED #define _WDIRECT_DEFINED - _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords); - _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords); - wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords); - _CRTIMP int __cdecl _wchdir(const wchar_t *_Path); - _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path); - _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path); -#endif -#ifndef NO_OLDNAMES + _Check_return_ + _Ret_opt_z_ + _CRTIMP + wchar_t* + __cdecl + _wgetcwd( + _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf, + _In_ int _SizeInWords); + + _Check_return_ + _Ret_opt_z_ + _CRTIMP + wchar_t* + __cdecl + _wgetdcwd( + _In_ int _Drive, + _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf, + _In_ int _SizeInWords); + + _Check_return_ + _Ret_opt_z_ + wchar_t* + __cdecl + _wgetdcwd_nolock( + _In_ int _Drive, + _Out_writes_opt_(_SizeInWords) wchar_t *_DstBuf, + _In_ int _SizeInWords); + + _Check_return_ + _CRTIMP + int + __cdecl + _wchdir( + _In_z_ const wchar_t *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + _wmkdir( + _In_z_ const wchar_t *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + _wrmdir( + _In_z_ const wchar_t *_Path); + +#endif /* _WDIRECT_DEFINED */ + +#ifndef NO_OLDNAMES #define diskfree_t _diskfree_t - _CRTIMP char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes); - _CRTIMP int __cdecl chdir(const char *_Path); - _CRTIMP int __cdecl mkdir(const char *_Path); - _CRTIMP int __cdecl rmdir(const char *_Path); -#endif + _Check_return_ + _Ret_opt_z_ + _CRTIMP + char* + __cdecl + getcwd( + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + + _Check_return_ + _CRTIMP + int + __cdecl + chdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + mkdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + rmdir( + _In_z_ const char *_Path); + +#endif /* NO_OLDNAMES */ #ifdef __cplusplus } diff --git a/include/crt/errno.h b/include/crt/errno.h index 944b3ad504b..8e8917b5458 100644 --- a/include/crt/errno.h +++ b/include/crt/errno.h @@ -17,8 +17,8 @@ extern "C" { _CRTIMP extern int *__cdecl _errno(void); #define errno (*_errno()) - errno_t __cdecl _set_errno(int _Value); - errno_t __cdecl _get_errno(int *_Value); + errno_t __cdecl _set_errno(_In_ int _Value); + errno_t __cdecl _get_errno(_Out_ int *_Value); #endif #define EPERM 1 diff --git a/include/crt/float.h b/include/crt/float.h index d80ae0ec295..6870b0c570c 100644 --- a/include/crt/float.h +++ b/include/crt/float.h @@ -105,9 +105,22 @@ extern "C" { /* Set the FPU control word as cw = (cw & ~unMask) | (unNew & unMask), * i.e. change the bits in unMask to have the values they have in unNew, * leaving other bits unchanged. */ -__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _controlfp (unsigned int unNew, unsigned int unMask); -__MINGW_NOTHROW _CRTIMP unsigned int __cdecl _control87 (unsigned int unNew, unsigned int unMask); +__MINGW_NOTHROW +_CRTIMP +unsigned int +__cdecl +_controlfp( + _In_ unsigned int unNew, + _In_ unsigned int unMask); + +__MINGW_NOTHROW +_CRTIMP +unsigned int +__cdecl +_control87( + _In_ unsigned int unNew, + _In_ unsigned int unMask); __MINGW_NOTHROW _CRTIMP unsigned int __cdecl _clearfp (void); /* Clear the FPU status word */ __MINGW_NOTHROW _CRTIMP unsigned int __cdecl _statusfp (void); /* Report the FPU status word */ @@ -136,17 +149,74 @@ __MINGW_NOTHROW _CRTIMP int * __cdecl __fpecode(void); * but they really belong in math.h. */ -__MINGW_NOTHROW _CRTIMP double __cdecl _chgsign (double); -__MINGW_NOTHROW _CRTIMP double __cdecl _copysign (double, double); -__MINGW_NOTHROW _CRTIMP double __cdecl _logb (double); -__MINGW_NOTHROW _CRTIMP double __cdecl _nextafter (double, double); -__MINGW_NOTHROW _CRTIMP double __cdecl _scalb (double, long); +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +double +__cdecl +_chgsign( + _In_ double); -__MINGW_NOTHROW _CRTIMP int __cdecl _finite (double); -__MINGW_NOTHROW _CRTIMP int __cdecl _fpclass (double); -__MINGW_NOTHROW _CRTIMP int __cdecl _isnan (double); +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +double +__cdecl +_copysign( + _In_ double, + _In_ double); -#ifdef __cplusplus +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +double +__cdecl +_logb( + _In_ double); + +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +double +__cdecl +_nextafter( + _In_ double, + _In_ double); + +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +double +__cdecl +_scalb( + _In_ double, + _In_ long); + +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +int +__cdecl +_finite( + _In_ double); + +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +int +__cdecl +_fpclass( + _In_ double); + +_Check_return_ +__MINGW_NOTHROW +_CRTIMP +int +__cdecl +_isnan( + _In_ double); + +#ifdef __cplusplus } #endif diff --git a/include/crt/io.h b/include/crt/io.h index 4a3f37dafbb..5e29e67680b 100644 --- a/include/crt/io.h +++ b/include/crt/io.h @@ -18,7 +18,15 @@ extern "C" { #endif -_CRTIMP char* __cdecl _getcwd (char*, int); +_Check_return_ +_Ret_opt_z_ +_CRTIMP +char* +__cdecl +_getcwd( + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + #ifndef _FSIZE_T_DEFINED typedef unsigned long _fsize_t; #define _FSIZE_T_DEFINED @@ -162,57 +170,316 @@ _CRTIMP char* __cdecl _getcwd (char*, int); #define W_OK 2 /* Check for write permission */ #define R_OK 4 /* Check for read permission */ - _CRTIMP int __cdecl _access(const char *_Filename,int _AccessMode); - _CRTIMP int __cdecl _chmod(const char *_Filename,int _Mode); - _CRTIMP int __cdecl _chsize(int _FileHandle,long _Size); - _CRTIMP int __cdecl _close(int _FileHandle); - _CRTIMP int __cdecl _commit(int _FileHandle); - _CRTIMP int __cdecl _creat(const char *_Filename,int _PermissionMode); - _CRTIMP int __cdecl _dup(int _FileHandle); - _CRTIMP int __cdecl _dup2(int _FileHandleSrc,int _FileHandleDst); - _CRTIMP int __cdecl _eof(int _FileHandle); - _CRTIMP long __cdecl _filelength(int _FileHandle); - _CRTIMP intptr_t __cdecl _findfirst(const char *_Filename, struct _finddata_t *_FindData); - _CRTIMP intptr_t __cdecl _findfirst32(const char *_Filename,struct _finddata32_t *_FindData); - _CRTIMP int __cdecl _findnext(intptr_t _FindHandle,struct _finddata_t *_FindData); - _CRTIMP int __cdecl _findnext32(intptr_t _FindHandle,struct _finddata32_t *_FindData); - _CRTIMP int __cdecl _findclose(intptr_t _FindHandle); - _CRTIMP int __cdecl _isatty(int _FileHandle); - _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes); - _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin); - _CRTIMP char *__cdecl _mktemp(char *_TemplateName); - _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode); - _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); + _Check_return_ + _CRTIMP + int + __cdecl + _access( + _In_z_ const char *_Filename, + _In_ int _AccessMode); + + _Check_return_ + _CRTIMP + int + __cdecl + _chmod( + _In_z_ const char *_Filename, + _In_ int _Mode); + + _Check_return_ + _CRTIMP + int + __cdecl + _chsize( + _In_ int _FileHandle, + _In_ long _Size); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _close( + _In_ int _FileHandle); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _commit( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + _creat( + _In_z_ const char *_Filename, + _In_ int _PermissionMode); + + _Check_return_ + _CRTIMP + int + __cdecl + _dup( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + _dup2( + _In_ int _FileHandleSrc, + _In_ int _FileHandleDst); + + _Check_return_ + _CRTIMP + int + __cdecl + _eof( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + long + __cdecl + _filelength( + _In_ int _FileHandle); + + _CRTIMP + intptr_t + __cdecl + _findfirst( + const char *_Filename, + struct _finddata_t *_FindData); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _findfirst32( + _In_z_ const char *_Filename, + _Out_ struct _finddata32_t *_FindData); + + _CRTIMP + int + __cdecl + _findnext( + intptr_t _FindHandle, + struct _finddata_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _findnext32( + _In_ intptr_t _FindHandle, + _Out_ struct _finddata32_t *_FindData); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + _findclose( + _In_ intptr_t _FindHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + _isatty( + _In_ int _FileHandle); + + _CRTIMP + int + __cdecl + _locking( + _In_ int _FileHandle, + _In_ int _LockMode, + _In_ long _NumOfBytes); + + _Check_return_opt_ + _CRTIMP + long + __cdecl + _lseek( + _In_ int _FileHandle, + _In_ long _Offset, + _In_ int _Origin); + + _Check_return_ + _CRTIMP + char* + __cdecl + _mktemp( + _Inout_z_ char *_TemplateName); + + _Check_return_ + _CRTIMP + int + __cdecl + _pipe( + _Inout_updates_(2) int *_PtHandles, + _In_ unsigned int _PipeSize, + _In_ int _TextMode); + + _Check_return_ + _CRTIMP + int + __cdecl + _read( + _In_ int _FileHandle, + _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, + _In_ unsigned int _MaxCharCount); #ifndef _CRT_DIRECTORY_DEFINED #define _CRT_DIRECTORY_DEFINED - int __cdecl remove(const char *_Filename); - int __cdecl rename(const char *_OldFilename,const char *_NewFilename); - _CRTIMP int __cdecl _unlink(const char *_Filename); -#ifndef NO_OLDNAMES - _CRTIMP int __cdecl unlink(const char *_Filename); -#endif + + _Check_return_ + int + __cdecl + remove( + _In_z_ const char *_Filename); + + _Check_return_ + int + __cdecl + rename( + _In_z_ const char *_OldFilename, + _In_z_ const char *_NewFilename); + + _Check_return_ + _CRTIMP + int + __cdecl + _unlink( + _In_z_ const char *_Filename); + +#ifndef NO_OLDNAMES + _Check_return_ + _CRTIMP + int + __cdecl + unlink( + _In_z_ const char *_Filename); #endif - _CRTIMP int __cdecl _setmode(int _FileHandle,int _Mode); - _CRTIMP long __cdecl _tell(int _FileHandle); - _CRTIMP int __cdecl _umask(int _Mode); - _CRTIMP int __cdecl _write(int _FileHandle,const void *_Buf,unsigned int _MaxCharCount); +#endif /* _CRT_DIRECTORY_DEFINED */ + + _Check_return_ + _CRTIMP + int + __cdecl + _setmode( + _In_ int _FileHandle, + _In_ int _Mode); + + _Check_return_ + _CRTIMP + long + __cdecl + _tell( + _In_ int _FileHandle); + + _CRTIMP + int + __cdecl + _umask( + _In_ int _Mode); + + _CRTIMP + int + __cdecl + _write( + _In_ int _FileHandle, + _In_reads_bytes_(_MaxCharCount) const void *_Buf, + _In_ unsigned int _MaxCharCount); #if _INTEGRAL_MAX_BITS >= 64 - __MINGW_EXTENSION _CRTIMP __int64 __cdecl _filelengthi64(int _FileHandle); - _CRTIMP intptr_t __cdecl _findfirst32i64(const char *_Filename,struct _finddata32i64_t *_FindData); - _CRTIMP intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData); - _CRTIMP intptr_t __cdecl _findfirst64(const char *_Filename,struct __finddata64_t *_FindData); - _CRTIMP int __cdecl _findnext32i64(intptr_t _FindHandle,struct _finddata32i64_t *_FindData); - _CRTIMP int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData); - _CRTIMP int __cdecl _findnext64(intptr_t _FindHandle,struct __finddata64_t *_FindData); - __MINGW_EXTENSION _CRTIMP __int64 __cdecl _lseeki64(int _FileHandle,__int64 _Offset,int _Origin); - __MINGW_EXTENSION _CRTIMP __int64 __cdecl _telli64(int _FileHandle); + + _Check_return_ + __MINGW_EXTENSION + _CRTIMP + __int64 + __cdecl + _filelengthi64( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _findfirst32i64( + _In_z_ const char *_Filename, + _Out_ struct _finddata32i64_t *_FindData); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _findfirst64i32( + _In_z_ const char *_Filename, + _Out_ struct _finddata64i32_t *_FindData); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _findfirst64( + _In_z_ const char *_Filename, + _Out_ struct __finddata64_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _findnext32i64( + _In_ intptr_t _FindHandle, + _Out_ struct _finddata32i64_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _findnext64i32( + _In_ intptr_t _FindHandle, + _Out_ struct _finddata64i32_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _findnext64( + _In_ intptr_t _FindHandle, + _Out_ struct __finddata64_t *_FindData); + + _Check_return_opt_ + __MINGW_EXTENSION + _CRTIMP + __int64 + __cdecl + _lseeki64( + _In_ int _FileHandle, + _In_ __int64 _Offset, + _In_ int _Origin); + + _Check_return_ + __MINGW_EXTENSION + _CRTIMP + __int64 + __cdecl + _telli64( + _In_ int _FileHandle); + #ifdef __cplusplus #include #endif - __CRT_INLINE intptr_t __cdecl _findfirst64i32(const char *_Filename,struct _finddata64i32_t *_FindData) + + __CRT_INLINE + intptr_t + __cdecl + _findfirst64i32( + const char *_Filename, + struct _finddata64i32_t *_FindData) { struct __finddata64_t fd; intptr_t ret = _findfirst64(_Filename,&fd); @@ -224,7 +491,13 @@ _CRTIMP char* __cdecl _getcwd (char*, int); strncpy(_FindData->name,fd.name,260); return ret; } - __CRT_INLINE int __cdecl _findnext64i32(intptr_t _FindHandle,struct _finddata64i32_t *_FindData) + + __CRT_INLINE + int + __cdecl + _findnext64i32( + intptr_t _FindHandle, + struct _finddata64i32_t *_FindData) { struct __finddata64_t fd; int ret = _findnext64(_FindHandle,&fd); @@ -236,20 +509,69 @@ _CRTIMP char* __cdecl _getcwd (char*, int); strncpy(_FindData->name,fd.name,260); return ret; } -#endif + +#endif /* _INTEGRAL_MAX_BITS >= 64 */ #ifndef NO_OLDNAMES #ifndef _UWIN - _CRTIMP int __cdecl chdir (const char *); - _CRTIMP char *__cdecl getcwd (char *, int); - _CRTIMP int __cdecl mkdir (const char *); - _CRTIMP char *__cdecl mktemp(char *); - _CRTIMP int __cdecl rmdir (const char*); - _CRTIMP int __cdecl chmod (const char *, int); + + _Check_return_ + _CRTIMP + int + __cdecl + chdir( + _In_z_ const char *_Path); + + _Check_return_ + _Ret_opt_z_ + _CRTIMP + char* + __cdecl + getcwd( + _Out_writes_opt_(_SizeInBytes) char *_DstBuf, + _In_ int _SizeInBytes); + + _Check_return_ + _CRTIMP + int + __cdecl + mkdir( + _In_z_ const char *_Path); + + _CRTIMP + char* + __cdecl + mktemp( + _Inout_z_ char *_TemplateName); + + _Check_return_ + _CRTIMP + int + __cdecl + rmdir( + _In_z_ const char *_Path); + + _Check_return_ + _CRTIMP + int + __cdecl + chmod( + _In_z_ const char *_Filename, + _In_ int _AccessMode); + #endif /* _UWIN */ #endif /* Not NO_OLDNAMES */ - _CRTIMP errno_t __cdecl _sopen_s(int *_FileHandle,const char *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode); + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _sopen_s( + _Out_ int *_FileHandle, + _In_z_ const char *_Filename, + _In_ int _OpenFlag, + _In_ int _ShareFlag, + _In_ int _PermissionMode); #ifndef __cplusplus _CRTIMP int __cdecl _open(const char *_Filename,int _OpenFlag,...); @@ -261,25 +583,130 @@ _CRTIMP char* __cdecl _getcwd (char*, int); #ifndef _WIO_DEFINED #define _WIO_DEFINED - _CRTIMP int __cdecl _waccess(const wchar_t *_Filename,int _AccessMode); - _CRTIMP int __cdecl _wchmod(const wchar_t *_Filename,int _Mode); - _CRTIMP int __cdecl _wcreat(const wchar_t *_Filename,int _PermissionMode); - _CRTIMP intptr_t __cdecl _wfindfirst32(const wchar_t *_Filename,struct _wfinddata32_t *_FindData); - _CRTIMP int __cdecl _wfindnext32(intptr_t _FindHandle,struct _wfinddata32_t *_FindData); - _CRTIMP int __cdecl _wunlink(const wchar_t *_Filename); - _CRTIMP int __cdecl _wrename(const wchar_t *_NewFilename,const wchar_t *_OldFilename); - _CRTIMP wchar_t *__cdecl _wmktemp(wchar_t *_TemplateName); + + _Check_return_ + _CRTIMP + int + __cdecl + _waccess( + _In_z_ const wchar_t *_Filename, + _In_ int _AccessMode); + + _Check_return_ + _CRTIMP + int + __cdecl + _wchmod( + _In_z_ const wchar_t *_Filename, + _In_ int _Mode); + + _Check_return_ + _CRTIMP + int + __cdecl + _wcreat( + _In_z_ const wchar_t *_Filename, + _In_ int _PermissionMode); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _wfindfirst32( + _In_z_ const wchar_t *_Filename, + _Out_ struct _wfinddata32_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _wfindnext32( + _In_ intptr_t _FindHandle, + _Out_ struct _wfinddata32_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _wunlink( + _In_z_ const wchar_t *_Filename); + + _Check_return_ + _CRTIMP + int + __cdecl + _wrename( + _In_z_ const wchar_t *_NewFilename, + _In_z_ const wchar_t *_OldFilename); + + _CRTIMP + wchar_t* + __cdecl + _wmktemp( + _Inout_z_ wchar_t *_TemplateName); #if _INTEGRAL_MAX_BITS >= 64 - _CRTIMP intptr_t __cdecl _wfindfirst32i64(const wchar_t *_Filename,struct _wfinddata32i64_t *_FindData); - intptr_t __cdecl _wfindfirst64i32(const wchar_t *_Filename,struct _wfinddata64i32_t *_FindData); - _CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *_Filename,struct _wfinddata64_t *_FindData); - _CRTIMP int __cdecl _wfindnext32i64(intptr_t _FindHandle,struct _wfinddata32i64_t *_FindData); - int __cdecl _wfindnext64i32(intptr_t _FindHandle,struct _wfinddata64i32_t *_FindData); - _CRTIMP int __cdecl _wfindnext64(intptr_t _FindHandle,struct _wfinddata64_t *_FindData); -#endif - _CRTIMP errno_t __cdecl _wsopen_s(int *_FileHandle,const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionFlag); + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _wfindfirst32i64( + _In_z_ const wchar_t *_Filename, + _Out_ struct _wfinddata32i64_t *_FindData); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _wfindfirst64i32( + _In_z_ const wchar_t *_Filename, + _Out_ struct _wfinddata64i32_t *_FindData); + + _Check_return_ + _CRTIMP + intptr_t + __cdecl + _wfindfirst64( + _In_z_ const wchar_t *_Filename, + _Out_ struct _wfinddata64_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _wfindnext32i64( + _In_ intptr_t _FindHandle, + _Out_ struct _wfinddata32i64_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _wfindnext64i32( + _In_ intptr_t _FindHandle, + _Out_ struct _wfinddata64i32_t *_FindData); + + _Check_return_ + _CRTIMP + int + __cdecl + _wfindnext64( + _In_ intptr_t _FindHandle, + _Out_ struct _wfinddata64_t *_FindData); + +#endif /* _INTEGRAL_MAX_BITS >= 64 */ + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wsopen_s( + _Out_ int *_FileHandle, + _In_z_ const wchar_t *_Filename, + _In_ int _OpenFlag, + _In_ int _ShareFlag, + _In_ int _PermissionFlag); #if !defined(__cplusplus) || !(defined(_X86_) && !defined(__x86_64)) _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,...); @@ -291,33 +718,187 @@ _CRTIMP char* __cdecl _getcwd (char*, int); #endif /* !_WIO_DEFINED */ - int __cdecl __lock_fhandle(int _Filehandle); - void __cdecl _unlock_fhandle(int _Filehandle); - _CRTIMP intptr_t __cdecl _get_osfhandle(int _FileHandle); - _CRTIMP int __cdecl _open_osfhandle(intptr_t _OSFileHandle,int _Flags); + int + __cdecl + __lock_fhandle( + _In_ int _Filehandle); -#ifndef NO_OLDNAMES - _CRTIMP int __cdecl access(const char *_Filename,int _AccessMode); - _CRTIMP int __cdecl chmod(const char *_Filename,int _AccessMode); - _CRTIMP int __cdecl chsize(int _FileHandle,long _Size); - _CRTIMP int __cdecl close(int _FileHandle); - _CRTIMP int __cdecl creat(const char *_Filename,int _PermissionMode); - _CRTIMP int __cdecl dup(int _FileHandle); - _CRTIMP int __cdecl dup2(int _FileHandleSrc,int _FileHandleDst); - _CRTIMP int __cdecl eof(int _FileHandle); - _CRTIMP long __cdecl filelength(int _FileHandle); - _CRTIMP int __cdecl isatty(int _FileHandle); - _CRTIMP int __cdecl locking(int _FileHandle,int _LockMode,long _NumOfBytes); - _CRTIMP long __cdecl lseek(int _FileHandle,long _Offset,int _Origin); - _CRTIMP char *__cdecl mktemp(char *_TemplateName); - _CRTIMP int __cdecl open(const char *_Filename,int _OpenFlag,...); - _CRTIMP int __cdecl read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); - _CRTIMP int __cdecl setmode(int _FileHandle,int _Mode); - _CRTIMP int __cdecl sopen(const char *_Filename,int _OpenFlag,int _ShareFlag,...); - _CRTIMP long __cdecl tell(int _FileHandle); - _CRTIMP int __cdecl umask(int _Mode); - _CRTIMP int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount); -#endif + void + __cdecl + _unlock_fhandle( + _In_ int _Filehandle); + + _CRTIMP + intptr_t + __cdecl + _get_osfhandle( + _In_ int _FileHandle); + + _CRTIMP + int + __cdecl + _open_osfhandle( + _In_ intptr_t _OSFileHandle, + _In_ int _Flags); + +#ifndef NO_OLDNAMES + + _Check_return_ + _CRTIMP + int + __cdecl + access( + _In_z_ const char *_Filename, + _In_ int _AccessMode); + + _Check_return_ + _CRTIMP + int + __cdecl + chmod( + _In_z_ const char *_Filename, + _In_ int _AccessMode); + + _Check_return_ + _CRTIMP + int + __cdecl + chsize( + _In_ int _FileHandle, + _In_ long _Size); + + _Check_return_opt_ + _CRTIMP + int + __cdecl + close( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + creat( + _In_z_ const char *_Filename, + _In_ int _PermissionMode); + + _Check_return_ + _CRTIMP + int + __cdecl + dup( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + dup2( + _In_ int _FileHandleSrc, + _In_ int _FileHandleDst); + + _Check_return_ + _CRTIMP + int + __cdecl + __cdecl eof( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + long + __cdecl + filelength( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + isatty( + _In_ int _FileHandle); + + _Check_return_ + _CRTIMP + int + __cdecl + locking( + _In_ int _FileHandle, + _In_ int _LockMode, + _In_ long _NumOfBytes); + + _Check_return_opt_ + _CRTIMP + long + __cdecl + lseek( + _In_ int _FileHandle, + _In_ long _Offset, + _In_ int _Origin); + + _CRTIMP + char* + __cdecl + mktemp( + _Inout_z_ char *_TemplateName); + + _Check_return_ + _CRTIMP + int + __cdecl + open( + _In_z_ const char *_Filename, + _In_ int _OpenFlag, + ...); + + _CRTIMP + int + __cdecl + read( + _In_ int _FileHandle, + _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, + _In_ unsigned int _MaxCharCount); + + _Check_return_ + _CRTIMP + int + __cdecl + setmode( + _In_ int _FileHandle, + _In_ int _Mode); + + _CRTIMP + int + __cdecl + sopen( + const char *_Filename, + int _OpenFlag, + int _ShareFlag, + ...); + + _Check_return_ + _CRTIMP + long + __cdecl + tell( + _In_ int _FileHandle); + + _CRTIMP + int + __cdecl + umask( + _In_ int _Mode); + + _Check_return_ + _CRTIMP + int + __cdecl + write( + _In_ int _Filehandle, + _In_reads_bytes_(_MaxCharCount) const void *_Buf, + _In_ unsigned int _MaxCharCount); + +#endif /* NO_OLDNAMES */ #ifdef __cplusplus } @@ -345,12 +926,10 @@ static inline int __mingw_access (const char *__fname, int __mode) { #define access(__f,__m) __mingw_access (__f, __m) #endif - #ifdef __cplusplus } #endif - #pragma pack(pop) #include diff --git a/include/crt/locale.h b/include/crt/locale.h index d7ba1077288..f5cdc8a50fa 100644 --- a/include/crt/locale.h +++ b/include/crt/locale.h @@ -68,19 +68,68 @@ extern "C" { #endif - int __cdecl _configthreadlocale(int _Flag); - char *__cdecl setlocale(int _Category,const char *_Locale); - _CRTIMP struct lconv *__cdecl localeconv(void); - _locale_t __cdecl _get_current_locale(void); - _locale_t __cdecl _create_locale(int _Category,const char *_Locale); - void __cdecl _free_locale(_locale_t _Locale); - _locale_t __cdecl __get_current_locale(void); - _locale_t __cdecl __create_locale(int _Category,const char *_Locale); - void __cdecl __free_locale(_locale_t _Locale); + _Check_return_opt_ + int + __cdecl + _configthreadlocale( + _In_ int _Flag); + + _Check_return_opt_ + char* + __cdecl + setlocale( + _In_ int _Category, + _In_opt_z_ const char *_Locale); + + _Check_return_opt_ + _CRTIMP + struct lconv* + __cdecl + localeconv(void); + + _Check_return_opt_ + _locale_t + __cdecl + _get_current_locale(void); + + _Check_return_opt_ + _locale_t + __cdecl + _create_locale( + _In_ int _Category, + _In_z_ const char *_Locale); + + void + __cdecl + _free_locale( + _In_opt_ _locale_t _Locale); + + _Check_return_ + _locale_t + __cdecl + __get_current_locale(void); + + _Check_return_ + _locale_t + __cdecl + __create_locale( + _In_ int _Category, + _In_z_ const char *_Locale); + + void + __cdecl + __free_locale( + _In_opt_ _locale_t _Locale); #ifndef _WLOCALE_DEFINED #define _WLOCALE_DEFINED - _CRTIMP wchar_t *__cdecl _wsetlocale(int _Category,const wchar_t *_Locale); + _Check_return_opt_ + _CRTIMP + wchar_t* + __cdecl + _wsetlocale( + _In_ int _Category, + _In_opt_z_ const wchar_t *_Locale); #endif #ifdef __cplusplus diff --git a/include/crt/malloc.h b/include/crt/malloc.h index 51542e6cdee..c0ebb2ec25b 100644 --- a/include/crt/malloc.h +++ b/include/crt/malloc.h @@ -69,23 +69,129 @@ extern "C" { #ifndef _CRT_ALLOCATION_DEFINED #define _CRT_ALLOCATION_DEFINED - void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); - void __cdecl free(void *_Memory); - void *__cdecl malloc(size_t _Size); - void *__cdecl realloc(void *_Memory,size_t _NewSize); - _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_NumOfElements * _SizeOfElements) + void* + __cdecl + calloc( + _In_ size_t _NumOfElements, + _In_ size_t _SizeOfElements); + + void + __cdecl + free( + _Pre_maybenull_ _Post_invalid_ void *_Memory); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Size) + void* + __cdecl + malloc( + _In_ size_t _Size); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_NewSize) + void* + __cdecl + realloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _NewSize); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Count * _Size) + _CRTIMP + void* + __cdecl + _recalloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _Count, + _In_ size_t _Size); #ifdef __DO_ALIGN_DEFINES - _CRTIMP void __cdecl _aligned_free(void *_Memory); - _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); -#endif - _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); - _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); - _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); - _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); - _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); -#endif + _CRTIMP + void + __cdecl + _aligned_free( + _Pre_maybenull_ _Post_invalid_ void *_Memory); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Size) + _CRTIMP + void* + __cdecl + _aligned_malloc( + _In_ size_t _Size, + _In_ size_t _Alignment); + +#endif /* __DO_ALIGN_DEFINES */ + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Size) + _CRTIMP + void* + __cdecl + _aligned_offset_malloc( + _In_ size_t _Size, + _In_ size_t _Alignment, + _In_ size_t _Offset); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Size) + _CRTIMP + void* + __cdecl + _aligned_realloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _Size, + _In_ size_t _Alignment); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Count * _Size) + _CRTIMP + void* + __cdecl + _aligned_recalloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _Count, + _In_ size_t _Size, + _In_ size_t _Alignment); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Size) + _CRTIMP + void* + __cdecl + _aligned_offset_realloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _Size, + _In_ size_t _Alignment, + _In_ size_t _Offset); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_Count * _Size) + _CRTIMP + void* + __cdecl + _aligned_offset_recalloc( + _Pre_maybenull_ _Post_invalid_ void *_Memory, + _In_ size_t _Count, + _In_ size_t _Size, + _In_ size_t _Alignment, + _In_ size_t _Offset); + +#endif /* _CRT_ALLOCATION_DEFINED */ #ifdef __DO_ALIGN_DEFINES #undef __DO_ALIGN_DEFINES @@ -98,27 +204,109 @@ extern "C" { #define _MAX_WAIT_MALLOC_CRT 60000 _CRTIMP int __cdecl _resetstkoflw (void); - _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue); - _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize); - _CRTIMP size_t __cdecl _msize(void *_Memory); + _CRTIMP + unsigned long + __cdecl + _set_malloc_crt_max_wait( + _In_ unsigned long _NewValue); + + _Check_return_ + _Ret_maybenull_ + _Post_writable_byte_size_(_NewSize) + _CRTIMP + void* + __cdecl + _expand( + _In_opt_ void *_Memory, + _In_ size_t _NewSize); + + _Check_return_ + _CRTIMP + size_t + __cdecl + _msize( + _In_ void *_Memory); + #ifdef __GNUC__ #undef _alloca #define _alloca(x) __builtin_alloca((x)) #else - void *__cdecl _alloca(size_t _Size); + _Ret_notnull_ + _Post_writable_byte_size_(_Size) + void* + __cdecl + _alloca( + _In_ size_t _Size); #endif - _CRTIMP size_t __cdecl _get_sbh_threshold(void); - _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue); - _CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value); - _CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value); - _CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size); - _CRTIMP int __cdecl _heapchk(void); - _CRTIMP int __cdecl _heapmin(void); - _CRTIMP int __cdecl _heapset(unsigned int _Fill); - _CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo); - _CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit); - _CRTIMP intptr_t __cdecl _get_heap_handle(void); + + _Check_return_ + _CRTIMP + size_t + __cdecl + _get_sbh_threshold(void); + + _CRTIMP + int + __cdecl + _set_sbh_threshold( + _In_ size_t _NewValue); + + _CRTIMP + errno_t + __cdecl + _set_amblksiz( + _In_ size_t _Value); + + _CRTIMP + errno_t + __cdecl + _get_amblksiz( + _Out_ size_t *_Value); + + _Check_return_ + _CRTIMP + int + __cdecl + _heapadd( + _In_ void *_Memory, + _In_ size_t _Size); + + _Check_return_ + _CRTIMP + int + __cdecl + _heapchk(void); + + _Check_return_ + _CRTIMP + int + __cdecl + _heapmin(void); + + _CRTIMP + int + __cdecl + _heapset( + _In_ unsigned int _Fill); + + _CRTIMP + int + __cdecl + _heapwalk( + _Inout_ _HEAPINFO *_EntryInfo); + + _CRTIMP + size_t + __cdecl + _heapused( + size_t *_Used, + size_t *_Commit); + + _CRTIMP + intptr_t + __cdecl + _get_heap_handle(void); #define _ALLOCA_S_THRESHOLD 1024 #define _ALLOCA_S_STACK_MARKER 0xCCCC @@ -179,14 +367,18 @@ extern "C" { typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **); #endif - _CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook); + _CRTIMP + _HEAPHOOK + __cdecl + _setheaphook( + _In_opt_ _HEAPHOOK _NewHook); -#define _HEAP_MALLOC 1 -#define _HEAP_CALLOC 2 -#define _HEAP_FREE 3 +#define _HEAP_MALLOC 1 +#define _HEAP_CALLOC 2 +#define _HEAP_FREE 3 #define _HEAP_REALLOC 4 -#define _HEAP_MSIZE 5 -#define _HEAP_EXPAND 6 +#define _HEAP_MSIZE 5 +#define _HEAP_EXPAND 6 #endif #ifdef __cplusplus diff --git a/include/crt/math.h b/include/crt/math.h index 3b0a5420477..1eaf68a80d4 100644 --- a/include/crt/math.h +++ b/include/crt/math.h @@ -55,159 +55,182 @@ extern "C" { #ifndef _CRT_ABS_DEFINED #define _CRT_ABS_DEFINED - int __cdecl abs(int x); - long __cdecl labs(long x); + int __cdecl abs(_In_ int x); + long __cdecl labs(_In_ long x); #endif - double __cdecl acos(double x); - double __cdecl asin(double x); - double __cdecl atan(double x); - double __cdecl atan2(double y, double x); - double __cdecl cos(double x); - double __cdecl cosh(double x); - double __cdecl exp(double x); - double __cdecl fabs(double x); - double __cdecl fmod(double x, double y); - double __cdecl log(double x); - double __cdecl log10(double x); - double __cdecl pow(double x, double y); - double __cdecl sin(double x); - double __cdecl sinh(double x); - double __cdecl sqrt(double x); - double __cdecl tan(double x); - double __cdecl tanh(double x); + + double __cdecl acos(_In_ double x); + double __cdecl asin(_In_ double x); + double __cdecl atan(_In_ double x); + double __cdecl atan2(_In_ double y, _In_ double x); + double __cdecl cos(_In_ double x); + double __cdecl cosh(_In_ double x); + double __cdecl exp(_In_ double x); + double __cdecl fabs(_In_ double x); + double __cdecl fmod(_In_ double x, _In_ double y); + double __cdecl log(_In_ double x); + double __cdecl log10(_In_ double x); + double __cdecl pow(_In_ double x, double y); + double __cdecl sin(_In_ double x); + double __cdecl sinh(_In_ double x); + double __cdecl sqrt(_In_ double x); + double __cdecl tan(_In_ double x); + double __cdecl tanh(_In_ double x); + #ifndef _CRT_MATHERR_DEFINED #define _CRT_MATHERR_DEFINED - int __cdecl _matherr(struct _exception *except); + int __cdecl _matherr(_Inout_ struct _exception *except); #endif #ifndef _CRT_ATOF_DEFINED #define _CRT_ATOF_DEFINED - _CRTIMP double __cdecl atof(const char *str); - _CRTIMP double __cdecl _atof_l(const char *str ,_locale_t locale); -#endif + + _Check_return_ + _CRTIMP + double + __cdecl + atof( + _In_z_ const char *str); + + _Check_return_ + _CRTIMP + double + __cdecl + _atof_l( + _In_z_ const char *str, + _In_opt_ _locale_t locale); + +#endif /* _CRT_ATOF_DEFINED */ + #ifndef _SIGN_DEFINED #define _SIGN_DEFINED - _CRTIMP double __cdecl _copysign(double x,double sgn); - _CRTIMP double __cdecl _chgsign(double x); + _Check_return_ _CRTIMP double __cdecl _copysign(_In_ double x, _In_ double sgn); + _Check_return_ _CRTIMP double __cdecl _chgsign(_In_ double x); #endif - _CRTIMP double __cdecl _cabs(struct _complex a); - _CRTIMP double __cdecl ceil(double x); - _CRTIMP double __cdecl floor(double x); - _CRTIMP double __cdecl frexp(double x, int *y); - _CRTIMP double __cdecl _hypot(double x, double y); - _CRTIMP double __cdecl _j0(double x); - _CRTIMP double __cdecl _j1(double x); - _CRTIMP double __cdecl _jn(int x, double y); - _CRTIMP double __cdecl ldexp(double x, int y); - _CRTIMP double __cdecl modf(double x, double *y); - _CRTIMP double __cdecl _y0(double x); - _CRTIMP double __cdecl _y1(double x); - _CRTIMP double __cdecl _yn(int x, double y); - _CRTIMP float __cdecl _hypotf(float x, float y); + + _CRTIMP double __cdecl _cabs(_In_ struct _complex a); + _CRTIMP double __cdecl ceil(_In_ double x); + _CRTIMP double __cdecl floor(_In_ double x); + _CRTIMP double __cdecl frexp(_In_ double x, _Out_ int *y); + _CRTIMP double __cdecl _hypot(_In_ double x, _In_ double y); + _CRTIMP double __cdecl _j0(_In_ double x); + _CRTIMP double __cdecl _j1(_In_ double x); + _CRTIMP double __cdecl _jn(_In_ int x, _In_ double y); + _CRTIMP double __cdecl ldexp(_In_ double x, _In_ int y); + _CRTIMP double __cdecl modf(_In_ double x, _Out_ double *y); + _CRTIMP double __cdecl _y0(_In_ double x); + _CRTIMP double __cdecl _y1(_In_ double x); + _CRTIMP double __cdecl _yn(_In_ int x, _In_ double y); + _CRTIMP float __cdecl _hypotf(_In_ float x, _In_ float y); #if defined(__i386__) || defined(_M_IX86) - _CRTIMP int __cdecl _set_SSE2_enable(int flag); + _CRTIMP int __cdecl _set_SSE2_enable(_In_ int flag); #endif #if defined(__x86_64) || defined(_M_AMD64) - _CRTIMP float __cdecl _copysignf(float x, float sgn); - _CRTIMP float __cdecl _chgsignf(float x); - _CRTIMP float __cdecl _logbf(float x); - _CRTIMP float __cdecl _nextafterf(float x,float y); - _CRTIMP int __cdecl _finitef(float x); - _CRTIMP int __cdecl _isnanf(float x); - _CRTIMP int __cdecl _fpclassf(float x); + _CRTIMP float __cdecl _copysignf(_In_ float x, _In_ float sgn); + _CRTIMP float __cdecl _chgsignf(_In_ float x); + _CRTIMP float __cdecl _logbf(_In_ float x); + _CRTIMP float __cdecl _nextafterf(_In_ float x, _In_ float y); + _CRTIMP int __cdecl _finitef(_In_ float x); + _CRTIMP int __cdecl _isnanf(_In_ float x); + _CRTIMP int __cdecl _fpclassf(_In_ float x); #endif #if defined(__ia64__) || defined (_M_IA64) - _CRTIMP float __cdecl fabsf(float x); - _CRTIMP float __cdecl ldexpf(float x, int y); - _CRTIMP long double __cdecl tanl(long double x); + _CRTIMP float __cdecl fabsf(_In_ float x); + _CRTIMP float __cdecl ldexpf(_In_ float x, _In_ int y); + _CRTIMP long double __cdecl tanl(_In_ long double x); #else - __CRT_INLINE float __cdecl fabsf(float x) { return ((float)fabs((double)x)); } - __CRT_INLINE float __cdecl ldexpf(float x, int expn) { return (float)ldexp (x, expn); } - __CRT_INLINE long double tanl(long double x) { return (tan((double)x)); } + __CRT_INLINE float __cdecl fabsf(_In_ float x) { return ((float)fabs((double)x)); } + __CRT_INLINE float __cdecl ldexpf(_In_ float x, _In_ int expn) { return (float)ldexp(x, expn); } + __CRT_INLINE long double tanl(_In_ long double x) { return (tan((double)x)); } #endif -#if (_WIN32_WINNT >= 0x600) && \ +#if (_WIN32_WINNT >= 0x600) && \ (defined(__x86_64) || defined(_M_AMD64) || \ defined (__ia64__) || defined (_M_IA64)) - _CRTIMP float __cdecl acosf(float x); - _CRTIMP float __cdecl asinf(float x); - _CRTIMP float __cdecl atanf(float x); - _CRTIMP float __cdecl atan2f(float x, float y); - _CRTIMP float __cdecl ceilf(float x); - _CRTIMP float __cdecl cosf(float x); - _CRTIMP float __cdecl coshf(float x); - _CRTIMP float __cdecl expf(float x); - _CRTIMP float __cdecl floorf(float x); - _CRTIMP float __cdecl fmodf(float x, float y); - _CRTIMP float __cdecl logf(float x); - _CRTIMP float __cdecl log10f(float x); - _CRTIMP float __cdecl modff(float x, float *y); - _CRTIMP float __cdecl powf(float b, float e); - _CRTIMP float __cdecl sinf(float x); - _CRTIMP float __cdecl sinhf(float x); - _CRTIMP float __cdecl sqrtf(float x); - _CRTIMP float __cdecl tanf(float x); - _CRTIMP float __cdecl tanhf(float x); + + _CRTIMP float __cdecl acosf(_In_ float x); + _CRTIMP float __cdecl asinf(_In_ float x); + _CRTIMP float __cdecl atanf(_In_ float x); + _CRTIMP float __cdecl atan2f(_In_ float x, _In_ float y); + _CRTIMP float __cdecl ceilf(_In_ float x); + _CRTIMP float __cdecl cosf(_In_ float x); + _CRTIMP float __cdecl coshf(_In_ float x); + _CRTIMP float __cdecl expf(_In_ float x); + _CRTIMP float __cdecl floorf(_In_ float x); + _CRTIMP float __cdecl fmodf(_In_ float x, _In_ float y); + _CRTIMP float __cdecl logf(_In_ float x); + _CRTIMP float __cdecl log10f(_In_ float x); + _CRTIMP float __cdecl modff(_In_ float x, _Out_ float *y); + _CRTIMP float __cdecl powf(_In_ float b, _In_ float e); + _CRTIMP float __cdecl sinf(_In_ float x); + _CRTIMP float __cdecl sinhf(_In_ float x); + _CRTIMP float __cdecl sqrtf(_In_ float x); + _CRTIMP float __cdecl tanf(_In_ float x); + _CRTIMP float __cdecl tanhf(_In_ float x); + #else - __CRT_INLINE float acosf(float x) { return ((float)acos((double)x)); } - __CRT_INLINE float asinf(float x) { return ((float)asin((double)x)); } - __CRT_INLINE float atanf(float x) { return ((float)atan((double)x)); } - __CRT_INLINE float atan2f(float x,float y) { return ((float)atan2((double)x,(double)y)); } - __CRT_INLINE float ceilf(float x) { return ((float)ceil((double)x)); } - __CRT_INLINE float cosf(float x) { return ((float)cos((double)x)); } - __CRT_INLINE float coshf(float x) { return ((float)cosh((double)x)); } - __CRT_INLINE float expf(float x) { return ((float)exp((double)x)); } - __CRT_INLINE float floorf(float x) { return ((float)floor((double)x)); } - __CRT_INLINE float fmodf(float x,float y) { return ((float)fmod((double)x,(double)y)); } - __CRT_INLINE float logf(float x) { return ((float)log((double)x)); } - __CRT_INLINE float log10f(float x) { return ((float)log10((double)x)); } - __CRT_INLINE float modff(float x,float *y) { + + __CRT_INLINE float acosf(_In_ float x) { return ((float)acos((double)x)); } + __CRT_INLINE float asinf(_In_ float x) { return ((float)asin((double)x)); } + __CRT_INLINE float atanf(_In_ float x) { return ((float)atan((double)x)); } + __CRT_INLINE float atan2f(_In_ float x, _In_ float y) { return ((float)atan2((double)x,(double)y)); } + __CRT_INLINE float ceilf(_In_ float x) { return ((float)ceil((double)x)); } + __CRT_INLINE float cosf(_In_ float x) { return ((float)cos((double)x)); } + __CRT_INLINE float coshf(_In_ float x) { return ((float)cosh((double)x)); } + __CRT_INLINE float expf(_In_ float x) { return ((float)exp((double)x)); } + __CRT_INLINE float floorf(_In_ float x) { return ((float)floor((double)x)); } + __CRT_INLINE float fmodf(_In_ float x, _In_ float y) { return ((float)fmod((double)x,(double)y)); } + __CRT_INLINE float logf(_In_ float x) { return ((float)log((double)x)); } + __CRT_INLINE float log10f(_In_ float x) { return ((float)log10((double)x)); } + __CRT_INLINE float modff(_In_ float x, _Out_ float *y) { double _Di,_Df = modf((double)x,&_Di); *y = (float)_Di; return ((float)_Df); } - __CRT_INLINE float powf(float x,float y) { return ((float)pow((double)x,(double)y)); } - __CRT_INLINE float sinf(float x) { return ((float)sin((double)x)); } - __CRT_INLINE float sinhf(float x) { return ((float)sinh((double)x)); } - __CRT_INLINE float sqrtf(float x) { return ((float)sqrt((double)x)); } - __CRT_INLINE float tanf(float x) { return ((float)tan((double)x)); } - __CRT_INLINE float tanhf(float x) { return ((float)tanh((double)x)); } + __CRT_INLINE float powf(_In_ float x, _In_ float y) { return ((float)pow((double)x,(double)y)); } + __CRT_INLINE float sinf(_In_ float x) { return ((float)sin((double)x)); } + __CRT_INLINE float sinhf(_In_ float x) { return ((float)sinh((double)x)); } + __CRT_INLINE float sqrtf(_In_ float x) { return ((float)sqrt((double)x)); } + __CRT_INLINE float tanf(_In_ float x) { return ((float)tan((double)x)); } + __CRT_INLINE float tanhf(_In_ float x) { return ((float)tanh((double)x)); } + #endif - __CRT_INLINE long double acosl(long double x) { return (acos((double)x)); } - __CRT_INLINE long double asinl(long double x) { return (asin((double)x)); } - __CRT_INLINE long double atanl(long double x) { return (atan((double)x)); } - __CRT_INLINE long double atan2l(long double y, long double x) { return (atan2((double)y, (double)x)); } - __CRT_INLINE long double ceill(long double x) { return (ceil((double)x)); } - __CRT_INLINE long double cosl(long double x) { return (cos((double)x)); } - __CRT_INLINE long double coshl(long double x) { return (cosh((double)x)); } - __CRT_INLINE long double expl(long double x) { return (exp((double)x)); } - __CRT_INLINE long double floorl(long double x) { return (floor((double)x)); } - __CRT_INLINE long double fmodl(long double x, long double y) { return (fmod((double)x, (double)y)); } - __CRT_INLINE long double frexpl(long double x, int *y) { return (frexp((double)x, y)); } - __CRT_INLINE long double logl(long double x) { return (log((double)x)); } - __CRT_INLINE long double log10l(long double x) { return (log10((double)x)); } - __CRT_INLINE long double powl(long double x, long double y) { return (pow((double)x, (double)y)); } - __CRT_INLINE long double sinl(long double x) { return (sin((double)x)); } - __CRT_INLINE long double sinhl(long double x) { return (sinh((double)x)); } - __CRT_INLINE long double sqrtl(long double x) { return (sqrt((double)x)); } - __CRT_INLINE long double tanhl(long double x) {return (tanh((double)x)); } - __CRT_INLINE long double __cdecl fabsl(long double x) { return fabs((double)x); } - __CRT_INLINE long double _chgsignl(long double _Number) { return _chgsign((double)(_Number)); } - __CRT_INLINE long double _copysignl(long double _Number, long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); } - __CRT_INLINE long double _hypotl(long double x,long double y) { return _hypot((double)(x),(double)(y)); } - __CRT_INLINE float frexpf(float x, int *y) { return ((float)frexp((double)x,y)); } - __CRT_INLINE long double ldexpl(long double x, int y) { return ldexp((double)x, y); } - __CRT_INLINE long double modfl(long double x,long double *y) { + __CRT_INLINE long double acosl(_In_ long double x) { return (acos((double)x)); } + __CRT_INLINE long double asinl(_In_ long double x) { return (asin((double)x)); } + __CRT_INLINE long double atanl(_In_ long double x) { return (atan((double)x)); } + __CRT_INLINE long double atan2l(_In_ long double y, _In_ long double x) { return (atan2((double)y, (double)x)); } + __CRT_INLINE long double ceill(_In_ long double x) { return (ceil((double)x)); } + __CRT_INLINE long double cosl(_In_ long double x) { return (cos((double)x)); } + __CRT_INLINE long double coshl(_In_ long double x) { return (cosh((double)x)); } + __CRT_INLINE long double expl(_In_ long double x) { return (exp((double)x)); } + __CRT_INLINE long double floorl(_In_ long double x) { return (floor((double)x)); } + __CRT_INLINE long double fmodl(_In_ long double x, _In_ long double y) { return (fmod((double)x, (double)y)); } + __CRT_INLINE long double frexpl(_In_ long double x, _Out_ int *y) { return (frexp((double)x, y)); } + __CRT_INLINE long double logl(_In_ long double x) { return (log((double)x)); } + __CRT_INLINE long double log10l(_In_ long double x) { return (log10((double)x)); } + __CRT_INLINE long double powl(_In_ long double x, _In_ long double y) { return (pow((double)x, (double)y)); } + __CRT_INLINE long double sinl(_In_ long double x) { return (sin((double)x)); } + __CRT_INLINE long double sinhl(_In_ long double x) { return (sinh((double)x)); } + __CRT_INLINE long double sqrtl(_In_ long double x) { return (sqrt((double)x)); } + __CRT_INLINE long double tanhl(_In_ long double x) {return (tanh((double)x)); } + __CRT_INLINE long double __cdecl fabsl(_In_ long double x) { return fabs((double)x); } + __CRT_INLINE long double _chgsignl(_In_ long double _Number) { return _chgsign((double)(_Number)); } + __CRT_INLINE long double _copysignl(_In_ long double _Number, _In_ long double _Sign) { return _copysign((double)(_Number),(double)(_Sign)); } + __CRT_INLINE long double _hypotl(_In_ long double x, _In_ long double y) { return _hypot((double)(x),(double)(y)); } + __CRT_INLINE float frexpf(_In_ float x, _Out_ int *y) { return ((float)frexp((double)x,y)); } + __CRT_INLINE long double ldexpl(_In_ long double x, _In_ int y) { return ldexp((double)x, y); } + __CRT_INLINE long double modfl(_In_ long double x, _Out_ long double *y) { double _Di,_Df = modf((double)x,&_Di); *y = (long double)_Di; return (_Df); } -#ifndef NO_OLDNAMES +#ifndef NO_OLDNAMES + #define DOMAIN _DOMAIN #define SING _SING #define OVERFLOW _OVERFLOW @@ -218,15 +241,17 @@ extern "C" { #define HUGE _HUGE // _CRTIMP double __cdecl cabs(struct _complex x); #define cabs _cabs - _CRTIMP double __cdecl hypot(double x,double y); - _CRTIMP double __cdecl j0(double x); - _CRTIMP double __cdecl j1(double x); - _CRTIMP double __cdecl jn(int x,double y); - _CRTIMP double __cdecl y0(double x); - _CRTIMP double __cdecl y1(double x); - _CRTIMP double __cdecl yn(int x,double y); - __CRT_INLINE float __cdecl hypotf(float x, float y) { return (float) hypot (x, y); } -#endif + + _CRTIMP double __cdecl hypot(_In_ double x, _In_ double y); + _CRTIMP double __cdecl j0(_In_ double x); + _CRTIMP double __cdecl j1(_In_ double x); + _CRTIMP double __cdecl jn(_In_ int x, _In_ double y); + _CRTIMP double __cdecl y0(_In_ double x); + _CRTIMP double __cdecl y1(_In_ double x); + _CRTIMP double __cdecl yn(_In_ int x, _In_ double y); + __CRT_INLINE float __cdecl hypotf(_In_ float x, _In_ float y) { return (float) hypot(x, y); } + +#endif /* NO_OLDNAMES */ #ifdef __cplusplus } diff --git a/include/crt/mbctype.h b/include/crt/mbctype.h index f39c66f5bbc..7a7a709be85 100644 --- a/include/crt/mbctype.h +++ b/include/crt/mbctype.h @@ -17,8 +17,8 @@ extern "C" { #if 1 #if defined (_DLL) && defined (_M_IX86) /* Retained for compatibility with VC++ 5.0 and earlier versions */ - _CRTIMP unsigned char * __cdecl __p__mbctype(void); - _CRTIMP unsigned char * __cdecl __p__mbcasemap(void); + _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbctype(void); + _Check_return_ _CRTIMP unsigned char * __cdecl __p__mbcasemap(void); #endif /* defined (_DLL) && defined (_M_IX86) */ #endif #ifndef _mbctype @@ -70,40 +70,225 @@ extern "C" { #ifndef _MBCTYPE_DEFINED #define _MBCTYPE_DEFINED - _CRTIMP int __cdecl _setmbcp(int _CodePage); - _CRTIMP int __cdecl _getmbcp(void); - _CRTIMP int __cdecl _ismbbkalnum(unsigned int _C); - _CRTIMP int __cdecl _ismbbkalnum_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbkana(unsigned int _C); - _CRTIMP int __cdecl _ismbbkana_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbkpunct(unsigned int _C); - _CRTIMP int __cdecl _ismbbkpunct_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbkprint(unsigned int _C); - _CRTIMP int __cdecl _ismbbkprint_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbalpha(unsigned int _C); - _CRTIMP int __cdecl _ismbbalpha_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbpunct(unsigned int _C); - _CRTIMP int __cdecl _ismbbpunct_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbalnum(unsigned int _C); - _CRTIMP int __cdecl _ismbbalnum_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbprint(unsigned int _C); - _CRTIMP int __cdecl _ismbbprint_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbgraph(unsigned int _C); - _CRTIMP int __cdecl _ismbbgraph_l(unsigned int _C,_locale_t _Locale); + _CRTIMP + int + __cdecl + _setmbcp( + _In_ int _CodePage); + + _CRTIMP + int + __cdecl + _getmbcp(void); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkalnum( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkalnum_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkana( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkana_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkpunct( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkpunct_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkprint( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbkprint_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbalpha( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbalpha_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbpunct( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbpunct_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbalnum( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbalnum_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbprint( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbprint_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbgraph( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbgraph_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + #ifndef _MBLEADTRAIL_DEFINED #define _MBLEADTRAIL_DEFINED - _CRTIMP int __cdecl _ismbblead(unsigned int _C); - _CRTIMP int __cdecl _ismbblead_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbbtrail(unsigned int _C); - _CRTIMP int __cdecl _ismbbtrail_l(unsigned int _C,_locale_t _Locale); - _CRTIMP int __cdecl _ismbslead(const unsigned char *_Str,const unsigned char *_Pos); - _CRTIMP int __cdecl _ismbslead_l(const unsigned char *_Str,const unsigned char *_Pos,_locale_t _Locale); - _CRTIMP int __cdecl _ismbstrail(const unsigned char *_Str,const unsigned char *_Pos); - _CRTIMP int __cdecl _ismbstrail_l(const unsigned char *_Str,const unsigned char *_Pos,_locale_t _Locale); -#endif -#endif + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbblead( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbblead_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbtrail( + _In_ unsigned int _C); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbbtrail_l( + _In_ unsigned int _C, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbslead( + _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str, + _In_z_ const unsigned char *_Pos); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbslead_l( + _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str, + _In_z_ const unsigned char *_Pos, + _In_opt_ _locale_t _Locale); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbstrail( + _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str, + _In_z_ const unsigned char *_Pos); + + _Check_return_ + _CRTIMP + int + __cdecl + _ismbstrail_l( + _In_reads_z_(_Pos - _Str + 1) const unsigned char *_Str, + _In_z_ const unsigned char *_Pos, + _In_opt_ _locale_t _Locale); + +#endif /* _MBLEADTRAIL_DEFINED */ + +#endif /* _MBCTYPE_DEFINED */ #ifdef __cplusplus } #endif -#endif + +#endif /* _INC_MBCTYPE */ diff --git a/include/crt/sec_api/stdlib_s.h b/include/crt/sec_api/stdlib_s.h index 2601746b7e4..2f2697b2eec 100644 --- a/include/crt/sec_api/stdlib_s.h +++ b/include/crt/sec_api/stdlib_s.h @@ -14,50 +14,330 @@ extern "C" { #endif - _CRTIMP errno_t __cdecl _dupenv_s(char **_PBuffer,size_t *_PBufferSizeInBytes,const char *_VarName); - _CRTIMP errno_t __cdecl _itoa_s(int _Value,char *_DstBuf,size_t _Size,int _Radix); - _CRTIMP errno_t __cdecl _i64toa_s(__int64 _Val,char *_DstBuf,size_t _Size,int _Radix); - _CRTIMP errno_t __cdecl _ui64toa_s(unsigned __int64 _Val,char *_DstBuf,size_t _Size,int _Radix); - _CRTIMP errno_t __cdecl _ltoa_s(long _Val,char *_DstBuf,size_t _Size,int _Radix); - _CRTIMP errno_t __cdecl mbstowcs_s(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount); - _CRTIMP errno_t __cdecl _mbstowcs_s_l(size_t *_PtNumOfCharConverted,wchar_t *_DstBuf,size_t _SizeInWords,const char *_SrcBuf,size_t _MaxCount,_locale_t _Locale); - _CRTIMP errno_t __cdecl _ultoa_s(unsigned long _Val,char *_DstBuf,size_t _Size,int _Radix); - _CRTIMP errno_t __cdecl _wctomb_s_l(int *_SizeConverted,char *_MbCh,size_t _SizeInBytes,wchar_t _WCh,_locale_t _Locale); - _CRTIMP errno_t __cdecl wcstombs_s(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes); - _CRTIMP errno_t __cdecl _wcstombs_s_l(size_t *_PtNumOfCharConverted,char *_Dst,size_t _DstSizeInBytes,const wchar_t *_Src,size_t _MaxCountInBytes,_locale_t _Locale); + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _dupenv_s( + _Outptr_result_buffer_maybenull_(*_PBufferSizeInBytes) _Outptr_result_z_ char **_PBuffer, + _Out_opt_ size_t *_PBufferSizeInBytes, + _In_z_ const char *_VarName); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _itoa_s( + _In_ int _Value, + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ int _Radix); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _i64toa_s( + _In_ __int64 _Val, + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ int _Radix); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _ui64toa_s( + _In_ unsigned __int64 _Val, + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ int _Radix); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _ltoa_s( + _In_ long _Val, + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ int _Radix); + + _Success_(return!=EINVAL) + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + mbstowcs_s( + _Out_opt_ size_t *pcchConverted, + _Out_writes_to_opt_(sizeInWords, *pcchConverted) wchar_t *pwcstr, + _In_ size_t sizeInWords, + _In_reads_or_z_(count) const char *pmbstr, + _In_ size_t count); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _mbstowcs_s_l( + _Out_opt_ size_t *_PtNumOfCharConverted, + _Out_writes_to_opt_(_SizeInWords, *_PtNumOfCharConverted) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_reads_or_z_(_MaxCount) const char *_SrcBuf, + _In_ size_t _MaxCount, + _In_opt_ _locale_t _Locale); + + _Check_return_opt_ + _CRTIMP + errno_t + __cdecl + _ultoa_s( + _In_ unsigned long _Val, + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ int _Radix); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wctomb_s_l( + _Out_opt_ int *_SizeConverted, + _Out_writes_opt_z_(_SizeInBytes) char *_MbCh, + _In_ size_t _SizeInBytes, + _In_ wchar_t _WCh, + _In_opt_ _locale_t _Locale); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + wcstombs_s( + _Out_opt_ size_t *_PtNumOfCharConverted, + _Out_writes_bytes_to_opt_(_DstSizeInBytes, *_PtNumOfCharConverted) char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const wchar_t *_Src, + _In_ size_t _MaxCountInBytes); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wcstombs_s_l( + _Out_opt_ size_t *_PtNumOfCharConverted, + _Out_writes_bytes_to_opt_(_DstSizeInBytes, *_PtNumOfCharConverted) char *_Dst, + _In_ size_t _DstSizeInBytes, + _In_z_ const wchar_t *_Src, + _In_ size_t _MaxCountInBytes, + _In_opt_ _locale_t _Locale); #ifndef _WSTDLIB_S_DEFINED #define _WSTDLIB_S_DEFINED - _CRTIMP errno_t __cdecl _itow_s (int _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); - _CRTIMP errno_t __cdecl _ltow_s (long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); - _CRTIMP errno_t __cdecl _ultow_s (unsigned long _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); - _CRTIMP errno_t __cdecl _wgetenv_s(size_t *_ReturnSize,wchar_t *_DstBuf,size_t _DstSizeInWords,const wchar_t *_VarName); - _CRTIMP errno_t __cdecl _wdupenv_s(wchar_t **_Buffer,size_t *_BufferSizeInWords,const wchar_t *_VarName); - _CRTIMP errno_t __cdecl _i64tow_s(__int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); - _CRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64 _Val,wchar_t *_DstBuf,size_t _SizeInWords,int _Radix); -#endif + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _itow_s( + _In_ int _Val, + _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_ int _Radix); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _ltow_s( + _In_ long _Val, + _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_ int _Radix); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _ultow_s( + _In_ unsigned long _Val, + _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_ int _Radix); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wgetenv_s( + _Out_ size_t *_ReturnSize, + _Out_writes_opt_z_(_DstSizeInWords) wchar_t *_DstBuf, + _In_ size_t _DstSizeInWords, + _In_z_ const wchar_t *_VarName); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wdupenv_s( + _Outptr_result_buffer_maybenull_(*_BufferSizeInWords) _Outptr_result_z_ wchar_t **_Buffer, + _Out_opt_ size_t *_BufferSizeInWords, + _In_z_ const wchar_t *_VarName); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _i64tow_s( + _In_ __int64 _Val, + _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_ int _Radix); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _ui64tow_s( + _In_ unsigned __int64 _Val, + _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf, + _In_ size_t _SizeInWords, + _In_ int _Radix); + +#endif /* _WSTDLIB_S_DEFINED */ #ifndef _POSIX_ - _CRTIMP errno_t __cdecl _ecvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDights,int *_PtDec,int *_PtSign); - _CRTIMP errno_t __cdecl _fcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDec,int *_PtDec,int *_PtSign); - _CRTIMP errno_t __cdecl _gcvt_s(char *_DstBuf,size_t _Size,double _Val,int _NumOfDigits); - _CRTIMP errno_t __cdecl _makepath_s(char *_PathResult,size_t _Size,const char *_Drive,const char *_Dir,const char *_Filename,const char *_Ext); - _CRTIMP errno_t __cdecl _putenv_s(const char *_Name,const char *_Value); - _CRTIMP errno_t __cdecl _searchenv_s(const char *_Filename,const char *_EnvVar,char *_ResultPath,size_t _SizeInBytes); - _CRTIMP errno_t __cdecl _splitpath_s(const char *_FullPath,char *_Drive,size_t _DriveSize,char *_Dir,size_t _DirSize,char *_Filename,size_t _FilenameSize,char *_Ext,size_t _ExtSize); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _ecvt_s( + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ double _Val, + _In_ int _NumOfDights, + _Out_ int *_PtDec, + _Out_ int *_PtSign); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _fcvt_s( + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ double _Val, + _In_ int _NumOfDec, + _Out_ int *_PtDec, + _Out_ int *_PtSign); + + _CRTIMP + errno_t + __cdecl + _gcvt_s( + _Out_writes_z_(_Size) char *_DstBuf, + _In_ size_t _Size, + _In_ double _Val, + _In_ int _NumOfDigits); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _makepath_s( + _Out_writes_z_(_Size) char *_PathResult, + _In_ size_t _Size, + _In_opt_z_ const char *_Drive, + _In_opt_z_ const char *_Dir, + _In_opt_z_ const char *_Filename, + _In_opt_z_ const char *_Ext); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _putenv_s( + _In_z_ const char *_Name, + _In_z_ const char *_Value); + + _CRTIMP + errno_t + __cdecl + _searchenv_s( + _In_z_ const char *_Filename, + _In_z_ const char *_EnvVar, + _Out_writes_z_(_SizeInBytes) char *_ResultPath, + _In_ size_t _SizeInBytes); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _splitpath_s( + _In_z_ const char *_FullPath, + _Out_writes_opt_z_(_DriveSize) char *_Drive, + _In_ size_t _DriveSize, + _Out_writes_opt_z_(_DirSize) char *_Dir, + _In_ size_t _DirSize, + _Out_writes_opt_z_(_FilenameSize) char *_Filename, + _In_ size_t _FilenameSize, + _Out_writes_opt_z_(_ExtSize) char *_Ext, + _In_ size_t _ExtSize); #ifndef _WSTDLIBP_S_DEFINED #define _WSTDLIBP_S_DEFINED - _CRTIMP errno_t __cdecl _wmakepath_s(wchar_t *_PathResult,size_t _SizeInWords,const wchar_t *_Drive,const wchar_t *_Dir,const wchar_t *_Filename,const wchar_t *_Ext); - _CRTIMP errno_t __cdecl _wputenv_s(const wchar_t *_Name,const wchar_t *_Value); - _CRTIMP errno_t __cdecl _wsearchenv_s(const wchar_t *_Filename,const wchar_t *_EnvVar,wchar_t *_ResultPath,size_t _SizeInWords); - _CRTIMP errno_t __cdecl _wsplitpath_s(const wchar_t *_FullPath,wchar_t *_Drive,size_t _DriveSizeInWords,wchar_t *_Dir,size_t _DirSizeInWords,wchar_t *_Filename,size_t _FilenameSizeInWords,wchar_t *_Ext,size_t _ExtSizeInWords); -#endif -#endif + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wmakepath_s( + _Out_writes_z_(_SizeInWords) wchar_t *_PathResult, + _In_ size_t _SizeInWords, + _In_opt_z_ const wchar_t *_Drive, + _In_opt_z_ const wchar_t *_Dir, + _In_opt_z_ const wchar_t *_Filename, + _In_opt_z_ const wchar_t *_Ext); + + _Check_return_wat_ + _CRTIMP + errno_t + __cdecl + _wputenv_s( + _In_z_ const wchar_t *_Name, + _In_z_ const wchar_t *_Value); + + _CRTIMP + errno_t + __cdecl + _wsearchenv_s( + _In_z_ const wchar_t *_Filename, + _In_z_ const wchar_t *_EnvVar, + _Out_writes_z_(_SizeInWords) wchar_t *_ResultPath, + _In_ size_t _SizeInWords); + + _CRTIMP + errno_t + __cdecl + _wsplitpath_s( + _In_z_ const wchar_t *_FullPath, + _Out_writes_opt_z_(_DriveSizeInWords) wchar_t *_Drive, + _In_ size_t _DriveSizeInWords, + _Out_writes_opt_z_(_DirSizeInWords) wchar_t *_Dir, + _In_ size_t _DirSizeInWords, + _Out_writes_opt_z_(_FilenameSizeInWords) wchar_t *_Filename, + _In_ size_t _FilenameSizeInWords, + _Out_writes_opt_z_(_ExtSizeInWords) wchar_t *_Ext, + _In_ size_t _ExtSizeInWords); + +#endif /* _WSTDLIBP_S_DEFINED */ + +#endif /* _POSIX_ */ #ifdef __cplusplus } #endif -#endif -#endif +#endif /* defined(MINGW_HAS_SECURE_API) */ + +#endif /* _INC_STDLIB_S */ diff --git a/include/crt/stdlib.h b/include/crt/stdlib.h index 1ee091de6e8..cd197283ecc 100644 --- a/include/crt/stdlib.h +++ b/include/crt/stdlib.h @@ -131,11 +131,11 @@ extern "C" { typedef void (__cdecl *_purecall_handler)(void); - _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler _Handler); + _CRTIMP _purecall_handler __cdecl _set_purecall_handler(_In_opt_ _purecall_handler _Handler); _CRTIMP _purecall_handler __cdecl _get_purecall_handler(void); typedef void (__cdecl *_invalid_parameter_handler)(const wchar_t *,const wchar_t *,const wchar_t *,unsigned int,uintptr_t); - _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_invalid_parameter_handler _Handler); + _invalid_parameter_handler __cdecl _set_invalid_parameter_handler(_In_opt_ _invalid_parameter_handler _Handler); _invalid_parameter_handler __cdecl _get_invalid_parameter_handler(void); #include @@ -186,8 +186,8 @@ extern "C" { _CRTIMP errno_t __cdecl _get_environ(_Out_ char***); _CRTIMP errno_t __cdecl _get_wenviron(_Out_ wchar_t***); - _CRTIMP errno_t __cdecl _get_pgmptr(_Deref_out_z_ char **_Value); - _CRTIMP errno_t __cdecl _get_wpgmptr(_Deref_out_z_ wchar_t **_Value); + _CRTIMP errno_t __cdecl _get_pgmptr(_Outptr_result_z_ char **_Value); + _CRTIMP errno_t __cdecl _get_wpgmptr(_Outptr_result_z_ wchar_t **_Value); #ifdef _M_CEE_PURE _CRTIMP int* __cdecl __p__fmode(); @@ -330,7 +330,7 @@ extern "C" { void __cdecl qsort( - _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void *_Base, + _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) _Post_readable_byte_size_(_NumOfElements * _SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int (__cdecl *_PtFuncCompare)(const void *,const void *)); @@ -464,6 +464,7 @@ extern "C" { #endif /* _INTEGRAL_MAX_BITS >= 64 */ + _Check_return_ ldiv_t __cdecl ldiv( @@ -710,6 +711,7 @@ extern "C" { malloc( _In_ size_t _Size); + _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_NewSize) @@ -719,6 +721,7 @@ extern "C" { _Pre_maybenull_ _Post_invalid_ void *_Memory, _In_ size_t _NewSize); + _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size) @@ -768,6 +771,7 @@ extern "C" { _In_ size_t _Alignment, _In_ size_t _Offset); + _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size) @@ -779,6 +783,7 @@ extern "C" { _In_ size_t _Size, _In_ size_t _Alignment); + _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size) @@ -791,6 +796,7 @@ extern "C" { _In_ size_t _Size, _In_ size_t _Alignment); + _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size) @@ -1143,12 +1149,14 @@ extern "C" { _In_z_ char *_Str, _In_opt_ _locale_t _Locale); + _Check_return_ unsigned long __cdecl _lrotl( _In_ unsigned long _Val, _In_ int _Shift); + _Check_return_ unsigned long __cdecl _lrotr( @@ -1426,10 +1434,10 @@ extern "C" { __MINGW_EXTENSION typedef struct { long long quot, rem; } lldiv_t; - __MINGW_EXTENSION lldiv_t __cdecl lldiv(long long, long long); + _Check_return_ __MINGW_EXTENSION lldiv_t __cdecl lldiv(_In_ long long, _In_ long long); #ifndef _MSC_VER - __MINGW_EXTENSION __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); } + __MINGW_EXTENSION __CRT_INLINE long long __cdecl llabs(_In_ long long _j) { return (_j >= 0 ? _j : -_j); } #endif __MINGW_EXTENSION long long __cdecl strtoll(const char* __restrict__, char** __restrict, int); diff --git a/include/ddk/ntpoapi.h b/include/ddk/ntpoapi.h index ae1665610ba..7f1496308d2 100644 --- a/include/ddk/ntpoapi.h +++ b/include/ddk/ntpoapi.h @@ -150,9 +150,11 @@ typedef struct _PROCESSOR_IDLE_TIMES { ULONG IdleHandlerReserved[4]; } PROCESSOR_IDLE_TIMES, *PPROCESSOR_IDLE_TIMES; -typedef BOOLEAN -(FASTCALL*PPROCESSOR_IDLE_HANDLER)( - IN OUT PPROCESSOR_IDLE_TIMES IdleTimes); +_Function_class_(PROCESSOR_IDLE_HANDLER) +typedef NTSTATUS +(FASTCALL *PPROCESSOR_IDLE_HANDLER)( + _In_ ULONG_PTR Context, + _Inout_ PPROCESSOR_IDLE_TIMES IdleTimes); typedef struct _PROCESSOR_IDLE_HANDLER_INFO { ULONG HardwareLatency; @@ -188,17 +190,21 @@ typedef enum _POWER_STATE_HANDLER_TYPE { PowerStateMaximum } POWER_STATE_HANDLER_TYPE, *PPOWER_STATE_HANDLER_TYPE; +_Function_class_(ENTER_STATE_SYSTEM_HANDLER) +_IRQL_requires_same_ typedef NTSTATUS -(NTAPI*PENTER_STATE_SYSTEM_HANDLER)( - IN PVOID SystemContext); +(NTAPI *PENTER_STATE_SYSTEM_HANDLER)( + _In_ PVOID SystemContext); +_Function_class_(ENTER_STATE_HANDLER) +_IRQL_requires_same_ typedef NTSTATUS -(NTAPI*PENTER_STATE_HANDLER)( - IN PVOID Context, - IN PENTER_STATE_SYSTEM_HANDLER SystemHandler OPTIONAL, - IN PVOID SystemContext, - IN LONG NumberProcessors, - IN LONG volatile *Number); +(NTAPI *PENTER_STATE_HANDLER)( + _In_opt_ PVOID Context, + _In_opt_ PENTER_STATE_SYSTEM_HANDLER SystemHandler, + _In_opt_ PVOID SystemContext, + _In_ LONG NumberProcessors, + _In_opt_ LONG volatile *Number); typedef struct _POWER_STATE_HANDLER { POWER_STATE_HANDLER_TYPE Type; @@ -208,26 +214,30 @@ typedef struct _POWER_STATE_HANDLER { PVOID Context; } POWER_STATE_HANDLER, *PPOWER_STATE_HANDLER; +_Function_class_(ENTER_STATE_NOTIFY_HANDLER) +_IRQL_requires_same_ typedef NTSTATUS -(NTAPI*PENTER_STATE_NOTIFY_HANDLER)( - IN POWER_STATE_HANDLER_TYPE State, - IN PVOID Context, - IN BOOLEAN Entering); +(NTAPI *PENTER_STATE_NOTIFY_HANDLER)( + _In_ POWER_STATE_HANDLER_TYPE State, + _In_ PVOID Context, + _In_ BOOLEAN Entering); typedef struct _POWER_STATE_NOTIFY_HANDLER { PENTER_STATE_NOTIFY_HANDLER Handler; PVOID Context; } POWER_STATE_NOTIFY_HANDLER, *PPOWER_STATE_NOTIFY_HANDLER; +_IRQL_requires_max_(APC_LEVEL) +__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtPowerInformation( - IN POWER_INFORMATION_LEVEL InformationLevel, - IN PVOID InputBuffer OPTIONAL, - IN ULONG InputBufferLength, - OUT PVOID OutputBuffer OPTIONAL, - IN ULONG OutputBufferLength); + _In_ POWER_INFORMATION_LEVEL InformationLevel, + _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, + _In_ ULONG InputBufferLength, + _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, + _In_ ULONG OutputBufferLength); #define PROCESSOR_STATE_TYPE_PERFORMANCE 1 #define PROCESSOR_STATE_TYPE_THROTTLE 2 @@ -261,49 +271,59 @@ typedef struct _PROCESSOR_STATE_HANDLER2 { PROCESSOR_PERF_LEVEL PerfLevel[1]; } PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2; +_IRQL_requires_max_(PASSIVE_LEVEL) +__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtSetThreadExecutionState( - IN EXECUTION_STATE esFlags, - OUT EXECUTION_STATE *PreviousFlags); + _In_ EXECUTION_STATE esFlags, + _Out_ EXECUTION_STATE *PreviousFlags); NTSYSCALLAPI NTSTATUS NTAPI NtRequestWakeupLatency( - IN LATENCY_TIME latency); + _In_ LATENCY_TIME latency); +_IRQL_requires_max_(APC_LEVEL) +__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtInitiatePowerAction( - IN POWER_ACTION SystemAction, - IN SYSTEM_POWER_STATE MinSystemState, - IN ULONG Flags, - IN BOOLEAN Asynchronous); + _In_ POWER_ACTION SystemAction, + _In_ SYSTEM_POWER_STATE MinSystemState, + _In_ ULONG Flags, + _In_ BOOLEAN Asynchronous); +_IRQL_requires_max_(APC_LEVEL) +__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtSetSystemPowerState( - IN POWER_ACTION SystemAction, - IN SYSTEM_POWER_STATE MinSystemState, - IN ULONG Flags); + _In_ POWER_ACTION SystemAction, + _In_ SYSTEM_POWER_STATE MinSystemState, + _In_ ULONG Flags); +_IRQL_requires_max_(APC_LEVEL) +__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtGetDevicePowerState( - IN HANDLE Device, - OUT DEVICE_POWER_STATE *State); + _In_ HANDLE Device, + _Out_ DEVICE_POWER_STATE *State); NTSYSCALLAPI NTSTATUS NTAPI NtCancelDeviceWakeupRequest( - IN HANDLE Device); + _In_ HANDLE Device); +_IRQL_requires_max_(APC_LEVEL) +__kernel_entry NTSYSCALLAPI BOOLEAN NTAPI @@ -313,7 +333,7 @@ NTSYSCALLAPI NTSTATUS NTAPI NtRequestDeviceWakeup( - IN HANDLE Device); + _In_ HANDLE Device); #define WINLOGON_LOCK_ON_SLEEP 0x00000001 diff --git a/include/psdk/batclass.h b/include/psdk/batclass.h index 371ecc4d47e..f97140d9b05 100644 --- a/include/psdk/batclass.h +++ b/include/psdk/batclass.h @@ -163,28 +163,40 @@ typedef struct _BATTERY_STATUS { #define BATTERY_CLASS_MAJOR_VERSION 0x0001 #define BATTERY_CLASS_MINOR_VERSION 0x0000 +_Function_class_(BCLASS_QUERY_TAG_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_QUERY_TAG_CALLBACK)( - IN PVOID Context, - OUT PULONG BatteryTag); + _In_ PVOID Context, + _Out_ PULONG BatteryTag); typedef BCLASS_QUERY_TAG_CALLBACK *PBCLASS_QUERY_TAG_CALLBACK; +_Function_class_(BCLASS_QUERY_INFORMATION_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_QUERY_INFORMATION_CALLBACK)( - IN PVOID Context, - IN ULONG BatteryTag, - IN BATTERY_QUERY_INFORMATION_LEVEL Level, - IN LONG AtRate, - OUT PVOID Buffer, - IN ULONG BufferLength, - OUT PULONG ReturnedLength); + _In_ PVOID Context, + _In_ ULONG BatteryTag, + _In_ BATTERY_QUERY_INFORMATION_LEVEL Level, + _In_ LONG AtRate, + _Out_writes_bytes_to_(BufferLength, *ReturnedLength) PVOID Buffer, + _In_ ULONG BufferLength, + _Out_ PULONG ReturnedLength); typedef BCLASS_QUERY_INFORMATION_CALLBACK *PBCLASS_QUERY_INFORMATION_CALLBACK; +_Function_class_(BCLASS_QUERY_STATUS_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_QUERY_STATUS_CALLBACK)( - IN PVOID Context, - IN ULONG BatteryTag, - OUT PBATTERY_STATUS BatteryStatus); + _In_ PVOID Context, + _In_ ULONG BatteryTag, + _Out_ PBATTERY_STATUS BatteryStatus); typedef BCLASS_QUERY_STATUS_CALLBACK *PBCLASS_QUERY_STATUS_CALLBACK; typedef struct _BATTERY_NOTIFY { @@ -193,24 +205,36 @@ typedef struct _BATTERY_NOTIFY { ULONG HighCapacity; } BATTERY_NOTIFY, *PBATTERY_NOTIFY; +_Function_class_(BCLASS_SET_STATUS_NOTIFY_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_SET_STATUS_NOTIFY_CALLBACK)( - IN PVOID Context, - IN ULONG BatteryTag, - IN PBATTERY_NOTIFY BatteryNotify); + _In_ PVOID Context, + _In_ ULONG BatteryTag, + _In_ PBATTERY_NOTIFY BatteryNotify); typedef BCLASS_SET_STATUS_NOTIFY_CALLBACK *PBCLASS_SET_STATUS_NOTIFY_CALLBACK; +_Function_class_(BCLASS_SET_INFORMATION_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_SET_INFORMATION_CALLBACK)( - IN PVOID Context, - IN ULONG BatteryTag, - IN BATTERY_SET_INFORMATION_LEVEL Level, - IN PVOID Buffer OPTIONAL); + _In_ PVOID Context, + _In_ ULONG BatteryTag, + _In_ BATTERY_SET_INFORMATION_LEVEL Level, + _In_opt_ PVOID Buffer); typedef BCLASS_SET_INFORMATION_CALLBACK *PBCLASS_SET_INFORMATION_CALLBACK; +_Function_class_(BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK) +_IRQL_requires_same_ +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ typedef NTSTATUS (NTAPI BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)( - IN PVOID Context); + _In_ PVOID Context); typedef BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK *PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK; typedef PBCLASS_QUERY_TAG_CALLBACK BCLASS_QUERY_TAG; @@ -302,57 +326,67 @@ typedef struct _BATTERY_TAG_CHANGE { #define BCLASSAPI DECLSPEC_IMPORT #endif +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ BCLASSAPI NTSTATUS NTAPI BatteryClassInitializeDevice( - IN PBATTERY_MINIPORT_INFO MiniportInfo, - IN PVOID *ClassData); + _In_ PBATTERY_MINIPORT_INFO MiniportInfo, + _Out_ PVOID *ClassData); +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ BCLASSAPI NTSTATUS NTAPI BatteryClassIoctl( - IN PVOID ClassData, - IN OUT PIRP Irp); + _In_ PVOID ClassData, + _Inout_ PIRP Irp); +_IRQL_requires_max_(DISPATCH_LEVEL) BCLASSAPI NTSTATUS NTAPI BatteryClassStatusNotify( - IN PVOID ClassData); + _In_ PVOID ClassData); #if (NTDDI_VERSION >= NTDDI_WINXP) +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ BCLASSAPI NTSTATUS NTAPI BatteryClassQueryWmiDataBlock( - IN PVOID ClassData, - IN OUT PDEVICE_OBJECT DeviceObject, - IN OUT PIRP Irp, - IN ULONG GuidIndex, - OUT PULONG InstanceLengthArray, - IN ULONG OutBufferSize, - OUT PUCHAR Buffer OPTIONAL); + _In_ PVOID ClassData, + _Inout_ PDEVICE_OBJECT DeviceObject, + _Inout_ PIRP Irp, + _In_ ULONG GuidIndex, + _Out_writes_(1) PULONG InstanceLengthArray, + _In_ ULONG OutBufferSize, + _Out_writes_bytes_opt_(OutBufferSize) PUCHAR Buffer); +_IRQL_requires_max_(PASSIVE_LEVEL) +_Check_return_ BCLASSAPI NTSTATUS NTAPI BatteryClassSystemControl( - IN PVOID ClassData, - IN PVOID WmiLibContext, /* PWMILIB_CONTEXT */ - IN PDEVICE_OBJECT DeviceObject, - IN OUT PIRP Irp, - OUT PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */ + _In_ PVOID ClassData, + _In_ PVOID WmiLibContext, /* PWMILIB_CONTEXT */ + _In_ PDEVICE_OBJECT DeviceObject, + _Inout_ PIRP Irp, + _Out_ PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */ #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */ +_IRQL_requires_max_(PASSIVE_LEVEL) BCLASSAPI NTSTATUS NTAPI BatteryClassUnload( - IN PVOID ClassData); + _In_ PVOID ClassData); #endif /* _WINDOWS_H */ diff --git a/include/psdk/commctrl.h b/include/psdk/commctrl.h index 64326f99065..7ac0ef1895a 100644 --- a/include/psdk/commctrl.h +++ b/include/psdk/commctrl.h @@ -656,6 +656,10 @@ extern "C" { #define HDN_ENDDRAG (HDN_FIRST-11) #define HDN_FILTERCHANGE (HDN_FIRST-12) #define HDN_FILTERBTNCLICK (HDN_FIRST-13) +#define HDN_BEGINFILTEREDIT (HDN_FIRST-14) +#define HDN_ENDFILTEREDIT (HDN_FIRST-15) +#define HDN_ITEMSTATEICONCLICK (HDN_FIRST-16) +#define HDN_ITEMKEYDOWN (HDN_FIRST-17) #define HDN_ITEMCHANGING __MINGW_NAME_AW(HDN_ITEMCHANGING) #define HDN_ITEMCHANGED __MINGW_NAME_AW(HDN_ITEMCHANGED) diff --git a/include/psdk/ddkernel.h b/include/psdk/ddkernel.h index 8ffedf8165d..6d67625697c 100644 --- a/include/psdk/ddkernel.h +++ b/include/psdk/ddkernel.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel * FILE: diff --git a/include/psdk/dmemmgr.h b/include/psdk/dmemmgr.h index 5a637f73de7..429b459d8bd 100644 --- a/include/psdk/dmemmgr.h +++ b/include/psdk/dmemmgr.h @@ -1,6 +1,4 @@ - -/* $Id: $ - * +/* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel * FILE: diff --git a/include/psdk/dvp.h b/include/psdk/dvp.h index 0e79d3ea62a..07787f56a33 100644 --- a/include/psdk/dvp.h +++ b/include/psdk/dvp.h @@ -1,6 +1,4 @@ - -/* $Id$ - * +/* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel * FILE: diff --git a/include/psdk/evntprov.h b/include/psdk/evntprov.h index c7c37d5047e..13c1ed0b44b 100644 --- a/include/psdk/evntprov.h +++ b/include/psdk/evntprov.h @@ -90,72 +90,72 @@ typedef struct _EVENT_FILTER_HEADER { typedef VOID (NTAPI *PENABLECALLBACK)( - IN LPCGUID SourceId, - IN ULONG IsEnabled, - IN UCHAR Level, - IN ULONGLONG MatchAnyKeyword, - IN ULONGLONG MatchAllKeyword, - IN PEVENT_FILTER_DESCRIPTOR FilterData OPTIONAL, - IN OUT PVOID CallbackContext OPTIONAL); + _In_ LPCGUID SourceId, + _In_ ULONG IsEnabled, + _In_ UCHAR Level, + _In_ ULONGLONG MatchAnyKeyword, + _In_ ULONGLONG MatchAllKeyword, + _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData, + _Inout_opt_ PVOID CallbackContext); #if (WINVER >= _WIN32_WINNT_VISTA) ULONG EVNTAPI EventRegister( - IN LPCGUID ProviderId, - IN PENABLECALLBACK EnableCallback OPTIONAL, - IN PVOID CallbackContext OPTIONAL, - OUT PREGHANDLE RegHandle); + _In_ LPCGUID ProviderId, + _In_opt_ PENABLECALLBACK EnableCallback, + _In_opt_ PVOID CallbackContext, + _Out_ PREGHANDLE RegHandle); ULONG EVNTAPI EventUnregister( - IN REGHANDLE RegHandle); + _In_ REGHANDLE RegHandle); BOOLEAN EVNTAPI EventEnabled( - IN REGHANDLE RegHandle, - IN PCEVENT_DESCRIPTOR EventDescriptor); + _In_ REGHANDLE RegHandle, + _In_ PCEVENT_DESCRIPTOR EventDescriptor); BOOLEAN EVNTAPI EventProviderEnabled( - IN REGHANDLE RegHandle, - IN UCHAR Level, - IN ULONGLONG Keyword); + _In_ REGHANDLE RegHandle, + _In_ UCHAR Level, + _In_ ULONGLONG Keyword); ULONG EVNTAPI EventWrite( - IN REGHANDLE RegHandle, - IN PCEVENT_DESCRIPTOR EventDescriptor, - IN ULONG UserDataCount, - IN PEVENT_DATA_DESCRIPTOR UserData); + _In_ REGHANDLE RegHandle, + _In_ PCEVENT_DESCRIPTOR EventDescriptor, + _In_ ULONG UserDataCount, + _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); ULONG EVNTAPI EventWriteTransfer( - IN REGHANDLE RegHandle, - IN PCEVENT_DESCRIPTOR EventDescriptor, - IN LPCGUID ActivityId OPTIONAL, - IN LPCGUID RelatedActivityId OPTIONAL, - IN ULONG UserDataCount, - IN PEVENT_DATA_DESCRIPTOR UserData OPTIONAL); + _In_ REGHANDLE RegHandle, + _In_ PCEVENT_DESCRIPTOR EventDescriptor, + _In_opt_ LPCGUID ActivityId, + _In_opt_ LPCGUID RelatedActivityId, + _In_ ULONG UserDataCount, + _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); ULONG EVNTAPI EventWriteString( - IN REGHANDLE RegHandle, - IN UCHAR Level, - IN ULONGLONG Keyword, - IN PCWSTR String); + _In_ REGHANDLE RegHandle, + _In_ UCHAR Level, + _In_ ULONGLONG Keyword, + _In_ PCWSTR String); ULONG EVNTAPI EventActivityIdControl( - IN ULONG ControlCode, - IN OUT LPGUID ActivityId); + _In_ ULONG ControlCode, + _Inout_ LPGUID ActivityId); #endif /* (WINVER >= _WIN32_WINNT_VISTA) */ @@ -163,14 +163,14 @@ EventActivityIdControl( ULONG EVNTAPI EventWriteEx( - IN REGHANDLE RegHandle, - IN PCEVENT_DESCRIPTOR EventDescriptor, - IN ULONG64 Filter, - IN ULONG Flags, - IN LPCGUID ActivityId OPTIONAL, - IN LPCGUID RelatedActivityId OPTIONAL, - IN ULONG UserDataCount, - IN PEVENT_DATA_DESCRIPTOR UserData OPTIONAL); + _In_ REGHANDLE RegHandle, + _In_ PCEVENT_DESCRIPTOR EventDescriptor, + _In_ ULONG64 Filter, + _In_ ULONG Flags, + _In_opt_ LPCGUID ActivityId, + _In_opt_ LPCGUID RelatedActivityId, + _In_ ULONG UserDataCount, + _In_reads_opt_(UserDataCount) PEVENT_DATA_DESCRIPTOR UserData); #endif #endif // _ETW_KM_ @@ -178,9 +178,9 @@ EventWriteEx( FORCEINLINE VOID EventDataDescCreate( - OUT PEVENT_DATA_DESCRIPTOR EventDataDescriptor, - IN const VOID* DataPtr, - IN ULONG DataSize) + _Out_ PEVENT_DATA_DESCRIPTOR EventDataDescriptor, + _In_reads_bytes_(DataSize) const VOID* DataPtr, + _In_ ULONG DataSize) { EventDataDescriptor->Ptr = (ULONGLONG)(ULONG_PTR)DataPtr; EventDataDescriptor->Size = DataSize; @@ -190,14 +190,14 @@ EventDataDescCreate( FORCEINLINE VOID EventDescCreate( - OUT PEVENT_DESCRIPTOR EventDescriptor, - IN USHORT Id, - IN UCHAR Version, - IN UCHAR Channel, - IN UCHAR Level, - IN USHORT Task, - IN UCHAR Opcode, - IN ULONGLONG Keyword) + _Out_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ USHORT Id, + _In_ UCHAR Version, + _In_ UCHAR Channel, + _In_ UCHAR Level, + _In_ USHORT Task, + _In_ UCHAR Opcode, + _In_ ULONGLONG Keyword) { EventDescriptor->Id = Id; EventDescriptor->Version = Version; @@ -211,7 +211,7 @@ EventDescCreate( FORCEINLINE VOID EventDescZero( - OUT PEVENT_DESCRIPTOR EventDescriptor) + _Out_ PEVENT_DESCRIPTOR EventDescriptor) { memset(EventDescriptor, 0, sizeof(EVENT_DESCRIPTOR)); } @@ -219,7 +219,7 @@ EventDescZero( FORCEINLINE USHORT EventDescGetId( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Id); } @@ -227,7 +227,7 @@ EventDescGetId( FORCEINLINE UCHAR EventDescGetVersion( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Version); } @@ -235,7 +235,7 @@ EventDescGetVersion( FORCEINLINE USHORT EventDescGetTask( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Task); } @@ -243,7 +243,7 @@ EventDescGetTask( FORCEINLINE UCHAR EventDescGetOpcode( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Opcode); } @@ -251,7 +251,7 @@ EventDescGetOpcode( FORCEINLINE UCHAR EventDescGetChannel( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Channel); } @@ -259,7 +259,7 @@ EventDescGetChannel( FORCEINLINE UCHAR EventDescGetLevel( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Level); } @@ -267,7 +267,7 @@ EventDescGetLevel( FORCEINLINE ULONGLONG EventDescGetKeyword( - IN PCEVENT_DESCRIPTOR EventDescriptor) + _In_ PCEVENT_DESCRIPTOR EventDescriptor) { return (EventDescriptor->Keyword); } @@ -275,8 +275,8 @@ EventDescGetKeyword( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetId( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN USHORT Id) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ USHORT Id) { EventDescriptor->Id = Id; return (EventDescriptor); @@ -285,8 +285,8 @@ EventDescSetId( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetVersion( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN UCHAR Version) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ UCHAR Version) { EventDescriptor->Version = Version; return (EventDescriptor); @@ -295,8 +295,8 @@ EventDescSetVersion( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetTask( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN USHORT Task) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ USHORT Task) { EventDescriptor->Task = Task; return (EventDescriptor); @@ -305,8 +305,8 @@ EventDescSetTask( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetOpcode( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN UCHAR Opcode) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ UCHAR Opcode) { EventDescriptor->Opcode = Opcode; return (EventDescriptor); @@ -315,8 +315,8 @@ EventDescSetOpcode( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetLevel( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN UCHAR Level) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ UCHAR Level) { EventDescriptor->Level = Level; return (EventDescriptor); @@ -325,8 +325,8 @@ EventDescSetLevel( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetChannel( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN UCHAR Channel) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ UCHAR Channel) { EventDescriptor->Channel = Channel; return (EventDescriptor); @@ -335,8 +335,8 @@ EventDescSetChannel( FORCEINLINE PEVENT_DESCRIPTOR EventDescSetKeyword( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN ULONGLONG Keyword) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ ULONGLONG Keyword) { EventDescriptor->Keyword = Keyword; return (EventDescriptor); @@ -346,8 +346,8 @@ EventDescSetKeyword( FORCEINLINE PEVENT_DESCRIPTOR EventDescOrKeyword( - IN PEVENT_DESCRIPTOR EventDescriptor, - IN ULONGLONG Keyword) + _In_ PEVENT_DESCRIPTOR EventDescriptor, + _In_ ULONGLONG Keyword) { EventDescriptor->Keyword |= Keyword; return (EventDescriptor); @@ -356,4 +356,3 @@ EventDescOrKeyword( #ifdef __cplusplus } #endif - diff --git a/include/psdk/ntddstor.h b/include/psdk/ntddstor.h index 3d5081e0e14..c1955d6ab2a 100644 --- a/include/psdk/ntddstor.h +++ b/include/psdk/ntddstor.h @@ -435,12 +435,12 @@ typedef struct _STORAGE_PROPERTY_QUERY { UCHAR AdditionalParameters[1]; } STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY; -typedef struct _STORAGE_DESCRIPTOR_HEADER { +typedef _Struct_size_bytes_(Size) struct _STORAGE_DESCRIPTOR_HEADER { ULONG Version; ULONG Size; } STORAGE_DESCRIPTOR_HEADER, *PSTORAGE_DESCRIPTOR_HEADER; -typedef struct _STORAGE_DEVICE_DESCRIPTOR { +typedef _Struct_size_bytes_(Size) struct _STORAGE_DEVICE_DESCRIPTOR { ULONG Version; ULONG Size; UCHAR DeviceType; @@ -456,7 +456,7 @@ typedef struct _STORAGE_DEVICE_DESCRIPTOR { UCHAR RawDeviceProperties[1]; } STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR; -typedef struct _STORAGE_ADAPTER_DESCRIPTOR { +typedef _Struct_size_bytes_(Size) struct _STORAGE_ADAPTER_DESCRIPTOR { ULONG Version; ULONG Size; ULONG MaximumTransferLength; @@ -475,7 +475,7 @@ typedef struct _STORAGE_ADAPTER_DESCRIPTOR { USHORT BusMinorVersion; } STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR; -typedef struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR { +typedef _Struct_size_bytes_(Size) struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR { ULONG Version; ULONG Size; ULONG BytesPerCacheLine; @@ -539,7 +539,7 @@ typedef struct _STORAGE_IDENTIFIER { UCHAR Identifier[1]; } STORAGE_IDENTIFIER, *PSTORAGE_IDENTIFIER; -typedef struct _STORAGE_DEVICE_ID_DESCRIPTOR { +typedef _Struct_size_bytes_(Size) struct _STORAGE_DEVICE_ID_DESCRIPTOR { ULONG Version; ULONG Size; ULONG NumberOfIdentifiers; @@ -646,7 +646,7 @@ typedef struct _PERSISTENT_RESERVE_COMMAND { #endif /* defined(_MSC_EXTENSIONS) */ -typedef struct _STORAGE_READ_CAPACITY { +typedef _Struct_size_bytes_(Size) struct _STORAGE_READ_CAPACITY { ULONG Version; ULONG Size; ULONG BlockLength; @@ -679,7 +679,7 @@ typedef enum _WRITE_THROUGH { WriteThroughSupported } WRITE_THROUGH; -typedef struct _STORAGE_WRITE_CACHE_PROPERTY { +typedef _Struct_size_bytes_(Size) struct _STORAGE_WRITE_CACHE_PROPERTY { ULONG Version; ULONG Size; WRITE_CACHE_TYPE WriteCacheType; diff --git a/include/psdk/objerror.h b/include/psdk/objerror.h index 06b30e700b5..f6b86b1981d 100644 --- a/include/psdk/objerror.h +++ b/include/psdk/objerror.h @@ -1,6 +1,4 @@ - -/* $Id$ - * +/* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel * FILE: @@ -10,4 +8,3 @@ */ #include - diff --git a/include/psdk/polarity.h b/include/psdk/polarity.h index ecc79a7bd5d..e6078709871 100644 --- a/include/psdk/polarity.h +++ b/include/psdk/polarity.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel * FILE: diff --git a/include/psdk/sal.h b/include/psdk/sal.h index 6fd8a036e81..8f0ed8f4b5a 100644 --- a/include/psdk/sal.h +++ b/include/psdk/sal.h @@ -807,13 +807,13 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; //#define _Out_z_capcount_(capcount) #define _Outptr_ _SAL2_NAME(_Outptr_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,ValidElements="\n""1")]) #define _Outptr_opt_ _SAL2_NAME(_Outptr_opt_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,ValidElements="\n""1")]) -//#define _Outptr_opt_result_buffer_(size) +#define _Outptr_opt_result_buffer_(size) _SAL2_NAME(_Outptr_opt_result_buffer_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,WritableElements="\n" _SA_SPECSTRIZE(size))]) //#define _Outptr_opt_result_buffer_all_(size) //#define _Outptr_opt_result_buffer_all_maybenull_(size) //#define _Outptr_opt_result_buffer_maybenull_(size) //#define _Outptr_opt_result_buffer_to_(size, count) //#define _Outptr_opt_result_buffer_to_maybenull_(size, count) -//#define _Outptr_opt_result_bytebuffer_(size) +#define _Outptr_opt_result_bytebuffer_(size) _SAL2_NAME(_Outptr_opt_result_bytebuffer_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_No,Notref=1,WritableBytes="\n" _SA_SPECSTRIZE(size))]) //#define _Outptr_opt_result_bytebuffer_all_(size) #define _Outptr_opt_result_bytebuffer_all_maybenull_(size) _SAL2_NAME(_Outptr_opt_) _Group_([SA_Pre(Null=SA_Maybe,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_Maybe,Notref=1,ValidBytes="\n" _SA_SPECSTRIZE(size))]) //#define _Outptr_opt_result_bytebuffer_maybenull_(size) @@ -838,7 +838,7 @@ enum __SAL_YesNo {_SAL_notpresent, _SAL_no, _SAL_maybe, _SAL_yes, _SAL_default}; #define _Outptr_result_maybenull_ _SAL2_NAME(_Outptr_result_maybenull_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] [SA_Post(Deref=1,Null=SA_Maybe,Notref=1,ValidElements="\n""1")] ) //#define _Outptr_result_maybenull_z_ #define _Outptr_result_nullonfailure_ _SAL2_NAME(_Outptr_result_nullonfailure_) _Group_(_Outptr_ [SAL_context(p1="SAL_failed")] _Group_([SAL_post] _Deref_post_null_) ) -//#define _Outptr_result_z_ +#define _Outptr_result_z_ _SAL2_NAME(_Outptr_result_z_) _Group_([SA_Pre(Null=SA_No,Notref=1)] [SA_Pre(WritableElementsConst=1,Notref=1)] [SA_Post(Valid=SA_Yes)] _Deref_post_z_) //#define _Outref_ //#define _Outref_result_buffer_(size) //#define _Outref_result_buffer_all_(size) diff --git a/include/psdk/winnls.h b/include/psdk/winnls.h index b3dfdcb7e90..4b1a9c328f5 100644 --- a/include/psdk/winnls.h +++ b/include/psdk/winnls.h @@ -624,44 +624,199 @@ typedef struct _FILEMUIINFO { #define IS_LOW_SURROGATE(ch) ((ch) >= LOW_SURROGATE_START && (ch) <= LOW_SURROGATE_END) #define IS_SURROGATE_PAIR(high,low) (IS_HIGH_SURROGATE(high) && IS_LOW_SURROGATE(low)) -int WINAPI CompareStringA(LCID,DWORD,LPCSTR,int,LPCSTR,int); -int WINAPI CompareStringW(LCID,DWORD,LPCWSTR,int,LPCWSTR,int); -LCID WINAPI ConvertDefaultLocale(LCID); -BOOL WINAPI EnumCalendarInfoA(CALINFO_ENUMPROCA,LCID,CALID,CALTYPE); -BOOL WINAPI EnumCalendarInfoW(CALINFO_ENUMPROCW,LCID,CALID,CALTYPE); -BOOL WINAPI EnumDateFormatsA(DATEFMT_ENUMPROCA,LCID,DWORD); -BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW,LCID,DWORD); -BOOL WINAPI EnumSystemCodePagesA(CODEPAGE_ENUMPROCA,DWORD); -BOOL WINAPI EnumSystemCodePagesW(CODEPAGE_ENUMPROCW,DWORD); -BOOL WINAPI EnumSystemGeoID(GEOCLASS,GEOID,GEO_ENUMPROC); -BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD); -BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD); -BOOL WINAPI EnumTimeFormatsA(TIMEFMT_ENUMPROCA,LCID,DWORD); -BOOL WINAPI EnumTimeFormatsW(TIMEFMT_ENUMPROCW,LCID,DWORD); -int WINAPI FoldStringA(DWORD,LPCSTR,int,LPSTR,int); -int WINAPI FoldStringW(DWORD,LPCWSTR,int,LPWSTR,int); +int +WINAPI +CompareStringA( + _In_ LCID Locale, + _In_ DWORD dwCmpFlags, + _In_reads_(cchCount1) LPCSTR lpString1, + _In_ int cchCount1, + _In_reads_(cchCount2) LPCSTR lpString2, + _In_ int cchCount2); + +int +WINAPI +CompareStringW( + _In_ LCID Locale, + _In_ DWORD dwCmpFlags, + _In_reads_(cchCount1) LPCWSTR lpString1, + _In_ int cchCount1, + _In_reads_(cchCount2) LPCWSTR lpString2, + _In_ int cchCount2); + +LCID WINAPI ConvertDefaultLocale(_In_ LCID); +BOOL WINAPI EnumCalendarInfoA(_In_ CALINFO_ENUMPROCA, _In_ LCID, _In_ CALID, _In_ CALTYPE); +BOOL WINAPI EnumCalendarInfoW(_In_ CALINFO_ENUMPROCW, _In_ LCID, _In_ CALID, _In_ CALTYPE); +BOOL WINAPI EnumDateFormatsA(_In_ DATEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD); +BOOL WINAPI EnumDateFormatsW(_In_ DATEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD); +BOOL WINAPI EnumSystemCodePagesA(_In_ CODEPAGE_ENUMPROCA, _In_ DWORD); +BOOL WINAPI EnumSystemCodePagesW(_In_ CODEPAGE_ENUMPROCW, _In_ DWORD); +BOOL WINAPI EnumSystemGeoID(_In_ GEOCLASS, _In_ GEOID, _In_ GEO_ENUMPROC); +BOOL WINAPI EnumSystemLocalesA(_In_ LOCALE_ENUMPROCA, _In_ DWORD); +BOOL WINAPI EnumSystemLocalesW(_In_ LOCALE_ENUMPROCW, _In_ DWORD); +BOOL WINAPI EnumTimeFormatsA(_In_ TIMEFMT_ENUMPROCA, _In_ LCID, _In_ DWORD); +BOOL WINAPI EnumTimeFormatsW(_In_ TIMEFMT_ENUMPROCW, _In_ LCID, _In_ DWORD); + +int +WINAPI +FoldStringA( + _In_ DWORD dwMapFlags, + _In_reads_(cchSrc) LPCSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_opt_(cchDest) LPSTR lpDestStr, + _In_ int cchDest); + +int +WINAPI +FoldStringW( + _In_ DWORD dwMapFlags, + _In_reads_(cchSrc) LPCWSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_opt_(cchDest) LPWSTR lpDestStr, + _In_ int cchDest); + UINT WINAPI GetACP(void); -int WINAPI GetCalendarInfoA(LCID,CALID,CALTYPE,LPSTR,int,LPDWORD); -int WINAPI GetCalendarInfoW(LCID,CALID,CALTYPE,LPWSTR,int,LPDWORD); -BOOL WINAPI GetCPInfo(UINT,LPCPINFO); -BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA); -BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW); -int WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,int); -int WINAPI GetCurrencyFormatW(LCID,DWORD,LPCWSTR,const CURRENCYFMTW*,LPWSTR,int); + +int +WINAPI +GetCalendarInfoA( + _In_ LCID Locale, + _In_ CALID Calendar, + _In_ CALTYPE CalType, + _Out_writes_opt_(cchData) LPSTR lpCalData, + _In_ int cchData, + _Out_opt_ LPDWORD lpValue); + +int +WINAPI +GetCalendarInfoW( + _In_ LCID Locale, + _In_ CALID Calendar, + _In_ CALTYPE CalType, + _Out_writes_opt_(cchData) LPWSTR lpCalData, + _In_ int cchData, + _Out_opt_ LPDWORD lpValue); + +BOOL WINAPI GetCPInfo(_In_ UINT, _Out_ LPCPINFO); +BOOL WINAPI GetCPInfoExA(_In_ UINT, _In_ DWORD, _Out_ LPCPINFOEXA); +BOOL WINAPI GetCPInfoExW(_In_ UINT, _In_ DWORD, _Out_ LPCPINFOEXW); + +int +WINAPI +GetCurrencyFormatA( + _In_ LCID Locale, + _In_ DWORD dwFlags, + _In_ LPCSTR lpValue, + _In_opt_ const CURRENCYFMTA *lpFormat, + _Out_writes_opt_(cchCurrency) LPSTR lpCurrencyStr, + _In_ int cchCurrency); + +int +WINAPI +GetCurrencyFormatW( + _In_ LCID Locale, + _In_ DWORD dwFlags, + _In_ LPCWSTR lpValue, + _In_opt_ const CURRENCYFMTW *lpFormat, + _Out_writes_opt_(cchCurrency) LPWSTR lpCurrencyStr, + _In_ int cchCurrency); + int WINAPI GetDateFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,int); int WINAPI GetDateFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int); -int WINAPI GetGeoInfoA(GEOID,GEOTYPE,LPSTR,int,LANGID); -int WINAPI GetGeoInfoW(GEOID,GEOTYPE,LPWSTR,int,LANGID); -int WINAPI GetLocaleInfoA(LCID,LCTYPE,LPSTR,int); -int WINAPI GetLocaleInfoW(LCID,LCTYPE,LPWSTR,int); -BOOL WINAPI GetNLSVersion(NLS_FUNCTION,LCID,LPNLSVERSIONINFO); -int WINAPI GetNumberFormatA(LCID,DWORD,LPCSTR,const NUMBERFMTA*,LPSTR,int); -int WINAPI GetNumberFormatW(LCID,DWORD,LPCWSTR,const NUMBERFMTW*,LPWSTR,int); + +int +WINAPI +GetGeoInfoA( + _In_ GEOID Location, + _In_ GEOTYPE GeoType, + _Out_writes_opt_(cchData) LPSTR lpGeoData, + _In_ int cchData, + _In_ LANGID LangId); + +int +WINAPI +GetGeoInfoW( + _In_ GEOID Location, + _In_ GEOTYPE GeoType, + _Out_writes_opt_(cchData) LPWSTR lpGeoData, + _In_ int cchData, + _In_ LANGID LangId); + +int +WINAPI +GetLocaleInfoA( + _In_ LCID Locale, + _In_ LCTYPE LCType, + _Out_writes_opt_(cchData) LPSTR lpLCData, + _In_ int cchData); + +int +WINAPI +GetLocaleInfoW( + _In_ LCID Locale, + _In_ LCTYPE LCType, + _Out_writes_opt_(cchData) LPWSTR lpLCData, + _In_ int cchData); + +BOOL WINAPI GetNLSVersion(_In_ NLS_FUNCTION, _In_ LCID, _Inout_ LPNLSVERSIONINFO); + +int +WINAPI +GetNumberFormatA( + _In_ LCID Locale, + _In_ DWORD dwFlags, + _In_ LPCSTR lpValue, + _In_opt_ const NUMBERFMTA *lpFormat, + _Out_writes_opt_(cchNumber) LPSTR lpNumberStr, + _In_ int cchNumber); + +int +WINAPI +GetNumberFormatW( + _In_ LCID Locale, + _In_ DWORD dwFlags, + _In_ LPCWSTR lpValue, + _In_opt_ const NUMBERFMTW *lpFormat, + _Out_writes_opt_(cchNumber) LPWSTR lpNumberStr, + _In_ int cchNumber); + UINT WINAPI GetOEMCP(void); -BOOL WINAPI GetStringTypeA(LCID,DWORD,LPCSTR,int,LPWORD); -BOOL WINAPI GetStringTypeW(DWORD,LPCWSTR,int,LPWORD); -BOOL WINAPI GetStringTypeExA(LCID,DWORD,LPCSTR,int,LPWORD); -BOOL WINAPI GetStringTypeExW(LCID,DWORD,LPCWSTR,int,LPWORD); + +BOOL +WINAPI +GetStringTypeA( + _In_ LCID Locale, + _In_ DWORD dwInfoType, + _In_reads_(cchSrc) LPCSTR lpSrcStr, + _In_ int cchSrc, + _Out_ LPWORD lpCharType); + +BOOL +WINAPI +GetStringTypeW( + _In_ DWORD dwInfoType, + _In_reads_(cchSrc) LPCWSTR lpSrcStr, + _In_ int cchSrc, + _Out_ LPWORD lpCharType); + +BOOL +WINAPI +GetStringTypeExA( + _In_ LCID Locale, + _In_ DWORD dwInfoType, + _In_reads_(cchSrc) LPCSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_(cchSrc) LPWORD lpCharType); + +BOOL +WINAPI +GetStringTypeExW( + _In_ LCID Locale, + _In_ DWORD dwInfoType, + _In_reads_(cchSrc) LPCWSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_(cchSrc) LPWORD lpCharType); + LANGID WINAPI GetSystemDefaultLangID(void); LCID WINAPI GetSystemDefaultLCID(void); LCID WINAPI GetThreadLocale(void); @@ -670,60 +825,199 @@ int WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,int); LANGID WINAPI GetUserDefaultLangID(void); LCID WINAPI GetUserDefaultLCID(void); LANGID WINAPI GetUserDefaultUILanguage(void); -GEOID WINAPI GetUserGeoID(GEOCLASS); -BOOL WINAPI IsDBCSLeadByte(BYTE); -BOOL WINAPI IsDBCSLeadByteEx(UINT,BYTE); -BOOL WINAPI IsNLSDefinedString(NLS_FUNCTION,DWORD,LPNLSVERSIONINFO,LPCWSTR,int); -BOOL WINAPI IsValidCodePage(UINT); -BOOL WINAPI IsValidLocale(LCID,DWORD); -int WINAPI LCMapStringA(LCID,DWORD,LPCSTR,int,LPSTR,int); -int WINAPI LCMapStringW(LCID,DWORD,LPCWSTR,int,LPWSTR,int); +GEOID WINAPI GetUserGeoID(_In_ GEOCLASS); +BOOL WINAPI IsDBCSLeadByte(_In_ BYTE); +BOOL WINAPI IsDBCSLeadByteEx(_In_ UINT, _In_ BYTE); + +BOOL +WINAPI +IsNLSDefinedString( + _In_ NLS_FUNCTION Function, + _In_ DWORD dwFlags, + _In_ LPNLSVERSIONINFO lpVersionInformation, + _In_reads_(cchStr) LPCWSTR lpString, + _In_ int cchStr); + +BOOL WINAPI IsValidCodePage(_In_ UINT); +BOOL WINAPI IsValidLocale(_In_ LCID, _In_ DWORD); + +int +WINAPI +LCMapStringA( + _In_ LCID Locale, + _In_ DWORD dwMapFlags, + _In_reads_(cchSrc) LPCSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_opt_(_Inexpressible_(cchDest)) LPSTR lpDestStr, + _In_ int cchDest); + +int +WINAPI +LCMapStringW( + _In_ LCID Locale, + _In_ DWORD dwMapFlags, + _In_reads_(cchSrc) LPCWSTR lpSrcStr, + _In_ int cchSrc, + _Out_writes_opt_(_Inexpressible_(cchDest)) LPWSTR lpDestStr, + _In_ int cchDest); + int WINAPI MultiByteToWideChar(UINT,DWORD,LPCSTR,int,LPWSTR,int); -int WINAPI SetCalendarInfoA(LCID,CALID,CALTYPE,LPCSTR); -int WINAPI SetCalendarInfoW(LCID,CALID,CALTYPE,LPCWSTR); -BOOL WINAPI SetLocaleInfoA(LCID,LCTYPE,LPCSTR); -BOOL WINAPI SetLocaleInfoW(LCID,LCTYPE,LPCWSTR); -BOOL WINAPI SetThreadLocale(LCID); -LANGID WINAPI SetThreadUILanguage(LANGID); +int WINAPI SetCalendarInfoA(_In_ LCID, _In_ CALID, _In_ CALTYPE, _In_ LPCSTR); +int WINAPI SetCalendarInfoW(_In_ LCID, _In_ CALID, _In_ CALTYPE, _In_ LPCWSTR); +BOOL WINAPI SetLocaleInfoA(_In_ LCID, _In_ LCTYPE, _In_ LPCSTR); +BOOL WINAPI SetLocaleInfoW(_In_ LCID, _In_ LCTYPE, _In_ LPCWSTR); +BOOL WINAPI SetThreadLocale(_In_ LCID); +LANGID WINAPI SetThreadUILanguage(_In_ LANGID); BOOL WINAPI SetUserDefaultLCID(LCID); BOOL WINAPI SetUserDefaultUILanguage(LANGID); -BOOL WINAPI SetUserGeoID(GEOID); +BOOL WINAPI SetUserGeoID(_In_ GEOID); int WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,int,LPSTR,int,LPCSTR,LPBOOL); #if (WINVER >= 0x0500) -BOOL WINAPI EnumCalendarInfoExA(CALINFO_ENUMPROCEXA,LCID,CALID,CALTYPE); -BOOL WINAPI EnumCalendarInfoExW(CALINFO_ENUMPROCEXW,LCID,CALID,CALTYPE); -BOOL WINAPI EnumDateFormatsExA(DATEFMT_ENUMPROCEXA,LCID,DWORD); -BOOL WINAPI EnumDateFormatsExW(DATEFMT_ENUMPROCEXW,LCID,DWORD); -BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA,DWORD,LONG_PTR); -BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW,DWORD,LONG_PTR); -BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR); -BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW,LGRPID,DWORD,LONG_PTR); -BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA,DWORD,LONG_PTR); -BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW,DWORD,LONG_PTR); +BOOL WINAPI EnumCalendarInfoExA(_In_ CALINFO_ENUMPROCEXA, _In_ LCID, _In_ CALID, _In_ CALTYPE); +BOOL WINAPI EnumCalendarInfoExW(_In_ CALINFO_ENUMPROCEXW, _In_ LCID, _In_ CALID, _In_ CALTYPE); +BOOL WINAPI EnumDateFormatsExA(_In_ DATEFMT_ENUMPROCEXA, _In_ LCID, _In_ DWORD); +BOOL WINAPI EnumDateFormatsExW(_In_ DATEFMT_ENUMPROCEXW, _In_ LCID, _In_ DWORD); +BOOL WINAPI EnumSystemLanguageGroupsA(_In_ LANGUAGEGROUP_ENUMPROCA, _In_ DWORD, _In_ LONG_PTR); +BOOL WINAPI EnumSystemLanguageGroupsW(_In_ LANGUAGEGROUP_ENUMPROCW, _In_ DWORD, _In_ LONG_PTR); +BOOL WINAPI EnumLanguageGroupLocalesA(_In_ LANGGROUPLOCALE_ENUMPROCA, _In_ LGRPID, _In_ DWORD, _In_ LONG_PTR); +BOOL WINAPI EnumLanguageGroupLocalesW(_In_ LANGGROUPLOCALE_ENUMPROCW, _In_ LGRPID, _In_ DWORD, _In_ LONG_PTR); +BOOL WINAPI EnumUILanguagesA(_In_ UILANGUAGE_ENUMPROCA, _In_ DWORD, _In_ LONG_PTR); +BOOL WINAPI EnumUILanguagesW(_In_ UILANGUAGE_ENUMPROCW, _In_ DWORD, _In_ LONG_PTR); LANGID WINAPI GetSystemDefaultUILanguage(void); LANGID WINAPI GetUserDefaultUILanguage(void); -BOOL WINAPI IsValidLanguageGroup(LGRPID,DWORD); +BOOL WINAPI IsValidLanguageGroup(_In_ LGRPID, _In_ DWORD); #endif /* (WINVER >= 0x0500) */ + #if (WINVER >= 0x0600) -BOOL WINAPI GetFileMUIInfo(DWORD,PCWSTR,PFILEMUIINFO,DWORD*); -BOOL WINAPI GetFileMUIPath(DWORD,PCWSTR,PWSTR,PULONG,PWSTR,PULONG,PULONGLONG); + +_Success_(return != FALSE) +BOOL +WINAPI +GetFileMUIInfo( + _In_ DWORD dwFlags, + _In_ PCWSTR pcwszFilePath, + _Inout_updates_bytes_to_opt_(*pcbFileMUIInfo, *pcbFileMUIInfo) PFILEMUIINFO pFileMUIInfo, + _Inout_ DWORD *pcbFileMUIInfo); + +BOOL +WINAPI +GetFileMUIPath( + _In_ DWORD dwFlags, + _In_ PCWSTR pcwszFilePath, + _Inout_updates_opt_(*pcchLanguage) PWSTR pwszLanguage, + _Inout_ PULONG pcchLanguage, + _Out_writes_opt_(*pcchFileMUIPath) PWSTR pwszFileMUIPath, + _Inout_ PULONG pcchFileMUIPath, + _Inout_ PULONGLONG pululEnumerator); + WINBASEAPI -int WINAPI GetLocaleInfoEx(LPCWSTR,LCTYPE,LPWSTR,int); -BOOL WINAPI GetProcessPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG); -BOOL WINAPI GetSystemPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG); -BOOL WINAPI GetThreadPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG); +int +WINAPI +GetLocaleInfoEx( + _In_opt_ LPCWSTR lpLocaleName, + _In_ LCTYPE LCType, + _Out_writes_opt_(cchData) LPWSTR lpLCData, + _In_ int cchData); + +BOOL +WINAPI +GetProcessPreferredUILanguages( + _In_ DWORD dwFlags, + _Out_ PULONG pulNumLanguages, + _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, + _Inout_ PULONG pcchLanguagesBuffer); + +BOOL +WINAPI +GetSystemPreferredUILanguages( + _In_ DWORD dwFlags, + _Out_ PULONG pulNumLanguages, + _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, + _Inout_ PULONG pcchLanguagesBuffer); + +BOOL +WINAPI +GetThreadPreferredUILanguages( + _In_ DWORD dwFlags, + _Out_ PULONG pulNumLanguages, + _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, + _Inout_ PULONG pcchLanguagesBuffer); + LANGID WINAPI GetThreadUILanguage(void); -BOOL WINAPI GetUILanguageInfo(DWORD,PCZZWSTR,PZZWSTR,PDWORD,PDWORD); -BOOL WINAPI GetUserPreferredUILanguages(DWORD,PULONG,PZZWSTR,PULONG); -int WINAPI IdnToAscii(DWORD,LPCWSTR,int,LPWSTR,int); -int WINAPI IdnToNameprepUnicode(DWORD,LPCWSTR,int,LPWSTR,int); -int WINAPI IdnToUnicode(DWORD,LPCWSTR,int,LPWSTR,int); -BOOL WINAPI IsNormalizedString(NORM_FORM,LPCWSTR,int); -int WINAPI NormalizeString(NORM_FORM,LPCWSTR,int,LPWSTR,int); -int WINAPI GetStringScripts(DWORD,LPCWSTR,int,LPWSTR,int); -BOOL WINAPI SetProcessPreferredUILanguages(DWORD,PCZZWSTR,PULONG); -BOOL WINAPI SetThreadPreferredUILanguages(DWORD,PCZZWSTR,PULONG); -BOOL WINAPI VerifyScripts(DWORD,LPCWSTR,int,LPCWSTR,int); + +BOOL +WINAPI +GetUILanguageInfo( + _In_ DWORD dwFlags, + _In_ PCZZWSTR pwmszLanguage, + _Out_writes_opt_(*pcchFallbackLanguages) PZZWSTR pwszFallbackLanguages, + _Inout_opt_ PDWORD pcchFallbackLanguages, + _Out_ PDWORD pAttributes); + +BOOL +WINAPI +GetUserPreferredUILanguages( + _In_ DWORD dwFlags, + _Out_ PULONG pulNumLanguages, + _Out_writes_opt_(*pcchLanguagesBuffer) PZZWSTR pwszLanguagesBuffer, + _Inout_ PULONG pcchLanguagesBuffer); + +int +WINAPI +IdnToAscii( + _In_ DWORD dwFlags, + _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, + _In_ int cchUnicodeChar, + _Out_writes_opt_(cchASCIIChar) LPWSTR lpASCIICharStr, + _In_ int cchASCIIChar); + +int +WINAPI +IdnToNameprepUnicode( + _In_ DWORD dwFlags, + _In_reads_(cchUnicodeChar) LPCWSTR lpUnicodeCharStr, + _In_ int cchUnicodeChar, + _Out_writes_opt_(cchNameprepChar) LPWSTR lpNameprepCharStr, + _In_ int cchNameprepChar); + +int +WINAPI +IdnToUnicode( + _In_ DWORD dwFlags, + _In_reads_(cchASCIIChar) LPCWSTR lpASCIICharStr, + _In_ int cchASCIIChar, + _Out_writes_opt_(cchUnicodeChar) LPWSTR lpUnicodeCharStr, + _In_ int cchUnicodeChar); + +BOOL +WINAPI +IsNormalizedString( + _In_ NORM_FORM NormForm, + _In_reads_(cwLength) LPCWSTR lpString, + _In_ int cwLength); + +int +WINAPI +NormalizeString( + _In_ NORM_FORM NormForm, + _In_reads_(cwSrcLength) LPCWSTR lpSrcString, + _In_ int cwSrcLength, + _Out_writes_opt_(cwDstLength) LPWSTR lpDstString, + _In_ int cwDstLength); + +int +WINAPI +GetStringScripts( + _In_ DWORD dwFlags, + _In_ LPCWSTR lpString, + _In_ int cchString, + _Out_writes_opt_(cchScripts) LPWSTR lpScripts, + _In_ int cchScripts); + +BOOL WINAPI SetProcessPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG); +BOOL WINAPI SetThreadPreferredUILanguages(_In_ DWORD, _In_opt_ PCZZWSTR, _Out_opt_ PULONG); +BOOL WINAPI VerifyScripts(_In_ DWORD, _In_ LPCWSTR, _In_ int, _In_ LPCWSTR, _In_ int); + #endif /* (WINVER >= 0x0600) */ #ifdef UNICODE diff --git a/include/reactos/libs/epsapi/epsapi.h b/include/reactos/libs/epsapi/epsapi.h index aa81ad9ae0b..92967928c1e 100644 --- a/include/reactos/libs/epsapi/epsapi.h +++ b/include/reactos/libs/epsapi/epsapi.h @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * epsapi.h * diff --git a/include/reactos/libs/syssetup/syssetup.h b/include/reactos/libs/syssetup/syssetup.h index 3313bb239a0..91ecfc8b8c2 100644 --- a/include/reactos/libs/syssetup/syssetup.h +++ b/include/reactos/libs/syssetup/syssetup.h @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * syssetup.h * diff --git a/include/reactos/services/services.h b/include/reactos/services/services.h index b30854eae4f..c513a291c3d 100644 --- a/include/reactos/services/services.h +++ b/include/reactos/services/services.h @@ -19,6 +19,12 @@ /* Start a service that runs in its own process */ #define SERVICE_CONTROL_START_OWN 81 +/* + * Start event name used by OpenSCManager + * to know whether the SCM is initialized. + */ +#define SCM_START_EVENT L"SvcctrlStartEvent_A3752DX" + typedef struct _SCM_CONTROL_PACKET { DWORD dwSize; diff --git a/include/reactos/subsys/lsass/lsass.h b/include/reactos/subsys/lsass/lsass.h index 5eb709acdf9..96b0497aa2b 100644 --- a/include/reactos/subsys/lsass/lsass.h +++ b/include/reactos/subsys/lsass/lsass.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: include/lsass/lsass.h diff --git a/include/reactos/winlogon.h b/include/reactos/winlogon.h index 4c00b674e81..b8571da7bbc 100644 --- a/include/reactos/winlogon.h +++ b/include/reactos/winlogon.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: include/reactos/winlogon.h diff --git a/lib/3rdparty/adns/README.html b/lib/3rdparty/adns/README.html index 760c2780411..a35b96e398b 100644 --- a/lib/3rdparty/adns/README.html +++ b/lib/3rdparty/adns/README.html @@ -16,7 +16,7 @@ library and utilities. - +

diff --git a/lib/3rdparty/freetype/README.ROS b/lib/3rdparty/freetype/README.ROS index d33a314c5a1..5d4eb6334cc 100644 --- a/lib/3rdparty/freetype/README.ROS +++ b/lib/3rdparty/freetype/README.ROS @@ -67,4 +67,4 @@ file, so it is obvious to everyone which FreeType version we're using. After testing, you can commit the new/changed files to CVS. ALthough files config.mk and freetype.def are generated, they should be included in CVS. -$Id$ +$Id: README.ROS 25663 2007-01-31 06:11:48Z greatlrd $ diff --git a/lib/epsapi/enum/drivers.c b/lib/epsapi/enum/drivers.c index 961628da76e..fa87c5418c2 100644 --- a/lib/epsapi/enum/drivers.c +++ b/lib/epsapi/enum/drivers.c @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * COPYRIGHT: See COPYING in the top level directory * LICENSE: See LGPL.txt in the top level directory diff --git a/lib/epsapi/enum/modules.c b/lib/epsapi/enum/modules.c index f5a3d73d479..8cfc2bf5f85 100644 --- a/lib/epsapi/enum/modules.c +++ b/lib/epsapi/enum/modules.c @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * COPYRIGHT: See COPYING in the top level directory * LICENSE: See LGPL.txt in the top level directory diff --git a/lib/epsapi/enum/processes.c b/lib/epsapi/enum/processes.c index 3d772d0b5d1..089130554af 100644 --- a/lib/epsapi/enum/processes.c +++ b/lib/epsapi/enum/processes.c @@ -1,5 +1,3 @@ -/* $Id$ -*/ /* * COPYRIGHT: See COPYING in the top level directory * LICENSE: See LGPL.txt in the top level directory diff --git a/lib/fslib/vfatlib/check/vfat.h b/lib/fslib/vfatlib/check/vfat.h index 1aecfba279a..a7536c9905e 100644 --- a/lib/fslib/vfatlib/check/vfat.h +++ b/lib/fslib/vfatlib/check/vfat.h @@ -1,4 +1,3 @@ -/* $Id: vfat.h 16656 2005-07-20 02:52:52Z ion $ */ #include #include diff --git a/lib/sdk/crt/crt.cmake b/lib/sdk/crt/crt.cmake index eaf22f2c1c8..c01e1756c90 100644 --- a/lib/sdk/crt/crt.cmake +++ b/lib/sdk/crt/crt.cmake @@ -135,13 +135,17 @@ list(APPEND CRT_SOURCE printf/_cprintf.c printf/_cwprintf.c printf/_snprintf.c + printf/_snprintf_s.c printf/_snwprintf.c + printf/_snwprintf_s.c printf/_vcprintf.c printf/_vcwprintf.c printf/_vscprintf.c printf/_vscwprintf.c printf/_vsnprintf.c + printf/_vsnprintf_s.c printf/_vsnwprintf.c + printf/_vsnwprintf_s.c printf/_vsprintf_p.c printf/fprintf.c printf/fprintf_s.c @@ -150,8 +154,10 @@ list(APPEND CRT_SOURCE printf/printf.c printf/printf_s.c printf/sprintf.c + printf/sprintf_s.c printf/streamout.c printf/swprintf.c + printf/swprintf_s.c printf/vfprintf.c printf/vfprintf_s.c printf/vfwprintf.c @@ -159,7 +165,9 @@ list(APPEND CRT_SOURCE printf/vprintf.c printf/vprintf_s.c printf/vsprintf.c + printf/vsprintf_s.c printf/vswprintf.c + printf/vswprintf_s.c printf/vwprintf.c printf/vwprintf_s.c printf/wprintf.c @@ -252,6 +260,10 @@ list(APPEND CRT_SOURCE stdlib/wmakpath_s.c string/_mbsnlen.c string/_mbstrnlen.c + string/_splitpath.c + string/_splitpath_s.c + string/_wsplitpath.c + string/_wsplitpath_s.c string/atof.c string/atoi.c string/atoi64.c @@ -263,7 +275,6 @@ list(APPEND CRT_SOURCE string/itow.c string/mbstowcs_s.c string/scanf.c - string/splitp.c string/strcoll.c string/strcspn.c string/strdup.c @@ -291,7 +302,6 @@ list(APPEND CRT_SOURCE string/wcstombs_s.c string/wcstoul.c string/wctype.c - string/wsplitp.c string/wtoi.c string/wtoi64.c string/wtol.c diff --git a/lib/sdk/crt/except/i386/chkstk_asm.s b/lib/sdk/crt/except/i386/chkstk_asm.s index 58879f18d0f..5508611bdb7 100644 --- a/lib/sdk/crt/except/i386/chkstk_asm.s +++ b/lib/sdk/crt/except/i386/chkstk_asm.s @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Stack checker diff --git a/lib/sdk/crt/except/powerpc/chkstk_asm.s b/lib/sdk/crt/except/powerpc/chkstk_asm.s index 653fec4dd07..67b726800e6 100644 --- a/lib/sdk/crt/except/powerpc/chkstk_asm.s +++ b/lib/sdk/crt/except/powerpc/chkstk_asm.s @@ -1,5 +1,4 @@ -/* $Id: chkstk_asm.s 26099 2007-03-14 20:30:32Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * PURPOSE: Stack checker diff --git a/lib/sdk/crt/libcntpr.cmake b/lib/sdk/crt/libcntpr.cmake index 7c8e490b3ca..487c92e3a60 100644 --- a/lib/sdk/crt/libcntpr.cmake +++ b/lib/sdk/crt/libcntpr.cmake @@ -26,6 +26,8 @@ list(APPEND LIBCNTPR_SOURCE search/bsearch.c search/lfind.c stdlib/qsort.c + string/_splitpath.c + string/_wsplitpath.c string/ctype.c string/iswctype.c string/is_wctype.c @@ -46,7 +48,6 @@ list(APPEND LIBCNTPR_SOURCE string/itoa.c string/itow.c string/mbstowcs_nt.c - string/splitp.c string/strtol.c string/strtoul.c string/strtoull.c @@ -55,7 +56,6 @@ list(APPEND LIBCNTPR_SOURCE string/wcstombs_nt.c string/wcstoul.c string/wctype.c - string/wsplitp.c string/wtoi64.c string/wtoi.c string/wtol.c diff --git a/lib/sdk/crt/math/adjust.c b/lib/sdk/crt/math/adjust.c index f27c82511de..dcffa5f7237 100644 --- a/lib/sdk/crt/math/adjust.c +++ b/lib/sdk/crt/math/adjust.c @@ -1,6 +1,3 @@ -/* $Id$ - * - */ int _adjust_fdiv = 0; diff --git a/lib/sdk/crt/mem/i386/memchr_asm.s b/lib/sdk/crt/mem/i386/memchr_asm.s index 40cd3dc8cef..37e5deb9f52 100644 --- a/lib/sdk/crt/mem/i386/memchr_asm.s +++ b/lib/sdk/crt/mem/i386/memchr_asm.s @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: lib/sdk/crt/mem/i386/memchr.s diff --git a/lib/sdk/crt/mem/i386/memset_asm.s b/lib/sdk/crt/mem/i386/memset_asm.s index 81430472f4a..dc964ac3969 100644 --- a/lib/sdk/crt/mem/i386/memset_asm.s +++ b/lib/sdk/crt/mem/i386/memset_asm.s @@ -1,6 +1,3 @@ -/* - * $Id$ - */ #include #include diff --git a/lib/sdk/crt/mem/memccpy.c b/lib/sdk/crt/mem/memccpy.c index c760b85021e..f819b399c68 100644 --- a/lib/sdk/crt/mem/memccpy.c +++ b/lib/sdk/crt/mem/memccpy.c @@ -1,6 +1,3 @@ -/* - * $Id$ - */ #include @@ -8,18 +5,18 @@ void * _memccpy (void *to, const void *from,int c,size_t count) { - char t; - size_t i; - char *dst=(char*)to; - const char *src=(const char*)from; + char t; + size_t i; + char *dst=(char*)to; + const char *src=(const char*)from; - for ( i = 0; i < count; i++ ) - { - dst[i] = t = src[i]; - if ( t == '\0' ) - break; - if ( t == c ) - return &dst[i+1]; - } - return NULL; /* didn't copy c */ + for ( i = 0; i < count; i++ ) + { + dst[i] = t = src[i]; + if ( t == '\0' ) + break; + if ( t == c ) + return &dst[i+1]; + } + return NULL; /* didn't copy c */ } diff --git a/lib/sdk/crt/mem/memchr.c b/lib/sdk/crt/mem/memchr.c index 9a9ce8af3fc..47be47effc9 100644 --- a/lib/sdk/crt/mem/memchr.c +++ b/lib/sdk/crt/mem/memchr.c @@ -1,18 +1,15 @@ -/* - * $Id$ - */ #include void* memchr(const void *s, int c, size_t n) { - if (n) - { - const char *p = s; - do { - if (*p++ == c) - return (void *)(p-1); - } while (--n != 0); - } - return 0; + if (n) + { + const char *p = s; + do { + if (*p++ == c) + return (void *)(p-1); + } while (--n != 0); + } + return 0; } diff --git a/lib/sdk/crt/mem/memcmp.c b/lib/sdk/crt/mem/memcmp.c index b9b4334260f..4b3a8354174 100644 --- a/lib/sdk/crt/mem/memcmp.c +++ b/lib/sdk/crt/mem/memcmp.c @@ -1,6 +1,3 @@ -/* - * $Id$ - */ #include @@ -15,7 +12,7 @@ int memcmp(const void *s1, const void *s2, size_t n) const unsigned char *p1 = s1, *p2 = s2; do { if (*p1++ != *p2++) - return (*--p1 - *--p2); + return (*--p1 - *--p2); } while (--n != 0); } return 0; diff --git a/lib/sdk/crt/mem/memset.c b/lib/sdk/crt/mem/memset.c index 692c09dc620..60ad45a9296 100644 --- a/lib/sdk/crt/mem/memset.c +++ b/lib/sdk/crt/mem/memset.c @@ -1,17 +1,14 @@ -/* - * $Id$ - */ #include void* memset(void* src, int val, size_t count) { - char *char_src = (char *)src; + char *char_src = (char *)src; - while(count>0) { - *char_src = val; - char_src++; - count--; - } - return src; + while(count>0) { + *char_src = val; + char_src++; + count--; + } + return src; } diff --git a/lib/sdk/crt/printf/_snprintf_s.c b/lib/sdk/crt/printf/_snprintf_s.c new file mode 100644 index 00000000000..249a8b3936f --- /dev/null +++ b/lib/sdk/crt/printf/_snprintf_s.c @@ -0,0 +1,13 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_snprintf_s.c + * PURPOSE: Implementation of _snprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf _snprintf_s +#define USE_COUNT 1 +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/_snwprintf_s.c b/lib/sdk/crt/printf/_snwprintf_s.c new file mode 100644 index 00000000000..cd60e135466 --- /dev/null +++ b/lib/sdk/crt/printf/_snwprintf_s.c @@ -0,0 +1,14 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_snwprintf_s.c + * PURPOSE: Implementation of _snwprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf _snwprintf_s +#define USE_COUNT 1 +#define _UNICODE +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/_sxprintf.c b/lib/sdk/crt/printf/_sxprintf.c index 44d35ecafff..28d77aa2fd7 100644 --- a/lib/sdk/crt/printf/_sxprintf.c +++ b/lib/sdk/crt/printf/_sxprintf.c @@ -10,6 +10,9 @@ #include #include #include +#if IS_SECAPI +#include +#endif #ifdef _UNICODE #define _tstreamout wstreamout @@ -17,6 +20,8 @@ #define _tstreamout streamout #endif +#define min(a,b) (((a) < (b)) ? (a) : (b)) + int _cdecl _tstreamout(FILE *stream, const TCHAR *format, va_list argptr); int @@ -27,6 +32,9 @@ _cdecl #endif _sxprintf( TCHAR *buffer, +#if IS_SECAPI + size_t sizeOfBuffer, +#endif #if USE_COUNT size_t count, #endif @@ -37,20 +45,42 @@ _sxprintf( ...) #endif { +#if !USE_COUNT + const size_t count = INT_MAX; +#endif +#if !IS_SECAPI + const size_t sizeOfBuffer = count; +#endif #if !USE_VARARGS va_list argptr; #endif int result; FILE stream; + /* Check trivial case */ + if ((buffer == NULL) && (count == 0) && (sizeOfBuffer == 0)) + { + return 0; + } + +#if IS_SECAPI + /* Validate parameters */ + if (MSVCRT_CHECK_PMT(((buffer == NULL) || (format == NULL) || (sizeOfBuffer <= 0)))) + { + errno = EINVAL; + return -1; + } + + /* Limit output to count + 1 characters */ + if (count != -1) + sizeOfBuffer = min(sizeOfBuffer, count + 1); +#endif + + /* Setup the FILE structure */ stream._base = (char*)buffer; stream._ptr = stream._base; stream._charbuf = 0; -#if USE_COUNT - stream._cnt = (int)(count * sizeof(TCHAR)); -#else - stream._cnt = INT_MAX; -#endif + stream._cnt = (int)(sizeOfBuffer * sizeof(TCHAR)); stream._bufsiz = 0; stream._flag = _IOSTRG | _IOWRT; stream._tmpfname = 0; @@ -63,8 +93,33 @@ _sxprintf( va_end(argptr); #endif +#if IS_SECAPI + /* Check for failure or unterminated string */ + if ((result < 0) || (result == sizeOfBuffer)) + { + /* Null-terminate the buffer at the end */ + buffer[sizeOfBuffer-1] = _T('\0'); + + /* Check if we can truncate */ + if (count != _TRUNCATE) + { + /* We can't, invoke invalid parameter handler */ + MSVCRT_INVALID_PMT("Buffer is too small"); + + /* If we came back, set the buffer to an empty string */ + *buffer = 0; + } + + /* Return failure */ + return -1; + } + + /* Null-terminate the buffer after the string */ + buffer[result] = _T('\0'); +#else /* Only zero terminate if there is enough space left */ if (stream._cnt >= sizeof(TCHAR)) *(TCHAR*)stream._ptr = _T('\0'); +#endif return result; } diff --git a/lib/sdk/crt/printf/_vsnprintf_s.c b/lib/sdk/crt/printf/_vsnprintf_s.c new file mode 100644 index 00000000000..7355406e798 --- /dev/null +++ b/lib/sdk/crt/printf/_vsnprintf_s.c @@ -0,0 +1,14 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_vsnprintf_s.c + * PURPOSE: Implementation of _vsnprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf _vsnprintf_s +#define USE_COUNT 1 +#define USE_VARARGS 1 +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/_vsnwprintf_s.c b/lib/sdk/crt/printf/_vsnwprintf_s.c new file mode 100644 index 00000000000..fc7585cdf2f --- /dev/null +++ b/lib/sdk/crt/printf/_vsnwprintf_s.c @@ -0,0 +1,15 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/_vsnwprintf_s.c + * PURPOSE: Implementation of _vsnwprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf _vsnwprintf_s +#define USE_COUNT 1 +#define USE_VARARGS 1 +#define _UNICODE +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/sprintf_s.c b/lib/sdk/crt/printf/sprintf_s.c new file mode 100644 index 00000000000..671747391f2 --- /dev/null +++ b/lib/sdk/crt/printf/sprintf_s.c @@ -0,0 +1,13 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/sprintf_s.c + * PURPOSE: Implementation of sprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf sprintf_s +#define USE_COUNT 0 +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/swprintf_s.c b/lib/sdk/crt/printf/swprintf_s.c new file mode 100644 index 00000000000..a77136c6849 --- /dev/null +++ b/lib/sdk/crt/printf/swprintf_s.c @@ -0,0 +1,14 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/swprintf_s.c + * PURPOSE: Implementation of swprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf swprintf_s +#define USE_COUNT 0 +#define USE_VARARGS 0 +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/vsprintf_s.c b/lib/sdk/crt/printf/vsprintf_s.c new file mode 100644 index 00000000000..b049afaecd3 --- /dev/null +++ b/lib/sdk/crt/printf/vsprintf_s.c @@ -0,0 +1,14 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/vsprintf_s.c + * PURPOSE: Implementation of vsprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf vsprintf_s +#define USE_COUNT 0 +#define USE_VARARGS 1 +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/printf/vswprintf_s.c b/lib/sdk/crt/printf/vswprintf_s.c new file mode 100644 index 00000000000..68702ba9f75 --- /dev/null +++ b/lib/sdk/crt/printf/vswprintf_s.c @@ -0,0 +1,15 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/printf/vswprintf_s.c + * PURPOSE: Implementation of vswprintf_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _sxprintf vswprintf_s +#define USE_COUNT 0 +#define USE_VARARGS 1 +#define _UNICODE +#define IS_SECAPI 1 + +#include "_sxprintf.c" diff --git a/lib/sdk/crt/setjmp/i386/setjmp.s b/lib/sdk/crt/setjmp/i386/setjmp.s index 95c4aac27a3..6c165dfc53d 100644 --- a/lib/sdk/crt/setjmp/i386/setjmp.s +++ b/lib/sdk/crt/setjmp/i386/setjmp.s @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Implementation of _setjmp/longjmp diff --git a/lib/sdk/crt/stdlib/makepath.c b/lib/sdk/crt/stdlib/makepath.c index c048fb80c42..1e40e10e5a9 100644 --- a/lib/sdk/crt/stdlib/makepath.c +++ b/lib/sdk/crt/stdlib/makepath.c @@ -11,8 +11,6 @@ * */ -/* $Id$ - */ #include #include #include diff --git a/lib/sdk/crt/stdlib/wmakpath.c b/lib/sdk/crt/stdlib/wmakpath.c index 16ad4e3f844..156d8704a2d 100644 --- a/lib/sdk/crt/stdlib/wmakpath.c +++ b/lib/sdk/crt/stdlib/wmakpath.c @@ -11,8 +11,6 @@ * */ -/* $Id$ - */ #include /* diff --git a/lib/sdk/crt/string/_splitpath.c b/lib/sdk/crt/string/_splitpath.c new file mode 100644 index 00000000000..0a14da494ad --- /dev/null +++ b/lib/sdk/crt/string/_splitpath.c @@ -0,0 +1,11 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/string/_splitpath.c + * PURPOSE: Implementation of _splitpath + * PROGRAMMER: Timo Kreuzer + */ + +#define _tsplitpath_x _splitpath + +#include "_tsplitpath_x.h" diff --git a/lib/sdk/crt/string/_splitpath_s.c b/lib/sdk/crt/string/_splitpath_s.c new file mode 100644 index 00000000000..ed9c4e2a25b --- /dev/null +++ b/lib/sdk/crt/string/_splitpath_s.c @@ -0,0 +1,12 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/string/_splitpath_s.c + * PURPOSE: Implementation of _splitpath_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _tsplitpath_x _splitpath_s +#define IS_SECAPI 1 + +#include "_tsplitpath_x.h" diff --git a/lib/sdk/crt/string/_tsplitpath_x.h b/lib/sdk/crt/string/_tsplitpath_x.h new file mode 100644 index 00000000000..76473c98257 --- /dev/null +++ b/lib/sdk/crt/string/_tsplitpath_x.h @@ -0,0 +1,146 @@ +/* + * PROJECT: ReactOS Kernel + * LICENSE: BSD - See COPYING.ARM in the top level directory + * PURPOSE: CRT: implementation of __[w]splitpath[_s] + * PROGRAMMERS: Timo Kreuzer + */ + +#include +#include + +#if IS_SECAPI +#define _FAILURE -1 +#define _SUCCESS 0 + +_Check_return_wat_ +_CRTIMP_ALTERNATIVE +errno_t +__cdecl +_tsplitpath_x( + _In_z_ const _TCHAR* path, + _Out_writes_opt_z_(drive_size) _TCHAR* drive, + _In_ size_t drive_size, + _Out_writes_opt_z_(dir_size) _TCHAR* dir, + _In_ size_t dir_size, + _Out_writes_opt_z_(fname_size) _TCHAR* fname, + _In_ size_t fname_size, + _Out_writes_opt_z_(ext_size) _TCHAR* ext, + _In_ size_t ext_size) +#else +#define _FAILURE +#define _SUCCESS + +_CRT_INSECURE_DEPRECATE(_splitpath_s) +_CRTIMP +void +__cdecl +_tsplitpath_x( + _In_z_ const _TCHAR* path, + _Pre_maybenull_ _Post_z_ _TCHAR* drive, + _Pre_maybenull_ _Post_z_ _TCHAR* dir, + _Pre_maybenull_ _Post_z_ _TCHAR* fname, + _Pre_maybenull_ _Post_z_ _TCHAR* ext) +#endif +{ + const _TCHAR *src, *dir_start, *file_start = 0, *ext_start = 0; + size_t count; +#if !IS_SECAPI + const size_t drive_size = INT_MAX, dir_size = INT_MAX, + fname_size = INT_MAX, ext_size = INT_MAX; +#endif + +#if IS_SECAPI + /* Validate parameters */ + if (MSVCRT_CHECK_PMT((path == NULL) || + ((drive != NULL) && (drive_size == 0)) || + ((dir != NULL) && (dir_size == 0)) || + ((fname != NULL) && (fname_size == 0)) || + ((ext != NULL) && (ext_size == 0)))) + { + errno = EINVAL; + return -1; + } +#endif + + /* Truncate all output strings */ + if (drive) drive[0] = '\0'; + if (dir) dir[0] = '\0'; + if (fname) fname[0] = '\0'; + if (ext) ext[0] = '\0'; + +#if WINVER >= 0x600 + /* Check parameter */ + if (!path) + { +#ifndef _LIBCNT_ + _set_errno(EINVAL); +#endif + return _FAILURE; + } +#endif + + _Analysis_assume_(path != 0); + +#if WINVER == 0x600 + /* Skip '\\?\' prefix */ + if ((path[0] == '\\') && (path[1] == '\\') && + (path[2] == '?') && (path[3] == '\\')) path += 4; +#endif + + if (path[0] == '\0') return _FAILURE; + + /* Check if we have a drive letter (only 1 char supported) */ + if (path[1] == ':') + { + if (drive && (drive_size >= 3)) + { + drive[0] = path[0]; + drive[1] = ':'; + drive[2] = '\0'; + } + path += 2; + } + + /* Scan the rest of the string */ + dir_start = path; + while (*path != '\0') + { + /* Remember last path separator and last dot */ + if ((*path == '\\') || (*path == '/')) file_start = path + 1; + if (*path == '.') ext_start = path; + path++; + } + + /* Check if we got a file name / extension */ + if (!file_start) + file_start = dir_start; + if (!ext_start || ext_start < file_start) + ext_start = path; + + if (dir) + { + src = dir_start; + count = dir_size - 1; + while (src < file_start && count--) *dir++ = *src++; + *dir = '\0'; + } + + if (fname) + { + src = file_start; + count = fname_size - 1; + while (src < ext_start && count--) *fname++ = *src++; + *fname = '\0'; + } + + if (ext) + { + src = ext_start; + count = ext_size - 1; + while (*src != '\0' && count--) *ext++ = *src++; + *ext = '\0'; + } + + return _SUCCESS; +} + diff --git a/lib/sdk/crt/string/_wsplitpath.c b/lib/sdk/crt/string/_wsplitpath.c new file mode 100644 index 00000000000..7cca8189731 --- /dev/null +++ b/lib/sdk/crt/string/_wsplitpath.c @@ -0,0 +1,12 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/string/_wsplitpath.c + * PURPOSE: Implementation of _wsplitpath + * PROGRAMMER: Timo Kreuzer + */ + +#define _tsplitpath_x _wsplitpath +#define _UNICODE + +#include "_tsplitpath_x.h" diff --git a/lib/sdk/crt/string/_wsplitpath_s.c b/lib/sdk/crt/string/_wsplitpath_s.c new file mode 100644 index 00000000000..bebfc815d86 --- /dev/null +++ b/lib/sdk/crt/string/_wsplitpath_s.c @@ -0,0 +1,13 @@ +/* + * COPYRIGHT: GNU GPL, see COPYING in the top level directory + * PROJECT: ReactOS crt library + * FILE: lib/sdk/crt/string/_wsplitpath_s.c + * PURPOSE: Implementation of _wsplitpath_s + * PROGRAMMER: Timo Kreuzer + */ + +#define _tsplitpath_x _wsplitpath_s +#define _UNICODE +#define IS_SECAPI 1 + +#include "_tsplitpath_x.h" diff --git a/lib/sdk/crt/string/i386/strcat_asm.s b/lib/sdk/crt/string/i386/strcat_asm.s index 6f7b8052d23..f04fb4bb6dc 100644 --- a/lib/sdk/crt/string/i386/strcat_asm.s +++ b/lib/sdk/crt/string/i386/strcat_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcscat.inc" diff --git a/lib/sdk/crt/string/i386/strchr_asm.s b/lib/sdk/crt/string/i386/strchr_asm.s index f8085f25485..f837a938bd2 100644 --- a/lib/sdk/crt/string/i386/strchr_asm.s +++ b/lib/sdk/crt/string/i386/strchr_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcschr.inc" diff --git a/lib/sdk/crt/string/i386/strcmp_asm.s b/lib/sdk/crt/string/i386/strcmp_asm.s index 8618f17c076..2afef2d0c35 100644 --- a/lib/sdk/crt/string/i386/strcmp_asm.s +++ b/lib/sdk/crt/string/i386/strcmp_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcscmp.inc" diff --git a/lib/sdk/crt/string/i386/strcpy_asm.s b/lib/sdk/crt/string/i386/strcpy_asm.s index 168d2921ba8..22b71a92ea5 100644 --- a/lib/sdk/crt/string/i386/strcpy_asm.s +++ b/lib/sdk/crt/string/i386/strcpy_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcscpy.inc" diff --git a/lib/sdk/crt/string/i386/strlen_asm.s b/lib/sdk/crt/string/i386/strlen_asm.s index 66a8ba27299..821c27d62e8 100644 --- a/lib/sdk/crt/string/i386/strlen_asm.s +++ b/lib/sdk/crt/string/i386/strlen_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcslen.inc" diff --git a/lib/sdk/crt/string/i386/strncat_asm.s b/lib/sdk/crt/string/i386/strncat_asm.s index d7fefe417a7..7a479b77ef4 100644 --- a/lib/sdk/crt/string/i386/strncat_asm.s +++ b/lib/sdk/crt/string/i386/strncat_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcsncat.inc" diff --git a/lib/sdk/crt/string/i386/strncmp_asm.s b/lib/sdk/crt/string/i386/strncmp_asm.s index d4db767c207..14c9a29c086 100644 --- a/lib/sdk/crt/string/i386/strncmp_asm.s +++ b/lib/sdk/crt/string/i386/strncmp_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcsncmp.inc" diff --git a/lib/sdk/crt/string/i386/strncpy_asm.s b/lib/sdk/crt/string/i386/strncpy_asm.s index 584dbb8cce5..e62470a317a 100644 --- a/lib/sdk/crt/string/i386/strncpy_asm.s +++ b/lib/sdk/crt/string/i386/strncpy_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcsncpy.inc" diff --git a/lib/sdk/crt/string/i386/strnlen_asm.s b/lib/sdk/crt/string/i386/strnlen_asm.s index 5c1f8dfccf7..28db26f37e2 100644 --- a/lib/sdk/crt/string/i386/strnlen_asm.s +++ b/lib/sdk/crt/string/i386/strnlen_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcsnlen.inc" diff --git a/lib/sdk/crt/string/i386/strrchr_asm.s b/lib/sdk/crt/string/i386/strrchr_asm.s index c94f29ec0d7..0c27b47dae5 100644 --- a/lib/sdk/crt/string/i386/strrchr_asm.s +++ b/lib/sdk/crt/string/i386/strrchr_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #include "tcsrchr.inc" diff --git a/lib/sdk/crt/string/i386/tchar.h b/lib/sdk/crt/string/i386/tchar.h index 10df6b92308..fd3c361fdd0 100644 --- a/lib/sdk/crt/string/i386/tchar.h +++ b/lib/sdk/crt/string/i386/tchar.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #ifndef __TCHAR_INC_S__ #define __TCHAR_INC_S__ diff --git a/lib/sdk/crt/string/i386/tcscat.inc b/lib/sdk/crt/string/i386/tcscat.inc index d587128f447..bc709f7e264 100644 --- a/lib/sdk/crt/string/i386/tcscat.inc +++ b/lib/sdk/crt/string/i386/tcscat.inc @@ -1,5 +1,3 @@ -/* $Id: tcscat.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcschr.inc b/lib/sdk/crt/string/i386/tcschr.inc index 9554ac3cbcd..8e7184f7dda 100644 --- a/lib/sdk/crt/string/i386/tcschr.inc +++ b/lib/sdk/crt/string/i386/tcschr.inc @@ -1,5 +1,3 @@ -/* $Id: tcschr.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcscmp.inc b/lib/sdk/crt/string/i386/tcscmp.inc index 3bcf453e7b7..7331dbb24f9 100644 --- a/lib/sdk/crt/string/i386/tcscmp.inc +++ b/lib/sdk/crt/string/i386/tcscmp.inc @@ -1,5 +1,3 @@ -/* $Id: tcscmp.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcscpy.inc b/lib/sdk/crt/string/i386/tcscpy.inc index 6b5086f40f8..797771dc223 100644 --- a/lib/sdk/crt/string/i386/tcscpy.inc +++ b/lib/sdk/crt/string/i386/tcscpy.inc @@ -1,5 +1,3 @@ -/* $Id: tcscpy.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcslen.inc b/lib/sdk/crt/string/i386/tcslen.inc index f749b9d88c4..c1304cc3e93 100644 --- a/lib/sdk/crt/string/i386/tcslen.inc +++ b/lib/sdk/crt/string/i386/tcslen.inc @@ -1,5 +1,3 @@ -/* $Id: tcslen.inc 49591 2010-11-15 01:29:12Z tkreuzer $ -*/ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcsncat.inc b/lib/sdk/crt/string/i386/tcsncat.inc index b03bb87785f..a25df29eb16 100644 --- a/lib/sdk/crt/string/i386/tcsncat.inc +++ b/lib/sdk/crt/string/i386/tcsncat.inc @@ -1,5 +1,3 @@ -/* $Id: tcsncat.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcsncmp.inc b/lib/sdk/crt/string/i386/tcsncmp.inc index 9545e583bec..ce8fdf8110f 100644 --- a/lib/sdk/crt/string/i386/tcsncmp.inc +++ b/lib/sdk/crt/string/i386/tcsncmp.inc @@ -1,5 +1,3 @@ -/* $Id: tcsncmp.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcsncpy.inc b/lib/sdk/crt/string/i386/tcsncpy.inc index 248c5ce9a20..9d021d4ee80 100644 --- a/lib/sdk/crt/string/i386/tcsncpy.inc +++ b/lib/sdk/crt/string/i386/tcsncpy.inc @@ -1,5 +1,3 @@ -/* $Id: tcsncpy.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcsnlen.inc b/lib/sdk/crt/string/i386/tcsnlen.inc index fc72607adb2..59827783abd 100644 --- a/lib/sdk/crt/string/i386/tcsnlen.inc +++ b/lib/sdk/crt/string/i386/tcsnlen.inc @@ -1,5 +1,3 @@ -/* $Id: tcsnlen.inc 49591 2010-11-15 01:29:12Z tkreuzer $ -*/ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/tcsrchr.inc b/lib/sdk/crt/string/i386/tcsrchr.inc index 9527853122a..84c759895d4 100644 --- a/lib/sdk/crt/string/i386/tcsrchr.inc +++ b/lib/sdk/crt/string/i386/tcsrchr.inc @@ -1,5 +1,3 @@ -/* $Id: tcsrchr.inc 49591 2010-11-15 01:29:12Z tkreuzer $ - */ #include "tchar.h" #include diff --git a/lib/sdk/crt/string/i386/wcscat_asm.s b/lib/sdk/crt/string/i386/wcscat_asm.s index b833d0ddab3..0d9b2f95b7f 100644 --- a/lib/sdk/crt/string/i386/wcscat_asm.s +++ b/lib/sdk/crt/string/i386/wcscat_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcscat.inc" diff --git a/lib/sdk/crt/string/i386/wcschr_asm.s b/lib/sdk/crt/string/i386/wcschr_asm.s index 8fc6c360baf..51b5cfd9fc6 100644 --- a/lib/sdk/crt/string/i386/wcschr_asm.s +++ b/lib/sdk/crt/string/i386/wcschr_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcschr.inc" diff --git a/lib/sdk/crt/string/i386/wcscmp_asm.s b/lib/sdk/crt/string/i386/wcscmp_asm.s index b4f5425beba..752f5e355f5 100644 --- a/lib/sdk/crt/string/i386/wcscmp_asm.s +++ b/lib/sdk/crt/string/i386/wcscmp_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcscmp.inc" diff --git a/lib/sdk/crt/string/i386/wcscpy_asm.s b/lib/sdk/crt/string/i386/wcscpy_asm.s index 78b6fe2a6d2..604b58a0bc8 100644 --- a/lib/sdk/crt/string/i386/wcscpy_asm.s +++ b/lib/sdk/crt/string/i386/wcscpy_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcscpy.inc" diff --git a/lib/sdk/crt/string/i386/wcslen_asm.s b/lib/sdk/crt/string/i386/wcslen_asm.s index 5d4bfe054aa..f7f8d0d8672 100644 --- a/lib/sdk/crt/string/i386/wcslen_asm.s +++ b/lib/sdk/crt/string/i386/wcslen_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcslen.inc" diff --git a/lib/sdk/crt/string/i386/wcsncat_asm.s b/lib/sdk/crt/string/i386/wcsncat_asm.s index d28bbc3e3a4..5911c28652f 100644 --- a/lib/sdk/crt/string/i386/wcsncat_asm.s +++ b/lib/sdk/crt/string/i386/wcsncat_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcsncat.inc" diff --git a/lib/sdk/crt/string/i386/wcsncmp_asm.s b/lib/sdk/crt/string/i386/wcsncmp_asm.s index 5ae53efa7c9..7997ec31a85 100644 --- a/lib/sdk/crt/string/i386/wcsncmp_asm.s +++ b/lib/sdk/crt/string/i386/wcsncmp_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcsncmp.inc" diff --git a/lib/sdk/crt/string/i386/wcsncpy_asm.s b/lib/sdk/crt/string/i386/wcsncpy_asm.s index b4591cfdb10..abc040efbdd 100644 --- a/lib/sdk/crt/string/i386/wcsncpy_asm.s +++ b/lib/sdk/crt/string/i386/wcsncpy_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcsncpy.inc" diff --git a/lib/sdk/crt/string/i386/wcsnlen_asm.s b/lib/sdk/crt/string/i386/wcsnlen_asm.s index 39349927757..ca05841ce74 100644 --- a/lib/sdk/crt/string/i386/wcsnlen_asm.s +++ b/lib/sdk/crt/string/i386/wcsnlen_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcsnlen.inc" diff --git a/lib/sdk/crt/string/i386/wcsrchr_asm.s b/lib/sdk/crt/string/i386/wcsrchr_asm.s index a845ee53203..75d39c9ac94 100644 --- a/lib/sdk/crt/string/i386/wcsrchr_asm.s +++ b/lib/sdk/crt/string/i386/wcsrchr_asm.s @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include "tcsrchr.inc" diff --git a/lib/sdk/crt/string/splitp.c b/lib/sdk/crt/string/splitp.c deleted file mode 100644 index 7500c920f96..00000000000 --- a/lib/sdk/crt/string/splitp.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * PROJECT: ReactOS Kernel - * LICENSE: BSD - See COPYING.ARM in the top level directory - * PURPOSE: CRT: implementation of _splitpath / _wsplitpath - * PROGRAMMERS: Timo Kreuzer - */ - -#include -#include - -/* - * @implemented - */ -void _tsplitpath(const _TCHAR* path, _TCHAR* drive, _TCHAR* dir, _TCHAR* fname, _TCHAR* ext) -{ - const _TCHAR *src, *dir_start, *file_start = 0, *ext_start = 0; - - /* Truncate all output strings */ - if (drive) drive[0] = '\0'; - if (dir) dir[0] = '\0'; - if (fname) fname[0] = '\0'; - if (ext) ext[0] = '\0'; - -#if WINVER >= 0x600 - /* Check parameter */ - if (!path) - { -#ifndef _LIBCNT_ - _set_errno(EINVAL); -#endif - return; - } -#endif - - _Analysis_assume_(path != 0); - -#if WINVER == 0x600 - /* Skip '\\?\' prefix */ - if ((path[0] == '\\') && (path[1] == '\\') && - (path[2] == '?') && (path[3] == '\\')) path += 4; -#endif - - if (path[0] == '\0') return; - - /* Check if we have a drive letter (only 1 char supported) */ - if (path[1] == ':') - { - if (drive) - { - drive[0] = path[0]; - drive[1] = ':'; - drive[2] = '\0'; - } - path += 2; - } - - /* Scan the rest of the string */ - dir_start = path; - while (*path != '\0') - { - /* Remember last path seperator and last dot */ - if ((*path == '\\') || (*path == '/')) file_start = path + 1; - if (*path == '.') ext_start = path; - path++; - } - - /* Check if we got a file name / extension */ - if (!file_start) - file_start = dir_start; - if (!ext_start || ext_start < file_start) - ext_start = path; - - if (dir) - { - src = dir_start; - while (src < file_start) *dir++ = *src++; - *dir = '\0'; - } - - if (fname) - { - src = file_start; - while (src < ext_start) *fname++ = *src++; - *fname = '\0'; - } - - if (ext) - { - src = ext_start; - while (*src != '\0') *ext++ = *src++; - *ext = '\0'; - } -} - diff --git a/lib/sdk/crt/string/strcat.c b/lib/sdk/crt/string/strcat.c index 59aee1a90fd..7507ebce06b 100644 --- a/lib/sdk/crt/string/strcat.c +++ b/lib/sdk/crt/string/strcat.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcscat.h" diff --git a/lib/sdk/crt/string/strchr.c b/lib/sdk/crt/string/strchr.c index e504e4bcd90..ce6804f0944 100644 --- a/lib/sdk/crt/string/strchr.c +++ b/lib/sdk/crt/string/strchr.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _XINT int #include diff --git a/lib/sdk/crt/string/strcmp.c b/lib/sdk/crt/string/strcmp.c index df8e1408196..9ca05ce7161 100644 --- a/lib/sdk/crt/string/strcmp.c +++ b/lib/sdk/crt/string/strcmp.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcscmp.h" diff --git a/lib/sdk/crt/string/strcpy.c b/lib/sdk/crt/string/strcpy.c index 9f09b15be97..bbeb6110e42 100644 --- a/lib/sdk/crt/string/strcpy.c +++ b/lib/sdk/crt/string/strcpy.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcscpy.h" diff --git a/lib/sdk/crt/string/strcspn.c b/lib/sdk/crt/string/strcspn.c index 5b507456d0e..7fc3c53132b 100644 --- a/lib/sdk/crt/string/strcspn.c +++ b/lib/sdk/crt/string/strcspn.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _x(_X_) (_X_) #define _strxspn strcspn diff --git a/lib/sdk/crt/string/strlen.c b/lib/sdk/crt/string/strlen.c index 7dd8d68c170..131835ff91c 100644 --- a/lib/sdk/crt/string/strlen.c +++ b/lib/sdk/crt/string/strlen.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcslen.h" diff --git a/lib/sdk/crt/string/strncat.c b/lib/sdk/crt/string/strncat.c index b2390f55da6..6fa1dacd016 100644 --- a/lib/sdk/crt/string/strncat.c +++ b/lib/sdk/crt/string/strncat.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcsncat.h" diff --git a/lib/sdk/crt/string/strncmp.c b/lib/sdk/crt/string/strncmp.c index 383782206d6..b47feafb73c 100644 --- a/lib/sdk/crt/string/strncmp.c +++ b/lib/sdk/crt/string/strncmp.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcsncmp.h" diff --git a/lib/sdk/crt/string/strncpy.c b/lib/sdk/crt/string/strncpy.c index c172eb7cc4d..6961eda4f4a 100644 --- a/lib/sdk/crt/string/strncpy.c +++ b/lib/sdk/crt/string/strncpy.c @@ -1,5 +1,4 @@ -/* $Id$ - */ + #include #include "tcsncpy.h" diff --git a/lib/sdk/crt/string/strnlen.c b/lib/sdk/crt/string/strnlen.c index 269c4953561..3126d51272f 100644 --- a/lib/sdk/crt/string/strnlen.c +++ b/lib/sdk/crt/string/strnlen.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include "tcsnlen.h" diff --git a/lib/sdk/crt/string/strpbrk.c b/lib/sdk/crt/string/strpbrk.c index dc05fbc8c78..083fc611ea6 100644 --- a/lib/sdk/crt/string/strpbrk.c +++ b/lib/sdk/crt/string/strpbrk.c @@ -1,6 +1,4 @@ -/* - * $Id$ - */ + #include #include diff --git a/lib/sdk/crt/string/strrchr.c b/lib/sdk/crt/string/strrchr.c index 152561537c8..9ef39c12b28 100644 --- a/lib/sdk/crt/string/strrchr.c +++ b/lib/sdk/crt/string/strrchr.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _XINT int #include diff --git a/lib/sdk/crt/string/strspn.c b/lib/sdk/crt/string/strspn.c index a4c4109239c..e1c446191cf 100644 --- a/lib/sdk/crt/string/strspn.c +++ b/lib/sdk/crt/string/strspn.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _x(_X_) (!(_X_)) #define _strxspn strspn diff --git a/lib/sdk/crt/string/strxspn.h b/lib/sdk/crt/string/strxspn.h index e253927318b..1da43d34b1d 100644 --- a/lib/sdk/crt/string/strxspn.h +++ b/lib/sdk/crt/string/strxspn.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcscat.h b/lib/sdk/crt/string/tcscat.h index 72a17f7b8e6..1c45439c484 100644 --- a/lib/sdk/crt/string/tcscat.h +++ b/lib/sdk/crt/string/tcscat.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include diff --git a/lib/sdk/crt/string/tcschr.h b/lib/sdk/crt/string/tcschr.h index 8c5e1ff6448..65e01b2a9e0 100644 --- a/lib/sdk/crt/string/tcschr.h +++ b/lib/sdk/crt/string/tcschr.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include diff --git a/lib/sdk/crt/string/tcscmp.h b/lib/sdk/crt/string/tcscmp.h index f94af94d2b0..e7c5b281b3c 100644 --- a/lib/sdk/crt/string/tcscmp.h +++ b/lib/sdk/crt/string/tcscmp.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include diff --git a/lib/sdk/crt/string/tcscpy.h b/lib/sdk/crt/string/tcscpy.h index ae2855710a0..716e06e5041 100644 --- a/lib/sdk/crt/string/tcscpy.h +++ b/lib/sdk/crt/string/tcscpy.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include diff --git a/lib/sdk/crt/string/tcslen.h b/lib/sdk/crt/string/tcslen.h index 918fc0626d7..ab2cc75419a 100644 --- a/lib/sdk/crt/string/tcslen.h +++ b/lib/sdk/crt/string/tcslen.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcsncat.h b/lib/sdk/crt/string/tcsncat.h index 146de33e8f8..d213a01281c 100644 --- a/lib/sdk/crt/string/tcsncat.h +++ b/lib/sdk/crt/string/tcsncat.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcsncmp.h b/lib/sdk/crt/string/tcsncmp.h index 420dc22ec1d..ae6c8d19563 100644 --- a/lib/sdk/crt/string/tcsncmp.h +++ b/lib/sdk/crt/string/tcsncmp.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcsncpy.h b/lib/sdk/crt/string/tcsncpy.h index c8f9ab47dd0..dbab841a111 100644 --- a/lib/sdk/crt/string/tcsncpy.h +++ b/lib/sdk/crt/string/tcsncpy.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcsnlen.h b/lib/sdk/crt/string/tcsnlen.h index 17d8476266e..953b5adec86 100644 --- a/lib/sdk/crt/string/tcsnlen.h +++ b/lib/sdk/crt/string/tcsnlen.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include #include diff --git a/lib/sdk/crt/string/tcsrchr.h b/lib/sdk/crt/string/tcsrchr.h index 354003273db..81890a0fc10 100644 --- a/lib/sdk/crt/string/tcsrchr.h +++ b/lib/sdk/crt/string/tcsrchr.h @@ -1,5 +1,3 @@ -/* $Id$ - */ #include diff --git a/lib/sdk/crt/string/wcscat.c b/lib/sdk/crt/string/wcscat.c index adf0e1c7919..af1638556d4 100644 --- a/lib/sdk/crt/string/wcscat.c +++ b/lib/sdk/crt/string/wcscat.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcschr.c b/lib/sdk/crt/string/wcschr.c index 20c852aaad9..c01bea28338 100644 --- a/lib/sdk/crt/string/wcschr.c +++ b/lib/sdk/crt/string/wcschr.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #define _XINT wchar_t diff --git a/lib/sdk/crt/string/wcscmp.c b/lib/sdk/crt/string/wcscmp.c index dc2ca0d9d34..e7a9639d92e 100644 --- a/lib/sdk/crt/string/wcscmp.c +++ b/lib/sdk/crt/string/wcscmp.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcscpy.c b/lib/sdk/crt/string/wcscpy.c index 283d6ab6eb8..8d6714b7094 100644 --- a/lib/sdk/crt/string/wcscpy.c +++ b/lib/sdk/crt/string/wcscpy.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcslen.c b/lib/sdk/crt/string/wcslen.c index 768c52afd7b..930680e42ce 100644 --- a/lib/sdk/crt/string/wcslen.c +++ b/lib/sdk/crt/string/wcslen.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcsncat.c b/lib/sdk/crt/string/wcsncat.c index c2ec3af009a..2a5611c65cd 100644 --- a/lib/sdk/crt/string/wcsncat.c +++ b/lib/sdk/crt/string/wcsncat.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcsncmp.c b/lib/sdk/crt/string/wcsncmp.c index 13059cc957f..4e20c8618ab 100644 --- a/lib/sdk/crt/string/wcsncmp.c +++ b/lib/sdk/crt/string/wcsncmp.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcsncpy.c b/lib/sdk/crt/string/wcsncpy.c index 90a93ab24dd..da1f4afb5fc 100644 --- a/lib/sdk/crt/string/wcsncpy.c +++ b/lib/sdk/crt/string/wcsncpy.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcsnlen.c b/lib/sdk/crt/string/wcsnlen.c index 445a4aab299..7f4d9693c2b 100644 --- a/lib/sdk/crt/string/wcsnlen.c +++ b/lib/sdk/crt/string/wcsnlen.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #include diff --git a/lib/sdk/crt/string/wcsrchr.c b/lib/sdk/crt/string/wcsrchr.c index 0bd83205150..01686515d36 100644 --- a/lib/sdk/crt/string/wcsrchr.c +++ b/lib/sdk/crt/string/wcsrchr.c @@ -1,5 +1,3 @@ -/* $Id$ - */ #define _UNICODE #define _XINT wchar_t diff --git a/lib/sdk/crt/string/witow.c b/lib/sdk/crt/string/witow.c index d2cb3ecb947..4add3319ef0 100644 --- a/lib/sdk/crt/string/witow.c +++ b/lib/sdk/crt/string/witow.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/msvcrt/stdlib/itow.c diff --git a/lib/sdk/crt/string/wsplitp.c b/lib/sdk/crt/string/wsplitp.c deleted file mode 100644 index 4655be577bd..00000000000 --- a/lib/sdk/crt/string/wsplitp.c +++ /dev/null @@ -1,7 +0,0 @@ - -#define _UNICODE -#define UNICODE - -#include - -#include "splitp.c" diff --git a/lib/smlib/compses.c b/lib/smlib/compses.c index f3a90ec4d37..73978d7292a 100644 --- a/lib/smlib/compses.c +++ b/lib/smlib/compses.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/smlib/compses.c diff --git a/lib/smlib/connect.c b/lib/smlib/connect.c index 5e58f13f8c0..aa95d9ab4d8 100644 --- a/lib/smlib/connect.c +++ b/lib/smlib/connect.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: reactos/lib/smlib/connect.c diff --git a/lib/smlib/execpgm.c b/lib/smlib/execpgm.c index 169f5e7ef49..82cba98c4ac 100644 --- a/lib/smlib/execpgm.c +++ b/lib/smlib/execpgm.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/smlib/execpgm.c diff --git a/lib/smlib/lookupss.c b/lib/smlib/lookupss.c index e1e892f93ab..f4971f8c1c0 100644 --- a/lib/smlib/lookupss.c +++ b/lib/smlib/lookupss.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/smlib/lookupss.c diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e2e8e019ac0..f1b19369251 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -48,7 +48,7 @@ reactos/dll/win32/browseui # Out of sync reactos/dll/win32/cabinet # Synced to Wine-1.5.19 reactos/dll/win32/clusapi # Synced to Wine-1.5.19 reactos/dll/win32/comcat # Synced to Wine-1.5.4 -reactos/dll/win32/comctl32 # Synced to Wine 1.5.19 +reactos/dll/win32/comctl32 # Synced to Wine 1.5.26 reactos/dll/win32/comdlg32 # Synced to Wine 1.3.37 reactos/dll/win32/compstui # Synced to Wine-1.5.19 reactos/dll/win32/credui # Synced to Wine-1.5.4 diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h index 3ae219ac5b8..2830d6aa21e 100644 --- a/ntoskrnl/include/internal/i386/ke.h +++ b/ntoskrnl/include/internal/i386/ke.h @@ -279,6 +279,23 @@ KiRundownThread(IN PKTHREAD Thread) #endif } +FORCEINLINE +VOID +Ke386SetGdtEntryBase(PKGDTENTRY GdtEntry, PVOID BaseAddress) +{ + GdtEntry->BaseLow = (USHORT)((ULONG_PTR)BaseAddress & 0xFFFF); + GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)BaseAddress >> 16); + GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)BaseAddress >> 24); +} + +FORCEINLINE +VOID +KiSetTebBase(PKPCR Pcr, PVOID TebAddress) +{ + Pcr->NtTib.Self = TebAddress; + Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress); +} + VOID FASTCALL Ki386InitializeTss( diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h index b9799c40f64..a905b96ed80 100644 --- a/ntoskrnl/include/internal/mm.h +++ b/ntoskrnl/include/internal/mm.h @@ -257,7 +257,7 @@ typedef struct _MEMORY_AREA ULONG Protect; ULONG Flags; BOOLEAN DeleteInProgress; - ULONG PageOpCount; + ULONG Magic; PVOID Vad; union { @@ -586,6 +586,15 @@ MmMapMemoryArea(PVOID BaseAddress, ULONG Consumer, ULONG Protection); +VOID +NTAPI +MiRosCheckMemoryAreas( + PMMSUPPORT AddressSpace); + +VOID +NTAPI +MiCheckAllProcessMemoryAreas(VOID); + /* npool.c *******************************************************************/ VOID @@ -1748,3 +1757,13 @@ MmGetKernelAddressSpace(VOID) { return MmKernelAddressSpace; } + + +/* expool.c ******************************************************************/ + +VOID +NTAPI +ExpCheckPoolAllocation( + PVOID P, + POOL_TYPE PoolType, + ULONG Tag); diff --git a/ntoskrnl/kdbg/kdb.h b/ntoskrnl/kdbg/kdb.h index 1872377e96a..55c6698f29b 100644 --- a/ntoskrnl/kdbg/kdb.h +++ b/ntoskrnl/kdbg/kdb.h @@ -114,6 +114,12 @@ KdbpPrint( IN PCHAR Format, IN ... OPTIONAL); +BOOLEAN +NTAPI +KdbpGetHexNumber( + IN PCHAR pszNum, + OUT ULONG_PTR *pulValue); + /* from kdb_expr.c */ BOOLEAN diff --git a/ntoskrnl/kdbg/kdb_cli.c b/ntoskrnl/kdbg/kdb_cli.c index ec0e53f89e3..e7d04517647 100644 --- a/ntoskrnl/kdbg/kdb_cli.c +++ b/ntoskrnl/kdbg/kdb_cli.c @@ -90,6 +90,8 @@ static BOOLEAN KdbpCmdSet(ULONG Argc, PCHAR Argv[]); static BOOLEAN KdbpCmdHelp(ULONG Argc, PCHAR Argv[]); static BOOLEAN KdbpCmdDmesg(ULONG Argc, PCHAR Argv[]); +BOOLEAN ExpKdbgExtPool(ULONG Argc, PCHAR Argv[]); + #ifdef __ROS_DWARF__ static BOOLEAN KdbpCmdPrintStruct(ULONG Argc, PCHAR Argv[]); #endif @@ -178,7 +180,8 @@ static const struct { "set", "set [var] [value]", "Sets var to value or displays value of var.", KdbpCmdSet }, { "dmesg", "dmesg", "Display debug messages on screen, with navigation on pages.", KdbpCmdDmesg }, { "kmsg", "kmsg", "Kernel dmesg. Alias for dmesg.", KdbpCmdDmesg }, - { "help", "help", "Display help screen.", KdbpCmdHelp } + { "help", "help", "Display help screen.", KdbpCmdHelp }, + { "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool } }; /* FUNCTIONS *****************************************************************/ @@ -403,6 +406,24 @@ KdbpEvaluateExpression( return Ok; } +BOOLEAN +NTAPI +KdbpGetHexNumber( + IN PCHAR pszNum, + OUT ULONG_PTR *pulValue) +{ + char *endptr; + + /* Skip optional '0x' prefix */ + if ((pszNum[0] == '0') && ((pszNum[1] == 'x') || (pszNum[1] == 'X'))) + pszNum += 2; + + /* Make a number from the string (hex) */ + *pulValue = strtoul(pszNum, &endptr, 16); + + return (*endptr == '\0'); +} + /*!\brief Evaluates an expression and displays the result. */ static BOOLEAN diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c index 8ee631428d1..b254caf8557 100644 --- a/ntoskrnl/ke/i386/thrdini.c +++ b/ntoskrnl/ke/i386/thrdini.c @@ -332,7 +332,6 @@ KiSwapContextExit(IN PKTHREAD OldThread, { PKIPCR Pcr = (PKIPCR)KeGetPcr(); PKPROCESS OldProcess, NewProcess; - PKGDTENTRY GdtEntry; PKTHREAD NewThread; /* We are on the new thread stack now */ @@ -347,7 +346,7 @@ KiSwapContextExit(IN PKTHREAD OldThread, if (*(PULONGLONG)&OldProcess->LdtDescriptor != *(PULONGLONG)&NewProcess->LdtDescriptor) { DPRINT1("LDT switch not implemented\n"); - ASSERT(FALSE); + ASSERT(FALSE); } /* Switch address space and flush TLB */ @@ -358,11 +357,7 @@ KiSwapContextExit(IN PKTHREAD OldThread, Ke386SetGs(0); /* Set the TEB */ - Pcr->NtTib.Self = (PVOID)NewThread->Teb; - GdtEntry = &Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; - GdtEntry->BaseLow = (USHORT)((ULONG_PTR)NewThread->Teb & 0xFFFF); - GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)NewThread->Teb >> 16); - GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)NewThread->Teb >> 24); + KiSetTebBase((PKPCR)Pcr, NewThread->Teb); /* Set new TSS fields */ Pcr->TSS->Esp0 = (ULONG_PTR)NewThread->InitialStack; @@ -491,7 +486,7 @@ KiDispatchInterrupt(VOID) KiQuantumEnd(); } else if (Prcb->NextThread) - { + { /* Capture current thread data */ OldThread = Prcb->CurrentThread; NewThread = Prcb->NextThread; diff --git a/ntoskrnl/ke/i386/v86vdm.c b/ntoskrnl/ke/i386/v86vdm.c index ec9c08d29db..cb73f07d6c6 100644 --- a/ntoskrnl/ke/i386/v86vdm.c +++ b/ntoskrnl/ke/i386/v86vdm.c @@ -45,14 +45,14 @@ KiVdmUnhandledOpcode(INTO); KiVdmUnhandledOpcode(INV); /* OPCODE HANDLERS ************************************************************/ - + BOOLEAN FASTCALL KiVdmOpcodePUSHF(IN PKTRAP_FRAME TrapFrame, IN ULONG Flags) { ULONG Esp, V86EFlags, TrapEFlags; - + /* Check for VME support */ ASSERT(KeI386VirtualIntExtensions == FALSE); @@ -67,10 +67,10 @@ KiVdmOpcodePUSHF(IN PKTRAP_FRAME TrapFrame, /* Add in those flags if they exist, and add in the IOPL flag */ V86EFlags |= TrapEFlags; V86EFlags |= EFLAGS_IOPL; - + /* Build flat ESP */ Esp = (TrapFrame->HardwareSegSs << 4) + (USHORT)TrapFrame->HardwareEsp; - + /* Check for OPER32 */ if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32) { @@ -84,11 +84,11 @@ KiVdmOpcodePUSHF(IN PKTRAP_FRAME TrapFrame, Esp -= 2; *(PUSHORT)Esp = (USHORT)V86EFlags; } - + /* Set new ESP and EIP */ TrapFrame->HardwareEsp = Esp - (TrapFrame->HardwareSegSs << 4); TrapFrame->Eip += KiVdmGetInstructionSize(Flags); - + /* We're done */ return TRUE; } @@ -99,10 +99,10 @@ KiVdmOpcodePOPF(IN PKTRAP_FRAME TrapFrame, IN ULONG Flags) { ULONG Esp, V86EFlags, EFlags, TrapEFlags; - + /* Build flat ESP */ Esp = (TrapFrame->HardwareSegSs << 4) + (USHORT)TrapFrame->HardwareEsp; - + /* Check for OPER32 */ if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32) { @@ -116,22 +116,22 @@ KiVdmOpcodePOPF(IN PKTRAP_FRAME TrapFrame, EFlags = *(PUSHORT)Esp; Esp += 2; } - + /* Set new ESP */ TrapFrame->HardwareEsp = Esp - (TrapFrame->HardwareSegSs << 4); - + /* Mask out IOPL from the flags */ EFlags &= ~EFLAGS_IOPL; - + /* Save the V86 flags, but mask out the nested task flag */ V86EFlags = EFlags & ~EFLAGS_NESTED_TASK; - + /* Now leave only alignment, nested task and interrupt flag */ EFlags &= (EFLAGS_ALIGN_CHECK | EFLAGS_NESTED_TASK | EFLAGS_INTERRUPT_MASK); - + /* Get trap EFlags */ TrapEFlags = TrapFrame->EFlags; - + /* Check for VME support */ ASSERT(KeI386VirtualIntExtensions == FALSE); @@ -143,16 +143,16 @@ KiVdmOpcodePOPF(IN PKTRAP_FRAME TrapFrame, /* Check if ESP0 needs to be fixed up */ if (TrapEFlags & EFLAGS_V86_MASK) Ki386AdjustEsp0(TrapFrame); - + /* Update the V8086 EFlags state */ KiVdmClearVdmEFlags(EFLAGS_ALIGN_CHECK | EFLAGS_NESTED_TASK | EFLAGS_INTERRUPT_MASK); KiVdmSetVdmEFlags(EFlags); - + /* FIXME: Check for VDM interrupts */ - + /* Update EIP */ TrapFrame->Eip += KiVdmGetInstructionSize(Flags); - + /* We're done */ return TRUE; } @@ -163,63 +163,63 @@ KiVdmOpcodeINTnn(IN PKTRAP_FRAME TrapFrame, IN ULONG Flags) { ULONG Esp, V86EFlags, TrapEFlags, Eip, Interrupt; - + /* Read trap frame EFlags */ TrapEFlags = TrapFrame->EFlags; - + /* Remove interrupt flag from V8086 EFlags */ V86EFlags = *KiNtVdmState; KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK); - + /* Keep only alignment and interrupt flag from the V8086 state */ V86EFlags &= (EFLAGS_ALIGN_CHECK | EFLAGS_INTERRUPT_MASK); - + /* Check for VME support */ ASSERT(KeI386VirtualIntExtensions == FALSE); - + /* Mask in the relevant V86 EFlags into the trap flags */ V86EFlags |= (TrapEFlags & ~EFLAGS_INTERRUPT_MASK); - + /* And mask out the VIF, nested task and TF flag from the trap flags */ TrapFrame->EFlags = TrapEFlags &~ (EFLAGS_VIF | EFLAGS_NESTED_TASK | EFLAGS_TF); - + /* Add the IOPL flag to the local trap flags */ V86EFlags |= EFLAGS_IOPL; - + /* Build flat ESP */ Esp = (TrapFrame->HardwareSegSs << 4) + TrapFrame->HardwareEsp; - + /* Push EFlags */ Esp -= 2; *(PUSHORT)(Esp) = (USHORT)V86EFlags; - + /* Push CS */ Esp -= 2; *(PUSHORT)(Esp) = (USHORT)TrapFrame->SegCs; - + /* Push IP */ Esp -= 2; *(PUSHORT)(Esp) = (USHORT)TrapFrame->Eip + KiVdmGetInstructionSize(Flags) + 1; - + /* Update ESP */ TrapFrame->HardwareEsp = (USHORT)Esp; - + /* Get flat EIP */ Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip; - + /* Now get the *next* EIP address (current is original + the count - 1) */ Eip += KiVdmGetInstructionSize(Flags); - + /* Now read the interrupt number */ Interrupt = *(PUCHAR)Eip; - + /* Read the EIP from its IVT entry */ Interrupt = *(PULONG)(Interrupt * 4); TrapFrame->Eip = (USHORT)Interrupt; - + /* Now get the CS segment */ Interrupt = (USHORT)(Interrupt >> 16); - + /* Check if the trap was not V8086 trap */ if (!(TrapFrame->EFlags & EFLAGS_V86_MASK)) { @@ -241,7 +241,7 @@ KiVdmOpcodeINTnn(IN PKTRAP_FRAME TrapFrame, /* Set IVT CS */ TrapFrame->SegCs = Interrupt; } - + /* We're done */ return TRUE; } @@ -255,17 +255,17 @@ KiVdmOpcodeIRET(IN PKTRAP_FRAME TrapFrame, /* Build flat ESP */ Esp = (TrapFrame->HardwareSegSs << 4) + TrapFrame->HardwareEsp; - + /* Check for OPER32 */ if (KiVdmGetPrefixFlags(Flags) & PFX_FLAG_OPER32) { /* Build segmented EIP */ TrapFrame->Eip = *(PULONG)Esp; TrapFrame->SegCs = *(PUSHORT)(Esp + 4); - + /* Set new ESP */ TrapFrame->HardwareEsp += 12; - + /* Get EFLAGS */ EFlags = *(PULONG)(Esp + 8); } @@ -281,28 +281,28 @@ KiVdmOpcodeIRET(IN PKTRAP_FRAME TrapFrame, /* Get EFLAGS */ EFlags = *(PUSHORT)(Esp + 4); } - + /* Mask out EFlags */ EFlags &= ~(EFLAGS_IOPL + EFLAGS_VIF + EFLAGS_NESTED_TASK + EFLAGS_VIP); V86EFlags = EFlags; - + /* Check for VME support */ ASSERT(KeI386VirtualIntExtensions == FALSE); - + /* Add V86 and Interrupt flag */ EFlags |= EFLAGS_V86_MASK | EFLAGS_INTERRUPT_MASK; - + /* Update EFlags in trap frame */ TrapEFlags = TrapFrame->EFlags; TrapFrame->EFlags = (TrapFrame->EFlags & EFLAGS_VIP) | EFlags; - + /* Check if ESP0 needs to be fixed up */ if (!(TrapEFlags & EFLAGS_V86_MASK)) Ki386AdjustEsp0(TrapFrame); - + /* Update the V8086 EFlags state */ KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK); KiVdmSetVdmEFlags(V86EFlags); - + /* Build flat EIP and check if this is the BOP instruction */ Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip; if (*(PUSHORT)Eip == 0xC4C4) @@ -315,7 +315,7 @@ KiVdmOpcodeIRET(IN PKTRAP_FRAME TrapFrame, /* FIXME: Check for VDM interrupts */ DPRINT("FIXME: Check for VDM interrupts\n"); } - + /* We're done */ return TRUE; } @@ -324,16 +324,16 @@ BOOLEAN FASTCALL KiVdmOpcodeCLI(IN PKTRAP_FRAME TrapFrame, IN ULONG Flags) -{ +{ /* Check for VME support */ ASSERT(KeI386VirtualIntExtensions == FALSE); /* Disable interrupts */ KiVdmClearVdmEFlags(EFLAGS_INTERRUPT_MASK); - + /* Skip instruction */ TrapFrame->Eip += KiVdmGetInstructionSize(Flags); - + /* Done */ return TRUE; } @@ -348,10 +348,10 @@ KiVdmOpcodeSTI(IN PKTRAP_FRAME TrapFrame, /* Enable interrupts */ KiVdmSetVdmEFlags(EFLAGS_INTERRUPT_MASK); - + /* Skip instruction */ TrapFrame->Eip += KiVdmGetInstructionSize(Flags); - + /* Done */ return TRUE; } @@ -364,11 +364,11 @@ KiVdmHandleOpcode(IN PKTRAP_FRAME TrapFrame, IN ULONG Flags) { ULONG Eip; - + /* Get flat EIP of the *current* instruction (not the original EIP) */ Eip = (TrapFrame->SegCs << 4) + TrapFrame->Eip; Eip += KiVdmGetInstructionSize(Flags) - 1; - + /* Read the opcode entry */ switch (*(PUCHAR)Eip) { @@ -401,11 +401,11 @@ KiVdmHandleOpcode(IN PKTRAP_FRAME TrapFrame, case 0x9D: return KiCallVdmHandler(POPF); case 0xCD: return KiCallVdmHandler(INTnn); case 0xCE: return KiCallVdmHandler(INTO); - case 0xCF: return KiCallVdmHandler(IRET); - case 0xE4: return KiCallVdmHandler(INBimm); + case 0xCF: return KiCallVdmHandler(IRET); + case 0xE4: return KiCallVdmHandler(INBimm); case 0xE5: return KiCallVdmHandler(INWimm); case 0xE6: return KiCallVdmHandler(OUTBimm); - case 0xE7: return KiCallVdmHandler(OUTWimm); + case 0xE7: return KiCallVdmHandler(OUTWimm); case 0xEC: return KiCallVdmHandler(INB); case 0xED: return KiCallVdmHandler(INW); case 0xEE: return KiCallVdmHandler(OUTB); @@ -414,7 +414,7 @@ KiVdmHandleOpcode(IN PKTRAP_FRAME TrapFrame, case 0xFA: return KiCallVdmHandler(CLI); case 0xFB: return KiCallVdmHandler(STI); default: return KiCallVdmHandler(INV); - } + } } /* PREFIX HANDLER *************************************************************/ @@ -426,7 +426,7 @@ KiVdmOpcodePrefix(IN PKTRAP_FRAME TrapFrame, { /* Increase instruction size */ Flags++; - + /* Handle the next opcode */ return KiVdmHandleOpcode(TrapFrame, Flags); } @@ -450,37 +450,30 @@ FASTCALL KiExitV86Mode(IN PKTRAP_FRAME TrapFrame) { PKV8086_STACK_FRAME StackFrame; - PKGDTENTRY GdtEntry; PKTHREAD Thread; PKTRAP_FRAME PmTrapFrame; PKV86_FRAME V86Frame; PFX_SAVE_AREA NpxFrame; - + /* Get the stack frame back */ StackFrame = CONTAINING_RECORD(TrapFrame->Esi, KV8086_STACK_FRAME, V86Frame); PmTrapFrame = &StackFrame->TrapFrame; V86Frame = &StackFrame->V86Frame; NpxFrame = &StackFrame->NpxArea; - + /* Copy the FPU frame back */ Thread = KeGetCurrentThread(); RtlCopyMemory(KiGetThreadNpxArea(Thread), NpxFrame, sizeof(FX_SAVE_AREA)); /* Set initial stack back */ Thread->InitialStack = (PVOID)((ULONG_PTR)V86Frame->ThreadStack + sizeof(FX_SAVE_AREA)); - + /* Set ESP0 back in the KTSS */ KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&PmTrapFrame->V86Es; /* Restore TEB addresses */ Thread->Teb = V86Frame->ThreadTeb; - KeGetPcr()->NtTib.Self = V86Frame->PcrTeb; - - /* Setup real TEB descriptor */ - GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; - GdtEntry->BaseLow = (USHORT)((ULONG_PTR)Thread->Teb & 0xFFFF); - GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)Thread->Teb >> 16); - GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)Thread->Teb >> 24); + KiSetTebBase(KeGetPcr(), V86Frame->ThreadTeb); /* Enable interrupts and return a pointer to the trap frame */ _enable(); @@ -492,7 +485,6 @@ FASTCALL KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) { PKTHREAD Thread; - PKGDTENTRY GdtEntry; PKTRAP_FRAME TrapFrame = &StackFrame->TrapFrame; PKV86_FRAME V86Frame = &StackFrame->V86Frame; PFX_SAVE_AREA NpxFrame = &StackFrame->NpxArea; @@ -501,26 +493,26 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) TrapFrame->SegCs = KGDT_R0_CODE | RPL_MASK; TrapFrame->SegEs = TrapFrame->SegDs = TrapFrame->SegFs = TrapFrame->SegGs = 0; TrapFrame->ErrCode = 0; - + /* Get the current thread's initial stack */ Thread = KeGetCurrentThread(); V86Frame->ThreadStack = KiGetThreadNpxArea(Thread); - + /* Save TEB addresses */ V86Frame->ThreadTeb = Thread->Teb; V86Frame->PcrTeb = KeGetPcr()->NtTib.Self; - + /* Save return EIP */ TrapFrame->Eip = (ULONG_PTR)Ki386BiosCallReturnAddress; - + /* Save our stack (after the frames) */ TrapFrame->Esi = (ULONG_PTR)V86Frame; TrapFrame->Edi = (ULONG_PTR)_AddressOfReturnAddress() + 4; - + /* Sanitize EFlags and enable interrupts */ TrapFrame->EFlags = __readeflags() & 0x60DD7; TrapFrame->EFlags |= EFLAGS_INTERRUPT_MASK; - + /* Fill out the rest of the frame */ TrapFrame->HardwareSegSs = KGDT_R3_DATA | RPL_MASK; TrapFrame->HardwareEsp = 0x11FFE; @@ -529,38 +521,32 @@ KiEnterV86Mode(IN PKV8086_STACK_FRAME StackFrame) /* Set some debug fields if trap debugging is enabled */ KiFillTrapFrameDebug(TrapFrame); - + /* Disable interrupts */ _disable(); - + /* Copy the thread's NPX frame */ RtlCopyMemory(NpxFrame, V86Frame->ThreadStack, sizeof(FX_SAVE_AREA)); - + /* Clear exception list */ KeGetPcr()->NtTib.ExceptionList = EXCEPTION_CHAIN_END; - + /* Set new ESP0 */ KeGetPcr()->TSS->Esp0 = (ULONG_PTR)&TrapFrame->V86Es; - + /* Set new initial stack */ Thread->InitialStack = V86Frame; - + /* Set VDM TEB */ Thread->Teb = (PTEB)TRAMPOLINE_TEB; - KeGetPcr()->NtTib.Self = (PVOID)TRAMPOLINE_TEB; - - /* Setup VDM TEB descriptor */ - GdtEntry = &((PKIPCR)KeGetPcr())->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)]; - GdtEntry->BaseLow = (USHORT)((ULONG_PTR)TRAMPOLINE_TEB & 0xFFFF); - GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((ULONG_PTR)TRAMPOLINE_TEB >> 16); - GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((ULONG_PTR)TRAMPOLINE_TEB >> 24); - + KiSetTebBase(KeGetPcr(), (PVOID)TRAMPOLINE_TEB); + /* Enable interrupts */ _enable(); - + /* Start VDM execution */ NtVdmControl(VdmStartExecution, NULL); - + /* Exit to V86 mode */ KiEoiHelper(TrapFrame); } @@ -585,14 +571,14 @@ Ke386SetIOPL(VOID) /* Convert to a context */ Context.ContextFlags = CONTEXT_CONTROL; KeTrapFrameToContext(TrapFrame, NULL, &Context); - + /* Set the IOPL flag */ Context.EFlags |= EFLAGS_IOPL; - + /* Convert back to a trap frame */ KeContextToTrapFrame(&Context, NULL, TrapFrame, CONTEXT_CONTROL, UserMode); } - + /* PUBLIC FUNCTIONS ***********************************************************/ /* diff --git a/ntoskrnl/ke/powerpc/ppc_irq.c b/ntoskrnl/ke/powerpc/ppc_irq.c index cbdbc77b15b..1b273ca31ae 100644 --- a/ntoskrnl/ke/powerpc/ppc_irq.c +++ b/ntoskrnl/ke/powerpc/ppc_irq.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/irq.c diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index d496345e5d8..ee330ca2f8c 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -281,6 +281,86 @@ ExpCheckPoolHeader(IN PPOOL_HEADER Entry) } } +VOID +NTAPI +ExpCheckPoolAllocation( + PVOID P, + POOL_TYPE PoolType, + ULONG Tag) +{ + PPOOL_HEADER Entry; + ULONG i; + KIRQL OldIrql; + POOL_TYPE RealPoolType; + + /* Get the pool header */ + Entry = ((PPOOL_HEADER)P) - 1; + + /* Check if this is a large allocation */ + if (PAGE_ALIGN(P) == P) + { + /* Lock the pool table */ + KeAcquireSpinLock(&ExpLargePoolTableLock, &OldIrql); + + /* Find the pool tag */ + for (i = 0; i < PoolBigPageTableSize; i++) + { + /* Check if this is our allocation */ + if (PoolBigPageTable[i].Va == P) + { + /* Make sure the tag is ok */ + if (PoolBigPageTable[i].Key != Tag) + { + KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, PoolBigPageTable[i].Key, Tag); + } + + break; + } + } + + /* Release the lock */ + KeReleaseSpinLock(&ExpLargePoolTableLock, OldIrql); + + if (i == PoolBigPageTableSize) + { + /* Did not find the allocation */ + //ASSERT(FALSE); + } + + /* Get Pool type by address */ + RealPoolType = MmDeterminePoolType(P); + } + else + { + /* Verify the tag */ + if (Entry->PoolTag != Tag) + { + DPRINT1("Allocation has wrong pool tag! Expected '%.4s', got '%.4s' (0x%08lx)\n", + &Tag, &Entry->PoolTag, Entry->PoolTag); + KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Entry->PoolTag, Tag); + } + + /* Check the rest of the header */ + ExpCheckPoolHeader(Entry); + + /* Get Pool type from entry */ + RealPoolType = (Entry->PoolType - 1); + } + + /* Should we check the pool type? */ + if (PoolType != -1) + { + /* Verify the pool type */ + if (RealPoolType != PoolType) + { + DPRINT1("Wrong pool type! Expected %s, got %s\n", + PoolType & BASE_POOL_TYPE_MASK ? "PagedPool" : "NonPagedPool", + (Entry->PoolType - 1) & BASE_POOL_TYPE_MASK ? "PagedPool" : "NonPagedPool"); + KeBugCheckEx(BAD_POOL_CALLER, 0xCC, (ULONG_PTR)P, Entry->PoolTag, Tag); + } + } +} + VOID NTAPI ExpCheckPoolBlocks(IN PVOID Block) @@ -2436,4 +2516,103 @@ ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag); } +#if DBG && KDBG + +BOOLEAN +ExpKdbgExtPool( + ULONG Argc, + PCHAR Argv[]) +{ + ULONG_PTR Address = 0, Flags = 0; + PVOID PoolPage; + PPOOL_HEADER Entry; + BOOLEAN ThisOne; + PULONG Data; + + if (Argc > 1) + { + /* Get address */ + if (!KdbpGetHexNumber(Argv[1], &Address)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + return TRUE; + } + } + + if (Argc > 2) + { + /* Get address */ + if (!KdbpGetHexNumber(Argv[1], &Flags)) + { + KdbpPrint("Invalid parameter: %s\n", Argv[0]); + return TRUE; + } + } + + /* Check if we got an address */ + if (Address != 0) + { + /* Get the base page */ + PoolPage = PAGE_ALIGN(Address); + } + else + { + KdbpPrint("Heap is unimplemented\n"); + return TRUE; + } + + /* No paging support! */ + if (!MmIsAddressValid(PoolPage)) + { + KdbpPrint("Address not accessible!\n"); + return TRUE; + } + + /* Get pool type */ + if ((Address >= (ULONG_PTR)MmPagedPoolStart) && (Address <= (ULONG_PTR)MmPagedPoolEnd)) + KdbpPrint("Allocation is from PagedPool region\n"); + else if ((Address >= (ULONG_PTR)MmNonPagedPoolStart) && (Address <= (ULONG_PTR)MmNonPagedPoolEnd)) + KdbpPrint("Allocation is from NonPagedPool region\n"); + else + { + KdbpPrint("Address 0x%p is not within any pool!\n", (PVOID)Address); + return TRUE; + } + + /* Loop all entries of that page */ + Entry = PoolPage; + do + { + /* Check if the address is within that entry */ + ThisOne = ((Address >= (ULONG_PTR)Entry) && + (Address < (ULONG_PTR)(Entry + Entry->BlockSize))); + + if (!(Flags & 1) || ThisOne) + { + /* Print the line */ + KdbpPrint("%c%p size: %4d previous size: %4d %s %.4s\n", + ThisOne ? '*' : ' ', Entry, Entry->BlockSize, Entry->PreviousSize, + (Flags & 0x80000000) ? "" : (Entry->PoolType ? "(Allocated)" : "(Free) "), + (Flags & 0x80000000) ? "" : (PCHAR)&Entry->PoolTag); + } + + if (Flags & 1) + { + Data = (PULONG)(Entry + 1); + KdbpPrint(" %p %08lx %08lx %08lx %08lx\n" + " %p %08lx %08lx %08lx %08lx\n", + &Data[0], Data[0], Data[1], Data[2], Data[3], + &Data[4], Data[4], Data[5], Data[6], Data[7]); + } + + /* Go to next entry */ + Entry = POOL_BLOCK(Entry, Entry->BlockSize); + } + while ((Entry->BlockSize != 0) && ((ULONG_PTR)Entry < (ULONG_PTR)PoolPage + PAGE_SIZE)); + + return TRUE; +} + +#endif // DBG && KDBG + /* EOF */ diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index d9c1e7102df..4a7fafabbde 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -1644,7 +1644,8 @@ MiSessionRemoveProcess(VOID) ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE); /* Remove the process from the list ,and dereference the session */ - RemoveEntryList(&CurrentProcess->SessionProcessLinks); + // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! + //RemoveEntryList(&CurrentProcess->SessionProcessLinks); //MiDereferenceSession(); } @@ -1673,7 +1674,8 @@ MiSessionAddProcess(IN PEPROCESS NewProcess) NewProcess->Session = SessionGlobal; /* Insert it into the process list */ - InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks); + // DO NOT ENABLE THIS UNLESS YOU FIXED THE NP POOL CORRUPTION THAT IT CAUSES!!! + //InsertTailList(&SessionGlobal->ProcessList, &NewProcess->SessionProcessLinks); /* Set the flag */ PspSetProcessFlag(NewProcess, PSF_PROCESS_IN_SESSION_BIT); diff --git a/ntoskrnl/mm/marea.c b/ntoskrnl/mm/marea.c index 9ecaeb91883..aae43d6f19e 100644 --- a/ntoskrnl/mm/marea.c +++ b/ntoskrnl/mm/marea.c @@ -401,7 +401,7 @@ MmInsertMemoryArea( Vad->u.VadFlags.Spare = 1; Vad->u.VadFlags.PrivateMemory = 1; Vad->u.VadFlags.Protection = MiMakeProtectionMask(marea->Protect); - + /* Insert the VAD */ MiInsertVad(Vad, Process); marea->Vad = Vad; @@ -676,6 +676,100 @@ NTAPI MiRemoveNode(IN PMMADDRESS_NODE Node, IN PMM_AVL_TABLE Table); +#if DBG + +static +VOID +MiRosCheckMemoryAreasRecursive( + PMEMORY_AREA Node) +{ + /* Check if the allocation is ok */ + ExpCheckPoolAllocation(Node, NonPagedPool, 'ERAM'); + + /* Check some fields */ + ASSERT(Node->Magic == 'erAM'); + ASSERT(PAGE_ALIGN(Node->StartingAddress) == Node->StartingAddress); + ASSERT(Node->EndingAddress != NULL); + ASSERT(PAGE_ALIGN(Node->EndingAddress) == Node->EndingAddress); + ASSERT((ULONG_PTR)Node->StartingAddress < (ULONG_PTR)Node->EndingAddress); + ASSERT((Node->Type == 0) || + (Node->Type == MEMORY_AREA_CACHE) || + // (Node->Type == MEMORY_AREA_CACHE_SEGMENT) || + (Node->Type == MEMORY_AREA_SECTION_VIEW) || + (Node->Type == MEMORY_AREA_OWNED_BY_ARM3) || + (Node->Type == (MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC))); + + /* Recursively check children */ + if (Node->LeftChild != NULL) + MiRosCheckMemoryAreasRecursive(Node->LeftChild); + if (Node->RightChild != NULL) + MiRosCheckMemoryAreasRecursive(Node->RightChild); +} + +VOID +NTAPI +MiRosCheckMemoryAreas( + PMMSUPPORT AddressSpace) +{ + PMEMORY_AREA RootNode; + PEPROCESS AddressSpaceOwner; + BOOLEAN NeedReleaseLock; + + NeedReleaseLock = FALSE; + + /* Get the address space owner */ + AddressSpaceOwner = CONTAINING_RECORD(AddressSpace, EPROCESS, Vm); + + /* Check if we already own the address space lock */ + if (AddressSpaceOwner->AddressCreationLock.Owner != KeGetCurrentThread()) + { + /* We must own it! */ + MmLockAddressSpace(AddressSpace); + NeedReleaseLock = TRUE; + } + + /* Check all memory areas */ + RootNode = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink; + MiRosCheckMemoryAreasRecursive(RootNode); + + /* Release the lock, if we acquired it */ + if (NeedReleaseLock) + { + MmUnlockAddressSpace(AddressSpace); + } +} + +extern KGUARDED_MUTEX PspActiveProcessMutex; + +VOID +NTAPI +MiCheckAllProcessMemoryAreas(VOID) +{ + PEPROCESS Process; + PLIST_ENTRY Entry; + + /* Acquire the Active Process Lock */ + KeAcquireGuardedMutex(&PspActiveProcessMutex); + + /* Loop the process list */ + Entry = PsActiveProcessHead.Flink; + while (Entry != &PsActiveProcessHead) + { + /* Get the process */ + Process = CONTAINING_RECORD(Entry, EPROCESS, ActiveProcessLinks); + + /* Check memory areas */ + MiRosCheckMemoryAreas(&Process->Vm); + + Entry = Entry->Flink; + } + + /* Release the lock */ + KeReleaseGuardedMutex(&PspActiveProcessMutex); +} + +#endif + /** * @name MmFreeMemoryArea * @@ -712,6 +806,12 @@ MmFreeMemoryArea( ULONG_PTR Address; PVOID EndAddress; + /* Make sure we own the address space lock! */ + ASSERT(CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock.Owner == KeGetCurrentThread()); + + /* Check magic */ + ASSERT(MemoryArea->Magic == 'erAM'); + if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3) { PEPROCESS CurrentProcess = PsGetCurrentProcess(); @@ -731,7 +831,7 @@ MmFreeMemoryArea( BOOLEAN Dirty = FALSE; SWAPENTRY SwapEntry = 0; PFN_NUMBER Page = 0; - + if (MmIsPageSwapEntry(Process, (PVOID)Address)) { MmDeletePageFileMapping(Process, (PVOID)Address, &SwapEntry); @@ -788,9 +888,6 @@ MmFreeMemoryArea( } } - /* There must be no page ops in progress */ - ASSERT(MemoryArea->PageOpCount == 0); - /* Remove the tree item. */ { if (MemoryArea->Parent != NULL) @@ -979,7 +1076,7 @@ MmCreateMemoryArea(PMMSUPPORT AddressSpace, MemoryArea->Protect = Protect; MemoryArea->Flags = AllocationFlags; //MemoryArea->LockCount = 0; - MemoryArea->PageOpCount = 0; + MemoryArea->Magic = 'erAM'; MemoryArea->DeleteInProgress = FALSE; MmInsertMemoryArea(AddressSpace, MemoryArea); @@ -1072,17 +1169,17 @@ MmDeleteProcessAddressSpace(PEPROCESS Process) KeBugCheck(MEMORY_MANAGEMENT); } } - + #if (_MI_PAGING_LEVELS == 2) { KIRQL OldIrql; PMMPDE pointerPde; /* Attach to Process */ KeAttachProcess(&Process->Pcb); - + /* Acquire PFN lock */ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - + for(Address = MI_LOWEST_VAD_ADDRESS; Address < MM_HIGHEST_VAD_ADDRESS; Address =(PVOID)((ULONG_PTR)Address + (PAGE_SIZE * PTE_COUNT))) @@ -1098,7 +1195,7 @@ MmDeleteProcessAddressSpace(PEPROCESS Process) } /* Release lock */ KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); - + /* Detach */ KeDetachProcess(); } diff --git a/ntoskrnl/ps/kill.c b/ntoskrnl/ps/kill.c index d864d96c08e..bea94ce9133 100644 --- a/ntoskrnl/ps/kill.c +++ b/ntoskrnl/ps/kill.c @@ -205,6 +205,52 @@ PspReapRoutine(IN PVOID Context) (PVOID)1) != (PVOID)1); } +#if DBG +VOID +NTAPI +PspCheckProcessList() +{ + PLIST_ENTRY Entry; + + KeAcquireGuardedMutex(&PspActiveProcessMutex); + DbgPrint("# checking PsActiveProcessHead @ %p\n", &PsActiveProcessHead); + for (Entry = PsActiveProcessHead.Flink; + Entry != &PsActiveProcessHead; + Entry = Entry->Flink) + { + PEPROCESS Process = CONTAINING_RECORD(Entry, EPROCESS, ActiveProcessLinks); + POBJECT_HEADER Header; + PVOID Info, HeaderLocation; + + /* Get the header and assume this is what we'll free */ + Header = OBJECT_TO_OBJECT_HEADER(Process); + HeaderLocation = Header; + + /* To find the header, walk backwards from how we allocated */ + if ((Info = OBJECT_HEADER_TO_CREATOR_INFO(Header))) + { + HeaderLocation = Info; + } + if ((Info = OBJECT_HEADER_TO_NAME_INFO(Header))) + { + HeaderLocation = Info; + } + if ((Info = OBJECT_HEADER_TO_HANDLE_INFO(Header))) + { + HeaderLocation = Info; + } + if ((Info = OBJECT_HEADER_TO_QUOTA_INFO(Header))) + { + HeaderLocation = Info; + } + + ExpCheckPoolAllocation(HeaderLocation, NonPagedPool, 'corP'); + } + + KeReleaseGuardedMutex(&PspActiveProcessMutex); +} +#endif + VOID NTAPI PspDeleteProcess(IN PVOID ObjectBody) @@ -221,6 +267,8 @@ PspDeleteProcess(IN PVOID ObjectBody) /* Remove it from the Active List */ KeAcquireGuardedMutex(&PspActiveProcessMutex); RemoveEntryList(&Process->ActiveProcessLinks); + Process->ActiveProcessLinks.Flink = NULL; + Process->ActiveProcessLinks.Blink = NULL; KeReleaseGuardedMutex(&PspActiveProcessMutex); } diff --git a/subsystems/ntvdm/ntvdm.c b/subsystems/ntvdm/ntvdm.c index 5e135b35b3c..29cf5734bd2 100644 --- a/subsystems/ntvdm/ntvdm.c +++ b/subsystems/ntvdm/ntvdm.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: subsys/ntvdm/ntvdm->c diff --git a/subsystems/ntvdm/ntvdm.rc b/subsystems/ntvdm/ntvdm.rc index 5888a623107..7a60799929e 100644 --- a/subsystems/ntvdm/ntvdm.rc +++ b/subsystems/ntvdm/ntvdm.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #include #define REACTOS_STR_FILE_DESCRIPTION "ReactOS Virtual DOS Machine\0" diff --git a/win32ss/drivers/font/ftfd/rosglue.c b/win32ss/drivers/font/ftfd/rosglue.c index 6a8c025a230..5917521ab67 100644 --- a/win32ss/drivers/font/ftfd/rosglue.c +++ b/win32ss/drivers/font/ftfd/rosglue.c @@ -1,5 +1,4 @@ -/* $Id: rosglue.c 39928 2009-03-10 02:49:45Z tkreuzer $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: FreeType implementation for ReactOS * PURPOSE: Glue functions between FreeType diff --git a/win32ss/gdi/gdi32/main/dllmain.c b/win32ss/gdi/gdi32/main/dllmain.c index 22c80c3e2ca..5b41c6b02c6 100644 --- a/win32ss/gdi/gdi32/main/dllmain.c +++ b/win32ss/gdi/gdi32/main/dllmain.c @@ -2,8 +2,8 @@ * dllmain.c * * $Revision: 1.11 $ - * $Author$ - * $Date$ + * $Author: hbelusca $ + * $Date: 2013-01-28 23:45:53 +0100 (lun. 28 janv. 2013) $ * */ diff --git a/win32ss/gdi/gdi32/misc/hacks.c b/win32ss/gdi/gdi32/misc/hacks.c index 51e46be49b9..c8ac9987164 100644 --- a/win32ss/gdi/gdi32/misc/hacks.c +++ b/win32ss/gdi/gdi32/misc/hacks.c @@ -1,12 +1,11 @@ #include "precomp.h" -/* $Id: stubs.c 28709 2007-08-31 15:09:51Z greatlrd $ - * +/* * reactos/lib/gdi32/misc/hacks.c * * GDI32.DLL hacks * - * Api that are hacked but we can not do correct implemtions yetm but using own syscall + * Apis that are hacked but we cannot write correct implementations yet but we are using our own syscall * */ diff --git a/win32ss/gdi/gdi32/misc/heap.c b/win32ss/gdi/gdi32/misc/heap.c index 83c47473d47..64b4207cfb6 100644 --- a/win32ss/gdi/gdi32/misc/heap.c +++ b/win32ss/gdi/gdi32/misc/heap.c @@ -15,7 +15,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* - * $Id: * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS GDI32 * PURPOSE: diff --git a/win32ss/gdi/gdi32/misc/historic.c b/win32ss/gdi/gdi32/misc/historic.c index c144069ecee..689aecb61f8 100644 --- a/win32ss/gdi/gdi32/misc/historic.c +++ b/win32ss/gdi/gdi32/misc/historic.c @@ -1,10 +1,9 @@ -/* $Id: stubs.c 28709 2007-08-31 15:09:51Z greatlrd $ - * +/* * reactos/lib/gdi32/misc/historic.c * * GDI32.DLL Stubs * - * Api that does basic nothing, but is here for backwords compatible with older windows + * Apis that do basically nothing, but are here for backwards compatibility with older Windows * */ diff --git a/win32ss/gdi/gdi32/objects/eng.c b/win32ss/gdi/gdi32/objects/eng.c index e13f84c3e3e..b8d3d8e8e8f 100644 --- a/win32ss/gdi/gdi32/objects/eng.c +++ b/win32ss/gdi/gdi32/objects/eng.c @@ -1,5 +1,4 @@ -/* $Id: stubs.c 28533 2007-08-24 22:44:36Z greatlrd $ - * +/* * reactos/lib/gdi32/misc/eng.c * * GDI32.DLL eng part diff --git a/win32ss/gdi/gdi32/objects/path.c b/win32ss/gdi/gdi32/objects/path.c index db08f05e8c4..50ed87fc93f 100644 --- a/win32ss/gdi/gdi32/objects/path.c +++ b/win32ss/gdi/gdi32/objects/path.c @@ -1,5 +1,4 @@ -/* $Id: stubs.c 18897 2005-12-08 23:10:33Z cwittich $ - * +/* * reactos/lib/gdi32/objects/path.c * * GDI32.DLL Path diff --git a/win32ss/reactx/dxg/dxg.rc b/win32ss/reactx/dxg/dxg.rc index 9418600f0ba..28671e2b73d 100644 --- a/win32ss/reactx/dxg/dxg.rc +++ b/win32ss/reactx/dxg/dxg.rc @@ -1,4 +1,3 @@ -/* $Id: vbemp.rc 21844 2006-05-07 19:34:23Z ion $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "DXG DirectX interface Device Driver\0" diff --git a/win32ss/reactx/dxgthk/dxgthk.rc b/win32ss/reactx/dxgthk/dxgthk.rc index 5f88c536cfa..1c3c816396c 100644 --- a/win32ss/reactx/dxgthk/dxgthk.rc +++ b/win32ss/reactx/dxgthk/dxgthk.rc @@ -1,4 +1,3 @@ -/* $Id: vbemp.rc 21844 2006-05-07 19:34:23Z ion $ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "DirectX Graphics Driver Thunk\0" diff --git a/win32ss/user/ntuser/desktop.c b/win32ss/user/ntuser/desktop.c index 82dead1f735..c0e5028f29b 100644 --- a/win32ss/user/ntuser/desktop.c +++ b/win32ss/user/ntuser/desktop.c @@ -1632,6 +1632,12 @@ NtUserSwitchDesktop(HDESK hdesk) RETURN(FALSE); } + if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId) + { + ERR("NtUserSwitchDesktop called for a desktop of a different session\n"); + RETURN(FALSE); + } + if(pdesk == gpdeskInputDesktop) { WARN("NtUserSwitchDesktop called for active desktop\n"); diff --git a/win32ss/user/ntuser/vis.h b/win32ss/user/ntuser/vis.h index 768b29dd6c0..93e27b50963 100644 --- a/win32ss/user/ntuser/vis.h +++ b/win32ss/user/ntuser/vis.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Win32k subsystem * PURPOSE: Visibility computations interface definition diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index ba3fb0e3cb0..bb68c9fc6a7 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -2218,11 +2218,15 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd) if ((Cmd == SW_HIDE) || (Cmd == SW_MINIMIZE)) { - if ( ( Wnd->spwndParent == UserGetDesktopWindow() && !ActivateOtherWindowMin(Wnd) ) || - // and Rule #1. - ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) ) + if ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() ) { - co_WinPosActivateOtherWindow(Wnd); + if ( Wnd->spwndParent == UserGetDesktopWindow()) + { + if(!ActivateOtherWindowMin(Wnd)) + co_WinPosActivateOtherWindow(Wnd); + } + else + co_WinPosActivateOtherWindow(Wnd); } /* Revert focus to parent */ diff --git a/win32ss/user/ntuser/winsta.c b/win32ss/user/ntuser/winsta.c index 5974fbc2f74..e1ce7e5131c 100644 --- a/win32ss/user/ntuser/winsta.c +++ b/win32ss/user/ntuser/winsta.c @@ -432,6 +432,7 @@ NtUserCreateWindowStation( Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable); WindowStationObject->SystemMenuTemplate = (HANDLE)0; WindowStationObject->Name = WindowStationName; + WindowStationObject->dwSessionId = NtCurrentPeb()->SessionId; if (InputWindowStation == NULL) { diff --git a/win32ss/user/ntuser/winsta.h b/win32ss/user/ntuser/winsta.h index 01d22d28482..443ac9651cb 100644 --- a/win32ss/user/ntuser/winsta.h +++ b/win32ss/user/ntuser/winsta.h @@ -9,6 +9,8 @@ typedef struct _WINSTATION_OBJECT { + DWORD dwSessionId; + KSPIN_LOCK Lock; UNICODE_STRING Name; LIST_ENTRY DesktopListHead; diff --git a/win32ss/user/user32/include/regcontrol.h b/win32ss/user/user32/include/regcontrol.h index 0527532c449..91a9892520c 100644 --- a/win32ss/user/user32/include/regcontrol.h +++ b/win32ss/user/user32/include/regcontrol.h @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS User32 * PURPOSE: Built-in control registration diff --git a/win32ss/user/user32/misc/desktop.c b/win32ss/user/user32/misc/desktop.c index 27ba3ed7561..da21a5efd3e 100644 --- a/win32ss/user/user32/misc/desktop.c +++ b/win32ss/user/user32/misc/desktop.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll * FILE: lib/user32/misc/desktop.c diff --git a/win32ss/user/user32/misc/object.c b/win32ss/user/user32/misc/object.c index a40eef27c83..d85e6768d45 100644 --- a/win32ss/user/user32/misc/object.c +++ b/win32ss/user/user32/misc/object.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/misc/dde.c * PURPOSE: DDE diff --git a/win32ss/user/user32/misc/timer.c b/win32ss/user/user32/misc/timer.c index 42c64d56dad..a3303c146c8 100644 --- a/win32ss/user/user32/misc/timer.c +++ b/win32ss/user/user32/misc/timer.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/misc/dde.c * PURPOSE: DDE diff --git a/win32ss/user/user32/misc/winsta.c b/win32ss/user/user32/misc/winsta.c index b38732ddf07..ad7768d921a 100644 --- a/win32ss/user/user32/misc/winsta.c +++ b/win32ss/user/user32/misc/winsta.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll * FILE: lib/user32/misc/winsta.c diff --git a/win32ss/user/user32/windows/accel.c b/win32ss/user/user32/windows/accel.c index dde48b497fb..40db647e99a 100644 --- a/win32ss/user/user32/windows/accel.c +++ b/win32ss/user/user32/windows/accel.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c * PURPOSE: Accelerator tables diff --git a/win32ss/user/user32/windows/caret.c b/win32ss/user/user32/windows/caret.c index 2befd871142..6b3b16cfc58 100644 --- a/win32ss/user/user32/windows/caret.c +++ b/win32ss/user/user32/windows/caret.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/caret.c * PURPOSE: Caret diff --git a/win32ss/user/user32/windows/clipboard.c b/win32ss/user/user32/windows/clipboard.c index 01d4bafbd1a..fe321a8f5ee 100644 --- a/win32ss/user/user32/windows/clipboard.c +++ b/win32ss/user/user32/windows/clipboard.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/clipboard.c * PURPOSE: Input diff --git a/win32ss/user/user32/windows/dc.c b/win32ss/user/user32/windows/dc.c index 8815c9b9566..6ade68f2984 100644 --- a/win32ss/user/user32/windows/dc.c +++ b/win32ss/user/user32/windows/dc.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c * PURPOSE: Input diff --git a/win32ss/user/user32/windows/font.c b/win32ss/user/user32/windows/font.c index 468718c2b1e..a6f00eb8b10 100644 --- a/win32ss/user/user32/windows/font.c +++ b/win32ss/user/user32/windows/font.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c * PURPOSE: Input diff --git a/win32ss/user/user32/windows/rect.c b/win32ss/user/user32/windows/rect.c index f52ef8ad06a..451407c3eb6 100644 --- a/win32ss/user/user32/windows/rect.c +++ b/win32ss/user/user32/windows/rect.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c * PURPOSE: Input diff --git a/win32ss/user/user32/windows/text.c b/win32ss/user/user32/windows/text.c index b8c32f9ad87..a6770b42cc6 100644 --- a/win32ss/user/user32/windows/text.c +++ b/win32ss/user/user32/windows/text.c @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c * PURPOSE: Input diff --git a/win32ss/user/winsrv/lang/es-ES.rc b/win32ss/user/winsrv/lang/es-ES.rc index 847b3d338cf..c98ebe74133 100644 --- a/win32ss/user/winsrv/lang/es-ES.rc +++ b/win32ss/user/winsrv/lang/es-ES.rc @@ -1,5 +1,5 @@ /* - *Spanish Language resource file + * Spanish Language resource file * Traducido por: Javier Remacha 2008-26-01 */ diff --git a/win32ss/user/winsrv/shutdown.c b/win32ss/user/winsrv/shutdown.c index 24c9c24a8d8..0c9d8c81bff 100644 --- a/win32ss/user/winsrv/shutdown.c +++ b/win32ss/user/winsrv/shutdown.c @@ -34,6 +34,7 @@ typedef struct tagNOTIFY_CONTEXT WPARAM wParam; LPARAM lParam; HDESK Desktop; + HDESK OldDesktop; DWORD StartTime; DWORD QueryResult; HWND Dlg; @@ -398,8 +399,13 @@ NotifyDesktopEnum(LPWSTR DesktopName, LPARAM lParam) return FALSE; } + Context->OldDesktop = GetThreadDesktop(GetCurrentThreadId()); + SwitchDesktop(Context->Desktop); + EnumDesktopWindows(Context->Desktop, NotifyTopLevelEnum, lParam); + SwitchDesktop(Context->OldDesktop); + CloseDesktop(Context->Desktop); return QUERY_RESULT_CONTINUE == Context->QueryResult; diff --git a/win32ss/win32k.rc b/win32ss/win32k.rc index 351f18ada2e..476b8d28dcc 100644 --- a/win32ss/win32k.rc +++ b/win32ss/win32k.rc @@ -1,4 +1,3 @@ -/* $Id$ */ #define REACTOS_VERSION_DLL #define REACTOS_STR_FILE_DESCRIPTION "W32 GDI KM subsystem\0"