From b868fbf04a0aa94f9fd71851fbad3ba48796dd61 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 17 Nov 2014 16:33:45 +0000 Subject: [PATCH 01/50] [RAPPS] * Licence => License. CORE-8804 #resolve #comment Committed in r65428. Thanks! svn path=/trunk/; revision=65428 --- reactos/base/applications/rapps/README.ENG | 2 +- reactos/base/applications/rapps/README.RUS | 2 +- reactos/base/applications/rapps/available.c | 4 +-- reactos/base/applications/rapps/lang/bg-BG.rc | 2 +- reactos/base/applications/rapps/lang/cs-CZ.rc | 2 +- reactos/base/applications/rapps/lang/de-DE.rc | 2 +- reactos/base/applications/rapps/lang/en-US.rc | 2 +- reactos/base/applications/rapps/lang/es-ES.rc | 2 +- reactos/base/applications/rapps/lang/fr-FR.rc | 2 +- reactos/base/applications/rapps/lang/he-IL.rc | 2 +- reactos/base/applications/rapps/lang/it-IT.rc | 2 +- reactos/base/applications/rapps/lang/ja-JP.rc | 2 +- reactos/base/applications/rapps/lang/no-NO.rc | 2 +- reactos/base/applications/rapps/lang/pl-PL.rc | 2 +- reactos/base/applications/rapps/lang/pt-BR.rc | 2 +- reactos/base/applications/rapps/lang/ro-RO.rc | 2 +- reactos/base/applications/rapps/lang/ru-RU.rc | 2 +- reactos/base/applications/rapps/lang/sk-SK.rc | 2 +- reactos/base/applications/rapps/lang/sq-AL.rc | 2 +- reactos/base/applications/rapps/lang/sv-SE.rc | 2 +- reactos/base/applications/rapps/lang/tr-TR.rc | 2 +- reactos/base/applications/rapps/lang/uk-UA.rc | 2 +- reactos/base/applications/rapps/lang/zh-CN.rc | 2 +- reactos/base/applications/rapps/lang/zh-TW.rc | 2 +- reactos/base/applications/rapps/rapps.h | 2 +- .../base/applications/rapps/rapps/7zip.txt | 2 +- .../base/applications/rapps/rapps/abiword.txt | 2 +- .../applications/rapps/rapps/abiword26.txt | 2 +- .../base/applications/rapps/rapps/abyss.txt | 6 ++--- .../rapps/rapps/ac97forvirtualbox.txt | 26 +++++++++---------- .../applications/rapps/rapps/audiograbber.txt | 6 ++--- .../applications/rapps/rapps/bittorrent.txt | 10 +++---- .../base/applications/rapps/rapps/bochs.txt | 4 +-- .../base/applications/rapps/rapps/boswars.txt | 2 +- .../applications/rapps/rapps/boundaround.txt | 6 ++--- .../rapps/rapps/christmasbound.txt | 6 ++--- .../applications/rapps/rapps/chromium.txt | 2 +- reactos/base/applications/rapps/rapps/cnt.txt | 8 +++--- .../applications/rapps/rapps/codeblocks.txt | 4 +-- .../rapps/rapps/codeblocks_gcc.txt | 4 +-- .../rapps/rapps/codeblocks_gcc_2.txt | 4 +-- .../applications/rapps/rapps/comctl32ocx.txt | 22 ++++++++-------- .../rapps/rapps/devcpp_tdm_gcc_x64.txt | 4 +-- .../base/applications/rapps/rapps/diablo2.txt | 6 ++--- .../applications/rapps/rapps/dosblaster.txt | 2 +- .../base/applications/rapps/rapps/dosbox.txt | 2 +- .../rapps/rapps/doublecommander.txt | 2 +- .../base/applications/rapps/rapps/dplus.txt | 4 +-- .../applications/rapps/rapps/dvdwritenow.txt | 6 ++--- .../applications/rapps/rapps/excelview.txt | 22 ++++++++-------- reactos/base/applications/rapps/rapps/fap.txt | 2 +- .../base/applications/rapps/rapps/fira.txt | 12 ++++----- .../base/applications/rapps/rapps/firefox.txt | 2 +- .../applications/rapps/rapps/firefox2.txt | 2 +- .../applications/rapps/rapps/firefox3.txt | 2 +- .../applications/rapps/rapps/firefox36.txt | 2 +- .../base/applications/rapps/rapps/foxit.txt | 4 +-- .../applications/rapps/rapps/freebasic.txt | 2 +- .../applications/rapps/rapps/ghostscript.txt | 2 +- .../applications/rapps/rapps/ghostview.txt | 6 ++--- .../rapps/rapps/glidewrapzbag.txt | 6 ++--- .../applications/rapps/rapps/globulation2.txt | 2 +- .../base/applications/rapps/rapps/hover.txt | 2 +- reactos/base/applications/rapps/rapps/hxd.txt | 6 ++--- .../applications/rapps/rapps/indiftpd.txt | 2 +- .../applications/rapps/rapps/inkscape.txt | 2 +- .../applications/rapps/rapps/irfanview.txt | 22 ++++++++-------- .../rapps/rapps/irfanviewplugins.txt | 22 ++++++++-------- .../base/applications/rapps/rapps/kdewin.txt | 2 +- .../base/applications/rapps/rapps/kyodai.txt | 6 ++--- .../applications/rapps/rapps/lazaruside.txt | 6 ++--- .../applications/rapps/rapps/lbreakout2.txt | 2 +- .../applications/rapps/rapps/lgeneral.txt | 2 +- .../applications/rapps/rapps/librecad.txt | 4 +-- .../applications/rapps/rapps/libreoffice.txt | 2 +- .../rapps/rapps/libreofficehelp.txt | 4 +-- .../applications/rapps/rapps/lmarbles.txt | 2 +- .../base/applications/rapps/rapps/mcwin32.txt | 8 +++--- .../base/applications/rapps/rapps/mfc40.txt | 22 ++++++++-------- .../base/applications/rapps/rapps/miktex.txt | 6 ++--- .../applications/rapps/rapps/mirandaim.txt | 2 +- .../base/applications/rapps/rapps/mirc.txt | 6 ++--- .../base/applications/rapps/rapps/mirc6.txt | 6 ++--- .../base/applications/rapps/rapps/mono2.txt | 6 ++--- reactos/base/applications/rapps/rapps/mpc.txt | 2 +- .../base/applications/rapps/rapps/mpxplay.txt | 2 +- .../base/applications/rapps/rapps/msxml3.txt | 22 ++++++++-------- .../base/applications/rapps/rapps/net11.txt | 6 ++--- .../base/applications/rapps/rapps/net20.txt | 6 ++--- .../applications/rapps/rapps/net20sp2.txt | 6 ++--- .../applications/rapps/rapps/nirlauncher.txt | 4 +-- reactos/base/applications/rapps/rapps/npp.txt | 2 +- .../applications/rapps/rapps/offbyone.txt | 6 ++--- .../applications/rapps/rapps/openoffice.txt | 2 +- .../rapps/rapps/openoffice2.4.txt | 2 +- .../base/applications/rapps/rapps/openttd.txt | 4 +-- .../base/applications/rapps/rapps/opera.txt | 6 ++--- .../base/applications/rapps/rapps/opera9.txt | 6 ++--- .../base/applications/rapps/rapps/peazip.txt | 4 +-- .../applications/rapps/rapps/pengupop.txt | 2 +- .../applications/rapps/rapps/photofiltre.txt | 6 ++--- .../base/applications/rapps/rapps/pingus.txt | 2 +- .../base/applications/rapps/rapps/pptview.txt | 22 ++++++++-------- .../applications/rapps/rapps/precisecalc.txt | 4 +-- .../base/applications/rapps/rapps/pspad.txt | 6 ++--- .../base/applications/rapps/rapps/ptanks.txt | 6 ++--- .../base/applications/rapps/rapps/putty.txt | 2 +- .../base/applications/rapps/rapps/python.txt | 2 +- .../base/applications/rapps/rapps/python2.txt | 2 +- .../base/applications/rapps/rapps/qb64sdl.txt | 6 ++--- .../base/applications/rapps/rapps/qmmp.txt | 2 +- .../base/applications/rapps/rapps/remood.txt | 2 +- .../base/applications/rapps/rapps/reshack.txt | 6 ++--- .../base/applications/rapps/rapps/rocks.txt | 4 +-- .../base/applications/rapps/rapps/rosbe.txt | 2 +- .../applications/rapps/rapps/rosbeamd64.txt | 2 +- .../applications/rapps/rapps/rosbearm.txt | 2 +- .../applications/rapps/rapps/sambatng.txt | 2 +- .../applications/rapps/rapps/sbforvmware.txt | 26 +++++++++---------- .../base/applications/rapps/rapps/scite.txt | 6 ++--- .../base/applications/rapps/rapps/scummvm.txt | 2 +- .../applications/rapps/rapps/sdl_mixer.txt | 2 +- .../applications/rapps/rapps/sdl_runtime.txt | 2 +- .../applications/rapps/rapps/seamonkey.txt | 2 +- .../applications/rapps/rapps/smplayer.txt | 2 +- .../base/applications/rapps/rapps/snoopy.txt | 6 ++--- .../base/applications/rapps/rapps/steam.txt | 6 ++--- .../applications/rapps/rapps/sumatrapdf.txt | 4 +-- .../applications/rapps/rapps/summerbound.txt | 6 ++--- .../applications/rapps/rapps/superdxb.txt | 6 ++--- .../applications/rapps/rapps/superfinder.txt | 6 ++--- .../applications/rapps/rapps/supertux.txt | 2 +- .../base/applications/rapps/rapps/tahoma.txt | 18 ++++++------- .../applications/rapps/rapps/thunderbird.txt | 2 +- .../applications/rapps/rapps/thunderbird3.txt | 2 +- .../applications/rapps/rapps/tileworld.txt | 2 +- .../rapps/rapps/totalcommander.txt | 6 ++--- .../applications/rapps/rapps/tuxpaint.txt | 2 +- .../applications/rapps/rapps/ultravnc.txt | 2 +- .../applications/rapps/rapps/utorrent.txt | 26 +++++++++---------- .../base/applications/rapps/rapps/vb5run.txt | 22 ++++++++-------- .../base/applications/rapps/rapps/vb6run.txt | 22 ++++++++-------- .../applications/rapps/rapps/vc2005sp1run.txt | 22 ++++++++-------- .../applications/rapps/rapps/vc2008sp1run.txt | 22 ++++++++-------- .../applications/rapps/rapps/vc2010run.txt | 22 ++++++++-------- .../base/applications/rapps/rapps/vc6run.txt | 22 ++++++++-------- reactos/base/applications/rapps/rapps/vlc.txt | 2 +- .../applications/rapps/rapps/winboard.txt | 4 +-- .../base/applications/rapps/rapps/wme9.txt | 18 ++++++------- .../applications/rapps/rapps/wordview.txt | 22 ++++++++-------- reactos/base/applications/rapps/rapps/zaz.txt | 2 +- reactos/base/applications/rapps/resource.h | 2 +- 152 files changed, 442 insertions(+), 442 deletions(-) diff --git a/reactos/base/applications/rapps/README.ENG b/reactos/base/applications/rapps/README.ENG index 754754b2c10..f4b87132000 100644 --- a/reactos/base/applications/rapps/README.ENG +++ b/reactos/base/applications/rapps/README.ENG @@ -14,7 +14,7 @@ The File Overview: Name = program name RegName = Name in registry Version = 1.1.1 -Licence = GPL +License = GPL Description = Description Size = 10 mb Category = 5 diff --git a/reactos/base/applications/rapps/README.RUS b/reactos/base/applications/rapps/README.RUS index 0974ef6dffa..e81dabdb766 100644 --- a/reactos/base/applications/rapps/README.RUS +++ b/reactos/base/applications/rapps/README.RUS @@ -15,7 +15,7 @@ For more information for RAPPS, see: https://www.reactos.org/wiki/RAPPS Name = ; RegName = ; , Version = 1.1.1 ; -Licence = ; +License = ; Description = ; Size = ; Category = 5 ; diff --git a/reactos/base/applications/rapps/available.c b/reactos/base/applications/rapps/available.c index 22ba9c608f3..e7ca27081f0 100644 --- a/reactos/base/applications/rapps/available.c +++ b/reactos/base/applications/rapps/available.c @@ -29,7 +29,7 @@ ShowAvailableAppInfo(INT Index) } \ ADD_TEXT(IDS_AINFO_VERSION, Info->szVersion, CFE_BOLD, 0); - ADD_TEXT(IDS_AINFO_LICENCE, Info->szLicence, CFE_BOLD, 0); + ADD_TEXT(IDS_AINFO_LICENSE, Info->szLicense, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_SIZE, Info->szSize, CFE_BOLD, 0); ADD_TEXT(IDS_AINFO_URLSITE, Info->szUrlSite, CFE_BOLD, CFE_LINK); ADD_TEXT(IDS_AINFO_DESCRIPTION, Info->szDesc, CFE_BOLD, 0); @@ -217,7 +217,7 @@ EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc) GET_STRING2(L"RegName", Info.szRegName); GET_STRING2(L"Version", Info.szVersion); - GET_STRING2(L"Licence", Info.szLicence); + GET_STRING2(L"License", Info.szLicense); GET_STRING2(L"Description", Info.szDesc); GET_STRING2(L"Size", Info.szSize); GET_STRING2(L"URLSite", Info.szUrlSite); diff --git a/reactos/base/applications/rapps/lang/bg-BG.rc b/reactos/base/applications/rapps/lang/bg-BG.rc index 647756a7379..5eac70d6aa0 100644 --- a/reactos/base/applications/rapps/lang/bg-BG.rc +++ b/reactos/base/applications/rapps/lang/bg-BG.rc @@ -151,7 +151,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nОписание: " IDS_AINFO_SIZE "\nРазмер: " IDS_AINFO_URLSITE "\nДомашна страница: " - IDS_AINFO_LICENCE "\nРазрешително: " + IDS_AINFO_LICENSE "\nРазрешително: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/cs-CZ.rc b/reactos/base/applications/rapps/lang/cs-CZ.rc index 3f037363368..168098b70c0 100644 --- a/reactos/base/applications/rapps/lang/cs-CZ.rc +++ b/reactos/base/applications/rapps/lang/cs-CZ.rc @@ -152,7 +152,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nPopis: " IDS_AINFO_SIZE "\nVelikost: " IDS_AINFO_URLSITE "\nDomovská stránka: " - IDS_AINFO_LICENCE "\nLicence: " + IDS_AINFO_LICENSE "\nLicense: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/de-DE.rc b/reactos/base/applications/rapps/lang/de-DE.rc index f32a3762b78..68c0f7a0529 100644 --- a/reactos/base/applications/rapps/lang/de-DE.rc +++ b/reactos/base/applications/rapps/lang/de-DE.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nBeschreibung: " IDS_AINFO_SIZE "\nGröße: " IDS_AINFO_URLSITE "\nHomepage: " - IDS_AINFO_LICENCE "\nLizenz: " + IDS_AINFO_LICENSE "\nLizenz: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/en-US.rc b/reactos/base/applications/rapps/lang/en-US.rc index 3333836ed8c..53daebbd5c4 100644 --- a/reactos/base/applications/rapps/lang/en-US.rc +++ b/reactos/base/applications/rapps/lang/en-US.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescription: " IDS_AINFO_SIZE "\nSize: " IDS_AINFO_URLSITE "\nHome Page: " - IDS_AINFO_LICENCE "\nLicense: " + IDS_AINFO_LICENSE "\nLicense: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/es-ES.rc b/reactos/base/applications/rapps/lang/es-ES.rc index 622fef74e3e..9e685dca37c 100644 --- a/reactos/base/applications/rapps/lang/es-ES.rc +++ b/reactos/base/applications/rapps/lang/es-ES.rc @@ -150,7 +150,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescripción: " IDS_AINFO_SIZE "\nTamaño: " IDS_AINFO_URLSITE "\nPágina Web: " - IDS_AINFO_LICENCE "\nLicencia: " + IDS_AINFO_LICENSE "\nLicencia: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/fr-FR.rc b/reactos/base/applications/rapps/lang/fr-FR.rc index b57643333e3..397e4338af5 100644 --- a/reactos/base/applications/rapps/lang/fr-FR.rc +++ b/reactos/base/applications/rapps/lang/fr-FR.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescription: " IDS_AINFO_SIZE "\nTaille : " IDS_AINFO_URLSITE "\nSite internet : " - IDS_AINFO_LICENCE "\nLicence: " + IDS_AINFO_LICENSE "\nLicense: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/he-IL.rc b/reactos/base/applications/rapps/lang/he-IL.rc index d53d833f77e..d528b8551d8 100644 --- a/reactos/base/applications/rapps/lang/he-IL.rc +++ b/reactos/base/applications/rapps/lang/he-IL.rc @@ -149,7 +149,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nתיאור: " IDS_AINFO_SIZE "\nגודל: " IDS_AINFO_URLSITE "\nדף בית: " - IDS_AINFO_LICENCE "\nרישיון: " + IDS_AINFO_LICENSE "\nרישיון: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/it-IT.rc b/reactos/base/applications/rapps/lang/it-IT.rc index 595b35ea7c9..6d000486fa3 100644 --- a/reactos/base/applications/rapps/lang/it-IT.rc +++ b/reactos/base/applications/rapps/lang/it-IT.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescrizione: " IDS_AINFO_SIZE "\nDimensione: " IDS_AINFO_URLSITE "\nHome Page: " - IDS_AINFO_LICENCE "\nLicenza: " + IDS_AINFO_LICENSE "\nLicenza: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/ja-JP.rc b/reactos/base/applications/rapps/lang/ja-JP.rc index a49e4b91bc4..b63c6207eb4 100644 --- a/reactos/base/applications/rapps/lang/ja-JP.rc +++ b/reactos/base/applications/rapps/lang/ja-JP.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\n概要: " IDS_AINFO_SIZE "\nサイズ: " IDS_AINFO_URLSITE "\nホームページ: " - IDS_AINFO_LICENCE "\nライセンス: " + IDS_AINFO_LICENSE "\nライセンス: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/no-NO.rc b/reactos/base/applications/rapps/lang/no-NO.rc index f93acbee9fc..25bd694472e 100644 --- a/reactos/base/applications/rapps/lang/no-NO.rc +++ b/reactos/base/applications/rapps/lang/no-NO.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nBeskrivelse: " IDS_AINFO_SIZE "\nStørrelse: " IDS_AINFO_URLSITE "\nHjemmeside: " - IDS_AINFO_LICENCE "\nLisens: " + IDS_AINFO_LICENSE "\nLisens: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/pl-PL.rc b/reactos/base/applications/rapps/lang/pl-PL.rc index 7b1bca716f9..97d032e569d 100644 --- a/reactos/base/applications/rapps/lang/pl-PL.rc +++ b/reactos/base/applications/rapps/lang/pl-PL.rc @@ -155,7 +155,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nOpis: " IDS_AINFO_SIZE "\nRozmiar: " IDS_AINFO_URLSITE "\nStrona: " - IDS_AINFO_LICENCE "\nLicencja: " + IDS_AINFO_LICENSE "\nLicencja: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/pt-BR.rc b/reactos/base/applications/rapps/lang/pt-BR.rc index 1ff56b713bf..21f6d1f5a19 100644 --- a/reactos/base/applications/rapps/lang/pt-BR.rc +++ b/reactos/base/applications/rapps/lang/pt-BR.rc @@ -149,7 +149,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescrição: " IDS_AINFO_SIZE "\nTamanho: " IDS_AINFO_URLSITE "\nPágina: " - IDS_AINFO_LICENCE "\nLicença: " + IDS_AINFO_LICENSE "\nLicença: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/ro-RO.rc b/reactos/base/applications/rapps/lang/ro-RO.rc index cec10d4d637..66327701486 100644 --- a/reactos/base/applications/rapps/lang/ro-RO.rc +++ b/reactos/base/applications/rapps/lang/ro-RO.rc @@ -153,7 +153,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nDescriere: " IDS_AINFO_SIZE "\nDimensiune: " IDS_AINFO_URLSITE "\nPagină web: " - IDS_AINFO_LICENCE "\nLicență: " + IDS_AINFO_LICENSE "\nLicență: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/ru-RU.rc b/reactos/base/applications/rapps/lang/ru-RU.rc index afd0cb3500b..4275a76d314 100644 --- a/reactos/base/applications/rapps/lang/ru-RU.rc +++ b/reactos/base/applications/rapps/lang/ru-RU.rc @@ -147,7 +147,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nОписание: " IDS_AINFO_SIZE "\nРазмер: " IDS_AINFO_URLSITE "\nДомашняя страница: " - IDS_AINFO_LICENCE "\nЛицензия: " + IDS_AINFO_LICENSE "\nЛицензия: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/sk-SK.rc b/reactos/base/applications/rapps/lang/sk-SK.rc index cc6e16d1355..1ee9dc620e7 100644 --- a/reactos/base/applications/rapps/lang/sk-SK.rc +++ b/reactos/base/applications/rapps/lang/sk-SK.rc @@ -152,7 +152,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nPopis: " IDS_AINFO_SIZE "\nVeľkosť: " IDS_AINFO_URLSITE "\nDomovská stránka: " - IDS_AINFO_LICENCE "\nLicencia: " + IDS_AINFO_LICENSE "\nLicencia: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/sq-AL.rc b/reactos/base/applications/rapps/lang/sq-AL.rc index 9c0e6d7d76f..814512e9bab 100644 --- a/reactos/base/applications/rapps/lang/sq-AL.rc +++ b/reactos/base/applications/rapps/lang/sq-AL.rc @@ -151,7 +151,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nPershkrimi: " IDS_AINFO_SIZE "\nMasa: " IDS_AINFO_URLSITE "\nHome Page: " - IDS_AINFO_LICENCE "\nLicenca: " + IDS_AINFO_LICENSE "\nLicenca: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/sv-SE.rc b/reactos/base/applications/rapps/lang/sv-SE.rc index 34054adfadd..18e0c5e913d 100644 --- a/reactos/base/applications/rapps/lang/sv-SE.rc +++ b/reactos/base/applications/rapps/lang/sv-SE.rc @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nBeskrivning: " IDS_AINFO_SIZE "\nStorlek: " IDS_AINFO_URLSITE "\nHemsida: " - IDS_AINFO_LICENCE "\nLicens: " + IDS_AINFO_LICENSE "\nLicens: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/tr-TR.rc b/reactos/base/applications/rapps/lang/tr-TR.rc index b9f4051e519..01c8ce8173a 100644 --- a/reactos/base/applications/rapps/lang/tr-TR.rc +++ b/reactos/base/applications/rapps/lang/tr-TR.rc @@ -149,7 +149,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nAçıklaması: " IDS_AINFO_SIZE "\nBüyüklüğü: " IDS_AINFO_URLSITE "\nAna Sayfası: " - IDS_AINFO_LICENCE "\nRuhsatı: " + IDS_AINFO_LICENSE "\nRuhsatı: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/uk-UA.rc b/reactos/base/applications/rapps/lang/uk-UA.rc index b42b37d3fe2..8c88bcc735f 100644 --- a/reactos/base/applications/rapps/lang/uk-UA.rc +++ b/reactos/base/applications/rapps/lang/uk-UA.rc @@ -155,7 +155,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\nОпис: " IDS_AINFO_SIZE "\nРозмір: " IDS_AINFO_URLSITE "\nДомашня сторінка: " - IDS_AINFO_LICENCE "\nЛіцензія: " + IDS_AINFO_LICENSE "\nЛіцензія: " END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/zh-CN.rc b/reactos/base/applications/rapps/lang/zh-CN.rc index 87f514c39a9..c62fdd26f28 100644 --- a/reactos/base/applications/rapps/lang/zh-CN.rc +++ b/reactos/base/applications/rapps/lang/zh-CN.rc @@ -149,7 +149,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\n描述:" IDS_AINFO_SIZE "\n大小:" IDS_AINFO_URLSITE "\n主页:" - IDS_AINFO_LICENCE "\n协议:" + IDS_AINFO_LICENSE "\n协议:" END STRINGTABLE diff --git a/reactos/base/applications/rapps/lang/zh-TW.rc b/reactos/base/applications/rapps/lang/zh-TW.rc index d2f16da7b76..36494401db2 100644 --- a/reactos/base/applications/rapps/lang/zh-TW.rc +++ b/reactos/base/applications/rapps/lang/zh-TW.rc @@ -149,7 +149,7 @@ BEGIN IDS_AINFO_DESCRIPTION "\n描述:" IDS_AINFO_SIZE "\n大小:" IDS_AINFO_URLSITE "\n主頁:" - IDS_AINFO_LICENCE "\n協議:" + IDS_AINFO_LICENSE "\n協議:" END STRINGTABLE diff --git a/reactos/base/applications/rapps/rapps.h b/reactos/base/applications/rapps/rapps.h index 853d991eb30..a710f2c118a 100644 --- a/reactos/base/applications/rapps/rapps.h +++ b/reactos/base/applications/rapps/rapps.h @@ -73,7 +73,7 @@ typedef struct WCHAR szName[MAX_PATH]; WCHAR szRegName[MAX_PATH]; WCHAR szVersion[MAX_PATH]; - WCHAR szLicence[MAX_PATH]; + WCHAR szLicense[MAX_PATH]; WCHAR szDesc[MAX_PATH]; WCHAR szSize[MAX_PATH]; WCHAR szUrlSite[MAX_PATH]; diff --git a/reactos/base/applications/rapps/rapps/7zip.txt b/reactos/base/applications/rapps/rapps/7zip.txt index 9c630485ca6..8ee49b47036 100644 --- a/reactos/base/applications/rapps/rapps/7zip.txt +++ b/reactos/base/applications/rapps/rapps/7zip.txt @@ -4,7 +4,7 @@ [Section] Name = 7-Zip Version = 9.34a -Licence = LGPL +License = LGPL Description = A file archiving utility with support for 7zip, zip, tar, rar and many other archive formats. Size = 1.14 MB Category = 12 diff --git a/reactos/base/applications/rapps/rapps/abiword.txt b/reactos/base/applications/rapps/rapps/abiword.txt index c15f48bb4f1..434344b5381 100644 --- a/reactos/base/applications/rapps/rapps/abiword.txt +++ b/reactos/base/applications/rapps/rapps/abiword.txt @@ -4,7 +4,7 @@ [Section] Name = AbiWord Version = 2.9.4 -Licence = GPL +License = GPL Description = Word processor. Size = 9.4 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/abiword26.txt b/reactos/base/applications/rapps/rapps/abiword26.txt index a2d9635fb2a..6f94c3210ce 100644 --- a/reactos/base/applications/rapps/rapps/abiword26.txt +++ b/reactos/base/applications/rapps/rapps/abiword26.txt @@ -4,7 +4,7 @@ [Section] Name = AbiWord Version = 2.6.8 -Licence = GPL +License = GPL Description = Word processor. Size = 5.64 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/abyss.txt b/reactos/base/applications/rapps/rapps/abyss.txt index 6322dab3a62..3e7b296f2c9 100644 --- a/reactos/base/applications/rapps/rapps/abyss.txt +++ b/reactos/base/applications/rapps/rapps/abyss.txt @@ -4,7 +4,7 @@ [Section] Name = Abyss Web server X1 Version = 2.9.3.5 -Licence = Freeware +License = Freeware Description = Abyss Web Server enables you to host your Web sites on your computer. It supports secure SSL/TLS connections (HTTPS) as well as a wide range of Web technologies. It can also run advanced PHP, Perl, Python, ASP, ASP.NET, and Ruby on Rails Web applications, which can be backed by databases such as MySQL, SQLite, MS SQL Server, MS Access, or Oracle. Size = 2.06 MB Category = 5 @@ -34,13 +34,13 @@ Może także uruchamiać zaawansowane aplikacje internetowe takie jak PHP, Perl, Mogą one zostać oparte o MySQL, SQLite, MS SQL Server, MS Access, lub Oracle. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Abyss Web Server vă permite găzduirea de pagini Web pe calculatorul dumneavoastră. Oferă conexiuni securizate SSL/TLS (HTTPS) și multe alte tehnologii Web. Poate executa aplicații Web avansate ]n PHP, Perl, Python, ASP, ASP.NET și Ruby on Rails, ce pot fi susținute de baze de date ca MySQL, SQLite, MS SQL Server, MS Access, sau Oracle. Size = 2,06 Mo [Section.041f] Name = Abyss Umûmî Ağ Sunucusu X1 -Licence = Ücretsiz +License = Ücretsiz Description = Abyss Umûmî Ağ Sunucusu, bilgisayarınızda Umûmî Ağ sitelerinizin barındırılmasına olanak sağlar. Umûmî Ağ uygulayım biliminin bir geniş yelpâzesiyle birlikte güvenli SSL/TLS bağlantılarını (HTTPS) destekler. Ayrıca MySQL, SQLite, MS SQL Server, MS Access, ve Oracle gibi veri tabanlarıyla desteklenebilen gelişmiş PHP, Perl, Python, ASP, ASP.NET ve Rails üzerinde Ruby Umûmî Ağ uygulamalarını çalıştırabilir. Size = 2,06 MB diff --git a/reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt b/reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt index dd4b00e476f..6c96dcb0d84 100644 --- a/reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt +++ b/reactos/base/applications/rapps/rapps/ac97forvirtualbox.txt @@ -4,7 +4,7 @@ [Section] Name = AC97 Driver for VirtualBox Version = 5.10.00.3610 -Licence = Unknown +License = Unknown Description = Unzip in the ReactOS's folder then restart ReactOS twice. Size = 185.5 kB Category = 13 @@ -13,12 +13,12 @@ CDPath = none [Section.0405] Name = Ovladač AC97 pro VirtualBox -Licence = Neznámá +License = Neznámá Description = Rozbalte do složky "ReactOS" a pak ReactOS dvakrát restartujte. [Section.0407] Name = AC97 Treiber für VirtualBox -Licence = Unbekannt +License = Unbekannt Description = Entpacken in das "ReactOS"-Verzeichnis und ReactOS zweimal neustarten. [Section.0410] @@ -28,53 +28,53 @@ Descrizione = Estrarre nella cartella "ReactOS" e poi riavviare ReactOs due volt [Section.040a] Name = Driver AC97 para VirtualBox -Licence = Desconocida +License = Desconocida Description = Descomprimir en la carpeta "Reactos" y reiniciar Reactos dos veces. [Section.040c] Name = Pilote AC97 pour VirtualBox -Licence = Inconnue +License = Inconnue Description = Décompresser dans le dossier "ReactOS" puis redémarrer ReactOS deux fois. Size = 185,5 ko [Section.0410] Name = Driver AC97 per VirtualBox -Licence = Sconosciuta +License = Sconosciuta Description = Decomprimere nella cartella "ReactOS" e riavviare ReactOS. [Section.0413] Name = AC97 Driver voor VirtualBox -Licence = Ongekend +License = Ongekend Description = Pak uit in de "ReactOS" map en start tweemaal opnieuw op. [Section.0415] Name = Sterownik AC97 dla VirtualBox -Licence = Nieznana +License = Nieznana Description = Rozpakuj zawartość w folderze "ReactOS" i dwukrotnie zrestartuj system. [Section.0418] Name = Modul pilot AC97 pentru VirtualBox -Licence = Nespecificată +License = Nespecificată Description = Dezarhivați în dosarul ReactOS apoi reporniți ReactOS de două ori. Size = 185,5 ko [Section.0419] Name = Драйвер AC97 для VirtualBox -Licence = Не указано +License = Не указано Description = Pазархивируйте содержимое в папку "ReactOS", затем дважды перезагрузите систему. [Section.041f] Name = VirtualBox için AC97 Sürücüsü -Licence = Bilinmiyor +License = Bilinmiyor Description = ReactOS'un dizinine çıkartınız, sonra bilgisayarı iki kez yeniden başlatınız. Size = 185,5 KB [Section.0422] Name = Драйвер AC97 для VirtualBox -Licence = Невідома +License = Невідома Description = Pозархівуйте вміст в теку "ReactOS" після чого двічі перезавантажте систему. [Section.0813] Name = AC97 Driver voor VirtualBox -Licence = Ongekend +License = Ongekend Description = Pak uit in de "ReactOS" map en start tweemaal opnieuw op. diff --git a/reactos/base/applications/rapps/rapps/audiograbber.txt b/reactos/base/applications/rapps/rapps/audiograbber.txt index 5086efde0ab..40900e09225 100644 --- a/reactos/base/applications/rapps/rapps/audiograbber.txt +++ b/reactos/base/applications/rapps/rapps/audiograbber.txt @@ -4,7 +4,7 @@ [Section] Name = Audio Grabber Version = 1.83 SE -Licence = Freeware +License = Freeware Description = A very good CD Ripper/Audio File Converter. Size = 3.43 MB Category = 1 @@ -35,12 +35,12 @@ Description = Een goede CD Ripper/Audio-bestandsomzetter. Description = Bardzo dobry CD Ripper/konwerter plików audio. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Program de extragere conținuturi CD audio și de conversie a fișierelor de sunet. Size = 3,43 Mo [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Çok iyi bir CD ripleyicisi ve ses kütüğü dönüştürücüsü. Size = 3,43 MB diff --git a/reactos/base/applications/rapps/rapps/bittorrent.txt b/reactos/base/applications/rapps/rapps/bittorrent.txt index 3cc4ae4bed2..3c752f55217 100644 --- a/reactos/base/applications/rapps/rapps/bittorrent.txt +++ b/reactos/base/applications/rapps/rapps/bittorrent.txt @@ -4,7 +4,7 @@ [Section] Name = BitTorrent Version = 7.9.2 -Licence = Freeware for non-commercial uses +License = Freeware for non-commercial uses Description = The Original BitTorrent Client. Size = 1.61 MB Category = 5 @@ -13,22 +13,22 @@ URLDownload = http://download-new.utorrent.com/endpoint/bittorrent/os/windows/tr CDPath = none [Section.0407] -Licence = Freeware für nichtkommerzielle Nutzung +License = Freeware für nichtkommerzielle Nutzung Description = Der Original BitTorrent Client. [Section.0410] Description = L'originale Client BitTorrent. [Section.0415] -Licence = Freeware dla użytku niekomercyjnego +License = Freeware dla użytku niekomercyjnego Description = Oryginalny klient BitTorrent. [Section.0418] -Licence = Gratuită pentru uz necomercial +License = Gratuită pentru uz necomercial Description = Originalul client BitTorrent. Size = 1,61 Mo [Section.041f] -Licence = Tecimlik olmayan kullanımlar için ücretsiz. +License = Tecimlik olmayan kullanımlar için ücretsiz. Description = Özgün BitTorrent istemcisi. Size = 1,61 MB diff --git a/reactos/base/applications/rapps/rapps/bochs.txt b/reactos/base/applications/rapps/rapps/bochs.txt index 584b555be01..b99f6217595 100644 --- a/reactos/base/applications/rapps/rapps/bochs.txt +++ b/reactos/base/applications/rapps/rapps/bochs.txt @@ -5,7 +5,7 @@ [Section] Name = Bochs Version = 2.6.6 -Licence = LGPL v2 +License = LGPL v2 Description = Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms. Size = 4.7 MB Category = 15 @@ -27,6 +27,6 @@ Description = Bochs este un emulator PC (x86) cu surse deschise și portabilitat Size = 4,7 Mo [Section.041f] -Licence = LGPL 2. sürüm +License = LGPL 2. sürüm Description = Bochs; çok taşınabilir, C++ ile yazılmış, en yaygın platformlarda çalışan, açık kaynak bir IA-32 (x86) PC öykünücüsüdür. Size = 4,7 MB diff --git a/reactos/base/applications/rapps/rapps/boswars.txt b/reactos/base/applications/rapps/rapps/boswars.txt index bc586dafcbb..22a2e1dcb22 100644 --- a/reactos/base/applications/rapps/rapps/boswars.txt +++ b/reactos/base/applications/rapps/rapps/boswars.txt @@ -5,7 +5,7 @@ [Section] Name = Bos Wars Version = 2.6.1 -Licence = GPL +License = GPL Description = Bos Wars is a futuristic real time strategy game. To start the game, install Microsoft Visual C++ 2008 runtime. Size = 62.3 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/boundaround.txt b/reactos/base/applications/rapps/rapps/boundaround.txt index 67148955a42..b686f39d423 100644 --- a/reactos/base/applications/rapps/rapps/boundaround.txt +++ b/reactos/base/applications/rapps/rapps/boundaround.txt @@ -3,7 +3,7 @@ [Section] Name = Bound Around (Demo) -Licence = Shareware +License = Shareware Description = A game similar Frozen Fruits. Size = 1.95 MB Category = 4 @@ -19,12 +19,12 @@ Name = Bound Around (Versione di prova) Description = Un gioco simile a Frozen Fruits. [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Un joc similar jocului Frozen Fruits. Size = 1,95 Mo [Section.041f] Name = Bound Around (Göstermelik) -Licence = Paylaşımlı +License = Paylaşımlı Description = Frozen Fruits benzeri bir oyun. Size = 1,95 MB diff --git a/reactos/base/applications/rapps/rapps/christmasbound.txt b/reactos/base/applications/rapps/rapps/christmasbound.txt index 575c2babe61..3b75215c1eb 100644 --- a/reactos/base/applications/rapps/rapps/christmasbound.txt +++ b/reactos/base/applications/rapps/rapps/christmasbound.txt @@ -4,7 +4,7 @@ [Section] Name = Christmas Bound Version = 1.4 -Licence = Freeware +License = Freeware Description = A game similar Frozen Fruits. Size = 892 kB Category = 4 @@ -19,11 +19,11 @@ Description = Ein Spiel, ähnlich zu Frozen Fruits. Description = Un gioco simile a Frozen Fuits. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un joc similar jocului Frozen Fruits. Size = 892 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Frozen Fruits benzeri bir oyun. Size = 892 KB diff --git a/reactos/base/applications/rapps/rapps/chromium.txt b/reactos/base/applications/rapps/rapps/chromium.txt index 61b64468d3d..faed55ced7e 100644 --- a/reactos/base/applications/rapps/rapps/chromium.txt +++ b/reactos/base/applications/rapps/rapps/chromium.txt @@ -5,7 +5,7 @@ [Section] Name = Chromium B.S.U. Version = 0.9.13.2 -Licence = GPL +License = GPL Description = Chromium B.S.U. is an arcade-style, top-scrolling space shooter. Size = 2.3 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/cnt.txt b/reactos/base/applications/rapps/rapps/cnt.txt index 41eb34e4737..e58c8dc9349 100644 --- a/reactos/base/applications/rapps/rapps/cnt.txt +++ b/reactos/base/applications/rapps/rapps/cnt.txt @@ -4,7 +4,7 @@ [Section] Name = Click-N-Type Virtual Keyboard Version = 3.03 -Licence = Freeware +License = Freeware Description = Freeware virtual keyboard application. Size = 1.3 MB Category = 12 @@ -16,19 +16,19 @@ CDPath = none Description = Kostenlose virtuelle Tastatur. [Section.0410] -Licence = Gratuita +License = Gratuita Description = Applicazione gratuita per la simulazione della tastiera. [Section.0415] Description = Wirtualna klawiatura ekranowa. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Aplicație gratuită pentru simularea unei tastaturi fizice. Size = 1,3 Mo [Section.041f] Name = Click-N-Type Farazî Düğme Takımı -Licence = Ücretsiz +License = Ücretsiz Description = Ücretsiz farazî düğme takımı uygulaması. Size = 1,3 MB diff --git a/reactos/base/applications/rapps/rapps/codeblocks.txt b/reactos/base/applications/rapps/rapps/codeblocks.txt index 653dd3bceb9..1c47ddd718e 100644 --- a/reactos/base/applications/rapps/rapps/codeblocks.txt +++ b/reactos/base/applications/rapps/rapps/codeblocks.txt @@ -4,7 +4,7 @@ [Section] Name = Code::Blocks (without compiler) Version = 13.12 -Licence = GPLv3 +License = GPLv3 Description = A open source, cross-platform, powerful IDE. It doesn't contain a compiler. Size = 29.2 MB Category = 7 @@ -25,6 +25,6 @@ Size = 29,2 Mo [Section.041f] Name = Code::Blocks (Derleyicisiz) -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = Açık kaynak, çapraz platform, güçlü bir tümleşik geliştirme ortamı. Bir derleyici içermez. Size = 29,2 MB diff --git a/reactos/base/applications/rapps/rapps/codeblocks_gcc.txt b/reactos/base/applications/rapps/rapps/codeblocks_gcc.txt index 63e8b56b21e..3299020c65c 100644 --- a/reactos/base/applications/rapps/rapps/codeblocks_gcc.txt +++ b/reactos/base/applications/rapps/rapps/codeblocks_gcc.txt @@ -4,7 +4,7 @@ [Section] Name = Code::Blocks TDM-GCC (version 4.7.1, 32 bit) Version = 13.12 -Licence = GPLv3 +License = GPLv3 Description = A open source, cross-platform, powerful IDE. It contains TDM-GCC (version 4.7.1, 32 bit) compiler. Size = 97.8 MB Category = 7 @@ -25,6 +25,6 @@ Size = 97,8 Mo [Section.041f] Name = Code::Blocks TDM-GCC (sürüm 4.7.1, 32 bitlik) -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = Açık kaynak, çapraz platform, güçlü bir tümleşik geliştirme ortamı. TDM-GCC (sürüm 4.7.1, 32 bitlik) derleyicisini içerir. Size = 97,8 MB diff --git a/reactos/base/applications/rapps/rapps/codeblocks_gcc_2.txt b/reactos/base/applications/rapps/rapps/codeblocks_gcc_2.txt index e7bf474582f..6f679ad409c 100644 --- a/reactos/base/applications/rapps/rapps/codeblocks_gcc_2.txt +++ b/reactos/base/applications/rapps/rapps/codeblocks_gcc_2.txt @@ -4,7 +4,7 @@ [Section] Name = Code::Blocks TDM-GCC (version 4.8.1, 32 bit) Version = 13.12 -Licence = GPLv3 +License = GPLv3 Description = A open source, cross-platform, powerful IDE. It contains TDM-GCC (version 4.8.1, 32 bit) compiler. Size = 100 MB Category = 7 @@ -25,6 +25,6 @@ Size = 100 Mo [Section.041f] Name = Code::Blocks TDM-GCC (sürüm 4.8.1, 32 bitlik) -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = Açık kaynak, çapraz platform, güçlü bir tümleşik geliştirme ortamı. TDM-GCC (sürüm 4.8.1, 32 bitlik) derleyicisini içerir. Size = 100 MB diff --git a/reactos/base/applications/rapps/rapps/comctl32ocx.txt b/reactos/base/applications/rapps/rapps/comctl32ocx.txt index 21c32cb5be7..53fb30bda69 100644 --- a/reactos/base/applications/rapps/rapps/comctl32ocx.txt +++ b/reactos/base/applications/rapps/rapps/comctl32ocx.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual Basic 6.0 Common Controls Version = 6.0 -Licence = Unknown +License = Unknown Description = File needed by some applications. Contains: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 913.73 kB Category = 14 @@ -13,56 +13,56 @@ URLDownload = http://download.microsoft.com/download/3/a/5/3a5925ac-e779-4b1c-bb CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Datei wird von einigen Anwendungen benötigt. Beinhaltet: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 908.73 kB URLSite = http://www.microsoft.com/de-DE/download/details.aspx?id=10019 URLDownload = http://download.microsoft.com/download/c/e/d/ced699fe-7a40-420b-bdd7-10b38caef4c6/VisualBasic6-KB896559-v1-DEU.exe [Section.040a] -Licence = Desconocida +License = Desconocida Description = X es necesario para varias aplicaciones. Incluye: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 910.23 kB URLSite = http://www.microsoft.com/es-ES/download/details.aspx?id=10019 URLDownload = http://download.microsoft.com/download/9/0/9/90935db7-89ec-4344-a9ea-e6913c03f060/VisualBasic6-KB896559-v1-ESN.exe [Section.040c] -Licence = Inconnue +License = Inconnue Description = Fichier nécessaire pour certaines applications. Contient: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 911,23 ko URLSite = http://www.microsoft.com/fr-FR/download/details.aspx?id=10019 URLDownload = http://download.microsoft.com/download/4/0/f/40f775ea-b257-410c-8f78-f1f60afe0306/VisualBasic6-KB896559-v1-FRA.exe [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = File necessari per alcune applicazioni. Contiene: Comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 909.73 kB URLSite = http://www.microsoft.com/it-IT/download/details.aspx?id=10019 URLDownload = http://download.microsoft.com/download/8/1/b/81b968b9-1d7d-4d0a-aa27-864f4a2e3c23/VisualBasic6-KB896559-v1-ITA.exe [Section.0413] -Licence = Ongekend +License = Ongekend Description = Gebruikt door bepaalde applicaties. Bevat: comctl32.ocx, mscomctl.ocx, advpack.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Microsoft Visual Basic 6.0 Common Controls jest używany przez część aplikacji. Zawiera: comctl32.ocx, mscomctl.ocx, advpack.dll. [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Modul logic necesar unor aplicații. Conține: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 913,73 ko [Section.041f] Name = Microsoft Visual Basic 6.0 Ortak Denetimler -Licence = Bilinmiyor +License = Bilinmiyor Description = Birtakım uygulamalar için gerekli kütük. Şunları içerir: comctl32.ocx, mscomctl.ocx, advpack.dll. Size = 913,73 KB [Section.0422] -Licence = Невідома +License = Невідома Description = Файл потрібен декотрим програмам. включає: comctl32.ocx, mscomctl.ocx, advpack.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Gebruikt door bepaalde applicaties. Bevat: comctl32.ocx, mscomctl.ocx, advpack.dll. diff --git a/reactos/base/applications/rapps/rapps/devcpp_tdm_gcc_x64.txt b/reactos/base/applications/rapps/rapps/devcpp_tdm_gcc_x64.txt index 269f478c2e6..d921d5637d2 100644 --- a/reactos/base/applications/rapps/rapps/devcpp_tdm_gcc_x64.txt +++ b/reactos/base/applications/rapps/rapps/devcpp_tdm_gcc_x64.txt @@ -4,7 +4,7 @@ [Section] Name = Orwell Dev-C++ TDM GCC x64 Version = 5.8.0 -Licence = GPLv2 +License = GPLv2 Description = A maintained version of Dev-C++. It contains 64 bit TDM-GCC compiler. Size = 44.7 MB Category = 7 @@ -23,6 +23,6 @@ Description = O versiune menținută a Dev-C++. Conține compilatorul TDM-GCC pe Size = 44,7 Mo [Section.041f] -Licence = GPL 2. sürüm +License = GPL 2. sürüm Description = Dev-C++'nın sürdürülen bir sürümü. 64 bitlik TDM-GCC derleyicisi içerir. Size = 44,7 MB diff --git a/reactos/base/applications/rapps/rapps/diablo2.txt b/reactos/base/applications/rapps/rapps/diablo2.txt index ff7a2ae4dc7..6154c4e626b 100644 --- a/reactos/base/applications/rapps/rapps/diablo2.txt +++ b/reactos/base/applications/rapps/rapps/diablo2.txt @@ -4,7 +4,7 @@ [Section] Name = Diablo II Version = 1.4 -Licence = Shareware +License = Shareware Description = Diablo 2 Shareware. zeckensack's glide wrapper is required to run it. Size = 131.9 MB Category = 4 @@ -32,12 +32,12 @@ Description = Diablo 2 Shareware. Maakt gebruik van zeckensack's glide wrapper. Description = Diablo 2 Shareware. Do poprawnego działania wymagany jest zainstalowany zeckensacks glide wrapper. [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Diablo 2 Shareware. Pentru execuție este necesar (pachetul) zeckensack's glide wrapper. Size = 131,9 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Diablo 2 Paylaşımlı. Çalıştırmak için zeckensack'ın glide wrapper'ı gereklidir. Size = 131,9 MB diff --git a/reactos/base/applications/rapps/rapps/dosblaster.txt b/reactos/base/applications/rapps/rapps/dosblaster.txt index 78bb2809cc3..91991860070 100644 --- a/reactos/base/applications/rapps/rapps/dosblaster.txt +++ b/reactos/base/applications/rapps/rapps/dosblaster.txt @@ -4,7 +4,7 @@ [Section] Name = DosBlaster Version = 2.5 -Licence = GPL +License = GPL Description = DosBlaster is a shell extension which makes it possible to open any DOS executable in DOSBox via right click. This version contains DOSBox 0.70, but can be simply updated by installing a newer DOSBox into the DosBlaster folders. Size = 2.05 MB Category = 15 diff --git a/reactos/base/applications/rapps/rapps/dosbox.txt b/reactos/base/applications/rapps/rapps/dosbox.txt index f8ebb4a5309..29578b90232 100644 --- a/reactos/base/applications/rapps/rapps/dosbox.txt +++ b/reactos/base/applications/rapps/rapps/dosbox.txt @@ -4,7 +4,7 @@ [Section] Name = DOSBox Version = 0.74 -Licence = GPL +License = GPL Description = DOSBox is a DOS emulator. Size = 1.38 MB Category = 15 diff --git a/reactos/base/applications/rapps/rapps/doublecommander.txt b/reactos/base/applications/rapps/rapps/doublecommander.txt index 0e1d4f76bf3..577c1260696 100644 --- a/reactos/base/applications/rapps/rapps/doublecommander.txt +++ b/reactos/base/applications/rapps/rapps/doublecommander.txt @@ -4,7 +4,7 @@ [Section] Name = Double Commander Version = 0.5.11 Beta -Licence = GPL +License = GPL Description = Double Commander is an open source file manager with two panels side by side. You need 7-Zip or a similar Utility to extract it. Size = 8.0 MB Category = 12 diff --git a/reactos/base/applications/rapps/rapps/dplus.txt b/reactos/base/applications/rapps/rapps/dplus.txt index 567e824c3be..01daa4e4fed 100644 --- a/reactos/base/applications/rapps/rapps/dplus.txt +++ b/reactos/base/applications/rapps/rapps/dplus.txt @@ -4,7 +4,7 @@ [Section] Name = D+ Browser Version = 0.5b -Licence = GPLv3 +License = GPLv3 Description = DPlus is a graphical web browser with an emphasis on security, performance and portability. It is based on Dillo and it is forked from Dillo-Win32 project. Size = 1.36 MB Category = 5 @@ -22,6 +22,6 @@ Size = 1,36 Mo [Section.041f] Name = D+ Tarayıcı -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = DPlus; güvenlik, başarım ve taşınabilirlik üzerine bir vurguyla, çizgelik bir Umûmî Ağ tarayıcısıdır. Dillo tabanlıdır ve Dillo-Win32 tasarısından çatallanmıştır. Size = 1,36 MB diff --git a/reactos/base/applications/rapps/rapps/dvdwritenow.txt b/reactos/base/applications/rapps/rapps/dvdwritenow.txt index 541aeeb6256..4a25b875616 100644 --- a/reactos/base/applications/rapps/rapps/dvdwritenow.txt +++ b/reactos/base/applications/rapps/rapps/dvdwritenow.txt @@ -5,7 +5,7 @@ [Section] Name = DVD Write Now Version = 1.5.12 sp2 -Licence = Freeware +License = Freeware Description = A free direct CD/DVD recording software. Once installed, you can use your CD/DVD RW as USB Flash or removable hard drives. Along with this you can write to CD/DVD RW recorded with UDF filesystem. You can also read UDF disks created with other software (Microsoft DVD−ROMs, RW disks recorded with Ahead InCD). You need a ZIP decompression program to install it. Size = 1.2 MB Category = 12 @@ -23,7 +23,7 @@ Description = Un software di masterizzazione CD/DVD diretto e gratuito. Una volt Description = Darmowe oprogramowanie do nagrywania CD/DVD. Po zainstalowaniu, możesz używać płyty CD RW i DVD RW tak, jak dyski przenośne / pendrive. Możesz także zapisywać (i odczytywać dyski utworzone przez inne programy) dane do dysków RW zapisanych w systemie UDF. Wymaga programu archiwizującego do wypakowania i instalacji. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un program de înscriere CD/DVD directă. Odată instalat, puteți utiliza CD/DVD ca memorie USB sau disc dur detașabil. Pe lângă aceasta, veți putea scrie pe CD/DVD inscripționate cu sistem de fișiere UDF. Se pot de asemenea citi discuri UDF create cu alte programe. (Microsoft DVD-ROM, discuri RW inscripționate cu Ahead InCD). Este necesar un program de decompresie ZIP pentru a-l instala. Size = 1,2 Mo @@ -32,6 +32,6 @@ Description = DVD Write Now - бесплатная программа для п URLSite = http://dwn.alter.org.ua/ru/ [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Ücretsiz bir doğrudan CD/DVD saklayıcı yazılımı. Kurulduktan sonra CD/DVD RW'lerinizi, USB Flash veyâ çıkarılabilir sâbit disk sürücüleri olarak kullanabilirsiniz. Bununla birlikte UDF kütük dizgesiyle saklanmış CD/DVD RW'lere yazabilirsiniz. Ayrıca Microsoft DVD−ROM'ları, Ahead InCD ile saklanmış RW diskleri gibi başka yazılımlarla oluşturulmuş UDF diskleri okuyabilirsiniz. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 1,2 MB diff --git a/reactos/base/applications/rapps/rapps/excelview.txt b/reactos/base/applications/rapps/rapps/excelview.txt index 8a6ab53f769..b90d9184aaa 100644 --- a/reactos/base/applications/rapps/rapps/excelview.txt +++ b/reactos/base/applications/rapps/rapps/excelview.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Excel Viewer Version = 2007 -Licence = Unknown +License = Unknown Description = Microsoft Excel Viewer Size = 74.14 MB Category = 6 @@ -13,53 +13,53 @@ URLDownload = http://download.microsoft.com/download/e/a/9/ea913c8b-51a7-41b7-86 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Size = 51.15 MB URLDownload = http://download.microsoft.com/download/F/8/8/F88CB355-ECAA-4B74-87D6-C05C81D215BF/ExcelViewer.exe [Section.040a] -Licence = Desconocida +License = Desconocida Size = 51.11 MB URLDownload = http://download.microsoft.com/download/5/D/9/5D9E41A4-22CE-4497-BD7D-368883EF92F7/ExcelViewer.exe [Section.040c] -Licence = Inconnue +License = Inconnue Size = 51,13 Mo URLDownload = http://download.microsoft.com/download/0/0/E/00EE9DCF-7BCA-4414-837E-BC3AA23DCC8D/ExcelViewer.exe [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Size = 51.1 MB URLDownload = http://download.microsoft.com/download/0/C/2/0C2ED9D9-6961-47F3-91E0-916E19F330E2/ExcelViewer.exe [Section.0413] -Licence = Ongekend +License = Ongekend Size = 50.97 MB URLDownload = http://download.microsoft.com/download/C/C/6/CC663715-AB58-4CDE-90F1-5A8CF7472500/ExcelViewer.exe [Section.0415] -Licence = Nieznana +License = Nieznana Size = 51.15 MB URLDownload = http://download.microsoft.com/download/5/B/A/5BAB0B5A-706D-444C-B90A-1D97DB4C43A8/ExcelViewer.exe [Section.0418] -Licence = Necunoscută +License = Necunoscută Size = 51,14 Mo URLDownload = http://download.microsoft.com/download/D/D/2/DD28D077-97F3-47C0-9389-0B987918888B/ExcelViewer.exe [Section.041f] Name = Microsoft Excel Görüntüleyici -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Excel Görüntüleyici Size = 51,1 MB URLDownload = http://download.microsoft.com/download/8/5/D/85DCDD24-8237-4334-866D-417F74F37C47/ExcelViewer.exe [Section.0422] -Licence = Невідома +License = Невідома Size = 51.15 MB URLDownload = http://download.microsoft.com/download/7/4/9/749A8D59-A2D5-4A64-99CF-5FF4DD7C5AC6/ExcelViewer.exe [Section.0813] -Licence = Ongekend +License = Ongekend Size = 50.97 MB URLDownload = http://download.microsoft.com/download/C/C/6/CC663715-AB58-4CDE-90F1-5A8CF7472500/ExcelViewer.exe diff --git a/reactos/base/applications/rapps/rapps/fap.txt b/reactos/base/applications/rapps/rapps/fap.txt index c955ca3536a..5fdf1dfec4b 100644 --- a/reactos/base/applications/rapps/rapps/fap.txt +++ b/reactos/base/applications/rapps/rapps/fap.txt @@ -4,7 +4,7 @@ [Section] Name = Fox Audio Player Version = 0.10.2 -Licence = GPL +License = GPL Description = Simple and lightweight audio player. Size = 1.9 MB Category = 1 diff --git a/reactos/base/applications/rapps/rapps/fira.txt b/reactos/base/applications/rapps/rapps/fira.txt index e3b26688642..4c460ca6351 100644 --- a/reactos/base/applications/rapps/rapps/fira.txt +++ b/reactos/base/applications/rapps/rapps/fira.txt @@ -5,7 +5,7 @@ [Section] Name = Mozilla Fira Font Version = 3.1 -Licence = Unknown +License = Unknown Description = Mozilla Fira Font Pack, Includes Mono and Sans fonts. Unzip in the ReactOS's folder. Size = 1.1 MB Category = 14 @@ -14,24 +14,24 @@ URLDownload = http://svn.reactos.org/packages/Fira.exe CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Mozilla Fira Font Pack, Beinhaltet Mono und Sans Schriften. Bitte in den "ReactOS" Ordner entpacken. [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Fira Font Pack di Mozilla, Include i font Mono e Sans. Estrare nella cartella "ReactOS". [Section.0415] -Licence = Nieznana +License = Nieznana Description = Pakiet czcionek Mozilla Fira Font, zawiera czcionki Mono i Sans. Wypakuj do folderu "ReactOS". [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Pachetul Mozilla Fira Font, include fonturile Mono și Sans. Dezarhivați în dosarul ReactOS. Size = 1,1 Mo [Section.041f] Name = Mozilla Fira Yazı Tipi -Licence = Bilinmiyor +License = Bilinmiyor Description = Mozilla Fira Yazı Tipi Paketi, Mono ve Sans yazı tiplerini kapsar. ReactOS'un dizinine çıkartınız. Size = 1,1 MB diff --git a/reactos/base/applications/rapps/rapps/firefox.txt b/reactos/base/applications/rapps/rapps/firefox.txt index b28e7b76141..254df5ef311 100644 --- a/reactos/base/applications/rapps/rapps/firefox.txt +++ b/reactos/base/applications/rapps/rapps/firefox.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Firefox 33 Version = 33.0 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 34.76 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/firefox2.txt b/reactos/base/applications/rapps/rapps/firefox2.txt index d71050a0305..f9ca6564bb0 100644 --- a/reactos/base/applications/rapps/rapps/firefox2.txt +++ b/reactos/base/applications/rapps/rapps/firefox2.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Firefox 2.0 Version = 2.0.0.20 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 5.77 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/firefox3.txt b/reactos/base/applications/rapps/rapps/firefox3.txt index 6d1e80c0284..d6ae2e0965c 100644 --- a/reactos/base/applications/rapps/rapps/firefox3.txt +++ b/reactos/base/applications/rapps/rapps/firefox3.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Firefox 3.0 Version = 3.0.19 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 7.16 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/firefox36.txt b/reactos/base/applications/rapps/rapps/firefox36.txt index 4dc264b1f8c..05a69229e7f 100644 --- a/reactos/base/applications/rapps/rapps/firefox36.txt +++ b/reactos/base/applications/rapps/rapps/firefox36.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Firefox 3.6 Version = 3.6.28 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. Size = 8.22 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/foxit.txt b/reactos/base/applications/rapps/rapps/foxit.txt index b977806a173..402217da962 100644 --- a/reactos/base/applications/rapps/rapps/foxit.txt +++ b/reactos/base/applications/rapps/rapps/foxit.txt @@ -4,7 +4,7 @@ [Section] Name = Foxit Reader Version = 6.2.3.815 -Licence = Freeware +License = Freeware Description = The best PDF reader next to Adobe Reader itself. Size = 36.0 MB Category = 6 @@ -20,7 +20,7 @@ URLDownload = http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/win/6.x/6. [Section.041f] Version = 6.1.5.0624 -Licence = Ücretsiz +License = Ücretsiz Description = Adobe Okuyucu'nun kendisine yakın en iyi PDF okuyucusu. Size = 36,0 MB URLDownload = http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/win/6.x/6.1/L10N/FoxitReader615.0624_prom_L10N_Setup.exe diff --git a/reactos/base/applications/rapps/rapps/freebasic.txt b/reactos/base/applications/rapps/rapps/freebasic.txt index e03b1da9085..0511efbb5c8 100644 --- a/reactos/base/applications/rapps/rapps/freebasic.txt +++ b/reactos/base/applications/rapps/rapps/freebasic.txt @@ -4,7 +4,7 @@ [Section] Name = FreeBASIC Version = 1.00.0 -Licence = GPL/LGPL +License = GPL/LGPL Description = Open Source BASIC Compiler. The BASIC syntax is compatible to QBASIC. Size = 9.0 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/ghostscript.txt b/reactos/base/applications/rapps/rapps/ghostscript.txt index d2084a35ba5..bc13ebc64d4 100644 --- a/reactos/base/applications/rapps/rapps/ghostscript.txt +++ b/reactos/base/applications/rapps/rapps/ghostscript.txt @@ -4,7 +4,7 @@ [Section] Name = Ghostscript Version = 9.15 -Licence = AGPL +License = AGPL Description = An open interpreter for the PostScript language and for PDF. Size = 12.65 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/ghostview.txt b/reactos/base/applications/rapps/rapps/ghostview.txt index dd1b63bbaed..3764c74af69 100644 --- a/reactos/base/applications/rapps/rapps/ghostview.txt +++ b/reactos/base/applications/rapps/rapps/ghostview.txt @@ -4,7 +4,7 @@ [Section] Name = GSview Version = 5.0 -Licence = Aladdin Free Public Licence +License = Aladdin Free Public License Description = A graphical interface for Ghostscript. Size = 1.94 MB Category = 6 @@ -16,11 +16,11 @@ CDPath = none Description = Ein grafisches Interface für Ghostscript. [Section.0418] -Licence = Licență publică gratuită „Aladdin” +License = Licență publică gratuită „Aladdin” Description = O interfață grafică pentru GhostScript. Size = 1,94 Mo [Section.041f] -Licence = Aladdin Özgür Kamu Ruhsatı +License = Aladdin Özgür Kamu Ruhsatı Description = Ghostscript için bir çizgelik arayüz. Size = 1,94 MB diff --git a/reactos/base/applications/rapps/rapps/glidewrapzbag.txt b/reactos/base/applications/rapps/rapps/glidewrapzbag.txt index 4e8172886f2..765bd7ef434 100644 --- a/reactos/base/applications/rapps/rapps/glidewrapzbag.txt +++ b/reactos/base/applications/rapps/rapps/glidewrapzbag.txt @@ -4,7 +4,7 @@ [Section] Name = GlidewrapZbag Version = 0.84c -Licence = Freeware +License = Freeware Description = glidewrapper needed to run Diablo 2 on ReactOS. Size = 249.02 kB Category = 3 @@ -32,12 +32,12 @@ Description = glidewrapper is nodig om Diablo2 te gebruiken op ReactOS. Description = glidewrapper jest potrzebny do uruchomienia Diablo2 w ReactOS-ie. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Glide wrapper, necesar pentru a executa Diablo 2 în ReactOS. Size = 249,02 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = glidewrapper, ReactOS'ta Diablo 2'yi çalıştırmak için gereklidir. Size = 249,02 KB diff --git a/reactos/base/applications/rapps/rapps/globulation2.txt b/reactos/base/applications/rapps/rapps/globulation2.txt index 5b540869e51..fa335c3abf1 100644 --- a/reactos/base/applications/rapps/rapps/globulation2.txt +++ b/reactos/base/applications/rapps/rapps/globulation2.txt @@ -5,7 +5,7 @@ [Section] Name = Globulation2 Version = 0.9.4.4 -Licence = GPL +License = GPL Description = Globulation 2 is a real-time strategy game. The game minimizes gaming micromanagement by automatically assigning tasks to units. Size = 13.5 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/hover.txt b/reactos/base/applications/rapps/rapps/hover.txt index 9627e69f231..74c22100863 100644 --- a/reactos/base/applications/rapps/rapps/hover.txt +++ b/reactos/base/applications/rapps/rapps/hover.txt @@ -5,7 +5,7 @@ [Section] Name = Hover! Version = 1.0 -Licence = MS EULA +License = MS EULA Description = The classic Hover CTF game which was found on the Windows 95 CD. Size = 6.2 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/hxd.txt b/reactos/base/applications/rapps/rapps/hxd.txt index eb203dad07e..913688bca39 100644 --- a/reactos/base/applications/rapps/rapps/hxd.txt +++ b/reactos/base/applications/rapps/rapps/hxd.txt @@ -5,7 +5,7 @@ [Section] Name = HxD Version = 1.7.7.0 -Licence = Freeware +License = Freeware Description = A good hex editor. You need 7-Zip or a similar Utility to extract it. Size = 852 kB Category = 7 @@ -26,13 +26,13 @@ Description = Dobry edytor Hex. Do wypakowania pliku potrzebny jest program arch Description = Un buon editor hexadecimale. Necessita 7-Zip o un programma simile per estrarlo. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un bun editor hexazecimal. E necesar un utilitar de dezarhivare de tip ZIP. Size = 859 ko URLDownload = http://mh-nexus.de/downloads/HxDSetupROM.zip [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = İyi bir onaltılık düzenleyici. Çıkartmak için 7-Zip ya da benzeri bir yazılım kullanmanız gerekir. Size = 853 KB URLDownload = http://mh-nexus.de/downloads/HxDSetupTR.zip diff --git a/reactos/base/applications/rapps/rapps/indiftpd.txt b/reactos/base/applications/rapps/rapps/indiftpd.txt index 09a17d09df1..dace068d5cf 100644 --- a/reactos/base/applications/rapps/rapps/indiftpd.txt +++ b/reactos/base/applications/rapps/rapps/indiftpd.txt @@ -5,7 +5,7 @@ [Section] Name = IndiFTPD Version = 1.0.9 Beta -Licence = GPL +License = GPL Description = IndiFTPD is a standalone FTP server that functions as a single executable. It is designed for situations when a user does not want to install/configure a server on the system (or does not have permission to do so) and wants to quickly get a server running. Size = 556 kB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/inkscape.txt b/reactos/base/applications/rapps/rapps/inkscape.txt index 7166a7bd6b0..7e4512f81ec 100644 --- a/reactos/base/applications/rapps/rapps/inkscape.txt +++ b/reactos/base/applications/rapps/rapps/inkscape.txt @@ -1,7 +1,7 @@ [Section] Name = Inkscape Version = 0.48.5 -Licence = GPL +License = GPL Description = Inkscape is a vector graphics editor licensed under the GNU General Public License. Size = 32.9 MB Category = 3 diff --git a/reactos/base/applications/rapps/rapps/irfanview.txt b/reactos/base/applications/rapps/rapps/irfanview.txt index a8db2635f8b..fc6374b7391 100644 --- a/reactos/base/applications/rapps/rapps/irfanview.txt +++ b/reactos/base/applications/rapps/rapps/irfanview.txt @@ -4,7 +4,7 @@ [Section] Name = IrfanView Version = 4.38 -Licence = Freeware (for personal use) +License = Freeware (for personal use) Description = Viewer for all kinds of graphics/audio files/video files. Size = 1.81 MB Category = 3 @@ -13,44 +13,44 @@ URLDownload = http://img.cs.montana.edu/windows/iview438_setup.exe CDPath = none [Section.0407] -Licence = Freeware für nichtkommerzielle Nutzung +License = Freeware für nichtkommerzielle Nutzung Description = Anzeigeprogramm für alle Arten von Grafik-/Audio- oder Video-Dateien. [Section.040a] -Licence = Gratuito (para uso personal) +License = Gratuito (para uso personal) Description = Visor para toda clase de archivos de imagen,audio y video. [Section.040c] -Licence = Gratuit (pour un usage personnel) +License = Gratuit (pour un usage personnel) Description = Visionneur pour tous les types de fichiers graphiques/audio/vidéo. Size = 1,81 Mo [Section.0410] -Licence = Gratuita (per uso personale) +License = Gratuita (per uso personale) Description = Viewer per tutti i tipi di grafici / file audio / file video. [Section.0413] -Licence = Freeware (voor persoonlijk gebruik) +License = Freeware (voor persoonlijk gebruik) Description = Weergave voor allerhande bestandstypes voor audio, video, grafiek. [Section.0415] -Licence = Freeware (dla użytku domowego) +License = Freeware (dla użytku domowego) Description = Przeglądarka dla bardzo wielu typów obrazów, plików audio oraz wideo. [Section.0418] -Licence = Gratuită (pentru uz personal) +License = Gratuită (pentru uz personal) Description = Lector pentru multiple formaturi de fișiere grafice/audio/video. Size = 1,81 Mo [Section.041f] -Licence = Şahsî kullanım için ücretsiz. +License = Şahsî kullanım için ücretsiz. Description = Çizgelerin, ses kütüklerinin, vidyo kütüklerinin tüm türleri için görüntüleyici. Size = 1,81 MB [Section.0422] -Licence = Freeware (для домашнього використання) +License = Freeware (для домашнього використання) Description = Переглядач для всіх видів графічних та аудіо/відео файлів. [Section.0813] -Licence = Freeware (voor persoonlijk gebruik) +License = Freeware (voor persoonlijk gebruik) Description = Weergave voor allerhande bestandstypes voor audio, video, grafiek. diff --git a/reactos/base/applications/rapps/rapps/irfanviewplugins.txt b/reactos/base/applications/rapps/rapps/irfanviewplugins.txt index 60b134e2fa8..e12b1ad4f12 100644 --- a/reactos/base/applications/rapps/rapps/irfanviewplugins.txt +++ b/reactos/base/applications/rapps/rapps/irfanviewplugins.txt @@ -4,7 +4,7 @@ [Section] Name = IrfanView Plugins Version = 4.38 -Licence = Freeware (for personal use) +License = Freeware (for personal use) Description = Additional Plugins for supporting more file types. Size = 10.24 MB Category = 3 @@ -13,45 +13,45 @@ URLDownload = http://files.netmediaeurope.com/de-nmi/downloads/2014_download/irf CDPath = none [Section.0407] -Licence = Freeware für nichtkommerzielle Nutzung +License = Freeware für nichtkommerzielle Nutzung Description = Zusätzlich Plugins zur Unterstützung von weiteren Dateitypen. [Section.040a] -Licence = Gratuito (para uso personal) +License = Gratuito (para uso personal) Description = Complementos adicionales para soportar más formatos. [Section.040c] -Licence = Gratuit (pour un usage personnel) +License = Gratuit (pour un usage personnel) Description = Modules additionnels pour supporter plus de types de fichiers. Size = 10,24 Mo [Section.0410] -Licence = Gratuita (per uso personale) +License = Gratuita (per uso personale) Description = Plugins addizionale per il supporto di molti tipi di file. [Section.0413] -Licence = Freeware (voor persoonlijk gebruik) +License = Freeware (voor persoonlijk gebruik) Description = Toegevoegde plugins voor ondersteuning van extra bestandstypes. [Section.0415] -Licence = Freeware (dla użytku domowego) +License = Freeware (dla użytku domowego) Description = Wtyczki otwierające dodatkowe typy plików w Irfanview. [Section.0418] -Licence = Gratuită (pentru uz personal) +License = Gratuită (pentru uz personal) Description = Extensii adiționale pentru a spori numărul de formate de fișiere recunoscute. Size = 10,24 Mo [Section.041f] Name = IrfanView Eklentileri -Licence = Şahsî kullanım için ücretsiz. +License = Şahsî kullanım için ücretsiz. Description = Daha çok kütük türü desteklemek için eklentiler. Size = 10,24 MB [Section.0422] -Licence = Freeware (для домашнього використання) +License = Freeware (для домашнього використання) Description = Додаткові плагіни для підтримки більшої кількості файлових типів. [Section.0813] -Licence = Freeware (voor persoonlijk gebruik) +License = Freeware (voor persoonlijk gebruik) Description = Toegevoegde plugins voor ondersteuning van extra bestandstypes. diff --git a/reactos/base/applications/rapps/rapps/kdewin.txt b/reactos/base/applications/rapps/rapps/kdewin.txt index 974dcc9ba20..e2fc9e828c8 100644 --- a/reactos/base/applications/rapps/rapps/kdewin.txt +++ b/reactos/base/applications/rapps/rapps/kdewin.txt @@ -4,7 +4,7 @@ [Section] Name = K Desktop Environment Version = 1.0.0 -Licence = GPL +License = GPL Description = KDE for Windows. Size = 2.16 MB Category = 15 diff --git a/reactos/base/applications/rapps/rapps/kyodai.txt b/reactos/base/applications/rapps/rapps/kyodai.txt index 5ad84c2b330..fa316cdf25f 100644 --- a/reactos/base/applications/rapps/rapps/kyodai.txt +++ b/reactos/base/applications/rapps/rapps/kyodai.txt @@ -5,7 +5,7 @@ [Section] Name = Kyodai Mahjongg Version = 21.42 -Licence = Shareware +License = Shareware Description = One of the best Mahjongg Solitaire games out there. Size = 13.8 MB Category = 4 @@ -23,11 +23,11 @@ Description = Uno dei migliori giochi di Mahjongg Solitaire. Description = Jedna z najlepszych gier Mahjongg Solitaire. [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Unul dintre cele mai bune jocuri de pasiență Mahjongg. Size = 13,8 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Mahjong solitaire oyunları arasında en iyilerinden biri. Size = 13,8 MB diff --git a/reactos/base/applications/rapps/rapps/lazaruside.txt b/reactos/base/applications/rapps/rapps/lazaruside.txt index 62ea89eceda..66257e15758 100644 --- a/reactos/base/applications/rapps/rapps/lazaruside.txt +++ b/reactos/base/applications/rapps/rapps/lazaruside.txt @@ -5,7 +5,7 @@ [Section] Name = Lazarus Version = 1.2.6 -Licence = modified LGPL, GPL +License = modified LGPL, GPL Description = A cross-platform integrated development environment (IDE) that lets you create visual (GUI) and non-visual Object Pascal programs, and uses the Free Pascal compiler to generate your executable. Size = 107 MB Category = 7 @@ -23,10 +23,10 @@ Description = Wielopratformowe zintegrowane środowisko programistyczne (IDE) kt Description = Un ambiente di sviluppo integrato (IDE) cross-platform che consente di creare interfacce grafiche (GUI) e programmi non visivi Object Pascal, e utilizza il compilatore Free Pascal per generare l'eseguibile. [Section.0418] -Licence = GPL, LGPL modificată +License = GPL, LGPL modificată Description = Un mediu integrat de dezvoltare (IDE) multi-platformă care vă permite crearea de programe Object Pascal, atât vizuale (GUI) cât și ne-vizuale, și utilizează compilatorul Free Pascal pentru a genera executabile. Size = 107 Mo [Section.041f] -Licence = Değiştirilmiş LGPL, GPL +License = Değiştirilmiş LGPL, GPL Description = Görmelik (GUI) ve görmelik olmayan Object Pascal izlenceleri oluşturmanızı sağlayan, çalıştırılabilir kütüğünüzü oluşturmak için Free Pascal derleyicisini kullanan bir çapraz platform bir tümleşik geliştirme ortamı (IDE). diff --git a/reactos/base/applications/rapps/rapps/lbreakout2.txt b/reactos/base/applications/rapps/rapps/lbreakout2.txt index 07d017b615b..51c77f3493a 100644 --- a/reactos/base/applications/rapps/rapps/lbreakout2.txt +++ b/reactos/base/applications/rapps/rapps/lbreakout2.txt @@ -4,7 +4,7 @@ [Section] Name = LBreakout2 Version = 2.4.1 -Licence = GPL +License = GPL Description = Breakout Clone using SDL libs. Size = 3.03 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/lgeneral.txt b/reactos/base/applications/rapps/rapps/lgeneral.txt index 96dde00be75..c3461233416 100644 --- a/reactos/base/applications/rapps/rapps/lgeneral.txt +++ b/reactos/base/applications/rapps/rapps/lgeneral.txt @@ -4,7 +4,7 @@ [Section] Name = LGeneral Version = 1.1 -Licence = GPL +License = GPL Description = Panzer General Clone using SDL libs. Size = 1.92 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/librecad.txt b/reactos/base/applications/rapps/rapps/librecad.txt index b81ac0fc4c0..12cef97fdc0 100644 --- a/reactos/base/applications/rapps/rapps/librecad.txt +++ b/reactos/base/applications/rapps/rapps/librecad.txt @@ -4,7 +4,7 @@ [Section] Name = LibreCAD Version = 2.0.6 -Licence = GPLv2 +License = GPLv2 Description = LibreCAD is a free and open source 2D-CAD application for Windows, Linux and OS X. Size = 28.7 MB Category = 3 @@ -16,6 +16,6 @@ CDPath = none Description = LibreCAD ist ein kostenloses und quelloffenes 2D-CAD Programm für Windows, Linux und OS X. [Section.041f] -Licence = GPL 2. sürüm +License = GPL 2. sürüm Description = LibreCAD; Windows, Linux ve OS X için özgür ve açık kaynak bir 2 boyutlu CAD uygulamasıdır. Size = 28,7 MB diff --git a/reactos/base/applications/rapps/rapps/libreoffice.txt b/reactos/base/applications/rapps/rapps/libreoffice.txt index c3e32d9cd5d..67e1df78d82 100644 --- a/reactos/base/applications/rapps/rapps/libreoffice.txt +++ b/reactos/base/applications/rapps/rapps/libreoffice.txt @@ -4,7 +4,7 @@ [Section] Name = LibreOffice Version = 4.3.4 -Licence = LGPL +License = LGPL Description = A powerful and open source office suite. It has been forked from OpenOffice. Size = 215.23 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/libreofficehelp.txt b/reactos/base/applications/rapps/rapps/libreofficehelp.txt index 59e540ea92e..f4ba28944d3 100644 --- a/reactos/base/applications/rapps/rapps/libreofficehelp.txt +++ b/reactos/base/applications/rapps/rapps/libreofficehelp.txt @@ -4,7 +4,7 @@ [Section] Name = LibreOffice Help Pack Version = For LibreOffice 4.3.4 -Licence = GPLv3 +License = GPLv3 Description = Offline help content of LibreOffice. Size = 5.06 MB Category = 6 @@ -22,7 +22,7 @@ URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.3.4/wi [Section.041f] Name = LibreOffice Yardım Paketi Version = LibreOffice 4.3.4 için -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = LibreOffice'in çevrim dışı yardım içeriği. Size = 6,79 MB URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.3.4/win/x86/LibreOffice_4.3.4_Win_x86_helppack_tr.msi diff --git a/reactos/base/applications/rapps/rapps/lmarbles.txt b/reactos/base/applications/rapps/rapps/lmarbles.txt index 9812d030f25..48ae2c45a15 100644 --- a/reactos/base/applications/rapps/rapps/lmarbles.txt +++ b/reactos/base/applications/rapps/rapps/lmarbles.txt @@ -4,7 +4,7 @@ [Section] Name = LMarbles Version = 1.0.6 -Licence = GPL +License = GPL Description = Atomix Clone using SDL libs. Size = 1.39 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/mcwin32.txt b/reactos/base/applications/rapps/rapps/mcwin32.txt index f244ccb07e7..52b1e00d7e7 100644 --- a/reactos/base/applications/rapps/rapps/mcwin32.txt +++ b/reactos/base/applications/rapps/rapps/mcwin32.txt @@ -4,7 +4,7 @@ [Section] Name = Midnight Commander for Windows Version = Build 185 (4.8.12) -Licence = GPLv3 +License = GPLv3 Description = 32-bit Windows port of GNU Midnight Commander. Size = 2.35 MB Category = 12 @@ -15,12 +15,12 @@ CDPath = none [Section.0410] Name = Midnight Commander per Windows Version = Revisione 185 (4.8.12) -Licence = GPL versione 3 +License = GPL versione 3 Description = Un porting Windows 32bit di Midnight Commander. [Section.0415] Name = Midnight Commander dla Windows -Licence = GPL wersja 3 +License = GPL wersja 3 Description = 32-bitowy port GNU Midnight Commander dla Windows. [Section.0418] @@ -32,6 +32,6 @@ Size = 2,35 Mo [Section.041f] Name = Midnight Commander (Windows için) Version = Yapı 185 (4.8.12) -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = GNU Midnight Commander'ın 32 bitlik Windows uyarlamasıdır. Size = 2,35 MB diff --git a/reactos/base/applications/rapps/rapps/mfc40.txt b/reactos/base/applications/rapps/rapps/mfc40.txt index 84e80226bf2..295069caee5 100644 --- a/reactos/base/applications/rapps/rapps/mfc40.txt +++ b/reactos/base/applications/rapps/rapps/mfc40.txt @@ -4,7 +4,7 @@ [Section] Name = OLE Viewer and Microsoft Foundation Classes version 4 Version = 4.0 -Licence = Unknown +License = Unknown Description = MFC 4 is needed by some applications. Contains: mfc40.dll, msvcrt40.dll. Size = 865.04 kB Category = 14 @@ -14,49 +14,49 @@ CDPath = none [Section.0407] Name = OLE Anzeige und Microsoft Foundation Classes Version 4 -Licence = Unbekannt +License = Unbekannt Description = MFC 4 wird von einigen Anwendungen benötigt. Beinhaltet: mfc40.dll, msvcrt40.dll. [Section.040a] Name = Visor OLE y Microsoft Foundation Classes Version 4 -Licence = Desconocida +License = Desconocida Description = MFC 4 es necesario para varias aplicaciones. Incluye: mfc40.dll, msvcrt40.dll. [Section.040c] Name = Visionneur OLE et Microsoft Foundation Classes version 4 -Licence = Inconnue +License = Inconnue Description = MFC 4 est nécessaire pour certaines applications. Contient: mfc40.dll, msvcrt40.dll. Size = 865,04 ko [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = MFC 4 è necessario per alcune applicazioni. Contiene: mfc40.dll, msvcrt40.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = MFC 4 is nodig voor bepaalde applicaties. Bevat: mfc40.dll, msvcrt40.dll. [Section.0415] Name = Przeglądarka OLE oraz MFC (Microsoft Foundation Classes) wersja 4 -Licence = Nieznana +License = Nieznana Description = Biblioteka MFC 4 jest używana przez część aplikacji. Zawiera: mfc40.dll, msvcrt40.dll. [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = MFC 4 este necesară unor aplicații. Conține: mfc40.dll, msvcrt40.dll. Size = 865,04 ko [Section.041f] Name = OLE Görüntüleyicisi ve Microsoft Ana Sınıfları (MFC) Sürüm 4 -Licence = Bilinmiyor +License = Bilinmiyor Description = MFC 4, birtakım uygulamalar için gereklidir. Şunları içerir: mfc40.dll, msvcrt40.dll. Size = 865,04 KB [Section.0422] Name = Переглядач OLE та MFC (Microsoft Foundation Classes) версія 4 -Licence = Невідома +License = Невідома Description = Бібліотека MFC 4 необхідна декотрим програмам. включає: mfc40.dll, msvcrt40.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = MFC 4 is nodig voor bepaalde applicaties. Bevat: mfc40.dll, msvcrt40.dll. diff --git a/reactos/base/applications/rapps/rapps/miktex.txt b/reactos/base/applications/rapps/rapps/miktex.txt index fed0de25006..61fbc815ddc 100644 --- a/reactos/base/applications/rapps/rapps/miktex.txt +++ b/reactos/base/applications/rapps/rapps/miktex.txt @@ -4,7 +4,7 @@ [Section] Name = MikTEX 2.9 Version = 2.9.5105 -Licence = Freeware +License = Freeware Description = MiKTeX is an up-to-date implementation of TeX/LaTeX and related programs for Windows. Size = 163.18 MB Category = 6 @@ -16,11 +16,11 @@ CDPath = none Description = MiKTeX ist eine aktuelle Implementierung von TeX/LaTeX und zugehöriger Programme für Windows. [Section.0418] -Licence = Gratuită +License = Gratuită Description = MikTEX este o implementare actualizată de TeX/LaTeX și aprogramelor aferente. Size = 163,18 Mo [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = MiKTeX, Windows için, TeX'in, LaTeX'in ve ilişkili izlencelerin bir şimdiki uygulaması. Size = 163,18 MB diff --git a/reactos/base/applications/rapps/rapps/mirandaim.txt b/reactos/base/applications/rapps/rapps/mirandaim.txt index 86ea0a92cba..32d3c75b661 100644 --- a/reactos/base/applications/rapps/rapps/mirandaim.txt +++ b/reactos/base/applications/rapps/rapps/mirandaim.txt @@ -4,7 +4,7 @@ [Section] Name = Miranda IM Version = 0.10.24 -Licence = GPL +License = GPL Description = Open source multiprotocol instant messaging application - May not work completely. Size = 3.77 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/mirc.txt b/reactos/base/applications/rapps/rapps/mirc.txt index 4a36a8e67ab..05d8d343c69 100644 --- a/reactos/base/applications/rapps/rapps/mirc.txt +++ b/reactos/base/applications/rapps/rapps/mirc.txt @@ -4,7 +4,7 @@ [Section] Name = mIRC 7 Version = 7.36 -Licence = Shareware +License = Shareware Description = The most popular client for the Internet Relay Chat (IRC). Size = 2.17 MB Category = 5 @@ -32,12 +32,12 @@ Description = De meest populaire afnemer voor Internet Relay Chat (IRC). Description = Najpopularniejszy klient IRC (Internet Relay Chat). [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Cel mai popular client de IRC (Internet Relay Chat). Size = 2,17 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Umûmî Ağ Eş Zamanlı Söyleşi (IRC) için en çok tutulan istemci. Size = 2,17 MB diff --git a/reactos/base/applications/rapps/rapps/mirc6.txt b/reactos/base/applications/rapps/rapps/mirc6.txt index 70327578535..bf1528b4c2b 100644 --- a/reactos/base/applications/rapps/rapps/mirc6.txt +++ b/reactos/base/applications/rapps/rapps/mirc6.txt @@ -4,7 +4,7 @@ [Section] Name = mIRC 6 Version = 6.35 -Licence = Shareware +License = Shareware Description = The most popular client for the Internet Relay Chat (IRC). Size = 1.67 MB Category = 5 @@ -32,12 +32,12 @@ Description = De meest populaire afnemer voor Internet Relay Chat (IRC). Description = Najpopularniejszy klient IRC (Internet Relay Chat). [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Cel mai popular client de IRC (Internet Relay Chat). Size = 1,67 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Umûmî Ağ Eş Zamanlı Söyleşi (IRC) için en çok tutulan istemci. Size = 1,67 MB diff --git a/reactos/base/applications/rapps/rapps/mono2.txt b/reactos/base/applications/rapps/rapps/mono2.txt index 27b8ab88052..8113e192dd1 100644 --- a/reactos/base/applications/rapps/rapps/mono2.txt +++ b/reactos/base/applications/rapps/rapps/mono2.txt @@ -4,7 +4,7 @@ [Section] Name = Mono .NET Development Framework Version = 3.2.3 -Licence = Unknown +License = Unknown Description = Open-source .NET Framework. Size = 98.49 MB Category = 14 @@ -29,13 +29,13 @@ Description = Versione Open-source di .NET Framework. Description = Pakiet Mono .NET Framework dla Programistów. [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Platformă .NET (cu surse deschise). Size = 98,49 Mo [Section.041f] Name = Mono .NET Geliştirme Çatısı -Licence = Bilinmiyor +License = Bilinmiyor Description = Açık kaynak .NET Çatısı. Size = 98,49 MB diff --git a/reactos/base/applications/rapps/rapps/mpc.txt b/reactos/base/applications/rapps/rapps/mpc.txt index 427ecbbd3b5..7165e9ae3db 100644 --- a/reactos/base/applications/rapps/rapps/mpc.txt +++ b/reactos/base/applications/rapps/rapps/mpc.txt @@ -4,7 +4,7 @@ [Section] Name = Media Player Classic Home Cinema Version = 1.7.7 -Licence = GPL +License = GPL Description = A media player. Size = 10.7 MB Category = 2 diff --git a/reactos/base/applications/rapps/rapps/mpxplay.txt b/reactos/base/applications/rapps/rapps/mpxplay.txt index 00f9e566c76..e155a03e72c 100644 --- a/reactos/base/applications/rapps/rapps/mpxplay.txt +++ b/reactos/base/applications/rapps/rapps/mpxplay.txt @@ -5,7 +5,7 @@ [Section] Name = Mpxplay Version = 1.60b -Licence = GPL +License = GPL Description = Mpxplay is a 32-bit console audio player for Windows. You need 7-Zip or a similar Utility to extract it. Size = 520 kB Category = 1 diff --git a/reactos/base/applications/rapps/rapps/msxml3.txt b/reactos/base/applications/rapps/rapps/msxml3.txt index 70c46fac930..edb8fe80d84 100644 --- a/reactos/base/applications/rapps/rapps/msxml3.txt +++ b/reactos/base/applications/rapps/rapps/msxml3.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft XML 3 Version = 3.0 -Licence = Unknown +License = Unknown Description = MSXML3 is needed for some MSI Installers. Contains: msxml3.dll, msxml3a.dll, msxml3r.dll. Size = 1.85 MB Category = 14 @@ -13,44 +13,44 @@ URLDownload = ftp://ftp.uni-rostock.de/pub/tools/microsoft/XML/US/msxml3.msi CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = MSXML3 wird von einigen MSI Installern benötigt. Beinhaltet: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = MSXML3 para varios instaladores MSI. Incluye: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = MSXML3 est nécessaire pour certains installateurs MSI. Contient: msxml3.dll, msxml3a.dll, msxml3r.dll. Size = 1,85 Mo [Section.0410] -Licence = Sconosciuto +License = Sconosciuto Description = MSXML3 è necessario per alcuni installatori MSI. Contiene: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = MSXML3 is nodig voor bepaalde MSI installaties. Bevat: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Niektóre spośród plików instalacyjnych MSI potrzebują parsera MSXML3. Zawiera: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = MSXML3 este necesar unor Instalatori MSI. Conține: msxml3.dll, msxml3a.dll, msxml3r.dll. Size = 1,85 Mo [Section.041f] -Licence = Bilinmiyor +License = Bilinmiyor Description = MSXML3, birtakım Microsoft Yükleyicileri için gereklidir. Şunları içerir: msxml3.dll, msxml3a.dll, msxml3r.dll. Size = 1,85 MB [Section.0422] -Licence = Невідома +License = Невідома Description = MSXML3 необхідна для декотрих MSI інсталяторів. включає: msxml3.dll, msxml3a.dll, msxml3r.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = MSXML3 is nodig voor bepaalde MSI installaties. Bevat: msxml3.dll, msxml3a.dll, msxml3r.dll. diff --git a/reactos/base/applications/rapps/rapps/net11.txt b/reactos/base/applications/rapps/rapps/net11.txt index 6a2cf8f1af1..6f022f089e2 100644 --- a/reactos/base/applications/rapps/rapps/net11.txt +++ b/reactos/base/applications/rapps/rapps/net11.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft .NET Framework Version 1.1 Redistributable Package Version = 1.1 -Licence = Unknown +License = Unknown Description = Microsoft .NET Framework Version 1.1 - Redistributable Package. Size = 23.14 MB Category = 14 @@ -43,13 +43,13 @@ URLSite = http://www.microsoft.com/pl-PL/download/details.aspx?id=26 URLDownload = http://download.microsoft.com/download/c/9/f/c9f672f3-c14b-4cff-9671-d419842d792d/dotnetfx.exe [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Platforma Microsoft .NET versiunea 1.1 - Pachet redistributabil. Size = 23,14 Mo [Section.041f] Name = Microsoft .NET Çatısı Sürüm 1.1 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft .NET Çatısı Sürüm 1.1 - Yeniden Dağıtılabilir Paket Size = 23,14 MB URLSite = http://www.microsoft.com/tr-TR/download/details.aspx?id=26 diff --git a/reactos/base/applications/rapps/rapps/net20.txt b/reactos/base/applications/rapps/rapps/net20.txt index 91e2e775dc0..818b079ad59 100644 --- a/reactos/base/applications/rapps/rapps/net20.txt +++ b/reactos/base/applications/rapps/rapps/net20.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft .NET Framework Version 2.0 Redistributable Package Version = 2.0 -Licence = Unknown +License = Unknown Description = Microsoft .NET Framework Version 2.0 - Redistributable Package. Size = 22.42 MB Category = 14 @@ -30,12 +30,12 @@ Size = 22.42 MB Description = Microsoft .NET Framework Wersja 2.0 - Pakiet Dystrybucyjny. [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Platforma Microsoft .NET versiunea 2.0 - Pachet redistributabl. Size = 22,42 Mo [Section.041f] Name = Microsoft .NET Çatısı Sürüm 2.0 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft .NET Çatısı Sürüm 2.0 - Yeniden Dağıtılabilir Paket Size = 22,42 MB diff --git a/reactos/base/applications/rapps/rapps/net20sp2.txt b/reactos/base/applications/rapps/rapps/net20sp2.txt index f11e5a45963..9db96a245a6 100644 --- a/reactos/base/applications/rapps/rapps/net20sp2.txt +++ b/reactos/base/applications/rapps/rapps/net20sp2.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft .NET Framework Version 2.0 Service Pack 2 Version = 2.0SP2 -Licence = Unknown +License = Unknown Description = Microsoft .NET Framework Version 2.0 Service Pack 2. Size = 23.84 MB Category = 14 @@ -35,13 +35,13 @@ Description = Microsoft .NET Framework Wersja 2.0 Service Pack 2. URLSite = http://www.microsoft.com/pl-PL/download/details.aspx?id=1639 [Section.0418] -Licence = Nespecificată +License = Nespecificată Description = Platforma Microsoft .NET versiunea 2.0 - Service Pack 2. Size = 23,84 Mo [Section.041f] Name = Microsoft .NET Çatısı Sürüm 2.0 Hizmet Paketi 2 -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft .NET Çatısı Sürüm 2.0 - Hizmet Paketi 2 Size = 23,84 MB URLSite = http://www.microsoft.com/tr-TR/download/details.aspx?id=1639 diff --git a/reactos/base/applications/rapps/rapps/nirlauncher.txt b/reactos/base/applications/rapps/rapps/nirlauncher.txt index 53a65115b1c..59e3f309f8d 100644 --- a/reactos/base/applications/rapps/rapps/nirlauncher.txt +++ b/reactos/base/applications/rapps/rapps/nirlauncher.txt @@ -4,7 +4,7 @@ [Section] Name = NirLauncher Version = 1.19.5 -Licence = Freeware +License = Freeware Description = A package of more than 180 utilities for Windows. Size = 20.2 MB Category = 12 @@ -16,5 +16,5 @@ CDPath = none Description = Ein Paket von mehr als 180 Utilities für Windows. [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Windows için 180 araçtan daha çoğunun bir paketi. diff --git a/reactos/base/applications/rapps/rapps/npp.txt b/reactos/base/applications/rapps/rapps/npp.txt index f6262a7f441..31a701265ad 100644 --- a/reactos/base/applications/rapps/rapps/npp.txt +++ b/reactos/base/applications/rapps/rapps/npp.txt @@ -4,7 +4,7 @@ [Section] Name = Notepad++ Version = 6.6.9 -Licence = GPL +License = GPL Description = A text editor. Size = 7.58 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/offbyone.txt b/reactos/base/applications/rapps/rapps/offbyone.txt index 5154ff79884..ca4acda950a 100644 --- a/reactos/base/applications/rapps/rapps/offbyone.txt +++ b/reactos/base/applications/rapps/rapps/offbyone.txt @@ -4,7 +4,7 @@ [Section] Name = Off By One Browser Version = 3.5d -Licence = Freeware +License = Freeware Description = The Off By One Browser is a very small and fast web browser with full HTML 3.2 support. Size = 1010.89 kB Category = 5 @@ -35,13 +35,13 @@ Description = Off By One Browser is een uiterst kleine en snelle web browser met Description = Bardzo mała i szybka przeglądarka internetowa z pełną obsługą HTML 3.2. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un navigator web foarte mic și rapid compatibil cu HTML 3.2. Size = 1010,89 ko [Section.041f] Name = Off By One Tarayıcı -Licence = Ücretsiz +License = Ücretsiz Description = Off By One Tarayıcı, eksiksiz HTML 3.2 desteğiyle çok küçük ve hızlı bir Umûmî Ağ tarayıcısıdır. Size = 1010,89 KB diff --git a/reactos/base/applications/rapps/rapps/openoffice.txt b/reactos/base/applications/rapps/rapps/openoffice.txt index 75b6437a9f9..5eb9685711d 100644 --- a/reactos/base/applications/rapps/rapps/openoffice.txt +++ b/reactos/base/applications/rapps/rapps/openoffice.txt @@ -4,7 +4,7 @@ [Section] Name = OpenOffice 4.1 Version = 4.1.1 -Licence = LGPL +License = LGPL Description = The open source office suite. Size = 140.9 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/openoffice2.4.txt b/reactos/base/applications/rapps/rapps/openoffice2.4.txt index a84fd1ae4aa..0ce0f347730 100644 --- a/reactos/base/applications/rapps/rapps/openoffice2.4.txt +++ b/reactos/base/applications/rapps/rapps/openoffice2.4.txt @@ -4,7 +4,7 @@ [Section] Name = OpenOffice 2.4 Version = 2.4.3 -Licence = LGPL +License = LGPL Description = The open source office suite. Size = 113 MB Category = 6 diff --git a/reactos/base/applications/rapps/rapps/openttd.txt b/reactos/base/applications/rapps/rapps/openttd.txt index 69b54088788..01e8f0b74cb 100644 --- a/reactos/base/applications/rapps/rapps/openttd.txt +++ b/reactos/base/applications/rapps/rapps/openttd.txt @@ -4,7 +4,7 @@ [Section] Name = OpenTTD Version = 1.4.4 -Licence = GPL v2 +License = GPL v2 Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon. Size = 7.0 MB Category = 4 @@ -36,7 +36,7 @@ Description = Clona (cu surse deschise a) motorului de joc "Transport Tycoon Del Size = 7,0 Mo [Section.041f] -Licence = GPL 2. sürüm +License = GPL 2. sürüm Description = "Transport Tycoon Deluxe" oyun motorunun açık kaynak taklidi. Transport Tycoon'un bir kopyası gerekir. Size = 7,0 MB diff --git a/reactos/base/applications/rapps/rapps/opera.txt b/reactos/base/applications/rapps/rapps/opera.txt index f27bf72fa2e..67806735f8d 100644 --- a/reactos/base/applications/rapps/rapps/opera.txt +++ b/reactos/base/applications/rapps/rapps/opera.txt @@ -4,7 +4,7 @@ [Section] Name = Opera Version = 12.17 -Licence = Freeware +License = Freeware Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client. Size = 12.57 MB Category = 5 @@ -35,7 +35,7 @@ Description = De populaire Opera Browser met vele gevorderde mogelijkheden, incl Description = Popularna przeglądarka internetowa z wieloma zaawansowanymi funkcjami, zawierająca klientów: poczty oraz BitTorrent. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Navigatorul popular Opera cu multe funcționalități avansate incluzând poștă electronică și un client de BitTorrent. Size = 12,57 Mo @@ -43,7 +43,7 @@ Size = 12,57 Mo Description = Популярный браузер со многими дополнительными возможностями, включающий клиентов почты и BitTorrent. [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Bir posta ve BitTorrent istemcisini kapsayan birçok gelişmiş husûsiyetle, tutulan Opera Tarayıcı. Size = 12,57 MB diff --git a/reactos/base/applications/rapps/rapps/opera9.txt b/reactos/base/applications/rapps/rapps/opera9.txt index 74e8511130f..00c9c92c103 100644 --- a/reactos/base/applications/rapps/rapps/opera9.txt +++ b/reactos/base/applications/rapps/rapps/opera9.txt @@ -4,7 +4,7 @@ [Section] Name = Opera Version = 9.64 -Licence = Freeware +License = Freeware Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client. Size = 7.21 MB Category = 5 @@ -35,7 +35,7 @@ Description = De populaire Opera Browser met vele gevorderde mogelijkheden, incl Description = Popularna przeglądarka internetowa z wieloma zaawansowanymi funkcjami, zawierająca klientów: poczty oraz BitTorrent. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Navigatorul popular Opera cu multe funcționalități avansate incluzând poștă electronică și un client de BitTorrent. Size = 7,21 Mo @@ -43,7 +43,7 @@ Size = 7,21 Mo Description = Популярный браузер со многими дополнительными возможностями, включающий клиентов почты и BitTorrent. [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Bir posta ve BitTorrent istemcisini kapsayan birçok gelişmiş husûsiyetle, tutulan Opera Tarayıcı. Size = 7,21 MB diff --git a/reactos/base/applications/rapps/rapps/peazip.txt b/reactos/base/applications/rapps/rapps/peazip.txt index fcfe24b924e..87be8423bd3 100644 --- a/reactos/base/applications/rapps/rapps/peazip.txt +++ b/reactos/base/applications/rapps/rapps/peazip.txt @@ -4,7 +4,7 @@ [Section] Name = PeaZip Version = 5.5.0 -Licence = LGPL v3, OpenCandy EULA +License = LGPL v3, OpenCandy EULA Description = PeaZip is a free, cross-platform, open source file and archive manager. It supports over 150 archive formats. Size = 5.9 MB Category = 12 @@ -26,6 +26,6 @@ Description = PeaZip este un gestionar de fișiere și arhive gratuit, multi-pla Size = 5,9 Mo [Section.041f] -Licence = LGPL 3. sürüm, OpenCandy EULA +License = LGPL 3. sürüm, OpenCandy EULA Description = PeaZip; ücretsiz, çapraz platform, açık kaynak kütük ve belgelik yöneticisidir. 150'den çok belgelikleme biçimini destekler. Size = 5,9 MB diff --git a/reactos/base/applications/rapps/rapps/pengupop.txt b/reactos/base/applications/rapps/rapps/pengupop.txt index ac058a0bfd6..17b24474673 100644 --- a/reactos/base/applications/rapps/rapps/pengupop.txt +++ b/reactos/base/applications/rapps/rapps/pengupop.txt @@ -5,7 +5,7 @@ [Section] Name = Pengupop Version = 2.2.3 -Licence = GPL +License = GPL Description = The purpose of this game is to shoot colored orbs into your playfield, so they form groups of three or more. Size = 384 kB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/photofiltre.txt b/reactos/base/applications/rapps/rapps/photofiltre.txt index 2d5a348ca1c..2976ff6665d 100644 --- a/reactos/base/applications/rapps/rapps/photofiltre.txt +++ b/reactos/base/applications/rapps/rapps/photofiltre.txt @@ -5,7 +5,7 @@ [Section] Name = PhotoFiltre 7 Version = 7.1.2 -Licence = Freeware +License = Freeware Description = This version with layers but more limited than the Studio X version. PhotoFiltre Studio is a complete image retouching program. Size = 4.99 MB Category = 3 @@ -23,11 +23,11 @@ Description = Ta wersja obsługuje warstwy, ale ma większe ograniczenia od Stud Description = Questa versione con pannelli ma più limitata della versione Studio X. PhotoFiltre Studio è un programma di fotoritocco completo. [Section.0418] -Licence = Gratuită +License = Gratuită Description = PhotoFiltre Studio este o aplicație completă de retușare a imaginilor. Size = 4,99 Mo [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Bu sürüm, katmanlarla gelmektedir ancak Studio X sürümünden daha kısıtlıdır. PhotoFiltre Studio eksiksiz bir resim düzeltme yazılımıdır. Size = 4,99 MB diff --git a/reactos/base/applications/rapps/rapps/pingus.txt b/reactos/base/applications/rapps/rapps/pingus.txt index 661ced3b738..cb1d4cf5d56 100644 --- a/reactos/base/applications/rapps/rapps/pingus.txt +++ b/reactos/base/applications/rapps/rapps/pingus.txt @@ -5,7 +5,7 @@ [Section] Name = Pingus Version = 0.7.6 -Licence = GPL +License = GPL Description = Pingus is a free Lemmings-like puzzle game. Size = 16.0 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/pptview.txt b/reactos/base/applications/rapps/rapps/pptview.txt index 378207f5719..34fa7f25075 100644 --- a/reactos/base/applications/rapps/rapps/pptview.txt +++ b/reactos/base/applications/rapps/rapps/pptview.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Powerpoint Viewer Version = 2010 -Licence = Unknown +License = Unknown Description = Microsoft Powerpoint Viewer Size = 60.28 MB Category = 6 @@ -13,55 +13,55 @@ URLDownload = http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Size = 60.43 MB URLDownload = http://download.microsoft.com/download/9/F/7/9F742C8F-8C70-4498-B4D1-539BE36A1077/PowerPointViewer.exe [Section.040a] -Licence = Desconocida +License = Desconocida Size = 60.48 MB URLDownload = http://download.microsoft.com/download/C/1/A/C1AAD042-4407-4470-97CB-863B869F9EDF/PowerPointViewer.exe [Section.040c] -Licence = Inconnue +License = Inconnue Size = 60,41 Mo URLDownload = http://download.microsoft.com/download/6/B/4/6B4CA627-C0CD-4B27-BE31-0B87AE10F46B/PowerPointViewer.exe [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Size = 60.38 MB URLDownload = http://download.microsoft.com/download/3/F/A/3FA9171A-B310-4F0D-A33A-B16827536FAE/PowerPointViewer.exe [Section.0413] -Licence = Ongekend +License = Ongekend Size = 60.33 MB URLDownload = http://download.microsoft.com/download/9/A/8/9A89B545-E4F4-498C-B265-D74CBB89F4D9/PowerPointViewer.exe [Section.0415] -Licence = Nieznana +License = Nieznana Size = 60.43 MB URLDownload = http://download.microsoft.com/download/9/E/4/9E4A5F9A-210D-44B7-ADA2-F47CE00541ED/PowerPointViewer.exe [Section.0418] Name = Lector Microsoft Powerpoint -Licence = Necunoscută +License = Necunoscută Description = Lector Microsoft Powerpoint Size = 60,4 Mo URLDownload = http://download.microsoft.com/download/5/6/E/56E4DBA3-D725-43EA-B1E5-DC148022999C/PowerPointViewer.exe [Section.041f] Name = Microsoft Powerpoint Görüntüleyici -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Powerpoint Görüntüleyici Size = 60,4 MB URLDownload = http://download.microsoft.com/download/4/6/4/4641DACB-5DE8-4E3A-B8F4-39A1C73889D3/PowerPointViewer.exe [Section.0422] -Licence = Невідома +License = Невідома Size = 60.52 MB URLDownload = http://download.microsoft.com/download/C/E/8/CE879E6E-D3F3-4234-A968-9651A3A85D98/PowerPointViewer.exe [Section.0813] -Licence = Ongekend +License = Ongekend Size = 60.33 MB URLDownload = http://download.microsoft.com/download/9/A/8/9A89B545-E4F4-498C-B265-D74CBB89F4D9/PowerPointViewer.exe diff --git a/reactos/base/applications/rapps/rapps/precisecalc.txt b/reactos/base/applications/rapps/rapps/precisecalc.txt index 8246ba5ff59..fbfad92b4a3 100644 --- a/reactos/base/applications/rapps/rapps/precisecalc.txt +++ b/reactos/base/applications/rapps/rapps/precisecalc.txt @@ -4,7 +4,7 @@ [Section] Name = Precise Calculator Version = 2.5 -Licence = GPLv3 +License = GPLv3 Description = Precise Calculator is a free and open source scientific calculator for Windows. You need a ZIP decompression program to install it. Size = 151 kB Category = 11 @@ -13,6 +13,6 @@ URLDownload = http://download.sourceforge.net/preccalc/preccalc-32bit.zip CDPath = none [Section.041f] -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = Precise Hesap Makinesi, Windows için özgür ve açık kaynak bir bilimlik hesap makinesidir. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 151 KB diff --git a/reactos/base/applications/rapps/rapps/pspad.txt b/reactos/base/applications/rapps/rapps/pspad.txt index 8fe91ecdd35..18f8af9f9a5 100644 --- a/reactos/base/applications/rapps/rapps/pspad.txt +++ b/reactos/base/applications/rapps/rapps/pspad.txt @@ -5,7 +5,7 @@ [Section] Name = PSPad Version = 4.5.8 -Licence = Freeware +License = Freeware Description = A text editor. Size = 4.46 MB Category = 6 @@ -37,7 +37,7 @@ Description = Een teksteditor. Description = Edytor tekstu. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un editor de text. Size = 4,46 Mo @@ -50,7 +50,7 @@ Description = Textový editor. URLSite = http://www.pspad.com/sk/ [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Bir metin düzenleyicisi. Size = 4,46 MB diff --git a/reactos/base/applications/rapps/rapps/ptanks.txt b/reactos/base/applications/rapps/rapps/ptanks.txt index 271b6991836..52db7c66ecf 100644 --- a/reactos/base/applications/rapps/rapps/ptanks.txt +++ b/reactos/base/applications/rapps/rapps/ptanks.txt @@ -5,7 +5,7 @@ [Section] Name = Pocket Tanks Version = 1.6 -Licence = Shareware +License = Shareware Description = The fastest game of artillery you'll ever play. Size = 2.86 MB Category = 4 @@ -23,11 +23,11 @@ Description = Il gioco d'artiglieria più veloce a cui potrai giocare. Description = Szybka gra artyleryjska [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Cel mai rapid joc de artilerie pe care-l veți juca vreodată. Size = 2,86 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Şimdiye dek oynayacağınız en hızlı topçuluk oyunu. Size = 2,86 MB diff --git a/reactos/base/applications/rapps/rapps/putty.txt b/reactos/base/applications/rapps/rapps/putty.txt index 84c56761457..3c87fd98003 100644 --- a/reactos/base/applications/rapps/rapps/putty.txt +++ b/reactos/base/applications/rapps/rapps/putty.txt @@ -4,7 +4,7 @@ [Section] Name = PuTTY Version = 0.63 -Licence = MIT +License = MIT Description = A free SSH, Telnet, rlogin, and raw TCP client. Size = 1.78 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/python.txt b/reactos/base/applications/rapps/rapps/python.txt index 995c880c823..1e4bfcc41a5 100644 --- a/reactos/base/applications/rapps/rapps/python.txt +++ b/reactos/base/applications/rapps/rapps/python.txt @@ -4,7 +4,7 @@ [Section] Name = Python 3 Version = 3.4.2 -Licence = GPL/LGPL +License = GPL/LGPL Description = A remarkably powerful dynamic programming language. Size = 23.39 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/python2.txt b/reactos/base/applications/rapps/rapps/python2.txt index 4bbbcc6c15b..b30b7762f8a 100644 --- a/reactos/base/applications/rapps/rapps/python2.txt +++ b/reactos/base/applications/rapps/rapps/python2.txt @@ -4,7 +4,7 @@ [Section] Name = Python 2 Version = 2.7.8 -Licence = GPL/LGPL +License = GPL/LGPL Description = A remarkably powerful dynamic programming language. Size = 15.93 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/qb64sdl.txt b/reactos/base/applications/rapps/rapps/qb64sdl.txt index ae334963d4b..98dee7aa862 100644 --- a/reactos/base/applications/rapps/rapps/qb64sdl.txt +++ b/reactos/base/applications/rapps/rapps/qb64sdl.txt @@ -5,7 +5,7 @@ [Section] Name = QB64 (SDL version) Version = 0.980 -Licence = Freeware +License = Freeware Description = QB64 is a self-hosting BASIC compiler for Microsoft Windows, Linux and Mac OS X, designed to be compatible with Microsoft QBasic and Microsoft QuickBASIC. You need 7-Zip or a similar utility to extract it. Size = 39.0 MB Category = 7 @@ -23,12 +23,12 @@ Description = QB64 è un compilatore auto ospitante per Microsoft Windows, Linux Description = QB64 to kompilator BASIC zdolny do kompilacji własnego kodu źródłowego. Działa w systemach Windows, Linux i Mac OS X. Jest kompatybilny z Microsoft QBasic i QuickBASIC. Wymaga programu archiwizującego do wypakowania. [Section.0418] -Licence = Gratuită +License = Gratuită Description = QB64 este un compilator BASIC auto-compilabil pentru Windows, Linux și Mac OS X, conceput pentru a fi compatibil cu Microsoft QBasic și Microsoft QuickBASIC. Este necesar un utilitar de derarhivare de tip ZIP. Size = 39,0 Mo [Section.041f] Name = QB64 (SDL sürümü) -Licence = Ücretsiz +License = Ücretsiz Description = QB64; Microsoft Windows, Linux ve Mac OS X için, Microsoft QBasic ve Microsoft QuickBASIC ile uyumlu olacak biçimde tasarlanmış, kendi kendini derleyen bir BASIC derleyicisidir. Çıkartmak için 7-Zip ya da benzeri bir yazılım kullanmanız gerekir. Size = 39,0 MB diff --git a/reactos/base/applications/rapps/rapps/qmmp.txt b/reactos/base/applications/rapps/rapps/qmmp.txt index be58282ca62..a1e7de346be 100644 --- a/reactos/base/applications/rapps/rapps/qmmp.txt +++ b/reactos/base/applications/rapps/rapps/qmmp.txt @@ -5,7 +5,7 @@ [Section] Name = Qmmp (Qt-based Multimedia Player) Version = 0.8.2 -Licence = GPL +License = GPL Description = Qmmp is an audio-player, written with the help of the Qt library. The user interface is similar to WinAMP or XMMS. Alternative user interfaces also are available. Size = 12.66 MB Category = 1 diff --git a/reactos/base/applications/rapps/rapps/remood.txt b/reactos/base/applications/rapps/rapps/remood.txt index 8d5aad16c01..920ad4f068f 100644 --- a/reactos/base/applications/rapps/rapps/remood.txt +++ b/reactos/base/applications/rapps/rapps/remood.txt @@ -4,7 +4,7 @@ [Section] Name = ReMooD Version = 0.8a -Licence = GPL +License = GPL Description = ReMooD is a source port of Doom Legacy. It aims to provide the classic Legacy experience with new features and more stability. Size = 1.15 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/reshack.txt b/reactos/base/applications/rapps/rapps/reshack.txt index c461c41d3fd..17462bba0a3 100644 --- a/reactos/base/applications/rapps/rapps/reshack.txt +++ b/reactos/base/applications/rapps/rapps/reshack.txt @@ -5,7 +5,7 @@ [Section] Name = Resource Hacker Version = 3.6.0 -Licence = Freeware +License = Freeware Description = Resource Hacker is a freeware utility to view, modify, rename, add, delete and extract resources in 32bit & 64bit Windows executables and resource files (*.res). Size = 730 kB Category = 7 @@ -23,11 +23,11 @@ Description = Resource Hacker, è uno strumento freewere per vedere, modificare, Description = Resource Hacker to darmowe narzędzie do podglądu, modyfikacji, zmiany nazw, dodawania, kasowania i wypakowywania zasobów w plikach wykonywalnych 32bit i 64bit, oraz w plikach zasobów (*.res). [Section.0418] -Licence = Gratuită +License = Gratuită Description = Resource Hacker este un utilitar gratuit pentru inspectarea, modificarea, redenumirea, adăugarea, ștergerea și extragerea resurselor din fișierele resursă (*.res) și fișierele executabile pe 32 și 64 de biți pentru Windows. Size = 730 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Resoure Hacker, 32 ve 64 bitlik Windows çaılştırılabilirlerindeki ve kaynak kütüklerindeki (*.res) kaynakları görüntülemek, değiştirmek, yeniden adlandırmak, eklemek, silmek ve çıkartmak için ücretsiz bir araçtır. Size = 730 KB diff --git a/reactos/base/applications/rapps/rapps/rocks.txt b/reactos/base/applications/rapps/rapps/rocks.txt index e2f09273001..ab52561e77f 100644 --- a/reactos/base/applications/rapps/rapps/rocks.txt +++ b/reactos/base/applications/rapps/rapps/rocks.txt @@ -5,7 +5,7 @@ [Section] Name = Rocks'n'Diamonds Version = 3.3.1.2 -Licence = GPL v2 +License = GPL v2 Description = Arcade style game for UNIX, Mac OS X, Windows and DOS in the tradition of: "Boulder Dash" (C64), "Emerald Mine" (Amiga), "Supaplex" (Amiga/PC), "Sokoban" (PC). You need a ZIP decompression program to install it. Size = 2.42 MB Category = 4 @@ -27,6 +27,6 @@ Description = Un joc de tip arcadă pentru UNIX, Mac OS X, Windows și DOS; resp Size = 2,42 Mo [Section.041f] -Licence = GPL 2. sürüm +License = GPL 2. sürüm Description = "Boulder Dash" (C64), "Emerald Mine" (Amiga), "Supaplex" (Amiga/PC), "Sokoban" (PC) gelenekleri içinde; UNIX, Mac OS X, Windows ve DOS için atari oyun salonu türünde oyun. Kurmak için bir ZIP çıkartma izlencesi gerekir. Size = 2,42 MB diff --git a/reactos/base/applications/rapps/rapps/rosbe.txt b/reactos/base/applications/rapps/rapps/rosbe.txt index 1488f648ccc..5221a3d5110 100644 --- a/reactos/base/applications/rapps/rapps/rosbe.txt +++ b/reactos/base/applications/rapps/rapps/rosbe.txt @@ -4,7 +4,7 @@ [Section] Name = ReactOS Build Environment Version = 2.1.1 -Licence = GPL +License = GPL Description = Allows you to build the ReactOS Source. For more instructions see ReactOS wiki. Size = 28.3 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/rosbeamd64.txt b/reactos/base/applications/rapps/rapps/rosbeamd64.txt index 5b0ee4559d3..63b8ee08f98 100644 --- a/reactos/base/applications/rapps/rapps/rosbeamd64.txt +++ b/reactos/base/applications/rapps/rapps/rosbeamd64.txt @@ -4,7 +4,7 @@ [Section] Name = ReactOS Build Environment AMD64 Addon Version = 1.3 -Licence = GPL +License = GPL Description = Allows you to build the ReactOS AMD64 Source. For more instructions see ReactOS wiki. Size = 15.83 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/rosbearm.txt b/reactos/base/applications/rapps/rapps/rosbearm.txt index ca14ebac609..4281c9d6521 100644 --- a/reactos/base/applications/rapps/rapps/rosbearm.txt +++ b/reactos/base/applications/rapps/rapps/rosbearm.txt @@ -4,7 +4,7 @@ [Section] Name = ReactOS Build Environment ARM Addon Version = 1.0 -Licence = GPL +License = GPL Description = Allows you to build the ReactOS ARM Source. For more instructions see ReactOS wiki. Size = 11.15 MB Category = 7 diff --git a/reactos/base/applications/rapps/rapps/sambatng.txt b/reactos/base/applications/rapps/rapps/sambatng.txt index ae30ccaad22..f7862d5d584 100644 --- a/reactos/base/applications/rapps/rapps/sambatng.txt +++ b/reactos/base/applications/rapps/rapps/sambatng.txt @@ -4,7 +4,7 @@ [Section] Name = Samba TNG Version = 0.5-RC1 -Licence = GPL +License = GPL Description = This tool allows you to access your Windows shared folders/printers with ReactOS. Size = 2.13 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/sbforvmware.txt b/reactos/base/applications/rapps/rapps/sbforvmware.txt index 91cff0030fa..4af10a915f3 100644 --- a/reactos/base/applications/rapps/rapps/sbforvmware.txt +++ b/reactos/base/applications/rapps/rapps/sbforvmware.txt @@ -4,7 +4,7 @@ [Section] Name = SoundBlaster Driver for VMWare Version = 5.12.1.5017 -Licence = Unknown +License = Unknown Description = Unzip in the ReactOS's folder then restart ReactOS twice. Size = 2.22 MB Category = 13 @@ -13,63 +13,63 @@ CDPath = none [Section.0405] Name = Ovladač SoundBlaster pro VMWare -Licence = Neznámá +License = Neznámá Description = Rozbalte do složky "ReactOS" a pak ReactOS dvakrát restartujte. [Section.0407] Name = SoundBlaster Treiber für VMWare -Licence = Unbekannt +License = Unbekannt Description = Entpacken in das "ReactOS"-Verzeichnis und ReactOS zweimal neustarten. [Section.040a] Name = Driver SoundBlaster para VMWare -Licence = Desconocida +License = Desconocida Description = Descomprimir en la carpeta "Reactos" y reiniciar Reactos dos veces. [Section.040c] Name = Pilote SoundBlaster pour VMWare -Licence = Inconnue +License = Inconnue Description = Dézippez dans le répertoire "ReactOS" puis redémarrez deux fois. Size = 2,22 Mo [Section.0410] Name = Driver SoundBlaster per VMWare -Licence = Sconosciuta +License = Sconosciuta Description = Estrarre nella cartella "ReactOS" e riavviare ReactOS due volte. [Section.0413] Name = SoundBlaster Driver voor VMWare -Licence = Ongekend +License = Ongekend Description = Pak uit in de "ReactOS" folder en start ReactOS tweemaal opnieuw op. [Section.0415] Name = Sterownik SoundBlaster dla VMWare -Licence = Nieznana +License = Nieznana Description = Rozpakuj zawartość w folderze "ReactOS" i dwukrotnie zrestartuj system. [Section.0418] Name = Modul pilot SoundBlaster pentru VMWare -Licence = Nespecificată +License = Nespecificată Description = Dezarhivați în dosarul ReactOS apoi reporniți ReactOS de două ori. Size = 2,22 Mo [Section.0419] Name = Драйвер SoundBlaster для VMWare -Licence = Не указано +License = Не указано Description = Pазархивируйте содержимое в папку "ReactOS", затем дважды перезагрузите систему. [Section.041f] Name = VMWare için SoundBlaster Sürücüsü -Licence = Bilinmiyor +License = Bilinmiyor Description = ReactOS'un dizinine çıkartınız, sonra bilgisayarı iki kez yeniden başlatınız. Size = 2,22 MB [Section.0422] Name = Драйвер SoundBlaster для VMWare -Licence = Невідома +License = Невідома Description = Pозархівуйте вміст в теку "ReactOS" після чого двічі перезавантажте систему. [Section.0813] Name = SoundBlaster Driver voor VMWare -Licence = Ongekend +License = Ongekend Description = Pak uit in de "ReactOS" folder en start ReactOS tweemaal opnieuw op. diff --git a/reactos/base/applications/rapps/rapps/scite.txt b/reactos/base/applications/rapps/rapps/scite.txt index 7104731cd51..f95454ee27f 100644 --- a/reactos/base/applications/rapps/rapps/scite.txt +++ b/reactos/base/applications/rapps/rapps/scite.txt @@ -4,7 +4,7 @@ [Section] Name = SciTE Version = 3.5.1 -Licence = Freeware +License = 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 = 744 kB Category = 7 @@ -32,12 +32,12 @@ Description = SciTE is een tekstbewerker gebaseerd op SCIntilla. Origineel bedoe Description = SciTE to edytor tekstu bazowany na SCIntilla. Oryginalnie stworzony aby pokazać Scintille, stał sie ogólnie przydatnym edytorem z infrastrukturą potrzebną do tworzenia i uruchamiania programów. [Section.0418] -Licence = Gratuită +License = Gratuită Description = SciTE este un editor de text bazat pe SCIntilla. Construit inițial pentru a demonstra Scintilla, a crescut ulterior într-un editor de uz general cu funcționalități de compilare și execuție a programelor. Size = 744 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = SciTE, bir Scintilla tabanlı metin düzenleyicisidir. İlk başta Scintilla'yı göstermek için yapıldı; izlenceleri yapmak ve çalıştırmak yetenekleriyle, umûmiyetle kullanışlı bir düzenleyici olmak için gelişti. Size = 744 KB diff --git a/reactos/base/applications/rapps/rapps/scummvm.txt b/reactos/base/applications/rapps/rapps/scummvm.txt index b3c3c710d2f..ac3eccd3479 100644 --- a/reactos/base/applications/rapps/rapps/scummvm.txt +++ b/reactos/base/applications/rapps/rapps/scummvm.txt @@ -4,7 +4,7 @@ [Section] Name = ScummVM Version = 1.7.0 -Licence = GPL +License = GPL Description = Software that reproduce the working of graphical engine for videogames (Sam and Max, Day of the Tentacle, etc.) on ReactOS. Size = 6.9 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/sdl_mixer.txt b/reactos/base/applications/rapps/rapps/sdl_mixer.txt index 46647c2621b..70960795f17 100644 --- a/reactos/base/applications/rapps/rapps/sdl_mixer.txt +++ b/reactos/base/applications/rapps/rapps/sdl_mixer.txt @@ -4,7 +4,7 @@ [Section] Name = Simple Direct Media Layer (SDL) Mixer Version = 1.2.12 -Licence = LGPL +License = LGPL Description = Needed for some open source games to run. You need 7-Zip or a similar utility to extract it. Size = 548.02 kB Category = 14 diff --git a/reactos/base/applications/rapps/rapps/sdl_runtime.txt b/reactos/base/applications/rapps/rapps/sdl_runtime.txt index b14b37c6971..31bfbcb201f 100644 --- a/reactos/base/applications/rapps/rapps/sdl_runtime.txt +++ b/reactos/base/applications/rapps/rapps/sdl_runtime.txt @@ -4,7 +4,7 @@ [Section] Name = Simple Direct Media Layer (SDL) Runtime Version = 1.2.15 -Licence = LGPL +License = LGPL Description = Needed for many open source games to run. You need 7-Zip or a similar utility to extract it. Size = 136.67 kB Category = 14 diff --git a/reactos/base/applications/rapps/rapps/seamonkey.txt b/reactos/base/applications/rapps/rapps/seamonkey.txt index 6219ea2c773..20a6a070f78 100644 --- a/reactos/base/applications/rapps/rapps/seamonkey.txt +++ b/reactos/base/applications/rapps/rapps/seamonkey.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla SeaMonkey Version = 2.30 -Licence = MPL/GPL/LGPL +License = 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 = 30.05 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/smplayer.txt b/reactos/base/applications/rapps/rapps/smplayer.txt index b21cf344d5d..dd780426b14 100644 --- a/reactos/base/applications/rapps/rapps/smplayer.txt +++ b/reactos/base/applications/rapps/rapps/smplayer.txt @@ -4,7 +4,7 @@ [Section] Name = SMPlayer Version = 14.9.0 -Licence = GPL +License = GPL Description = Graphical Frontend for MPlayer. Size = 20.7 MB Category = 2 diff --git a/reactos/base/applications/rapps/rapps/snoopy.txt b/reactos/base/applications/rapps/rapps/snoopy.txt index ce477e6378e..9bb20072f87 100644 --- a/reactos/base/applications/rapps/rapps/snoopy.txt +++ b/reactos/base/applications/rapps/rapps/snoopy.txt @@ -4,7 +4,7 @@ [Section] Name = Snoopy Version = 1.0 -Licence = Freeware +License = Freeware Description = The original C64 Snoopy remake. Size = 704 kB Category = 4 @@ -20,11 +20,11 @@ URLSite = http://www.blueskied.com/spiele-spielen/snoopy.htm Description = Il remake del gioco Snoopy per Commodore 64. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Recrearea jocului Snoppy (original pe C64). Size = 704 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Özgün C64 Snoopy'in yeniden yapılmışı. Size = 704 KB diff --git a/reactos/base/applications/rapps/rapps/steam.txt b/reactos/base/applications/rapps/rapps/steam.txt index 82d13f58ff3..31163133f5b 100644 --- a/reactos/base/applications/rapps/rapps/steam.txt +++ b/reactos/base/applications/rapps/rapps/steam.txt @@ -3,7 +3,7 @@ [Section] Name = Steam -Licence = Freeware +License = Freeware Description = The Steam gaming platform used by many games these days. Size = 1.59 MB Category = 4 @@ -37,13 +37,13 @@ Description = Steam - platforma, którą używa obecnie wiele gier. URLSite = http://store.steampowered.com/?l=polish [Section.0418] -Licence = Gratuită +License = Gratuită Description = Platforma de joc Steam, utilizată de multe jocuri în zilele de astăzi. Size = 1,59 Mo URLSite = http://store.steampowered.com/?l=romanian [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Bugünlerde Steam oyun platformu birçok oyun eliyle kullanılmaktadır. Size = 1,59 MB URLSite = http://store.steampowered.com/?l=turkish diff --git a/reactos/base/applications/rapps/rapps/sumatrapdf.txt b/reactos/base/applications/rapps/rapps/sumatrapdf.txt index 55717c637e3..ee1b474bfcf 100644 --- a/reactos/base/applications/rapps/rapps/sumatrapdf.txt +++ b/reactos/base/applications/rapps/rapps/sumatrapdf.txt @@ -4,7 +4,7 @@ [Section] Name = SumatraPDF Version = 2.5.2 -Licence = GPLv3 +License = GPLv3 Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box. Size = 4.0 MB Category = 6 @@ -40,7 +40,7 @@ Size = 4,0 Mo URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader-ro.html [Section.041f] -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = SumatraPDF; yeğni, ücretsiz ve açık kaynak bir PDF okuyucusudur. Kutunun dışında taşınabilirdir. Size = 4,0 MB diff --git a/reactos/base/applications/rapps/rapps/summerbound.txt b/reactos/base/applications/rapps/rapps/summerbound.txt index 82c884450d3..5df5d172929 100644 --- a/reactos/base/applications/rapps/rapps/summerbound.txt +++ b/reactos/base/applications/rapps/rapps/summerbound.txt @@ -4,7 +4,7 @@ [Section] Name = Summer Bound Version = 1.4 -Licence = Freeware +License = Freeware Description = A game similar Frozen Fruits. Size = 764 kB Category = 4 @@ -20,11 +20,11 @@ URLSite = http://www.blueskied.com/freeware-spiele/runterladen.htm Description = Un gioco simile a Frozen Fuits [Section.0418] -Licence = Gratuită +License = Gratuită Description = Un joc similar jocului Frozen Fruits. Size = 764 ko [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Frozen Fruits'e benzeyen bir oyun. Size = 764 KB diff --git a/reactos/base/applications/rapps/rapps/superdxb.txt b/reactos/base/applications/rapps/rapps/superdxb.txt index 2213f3bc5a4..6d4f21a3cc5 100644 --- a/reactos/base/applications/rapps/rapps/superdxb.txt +++ b/reactos/base/applications/rapps/rapps/superdxb.txt @@ -5,7 +5,7 @@ [Section] Name = Super DX-Ball Version = 1.1 -Licence = Shareware +License = Shareware Description = Super DX-Ball is a vibrant and colorful brick-breaking game. Size = 3.8 MB Category = 4 @@ -23,11 +23,11 @@ Description = Super DX-Ball è un gioco spacca blocchi vibrante e colorato Description = Super DX-Ball - pełna koloru i animacji gra polegająca na zbijaniu klocków. [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Un joc ce implică spargerea de cărămizi. Size = 3,8 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Super DX-Ball canlı ve renkli bir tuğla kırma oyunudur. Size = 3,8 MB diff --git a/reactos/base/applications/rapps/rapps/superfinder.txt b/reactos/base/applications/rapps/rapps/superfinder.txt index c08ee2ab990..2825eb383c7 100644 --- a/reactos/base/applications/rapps/rapps/superfinder.txt +++ b/reactos/base/applications/rapps/rapps/superfinder.txt @@ -4,7 +4,7 @@ [Section] Name = Super Finder XT Version = 1.6.3.2 -Licence = Freeware +License = Freeware Description = A fast and feature rich search application. Size = 4.94 MB Category = 12 @@ -32,12 +32,12 @@ Description = Een snelle zoekapplicatie rijk aan mogelijkheden. Description = Szybka i bogata w opcje aplikacja szukająca. [Section.0418] -Licence = Gratuită +License = Gratuită Description = Aplicație rapidă de căutări complexe de text. Size = 4,94 Mo [Section.041f] -Licence = Ücretsiz +License = Ücretsiz Description = Hızlı ve husûsiyet zengini bir arama uygulaması. Size = 4,94 MB diff --git a/reactos/base/applications/rapps/rapps/supertux.txt b/reactos/base/applications/rapps/rapps/supertux.txt index 6f8881f2a0d..9aa739ac745 100644 --- a/reactos/base/applications/rapps/rapps/supertux.txt +++ b/reactos/base/applications/rapps/rapps/supertux.txt @@ -5,7 +5,7 @@ [Section] Name = SuperTux Version = 0.1.3 -Licence = GPL +License = GPL Description = SuperTux is a free, open-source two-dimensional platform game. Size = 7.3 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/tahoma.txt b/reactos/base/applications/rapps/rapps/tahoma.txt index ae23090eb89..bc478c2aab4 100644 --- a/reactos/base/applications/rapps/rapps/tahoma.txt +++ b/reactos/base/applications/rapps/rapps/tahoma.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Tahoma Font Version = 1.0 -Licence = Unknown +License = Unknown Description = Tahoma Font pack needed by some apps (Steam). Contains: Tahoma.ttf, Tahomabd.ttf. Size = 305.12 kB Category = 14 @@ -13,15 +13,15 @@ URLDownload = http://download.microsoft.com/download/office97pro/fonts/1/w95/en- CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Tahoma Font Pack, der von einigen Anwendungen benötigt wird (Steam). Beinhaltet: Tahoma.ttf, Tahomabd.ttf. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Paquete de fuente Tahoma, necesaria para ciertas aplicaciones (Steam). Incluye: Tahoma.ttf, Tahomabd.ttf. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Package pour la police Tahoma, nécessaire pour certaines applications (Steam). Contient: Tahoma.ttf, Tahomabd.ttf. Size = 305,12 ko @@ -29,27 +29,27 @@ Size = 305,12 ko Description = Il font pack Tahoma è richiesto da alcune applicazioni (Steam). Contiene: Tahoma.ttf, Tahomabd.ttf. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Tahoma lettertypes gebruikt door een aantal programma's (Steam). Bevat: Tahoma.ttf, Tahomabt.ttf. [Section.0415] Description = Pakiet Czcionki Tahoma wymagany przez niektóre programy (np. Steam). Zawiera: Tahoma.ttf, Tahomabd.ttf. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Pachetul Tahoma Font, necesar unor aplicații (Steam). Conține: Tahoma.ttf, Tahomabd.ttf. Size = 305,12 ko [Section.041f] Name = Microsoft Tahoma Yazı Tipi -Licence = Bilinmiyor +License = Bilinmiyor Description = Tahoma Yazı Tipi paketi, Steam gibi birtakım uygulamalar için gereklidir. Şunları içerir: Tahoma.ttf, Tahomabd.ttf. Size = 305,12 KB [Section.0422] -Licence = Невідома +License = Невідома Description = Пакет шрифтів Tahoma, що необхідні деяким програмам (Steam). включає: Tahoma.ttf, Tahomabd.ttf. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Tahoma lettertypes gebruikt door een aantal programma's (Steam). Bevat: Tahoma.ttf, Tahomabt.ttf. diff --git a/reactos/base/applications/rapps/rapps/thunderbird.txt b/reactos/base/applications/rapps/rapps/thunderbird.txt index fc72de5ebf7..8c4b351df48 100644 --- a/reactos/base/applications/rapps/rapps/thunderbird.txt +++ b/reactos/base/applications/rapps/rapps/thunderbird.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Thunderbird 31 Version = 31.2.0 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Mail Clients out there. Size = 25.25 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/thunderbird3.txt b/reactos/base/applications/rapps/rapps/thunderbird3.txt index e013e28645d..6f14c49434d 100644 --- a/reactos/base/applications/rapps/rapps/thunderbird3.txt +++ b/reactos/base/applications/rapps/rapps/thunderbird3.txt @@ -4,7 +4,7 @@ [Section] Name = Mozilla Thunderbird Version = 3.1.20 -Licence = MPL/GPL/LGPL +License = MPL/GPL/LGPL Description = The most popular and one of the best free Mail Clients out there. Size = 9.06 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/tileworld.txt b/reactos/base/applications/rapps/rapps/tileworld.txt index 70b2ce163c9..9fa44d21ba4 100644 --- a/reactos/base/applications/rapps/rapps/tileworld.txt +++ b/reactos/base/applications/rapps/rapps/tileworld.txt @@ -4,7 +4,7 @@ [Section] Name = Tile World Version = 1.3.0 -Licence = GPL +License = GPL Description = Nice clone of Chip's Challenge originally made for the Atari Lynx. Includes free CCLP2 Graphics Pack, so you dont need the copyrighted original. Size = 1.16 MB Category = 4 diff --git a/reactos/base/applications/rapps/rapps/totalcommander.txt b/reactos/base/applications/rapps/rapps/totalcommander.txt index 415fb579db2..fe940d917fb 100644 --- a/reactos/base/applications/rapps/rapps/totalcommander.txt +++ b/reactos/base/applications/rapps/rapps/totalcommander.txt @@ -4,7 +4,7 @@ [Section] Name = Total Commander Version = 8.51a -Licence = Shareware +License = Shareware Description = Total Commander is a file manager with two panels side by side. Size = 3.55 MB Category = 12 @@ -26,12 +26,12 @@ Description = Total Commander is een bestandsbeheerder met twee panelen zij aan Description = Total Commander to popularny menedżer plików z dwoma panelami, ustawionymi obok siebie. [Section.0418] -Licence = Versiune de evaluare +License = Versiune de evaluare Description = Total Commander este un gestionar de fișiere după modelul «două paneluri alăturate». Size = 3,55 Mo [Section.041f] -Licence = Paylaşımlı +License = Paylaşımlı Description = Total Commander, yan yana iki bölmeli bir kütük yöneticisidir. Size = 3,55 MB diff --git a/reactos/base/applications/rapps/rapps/tuxpaint.txt b/reactos/base/applications/rapps/rapps/tuxpaint.txt index d197e2a1715..bf547676fcf 100644 --- a/reactos/base/applications/rapps/rapps/tuxpaint.txt +++ b/reactos/base/applications/rapps/rapps/tuxpaint.txt @@ -4,7 +4,7 @@ [Section] Name = TuxPaint Version = 0.9.22 -Licence = GPL +License = GPL Description = An open source bitmap graphics editor geared towards young children. Size = 13.5 MB Category = 3 diff --git a/reactos/base/applications/rapps/rapps/ultravnc.txt b/reactos/base/applications/rapps/rapps/ultravnc.txt index 0f684551e77..d89f31b9276 100644 --- a/reactos/base/applications/rapps/rapps/ultravnc.txt +++ b/reactos/base/applications/rapps/rapps/ultravnc.txt @@ -4,7 +4,7 @@ [Section] Name = UltraVNC Version = 1.2.0.3 -Licence = GPL +License = GPL Description = Open source VNC client/server. Size = 3.22 MB Category = 5 diff --git a/reactos/base/applications/rapps/rapps/utorrent.txt b/reactos/base/applications/rapps/rapps/utorrent.txt index a5c6822483f..3c03b7e47ea 100644 --- a/reactos/base/applications/rapps/rapps/utorrent.txt +++ b/reactos/base/applications/rapps/rapps/utorrent.txt @@ -4,7 +4,7 @@ [Section] Name = µTorrent Version = 3.4.2 -Licence = Freeware for non-commercial uses +License = Freeware for non-commercial uses Description = Small and fast BitTorrent Client. Size = 1.61 MB Category = 5 @@ -13,52 +13,52 @@ URLDownload = http://download-new.utorrent.com/endpoint/utorrent/os/windows/trac CDPath = none [Section.0407] -Licence = Freeware für nichtkommerzielle Nutzung +License = Freeware für nichtkommerzielle Nutzung Description = Kleiner und schneller BitTorrent Client. [Section.040a] -Licence = Gratuito para uso no comercial +License = Gratuito para uso no comercial Description = Pequeño y rápido cliente BitTorrent. [Section.040c] -Licence = Gratuit pour une utilisation non-commerciale +License = Gratuit pour une utilisation non-commerciale Description = Client BitTorrent petit et rapide. Size = 1,61 Mo [Section.040c] -Licence = Gratita per un uso non-commerciale +License = Gratita per un uso non-commerciale Description = Piccolo e rapido Client BitTorrent. [Section.0410] -Licence = Gratuita per un uso non-commerciale +License = Gratuita per un uso non-commerciale Description = Piccolo e rapido Client BitTorrent. [Section.0413] -Licence = Freeware voor niet-commerciëel gebruik +License = Freeware voor niet-commerciëel gebruik Description = Kleine en snelle BitTorrent afnemer. [Section.0415] -Licence = Freeware (do użytku domowego) +License = Freeware (do użytku domowego) Description = Mały i szybki klient BitTorrent. [Section.0418] -Licence = Gratuită pentru uz necomercial +License = Gratuită pentru uz necomercial Description = Client BitTorrent, mic și rapid. Size = 1,61 Mo [Section.0419] -Licence = Бесплатная для некоммерческого использования +License = Бесплатная для некоммерческого использования Description = Маленький и быстрый клиент BitTorrent. [Section.041f] -Licence = Tecimlik olmayan kullanımlar için ücretsiz. +License = Tecimlik olmayan kullanımlar için ücretsiz. Description = Küçük ve hızlı BitTorrent istemcisi. Size = 1,61 MB [Section.0422] -Licence = Безплатна для некомерційного використання +License = Безплатна для некомерційного використання Description = Маленький і швидкий клієнт BitTorrent. [Section.0813] -Licence = Freeware voor niet-commerciëel gebruik +License = Freeware voor niet-commerciëel gebruik Description = Kleine en snelle BitTorrent afnemer. diff --git a/reactos/base/applications/rapps/rapps/vb5run.txt b/reactos/base/applications/rapps/rapps/vb5run.txt index a588264dbc1..4f1f2e49c10 100644 --- a/reactos/base/applications/rapps/rapps/vb5run.txt +++ b/reactos/base/applications/rapps/rapps/vb5run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual Basic 5 Runtime Version = 5.0 -Licence = Unknown +License = Unknown Description = Microsoft Visual Basic 5 Runtime. Contains: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. Size = 969.59 kB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/vb50pro/utility/1/win98/en- CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Basic 5 Laufzeitsystem. Beinhaltet: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Basic 5. Incluye: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Basic 5. Contient: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. Size = 969,59 ko [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Libreria Microsoft Visual Basic 5. Contiene: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Basic 5 Runtime. Bevat: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Basic 5. Zawiera: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Basic 5 Runtime. Conține: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. Size = 969,59 ko [Section.041f] Name = Microsoft Visual Basic 5 Yürütücü -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Basic 5 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. Size = 969,59 KB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Basic 5. включає: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Basic 5 Runtime. Bevat: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. diff --git a/reactos/base/applications/rapps/rapps/vb6run.txt b/reactos/base/applications/rapps/rapps/vb6run.txt index ac1efdf9a65..1290c75a60f 100644 --- a/reactos/base/applications/rapps/rapps/vb6run.txt +++ b/reactos/base/applications/rapps/rapps/vb6run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual Basic 6 Runtime Version = 6.0 -Licence = Unknown +License = Unknown Description = Microsoft Visual Basic 6 Runtime. Contains: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. Size = 1.02 MB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4bb0-a8 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Basic 6 Laufzeitsystem. Beinhaltet: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Basic 6. Incluye: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Basic 6. Contient: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. Size = 1,02 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Libreria Microsoft Visual Basic 6.Contiene: advpack.dll, asycfilt.dll, comcat.dll, msvbvm50.dll, oleaut32.dll, olepro32.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Basic 6 Runtime. Bevat: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Basic 6. Zawiera: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Basic 6 Runtime. Conține: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. Size = 1,02 Mo [Section.041f] Name = Microsoft Visual Basic 6 Yürütücü -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Basic 6 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. Size = 1,02 MB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Basic 6. включає: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Basic 6 Runtime. Bevat: advpack.dll, asycfilt.dll, comcat.dll, msvbvm60.dll, oleaut32.dll, olepro32.dll. diff --git a/reactos/base/applications/rapps/rapps/vc2005sp1run.txt b/reactos/base/applications/rapps/rapps/vc2005sp1run.txt index 278fd96e011..b3f03a8c91c 100644 --- a/reactos/base/applications/rapps/rapps/vc2005sp1run.txt +++ b/reactos/base/applications/rapps/rapps/vc2005sp1run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual C++ 2005 SP1 Redistributable Package Version = 7.1 -Licence = Unknown +License = Unknown Description = Microsoft Visual Studio 2005 Runtime SP1. Contains: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. Size = 2.6 MB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/e/1/c/e1c773de-73ba-494a-a5 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Studio 2005 Laufzeitsystem SP1. Beinhaltet: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Studio 2005 SP1. Incluye: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Studio 2005 SP1. Contient: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. Size = 2,6 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Microsoft Visual Studio 2005 Runtime SP1. Contiene: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2005 Runtime SP1. Bevat: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Studio 2005 SP1. Zawiera: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Studio 2005 Runtime SP1. Conține: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. Size = 2,6 Mo [Section.041f] Name = Microsoft Visual C++ 2005 SP1 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Studio 2005 Yürütücü SP1. Şunları içerir: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. Size = 2,6 MB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Studio 2005 SP1. включає: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2005 Runtime SP1. Bevat: atl80.dll, mfc80.dll, mfcm80.dll, mfcm80u.dll, msdia80.dll, msvcm80.dll, msvcp80.dll, msvcr80.dll, vcomp.dll. diff --git a/reactos/base/applications/rapps/rapps/vc2008sp1run.txt b/reactos/base/applications/rapps/rapps/vc2008sp1run.txt index 48f9ef730ed..b4d6f767f39 100644 --- a/reactos/base/applications/rapps/rapps/vc2008sp1run.txt +++ b/reactos/base/applications/rapps/rapps/vc2008sp1run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual C++ 2008 SP1 Redistributable Package Version = 8.0 -Licence = Unknown +License = Unknown Description = Microsoft Visual Studio 2008 SP1 Runtime. Contains: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. Size = 4.02 MB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8d CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Studio 2008 SP1 Laufzeitsystem. Enthält: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Studio 2008 SP1. Incluye: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Studio 2008 SP1. Contient: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. Size = 4,02 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Microsoft Visual Studio 2008 Runtime SP1. Contiene: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2008 SP1 Runtime. Bevat: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Studio 2008 SP1. Zawiera: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Studio 2008 SP1 Runtime. Conține: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. Size = 4,02 Mo [Section.041f] Name = Microsoft Visual C++ 2008 SP1 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Studio 2008 SP1 Yürütücü. Şunları içerir: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. Size = 4,02 MB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Studio 2008 SP1. включає: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2008 SP1 Runtime. Bevat: atl90.dll, mfc90.dll, mfc90u.dll, mfcm90.dll, mfcm90u.dll, msdia90.dll, msvcm90.dll, msvcp90.dll, msvcr90.dll, vcomp90.dll. diff --git a/reactos/base/applications/rapps/rapps/vc2010run.txt b/reactos/base/applications/rapps/rapps/vc2010run.txt index 180fc739e1f..243c4d8e9cf 100644 --- a/reactos/base/applications/rapps/rapps/vc2010run.txt +++ b/reactos/base/applications/rapps/rapps/vc2010run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual C++ 2010 Redistributable Package Version = 8.0 -Licence = Unknown +License = Unknown Description = Microsoft Visual Studio 2010 Runtime. Contains: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. Size = 4.8 MB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B1 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Studio 2010 Laufzeitsystem. Beinhaltet: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Studio 2010. Incluye: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Studio 2010. Contient: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. Size = 4.8 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Libreria Microsoft Visual Studio 2010. Include: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2010 Runtime. Bevat: atl100.dll, mfc100.dll, mfc90u.dll, mfcm100.dll, mfcm90u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Studio 2010. Zawiera: atl100.dll, mfc100.dll, mfc90u.dll, mfcm100.dll, mfcm90u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Studio 2010 Runtime. Conține: atl100.dll, mfc100.dll, mfc90u.dll, mfcm100.dll, mfcm90u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. Size = 4,8 Mo [Section.041f] Name = Microsoft Visual C++ 2010 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Studio 2010 Yürütücü. Şunları içerir: atl100.dll, mfc100.dll, mfc100u.dll, mfcm100.dll, mfcm100u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. Size = 4,8 MB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Studio 2010. включає: atl100.dll, mfc100.dll, mfc90u.dll, mfcm100.dll, mfcm90u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 2010 Runtime. Bevat: atl100.dll, mfc100.dll, mfc90u.dll, mfcm100.dll, mfcm90u.dll, msdia100.dll, msvcm100.dll, msvcp100.dll, msvcr100.dll, vcomp100.dll. diff --git a/reactos/base/applications/rapps/rapps/vc6run.txt b/reactos/base/applications/rapps/rapps/vc6run.txt index 831205b60bd..0ead58152a5 100644 --- a/reactos/base/applications/rapps/rapps/vc6run.txt +++ b/reactos/base/applications/rapps/rapps/vc6run.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Visual C++ 6 Redistributable Package Version = 6.0 -Licence = Unknown +License = Unknown Description = Microsoft Visual Studio 6 Runtime. Contains: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. Size = 1.75 MB Category = 14 @@ -13,45 +13,45 @@ URLDownload = http://download.microsoft.com/download/vc60pro/Update/2/W9XNT4/EN- CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Description = Microsoft Visual Studio 6 Laufzeitsystem. Beinhaltet: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.040a] -Licence = Desconocida +License = Desconocida Description = Librerias Microsoft Visual Studio 6. Incluye: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.040c] -Licence = Inconnue +License = Inconnue Description = Bibliothèque Microsoft Visual Studio 6. Contient: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. Size = 1,75 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Description = Microsoft Visual Studio 6 Runtime. Contiene: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.0413] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 6 Runtime. Bevat: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.0415] -Licence = Nieznana +License = Nieznana Description = Biblioteki uruchomieniowe Microsoft Visual Studio 6. Zawiera: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.0418] -Licence = Necunoscută +License = Necunoscută Description = Microsoft Visual Studio 6 Runtime. Conține: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. Size = 1,75 Mo [Section.041f] Name = Microsoft Visual C++ 6 Yeniden Dağıtılabilir Paket -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Visual Studio 6 Yürütücü. Şunları içerir: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. Size = 1,75 MB [Section.0422] -Licence = Невідома +License = Невідома Description = Бібліотеки Microsoft Visual Studio 6. включає: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. [Section.0813] -Licence = Ongekend +License = Ongekend Description = Microsoft Visual Studio 6 Runtime. Bevat: advpack.dll, asycfilt.dll, atla.dll, atlu.dll, comcat.dll, mfc42.dll, mfc42u.dll, msvcirt.dll, msvcp60.dll, msvcrt.dll, oleaut32.dll, olepro32.dll. diff --git a/reactos/base/applications/rapps/rapps/vlc.txt b/reactos/base/applications/rapps/rapps/vlc.txt index 772bb84186e..afb003ff7b6 100644 --- a/reactos/base/applications/rapps/rapps/vlc.txt +++ b/reactos/base/applications/rapps/rapps/vlc.txt @@ -4,7 +4,7 @@ [Section] Name = VLC media player Version = 2.1.5 -Licence = GPL +License = GPL Description = A media player. Size = 23.6 MB Category = 2 diff --git a/reactos/base/applications/rapps/rapps/winboard.txt b/reactos/base/applications/rapps/rapps/winboard.txt index 001c3b05908..3c8abb0fb66 100644 --- a/reactos/base/applications/rapps/rapps/winboard.txt +++ b/reactos/base/applications/rapps/rapps/winboard.txt @@ -4,7 +4,7 @@ [Section] Name = WinBoard Version = 4.2.7b -Licence = GPLv3 +License = GPLv3 Description = WinBoard is a graphical chessboard for the Windows/ReactOS that can serve as a user interface for GNU Chess, Crafty, and other chess engines, for the Internet chess servers, and for electronic mail correspondence chess. Size = 5.93 MB Category = 4 @@ -36,7 +36,7 @@ Description = WinBoard este o tablă de șah grafică pentru Windows/ReactOS ce Size = 5,93 Mo [Section.041f] -Licence = GPL 3. sürüm +License = GPL 3. sürüm Description = WinBoard, Umûmî Ağ satranç sunucularına ve postayla yazışmalı satranca GNU Chess, Crafty ve başka satranç motorlarını bir kullanıcı arayüzü olarak sunabilen, Windows/ReactOS için bir çizgelik satranç tahtasıdır. Size = 5,93 MB diff --git a/reactos/base/applications/rapps/rapps/wme9.txt b/reactos/base/applications/rapps/rapps/wme9.txt index 23d57556cd4..f4900962786 100644 --- a/reactos/base/applications/rapps/rapps/wme9.txt +++ b/reactos/base/applications/rapps/rapps/wme9.txt @@ -4,7 +4,7 @@ [Section] Name = Windows Media Encoder 9 Version = 9.0 -Licence = Unknown +License = Unknown Description = Windows Media Encoder 9 Size = 9.46 MB Category = 14 @@ -13,26 +13,26 @@ URLDownload = http://download.microsoft.com/download/8/1/f/81f9402f-efdd-439d-b2 CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt [Section.040a] -Licence = Desconocida +License = Desconocida [Section.040c] -Licence = Inconnue +License = Inconnue Size = 9,46 Mo [Section.0410] -Licence = Sconosciuta +License = Sconosciuta [Section.0413] License = Ongekend [Section.0415] -Licence = Nieznana +License = Nieznana [Section.0418] -Licence = Necunoscută +License = Necunoscută Size = 9,46 Mo [Section.041b] @@ -40,12 +40,12 @@ Description = Neznáma [Section.041f] Name = Windows Ortam Kodlayıcısı 9 -Licence = Bilinmiyor +License = Bilinmiyor Description = Windows Ortam Kodlayıcısı 9 Size = 9,46 MB [Section.0422] -Licence = Невідома +License = Невідома [Section.0813] License = Ongekend diff --git a/reactos/base/applications/rapps/rapps/wordview.txt b/reactos/base/applications/rapps/rapps/wordview.txt index d9c4abd4d10..346b7f7bb34 100644 --- a/reactos/base/applications/rapps/rapps/wordview.txt +++ b/reactos/base/applications/rapps/rapps/wordview.txt @@ -4,7 +4,7 @@ [Section] Name = Microsoft Word Viewer Version = 2003 -Licence = Unknown +License = Unknown Description = Microsoft Word Viewer Size = 24.5 MB Category = 6 @@ -13,53 +13,53 @@ URLDownload = http://download.microsoft.com/download/6/a/6/6a689355-b155-4fa7-ad CDPath = none [Section.0407] -Licence = Unbekannt +License = Unbekannt Size = 24.56 MB URLDownload = http://download.microsoft.com/download/d/4/b/d4b23f0e-c8b6-4383-878d-1a8184b7db56/wordview_de-de.exe [Section.040a] -Licence = Desconocida +License = Desconocida Size = 24.53 MB URLDownload = http://download.microsoft.com/download/4/4/c/44c2d552-8b40-464f-8470-b4976d7ba60b/wordview_es-es.exe [Section.040c] -Licence = Inconnue +License = Inconnue Size = 24,55 Mo URLDownload = http://download.microsoft.com/download/b/f/3/bf36c75d-2e93-4db1-ace2-1425e5219260/wordview_fr-fr.exe [Section.0410] -Licence = Sconosciuta +License = Sconosciuta Size = 24.52 MB URLDownload = http://download.microsoft.com/download/f/8/e/f8e9dadd-70bd-4317-a7fe-25d7bfb54b71/wordview_it-it.exe [Section.0413] -Licence = Ongekend +License = Ongekend Size = 24.54 MB URLDownload = http://download.microsoft.com/download/c/1/0/c10e009e-61e2-4b54-8d21-aff378679527/wordview_nl-nl.exe [Section.0415] -Licence = Nieznana +License = Nieznana Size = 24.58 MB URLDownload = http://download.microsoft.com/download/c/e/1/ce1e1286-67a2-4069-a8c4-b3552f18dfa8/wordview_pl-pl.exe [Section.0418] -Licence = Necunoscută +License = Necunoscută Size = 24,56 Mo URLDownload = http://download.microsoft.com/download/1/2/3/123d3dc8-6f3f-473f-ac1d-3e38969605e8/wordview_ro-ro.exe [Section.041f] Name = Microsoft Word Görüntüleyici -Licence = Bilinmiyor +License = Bilinmiyor Description = Microsoft Word Görüntüleyici Size = 24,55 MB URLDownload = http://download.microsoft.com/download/7/6/e/76efefb4-9575-4903-ac2a-180c280ab6c7/wordview_tr-tr.exe [Section.0422] -Licence = Невідома +License = Невідома Size = 24.56 MB URLDownload = http://download.microsoft.com/download/2/b/d/2bd08f27-822b-4c20-936a-0f1d91cb9e69/wordview_uk-ua.exe [Section.0813] -Licence = Ongekend +License = Ongekend Size = 24.54 MB URLDownload = http://download.microsoft.com/download/c/1/0/c10e009e-61e2-4b54-8d21-aff378679527/wordview_nl-nl.exe diff --git a/reactos/base/applications/rapps/rapps/zaz.txt b/reactos/base/applications/rapps/rapps/zaz.txt index ab8ebf375fe..29972bba1a4 100644 --- a/reactos/base/applications/rapps/rapps/zaz.txt +++ b/reactos/base/applications/rapps/rapps/zaz.txt @@ -5,7 +5,7 @@ [Section] Name = Zaz Version = 1.0.0 -Licence = GPL +License = GPL Description = Zaz is a free arcade action puzzle computer game, a little bit like Frozen Bubble. Size = 21.0 MB Category = 4 diff --git a/reactos/base/applications/rapps/resource.h b/reactos/base/applications/rapps/resource.h index 96f3c2121d6..96720ca8f3c 100644 --- a/reactos/base/applications/rapps/resource.h +++ b/reactos/base/applications/rapps/resource.h @@ -128,7 +128,7 @@ #define IDS_AINFO_DESCRIPTION 351 #define IDS_AINFO_SIZE 352 #define IDS_AINFO_URLSITE 353 -#define IDS_AINFO_LICENCE 354 +#define IDS_AINFO_LICENSE 354 /* Names of categories */ #define IDS_CAT_AUDIO 700 From d6985bdb0a25d0d297b4d188354a4247a275c16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 18 Nov 2014 00:44:24 +0000 Subject: [PATCH 02/50] [NTVDM]: Inline a function and fix spelling. svn path=/trunk/; revision=65429 --- reactos/subsystems/ntvdm/bios/vidbios.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/subsystems/ntvdm/bios/vidbios.c b/reactos/subsystems/ntvdm/bios/vidbios.c index cb854c125e4..6fd8cf8d587 100644 --- a/reactos/subsystems/ntvdm/bios/vidbios.c +++ b/reactos/subsystems/ntvdm/bios/vidbios.c @@ -2339,7 +2339,7 @@ VOID VidBiosSyncCursorPosition(VOID) VidBiosSetCursorPosition(Row, Column, Bda->VideoPage); } -static BYTE VidBiosGetVideoMode(VOID) +static inline BYTE VidBiosGetVideoMode(VOID) { /* Bit 7 of VideoMode is determined by bit 7 of VGAOptions */ return Bda->VideoMode | (Bda->VGAOptions & 0x80); @@ -3177,12 +3177,12 @@ VOID WINAPI VidBiosVideoService(LPWORD Stack) break; } - /* Display combination code */ + /* Get/Set Display combination code */ case 0x1A: { switch (getAL()) { - case 0x00: /* Get Display combiantion code */ + case 0x00: /* Get Display combination code */ setAX(MAKEWORD(0x1A, 0x1A)); setBX(MAKEWORD(0x08, 0x00)); /* VGA w/ color analog display */ break; From a60eca74a71182cf7b5d2f7e026e3feb35914709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 18 Nov 2014 02:18:18 +0000 Subject: [PATCH 03/50] [NTVDM] Code organization: - Create directory hardware/video where to put all video emulation (VGA currently, and maybe other things in the future); - Create directory hardware/sound where to put all sound emulation (PC speaker currently, and maybe other things in the future); - timer.c/h --> pit.c/h; - Adjust the necessary includes and the cmakefiles; - Remove unneeded includes; - NTVDM is allowed to have its own VS project ^^ svn path=/trunk/; revision=65430 --- reactos/subsystems/ntvdm/CMakeLists.txt | 9 ++++++--- reactos/subsystems/ntvdm/bios/bios32/bios32.c | 2 +- reactos/subsystems/ntvdm/bios/vidbios.c | 2 +- reactos/subsystems/ntvdm/clock.c | 4 ++-- reactos/subsystems/ntvdm/cpu/cpu.c | 6 +++--- reactos/subsystems/ntvdm/emulator.c | 6 +++--- reactos/subsystems/ntvdm/hardware/{timer.c => pit.c} | 4 ++-- reactos/subsystems/ntvdm/hardware/{timer.h => pit.h} | 8 ++++---- reactos/subsystems/ntvdm/hardware/{ => sound}/speaker.c | 2 +- reactos/subsystems/ntvdm/hardware/{ => sound}/speaker.h | 0 reactos/subsystems/ntvdm/hardware/{ => video}/vga.c | 0 reactos/subsystems/ntvdm/hardware/{ => video}/vga.h | 0 reactos/subsystems/ntvdm/ntvdm.c | 4 ---- 13 files changed, 23 insertions(+), 24 deletions(-) rename reactos/subsystems/ntvdm/hardware/{timer.c => pit.c} (99%) rename reactos/subsystems/ntvdm/hardware/{timer.h => pit.h} (96%) rename reactos/subsystems/ntvdm/hardware/{ => sound}/speaker.c (99%) rename reactos/subsystems/ntvdm/hardware/{ => sound}/speaker.h (100%) rename reactos/subsystems/ntvdm/hardware/{ => video}/vga.c (100%) rename reactos/subsystems/ntvdm/hardware/{ => video}/vga.h (100%) diff --git a/reactos/subsystems/ntvdm/CMakeLists.txt b/reactos/subsystems/ntvdm/CMakeLists.txt index add151f4985..747bd92c969 100644 --- a/reactos/subsystems/ntvdm/CMakeLists.txt +++ b/reactos/subsystems/ntvdm/CMakeLists.txt @@ -1,5 +1,8 @@ +PROJECT(NTVDM) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/fast486) + spec2def(ntvdm.exe ntvdm.spec) list(APPEND SOURCE @@ -19,10 +22,10 @@ list(APPEND SOURCE hardware/keyboard.c hardware/mouse.c hardware/pic.c + hardware/pit.c hardware/ps2.c - hardware/speaker.c - hardware/timer.c - hardware/vga.c + hardware/sound/speaker.c + hardware/video/vga.c dos/dos32krnl/bios.c dos/dos32krnl/dos.c dos/dos32krnl/dosfiles.c diff --git a/reactos/subsystems/ntvdm/bios/bios32/bios32.c b/reactos/subsystems/ntvdm/bios/bios32/bios32.c index bff238ba54e..87d8172b976 100644 --- a/reactos/subsystems/ntvdm/bios/bios32/bios32.c +++ b/reactos/subsystems/ntvdm/bios/bios32/bios32.c @@ -29,7 +29,7 @@ #include "io.h" #include "hardware/cmos.h" #include "hardware/pic.h" -#include "hardware/timer.h" +#include "hardware/pit.h" /* Extra PSDK/NDK Headers */ #include diff --git a/reactos/subsystems/ntvdm/bios/vidbios.c b/reactos/subsystems/ntvdm/bios/vidbios.c index 6fd8cf8d587..ca6ad1be477 100644 --- a/reactos/subsystems/ntvdm/bios/vidbios.c +++ b/reactos/subsystems/ntvdm/bios/vidbios.c @@ -19,7 +19,7 @@ // #include "vidbios.h" #include "io.h" -#include "hardware/vga.h" +#include "hardware/video/vga.h" /* DEFINES ********************************************************************/ diff --git a/reactos/subsystems/ntvdm/clock.c b/reactos/subsystems/ntvdm/clock.c index 14f67d55064..305ccc2226a 100644 --- a/reactos/subsystems/ntvdm/clock.c +++ b/reactos/subsystems/ntvdm/clock.c @@ -18,8 +18,8 @@ #include "hardware/cmos.h" #include "hardware/ps2.h" -#include "hardware/timer.h" -#include "hardware/vga.h" +#include "hardware/pit.h" +#include "hardware/video/vga.h" /* Extra PSDK/NDK Headers */ #include diff --git a/reactos/subsystems/ntvdm/cpu/cpu.c b/reactos/subsystems/ntvdm/cpu/cpu.c index 7b56e083ef8..6666978cf2a 100644 --- a/reactos/subsystems/ntvdm/cpu/cpu.c +++ b/reactos/subsystems/ntvdm/cpu/cpu.c @@ -24,9 +24,9 @@ #include "hardware/mouse.h" #include "hardware/pic.h" #include "hardware/ps2.h" -#include "hardware/speaker.h" -#include "hardware/timer.h" -#include "hardware/vga.h" +#include "hardware/sound/speaker.h" +#include "hardware/pit.h" +#include "hardware/video/vga.h" #include "io.h" diff --git a/reactos/subsystems/ntvdm/emulator.c b/reactos/subsystems/ntvdm/emulator.c index 2d22307df20..983e4dd8a57 100644 --- a/reactos/subsystems/ntvdm/emulator.c +++ b/reactos/subsystems/ntvdm/emulator.c @@ -26,9 +26,9 @@ #include "hardware/mouse.h" #include "hardware/pic.h" #include "hardware/ps2.h" -#include "hardware/speaker.h" -#include "hardware/timer.h" -#include "hardware/vga.h" +#include "hardware/sound/speaker.h" +#include "hardware/pit.h" +#include "hardware/video/vga.h" #include "vddsup.h" #include "io.h" diff --git a/reactos/subsystems/ntvdm/hardware/timer.c b/reactos/subsystems/ntvdm/hardware/pit.c similarity index 99% rename from reactos/subsystems/ntvdm/hardware/timer.c rename to reactos/subsystems/ntvdm/hardware/pit.c index 839ea3cf00a..037e06240f4 100644 --- a/reactos/subsystems/ntvdm/hardware/timer.c +++ b/reactos/subsystems/ntvdm/hardware/pit.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: GPL - See COPYING in the top level directory * PROJECT: ReactOS Virtual DOS Machine - * FILE: timer.c + * FILE: pit.c * PURPOSE: Programmable Interval Timer emulation - * i82C54/8254 compatible * PROGRAMMERS: Aleksandar Andrejevic @@ -14,7 +14,7 @@ #include "emulator.h" #include "io.h" -#include "timer.h" +#include "pit.h" #include "pic.h" /* PRIVATE VARIABLES **********************************************************/ diff --git a/reactos/subsystems/ntvdm/hardware/timer.h b/reactos/subsystems/ntvdm/hardware/pit.h similarity index 96% rename from reactos/subsystems/ntvdm/hardware/timer.h rename to reactos/subsystems/ntvdm/hardware/pit.h index b25f5cf26db..8d32938405d 100644 --- a/reactos/subsystems/ntvdm/hardware/timer.h +++ b/reactos/subsystems/ntvdm/hardware/pit.h @@ -1,15 +1,15 @@ /* * COPYRIGHT: GPL - See COPYING in the top level directory * PROJECT: ReactOS Virtual DOS Machine - * FILE: timer.h + * FILE: pit.h * PURPOSE: Programmable Interval Timer emulation - * i82C54/8254 compatible * PROGRAMMERS: Aleksandar Andrejevic * Hermes Belusca-Maito (hermes.belusca@sfr.fr) */ -#ifndef _TIMER_H_ -#define _TIMER_H_ +#ifndef _PIT_H_ +#define _PIT_H_ /* INCLUDES *******************************************************************/ @@ -84,6 +84,6 @@ VOID PitClock(DWORD Count); VOID PitInitialize(VOID); -#endif // _TIMER_H_ +#endif // _PIT_H_ /* EOF */ diff --git a/reactos/subsystems/ntvdm/hardware/speaker.c b/reactos/subsystems/ntvdm/hardware/sound/speaker.c similarity index 99% rename from reactos/subsystems/ntvdm/hardware/speaker.c rename to reactos/subsystems/ntvdm/hardware/sound/speaker.c index 2f6d017f8d5..5f00b2ce56a 100644 --- a/reactos/subsystems/ntvdm/hardware/speaker.c +++ b/reactos/subsystems/ntvdm/hardware/sound/speaker.c @@ -12,7 +12,7 @@ #include "emulator.h" #include "speaker.h" -#include "timer.h" +#include "hardware/pit.h" /* Extra PSDK/NDK Headers */ #include diff --git a/reactos/subsystems/ntvdm/hardware/speaker.h b/reactos/subsystems/ntvdm/hardware/sound/speaker.h similarity index 100% rename from reactos/subsystems/ntvdm/hardware/speaker.h rename to reactos/subsystems/ntvdm/hardware/sound/speaker.h diff --git a/reactos/subsystems/ntvdm/hardware/vga.c b/reactos/subsystems/ntvdm/hardware/video/vga.c similarity index 100% rename from reactos/subsystems/ntvdm/hardware/vga.c rename to reactos/subsystems/ntvdm/hardware/video/vga.c diff --git a/reactos/subsystems/ntvdm/hardware/vga.h b/reactos/subsystems/ntvdm/hardware/video/vga.h similarity index 100% rename from reactos/subsystems/ntvdm/hardware/vga.h rename to reactos/subsystems/ntvdm/hardware/video/vga.h diff --git a/reactos/subsystems/ntvdm/ntvdm.c b/reactos/subsystems/ntvdm/ntvdm.c index fb81ec1153e..54b868a6c6e 100644 --- a/reactos/subsystems/ntvdm/ntvdm.c +++ b/reactos/subsystems/ntvdm/ntvdm.c @@ -14,11 +14,7 @@ #include "emulator.h" #include "cpu/cpu.h" -#include "clock.h" -#include "hardware/ps2.h" -#include "hardware/vga.h" #include "bios/bios.h" -#include "dos/dem.h" #include "resource.h" From d7df3046e03dc127836db3bd9f75f6955859a81f Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 19 Nov 2014 05:35:33 +0000 Subject: [PATCH 04/50] [NtUser] - Fix Process Explorer crash in Win32k. See CORE-8779 and CORE-7447. svn path=/trunk/; revision=65431 --- reactos/win32ss/user/ntuser/message.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/reactos/win32ss/user/ntuser/message.c b/reactos/win32ss/user/ntuser/message.c index 1df412b2361..983bf6a58f3 100644 --- a/reactos/win32ss/user/ntuser/message.c +++ b/reactos/win32ss/user/ntuser/message.c @@ -213,7 +213,10 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam) break; case WM_COPYDATA: - Size = sizeof(COPYDATASTRUCT) + ((PCOPYDATASTRUCT)lParam)->cbData; + { + COPYDATASTRUCT *cds = (COPYDATASTRUCT *)lParam; + Size = sizeof(COPYDATASTRUCT) + cds->cbData; + } break; default: @@ -472,6 +475,9 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) NTSTATUS Status; PMSGMEMORY MsgMemoryEntry; UINT Size; + PTHREADINFO pti; + + pti = PsGetCurrentThreadWin32Thread(); /* See if this message type is present in the table */ MsgMemoryEntry = FindMsgMemory(UserModeMsg->message); @@ -486,6 +492,7 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) if (0 != Size) { + PWND pWnd = ValidateHwndNoErr(KernelModeMsg->hwnd); /* Copy data if required */ if (0 != (MsgMemoryEntry->Flags & MMS_FLAG_WRITE)) { @@ -497,7 +504,12 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) return Status; } } - + if (pWnd && KernelModeMsg->message == WM_COPYDATA) + { + // Only the current process or thread can free the message lParam pointer. + if (pWnd->head.pti->MessageQueue != pti->MessageQueue) + return STATUS_SUCCESS; + } ExFreePool((PVOID) KernelModeMsg->lParam); } @@ -1415,6 +1427,10 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, CLEANUP: if (Window) UserDerefObjectCo(Window); + if ( !ptiSendTo && Msg == WM_COPYDATA ) + { + ExFreePool((PVOID) lParam); + } END_CLEANUP; } From f0350171f61f149c26cde176d8cc0988fb289803 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 19 Nov 2014 06:05:39 +0000 Subject: [PATCH 05/50] [NtUser] - Remove over compensating code. See CORE-7447. svn path=/trunk/; revision=65432 --- reactos/win32ss/user/ntuser/message.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/reactos/win32ss/user/ntuser/message.c b/reactos/win32ss/user/ntuser/message.c index 983bf6a58f3..c7786b4939b 100644 --- a/reactos/win32ss/user/ntuser/message.c +++ b/reactos/win32ss/user/ntuser/message.c @@ -475,9 +475,6 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) NTSTATUS Status; PMSGMEMORY MsgMemoryEntry; UINT Size; - PTHREADINFO pti; - - pti = PsGetCurrentThreadWin32Thread(); /* See if this message type is present in the table */ MsgMemoryEntry = FindMsgMemory(UserModeMsg->message); @@ -492,7 +489,6 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) if (0 != Size) { - PWND pWnd = ValidateHwndNoErr(KernelModeMsg->hwnd); /* Copy data if required */ if (0 != (MsgMemoryEntry->Flags & MMS_FLAG_WRITE)) { @@ -504,11 +500,10 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg) return Status; } } - if (pWnd && KernelModeMsg->message == WM_COPYDATA) + if (KernelModeMsg->message == WM_COPYDATA) { // Only the current process or thread can free the message lParam pointer. - if (pWnd->head.pti->MessageQueue != pti->MessageQueue) - return STATUS_SUCCESS; + return STATUS_SUCCESS; } ExFreePool((PVOID) KernelModeMsg->lParam); } From b13a7240420e7a8efc877b26570d191ff0151f5e Mon Sep 17 00:00:00 2001 From: Sylvain Petreolle Date: Thu, 20 Nov 2014 22:05:58 +0000 Subject: [PATCH 06/50] [NET] Update spanish localization. Patch by swyter. CORE-8817 #resolve svn path=/trunk/; revision=65433 --- .../applications/network/net/lang/es-ES.rc | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/reactos/base/applications/network/net/lang/es-ES.rc b/reactos/base/applications/network/net/lang/es-ES.rc index f781994805e..fc3e12f2106 100644 --- a/reactos/base/applications/network/net/lang/es-ES.rc +++ b/reactos/base/applications/network/net/lang/es-ES.rc @@ -68,59 +68,59 @@ BEGIN HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |\n\ SHARE | START | STATISTICS | STOP | TIME | USE | NET USER | VIEW ]\n" - IDS_ACCOUNTS_FORCE_LOGOFF "Force logoff after" - IDS_ACCOUNTS_LOGOFF_SECONDS "%lu seconds" - IDS_ACCOUNTS_MIN_PW_AGE "Minimum password age (in days)" - IDS_ACCOUNTS_MAX_PW_AGE "Maximum password age (in days)" - IDS_ACCOUNTS_MIN_PW_LENGTH "Minimum password length" - IDS_ACCOUNTS_PW_HIST_LENGTH "Password history length" - IDS_ACCOUNTS_LOCKOUT_THRESHOLD "Lockout threshold" - IDS_ACCOUNTS_LOCKOUT_DURATION "Lockout duration (in minutes)" - IDS_ACCOUNTS_LOCKOUT_WINDOW "Lockout observation window (in minutes)" - IDS_ACCOUNTS_COMPUTER_ROLE "Computer role" - IDS_ACCOUNTS_PRIMARY_SERVER "Primary server" - IDS_ACCOUNTS_BACKUP_SERVER "Backup server" - IDS_ACCOUNTS_STANDALONE_SERVER "Standalone server" - IDS_ACCOUNTS_WORKSTATION "Workstation" + IDS_ACCOUNTS_FORCE_LOGOFF "Forzar cierre de sesión tras" + IDS_ACCOUNTS_LOGOFF_SECONDS "%lu segundos" + IDS_ACCOUNTS_MIN_PW_AGE "Validez mínima de contraseña (en días)" + IDS_ACCOUNTS_MAX_PW_AGE "Validez máxima de contraseña (en días)" + IDS_ACCOUNTS_MIN_PW_LENGTH "Tamaño mínimo de contraseña" + IDS_ACCOUNTS_PW_HIST_LENGTH "Duración del historial de contraseñas" + IDS_ACCOUNTS_LOCKOUT_THRESHOLD "Umbral de bloqueo" + IDS_ACCOUNTS_LOCKOUT_DURATION "Duración del bloqueo (en minutos)" + IDS_ACCOUNTS_LOCKOUT_WINDOW "Ventana de cumpl. de bloqueo (en minutos)" + IDS_ACCOUNTS_COMPUTER_ROLE "Rol del equipo" + IDS_ACCOUNTS_PRIMARY_SERVER "Servidor primario" + IDS_ACCOUNTS_BACKUP_SERVER "Servidor de respaldo" + IDS_ACCOUNTS_STANDALONE_SERVER "Servidor independiente" + IDS_ACCOUNTS_WORKSTATION "Estación de trabajo" - IDS_LOCALGROUP_ALIASES "Aliases for \\\\%s" - IDS_LOCALGROUP_ALIAS_NAME "Alias name" - IDS_LOCALGROUP_COMMENT "Comment" - IDS_LOCALGROUP_MEMBERS "Members" + IDS_LOCALGROUP_ALIASES "Alias de \\\\%s" + IDS_LOCALGROUP_ALIAS_NAME "Nombre del alias" + IDS_LOCALGROUP_COMMENT "Comentario" + IDS_LOCALGROUP_MEMBERS "Miembros" - IDS_USER_ACCOUNTS "User accounts for \\\\%s" - IDS_USER_NAME "User name" - IDS_USER_FULL_NAME "Full name" - IDS_USER_COMMENT "Comment" - IDS_USER_USER_COMMENT "User comment" - IDS_USER_COUNTRY_CODE "Country code" - IDS_USER_ACCOUNT_ACTIVE "Account active" - IDS_USER_ACCOUNT_EXPIRES "Account expires" - IDS_USER_PW_LAST_SET "Password last set" - IDS_USER_PW_EXPIRES "Password expires" - IDS_USER_PW_CHANGEABLE "Password changeable" - IDS_USER_PW_REQUIRED "Password required" - IDS_USER_CHANGE_PW "User may change password" - IDS_USER_WORKSTATIONS "Workstations allowed" - IDS_USER_LOGON_SCRIPT "Logon script" - IDS_USER_PROFILE "User profile" - IDS_USER_HOME_DIR "Home directory" - IDS_USER_LAST_LOGON "Last logon" - IDS_USER_LOGON_HOURS "Logon hours allowed" - IDS_USER_LOCAL_GROUPS "Local group memberships" - IDS_USER_GLOBAL_GROUPS "Global group memberships" + IDS_USER_ACCOUNTS "Cuentas de usuario en \\\\%s" + IDS_USER_NAME "Nombre de usuario" + IDS_USER_FULL_NAME "Nombre completo" + IDS_USER_COMMENT "Comentario" + IDS_USER_USER_COMMENT "Comentario de usuario" + IDS_USER_COUNTRY_CODE "Código de país" + IDS_USER_ACCOUNT_ACTIVE "Cuenta activa" + IDS_USER_ACCOUNT_EXPIRES "Fecha de expiración" + IDS_USER_PW_LAST_SET "La contraseña se cambió por última vez" + IDS_USER_PW_EXPIRES "La contraseña expira" + IDS_USER_PW_CHANGEABLE "La contraseña se puede cambiar" + IDS_USER_PW_REQUIRED "Se necesita contraseña" + IDS_USER_CHANGE_PW "El usuario puede cambiar la contraseña" + IDS_USER_WORKSTATIONS "Se permiten estaciones de trabajo" + IDS_USER_LOGON_SCRIPT "Script de inicio" + IDS_USER_PROFILE "Perfil de usuario" + IDS_USER_HOME_DIR "Carpeta raíz" + IDS_USER_LAST_LOGON "Último inicio de sesión" + IDS_USER_LOGON_HOURS "Horas de inicio permitidas" + IDS_USER_LOCAL_GROUPS "Miembro de los grupos locales" + IDS_USER_GLOBAL_GROUPS "Miembro de los grupos globales" - IDS_USER_ENTER_PASSWORD1 "Enter a new password for the user: " - IDS_USER_ENTER_PASSWORD2 "Enter the password again: " - IDS_USER_NO_PASSWORD_MATCH "The passwords do not match!" + IDS_USER_ENTER_PASSWORD1 "Escriba una contraseña: " + IDS_USER_ENTER_PASSWORD2 "Vuelva a escribir la contraseña: " + IDS_USER_NO_PASSWORD_MATCH "Las contraseñas no coinciden." - IDS_GENERIC_YES "Yes" + IDS_GENERIC_YES "Sí" IDS_GENERIC_NO "No" - IDS_GENERIC_NEVER "Never" - IDS_GENERIC_NONE "None" - IDS_GENERIC_ALL "All" - IDS_GENERIC_LOCKED "Locked" + IDS_GENERIC_NEVER "Nunca" + IDS_GENERIC_NONE "Ninguno" + IDS_GENERIC_ALL "Todos" + IDS_GENERIC_LOCKED "Bloqueado" - IDS_ERROR_OPTION_NOT_SUPPORTED "The %s option is not supported yet.\n" - IDS_ERROR_INVALID_OPTION_VALUE "You entered an invalid value for the %s option.\n" + IDS_ERROR_OPTION_NOT_SUPPORTED "La opción %s todavía no está disponible.\n" + IDS_ERROR_INVALID_OPTION_VALUE "El valor para la opción %s no es válido.\n" END From 534adb371cbd1887c464653b9c0cab93887dbc0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 00:11:11 +0000 Subject: [PATCH 07/50] [NTVDM]: Static'ify some local vars & functions. svn path=/trunk/; revision=65434 --- reactos/subsystems/ntvdm/vddsup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/ntvdm/vddsup.c b/reactos/subsystems/ntvdm/vddsup.c index 0997216c08a..7d3f4e2411b 100644 --- a/reactos/subsystems/ntvdm/vddsup.c +++ b/reactos/subsystems/ntvdm/vddsup.c @@ -29,7 +29,7 @@ typedef struct _VDD_MODULE // TODO: Maybe use a linked list. // But the number of elements must be <= MAXUSHORT (MAXWORD) #define MAX_VDD_MODULES 0xFF + 1 -VDD_MODULE VDDList[MAX_VDD_MODULES] = {{NULL}}; +static VDD_MODULE VDDList[MAX_VDD_MODULES] = {{NULL}}; // Valid handles of VDD DLLs start at 1 and finish at MAX_VDD_MODULES #define ENTRY_TO_HANDLE(Entry) ((Entry) + 1) @@ -38,7 +38,7 @@ VDD_MODULE VDDList[MAX_VDD_MODULES] = {{NULL}}; /* PRIVATE FUNCTIONS **********************************************************/ -USHORT GetNextFreeVDDEntry(VOID) +static USHORT GetNextFreeVDDEntry(VOID) { USHORT Entry = MAX_VDD_MODULES; for (Entry = 0; Entry < sizeof(VDDList)/sizeof(VDDList[0]); ++Entry) @@ -48,7 +48,7 @@ USHORT GetNextFreeVDDEntry(VOID) return Entry; } -VOID WINAPI ThirdPartyVDDBop(LPWORD Stack) +static VOID WINAPI ThirdPartyVDDBop(LPWORD Stack) { /* Get the Function Number and skip it */ BYTE FuncNum = *(PBYTE)SEG_OFF_TO_PTR(getCS(), getIP()); @@ -231,7 +231,7 @@ Quit: } } -BOOL LoadInstallableVDD(VOID) +static BOOL LoadInstallableVDD(VOID) { #define ERROR_MEMORYVDD L"Insufficient memory to load installable Virtual Device Drivers." #define ERROR_REGVDD L"Virtual Device Driver format in the registry is invalid." From b17f25b733eae32a56df0ba9116a1d0070c58b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 00:11:53 +0000 Subject: [PATCH 08/50] [NTVDM]: Temporarily disable the mouse driver since mouse still doesn't fully work. svn path=/trunk/; revision=65435 --- reactos/subsystems/ntvdm/dos/dem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/ntvdm/dos/dem.c b/reactos/subsystems/ntvdm/dos/dem.c index 9e1078f0455..f5f032e7021 100644 --- a/reactos/subsystems/ntvdm/dos/dem.c +++ b/reactos/subsystems/ntvdm/dos/dem.c @@ -423,7 +423,7 @@ static VOID WINAPI DosStart(LPWORD Stack) RegisterBop(BOP_START_DOS, NULL); /* Load the mouse driver */ - DosMouseInitialize(); + // DosMouseInitialize(); #ifndef STANDALONE From fc11139981daa47d15cf809439c1051cbdf9f4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 00:13:51 +0000 Subject: [PATCH 09/50] [DDK] Add few VDD API prototypes: - VDDReserve/ReleaseIrqLine to get a "lock" on an IRQ line (so that VDDs can check whether some IRQs are free or not). - Add DMA services. svn path=/trunk/; revision=65436 --- reactos/include/ddk/nt_vdd.h | 85 +++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 7 deletions(-) diff --git a/reactos/include/ddk/nt_vdd.h b/reactos/include/ddk/nt_vdd.h index e3fa8debb45..8e26ba15101 100644 --- a/reactos/include/ddk/nt_vdd.h +++ b/reactos/include/ddk/nt_vdd.h @@ -41,6 +41,27 @@ WINAPI VDDTerminateVDM(VOID); +/* + * IRQ services + */ + +WORD +WINAPI +VDDReserveIrqLine +( + IN HANDLE hVdd, + IN WORD IrqLine +); + +BOOL +WINAPI +VDDReleaseIrqLine +( + IN HANDLE hVdd, + IN WORD IrqLine +); + + /* * I/O Port services */ @@ -76,19 +97,69 @@ BOOL WINAPI VDDInstallIOHook ( - HANDLE hVdd, - WORD cPortRange, - PVDD_IO_PORTRANGE pPortRange, - PVDD_IO_HANDLERS IOhandler + IN HANDLE hVdd, + IN WORD cPortRange, + IN PVDD_IO_PORTRANGE pPortRange, + IN PVDD_IO_HANDLERS IOhandler ); VOID WINAPI VDDDeInstallIOHook ( - HANDLE hVdd, - WORD cPortRange, - PVDD_IO_PORTRANGE pPortRange + IN HANDLE hVdd, + IN WORD cPortRange, + IN PVDD_IO_PORTRANGE pPortRange +); + + +/* + * DMA services + */ + +typedef struct _VDD_DMA_INFO +{ + WORD addr; + WORD count; + WORD page; + BYTE status; + BYTE mode; + BYTE mask; +} VDD_DMA_INFO, *PVDD_DMA_INFO; + +#define VDD_DMA_ADDR 0x01 +#define VDD_DMA_COUNT 0x02 +#define VDD_DMA_PAGE 0x04 +#define VDD_DMA_STATUS 0x08 +#define VDD_DMA_ALL (VDD_DMA_ADDR | VDD_DMA_COUNT | VDD_DMA_PAGE | VDD_DMA_STATUS) + +DWORD +WINAPI +VDDRequestDMA +( + IN HANDLE hVdd, + IN WORD iChannel, + IN OUT PVOID Buffer, + IN DWORD length +); + +BOOL +WINAPI +VDDQueryDMA +( + IN HANDLE hVdd, + IN WORD iChannel, + IN PVDD_DMA_INFO pDmaInfo +); + +BOOL +WINAPI +VDDSetDMA +( + IN HANDLE hVdd, + IN WORD iChannel, + IN WORD fDMA, + IN PVDD_DMA_INFO pDmaInfo ); From 83303b29d944620eafb38e2cae73c6aefbd71989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 00:22:48 +0000 Subject: [PATCH 10/50] [NTVDM] - Add stubs for VDDReserve/ReleaseIrqLine; - Add stub implementation for Direct Memory Access; - Add corresponding exports. svn path=/trunk/; revision=65437 --- reactos/subsystems/ntvdm/CMakeLists.txt | 1 + reactos/subsystems/ntvdm/emulator.c | 4 + reactos/subsystems/ntvdm/hardware/dma.c | 462 ++++++++++++++++++++++++ reactos/subsystems/ntvdm/hardware/dma.h | 64 ++++ reactos/subsystems/ntvdm/hardware/pic.c | 20 + reactos/subsystems/ntvdm/ntvdm.spec | 31 +- 6 files changed, 570 insertions(+), 12 deletions(-) create mode 100644 reactos/subsystems/ntvdm/hardware/dma.c create mode 100644 reactos/subsystems/ntvdm/hardware/dma.h diff --git a/reactos/subsystems/ntvdm/CMakeLists.txt b/reactos/subsystems/ntvdm/CMakeLists.txt index 747bd92c969..f510e9d937a 100644 --- a/reactos/subsystems/ntvdm/CMakeLists.txt +++ b/reactos/subsystems/ntvdm/CMakeLists.txt @@ -19,6 +19,7 @@ list(APPEND SOURCE cpu/cpu.c cpu/registers.c hardware/cmos.c + hardware/dma.c hardware/keyboard.c hardware/mouse.c hardware/pic.c diff --git a/reactos/subsystems/ntvdm/emulator.c b/reactos/subsystems/ntvdm/emulator.c index 983e4dd8a57..004418a0205 100644 --- a/reactos/subsystems/ntvdm/emulator.c +++ b/reactos/subsystems/ntvdm/emulator.c @@ -22,6 +22,7 @@ #include "clock.h" #include "bios/rom.h" #include "hardware/cmos.h" +#include "hardware/dma.h" #include "hardware/keyboard.h" #include "hardware/mouse.h" #include "hardware/pic.h" @@ -626,6 +627,7 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput) CpuInitialize(); /* Initialize DMA */ + DmaInitialize(); /* Initialize the PIC, the PIT, the CMOS and the PC Speaker */ PicInitialize(); @@ -706,6 +708,8 @@ VOID EmulatorCleanup(VOID) // PitCleanup(); // PicCleanup(); + // DmaCleanup(); + CpuCleanup(); #ifdef STANDALONE diff --git a/reactos/subsystems/ntvdm/hardware/dma.c b/reactos/subsystems/ntvdm/hardware/dma.c new file mode 100644 index 00000000000..e4422427046 --- /dev/null +++ b/reactos/subsystems/ntvdm/hardware/dma.c @@ -0,0 +1,462 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: dma.c + * PURPOSE: Direct Memory Access Controller emulation - + * i8237A compatible with 74LS612 Memory Mapper extension + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +/* INCLUDES *******************************************************************/ + +#define NDEBUG + +#include "emulator.h" +#include "io.h" +#include "dma.h" + +/* PRIVATE VARIABLES **********************************************************/ + +/* + * DMA Controller 0 (Channels 0..3): Slave controller + * DMA Controller 1 (Channels 4..7): Master controller + */ +static DMA_CONTROLLER DmaControllers[DMA_CONTROLLERS]; + +/* External page registers for each channel of the two DMA controllers */ +static DMA_PAGE_REGISTER DmaPageRegisters[DMA_CONTROLLERS * DMA_CONTROLLER_CHANNELS]; + +/* PRIVATE FUNCTIONS **********************************************************/ + +#define READ_ADDR(CtrlIndex, ChanIndex, Data) \ +do { \ + (Data) = \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrAddress + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)); \ + DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ +} while(0) + +#define READ_CNT(CtrlIndex, ChanIndex, Data) \ +do { \ + (Data) = \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrWordCnt + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)); \ + DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ +} while(0) + +static BYTE WINAPI DmaReadPort(USHORT Port) +{ + BYTE ReadValue = 0xFF; + + switch (Port) + { + /* Start Address Registers */ + { + case 0x00: + READ_ADDR(0, 0, ReadValue); + return ReadValue; + case 0x02: + READ_ADDR(0, 1, ReadValue); + return ReadValue; + case 0x04: + READ_ADDR(0, 2, ReadValue); + return ReadValue; + case 0x06: + READ_ADDR(0, 3, ReadValue); + return ReadValue; + case 0xC0: + READ_ADDR(1, 0, ReadValue); + return ReadValue; + case 0xC4: + READ_ADDR(1, 1, ReadValue); + return ReadValue; + case 0xC8: + READ_ADDR(1, 2, ReadValue); + return ReadValue; + case 0xCC: + READ_ADDR(1, 3, ReadValue); + return ReadValue; + } + + /* Count Address Registers */ + { + case 0x01: + READ_CNT(0, 0, ReadValue); + return ReadValue; + case 0x03: + READ_CNT(0, 1, ReadValue); + return ReadValue; + case 0x05: + READ_CNT(0, 2, ReadValue); + return ReadValue; + case 0x07: + READ_CNT(0, 3, ReadValue); + return ReadValue; + case 0xC2: + READ_CNT(1, 0, ReadValue); + return ReadValue; + case 0xC6: + READ_CNT(1, 1, ReadValue); + return ReadValue; + case 0xCA: + READ_CNT(1, 2, ReadValue); + return ReadValue; + case 0xCE: + READ_CNT(1, 3, ReadValue); + return ReadValue; + } + + /* Status Registers */ + { + case 0x08: + return DmaControllers[0].Status; + case 0xD0: + return DmaControllers[1].Status; + } + + /* DMA Intermediate (Temporary) Registers */ + { + case 0x0D: + return DmaControllers[0].TempReg; + case 0xDA: + return DmaControllers[1].TempReg; + } + } + + return 0x00; +} + +#define WRITE_ADDR(CtrlIndex, ChanIndex, Data) \ +do { \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseAddress + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrAddress + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ + DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ +} while(0) + +#define WRITE_CNT(CtrlIndex, ChanIndex, Data) \ +do { \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].BaseWordCnt + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ + *((PBYTE)&DmaControllers[(CtrlIndex)].DmaChannel[(ChanIndex)].CurrWordCnt + \ + (DmaControllers[(CtrlIndex)].FlipFlop & 0x01)) = (Data); \ + DmaControllers[(CtrlIndex)].FlipFlop ^= 1; \ +} while(0) + +static VOID WINAPI DmaWritePort(USHORT Port, BYTE Data) +{ + switch (Port) + { + /* Start Address Registers */ + { + case 0x00: + WRITE_ADDR(0, 0, Data); + break; + case 0x02: + WRITE_ADDR(0, 1, Data); + break; + case 0x04: + WRITE_ADDR(0, 2, Data); + break; + case 0x06: + WRITE_ADDR(0, 3, Data); + break; + case 0xC0: + WRITE_ADDR(1, 0, Data); + break; + case 0xC4: + WRITE_ADDR(1, 1, Data); + break; + case 0xC8: + WRITE_ADDR(1, 2, Data); + break; + case 0xCC: + WRITE_ADDR(1, 3, Data); + break; + } + + /* Count Address Registers */ + { + case 0x01: + WRITE_CNT(0, 0, Data); + break; + case 0x03: + WRITE_CNT(0, 1, Data); + break; + case 0x05: + WRITE_CNT(0, 2, Data); + break; + case 0x07: + WRITE_CNT(0, 3, Data); + break; + case 0xC2: + WRITE_CNT(1, 0, Data); + break; + case 0xC6: + WRITE_CNT(1, 1, Data); + break; + case 0xCA: + WRITE_CNT(1, 2, Data); + break; + case 0xCE: + WRITE_CNT(1, 3, Data); + break; + } + + /* Command Registers */ + { + case 0x08: + DmaControllers[0].Command = Data; + break; + case 0xD0: + DmaControllers[1].Command = Data; + break; + } + + /* Request Registers */ + { + case 0x09: + DmaControllers[0].Request = Data; + break; + case 0xD2: + DmaControllers[1].Request = Data; + break; + } + + /* Flip-Flop Reset */ + { + case 0x0C: + DmaControllers[0].FlipFlop = 0; + break; + case 0xD8: + DmaControllers[1].FlipFlop = 0; + break; + } + + /* DMA Master Reset */ + { + case 0x0D: + DmaControllers[0].Command = 0x00; + DmaControllers[0].Status = 0x00; + DmaControllers[0].Request = 0x00; + DmaControllers[0].TempReg = 0x00; + DmaControllers[0].FlipFlop = 0; + DmaControllers[0].Mask = 0x0F; + break; + case 0xDA: + DmaControllers[1].Command = 0x00; + DmaControllers[1].Status = 0x00; + DmaControllers[1].Request = 0x00; + DmaControllers[1].TempReg = 0x00; + DmaControllers[1].FlipFlop = 0; + DmaControllers[1].Mask = 0x0F; + break; + } + } +} + +/* Page Address Registers */ + +static BYTE WINAPI DmaPageReadPort(USHORT Port) +{ + switch (Port) + { + case 0x87: + return DmaPageRegisters[0].Page; + case 0x83: + return DmaPageRegisters[1].Page; + case 0x81: + return DmaPageRegisters[2].Page; + case 0x82: + return DmaPageRegisters[3].Page; + case 0x8F: + return DmaPageRegisters[4].Page; + case 0x8B: + return DmaPageRegisters[5].Page; + case 0x89: + return DmaPageRegisters[6].Page; + case 0x8A: + return DmaPageRegisters[7].Page; + } + + return 0x00; +} + +static VOID WINAPI DmaPageWritePort(USHORT Port, BYTE Data) +{ + switch (Port) + { + case 0x87: + DmaPageRegisters[0].Page = Data; + break; + case 0x83: + DmaPageRegisters[1].Page = Data; + break; + case 0x81: + DmaPageRegisters[2].Page = Data; + break; + case 0x82: + DmaPageRegisters[3].Page = Data; + break; + case 0x8F: + DmaPageRegisters[4].Page = Data; + break; + case 0x8B: + DmaPageRegisters[5].Page = Data; + break; + case 0x89: + DmaPageRegisters[6].Page = Data; + break; + case 0x8A: + DmaPageRegisters[7].Page = Data; + break; + } +} + +/* PUBLIC FUNCTIONS ***********************************************************/ + +VOID DmaInitialize(VOID) +{ + /* Register the I/O Ports */ + + /* Channels 0(Reserved)..3 */ + RegisterIoPort(0x00, NULL, DmaWritePort); /* Start Address Register 0 (Reserved) */ + RegisterIoPort(0x01, NULL, DmaWritePort); /* Count Address Register 0 (Reserved) */ + RegisterIoPort(0x02, NULL, DmaWritePort); /* Start Address Register 1 */ + RegisterIoPort(0x03, NULL, DmaWritePort); /* Count Address Register 1 */ + RegisterIoPort(0x04, NULL, DmaWritePort); /* Start Address Register 2 */ + RegisterIoPort(0x05, NULL, DmaWritePort); /* Count Address Register 2 */ + RegisterIoPort(0x06, NULL, DmaWritePort); /* Start Address Register 3 */ + RegisterIoPort(0x07, NULL, DmaWritePort); /* Count Address Register 3 */ + + RegisterIoPort(0x08, DmaReadPort, DmaWritePort); /* Status (Read) / Command (Write) Registers */ + RegisterIoPort(0x09, NULL, DmaWritePort); /* Request Register */ + RegisterIoPort(0x0A, NULL, DmaWritePort); /* Single Channel Mask Register */ + RegisterIoPort(0x0B, NULL, DmaWritePort); /* Mode Register */ + RegisterIoPort(0x0C, NULL, DmaWritePort); /* Flip-Flop Reset Register */ + RegisterIoPort(0x0D, DmaReadPort, DmaWritePort); /* Intermediate (Read) / Master Reset (Write) Registers */ + RegisterIoPort(0x0E, NULL, DmaWritePort); /* Mask Reset Register */ + RegisterIoPort(0x0F, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Reset Register */ + + + /* Channels 4(Reserved)..7 */ + RegisterIoPort(0xC0, NULL, DmaWritePort); /* Start Address Register 4 (Reserved) */ + RegisterIoPort(0xC2, NULL, DmaWritePort); /* Count Address Register 4 (Reserved) */ + RegisterIoPort(0xC4, NULL, DmaWritePort); /* Start Address Register 5 */ + RegisterIoPort(0xC6, NULL, DmaWritePort); /* Count Address Register 5 */ + RegisterIoPort(0xC8, NULL, DmaWritePort); /* Start Address Register 6 */ + RegisterIoPort(0xCA, NULL, DmaWritePort); /* Count Address Register 6 */ + RegisterIoPort(0xCC, NULL, DmaWritePort); /* Start Address Register 7 */ + RegisterIoPort(0xCE, NULL, DmaWritePort); /* Count Address Register 7 */ + + RegisterIoPort(0xD0, DmaReadPort, DmaWritePort); /* Status (Read) / Command (Write) Registers */ + RegisterIoPort(0xD2, NULL, DmaWritePort); /* Request Register */ + RegisterIoPort(0xD4, NULL, DmaWritePort); /* Single Channel Mask Register */ + RegisterIoPort(0xD6, NULL, DmaWritePort); /* Mode Register */ + RegisterIoPort(0xD8, NULL, DmaWritePort); /* Flip-Flop Reset Register */ + RegisterIoPort(0xDA, DmaReadPort, DmaWritePort); /* Intermediate (Read) / Master Reset (Write) Registers */ + RegisterIoPort(0xDC, NULL, DmaWritePort); /* Mask Reset Register */ + RegisterIoPort(0xDE, DmaReadPort, DmaWritePort); /* Multi-Channel Mask Reset Register */ + + + /* Channels Page Address Registers */ + RegisterIoPort(0x87, DmaPageReadPort, DmaPageWritePort); /* Channel 0 (Reserved) */ + RegisterIoPort(0x83, DmaPageReadPort, DmaPageWritePort); /* Channel 1 */ + RegisterIoPort(0x81, DmaPageReadPort, DmaPageWritePort); /* Channel 2 */ + RegisterIoPort(0x82, DmaPageReadPort, DmaPageWritePort); /* Channel 3 */ + RegisterIoPort(0x8F, DmaPageReadPort, DmaPageWritePort); /* Channel 4 (Reserved) */ + RegisterIoPort(0x8B, DmaPageReadPort, DmaPageWritePort); /* Channel 5 */ + RegisterIoPort(0x89, DmaPageReadPort, DmaPageWritePort); /* Channel 6 */ + RegisterIoPort(0x8A, DmaPageReadPort, DmaPageWritePort); /* Channel 7 */ +} + + + +DWORD +WINAPI +VDDRequestDMA(IN HANDLE hVdd, + IN WORD iChannel, + IN OUT PVOID Buffer, + IN DWORD length) +{ + UNREFERENCED_PARAMETER(hVdd); + + if (iChannel >= DMA_CONTROLLERS * DMA_CONTROLLER_CHANNELS) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + + UNIMPLEMENTED; + return 0; +} + +BOOL +WINAPI +VDDQueryDMA(IN HANDLE hVdd, + IN WORD iChannel, + IN PVDD_DMA_INFO pDmaInfo) +{ + PDMA_CONTROLLER pDcp; + WORD Channel; + + UNREFERENCED_PARAMETER(hVdd); + + if (iChannel >= DMA_CONTROLLERS * DMA_CONTROLLER_CHANNELS) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + + pDcp = &DmaControllers[iChannel / DMA_CONTROLLER_CHANNELS]; + Channel = iChannel % DMA_CONTROLLER_CHANNELS; + + pDmaInfo->addr = pDcp->DmaChannel[Channel].CurrAddress; + pDmaInfo->count = pDcp->DmaChannel[Channel].CurrWordCnt; + + // pDmaInfo->page = DmaPageRegisters[iChannel].Page; + pDmaInfo->status = pDcp->Status; + pDmaInfo->mode = pDcp->DmaChannel[Channel].Mode; + pDmaInfo->mask = pDcp->Mask; + + return TRUE; +} + +BOOL +WINAPI +VDDSetDMA(IN HANDLE hVdd, + IN WORD iChannel, + IN WORD fDMA, + IN PVDD_DMA_INFO pDmaInfo) +{ + PDMA_CONTROLLER pDcp; + WORD Channel; + + UNREFERENCED_PARAMETER(hVdd); + + if (iChannel >= DMA_CONTROLLERS * DMA_CONTROLLER_CHANNELS) + { + SetLastError(ERROR_INVALID_ADDRESS); + return FALSE; + } + + pDcp = &DmaControllers[iChannel / DMA_CONTROLLER_CHANNELS]; + Channel = iChannel % DMA_CONTROLLER_CHANNELS; + + if (fDMA & VDD_DMA_ADDR) + pDcp->DmaChannel[Channel].CurrAddress = pDmaInfo->addr; + + if (fDMA & VDD_DMA_COUNT) + pDcp->DmaChannel[Channel].CurrWordCnt = pDmaInfo->count; + + // if (fDMA & VDD_DMA_PAGE) + // DmaPageRegisters[iChannel].Page = pDmaInfo->page; + + if (fDMA & VDD_DMA_STATUS) + pDcp->Status = pDmaInfo->status; + + return TRUE; +} + +/* EOF */ diff --git a/reactos/subsystems/ntvdm/hardware/dma.h b/reactos/subsystems/ntvdm/hardware/dma.h new file mode 100644 index 00000000000..1e41f28980e --- /dev/null +++ b/reactos/subsystems/ntvdm/hardware/dma.h @@ -0,0 +1,64 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: dma.h + * PURPOSE: Direct Memory Access Controller emulation - + * i8237A compatible with 74LS612 Memory Mapper extension + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +#ifndef _DMA_H_ +#define _DMA_H_ + +/* INCLUDES *******************************************************************/ + +#include "ntvdm.h" + +/* DEFINES ********************************************************************/ + +#define DMA_CONTROLLERS 2 +#define DMA_CONTROLLER_CHANNELS 4 // Each DMA controller has 4 channels + +typedef struct _DMA_CHANNEL +{ + WORD BaseAddress; + WORD BaseWordCnt; + WORD CurrAddress; + WORD CurrWordCnt; + BYTE Mode; +} DMA_CHANNEL, *PDMA_CHANNEL; + +typedef struct _DMA_CONTROLLER +{ + DMA_CHANNEL DmaChannel[DMA_CONTROLLER_CHANNELS]; + + WORD TempAddress; + WORD TempWordCnt; + + BYTE TempReg; + + BYTE Command; + BYTE Request; + BYTE Mask; + BYTE Status; + + BOOLEAN FlipFlop; // 0: LSB ; 1: MSB + +} DMA_CONTROLLER, *PDMA_CONTROLLER; + +/* 74LS612 Memory Mapper extension */ +typedef struct _DMA_PAGE_REGISTER +{ + BYTE Page; +} DMA_PAGE_REGISTER, *PDMA_PAGE_REGISTER; + +// The 74LS612 contains 16 bytes, each of them being a page register. +// They are accessible via ports 0x80 through 0x8F . + +/* FUNCTIONS ******************************************************************/ + +VOID DmaInitialize(VOID); + +#endif // _DMA_H_ + +/* EOF */ diff --git a/reactos/subsystems/ntvdm/hardware/pic.c b/reactos/subsystems/ntvdm/hardware/pic.c index 624c825c084..2d6296aaf85 100644 --- a/reactos/subsystems/ntvdm/hardware/pic.c +++ b/reactos/subsystems/ntvdm/hardware/pic.c @@ -349,4 +349,24 @@ call_ica_hw_interrupt(INT ms, } } +WORD +WINAPI +VDDReserveIrqLine(IN HANDLE hVdd, + IN WORD IrqLine) +{ + UNIMPLEMENTED; + SetLastError(ERROR_INVALID_PARAMETER); + return 0xFFFF; +} + +BOOL +WINAPI +VDDReleaseIrqLine(IN HANDLE hVdd, + IN WORD IrqLine) +{ + UNIMPLEMENTED; + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; +} + /* EOF */ diff --git a/reactos/subsystems/ntvdm/ntvdm.spec b/reactos/subsystems/ntvdm/ntvdm.spec index 244bda9200f..4cd48a8c776 100644 --- a/reactos/subsystems/ntvdm/ntvdm.spec +++ b/reactos/subsystems/ntvdm/ntvdm.spec @@ -1,6 +1,6 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; NTVDM Registers exports ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;; +;; NTVDM Registers ;; +;;;;;;;;;;;;;;;;;;;;; @ stdcall getAF() @ stdcall getAH() @@ -90,9 +90,9 @@ @ stdcall setZF(long) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; NTVDM CCPU MIPS exports ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; NTVDM CCPU MIPS Compatibility ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @ stdcall c_getAF() getAF @ stdcall c_getAH() getAH @@ -179,9 +179,9 @@ @ stdcall c_setZF(long) setZF -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; NTVDM DOS-32 Emulation exports ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; NTVDM DOS-32 Emulation ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;; @ stdcall demClientErrorEx(long long long) @ stdcall demFileDelete(ptr) @@ -200,9 +200,9 @@ ;@ stdcall demWOWLFNInit -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; NTVDM Miscellaneous exports ;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;; +;; NTVDM Miscellaneous ;; +;;;;;;;;;;;;;;;;;;;;;;;;; @ stdcall MGetVdmPointer(long long long) @ stdcall Sim32pGetVDMPointer(long long) @@ -212,9 +212,16 @@ ;@ stdcall VdmUnmapFlat(long long ptr long) ; Not exported on x86 @ stdcall call_ica_hw_interrupt(long long long) +@ stdcall VDDReserveIrqLine(long long) +@ stdcall VDDReleaseIrqLine(long long) + @ stdcall VDDInstallIOHook(long long ptr ptr) @ stdcall VDDDeInstallIOHook(long long ptr) +@ stdcall VDDRequestDMA(long long ptr long) +@ stdcall VDDQueryDMA(long long ptr) +@ stdcall VDDSetDMA(long long long ptr) + @ stdcall VDDSimulate16() @ stdcall host_simulate() VDDSimulate16 @ stdcall VDDTerminateVDM() From d8808ad153a107c2fceba03bbafd8585a9419a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 02:26:53 +0000 Subject: [PATCH 11/50] [NTVDM]: Make the environment strings list optional for some Dos app start functions. svn path=/trunk/; revision=65438 --- reactos/subsystems/ntvdm/dos/dos32krnl/dos.c | 62 +++++++++++++------- reactos/subsystems/ntvdm/dos/dos32krnl/dos.h | 4 +- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/reactos/subsystems/ntvdm/dos/dos32krnl/dos.c b/reactos/subsystems/ntvdm/dos/dos32krnl/dos.c index 743b4b6112f..4e2fc189537 100644 --- a/reactos/subsystems/ntvdm/dos/dos32krnl/dos.c +++ b/reactos/subsystems/ntvdm/dos/dos32krnl/dos.c @@ -403,40 +403,60 @@ static VOID DosChangeMemoryOwner(WORD Segment, WORD NewOwner) Mcb->OwnerPsp = NewOwner; } -static WORD DosCopyEnvironmentBlock(LPCSTR Environment, LPCSTR ProgramName) +static WORD DosCopyEnvironmentBlock(LPCSTR Environment OPTIONAL, + LPCSTR ProgramName) { PCHAR Ptr, DestBuffer = NULL; ULONG TotalSize = 0; WORD DestSegment; - Ptr = (PCHAR)Environment; + /* If we have an environment strings list, compute its size */ + if (Environment) + { + /* Calculate the size of the environment block */ + Ptr = (PCHAR)Environment; + while (*Ptr) Ptr += strlen(Ptr) + 1; + TotalSize = (ULONG_PTR)Ptr - (ULONG_PTR)Environment; + } + else + { + /* Empty environment string */ + TotalSize = 1; + } + /* Add the final environment block NULL-terminator */ + TotalSize++; - /* Calculate the size of the environment block */ - while (*Ptr) Ptr += strlen(Ptr) + 1; - TotalSize = (ULONG_PTR)Ptr - (ULONG_PTR)Environment + 1; // Add final NULL-terminator + /* Add the two bytes for the program name tag */ + TotalSize += 2; /* Add the string buffer size */ TotalSize += strlen(ProgramName) + 1; - /* Add the two extra bytes */ - TotalSize += 2; - /* Allocate the memory for the environment block */ DestSegment = DosAllocateMemory((WORD)((TotalSize + 0x0F) >> 4), NULL); if (!DestSegment) return 0; - Ptr = (PCHAR)Environment; - DestBuffer = (PCHAR)SEG_OFF_TO_PTR(DestSegment, 0); - while (*Ptr) - { - /* Copy the string and NULL-terminate it */ - strcpy(DestBuffer, Ptr); - DestBuffer += strlen(Ptr); - *(DestBuffer++) = '\0'; - /* Move to the next string */ - Ptr += strlen(Ptr) + 1; + /* If we have an environment strings list, copy it */ + if (Environment) + { + Ptr = (PCHAR)Environment; + while (*Ptr) + { + /* Copy the string and NULL-terminate it */ + strcpy(DestBuffer, Ptr); + DestBuffer += strlen(Ptr); + *(DestBuffer++) = '\0'; + + /* Move to the next string */ + Ptr += strlen(Ptr) + 1; + } + } + else + { + /* Empty environment string */ + *(DestBuffer++) = '\0'; } /* NULL-terminate the environment block */ *(DestBuffer++) = '\0'; @@ -900,7 +920,7 @@ VOID DosInitializePsp(WORD PspSegment, LPCSTR CommandLine, WORD ProgramSize, WOR DWORD DosLoadExecutable(IN DOS_EXEC_TYPE LoadType, IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, - IN LPCSTR Environment, + IN LPCSTR Environment OPTIONAL, OUT PDWORD StackLocation OPTIONAL, OUT PDWORD EntryPoint OPTIONAL) { @@ -920,7 +940,7 @@ DWORD DosLoadExecutable(IN DOS_EXEC_TYPE LoadType, LoadType, ExecutablePath, CommandLine, - Environment, + Environment ? Environment : "n/a", StackLocation, EntryPoint); @@ -1144,7 +1164,7 @@ Cleanup: DWORD DosStartProcess(IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, - IN LPCSTR Environment) + IN LPCSTR Environment OPTIONAL) { DWORD Result; diff --git a/reactos/subsystems/ntvdm/dos/dos32krnl/dos.h b/reactos/subsystems/ntvdm/dos/dos32krnl/dos.h index 3da70b63242..a7da71b2099 100644 --- a/reactos/subsystems/ntvdm/dos/dos32krnl/dos.h +++ b/reactos/subsystems/ntvdm/dos/dos32krnl/dos.h @@ -224,7 +224,7 @@ DWORD DosLoadExecutable( IN DOS_EXEC_TYPE LoadType, IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, - IN LPCSTR Environment, + IN LPCSTR Environment OPTIONAL, OUT PDWORD StackLocation OPTIONAL, OUT PDWORD EntryPoint OPTIONAL ); @@ -236,7 +236,7 @@ WORD DosCreateProcess( DWORD DosStartProcess( IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, - IN LPCSTR Environment + IN LPCSTR Environment OPTIONAL ); VOID DosTerminateProcess(WORD Psp, BYTE ReturnCode); BOOLEAN DosHandleIoctl(BYTE ControlCode, WORD FileHandle); From 8e44d4d4af859338fb034e758dd25f872d4c0cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 02:35:38 +0000 Subject: [PATCH 12/50] [URTL]: Fix whitespace plus misspelling. svn path=/trunk/; revision=65439 --- reactos/lib/sdk/nt/entry_point.c | 100 +++++++++++++++---------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/reactos/lib/sdk/nt/entry_point.c b/reactos/lib/sdk/nt/entry_point.c index b0969cf1466..03fb65fce01 100644 --- a/reactos/lib/sdk/nt/entry_point.c +++ b/reactos/lib/sdk/nt/entry_point.c @@ -33,27 +33,27 @@ _main( static VOID FASTCALL EnvironmentStringToUnicodeString (PWCHAR wsIn, PUNICODE_STRING usOut) { - if (wsIn) - { - PWCHAR CurrentChar = wsIn; - - while (*CurrentChar) - { - while(*CurrentChar++); - } - /* double nullterm at end */ - CurrentChar++; + if (wsIn) + { + PWCHAR CurrentChar = wsIn; - usOut->Buffer = wsIn; - /* FIXME: the last (double) nullterm should perhaps not be included in Length - * but only in MaximumLength. -Gunnar */ - usOut->MaximumLength = usOut->Length = (CurrentChar-wsIn) * sizeof(WCHAR); - } - else - { - usOut->Buffer = NULL; - usOut->Length = usOut->MaximumLength = 0; - } + while (*CurrentChar) + { + while(*CurrentChar++); + } + /* double nullterm at end */ + CurrentChar++; + + usOut->Buffer = wsIn; + /* FIXME: the last (double) nullterm should perhaps not be included in Length + * but only in MaximumLength. -Gunnar */ + usOut->MaximumLength = usOut->Length = (CurrentChar-wsIn) * sizeof(WCHAR); + } + else + { + usOut->Buffer = NULL; + usOut->Length = usOut->MaximumLength = 0; + } } @@ -91,9 +91,9 @@ NtProcessStartup(PPEB Peb) ArgumentList = RtlAllocateHeap(RtlGetProcessHeap(), 0, 512 * sizeof(PCHAR)); if (!ArgumentList) { - DPRINT1("ERR: no mem!"); - Status = STATUS_NO_MEMORY; - goto fail; + DPRINT1("ERR: no mem!"); + Status = STATUS_NO_MEMORY; + goto fail; } /* Use a null pointer as default */ @@ -117,8 +117,8 @@ NtProcessStartup(PPEB Peb) Status = RtlUnicodeStringToAnsiString(&AnsiCmdLine, CmdLineString, TRUE); if (!NT_SUCCESS(Status)) { - DPRINT1("ERR: no mem(guess)\n"); - goto fail; + DPRINT1("ERR: no mem(guess)\n"); + goto fail; } /* Save parameters for parsing */ @@ -130,12 +130,12 @@ NtProcessStartup(PPEB Peb) { /* Allocate a buffer for the destination */ Destination = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length + sizeof(WCHAR)); - if (!Destination) - { - DPRINT1("ERR: no mem!"); - Status = STATUS_NO_MEMORY; - goto fail; - } + if (!Destination) + { + DPRINT1("ERR: no mem!"); + Status = STATUS_NO_MEMORY; + goto fail; + } /* Start parsing */ while (*Source) @@ -164,33 +164,33 @@ NtProcessStartup(PPEB Peb) /* Null terminate the token pointer list */ *ArgumentList++ = NULL; - /* Now handle the enviornment, point the envp at our current list location. */ + /* Now handle the environment, point the envp at our current list location. */ envp = ArgumentList; if (ProcessParameters->Environment) { - EnvironmentStringToUnicodeString(ProcessParameters->Environment, &UnicodeEnvironment); - Status = RtlUnicodeStringToAnsiString (& AnsiEnvironment, & UnicodeEnvironment, TRUE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ERR: no mem(guess)\n"); - goto fail; - } + EnvironmentStringToUnicodeString(ProcessParameters->Environment, &UnicodeEnvironment); + Status = RtlUnicodeStringToAnsiString (& AnsiEnvironment, & UnicodeEnvironment, TRUE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("ERR: no mem(guess)\n"); + goto fail; + } - ASSERT(AnsiEnvironment.Buffer); + ASSERT(AnsiEnvironment.Buffer); - Source = AnsiEnvironment.Buffer; - while (*Source) - { - /* Save a pointer to this token */ - *ArgumentList++ = Source; + Source = AnsiEnvironment.Buffer; + while (*Source) + { + /* Save a pointer to this token */ + *ArgumentList++ = Source; - /* Keep looking for another variable */ - while (*Source++); - } + /* Keep looking for another variable */ + while (*Source++); + } - /* Null terminate the list again */ - *ArgumentList++ = NULL; + /* Null terminate the list again */ + *ArgumentList++ = NULL; } /* Breakpoint if we were requested to do so */ if (ProcessParameters->DebugFlags) DbgBreakPoint(); From 692cd5a0bb0882d7f1c9f0bb79a98ae4f22a6c2b Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 21 Nov 2014 03:15:27 +0000 Subject: [PATCH 13/50] [NtUser] - Synchronize mouse messages. Best way to do this, just post the move message while it occurs and just update it with recurrent information. The other way was to check time stamps and that was a hackish headache. Then the scorn and reticule would erupt. So it was easier to just post to the queue, update and if a mouse down up was captured than it would be in the order as it was received. - See CORE-8779 #resolve, CORE-8394, CORE-7797, CORE-7447. svn path=/trunk/; revision=65440 --- reactos/win32ss/user/ntuser/message.c | 11 --- reactos/win32ss/user/ntuser/msgqueue.c | 130 ++++++++----------------- reactos/win32ss/user/ntuser/msgqueue.h | 9 -- reactos/win32ss/user/ntuser/timer.c | 2 +- 4 files changed, 40 insertions(+), 112 deletions(-) diff --git a/reactos/win32ss/user/ntuser/message.c b/reactos/win32ss/user/ntuser/message.c index c7786b4939b..e705a8ffa7a 100644 --- a/reactos/win32ss/user/ntuser/message.c +++ b/reactos/win32ss/user/ntuser/message.c @@ -858,17 +858,6 @@ co_IntPeekMessage( PMSG Msg, return TRUE; } - if ((ProcessMask & QS_MOUSE) && - co_MsqPeekMouseMove( pti, - RemoveMessages, - Window, - MsgFilterMin, - MsgFilterMax, - Msg )) - { - return TRUE; - } - /* Check for hardware events. */ if ((ProcessMask & QS_INPUT) && co_MsqPeekHardwareMessage( pti, diff --git a/reactos/win32ss/user/ntuser/msgqueue.c b/reactos/win32ss/user/ntuser/msgqueue.c index e82ca127a15..7550aa31adc 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.c +++ b/reactos/win32ss/user/ntuser/msgqueue.c @@ -37,44 +37,6 @@ MsqInitializeImpl(VOID) return(STATUS_SUCCESS); } -PWND FASTCALL -IntChildrenWindowFromPoint(PWND pWndTop, INT x, INT y) -{ - PWND pWnd, pWndChild; - - if ( !pWndTop ) - { - pWndTop = UserGetDesktopWindow(); - if ( !pWndTop ) return NULL; - } - - if (!(pWndTop->style & WS_VISIBLE)) return NULL; - if ((pWndTop->style & WS_DISABLED)) return NULL; - if (!IntPtInWindow(pWndTop, x, y)) return NULL; - - if (RECTL_bPointInRect(&pWndTop->rcClient, x, y)) - { - for (pWnd = pWndTop->spwndChild; - pWnd != NULL; - pWnd = pWnd->spwndNext) - { - if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED ) - { - TRACE("The Window is in DESTROY!\n"); - continue; - } - - pWndChild = IntChildrenWindowFromPoint(pWnd, x, y); - - if (pWndChild) - { - return pWndChild; - } - } - } - return pWndTop; -} - PWND FASTCALL IntTopLevelWindowFromPoint(INT x, INT y) { @@ -446,9 +408,16 @@ ClearMsgBitsMask(PTHREADINFO pti, UINT MessageBits) } if (MessageBits & QS_MOUSEMOVE) // ReactOS hard coded. { // Account for tracking mouse moves.. - if (--pti->nCntsQBits[QSRosMouseMove] == 0) ClrMask |= QS_MOUSEMOVE; + if (pti->nCntsQBits[QSRosMouseMove]) + { + pti->nCntsQBits[QSRosMouseMove] = 0; // Throttle down count. Up to > 3:1 entries are ignored. + } // Handle mouse move bits here. - if (Queue->MouseMoved) ClrMask |= QS_MOUSEMOVE; + if (Queue->MouseMoved) + { + ClrMask |= QS_MOUSEMOVE; + Queue->MouseMoved = FALSE; + } } if (MessageBits & QS_MOUSEBUTTON) { @@ -502,12 +471,34 @@ MsqDecPaintCountQueue(PTHREADINFO pti) ClearMsgBitsMask(pti, QS_PAINT); } +/* + Post Mouse Move. + */ VOID FASTCALL MsqPostMouseMove(PTHREADINFO pti, MSG* Msg) { - pti->MessageQueue->MouseMoveMsg = *Msg; - pti->MessageQueue->MouseMoved = TRUE; - MsqWakeQueue(pti, QS_MOUSEMOVE, TRUE); + PUSER_MESSAGE Message; + PLIST_ENTRY ListHead; + PUSER_MESSAGE_QUEUE MessageQueue = pti->MessageQueue; + + ListHead = &MessageQueue->HardwareMessagesListHead; + + MessageQueue->MouseMoved = TRUE; + + if (!IsListEmpty(ListHead->Flink)) + { // Look at the end of the list, + Message = CONTAINING_RECORD(ListHead->Blink, USER_MESSAGE, ListEntry); + // If the mouse move message is existing, + if (Message->Msg.message == WM_MOUSEMOVE) + { + TRACE("Post Old MM Message in Q\n"); + Message->Msg = *Msg; // Overwrite the message with updated data! + MsqWakeQueue(pti, QS_MOUSEMOVE, TRUE); + return; + } + } + TRACE("Post New MM Message to Q\n"); + MsqPostMessage(pti, Msg, TRUE, QS_MOUSEMOVE, 0); } VOID FASTCALL @@ -581,14 +572,15 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook { pti = pwnd->head.pti; MessageQueue = pti->MessageQueue; - // MessageQueue->ptiMouse = pti; - if ( pti->TIF_flags & TIF_INCLEANUP || MessageQueue->QF_flags & QF_INDESTROY) + if (MessageQueue->QF_flags & QF_INDESTROY) { - ERR("Mouse is over the Window Thread is Dead!\n"); + ERR("Mouse is over a Window with a Dead Message Queue!\n"); return; } + MessageQueue->ptiMouse = pti; + if (Msg->message == WM_MOUSEMOVE) { /* Check if cursor should be visible */ @@ -642,6 +634,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook { // ERR("ptiLastInput is set\n"); // ptiLastInput = pti; // Once this is set during Reboot or Shutdown, this prevents the exit window having foreground. + // Find all the Move Mouse calls and fix mouse set active focus issues...... } TRACE("Posting mouse message to hwnd=%p!\n", UserHMGetHandle(pwnd)); MsqPostMessage(pti, Msg, TRUE, QS_MOUSEBUTTON, 0); @@ -1677,51 +1670,6 @@ BOOL co_IntProcessHardwareMessage(MSG* Msg, BOOL* RemoveMessages, UINT first, UI return TRUE; } -BOOL APIENTRY -co_MsqPeekMouseMove(IN PTHREADINFO pti, - IN BOOL Remove, - IN PWND Window, - IN UINT MsgFilterLow, - IN UINT MsgFilterHigh, - OUT MSG* pMsg) -{ - BOOL AcceptMessage; - MSG msg; - PUSER_MESSAGE_QUEUE MessageQueue = pti->MessageQueue; - - if(!(MessageQueue->MouseMoved)) - return FALSE; - - if (!MessageQueue->ptiSysLock) - { - MessageQueue->ptiSysLock = pti; - pti->pcti->CTI_flags |= CTI_THREADSYSLOCK; - } - - if (MessageQueue->ptiSysLock != pti) - { - ERR("MsqPeekMouseMove: Thread Q is locked to another pti!\n"); - return FALSE; - } - - msg = MessageQueue->MouseMoveMsg; - - AcceptMessage = co_IntProcessMouseMessage(&msg, &Remove, MsgFilterLow, MsgFilterHigh); - - if(AcceptMessage) - *pMsg = msg; - - if(Remove) - { - ClearMsgBitsMask(pti, QS_MOUSEMOVE); - MessageQueue->MouseMoved = FALSE; - } - - MessageQueue->ptiSysLock = NULL; - pti->pcti->CTI_flags &= ~CTI_THREADSYSLOCK; - return AcceptMessage; -} - /* check whether a message filter contains at least one potential hardware message */ static INT FASTCALL filter_contains_hw_range( UINT first, UINT last ) diff --git a/reactos/win32ss/user/ntuser/msgqueue.h b/reactos/win32ss/user/ntuser/msgqueue.h index e2882f84cbc..61f52279e3d 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.h +++ b/reactos/win32ss/user/ntuser/msgqueue.h @@ -54,8 +54,6 @@ typedef struct _USER_MESSAGE_QUEUE /* True if a WM_MOUSEMOVE is pending */ BOOLEAN MouseMoved; /* Current WM_MOUSEMOVE message */ - MSG MouseMoveMsg; - /* Last click message for translating double clicks */ MSG msgDblClk; /* Current capture window for this queue. */ PWND spwndCapture; @@ -142,13 +140,6 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti, IN UINT MsgFilterHigh, IN UINT QSflags, OUT MSG* pMsg); -BOOL APIENTRY -co_MsqPeekMouseMove(IN PTHREADINFO pti, - IN BOOL Remove, - IN PWND Window, - IN UINT MsgFilterLow, - IN UINT MsgFilterHigh, - OUT MSG* pMsg); BOOLEAN FASTCALL MsqInitializeMessageQueue(PTHREADINFO, PUSER_MESSAGE_QUEUE); PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(PTHREADINFO); VOID FASTCALL MsqCleanupThreadMsgs(PTHREADINFO); diff --git a/reactos/win32ss/user/ntuser/timer.c b/reactos/win32ss/user/ntuser/timer.c index 3cbf14e576e..f3355a5095c 100644 --- a/reactos/win32ss/user/ntuser/timer.c +++ b/reactos/win32ss/user/ntuser/timer.c @@ -315,7 +315,7 @@ SystemTimerProc(HWND hwnd, if ( pDesk->dwDTFlags & DF_TME_HOVER && pWnd == pDesk->spwndTrack ) { - Point = pWnd->head.pti->MessageQueue->MouseMoveMsg.pt; + Point = gpsi->ptCursor; if ( RECTL_bPointInRect(&pDesk->rcMouseHover, Point.x, Point.y) ) { if (pDesk->htEx == HTCLIENT) // In a client area. From 6ad28810805d83a996fd8ef6f6ac1bef27b4d224 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Fri, 21 Nov 2014 09:46:57 +0000 Subject: [PATCH 14/50] [FAST486] Attempt to write the value to the stack before subtracting from the actual ESP register in Fast486StackPush. svn path=/trunk/; revision=65441 --- reactos/lib/fast486/common.inl | 38 +++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/reactos/lib/fast486/common.inl b/reactos/lib/fast486/common.inl index 381ed032cdc..ed811fff573 100644 --- a/reactos/lib/fast486/common.inl +++ b/reactos/lib/fast486/common.inl @@ -317,15 +317,19 @@ Fast486StackPush(PFAST486_STATE State, return FALSE; } + /* Store the value in SS:[ESP - 4] */ + if (!Fast486WriteMemory(State, + FAST486_REG_SS, + State->GeneralRegs[FAST486_REG_ESP].Long - sizeof(ULONG), + &Value, + sizeof(ULONG))) + { + /* Exception occurred */ + return FALSE; + } + /* Subtract ESP by 4 */ State->GeneralRegs[FAST486_REG_ESP].Long -= sizeof(ULONG); - - /* Store the value in SS:ESP */ - return Fast486WriteMemory(State, - FAST486_REG_SS, - State->GeneralRegs[FAST486_REG_ESP].Long, - &Value, - sizeof(ULONG)); } else { @@ -339,16 +343,22 @@ Fast486StackPush(PFAST486_STATE State, return FALSE; } + /* Store the value in SS:[SP - 2] */ + if (!Fast486WriteMemory(State, + FAST486_REG_SS, + LOWORD(State->GeneralRegs[FAST486_REG_ESP].LowWord - sizeof(USHORT)), + &ShortValue, + sizeof(USHORT))) + { + /* Exception occurred */ + return FALSE; + } + /* Subtract SP by 2 */ State->GeneralRegs[FAST486_REG_ESP].LowWord -= sizeof(USHORT); - - /* Store the value in SS:SP */ - return Fast486WriteMemory(State, - FAST486_REG_SS, - State->GeneralRegs[FAST486_REG_ESP].LowWord, - &ShortValue, - sizeof(USHORT)); } + + return TRUE; } FORCEINLINE From 37a3e6af8aa16154d2ea6ca96d5740c6ed00af75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Fri, 21 Nov 2014 15:55:39 +0000 Subject: [PATCH 15/50] [NTVDM:DOS]: Don't forget to update CommandInfo.Env otherwise we would use the old environment buffer that is now invalid, hence corrupting the heap and doing other nasty things :P Debugged by V. svn path=/trunk/; revision=65442 --- reactos/subsystems/ntvdm/dos/dem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsystems/ntvdm/dos/dem.c b/reactos/subsystems/ntvdm/dos/dem.c index f5f032e7021..e65c2eff8cb 100644 --- a/reactos/subsystems/ntvdm/dos/dem.c +++ b/reactos/subsystems/ntvdm/dos/dem.c @@ -236,7 +236,7 @@ Command: { /* Expand the environment size */ EnvSize = CommandInfo.EnvLen; - Env = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Env, EnvSize); + CommandInfo.Env = Env = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Env, EnvSize); /* Repeat the request */ goto Command; From 1dd4984c28a2486769a04d6bbf104b033f0372cc Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 21 Nov 2014 18:45:18 +0000 Subject: [PATCH 16/50] [NTOS:PNPMGR] * Attempt to address Timo's review about coding style changes. svn path=/trunk/; revision=65443 --- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index b607a74f42f..97373acd6f7 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -199,7 +199,10 @@ IopCaptureUnicodeString(PUNICODE_STRING DstName, PUNICODE_STRING SrcName) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { - if (Name.Buffer) ExFreePool(Name.Buffer); + if (Name.Buffer) + { + ExFreePool(Name.Buffer); + } Status = _SEH2_GetExceptionCode(); } _SEH2_END; From 80b272de8e0e03141ee4320aa522cc2b717848de Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 21 Nov 2014 18:57:46 +0000 Subject: [PATCH 17/50] [TRANSLATIONS][WDMAUD] * Reactos/ReactOs => ReactOS. svn path=/trunk/; revision=65444 --- reactos/base/applications/calc/lang/no-NO.rc | 2 +- reactos/base/applications/calc/lang/sv-SE.rc | 2 +- reactos/base/setup/welcome/lang/da-DK.rc | 4 ++-- reactos/base/shell/cmd/lang/no-NO.rc | 2 +- reactos/base/shell/cmd/lang/sv-SE.rc | 2 +- reactos/base/shell/explorer/explorer-el.rc | 4 ++-- reactos/base/shell/explorer/explorer-zh.rc | 2 +- reactos/dll/cpl/access/lang/bg-BG.rc | 2 +- reactos/dll/cpl/access/lang/cs-CZ.rc | 2 +- reactos/dll/cpl/access/lang/el-GR.rc | 6 +++--- reactos/dll/cpl/access/lang/en-US.rc | 6 +++--- reactos/dll/cpl/access/lang/es-ES.rc | 6 +++--- reactos/dll/cpl/access/lang/fr-FR.rc | 2 +- reactos/dll/cpl/access/lang/he-IL.rc | 6 +++--- reactos/dll/cpl/access/lang/hu-HU.rc | 6 +++--- reactos/dll/cpl/access/lang/id-ID.rc | 6 +++--- reactos/dll/cpl/access/lang/nl-NL.rc | 6 +++--- reactos/dll/cpl/access/lang/no-NO.rc | 6 +++--- reactos/dll/cpl/access/lang/pl-PL.rc | 2 +- reactos/dll/cpl/access/lang/sk-SK.rc | 6 +++--- reactos/dll/cpl/access/lang/sq-AL.rc | 6 +++--- reactos/dll/cpl/mmsys/lang/nl-NL.rc | 2 +- reactos/dll/win32/syssetup/lang/nl-NL.rc | 4 ++-- reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc | 2 +- 24 files changed, 47 insertions(+), 47 deletions(-) diff --git a/reactos/base/applications/calc/lang/no-NO.rc b/reactos/base/applications/calc/lang/no-NO.rc index 168ba2b6d71..f69437c5f25 100644 --- a/reactos/base/applications/calc/lang/no-NO.rc +++ b/reactos/base/applications/calc/lang/no-NO.rc @@ -405,7 +405,7 @@ BEGIN BEGIN MENUITEM "Emner i hjelp", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "Om Reactos Kalkulator", IDM_HELP_ABOUT + MENUITEM "Om ReactOS Kalkulator", IDM_HELP_ABOUT END END diff --git a/reactos/base/applications/calc/lang/sv-SE.rc b/reactos/base/applications/calc/lang/sv-SE.rc index bc812a168a3..e91e2e593d9 100644 --- a/reactos/base/applications/calc/lang/sv-SE.rc +++ b/reactos/base/applications/calc/lang/sv-SE.rc @@ -412,7 +412,7 @@ BEGIN BEGIN MENUITEM "Visa hjälp", IDM_HELP_HELP MENUITEM SEPARATOR - MENUITEM "Om Reactos Kalkylator", IDM_HELP_ABOUT + MENUITEM "Om ReactOS Kalkylator", IDM_HELP_ABOUT END END diff --git a/reactos/base/setup/welcome/lang/da-DK.rc b/reactos/base/setup/welcome/lang/da-DK.rc index b78cff4cc07..237dbf419aa 100644 --- a/reactos/base/setup/welcome/lang/da-DK.rc +++ b/reactos/base/setup/welcome/lang/da-DK.rc @@ -7,7 +7,7 @@ STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Velkommen" IDS_DEFAULTTOPICTITLE "ReactOS" - IDS_DEFAULTTOPICDESC "Velkommen til ReactOs operativ System.\n\nKlik på et emne til venstre." + IDS_DEFAULTTOPICDESC "Velkommen til ReactOS operativ System.\n\nKlik på et emne til venstre." // IDS_CHECKTEXT "Vis denne dialog igen ved opstart" // IDS_CLOSETEXT "Afslut" END @@ -46,7 +46,7 @@ END STRINGTABLE BEGIN IDS_TOPICDESC0 "Opret en ny ReactOS installation på din computer eller opgradere en eksisterende installation." - IDS_TOPICDESC1 "Gennemse Reactos Installations Cdrom" + IDS_TOPICDESC1 "Gennemse ReactOS Installations Cdrom" IDS_TOPICDESC2 "Klik på Afslut for at lukke." // IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." // IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." diff --git a/reactos/base/shell/cmd/lang/no-NO.rc b/reactos/base/shell/cmd/lang/no-NO.rc index c189bd61383..d9c4b1398cc 100644 --- a/reactos/base/shell/cmd/lang/no-NO.rc +++ b/reactos/base/shell/cmd/lang/no-NO.rc @@ -411,7 +411,7 @@ VERIFY [ON | OFF]\n\n\ Skriv VERIFY uten parametre for å vise gjeldende VERIFY innstillinger.\n" STRING_VERIFY_HELP2 "VERIFY er %s.\n" STRING_VERIFY_HELP3 "Må spesifisere ON eller OFF." - STRING_VERSION_HELP1 "Vis Reactos versjonen\n\n\ + STRING_VERSION_HELP1 "Vis ReactOS versjonen\n\n\ VER [/C][/R][/W]\n\n\ /C Vis anerkjennelse.\n\ /R Vis videreformidlingsinformasjon.\n\ diff --git a/reactos/base/shell/cmd/lang/sv-SE.rc b/reactos/base/shell/cmd/lang/sv-SE.rc index ecdd380d697..da739c64698 100644 --- a/reactos/base/shell/cmd/lang/sv-SE.rc +++ b/reactos/base/shell/cmd/lang/sv-SE.rc @@ -411,7 +411,7 @@ VERIFY [ON | OFF]\n\n\ Skriv VERIFY uten parametre för att visa aktuell VERIFY inställninar.\n" STRING_VERIFY_HELP2 "VERIFY är %s.\n" STRING_VERIFY_HELP3 "Må ange ON eller OFF." - STRING_VERSION_HELP1 "Vis Reactos versjonen\n\n\ + STRING_VERSION_HELP1 "Vis ReactOS versjonen\n\n\ VER [/C][/R][/W]\n\n\ /C Vis anerkjennelse.\n\ /R Vis videreformidlingsinformasjon.\n\ diff --git a/reactos/base/shell/explorer/explorer-el.rc b/reactos/base/shell/explorer/explorer-el.rc index 9c6d756b50d..d16ceccf288 100644 --- a/reactos/base/shell/explorer/explorer-el.rc +++ b/reactos/base/shell/explorer/explorer-el.rc @@ -39,7 +39,7 @@ BEGIN BEGIN MENUITEM " &FAQ...", ID_EXPLORER_FAQ MENUITEM "& ", ID_ABOUT_EXPLORER - MENUITEM "& Reactos", ID_ABOUT_WINDOWS + MENUITEM "& ReactOS", ID_ABOUT_WINDOWS END END @@ -102,7 +102,7 @@ BEGIN BEGIN MENUITEM " &FAQ", ID_EXPLORER_FAQ MENUITEM "& ", ID_ABOUT_EXPLORER - MENUITEM "& Reactos", ID_ABOUT_WINDOWS + MENUITEM "& ReactOS", ID_ABOUT_WINDOWS END END diff --git a/reactos/base/shell/explorer/explorer-zh.rc b/reactos/base/shell/explorer/explorer-zh.rc index 58746d4fd66..086e3e33c39 100644 --- a/reactos/base/shell/explorer/explorer-zh.rc +++ b/reactos/base/shell/explorer/explorer-zh.rc @@ -232,7 +232,7 @@ END STRINGTABLE BEGIN - IDS_TITLE "Reactos 浏览器" + IDS_TITLE "ReactOS 浏览器" IDS_START "开始" IDS_LOGOFF "注销..." IDS_SHUTDOWN "关闭..." diff --git a/reactos/dll/cpl/access/lang/bg-BG.rc b/reactos/dll/cpl/access/lang/bg-BG.rc index 4e606a270a4..3070e7c9246 100644 --- a/reactos/dll/cpl/access/lang/bg-BG.rc +++ b/reactos/dll/cpl/access/lang/bg-BG.rc @@ -48,7 +48,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "High Contrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Use this option if you want Reactos to use colors and fonts designed for easy reading.", + LTEXT "Use this option if you want ReactOS to use colors and fonts designed for easy reading.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Use High Contrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Settings", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/cs-CZ.rc b/reactos/dll/cpl/access/lang/cs-CZ.rc index 0b29558454b..3e174a6ff0f 100644 --- a/reactos/dll/cpl/access/lang/cs-CZ.rc +++ b/reactos/dll/cpl/access/lang/cs-CZ.rc @@ -48,7 +48,7 @@ CAPTION "Zobrazení" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Funkce Vysoký kontrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Vyberte tuto možnost pokud chcete, aby Reactos používal barvy a písma určené pro snadnou čitelnost.", + LTEXT "Vyberte tuto možnost pokud chcete, aby ReactOS používal barvy a písma určené pro snadnou čitelnost.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Použít funkci Vysoký kontrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Nastavení", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/el-GR.rc b/reactos/dll/cpl/access/lang/el-GR.rc index c76cd28c3cc..b0d8a6e008c 100644 --- a/reactos/dll/cpl/access/lang/el-GR.rc +++ b/reactos/dll/cpl/access/lang/el-GR.rc @@ -11,7 +11,7 @@ BEGIN AUTOCHECKBOX " & ", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX " ", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT " , Reactos , .", + LTEXT " , ReactOS , .", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX " & ", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -30,7 +30,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX " ", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT " , Reactos .", + LTEXT " , ReactOS .", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX " ", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT " ", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -48,7 +48,7 @@ CAPTION " FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT " , Reactos .", + LTEXT " , ReactOS .", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX " ", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/en-US.rc b/reactos/dll/cpl/access/lang/en-US.rc index 0e80a953e57..0a482299d8f 100644 --- a/reactos/dll/cpl/access/lang/en-US.rc +++ b/reactos/dll/cpl/access/lang/en-US.rc @@ -11,7 +11,7 @@ BEGIN AUTOCHECKBOX "&Use StickyKeys", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Settings", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Use FilterKeys if you want Reactos to ignore brief or repeated keystrokes, or slow the repeat rate.", + LTEXT "Use FilterKeys if you want ReactOS to ignore brief or repeated keystrokes, or slow the repeat rate.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "S&ettings", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -30,7 +30,7 @@ CAPTION "Sound" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "SoundSentry", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Use SoundSentry if you want Reactos to generate visual warnings when your system makes a sound.", + LTEXT "Use SoundSentry if you want ReactOS to generate visual warnings when your system makes a sound.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &SoundSentry", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Use the following warning:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -48,7 +48,7 @@ CAPTION "Display" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "High Contrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Use this option if you want Reactos to use colors and fonts designed for easy reading.", + LTEXT "Use this option if you want ReactOS to use colors and fonts designed for easy reading.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Use High Contrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Settings", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/es-ES.rc b/reactos/dll/cpl/access/lang/es-ES.rc index 6ff58a098cc..e281e88c9c1 100644 --- a/reactos/dll/cpl/access/lang/es-ES.rc +++ b/reactos/dll/cpl/access/lang/es-ES.rc @@ -13,7 +13,7 @@ BEGIN AUTOCHECKBOX "Utilizar &StickyKeys ", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Configuracin", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Use FilterKeys si desea que Reactos omita la pulsaciones repetidas o breves, o reducir la velocidad de repeticin.", + LTEXT "Use FilterKeys si desea que ReactOS omita la pulsaciones repetidas o breves, o reducir la velocidad de repeticin.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Utilizar &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "Co&nfiguracin", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -32,7 +32,7 @@ CAPTION "Sonido" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Vigilante Auditivo ", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Use el Vigilante Auditivo si desea que Reactos genere avisos visuales cuando el sistema emita un sonido.", + LTEXT "Use el Vigilante Auditivo si desea que ReactOS genere avisos visuales cuando el sistema emita un sonido.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Utilizar Vigilante Auditivo", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Elija la advertencia visual:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -50,7 +50,7 @@ CAPTION "Pantalla" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Contraste alto ", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Use esta opcin si desea que Reactos use colores y letras diseadas para una lectura ms cmoda.", + LTEXT "Use esta opcin si desea que ReactOS use colores y letras diseadas para una lectura ms cmoda.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Utilizar Contraste alto", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "C&onfiguracin", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/fr-FR.rc b/reactos/dll/cpl/access/lang/fr-FR.rc index 6e260bbaf62..3cd943943ef 100644 --- a/reactos/dll/cpl/access/lang/fr-FR.rc +++ b/reactos/dll/cpl/access/lang/fr-FR.rc @@ -32,7 +32,7 @@ CAPTION "Son" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Sons visuels", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Utilisez les sons visuels si vous voulez que Reactos gnre un avertissement visuel lorsque votre systme met un son.", + LTEXT "Utilisez les sons visuels si vous voulez que ReactOS gnre un avertissement visuel lorsque votre systme met un son.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Utiliser les &sons visuels", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Utiliser l'avertissement suivant :", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) diff --git a/reactos/dll/cpl/access/lang/he-IL.rc b/reactos/dll/cpl/access/lang/he-IL.rc index e2a246f5f89..384ca73772c 100644 --- a/reactos/dll/cpl/access/lang/he-IL.rc +++ b/reactos/dll/cpl/access/lang/he-IL.rc @@ -13,7 +13,7 @@ BEGIN AUTOCHECKBOX "השתמש במקשים דביקים", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "הגדרות", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Use FilterKeys if you want Reactos to ignore brief or repeated keystrokes, or slow the repeat rate.", + LTEXT "Use FilterKeys if you want ReactOS to ignore brief or repeated keystrokes, or slow the repeat rate.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "הגדרות", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -32,7 +32,7 @@ CAPTION "צליל" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "שומר קולי", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Use SoundSentry if you want Reactos to generate visual warnings when your system makes a sound.", + LTEXT "Use SoundSentry if you want ReactOS to generate visual warnings when your system makes a sound.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "השתמש בשומר הקולי", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "השתמש באזהרות הבאות:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -50,7 +50,7 @@ CAPTION "תצןגה" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "ניגודיות גבוהה", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Use this option if you want Reactos to use colors and fonts designed for easy reading.", + LTEXT "Use this option if you want ReactOS to use colors and fonts designed for easy reading.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "השתמש בניגודיות גבוהה", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "הגדרות", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/hu-HU.rc b/reactos/dll/cpl/access/lang/hu-HU.rc index 32f862e688f..6765fa51fff 100644 --- a/reactos/dll/cpl/access/lang/hu-HU.rc +++ b/reactos/dll/cpl/access/lang/hu-HU.rc @@ -13,7 +13,7 @@ BEGIN AUTOCHECKBOX "&Beragad billentyk hasznlata", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Belltsok", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Use FilterKeys if you want Reactos to ignore brief or repeated keystrokes, or slow the repeat rate.", + LTEXT "Use FilterKeys if you want ReactOS to ignore brief or repeated keystrokes, or slow the repeat rate.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "B&elltsok", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -32,7 +32,7 @@ CAPTION "Hang" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "HangFigyel", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Ezt a funkcit akkor hasznlja, ha szeretn, hogy a Reactos lthat figyelmeztetseket kldjn olyankor, amikor a rendszer hangjelzst ad.", + LTEXT "Ezt a funkcit akkor hasznlja, ha szeretn, hogy a ReactOS lthat figyelmeztetseket kldjn olyankor, amikor a rendszer hangjelzst ad.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&HangFigyel hasznlata", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "User the following warning:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -50,7 +50,7 @@ CAPTION "K FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Nagy kontraszt", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Ha azt szeretn, hogy a Reactos olyan szneket hasznljon, amelyek a knny olvasst teszik lehetv, akkor vlassza ki ezt a lehetsget.", + LTEXT "Ha azt szeretn, hogy a ReactOS olyan szneket hasznljon, amelyek a knny olvasst teszik lehetv, akkor vlassza ki ezt a lehetsget.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Nagy kontraszt hasznlata", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Belltsok", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/id-ID.rc b/reactos/dll/cpl/access/lang/id-ID.rc index 621d6156667..b67c8fd9fcc 100644 --- a/reactos/dll/cpl/access/lang/id-ID.rc +++ b/reactos/dll/cpl/access/lang/id-ID.rc @@ -13,7 +13,7 @@ BEGIN AUTOCHECKBOX "&Gunakan StickyKeys", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Setelan", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Gunakan FilterKeys jika anda ingin Reactos untuk mengabaikan atau tombol berulang, atau rata-rata ulangan lambat.", + LTEXT "Gunakan FilterKeys jika anda ingin ReactOS untuk mengabaikan atau tombol berulang, atau rata-rata ulangan lambat.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Gunakan &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "S&etelan", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -32,7 +32,7 @@ CAPTION "Suara" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "SoundSentry", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Gunakan SoundSentry jika anda ingin Reactos untuk membuat peringatan visual ketika sistem anda membuat suara.", + LTEXT "Gunakan SoundSentry jika anda ingin ReactOS untuk membuat peringatan visual ketika sistem anda membuat suara.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Gunakan &SoundSentry", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "User the following warning:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -50,7 +50,7 @@ CAPTION "Tampilan" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Kontras Tinggi", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Gunakan opsi ini jika anda ingin Reactos untuk memakai warna dan font yang didesain guna memudahkan pembacaan.", + LTEXT "Gunakan opsi ini jika anda ingin ReactOS untuk memakai warna dan font yang didesain guna memudahkan pembacaan.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Gunakan Kontras Tinggi", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Setelan", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/nl-NL.rc b/reactos/dll/cpl/access/lang/nl-NL.rc index 75ca57a7483..29d8579abcb 100644 --- a/reactos/dll/cpl/access/lang/nl-NL.rc +++ b/reactos/dll/cpl/access/lang/nl-NL.rc @@ -15,7 +15,7 @@ BEGIN AUTOCHECKBOX "&Plaktoetsen Gebruiken", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH_NL - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Instellingen...", IDC_STICKY_BUTTON, PROPSHEETWIDTH_NL - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "Filtertoetsen", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH_NL - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "U kunt Filtertoetsen gebruiken als u wilt dat Reactos korte of herhaalde toetsaanslagen negeert, of als u de herhaalsnelheid wilt verlagen.", + LTEXT "U kunt Filtertoetsen gebruiken als u wilt dat ReactOS korte of herhaalde toetsaanslagen negeert, of als u de herhaalsnelheid wilt verlagen.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH_NL - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Filtertoetsen gebruiken", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH_NL - PROPSHEETPADDING(20), 14 PUSHBUTTON "Inst&ellingen...", IDC_FILTER_BUTTON, PROPSHEETWIDTH_NL - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -34,7 +34,7 @@ CAPTION "Geluid" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Geluidswaarschuwingen", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH_NL - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Schakel Geluidswaarschuwingen gebruiken in als u wilt dat Reactos een visuele waarschuwing weergeeft wanneer het systeem een geluid laat horen.", + LTEXT "Schakel Geluidswaarschuwingen gebruiken in als u wilt dat ReactOS een visuele waarschuwing weergeeft wanneer het systeem een geluid laat horen.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH_NL - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Geluidswaarschuwingen gebruiken", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Use the following warning:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -52,7 +52,7 @@ CAPTION "Weergave" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Hoog Contrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH_NL - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "U kunt deze optie gebruiken als u wilt dat Reactos kleuren en lettertypen zodanig instelt dat deze gemakkelijk te lezen zijn.", + LTEXT "U kunt deze optie gebruiken als u wilt dat ReactOS kleuren en lettertypen zodanig instelt dat deze gemakkelijk te lezen zijn.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH_NL - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Hoog contrast gebruiken", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH_NL - PROPSHEETPADDING(20), 14 PUSHBUTTON "I&nstellingen...", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH_NL - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/no-NO.rc b/reactos/dll/cpl/access/lang/no-NO.rc index ffa2b90d7b8..eac3c64f6f5 100644 --- a/reactos/dll/cpl/access/lang/no-NO.rc +++ b/reactos/dll/cpl/access/lang/no-NO.rc @@ -11,7 +11,7 @@ BEGIN AUTOCHECKBOX "&Bruk Trege taster", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Innstillinger", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "Filtertaster", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Bruk filtertaster hvis du vil at Reactos skal ignorere lette eller gjentatte tastetrykk, eller senke repetisjonshastigheten.", + LTEXT "Bruk filtertaster hvis du vil at ReactOS skal ignorere lette eller gjentatte tastetrykk, eller senke repetisjonshastigheten.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Bruk &filtertaster", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "I&nnstillinger", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -30,7 +30,7 @@ CAPTION "Lyd" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Skjermsignal", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Bruk skjermsignal hvis du vil at Reactos skal gi en visuell varsling nr systemet lager lyd.", + LTEXT "Bruk skjermsignal hvis du vil at ReactOS skal gi en visuell varsling nr systemet lager lyd.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Bruk &skjermsignal", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Velg flgende varsling:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -48,7 +48,7 @@ CAPTION "Skjerm" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Hykontrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Velg dette alternativet hvis du vil at Reactos skal bruke farger og skrifter som er laget for gjre det lett leselig.", + LTEXT "Velg dette alternativet hvis du vil at ReactOS skal bruke farger og skrifter som er laget for gjre det lett leselig.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Bruk hykontrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Innstillinger", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/pl-PL.rc b/reactos/dll/cpl/access/lang/pl-PL.rc index 787a19047db..106f4c06afa 100644 --- a/reactos/dll/cpl/access/lang/pl-PL.rc +++ b/reactos/dll/cpl/access/lang/pl-PL.rc @@ -54,7 +54,7 @@ CAPTION "Ekran" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Wysoki Kontrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Użyj tej funkcji, jeśli chcesz, żeby Reactos używał kolorów i czcionek zaprojektowanych do łatwego czytania", + LTEXT "Użyj tej funkcji, jeśli chcesz, żeby ReactOS używał kolorów i czcionek zaprojektowanych do łatwego czytania", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Użyj funkcji Wysoki Kontrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "U&stawienia", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/sk-SK.rc b/reactos/dll/cpl/access/lang/sk-SK.rc index 9689ccfeb29..7d41b14a76d 100644 --- a/reactos/dll/cpl/access/lang/sk-SK.rc +++ b/reactos/dll/cpl/access/lang/sk-SK.rc @@ -15,7 +15,7 @@ BEGIN AUTOCHECKBOX "&Use StickyKeys", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Settings", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Use FilterKeys if you want Reactos to ignore brief or repeated keystrokes, or slow the repeat rate.", + LTEXT "Use FilterKeys if you want ReactOS to ignore brief or repeated keystrokes, or slow the repeat rate.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "S&ettings", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -34,7 +34,7 @@ CAPTION "Zvuk" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "SoundSentry", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Use SoundSentry if you want Reactos to generate visual warnings when your system makes a sound.", + LTEXT "Use SoundSentry if you want ReactOS to generate visual warnings when your system makes a sound.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Use &SoundSentry", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Use the following warning:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -52,7 +52,7 @@ CAPTION "Obrazovka" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Vysok kontrast", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Use this option if you want Reactos to use colors and fonts designed for easy reading.", + LTEXT "Use this option if you want ReactOS to use colors and fonts designed for easy reading.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "&Use High Contrast", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "&Settings", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/access/lang/sq-AL.rc b/reactos/dll/cpl/access/lang/sq-AL.rc index 885757752d6..b064253832c 100644 --- a/reactos/dll/cpl/access/lang/sq-AL.rc +++ b/reactos/dll/cpl/access/lang/sq-AL.rc @@ -15,7 +15,7 @@ BEGIN AUTOCHECKBOX "&Perdor StickyKeys", IDC_STICKY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "Konfigurime", IDC_STICKY_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 GROUPBOX "FilterKeys", -1, PROPSHEETPADDING(1), LABELLINE(8) + 5, PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(7) + 2 - LTEXT "Perdp FilterKeys nese doni Reactos te injorohe ose perserise keystrokes, ose te ngadalsoje kohen e perseritjes.", + LTEXT "Perdp FilterKeys nese doni ReactOS te injorohe ose perserise keystrokes, ose te ngadalsoje kohen e perseritjes.", -1, PROPSHEETPADDING(2), LABELLINE(10) - 3, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Perdor &FilterKeys", IDC_FILTER_BOX, PROPSHEETPADDING(2), LABELLINE(13) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "Konfigurime", IDC_FILTER_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(13) + 2, PROPSHEETPADDING(15), 14 @@ -34,7 +34,7 @@ CAPTION "Zë" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "SoundSentry", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(10) + PROPSHEETPADDING(1) - LTEXT "Perdor SoundSentry nese doni qe Reactos te gjeneroj gabime vizuale kur sistemi juaj jep nje zë.", + LTEXT "Perdor SoundSentry nese doni qe ReactOS te gjeneroj gabime vizuale kur sistemi juaj jep nje zë.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Perdor &SoundSentry", IDC_SENTRY_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 LTEXT "Perdor gabimet e metejshme:", IDC_SENTRY_TEXT, PROPSHEETPADDING(2), LABELLINE(8) - 2, PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(1) @@ -52,7 +52,7 @@ CAPTION "Ekrani" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN GROUPBOX "Kontrast i lartë", -1, PROPSHEETPADDING(1), LABELLINE(1), PROPSHEETWIDTH - PROPSHEETPADDING(2), LABELLINE(6) + PROPSHEETPADDING(1) - LTEXT "Përdoreni këtë mundësi nëse doni Reactos të përdorni ngjyrat dhe gërmat projektuar për leximin e lehtë.", + LTEXT "Përdoreni këtë mundësi nëse doni ReactOS të përdorni ngjyrat dhe gërmat projektuar për leximin e lehtë.", -1, PROPSHEETPADDING(2), LABELLINE(2), PROPSHEETWIDTH - PROPSHEETPADDING(4), LABELLINE(3) AUTOCHECKBOX "Perdor kontrast te larte", IDC_CONTRAST_BOX, PROPSHEETPADDING(2), LABELLINE(5) + 2, PROPSHEETWIDTH - PROPSHEETPADDING(20), 14 PUSHBUTTON "Konfigurime", IDC_CONTRAST_BUTTON, PROPSHEETWIDTH - PROPSHEETPADDING(17), LABELLINE(5) + 2, PROPSHEETPADDING(15), 14 diff --git a/reactos/dll/cpl/mmsys/lang/nl-NL.rc b/reactos/dll/cpl/mmsys/lang/nl-NL.rc index 0315b15a310..44c5b50f1cc 100644 --- a/reactos/dll/cpl/mmsys/lang/nl-NL.rc +++ b/reactos/dll/cpl/mmsys/lang/nl-NL.rc @@ -27,7 +27,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Geluiden" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Een geluidsschema is een verzameling geluiden die worden toegepast op Reactos- en programmagebeurtenissen. U kunt een bestaand schema slecteren of een aangepast schema opslaan.", -1, 8, 7, 230, 40 + LTEXT "Een geluidsschema is een verzameling geluiden die worden toegepast op ReactOS- en programmagebeurtenissen. U kunt een bestaand schema slecteren of een aangepast schema opslaan.", -1, 8, 7, 230, 40 LTEXT "Geluid&sschema:", -1, 8, 42, 150, 17 COMBOBOX IDC_SOUND_SCHEME, 8, 53, 230, 46, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Opslaan als...", IDC_SAVEAS_BTN, 104, 70, 65, 15 diff --git a/reactos/dll/win32/syssetup/lang/nl-NL.rc b/reactos/dll/win32/syssetup/lang/nl-NL.rc index 14ea0dd39fb..dc557078bd1 100644 --- a/reactos/dll/win32/syssetup/lang/nl-NL.rc +++ b/reactos/dll/win32/syssetup/lang/nl-NL.rc @@ -5,8 +5,8 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Welkom bij de Reactos installatiewizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 - LTEXT "Deze wizard zal Reactos op je computer installeren. De wizard heeft informatie over jou en jouw computer nodig om Reactos correct in te stellen.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Welkom bij de ReactOS installatiewizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 + LTEXT "Deze wizard zal ReactOS op je computer installeren. De wizard heeft informatie over jou en jouw computer nodig om ReactOS correct in te stellen.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Klik op Volgende om voort te gaan met de installatie.", IDC_STATIC, 115, 169, 195, 17 END diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc b/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc index 426ff88509a..38de3196f27 100644 --- a/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc +++ b/reactos/drivers/wdm/audio/legacy/wdmaud/wdmaud.rc @@ -1,5 +1,5 @@ #define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "Reactos audio mapper driver" +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS audio mapper driver" #define REACTOS_STR_INTERNAL_NAME "wdmaud" #define REACTOS_STR_ORIGINAL_FILENAME "wdmaud.sys" #include From 34e909ecc9a579f37b14fee86aa1ea7ba5855c2a Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 22 Nov 2014 09:07:33 +0000 Subject: [PATCH 18/50] [WIN32K] - In XFORMOBJ_bApplyXform do not overwrite the data in the input buffer - Make XFORMOBJ_bXformFixPoints return VOID instead of BOOL svn path=/trunk/; revision=65445 --- reactos/subsystems/win32/csrsrv/thredsup.c | 2 +- reactos/win32ss/gdi/ntgdi/xformobj.c | 31 +++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/reactos/subsystems/win32/csrsrv/thredsup.c b/reactos/subsystems/win32/csrsrv/thredsup.c index 87b471b8a17..b0cfac8314b 100644 --- a/reactos/subsystems/win32/csrsrv/thredsup.c +++ b/reactos/subsystems/win32/csrsrv/thredsup.c @@ -309,7 +309,7 @@ CsrInsertThread(IN PCSR_PROCESS Process, sizeof(ThreadInfo), NULL); if (!NT_SUCCESS(Status)) return Status; - if (ThreadInfo == TRUE) return STATUS_THREAD_IS_TERMINATING; + if (ThreadInfo) return STATUS_THREAD_IS_TERMINATING; /* Insert it into the Regular List */ InsertTailList(&Process->ThreadList, &Thread->Link); diff --git a/reactos/win32ss/gdi/ntgdi/xformobj.c b/reactos/win32ss/gdi/ntgdi/xformobj.c index dbd8e22501b..fb6deb6d02c 100644 --- a/reactos/win32ss/gdi/ntgdi/xformobj.c +++ b/reactos/win32ss/gdi/ntgdi/xformobj.c @@ -297,10 +297,10 @@ XFORMOBJ_iInverse( return XFORMOBJ_UpdateAccel(pxoDst); } - -BOOL +static +VOID NTAPI -XFORMOBJ_bXformFixPoints( +XFORMOBJ_vXformFixPoints( IN XFORMOBJ *pxo, IN ULONG cPoints, IN PPOINTL pptIn, @@ -426,8 +426,6 @@ XFORMOBJ_bXformFixPoints( } while (--i >= 0); } - - return TRUE; } /** Public functions **********************************************************/ @@ -500,7 +498,7 @@ XFORMOBJ_bApplyXform( { MATRIX mx; XFORMOBJ xoInv; - POINTL *pptl; + PPOINTL pptlIn, pptlOut; INT i; /* Check parameters */ @@ -523,28 +521,29 @@ XFORMOBJ_bApplyXform( /* Convert POINTL to POINTFIX? */ if (iMode == XF_LTOFX || iMode == XF_LTOL || iMode == XF_INV_LTOL) { - pptl = pvIn; + pptlIn = pvIn; + pptlOut = pvOut; for (i = cPoints - 1; i >= 0; i--) { - pptl[i].x = LONG2FIX(pptl[i].x); - pptl[i].y = LONG2FIX(pptl[i].y); + pptlOut[i].x = LONG2FIX(pptlIn[i].x); + pptlOut[i].y = LONG2FIX(pptlIn[i].y); } + + /* The input is in the out buffer now! */ + pvIn = pvOut; } /* Do the actual fixpoint transformation */ - if (!XFORMOBJ_bXformFixPoints(pxo, cPoints, pvIn, pvOut)) - { - return FALSE; - } + XFORMOBJ_vXformFixPoints(pxo, cPoints, pvIn, pvOut); /* Convert POINTFIX to POINTL? */ if (iMode == XF_INV_FXTOL || iMode == XF_INV_LTOL || iMode == XF_LTOL) { - pptl = pvOut; + pptlOut = pvOut; for (i = cPoints - 1; i >= 0; i--) { - pptl[i].x = FIX2LONG(pptl[i].x); - pptl[i].y = FIX2LONG(pptl[i].y); + pptlOut[i].x = FIX2LONG(pptlOut[i].x); + pptlOut[i].y = FIX2LONG(pptlOut[i].y); } } From e9b8b6f597523d58d9800eae3c4df80ec1bf29ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 22 Nov 2014 16:23:59 +0000 Subject: [PATCH 19/50] [FAST486]: Fix a comment and use the TOGGLE_OPSIZE macro. svn path=/trunk/; revision=65446 --- reactos/lib/fast486/common.inl | 2 +- reactos/lib/fast486/opcodes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/fast486/common.inl b/reactos/lib/fast486/common.inl index ed811fff573..6385e62694d 100644 --- a/reactos/lib/fast486/common.inl +++ b/reactos/lib/fast486/common.inl @@ -303,7 +303,7 @@ Fast486StackPush(PFAST486_STATE State, BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; /* The OPSIZE prefix toggles the size */ - if (State->PrefixFlags & FAST486_PREFIX_OPSIZE) Size = !Size; + TOGGLE_OPSIZE(Size); if (Size) { diff --git a/reactos/lib/fast486/opcodes.c b/reactos/lib/fast486/opcodes.c index e8a6a25040e..238f2b50e73 100644 --- a/reactos/lib/fast486/opcodes.c +++ b/reactos/lib/fast486/opcodes.c @@ -4679,7 +4679,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeIret) /* Return to VM86 mode */ ULONG Es, Ds, Fs, Gs; - /* Pop ESP, SS, ES, FS, GS */ + /* Pop ESP, SS, ES, DS, FS, GS */ if (!Fast486StackPop(State, &StackPtr)) return; if (!Fast486StackPop(State, &StackSel)) return; if (!Fast486StackPop(State, &Es)) return; From 9f8411bf3ac563e13e3bb0ac60daab90fc92dfab Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Sat, 22 Nov 2014 16:33:47 +0000 Subject: [PATCH 20/50] [FAST486] - Fix interrupts in V86 mode. - CLI and STI should call Fast486GetCurrentPrivLevel in their IOPL check, since it always returns 3 if the VM flag is set. svn path=/trunk/; revision=65447 --- reactos/lib/fast486/common.c | 23 +++++++++++++++++++++-- reactos/lib/fast486/opcodes.c | 12 ++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/reactos/lib/fast486/common.c b/reactos/lib/fast486/common.c index 147a5c01fc0..52f2fc75ca8 100644 --- a/reactos/lib/fast486/common.c +++ b/reactos/lib/fast486/common.c @@ -294,8 +294,9 @@ Fast486InterruptInternal(PFAST486_STATE State, State->PrefixFlags |= FAST486_PREFIX_OPSIZE; } - /* Check if the interrupt handler is more privileged */ - if (Fast486GetCurrentPrivLevel(State) > GET_SEGMENT_RPL(SegmentSelector)) + /* Check if the interrupt handler is more privileged or if we're in V86 mode */ + if ((Fast486GetCurrentPrivLevel(State) > GET_SEGMENT_RPL(SegmentSelector)) + || State->Flags.Vm) { /* Read the TSS */ if (!Fast486ReadLinearMemory(State, @@ -310,6 +311,24 @@ Fast486InterruptInternal(PFAST486_STATE State, /* Switch to the new privilege level */ State->Cpl = GET_SEGMENT_RPL(SegmentSelector); + if (State->Flags.Vm) + { + /* Clear the VM flag */ + State->Flags.Vm = FALSE; + + /* Push GS, FS, DS and ES */ + if (!Fast486StackPush(State, State->SegmentRegs[FAST486_REG_GS].Selector)) goto Cleanup; + if (!Fast486StackPush(State, State->SegmentRegs[FAST486_REG_FS].Selector)) goto Cleanup; + if (!Fast486StackPush(State, State->SegmentRegs[FAST486_REG_DS].Selector)) goto Cleanup; + if (!Fast486StackPush(State, State->SegmentRegs[FAST486_REG_ES].Selector)) goto Cleanup; + + /* Now load them with NULL selectors, since they are useless in protected mode */ + if (!Fast486LoadSegment(State, FAST486_REG_GS, 0)) goto Cleanup; + if (!Fast486LoadSegment(State, FAST486_REG_FS, 0)) goto Cleanup; + if (!Fast486LoadSegment(State, FAST486_REG_DS, 0)) goto Cleanup; + if (!Fast486LoadSegment(State, FAST486_REG_ES, 0)) goto Cleanup; + } + /* Check the new (higher) privilege level */ switch (State->Cpl) { diff --git a/reactos/lib/fast486/opcodes.c b/reactos/lib/fast486/opcodes.c index 238f2b50e73..90cdc61df5f 100644 --- a/reactos/lib/fast486/opcodes.c +++ b/reactos/lib/fast486/opcodes.c @@ -754,7 +754,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeClearInt) if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) { /* Check IOPL */ - if (State->Flags.Iopl >= State->SegmentRegs[FAST486_REG_CS].Dpl) + if (State->Flags.Iopl >= Fast486GetCurrentPrivLevel(State)) { /* Clear the interrupt flag */ State->Flags.If = FALSE; @@ -789,7 +789,7 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeSetInt) if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) { /* Check IOPL */ - if (State->Flags.Iopl >= State->SegmentRegs[FAST486_REG_CS].Dpl) + if (State->Flags.Iopl >= Fast486GetCurrentPrivLevel(State)) { /* Set the interrupt flag */ State->Flags.If = TRUE; @@ -4548,6 +4548,14 @@ FAST486_OPCODE_HANDLER(Fast486OpcodeInt) { UCHAR IntNum; + /* Check for V86 mode */ + if (State->Flags.Vm && (State->Flags.Iopl != 3)) + { + /* Call the V86 monitor */ + Fast486Exception(State, FAST486_EXCEPTION_GP); + return; + } + switch (Opcode) { case 0xCC: // INT 3 From ec34daaa0a2f25dd084dfcde4d9435fc5210b831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 22 Nov 2014 19:18:23 +0000 Subject: [PATCH 21/50] [NTVDM]: - INT 15h offers some "OS hooks" that do nothing normally but return success. - Stub "Switch to protected mode" INT 15h AH=89h function. svn path=/trunk/; revision=65448 --- reactos/subsystems/ntvdm/bios/bios32/bios32.c | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/reactos/subsystems/ntvdm/bios/bios32/bios32.c b/reactos/subsystems/ntvdm/bios/bios32/bios32.c index 87d8172b976..548e7dd512d 100644 --- a/reactos/subsystems/ntvdm/bios/bios32/bios32.c +++ b/reactos/subsystems/ntvdm/bios/bios32/bios32.c @@ -151,6 +151,19 @@ static VOID WINAPI BiosMiscService(LPWORD Stack) { switch (getAH()) { + /* OS Hooks for Multitasking */ + case 0x80: // Device Open + case 0x81: // Device Close + case 0x82: // Program Termination + case 0x90: // Device Busy + case 0x91: // Device POST + { + /* Return success by default */ + setAH(0x00); + Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; + break; + } + /* Keyboard intercept */ case 0x4F: { @@ -234,6 +247,15 @@ static VOID WINAPI BiosMiscService(LPWORD Stack) break; } + /* Switch to Protected Mode */ + case 0x89: + { + DPRINT1("BIOS INT 15h, AH=89h \"Switch to Protected Mode\" is UNIMPLEMENTED"); + + Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF; + break; + } + /* Get Configuration */ case 0xC0: { @@ -255,6 +277,8 @@ static VOID WINAPI BiosMiscService(LPWORD Stack) // Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; // setES(???); + UNIMPLEMENTED; + /* We do not support EBDA yet */ Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF; From b280f71b2726ae22e3c0182ac058ba9c9e0d2dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 22 Nov 2014 22:13:08 +0000 Subject: [PATCH 22/50] [KERNEL32][CONSRV] - Remove the USE_CONSOLE_INIT_HANDLES define since now we "support" the console initialization events. - The events in the CONSOLE_START_INFO structure are console initialization events used for asynchronous console creation, that are set whenever console creation succeeds, or fails. - Stubplement their usage in CONSRV. Now we are able to fully use Windows 2k3 kernel32.dll and be able to run console programs with it. svn path=/trunk/; revision=65449 --- .../win32/kernel32/client/console/console.c | 30 ++++---- .../dll/win32/kernel32/client/console/init.c | 13 ++-- reactos/dll/win32/kernel32/include/console.h | 4 -- reactos/include/reactos/subsys/win/conmsg.h | 9 ++- .../user/winsrv/consrv/condrv/coninput.c | 22 ++++-- .../user/winsrv/consrv/condrv/console.c | 9 ++- reactos/win32ss/user/winsrv/consrv/console.c | 34 ++++++++- .../user/winsrv/consrv/frontends/gui/conwnd.c | 4 +- .../winsrv/consrv/frontends/gui/guiterm.c | 30 ++++---- reactos/win32ss/user/winsrv/consrv/handle.c | 69 ++++++++++++++++++- .../user/winsrv/consrv/include/conio_winsrv.h | 2 + reactos/win32ss/user/winsrv/consrv/init.c | 7 +- reactos/win32ss/user/winsrv/consrv/procinit.h | 3 +- 13 files changed, 174 insertions(+), 62 deletions(-) diff --git a/reactos/dll/win32/kernel32/client/console/console.c b/reactos/dll/win32/kernel32/client/console/console.c index df6c02fceeb..72251cb2814 100644 --- a/reactos/dll/win32/kernel32/client/console/console.c +++ b/reactos/dll/win32/kernel32/client/console/console.c @@ -1166,9 +1166,7 @@ IntAllocConsole(LPWSTR Title, PCONSOLE_START_INFO ConsoleStartInfo) { BOOL Success = TRUE; -#ifdef USE_CONSOLE_INIT_HANDLES NTSTATUS Status; -#endif CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_ALLOCCONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest; @@ -1229,9 +1227,9 @@ IntAllocConsole(LPWSTR Title, goto Quit; } -#ifdef USE_CONSOLE_INIT_HANDLES - // Is AllocConsoleRequest->ConsoleStartInfo->Events aligned on handle boundary ???? - Status = NtWaitForMultipleObjects(2, AllocConsoleRequest->ConsoleStartInfo->Events, + // Is AllocConsoleRequest->ConsoleStartInfo->InitEvents aligned on handle boundary ???? + Status = NtWaitForMultipleObjects(MAX_INIT_EVENTS, + AllocConsoleRequest->ConsoleStartInfo->InitEvents, WaitAny, FALSE, NULL); if (!NT_SUCCESS(Status)) { @@ -1240,15 +1238,14 @@ IntAllocConsole(LPWSTR Title, goto Quit; } - NtClose(AllocConsoleRequest->ConsoleStartInfo->Events[0]); - NtClose(AllocConsoleRequest->ConsoleStartInfo->Events[1]); - if (Status != STATUS_SUCCESS) + NtClose(AllocConsoleRequest->ConsoleStartInfo->InitEvents[INIT_SUCCESS]); + NtClose(AllocConsoleRequest->ConsoleStartInfo->InitEvents[INIT_FAILURE]); + if (Status != INIT_SUCCESS) { NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; Success = FALSE; } else -#endif { RtlCopyMemory(ConsoleStartInfo, AllocConsoleRequest->ConsoleStartInfo, @@ -2505,9 +2502,7 @@ IntAttachConsole(DWORD ProcessId, PCONSOLE_START_INFO ConsoleStartInfo) { BOOL Success = TRUE; -#ifdef USE_CONSOLE_INIT_HANDLES NTSTATUS Status; -#endif CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_ATTACHCONSOLE AttachConsoleRequest = &ApiMessage.Data.AttachConsoleRequest; @@ -2541,9 +2536,9 @@ IntAttachConsole(DWORD ProcessId, goto Quit; } -#ifdef USE_CONSOLE_INIT_HANDLES - // Is AttachConsoleRequest->ConsoleStartInfo->Events aligned on handle boundary ???? - Status = NtWaitForMultipleObjects(2, AttachConsoleRequest->ConsoleStartInfo->Events, + // Is AttachConsoleRequest->ConsoleStartInfo->InitEvents aligned on handle boundary ???? + Status = NtWaitForMultipleObjects(MAX_INIT_EVENTS, + AttachConsoleRequest->ConsoleStartInfo->InitEvents, WaitAny, FALSE, NULL); if (!NT_SUCCESS(Status)) { @@ -2552,15 +2547,14 @@ IntAttachConsole(DWORD ProcessId, goto Quit; } - NtClose(AttachConsoleRequest->ConsoleStartInfo->Events[0]); - NtClose(AttachConsoleRequest->ConsoleStartInfo->Events[1]); - if (Status != STATUS_SUCCESS) + NtClose(AttachConsoleRequest->ConsoleStartInfo->InitEvents[INIT_SUCCESS]); + NtClose(AttachConsoleRequest->ConsoleStartInfo->InitEvents[INIT_FAILURE]); + if (Status != INIT_SUCCESS) { NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; Success = FALSE; } else -#endif { RtlCopyMemory(ConsoleStartInfo, AttachConsoleRequest->ConsoleStartInfo, diff --git a/reactos/dll/win32/kernel32/client/console/init.c b/reactos/dll/win32/kernel32/client/console/init.c index 5134028b9c5..985cb660127 100644 --- a/reactos/dll/win32/kernel32/client/console/init.c +++ b/reactos/dll/win32/kernel32/client/console/init.c @@ -308,9 +308,10 @@ ConnectConsole(IN PWSTR SessionDir, /* Nothing to do if this is not a console app */ if (!ConnectInfo->IsConsoleApp) return TRUE; -#ifdef USE_CONSOLE_INIT_HANDLES /* Wait for the connection to finish */ - Status = NtWaitForMultipleObjects(2, ConnectInfo->ConsoleStartInfo.Events, + // Is ConnectInfo->ConsoleStartInfo.InitEvents aligned on handle boundary ???? + Status = NtWaitForMultipleObjects(MAX_INIT_EVENTS, + ConnectInfo->ConsoleStartInfo.InitEvents, WaitAny, FALSE, NULL); if (!NT_SUCCESS(Status)) { @@ -318,15 +319,13 @@ ConnectConsole(IN PWSTR SessionDir, return FALSE; } - NtClose(ConnectInfo->ConsoleStartInfo.Events[0]); - NtClose(ConnectInfo->ConsoleStartInfo.Events[1]); - - if (Status != STATUS_SUCCESS) + NtClose(ConnectInfo->ConsoleStartInfo.InitEvents[INIT_SUCCESS]); + NtClose(ConnectInfo->ConsoleStartInfo.InitEvents[INIT_FAILURE]); + if (Status != INIT_SUCCESS) { NtCurrentPeb()->ProcessParameters->ConsoleHandle = NULL; return FALSE; } -#endif return TRUE; } diff --git a/reactos/dll/win32/kernel32/include/console.h b/reactos/dll/win32/kernel32/include/console.h index 79e1d9a8022..b6462af46b6 100644 --- a/reactos/dll/win32/kernel32/include/console.h +++ b/reactos/dll/win32/kernel32/include/console.h @@ -14,10 +14,6 @@ #define HANDLE_CREATE_NEW_CONSOLE (HANDLE)-2 #define HANDLE_CREATE_NO_WINDOW (HANDLE)-3 -// Enable (and then get rid of) this define when support for -// console initialization handles is implemented in CONSRV. -// #define USE_CONSOLE_INIT_HANDLES - /* FUNCTION PROTOTYPES ********************************************************/ diff --git a/reactos/include/reactos/subsys/win/conmsg.h b/reactos/include/reactos/subsys/win/conmsg.h index 42d83987d7f..26201b320c8 100644 --- a/reactos/include/reactos/subsys/win/conmsg.h +++ b/reactos/include/reactos/subsys/win/conmsg.h @@ -158,6 +158,13 @@ typedef struct _CONSOLE_PROPERTIES UINT uCodePage; } CONSOLE_PROPERTIES; +enum +{ + INIT_SUCCESS, // STATUS_WAIT_0 + INIT_FAILURE, // STATUS_WAIT_1 + MAX_INIT_EVENTS +}; + typedef struct _CONSOLE_START_INFO { HANDLE ConsoleHandle; @@ -165,7 +172,7 @@ typedef struct _CONSOLE_START_INFO HANDLE InputHandle; HANDLE OutputHandle; HANDLE ErrorHandle; - HANDLE Events[2]; + HANDLE InitEvents[MAX_INIT_EVENTS]; CONSOLE_PROPERTIES; } CONSOLE_START_INFO, *PCONSOLE_START_INFO; diff --git a/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c b/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c index 800abb4052a..a3f38419c00 100644 --- a/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c +++ b/reactos/win32ss/user/winsrv/consrv/condrv/coninput.c @@ -170,7 +170,7 @@ AddInputEvents(PCONSOLE Console, Status = STATUS_SUCCESS; } - if (SetWaitEvent) SetEvent(Console->InputBuffer.ActiveEvent); + if (SetWaitEvent) NtSetEvent(Console->InputBuffer.ActiveEvent, NULL); Done: if (NumEventsWritten) *NumEventsWritten = i; @@ -198,16 +198,24 @@ NTSTATUS NTAPI ConDrvInitInputBuffer(IN PCONSOLE Console, IN ULONG InputBufferSize) { - SECURITY_ATTRIBUTES SecurityAttributes; + NTSTATUS Status; + OBJECT_ATTRIBUTES ObjectAttributes; ConSrvInitObject(&Console->InputBuffer.Header, INPUT_BUFFER, Console); - SecurityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); - SecurityAttributes.lpSecurityDescriptor = NULL; - SecurityAttributes.bInheritHandle = TRUE; + InitializeObjectAttributes(&ObjectAttributes, + NULL, + OBJ_INHERIT, + NULL, + NULL); - Console->InputBuffer.ActiveEvent = CreateEventW(&SecurityAttributes, TRUE, FALSE, NULL); - if (Console->InputBuffer.ActiveEvent == NULL) return STATUS_UNSUCCESSFUL; + Status = NtCreateEvent(&Console->InputBuffer.ActiveEvent, EVENT_ALL_ACCESS, + &ObjectAttributes, NotificationEvent, FALSE); + if (!NT_SUCCESS(Status)) + { + return STATUS_UNSUCCESSFUL; + // return Status; + } Console->InputBuffer.InputBufferSize = InputBufferSize; InitializeListHead(&Console->InputBuffer.InputEvents); diff --git a/reactos/win32ss/user/winsrv/consrv/condrv/console.c b/reactos/win32ss/user/winsrv/consrv/condrv/console.c index 38c7122e955..495191b6e60 100644 --- a/reactos/win32ss/user/winsrv/consrv/condrv/console.c +++ b/reactos/win32ss/user/winsrv/consrv/condrv/console.c @@ -80,7 +80,10 @@ VOID NTAPI ConDrvPause(PCONSOLE Console) { if (!Console->UnpauseEvent) - Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL); + { + NtCreateEvent(&Console->UnpauseEvent, EVENT_ALL_ACCESS, + NULL, NotificationEvent, FALSE); + } } VOID NTAPI @@ -88,8 +91,8 @@ ConDrvUnpause(PCONSOLE Console) { if (Console->UnpauseEvent) { - SetEvent(Console->UnpauseEvent); - CloseHandle(Console->UnpauseEvent); + NtSetEvent(Console->UnpauseEvent, NULL); + NtClose(Console->UnpauseEvent); Console->UnpauseEvent = NULL; } } diff --git a/reactos/win32ss/user/winsrv/consrv/console.c b/reactos/win32ss/user/winsrv/consrv/console.c index 475ab027394..56581f86911 100644 --- a/reactos/win32ss/user/winsrv/consrv/console.c +++ b/reactos/win32ss/user/winsrv/consrv/console.c @@ -663,6 +663,27 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, /* Colour table */ memcpy(Console->Colors, ConsoleInfo.Colors, sizeof(ConsoleInfo.Colors)); + /* Create the Initialization Events */ + Status = NtCreateEvent(&Console->InitEvents[INIT_SUCCESS], EVENT_ALL_ACCESS, + NULL, NotificationEvent, FALSE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateEvent(InitEvents[INIT_SUCCESS]) failed: %lu\n", Status); + ConDrvDeleteConsole(Console); + ConSrvDeinitTerminal(&Terminal); + return Status; + } + Status = NtCreateEvent(&Console->InitEvents[INIT_FAILURE], EVENT_ALL_ACCESS, + NULL, NotificationEvent, FALSE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateEvent(InitEvents[INIT_FAILURE]) failed: %lu\n", Status); + NtClose(Console->InitEvents[INIT_SUCCESS]); + ConDrvDeleteConsole(Console); + ConSrvDeinitTerminal(&Terminal); + return Status; + } + /* * Attach the ConSrv terminal to the console. * This call makes a copy of our local Terminal variable. @@ -671,6 +692,8 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, if (!NT_SUCCESS(Status)) { DPRINT1("Failed to register terminal to the given console, Status = 0x%08lx\n", Status); + NtClose(Console->InitEvents[INIT_FAILURE]); + NtClose(Console->InitEvents[INIT_SUCCESS]); ConDrvDeleteConsole(Console); ConSrvDeinitTerminal(&Terminal); return Status; @@ -680,6 +703,10 @@ ConSrvInitConsole(OUT PHANDLE NewConsoleHandle, /* All went right, so add the console to the list */ Status = InsertConsole(&ConsoleHandle, Console); + // FIXME! We do not support at all asynchronous console creation! + NtSetEvent(Console->InitEvents[INIT_SUCCESS], NULL); + // NtSetEvent(Console->InitEvents[INIT_FAILURE], NULL); + /* Return the newly created console to the caller and a success code too */ *NewConsoleHandle = ConsoleHandle; *NewConsole = Console; @@ -696,6 +723,10 @@ ConSrvDeleteConsole(PCONSRV_CONSOLE Console) /* Remove the console from the list */ RemoveConsoleByPointer(Console); + /* Destroy the Initialization Events */ + NtClose(Console->InitEvents[INIT_FAILURE]); + NtClose(Console->InitEvents[INIT_SUCCESS]); + /* Clean the Input Line Discipline */ if (Console->LineBuffer) ConsoleFreeHeap(Console->LineBuffer); @@ -999,7 +1030,8 @@ CSR_API(SrvAttachConsole) TRUE, &AttachConsoleRequest->ConsoleStartInfo->InputHandle, &AttachConsoleRequest->ConsoleStartInfo->OutputHandle, - &AttachConsoleRequest->ConsoleStartInfo->ErrorHandle); + &AttachConsoleRequest->ConsoleStartInfo->ErrorHandle, + AttachConsoleRequest->ConsoleStartInfo); if (!NT_SUCCESS(Status)) { DPRINT1("Console inheritance failed\n"); diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c index 4e1519a1ab7..d8d93ca55f3 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c @@ -663,7 +663,7 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create) { DPRINT1("GuiConsoleNcCreate: InitFonts failed\n"); GuiData->hWindow = NULL; - SetEvent(GuiData->hGuiInitEvent); + NtSetEvent(GuiData->hGuiInitEvent, NULL); return FALSE; } @@ -691,7 +691,7 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create) //CreateSysMenu(GuiData->hWindow); DPRINT("OnNcCreate - setting start event\n"); - SetEvent(GuiData->hGuiInitEvent); + NtSetEvent(GuiData->hGuiInitEvent, NULL); return (BOOL)DefWindowProcW(GuiData->hWindow, WM_NCCREATE, 0, (LPARAM)Create); } diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c b/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c index beedd94f19a..6884f098b18 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c @@ -149,12 +149,12 @@ GuiConsoleInputThread(PVOID Data) MSG msg; /* - * This thread dispatches all the console notifications to the notify window. - * It is common for all the console windows. + * This thread dispatches all the console notifications to the + * notification window. It is common for all the console windows. */ /* The thread has been initialized, set the event */ - SetEvent(*GraphicsStartupEvent); + NtSetEvent(*GraphicsStartupEvent, NULL); while (GetMessageW(&msg, NULL, 0, 0)) { @@ -250,7 +250,7 @@ GuiConsoleInputThread(PVOID Data) DestroyWindow(GuiData->hWindow); PrivateCsrssManualGuiCheck(+1); // RemoveGuiApp - SetEvent(GuiData->hGuiTermEvent); + NtSetEvent(GuiData->hGuiTermEvent, NULL); if (InterlockedDecrement(&WindowCount) == 0) { @@ -295,8 +295,12 @@ GuiInit(VOID) */ if (hInputThread == NULL) { - HANDLE GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if (GraphicsStartupEvent == NULL) return FALSE; + HANDLE GraphicsStartupEvent; + NTSTATUS Status; + + Status = NtCreateEvent(&GraphicsStartupEvent, EVENT_ALL_ACCESS, + NULL, SynchronizationEvent, FALSE); + if (!NT_SUCCESS(Status)) return FALSE; hInputThread = CreateThread(NULL, 0, @@ -306,7 +310,7 @@ GuiInit(VOID) &dwInputThreadId); if (hInputThread == NULL) { - CloseHandle(GraphicsStartupEvent); + NtClose(GraphicsStartupEvent); DPRINT1("CONSRV: Failed to create graphics console thread.\n"); return FALSE; } @@ -314,7 +318,7 @@ GuiInit(VOID) CloseHandle(hInputThread); WaitForSingleObject(GraphicsStartupEvent, INFINITE); - CloseHandle(GraphicsStartupEvent); + NtClose(GraphicsStartupEvent); } // ConsInitialized = TRUE; @@ -471,8 +475,10 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, * Ideally we could use SendNotifyMessage for this but its not * yet implemented. */ - GuiData->hGuiInitEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - GuiData->hGuiTermEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + NtCreateEvent(&GuiData->hGuiInitEvent, EVENT_ALL_ACCESS, + NULL, SynchronizationEvent, FALSE); + NtCreateEvent(&GuiData->hGuiTermEvent, EVENT_ALL_ACCESS, + NULL, SynchronizationEvent, FALSE); DPRINT("GUI - Checkpoint\n"); @@ -482,7 +488,7 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, /* Wait until initialization has finished */ WaitForSingleObject(GuiData->hGuiInitEvent, INFINITE); DPRINT("OK we created the console window\n"); - CloseHandle(GuiData->hGuiInitEvent); + NtClose(GuiData->hGuiInitEvent); GuiData->hGuiInitEvent = NULL; /* Check whether we really succeeded in initializing the terminal window */ @@ -505,7 +511,7 @@ GuiDeinitFrontEnd(IN OUT PFRONTEND This) PostThreadMessageW(dwInputThreadId, PM_DESTROY_CONSOLE, 0, (LPARAM)GuiData); WaitForSingleObject(GuiData->hGuiTermEvent, INFINITE); DPRINT("hGuiTermEvent set\n"); - CloseHandle(GuiData->hGuiTermEvent); + NtClose(GuiData->hGuiTermEvent); GuiData->hGuiTermEvent = NULL; DPRINT("Destroying icons !! - GuiData->hIcon = 0x%p ; ghDefaultIcon = 0x%p ; GuiData->hIconSm = 0x%p ; ghDefaultIconSm = 0x%p\n", diff --git a/reactos/win32ss/user/winsrv/consrv/handle.c b/reactos/win32ss/user/winsrv/consrv/handle.c index f54a459f24e..9a435bbf6df 100644 --- a/reactos/win32ss/user/winsrv/consrv/handle.c +++ b/reactos/win32ss/user/winsrv/consrv/handle.c @@ -521,6 +521,36 @@ ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, return Status; } + /* Duplicate the Initialization Events */ + Status = NtDuplicateObject(NtCurrentProcess(), + Console->InitEvents[INIT_SUCCESS], + ProcessData->Process->ProcessHandle, + &ConsoleInitInfo->ConsoleStartInfo->InitEvents[INIT_SUCCESS], + EVENT_ALL_ACCESS, 0, 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtDuplicateObject(InitEvents[INIT_SUCCESS]) failed: %lu\n", Status); + ConSrvFreeHandlesTable(ProcessData); + ConSrvDeleteConsole(Console); + ProcessData->ConsoleHandle = NULL; + return Status; + } + + Status = NtDuplicateObject(NtCurrentProcess(), + Console->InitEvents[INIT_FAILURE], + ProcessData->Process->ProcessHandle, + &ConsoleInitInfo->ConsoleStartInfo->InitEvents[INIT_FAILURE], + EVENT_ALL_ACCESS, 0, 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtDuplicateObject(InitEvents[INIT_FAILURE]) failed: %lu\n", Status); + NtClose(ConsoleInitInfo->ConsoleStartInfo->InitEvents[INIT_SUCCESS]); + ConSrvFreeHandlesTable(ProcessData); + ConSrvDeleteConsole(Console); + ProcessData->ConsoleHandle = NULL; + return Status; + } + /* Duplicate the Input Event */ Status = NtDuplicateObject(NtCurrentProcess(), Console->InputBuffer.ActiveEvent, @@ -529,7 +559,9 @@ ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, EVENT_ALL_ACCESS, 0, 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtDuplicateObject() failed: %lu\n", Status); + DPRINT1("NtDuplicateObject(InputWaitHandle) failed: %lu\n", Status); + NtClose(ConsoleInitInfo->ConsoleStartInfo->InitEvents[INIT_FAILURE]); + NtClose(ConsoleInitInfo->ConsoleStartInfo->InitEvents[INIT_SUCCESS]); ConSrvFreeHandlesTable(ProcessData); ConSrvDeleteConsole(Console); ProcessData->ConsoleHandle = NULL; @@ -554,7 +586,8 @@ ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, BOOLEAN CreateNewHandlesTable, PHANDLE pInputHandle, PHANDLE pOutputHandle, - PHANDLE pErrorHandle) + PHANDLE pErrorHandle, + PCONSOLE_START_INFO ConsoleStartInfo) { NTSTATUS Status = STATUS_SUCCESS; PCONSOLE Console; @@ -599,6 +632,34 @@ ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, } } + /* Duplicate the Initialization Events */ + Status = NtDuplicateObject(NtCurrentProcess(), + Console->InitEvents[INIT_SUCCESS], + ProcessData->Process->ProcessHandle, + &ConsoleStartInfo->InitEvents[INIT_SUCCESS], + EVENT_ALL_ACCESS, 0, 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtDuplicateObject(InitEvents[INIT_SUCCESS]) failed: %lu\n", Status); + ConSrvFreeHandlesTable(ProcessData); + ProcessData->ConsoleHandle = NULL; + goto Quit; + } + + Status = NtDuplicateObject(NtCurrentProcess(), + Console->InitEvents[INIT_FAILURE], + ProcessData->Process->ProcessHandle, + &ConsoleStartInfo->InitEvents[INIT_FAILURE], + EVENT_ALL_ACCESS, 0, 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtDuplicateObject(InitEvents[INIT_FAILURE]) failed: %lu\n", Status); + NtClose(ConsoleStartInfo->InitEvents[INIT_SUCCESS]); + ConSrvFreeHandlesTable(ProcessData); + ProcessData->ConsoleHandle = NULL; + goto Quit; + } + /* Duplicate the Input Event */ Status = NtDuplicateObject(NtCurrentProcess(), Console->InputBuffer.ActiveEvent, @@ -607,7 +668,9 @@ ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, EVENT_ALL_ACCESS, 0, 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtDuplicateObject() failed: %lu\n", Status); + DPRINT1("NtDuplicateObject(InputWaitHandle) failed: %lu\n", Status); + NtClose(ConsoleStartInfo->InitEvents[INIT_FAILURE]); + NtClose(ConsoleStartInfo->InitEvents[INIT_SUCCESS]); ConSrvFreeHandlesTable(ProcessData); // NOTE: Always free the handles table. ProcessData->ConsoleHandle = NULL; goto Quit; diff --git a/reactos/win32ss/user/winsrv/consrv/include/conio_winsrv.h b/reactos/win32ss/user/winsrv/consrv/include/conio_winsrv.h index 135ccb54352..c6fb8318990 100644 --- a/reactos/win32ss/user/winsrv/consrv/include/conio_winsrv.h +++ b/reactos/win32ss/user/winsrv/consrv/include/conio_winsrv.h @@ -139,6 +139,8 @@ typedef struct _WINSRV_CONSOLE // CRITICAL_SECTION Lock; // CONSOLE_STATE State; /* State of the console */ + HANDLE InitEvents[MAX_INIT_EVENTS]; /* Initialization events */ + FRONTEND FrontEndIFace; /* Frontend-specific interface */ /******************************* Process support ******************************/ diff --git a/reactos/win32ss/user/winsrv/consrv/init.c b/reactos/win32ss/user/winsrv/consrv/init.c index 743166dbcea..5841e033a74 100644 --- a/reactos/win32ss/user/winsrv/consrv/init.c +++ b/reactos/win32ss/user/winsrv/consrv/init.c @@ -480,9 +480,10 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, Status = ConSrvInheritConsole(ProcessData, ConnectInfo->ConsoleStartInfo.ConsoleHandle, FALSE, - NULL, // &ConnectInfo->ConsoleStartInfo.InputHandle, - NULL, // &ConnectInfo->ConsoleStartInfo.OutputHandle, - NULL); // &ConnectInfo->ConsoleStartInfo.ErrorHandle); + NULL, // &ConnectInfo->ConsoleStartInfo.InputHandle, + NULL, // &ConnectInfo->ConsoleStartInfo.OutputHandle, + NULL, // &ConnectInfo->ConsoleStartInfo.ErrorHandle, + &ConnectInfo->ConsoleStartInfo); if (!NT_SUCCESS(Status)) { DPRINT1("Console inheritance failed\n"); diff --git a/reactos/win32ss/user/winsrv/consrv/procinit.h b/reactos/win32ss/user/winsrv/consrv/procinit.h index cbc0d6b002b..aada552d4e0 100644 --- a/reactos/win32ss/user/winsrv/consrv/procinit.h +++ b/reactos/win32ss/user/winsrv/consrv/procinit.h @@ -18,5 +18,6 @@ NTSTATUS ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, BOOLEAN CreateNewHandlesTable, PHANDLE pInputHandle, PHANDLE pOutputHandle, - PHANDLE pErrorHandle); + PHANDLE pErrorHandle, + PCONSOLE_START_INFO ConsoleStartInfo); VOID ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData); From 0f5d76879386845b5acf9ae07c9815f746e31f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 22 Nov 2014 23:13:41 +0000 Subject: [PATCH 23/50] [KERNEL32] - Fix a misspelling. [NTDLL] - Fix the prototypes of RtlFormatMessageEx(Ex), this fixes strange apps kills when they use FormatMessage[A/W] with win2k3 kernel32 (that uses internally RtlFormatMessage to do the job). svn path=/trunk/; revision=65450 --- reactos/dll/ntdll/def/ntdll.spec | 4 +- reactos/dll/win32/kernel32/client/proc.c | 2 +- reactos/include/psdk/winternl.h | 2 +- reactos/lib/rtl/message.c | 87 ++++++++++++++---------- 4 files changed, 56 insertions(+), 39 deletions(-) diff --git a/reactos/dll/ntdll/def/ntdll.spec b/reactos/dll/ntdll/def/ntdll.spec index 16863d972ff..0894a898ec2 100644 --- a/reactos/dll/ntdll/def/ntdll.spec +++ b/reactos/dll/ntdll/def/ntdll.spec @@ -630,8 +630,8 @@ @ stdcall RtlFirstFreeAce(ptr ptr) @ stdcall RtlFlushSecureMemoryCache(ptr ptr) @ stdcall RtlFormatCurrentUserKeyPath(ptr) -@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long) -@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long long) +@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long ptr) +@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long ptr long) @ stdcall RtlFreeActivationContextStack(ptr) @ stdcall RtlFreeAnsiString(long) @ stdcall RtlFreeHandle(ptr ptr) diff --git a/reactos/dll/win32/kernel32/client/proc.c b/reactos/dll/win32/kernel32/client/proc.c index da22dafac2f..0948f8bf94a 100644 --- a/reactos/dll/win32/kernel32/client/proc.c +++ b/reactos/dll/win32/kernel32/client/proc.c @@ -3992,7 +3992,7 @@ StartScan: if (!NT_SUCCESS(Status)) { /* Bail out on failure */ - DPRINT1("Failed to reserved memory for VDM: %lx\n", Status); + DPRINT1("Failed to reserve memory for VDM: %lx\n", Status); BaseSetLastNTError(Status); Result = FALSE; goto Quickie; diff --git a/reactos/include/psdk/winternl.h b/reactos/include/psdk/winternl.h index 085dd1b209b..6cfca41266f 100644 --- a/reactos/include/psdk/winternl.h +++ b/reactos/include/psdk/winternl.h @@ -2177,7 +2177,7 @@ ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG); ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN); BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *); NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING); -NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG); +NTSTATUS WINAPI RtlFormatMessage(PWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,PWSTR,ULONG,PULONG); void WINAPI RtlFreeAnsiString(PANSI_STRING); BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *); BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID); diff --git a/reactos/lib/rtl/message.c b/reactos/lib/rtl/message.c index 5d50945f1c0..0f0f7aa9f02 100644 --- a/reactos/lib/rtl/message.c +++ b/reactos/lib/rtl/message.c @@ -20,11 +20,11 @@ NTSTATUS NTAPI RtlFindMessage( - PVOID BaseAddress, - ULONG Type, - ULONG Language, - ULONG MessageId, - PMESSAGE_RESOURCE_ENTRY *MessageResourceEntry) + IN PVOID BaseAddress, + IN ULONG Type, + IN ULONG Language, + IN ULONG MessageId, + OUT PMESSAGE_RESOURCE_ENTRY* MessageResourceEntry) { LDR_RESOURCE_INFO ResourceInfo; PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry; @@ -122,41 +122,47 @@ RtlFindMessage( return STATUS_SUCCESS; } +/* + * @unimplemented + */ NTSTATUS NTAPI RtlFormatMessageEx( - PWSTR Message, - UCHAR MaxWidth, - BOOLEAN IgnoreInserts, - BOOLEAN Ansi, - BOOLEAN ArgumentIsArray, - va_list *Arguments, - PWSTR Buffer, - ULONG BufferSize, - ULONG Flags) + IN PWSTR Message, + IN ULONG MaxWidth OPTIONAL, + IN BOOLEAN IgnoreInserts, + IN BOOLEAN ArgumentsAreAnsi, + IN BOOLEAN ArgumentsAreAnArray, + IN va_list* Arguments, + OUT PWSTR Buffer, + IN ULONG BufferSize, + OUT PULONG ReturnLength OPTIONAL, + IN ULONG Flags) { - DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu %lx)\n", - Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE", - ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer, BufferSize, Flags); + DPRINT1("RtlFormatMessage(%S, %lu, %s, %s, %s, %p, %p, %lu, %p, %lx)\n", + Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", ArgumentsAreAnsi ? "TRUE" : "FALSE", + ArgumentsAreAnArray ? "TRUE" : "FALSE", Arguments, Buffer, BufferSize, + ReturnLength, Flags); UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; } /********************************************************************** - * RtlFormatMessage (NTDLL.@) + * RtlFormatMessage (NTDLL.@) * * Formats a message (similar to sprintf). * * PARAMS - * Message [I] Message to format. - * MaxWidth [I] Maximum width in characters of each output line. - * IgnoreInserts [I] Whether to copy the message without processing inserts. - * Ansi [I] Whether Arguments may have ANSI strings. - * ArgumentsIsArray [I] Whether Arguments is actually an array rather than a va_list *. - * Arguments [I] - * Buffer [O] Buffer to store processed message in. - * BufferSize [I] Size of Buffer (in bytes?). + * Message [I] Message to format. + * MaxWidth [I] Maximum width in characters of each output line (optional). + * IgnoreInserts [I] Whether to copy the message without processing inserts. + * ArgumentsAreAnsi [I] Whether Arguments may have ANSI strings. + * ArgumentsAreAnArray [I] Whether Arguments is actually an array rather than a va_list *. + * Arguments [I] + * Buffer [O] Buffer to store processed message in. + * BufferSize [I] Size of Buffer (in bytes). + * ReturnLength [O] Size of the formatted message (in bytes; optional). * * RETURNS * NTSTATUS code. @@ -166,16 +172,27 @@ RtlFormatMessageEx( NTSTATUS NTAPI RtlFormatMessage( - PWSTR Message, - UCHAR MaxWidth, - BOOLEAN IgnoreInserts, - BOOLEAN Ansi, - BOOLEAN ArgumentIsArray, - va_list *Arguments, - PWSTR Buffer, - ULONG BufferSize) + IN PWSTR Message, + IN ULONG MaxWidth OPTIONAL, + IN BOOLEAN IgnoreInserts, + IN BOOLEAN ArgumentsAreAnsi, + IN BOOLEAN ArgumentsAreAnArray, + IN va_list* Arguments, + OUT PWSTR Buffer, + IN ULONG BufferSize, + OUT PULONG ReturnLength OPTIONAL) { - return RtlFormatMessageEx(Message, MaxWidth, IgnoreInserts, Ansi, ArgumentIsArray, Arguments, Buffer, BufferSize, 0); + /* Call the extended API */ + return RtlFormatMessageEx(Message, + MaxWidth, + IgnoreInserts, + ArgumentsAreAnsi, + ArgumentsAreAnArray, + Arguments, + Buffer, + BufferSize, + ReturnLength, + 0); } /* EOF */ From 5d7ced37ec4a1ac84740535a458a0e9b1c962a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 12:03:55 +0000 Subject: [PATCH 24/50] [NTVDM]: Rewrite video window scrolling code more efficiently (i.e. getting rid of HeapAlloc/Free calls). As a bonus, implement scrolling horizontally. svn path=/trunk/; revision=65451 --- reactos/subsystems/ntvdm/bios/vidbios.c | 249 ++++++++++++++---------- reactos/subsystems/ntvdm/bios/vidbios.h | 12 +- 2 files changed, 148 insertions(+), 113 deletions(-) diff --git a/reactos/subsystems/ntvdm/bios/vidbios.c b/reactos/subsystems/ntvdm/bios/vidbios.c index ca6ad1be477..8bafefa1feb 100644 --- a/reactos/subsystems/ntvdm/bios/vidbios.c +++ b/reactos/subsystems/ntvdm/bios/vidbios.c @@ -1943,133 +1943,154 @@ static CONST UCHAR Font8x16[VGA_FONT_CHARACTERS * 16] = /* PRIVATE FUNCTIONS **********************************************************/ -static VOID VidBiosReadWindow(LPWORD Buffer, SMALL_RECT Rectangle, BYTE Page) -{ - INT i, j; - INT Counter = 0; - WORD Character; - DWORD VideoAddress = TO_LINEAR(TEXT_VIDEO_SEG, Page * Bda->VideoPageSize); - - for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) - { - for (j = Rectangle.Left; j <= Rectangle.Right; j++) - { - /* Read from video memory */ - EmulatorReadMemory(&EmulatorContext, - VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), - (LPVOID)&Character, - sizeof(WORD)); - - /* Write the data to the buffer in row order */ - Buffer[Counter++] = Character; - } - } -} - -static VOID VidBiosWriteWindow(LPWORD Buffer, SMALL_RECT Rectangle, BYTE Page) -{ - INT i, j; - INT Counter = 0; - WORD Character; - DWORD VideoAddress = TO_LINEAR(TEXT_VIDEO_SEG, Page * Bda->VideoPageSize); - - for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) - { - for (j = Rectangle.Left; j <= Rectangle.Right; j++) - { - Character = Buffer[Counter++]; - - /* Write to video memory */ - EmulatorWriteMemory(&EmulatorContext, - VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), - (LPVOID)&Character, - sizeof(WORD)); - } - } -} - -static BOOLEAN VidBiosScrollWindow(INT Direction, +static BOOLEAN VidBiosScrollWindow(SCROLL_DIRECTION Direction, DWORD Amount, SMALL_RECT Rectangle, BYTE Page, BYTE FillAttribute) { - DWORD i; - LPWORD WindowData; - WORD WindowWidth = Rectangle.Right - Rectangle.Left + 1; - WORD WindowHeight = Rectangle.Bottom - Rectangle.Top + 1; - DWORD WindowSize = WindowWidth * WindowHeight; + INT i, j; + DWORD VideoAddress = TO_LINEAR(TEXT_VIDEO_SEG, Page * Bda->VideoPageSize); + WORD FillCharacter = MAKEWORD(' ', FillAttribute); - /* Allocate a buffer for the window */ - WindowData = (LPWORD)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - WindowSize * sizeof(WORD)); - if (WindowData == NULL) return FALSE; + WORD WindowWidth, WindowHeight; - /* Read the window data */ - VidBiosReadWindow(WindowData, Rectangle, Page); + /* Fixup the rectangle if needed */ + Rectangle.Left = min(max(Rectangle.Left , 0), Bda->ScreenColumns - 1); + Rectangle.Right = min(max(Rectangle.Right , 0), Bda->ScreenColumns - 1); + Rectangle.Top = min(max(Rectangle.Top , 0), Bda->ScreenRows); + Rectangle.Bottom = min(max(Rectangle.Bottom, 0), Bda->ScreenRows); - if ((Amount == 0) - || (((Direction == SCROLL_DIRECTION_UP) - || (Direction == SCROLL_DIRECTION_DOWN)) - && (Amount >= WindowHeight)) - || (((Direction == SCROLL_DIRECTION_LEFT) - || (Direction == SCROLL_DIRECTION_RIGHT)) - && (Amount >= WindowWidth))) + WindowWidth = Rectangle.Right - Rectangle.Left + 1; + WindowHeight = Rectangle.Bottom - Rectangle.Top + 1; + + /* Amount == 0 means we clear all the rectangle */ + if ((Amount == 0) || + (((Direction == SCROLL_UP ) || (Direction == SCROLL_DOWN )) && (Amount >= WindowHeight)) || + (((Direction == SCROLL_LEFT) || (Direction == SCROLL_RIGHT)) && (Amount >= WindowWidth ))) { - /* Fill the window */ - for (i = 0; i < WindowSize; i++) + /* Fill the rectangle */ + for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) { - WindowData[i] = MAKEWORD(' ', FillAttribute); + for (j = Rectangle.Left; j <= Rectangle.Right; j++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } } - goto Done; + return TRUE; } switch (Direction) { - case SCROLL_DIRECTION_UP: + case SCROLL_UP: { - RtlMoveMemory(WindowData, - &WindowData[WindowWidth * Amount], - (WindowSize - WindowWidth * Amount) * sizeof(WORD)); - - for (i = 0; i < Amount * WindowWidth; i++) + /* Move text lines up */ + for (i = Rectangle.Top + Amount; i <= Rectangle.Bottom; i++) { - WindowData[WindowSize - i - 1] = MAKEWORD(' ', FillAttribute); + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + ((i - Amount) * Bda->ScreenColumns + Rectangle.Left) * sizeof(WORD), + REAL_TO_PHYS(VideoAddress + ( i * Bda->ScreenColumns + Rectangle.Left) * sizeof(WORD)), + (Rectangle.Right - Rectangle.Left + 1) * sizeof(WORD)); + } + + /* Fill the bottom of the rectangle */ + for (i = Rectangle.Bottom - Amount + 1; i <= Rectangle.Bottom; i++) + { + for (j = Rectangle.Left; j <= Rectangle.Right; j++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } } break; } - case SCROLL_DIRECTION_DOWN: + case SCROLL_DOWN: { - RtlMoveMemory(&WindowData[WindowWidth * Amount], - WindowData, - (WindowSize - WindowWidth * Amount) * sizeof(WORD)); - - for (i = 0; i < Amount * WindowWidth; i++) + /* Move text lines down */ + for (i = Rectangle.Bottom - Amount; i >= Rectangle.Top; i--) { - WindowData[i] = MAKEWORD(' ', FillAttribute); + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + ((i + Amount) * Bda->ScreenColumns + Rectangle.Left) * sizeof(WORD), + REAL_TO_PHYS(VideoAddress + ( i * Bda->ScreenColumns + Rectangle.Left) * sizeof(WORD)), + (Rectangle.Right - Rectangle.Left + 1) * sizeof(WORD)); + } + + /* Fill the top of the rectangle */ + for (i = Rectangle.Top; i <= Rectangle.Top + Amount - 1; i++) + { + for (j = Rectangle.Left; j <= Rectangle.Right; j++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } } break; } - default: + case SCROLL_LEFT: { - // TODO: NOT IMPLEMENTED! - UNIMPLEMENTED; + /* Move text lines left */ + for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + Rectangle.Left ) * sizeof(WORD), + REAL_TO_PHYS(VideoAddress + (i * Bda->ScreenColumns + Rectangle.Left + Amount) * sizeof(WORD)), + (Rectangle.Right - Rectangle.Left - Amount + 1) * sizeof(WORD)); + } + + /* Fill the right of the rectangle */ + for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) + { + for (j = Rectangle.Right - Amount + 1; j <= Rectangle.Right; j++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } + } + + break; + } + + case SCROLL_RIGHT: + { + /* Move text lines right */ + for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + Rectangle.Left + Amount) * sizeof(WORD), + REAL_TO_PHYS(VideoAddress + (i * Bda->ScreenColumns + Rectangle.Left ) * sizeof(WORD)), + (Rectangle.Right - Rectangle.Left - Amount + 1) * sizeof(WORD)); + } + + /* Fill the left of the rectangle */ + for (i = Rectangle.Top; i <= Rectangle.Bottom; i++) + { + for (j = Rectangle.Left; j <= Rectangle.Left + Amount - 1; j++) + { + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } + } + + break; } } -Done: - /* Write back the window data */ - VidBiosWriteWindow(WindowData, Rectangle, Page); - - /* Free the window buffer */ - HeapFree(GetProcessHeap(), 0, WindowData); - return TRUE; } @@ -2427,6 +2448,31 @@ static BOOLEAN VidBiosSetVideoMode(BYTE ModeNumber) // FIXME: We need to reset the fonts and the font vectors. (INT 1Fh and 43h). + // HACK: We clear here all the text memory. TODO: Do it better! + if (!DoNotClear && ((ModeNumber >= 0x00 && ModeNumber <= 0x03) || (ModeNumber == 0x07))) + { + INT i, j; + DWORD VideoAddress; + WORD FillCharacter = MAKEWORD(' ', DEFAULT_ATTRIBUTE); + + for (Page = 0; Page < BIOS_MAX_PAGES; ++Page) + { + VideoAddress = TO_LINEAR(TEXT_VIDEO_SEG, Page * Bda->VideoPageSize); + + for (i = 0; i <= Bda->ScreenRows; i++) + { + for (j = 0; j <= Bda->ScreenColumns - 1; j++) + { + /* Write to video memory */ + EmulatorWriteMemory(&EmulatorContext, + VideoAddress + (i * Bda->ScreenColumns + j) * sizeof(WORD), + (LPVOID)&FillCharacter, + sizeof(FillCharacter)); + } + } + } + } + /* Refresh display */ VgaRefreshDisplay(); @@ -2552,13 +2598,7 @@ static VOID VidBiosPrintCharacter(CHAR Character, BYTE Attribute, BYTE Page) { /* The screen must be scrolled up */ SMALL_RECT Rectangle = { 0, 0, Bda->ScreenColumns - 1, Bda->ScreenRows }; - - VidBiosScrollWindow(SCROLL_DIRECTION_UP, - 1, - Rectangle, - Page, - DEFAULT_ATTRIBUTE); - + VidBiosScrollWindow(SCROLL_UP, 1, Rectangle, Page, DEFAULT_ATTRIBUTE/*Attribute*/); Row--; } @@ -2629,13 +2669,8 @@ VOID WINAPI VidBiosVideoService(LPWORD Stack) { SMALL_RECT Rectangle = { getCL(), getCH(), getDL(), getDH() }; - /* Call the internal function */ - VidBiosScrollWindow((getAH() == 0x06) ? SCROLL_DIRECTION_UP - : SCROLL_DIRECTION_DOWN, - getAL(), - Rectangle, - Bda->VideoPage, - getBH()); + VidBiosScrollWindow((getAH() == 0x06) ? SCROLL_UP : SCROLL_DOWN, + getAL(), Rectangle, Bda->VideoPage, getBH()); break; } diff --git a/reactos/subsystems/ntvdm/bios/vidbios.h b/reactos/subsystems/ntvdm/bios/vidbios.h index 32118a80aad..99849d5dd4e 100644 --- a/reactos/subsystems/ntvdm/bios/vidbios.h +++ b/reactos/subsystems/ntvdm/bios/vidbios.h @@ -33,13 +33,13 @@ #define FONT_8x16_OFFSET 0x0800 #define FONT_8x14_OFFSET 0x1800 -enum +typedef enum { - SCROLL_DIRECTION_UP, - SCROLL_DIRECTION_DOWN, - SCROLL_DIRECTION_LEFT, - SCROLL_DIRECTION_RIGHT -}; + SCROLL_UP, + SCROLL_DOWN, + SCROLL_LEFT, + SCROLL_RIGHT +} SCROLL_DIRECTION; /* FUNCTIONS ******************************************************************/ From b89c9e939b125e8fc909ad7a0262c6a8fae786ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 23 Nov 2014 13:48:01 +0000 Subject: [PATCH 25/50] =?UTF-8?q?[NTOS:MM]=C2=A0Fix=20warnings=20when=20NE?= =?UTF-8?q?WCC=20is=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=65452 --- reactos/ntoskrnl/mm/mminit.c | 4 +++- reactos/ntoskrnl/mm/section.c | 29 +++++++++++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 41732e3c672..0535a7dafb3 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -300,7 +300,9 @@ NTAPI MmMpwThreadMain(PVOID Parameter) { NTSTATUS Status; +#ifndef NEWCC ULONG PagesWritten; +#endif LARGE_INTEGER Timeout; UNREFERENCED_PARAMETER(Parameter); @@ -321,9 +323,9 @@ MmMpwThreadMain(PVOID Parameter) return; } +#ifndef NEWCC PagesWritten = 0; -#ifndef NEWCC // XXX arty -- we flush when evicting pages or destorying cache // sections. CcRosFlushDirtyPages(128, &PagesWritten, FALSE); diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index abb483598b4..fd2f037f78a 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -904,17 +904,16 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section, if (SHARE_COUNT_FROM_SSE(Entry) == 0) { PFILE_OBJECT FileObject; -#ifndef NEWCC - PROS_SHARED_CACHE_MAP SharedCacheMap; -#endif SWAPENTRY SavedSwapEntry; PFN_NUMBER Page; +#ifndef NEWCC + PROS_SHARED_CACHE_MAP SharedCacheMap; BOOLEAN IsImageSection; LARGE_INTEGER FileOffset; FileOffset.QuadPart = Offset->QuadPart + Segment->Image.FileOffset; - IsImageSection = Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE; +#endif Page = PFN_FROM_SSE(Entry); FileObject = Section->FileObject; @@ -1873,14 +1872,14 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace, PFN_NUMBER Page; MM_SECTION_PAGEOUT_CONTEXT Context; SWAPENTRY SwapEntry; - ULONGLONG FileOffset; NTSTATUS Status; - PFILE_OBJECT FileObject; #ifndef NEWCC + ULONGLONG FileOffset; + PFILE_OBJECT FileObject; PROS_SHARED_CACHE_MAP SharedCacheMap = NULL; + BOOLEAN IsImageSection; #endif BOOLEAN DirectMapped; - BOOLEAN IsImageSection; PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace); KIRQL OldIrql; @@ -1896,16 +1895,16 @@ MmPageOutSectionView(PMMSUPPORT AddressSpace, Context.Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress + MemoryArea->Data.SectionData.ViewOffset.QuadPart; - FileOffset = Context.Offset.QuadPart + Context.Segment->Image.FileOffset; - IsImageSection = Context.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE; - - FileObject = Context.Section->FileObject; DirectMapped = FALSE; MmLockSectionSegment(Context.Segment); #ifndef NEWCC + FileOffset = Context.Offset.QuadPart + Context.Segment->Image.FileOffset; + IsImageSection = Context.Section->AllocationAttributes & SEC_IMAGE ? TRUE : FALSE; + FileObject = Context.Section->FileObject; + if (FileObject != NULL && !(Context.Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED)) { @@ -2284,7 +2283,9 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace, BOOLEAN Private; NTSTATUS Status; PFILE_OBJECT FileObject; +#ifndef NEWCC PROS_SHARED_CACHE_MAP SharedCacheMap = NULL; +#endif BOOLEAN DirectMapped; BOOLEAN IsImageSection; PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace); @@ -2306,7 +2307,9 @@ MmWritePageSectionView(PMMSUPPORT AddressSpace, if (FileObject != NULL && !(Segment->Image.Characteristics & IMAGE_SCN_MEM_SHARED)) { +#ifndef NEWCC SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; +#endif /* * If the file system is letting us go directly to the cache and the @@ -3987,8 +3990,10 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty) { ULONG_PTR Entry; +#ifndef NEWCC PFILE_OBJECT FileObject; PROS_SHARED_CACHE_MAP SharedCacheMap; +#endif LARGE_INTEGER Offset; SWAPENTRY SavedSwapEntry; PROS_SECTION_OBJECT Section; @@ -4028,9 +4033,9 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, { if (Page == PFN_FROM_SSE(Entry) && Dirty) { +#ifndef NEWCC FileObject = MemoryArea->Data.SectionData.Section->FileObject; SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap; -#ifndef NEWCC CcRosMarkDirtyVacb(SharedCacheMap, Offset.QuadPart + Segment->Image.FileOffset); #endif ASSERT(SwapEntry == 0); From bcc95895c60d53e66542d21d3d0e27be422917d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 23 Nov 2014 13:48:06 +0000 Subject: [PATCH 26/50] [NTOS:CC] Fix bug in CcPinRead In fact, this bug is never exposed because CcPinMappedData always returns TRUE. svn path=/trunk/; revision=65453 --- reactos/ntoskrnl/cc/pin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index 960803284ef..1fa81df248c 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -143,7 +143,7 @@ CcPinRead ( if (CcPinMappedData(FileObject, FileOffset, Length, Flags, Bcb)) return TRUE; else - CcUnpinData(Bcb); + CcUnpinData(*Bcb); } return FALSE; } From 997dd60f963673b76223dd481b7c95cfd25dfbd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 23 Nov 2014 13:48:12 +0000 Subject: [PATCH 27/50] [SCSIPORT] Better error messages when receiving unexpected IOCTLs of mount manager svn path=/trunk/; revision=65454 --- reactos/drivers/storage/scsiport/scsiport.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/storage/scsiport/scsiport.c b/reactos/drivers/storage/scsiport/scsiport.c index 0db7e81bf31..0585b0d0ad2 100644 --- a/reactos/drivers/storage/scsiport/scsiport.c +++ b/reactos/drivers/storage/scsiport/scsiport.c @@ -34,6 +34,7 @@ #include #include #include +#include #define NDEBUG #include @@ -2877,8 +2878,20 @@ ScsiPortDeviceControl(IN PDEVICE_OBJECT DeviceObject, break; default: - if ('M' == (Stack->Parameters.DeviceIoControl.IoControlCode >> 16)) { - DPRINT1(" got ioctl intended for the mount manager: 0x%lX\n", Stack->Parameters.DeviceIoControl.IoControlCode); + if (DEVICE_TYPE_FROM_CTL_CODE(Stack->Parameters.DeviceIoControl.IoControlCode) == MOUNTDEVCONTROLTYPE) + { + switch (Stack->Parameters.DeviceIoControl.IoControlCode) + { + case IOCTL_MOUNTDEV_QUERY_DEVICE_NAME: + DPRINT1("Got unexpected IOCTL_MOUNTDEV_QUERY_DEVICE_NAME\n"); + break; + case IOCTL_MOUNTDEV_QUERY_UNIQUE_ID: + DPRINT1("Got unexpected IOCTL_MOUNTDEV_QUERY_UNIQUE_ID\n"); + break; + default: + DPRINT1(" got ioctl intended for the mount manager: 0x%lX\n", Stack->Parameters.DeviceIoControl.IoControlCode); + break; + } } else { DPRINT1(" unknown ioctl code: 0x%lX\n", Stack->Parameters.DeviceIoControl.IoControlCode); } From c966e68f3b11ef73078922238ca2e1e77250f417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 23 Nov 2014 13:48:20 +0000 Subject: [PATCH 28/50] [PSDK] Add some missing setupapi-related functions svn path=/trunk/; revision=65455 --- reactos/include/psdk/setupapi.h | 42 +++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/reactos/include/psdk/setupapi.h b/reactos/include/psdk/setupapi.h index 0f2c67a8557..ae87512e153 100644 --- a/reactos/include/psdk/setupapi.h +++ b/reactos/include/psdk/setupapi.h @@ -611,16 +611,20 @@ extern "C" { #define SPQ_SCAN_INFORM_USER 0x00000010 #define SPQ_SCAN_PRUNE_COPY_QUEUE 0x00000020 #define SPRDI_FIND_DUPS 0x00000001 -#define SPSVCINST_TAGTOFRONT 0x00000001 -#define SPSVCINST_ASSOCSERVICE 0x00000002 -#define SPSVCINST_DELETEEVENTLOGENTRY 0x00000004 -#define SPSVCINST_NOCLOBBER_DISPLAYNAME 0x00000008 -#define SPSVCINST_NOCLOBBER_STARTTYPE 0x00000010 -#define SPSVCINST_NOCLOBBER_ERRORCONTROL 0x00000020 -#define SPSVCINST_NOCLOBBER_LOADORDERGROUP 0x00000040 -#define SPSVCINST_NOCLOBBER_DEPENDENCIES 0x00000080 -#define SPSVCINST_NOCLOBBER_DESCRIPTION 0x00000100 -#define SPSVCINST_STOPSERVICE 0x00000200 + +#define SPSVCINST_TAGTOFRONT 0x00000001 +#define SPSVCINST_ASSOCSERVICE 0x00000002 +#define SPSVCINST_DELETEEVENTLOGENTRY 0x00000004 +#define SPSVCINST_NOCLOBBER_DISPLAYNAME 0x00000008 +#define SPSVCINST_NOCLOBBER_STARTTYPE 0x00000010 +#define SPSVCINST_NOCLOBBER_ERRORCONTROL 0x00000020 +#define SPSVCINST_NOCLOBBER_LOADORDERGROUP 0x00000040 +#define SPSVCINST_NOCLOBBER_DEPENDENCIES 0x00000080 +#define SPSVCINST_NOCLOBBER_DESCRIPTION 0x00000100 +#define SPSVCINST_STOPSERVICE 0x00000200 +#define SPSVCINST_CLOBBER_SECURITY 0x00000400 +#define SPSVCINST_STARTSERVICE 0x00000800 + #define SPWPT_SELECTDEVICE 0x00000001 #define SPWP_USE_DEVINFO_DATA 0x00000001 #define SRCINFO_PATH 1 @@ -2350,6 +2354,22 @@ SetupSetSourceListW( WINSETUPAPI VOID WINAPI SetupTermDefaultQueueCallback(_In_ PVOID); WINSETUPAPI BOOL WINAPI SetupTerminateFileLog(_In_ HSPFILELOG); +WINSETUPAPI +BOOL +WINAPI +SetupUninstallOEMInfA( + _In_ PCSTR InfFileName, + _In_ DWORD Flags, + _In_ PVOID Reserved); + +WINSETUPAPI +BOOL +WINAPI +SetupUninstallOEMInfW( + _In_ PCWSTR InfFileName, + _In_ DWORD Flags, + _In_ PVOID Reserved); + WINSETUPAPI DWORD WINAPI StampFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR); @@ -2520,6 +2540,7 @@ WINSETUPAPI PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); #define SetupSetFileQueueAlternatePlatform SetupSetFileQueueAlternatePlatformW #define SetupSetPlatformPathOverride SetupSetPlatformPathOverrideW #define SetupSetSourceList SetupSetSourceListW +#define SetupUninstallOEMInf SetupUninstallOEMInfW #else #define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_A #define SetupAddInstallSectionToDiskSpaceList SetupAddInstallSectionToDiskSpaceListA @@ -2642,6 +2663,7 @@ WINSETUPAPI PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); #define SetupSetFileQueueAlternatePlatform SetupSetFileQueueAlternatePlatformA #define SetupSetPlatformPathOverride SetupSetPlatformPathOverrideA #define SetupSetSourceList SetupSetSourceListA +#define SetupUninstallOEMInf SetupUninstallOEMInfA #endif /* UNICODE */ #endif /* RC_INVOKED */ From 950747c6d19b0a28665b542406afcf5e5fd6de66 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 23 Nov 2014 14:07:08 +0000 Subject: [PATCH 29/50] [NTFS] - Implement GetBestFileNameFromRecord() which will select the higher subsystem name available (POSIX -> Win32 -> DOS) and return it - Replace the hand-made implementation of it in dirctl functions relying on it (NtfsGetDirectoryInformation(), NtfsGetFullDirectoryInformation(), NtfsGetBothDirectoryInformation()) - Use it in NtfsMakeFCBFromDirEntry() This fixes browsing POSIX volume (and opening file) in cmd. Even though, explorer doesn't seem to be happy with such change... This doesn't fix yet the autocompletion in cmd either. svn path=/trunk/; revision=65456 --- reactos/drivers/filesystems/ntfs/attrib.c | 18 ++++++++++ reactos/drivers/filesystems/ntfs/dirctl.c | 40 +++-------------------- reactos/drivers/filesystems/ntfs/fcb.c | 2 +- reactos/drivers/filesystems/ntfs/ntfs.h | 3 ++ 4 files changed, 26 insertions(+), 37 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/attrib.c b/reactos/drivers/filesystems/ntfs/attrib.c index ac4d6419119..675a2d8d8af 100644 --- a/reactos/drivers/filesystems/ntfs/attrib.c +++ b/reactos/drivers/filesystems/ntfs/attrib.c @@ -314,4 +314,22 @@ GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType) return NULL; } +PFILENAME_ATTRIBUTE +GetBestFileNameFromRecord(PFILE_RECORD_HEADER FileRecord) +{ + PFILENAME_ATTRIBUTE FileName; + + FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX); + if (FileName == NULL) + { + FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32); + if (FileName == NULL) + { + FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); + } + } + + return FileName; +} + /* EOF */ diff --git a/reactos/drivers/filesystems/ntfs/dirctl.c b/reactos/drivers/filesystems/ntfs/dirctl.c index 088b69fe6ef..ddf5662e80d 100644 --- a/reactos/drivers/filesystems/ntfs/dirctl.c +++ b/reactos/drivers/filesystems/ntfs/dirctl.c @@ -137,15 +137,7 @@ NtfsGetNameInformation(PDEVICE_EXTENSION DeviceExt, DPRINT("NtfsGetNameInformation() called\n"); - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); - } - } + FileName = GetBestFileNameFromRecord(FileRecord); ASSERT(FileName != NULL); Length = FileName->NameLength * sizeof (WCHAR); @@ -173,15 +165,7 @@ NtfsGetDirectoryInformation(PDEVICE_EXTENSION DeviceExt, DPRINT("NtfsGetDirectoryInformation() called\n"); - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); - } - } + FileName = GetBestFileNameFromRecord(FileRecord); ASSERT(FileName != NULL); Length = FileName->NameLength * sizeof (WCHAR); @@ -222,15 +206,7 @@ NtfsGetFullDirectoryInformation(PDEVICE_EXTENSION DeviceExt, DPRINT("NtfsGetFullDirectoryInformation() called\n"); - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); - } - } + FileName = GetBestFileNameFromRecord(FileRecord); ASSERT(FileName != NULL); Length = FileName->NameLength * sizeof (WCHAR); @@ -272,15 +248,7 @@ NtfsGetBothDirectoryInformation(PDEVICE_EXTENSION DeviceExt, DPRINT("NtfsGetBothDirectoryInformation() called\n"); - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32); - if (FileName == NULL) - { - FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); - } - } + FileName = GetBestFileNameFromRecord(FileRecord); ASSERT(FileName != NULL); ShortFileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS); diff --git a/reactos/drivers/filesystems/ntfs/fcb.c b/reactos/drivers/filesystems/ntfs/fcb.c index 7ab896bd9e5..8be70301bf3 100644 --- a/reactos/drivers/filesystems/ntfs/fcb.c +++ b/reactos/drivers/filesystems/ntfs/fcb.c @@ -396,7 +396,7 @@ NtfsMakeFCBFromDirEntry(PNTFS_VCB Vcb, DPRINT1("NtfsMakeFCBFromDirEntry(%p, %p, %wZ, %p, %p)\n", Vcb, DirectoryFCB, Name, Record, fileFCB); - FileName = GetFileNameFromRecord(Record, NTFS_FILE_NAME_WIN32); + FileName = GetBestFileNameFromRecord(Record); if (!FileName) { return STATUS_OBJECT_NAME_NOT_FOUND; // Not sure that's the best here diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 39db578fe63..058fbdd8930 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -452,6 +452,9 @@ NtfsDumpFileAttributes(PFILE_RECORD_HEADER FileRecord); PFILENAME_ATTRIBUTE GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType); +PFILENAME_ATTRIBUTE +GetBestFileNameFromRecord(PFILE_RECORD_HEADER FileRecord); + /* blockdev.c */ NTSTATUS From f8fc01c589807290b83710f88c3b5a9d3e752294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 14:26:37 +0000 Subject: [PATCH 30/50] [CONSRV]: Reduce code duplication and remove unused InputWaitHandle member. svn path=/trunk/; revision=65457 --- reactos/win32ss/user/winsrv/consrv/console.c | 30 +--- reactos/win32ss/user/winsrv/consrv/consrv.h | 4 +- reactos/win32ss/user/winsrv/consrv/handle.c | 136 ++++++++++-------- reactos/win32ss/user/winsrv/consrv/init.c | 13 -- reactos/win32ss/user/winsrv/consrv/procinit.h | 2 +- 5 files changed, 80 insertions(+), 105 deletions(-) diff --git a/reactos/win32ss/user/winsrv/consrv/console.c b/reactos/win32ss/user/winsrv/consrv/console.c index 56581f86911..6e342e9a9e0 100644 --- a/reactos/win32ss/user/winsrv/consrv/console.c +++ b/reactos/win32ss/user/winsrv/consrv/console.c @@ -283,8 +283,6 @@ ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData, ASSERT(Console); *Console = NULL; - // RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (ConSrvValidateConsole(&GrabConsole, ProcessData->ConsoleHandle, CONSOLE_RUNNING, @@ -295,7 +293,6 @@ ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData, Status = STATUS_SUCCESS; } - // RtlLeaveCriticalSection(&ProcessData->HandleTableLock); return Status; } @@ -948,14 +945,6 @@ CSR_API(SrvAllocConsole) return Status; } - /* Mark the process as having a console */ - ProcessData->ConsoleApp = TRUE; - CsrProcess->Flags |= CsrProcessIsConsoleApp; - - /* Return the console handle and the input wait handle to the caller */ - AllocConsoleRequest->ConsoleStartInfo->ConsoleHandle = ProcessData->ConsoleHandle; - AllocConsoleRequest->ConsoleStartInfo->InputWaitHandle = ProcessData->InputWaitHandle; - /* Set the Property-Dialog and Control-Dispatcher handlers */ ProcessData->PropRoutine = AllocConsoleRequest->PropRoutine; ProcessData->CtrlRoutine = AllocConsoleRequest->CtrlRoutine; @@ -1038,14 +1027,6 @@ CSR_API(SrvAttachConsole) goto Quit; } - /* Mark the process as having a console */ - TargetProcessData->ConsoleApp = TRUE; - TargetProcess->Flags |= CsrProcessIsConsoleApp; - - /* Return the console handle and the input wait handle to the caller */ - AttachConsoleRequest->ConsoleStartInfo->ConsoleHandle = TargetProcessData->ConsoleHandle; - AttachConsoleRequest->ConsoleStartInfo->InputWaitHandle = TargetProcessData->InputWaitHandle; - /* Set the Property-Dialog and Control-Dispatcher handlers */ TargetProcessData->PropRoutine = AttachConsoleRequest->PropRoutine; TargetProcessData->CtrlRoutine = AttachConsoleRequest->CtrlRoutine; @@ -1060,16 +1041,7 @@ Quit: CSR_API(SrvFreeConsole) { - PCSR_PROCESS CsrProcess = CsrGetClientThread()->Process; - PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess); - - ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process)); - - /* Mark the process as not having a console anymore */ - ProcessData->ConsoleApp = FALSE; - CsrProcess->Flags &= ~CsrProcessIsConsoleApp; - - return STATUS_SUCCESS; + return ConSrvRemoveConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process)); } NTSTATUS NTAPI diff --git a/reactos/win32ss/user/winsrv/consrv/consrv.h b/reactos/win32ss/user/winsrv/consrv/consrv.h index 09b87fc81f5..0b57e2ea230 100644 --- a/reactos/win32ss/user/winsrv/consrv/consrv.h +++ b/reactos/win32ss/user/winsrv/consrv/consrv.h @@ -53,9 +53,7 @@ typedef struct _CONSOLE_PROCESS_DATA PCSR_PROCESS Process; // Process owning this structure. HANDLE ConsoleHandle; - HANDLE InputWaitHandle; - - BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise. + BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise. RTL_CRITICAL_SECTION HandleTableLock; ULONG HandleTableSize; diff --git a/reactos/win32ss/user/winsrv/consrv/handle.c b/reactos/win32ss/user/winsrv/consrv/handle.c index 9a435bbf6df..10a1305c328 100644 --- a/reactos/win32ss/user/winsrv/consrv/handle.c +++ b/reactos/win32ss/user/winsrv/consrv/handle.c @@ -555,7 +555,7 @@ ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, Status = NtDuplicateObject(NtCurrentProcess(), Console->InputBuffer.ActiveEvent, ProcessData->Process->ProcessHandle, - &ProcessData->InputWaitHandle, + &ConsoleInitInfo->ConsoleStartInfo->InputWaitHandle, EVENT_ALL_ACCESS, 0, 0); if (!NT_SUCCESS(Status)) { @@ -568,6 +568,13 @@ ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData, return Status; } + /* Mark the process as having a console */ + ProcessData->ConsoleApp = TRUE; + ProcessData->Process->Flags |= CsrProcessIsConsoleApp; + + /* Return the console handle to the caller */ + ConsoleInitInfo->ConsoleStartInfo->ConsoleHandle = ProcessData->ConsoleHandle; + /* Insert the process into the processes list of the console */ InsertHeadList(&Console->ProcessList, &ProcessData->ConsoleLink); @@ -664,7 +671,7 @@ ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, Status = NtDuplicateObject(NtCurrentProcess(), Console->InputBuffer.ActiveEvent, ProcessData->Process->ProcessHandle, - &ProcessData->InputWaitHandle, + &ConsoleStartInfo->InputWaitHandle, EVENT_ALL_ACCESS, 0, 0); if (!NT_SUCCESS(Status)) { @@ -676,6 +683,13 @@ ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, goto Quit; } + /* Mark the process as having a console */ + ProcessData->ConsoleApp = TRUE; + ProcessData->Process->Flags |= CsrProcessIsConsoleApp; + + /* Return the console handle to the caller */ + ConsoleStartInfo->ConsoleHandle = ProcessData->ConsoleHandle; + /* Insert the process into the processes list of the console */ InsertHeadList(&Console->ProcessList, &ProcessData->ConsoleLink); @@ -693,74 +707,78 @@ Quit: return Status; } -VOID +NTSTATUS ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData) { PCONSOLE Console; + PCONSOLE_PROCESS_DATA ConsoleLeaderProcess; DPRINT("ConSrvRemoveConsole\n"); - // RtlEnterCriticalSection(&ProcessData->HandleTableLock); + /* Mark the process as not having a console anymore */ + ProcessData->ConsoleApp = FALSE; + ProcessData->Process->Flags &= ~CsrProcessIsConsoleApp; /* Validate and lock the console */ - if (ConSrvValidateConsole(&Console, - ProcessData->ConsoleHandle, - CONSOLE_RUNNING, TRUE)) + if (!ConSrvValidateConsole(&Console, + ProcessData->ConsoleHandle, + CONSOLE_RUNNING, TRUE)) { - /* Retrieve the console leader process */ - PCONSOLE_PROCESS_DATA ConsoleLeaderProcess = ConSrvGetConsoleLeaderProcess(Console); - - DPRINT("ConSrvRemoveConsole - Locking OK\n"); - - /* Close all console handles and free the handles table */ - ConSrvFreeHandlesTable(ProcessData); - - /* Detach the process from the console */ - ProcessData->ConsoleHandle = NULL; - - /* Remove the process from the console's list of processes */ - RemoveEntryList(&ProcessData->ConsoleLink); - - /* Check whether the console should send a last close notification */ - if (Console->NotifyLastClose) - { - /* If we are removing the process which wants the last close notification... */ - if (ProcessData == Console->NotifiedLastCloseProcess) - { - /* ... just reset the flag and the pointer... */ - Console->NotifyLastClose = FALSE; - Console->NotifiedLastCloseProcess = NULL; - } - /* - * ... otherwise, if we are removing the console leader process - * (that cannot be the process wanting the notification, because - * the previous case already dealt with it)... - */ - else if (ProcessData == ConsoleLeaderProcess) - { - /* - * ... reset the flag first (so that we avoid multiple notifications) - * and then send the last close notification. - */ - Console->NotifyLastClose = FALSE; - ConSrvConsoleCtrlEvent(CTRL_LAST_CLOSE_EVENT, Console->NotifiedLastCloseProcess); - - /* Only now, reset the pointer */ - Console->NotifiedLastCloseProcess = NULL; - } - } - - /* Update the internal info of the terminal */ - TermRefreshInternalInfo(Console); - - /* Release the console */ - DPRINT("ConSrvRemoveConsole - Decrement Console->ReferenceCount = %lu\n", Console->ReferenceCount); - ConSrvReleaseConsole(Console, TRUE); - //CloseHandle(ProcessData->InputWaitHandle); - //ProcessData->InputWaitHandle = NULL; + // FIXME: Find another status code + return STATUS_UNSUCCESSFUL; } - // RtlLeaveCriticalSection(&ProcessData->HandleTableLock); + DPRINT("ConSrvRemoveConsole - Locking OK\n"); + + /* Retrieve the console leader process */ + ConsoleLeaderProcess = ConSrvGetConsoleLeaderProcess(Console); + + /* Close all console handles and free the handles table */ + ConSrvFreeHandlesTable(ProcessData); + + /* Detach the process from the console */ + ProcessData->ConsoleHandle = NULL; + + /* Remove the process from the console's list of processes */ + RemoveEntryList(&ProcessData->ConsoleLink); + + /* Check whether the console should send a last close notification */ + if (Console->NotifyLastClose) + { + /* If we are removing the process which wants the last close notification... */ + if (ProcessData == Console->NotifiedLastCloseProcess) + { + /* ... just reset the flag and the pointer... */ + Console->NotifyLastClose = FALSE; + Console->NotifiedLastCloseProcess = NULL; + } + /* + * ... otherwise, if we are removing the console leader process + * (that cannot be the process wanting the notification, because + * the previous case already dealt with it)... + */ + else if (ProcessData == ConsoleLeaderProcess) + { + /* + * ... reset the flag first (so that we avoid multiple notifications) + * and then send the last close notification. + */ + Console->NotifyLastClose = FALSE; + ConSrvConsoleCtrlEvent(CTRL_LAST_CLOSE_EVENT, Console->NotifiedLastCloseProcess); + + /* Only now, reset the pointer */ + Console->NotifiedLastCloseProcess = NULL; + } + } + + /* Update the internal info of the terminal */ + TermRefreshInternalInfo(Console); + + /* Release the console */ + DPRINT("ConSrvRemoveConsole - Decrement Console->ReferenceCount = %lu\n", Console->ReferenceCount); + ConSrvReleaseConsole(Console, TRUE); + + return STATUS_SUCCESS; } diff --git a/reactos/win32ss/user/winsrv/consrv/init.c b/reactos/win32ss/user/winsrv/consrv/init.c index 5841e033a74..3cd60cef013 100644 --- a/reactos/win32ss/user/winsrv/consrv/init.c +++ b/reactos/win32ss/user/winsrv/consrv/init.c @@ -353,7 +353,6 @@ ConSrvNewProcess(PCSR_PROCESS SourceProcess, /* Initialize the new (target) process */ RtlZeroMemory(TargetProcessData, sizeof(*TargetProcessData)); TargetProcessData->Process = TargetProcess; - TargetProcessData->InputWaitHandle = NULL; TargetProcessData->ConsoleHandle = NULL; TargetProcessData->ConsoleApp = FALSE; @@ -491,14 +490,6 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, } } - /* Mark the process as having a console */ - ProcessData->ConsoleApp = TRUE; - // ProcessData->Flags |= CsrProcessIsConsoleApp; - - /* Return the console handle and the input wait handle to the caller */ - ConnectInfo->ConsoleStartInfo.ConsoleHandle = ProcessData->ConsoleHandle; - ConnectInfo->ConsoleStartInfo.InputWaitHandle = ProcessData->InputWaitHandle; - /* Set the Property-Dialog and Control-Dispatcher handlers */ ProcessData->PropRoutine = ConnectInfo->PropRoutine; ProcessData->CtrlRoutine = ConnectInfo->CtrlRoutine; @@ -521,10 +512,6 @@ ConSrvDisconnect(PCSR_PROCESS Process) { DPRINT("ConSrvDisconnect - calling ConSrvRemoveConsole\n"); ConSrvRemoveConsole(ProcessData); - - /* Mark the process as not having a console anymore */ - ProcessData->ConsoleApp = FALSE; - Process->Flags &= ~CsrProcessIsConsoleApp; } RtlDeleteCriticalSection(&ProcessData->HandleTableLock); diff --git a/reactos/win32ss/user/winsrv/consrv/procinit.h b/reactos/win32ss/user/winsrv/consrv/procinit.h index aada552d4e0..716ecd0a815 100644 --- a/reactos/win32ss/user/winsrv/consrv/procinit.h +++ b/reactos/win32ss/user/winsrv/consrv/procinit.h @@ -20,4 +20,4 @@ NTSTATUS ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData, PHANDLE pOutputHandle, PHANDLE pErrorHandle, PCONSOLE_START_INFO ConsoleStartInfo); -VOID ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData); +NTSTATUS ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData); From ace5ce5329a98c2eb396f0f0f98b2f4a1031c9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 14:50:34 +0000 Subject: [PATCH 31/50] Create a repository to ressuscitate our verrrrry old subsystems. svn path=/trunk/; revision=65458 --- rossubsys/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 rossubsys/.gitignore diff --git a/rossubsys/.gitignore b/rossubsys/.gitignore new file mode 100644 index 00000000000..e69de29bb2d From 9f2787eb3211e8665eab85f1f07b46b265156087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 15:22:07 +0000 Subject: [PATCH 32/50] Resuscitate OS/2 subsystem from revision 24496. svn path=/trunk/; revision=65459 --- rossubsys/os2/apps/bepslep/Makefile | 37 + rossubsys/os2/apps/bepslep/bepslep.c | 20 + rossubsys/os2/apps/bepslep/bepslep.xml | 0 rossubsys/os2/apps/directory.xml | 5 + rossubsys/os2/copying | 340 + rossubsys/os2/directory.xml | 11 + rossubsys/os2/dirstruct.txt | 50 + rossubsys/os2/doc/how to start.txt | 16 + rossubsys/os2/doc/index.html | 67 + rossubsys/os2/include/os2.h | 12603 ++++++++++++++++ rossubsys/os2/include/ros2.h | 91 + rossubsys/os2/install.bat | 20 + rossubsys/os2/lib/directory.xml | 5 + .../os2/lib/doscalls/devices/devices.cpp | 65 + .../os2/lib/doscalls/devices/ioctl_async.cpp | 97 + rossubsys/os2/lib/doscalls/doscalls.def | 35 + rossubsys/os2/lib/doscalls/doscalls.def.bak | 23 + rossubsys/os2/lib/doscalls/doscalls.edf | 35 + rossubsys/os2/lib/doscalls/doscalls.rc | 4 + rossubsys/os2/lib/doscalls/doscalls.xml | 23 + rossubsys/os2/lib/doscalls/file/directory.cpp | 179 + rossubsys/os2/lib/doscalls/file/openclose.cpp | 199 + .../doscalls/implemented_functions_info.txt | 1063 ++ rossubsys/os2/lib/doscalls/makefile | 61 + rossubsys/os2/lib/doscalls/memory/memory.cpp | 40 + rossubsys/os2/lib/doscalls/misc/doscalls.cpp | 33 + rossubsys/os2/lib/doscalls/misc/error.cpp | 165 + rossubsys/os2/lib/doscalls/run/process.cpp | 58 + rossubsys/os2/makefile | 14 + rossubsys/os2/server/dllmain.c | 50 + rossubsys/os2/server/os2srv.def | 3 + rossubsys/os2/server/os2srv.h | 13 + rossubsys/os2/server/os2srv.rc | 4 + rossubsys/os2/server/os2srv.xml | 11 + rossubsys/os2/server/server.c | 84 + rossubsys/os2/utils/LXDUMP.EXE | Bin 0 -> 54547 bytes 36 files changed, 15524 insertions(+) create mode 100644 rossubsys/os2/apps/bepslep/Makefile create mode 100644 rossubsys/os2/apps/bepslep/bepslep.c create mode 100644 rossubsys/os2/apps/bepslep/bepslep.xml create mode 100644 rossubsys/os2/apps/directory.xml create mode 100644 rossubsys/os2/copying create mode 100644 rossubsys/os2/directory.xml create mode 100644 rossubsys/os2/dirstruct.txt create mode 100644 rossubsys/os2/doc/how to start.txt create mode 100644 rossubsys/os2/doc/index.html create mode 100644 rossubsys/os2/include/os2.h create mode 100644 rossubsys/os2/include/ros2.h create mode 100644 rossubsys/os2/install.bat create mode 100644 rossubsys/os2/lib/directory.xml create mode 100644 rossubsys/os2/lib/doscalls/devices/devices.cpp create mode 100644 rossubsys/os2/lib/doscalls/devices/ioctl_async.cpp create mode 100644 rossubsys/os2/lib/doscalls/doscalls.def create mode 100644 rossubsys/os2/lib/doscalls/doscalls.def.bak create mode 100644 rossubsys/os2/lib/doscalls/doscalls.edf create mode 100644 rossubsys/os2/lib/doscalls/doscalls.rc create mode 100644 rossubsys/os2/lib/doscalls/doscalls.xml create mode 100644 rossubsys/os2/lib/doscalls/file/directory.cpp create mode 100644 rossubsys/os2/lib/doscalls/file/openclose.cpp create mode 100644 rossubsys/os2/lib/doscalls/implemented_functions_info.txt create mode 100644 rossubsys/os2/lib/doscalls/makefile create mode 100644 rossubsys/os2/lib/doscalls/memory/memory.cpp create mode 100644 rossubsys/os2/lib/doscalls/misc/doscalls.cpp create mode 100644 rossubsys/os2/lib/doscalls/misc/error.cpp create mode 100644 rossubsys/os2/lib/doscalls/run/process.cpp create mode 100644 rossubsys/os2/makefile create mode 100644 rossubsys/os2/server/dllmain.c create mode 100644 rossubsys/os2/server/os2srv.def create mode 100644 rossubsys/os2/server/os2srv.h create mode 100644 rossubsys/os2/server/os2srv.rc create mode 100644 rossubsys/os2/server/os2srv.xml create mode 100644 rossubsys/os2/server/server.c create mode 100644 rossubsys/os2/utils/LXDUMP.EXE diff --git a/rossubsys/os2/apps/bepslep/Makefile b/rossubsys/os2/apps/bepslep/Makefile new file mode 100644 index 00000000000..270d9749e9a --- /dev/null +++ b/rossubsys/os2/apps/bepslep/Makefile @@ -0,0 +1,37 @@ +# $Id: Makefile,v 1.2 2003/01/07 16:23:10 robd Exp $ +# +# + +PATH_TO_TOP = ../../../reactos + +PATH_TO_OS2_TOP = ../.. + +TARGET_TYPE = program + +TARGET_NORC = yes + +#TARGET_APPTYPE = console +TARGET_APPTYPE = windows + +TARGET_NAME = bepslep + +TARGET_CFLAGS = -D__SUBSYSTEM_WINDOWS__ + +TARGET_LFLAGS = -nostartfiles + +TARGET_SDKLIBS = doscalls.a + +TARGET_GCCLIBS = stdc++ + +#TARGET_LIBS = $(PATH_TO_OS2_TOP)/lib/crt0w32.o \ +# $(PATH_TO_TOP)/dk/psx/lib/psxdll.a + +# $(PATH_TO_OS2_TOP)/dll/doscalls.dll + +TARGET_OBJECTS = $(TARGET_NAME).o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/os2/apps/bepslep/bepslep.c b/rossubsys/os2/apps/bepslep/bepslep.c new file mode 100644 index 00000000000..cacb59f6bae --- /dev/null +++ b/rossubsys/os2/apps/bepslep/bepslep.c @@ -0,0 +1,20 @@ + +#define INCL_DOSPROCESS +#include "../../include/os2.h" +//#include "../../include/ros2.h" + +void Eingang() +{ + DosBeep(3000,300); + DosSleep(1000); + DosBeep(4000,200); + DosExit(0,0); +} + +void WinMainCRTStartup() +{ + int a, b; + a= b+3; + b=a+3; + Eingang(); +} diff --git a/rossubsys/os2/apps/bepslep/bepslep.xml b/rossubsys/os2/apps/bepslep/bepslep.xml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/rossubsys/os2/apps/directory.xml b/rossubsys/os2/apps/directory.xml new file mode 100644 index 00000000000..78a17b71a78 --- /dev/null +++ b/rossubsys/os2/apps/directory.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/rossubsys/os2/copying b/rossubsys/os2/copying new file mode 100644 index 00000000000..dc63aaca038 --- /dev/null +++ b/rossubsys/os2/copying @@ -0,0 +1,340 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/rossubsys/os2/directory.xml b/rossubsys/os2/directory.xml new file mode 100644 index 00000000000..aef2d330465 --- /dev/null +++ b/rossubsys/os2/directory.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/rossubsys/os2/dirstruct.txt b/rossubsys/os2/dirstruct.txt new file mode 100644 index 00000000000..555400cd6b3 --- /dev/null +++ b/rossubsys/os2/dirstruct.txt @@ -0,0 +1,50 @@ +Win32 and os2ss sight to the system partition ++C < contains under os2ss a autogenerated config.sys + | + +-ROS + +-NATIVE < NTDLL, ntoskrnl, hal.dll, csrss.exe os2.exe psx.exe ... + | +-DRIVERS < *.SYS + | +-CONFIG < registry + +-WIN32 + | +-SYSTEM < user32.dll kernel32.dll ... + | +-FONTS + | +... + +-OS2 + | +-DLL < doscalls.dll .... + | +-SYSTEM + | +-... + +-PSX + +-etc < mountpoint for posix apps + +-bin + +-dev + +-lib < posix.dll + +-tmp + +-var + +-mnt < empty + +posix sight to the system partition + / + +-etc < mountpoint for posix apps + +-bin + +-dev < link to OB-mans Devices + +-lib < posix.dll + +-tmp < alias to systemtemp + +-var + +-mnt + +-C < win32-driveletters + | | + | +-ROS + | +-NATIVE < NTDLL, ntoskrnl, hal.dll, csrss.exe os2.exe psx.exe ... + | | +-DRIVERS < *.SYS + | | +-CONFIG < registry + | +-WIN32 + | | +-SYSTEM < user32.dll kernel32.dll ... + | | +-FONTS + | | +... + | +-OS2 + +OS/2 subsystem for ReactOS + + + + +

OS/2 subsystem for ReactOS (ROS/2)

+

Introduction

+

The OS/2 subsystem is being developed to enable NT-like systems (like WinNT + and ReactOS) to run 32-Bit OS/2 applications natively. With this it shall provide + binary compatiblility on x86-Based systems. It is intended to port the ROS/2 + also to other platforms supported by ReactOS / NT. It is planned to provide + source code compatibility on these platforms. Yeeahh, OS/2 for PowerPC is in + sight.

+

Components

+

ROS/2 consists of the following components:

+
    +
  • OS2SS.EXE - A native application that implements the personality of the + OS/2 kernel.
  • +
  • OS2.EXE - A win32 application that does the interaction of the OS/2 apps + with the desktop.
  • +
  • Core DLLs - These DLLs that make OS/2 programs interface with the kernel/sub + system (i.E. DOSCALLS.DLL).
  • +
  • Additional DLLs - DLLs that provide additional APIs for OS/2 apps. This + includes Presentation Manager.
  • +
+

Current state

+

Up to now just a fragment of DOSCALLS.DLL exists. The biggest problem are the + os2 API headers which are (C) by IBM. So help is still welcome.

+

16-Bit issues

+

It is not intended to support 16-bit OS/2 applications. This would make the + system inconsistent and produce much more work that use. But there is still + one issue: Current textmode applications are either 16-bit or use thunking to + call the 16-bit APIs. These 32-Bit thunking applications have to be supported. + We are still thinking how to accomplish that.

+

32-Bit issues

+

It is planned to replace the current MOU- KBD- MSG- and VIO- subsystems with + the Unicode + Console API. This is also the foundation for other platforms we want to + provide source code compatibility with. So nearly every 32-Bit processor can + be supported. It sould even be possible to implement a 64-bit OS/2 API.

+

Architecture

+

To understand the architecture of ReactOS or WinNT read a book from the "Inside + Windows NT"-series. The architecture of ROS/2 is like every normal subsystem. + When OS2SS.EXE starts, it creates an object directory named os2 and therein + it creates a port object with the name Os2API. A port is something like a socket. + Two programs can comunicate with each other via a port. The port Os2API provides + the LPC API of the OS2SS.EXE - the actual subsystem.
+ Every OS/2 program that is loaded, is linked with DOSCALLS.DLL and NTDLL.DLL + - the interface to the NT-kernel. Since DOSCALLS is implemented using NTDLL.DLL, + every OS/2 app has it in its adress space. Many functions in DOSCALLS.DLL are + implemented by just wrapping NTDLL.DLL functions. Some functions however need + assistance by the subsystem. For this reason the app makes an LPC to OS2SS.EXE. + LPC means local procedure call and it is a very fast version of RPC. Together + with the first application also OS2.EXE starts up. OS2.EXE runs in the win32 + subsystem with the security of the current user. OS2.EXE is used to gather keyboard + and mouse input and to show console windows and PM-windows of all OS/2 programms + of the current user. In order to accomplish this OS2.EXE creates a port object + in the os2 object directory named Os2Interact. OS/2 applications have a connection + to OS2.EXE, too. OS2SS.EXE and OS2.EXE also talk to each other. An OS/2 application + then makes LPCs either to OS2.EXE directly or if required via OS2SS.EXE.

+

Details

+

 

+

LPC Documentation

+ + diff --git a/rossubsys/os2/include/os2.h b/rossubsys/os2/include/os2.h new file mode 100644 index 00000000000..e88838190a3 --- /dev/null +++ b/rossubsys/os2/include/os2.h @@ -0,0 +1,12603 @@ +/* os2emx.h (emx+gcc) */ + +#ifndef _OS2EMX_H +#define _OS2EMX_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#pragma pack(1) + +/* ------------------------ INCL_ SYMBOLS --------------------------------- */ + +#if defined (INCL_BASE) +#define INCL_DOS +#define INCL_DOSERRORS +#define INCL_SUB +#endif + +#if defined (INCL_DOS) +#define INCL_DOSDATETIME +#define INCL_DOSDEVICES +#define INCL_DOSEXCEPTIONS +#define INCL_DOSFILEMGR +#define INCL_DOSMEMMGR +#define INCL_DOSMISC +#define INCL_DOSMVDM +#define INCL_DOSMODULEMGR +#define INCL_DOSNLS +#define INCL_DOSPROCESS +#define INCL_DOSPROFILE +#define INCL_DOSRAS +#define INCL_DOSQUEUES +#define INCL_DOSRESOURCES +#define INCL_DOSSEMAPHORES +#define INCL_DOSSESMGR +#endif + +#if defined (INCL_REXXSAA) +#define INCL_RXSUBCOM +#define INCL_RXSHV +#define INCL_RXFUNC +#define INCL_RXSYSEXIT +#define INCL_RXMACRO +#define INCL_RXARI +#endif + +#if defined (INCL_SUB) +#define INCL_KBD +#define INCL_VIO +#define INCL_MOU +#endif + +#if defined (INCL_PM) +#define INCL_AVIO +#define INCL_FONTFILEFORMAT +#define INCL_GPI +#define INCL_SPL +#define INCL_WIN +#define INCL_WINWORKPLACE +#endif + +#if defined (INCL_WIN) || defined (RC_INVOKED) +#define INCL_WINACCELERATORS +#define INCL_WINBUTTONS +#define INCL_WINDIALOGS +#define INCL_WINENTRYFIELDS +#define INCL_WINFRAMECTLS +#define INCL_WINFRAMEMGR +#define INCL_WINHELP +#define INCL_WININPUT +#define INCL_WINLISTBOXES +#define INCL_WINMENUS +#define INCL_WINMESSAGEMGR +#define INCL_WINMLE +#define INCL_WINPOINTERS +#define INCL_WINSCROLLBARS +#define INCL_WINSTATICS +#define INCL_WINSTDDLGS +#define INCL_WINSYS +#endif /* INCL_WIN || RC_INVOKED */ + +#if defined (INCL_WIN) +#define INCL_WINATOM +#define INCL_WINCLIPBOARD +#define INCL_WINCOUNTRY +#define INCL_WINCURSORS +#define INCL_WINDDE +#define INCL_WINDESKTOP +#define INCL_WINERRORS +#define INCL_WINHOOKS +#define INCL_WINLOAD +#define INCL_WINPALETTE +#define INCL_WINPROGRAMLIST +#define INCL_WINRECTANGLES +#define INCL_WINSHELLDATA +#define INCL_WINSWITCHLIST +#define INCL_WINTHUNKAPI +#define INCL_WINTIMER +#define INCL_WINTRACKRECT +#define INCL_WINTYPES +#define INCL_WINWINDOWMGR +#endif /* INCL_WIN */ + +#if defined (INCL_WINCOMMON) +#define INCL_WINWINDOWMGR +#endif + +#if defined (INCL_WINSTDDLGS) +#define INCL_WINCIRCULARSLIDER +#define INCL_WINSTDBOOK +#define INCL_WINSTDCNR +#define INCL_WINSTDDRAG +#define INCL_WINSTDFILE +#define INCL_WINSTDFONT +#define INCL_WINSTDSLIDER +#define INCL_WINSTDSPIN +#define INCL_WINSTDVALSET +#endif + +#if defined (INCL_WINSTDCNR) || defined (INCL_WINSTDVALSET) +#define INCL_WINSTDDRAG +#endif + +#if defined (INCL_WINMLE) && !defined (INCL_WINENTRYFIELDS) +#define INCL_WINENTRYFIELDS +#endif + +#if defined (INCL_WINWORKPLACE) +#define INCL_WPCLASS +#endif + +#if defined (INCL_GPI) +#define INCL_GPIBITMAPS +#define INCL_GPICONTROL +#define INCL_GPICORRELATION +#define INCL_GPIINK +#define INCL_GPISEGMENTS +#endif + +#if defined (INCL_ERRORS) +#define INCL_DOSERRORS +#define INCL_GPIERRORS +#define INCL_SHLERRORS +#define INCL_WINERRORS +#endif + +#if defined (INCL_DDIDEFS) +#define INCL_GPIBITMAPS +#define INCL_GPIERRORS +#endif + +#if defined (INCL_CIRCULARSLIDER) && !defined (INCL_WINCIRCULARSLIDER) +#define INCL_WINCIRCULARSLIDER +#endif + +/* ------------------------ DISABLE KEYWORDS ------------------------------ */ + +#define APIENTRY +#define EXPENTRY +#define FAR + +/* ------------------------ CONSTANTS AND TYPES --------------------------- */ + +#if !defined (FALSE) +#define FALSE 0 +#endif + +#if !defined (TRUE) +#define TRUE 1 +#endif + +#define VOID void + +#define NULLHANDLE ((LHANDLE)0) +#define NULLSHANDLE ((SHANDLE)0) + +#if !defined (NULL) +#if defined (__cplusplus) +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +typedef int INT; /* Required for Toolkit sample programs */ +typedef unsigned UINT; +typedef unsigned long APIRET; + +typedef unsigned long BOOL; +typedef BOOL *PBOOL; + +typedef unsigned long BOOL32; +typedef BOOL *PBOOL32; + +typedef char CHAR; +typedef CHAR *PCHAR; + +#if !defined (OS2EMX_PLAIN_CHAR) + +typedef unsigned char BYTE; +typedef unsigned char *PCH; +typedef unsigned char *PSZ; +typedef __const__ unsigned char *PCCH; +typedef __const__ unsigned char *PCSZ; + +#else + +typedef char BYTE; +typedef char *PCH; +typedef char *PSZ; +typedef __const__ char *PCCH; +typedef __const__ char *PCSZ; + +#endif + +typedef BYTE *PBYTE; + +typedef unsigned char UCHAR; +typedef UCHAR *PUCHAR; + +typedef short SHORT; +typedef SHORT *PSHORT; + +typedef unsigned short USHORT; +typedef USHORT *PUSHORT; + +typedef long LONG; +typedef LONG *PLONG; + +typedef unsigned long ULONG; +typedef ULONG *PULONG; + +typedef VOID *PVOID; +typedef PVOID *PPVOID; + +typedef __const__ VOID *CPVOID; + +typedef CHAR STR8[8]; +typedef STR8 *PSTR8; + +typedef CHAR STR16[16]; +typedef STR16 *PSTR16; +typedef CHAR STR32[32]; +typedef STR32 *PSTR32; +typedef CHAR STR64[64]; +typedef STR64 *PSTR64; + +typedef unsigned short SHANDLE; +typedef unsigned long LHANDLE; + +typedef LHANDLE HPIPE; +typedef HPIPE *PHPIPE; + +typedef LHANDLE HQUEUE; +typedef HQUEUE *PHQUEUE; + +typedef LHANDLE HMODULE; +typedef HMODULE *PHMODULE; + +typedef VOID *HSEM; +typedef HSEM *PHSEM; + +typedef LHANDLE HOBJECT; + +typedef ULONG PID; +typedef PID *PPID; + +typedef ULONG TID; +typedef TID *PTID; + +typedef int (*PFN)(); +typedef PFN *PPFN; + +typedef USHORT SEL; +typedef SEL *PSEL; + +typedef ULONG HMTX; +typedef HMTX *PHMTX; + +typedef ULONG HMUX; +typedef HMUX *PHMUX; + + +#define FIELDOFFSET(t,f) ((SHORT)&(((t *)0)->f)) + +#define MAKETYPE(v,t) (*((t *)&v)) + +#define MAKEUSHORT(l,h) (((USHORT)(l)) | ((USHORT)(h))<<8) +#define MAKESHORT(l,h) ((SHORT)MAKEUSHORT(l, h)) + +#define MAKEULONG(l,h) ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h)))<<16)) +#define MAKELONG(l,h) ((LONG)MAKEULONG(l, h)) + +#define LOUCHAR(w) ((UCHAR)(w)) +#define HIUCHAR(w) ((UCHAR)((USHORT)(w)>>8)) + +#define LOBYTE(x) LOUCHAR(x) +#define HIBYTE(x) HIUCHAR(x) + +#define LOUSHORT(x) ((USHORT)((ULONG)(x))) +#define HIUSHORT(x) ((USHORT)((ULONG)(x)>>16)) + +/* ---------------------------- ERROR CODES ------------------------------- */ + +#define WINERR_BASE 0x1000 +#define GPIERR_BASE 0x2000 +#define DEVERR_BASE 0x3000 +#define SPLERR_BASE 0x4000 + +#define SEVERITY_NOERROR 0x0000 +#define SEVERITY_WARNING 0x0004 +#define SEVERITY_ERROR 0x0008 +#define SEVERITY_SEVERE 0x000c +#define SEVERITY_UNRECOVERABLE 0x0010 + +#if defined (INCL_DOSERRORS) + +#define NO_ERROR 0 +#define ERROR_INVALID_FUNCTION 1 +#define ERROR_FILE_NOT_FOUND 2 +#define ERROR_PATH_NOT_FOUND 3 +#define ERROR_TOO_MANY_OPEN_FILES 4 +#define ERROR_ACCESS_DENIED 5 +#define ERROR_INVALID_HANDLE 6 +#define ERROR_ARENA_TRASHED 7 +#define ERROR_NOT_ENOUGH_MEMORY 8 +#define ERROR_INVALID_BLOCK 9 +#define ERROR_BAD_ENVIRONMENT 10 +#define ERROR_BAD_FORMAT 11 +#define ERROR_INVALID_ACCESS 12 +#define ERROR_INVALID_DATA 13 +#define ERROR_INVALID_DRIVE 15 +#define ERROR_CURRENT_DIRECTORY 16 +#define ERROR_NOT_SAME_DEVICE 17 +#define ERROR_NO_MORE_FILES 18 +#define ERROR_WRITE_PROTECT 19 +#define ERROR_BAD_UNIT 20 +#define ERROR_NOT_READY 21 +#define ERROR_BAD_COMMAND 22 +#define ERROR_CRC 23 +#define ERROR_BAD_LENGTH 24 +#define ERROR_SEEK 25 +#define ERROR_NOT_DOS_DISK 26 +#define ERROR_SECTOR_NOT_FOUND 27 +#define ERROR_OUT_OF_PAPER 28 +#define ERROR_WRITE_FAULT 29 +#define ERROR_READ_FAULT 30 +#define ERROR_GEN_FAILURE 31 +#define ERROR_SHARING_VIOLATION 32 +#define ERROR_LOCK_VIOLATION 33 +#define ERROR_WRONG_DISK 34 +#define ERROR_FCB_UNAVAILABLE 35 +#define ERROR_SHARING_BUFFER_EXCEEDED 36 +#define ERROR_CODE_PAGE_MISMATCHED 37 +#define ERROR_HANDLE_EOF 38 +#define ERROR_HANDLE_DISK_FULL 39 +#define ERROR_NOT_SUPPORTED 50 +#define ERROR_REM_NOT_LIST 51 +#define ERROR_DUP_NAME 52 +#define ERROR_BAD_NETPATH 53 +#define ERROR_NETWORK_BUSY 54 +#define ERROR_DEV_NOT_EXIST 55 +#define ERROR_TOO_MANY_CMDS 56 +#define ERROR_ADAP_HDW_ERR 57 +#define ERROR_BAD_NET_RESP 58 +#define ERROR_UNEXP_NET_ERR 59 +#define ERROR_BAD_REM_ADAP 60 +#define ERROR_PRINTQ_FULL 61 +#define ERROR_NO_SPOOL_SPACE 62 +#define ERROR_PRINT_CANCELLED 63 +#define ERROR_NETNAME_DELETED 64 +#define ERROR_NETWORK_ACCESS_DENIED 65 +#define ERROR_BAD_DEV_TYPE 66 +#define ERROR_BAD_NET_NAME 67 +#define ERROR_TOO_MANY_NAMES 68 +#define ERROR_TOO_MANY_SESS 69 +#define ERROR_SHARING_PAUSED 70 +#define ERROR_REQ_NOT_ACCEP 71 +#define ERROR_REDIR_PAUSED 72 +#define ERROR_SBCS_ATT_WRITE_PROT 73 +#define ERROR_SBCS_GENERAL_FAILURE 74 +#define ERROR_XGA_OUT_MEMORY 75 +#define ERROR_FILE_EXISTS 80 +#define ERROR_DUP_FCB 81 +#define ERROR_CANNOT_MAKE 82 +#define ERROR_FAIL_I24 83 +#define ERROR_OUT_OF_STRUCTURES 84 +#define ERROR_ALREADY_ASSIGNED 85 +#define ERROR_INVALID_PASSWORD 86 +#define ERROR_INVALID_PARAMETER 87 +#define ERROR_NET_WRITE_FAULT 88 +#define ERROR_NO_PROC_SLOTS 89 +#define ERROR_NOT_FROZEN 90 +#define ERROR_SYS_COMP_NOT_LOADED 90 /*!*/ +#define ERR_TSTOVFL 91 +#define ERR_TSTDUP 92 +#define ERROR_NO_ITEMS 93 +#define ERROR_INTERRUPT 95 +#define ERROR_DEVICE_IN_USE 99 +#define ERROR_TOO_MANY_SEMAPHORES 100 +#define ERROR_EXCL_SEM_ALREADY_OWNED 101 +#define ERROR_SEM_IS_SET 102 +#define ERROR_TOO_MANY_SEM_REQUESTS 103 +#define ERROR_INVALID_AT_INTERRUPT_TIME 104 +#define ERROR_SEM_OWNER_DIED 105 +#define ERROR_SEM_USER_LIMIT 106 +#define ERROR_DISK_CHANGE 107 +#define ERROR_DRIVE_LOCKED 108 +#define ERROR_BROKEN_PIPE 109 +#define ERROR_OPEN_FAILED 110 +#define ERROR_BUFFER_OVERFLOW 111 +#define ERROR_DISK_FULL 112 +#define ERROR_NO_MORE_SEARCH_HANDLES 113 +#define ERROR_INVALID_TARGET_HANDLE 114 +#define ERROR_PROTECTION_VIOLATION 115 +#define ERROR_VIOKBD_REQUEST 116 +#define ERROR_INVALID_CATEGORY 117 +#define ERROR_INVALID_VERIFY_SWITCH 118 +#define ERROR_BAD_DRIVER_LEVEL 119 +#define ERROR_CALL_NOT_IMPLEMENTED 120 +#define ERROR_SEM_TIMEOUT 121 +#define ERROR_INSUFFICIENT_BUFFER 122 +#define ERROR_INVALID_NAME 123 +#define ERROR_INVALID_LEVEL 124 +#define ERROR_NO_VOLUME_LABEL 125 +#define ERROR_MOD_NOT_FOUND 126 +#define ERROR_PROC_NOT_FOUND 127 +#define ERROR_WAIT_NO_CHILDREN 128 +#define ERROR_CHILD_NOT_COMPLETE 129 +#define ERROR_DIRECT_ACCESS_HANDLE 130 +#define ERROR_NEGATIVE_SEEK 131 +#define ERROR_SEEK_ON_DEVICE 132 +#define ERROR_IS_JOIN_TARGET 133 +#define ERROR_IS_JOINED 134 +#define ERROR_IS_SUBSTED 135 +#define ERROR_NOT_JOINED 136 +#define ERROR_NOT_SUBSTED 137 +#define ERROR_JOIN_TO_JOIN 138 +#define ERROR_SUBST_TO_SUBST 139 +#define ERROR_JOIN_TO_SUBST 140 +#define ERROR_SUBST_TO_JOIN 141 +#define ERROR_BUSY_DRIVE 142 +#define ERROR_SAME_DRIVE 143 +#define ERROR_DIR_NOT_ROOT 144 +#define ERROR_DIR_NOT_EMPTY 145 +#define ERROR_IS_SUBST_PATH 146 +#define ERROR_IS_JOIN_PATH 147 +#define ERROR_PATH_BUSY 148 +#define ERROR_IS_SUBST_TARGET 149 +#define ERROR_SYSTEM_TRACE 150 +#define ERROR_INVALID_EVENT_COUNT 151 +#define ERROR_TOO_MANY_MUXWAITERS 152 +#define ERROR_INVALID_LIST_FORMAT 153 +#define ERROR_LABEL_TOO_LONG 154 +#define ERROR_TOO_MANY_TCBS 155 +#define ERROR_SIGNAL_REFUSED 156 +#define ERROR_DISCARDED 157 +#define ERROR_NOT_LOCKED 158 +#define ERROR_BAD_THREADID_ADDR 159 +#define ERROR_BAD_ARGUMENTS 160 +#define ERROR_BAD_PATHNAME 161 +#define ERROR_SIGNAL_PENDING 162 +#define ERROR_UNCERTAIN_MEDIA 163 +#define ERROR_MAX_THRDS_REACHED 164 +#define ERROR_MONITORS_NOT_SUPPORTED 165 +#define ERROR_UNC_DRIVER_NOT_INSTALLED 166 +#define ERROR_LOCK_FAILED 167 +#define ERROR_SWAPIO_FAILED 168 +#define ERROR_SWAPIN_FAILED 169 +#define ERROR_BUSY 170 +#define ERROR_CANCEL_VIOLATION 173 +#define ERROR_ATOMIC_LOCK_NOT_SUPPORTED 174 +#define ERROR_READ_LOCKS_NOT_SUPPORTED 175 +#define ERROR_INVALID_SEGMENT_NUMBER 180 +#define ERROR_INVALID_CALLGATE 181 +#define ERROR_INVALID_ORDINAL 182 +#define ERROR_ALREADY_EXISTS 183 +#define ERROR_NO_CHILD_PROCESS 184 +#define ERROR_CHILD_ALIVE_NOWAIT 185 +#define ERROR_INVALID_FLAG_NUMBER 186 +#define ERROR_SEM_NOT_FOUND 187 +#define ERROR_INVALID_STARTING_CODESEG 188 +#define ERROR_INVALID_STACKSEG 189 +#define ERROR_INVALID_MODULETYPE 190 +#define ERROR_INVALID_EXE_SIGNATURE 191 +#define ERROR_EXE_MARKED_INVALID 192 +#define ERROR_BAD_EXE_FORMAT 193 +#define ERROR_ITERATED_DATA_EXCEEDS_64K 194 +#define ERROR_INVALID_MINALLOCSIZE 195 +#define ERROR_DYNLINK_FROM_INVALID_RING 196 +#define ERROR_IOPL_NOT_ENABLED 197 +#define ERROR_INVALID_SEGDPL 198 +#define ERROR_AUTODATASEG_EXCEEDS_64K 199 +#define ERROR_RING2SEG_MUST_BE_MOVABLE 200 +#define ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT 201 +#define ERROR_INFLOOP_IN_RELOC_CHAIN 202 +#define ERROR_ENVVAR_NOT_FOUND 203 +#define ERROR_NOT_CURRENT_CTRY 204 +#define ERROR_NO_SIGNAL_SENT 205 +#define ERROR_FILENAME_EXCED_RANGE 206 +#define ERROR_RING2_STACK_IN_USE 207 +#define ERROR_META_EXPANSION_TOO_LONG 208 +#define ERROR_INVALID_SIGNAL_NUMBER 209 +#define ERROR_THREAD_1_INACTIVE 210 +#define ERROR_INFO_NOT_AVAIL 211 +#define ERROR_LOCKED 212 +#define ERROR_BAD_DYNALINK 213 +#define ERROR_TOO_MANY_MODULES 214 +#define ERROR_NESTING_NOT_ALLOWED 215 +#define ERROR_CANNOT_SHRINK 216 +#define ERROR_ZOMBIE_PROCESS 217 +#define ERROR_STACK_IN_HIGH_MEMORY 218 +#define ERROR_INVALID_EXITROUTINE_RING 219 +#define ERROR_GETBUF_FAILED 220 +#define ERROR_FLUSHBUF_FAILED 221 +#define ERROR_TRANSFER_TOO_LONG 222 +#define ERROR_FORCENOSWAP_FAILED 223 +#define ERROR_SMG_NO_TARGET_WINDOW 224 +#define ERROR_NO_CHILDREN 228 +#define ERROR_INVALID_SCREEN_GROUP 229 +#define ERROR_BAD_PIPE 230 +#define ERROR_PIPE_BUSY 231 +#define ERROR_NO_DATA 232 +#define ERROR_PIPE_NOT_CONNECTED 233 +#define ERROR_MORE_DATA 234 +#define ERROR_VC_DISCONNECTED 240 +#define ERROR_CIRCULARITY_REQUESTED 250 +#define ERROR_DIRECTORY_IN_CDS 251 +#define ERROR_INVALID_FSD_NAME 252 +#define ERROR_INVALID_PATH 253 +#define ERROR_INVALID_EA_NAME 254 +#define ERROR_EA_LIST_INCONSISTENT 255 +#define ERROR_EA_LIST_TOO_LONG 256 +#define ERROR_NO_META_MATCH 257 +#define ERROR_FINDNOTIFY_TIMEOUT 258 +#define ERROR_NO_MORE_ITEMS 259 +#define ERROR_SEARCH_STRUC_REUSED 260 +#define ERROR_CHAR_NOT_FOUND 261 +#define ERROR_TOO_MUCH_STACK 262 +#define ERROR_INVALID_ATTR 263 +#define ERROR_INVALID_STARTING_RING 264 +#define ERROR_INVALID_DLL_INIT_RING 265 +#define ERROR_CANNOT_COPY 266 +#define ERROR_DIRECTORY 267 +#define ERROR_OPLOCKED_FILE 268 +#define ERROR_OPLOCK_THREAD_EXISTS 269 +#define ERROR_VOLUME_CHANGED 270 +#define ERROR_FINDNOTIFY_HANDLE_IN_USE 271 +#define ERROR_FINDNOTIFY_HANDLE_CLOSED 272 +#define ERROR_NOTIFY_OBJECT_REMOVED 273 +#define ERROR_ALREADY_SHUTDOWN 274 +#define ERROR_EAS_DIDNT_FIT 275 +#define ERROR_EA_FILE_CORRUPT 276 +#define ERROR_EA_TABLE_FULL 277 +#define ERROR_INVALID_EA_HANDLE 278 +#define ERROR_NO_CLUSTER 279 +#define ERROR_CREATE_EA_FILE 280 +#define ERROR_CANNOT_OPEN_EA_FILE 281 +#define ERROR_EAS_NOT_SUPPORTED 282 +#define ERROR_NEED_EAS_FOUND 283 +#define ERROR_DUPLICATE_HANDLE 284 +#define ERROR_DUPLICATE_NAME 285 +#define ERROR_EMPTY_MUXWAIT 286 +#define ERROR_MUTEX_OWNED 287 +#define ERROR_NOT_OWNER 288 +#define ERROR_PARAM_TOO_SMALL 289 +#define ERROR_TOO_MANY_HANDLES 290 +#define ERROR_TOO_MANY_OPENS 291 +#define ERROR_WRONG_TYPE 292 +#define ERROR_UNUSED_CODE 293 +#define ERROR_THREAD_NOT_TERMINATED 294 +#define ERROR_INIT_ROUTINE_FAILED 295 +#define ERROR_MODULE_IN_USE 296 +#define ERROR_NOT_ENOUGH_WATCHPOINTS 297 +#define ERROR_TOO_MANY_POSTS 298 +#define ERROR_ALREADY_POSTED 299 +#define ERROR_ALREADY_RESET 300 +#define ERROR_SEM_BUSY 301 +#define ERROR_INVALID_PROCID 303 +#define ERROR_INVALID_PDELTA 304 +#define ERROR_NOT_DESCENDANT 305 +#define ERROR_NOT_SESSION_MANAGER 306 +#define ERROR_INVALID_PCLASS 307 +#define ERROR_INVALID_SCOPE 308 +#define ERROR_INVALID_THREADID 309 +#define ERROR_DOSSUB_SHRINK 310 +#define ERROR_DOSSUB_NOMEM 311 +#define ERROR_DOSSUB_OVERLAP 312 +#define ERROR_DOSSUB_BADSIZE 313 +#define ERROR_DOSSUB_BADFLAG 314 +#define ERROR_DOSSUB_BADSELECTOR 315 +#define ERROR_MR_MSG_TOO_LONG 316 +#define ERROR_MR_MID_NOT_FOUND 317 +#define ERROR_MR_UN_ACC_MSGF 318 +#define ERROR_MR_INV_MSGF_FORMAT 319 +#define ERROR_MR_INV_IVCOUNT 320 +#define ERROR_MR_UN_PERFORM 321 +#define ERROR_TS_WAKEUP 322 +#define ERROR_TS_SEMHANDLE 323 +#define ERROR_TS_NOTIMER 324 +#define ERROR_TS_HANDLE 326 +#define ERROR_TS_DATETIME 327 +#define ERROR_SYS_INTERNAL 328 +#define ERROR_QUE_CURRENT_NAME 329 +#define ERROR_QUE_PROC_NOT_OWNED 330 +#define ERROR_QUE_PROC_OWNED 331 +#define ERROR_QUE_DUPLICATE 332 +#define ERROR_QUE_ELEMENT_NOT_EXIST 333 +#define ERROR_QUE_NO_MEMORY 334 +#define ERROR_QUE_INVALID_NAME 335 +#define ERROR_QUE_INVALID_PRIORITY 336 +#define ERROR_QUE_INVALID_HANDLE 337 +#define ERROR_QUE_LINK_NOT_FOUND 338 +#define ERROR_QUE_MEMORY_ERROR 339 +#define ERROR_QUE_PREV_AT_END 340 +#define ERROR_QUE_PROC_NO_ACCESS 341 +#define ERROR_QUE_EMPTY 342 +#define ERROR_QUE_NAME_NOT_EXIST 343 +#define ERROR_QUE_NOT_INITIALIZED 344 +#define ERROR_QUE_UNABLE_TO_ACCESS 345 +#define ERROR_QUE_UNABLE_TO_ADD 346 +#define ERROR_QUE_UNABLE_TO_INIT 347 +#define ERROR_VIO_INVALID_MASK 349 +#define ERROR_VIO_PTR 350 +#define ERROR_VIO_APTR 351 +#define ERROR_VIO_RPTR 352 +#define ERROR_VIO_CPTR 353 +#define ERROR_VIO_LPTR 354 +#define ERROR_VIO_MODE 355 +#define ERROR_VIO_WIDTH 356 +#define ERROR_VIO_ATTR 357 +#define ERROR_VIO_ROW 358 +#define ERROR_VIO_COL 359 +#define ERROR_VIO_TOPROW 360 +#define ERROR_VIO_BOTROW 361 +#define ERROR_VIO_RIGHTCOL 362 +#define ERROR_VIO_LEFTCOL 363 +#define ERROR_SCS_CALL 364 +#define ERROR_SCS_VALUE 365 +#define ERROR_VIO_WAIT_FLAG 366 +#define ERROR_VIO_UNLOCK 367 +#define ERROR_SGS_NOT_SESSION_MGR 368 +#define ERROR_SMG_INVALID_SGID 369 +#define ERROR_SMG_INVALID_SESSION_ID 369 /*!*/ +#define ERROR_SMG_NOSG 370 +#define ERROR_SMG_NO_SESSIONS 370 /*!*/ +#define ERROR_SMG_GRP_NOT_FOUND 371 +#define ERROR_SMG_SESSION_NOT_FOUND 371 /*!*/ +#define ERROR_SMG_SET_TITLE 372 +#define ERROR_KBD_PARAMETER 373 +#define ERROR_KBD_NO_DEVICE 374 +#define ERROR_KBD_INVALID_IOWAIT 375 +#define ERROR_KBD_INVALID_LENGTH 376 +#define ERROR_KBD_INVALID_ECHO_MASK 377 +#define ERROR_KBD_INVALID_INPUT_MASK 378 +#define ERROR_MON_INVALID_PARMS 379 +#define ERROR_MON_INVALID_DEVNAME 380 +#define ERROR_MON_INVALID_HANDLE 381 +#define ERROR_MON_BUFFER_TOO_SMALL 382 +#define ERROR_MON_BUFFER_EMPTY 383 +#define ERROR_MON_DATA_TOO_LARGE 384 +#define ERROR_MOUSE_NO_DEVICE 385 +#define ERROR_MOUSE_INV_HANDLE 386 +#define ERROR_MOUSE_INV_PARMS 387 +#define ERROR_MOUSE_CANT_RESET 388 +#define ERROR_MOUSE_DISPLAY_PARMS 389 +#define ERROR_MOUSE_INV_MODULE 390 +#define ERROR_MOUSE_INV_ENTRY_PT 391 +#define ERROR_MOUSE_INV_MASK 392 +#define NO_ERROR_MOUSE_NO_DATA 393 +#define NO_ERROR_MOUSE_PTR_DRAWN 394 +#define ERROR_INVALID_FREQUENCY 395 +#define ERROR_NLS_NO_COUNTRY_FILE 396 +#define ERROR_NLS_OPEN_FAILED 397 +#define ERROR_NLS_NO_CTRY_CODE 398 +#define ERROR_NLS_TABLE_TRUNCATED 399 +#define ERROR_NLS_BAD_TYPE 400 +#define ERROR_NLS_TYPE_NOT_FOUND 401 +#define ERROR_VIO_SMG_ONLY 402 +#define ERROR_VIO_INVALID_ASCIIZ 403 +#define ERROR_VIO_DEREGISTER 404 +#define ERROR_VIO_NO_POPUP 405 +#define ERROR_VIO_EXISTING_POPUP 406 +#define ERROR_KBD_SMG_ONLY 407 +#define ERROR_KBD_INVALID_ASCIIZ 408 +#define ERROR_KBD_INVALID_MASK 409 +#define ERROR_KBD_REGISTER 410 +#define ERROR_KBD_DEREGISTER 411 +#define ERROR_MOUSE_SMG_ONLY 412 +#define ERROR_MOUSE_INVALID_ASCIIZ 413 +#define ERROR_MOUSE_INVALID_MASK 414 +#define ERROR_MOUSE_REGISTER 415 +#define ERROR_MOUSE_DEREGISTER 416 +#define ERROR_SMG_BAD_ACTION 417 +#define ERROR_SMG_INVALID_CALL 418 +#define ERROR_SCS_SG_NOTFOUND 419 +#define ERROR_SCS_NOT_SHELL 420 +#define ERROR_VIO_INVALID_PARMS 421 +#define ERROR_VIO_FUNCTION_OWNED 422 +#define ERROR_VIO_RETURN 423 +#define ERROR_SCS_INVALID_FUNCTION 424 +#define ERROR_SCS_NOT_SESSION_MGR 425 +#define ERROR_VIO_REGISTER 426 +#define ERROR_VIO_NO_MODE_THREAD 427 +#define ERROR_VIO_NO_SAVE_RESTORE_THD 428 +#define ERROR_VIO_IN_BG 429 +#define ERROR_VIO_ILLEGAL_DURING_POPUP 430 +#define ERROR_SMG_NOT_BASESHELL 431 +#define ERROR_SMG_BAD_STATUSREQ 432 +#define ERROR_QUE_INVALID_WAIT 433 +#define ERROR_VIO_LOCK 434 +#define ERROR_MOUSE_INVALID_IOWAIT 435 +#define ERROR_VIO_INVALID_HANDLE 436 +#define ERROR_VIO_ILLEGAL_DURING_LOCK 437 +#define ERROR_VIO_INVALID_LENGTH 438 +#define ERROR_KBD_INVALID_HANDLE 439 +#define ERROR_KBD_NO_MORE_HANDLE 440 +#define ERROR_KBD_CANNOT_CREATE_KCB 441 +#define ERROR_KBD_CODEPAGE_LOAD_INCOMPL 442 +#define ERROR_KBD_INVALID_CODEPAGE_ID 443 +#define ERROR_KBD_NO_CODEPAGE_SUPPORT 444 +#define ERROR_KBD_FOCUS_REQUIRED 445 +#define ERROR_KBD_FOCUS_ALREADY_ACTIVE 446 +#define ERROR_KBD_KEYBOARD_BUSY 447 +#define ERROR_KBD_INVALID_CODEPAGE 448 +#define ERROR_KBD_UNABLE_TO_FOCUS 449 +#define ERROR_SMG_SESSION_NON_SELECT 450 +#define ERROR_SMG_SESSION_NOT_FOREGRND 451 +#define ERROR_SMG_SESSION_NOT_PARENT 452 +#define ERROR_SMG_INVALID_START_MODE 453 +#define ERROR_SMG_INVALID_RELATED_OPT 454 +#define ERROR_SMG_INVALID_BOND_OPTION 455 +#define ERROR_SMG_INVALID_SELECT_OPT 456 +#define ERROR_SMG_START_IN_BACKGROUND 457 +#define ERROR_SMG_INVALID_STOP_OPTION 458 +#define ERROR_SMG_BAD_RESERVE 459 +#define ERROR_SMG_PROCESS_NOT_PARENT 460 +#define ERROR_SMG_INVALID_DATA_LENGTH 461 +#define ERROR_SMG_NOT_BOUND 462 +#define ERROR_SMG_RETRY_SUB_ALLOC 463 +#define ERROR_KBD_DETACHED 464 +#define ERROR_VIO_DETACHED 465 +#define ERROR_MOU_DETACHED 466 +#define ERROR_VIO_FONT 467 +#define ERROR_VIO_USER_FONT 468 +#define ERROR_VIO_BAD_CP 469 +#define ERROR_VIO_NO_CP 470 +#define ERROR_VIO_NA_CP 471 +#define ERROR_INVALID_CODE_PAGE 472 +#define ERROR_CPLIST_TOO_SMALL 473 +#define ERROR_CP_NOT_MOVED 474 +#define ERROR_MODE_SWITCH_INIT 475 +#define ERROR_CODE_PAGE_NOT_FOUND 476 +#define ERROR_UNEXPECTED_SLOT_RETURNED 477 +#define ERROR_SMG_INVALID_TRACE_OPTION 478 +#define ERROR_VIO_INTERNAL_RESOURCE 479 +#define ERROR_VIO_SHELL_INIT 480 +#define ERROR_SMG_NO_HARD_ERRORS 481 +#define ERROR_CP_SWITCH_INCOMPLETE 482 +#define ERROR_VIO_TRANSPARENT_POPUP 483 +#define ERROR_CRITSEC_OVERFLOW 484 +#define ERROR_CRITSEC_UNDERFLOW 485 +#define ERROR_VIO_BAD_RESERVE 486 +#define ERROR_INVALID_ADDRESS 487 +#define ERROR_ZERO_SELECTORS_REQUESTED 488 +#define ERROR_NOT_ENOUGH_SELECTORS_AVA 489 +#define ERROR_INVALID_SELECTOR 490 +#define ERROR_SMG_INVALID_PROGRAM_TYPE 491 +#define ERROR_SMG_INVALID_PGM_CONTROL 492 +#define ERROR_SMG_INVALID_INHERIT_OPT 493 +#define ERROR_VIO_EXTENDED_SG 494 +#define ERROR_VIO_NOT_PRES_MGR_SG 495 +#define ERROR_VIO_SHIELD_OWNED 496 +#define ERROR_VIO_NO_MORE_HANDLES 497 +#define ERROR_VIO_SEE_ERROR_LOG 498 +#define ERROR_VIO_ASSOCIATED_DC 499 +#define ERROR_KBD_NO_CONSOLE 500 +#define ERROR_MOUSE_NO_CONSOLE 501 +#define ERROR_MOUSE_INVALID_HANDLE 502 +#define ERROR_SMG_INVALID_DEBUG_PARMS 503 +#define ERROR_KBD_EXTENDED_SG 504 +#define ERROR_MOU_EXTENDED_SG 505 +#define ERROR_SMG_INVALID_ICON_FILE 506 +#define ERROR_TRC_PID_NON_EXISTENT 507 +#define ERROR_TRC_COUNT_ACTIVE 508 +#define ERROR_TRC_SUSPENDED_BY_COUNT 509 +#define ERROR_TRC_COUNT_INACTIVE 510 +#define ERROR_TRC_COUNT_REACHED 511 +#define ERROR_NO_MC_TRACE 512 +#define ERROR_MC_TRACE 513 +#define ERROR_TRC_COUNT_ZERO 514 +#define ERROR_SMG_TOO_MANY_DDS 515 +#define ERROR_SMG_INVALID_NOTIFICATION 516 +#define ERROR_LF_INVALID_FUNCTION 517 +#define ERROR_LF_NOT_AVAIL 518 +#define ERROR_LF_SUSPENDED 519 +#define ERROR_LF_BUF_TOO_SMALL 520 +#define ERROR_LF_BUFFER_CORRUPTED 521 +#define ERROR_LF_BUFFER_FULL 521 /*!*/ +#define ERROR_LF_INVALID_DAEMON 522 +#define ERROR_LF_INVALID_RECORD 522 /*!*/ +#define ERROR_LF_INVALID_TEMPL 523 +#define ERROR_LF_INVALID_SERVICE 523 /*!*/ +#define ERROR_LF_GENERAL_FAILURE 524 +#define ERROR_LF_INVALID_ID 525 +#define ERROR_LF_INVALID_HANDLE 526 +#define ERROR_LF_NO_ID_AVAIL 527 +#define ERROR_LF_TEMPLATE_AREA_FULL 528 +#define ERROR_LF_ID_IN_USE 529 +#define ERROR_MOU_NOT_INITIALIZED 530 +#define ERROR_MOUINITREAL_DONE 531 +#define ERROR_DOSSUB_CORRUPTED 532 +#define ERROR_MOUSE_CALLER_NOT_SUBSYS 533 +#define ERROR_ARITHMETIC_OVERFLOW 534 +#define ERROR_TMR_NO_DEVICE 535 +#define ERROR_TMR_INVALID_TIME 536 +#define ERROR_PVW_INVALID_ENTITY 537 +#define ERROR_PVW_INVALID_ENTITY_TYPE 538 +#define ERROR_PVW_INVALID_SPEC 539 +#define ERROR_PVW_INVALID_RANGE_TYPE 540 +#define ERROR_PVW_INVALID_COUNTER_BLK 541 +#define ERROR_PVW_INVALID_TEXT_BLK 542 +#define ERROR_PRF_NOT_INITIALIZED 543 +#define ERROR_PRF_ALREADY_INITIALIZED 544 +#define ERROR_PRF_NOT_STARTED 545 +#define ERROR_PRF_ALREADY_STARTED 546 +#define ERROR_PRF_TIMER_OUT_OF_RANGE 547 +#define ERROR_PRF_TIMER_RESET 548 +#define ERROR_VDD_LOCK_USEAGE_DENIED 639 +#define ERROR_TIMEOUT 640 +#define ERROR_VDM_DOWN 641 +#define ERROR_VDM_LIMIT 642 +#define ERROR_VDD_NOT_FOUND 643 +#define ERROR_INVALID_CALLER 644 +#define ERROR_PID_MISMATCH 645 +#define ERROR_INVALID_VDD_HANDLE 646 +#define ERROR_VLPT_NO_SPOOLER 647 +#define ERROR_VCOM_DEVICE_BUSY 648 +#define ERROR_VLPT_DEVICE_BUSY 649 +#define ERROR_NESTING_TOO_DEEP 650 +#define ERROR_VDD_MISSING 651 +#define ERROR_BIDI_INVALID_LENGTH 671 +#define ERROR_BIDI_INVALID_INCREMENT 672 +#define ERROR_BIDI_INVALID_COMBINATION 673 +#define ERROR_BIDI_INVALID_RESERVED 674 +#define ERROR_BIDI_INVALID_EFFECT 675 +#define ERROR_BIDI_INVALID_CSDREC 676 +#define ERROR_BIDI_INVALID_CSDSTATE 677 +#define ERROR_BIDI_INVALID_LEVEL 678 +#define ERROR_BIDI_INVALID_TYPE_SUPPORT 679 +#define ERROR_BIDI_INVALID_ORIENTATION 680 +#define ERROR_BIDI_INVALID_NUM_SHAPE 681 +#define ERROR_BIDI_INVALID_CSD 682 +#define ERROR_BIDI_NO_SUPPORT 683 +#define NO_ERROR_BIDI_RW_INCOMPLETE 684 +#define ERROR_IMP_INVALID_PARM 691 +#define ERROR_IMP_INVALID_LENGTH 692 +#define ERROR_MON_BAD_BUFFER 730 +#define ERROR_MODULE_CORRUPTED 731 +#define ERROR_SM_OUTOF_SWAPFILE 1477 +#define ERROR_LF_TIMEOUT 2055 +#define ERROR_LF_SUSPEND_SUCCESS 2057 +#define ERROR_LF_RESUME_SUCCESS 2058 +#define ERROR_LF_REDIRECT_SUCCESS 2059 +#define ERROR_LF_REDIRECT_FAILURE 2060 +#define ERROR_SWAPPER_NOT_ACTIVE 32768 +#define ERROR_INVALID_SWAPID 32769 +#define ERROR_IOERR_SWAP_FILE 32770 +#define ERROR_SWAP_TABLE_FULL 32771 +#define ERROR_SWAP_FILE_FULL 32772 +#define ERROR_CANT_INIT_SWAPPER 32773 +#define ERROR_SWAPPER_ALREADY_INIT 32774 +#define ERROR_PMM_INSUFFICIENT_MEMORY 32775 +#define ERROR_PMM_INVALID_FLAGS 32776 +#define ERROR_PMM_INVALID_ADDRESS 32777 +#define ERROR_PMM_LOCK_FAILED 32778 +#define ERROR_PMM_UNLOCK_FAILED 32779 +#define ERROR_PMM_MOVE_INCOMPLETE 32780 +#define ERROR_UCOM_DRIVE_RENAMED 32781 +#define ERROR_UCOM_FILENAME_TRUNCATED 32782 +#define ERROR_UCOM_BUFFER_LENGTH 32783 +#define ERROR_MON_CHAIN_HANDLE 32784 +#define ERROR_MON_NOT_REGISTERED 32785 +#define ERROR_SMG_ALREADY_TOP 32786 +#define ERROR_PMM_ARENA_MODIFIED 32787 +#define ERROR_SMG_PRINTER_OPEN 32788 +#define ERROR_PMM_SET_FLAGS_FAILED 32789 +#define ERROR_INVALID_DOS_DD 32790 +#define ERROR_BLOCKED 32791 +#define ERROR_NOBLOCK 32792 +#define ERROR_INSTANCE_SHARED 32793 +#define ERROR_NO_OBJECT 32794 +#define ERROR_PARTIAL_ATTACH 32795 +#define ERROR_INCACHE 32796 +#define ERROR_SWAP_IO_PROBLEMS 32797 +#define ERROR_CROSSES_OBJECT_BOUNDARY 32798 +#define ERROR_LONGLOCK 32799 +#define ERROR_SHORTLOCK 32800 +#define ERROR_UVIRTLOCK 32801 +#define ERROR_ALIASLOCK 32802 +#define ERROR_ALIAS 32803 +#define ERROR_NO_MORE_HANDLES 32804 +#define ERROR_SCAN_TERMINATED 32805 +#define ERROR_TERMINATOR_NOT_FOUND 32806 +#define ERROR_NOT_DIRECT_CHILD 32807 +#define ERROR_DELAY_FREE 32808 +#define ERROR_GUARDPAGE 32809 +#define ERROR_SWAPERROR 32900 +#define ERROR_LDRERROR 32901 +#define ERROR_NOMEMORY 32902 +#define ERROR_NOACCESS 32903 +#define ERROR_NO_DLL_TERM 32904 +#define ERROR_CPSIO_CODE_PAGE_INVALID 65026 +#define ERROR_CPSIO_NO_SPOOLER 65027 +#define ERROR_CPSIO_FONT_ID_INVALID 65028 +#define ERROR_CPSIO_INTERNAL_ERROR 65033 +#define ERROR_CPSIO_INVALID_PTR_NAME 65034 +#define ERROR_CPSIO_NOT_ACTIVE 65037 +#define ERROR_CPSIO_PID_FULL 65039 +#define ERROR_CPSIO_PID_NOT_FOUND 65040 +#define ERROR_CPSIO_READ_CTL_SEQ 65043 +#define ERROR_CPSIO_READ_FNT_DEF 65045 +#define ERROR_CPSIO_WRITE_ERROR 65047 +#define ERROR_CPSIO_WRITE_FULL_ERROR 65048 +#define ERROR_CPSIO_WRITE_HANDLE_BAD 65049 +#define ERROR_CPSIO_SWIT_LOAD 65074 +#define ERROR_CPSIO_INV_COMMAND 65077 +#define ERROR_CPSIO_NO_FONT_SWIT 65078 +#define ERROR_ENTRY_IS_CALLGATE 65079 + +#endif /* INCL_DOSERRORS */ + +/* ----------------------------- ERRORS ----------------------------------- */ + +#if defined (INCL_DOSERRORS) + +#define ERRACT_RETRY 1 +#define ERRACT_DLYRET 2 +#define ERRACT_USER 3 +#define ERRACT_ABORT 4 +#define ERRACT_PANIC 5 +#define ERRACT_IGNORE 6 +#define ERRACT_INTRET 7 + +#define ERRCLASS_OUTRES 1 +#define ERRCLASS_TEMPSIT 2 +#define ERRCLASS_AUTH 3 +#define ERRCLASS_INTRN 4 +#define ERRCLASS_HRDFAIL 5 +#define ERRCLASS_SYSFAIL 6 +#define ERRCLASS_APPERR 7 +#define ERRCLASS_NOTFND 8 +#define ERRCLASS_BADFMT 9 +#define ERRCLASS_LOCKED 10 +#define ERRCLASS_MEDIA 11 +#define ERRCLASS_ALREADY 12 +#define ERRCLASS_UNK 13 +#define ERRCLASS_CANT 14 +#define ERRCLASS_TIME 15 + +#define ERRLOC_UNK 1 +#define ERRLOC_DISK 2 +#define ERRLOC_NET 3 +#define ERRLOC_SERDEV 4 +#define ERRLOC_MEM 5 + +#endif /* INCL_DOSERRORS */ + +#if defined (INCL_DOSMISC) + +#define FERR_DISABLEHARDERR 0x0000L +#define FERR_ENABLEHARDERR 0x0001L +#define FERR_ENABLEEXCEPTION 0x0000L +#define FERR_DISABLEEXCEPTION 0x0002L + +#define BEGIN_LIBPATH 1 +#define END_LIBPATH 2 + +ULONG DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction, + PULONG pulLocus); +ULONG DosError (ULONG ulError); +ULONG DosQueryExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags); +ULONG DosSetExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags); + +#endif /* INCL_DOSMISC */ + +/* ----------------------------- FONTS ------------------------------------ */ + +#define FACESIZE 32 + +#define FATTR_SEL_ITALIC 0x0001 +#define FATTR_SEL_UNDERSCORE 0x0002 +#define FATTR_SEL_OUTLINE 0x0008 +#define FATTR_SEL_STRIKEOUT 0x0010 +#define FATTR_SEL_BOLD 0x0020 + +#define FATTR_TYPE_KERNING 0x0004 +#define FATTR_TYPE_MBCS 0x0008 +#define FATTR_TYPE_DBCS 0x0010 +#define FATTR_TYPE_ANTIALIASED 0x0020 + +#define FATTR_FONTUSE_NOMIX 0x0002 +#define FATTR_FONTUSE_OUTLINE 0x0004 +#define FATTR_FONTUSE_TRANSFORMABLE 0x0008 + +#define FM_TYPE_FIXED 0x0001 +#define FM_TYPE_LICENSED 0x0002 +#define FM_TYPE_KERNING 0x0004 +#define FM_TYPE_DBCS 0x0010 +#define FM_TYPE_MBCS 0x0018 +#define FM_TYPE_64K 0x8000 +#define FM_TYPE_ATOMS 0x4000 +#define FM_TYPE_FAMTRUNC 0x2000 +#define FM_TYPE_FACETRUNC 0x1000 + +#define FM_DEFN_OUTLINE 0x0001 +#define FM_DEFN_IFI 0x0002 +#define FM_DEFN_WIN 0x0004 +#define FM_DEFN_GENERIC 0x8000 + +#define FM_SEL_ITALIC 0x0001 +#define FM_SEL_UNDERSCORE 0x0002 +#define FM_SEL_NEGATIVE 0x0004 +#define FM_SEL_OUTLINE 0x0008 +#define FM_SEL_STRIKEOUT 0x0010 +#define FM_SEL_BOLD 0x0020 +#define FM_SEL_ISO9241_TESTED 0x0040 + +#define FM_CAP_NOMIX 0x0001 + +#define FM_ISO_9518_640 0x01 +#define FM_ISO_9515_640 0x02 +#define FM_ISO_9515_1024 0x04 +#define FM_ISO_9517_640 0x08 +#define FM_ISO_9517_1024 0x10 + + +typedef struct _PANOSE +{ + BYTE bFamilyType; + BYTE bSerifStyle; + BYTE bWeight; + BYTE bProportion; + BYTE bContrast; + BYTE bStrokeVariation; + BYTE bArmStyle; + BYTE bLetterform; + BYTE bMidline; + BYTE bXHeight; + BYTE fbPassedISO; + BYTE fbFailedISO; +} PANOSE; + +typedef struct _FONTMETRICS +{ + CHAR szFamilyname[FACESIZE]; + CHAR szFacename[FACESIZE]; + USHORT idRegistry; + USHORT usCodePage; + LONG lEmHeight; + LONG lXHeight; + LONG lMaxAscender; + LONG lMaxDescender; + LONG lLowerCaseAscent; + LONG lLowerCaseDescent; + LONG lInternalLeading; + LONG lExternalLeading; + LONG lAveCharWidth; + LONG lMaxCharInc; + LONG lEmInc; + LONG lMaxBaselineExt; + SHORT sCharSlope; + SHORT sInlineDir; + SHORT sCharRot; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT sXDeviceRes; + SHORT sYDeviceRes; + SHORT sFirstChar; + SHORT sLastChar; + SHORT sDefaultChar; + SHORT sBreakChar; + SHORT sNominalPointSize; + SHORT sMinimumPointSize; + SHORT sMaximumPointSize; + USHORT fsType; + USHORT fsDefn; + USHORT fsSelection; + USHORT fsCapabilities; + LONG lSubscriptXSize; + LONG lSubscriptYSize; + LONG lSubscriptXOffset; + LONG lSubscriptYOffset; + LONG lSuperscriptXSize; + LONG lSuperscriptYSize; + LONG lSuperscriptXOffset; + LONG lSuperscriptYOffset; + LONG lUnderscoreSize; + LONG lUnderscorePosition; + LONG lStrikeoutSize; + LONG lStrikeoutPosition; + SHORT sKerningPairs; + SHORT sFamilyClass; + LONG lMatch; + LONG FamilyNameAtom; + LONG FaceNameAtom; + PANOSE panose; +} FONTMETRICS; +typedef FONTMETRICS *PFONTMETRICS; + +typedef struct _FATTRS +{ + USHORT usRecordLength; + USHORT fsSelection; + LONG lMatch; + CHAR szFacename[FACESIZE]; + USHORT idRegistry; + USHORT usCodePage; + LONG lMaxBaselineExt; + LONG lAveCharWidth; + USHORT fsType; + USHORT fsFontUse; +} FATTRS; +typedef FATTRS *PFATTRS; + +/* ------------------------- MEMORY MANAGEMENT ---------------------------- */ + +#if defined (INCL_DOSMEMMGR) || !defined (INCL_NOCOMMON) + +#define PAG_READ 0x0001 +#define PAG_WRITE 0x0002 +#define PAG_EXECUTE 0x0004 +#define PAG_GUARD 0x0008 +#define PAG_COMMIT 0x0010 +#define PAG_DECOMMIT 0x0020 +#define OBJ_TILE 0x0040 +#define OBJ_PROTECTED 0x0080 +#define OBJ_GETTABLE 0x0100 +#define OBJ_GIVEABLE 0x0200 +#define PAG_DEFAULT 0x0400 +#define PAG_SHARED 0x2000 +#define PAG_FREE 0x4000 +#define PAG_BASE 0x00010000 + +#define DOSSUB_INIT 0x0001 +#define DOSSUB_GROW 0x0002 +#define DOSSUB_SPARSE_OBJ 0x0004 +#define DOSSUB_SERIALIZE 0x0008 + +#define fPERM (PAG_EXECUTE | PAG_READ | PAG_WRITE) +#define fSHARE (OBJ_GETTABLE | OBJ_GIVEABLE) +#define fALLOC (fPERM | OBJ_TILE | PAG_COMMIT) +#define fALLOCSHR (fPERM | fSHARE | OBJ_TILE | PAG_COMMIT) +#define fGETNMSHR (fPERM) +#define fGETSHR (fPERM) +#define fGIVESHR (fPERM) +#define fSET (fPERM|PAG_COMMIT|PAG_DECOMMIT|PAG_DEFAULT) + +ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize, + ULONG ulAllocationFlags); +ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName, + ULONG ulObjectSize, ULONG ulAllocationFlags); +ULONG DosFreeMem (PVOID pBaseAddress); +ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName, + ULONG ulAttributeFlags); +ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags); +ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId, + ULONG ulAttributeFlags); +ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize, + PULONG pulAllocationFlags); +ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize, + ULONG ulAttributeFlags); +ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize); +ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize); +ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize); +ULONG DosSubUnsetMem (PVOID pOffset); + +#endif /* INCL_DOSMEMMGR || !INCL_NOCOMMON */ + +/* --------------------------- FILE SYSTEM -------------------------------- */ + +#define CCHMAXPATH 260 +#define CCHMAXPATHCOMP 256 + +#if defined (INCL_DOSMISC) +#define DSP_IMPLIEDCUR 1 +#define DSP_PATHREF 2 +#define DSP_IGNORENETERR 4 +#endif + +#if defined (INCL_DOSFILEMGR) || !defined (INCL_NOCOMMON) + +#define DCPY_EXISTING 0x0001 +#define DCPY_APPEND 0x0002 +#define DCPY_FAILEAS 0x0004 + +#define DSPI_WRTTHRU 0x0010 + +#define EAT_BINARY 0xfffe +#define EAT_ASCII 0xfffd +#define EAT_BITMAP 0xfffb +#define EAT_METAFILE 0xfffa +#define EAT_ICON 0xfff9 +#define EAT_EA 0xffee +#define EAT_MVMT 0xffdf +#define EAT_MVST 0xffde +#define EAT_ASN1 0xffdd + +#define ENUMEA_LEVEL_NO_VALUE 1 + +#define ENUMEA_REFTYPE_FHANDLE 0 +#define ENUMEA_REFTYPE_PATH 1 +#define ENUMEA_REFTYPE_MAX ENUMEA_REFTYPE_PATH + +#define ENUMEA_REFTYPE_FHANDLE 0 +#define ENUMEA_REFTYPE_PATH 1 + +#define FEA_NEEDEA 0x80 + +#define FHB_DSKREMOTE 0x8000 +#define FHB_CHRDEVREMOTE 0x8000 +#define FHB_PIPEREMOTE 0x8000 + +#define FHT_DISKFILE 0x0000 +#define FHT_CHRDEV 0x0001 +#define FHT_PIPE 0x0002 + +#define FIL_STANDARD 1 +#define FIL_QUERYEASIZE 2 +#define FIL_QUERYEASFROMLIST 3 +#define FIL_QUERYFULLNAME 5 /* DosQueryPathInfo */ + +#define FILE_BEGIN 0 +#define FILE_CURRENT 1 +#define FILE_END 2 + +#define FILE_NORMAL 0x0000 +#define FILE_READONLY 0x0001 +#define FILE_HIDDEN 0x0002 +#define FILE_SYSTEM 0x0004 +#define FILE_DIRECTORY 0x0010 +#define FILE_ARCHIVED 0x0020 + +#define FILE_IGNORE 0x10000 + +#define FILE_EXISTED 0x0001 +#define FILE_CREATED 0x0002 +#define FILE_TRUNCATED 0x0003 + +#define FILE_OPEN 0x0001 +#define FILE_TRUNCATE 0x0002 +#define FILE_CREATE 0x0010 + +#define FS_ATTACH 0 +#define FS_DETACH 1 +#define FS_SPOOLATTACH 2 +#define FS_SPOOLDETACH 3 + +#define FSAIL_QUERYNAME 1 +#define FSAIL_DEVNUMBER 2 +#define FSAIL_DRVNUMBER 3 + +#define FSAT_CHARDEV 1 +#define FSAT_PSEUDODEV 2 +#define FSAT_LOCALDRV 3 +#define FSAT_REMOTEDRV 4 + +#define FSCTL_HANDLE 1 +#define FSCTL_PATHNAME 2 +#define FSCTL_FSDNAME 3 + +#define FSCTL_ERROR_INFO 1 +#define FSCTL_MAX_EASIZE 2 +#define FSCTL_GET_NEXT_ROUTE_NAME 3 +#define FSCTL_DAEMON_QUERY 4 + +#define FSCTL_QUERY_COMPLETE 0 +#define FSCTL_QUERY_AGAIN 1 + +#define FSIL_ALLOC 1 +#define FSIL_VOLSER 2 + +#define HANDTYPE_FILE 0x0000 +#define HANDTYPE_DEVICE 0x0001 +#define HANDTYPE_PIPE 0x0002 +#define HANDTYPE_PROTECTED 0x4000 +#define HANDTYPE_NETWORK 0x8000 + +#define HDIR_SYSTEM 1 +#define HDIR_CREATE ((HDIR)-1) + +#define MUST_HAVE_READONLY (FILE_READONLY | (FILE_READONLY << 8)) +#define MUST_HAVE_HIDDEN (FILE_HIDDEN | (FILE_HIDDEN << 8)) +#define MUST_HAVE_SYSTEM (FILE_SYSTEM | (FILE_SYSTEM << 8)) +#define MUST_HAVE_DIRECTORY (FILE_DIRECTORY | (FILE_DIRECTORY << 8)) +#define MUST_HAVE_ARCHIVED (FILE_ARCHIVED | (FILE_ARCHIVED << 8)) + +#define OPEN_ACTION_FAIL_IF_EXISTS 0x0000 +#define OPEN_ACTION_OPEN_IF_EXISTS 0x0001 +#define OPEN_ACTION_REPLACE_IF_EXISTS 0x0002 +#define OPEN_ACTION_FAIL_IF_NEW 0x0000 +#define OPEN_ACTION_CREATE_IF_NEW 0x0010 + +#define OPEN_ACCESS_READONLY 0x0000 +#define OPEN_ACCESS_WRITEONLY 0x0001 +#define OPEN_ACCESS_READWRITE 0x0002 + +#define OPEN_SHARE_DENYREADWRITE 0x0010 +#define OPEN_SHARE_DENYWRITE 0x0020 +#define OPEN_SHARE_DENYREAD 0x0030 +#define OPEN_SHARE_DENYNONE 0x0040 + +#define OPEN_FLAGS_NOINHERIT 0x0080 +#define OPEN_FLAGS_NO_LOCALITY 0x0000 +#define OPEN_FLAGS_SEQUENTIAL 0x0100 +#define OPEN_FLAGS_RANDOM 0x0200 +#define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300 +#define OPEN_FLAGS_NO_CACHE 0x1000 +#define OPEN_FLAGS_FAIL_ON_ERROR 0x2000 +#define OPEN_FLAGS_WRITE_THROUGH 0x4000 +#define OPEN_FLAGS_DASD 0x8000 +#define OPEN_FLAGS_NONSPOOLED 0x40000 +#define OPEN_FLAGS_PROTECTED_HANDLE 0x40000000 + +#define SEARCH_PATH 0x0000 +#define SEARCH_CUR_DIRECTORY 0x0001 +#define SEARCH_ENVIRONMENT 0x0002 +#define SEARCH_IGNORENETERRS 0x0004 + + +typedef LHANDLE HFILE; +typedef HFILE *PHFILE; + +typedef ULONG FHLOCK; +typedef PULONG PFHLOCK; + +typedef LHANDLE HDIR; +typedef HDIR *PHDIR; + + +typedef struct _FTIME +{ + USHORT twosecs : 5; + USHORT minutes : 6; + USHORT hours : 5; +} FTIME; +typedef FTIME *PFTIME; + +typedef struct _FDATE +{ + USHORT day : 5; + USHORT month : 4; + USHORT year : 7; +} FDATE; +typedef FDATE *PFDATE; + +typedef struct _FEA +{ + BYTE fEA; + BYTE cbName; + USHORT cbValue; +} FEA; +typedef FEA *PFEA; + +typedef struct _FEALIST +{ + ULONG cbList; + FEA list[1]; +} FEALIST; +typedef FEALIST *PFEALIST; + +typedef struct _GEA +{ + BYTE cbName; + CHAR szName[1]; +} GEA; +typedef GEA *PGEA; + +typedef struct _GEALIST +{ + ULONG cbList; + GEA list[1]; +} GEALIST; +typedef GEALIST *PGEALIST; + +typedef struct _EAOP +{ + PGEALIST fpGEAList; + PFEALIST fpFEAList; + ULONG oError; +} EAOP; +typedef EAOP *PEAOP; + +typedef struct _FEA2 +{ + ULONG oNextEntryOffset; + BYTE fEA; + BYTE cbName; + USHORT cbValue; + CHAR szName[1]; +} FEA2; +typedef FEA2 *PFEA2; + +typedef struct _FEA2LIST +{ + ULONG cbList; + FEA2 list[1]; +} FEA2LIST; +typedef FEA2LIST *PFEA2LIST; + +typedef struct _GEA2 +{ + ULONG oNextEntryOffset; + BYTE cbName; + CHAR szName[1]; +} GEA2; +typedef GEA2 *PGEA2; + +typedef struct _GEA2LIST +{ + ULONG cbList; + GEA2 list[1]; +} GEA2LIST; +typedef GEA2LIST *PGEA2LIST; + +typedef struct _EAOP2 +{ + PGEA2LIST fpGEA2List; + PFEA2LIST fpFEA2List; + ULONG oError; +} EAOP2; +typedef EAOP2 *PEAOP2; + +typedef struct _DENA1 +{ + UCHAR reserved; + UCHAR cbName; + USHORT cbValue; + UCHAR szName[1]; +} DENA1; +typedef DENA1 *PDENA1; + +typedef FEA2 DENA2; +typedef PFEA2 PDENA2; + +typedef struct _EASIZEBUF +{ + USHORT cbMaxEASize; + ULONG cbMaxEAListSize; /* Packed? */ +} EASIZEBUF; +typedef EASIZEBUF *PEASIZEBUF; + +typedef struct _ROUTENAMEBUF +{ + ULONG hRouteHandle; + UCHAR szRouteName; +} ROUTENAMEBUF; +typedef ROUTENAMEBUF *PROUTENAMEBUF; + +typedef struct _FSDTHREAD +{ + USHORT usFunc; + USHORT usStackSize; + ULONG ulPriorityClass; + LONG lPriorityLevel; +} FSDTHREAD; + +typedef struct _FSDDAEMON +{ + USHORT usNumThreads; + USHORT usMoreFlag; + USHORT usCallInstance; + FSDTHREAD tdThrds[16]; +} FSDDAEMON; + +typedef struct _FILEFINDBUF +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF; +typedef FILEFINDBUF *PFILEFINDBUF; + +typedef struct _FILEFINDBUF2 +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + ULONG cbList; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF2; +typedef FILEFINDBUF2 *PFILEFINDBUF2; + +typedef struct _FILEFINDBUF3 +{ + ULONG oNextEntryOffset; + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + ULONG attrFile; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF3; +typedef FILEFINDBUF3 *PFILEFINDBUF3; + +typedef struct _FILEFINDBUF4 +{ + ULONG oNextEntryOffset; + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + ULONG attrFile; + ULONG cbList; + UCHAR cchName; + CHAR achName[CCHMAXPATHCOMP]; +} FILEFINDBUF4; +typedef FILEFINDBUF4 *PFILEFINDBUF4; + +typedef struct _FILELOCK +{ + LONG lOffset; + LONG lRange; +} FILELOCK; +typedef FILELOCK *PFILELOCK; + +typedef struct _FILESTATUS +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; +} FILESTATUS; +typedef FILESTATUS *PFILESTATUS; + +typedef struct _FILESTATUS2 +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + USHORT attrFile; + ULONG cbList; +} FILESTATUS2; +typedef FILESTATUS2 *PFILESTATUS2; + +typedef struct _FILESTATUS3 +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + ULONG attrFile; +} FILESTATUS3; +typedef FILESTATUS3 *PFILESTATUS3; + +typedef struct _FILESTATUS4 +{ + FDATE fdateCreation; + FTIME ftimeCreation; + FDATE fdateLastAccess; + FTIME ftimeLastAccess; + FDATE fdateLastWrite; + FTIME ftimeLastWrite; + ULONG cbFile; + ULONG cbFileAlloc; + ULONG attrFile; + ULONG cbList; +} FILESTATUS4; +typedef FILESTATUS4 *PFILESTATUS4; + +typedef struct _FSALLOCATE +{ + ULONG idFileSystem; + ULONG cSectorUnit; + ULONG cUnit; + ULONG cUnitAvail; + USHORT cbSector; +} FSALLOCATE; +typedef FSALLOCATE *PFSALLOCATE; + +typedef struct _FSQBUFFER +{ + USHORT iType; + USHORT cbName; + UCHAR szName[1]; + USHORT cbFSDName; + UCHAR szFSDName[1]; + USHORT cbFSAData; + UCHAR rgFSAData[1]; +} FSQBUFFER; +typedef FSQBUFFER *PFSQBUFFER; + +typedef struct _FSQBUFFER2 +{ + USHORT iType; + USHORT cbName; + USHORT cbFSDName; + USHORT cbFSAData; + UCHAR szName[1]; + UCHAR szFSDName[1]; + UCHAR rgFSAData[1]; +} FSQBUFFER2; +typedef FSQBUFFER2 *PFSQBUFFER2; + +typedef struct _SPOOLATTACH +{ + USHORT hNmPipe; + ULONG ulKey; +} SPOOLATTACH; +typedef SPOOLATTACH *PSPOOLATTACH; + +typedef struct _VOLUMELABEL +{ + BYTE cch; + CHAR szVolLabel[12]; +} VOLUMELABEL; +typedef VOLUMELABEL *PVOLUMELABEL; + +typedef struct _FSINFO +{ + FDATE fdateCreation; + FTIME ftimeCreation; + VOLUMELABEL vol; +} FSINFO; +typedef FSINFO *PFSINFO; + + +ULONG DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl); +ULONG DosClose (HFILE hFile); +ULONG DosCopy (PCSZ pszSource, PCSZ pszTarget, ULONG ulOption); +ULONG DosCreateDir (PCSZ pszDirName, PEAOP2 pEABuf); +ULONG DosDelete (PCSZ pszFileName); +ULONG DosDeleteDir (PCSZ pszDirName); +ULONG DosDupHandle (HFILE hFile, PHFILE phFile); +ULONG DosEditName (ULONG ulLevel, PCSZ pszSource, PCSZ pszEdit, + PBYTE pszTargetBuf, ULONG ulTargetBufLength); +ULONG DosEnumAttribute (ULONG ulRefType, CPVOID pvFile, ULONG ulEntry, + PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, ULONG ulInfoLevel); +ULONG DosFindClose (HDIR hDir); +ULONG DosFindFirst (PCSZ pszFileSpec, PHDIR phDir, ULONG flAttribute, + PVOID pFindBuf, ULONG ulFindBufLength, PULONG pulFileNames, + ULONG ulInfoLevel); +ULONG DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength, + PULONG pulFileNames); +ULONG DosForceDelete (PCSZ pszFileName); +ULONG DosFSAttach (PCSZ pszDevice, PCSZ pszFilesystem, + __const__ VOID *pData, ULONG ulDataLength, ULONG ulFlag); +ULONG DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength, + PVOID pParmList, ULONG ulParmLengthMax, PULONG pulParmLength, + ULONG ulFunction, PCSZ pszRouteName, HFILE hFile, ULONG ulMethod); +ULONG DosMove (PCSZ pszOldName, PCSZ pszNewName); +ULONG DosOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction, + ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode, + PEAOP2 pEABuf); +ULONG DosProtectClose (HFILE hFile, FHLOCK fhFileHandleLockID); +ULONG DosProtectEnumAttribute (ULONG ulRefType, CPVOID pvFile, + ULONG ulEntry, PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, + ULONG ulInfoLevel, FHLOCK fhFileHandleLockID); +ULONG DosProtectOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction, + ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode, + PEAOP2 pEABuf, PFHLOCK pfhFileHandleLockID); +ULONG DosProtectQueryFHState (HFILE hFile, PULONG pulMode, + FHLOCK fhFileHandleLockID); +ULONG DosProtectQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, + PVOID pInfoBuffer, ULONG ulInfoLength, FHLOCK fhFileHandleLockID); +ULONG DosProtectRead (HFILE hFile, PVOID pBuffer, ULONG ulLength, + PULONG pulBytesRead, FHLOCK fhFileHandleLockID); +ULONG DosProtectSetFHState (HFILE hFile, ULONG ulMode, + FHLOCK fhFileHandleLockID); +ULONG DosProtectSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer, + ULONG ulInfoLength, FHLOCK fhFileHandleLockID); +ULONG DosProtectSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock, + __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags, + FHLOCK fhFileHandleLockID); +ULONG DosProtectSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, + PULONG pulPos, FHLOCK fhFileHandleLockID); +ULONG DosProtectSetFileSize (HFILE hFile, ULONG ulSize, + FHLOCK fhFileHandleLockID); +ULONG DosProtectWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength, + PULONG pulBytesWritten, FHLOCK fhFileHandleLockID); +ULONG DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength); +ULONG DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical); +ULONG DosQueryFHState (HFILE hFile, PULONG pulMode); +ULONG DosQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer, + ULONG ulInfoLength); +ULONG DosQueryFSAttach (PCSZ pszDeviceName, ULONG ulOrdinal, + ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pulBufLength); +ULONG DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf, + ULONG ulBufLength); +ULONG DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr); +ULONG DosQueryPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, + PVOID pInfoBuffer, ULONG ulInfoLength); +ULONG DosQueryVerify (PBOOL32 pVerify); +ULONG DosRead (HFILE hFile, PVOID pBuffer, ULONG ulLength, + PULONG pulBytesRead); +ULONG DosResetBuffer (HFILE hf); +ULONG DosSetCurrentDir (PCSZ pszDir); +ULONG DosSetDefaultDisk (ULONG ulDrive); +ULONG DosSetFHState (HFILE hFile, ULONG ulMode); +ULONG DosSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer, + ULONG ulInfoLength); +ULONG DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock, + __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags); +ULONG DosSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, PULONG pulPos); +ULONG DosSetFileSize (HFILE hFile, ULONG ulSize); +ULONG DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf, + ULONG ulBufLength); +ULONG DosSetMaxFH (ULONG ulCount); +ULONG DosSetPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuffer, + ULONG ulInfoLength, ULONG ulOptions); +ULONG DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH); +ULONG DosSetVerify (BOOL32 f32Verify); +ULONG DosShutdown (ULONG ulReserved); +ULONG DosWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength, + PULONG pulBytesWritten); + +#endif /* INCL_DOSFILEMGR || !INCL_NOCOMMON */ + + +#if defined (INCL_DOSMISC) +ULONG DosSearchPath (ULONG ulControl, PCSZ pszPath, PCSZ pszFilename, + PBYTE pBuf, ULONG ulBufLength); +#endif /* INCL_DOSMISC */ + +/* ---------------------------- DEVICE I/O -------------------------------- */ + +#if defined (INCL_DOSDEVICES) + +#define DEVINFO_PRINTER 0 +#define DEVINFO_RS232 1 +#define DEVINFO_FLOPPY 2 +#define DEVINFO_COPROCESSOR 3 +#define DEVINFO_SUBMODEL 4 +#define DEVINFO_MODEL 5 +#define DEVINFO_ADAPTER 6 + +#define INFO_COUNT_PARTITIONABLE_DISKS 1 +#define INFO_GETIOCTLHANDLE 2 +#define INFO_FREEIOCTLHANDLE 3 + +ULONG DosDevConfig (PVOID pInfo, ULONG ulItem); +ULONG DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction, + PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength, + PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength); +ULONG DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength, + PVOID pParams, ULONG ulParamsLength); + +#endif /* INCL_DOSDEVICES */ + +#if defined (INCL_DOSDEVIOCTL) + +#define IOCTL_ASYNC 0x0001 +#define IOCTL_SCR_AND_PTRDRAW 0x0003 +#define IOCTL_KEYBOARD 0x0004 +#define IOCTL_PRINTER 0x0005 +#define IOCTL_LIGHTPEN 0x0006 +#define IOCTL_POINTINGDEVICE 0x0007 +#define IOCTL_DISK 0x0008 +#define IOCTL_PHYSICALDISK 0x0009 +#define IOCTL_MONITOR 0x000a +#define IOCTL_GENERAL 0x000b +#define IOCTL_POWER 0x000c +#define IOCTL_OEMHLP 0x0080 +#define IOCTL_TESTCFG_SYS 0x0080 +#define IOCTL_CDROMDISK 0x0080 +#define IOCTL_CDROMAUDIO 0x0081 +#define IOCTL_TOUCH_DEVDEP 0x0081 +#define IOCTL_TOUCH_DEVINDEP 0x0081 + +#define ASYNC_SETBAUDRATE 0x0041 +#define ASYNC_SETLINECTRL 0x0042 +#define ASYNC_EXTSETBAUDRATE 0x0043 +#define ASYNC_TRANSMITIMM 0x0044 +#define ASYNC_SETBREAKOFF 0x0045 +#define ASYNC_SETMODEMCTRL 0x0046 +#define ASYNC_STOPTRANSMIT 0x0047 +#define ASYNC_STARTTRANSMIT 0x0048 +#define ASYNC_SETBREAKON 0x004b +#define ASYNC_SETDCBINFO 0x0053 +#define ASYNC_SETENHANCEDMODEPARMS 0x0054 +#define ASYNC_GETBAUDRATE 0x0061 +#define ASYNC_GETLINECTRL 0x0062 +#define ASYNC_EXTGETBAUDRATE 0x0063 +#define ASYNC_GETCOMMSTATUS 0x0064 +#define ASYNC_GETLINESTATUS 0x0065 +#define ASYNC_GETMODEMOUTPUT 0x0066 +#define ASYNC_GETMODEMINPUT 0x0067 +#define ASYNC_GETINQUECOUNT 0x0068 +#define ASYNC_GETOUTQUECOUNT 0x0069 +#define ASYNC_GETCOMMERROR 0x006d +#define ASYNC_GETCOMMEVENT 0x0072 +#define ASYNC_GETDCBINFO 0x0073 +#define ASYNC_GETENHANCEDMODEPARMS 0x0074 + +#define SCR_ALLOCLDT 0x0070 +#define SCR_DEALLOCLDT 0x0071 +#define PTR_GETPTRDRAWADDRESS 0x0072 +#define VID_INITCALLVECTOR 0x0073 +#define SCR_ABIOSPASSTHRU 0x0074 +#define SCR_ALLOCLDTOFF 0x0075 +#define SCR_ALLOCLDTBGVAL 0x0076 +#define SCR_ALLOCVIDEOBUFFER 0x007e +#define SCR_GETROMFONTADDR 0x007f + +#define KBD_SETTRANSTABLE 0x0050 +#define KBD_SETINPUTMODE 0x0051 +#define KBD_SETINTERIMFLAG 0x0052 +#define KBD_SETSHIFTSTATE 0x0053 +#define KBD_SETTYPAMATICRATE 0x0054 +#define KBD_SETFGNDSCREENGRP 0x0055 +#define KBD_SETSESMGRHOTKEY 0x0056 +#define KBD_SETFOCUS 0x0057 +#define KBD_SETKCB 0x0058 +#define KBD_SETREADNOTIFICATION 0x0059 +#define KBD_ALTERKBDLED 0x005a +#define KBD_SETNLS 0x005c +#define KBD_CREATE 0x005d +#define KBD_DESTROY 0x005e +#define KBD_GETINPUTMODE 0x0071 +#define KBD_GETINTERIMFLAG 0x0072 +#define KBD_GETSHIFTSTATE 0x0073 +#define KBD_READCHAR 0x0074 +#define KBD_PEEKCHAR 0x0075 +#define KBD_GETSESMGRHOTKEY 0x0076 +#define KBD_GETKEYBDTYPE 0x0077 +#define KBD_GETCODEPAGEID 0x0078 +#define KBD_XLATESCAN 0x0079 +#define KBD_QUERYKBDHARDWAREID 0x007a +#define KBD_QUERYKBDCODEPAGESUPPORT 0x007b + +#define PRT_QUERYJOBHANDLE 0x0021 +#define PRT_SETFRAMECTL 0x0042 +#define PRT_SETINFINITERETRY 0x0044 +#define PRT_INITPRINTER 0x0046 +#define PRT_ACTIVATEFONT 0x0048 +#define PRT_SETPRINTJOBTITLE 0x004d +#define PRT_SETIRQTIMEOUT 0x004e +#define PRT_GETFRAMECTL 0x0062 +#define PRT_GETINFINITERETRY 0x0064 +#define PRT_GETPRINTERSTATUS 0x0066 +#define PRT_QUERYACTIVEFONT 0x0069 +#define PRT_VERIFYFONT 0x006a +#define PRT_QUERYIRQTIMEOUT 0x006e + +#define MOU_ALLOWPTRDRAW 0x0050 +#define MOU_UPDATEDISPLAYMODE 0x0051 +#define MOU_SCREENSWITCH 0x0052 +#define MOU_SETSCALEFACTORS 0x0053 +#define MOU_SETEVENTMASK 0x0054 +#define MOU_SETHOTKEYBUTTON 0x0055 +#define MOU_REASSIGNTHRESHOLDVALUES 0x0055 /* ? */ +#define MOU_SETPTRSHAPE 0x0056 +#define MOU_DRAWPTR 0x0057 +#define MOU_UNMARKCOLLISIONAREA 0x0057 /* ? */ +#define MOU_REMOVEPTR 0x0058 +#define MOU_MARKCOLLISIONAREA 0x0058 /* ? */ +#define MOU_SETPTRPOS 0x0059 +#define MOU_SETPROTDRAWADDRESS 0x005a +#define MOU_SETREALDRAWADDRESS 0x005b +#define MOU_SETMOUSTATUS 0x005c +#define MOU_DISPLAYMODECHANGE 0x005d +#define MOU_GETBUTTONCOUNT 0x0060 +#define MOU_GETMICKEYCOUNT 0x0061 +#define MOU_GETMOUSTATUS 0x0062 +#define MOU_READEVENTQUE 0x0063 +#define MOU_GETQUESTATUS 0x0064 +#define MOU_GETEVENTMASK 0x0065 +#define MOU_GETSCALEFACTORS 0x0066 +#define MOU_GETPTRPOS 0x0067 +#define MOU_GETPTRSHAPE 0x0068 +#define MOU_GETHOTKEYBUTTON 0x0069 +#define MOU_QUERYTHRESHOLDVALUES 0x0069 /* ? */ +#define MOU_VER 0x006a +#define MOU_QUERYPOINTERID 0x006b /* ? */ + +#define DSK_LOCKDRIVE 0x0000 +#define DSK_UNLOCKDRIVE 0x0001 +#define DSK_REDETERMINEMEDIA 0x0002 +#define DSK_SETLOGICALMAP 0x0003 +#define DSK_BEGINFORMAT 0x0004 +#define DSK_BLOCKREMOVABLE 0x0020 +#define DSK_GETLOGICALMAP 0x0021 +#define DSK_UNLOCKEJECTMEDIA 0x0040 +#define DSK_SETDEVICEPARAMS 0x0043 +#define DSK_WRITETRACK 0x0044 +#define DSK_FORMATVERIFY 0x0045 +#define DSK_DISKETTECONTROL 0x005d +#define DSK_QUERYMEDIASENSE 0x0060 +#define DSK_GETDEVICEPARAMS 0x0063 +#define DSK_READTRACK 0x0064 +#define DSK_VERIFYTRACK 0x0065 +#define DSK_GETLOCKSTATUS 0x0066 + +#define PDSK_LOCKPHYSDRIVE 0x0000 +#define PDSK_UNLOCKPHYSDRIVE 0x0001 +#define PDSK_WRITEPHYSTRACK 0x0044 +#define PDSK_GETPHYSDEVICEPARAMS 0x0063 +#define PDSK_READPHYSTRACK 0x0064 +#define PDSK_VERIFYPHYSTRACK 0x0065 + +#define POWER_SENDPOWEREVENT 0x0040 +#define POWER_SETPOWEREVENTRES 0x0041 +#define POWER_GETPOWERSTATUS 0x0060 +#define POWER_GETPOWEREVENT 0x0061 +#define POWER_GETPOWERINFO 0x0062 + +#define OEMHLP_GETOEMADAPTIONINFO 0x0000 +#define OEMHLP_GETMACHINEINFO 0x0001 +#define OEMHLP_GETDISPLAYCOMBCODE 0x0002 +#define OEMHLP_GETVIDEOFONTS 0x0003 +#define OEMHLP_READEISACONFIGINFO 0x0004 +#define OEMHLP_GETROMBIOSINFO 0x0005 +#define OEMHLP_GETMISCVIDEOINFO 0x0006 +#define OEMHLP_GETVIDEOADAPTER 0x0007 +#define OEMHLP_GETSVGAINFO 0x0008 +#define OEMHLP_GETMEMINFO 0x0009 +#define OEMHLP_GETDMQSINFO 0x000a +#define OEMHLP_PCI 0x000b + +#define TESTCFG_SYS_GETBIOSADAPTER 0x0040 +#define TESTCFG_SYS_ISSUEINIOINSTR 0x0041 +#define TESTCFG_SYS_ISSUEOUTIOINSTR 0x0042 +#define TESTCFG_SYS_GETBUSARCH 0x0060 +#define TESTCFG_SYS_GETALLPOSIDS 0x0061 +#define TESTCFG_SYS_GETALLEISAIDS 0x0062 + +#define CDROMDISK_RESETDRIVE 0x0040 +#define CDROMDISK_EJECTDISK 0x0044 +#define CDROMDISK_LOCKUNLOCKDOOR 0x0046 +#define CDROMDISK_SEEK 0x0050 +#define CDROMDISK_DEVICESTATUS 0x0060 +#define CDROMDISK_GETDRIVER 0x0061 +#define CDROMDISK_GETSECTORSIZE 0x0063 +#define CDROMDISK_GETHEADLOC 0x0070 +#define CDROMDISK_READLONG 0x0072 +#define CDROMDISK_GETVOLUMESIZE 0x0078 +#define CDROMDISK_GETUPC 0x0079 + +#define CDROMAUDIO_SETCHANNELCTRL 0x0040 +#define CDROMAUDIO_PLAYAUDIO 0x0050 +#define CDROMAUDIO_STOPAUDIO 0x0051 +#define CDROMAUDIO_RESUMEAUDIO 0x0052 +#define CDROMAUDIO_GETCHANNEL 0x0060 +#define CDROMAUDIO_GETAUDIODISK 0x0061 +#define CDROMAUDIO_GETAUDIOTRACK 0x0062 +#define CDROMAUDIO_GETSUBCHANNELQ 0x0063 +#define CDROMAUDIO_GETAUDIOSTATUS 0x0065 + +#define TOUCH_DEVDEP_SETCALIBCONST 0x0052 +#define TOUCH_DEVDEP_READDATA 0x0053 +#define TOUCH_DEVDEP_SETDATAMODE 0x0054 +#define TOUCH_DEVDEP_SETCLICKLOCK 0x0055 +#define TOUCH_DEVDEP_SETTOUCHTHRESHOLD 0x0056 +#define TOUCH_DEVDEP_SETEMULXY 0x0057 +#define TOUCH_DEVDEP_SETDATAREPORTRATE 0x0058 +#define TOUCH_DEVDEP_SETLOWPASSFILTER 0x0059 +#define TOUCH_DEVDEP_WRITEMEMLOC 0x005a +#define TOUCH_DEVDEP_GETCALIBCONST 0x0060 +#define TOUCH_DEVDEP_GETDATAMODE 0x0061 +#define TOUCH_DEVDEP_GETCLICKLOCK 0x0062 +#define TOUCH_DEVDEP_GETTOUCHTHRESHOLD 0x0063 +#define TOUCH_DEVDEP_GETEMULXY 0x0064 +#define TOUCH_DEVDEP_GETDATAREPORTRATE 0x0065 +#define TOUCH_DEVDEP_GETLOWPASSFILTER 0x0066 +#define TOUCH_DEVDEP_READMEMLOC 0x0067 + +#define TOUCH_DEVINDEP_SETCOORDSYS 0x0050 +#define TOUCH_DEVINDEP_SETSELECTMECH 0x0052 +#define TOUCH_DEVINDEP_SETEVENTMASK 0x0053 +#define TOUCH_DEVINDEP_SETQUEUESIZE 0x0054 +#define TOUCH_DEVINDEP_SETEMULSTATE 0x0055 +#define TOUCH_DEVINDEP_GETCOORDSYS 0x0060 +#define TOUCH_DEVINDEP_GETSELECTMECH 0x0062 +#define TOUCH_DEVINDEP_GETEVENTMASK 0x0063 +#define TOUCH_DEVINDEP_GETQUEUESIZE 0x0064 +#define TOUCH_DEVINDEP_GETEMULSTATE 0x0065 +#define TOUCH_DEVINDEP_GETREADEVENTQUEUE 0x0066 + +#define MON_REGISTERMONITOR 0x0040 + +#define DEV_FLUSHINPUT 0x0001 +#define DEV_FLUSHOUTPUT 0x0002 +#define DEV_SYSTEMNOTIFYPDD 0x0041 +#define DEV_QUERYMONSUPPORT 0x0060 + +#define RX_QUE_OVERRUN 0x0001 +#define RX_HARDWARE_OVERRUN 0x0002 +#define PARITY_ERROR 0x0004 +#define FRAMING_ERROR 0x0008 + +#define CHAR_RECEIVED 0x0001 +#define LAST_CHAR_SENT 0x0004 +#define CTS_CHANGED 0x0008 +#define DSR_CHANGED 0x0010 +#define DCD_CHANGED 0x0020 +#define BREAK_DETECTED 0x0040 +#define ERROR_OCCURRED 0x0080 +#define RI_DETECTED 0x0100 + +#define TX_WAITING_FOR_CTS 0x0001 +#define TX_WAITING_FOR_DSR 0x0002 +#define TX_WAITING_FOR_DCD 0x0004 +#define TX_WAITING_FOR_XON 0x0008 +#define TX_WAITING_TO_SEND_XON 0x0010 +#define TX_WAITING_WHILE_BREAK_ON 0x0020 +#define TX_WAITING_TO_SEND_IMM 0x0040 +#define RX_WAITING_FOR_DSR 0x0080 + +#define WRITE_REQUEST_QUEUED 0x0001 +#define DATA_IN_TX_QUE 0x0002 +#define HARDWARE_TRANSMITTING 0x0004 +#define CHAR_READY_TO_SEND_IMM 0x0008 +#define WAITING_TO_SEND_XON 0x0010 +#define WAITING_TO_SEND_XOFF 0x0020 + +#define CTS_ON 0x10 +#define DSR_ON 0x20 +#define RI_ON 0x40 +#define DCD_ON 0x80 + +#define MODE_DTR_CONTROL 0x01 +#define MODE_DTR_HANDSHAKE 0x02 +#define MODE_CTS_HANDSHAKE 0x08 +#define MODE_DSR_HANDSHAKE 0x10 +#define MODE_DCD_HANDSHAKE 0x20 +#define MODE_DSR_SENSITIVITY 0x40 + +#define MODE_AUTO_TRANSMIT 0x01 +#define MODE_AUTO_RECEIVE 0x02 +#define MODE_ERROR_CHAR 0x04 +#define MODE_NULL_STRIPPING 0x08 +#define MODE_BREAK_CHAR 0x10 +#define MODE_RTS_CONTROL 0x40 +#define MODE_RTS_HANDSHAKE 0x80 +#define MODE_TRANSMIT_TOGGLE 0xc0 + +#define MODE_NO_WRITE_TIMEOUT 0x01 +#define MODE_READ_TIMEOUT 0x02 +#define MODE_WAIT_READ_TIMEOUT 0x04 +#define MODE_NOWAIT_READ_TIMEOUT 0x06 + +#define DTR_ON 0x01 +#define RTS_ON 0x02 + +#define DTR_OFF 0xfe +#define RTS_OFF 0xfd + +#define ASCII_MODE 0x00 +#define BINARY_MODE 0x80 + +#define CONVERSION_REQUEST 0x20 +#define INTERIM_CHAR 0x80 + +#define HOTKEY_MAX_COUNT 0x0000 +#define HOTKEY_CURRENT_COUNT 0x0001 + +#define KBD_DATA_RECEIVED 0x0001 +#define KBD_DATA_BINARY 0x8000 + +#define KBD_READ_WAIT 0x0000 +#define KBD_READ_NOWAIT 0x8000 + +#define SHIFT_REPORT_MODE 0x01 + +#define RIGHTSHIFT 0x0001 +#define LEFTSHIFT 0x0002 +#define CONTROL 0x0004 +#define ALT 0x0008 +#define SCROLLLOCK_ON 0x0010 +#define NUMLOCK_ON 0x0020 +#define CAPSLOCK_ON 0x0040 +#define INSERT_ON 0x0080 +#define LEFTCONTROL 0x0100 +#define LEFTALT 0x0200 +#define RIGHTCONTROL 0x0400 +#define RIGHTALT 0x0800 +#define SCROLLLOCK 0x1000 +#define NUMLOCK 0x2000 +#define CAPSLOCK 0x4000 +#define SYSREQ 0x8000 + +#define PRINTER_TIMEOUT 0x0001 +#define PRINTER_IO_ERROR 0x0008 +#define PRINTER_SELECTED 0x0010 +#define PRINTER_OUT_OF_PAPER 0x0020 +#define PRINTER_ACKNOWLEDGED 0x0040 +#define PRINTER_NOT_BUSY 0x0080 + +#define MOUSE_MOTION 0x0001 +#define MOUSE_MOTION_WITH_BN1_DOWN 0x0002 +#define MOUSE_BN1_DOWN 0x0004 +#define MOUSE_MOTION_WITH_BN2_DOWN 0x0008 +#define MOUSE_BN2_DOWN 0x0010 +#define MOUSE_MOTION_WITH_BN3_DOWN 0x0020 +#define MOUSE_BN3_DOWN 0x0040 + +#define MHK_BUTTON1 0x0001 +#define MHK_BUTTON2 0x0002 +#define MHK_BUTTON3 0x0004 + +#define MOU_NOWAIT 0x0000 +#define MOU_WAIT 0x0001 + +#define MHK_NO_HOTKEY 0x0000 + +#define MOUSE_QUEUEBUSY 0x0001 +#define MOUSE_BLOCKREAD 0x0002 +#define MOUSE_FLUSH 0x0004 +#define MOUSE_UNSUPPORTED_MODE 0x0008 +#define MOUSE_DISABLED 0x0100 +#define MOUSE_MICKEYS 0x0200 + +#define BUILD_BPB_FROM_MEDIUM 0x00 +#define REPLACE_BPB_FOR_DEVICE 0x01 +#define REPLACE_BPB_FOR_MEDIUM 0x02 + +#define DEVTYPE_48TPI 0x0000 +#define DEVTYPE_96TPI 0x0001 +#define DEVTYPE_35 0x0002 +#define DEVTYPE_8SD 0x0003 +#define DEVTYPE_8DD 0x0004 +#define DEVTYPE_FIXED 0x0005 +#define DEVTYPE_TAPE 0x0006 +#define DEVTYPE_UNKNOWN 0x0007 + +#define SCREENDD_GETCURRENTBANK 0x00 +#define SCREENDD_SETCURRENTBANK 0x01 +#define SCREENDD_SVGA_ID 0x08 +#define SCREENDD_SVGA_OEM 0x09 +#define SCREENDD_UPDATEMEMORY 0x0a +#define SCREENDD_GETLINEARACCESS 0x0b +#define SCREENDD_GETGLOBALACCESS 0x0c +#define SCREENDD_FREEGLOBALACCESS 0x0d +#define SCREENDD_REGISTER_RING0_CALLER 0x0e +#define SCREENDD_WAIT_ON_RING0_CALLER 0x0f +#define SCREENDD_CATEGORY 0x80 +#define SCREENDD_NAME "SCREEN$" + +#define GETLINEAR_FLAG_MAPPHYSICAL 0x00000010 +#define GETLINEAR_FLAG_MAPPROCESS 0x00000020 +#define GETLINEAR_FLAG_MAPSHARED 0x00000400 +#define GETLINEAR_FLAG_MAPATTACH 0x80000000 + +#define EGA_BIT 4 +#define VGA_BIT 8 +#define EGAVGA_BIT (EGA_BIT|VGA_BIT) + +#define READ_BANK 0 +#define WRITE_BANK 1 +#define MODE_TEXT 0 +#define MODE_PLANAR 1 +#define MODE_LINEAR 2 + +typedef struct _DCBINFO +{ + USHORT usWriteTimeout; + USHORT usReadTimeout; + BYTE fbCtlHndShake; + BYTE fbFlowReplace; + BYTE fbTimeout; + BYTE bErrorReplacementChar; + BYTE bBreakReplacementChar; + BYTE bXONChar; + BYTE bXOFFChar; +} DCBINFO; +typedef DCBINFO *PDCBINFO; + +typedef struct _LINECONTROL +{ + BYTE bDataBits; + BYTE bParity; + BYTE bStopBits; + BYTE fTransBreak; +} LINECONTROL; +typedef LINECONTROL *PLINECONTROL; + +typedef struct _MODEMSTATUS +{ + BYTE fbModemOn; + BYTE fbModemOff; +} MODEMSTATUS; +typedef MODEMSTATUS *PMODEMSTATUS; + +typedef struct _KBDTYPE +{ + USHORT usType; + USHORT reserved1; + USHORT reserved2; +} KBDTYPE; +typedef KBDTYPE *PKBDTYPE; + +typedef struct _RATEDELAY +{ + USHORT usDelay; + USHORT usRate; +} RATEDELAY; +typedef RATEDELAY *PRATEDELAY; + +typedef struct _CODEPAGEINFO +{ + PBYTE pbTransTable; + USHORT idCodePage; + USHORT idTable; +} CODEPAGEINFO; +typedef CODEPAGEINFO *PCODEPAGEINFO; + +typedef struct _CPID +{ + USHORT idCodePage; + USHORT Reserved; +} CPID; +typedef CPID *PCPID; + +typedef struct _SHIFTSTATE +{ + USHORT fsState; + BYTE fNLS; +} SHIFTSTATE; +typedef SHIFTSTATE *PSHIFTSTATE; + +typedef struct _HOTKEY +{ + USHORT fsHotKey; + UCHAR uchScancodeMake; + UCHAR uchScancodeBreak; + USHORT idHotKey; +} HOTKEY; +typedef HOTKEY *PHOTKEY; + +typedef struct _PTRDRAWFUNCTION +{ + USHORT usReturnCode; + PFN pfnDraw; + PCH pchDataSeg; +} PTRDRAWFUNCTION; +typedef PTRDRAWFUNCTION *PPTRDRAWFUNCTION; + +typedef struct _PTRDRAWADDRESS +{ + USHORT reserved; + PTRDRAWFUNCTION ptrdfnc; +} PTRDRAWADDRESS; +typedef PTRDRAWADDRESS *PPTRDRAWADDRESS; + +typedef struct _PTRDRAWDATA +{ + USHORT cb; + USHORT usConfig; + USHORT usFlag; +} PTRDRAWDATA; +typedef PTRDRAWDATA *PPTRDRAWDATA; + +typedef struct _TRACKLAYOUT +{ + BYTE bCommand; + USHORT usHead; + USHORT usCylinder; + USHORT usFirstSector; + USHORT cSectors; + struct + { + USHORT usSectorNumber; + USHORT usSectorSize; + } TrackTable[1]; +} TRACKLAYOUT; +typedef TRACKLAYOUT *PTRACKLAYOUT; + +typedef struct _TRACKFORMAT +{ + BYTE bCommand; + USHORT usHead; + USHORT usCylinder; + USHORT usReserved; + USHORT cSectors; + struct + { + BYTE bCylinder; + BYTE bHead; + BYTE idSector; + BYTE bBytesSector; + } FormatTable[1]; +} TRACKFORMAT; +typedef TRACKFORMAT *PTRACKFORMAT; + +typedef struct _BIOSPARAMETERBLOCK +{ + USHORT usBytesPerSector; + BYTE bSectorsPerCluster; + USHORT usReservedSectors; + BYTE cFATs; + USHORT cRootEntries; + USHORT cSectors; + BYTE bMedia; + USHORT usSectorsPerFAT; + USHORT usSectorsPerTrack; + USHORT cHeads; + ULONG cHiddenSectors; + ULONG cLargeSectors; + BYTE abReserved[6]; + USHORT cCylinders; + BYTE bDeviceType; + USHORT fsDeviceAttr; +} BIOSPARAMETERBLOCK; +typedef BIOSPARAMETERBLOCK *PBIOSPARAMETERBLOCK; + +typedef struct _DEVICEPARAMETERBLOCK +{ + USHORT reserved1; + USHORT cCylinders; + USHORT cHeads; + USHORT cSectorsPerTrack; + USHORT reserved2; + USHORT reserved3; + USHORT reserved4; + USHORT reserved5; +} DEVICEPARAMETERBLOCK; +typedef DEVICEPARAMETERBLOCK *PDEVICEPARAMETERBLOCK; + +typedef struct _MONITORPOSITION +{ + USHORT fPosition; + USHORT index; + ULONG pbInBuf; + USHORT offOutBuf; +} MONITORPOSITION; +typedef MONITORPOSITION *PMONITORPOSITION; + +typedef struct _FRAME +{ + BYTE bCharsPerLine; + BYTE bLinesPerInch; +} FRAME; +typedef FRAME *PFRAME; + +typedef struct _LDTADDRINFO +{ + PULONG pulPhysAddr; + USHORT cb; +} LDTADDRINFO; +typedef LDTADDRINFO *PLDTADDRINFO; + +typedef struct _SCREENGROUP +{ + USHORT idScreenGrp; + USHORT fTerminate; +} SCREENGROUP; +typedef SCREENGROUP *PSCREENGROUP; + +typedef struct _RXQUEUE +{ + USHORT cch; + USHORT cb; +} RXQUEUE; +typedef RXQUEUE *PRXQUEUE; + +typedef struct _GETLINIOCTLDATA +{ + ULONG PacketLength; + ULONG PhysicalAddress; + ULONG ApertureSize; + PBYTE LinearAddress; + ULONG LinearFlags; +} GETLINIOCTLDATA; +typedef GETLINIOCTLDATA *PGETLINIOCTLDATA; + +typedef struct _BANKINFO +{ + ULONG ulBankLength; + USHORT usBank; + USHORT usVideoModeType; + USHORT usReadWriteMode; +} BANKINFO; + +typedef struct _GLOBALIOCTLDATA +{ + ULONG ProcessAddress; + ULONG AddressLength; + ULONG GlobalAddress; +} GLOBALIOCTLDATA; + +typedef struct _OEMSVGAINFO +{ + USHORT AdapterType; + USHORT ChipType; + ULONG Memory; +} OEMSVGAINFO; + +typedef struct _OEMINFO +{ + ULONG OEMLength; + USHORT Manufacturer; + ULONG ManufacturerData; +} OEMINFO; + +typedef struct _GETGLOBALPACKET +{ + ULONG GlobalPktLength; + GLOBALIOCTLDATA GlobalPktData[1]; +} GETGLOBALPACKET; + +#endif /* INCL_DOSDEVIOCTL */ + +/* -------------------- NATIONAL LANGUAGE SUPPORT ------------------------- */ + +#if defined (INCL_DOSNLS) + +typedef struct _COUNTRYCODE +{ + ULONG country; + ULONG codepage; +} COUNTRYCODE; +typedef COUNTRYCODE *PCOUNTRYCODE; + +typedef struct _COUNTRYINFO +{ + ULONG country; + ULONG codepage; + ULONG fsDateFmt; + CHAR szCurrency[5]; + CHAR szThousandsSeparator[2]; + CHAR szDecimal[2]; + CHAR szDateSeparator[2]; + CHAR szTimeSeparator[2]; + UCHAR fsCurrencyFmt; + UCHAR cDecimalPlace; + UCHAR fsTimeFmt; + USHORT abReserved1[2]; + CHAR szDataSeparator[2]; + USHORT abReserved2[5]; +} COUNTRYINFO; +typedef COUNTRYINFO *PCOUNTRYINFO; + + +ULONG DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode, + PCHAR pchString); +ULONG DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode, + PCHAR pchBuffer, PULONG pulDataLength); +ULONG DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength); +ULONG DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode, + PCOUNTRYINFO pCountryInfo, PULONG pulDataLength); +ULONG DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf); +ULONG DosSetProcessCp (ULONG ulCodePage); + +#endif /* INCL_DOSNLS */ + +/* -------------------------- DYNAMIC LINKING ----------------------------- */ + +#if defined (INCL_DOSMODULEMGR) + +#define PT_16BIT 0 +#define PT_32BIT 1 + + +ULONG DosFreeModule (HMODULE hmod); +ULONG DosLoadModule (PSZ pszObject, ULONG uObjectLen, PCSZ pszModule, + PHMODULE phmod); +ULONG DosQueryModuleHandle (PCSZ pszModname, PHMODULE phmod); +ULONG DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf); +ULONG DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName, + PPFN pProcAddr); +ULONG DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName, + PULONG pulProcType); + +#endif /* INCL_DOSMODULEMGR */ + +/* ----------------------------- RESOURCES -------------------------------- */ + +#if defined (INCL_DOSRESOURCES) || !defined (INCL_NOCOMMON) + +#define RT_POINTER 1 +#define RT_BITMAP 2 +#define RT_MENU 3 +#define RT_DIALOG 4 +#define RT_STRING 5 +#define RT_FONTDIR 6 +#define RT_FONT 7 +#define RT_ACCELTABLE 8 +#define RT_RCDATA 9 +#define RT_MESSAGE 10 +#define RT_DLGINCLUDE 11 +#define RT_VKEYTBL 12 +#define RT_KEYTBL 13 +#define RT_CHARTBL 14 +#define RT_DISPLAYINFO 15 +#define RT_FKASHORT 16 +#define RT_FKALONG 17 +#define RT_HELPTABLE 18 +#define RT_HELPSUBTABLE 19 +#define RT_FDDIR 20 +#define RT_FD 21 +#define RT_MAX 22 + +#define RF_ORDINALID 0x80000000L + + +ULONG DosFreeResource (PVOID pResAddr); +ULONG DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID, + PPVOID pOffset); +ULONG DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID, + PULONG pulSize); + +#endif /* INCL_DOSRESOURCES || !INCL_NOCOMMON */ + +/* -------------------------------- TASKS --------------------------------- */ + +#if defined (INCL_DOSPROCESS) || !defined (INCL_NOCOMMON) + +#define EXIT_THREAD 0 +#define EXIT_PROCESS 1 + +ULONG DosBeep (ULONG ulFrequency, ULONG ulDuration); +VOID DosExit (ULONG ulAction, ULONG ulResult) __attribute__ ((__noreturn__)); + +#endif /* INCL_DOSPROCESS || !defined (INCL_NOCOMMON) */ + + +#if defined (INCL_DOSPROCESS) + +#define CREATE_READY 0 +#define CREATE_SUSPENDED 1 + +#define STACK_SPARSE 0 +#define STACK_COMMITTED 2 + +#define DCWA_PROCESS 0 +#define DCWA_PROCESSTREE 1 + +#define DCWW_WAIT 0 +#define DCWW_NOWAIT 1 + +#define DKP_PROCESSTREE 0 +#define DKP_PROCESS 1 + +#define EXEC_SYNC 0 +#define EXEC_ASYNC 1 +#define EXEC_ASYNCRESULT 2 +#define EXEC_TRACE 3 +#define EXEC_BACKGROUND 4 +#define EXEC_LOAD 5 +#define EXEC_ASYNCRESULTDB 6 + +#define EXLST_ADD 1 +#define EXLST_REMOVE 2 +#define EXLST_EXIT 3 + +#define PRTYC_NOCHANGE 0 +#define PRTYC_IDLETIME 1 +#define PRTYC_REGULAR 2 +#define PRTYC_TIMECRITICAL 3 +#define PRTYC_FOREGROUNDSERVER 4 + +#define PRTYD_MINIMUM (-31) +#define PRTYD_MAXIMUM 31 + +#define PRTYS_PROCESS 0 +#define PRTYS_PROCESSTREE 1 +#define PRTYS_THREAD 2 + +#define TC_EXIT 0 +#define TC_HARDERROR 1 +#define TC_TRAP 2 +#define TC_KILLPROCESS 3 +#define TC_EXCEPTION 4 + + +typedef struct _RESULTCODES +{ + ULONG codeTerminate; + ULONG codeResult; +} RESULTCODES; +typedef RESULTCODES *PRESULTCODES; + +typedef struct tib2_s +{ + ULONG tib2_ultid; + ULONG tib2_ulpri; + ULONG tib2_version; + USHORT tib2_usMCCount; + USHORT tib2_fMCForceFlag; +} TIB2; +typedef TIB2 *PTIB2; + +typedef struct tib_s +{ + PVOID tib_pexchain; + PVOID tib_pstack; + PVOID tib_pstacklimit; + PTIB2 tib_ptib2; + ULONG tib_version; + ULONG tib_ordinal; +} TIB; +typedef TIB *PTIB; + +typedef struct pib_s +{ + ULONG pib_ulpid; + ULONG pib_ulppid; + ULONG pib_hmte; + PCHAR pib_pchcmd; + PCHAR pib_pchenv; + ULONG pib_flstatus; + ULONG pib_ultype; +} PIB; +typedef PIB *PPIB; + +typedef VOID (*PFNTHREAD)(ULONG ulThreadArg); +typedef VOID (*PFNEXITLIST)(ULONG ulArg); + + +ULONG DosAllocThreadLocalMemory (ULONG cb, PULONG *p); +ULONG DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr, + ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize); +ULONG DosEnterCritSec (VOID); +ULONG DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS, + PCSZ pszArg, PCSZ pszEnv, PRESULTCODES pReturnCodes, PCSZ pszName); +ULONG DosExitCritSec (VOID); +ULONG DosExitList (ULONG ulOrder, PFNEXITLIST pfn); +ULONG DosFreeThreadLocalMemory (ULONG *p); +ULONG DosGetInfoBlocks (PTIB *ptib, PPIB *ppib); +ULONG DosKillProcess (ULONG ulAction, PID pid); +ULONG DosKillThread (TID tid); +ULONG DosResumeThread (TID tid); +ULONG DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID); + +#define STDCALL __attribute__ ((stdcall)) +//#define CDECL __attribute__ ((cdecl)) +//#define CALLBACK WINAPI +//#define PASCAL WINAPI + +#define WINAPI STDCALL +//#define APIENTRY STDCALL + +//ULONG WINAPI DosSleep (ULONG ulInterval); +ULONG DosSleep (ULONG ulInterval); + +ULONG DosSuspendThread (TID tid); +ULONG DosVerifyPidTid (PID pid, TID tid); +ULONG DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes, + PPID ppidOut, PID pidIn); +ULONG DosWaitThread (PTID ptid, ULONG ulWait); + +#endif /* INCL_DOSPROCESS */ + +/* ------------------------------ SESSIONS -------------------------------- */ + +#if defined (INCL_DOSSESMGR) || defined (INCL_DOSFILEMGR) + +#define FAPPTYP_NOTSPEC 0x0000 +#define FAPPTYP_NOTWINDOWCOMPAT 0x0001 +#define FAPPTYP_WINDOWCOMPAT 0x0002 +#define FAPPTYP_WINDOWAPI 0x0003 +#define FAPPTYP_BOUND 0x0008 +#define FAPPTYP_DLL 0x0010 +#define FAPPTYP_DOS 0x0020 +#define FAPPTYP_PHYSDRV 0x0040 +#define FAPPTYP_VIRTDRV 0x0080 +#define FAPPTYP_PROTDLL 0x0100 +#define FAPPTYP_WINDOWSREAL 0x0200 +#define FAPPTYP_WINDOWSPROT 0x0400 +#define FAPPTYP_WINDOWSPROT31 0x1000 +#define FAPPTYP_32BIT 0x4000 +#define FAPPTYP_EXETYPE 0x0003 +#define FAPPTYP_RESERVED (~(FAPPTYP_WINDOWAPI | FAPPTYP_BOUND | \ + FAPPTYP_DLL | FAPPTYP_DOS | \ + FAPPTYP_PHYSDRV | FAPPTYP_VIRTDRV | \ + FAPPTYP_PROTDLL | FAPPTYP_32BIT)) + +#endif /* INCL_DOSSESMGR || INCL_DOSFILEMGR */ + +#if defined (INCL_DOSSESMGR) + +#define SET_SESSION_UNCHANGED 0 +#define SET_SESSION_SELECTABLE 1 +#define SET_SESSION_NON_SELECTABLE 2 +#define SET_SESSION_BOND 1 +#define SET_SESSION_NO_BOND 2 + +#define SSF_RELATED_INDEPENDENT 0 +#define SSF_RELATED_CHILD 1 + +#define SSF_FGBG_FORE 0 +#define SSF_FGBG_BACK 1 + +#define SSF_TRACEOPT_NONE 0 +#define SSF_TRACEOPT_TRACE 1 +#define SSF_TRACEOPT_TRACEALL 2 + +#define SSF_INHERTOPT_SHELL 0 +#define SSF_INHERTOPT_PARENT 1 + +#define SSF_TYPE_DEFAULT 0 +#define SSF_TYPE_FULLSCREEN 1 +#define SSF_TYPE_WINDOWABLEVIO 2 +#define SSF_TYPE_PM 3 +#define SSF_TYPE_VDM 4 +#define SSF_TYPE_GROUP 5 +#define SSF_TYPE_DLL 6 +#define SSF_TYPE_WINDOWEDVDM 7 +#define SSF_TYPE_PDD 8 +#define SSF_TYPE_VDD 9 + +#define SSF_CONTROL_VISIBLE 0x0000 +#define SSF_CONTROL_INVISIBLE 0x0001 +#define SSF_CONTROL_MAXIMIZE 0x0002 +#define SSF_CONTROL_MINIMIZE 0x0004 +#define SSF_CONTROL_NOAUTOCLOSE 0x0008 +#define SSF_CONTROL_SETPOS 0x8000 + +#define STOP_SESSION_SPECIFIED 0 +#define STOP_SESSION_ALL 1 + +typedef struct _STARTDATA +{ + USHORT Length; + USHORT Related; + USHORT FgBg; + USHORT TraceOpt; + PSZ PgmTitle; + PSZ PgmName; + PBYTE PgmInputs; + PBYTE TermQ; + PBYTE Environment; + USHORT InheritOpt; + USHORT SessionType; + PSZ IconFile; + ULONG PgmHandle; + USHORT PgmControl; + USHORT InitXPos; + USHORT InitYPos; + USHORT InitXSize; + USHORT InitYSize; + USHORT Reserved; + PSZ ObjectBuffer; + ULONG ObjectBuffLen; +} STARTDATA; +typedef STARTDATA *PSTARTDATA; + +typedef struct _STATUSDATA +{ + USHORT Length; + USHORT SelectInd; + USHORT BondInd; +} STATUSDATA; +typedef STATUSDATA *PSTATUSDATA; + +ULONG DosQueryAppType (PCSZ pszName, PULONG pulFlags); +ULONG DosSelectSession (ULONG ulIDSession); +ULONG DosSetSession (ULONG ulIDSession, PSTATUSDATA psd); +ULONG DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid); +ULONG DosStopSession (ULONG ulScope, ULONG ulIDSession); + +#endif /* INCL_DOSSESMGR */ + +/* ----------------------------- SEMAPHORES ------------------------------- */ + +#if defined (INCL_DOSSEMAPHORES) || !defined (INCL_NOCOMMON) + +#define DC_SEM_SHARED 0x01 +#define DCMW_WAIT_ANY 0x02 +#define DCMW_WAIT_ALL 0x04 + +#define SEM_INDEFINITE_WAIT ((ULONG)-1) +#define SEM_IMMEDIATE_RETURN 0 + +typedef ULONG HEV; +typedef HEV *PHEV; + +typedef struct _PSEMRECORD /* Note 1 */ +{ + HSEM hsemCur; + ULONG ulUser; +} SEMRECORD; +typedef SEMRECORD *PSEMRECORD; + +#endif /* INCL_DOSSEMAPHORES || !INCL_NOCOMMON */ + +#if defined (INCL_DOSSEMAPHORES) + +ULONG DosCloseEventSem (HEV hev); +ULONG DosCreateEventSem (PCSZ pszName, PHEV phev, ULONG ulAttr, BOOL32 fState); +ULONG DosOpenEventSem (PCSZ pszName, PHEV phev); +ULONG DosPostEventSem (HEV hev); +ULONG DosQueryEventSem (HEV hev, PULONG pulCount); +ULONG DosResetEventSem (HEV hev, PULONG pulCount); +ULONG DosWaitEventSem (HEV hev, ULONG ulTimeout); + +ULONG DosCloseMutexSem (HMTX hmtx); +ULONG DosCreateMutexSem (PCSZ pszName, PHMTX phmtx, ULONG ulAttr, + BOOL32 fState); +ULONG DosOpenMutexSem (PCSZ pszName, PHMTX phmtx); +ULONG DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount); +ULONG DosReleaseMutexSem (HMTX hmtx); +ULONG DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout); + +ULONG DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec); +ULONG DosCloseMuxWaitSem (HMUX hmux); +ULONG DosCreateMuxWaitSem (PCSZ pszName, PHMUX phmux, ULONG ulcSemRec, + PSEMRECORD pSemRec, ULONG ulAttr); +ULONG DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem); +ULONG DosOpenMuxWaitSem (PCSZ pszName, PHMUX phmux); +ULONG DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec, + PULONG pulAttr); +ULONG DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser); + +#endif /* INCL_DOSSEMAPHORES */ + +/* ---------------------------- NAMED PIPES ------------------------------- */ + +#define NP_INDEFINITE_WAIT ((ULONG)-1) +#define NP_DEFAULT_WAIT 0 + +#define NP_STATE_DISCONNECTED 1 +#define NP_STATE_LISTENING 2 +#define NP_STATE_CONNECTED 3 +#define NP_STATE_CLOSING 4 + +#define NP_ACCESS_INBOUND 0x0000 +#define NP_ACCESS_OUTBOUND 0x0001 +#define NP_ACCESS_DUPLEX 0x0002 +#define NP_INHERIT 0x0000 +#define NP_NOINHERIT 0x0080 +#define NP_WRITEBEHIND 0x0000 +#define NP_NOWRITEBEHIND 0x4000 + +#define NP_READMODE_BYTE 0x0000 +#define NP_READMODE_MESSAGE 0x0100 +#define NP_TYPE_BYTE 0x0000 +#define NP_TYPE_MESSAGE 0x0400 +#define NP_END_CLIENT 0x0000 +#define NP_END_SERVER 0x4000 +#define NP_WAIT 0x0000 +#define NP_NOWAIT 0x8000 +#define NP_UNLIMITED_INSTANCES 0x00ff + +#define NP_NBLK NO_WAIT +#define NP_SERVER NP_END_SERVER +#define NP_WMESG NP_TYPE_MESSAGE +#define NP_RMESG NP_READMODE_MESSAGE +#define NP_ICOUNT 0x00ff + +#define NPSS_EOI 0 +#define NPSS_RDATA 1 +#define NPSS_WSPACE 2 +#define NPSS_CLOSE 3 + +#define NPSS_WAIT 0x0001 + +typedef struct _AVAILDATA +{ + USHORT cbpipe; + USHORT cbmessage; +} AVAILDATA; +typedef AVAILDATA *PAVAILDATA; + +typedef struct _PIPEINFO +{ + USHORT cbOut; + USHORT cbIn; + BYTE cbMaxInst; + BYTE cbCurInst; + BYTE cbName; + CHAR szName[1]; +} PIPEINFO; +typedef PIPEINFO *PPIPEINFO; + +typedef struct _PIPESEMSTATE +{ + BYTE fStatus; + BYTE fFlag; + USHORT usKey; + USHORT usAvail; +} PIPESEMSTATE; +typedef PIPESEMSTATE *PPIPESEMSTATE; + +ULONG DosCallNPipe (PCSZ pszName, PVOID pInbuf, ULONG ulInbufLength, + PVOID pOutbuf, ULONG ulOutbufSize, PULONG pulActualLength, + ULONG ulTimeout); +ULONG DosConnectNPipe (HPIPE hpipe); +ULONG DosCreateNPipe (PCSZ pszName, PHPIPE phpipe, ULONG ulOpenMode, + ULONG ulPipeMode, ULONG ulInbufLength, ULONG ulOutbufLength, + ULONG ulTimeout); +ULONG DosDisConnectNPipe (HPIPE hpipe); +ULONG DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength, + PULONG pulActualLength, PAVAILDATA pAvail, PULONG pulState); +ULONG DosQueryNPHState (HPIPE hpipe, PULONG pulState); +ULONG DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf, + ULONG ulBufLength); +ULONG DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState, + ULONG ulBufLength); +ULONG DosRawReadNPipe (PCSZ pszName, ULONG ulCount, PULONG pulLength, + PVOID pBuf); +ULONG DosRawWriteNPipe (PCSZ pszName, ULONG ulCount); +ULONG DosSetNPHState (HPIPE hpipe, ULONG ulState); +ULONG DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey); +ULONG DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength, + PVOID pInbuf, ULONG ulInbufLength, PULONG pulBytesRead); +ULONG DosWaitNPipe (PCSZ pszName, ULONG ulTimeout); + +/* ------------------------------- QUEUES --------------------------------- */ + +#if defined (INCL_DOSQUEUES) + +#define QUE_FIFO 0x0000 +#define QUE_LIFO 0x0001 +#define QUE_PRIORITY 0x0002 +#define QUE_NOCONVERT_ADDRESS 0x0000 +#define QUE_CONVERT_ADDRESS 0x0004 + +typedef struct _REQUESTDATA +{ + PID pid; + ULONG ulData; +} REQUESTDATA; +typedef REQUESTDATA *PREQUESTDATA; + +ULONG DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle, + ULONG ulPipeSize); + +ULONG DosCloseQueue (HQUEUE hq); +ULONG DosCreateQueue (PHQUEUE phq, ULONG ulPriority, PCSZ pszName); +ULONG DosOpenQueue (PPID ppid, PHQUEUE phq, PCSZ pszName); +ULONG DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength, + PPVOID pDataAddress, PULONG pulElement, BOOL32 fNowait, PBYTE pPriority, + HEV hsem); +ULONG DosPurgeQueue (HQUEUE hq); +ULONG DosQueryQueue (HQUEUE hq, PULONG pulCount); +ULONG DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength, + PPVOID pDataAddress, ULONG pulElement, BOOL32 fNowait, PBYTE pPriority, + HEV hsem); +ULONG DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength, + PVOID pData, ULONG ulPriority); + +#endif /* INCL_DOSQUEUES */ + +/* --------------------------- EXCEPTIONS --------------------------------- */ + +#if defined (INCL_DOSEXCEPTIONS) + +#define CONTEXT_CONTROL 0x0001 +#define CONTEXT_INTEGER 0x0002 +#define CONTEXT_SEGMENTS 0x0004 +#define CONTEXT_FLOATING_POINT 0x0008 +#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | \ + CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT) + +#define EH_NONCONTINUABLE 0x0001 +#define EH_UNWINDING 0x0002 +#define EH_EXIT_UNWIND 0x0004 +#define EH_STACK_INVALID 0x0008 +#define EH_NESTED_CALL 0x0010 + +#define SIG_UNSETFOCUS 0 +#define SIG_SETFOCUS 1 + +#define UNWIND_ALL 0 + +#define XCPT_CONTINUE_SEARCH 0x00000000 +#define XCPT_CONTINUE_EXECUTION 0xffffffff +#define XCPT_CONTINUE_STOP 0x00716668 + +#define XCPT_SIGNAL_INTR 1 +#define XCPT_SIGNAL_KILLPROC 3 +#define XCPT_SIGNAL_BREAK 4 + +#define XCPT_FATAL_EXCEPTION 0xc0000000 +#define XCPT_SEVERITY_CODE 0xc0000000 +#define XCPT_CUSTOMER_CODE 0x20000000 +#define XCPT_FACILITY_CODE 0x1fff0000 +#define XCPT_EXCEPTION_CODE 0x0000ffff + +#define XCPT_UNKNOWN_ACCESS 0x00000000 +#define XCPT_READ_ACCESS 0x00000001 +#define XCPT_WRITE_ACCESS 0x00000002 +#define XCPT_EXECUTE_ACCESS 0x00000004 +#define XCPT_SPACE_ACCESS 0x00000008 +#define XCPT_LIMIT_ACCESS 0x00000010 +#define XCPT_DATA_UNKNOWN 0xffffffff + +#define XCPT_GUARD_PAGE_VIOLATION 0x80000001 +#define XCPT_UNABLE_TO_GROW_STACK 0x80010001 +#define XCPT_ACCESS_VIOLATION 0xc0000005 +#define XCPT_IN_PAGE_ERROR 0xc0000006 +#define XCPT_ILLEGAL_INSTRUCTION 0xc000001c +#define XCPT_INVALID_LOCK_SEQUENCE 0xc000001d +#define XCPT_NONCONTINUABLE_EXCEPTION 0xc0000024 +#define XCPT_INVALID_DISPOSITION 0xc0000025 +#define XCPT_UNWIND 0xc0000026 +#define XCPT_BAD_STACK 0xc0000027 +#define XCPT_INVALID_UNWIND_TARGET 0xc0000028 +#define XCPT_ARRAY_BOUNDS_EXCEEDED 0xc0000093 +#define XCPT_FLOAT_DENORMAL_OPERAND 0xc0000094 +#define XCPT_FLOAT_DIVIDE_BY_ZERO 0xc0000095 +#define XCPT_FLOAT_INEXACT_RESULT 0xc0000096 +#define XCPT_FLOAT_INVALID_OPERATION 0xc0000097 +#define XCPT_FLOAT_OVERFLOW 0xc0000098 +#define XCPT_FLOAT_STACK_CHECK 0xc0000099 +#define XCPT_FLOAT_UNDERFLOW 0xc000009a +#define XCPT_INTEGER_DIVIDE_BY_ZERO 0xc000009b +#define XCPT_INTEGER_OVERFLOW 0xc000009c +#define XCPT_PRIVILEGED_INSTRUCTION 0xc000009d +#define XCPT_DATATYPE_MISALIGNMENT 0xc000009e +#define XCPT_BREAKPOINT 0xc000009f +#define XCPT_SINGLE_STEP 0xc00000a0 +#define XCPT_PROCESS_TERMINATE 0xc0010001 +#define XCPT_ASYNC_PROCESS_TERMINATE 0xc0010002 +#define XCPT_SIGNAL 0xc0010003 + +typedef struct _fpreg /* Note 1 */ +{ + ULONG losig; + ULONG hisig; + USHORT signexp; +} FPREG; +typedef FPREG *PFPREG; + +typedef struct _CONTEXT /* Note 1 */ +{ + ULONG ContextFlags; + ULONG ctx_env[7]; + FPREG ctx_stack[8]; + ULONG ctx_SegGs; + ULONG ctx_SegFs; + ULONG ctx_SegEs; + ULONG ctx_SegDs; + ULONG ctx_RegEdi; + ULONG ctx_RegEsi; + ULONG ctx_RegEax; + ULONG ctx_RegEbx; + ULONG ctx_RegEcx; + ULONG ctx_RegEdx; + ULONG ctx_RegEbp; + ULONG ctx_RegEip; + ULONG ctx_SegCs; + ULONG ctx_EFlags; + ULONG ctx_RegEsp; + ULONG ctx_SegSs; +} CONTEXTRECORD; +typedef CONTEXTRECORD *PCONTEXTRECORD; + +#define EXCEPTION_MAXIMUM_PARAMETERS 4 + +typedef struct _EXCEPTIONREPORTRECORD +{ + ULONG ExceptionNum; + ULONG fHandlerFlags; + struct _EXCEPTIONREPORTRECORD * NestedExceptionReportRecord; + PVOID ExceptionAddress; + ULONG cParameters; + ULONG ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTIONREPORTRECORD; +typedef EXCEPTIONREPORTRECORD *PEXCEPTIONREPORTRECORD; + +struct _EXCEPTIONREGISTRATIONRECORD; + +typedef ULONG _ERR (PEXCEPTIONREPORTRECORD pReport, + struct _EXCEPTIONREGISTRATIONRECORD *pRegistration, + PCONTEXTRECORD pContext, PVOID pWhatever); +typedef _ERR *ERR; + +typedef struct _EXCEPTIONREGISTRATIONRECORD +{ + struct _EXCEPTIONREGISTRATIONRECORD * __volatile__ prev_structure; + ERR __volatile__ ExceptionHandler; +} EXCEPTIONREGISTRATIONRECORD; +typedef EXCEPTIONREGISTRATIONRECORD *PEXCEPTIONREGISTRATIONRECORD; + +#define END_OF_CHAIN ((PEXCEPTIONREGISTRATIONRECORD)(-1)) + +ULONG DosAcknowledgeSignalException (ULONG ulSignal); +ULONG DosEnterMustComplete (PULONG pulNesting); +ULONG DosExitMustComplete (PULONG pulNesting); +ULONG DosQueryThreadContext (TID tid, ULONG ulLevel, PCONTEXTRECORD pContext); +ULONG DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec); +ULONG DosSendSignalException (PID pid, ULONG ulSignal); +ULONG DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec); +ULONG DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes); +ULONG DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec); +ULONG DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec, + PVOID pJumpThere, PEXCEPTIONREPORTRECORD pXRepRec); + +#endif /* INCL_DOSEXCEPTIONS */ + +/* --------------------------- INFORMATION -------------------------------- */ + +#if defined (INCL_DOSMISC) + +#define QSV_MAX_PATH_LENGTH 1 +#define QSV_MAX_TEXT_SESSIONS 2 +#define QSV_MAX_PM_SESSIONS 3 +#define QSV_MAX_VDM_SESSIONS 4 +#define QSV_BOOT_DRIVE 5 +#define QSV_DYN_PRI_VARIATION 6 +#define QSV_MAX_WAIT 7 +#define QSV_MIN_SLICE 8 +#define QSV_MAX_SLICE 9 +#define QSV_PAGE_SIZE 10 +#define QSV_VERSION_MAJOR 11 +#define QSV_VERSION_MINOR 12 +#define QSV_VERSION_REVISION 13 +#define QSV_MS_COUNT 14 +#define QSV_TIME_LOW 15 +#define QSV_TIME_HIGH 16 +#define QSV_TOTPHYSMEM 17 +#define QSV_TOTRESMEM 18 +#define QSV_TOTAVAILMEM 19 +#define QSV_MAXPRMEM 20 +#define QSV_MAXSHMEM 21 +#define QSV_TIMER_INTERVAL 22 +#define QSV_MAX_COMP_LENGTH 23 +#define QSV_FOREGROUND_FS_SESSION 24 +#define QSV_FOREGROUND_PROCESS 25 +#define QSV_MAX QSV_FOREGROUND_PROCESS + +#define SIS_MMIOADDR 0 +#define SIS_MEC_TABLE 1 +#define SIS_SYS_LOG 2 + +ULONG DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf, + ULONG ulBufLength); +ULONG DosScanEnv (PCSZ pszName, PSZ *pszValue); +ULONG DosQueryRASInfo (ULONG Index, PPVOID Addr); + +#endif /* INCL_DOSMISC */ + +/* ---------------------------- TIMERS ------------------------------------ */ + +#if defined (INCL_DOSDATETIME) || !defined (INCL_NOCOMMON) + +typedef struct _DATETIME +{ + UCHAR hours; + UCHAR minutes; + UCHAR seconds; + UCHAR hundredths; + UCHAR day; + UCHAR month; + USHORT year; + SHORT timezone; + UCHAR weekday; +} DATETIME; +typedef DATETIME *PDATETIME; + +ULONG DosGetDateTime (PDATETIME pdt); +ULONG DosSetDateTime (__const__ DATETIME *pdt); + +#endif /* INCL_DOSDATETIME || !INCL_NOCOMMON */ + + +#if defined (INCL_DOSDATETIME) + +typedef LHANDLE HTIMER; +typedef HTIMER *PHTIMER; + +ULONG DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer); +ULONG DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer); +ULONG DosStopTimer (HTIMER htimer); + +#endif /* INCL_DOSDATETIME */ + +#if defined (INCL_DOSPROFILE) + +typedef struct _QWORD +{ + ULONG ulLo; + ULONG ulHi; +} QWORD; +typedef QWORD *PQWORD; + +ULONG DosTmrQueryFreq (PULONG pulTmrFreq); +ULONG DosTmrQueryTime (PQWORD pqwTmrTime); + +#endif /* INCL_DOSPROFILE */ + +/* ---------------------- VIRTUAL DOS MACHINES----------------------------- */ + +typedef USHORT SGID; + +#if defined (INCL_DOSMVDM) + +typedef LHANDLE HVDD; +typedef HVDD *PHVDD; + +ULONG DosCloseVDD (HVDD hvdd); +ULONG DosOpenVDD (PCSZ pszVDD, PHVDD phvdd); +ULONG DosQueryDOSProperty (SGID sgidSesssionID, PCSZ pszName, + ULONG ulBufferLength, PSZ pBuffer); +ULONG DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand, + ULONG ulInputBufferLength, PVOID pInputBuffer, + ULONG ulOutputBufferLength, PVOID pOutputBuffer); +ULONG DosSetDOSProperty (SGID sgidSessionID, PCSZ pszName, + ULONG ulBufferLength, PCSZ pBuffer); + +#endif /* INCL_DOSMVDM */ + +/* --------------------------- DEBUGGING ---------------------------------- */ + +#if defined (INCL_DOSPROCESS) + +#define DBG_C_Null 0 +#define DBG_C_ReadMem 1 +#define DBG_C_ReadMem_I 1 +#define DBG_C_ReadMem_D 2 +#define DBG_C_ReadReg 3 +#define DBG_C_WriteMem 4 +#define DBG_C_WriteMem_I 4 +#define DBG_C_WriteMem_D 5 +#define DBG_C_WriteReg 6 +#define DBG_C_Go 7 +#define DBG_C_Term 8 +#define DBG_C_SStep 9 +#define DBG_C_Stop 10 +#define DBG_C_Freeze 11 +#define DBG_C_Resume 12 +#define DBG_C_NumToAddr 13 +#define DBG_C_ReadCoRegs 14 +#define DBG_C_WriteCoRegs 15 +#define DBG_C_ThrdStat 17 +#define DBG_C_MapROAlias 18 +#define DBG_C_MapRWAlias 19 +#define DBG_C_UnMapAlias 20 +#define DBG_C_Connect 21 +#define DBG_C_ReadMemBuf 22 +#define DBG_C_WriteMemBuf 23 +#define DBG_C_SetWatch 24 +#define DBG_C_ClearWatch 25 +#define DBG_C_RangeStep 26 +#define DBG_C_Continue 27 +#define DBG_C_AddrToObject 28 +#define DBG_C_XchngOpcode 29 +#define DBG_C_LinToSel 30 +#define DBG_C_SelToLin 31 + +#define DBG_N_Success 0 +#define DBG_N_Error (-1) +#define DBG_N_ProcTerm (-6) +#define DBG_N_Exception (-7) +#define DBG_N_ModuleLoad (-8) +#define DBG_N_CoError (-9) +#define DBG_N_ThreadTerm (-10) +#define DBG_N_AsyncStop (-11) +#define DBG_N_NewProc (-12) +#define DBG_N_AliasFree (-13) +#define DBG_N_Watchpoint (-14) +#define DBG_N_ThreadCreate (-15) +#define DBG_N_ModuleFree (-16) +#define DBG_N_RangeStep (-17) + +#define DBG_D_Thawed 0 +#define DBG_D_Frozen 1 + +#define DBG_T_Runnable 0 +#define DBG_T_Suspended 1 +#define DBG_T_Blocked 2 +#define DBG_T_CritSec 3 + +#define DBG_L_386 1 + +#define DBG_LEN_387 108 + +#define DBG_CO_387 1 + +#define DBG_O_OBJMTE 0x10000000 + +#define DBG_W_Global 0x00000001 +#define DBG_W_Local 0x00000002 +#define DBG_W_Execute 0x00010000 +#define DBG_W_Write 0x00020000 +#define DBG_W_ReadWrite 0x00030000 + +#define DBG_X_PRE_FIRST_CHANCE 0x00000000 +#define DBG_X_FIRST_CHANCE 0x00000001 +#define DBG_X_LAST_CHANCE 0x00000002 +#define DBG_X_STACK_INVALID 0x00000003 + +typedef struct _TStat +{ + UCHAR DbgState; + UCHAR TState; + USHORT TPriority; +} TStat_t; + +typedef struct _uDB +{ + ULONG Pid; + ULONG Tid; + LONG Cmd; + LONG Value; + ULONG Addr; + ULONG Buffer; + ULONG Len; + ULONG Index; + ULONG MTE; + ULONG EAX; + ULONG ECX; + ULONG EDX; + ULONG EBX; + ULONG ESP; + ULONG EBP; + ULONG ESI; + ULONG EDI; + ULONG EFlags; + ULONG EIP; + ULONG CSLim; + ULONG CSBase; + UCHAR CSAcc; + UCHAR CSAtr; + USHORT CS; + ULONG DSLim; + ULONG DSBase; + UCHAR DSAcc; + UCHAR DSAtr; + USHORT DS; + ULONG ESLim; + ULONG ESBase; + UCHAR ESAcc; + UCHAR ESAtr; + USHORT ES; + ULONG FSLim; + ULONG FSBase; + UCHAR FSAcc; + UCHAR FSAtr; + USHORT FS; + ULONG GSLim; + ULONG GSBase; + UCHAR GSAcc; + UCHAR GSAtr; + USHORT GS; + ULONG SSLim; + ULONG SSBase; + UCHAR SSAcc; + UCHAR SSAtr; + USHORT SS; +} uDB_t; + +ULONG DosDebug (uDB_t *pDebugBuffer); + +#endif /* INCL_DOSPROCESS */ + +/* ---------------------------- MESSAGES ---------------------------------- */ + +#if defined (INCL_DOSMISC) + +ULONG DosGetMessage (PCHAR *pTable, ULONG ulTableEntries, + PCHAR pBuffer, ULONG ulBufferLengthMax, ULONG ulMsgnNumber, + PCSZ pszFile, PULONG pulBufferLength); +ULONG DosInsertMessage (PCHAR *pTable, ULONG ulCount, PCSZ pszMsg, + ULONG ulMsgLength, PCHAR pBuffer, ULONG ulBufferLengthMax, + PULONG pulBufferLength); +ULONG DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage); +ULONG DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax, + PCSZ pszFilename, PULONG pulBufferLength); + +#endif /* INCL_DOSMISC */ + +/* ----------------------------- RAS -------------------------------------- */ + +#if defined (INCL_DOSRAS) + +#define DDP_DISABLEPROCDUMP 0 +#define DDP_ENABLEPROCDUMP 1 +#define DDP_PERFORMPROCDUMP 2 + +#define LF_LOGENABLE 0x0001 +#define LF_LOGAVAILABLE 0x0002 + +#define SIS_MMIOADDR 0 +#define SIS_MEC_TABLE 1 +#define SIS_SYS_LOG 2 + +#define SPU_DISABLESUPPRESSION 0 +#define SPU_ENABLESUPPRESSION 1 + +ULONG DosDumpProcess (ULONG ulFlag, ULONG ulDrive, PID pid); +ULONG DosForceSystemDump (ULONG ulReserved); +ULONG DosQueryRASInfo (ULONG ulIndex, PPVOID addr); +ULONG DosSuppressPopUps (ULONG ulFlag, ULONG ulDrive); + +#endif /* INCL_DOSRAS */ + +/* ---------------------------- REXX -------------------------------------- */ + +#define RXAUTOBUFLEN 256 + +typedef struct _RXSTRING +{ + ULONG strlength; + PCH strptr; +} RXSTRING; +typedef RXSTRING *PRXSTRING; + +typedef struct _RXSYSEXIT +{ + PSZ sysexit_name; + LONG sysexit_code; +} RXSYSEXIT; +typedef RXSYSEXIT *PRXSYSEXIT; + +#define RXNULLSTRING(r) ((r).strptr == (PCH)0) +#define RXZEROLENSTRING(r) ((r).strptr != (PCH)0 && (r).strlength == 0) +#define RXVALIDSTRING(r) ((r).strptr != (PCH)0 && (r).strlength != 0) +#define RXSTRLEN(r) (RXNULLSTRING(r) ? 0 : (r).strlength) +#define RXSTRPTR(r) (r).strptr +#define MAKERXSTRING(r,p,l) \ + ((r).strptr = (PCH)p, (r).strlength = (ULONG)l) + +#define RXCOMMAND 0 +#define RXSUBROUTINE 1 +#define RXFUNCTION 2 + +#if defined (INCL_RXSUBCOM) + +#define RXSUBCOM_DROPPABLE 0x0000 +#define RXSUBCOM_NONDROP 0x0001 + +#define RXSUBCOM_ISREG 0x0001 +#define RXSUBCOM_ERROR 0x0001 +#define RXSUBCOM_FAILURE 0x0002 + +#define RXSUBCOM_BADENTRY 1001 +#define RXSUBCOM_NOEMEM 1002 +#define RXSUBCOM_BADTYPE 1003 +#define RXSUBCOM_NOTINIT 1004 + +#define RXSUBCOM_OK 0 +#define RXSUBCOM_DUP 10 +#define RXSUBCOM_MAXREG 20 +#define RXSUBCOM_NOTREG 30 +#define RXSUBCOM_NOCANDROP 40 +#define RXSUBCOM_LOADERR 50 +#define RXSUBCOM_NOPROC 127 + +typedef ULONG RexxSubcomHandler (PRXSTRING prxCommand, PUSHORT pusFlags, + PRXSTRING prxResult); + +ULONG RexxDeregisterSubcom (PCSZ pszEnvName, PCSZ pszModuleName); +ULONG RexxQuerySubcom (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlags, + PUCHAR pUserWord); +ULONG RexxRegisterSubcomDll (PCSZ pszEnvName, PCSZ pszModuleName, + PCSZ pszEntryPoint, PUCHAR pUserArea, ULONG ulDropAuth); +ULONG RexxRegisterSubcomExe (PCSZ pszEnvName, PFN pfnEntryPoint, + PUCHAR pUserArea); + +#define REXXDEREGISTERSUBCOM RexxDeregisterSubcom +#define REXXREGISTERSUBCOMDLL RexxRegisterSubcomDll +#define REXXREGISTERSUBCOMEXE RexxRegisterSubcomExe +#define REXXQUERYSUBCOM RexxQuerySubcom + +#endif /* INCL_RXSUBCOM */ + +#if defined (INCL_RXSHV) + +#define RXSHV_SET 0x0000 +#define RXSHV_FETCH 0x0001 +#define RXSHV_DROPV 0x0002 +#define RXSHV_SYSET 0x0003 +#define RXSHV_SYFET 0x0004 +#define RXSHV_SYDRO 0x0005 +#define RXSHV_NEXTV 0x0006 +#define RXSHV_PRIV 0x0007 +#define RXSHV_EXIT 0x0008 + +#define RXSHV_NOAVL 144 + +#define RXSHV_OK 0x0000 +#define RXSHV_NEWV 0x0001 +#define RXSHV_LVAR 0x0002 +#define RXSHV_TRUNC 0x0004 +#define RXSHV_BADN 0x0008 +#define RXSHV_MEMFL 0x0010 +#define RXSHV_BADF 0x0080 + +typedef struct _SHVBLOCK +{ + struct _SHVBLOCK *shvnext; + RXSTRING shvname; + RXSTRING shvvalue; + ULONG shvnamelen; + ULONG shvvaluelen; + UCHAR shvcode; + UCHAR shvret; +} SHVBLOCK; +typedef SHVBLOCK *PSHVBLOCK; + +ULONG RexxVariablePool (PSHVBLOCK pRequest); + +#define REXXVARIABLEPOOL RexxVariablePool + +#endif /* INCL_RXSHV */ + +#if defined (INCL_RXFUNC) + +#define RXFUNC_DYNALINK 1 +#define RXFUNC_CALLENTRY 2 + +#define RXFUNC_OK 0 +#define RXFUNC_DEFINED 10 +#define RXFUNC_NOMEM 20 +#define RXFUNC_NOTREG 30 +#define RXFUNC_MODNOTFND 40 +#define RXFUNC_ENTNOTFND 50 +#define RXFUNC_NOTINIT 60 +#define RXFUNC_BADTYPE 70 + +typedef ULONG RexxFunctionHandler (PCSZ pszName, ULONG ulArgCount, + PRXSTRING prxArgList, PCSZ pszQueueName, PRXSTRING prxResult); + +ULONG RexxDeregisterFunction (PCSZ pszFuncName); +ULONG RexxQueryFunction (PCSZ pszFuncName); +ULONG RexxRegisterFunctionDll (PCSZ pszFuncName, PCSZ pszModuleName, + PCSZ pszEntryPoint); +ULONG RexxRegisterFunctionExe (PCSZ pszFuncName, + RexxFunctionHandler *pfnEntryPoint); + +#define REXXDEREGISTERFUNCTION RexxDeregisterFunction +#define REXXQUERYFUNCTION RexxQueryFunction +#define REXXREGISTERFUNCTIONDLL RexxRegisterFunctionDll +#define REXXREGISTERFUNCTIONEXE RexxRegisterFunctionExe + +#endif /* INCL_RXFUNC */ + +#if defined (INCL_RXSYSEXIT) + +#define RXEXIT_DROPPABLE 0x0000 +#define RXEXIT_NONDROP 0x0001 + +#define RXEXIT_HANDLED 0 +#define RXEXIT_NOT_HANDLED 1 +#define RXEXIT_RAISE_ERROR (-1) + +#define RXEXIT_ISREG 0x0001 +#define RXEXIT_ERROR 0x0001 +#define RXEXIT_FAILURE 0x0002 + +#define RXEXIT_BADENTRY 1001 +#define RXEXIT_NOEMEM 1002 +#define RXEXIT_BADTYPE 1003 +#define RXEXIT_NOTINIT 1004 + +#define RXEXIT_OK 0 +#define RXEXIT_DUP 10 +#define RXEXIT_MAXREG 20 +#define RXEXIT_NOTREG 30 +#define RXEXIT_NOCANDROP 40 +#define RXEXIT_LOADERR 50 +#define RXEXIT_NOPROC 127 + +#define RXENDLST 0 + +#define RXFNC 2 +#define RXFNCCAL 1 + +#define RXCMD 3 +#define RXCMDHST 1 + +#define RXMSQ 4 +#define RXMSQPLL 1 +#define RXMSQPSH 2 +#define RXMSQSIZ 3 +#define RXMSQNAM 20 + +#define RXSIO 5 +#define RXSIOSAY 1 +#define RXSIOTRC 2 +#define RXSIOTRD 3 +#define RXSIODTR 4 +#define RXSIOTLL 5 + +#define RXHLT 7 +#define RXHLTCLR 1 +#define RXHLTTST 2 + +#define RXTRC 8 +#define RXTRCTST 1 + +#define RXINI 9 +#define RXINIEXT 1 + +#define RXTER 10 +#define RXTEREXT 1 + +#define RXNOOFEXITS 11 + +typedef PUCHAR PEXIT; + +typedef struct _RXFNC_FLAGS +{ + ULONG rxfferr : 1; + ULONG rxffnfnd : 1; + ULONG rxffsub : 1; +} RXFNC_FLAGS; + +typedef struct _RXFNCCAL_PARM +{ + RXFNC_FLAGS rxfnc_flags; + PUCHAR rxfnc_name; + USHORT rxfnc_namel; + PUCHAR rxfnc_que; + USHORT rxfnc_quel; + USHORT rxfnc_argc; + PRXSTRING rxfnc_argv; + RXSTRING rxfnc_retc; +} RXFNCCAL_PARM; + +typedef struct _RXCMD_FLAGS +{ + ULONG rxfcfail : 1; + ULONG rxfcerr : 1; +} RXCMD_FLAGS; + +typedef struct _RXCMDHST_PARM +{ + RXCMD_FLAGS rxcmd_flags; + PUCHAR rxcmd_address; + USHORT rxcmd_addressl; + PUCHAR rxcmd_dll; + USHORT rxcmd_dll_len; + RXSTRING rxcmd_command; + RXSTRING rxcmd_retc; +} RXCMDHST_PARM; + +typedef struct _RXMSQPLL_PARM +{ + RXSTRING rxmsq_retc; +} RXMSQPLL_PARM; + +typedef struct _RXMSQ_FLAGS +{ + ULONG rxfmlifo : 1; +} RXMSQ_FLAGS; + +typedef struct _RXMSQPSH_PARM +{ + RXMSQ_FLAGS rxmsq_flags; + RXSTRING rxmsq_value; +} RXMSQPSH_PARM; + +typedef struct _RXMSQSIZ_PARM +{ + ULONG rxmsq_size; +} RXMSQSIZ_PARM; + +typedef struct _RXMSQNAM_PARM +{ + RXSTRING rxmsq_name; +} RXMSQNAM_PARM; + +typedef struct _RXSIOSAY_PARM +{ + RXSTRING rxsio_string; +} RXSIOSAY_PARM; + +typedef struct _RXSIOTRC_PARM +{ + RXSTRING rxsio_string; +} RXSIOTRC_PARM; + +typedef struct _RXSIOTRD_PARM +{ + RXSTRING rxsiotrd_retc; +} RXSIOTRD_PARM; + +typedef struct _RXSIODR_PARM +{ + RXSTRING rxsiodtr_retc; +} RXSIODTR_PARM; + +typedef struct _RXHLT_FLAGS +{ + ULONG rxfhhalt : 1; +} RXHLT_FLAGS; + +typedef struct _RXHLTTST_PARM +{ + RXHLT_FLAGS rxhlt_flags; +} RXHLTTST_PARM; + +typedef struct _RXTRC_FLAGS +{ + ULONG rxftrace : 1; +} RXTRC_FLAGS; + +typedef struct _RXTRCTST_PARM +{ + RXTRC_FLAGS rxtrc_flags; +} RXTRCTST_PARM; + +typedef LONG RexxExitHandler (LONG lExitNumber, LONG lSubfunction, + PEXIT pParmBlock); + +ULONG RexxDeregisterExit (PCSZ pszEnvName, PCSZ pszModuleName); +ULONG RexxQueryExit (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlag, + PUCHAR pUserWord); +ULONG RexxRegisterExitDll (PCSZ pszEnvName, PCSZ pszModuleName, + PCSZ pszEntryName, PUCHAR pUserArea, ULONG ulDropAuth); +ULONG RexxRegisterExitExe (PCSZ pszEnvName, PFN pfnEntryPoint, + PUCHAR pUserArea); + +#define REXXDEREGISTEREXIT RexxDeregisterExit +#define REXXQUERYEXIT RexxQueryExit +#define REXXREGISTEREXITDLL RexxRegisterExitDll +#define REXXREGISTEREXITEXE RexxRegisterExitExe + +#endif /* INCL_RXSYSEXIT */ + +#if defined (INCL_RXARI) + +#define RXARI_OK 0 +#define RXARI_NOT_FOUND 1 +#define RXARI_PROCESSING_ERROR 2 + +ULONG RexxResetTrace (PID pid, TID tid); +ULONG RexxSetHalt (PID pid, TID tid); +ULONG RexxSetTrace (PID pid, TID tid); + +#define REXXRESETTRACE RexxResetTrace +#define REXXSETHALT RexxSetHalt +#define REXXSETTRACE RexxSetTrace + +#endif /* INCL_RXARI */ + +#if defined (INCL_RXMACRO) + +#define RXMACRO_SEARCH_BEFORE 1 +#define RXMACRO_SEARCH_AFTER 2 + +#define RXMACRO_OK 0 +#define RXMACRO_NO_STORAGE 1 +#define RXMACRO_NOT_FOUND 2 +#define RXMACRO_EXTENSION_REQUIRED 3 +#define RXMACRO_ALREADY_EXISTS 4 +#define RXMACRO_FILE_ERROR 5 +#define RXMACRO_SIGNATURE_ERROR 6 +#define RXMACRO_SOURCE_NOT_FOUND 7 +#define RXMACRO_INVALID_POSITION 8 +#define RXMACRO_NOT_INIT 9 + +ULONG RexxAddMacro (PCSZ pszFuncName, PCSZ pszSourceFile, ULONG ulPosition); +ULONG RexxClearMacroSpace (VOID); +ULONG RexxDropMacro (PCSZ pszFuncName); +ULONG RexxLoadMacroSpace (ULONG ulFuncCout, PCSZ *apszFuncNames, + PCSZ pszMacroLibFile); +ULONG RexxQueryMacro (PCSZ pszFuncName, PUSHORT pusPosition); +ULONG RexxReorderMacro(PCSZ pszFuncName, ULONG ulPosition); +ULONG RexxSaveMacroSpace (ULONG ulFuncCount, PCSZ *apszFuncNames, + PCSZ pszMacroLibFile); + +#define REXXADDMACRO RexxAddMacro +#define REXXCLEARMACROSPACE RexxClearMacroSpace +#define REXXDROPMACRO RexxDropMacro +#define REXXSAVEMACROSPACE RexxSaveMacroSpace +#define REXXLOADMACROSPACE RexxLoadMacroSpace +#define REXXQUERYMACRO RexxQueryMacro +#define REXXREORDERMACRO RexxReorderMacro + +#endif /* INCL_RXMACRO */ + +LONG RexxStart (LONG lArgCount, PRXSTRING prxArgList, PCSZ pszProgramName, + PRXSTRING prxInstore, PCSZ pszEnvName, LONG lCallType, PRXSYSEXIT pExits, + PSHORT psReturnCode, PRXSTRING prxResult); + +#define REXXSTART RexxStart + +/* ----------------------- PRESENTATION MANAGER --------------------------- */ + +#define CTLS_WM_BIDI_FIRST 0x390 +#define CTLS_WM_BIDI_LAST 0x39f + +#if defined (INCL_NLS) +#define WM_DBCSFIRST 0x00b0 +#define WM_DBCSLAST 0x00cf +#endif /* INCL_NLS */ + +#define WC_FRAME ((PSZ)0xffff0001) +#define WC_COMBOBOX ((PSZ)0xffff0002) +#define WC_BUTTON ((PSZ)0xffff0003) +#define WC_MENU ((PSZ)0xffff0004) +#define WC_STATIC ((PSZ)0xffff0005) +#define WC_ENTRYFIELD ((PSZ)0xffff0006) +#define WC_LISTBOX ((PSZ)0xffff0007) +#define WC_SCROLLBAR ((PSZ)0xffff0008) +#define WC_TITLEBAR ((PSZ)0xffff0009) +#define WC_MLE ((PSZ)0xffff000a) +#define WC_APPSTAT ((PSZ)0xffff0010) +#define WC_KBDSTAT ((PSZ)0xffff0011) +#define WC_PECIC ((PSZ)0xffff0012) +#define WC_DBE_KKPOPUP ((PSZ)0xffff0013) +#define WC_SPINBUTTON ((PSZ)0xffff0020) +#define WC_CONTAINER ((PSZ)0xffff0025) +#define WC_SLIDER ((PSZ)0xffff0026) +#define WC_VALUESET ((PSZ)0xffff0027) +#define WC_NOTEBOOK ((PSZ)0xffff0028) +#define WC_PENFIRST ((PSZ)0xffff0029) +#define WC_PENLAST ((PSZ)0xffff002c) +#define WC_MMPMFIRST ((PSZ)0xffff0040) +#define WC_CIRCULARSLIDER ((PSZ)0xffff0041) +#define WC_MMPMLAST ((PSZ)0xffff004f) + +#define WS_VISIBLE 0x80000000 +#define WS_DISABLED 0x40000000 +#define WS_CLIPCHILDREN 0x20000000 +#define WS_CLIPSIBLINGS 0x10000000 +#define WS_PARENTCLIP 0x08000000 +#define WS_SAVEBITS 0x04000000 +#define WS_SYNCPAINT 0x02000000 +#define WS_MINIMIZED 0x01000000 +#define WS_MAXIMIZED 0x00800000 +#define WS_ANIMATE 0x00400000 +#define WS_GROUP 0x00010000 +#define WS_TABSTOP 0x00020000 +#define WS_MULTISELECT 0x00040000 + +#define CS_MOVENOTIFY 0x00000001 +#define CS_SIZEREDRAW 0x00000004 +#define CS_HITTEST 0x00000008 +#define CS_PUBLIC 0x00000010 +#define CS_FRAME 0x00000020 +#define CS_CLIPCHILDREN 0x20000000 +#define CS_CLIPSIBLINGS 0x10000000 +#define CS_PARENTCLIP 0x08000000 +#define CS_SAVEBITS 0x04000000 +#define CS_SYNCPAINT 0x02000000 + +#define MID_NONE (-1) +#define MID_ERROR (-1) + +#define DB_PATCOPY 0x0000 +#define DB_PATINVERT 0x0001 +#define DB_DESTINVERT 0x0002 +#define DB_AREAMIXMODE 0x0003 + +#define DB_ROP 0x0007 +#define DB_INTERIOR 0x0008 +#define DB_AREAATTRS 0x0010 +#define DB_STANDARD 0x0100 +#define DB_DLGBORDER 0x0200 + +#define DBM_NORMAL 0x0000 +#define DBM_INVERT 0x0001 +#define DBM_HALFTONE 0x0002 +#define DBM_STRETCH 0x0004 +#define DBM_IMAGEATTRS 0x0008 + +#define DT_LEFT 0x00000000 +#define DT_QUERYEXTENT 0x00000002 +#define DT_UNDERSCORE 0x00000010 +#define DT_STRIKEOUT 0x00000020 +#define DT_TEXTATTRS 0x00000040 +#define DT_EXTERNALLEADING 0x00000080 +#define DT_CENTER 0x00000100 +#define DT_RIGHT 0x00000200 +#define DT_TOP 0x00000000 +#define DT_VCENTER 0x00000400 +#define DT_BOTTOM 0x00000800 +#define DT_HALFTONE 0x00001000 +#define DT_MNEMONIC 0x00002000 +#define DT_WORDBREAK 0x00004000 +#define DT_ERASERECT 0x00008000 + +#define QW_NEXT 0 +#define QW_PREV 1 +#define QW_TOP 2 +#define QW_BOTTOM 3 +#define QW_OWNER 4 +#define QW_PARENT 5 +#define QW_NEXTTOP 6 +#define QW_PREVTOP 7 +#define QW_FRAMEOWNER 8 + +#define SWP_SIZE 0x0001 +#define SWP_MOVE 0x0002 +#define SWP_ZORDER 0x0004 +#define SWP_SHOW 0x0008 +#define SWP_HIDE 0x0010 +#define SWP_NOREDRAW 0x0020 +#define SWP_NOADJUST 0x0040 +#define SWP_ACTIVATE 0x0080 +#define SWP_DEACTIVATE 0x0100 +#define SWP_EXTSTATECHANGE 0x0200 +#define SWP_MINIMIZE 0x0400 +#define SWP_MAXIMIZE 0x0800 +#define SWP_RESTORE 0x1000 +#define SWP_FOCUSACTIVATE 0x2000 +#define SWP_FOCUSDEACTIVATE 0x4000 +#define SWP_NOAUTOCLOSE 0x8000 + +#define AWP_MINIMIZED 0x00010000 +#define AWP_MAXIMIZED 0x00020000 +#define AWP_RESTORED 0x00040000 +#define AWP_ACTIVATE 0x00080000 +#define AWP_DEACTIVATE 0x00100000 + +#define HWND_DESKTOP ((HWND)1) +#define HWND_OBJECT ((HWND)2) +#define HWND_TOP ((HWND)3) +#define HWND_BOTTOM ((HWND)4) +#define HWND_THREADCAPTURE ((HWND)5) + +#define EAF_DEFAULTOWNER 0x0001 +#define EAF_UNCHANGEABLE 0x0002 +#define EAF_REUSEICON 0x0004 + +#define ICON_FILE 1 +#define ICON_RESOURCE 2 +#define ICON_DATA 3 +#define ICON_CLEAR 4 + +#define SZDDEFMT_RTF "Rich Text Format" +#define SZDDEFMT_PTRPICT "Printer_Picture" + +#define STR_DLLNAME "keyremap" + +#if defined (INCL_WINERRORS) + +#define PMERR_INVALID_HWND 0x1001 +#define PMERR_INVALID_HMQ 0x1002 +#define PMERR_PARAMETER_OUT_OF_RANGE 0x1003 +#define PMERR_WINDOW_LOCK_UNDERFLOW 0x1004 +#define PMERR_WINDOW_LOCK_OVERFLOW 0x1005 +#define PMERR_BAD_WINDOW_LOCK_COUNT 0x1006 +#define PMERR_WINDOW_NOT_LOCKED 0x1007 +#define PMERR_INVALID_SELECTOR 0x1008 +#define PMERR_CALL_FROM_WRONG_THREAD 0x1009 +#define PMERR_RESOURCE_NOT_FOUND 0x100a +#define PMERR_INVALID_STRING_PARM 0x100b +#define PMERR_INVALID_HHEAP 0x100c +#define PMERR_INVALID_HEAP_POINTER 0x100d +#define PMERR_INVALID_HEAP_SIZE_PARM 0x100e +#define PMERR_INVALID_HEAP_SIZE 0x100f +#define PMERR_INVALID_HEAP_SIZE_WORD 0x1010 +#define PMERR_HEAP_OUT_OF_MEMORY 0x1011 +#define PMERR_HEAP_MAX_SIZE_REACHED 0x1012 +#define PMERR_INVALID_HATOMTBL 0x1013 +#define PMERR_INVALID_ATOM 0x1014 +#define PMERR_INVALID_ATOM_NAME 0x1015 +#define PMERR_INVALID_INTEGER_ATOM 0x1016 +#define PMERR_ATOM_NAME_NOT_FOUND 0x1017 +#define PMERR_QUEUE_TOO_LARGE 0x1018 +#define PMERR_INVALID_FLAG 0x1019 +#define PMERR_INVALID_HACCEL 0x101a +#define PMERR_INVALID_HPTR 0x101b +#define PMERR_INVALID_HENUM 0x101c +#define PMERR_INVALID_SRC_CODEPAGE 0x101d +#define PMERR_INVALID_DST_CODEPAGE 0x101e +#define PMERR_UNKNOWN_COMPONENT_ID 0x101f +#define PMERR_UNKNOWN_ERROR_CODE 0x1020 +#define PMERR_SEVERITY_LEVELS 0x1021 +#define PMERR_INVALID_RESOURCE_FORMAT 0x1034 +#define PMERR_NO_MSG_QUEUE 0x1036 +#define PMERR_CANNOT_SET_FOCUS 0x1037 +#define PMERR_QUEUE_FULL 0x1038 +#define PMERR_LIBRARY_LOAD_FAILED 0x1039 +#define PMERR_PROCEDURE_LOAD_FAILED 0x103a +#define PMERR_LIBRARY_DELETE_FAILED 0x103b +#define PMERR_PROCEDURE_DELETE_FAILED 0x103c +#define PMERR_ARRAY_TOO_LARGE 0x103d +#define PMERR_ARRAY_TOO_SMALL 0x103e +#define PMERR_DATATYPE_ENTRY_BAD_INDEX 0x103f +#define PMERR_DATATYPE_ENTRY_CTL_BAD 0x1040 +#define PMERR_DATATYPE_ENTRY_CTL_MISS 0x1041 +#define PMERR_DATATYPE_ENTRY_INVALID 0x1042 +#define PMERR_DATATYPE_ENTRY_NOT_NUM 0x1043 +#define PMERR_DATATYPE_ENTRY_NOT_OFF 0x1044 +#define PMERR_DATATYPE_INVALID 0x1045 +#define PMERR_DATATYPE_NOT_UNIQUE 0x1046 +#define PMERR_DATATYPE_TOO_LONG 0x1047 +#define PMERR_DATATYPE_TOO_SMALL 0x1048 +#define PMERR_DIRECTION_INVALID 0x1049 +#define PMERR_INVALID_HAB 0x104a +#define PMERR_INVALID_HSTRUCT 0x104d +#define PMERR_LENGTH_TOO_SMALL 0x104e +#define PMERR_MSGID_TOO_SMALL 0x104f +#define PMERR_NO_HANDLE_ALLOC 0x1050 +#define PMERR_NOT_IN_A_PM_SESSION 0x1051 +#define PMERR_MSG_QUEUE_ALREADY_EXISTS 0x1052 +#define PMERR_SEND_MSG_TIMEOUT 0x1053 +#define PMERROR_SEND_MSG_FAILED 0x1054 +#define PMERR_OLD_RESOURCE 0x1055 +#define PMERR_WPDSERVER_IS_ACTIVE 0x1056 +#define PMERR_WPDSERVER_NOT_STARTED 0x1057 +#define PMERR_SOMDD_IS_ACTIVE 0x1058 +#define PMERR_SOMDD_NOT_STARTED 0x1059 + +#define PMERR_BIDI_FIRST 0x10f0 +#define PMERR_BIDI_LAST 0x10ff + +#endif /* INCL_WINERRORS */ + +#if defined (INCL_SHLERRORS) + +#define PMERR_INVALID_PIB 0x1101 +#define PMERR_INSUFF_SPACE_TO_ADD 0x1102 +#define PMERR_INVALID_GROUP_HANDLE 0x1103 +#define PMERR_DUPLICATE_TITLE 0x1104 +#define PMERR_INVALID_TITLE 0x1105 +#define PMERR_HANDLE_NOT_IN_GROUP 0x1107 +#define PMERR_INVALID_TARGET_HANDLE 0x1106 +#define PMERR_INVALID_PATH_STATEMENT 0x1108 +#define PMERR_NO_PROGRAM_FOUND 0x1109 +#define PMERR_INVALID_BUFFER_SIZE 0x110a +#define PMERR_BUFFER_TOO_SMALL 0x110b +#define PMERR_PL_INITIALISATION_FAIL 0x110c +#define PMERR_CANT_DESTROY_SYS_GROUP 0x110d +#define PMERR_INVALID_TYPE_CHANGE 0x110e +#define PMERR_INVALID_PROGRAM_HANDLE 0x110f +#define PMERR_NOT_CURRENT_PL_VERSION 0x1110 +#define PMERR_INVALID_CIRCULAR_REF 0x1111 +#define PMERR_MEMORY_ALLOCATION_ERR 0x1112 +#define PMERR_MEMORY_DEALLOCATION_ERR 0x1113 +#define PMERR_TASK_HEADER_TOO_BIG 0x1114 +#define PMERR_INVALID_INI_FILE_HANDLE 0x1115 +#define PMERR_MEMORY_SHARE 0x1116 +#define PMERR_OPEN_QUEUE 0x1117 +#define PMERR_CREATE_QUEUE 0x1118 +#define PMERR_WRITE_QUEUE 0x1119 +#define PMERR_READ_QUEUE 0x111a +#define PMERR_CALL_NOT_EXECUTED 0x111b +#define PMERR_UNKNOWN_APIPKT 0x111c +#define PMERR_INITHREAD_EXISTS 0x111d +#define PMERR_CREATE_THREAD 0x111e +#define PMERR_NO_HK_PROFILE_INSTALLED 0x111f +#define PMERR_INVALID_DIRECTORY 0x1120 +#define PMERR_WILDCARD_IN_FILENAME 0x1121 +#define PMERR_FILENAME_BUFFER_FULL 0x1122 +#define PMERR_FILENAME_TOO_LONG 0x1123 +#define PMERR_INI_FILE_IS_SYS_OR_USER 0x1124 +#define PMERR_BROADCAST_PLMSG 0x1125 +#define PMERR_190_INIT_DONE 0x1126 +#define PMERR_HMOD_FOR_PMSHAPI 0x1127 +#define PMERR_SET_HK_PROFILE 0x1128 +#define PMERR_API_NOT_ALLOWED 0x1129 +#define PMERR_INI_STILL_OPEN 0x112a +#define PMERR_PROGDETAILS_NOT_IN_INI 0x112b +#define PMERR_PIBSTRUCT_NOT_IN_INI 0x112c +#define PMERR_INVALID_DISKPROGDETAILS 0x112d +#define PMERR_PROGDETAILS_READ_FAILURE 0x112e +#define PMERR_PROGDETAILS_WRITE_FAILURE 0x112f +#define PMERR_PROGDETAILS_QSIZE_FAILURE 0x1130 +#define PMERR_INVALID_PROGDETAILS 0x1131 +#define PMERR_SHEPROFILEHOOK_NOT_FOUND 0x1132 +#define PMERR_190PLCONVERTED 0x1133 +#define PMERR_FAILED_TO_CONVERT_INI_PL 0x1134 +#define PMERR_PMSHAPI_NOT_INITIALISED 0x1135 +#define PMERR_INVALID_SHELL_API_HOOK_ID 0x1136 +#define PMERR_DOS_ERROR 0x1200 +#define PMERR_NO_SPACE 0x1201 +#define PMERR_INVALID_SWITCH_HANDLE 0x1202 +#define PMERR_NO_HANDLE 0x1203 +#define PMERR_INVALID_PROCESS_ID 0x1204 +#define PMERR_NOT_SHELL 0x1205 +#define PMERR_INVALID_WINDOW 0x1206 +#define PMERR_INVALID_POST_MSG 0x1207 +#define PMERR_INVALID_PARAMETERS 0x1208 +#define PMERR_INVALID_PROGRAM_TYPE 0x1209 +#define PMERR_NOT_EXTENDED_FOCUS 0x120a +#define PMERR_INVALID_SESSION_ID 0x120b +#define PMERR_SMG_INVALID_ICON_FILE 0x120c +#define PMERR_SMG_ICON_NOT_CREATED 0x120d +#define PMERR_SHL_DEBUG 0x120e +#define PMERR_OPENING_INI_FILE 0x1301 +#define PMERR_INI_FILE_CORRUPT 0x1302 +#define PMERR_INVALID_PARM 0x1303 +#define PMERR_NOT_IN_IDX 0x1304 +#define PMERR_NO_ENTRIES_IN_GROUP 0x1305 +#define PMERR_INI_WRITE_FAIL 0x1306 +#define PMERR_IDX_FULL 0x1307 +#define PMERR_INI_PROTECTED 0x1308 +#define PMERR_MEMORY_ALLOC 0x1309 +#define PMERR_INI_INIT_ALREADY_DONE 0x130a +#define PMERR_INVALID_INTEGER 0x130b +#define PMERR_INVALID_ASCIIZ 0x130c +#define PMERR_CAN_NOT_CALL_SPOOLER 0x130d +#define PMERR_VALIDATION_REJECTED 0x130d /*!*/ +#define PMERR_WARNING_WINDOW_NOT_KILLED 0x1401 +#define PMERR_ERROR_INVALID_WINDOW 0x1402 +#define PMERR_ALREADY_INITIALIZED 0x1403 +#define PMERR_MSG_PROG_NO_MOU 0x1405 +#define PMERR_MSG_PROG_NON_RECOV 0x1406 +#define PMERR_WINCONV_INVALID_PATH 0x1407 +#define PMERR_PI_NOT_INITIALISED 0x1408 +#define PMERR_PL_NOT_INITIALISED 0x1409 +#define PMERR_NO_TASK_MANAGER 0x140a +#define PMERR_SAVE_NOT_IN_PROGRESS 0x140b +#define PMERR_NO_STACK_SPACE 0x140c +#define PMERR_INVALID_COLR_FIELD 0x140d +#define PMERR_INVALID_COLR_VALUE 0x140e +#define PMERR_COLR_WRITE 0x140f +#define PMERR_TARGET_FILE_EXISTS 0x1501 +#define PMERR_SOURCE_SAME_AS_TARGET 0x1502 +#define PMERR_SOURCE_FILE_NOT_FOUND 0x1503 +#define PMERR_INVALID_NEW_PATH 0x1504 +#define PMERR_TARGET_FILE_NOT_FOUND 0x1505 +#define PMERR_INVALID_DRIVE_NUMBER 0x1506 +#define PMERR_NAME_TOO_LONG 0x1507 +#define PMERR_NOT_ENOUGH_ROOM_ON_DISK 0x1508 +#define PMERR_NOT_ENOUGH_MEM 0x1509 +#define PMERR_LOG_DRV_DOES_NOT_EXIST 0x150b +#define PMERR_INVALID_DRIVE 0x150c +#define PMERR_ACCESS_DENIED 0x150d +#define PMERR_NO_FIRST_SLASH 0x150e +#define PMERR_READ_ONLY_FILE 0x150f +#define PMERR_GROUP_PROTECTED 0x151f +#define PMERR_INVALID_PROGRAM_CATEGORY 0x152f +#define PMERR_INVALID_APPL 0x1530 +#define PMERR_CANNOT_START 0x1531 +#define PMERR_STARTED_IN_BACKGROUND 0x1532 +#define PMERR_INVALID_HAPP 0x1533 +#define PMERR_CANNOT_STOP 0x1534 +#define PMERR_INVALID_FREE_MESSAGE_ID 0x1630 +#define PMERR_FUNCTION_NOT_SUPPORTED 0x1641 +#define PMERR_INVALID_ARRAY_COUNT 0x1642 +#define PMERR_INVALID_LENGTH 0x1643 +#define PMERR_INVALID_BUNDLE_TYPE 0x1644 +#define PMERR_INVALID_PARAMETER 0x1645 +#define PMERR_INVALID_NUMBER_OF_PARMS 0x1646 +#define PMERR_GREATER_THAN_64K 0x1647 +#define PMERR_INVALID_PARAMETER_TYPE 0x1648 +#define PMERR_NEGATIVE_STRCOND_DIM 0x1649 +#define PMERR_INVALID_NUMBER_OF_TYPES 0x164a +#define PMERR_INCORRECT_HSTRUCT 0x164b +#define PMERR_INVALID_ARRAY_SIZE 0x164c +#define PMERR_INVALID_CONTROL_DATATYPE 0x164d +#define PMERR_INCOMPLETE_CONTROL_SEQU 0x164e +#define PMERR_INVALID_DATATYPE 0x164f +#define PMERR_INCORRECT_DATATYPE 0x1650 +#define PMERR_NOT_SELF_DESCRIBING_DTYP 0x1651 +#define PMERR_INVALID_CTRL_SEQ_INDEX 0x1652 +#define PMERR_INVALID_TYPE_FOR_LENGTH 0x1653 +#define PMERR_INVALID_TYPE_FOR_OFFSET 0x1654 +#define PMERR_INVALID_TYPE_FOR_MPARAM 0x1655 +#define PMERR_INVALID_MESSAGE_ID 0x1656 +#define PMERR_C_LENGTH_TOO_SMALL 0x1657 +#define PMERR_APPL_STRUCTURE_TOO_SMALL 0x1658 +#define PMERR_INVALID_ERRORINFO_HANDLE 0x1659 +#define PMERR_INVALID_CHARACTER_INDEX 0x165a + +#endif /* INCL_SHLERRORS */ + +#if defined (INCL_GPIERRORS) + +#define PMERR_OK 0x0000 +#define PMERR_ALREADY_IN_AREA 0x2001 +#define PMERR_ALREADY_IN_ELEMENT 0x2002 +#define PMERR_ALREADY_IN_PATH 0x2003 +#define PMERR_ALREADY_IN_SEG 0x2004 +#define PMERR_AREA_INCOMPLETE 0x2005 +#define PMERR_BASE_ERROR 0x2006 +#define PMERR_BITBLT_LENGTH_EXCEEDED 0x2007 +#define PMERR_BITMAP_IN_USE 0x2008 +#define PMERR_BITMAP_IS_SELECTED 0x2009 +#define PMERR_BITMAP_NOT_FOUND 0x200a +#define PMERR_BITMAP_NOT_SELECTED 0x200b +#define PMERR_BOUNDS_OVERFLOW 0x200c +#define PMERR_CALLED_SEG_IS_CHAINED 0x200d +#define PMERR_CALLED_SEG_IS_CURRENT 0x200e +#define PMERR_CALLED_SEG_NOT_FOUND 0x200f +#define PMERR_CANNOT_DELETE_ALL_DATA 0x2010 +#define PMERR_CANNOT_REPLACE_ELEMENT_0 0x2011 +#define PMERR_COL_TABLE_NOT_REALIZABLE 0x2012 +#define PMERR_COL_TABLE_NOT_REALIZED 0x2013 +#define PMERR_COORDINATE_OVERFLOW 0x2014 +#define PMERR_CORR_FORMAT_MISMATCH 0x2015 +#define PMERR_DATA_TOO_LONG 0x2016 +#define PMERR_DC_IS_ASSOCIATED 0x2017 +#define PMERR_DESC_STRING_TRUNCATED 0x2018 +#define PMERR_DEVICE_DRIVER_ERROR_1 0x2019 +#define PMERR_DEVICE_DRIVER_ERROR_2 0x201a +#define PMERR_DEVICE_DRIVER_ERROR_3 0x201b +#define PMERR_DEVICE_DRIVER_ERROR_4 0x201c +#define PMERR_DEVICE_DRIVER_ERROR_5 0x201d +#define PMERR_DEVICE_DRIVER_ERROR_6 0x201e +#define PMERR_DEVICE_DRIVER_ERROR_7 0x201f +#define PMERR_DEVICE_DRIVER_ERROR_8 0x2020 +#define PMERR_DEVICE_DRIVER_ERROR_9 0x2021 +#define PMERR_DEVICE_DRIVER_ERROR_10 0x2022 +#define PMERR_DEV_FUNC_NOT_INSTALLED 0x2023 +#define PMERR_DOSOPEN_FAILURE 0x2024 +#define PMERR_DOSREAD_FAILURE 0x2025 +#define PMERR_DRIVER_NOT_FOUND 0x2026 +#define PMERR_DUP_SEG 0x2027 +#define PMERR_DYNAMIC_SEG_SEQ_ERROR 0x2028 +#define PMERR_DYNAMIC_SEG_ZERO_INV 0x2029 +#define PMERR_ELEMENT_INCOMPLETE 0x202a +#define PMERR_ESC_CODE_NOT_SUPPORTED 0x202b +#define PMERR_EXCEEDS_MAX_SEG_LENGTH 0x202c +#define PMERR_FONT_AND_MODE_MISMATCH 0x202d +#define PMERR_FONT_FILE_NOT_LOADED 0x202e +#define PMERR_FONT_NOT_LOADED 0x202f +#define PMERR_FONT_TOO_BIG 0x2030 +#define PMERR_HARDWARE_INIT_FAILURE 0x2031 +#define PMERR_HBITMAP_BUSY 0x2032 +#define PMERR_HDC_BUSY 0x2033 +#define PMERR_HRGN_BUSY 0x2034 +#define PMERR_HUGE_FONTS_NOT_SUPPORTED 0x2035 +#define PMERR_ID_HAS_NO_BITMAP 0x2036 +#define PMERR_IMAGE_INCOMPLETE 0x2037 +#define PMERR_INCOMPAT_COLOR_FORMAT 0x2038 +#define PMERR_INCOMPAT_COLOR_OPTIONS 0x2039 +#define PMERR_INCOMPATIBLE_BITMAP 0x203a +#define PMERR_INCOMPATIBLE_METAFILE 0x203b +#define PMERR_INCORRECT_DC_TYPE 0x203c +#define PMERR_INSUFFICIENT_DISK_SPACE 0x203d +#define PMERR_INSUFFICIENT_MEMORY 0x203e +#define PMERR_INV_ANGLE_PARM 0x203f +#define PMERR_INV_ARC_CONTROL 0x2040 +#define PMERR_INV_AREA_CONTROL 0x2041 +#define PMERR_INV_ARC_POINTS 0x2042 +#define PMERR_INV_ATTR_MODE 0x2043 +#define PMERR_INV_BACKGROUND_COL_ATTR 0x2044 +#define PMERR_INV_BACKGROUND_MIX_ATTR 0x2045 +#define PMERR_INV_BITBLT_MIX 0x2046 +#define PMERR_INV_BITBLT_STYLE 0x2047 +#define PMERR_INV_BITMAP_DIMENSION 0x2048 +#define PMERR_INV_BOX_CONTROL 0x2049 +#define PMERR_INV_BOX_ROUNDING_PARM 0x204a +#define PMERR_INV_CHAR_ANGLE_ATTR 0x204b +#define PMERR_INV_CHAR_DIRECTION_ATTR 0x204c +#define PMERR_INV_CHAR_MODE_ATTR 0x204d +#define PMERR_INV_CHAR_POS_OPTIONS 0x204e +#define PMERR_INV_CHAR_SET_ATTR 0x204f +#define PMERR_INV_CHAR_SHEAR_ATTR 0x2050 +#define PMERR_INV_CLIP_PATH_OPTIONS 0x2051 +#define PMERR_INV_CODEPAGE 0x2052 +#define PMERR_INV_COLOR_ATTR 0x2053 +#define PMERR_INV_COLOR_DATA 0x2054 +#define PMERR_INV_COLOR_FORMAT 0x2055 +#define PMERR_INV_COLOR_INDEX 0x2056 +#define PMERR_INV_COLOR_OPTIONS 0x2057 +#define PMERR_INV_COLOR_START_INDEX 0x2058 +#define PMERR_INV_COORD_OFFSET 0x2059 +#define PMERR_INV_COORD_SPACE 0x205a +#define PMERR_INV_COORDINATE 0x205b +#define PMERR_INV_CORRELATE_DEPTH 0x205c +#define PMERR_INV_CORRELATE_TYPE 0x205d +#define PMERR_INV_CURSOR_BITMAP 0x205e +#define PMERR_INV_DC_DATA 0x205f +#define PMERR_INV_DC_TYPE 0x2060 +#define PMERR_INV_DEVICE_NAME 0x2061 +#define PMERR_INV_DEV_MODES_OPTIONS 0x2062 +#define PMERR_INV_DRAW_CONTROL 0x2063 +#define PMERR_INV_DRAW_VALUE 0x2064 +#define PMERR_INV_DRAWING_MODE 0x2065 +#define PMERR_INV_DRIVER_DATA 0x2066 +#define PMERR_INV_DRIVER_NAME 0x2067 +#define PMERR_INV_DRAW_BORDER_OPTION 0x2068 +#define PMERR_INV_EDIT_MODE 0x2069 +#define PMERR_INV_ELEMENT_OFFSET 0x206a +#define PMERR_INV_ELEMENT_POINTER 0x206b +#define PMERR_INV_END_PATH_OPTIONS 0x206c +#define PMERR_INV_ESC_CODE 0x206d +#define PMERR_INV_ESCAPE_DATA 0x206e +#define PMERR_INV_EXTENDED_LCID 0x206f +#define PMERR_INV_FILL_PATH_OPTIONS 0x2070 +#define PMERR_INV_FIRST_CHAR 0x2071 +#define PMERR_INV_FONT_ATTRS 0x2072 +#define PMERR_INV_FONT_FILE_DATA 0x2073 +#define PMERR_INV_FOR_THIS_DC_TYPE 0x2074 +#define PMERR_INV_FORMAT_CONTROL 0x2075 +#define PMERR_INV_FORMS_CODE 0x2076 +#define PMERR_INV_FONTDEF 0x2077 +#define PMERR_INV_GEOM_LINE_WIDTH_ATTR 0x2078 +#define PMERR_INV_GETDATA_CONTROL 0x2079 +#define PMERR_INV_GRAPHICS_FIELD 0x207a +#define PMERR_INV_HBITMAP 0x207b +#define PMERR_INV_HDC 0x207c +#define PMERR_INV_HJOURNAL 0x207d +#define PMERR_INV_HMF 0x207e +#define PMERR_INV_HPS 0x207f +#define PMERR_INV_HRGN 0x2080 +#define PMERR_INV_ID 0x2081 +#define PMERR_INV_IMAGE_DATA_LENGTH 0x2082 +#define PMERR_INV_IMAGE_DIMENSION 0x2083 +#define PMERR_INV_IMAGE_FORMAT 0x2084 +#define PMERR_INV_IN_AREA 0x2085 +#define PMERR_INV_IN_CALLED_SEG 0x2086 +#define PMERR_INV_IN_CURRENT_EDIT_MODE 0x2087 +#define PMERR_INV_IN_DRAW_MODE 0x2088 +#define PMERR_INV_IN_ELEMENT 0x2089 +#define PMERR_INV_IN_IMAGE 0x208a +#define PMERR_INV_IN_PATH 0x208b +#define PMERR_INV_IN_RETAIN_MODE 0x208c +#define PMERR_INV_IN_SEG 0x208d +#define PMERR_INV_IN_VECTOR_SYMBOL 0x208e +#define PMERR_INV_INFO_TABLE 0x208f +#define PMERR_INV_JOURNAL_OPTION 0x2090 +#define PMERR_INV_KERNING_FLAGS 0x2091 +#define PMERR_INV_LENGTH_OR_COUNT 0x2092 +#define PMERR_INV_LINE_END_ATTR 0x2093 +#define PMERR_INV_LINE_JOIN_ATTR 0x2094 +#define PMERR_INV_LINE_TYPE_ATTR 0x2095 +#define PMERR_INV_LINE_WIDTH_ATTR 0x2096 +#define PMERR_INV_LOGICAL_ADDRESS 0x2097 +#define PMERR_INV_MARKER_BOX_ATTR 0x2098 +#define PMERR_INV_MARKER_SET_ATTR 0x2099 +#define PMERR_INV_MARKER_SYMBOL_ATTR 0x209a +#define PMERR_INV_MATRIX_ELEMENT 0x209b +#define PMERR_INV_MAX_HITS 0x209c +#define PMERR_INV_METAFILE 0x209d +#define PMERR_INV_METAFILE_LENGTH 0x209e +#define PMERR_INV_METAFILE_OFFSET 0x209f +#define PMERR_INV_MICROPS_DRAW_CONTROL 0x20a0 +#define PMERR_INV_MICROPS_FUNCTION 0x20a1 +#define PMERR_INV_MICROPS_ORDER 0x20a2 +#define PMERR_INV_MIX_ATTR 0x20a3 +#define PMERR_INV_MODE_FOR_OPEN_DYN 0x20a4 +#define PMERR_INV_MODE_FOR_REOPEN_SEG 0x20a5 +#define PMERR_INV_MODIFY_PATH_MODE 0x20a6 +#define PMERR_INV_MULTIPLIER 0x20a7 +#define PMERR_INV_NESTED_FIGURES 0x20a8 +#define PMERR_INV_OR_INCOMPAT_OPTIONS 0x20a9 +#define PMERR_INV_ORDER_LENGTH 0x20aa +#define PMERR_INV_ORDERING_PARM 0x20ab +#define PMERR_INV_OUTSIDE_DRAW_MODE 0x20ac +#define PMERR_INV_PAGE_VIEWPORT 0x20ad +#define PMERR_INV_PATH_ID 0x20ae +#define PMERR_INV_PATH_MODE 0x20af +#define PMERR_INV_PATTERN_ATTR 0x20b0 +#define PMERR_INV_PATTERN_REF_PT_ATTR 0x20b1 +#define PMERR_INV_PATTERN_SET_ATTR 0x20b2 +#define PMERR_INV_PATTERN_SET_FONT 0x20b3 +#define PMERR_INV_PICK_APERTURE_OPTION 0x20b4 +#define PMERR_INV_PICK_APERTURE_POSN 0x20b5 +#define PMERR_INV_PICK_APERTURE_SIZE 0x20b6 +#define PMERR_INV_PICK_NUMBER 0x20b7 +#define PMERR_INV_PLAY_METAFILE_OPTION 0x20b8 +#define PMERR_INV_PRIMITIVE_TYPE 0x20b9 +#define PMERR_INV_PS_SIZE 0x20ba +#define PMERR_INV_PUTDATA_FORMAT 0x20bb +#define PMERR_INV_QUERY_ELEMENT_NO 0x20bc +#define PMERR_INV_RECT 0x20bd +#define PMERR_INV_REGION_CONTROL 0x20be +#define PMERR_INV_REGION_MIX_MODE 0x20bf +#define PMERR_INV_REPLACE_MODE_FUNC 0x20c0 +#define PMERR_INV_RESERVED_FIELD 0x20c1 +#define PMERR_INV_RESET_OPTIONS 0x20c2 +#define PMERR_INV_RGBCOLOR 0x20c3 +#define PMERR_INV_SCAN_START 0x20c4 +#define PMERR_INV_SEG_ATTR 0x20c5 +#define PMERR_INV_SEG_ATTR_VALUE 0x20c6 +#define PMERR_INV_SEG_CH_LENGTH 0x20c7 +#define PMERR_INV_SEG_NAME 0x20c8 +#define PMERR_INV_SEG_OFFSET 0x20c9 +#define PMERR_INV_SETID 0x20ca +#define PMERR_INV_SETID_TYPE 0x20cb +#define PMERR_INV_SET_VIEWPORT_OPTION 0x20cc +#define PMERR_INV_SHARPNESS_PARM 0x20cd +#define PMERR_INV_SOURCE_OFFSET 0x20ce +#define PMERR_INV_STOP_DRAW_VALUE 0x20cf +#define PMERR_INV_TRANSFORM_TYPE 0x20d0 +#define PMERR_INV_USAGE_PARM 0x20d1 +#define PMERR_INV_VIEWING_LIMITS 0x20d2 +#define PMERR_JFILE_BUSY 0x20d3 +#define PMERR_JNL_FUNC_DATA_TOO_LONG 0x20d4 +#define PMERR_KERNING_NOT_SUPPORTED 0x20d5 +#define PMERR_LABEL_NOT_FOUND 0x20d6 +#define PMERR_MATRIX_OVERFLOW 0x20d7 +#define PMERR_METAFILE_INTERNAL_ERROR 0x20d8 +#define PMERR_METAFILE_IN_USE 0x20d9 +#define PMERR_METAFILE_LIMIT_EXCEEDED 0x20da +#define PMERR_NAME_STACK_FULL 0x20db +#define PMERR_NOT_CREATED_BY_DEVOPENDC 0x20dc +#define PMERR_NOT_IN_AREA 0x20dd +#define PMERR_NOT_IN_DRAW_MODE 0x20de +#define PMERR_NOT_IN_ELEMENT 0x20df +#define PMERR_NOT_IN_IMAGE 0x20e0 +#define PMERR_NOT_IN_PATH 0x20e1 +#define PMERR_NOT_IN_RETAIN_MODE 0x20e2 +#define PMERR_NOT_IN_SEG 0x20e3 +#define PMERR_NO_BITMAP_SELECTED 0x20e4 +#define PMERR_NO_CURRENT_ELEMENT 0x20e5 +#define PMERR_NO_CURRENT_SEG 0x20e6 +#define PMERR_NO_METAFILE_RECORD_HANDLE 0x20e7 +#define PMERR_ORDER_TOO_BIG 0x20e8 +#define PMERR_OTHER_SET_ID_REFS 0x20e9 +#define PMERR_OVERRAN_SEG 0x20ea +#define PMERR_OWN_SET_ID_REFS 0x20eb +#define PMERR_PATH_INCOMPLETE 0x20ec +#define PMERR_PATH_LIMIT_EXCEEDED 0x20ed +#define PMERR_PATH_UNKNOWN 0x20ee +#define PMERR_PEL_IS_CLIPPED 0x20ef +#define PMERR_PEL_NOT_AVAILABLE 0x20f0 +#define PMERR_PRIMITIVE_STACK_EMPTY 0x20f1 +#define PMERR_PROLOG_ERROR 0x20f2 +#define PMERR_PROLOG_SEG_ATTR_NOT_SET 0x20f3 +#define PMERR_PS_BUSY 0x20f4 +#define PMERR_PS_IS_ASSOCIATED 0x20f5 +#define PMERR_RAM_JNL_FILE_TOO_SMALL 0x20f6 +#define PMERR_REALIZE_NOT_SUPPORTED 0x20f7 +#define PMERR_REGION_IS_CLIP_REGION 0x20f8 +#define PMERR_RESOURCE_DEPLETION 0x20f9 +#define PMERR_SEG_AND_REFSEG_ARE_SAME 0x20fa +#define PMERR_SEG_CALL_RECURSIVE 0x20fb +#define PMERR_SEG_CALL_STACK_EMPTY 0x20fc +#define PMERR_SEG_CALL_STACK_FULL 0x20fd +#define PMERR_SEG_IS_CURRENT 0x20fe +#define PMERR_SEG_NOT_CHAINED 0x20ff +#define PMERR_SEG_NOT_FOUND 0x2100 +#define PMERR_SEG_STORE_LIMIT_EXCEEDED 0x2101 +#define PMERR_SETID_IN_USE 0x2102 +#define PMERR_SETID_NOT_FOUND 0x2103 +#define PMERR_STARTDOC_NOT_ISSUED 0x2104 +#define PMERR_STOP_DRAW_OCCURRED 0x2105 +#define PMERR_TOO_MANY_METAFILES_IN_USE 0x2106 +#define PMERR_TRUNCATED_ORDER 0x2107 +#define PMERR_UNCHAINED_SEG_ZERO_INV 0x2108 +#define PMERR_UNSUPPORTED_ATTR 0x2109 +#define PMERR_UNSUPPORTED_ATTR_VALUE 0x210a +#define PMERR_ENDDOC_NOT_ISSUED 0x210b +#define PMERR_PS_NOT_ASSOCIATED 0x210c +#define PMERR_INV_FLOOD_FILL_OPTIONS 0x210d +#define PMERR_INV_FACENAME 0x210e +#define PMERR_PALETTE_SELECTED 0x210f +#define PMERR_NO_PALETTE_SELECTED 0x2110 +#define PMERR_INV_HPAL 0x2111 +#define PMERR_PALETTE_BUSY 0x2112 +#define PMERR_START_POINT_CLIPPED 0x2113 +#define PMERR_NO_FILL 0x2114 +#define PMERR_INV_FACENAMEDESC 0x2115 +#define PMERR_INV_BITMAP_DATA 0x2116 +#define PMERR_INV_CHAR_ALIGN_ATTR 0x2117 +#define PMERR_INV_HFONT 0x2118 +#define PMERR_HFONT_IS_SELECTED 0x2119 +#define PMERR_DRVR_NOT_SUPPORTED 0x2120 +#define PMERR_INV_INKPS_FUNCTION 0x2121 + +#endif /* INCL_GPIERRORS */ + +#if defined (INCL_WPERRORS) + +#define WPERR_PROTECTED_CLASS 0x1700 +#define WPERR_INVALID_CLASS 0x1701 +#define WPERR_INVALID_SUPERCLASS 0x1702 +#define WPERR_NO_MEMORY 0x1703 +#define WPERR_SEMAPHORE_ERROR 0x1704 +#define WPERR_BUFFER_TOO_SMALL 0x1705 +#define WPERR_CLSLOADMOD_FAILED 0x1706 +#define WPERR_CLSPROCADDR_FAILED 0x1707 +#define WPERR_OBJWORD_LOCATION 0x1708 +#define WPERR_INVALID_OBJECT 0x1709 +#define WPERR_MEMORY_CLEANUP 0x170a +#define WPERR_INVALID_MODULE 0x170b +#define WPERR_INVALID_OLDCLASS 0x170c +#define WPERR_INVALID_NEWCLASS 0x170d +#define WPERR_NOT_IMMEDIATE_CHILD 0x170e +#define WPERR_NOT_WORKPLACE_CLASS 0x170f +#define WPERR_CANT_REPLACE_METACLS 0x1710 +#define WPERR_INI_FILE_WRITE 0x1711 +#define WPERR_INVALID_FOLDER 0x1712 +#define WPERR_BUFFER_OVERFLOW 0x1713 +#define WPERR_OBJECT_NOT_FOUND 0x1714 +#define WPERR_INVALID_HFIND 0x1715 +#define WPERR_INVALID_COUNT 0x1716 +#define WPERR_INVALID_BUFFER 0x1717 +#define WPERR_ALREADY_EXISTS 0x1718 +#define WPERR_INVALID_FLAGS 0x1719 +#define WPERR_INVALID_OBJECTID 0x1720 +#define WPERR_INVALID_TARGET_OBJECT 0x1721 + +#endif /* INCL_WPERRORS */ + +#if defined (INCL_SPLERRORS) + +#define PMERR_SPL_DRIVER_ERROR 0x4001 +#define PMERR_SPL_DEVICE_ERROR 0x4002 +#define PMERR_SPL_DEVICE_NOT_INSTALLED 0x4003 +#define PMERR_SPL_QUEUE_ERROR 0x4004 +#define PMERR_SPL_INV_HSPL 0x4005 +#define PMERR_SPL_NO_DISK_SPACE 0x4006 +#define PMERR_SPL_NO_MEMORY 0x4007 +#define PMERR_SPL_PRINT_ABORT 0x4008 +#define PMERR_SPL_SPOOLER_NOT_INSTALLED 0x4009 +#define PMERR_SPL_INV_FORMS_CODE 0x400a +#define PMERR_SPL_INV_PRIORITY 0x400b +#define PMERR_SPL_NO_FREE_JOB_ID 0x400c +#define PMERR_SPL_NO_DATA 0x400d +#define PMERR_SPL_INV_TOKEN 0x400e +#define PMERR_SPL_INV_DATATYPE 0x400f +#define PMERR_SPL_PROCESSOR_ERROR 0x4010 +#define PMERR_SPL_INV_JOB_ID 0x4011 +#define PMERR_SPL_JOB_NOT_PRINTING 0x4012 +#define PMERR_SPL_JOB_PRINTING 0x4013 +#define PMERR_SPL_QUEUE_ALREADY_EXISTS 0x4014 +#define PMERR_SPL_INV_QUEUE_NAME 0x4015 +#define PMERR_SPL_QUEUE_NOT_EMPTY 0x4016 +#define PMERR_SPL_DEVICE_ALREADY_EXISTS 0x4017 +#define PMERR_SPL_DEVICE_LIMIT_REACHED 0x4018 +#define PMERR_SPL_STATUS_STRING_TRUNC 0x4019 +#define PMERR_SPL_INV_LENGTH_OR_COUNT 0x401a +#define PMERR_SPL_FILE_NOT_FOUND 0x401b +#define PMERR_SPL_CANNOT_OPEN_FILE 0x401c +#define PMERR_SPL_DRIVER_NOT_INSTALLED 0x401d +#define PMERR_SPL_INV_PROCESSOR_DATTYPE 0x401e +#define PMERR_SPL_INV_DRIVER_DATATYPE 0x401f +#define PMERR_SPL_PROCESSOR_NOT_INST 0x4020 +#define PMERR_SPL_NO_SUCH_LOG_ADDRESS 0x4021 +#define PMERR_SPL_PRINTER_NOT_FOUND 0x4022 +#define PMERR_SPL_DD_NOT_FOUND 0x4023 +#define PMERR_SPL_QUEUE_NOT_FOUND 0x4024 +#define PMERR_SPL_MANY_QUEUES_ASSOC 0x4025 +#define PMERR_SPL_NO_QUEUES_ASSOCIATED 0x4026 +#define PMERR_SPL_INI_FILE_ERROR 0x4027 +#define PMERR_SPL_NO_DEFAULT_QUEUE 0x4028 +#define PMERR_SPL_NO_CURRENT_FORMS_CODE 0x4029 +#define PMERR_SPL_NOT_AUTHORISED 0x402a +#define PMERR_SPL_TEMP_NETWORK_ERROR 0x402b +#define PMERR_SPL_HARD_NETWORK_ERROR 0x402c +#define PMERR_DEL_NOT_ALLOWED 0x402d +#define PMERR_CANNOT_DEL_QP_REF 0x402e +#define PMERR_CANNOT_DEL_QNAME_REF 0x402f +#define PMERR_CANNOT_DEL_PRINTER_DD_REF 0x4030 +#define PMERR_CANNOT_DEL_PRN_NAME_REF 0x4031 +#define PMERR_CANNOT_DEL_PRN_ADDR_REF 0x4032 +#define PMERR_SPOOLER_QP_NOT_DEFINED 0x4033 +#define PMERR_PRN_NAME_NOT_DEFINED 0x4034 +#define PMERR_PRN_ADDR_NOT_DEFINED 0x4035 +#define PMERR_PRINTER_DD_NOT_DEFINED 0x4036 +#define PMERR_PRINTER_QUEUE_NOT_DEFINED 0x4037 +#define PMERR_PRN_ADDR_IN_USE 0x4038 +#define PMERR_SPL_TOO_MANY_OPEN_FILES 0x4039 +#define PMERR_SPL_CP_NOT_REQD 0x403a +#define PMERR_SPL_PORT_SHUTDOWN 0x403b +#define PMERR_SPL_NOT_HANDLED 0x403c +#define PMERR_SPL_CNV_NOT_INIT 0x403d +#define PMERR_SPL_INIT_IN_PROGRESS 0x403e +#define PMERR_SPL_TYPE_NOT_AVAIL 0x403f +#define PMERR_UNABLE_TO_CLOSE_DEVICE 0x4040 +#define PMERR_SPL_SESSION_TERM 0x4041 +#define PMERR_SPL_NOT_REGISTERED 0x4042 + +#endif /* INCL_SPLERRORS */ + +#if defined (INCL_PICERRORS) + +#define PMERR_INV_TYPE 0x5001 +#define PMERR_INV_CONV 0x5002 +#define PMERR_INV_SEGLEN 0x5003 +#define PMERR_DUP_SEGNAME 0x5004 +#define PMERR_INV_XFORM 0x5005 +#define PMERR_INV_VIEWLIM 0x5006 +#define PMERR_INV_3DCOORD 0x5007 +#define PMERR_SMB_OVFLOW 0x5008 +#define PMERR_SEG_OVFLOW 0x5009 +#define PMERR_PIC_DUP_FILENAME 0x5010 + +#endif /* INCL_PICERRORS */ + +#if defined (INCL_WINERRORS) + +#define WINDBG_HWND_NOT_DESTROYED 0x1022 +#define WINDBG_HPTR_NOT_DESTROYED 0x1023 +#define WINDBG_HACCEL_NOT_DESTROYED 0x1024 +#define WINDBG_HENUM_NOT_DESTROYED 0x1025 +#define WINDBG_VISRGN_SEM_BUSY 0x1026 +#define WINDBG_USER_SEM_BUSY 0x1027 +#define WINDBG_DC_CACHE_BUSY 0x1028 +#define WINDBG_HOOK_STILL_INSTALLED 0x1029 +#define WINDBG_WINDOW_STILL_LOCKED 0x102a +#define WINDBG_UPDATEPS_ASSERTION_FAIL 0x102b +#define WINDBG_SENDMSG_WITHIN_USER_SEM 0x102c +#define WINDBG_USER_SEM_NOT_ENTERED 0x102d +#define WINDBG_PROC_NOT_EXPORTED 0x102e +#define WINDBG_BAD_SENDMSG_HWND 0x102f +#define WINDBG_ABNORMAL_EXIT 0x1030 +#define WINDBG_INTERNAL_REVISION 0x1031 +#define WINDBG_INITSYSTEM_FAILED 0x1032 +#define WINDBG_HATOMTBL_NOT_DESTROYED 0x1033 +#define WINDBG_WINDOW_UNLOCK_WAIT 0x1035 + +#endif /* INCL_WINERRORS */ + + +#define WRECT RECTL +#define PWRECT PRECTL + +#define WPOINT POINTL +#define PWPOINT PPOINTL + + +typedef LHANDLE HACCEL; + +typedef LHANDLE HRGN; +typedef HRGN *PHRGN; + +typedef VOID *MRESULT; +typedef MRESULT *PMRESULT; + +typedef VOID *MPARAM; +typedef MPARAM *PMPARAM; + +typedef LHANDLE HPOINTER; + +typedef HMODULE HLIB; +typedef HLIB *PHLIB; + +typedef LONG COLOR; +typedef COLOR *PCOLOR; + +typedef LHANDLE HAB; +typedef HAB *PHAB; + +typedef LHANDLE HPS; +typedef HPS *PHPS; + +typedef LHANDLE HDC; +typedef HDC *PHDC; + +typedef LHANDLE HWND; +typedef HWND *PHWND; + +typedef LHANDLE HMQ; + +typedef LHANDLE HPAL; +typedef HPAL *PHPAL; + +typedef LHANDLE HBITMAP; +typedef HBITMAP *PHBITMAP; + +typedef ULONG ERRORID; +typedef ERRORID *PERRORID; + +typedef MRESULT FNWP (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +typedef FNWP *PFNWP; + +#define ERRORIDERROR(errid) (LOUSHORT (errid)) +#define ERRORIDSEV(errid) (HIUSHORT (errid)) +#define MAKEERRORID(sev,error) (ERRORID)(MAKEULONG ((error), (sev))) + +typedef struct _POINTL +{ + LONG x; + LONG y; +} POINTL; +typedef POINTL *PPOINTL; + +typedef struct _POINTS +{ + SHORT x; + SHORT y; +} POINTS; +typedef POINTS *PPOINTS; + +typedef struct _RECTL +{ + LONG xLeft; + LONG yBottom; + LONG xRight; + LONG yTop; +} RECTL; +typedef RECTL *PRECTL; + +#if defined (INCL_WINMESSAGEMGR) || !defined (INCL_NOCOMMON) + +#define WM_NULL 0x0000 +#define WM_CREATE 0x0001 +#define WM_DESTROY 0x0002 +#define WM_ENABLE 0x0004 +#define WM_SHOW 0x0005 +#define WM_MOVE 0x0006 +#define WM_SIZE 0x0007 +#define WM_ADJUSTWINDOWPOS 0x0008 +#define WM_CALCVALIDRECTS 0x0009 +#define WM_SETWINDOWPARAMS 0x000a +#define WM_QUERYWINDOWPARAMS 0x000b +#define WM_HITTEST 0x000c +#define WM_ACTIVATE 0x000d +#define WM_SETFOCUS 0x000f +#define WM_SETSELECTION 0x0010 +#define WM_PPAINT 0x0011 +#define WM_PSETFOCUS 0x0012 +#define WM_PSYSCOLORCHANGE 0x0013 +#define WM_PSIZE 0x0014 +#define WM_PACTIVATE 0x0015 +#define WM_PCONTROL 0x0016 +#define WM_COMMAND 0x0020 +#define WM_SYSCOMMAND 0x0021 +#define WM_HELP 0x0022 +#define WM_PAINT 0x0023 +#define WM_TIMER 0x0024 +#define WM_SEM1 0x0025 +#define WM_SEM2 0x0026 +#define WM_SEM3 0x0027 +#define WM_SEM4 0x0028 +#define WM_CLOSE 0x0029 +#define WM_QUIT 0x002a +#define WM_SYSCOLORCHANGE 0x002b +#define WM_SYSVALUECHANGED 0x002d +#define WM_APPTERMINATENOTIFY 0x002e +#define WM_PRESPARAMCHANGED 0x002f +#define WM_CONTROL 0x0030 +#define WM_VSCROLL 0x0031 +#define WM_HSCROLL 0x0032 +#define WM_INITMENU 0x0033 +#define WM_MENUSELECT 0x0034 +#define WM_MENUEND 0x0035 +#define WM_DRAWITEM 0x0036 +#define WM_MEASUREITEM 0x0037 +#define WM_CONTROLPOINTER 0x0038 +#define WM_QUERYDLGCODE 0x003a +#define WM_INITDLG 0x003b +#define WM_SUBSTITUTESTRING 0x003c +#define WM_MATCHMNEMONIC 0x003d +#define WM_SAVEAPPLICATION 0x003e + +#define WM_HELPBASE 0x0f00 +#define WM_HELPTOP 0x0fff + +#define WM_USER 0x1000 + +#define CMDSRC_OTHER 0 +#define CMDSRC_PUSHBUTTON 1 +#define CMDSRC_MENU 2 +#define CMDSRC_ACCELERATOR 3 +#define CMDSRC_FONTDLG 4 +#define CMDSRC_FILEDLG 5 +#define CMDSRC_PRINTDLG 6 +#define CMDSRC_COLORDLG 7 + +#define PM_NOREMOVE 0x0000 +#define PM_REMOVE 0x0001 + +#define RUM_IN 1 +#define RUM_OUT 2 +#define RUM_INOUT 3 + +#define SMD_DELAYED 0x0001 +#define SMD_IMMEDIATE 0x0002 + +#define SSM_SYNCHRONOUS 0x0001 +#define SSM_ASYNCHRONOUS 0x0002 +#define SSM_MIXED 0x0003 + +#define WLI_NOBUTTONUP 0x0002 + +#if defined (INCL_WINTYPES) + +#define DTYP_USER 16384 + +#define DTYP_CTL_ARRAY 1 +#define DTYP_CTL_PARRAY (-1) +#define DTYP_CTL_OFFSET 2 +#define DTYP_CTL_LENGTH 3 + +#define DTYP_ACCEL 28 +#define DTYP_ACCELTABLE 29 +#define DTYP_ARCPARAMS 38 +#define DTYP_AREABUNDLE 139 +#define DTYP_ATOM 90 +#define DTYP_BITMAPINFO 60 +#define DTYP_BITMAPINFOHEADER 61 +#define DTYP_BITMAPINFO2 170 +#define DTYP_BITMAPINFOHEADER2 171 +#define DTYP_BIT16 20 +#define DTYP_BIT32 21 +#define DTYP_BIT8 19 +#define DTYP_BOOL 18 +#define DTYP_BTNCDATA 35 +#define DTYP_BYTE 13 +#define DTYP_CATCHBUF 141 +#define DTYP_CHAR 15 +#define DTYP_CHARBUNDLE 135 +#define DTYP_CLASSINFO 95 +#define DTYP_COUNT2 93 +#define DTYP_COUNT2B 70 +#define DTYP_COUNT2CH 82 +#define DTYP_COUNT4 152 +#define DTYP_COUNT4B 42 +#define DTYP_CPID 57 +#define DTYP_CREATESTRUCT 98 +#define DTYP_CURSORINFO 34 +#define DTYP_DEVOPENSTRUC 124 +#define DTYP_DLGTEMPLATE 96 +#define DTYP_DLGTITEM 97 +#define DTYP_ENTRYFDATA 127 +#define DTYP_ERRORID 45 +#define DTYP_FATTRS 75 +#define DTYP_FFDESCS 142 +#define DTYP_FIXED 99 +#define DTYP_FONTMETRICS 74 +#define DTYP_FRAMECDATA 144 +#define DTYP_GRADIENTL 48 +#define DTYP_HAB 10 +#define DTYP_HACCEL 30 +#define DTYP_HAPP 146 +#define DTYP_HATOMTBL 91 +#define DTYP_HBITMAP 62 +#define DTYP_HCINFO 46 +#define DTYP_HDC 132 +#define DTYP_HENUM 117 +#define DTYP_HHEAP 109 +#define DTYP_HINI 53 +#define DTYP_HLIB 147 +#define DTYP_HMF 85 +#define DTYP_HMQ 86 +#define DTYP_HPOINTER 106 +#define DTYP_HPROGRAM 131 +#define DTYP_HPS 12 +#define DTYP_HRGN 116 +#define DTYP_HSEM 140 +#define DTYP_HSPL 32 +#define DTYP_HSWITCH 66 +#define DTYP_HVPS 58 +#define DTYP_HWND 11 +#define DTYP_IDENTITY 133 +#define DTYP_IDENTITY4 169 +#define DTYP_IMAGEBUNDLE 136 +#define DTYP_INDEX2 81 +#define DTYP_IPT 155 +#define DTYP_KERNINGPAIRS 118 +#define DTYP_LENGTH2 68 +#define DTYP_LENGTH4 69 +#define DTYP_LINEBUNDLE 137 +#define DTYP_LONG 25 +#define DTYP_MARKERBUNDLE 138 +#define DTYP_MATRIXLF 113 +#define DTYP_MLECTLDATA 161 +#define DTYP_MLEMARGSTRUCT 157 +#define DTYP_MLEOVERFLOW 158 +#define DTYP_OFFSET2B 112 +#define DTYP_OWNERITEM 154 +#define DTYP_PID 92 +#define DTYP_PIX 156 +#define DTYP_POINTERINFO 105 +#define DTYP_POINTL 77 +#define DTYP_PROGCATEGORY 129 +#define DTYP_PROGRAMENTRY 128 +#define DTYP_PROGTYPE 130 +#define DTYP_PROPERTY2 88 +#define DTYP_PROPERTY4 89 +#define DTYP_QMSG 87 +#define DTYP_RECTL 121 +#define DTYP_RESID 125 +#define DTYP_RGB 111 +#define DTYP_RGNRECT 115 +#define DTYP_SBCDATA 159 +#define DTYP_SEGOFF 126 +#define DTYP_SHORT 23 +#define DTYP_SIZEF 101 +#define DTYP_SIZEL 102 +#define DTYP_STRL 17 +#define DTYP_STR16 40 +#define DTYP_STR32 37 +#define DTYP_STR64 47 +#define DTYP_STR8 33 +#define DTYP_SWBLOCK 63 +#define DTYP_SWCNTRL 64 +#define DTYP_SWENTRY 65 +#define DTYP_SWP 31 +#define DTYP_TID 104 +#define DTYP_TIME 107 +#define DTYP_TRACKINFO 73 +#define DTYP_UCHAR 22 +#define DTYP_ULONG 26 +#define DTYP_USERBUTTON 36 +#define DTYP_USHORT 24 +#define DTYP_WIDTH4 108 +#define DTYP_WNDPARAMS 83 +#define DTYP_WNDPROC 84 +#define DTYP_WPOINT 59 +#define DTYP_WRECT 55 +#define DTYP_XYWINSIZE 52 + +#define DTYP_PACCEL (-28) +#define DTYP_PACCELTABLE (-29) +#define DTYP_PARCPARAMS (-38) +#define DTYP_PAREABUNDLE (-139) +#define DTYP_PATOM (-90) +#define DTYP_PBITMAPINFO (-60) +#define DTYP_PBITMAPINFOHEADER (-61) +#define DTYP_PBITMAPINFO2 (-170) +#define DTYP_PBITMAPINFOHEADER2 (-171) +#define DTYP_PBIT16 (-20) +#define DTYP_PBIT32 (-21) +#define DTYP_PBIT8 (-19) +#define DTYP_PBOOL (-18) +#define DTYP_PBTNCDATA (-35) +#define DTYP_PBYTE (-13) +#define DTYP_PCATCHBUF (-141) +#define DTYP_PCHAR (-15) +#define DTYP_PCHARBUNDLE (-135) +#define DTYP_PCLASSINFO (-95) +#define DTYP_PCOUNT2 (-93) +#define DTYP_PCOUNT2B (-70) +#define DTYP_PCOUNT2CH (-82) +#define DTYP_PCOUNT4 (-152) +#define DTYP_PCOUNT4B (-42) +#define DTYP_PCPID (-57) +#define DTYP_PCREATESTRUCT (-98) +#define DTYP_PCURSORINFO (-34) +#define DTYP_PDEVOPENSTRUC (-124) +#define DTYP_PDLGTEMPLATE (-96) +#define DTYP_PDLGTITEM (-97) +#define DTYP_PENTRYFDATA (-127) +#define DTYP_PERRORID (-45) +#define DTYP_PFATTRS (-75) +#define DTYP_PFFDESCS (-142) +#define DTYP_PFIXED (-99) +#define DTYP_PFONTMETRICS (-74) +#define DTYP_PFRAMECDATA (-144) +#define DTYP_PGRADIENTL (-48) +#define DTYP_PHAB (-10) +#define DTYP_PHACCEL (-30) +#define DTYP_PHAPP (-146) +#define DTYP_PHATOMTBL (-91) +#define DTYP_PHBITMAP (-62) +#define DTYP_PHCINFO (-46) +#define DTYP_PHDC (-132) +#define DTYP_PHENUM (-117) +#define DTYP_PHHEAP (-109) +#define DTYP_PHINI (-53) +#define DTYP_PHLIB (-147) +#define DTYP_PHMF (-85) +#define DTYP_PHMQ (-86) +#define DTYP_PHPOINTER (-106) +#define DTYP_PHPROGRAM (-131) +#define DTYP_PHPS (-12) +#define DTYP_PHRGN (-116) +#define DTYP_PHSEM (-140) +#define DTYP_PHSPL (-32) +#define DTYP_PHSWITCH (-66) +#define DTYP_PHVPS (-58) +#define DTYP_PHWND (-11) +#define DTYP_PIDENTITY (-133) +#define DTYP_PIDENTITY4 (-169) +#define DTYP_PIMAGEBUNDLE (-136) +#define DTYP_PINDEX2 (-81) +#define DTYP_PIPT (-155) +#define DTYP_PKERNINGPAIRS (-118) +#define DTYP_PLENGTH2 (-68) +#define DTYP_PLENGTH4 (-69) +#define DTYP_PLINEBUNDLE (-137) +#define DTYP_PLONG (-25) +#define DTYP_PMARKERBUNDLE (-138) +#define DTYP_PMATRIXLF (-113) +#define DTYP_PMLECTLDATA (-161) +#define DTYP_PMLEMARGSTRUCT (-157) +#define DTYP_PMLEOVERFLOW (-158) +#define DTYP_POFFSET2B (-112) +#define DTYP_POWNERITEM (-154) +#define DTYP_PPID (-92) +#define DTYP_PPIX (-156) +#define DTYP_PPOINTERINFO (-105) +#define DTYP_PPOINTL (-77) +#define DTYP_PPROGCATEGORY (-129) +#define DTYP_PPROGRAMENTRY (-128) +#define DTYP_PPROGTYPE (-130) +#define DTYP_PPROPERTY2 (-88) +#define DTYP_PPROPERTY4 (-89) +#define DTYP_PQMSG (-87) +#define DTYP_PRECTL (-121) +#define DTYP_PRESID (-125) +#define DTYP_PRGB (-111) +#define DTYP_PRGNRECT (-115) +#define DTYP_PSBCDATA (-159) +#define DTYP_PSEGOFF (-126) +#define DTYP_PSHORT (-23) +#define DTYP_PSIZEF (-101) +#define DTYP_PSIZEL (-102) +#define DTYP_PSTRL (-17) +#define DTYP_PSTR16 (-40) +#define DTYP_PSTR32 (-37) +#define DTYP_PSTR64 (-47) +#define DTYP_PSTR8 (-33) +#define DTYP_PSWBLOCK (-63) +#define DTYP_PSWCNTRL (-64) +#define DTYP_PSWENTRY (-65) +#define DTYP_PSWP (-31) +#define DTYP_PTID (-104) +#define DTYP_PTIME (-107) +#define DTYP_PTRACKINFO (-73) +#define DTYP_PUCHAR (-22) +#define DTYP_PULONG (-26) +#define DTYP_PUSERBUTTON (-36) +#define DTYP_PUSHORT (-24) +#define DTYP_PWIDTH4 (-108) +#define DTYP_PWNDPARAMS (-83) +#define DTYP_PWNDPROC (-84) +#define DTYP_PWPOINT (-59) +#define DTYP_PWRECT (-55) +#define DTYP_PXYWINSIZE (-52) + +#endif /* INCL_WINTYPES */ + +typedef struct _QMSG +{ + HWND hwnd; + ULONG msg; + MPARAM mp1; + MPARAM mp2; + ULONG time; + POINTL ptl; + ULONG reserved; +} QMSG; +typedef QMSG *PQMSG; + +typedef struct _COMMANDMSG +{ + USHORT cmd; + USHORT unused; + USHORT source; + USHORT fMouse; +} CMDMSG; +typedef CMDMSG *PCMDMSG; + +typedef struct _MQINFO +{ + ULONG cb; + PID pid; + TID tid; + ULONG cmsgs; + PVOID pReserved; +} MQINFO; +typedef MQINFO *PMQINFO; + +#define COMMANDMSG(pmsg) ((PCMDMSG)((PBYTE)pmsg + sizeof (ULONG))) + + +BOOL WinCancelShutdown (HMQ hmq, BOOL fCancelAlways); +HMQ WinCreateMsgQueue (HAB hab, LONG cmsg); +BOOL WinDestroyMsgQueue (HMQ hmq); +MRESULT WinDispatchMsg (HAB hab, PQMSG pqmsg); +BOOL WinGetMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst, + ULONG msgFilterLast); +BOOL WinLockInput (HMQ hmq, ULONG fLock); +BOOL WinPeekMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst, + ULONG msgFilterLast, ULONG fl); +BOOL WinPostMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +HMQ WinQueueFromID (HAB hab, PID pid, TID tid); +BOOL WinQueryQueueInfo (HMQ hmq, PMQINFO pmqi, ULONG cbCopy); +HMQ WinQuerySendMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, PQMSG pqmsg); +BOOL WinRegisterUserDatatype (HAB hab, LONG datatype, LONG count, PLONG types); +BOOL WinRegisterUserMsg (HAB hab, ULONG msgid, LONG datatype1, LONG dir1, + LONG datatype2, LONG dir2, LONG datatyper); +BOOL WinReplyMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, MRESULT mresult); +MRESULT WinSendMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +BOOL WinSetMsgMode (HAB hab, PCSZ classname, LONG control); +BOOL WinSetSynchroMode (HAB hab, LONG mode); +BOOL WinThreadAssocQueue (HAB hab, HMQ hmq); +BOOL WinWakeThread (HMQ hmq); + +#endif /* INCL_WINMESSAGEMGR || !INCL_NOCOMMON */ + +typedef struct _SWP +{ + ULONG fl; + LONG cy; + LONG cx; + LONG y; + LONG x; + HWND hwndInsertBehind; + HWND hwnd; + ULONG ulReserved1; + ULONG ulReserved2; +} SWP; +typedef SWP *PSWP; + +typedef struct _ICONINFO +{ + ULONG cb; + ULONG fFormat; + PSZ pszFileName; + HMODULE hmod; + ULONG resid; + ULONG cbIconData; + PVOID pIconData; +} ICONINFO; +typedef ICONINFO *PICONINFO; + + +#define MPVOID ((MPARAM)0) + +#define MPFROMP(x) ((MPARAM)((ULONG)(x))) +#define MPFROMHWND(x) ((MPARAM)(HWND)(x)) +#define MPFROMCHAR(x) ((MPARAM)(ULONG)(USHORT)(x)) +#define MPFROMSHORT(x) ((MPARAM)(ULONG)(USHORT)(x)) +#define MPFROM2SHORT(x1,x2) ((MPARAM)MAKELONG (x1, x2)) +#define MPFROMSH2CH(s,c1,c2) ((MPARAM)MAKELONG (s, MAKESHORT (c1, c2))) +#define MPFROMLONG(x) ((MPARAM)(ULONG)(x)) + +#define PVOIDFROMMP(mp) ((PVOID)(mp)) +#define HWNDFROMMP(mp) ((HWND)(mp)) +#define CHAR1FROMMP(mp) ((UCHAR)(ULONG)(mp)) +#define CHAR2FROMMP(mp) ((UCHAR)((ULONG)mp >> 8)) +#define CHAR3FROMMP(mp) ((UCHAR)((ULONG)mp >> 16)) +#define CHAR4FROMMP(mp) ((UCHAR)((ULONG)mp >> 24)) +#define SHORT1FROMMP(mp) ((USHORT)(ULONG)(mp)) +#define SHORT2FROMMP(mp) ((USHORT)((ULONG)mp >> 16)) +#define LONGFROMMP(mp) ((ULONG)(mp)) + +#define MRFROMP(x) ((MRESULT)(PVOID)(x)) +#define MRFROMSHORT(x) ((MRESULT)(ULONG)(USHORT)(x)) +#define MRFROM2SHORT(x1,x2) ((MRESULT)MAKELONG (x1, x2)) +#define MRFROMLONG(x) ((MRESULT)(ULONG)(x)) + +#define PVOIDFROMMR(mr) ((VOID *)(mr)) +#define SHORT1FROMMR(mr) ((USHORT)((ULONG)mr)) +#define SHORT2FROMMR(mr) ((USHORT)((ULONG)mr >> 16)) +#define LONGFROMMR(mr) ((ULONG)(mr)) + + +HWND WinCreateWindow (HWND hwndParent, PCSZ pszClass, PCSZ pszName, + ULONG flStyle, LONG x, LONG y, LONG cx, LONG cy, HWND hwndOwner, + HWND hwndInsertBehind, ULONG id, PVOID pCtlData, PVOID pPresParams); +BOOL WinDrawBitmap (HPS hpsDst, HBITMAP hbm, __const__ RECTL *pwrcSrc, + __const__ POINTL *pptlDst, LONG clrFore, LONG clrBack, ULONG fl); +BOOL WinDrawBorder (HPS hps, __const__ RECTL *prcl, LONG cx, LONG cy, + LONG clrFore, LONG clrBack, ULONG flCmd); +LONG WinDrawText (HPS hps, LONG cchText, PCCH lpchText, PRECTL prcl, + LONG clrFore, LONG clrBack, ULONG flCmd); +BOOL WinEnableWindow (HWND hwnd, BOOL fEnable); +BOOL WinEnableWindowUpdate (HWND hwnd, BOOL fEnable); +BOOL WinInvalidateRect (HWND hwnd, __const__ RECTL *prcl, + BOOL fIncludeChildren); +BOOL WinInvalidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren); +BOOL WinInvertRect (HPS hps, __const__ RECTL *prcl); +BOOL WinIsChild (HWND hwnd, HWND hwndParent); +BOOL WinIsWindow (HAB hab, HWND hwnd); +BOOL WinIsWindowEnabled (HWND hwnd); +BOOL WinIsWindowVisible (HWND hwnd); +LONG WinLoadMessage (HAB hab, HMODULE hmod, ULONG id, LONG cchMax, + PSZ pchBuffer); +LONG WinLoadString (HAB hab, HMODULE hmod, ULONG id, LONG cchMax, + PSZ pchBuffer); +LONG WinMultWindowFromIDs (HWND hwndParent, PHWND prghwnd, ULONG idFirst, + ULONG idLast); +HWND WinQueryDesktopWindow (HAB hab, HDC hdc); +HWND WinQueryObjectWindow (HWND hwndDesktop); +HPOINTER WinQueryPointer (HWND hwndDesktop); +HWND WinQueryWindow (HWND hwnd, LONG cmd); +BOOL WinQueryWindowPos (HWND hwnd, PSWP pswp); +BOOL WinQueryWindowProcess (HWND hwnd, PPID ppid, PTID ptid); +LONG WinQueryWindowText (HWND hwnd, LONG cchBufferMax, PCH pchBuffer); +LONG WinQueryWindowTextLength (HWND hwnd); +BOOL WinSetMultWindowPos (HAB hab, __const__ SWP *pswp, ULONG cswp); +BOOL WinSetOwner (HWND hwnd, HWND hwndNewOwner); +BOOL WinSetParent (HWND hwnd, HWND hwndNewParent, BOOL fRedraw); +BOOL WinSetWindowPos (HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y, + LONG cx, LONG cy, ULONG fl); +BOOL WinSetWindowText (HWND hwnd, PCSZ pszText); +BOOL WinUpdateWindow (HWND hwnd); +HWND WinWindowFromID (HWND hwndParent, ULONG id); + + +#if defined (INCL_WINFRAMEMGR) || !defined (INCL_NOCOMMON) + +#define FCF_TITLEBAR 0x00000001 +#define FCF_SYSMENU 0x00000002 +#define FCF_MENU 0x00000004 +#define FCF_SIZEBORDER 0x00000008 +#define FCF_MINBUTTON 0x00000010 +#define FCF_MAXBUTTON 0x00000020 +#define FCF_MINMAX (FCF_MINBUTTON|FCF_MAXBUTTON) +#define FCF_VERTSCROLL 0x00000040 +#define FCF_HORZSCROLL 0x00000080 +#define FCF_DLGBORDER 0x00000100 +#define FCF_BORDER 0x00000200 +#define FCF_SHELLPOSITION 0x00000400 +#define FCF_TASKLIST 0x00000800 +#define FCF_NOBYTEALIGN 0x00001000 +#define FCF_NOMOVEWITHOWNER 0x00002000 +#define FCF_ICON 0x00004000 +#define FCF_ACCELTABLE 0x00008000 +#define FCF_SYSMODAL 0x00010000 +#define FCF_SCREENALIGN 0x00020000 +#define FCF_MOUSEALIGN 0x00040000 +#define FCF_PALETTE_NORMAL 0x00080000 +#define FCF_PALETTE_HELP 0x00100000 +#define FCF_PALETTE_POPUPODD 0x00200000 +#define FCF_PALETTE_POPUPEVEN 0x00400000 +#define FCF_HIDEBUTTON 0x01000000 +#define FCF_HIDEMAX 0x01000020 +#define FCF_AUTOICON 0x40000000 +#if defined (INCL_NLS) +#define FCF_DBE_APPSTAT 0x80000000 +#endif /* INCL_NLS */ + +#define FCF_STANDARD 0x0000cc3f + +#define FF_FLASHWINDOW 0x0001 +#define FF_ACTIVE 0x0002 +#define FF_FLASHHILITE 0x0004 +#define FF_OWNERHIDDEN 0x0008 +#define FF_DLGDISMISSED 0x0010 +#define FF_OWNERDISABLED 0x0020 +#define FF_SELECTED 0x0040 +#define FF_NOACTIVATESWP 0x0080 +#define FF_DIALOGBOX 0x0100 + +#define FS_ICON 0x00000001 +#define FS_ACCELTABLE 0x00000002 +#define FS_SHELLPOSITION 0x00000004 +#define FS_TASKLIST 0x00000008 +#define FS_NOBYTEALIGN 0x00000010 +#define FS_NOMOVEWITHOWNER 0x00000020 +#define FS_SYSMODAL 0x00000040 +#define FS_DLGBORDER 0x00000080 +#define FS_BORDER 0x00000100 +#define FS_SCREENALIGN 0x00000200 +#define FS_MOUSEALIGN 0x00000400 +#define FS_SIZEBORDER 0x00000800 +#define FS_AUTOICON 0x00001000 +#if defined (INCL_NLS) +#define FS_DBE_APPSTAT 0x00008000 +#endif /* INCL_NLS */ + +#define FS_STANDARD 0x0000000f + +typedef struct _FRAMECDATA +{ + USHORT cb; + ULONG flCreateFlags; + USHORT hmodResources; + USHORT idResources; +} FRAMECDATA; +typedef FRAMECDATA *PFRAMECDATA; + +HWND WinCreateStdWindow (HWND hwndParent, ULONG flStyle, + PULONG pflCreateFlags, PCSZ pszClientClass, PCSZ pszTitle, + ULONG styleClient, HMODULE hmod, ULONG idResources, PHWND phwndClient); + +#endif /* INCL_WINFRAMEMGR || !INCL_NOCOMMON */ + +#if defined (INCL_WINFRAMEMGR) + +#define WM_FLASHWINDOW 0x0040 +#define WM_FORMATFRAME 0x0041 +#define WM_UPDATEFRAME 0x0042 +#define WM_FOCUSCHANGE 0x0043 +#define WM_SETBORDERSIZE 0x0044 +#define WM_TRACKFRAME 0x0045 +#define WM_MINMAXFRAME 0x0046 +#define WM_SETICON 0x0047 +#define WM_QUERYICON 0x0048 +#define WM_SETACCELTABLE 0x0049 +#define WM_QUERYACCELTABLE 0x004a +#define WM_TRANSLATEACCEL 0x004b +#define WM_QUERYTRACKINFO 0x004c +#define WM_QUERYBORDERSIZE 0x004d +#define WM_NEXTMENU 0x004e +#define WM_ERASEBACKGROUND 0x004f +#define WM_QUERYFRAMEINFO 0x0050 +#define WM_QUERYFOCUSCHAIN 0x0051 +#define WM_OWNERPOSCHANGE 0x0052 +#define WM_CALCFRAMERECT 0x0053 +#define WM_WINDOWPOSCHANGED 0x0055 +#define WM_ADJUSTFRAMEPOS 0x0056 +#define WM_QUERYFRAMECTLCOUNT 0x0059 +#define WM_QUERYHELPINFO 0x005b +#define WM_SETHELPINFO 0x005c +#define WM_ERROR 0x005d +#define WM_REALIZEPALETTE 0x005e + +#define FI_FRAME 0x00000001 +#define FI_OWNERHIDE 0x00000002 +#define FI_ACTIVATEOK 0x00000004 +#define FI_NOMOVEWITHOWNER 0x00000008 + +#define FID_SYSMENU 0x8002 +#define FID_TITLEBAR 0x8003 +#define FID_MINMAX 0x8004 +#define FID_MENU 0x8005 +#define FID_VERTSCROLL 0x8006 +#define FID_HORZSCROLL 0x8007 +#define FID_CLIENT 0x8008 +#define FID_DBE_APPSTAT 0x8010 +#define FID_DBE_KBDSTAT 0x8011 +#define FID_DBE_PECIC 0x8012 +#define FID_DBE_KKPOPUP 0x8013 + +#define SC_SIZE 0x8000 +#define SC_MOVE 0x8001 +#define SC_MINIMIZE 0x8002 +#define SC_MAXIMIZE 0x8003 +#define SC_CLOSE 0x8004 +#define SC_NEXT 0x8005 +#define SC_APPMENU 0x8006 +#define SC_SYSMENU 0x8007 +#define SC_RESTORE 0x8008 +#define SC_NEXTFRAME 0x8009 +#define SC_NEXTWINDOW 0x8010 +#define SC_TASKMANAGER 0x8011 +#define SC_HELPKEYS 0x8012 +#define SC_HELPINDEX 0x8013 +#define SC_HELPEXTENDED 0x8014 +#define SC_SWITCHPANELIDS 0x8015 +#define SC_DBE_FIRST 0x8018 +#define SC_DBE_LAST 0x801f +#define SC_BEGINDRAG 0x8020 +#define SC_ENDDRAG 0x8021 +#define SC_SELECT 0x8022 +#define SC_OPEN 0x8023 +#define SC_CONTEXTMENU 0x8024 +#define SC_CONTEXTHELP 0x8025 +#define SC_TEXTEDIT 0x8026 +#define SC_BEGINSELECT 0x8027 +#define SC_ENDSELECT 0x8028 +#define SC_WINDOW 0x8029 +#define SC_HIDE 0x802a + +typedef LHANDLE HSAVEWP; + +BOOL WinCalcFrameRect (HWND hwndFrame, PRECTL prcl, BOOL fClient); +BOOL WinCreateFrameControls (HWND hwndFrame, PFRAMECDATA pfcdata, + PCSZ pszTitle); +BOOL WinFlashWindow (HWND hwndFrame, BOOL fFlash); +BOOL WinGetMaxPosition (HWND hwnd, PSWP pswp); +BOOL WinGetMinPosition (HWND hwnd, PSWP pswp, __const__ POINTL *pptl); +BOOL WinSaveWindowPos (HSAVEWP hsvwp, PSWP pswp, ULONG cswp); + +#endif /* INCL_WINFRAMEMGR */ + + +#if defined (INCL_WINWINDOWMGR) || !defined (INCL_NOCOMMON) + +#define PSF_LOCKWINDOWUPDATE 0x0001 +#define PSF_CLIPUPWARDS 0x0002 +#define PSF_CLIPDOWNWARDS 0x0004 +#define PSF_CLIPSIBLINGS 0x0008 +#define PSF_CLIPCHILDREN 0x0010 +#define PSF_PARENTCLIP 0x0020 + +#define QV_OS2 0x0000 +#define QV_CMS 0x0001 +#define QV_TSO 0x0002 +#define QV_TSOBATCH 0x0003 +#define QV_OS400 0x0004 + +#define SW_SCROLLCHILDREN 0x0001 +#define SW_INVALIDATERGN 0x0002 + + +typedef struct _QVERSDATA +{ + USHORT environment; + USHORT version; +} QVERSDATA; +typedef QVERSDATA *PQVERSDATA; + + +HPS WinBeginPaint (HWND hwnd, HPS hps, PRECTL prclPaint); +MRESULT WinDefWindowProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +BOOL WinDestroyWindow (HWND hwnd); +BOOL WinEndPaint (HPS hps); +BOOL WinFillRect (HPS hps, __const__ RECTL *prcl, LONG lColor); +HPS WinGetClipPS (HWND hwnd, HWND hwndClip, ULONG fl); +HPS WinGetPS (HWND hwnd); +HAB WinInitialize (ULONG fsOptions); +BOOL WinIsWindowShowing (HWND hwnd); +HDC WinOpenWindowDC (HWND hwnd); +HAB WinQueryAnchorBlock (HWND hwnd); +ULONG WinQueryVersion (HAB hab); +BOOL WinQueryWindowRect (HWND hwnd, PRECTL prclDest); +BOOL WinRegisterClass (HAB hab, PCSZ pszClassName, PFNWP pfnWndProc, + ULONG flStyle, ULONG cbWindowData); +BOOL WinReleasePS (HPS hps); +LONG WinScrollWindow (HWND hwnd, LONG dx, LONG dy, __const__ RECTL *prclScroll, + __const__ RECTL *prclClip, HRGN hrgnUpdate, PRECTL prclUpdate, + ULONG rgfsw); +BOOL WinSetActiveWindow (HWND hwndDesktop, HWND hwnd); +BOOL WinShowWindow (HWND hwnd, BOOL fShow); +BOOL WinTerminate (HAB hab); + +#endif /* INCL_WINWINDOWMGR || !INCL_NOCOMMON */ + +#if defined (INCL_WINWINDOWMGR) + +#define WM_QUERYCONVERTPOS 0x00b0 + +#define QCP_CONVERT 0x0001 +#define QCP_NOCONVERT 0x0000 + +#define QWS_USER 0 +#define QWS_ID (-1) +#define QWS_MIN (-1) + +#define QWL_USER 0 +#define QWL_STYLE (-2) +#define QWP_PFNWP (-3) +#define QWL_HMQ (-4) +#define QWL_RESERVED (-5) +#define QWL_PENDATA (-7) +#define QWL_BD_ATTR (-9) +#define QWL_BD_STAT (-10) +#define QWL_KBDLAYER (-11) +#define QWL_MIN (-11) + +#define QWL_HHEAP 0x0004 +#define QWL_HWNDFOCUSSAVE 0x0018 +#define QWL_DEFBUTTON 0x0040 +#define QWL_PSSCBLK 0x0048 +#define QWL_PFEPBLK 0x004c +#define QWL_PSTATBLK 0x0050 + +#define QWS_FLAGS 0x0008 +#define QWS_RESULT 0x000a +#define QWS_XRESTORE 0x000c +#define QWS_YRESTORE 0x000e +#define QWS_CXRESTORE 0x0010 +#define QWS_CYRESTORE 0x0012 +#define QWS_XMINIMIZE 0x0014 +#define QWS_YMINIMIZE 0x0016 + + +typedef struct _CLASSINFO +{ + ULONG flClassStyle; + PFNWP pfnWindowProc; + ULONG cbWindowData; +} CLASSINFO; +typedef CLASSINFO *PCLASSINFO; + +typedef struct _CREATESTRUCT +{ + PVOID pPresParams; + PVOID pCtlData; + ULONG id; + HWND hwndInsertBehind; + HWND hwndOwner; + LONG cy; + LONG cx; + LONG y; + LONG x; + ULONG flStyle; + PSZ pszText; + PSZ pszClass; + HWND hwndParent; +} CREATESTRUCT; +typedef CREATESTRUCT *PCREATESTRUCT; + +typedef LHANDLE HENUM; + + +HENUM WinBeginEnumWindows (HWND hwnd); +BOOL WinEndEnumWindows (HENUM henum); +LONG WinExcludeUpdateRegion (HPS hps, HWND hwnd); +HWND WinGetNextWindow (HENUM henum); +HPS WinGetScreenPS (HWND hwndDesktop); +BOOL WinIsThreadActive (HAB hab); +BOOL WinLockVisRegions (HWND hwndDesktop, BOOL fLock); +BOOL WinLockWindowUpdate (HWND hwndDesktop, HWND hwndLockUpdate); +BOOL WinMapWindowPoints (HWND hwndFrom, HWND hwndTo, PPOINTL prgptl, + LONG cwpt); +HWND WinQueryActiveWindow (HWND hwndDesktop); +BOOL WinQueryClassInfo (HAB hab, PCSZ pszClassName, PCLASSINFO pClassInfo); +LONG WinQueryClassName (HWND hwnd, LONG cchMax, PCH pch); +BOOL WinQueryUpdateRect (HWND hwnd, PRECTL prcl); +LONG WinQueryUpdateRegion (HWND hwnd, HRGN hrgn); +HWND WinQuerySysModalWindow (HWND hwndDesktop); +HDC WinQueryWindowDC (HWND hwnd); +PVOID WinQueryWindowPtr (HWND hwnd, LONG index); +ULONG WinQueryWindowULong (HWND hwnd, LONG index); +USHORT WinQueryWindowUShort (HWND hwnd, LONG index); +BOOL WinSetSysModalWindow (HWND hwndDesktop, HWND hwnd); +BOOL WinSetWindowBits (HWND hwnd, LONG index, ULONG flData, ULONG flMask); +BOOL WinSetWindowPtr (HWND hwnd, LONG index, PVOID p); +BOOL WinSetWindowULong (HWND hwnd, LONG index, ULONG ul); +BOOL WinSetWindowUShort (HWND hwnd, LONG index, USHORT us); +PFNWP WinSubclassWindow (HWND hwnd, PFNWP pfnwp); +BOOL WinValidateRect (HWND hwnd, __const__ RECTL *prcl, BOOL fIncludeChildren); +BOOL WinValidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren); +HWND WinWindowFromDC (HDC hdc); +HWND WinWindowFromPoint (HWND hwnd, __const__ POINTL *pptl, BOOL fChildren); + +#endif /* INCL_WINWINDOWMGR */ + + +#if defined (INCL_WINACCELERATORS) + +#define AF_CHAR 0x0001 +#define AF_VIRTUALKEY 0x0002 +#define AF_SCANCODE 0x0004 +#define AF_SHIFT 0x0008 +#define AF_CONTROL 0x0010 +#define AF_ALT 0x0020 +#define AF_LONEKEY 0x0040 +#define AF_SYSCOMMAND 0x0100 +#define AF_HELP 0x0200 + +typedef struct _ACCEL +{ + USHORT fs; + USHORT key; + USHORT cmd; +} ACCEL; +typedef ACCEL *PACCEL; + +typedef struct _ACCELTABLE +{ + USHORT cAccel; + USHORT codepage; + ACCEL aaccel[1]; +} ACCELTABLE; +typedef ACCELTABLE *PACCELTABLE; + +ULONG WinCopyAccelTable (HACCEL haccel, PACCELTABLE pAccelTable, + ULONG cbCopyMax); +HACCEL WinCreateAccelTable (HAB hab, PACCELTABLE pAccelTable); +BOOL WinDestroyAccelTable (HACCEL haccel); +HACCEL WinLoadAccelTable (HAB hab, HMODULE hmod, ULONG idAccelTable); +HACCEL WinQueryAccelTable (HAB hab, HWND hwndFrame); +BOOL WinSetAccelTable (HAB hab, HACCEL haccel, HWND hwndFrame); +BOOL WinTranslateAccel (HAB hab, HWND hwnd, HACCEL haccel, PQMSG pqmsg); + +#endif /* INCL_WINACCELERATORS */ + + +#if defined (INCL_WINATOM) + +typedef LHANDLE HATOMTBL; +typedef ULONG ATOM; + +#define MAKEINTATOM(x) ((PCH)MAKEULONG (x, 0xffff)) + +ATOM WinAddAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName); +HATOMTBL WinCreateAtomTable (ULONG cbInitial, ULONG cBuckets); +ATOM WinDeleteAtom (HATOMTBL hAtomTbl, ATOM atom); +HATOMTBL WinDestroyAtomTable (HATOMTBL hAtomTbl); +ATOM WinFindAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName); +ULONG WinQueryAtomLength (HATOMTBL hAtomTbl, ATOM atom); +ULONG WinQueryAtomName (HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer, + ULONG cchBufferMax); +ULONG WinQueryAtomUsage (HATOMTBL hAtomTbl, ATOM atom); +HATOMTBL WinQuerySystemAtomTable (VOID); + +#endif /* INCL_WINATOM */ + + +#if defined (INCL_WINBUTTONS) + +#define BDS_HILITED 0x0100 +#define BDS_DISABLED 0x0200 +#define BDS_DEFAULT 0x0400 + +#define BM_CLICK 0x0120 +#define BM_QUERYCHECKINDEX 0x0121 +#define BM_QUERYHILITE 0x0122 +#define BM_SETHILITE 0x0123 +#define BM_QUERYCHECK 0x0124 +#define BM_SETCHECK 0x0125 +#define BM_SETDEFAULT 0x0126 + +#define BN_CLICKED 1 +#define BN_DBLCLICKED 2 +#define BN_PAINT 3 + +#define BS_PUSHBUTTON 0 +#define BS_CHECKBOX 1 +#define BS_AUTOCHECKBOX 2 +#define BS_RADIOBUTTON 3 +#define BS_AUTORADIOBUTTON 4 +#define BS_3STATE 5 +#define BS_AUTO3STATE 6 +#define BS_USERBUTTON 7 + +#define BS_PRIMARYSTYLES 0x000f +#define BS_TEXT 0x0010 +#define BS_MINIICON 0x0020 +#define BS_BITMAP 0x0040 +#define BS_ICON 0x0080 +#define BS_HELP 0x0100 +#define BS_SYSCOMMAND 0x0200 +#define BS_DEFAULT 0x0400 +#define BS_NOPOINTERFOCUS 0x0800 +#define BS_NOBORDER 0x1000 +#define BS_NOCURSORSELECT 0x2000 +#define BS_AUTOSIZE 0x4000 + +typedef struct _BTNCDATA +{ + USHORT cb; + USHORT fsCheckState; + USHORT fsHiliteState; + LHANDLE hImage; +} BTNCDATA; +typedef BTNCDATA *PBTNCDATA; + +typedef struct _USERBUTTON +{ + HWND hwnd; + HPS hps; + ULONG fsState; + ULONG fsStateOld; +} USERBUTTON; +typedef USERBUTTON *PUSERBUTTON; + + +#endif /* INCL_WINBUTTONS */ + + +#if defined (INCL_WINCLIPBOARD) || defined (INCL_WINDDE) + +#define WM_RENDERFMT 0x0060 +#define WM_RENDERALLFMTS 0x0061 +#define WM_DESTROYCLIPBOARD 0x0062 +#define WM_PAINTCLIPBOARD 0x0063 +#define WM_SIZECLIPBOARD 0x0064 +#define WM_HSCROLLCLIPBOARD 0x0065 +#define WM_VSCROLLCLIPBOARD 0x0066 +#define WM_DRAWCLIPBOARD 0x0067 + +#define CF_TEXT 1 +#define CF_BITMAP 2 +#define CF_DSPTEXT 3 +#define CF_DSPBITMAP 4 +#define CF_METAFILE 5 +#define CF_DSPMETAFILE 6 +#define CF_PALETTE 9 +#define CF_MMPMFIRST 10 +#define CF_MMPMLAST 19 + +#define SZFMT_TEXT "#1" +#define SZFMT_BITMAP "#2" +#define SZFMT_DSPTEXT "#3" +#define SZFMT_DSPBITMAP "#4" +#define SZFMT_METAFILE "#5" +#define SZFMT_DSPMETAFILE "#6" +#define SZFMT_PALETTE "#9" +#define SZFMT_SYLK "Sylk" +#define SZFMT_DIF "Dif" +#define SZFMT_TIFF "Tiff" +#define SZFMT_OEMTEXT "OemText" +#define SZFMT_DIB "Dib" +#define SZFMT_OWNERDISPLAY "OwnerDisplay" +#define SZFMT_LINK "Link" +#define SZFMT_METAFILEPICT "MetaFilePict" +#define SZFMT_DSPMETAFILEPICT "DspMetaFilePict" +#define SZFMT_CPTEXT "Codepage Text" + +typedef struct _CPTEXT +{ + USHORT idCountry; + USHORT usCodepage; + USHORT usLangID; + USHORT usSubLangID; + BYTE abText[1]; +} CPTEXT; +typedef CPTEXT *PCPTEXT; + +typedef struct _MFP +{ + POINTL sizeBounds; + POINTL sizeMM; + ULONG cbLength; + USHORT mapMode; + USHORT reserved; + BYTE abData[1]; +} MFP; +typedef MFP *PMFP; + +#endif /* INCL_WINCLIPBOARD || INCL_WINDDE */ + +#if defined (INCL_WINCLIPBOARD) + +#define CFI_OWNERFREE 0x0001 +#define CFI_OWNERDISPLAY 0x0002 +#define CFI_HANDLE 0x0200 +#define CFI_POINTER 0x0400 + +BOOL WinCloseClipbrd (HAB hab); +BOOL WinEmptyClipbrd (HAB hab); +ULONG WinEnumClipbrdFmts (HAB hab, ULONG fmt); +BOOL WinOpenClipbrd (HAB hab); +ULONG WinQueryClipbrdData (HAB hab, ULONG fmt); +BOOL WinQueryClipbrdFmtInfo (HAB hab, ULONG fmt, PULONG prgfFmtInfo); +HWND WinQueryClipbrdOwner (HAB hab); +HWND WinQueryClipbrdViewer (HAB hab); +BOOL WinSetClipbrdData (HAB hab, ULONG ulData, ULONG fmt, ULONG rgfFmtInfo); +BOOL WinSetClipbrdOwner (HAB hab, HWND hwnd); +BOOL WinSetClipbrdViewer (HAB hab, HWND hwndNewClipViewer); + +#endif /* INCL_WINCLIPBOARD */ + + +#if defined (INCL_WINDDE) + +#define WM_DDE_FIRST 0x00a0 +#define WM_DDE_INITIATE 0x00a0 +#define WM_DDE_REQUEST 0x00a1 +#define WM_DDE_ACK 0x00a2 +#define WM_DDE_DATA 0x00a3 +#define WM_DDE_ADVISE 0x00a4 +#define WM_DDE_UNADVISE 0x00a5 +#define WM_DDE_POKE 0x00a6 +#define WM_DDE_EXECUTE 0x00a7 +#define WM_DDE_TERMINATE 0x00a8 +#define WM_DDE_INITIATEACK 0x00a9 +#define WM_DDE_LAST 0x00af + +#define DDE_FACK 0x0001 +#define DDE_FBUSY 0x0002 +#define DDE_FNODATA 0x0004 +#define DDE_FACKREQ 0x0008 +#define DDE_FRESPONSE 0x0010 +#define DDE_NOTPROCESSED 0x0020 +#define DDE_FRESERVED 0x00c0 +#define DDE_FAPPSTATUS 0xff00 + +#define DDECTXT_CASESENSITIVE 0x0001 + +#define DDEFMT_TEXT 0x0001 + +#define DDEPM_RETRY 0x0001 +#define DDEPM_NOFREE 0x0002 + +#define SZDDESYS_TOPIC "System" +#define SZDDESYS_ITEM_TOPICS "Topics" +#define SZDDESYS_ITEM_SYSITEMS "SysItems" +#define SZDDESYS_ITEM_RTNMSG "ReturnMessage" +#define SZDDESYS_ITEM_STATUS "Status" +#define SZDDESYS_ITEM_FORMATS "Formats" +#define SZDDESYS_ITEM_SECURITY "Security" +#define SZDDESYS_ITEM_ITEMFORMATS "ItemFormats" +#define SZDDESYS_ITEM_HELP "Help" +#define SZDDESYS_ITEM_PROTOCOLS "Protocols" +#define SZDDESYS_ITEM_RESTART "Restart" + +typedef struct _CONVCONTEXT +{ + ULONG cb; + ULONG fsContext; + ULONG idCountry; + ULONG usCodepage; + ULONG usLangID; + ULONG usSubLangID; +} CONVCONTEXT; +typedef CONVCONTEXT *PCONVCONTEXT; + +typedef struct _DDEINIT +{ + ULONG cb; + PSZ pszAppName; + PSZ pszTopic; + ULONG offConvContext; +} DDEINIT; +typedef DDEINIT *PDDEINIT; + +typedef struct _DDESTRUCT +{ + ULONG cbData; + USHORT fsStatus; + USHORT usFormat; + USHORT offszItemName; + USHORT offabData; +} DDESTRUCT; +typedef DDESTRUCT *PDDESTRUCT; + +#define DDES_PSZITEMNAME(pddes) \ + (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName) + +#define DDES_PABDATA(pddes) \ + (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData) + +#define DDEI_PCONVCONTEXT(pddei) \ + ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext)) + +BOOL WinDdeInitiate (HWND hwndClient, PCSZ pszAppName, PCSZ pszTopicName, + __const__ CONVCONTEXT *pcctxt); +BOOL WinDdePostMsg (HWND hwndTo, HWND hwndFrom, ULONG wm, + __const__ DDESTRUCT *pddest, ULONG flOptions); +MRESULT WinDdeRespond (HWND hwndClient, HWND hwndServer, PCSZ pszAppName, + PCSZ pszTopicName, __const__ CONVCONTEXT *pcctxt); + +#endif /* INCL_WINDDE */ + + +#if defined (INCL_WINCOUNTRY) + +#define WCS_ERROR 0 +#define WCS_EQ 1 +#define WCS_LT 2 +#define WCS_GT 3 + +ULONG WinCompareStrings (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz1, + PCSZ psz2, ULONG reserved); +UCHAR WinCpTranslateChar (HAB hab, ULONG cpSrc, UCHAR chSrc, ULONG cpDst); +BOOL WinCpTranslateString (HAB hab, ULONG cpSrc, PCSZ pszSrc, ULONG cpDst, + ULONG cchDestMax, PSZ pchDest); +PSZ WinNextChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz); +PSZ WinPrevChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ pszStart, + PCSZ psz); +ULONG WinQueryCp (HMQ hmq); +ULONG WinQueryCpList (HAB hab, ULONG ccpMax, PULONG prgcp); +BOOL WinSetCp (HMQ hmq, ULONG idCodePage); +ULONG WinUpper (HAB hab, ULONG idcp, ULONG idcc, PSZ psz); +ULONG WinUpperChar (HAB hab, ULONG idcp, ULONG idcc, ULONG c); + +#endif /* INCL_WINCOUNTRY */ + + +#if defined (INCL_WINCURSORS) || !defined (INCL_NOCOMMON) + +#define CURSOR_SOLID 0x0000 +#define CURSOR_HALFTONE 0x0001 +#define CURSOR_FRAME 0x0002 +#define CURSOR_FLASH 0x0004 +#define CURSOR_BIDI_FIRST 0x0100 +#define CURSOR_BIDI_LAST 0x0200 +#define CURSOR_SETPOS 0x8000 + +BOOL WinCreateCursor (HWND hwnd, LONG x, LONG y, LONG cx, LONG cy, + ULONG fs, PRECTL prclClip); +BOOL WinDestroyCursor (HWND hwnd); +BOOL WinShowCursor (HWND hwnd, BOOL fShow); + +#endif /* INCL_WINCURSORS || !INCL_NOCOMMON */ + +#if defined (INCL_WINCURSORS) + +typedef struct _CURSORINFO +{ + HWND hwnd; + LONG x; + LONG y; + LONG cx; + LONG cy; + ULONG fs; + RECTL rclClip; +} CURSORINFO; +typedef CURSORINFO *PCURSORINFO; + +BOOL WinQueryCursorInfo (HWND hwndDesktop, PCURSORINFO pCursorInfo); + +#endif /* INCL_WINCURSORS */ + + +#if defined (INCL_WINDESKTOP) + +#define SDT_DESTROY 0x0001 +#define SDT_NOBKGND 0x0002 +#define SDT_TILE 0x0004 +#define SDT_SCALE 0x0008 +#define SDT_PATTERN 0x0010 +#define SDT_CENTER 0x0020 +#define SDT_RETAIN 0x0040 +#define SDT_LOADFILE 0x0080 + +typedef struct _DESKTOP +{ + ULONG cbSize; + HBITMAP hbm; + LONG x; + LONG y; + ULONG fl; + LONG lTileCount; + CHAR szFile[260]; +} DESKTOP; +typedef DESKTOP *PDESKTOP; + +BOOL WinQueryDesktopBkgnd (HWND hwndDesktop, PDESKTOP pdsk); +HBITMAP WinSetDesktopBkgnd (HWND hwndDesktop, __const__ DESKTOP *pdskNew); + +#endif /* INCL_WINDESKTOP */ + + +#if defined (INCL_WINDIALOGS) || !defined (INCL_NOCOMMON) + +#define DID_OK 1 +#define DID_CANCEL 2 +#define DID_ERROR 0xffff + +#define MB_OK 0x0000 +#define MB_OKCANCEL 0x0001 +#define MB_RETRYCANCEL 0x0002 +#define MB_ABORTRETRYIGNORE 0x0003 +#define MB_YESNO 0x0004 +#define MB_YESNOCANCEL 0x0005 +#define MB_CANCEL 0x0006 +#define MB_ENTER 0x0007 +#define MB_ENTERCANCEL 0x0008 + +#define MB_NOICON 0x0000 +#define MB_CUANOTIFICATION 0x0000 +#define MB_ICONQUESTION 0x0010 +#define MB_ICONEXCLAMATION 0x0020 +#define MB_CUAWARNING 0x0020 +#define MB_ICONASTERISK 0x0030 +#define MB_ICONHAND 0x0040 +#define MB_CUACRITICAL 0x0040 +#define MB_QUERY MB_ICONQUESTION +#define MB_WARNING MB_CUAWARNING +#define MB_INFORMATION MB_ICONASTERISK +#define MB_CRITICAL MB_CUACRITICAL +#define MB_ERROR MB_CRITICAL +#define MB_CUSTOMICON 0x0080 + +#define MB_DEFBUTTON1 0x0000 +#define MB_DEFBUTTON2 0x0100 +#define MB_DEFBUTTON3 0x0200 + +#define MB_APPLMODAL 0x0000 +#define MB_SYSTEMMODAL 0x1000 +#define MB_HELP 0x2000 +#define MB_MOVEABLE 0x4000 +#define MB_NONMODAL 0x8000 + +#define MBID_OK 1 +#define MBID_CANCEL 2 +#define MBID_ABORT 3 +#define MBID_RETRY 4 +#define MBID_IGNORE 5 +#define MBID_YES 6 +#define MBID_NO 7 +#define MBID_HELP 8 +#define MBID_ENTER 9 +#define MBID_ERROR 0xffff + +#define WA_WARNING 0 +#define WA_NOTE 1 +#define WA_ERROR 2 +#define WA_CDEFALARMS 3 + +#if 0 /* Multimedia */ +#define WA_WINDOWOPEN 3 +#define WA_WINDOWCLOSE 4 +#define WA_BEGINDRAG 5 +#define WA_ENDDRAG 6 +#define WA_STARTUP 7 +#define WA_SHUTDOWN 8 +#define WA_SHRED 9 +#define WA_CWINALARMS 13 +#endif /* 0 */ + +#define MAX_MBDTEXT 70 + +typedef struct _MB2D +{ + CHAR achText[MAX_MBDTEXT+1]; + CHAR _pad[1]; + ULONG idButton; + LONG flStyle; +} MB2D; +typedef MB2D *PMB2D; + +typedef struct _MB2INFO +{ + ULONG cb; + HPOINTER hIcon; + ULONG cButtons; + ULONG flStyle; + HWND hwndNotify; + MB2D mb2d[1]; +} MB2INFO; + +typedef MB2INFO *PMB2INFO; + + +#define WinCheckButton(hwndDlg,id,usCheckState) \ + ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_SETCHECK, \ + MPFROMSHORT (usCheckState), (MPARAM)NULL)) + +#define WinEnableControl(hwndDlg,id,fEnable) \ + WinEnableWindow (WinWindowFromID (hwndDlg, id), fEnable) + +#define WinIsControlEnabled(hwndDlg,id) \ + ((BOOL)WinIsWindowEnabled (WinWindowFromID (hwndDlg, id))) + +#define WinQueryButtonCheckstate(hwndDlg,id) \ + ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_QUERYCHECK, \ + (MPARAM)NULL, (MPARAM)NULL)) + + +BOOL WinAlarm (HWND hwndDesktop, ULONG rgfType); +MRESULT WinDefDlgProc (HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2); +BOOL WinDismissDlg (HWND hwndDlg, ULONG usResult); +ULONG WinDlgBox (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + HMODULE hmod, ULONG idDlg, PVOID pCreateParams); +BOOL WinGetDlgMsg (HWND hwndDlg, PQMSG pqmsg); +HWND WinLoadDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + HMODULE hmod, ULONG idDlg, PVOID pCreateParams); +ULONG WinMessageBox (HWND hwndParent, HWND hwndOwner, PCSZ pszText, + PCSZ pszCaption, ULONG idWindow, ULONG flStyle); +ULONG WinMessageBox2 (HWND hwndParent, HWND hwndOwner, PCSZ pszText, + PCSZ pszCaption, ULONG idWindow, PMB2INFO pmb2info); +BOOL WinQueryDlgItemShort (HWND hwndDlg, ULONG idItem, PSHORT pResult, + BOOL fSigned); +ULONG WinQueryDlgItemText (HWND hwndDlg, ULONG idItem, LONG cchBufferMax, + PSZ pchBuffer); +LONG WinQueryDlgItemTextLength (HWND hwndDlg, ULONG idItem); +BOOL WinSetDlgItemShort (HWND hwndDlg, ULONG idItem, USHORT usValue, + BOOL fSigned); +BOOL WinSetDlgItemText (HWND hwndDlg, ULONG idItem, PCSZ pszText); + +#endif /* INCL_WINDIALOGS || !defined (INCL_NOCOMMON) */ + + +#if defined (INCL_WINDIALOGS) + +#define DLGC_ENTRYFIELD 0x0001 +#define DLGC_BUTTON 0x0002 +#define DLGC_RADIOBUTTON 0x0004 +#define DLGC_STATIC 0x0008 +#define DLGC_DEFAULT 0x0010 +#define DLGC_PUSHBUTTON 0x0020 +#define DLGC_CHECKBOX 0x0040 +#define DLGC_SCROLLBAR 0x0080 +#define DLGC_MENU 0x0100 +#define DLGC_TABONCLICK 0x0200 +#define DLGC_MLE 0x0400 + +#define EDI_FIRSTTABITEM 0 +#define EDI_LASTTABITEM 1 +#define EDI_NEXTTABITEM 2 +#define EDI_PREVTABITEM 3 +#define EDI_FIRSTGROUPITEM 4 +#define EDI_LASTGROUPITEM 5 +#define EDI_NEXTGROUPITEM 6 +#define EDI_PREVGROUPITEM 7 + +typedef struct _DLGTITEM +{ + USHORT fsItemStatus; + USHORT cChildren; + USHORT cchClassName; + USHORT offClassName; + USHORT cchText; + USHORT offText; + ULONG flStyle; + SHORT x; + SHORT y; + SHORT cx; + SHORT cy; + USHORT id; + USHORT offPresParams; + USHORT offCtlData; +} DLGTITEM; +typedef DLGTITEM *PDLGTITEM; + +typedef struct _DLGTEMPLATE +{ + USHORT cbTemplate; + USHORT type; + USHORT codepage; + USHORT offadlgti; + USHORT fsTemplateStatus; + USHORT iItemFocus; + USHORT coffPresParams; + DLGTITEM adlgti[1]; +} DLGTEMPLATE; +typedef DLGTEMPLATE *PDLGTEMPLATE; + + +HWND WinCreateDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc, + PDLGTEMPLATE pdlgt, PVOID pCreateParams); +HWND WinEnumDlgItem (HWND hwndDlg, HWND hwnd, ULONG code); +BOOL WinMapDlgPoints (HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt, + BOOL fCalcWindowCoords); +ULONG WinProcessDlg (HWND hwndDlg); +MRESULT WinSendDlgItemMsg (HWND hwndDlg, ULONG idItem, ULONG msg, + MPARAM mp1, MPARAM mp2); +LONG WinSubstituteStrings (HWND hwnd, PCSZ pszSrc, LONG cchDstMax, + PSZ pszDst); + +#endif /* INCL_WINDIALOGS */ + + +#if defined (INCL_WINENTRYFIELDS) + +#define CBID_LIST 0x029a +#define CBID_EDIT 0x029b + +#define CBM_SHOWLIST 0x0170 +#define CBM_HILITE 0x0171 +#define CBM_ISLISTSHOWING 0x0172 + +#define CBN_EFCHANGE 1 +#define CBN_EFSCROLL 2 +#define CBN_MEMERROR 3 +#define CBN_LBSELECT 4 +#define CBN_LBSCROLL 5 +#define CBN_SHOWLIST 6 +#define CBN_ENTER 7 + +#define CBS_SIMPLE 0x0001 +#define CBS_DROPDOWN 0x0002 +#define CBS_DROPDOWNLIST 0x0004 +#define CBS_COMPATIBLE 0x0008 + +#define EM_QUERYCHANGED 0x0140 +#define EM_QUERYSEL 0x0141 +#define EM_SETSEL 0x0142 +#define EM_SETTEXTLIMIT 0x0143 +#define EM_CUT 0x0144 +#define EM_COPY 0x0145 +#define EM_CLEAR 0x0146 +#define EM_PASTE 0x0147 +#define EM_QUERYFIRSTCHAR 0x0148 +#define EM_SETFIRSTCHAR 0x0149 +#define EM_QUERYREADONLY 0x014a +#define EM_SETREADONLY 0x014b +#define EM_SETINSERTMODE 0x014c + +#define EN_SETFOCUS 0x0001 +#define EN_KILLFOCUS 0x0002 +#define EN_CHANGE 0x0004 +#define EN_SCROLL 0x0008 +#define EN_MEMERROR 0x0010 +#define EN_OVERFLOW 0x0020 +#define EN_INSERTMODETOGGLE 0x0040 + +#define ES_LEFT 0x0000 +#define ES_CENTER 0x0001 +#define ES_RIGHT 0x0002 +#define ES_AUTOSCROLL 0x0004 +#define ES_MARGIN 0x0008 +#define ES_AUTOTAB 0x0010 +#define ES_READONLY 0x0020 +#define ES_COMMAND 0x0040 +#define ES_UNREADABLE 0x0080 +#define ES_AUTOSIZE 0x0200 + +#if defined (INCL_NLS) +#define ES_ANY 0x0000 +#define ES_SBCS 0x1000 +#define ES_DBCS 0x2000 +#define ES_MIXED 0x3000 +#endif /* INCL_NLS */ + +typedef struct _COMBOCDATA +{ + ULONG cbSize; + ULONG reserved; + PVOID pHWXCtlData; +} COMBOCDATA; +typedef COMBOCDATA *PCOMBOCDATA; + +typedef struct _ENTRYFDATA +{ + USHORT cb; + USHORT cchEditLimit; + USHORT ichMinSel; + USHORT ichMaxSel; + PVOID pHWXCtlData; +} ENTRYFDATA; +typedef ENTRYFDATA *PENTRYFDATA; + +#endif /* INCL_WINENTRYFIELDS */ + + +#if defined (INCL_WINERRORS) + +typedef struct _ERRINFO +{ + ULONG cbFixedErrInfo; + ERRORID idError; + ULONG cDetailLevel; + ULONG offaoffszMsg; + ULONG offBinaryData; +} ERRINFO; +typedef ERRINFO *PERRINFO; + +ERRORID WinGetLastError (HAB hab); +BOOL WinFreeErrorInfo (PERRINFO perrinfo); +PERRINFO WinGetErrorInfo (HAB hab); + +#endif /* INCL_WINERRORS */ + + +#if defined (INCL_WINFRAMECTLS) + +#define TBM_SETHILITE 0x01e3 +#define TBM_QUERYHILITE 0x01e4 + +#endif /* INCL_WINFRAMECTLS */ + + +#if defined (INCL_WINHOOKS) + +#define HK_SENDMSG 0 +#define HK_INPUT 1 +#define HK_MSGFILTER 2 +#define HK_JOURNALRECORD 3 +#define HK_JOURNALPLAYBACK 4 +#define HK_HELP 5 +#define HK_LOADER 6 +#define HK_REGISTERUSERMSG 7 +#define HK_MSGCONTROL 8 +#define HK_PLIST_ENTRY 9 +#define HK_PLIST_EXIT 10 +#define HK_FINDWORD 11 +#define HK_CODEPAGECHANGED 12 +#define HK_WINDOWDC 15 +#define HK_DESTROYWINDOW 16 +#define HK_CHECKMSGFILTER 20 +#define HK_MSGINPUT 21 +#define HK_ALARM 22 +#define HK_LOCKUP 23 +#define HK_FLUSHBUF 24 + +#define HLPM_FRAME (-1) +#define HLPM_WINDOW (-2) +#define HLPM_MENU (-3) + +#define HMQ_CURRENT ((HMQ)1) + +#define LHK_DELETEPROC 1 +#define LHK_DELETELIB 2 +#define LHK_LOADPROC 3 +#define LHK_LOADLIB 4 + +#define MCHK_MSGINTEREST 1 +#define MCHK_CLASSMSGINTEREST 2 +#define MCHK_SYNCHRONISATION 3 +#define MCHK_MSGMODE 4 + +#define MSGF_DIALOGBOX 1 +#define MSGF_MESSAGEBOX 2 +#define MSGF_DDEPOSTMSG 3 +#define MSGF_TRACK 8 + +#define PM_MODEL_1X 0 +#define PM_MODEL_2X 1 + +#define RUMHK_DATATYPE 1 +#define RUMHK_MSG 2 + + +typedef struct _SMHSTRUCT +{ + MPARAM mp2; + MPARAM mp1; + ULONG msg; + HWND hwnd; + ULONG model; +} SMHSTRUCT; +typedef SMHSTRUCT *PSMHSTRUCT; + + +BOOL WinCallMsgFilter (HAB hab, PQMSG pqmsg, ULONG msgf); +BOOL WinReleaseHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod); +BOOL WinSetHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod); + +#endif /* INCL_WINHOOKS */ + + +#if defined (INCL_WININPUT) || !defined (INCL_NOCOMMON) + +#define FC_NOSETFOCUS 0x0001 +#define FC_NOBRINGTOTOP 0x0001 /*!*/ +#define FC_NOLOSEFOCUS 0x0002 +#define FC_NOBRINGTOPFIRSTWINDOW 0x0002 /*!*/ +#define FC_NOSETACTIVE 0x0004 +#define FC_NOLOSEACTIVE 0x0008 +#define FC_NOSETSELECTION 0x0010 +#define FC_NOLOSESELECTION 0x0020 + +#define QFC_NEXTINCHAIN 0x0001 +#define QFC_ACTIVE 0x0002 +#define QFC_FRAME 0x0003 +#define QFC_SELECTACTIVE 0x0004 +#define QFC_PARTOFCHAIN 0x0005 + +BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange); +BOOL WinLockupSystem (HAB hab); +BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus); +BOOL WinUnlockSystem (HAB hab, PCSZ pszPassword); + +#endif /* INCL_WININPUT || !INCL_NOCOMMON */ + + +#if defined (INCL_WININPUT) + +#define WM_MOUSEFIRST 0x0070 +#define WM_MOUSEMOVE 0x0070 +#define WM_BUTTONCLICKFIRST 0x0071 +#define WM_BUTTON1DOWN 0x0071 +#define WM_BUTTON1UP 0x0072 +#define WM_BUTTON1DBLCLK 0x0073 +#define WM_BUTTON2DOWN 0x0074 +#define WM_BUTTON2UP 0x0075 +#define WM_BUTTON2DBLCLK 0x0076 +#define WM_BUTTON3DOWN 0x0077 +#define WM_BUTTON3UP 0x0078 +#define WM_BUTTON3DBLCLK 0x0079 +#define WM_BUTTONCLICKLAST 0x0079 +#define WM_MOUSELAST 0x0079 +#define WM_CHAR 0x007a +#define WM_VIOCHAR 0x007b +#define WM_JOURNALNOTIFY 0x007c +#define WM_MOUSEMAP 0x007d +#define WM_VRNDISABLED 0x007e +#define WM_VRNENABLED 0x007f + +#define WM_EXTMOUSEFIRST 0x0410 +#define WM_CHORD 0x0410 +#define WM_BUTTON1MOTIONSTART 0x0411 +#define WM_BUTTON1MOTIONEND 0x0412 +#define WM_BUTTON1CLICK 0x0413 +#define WM_BUTTON2MOTIONSTART 0x0414 +#define WM_BUTTON2MOTIONEND 0x0415 +#define WM_BUTTON2CLICK 0x0416 +#define WM_BUTTON3MOTIONSTART 0x0417 +#define WM_BUTTON3MOTIONEND 0x0418 +#define WM_BUTTON3CLICK 0x0419 +#define WM_EXTMOUSELAST 0x0419 + +#define WM_MOUSETRANSLATEFIRST 0x0420 +#define WM_BEGINDRAG 0x0420 +#define WM_ENDDRAG 0x0421 +#define WM_SINGLESELECT 0x0422 +#define WM_OPEN 0x0423 +#define WM_CONTEXTMENU 0x0424 +#define WM_CONTEXTHELP 0x0425 +#define WM_TEXTEDIT 0x0426 +#define WM_BEGINSELECT 0x0427 +#define WM_ENDSELECT 0x0428 +#define WM_MOUSETRANSLATELAST 0x0428 +#define WM_PICKUP 0x0429 + +#define WM_PENFIRST 0x0481 +#define WM_PENLAST 0x049f + +#define WM_MMPMFIRST 0x0500 +#define WM_MMPMLAST 0x05ff + +#define WM_BIDI_FIRST 0x0bd0 +#define WM_BIDI_LAST 0x0bff + +#define INP_NONE 0x0000 +#define INP_KBD 0x0001 +#define INP_MULT 0x0002 +#define INP_RES2 0x0004 +#define INP_SHIFT 0x0008 +#define INP_CTRL 0x0010 +#define INP_ALT 0x0020 +#define INP_RES3 0x0040 +#define INP_RES4 0x0080 +#define INP_IGNORE 0xffff + +#define JRN_QUEUESTATUS 0x0001 +#define JRN_PHYSKEYSTATE 0x0002 + +#define KC_NONE 0x0000 +#define KC_CHAR 0x0001 +#define KC_VIRTUALKEY 0x0002 +#define KC_SCANCODE 0x0004 +#define KC_SHIFT 0x0008 +#define KC_CTRL 0x0010 +#define KC_ALT 0x0020 +#define KC_KEYUP 0x0040 +#define KC_PREVDOWN 0x0080 +#define KC_LONEKEY 0x0100 +#define KC_DEADKEY 0x0200 +#define KC_COMPOSITE 0x0400 +#define KC_INVALIDCOMP 0x0800 +#define KC_TOGGLE 0x1000 +#define KC_INVALIDCHAR 0x2000 +#define KC_DBCSRSRVD1 0x4000 +#define KC_DBCSRSRVD2 0x8000 + +#define VK_BUTTON1 0x0001 +#define VK_BUTTON2 0x0002 +#define VK_BUTTON3 0x0003 +#define VK_BREAK 0x0004 +#define VK_BACKSPACE 0x0005 +#define VK_TAB 0x0006 +#define VK_BACKTAB 0x0007 +#define VK_NEWLINE 0x0008 +#define VK_SHIFT 0x0009 +#define VK_CTRL 0x000a +#define VK_ALT 0x000b +#define VK_ALTGRAF 0x000c +#define VK_PAUSE 0x000d +#define VK_CAPSLOCK 0x000e +#define VK_ESC 0x000f +#define VK_SPACE 0x0010 +#define VK_PAGEUP 0x0011 +#define VK_PAGEDOWN 0x0012 +#define VK_END 0x0013 +#define VK_HOME 0x0014 +#define VK_LEFT 0x0015 +#define VK_UP 0x0016 +#define VK_RIGHT 0x0017 +#define VK_DOWN 0x0018 +#define VK_PRINTSCRN 0x0019 +#define VK_INSERT 0x001a +#define VK_DELETE 0x001b +#define VK_SCRLLOCK 0x001c +#define VK_NUMLOCK 0x001d +#define VK_ENTER 0x001e +#define VK_SYSRQ 0x001f +#define VK_F1 0x0020 +#define VK_F2 0x0021 +#define VK_F3 0x0022 +#define VK_F4 0x0023 +#define VK_F5 0x0024 +#define VK_F6 0x0025 +#define VK_F7 0x0026 +#define VK_F8 0x0027 +#define VK_F9 0x0028 +#define VK_F10 0x0029 +#define VK_F11 0x002a +#define VK_F12 0x002b +#define VK_F13 0x002c +#define VK_F14 0x002d +#define VK_F15 0x002e +#define VK_F16 0x002f +#define VK_F17 0x0030 +#define VK_F18 0x0031 +#define VK_F19 0x0032 +#define VK_F20 0x0033 +#define VK_F21 0x0034 +#define VK_F22 0x0035 +#define VK_F23 0x0036 +#define VK_F24 0x0037 +#define VK_ENDDRAG 0x0038 +#define VK_CLEAR 0x0039 +#define VK_EREOF 0x003a +#define VK_PA1 0x003b +#define VK_ATTN 0x003c +#define VK_CRSEL 0x003d +#define VK_EXSEL 0x003e +#define VK_COPY 0x003f +#define VK_BLK1 0x0040 +#define VK_BLK2 0x0041 + +#define VK_MENU VK_F10 + +#if defined (INCL_NLS) +#define VK_DBCSFIRST 0x0080 +#define VK_DBCSLAST 0x00ff +#define VK_BIDI_FIRST 0x00e0 +#define VK_BIDI_LAST 0x00ff +#endif /* INCL_NLS */ + +#define VK_USERFIRST 0x0100 +#define VK_USERLAST 0x01ff + +typedef struct _CHARMSG +{ + USHORT fs; + UCHAR cRepeat; + UCHAR scancode; + USHORT chr; + USHORT vkey; +} CHRMSG; +typedef CHRMSG *PCHRMSG; + +typedef struct _MOUSEMSG +{ + SHORT x; + SHORT y; + USHORT codeHitTest; + USHORT fsInp; +} MSEMSG; +typedef MSEMSG *PMSEMSG; + +#define CHARMSG(pmsg) ((PCHRMSG)((PBYTE)pmsg + sizeof (ULONG))) +#define MOUSEMSG(pmsg) ((PMSEMSG)((PBYTE)pmsg + sizeof (ULONG))) + +BOOL WinCheckInput (HAB hab); +BOOL WinEnablePhysInput (HWND hwndDesktop, BOOL fEnable); +LONG WinGetKeyState (HWND hwndDesktop, LONG vkey); +LONG WinGetPhysKeyState (HWND hwndDesktop, LONG sc); +BOOL WinIsPhysInputEnabled (HWND hwndDesktop); +HWND WinQueryCapture (HWND hwndDesktop); +HWND WinQueryFocus (HWND hwndDesktop); +ULONG WinQueryVisibleRegion (HWND hwnd, HRGN hrgn); +BOOL WinSetCapture (HWND hwndDesktop, HWND hwnd); +BOOL WinSetKeyboardStateTable (HWND hwndDesktop, PBYTE pKeyStateTable, + BOOL fSet); +BOOL WinSetVisibleRegionNotify (HWND hwnd, BOOL fEnable); + +#endif /* INCL_WININPUT */ + + +#if defined (INCL_WINLISTBOXES) + +#define LS_MULTIPLESEL 0x0001 +#define LS_OWNERDRAW 0x0002 +#define LS_NOADJUSTPOS 0x0004 +#define LS_HORZSCROLL 0x0008 +#define LS_EXTENDEDSEL 0x0010 + +#define LN_SELECT 1 +#define LN_SETFOCUS 2 +#define LN_KILLFOCUS 3 +#define LN_SCROLL 4 +#define LN_ENTER 5 + +#define LM_QUERYITEMCOUNT 0x0160 +#define LM_INSERTITEM 0x0161 +#define LM_SETTOPINDEX 0x0162 +#define LM_DELETEITEM 0x0163 +#define LM_SELECTITEM 0x0164 +#define LM_QUERYSELECTION 0x0165 +#define LM_SETITEMTEXT 0x0166 +#define LM_QUERYITEMTEXTLENGTH 0x0167 +#define LM_QUERYITEMTEXT 0x0168 +#define LM_SETITEMHANDLE 0x0169 +#define LM_QUERYITEMHANDLE 0x016a +#define LM_SEARCHSTRING 0x016b +#define LM_SETITEMHEIGHT 0x016c +#define LM_QUERYTOPINDEX 0x016d +#define LM_DELETEALL 0x016e +#define LM_INSERTMULTITEMS 0x016f +#define LM_SETITEMWIDTH 0x0660 /* ? */ + +#define LIT_CURSOR (-4) +#define LIT_ERROR (-3) +#define LIT_MEMERROR (-2) +#define LIT_NONE (-1) +#define LIT_FIRST (-1) + +#define LIT_END (-1) +#define LIT_SORTASCENDING (-2) +#define LIT_SORTDESCENDING (-3) + +#define LSS_SUBSTRING 0x0001 +#define LSS_PREFIX 0x0002 +#define LSS_CASESENSITIVE 0x0004 + + +typedef struct _LBOXINFO +{ + LONG lItemIndex; + ULONG ulItemCount; + ULONG reserved; + ULONG reserved2; +} LBOXINFO; +typedef LBOXINFO *PLBOXINFO; + + +#define WinDeleteLboxItem(hwndLbox,index) \ + ((LONG)WinSendMsg (hwndLbox, LM_DELETEITEM, MPFROMLONG (index), \ + (MPARAM)NULL)) + +#define WinInsertLboxItem(hwndLbox,index,psz) \ + ((LONG)WinSendMsg (hwndLbox, LM_INSERTITEM, MPFROMLONG(index), \ + MPFROMP (psz))) + +#define WinQueryLboxCount(hwndLbox) \ + ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, \ + (MPARAM)NULL)) + +#define WinQueryLboxItemText(hwndLbox,index,psz,cchMax) \ + ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMTEXT, \ + MPFROM2SHORT((index), (cchMax)), MPFROMP (psz))) + +#define WinQueryLboxItemTextLength(hwndLbox,index) \ + ((SHORT)WinSendMsg (hwndLbox, LM_QUERYITEMTEXTLENGTH, \ + MPFROMSHORT (index), (MPARAM)NULL)) + +#define WinQueryLboxSelectedItem(hwndLbox) \ + ((LONG)WinSendMsg (hwndLbox, LM_QUERYSELECTION, MPFROMLONG (LIT_FIRST), \ + (MPARAM)NULL)) + +#define WinSetLboxItemText(hwndLbox,index,psz) \ + ((BOOL)WinSendMsg (hwndLbox, LM_SETITEMTEXT, \ + MPFROMLONG (index), MPFROMP (psz))) + +#endif /* INCL_WINLISTBOXES */ + + +#if defined (INCL_WINLOAD) + +BOOL WinDeleteLibrary (HAB hab, HLIB libhandle); +BOOL WinDeleteProcedure (HAB hab, PFNWP wndproc); +HLIB WinLoadLibrary (HAB hab, PCSZ libname); +PFNWP WinLoadProcedure (HAB hab, HLIB libhandle, PSZ procname); + +#endif /* INCL_WINLOAD */ + + +#if defined (INCL_WINMENUS) + +#define MIA_NODISMISS 0x0020 +#define MIA_FRAMED 0x1000 +#define MIA_CHECKED 0x2000 +#define MIA_DISABLED 0x4000 +#define MIA_HILITED 0x8000 + +#define MIS_TEXT 0x0001 +#define MIS_BITMAP 0x0002 +#define MIS_SEPARATOR 0x0004 +#define MIS_OWNERDRAW 0x0008 +#define MIS_SUBMENU 0x0010 +#define MIS_MULTMENU 0x0020 +#define MIS_SYSCOMMAND 0x0040 +#define MIS_HELP 0x0080 +#define MIS_STATIC 0x0100 +#define MIS_BUTTONSEPARATOR 0x0200 +#define MIS_BREAK 0x0400 +#define MIS_BREAKSEPARATOR 0x0800 +#define MIS_GROUP 0x1000 +#define MIS_SINGLE 0x2000 + +#define MIT_END (-1) +#define MIT_NONE (-1) +#define MIT_MEMERROR (-1) +#define MIT_ERROR (-1) +#define MIT_FIRST (-2) +#define MIT_LAST (-3) + +#define MM_INSERTITEM 0x0180 +#define MM_DELETEITEM 0x0181 +#define MM_QUERYITEM 0x0182 +#define MM_SETITEM 0x0183 +#define MM_QUERYITEMCOUNT 0x0184 +#define MM_STARTMENUMODE 0x0185 +#define MM_ENDMENUMODE 0x0186 +#define MM_REMOVEITEM 0x0188 +#define MM_SELECTITEM 0x0189 +#define MM_QUERYSELITEMID 0x018a +#define MM_QUERYITEMTEXT 0x018b +#define MM_QUERYITEMTEXTLENGTH 0x018c +#define MM_SETITEMHANDLE 0x018d +#define MM_SETITEMTEXT 0x018e +#define MM_ITEMPOSITIONFROMID 0x018f +#define MM_ITEMIDFROMPOSITION 0x0190 +#define MM_QUERYITEMATTR 0x0191 +#define MM_SETITEMATTR 0x0192 +#define MM_ISITEMVALID 0x0193 +#define MM_QUERYITEMRECT 0x0194 + +#define MM_QUERYDEFAULTITEMID 0x0431 +#define MM_SETDEFAULTITEMID 0x0432 + +#define MS_ACTIONBAR 0x0001 +#define MS_TITLEBUTTON 0x0002 +#define MS_VERTICALFLIP 0x0004 +#define MS_CONDITIONALCASCADE 0x0040 + +#define PU_POSITIONONITEM 0x0001 +#define PU_HCONSTRAIN 0x0002 +#define PU_VCONSTRAIN 0x0004 +#define PU_NONE 0x0000 +#define PU_MOUSEBUTTON1DOWN 0x0008 +#define PU_MOUSEBUTTON2DOWN 0x0010 +#define PU_MOUSEBUTTON3DOWN 0x0018 +#define PU_SELECTITEM 0x0020 +#define PU_MOUSEBUTTON1 0x0040 +#define PU_MOUSEBUTTON2 0x0080 +#define PU_MOUSEBUTTON3 0x0100 +#define PU_KEYBOARD 0x0200 + +typedef struct _MENUITEM +{ + SHORT iPosition; + USHORT afStyle; + USHORT afAttribute; + USHORT id; + HWND hwndSubMenu; + ULONG hItem; +} MENUITEM; +typedef MENUITEM *PMENUITEM; + +typedef struct _mti /* Note 1 */ +{ + USHORT afStyle; + USHORT pad; + USHORT idItem; + CHAR c[2]; +} MTI; + +typedef struct _mt /* Note 1 */ +{ + ULONG len; + USHORT codepage; + USHORT reserved; + USHORT cMti; + MTI rgMti[1]; +} MT; +typedef MT *LPMT; + +typedef struct _OWNERITEM +{ + HWND hwnd; + HPS hps; + ULONG fsState; + ULONG fsAttribute; + ULONG fsStateOld; + ULONG fsAttributeOld; + RECTL rclItem; + LONG idItem; + ULONG hItem; +} OWNERITEM; +typedef OWNERITEM *POWNERITEM; + + +#define WinCheckMenuItem(hwndMenu,id,fcheck) \ + ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, \ + MPFROM2SHORT (id, TRUE), \ + MPFROM2SHORT (MIA_CHECKED, \ + ((USHORT)(fcheck) ? MIA_CHECKED : 0)))) + +#define WinEnableMenuItem(hwndMenu,id,fEnable) \ + ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, MPFROM2SHORT (id, TRUE), \ + MPFROM2SHORT (MIA_DISABLED, \ + ((USHORT)(fEnable) ? 0 : MIA_DISABLED)))) + +#define WinIsMenuItemChecked(hwndMenu,id) \ + ((BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \ + MPFROM2SHORT (id, TRUE), \ + MPFROMLONG (MIA_CHECKED))) + +#define WinIsMenuItemEnabled(hwndMenu,id) \ + (!(BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \ + MPFROM2SHORT (id, TRUE), \ + MPFROMLONG (MIA_DISABLED))) + +#define WinIsMenuItemValid(hwndMenu,id) \ + ((BOOL)WinSendMsg (hwndMenu, MM_ISITEMVALID, \ + MPFROM2SHORT (id, TRUE), MPFROMLONG (FALSE))) + +#define WinSetMenuItemText(hwndMenu,id,psz) \ + ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMTEXT, \ + MPFROMLONG (id), MPFROMP (psz))) + + +HWND WinCreateMenu (HWND hwndParent, CPVOID lpmt); +HWND WinLoadMenu (HWND hwndFrame, HMODULE hmod, ULONG idMenu); +BOOL WinPopupMenu (HWND hwndParent, HWND hwndOwner, HWND hwndMenu, + LONG x, LONG y, LONG idItem, ULONG fs); + +#endif /* INCL_WINMENUS */ + + +#if defined (INCL_WINMESSAGEMGR) + +#define BMSG_POST 0x0000 +#define BMSG_SEND 0x0001 +#define BMSG_POSTQUEUE 0x0002 +#define BMSG_DESCENDANTS 0x0004 +#define BMSG_FRAMEONLY 0x0008 + +#define CVR_ALIGNLEFT 0x0001 +#define CVR_ALIGNBOTTOM 0x0002 +#define CVR_ALIGNRIGHT 0x0004 +#define CVR_ALIGNTOP 0x0008 +#define CVR_REDRAW 0x0010 + +#define HT_NORMAL 0 +#define HT_TRANSPARENT (-1) +#define HT_DISCARD (-2) +#define HT_ERROR (-3) + +#define QS_KEY 0x0001 +#define QS_MOUSEBUTTON 0x0002 +#define QS_MOUSEMOVE 0x0004 +#define QS_MOUSE 0x0006 +#define QS_TIMER 0x0008 +#define QS_PAINT 0x0010 +#define QS_POSTMSG 0x0020 +#define QS_SEM1 0x0040 +#define QS_SEM2 0x0080 +#define QS_SEM3 0x0100 +#define QS_SEM4 0x0200 +#define QS_SENDMSG 0x0400 +#define QS_MSGINPUT 0x0800 + +#define SMIM_ALL 0x0eff +#define SMI_NOINTEREST 0x0001 +#define SMI_INTEREST 0x0002 +#define SMI_RESET 0x0004 +#define SMI_AUTODISPATCH 0x0008 + +#define WPM_TEXT 0x0001 +#define WPM_CTLDATA 0x0002 +#define WPM_PRESPARAMS 0x0004 +#define WPM_CCHTEXT 0x0008 +#define WPM_CBCTLDATA 0x0010 +#define WPM_CBPRESPARAMS 0x0020 + + +typedef struct _WNDPARAMS +{ + ULONG fsStatus; + ULONG cchText; + PSZ pszText; + ULONG cbPresParams; + PVOID pPresParams; + ULONG cbCtlData; + PVOID pCtlData; +} WNDPARAMS; +typedef WNDPARAMS *PWNDPARAMS; + +BOOL WinBroadcastMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, ULONG rgf); +BOOL WinInSendMsg (HAB hab); +BOOL WinPostQueueMsg (HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2); +BOOL WinQueryMsgPos (HAB hab, PPOINTL pptl); +ULONG WinQueryMsgTime (HAB hab); +ULONG WinQueryQueueStatus (HWND hwndDesktop); +ULONG WinRequestMutexSem (HMTX hmtx, ULONG ulTimeout); +BOOL WinSetClassMsgInterest (HAB hab, PCSZ pszClassName, ULONG msg_class, + LONG control); +BOOL WinSetMsgInterest (HWND hwnd, ULONG msg_class, LONG control); +ULONG WinWaitEventSem (HEV hev, ULONG ulTimeout); +BOOL WinWaitMsg (HAB hab, ULONG msgFirst, ULONG msgLast); +ULONG WinWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser); + +#endif /* INCL_WINMESSAGEMGR */ + + +#if defined (INCL_WINPALETTE) + +LONG WinRealizePalette (HWND hwnd, HPS hps, PULONG pcclr); + +#endif /* INCL_WINPALETTE */ + + +#if defined (INCL_WINPOINTERS) + +#define DP_NORMAL 0x0000 +#define DP_HALFTONED 0x0001 +#define DP_INVERTED 0x0002 +#define DP_MINI 0x0004 + +#define SBMP_OLD_SYSMENU 1 +#define SBMP_OLD_SBUPARROW 2 +#define SBMP_OLD_SBDNARROW 3 +#define SBMP_OLD_SBRGARROW 4 +#define SBMP_OLD_SBLFARROW 5 +#define SBMP_MENUCHECK 6 +#define SBMP_OLD_CHECKBOXES 7 +#define SBMP_BTNCORNERS 8 +#define SBMP_OLD_MINBUTTON 9 +#define SBMP_OLD_MAXBUTTON 10 +#define SBMP_OLD_RESTOREBUTTON 11 +#define SBMP_OLD_CHILDSYSMENU 12 +#define SBMP_DRIVE 15 +#define SBMP_FILE 16 +#define SBMP_FOLDER 17 +#define SBMP_TREEPLUS 18 +#define SBMP_TREEMINUS 19 +#define SBMP_PROGRAM 22 +#define SBMP_MENUATTACHED 23 +#define SBMP_SIZEBOX 24 +#define SBMP_SYSMENU 25 +#define SBMP_MINBUTTON 26 +#define SBMP_MAXBUTTON 27 +#define SBMP_RESTOREBUTTON 28 +#define SBMP_CHILDSYSMENU 29 +#define SBMP_SYSMENUDEP 30 +#define SBMP_MINBUTTONDEP 31 +#define SBMP_MAXBUTTONDEP 32 +#define SBMP_RESTOREBUTTONDEP 33 +#define SBMP_CHILDSYSMENUDEP 34 +#define SBMP_SBUPARROW 35 +#define SBMP_SBDNARROW 36 +#define SBMP_SBLFARROW 37 +#define SBMP_SBRGARROW 38 +#define SBMP_SBUPARROWDEP 39 +#define SBMP_SBDNARROWDEP 40 +#define SBMP_SBLFARROWDEP 41 +#define SBMP_SBRGARROWDEP 42 +#define SBMP_SBUPARROWDIS 43 +#define SBMP_SBDNARROWDIS 44 +#define SBMP_SBLFARROWDIS 45 +#define SBMP_SBRGARROWDIS 46 +#define SBMP_COMBODOWN 47 +#define SBMP_CHECKBOXES 48 +#define SBMP_HIDE 50 +#define SBMP_HIDEDEP 51 +#define SBMP_CLOSE 52 +#define SBMP_CLOSEDEP 53 + +#define SPTR_ARROW 1 +#define SPTR_TEXT 2 +#define SPTR_WAIT 3 +#define SPTR_SIZE 4 +#define SPTR_MOVE 5 +#define SPTR_SIZENWSE 6 +#define SPTR_SIZENESW 7 +#define SPTR_SIZEWE 8 +#define SPTR_SIZENS 9 +#define SPTR_APPICON 10 +#define SPTR_ICONINFORMATION 11 +#define SPTR_ICONQUESTION 12 +#define SPTR_ICONERROR 13 +#define SPTR_ICONWARNING 14 +#define SPTR_ILLEGAL 18 +#define SPTR_FILE 19 +#define SPTR_FOLDER 20 +#define SPTR_MULTFILE 21 +#define SPTR_PROGRAM 22 +#define SPTR_DISPLAY_PTRS 22 + +#define SPTR_PENFIRST 23 +#define SPTR_PENLAST 39 +#define SPTR_CPTR 39 + +#define SPTR_HANDICON SPTR_ICONERROR +#define SPTR_QUESICON SPTR_ICONQUESTION +#define SPTR_BANGICON SPTR_ICONWARNING +#define SPTR_NOTEICON SPTR_ICONINFORMATION + +typedef struct _POINTERINFO +{ + ULONG fPointer; + LONG xHotspot; + LONG yHotspot; + HBITMAP hbmPointer; + HBITMAP hbmColor; + HBITMAP hbmMiniPointer; + HBITMAP hbmMiniColor; +} POINTERINFO; +typedef POINTERINFO *PPOINTERINFO; + + +HPOINTER WinCreatePointer (HWND hwndDesktop, HBITMAP hbmPointer, BOOL fPointer, + LONG xHotspot, LONG yHotspot); +HPOINTER WinCreatePointerIndirect (HWND hwndDesktop, + __const__ POINTERINFO *pptri); +BOOL WinDestroyPointer (HPOINTER hptr); +BOOL WinDrawPointer (HPS hps, LONG x, LONG y, HPOINTER hptr, ULONG fs); +HBITMAP WinGetSysBitmap (HWND hwndDesktop, ULONG ibm); +HPOINTER WinLoadPointer (HWND hwndDesktop, HMODULE hmod, ULONG idres); +BOOL WinLockPointerUpdate (HWND hwndDesktop, HPOINTER hptrNew, + ULONG ulTimeInterval); +BOOL WinQueryPointerPos (HWND hwndDesktop, PPOINTL pptl); +BOOL WinQueryPointerInfo (HPOINTER hptr, PPOINTERINFO pPointerInfo); +HPOINTER WinQuerySysPointer (HWND hwndDesktop, LONG lId, BOOL fCopy); +BOOL WinQuerySysPointerData (HWND hwndDesktop, ULONG ulId, + PICONINFO pIconInfo); +BOOL WinSetPointer (HWND hwndDesktop, HPOINTER hptrNew); +BOOL WinSetPointerOwner (HPOINTER hptr, PID pid, BOOL fDestroy); +BOOL WinSetPointerPos (HWND hwndDesktop, LONG x, LONG y); +BOOL WinSetSysPointerData (HWND hwndDesktop, ULONG ulId, + __const__ ICONINFO *pIconInfo); +BOOL WinShowPointer (HWND hwndDesktop, BOOL fShow); + +#endif /* INCL_WINPOINTERS */ + + +#if defined (INCL_WINRECTANGLES) + +BOOL WinCopyRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc); +BOOL WinEqualRect (HAB hab, __const__ RECTL *prcl1, __const__ RECTL *prcl2); +BOOL WinInflateRect (HAB hab, PRECTL prcl, LONG cx, LONG cy); +BOOL WinIntersectRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1, + __const__ RECTL *prclSrc2); +BOOL WinIsRectEmpty (HAB hab, __const__ RECTL *prcl); +BOOL WinMakePoints (HAB hab, PPOINTL pwpt, ULONG cwpt); +BOOL WinMakeRect (HAB hab, PRECTL pwrc); +BOOL WinOffsetRect (HAB hab, PRECTL prcl, LONG cx, LONG cy); +BOOL WinPtInRect (HAB hab, __const__ RECTL *prcl, __const__ POINTL *pptl); +BOOL WinSetRect (HAB hab, PRECTL prcl, LONG xLeft, LONG yBottom, LONG xRight, + LONG yTop); +BOOL WinSetRectEmpty (HAB hab, PRECTL prcl); +BOOL WinSubtractRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1, + __const__ RECTL *prclSrc2); +BOOL WinUnionRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1, + __const__ RECTL *prclSrc2); + +#endif /* INCL_WINRECTANGLES */ + + +#if defined (INCL_WINSCROLLBARS) + +#define SB_LINEUP 1 +#define SB_LINEDOWN 2 +#define SB_LINELEFT 1 +#define SB_LINERIGHT 2 +#define SB_PAGEUP 3 +#define SB_PAGEDOWN 4 +#define SB_PAGELEFT 3 +#define SB_PAGERIGHT 4 +#define SB_SLIDERTRACK 5 +#define SB_SLIDERPOSITION 6 +#define SB_ENDSCROLL 7 + +#define SBM_SETSCROLLBAR 0x01a0 +#define SBM_SETPOS 0x01a1 +#define SBM_QUERYPOS 0x01a2 +#define SBM_QUERYRANGE 0x01a3 +#define SBM_SETTHUMBSIZE 0x01a6 + +#define SBS_HORZ 0 +#define SBS_VERT 1 +#define SBS_THUMBSIZE 2 +#define SBS_AUTOTRACK 4 +#define SBS_AUTOSIZE 0x2000 + +typedef struct _SBCDATA +{ + USHORT cb; + USHORT sHilite; + SHORT posFirst; + SHORT posLast; + SHORT posThumb; + SHORT cVisible; + SHORT cTotal; +} SBCDATA; +typedef SBCDATA *PSBCDATA; + +#endif /* INCL_WINSCROLLBARS */ + + +#if defined (INCL_WINSTATICS) + +#define SM_SETHANDLE 0x0100 +#define SM_QUERYHANDLE 0x0101 + +#define SS_TEXT 0x0001 +#define SS_GROUPBOX 0x0002 +#define SS_ICON 0x0003 +#define SS_BITMAP 0x0004 +#define SS_FGNDRECT 0x0005 +#define SS_HALFTONERECT 0x0006 +#define SS_BKGNDRECT 0x0007 +#define SS_FGNDFRAME 0x0008 +#define SS_HALFTONEFRAME 0x0009 +#define SS_BKGNDFRAME 0x000a +#define SS_SYSICON 0x000b +#define SS_AUTOSIZE 0x0040 + +#define WM_MSGBOXINIT 0x010e +#define WM_MSGBOXDISMISS 0x010f + +#endif /* INCL_WINSTATICS */ + + +#if defined (INCL_WINSYS) + +#define CCF_GLOBAL 0x0000 +#define CCF_APPLICATION 0x0001 +#define CCF_COUNTCOLORS 0x0010 +#define CCF_ALLCOLORS 0x0020 + +#define CCI_FOREGROUND 1 +#define CCI_FOREGROUNDREADONLY 2 +#define CCI_BACKGROUND 3 +#define CCI_BACKGROUNDDIALOG 4 +#define CCI_DISABLEDFOREGROUND 5 +#define CCI_DISABLEDFOREGROUNDREADONLY 6 +#define CCI_DISABLEDBACKGROUND 7 +#define CCI_DISABLEDBACKGROUNDDIALOG 8 +#define CCI_HIGHLIGHTFOREGROUND 9 +#define CCI_HIGHLIGHTBACKGROUND 10 +#define CCI_HIGHLIGHTBACKGROUNDDIALOG 11 +#define CCI_INACTIVEFOREGROUND 12 +#define CCI_INACTIVEFOREGROUNDDIALOG 13 +#define CCI_INACTIVEBACKGROUND 14 +#define CCI_INACTIVEBACKGROUNDTEXT 15 +#define CCI_ACTIVEFOREGROUND 16 +#define CCI_ACTIVEFOREGROUNDDIALOG 17 +#define CCI_ACTIVEBACKGROUND 18 +#define CCI_ACTIVEBACKGROUNDTEXT 19 +#define CCI_PAGEBACKGROUND 20 +#define CCI_PAGEFOREGROUND 21 +#define CCI_FIELDBACKGROUND 22 +#define CCI_BORDER 23 +#define CCI_BORDERLIGHT 24 +#define CCI_BORDERDARK 25 +#define CCI_BORDER2 26 +#define CCI_BORDER2LIGHT 27 +#define CCI_BORDER2DARK 28 +#define CCI_BORDERDEFAULT 29 +#define CCI_BUTTONBACKGROUND 30 +#define CCI_BUTTONFOREGROUND 31 +#define CCI_BUTTONBORDERLIGHT 32 +#define CCI_BUTTONBORDERDARK 33 +#define CCI_ARROW 34 +#define CCI_DISABLEDARROW 35 +#define CCI_ARROWBORDERLIGHT 36 +#define CCI_ARROWBORDERDARK 37 +#define CCI_CHECKLIGHT 38 +#define CCI_CHECKMIDDLE 39 +#define CCI_CHECKDARK 40 +#define CCI_ICONFOREGROUND 41 +#define CCI_ICONBACKGROUND 42 +#define CCI_ICONBACKGROUNDDESKTOP 43 +#define CCI_ICONHILITEFOREGROUND 44 +#define CCI_ICONHILITEBACKGROUND 45 +#define CCI_MAJORTABFOREGROUND 46 +#define CCI_MAJORTABBACKGROUND 47 +#define CCI_MINORTABFOREGROUND 48 +#define CCI_MINORTABBACKGROUND 49 +#define CCI_MAXINDEX 49 + +#define CCT_STATIC 1 +#define CCT_STATICTEXT 2 +#define CCT_GROUPBOX 3 +#define CCT_PUSHBUTTON 4 +#define CCT_CHECKBOX 5 +#define CCT_RADIOBUTTON 6 +#define CCT_ENTRYFIELD 7 +#define CCT_LISTBOX 8 +#define CCT_COMBOBOX 9 +#define CCT_SCROLLBAR 10 +#define CCT_FRAME 11 +#define CCT_MENU 12 +#define CCT_TITLEBAR 13 +#define CCT_SPINBUTTON 14 +#define CCT_SLIDER 15 +#define CCT_CIRCULARSLIDER 16 +#define CCT_VALUESET 17 +#define CCT_MLE 18 +#define CCT_CONTAINER 19 +#define CCT_NOTEBOOK 20 +#define CCT_MAXTYPE 20 + +#define CCV_NOTFOUND (-1) +#define CCV_IGNORE (-2) +#define CCV_DEFAULT (-3) + +#define PP_FOREGROUNDCOLOR 1 +#define PP_FOREGROUNDCOLORINDEX 2 +#define PP_BACKGROUNDCOLOR 3 +#define PP_BACKGROUNDCOLORINDEX 4 +#define PP_HILITEFOREGROUNDCOLOR 5 +#define PP_HILITEFOREGROUNDCOLORINDEX 6 +#define PP_HILITEBACKGROUNDCOLOR 7 +#define PP_HILITEBACKGROUNDCOLORINDEX 8 +#define PP_DISABLEDFOREGROUNDCOLOR 9 +#define PP_DISABLEDFOREGROUNDCOLORINDEX 10 +#define PP_DISABLEDBACKGROUNDCOLOR 11 +#define PP_DISABLEDBACKGROUNDCOLORINDEX 12 +#define PP_BORDERCOLOR 13 +#define PP_BORDERCOLORINDEX 14 +#define PP_FONTNAMESIZE 15 +#define PP_FONTHANDLE 16 +#define PP_RESERVED 17 +#define PP_ACTIVECOLOR 18 +#define PP_ACTIVECOLORINDEX 19 +#define PP_INACTIVECOLOR 20 +#define PP_INACTIVECOLORINDEX 21 +#define PP_ACTIVETEXTFGNDCOLOR 22 +#define PP_ACTIVETEXTFGNDCOLORINDEX 23 +#define PP_ACTIVETEXTBGNDCOLOR 24 +#define PP_ACTIVETEXTBGNDCOLORINDEX 25 +#define PP_INACTIVETEXTFGNDCOLOR 26 +#define PP_INACTIVETEXTFGNDCOLORINDEX 27 +#define PP_INACTIVETEXTBGNDCOLOR 28 +#define PP_INACTIVETEXTBGNDCOLORINDEX 29 +#define PP_SHADOW 30 +#define PP_MENUFOREGROUNDCOLOR 31 +#define PP_MENUFOREGROUNDCOLORINDEX 32 +#define PP_MENUBACKGROUNDCOLOR 33 +#define PP_MENUBACKGROUNDCOLORINDEX 34 +#define PP_MENUHILITEFGNDCOLOR 35 +#define PP_MENUHILITEFGNDCOLORINDEX 36 +#define PP_MENUHILITEBGNDCOLOR 37 +#define PP_MENUHILITEBGNDCOLORINDEX 38 +#define PP_MENUDISABLEDFGNDCOLOR 39 +#define PP_MENUDISABLEDFGNDCOLORINDEX 40 +#define PP_MENUDISABLEDBGNDCOLOR 41 +#define PP_MENUDISABLEDBGNDCOLORINDEX 42 +#define PP_SHADOWTEXTCOLOR 43 +#define PP_SHADOWTEXTCOLORINDEX 44 +#define PP_SHADOWHILITEFGNDCOLOR 45 +#define PP_SHADOWHILITEFGNDCOLORINDEX 46 +#define PP_SHADOWHILITEBGNDCOLOR 47 +#define PP_SHADOWHILITEBGNDCOLORINDEX 48 +#define PP_ICONTEXTBACKGROUNDCOLOR 49 +#define PP_ICONTEXTBACKGROUNDCOLORINDEX 50 +#define PP_BORDERLIGHTCOLOR 51 +#define PP_BORDERDARKCOLOR 52 +#define PP_BORDER2COLOR 53 +#define PP_BORDER2LIGHTCOLOR 54 +#define PP_BORDER2DARKCOLOR 55 +#define PP_BORDERDEFAULTCOLOR 56 +#define PP_FIELDBACKGROUNDCOLOR 57 +#define PP_BUTTONBACKGROUNDCOLOR 58 +#define PP_BUTTONBORDERLIGHTCOLOR 59 +#define PP_BUTTONBORDERDARKCOLOR 60 +#define PP_ARROWCOLOR 61 +#define PP_ARROWBORDERLIGHTCOLOR 62 +#define PP_ARROWBORDERDARKCOLOR 63 +#define PP_ARROWDISABLEDCOLOR 64 +#define PP_CHECKLIGHTCOLOR 65 +#define PP_CHECKMIDDLECOLOR 66 +#define PP_CHECKDARKCOLOR 67 +#define PP_PAGEFOREGROUNDCOLOR 68 +#define PP_PAGEBACKGROUNDCOLOR 69 +#define PP_MAJORTABFOREGROUNDCOLOR 70 +#define PP_MAJORTABBACKGROUNDCOLOR 71 +#define PP_MINORTABFOREGROUNDCOLOR 72 +#define PP_MINORTABBACKGROUNDCOLOR 73 + +#define PP_BIDI_FIRST 0x0100 +#define PP_BIDI_LAST 0x012f +#define PP_USER 0x8000 + +#define QPF_NOINHERIT 0x0001 +#define QPF_ID1COLORINDEX 0x0002 +#define QPF_ID2COLORINDEX 0x0004 +#define QPF_PURERGBCOLOR 0x0008 +#define QPF_VALIDFLAGS 0x000f + +#define SV_SWAPBUTTON 0 +#define SV_DBLCLKTIME 1 +#define SV_CXDBLCLK 2 +#define SV_CYDBLCLK 3 +#define SV_CXSIZEBORDER 4 +#define SV_CYSIZEBORDER 5 +#define SV_ALARM 6 +#define SV_CURSORRATE 9 +#define SV_FIRSTSCROLLRATE 10 +#define SV_SCROLLRATE 11 +#define SV_NUMBEREDLISTS 12 +#define SV_WARNINGFREQ 13 +#define SV_NOTEFREQ 14 +#define SV_ERRORFREQ 15 +#define SV_WARNINGDURATION 16 +#define SV_NOTEDURATION 17 +#define SV_ERRORDURATION 18 +#define SV_CXSCREEN 20 +#define SV_CYSCREEN 21 +#define SV_CXVSCROLL 22 +#define SV_CYHSCROLL 23 +#define SV_CYVSCROLLARROW 24 +#define SV_CXHSCROLLARROW 25 +#define SV_CXBORDER 26 +#define SV_CYBORDER 27 +#define SV_CXDLGFRAME 28 +#define SV_CYDLGFRAME 29 +#define SV_CYTITLEBAR 30 +#define SV_CYVSLIDER 31 +#define SV_CXHSLIDER 32 +#define SV_CXMINMAXBUTTON 33 +#define SV_CYMINMAXBUTTON 34 +#define SV_CYMENU 35 +#define SV_CXFULLSCREEN 36 +#define SV_CYFULLSCREEN 37 +#define SV_CXICON 38 +#define SV_CYICON 39 +#define SV_CXPOINTER 40 +#define SV_CYPOINTER 41 +#define SV_DEBUG 42 +#define SV_CMOUSEBUTTONS 43 +#define SV_CPOINTERBUTTONS 43 +#define SV_POINTERLEVEL 44 +#define SV_CURSORLEVEL 45 +#define SV_TRACKRECTLEVEL 46 +#define SV_CTIMERS 47 +#define SV_MOUSEPRESENT 48 +#define SV_CXBYTEALIGN 49 +#define SV_CXALIGN 49 +#define SV_CYBYTEALIGN 50 +#define SV_CYALIGN 50 +#define SV_DESKTOPWORKAREAYTOP 51 +#define SV_DESKTOPWORKAREAYBOTTOM 52 +#define SV_DESKTOPWORKAREAXRIGHT 53 +#define SV_DESKTOPWORKAREAXLEFT 54 +#define SV_NOTRESERVED 56 +#define SV_EXTRAKEYBEEP 57 +#define SV_SETLIGHTS 58 +#define SV_INSERTMODE 59 +#define SV_MENUROLLDOWNDELAY 64 +#define SV_MENUROLLUPDELAY 65 +#define SV_ALTMNEMONIC 66 +#define SV_TASKLISTMOUSEACCESS 67 +#define SV_CXICONTEXTWIDTH 68 +#define SV_CICONTEXTLINES 69 +#define SV_CHORDTIME 70 +#define SV_CXCHORD 71 +#define SV_CYCHORD 72 +#define SV_CXMOTIONSTART 73 +#define SV_CYMOTIONSTART 74 +#define SV_BEGINDRAG 75 +#define SV_ENDDRAG 76 +#define SV_SINGLESELECT 77 +#define SV_OPEN 78 +#define SV_CONTEXTMENU 79 +#define SV_CONTEXTHELP 80 +#define SV_TEXTEDIT 81 +#define SV_BEGINSELECT 82 +#define SV_ENDSELECT 83 +#define SV_BEGINDRAGKB 84 +#define SV_ENDDRAGKB 85 +#define SV_SELECTKB 86 +#define SV_OPENKB 87 +#define SV_CONTEXTMENUKB 88 +#define SV_CONTEXTHELPKB 89 +#define SV_TEXTEDITKB 90 +#define SV_BEGINSELECTKB 91 +#define SV_ENDSELECTKB 92 +#define SV_ANIMATION 93 +#define SV_ANIMATIONSPEED 94 +#define SV_MONOICONS 95 +#define SV_KBDALTERED 96 +#define SV_PRINTSCREEN 97 +#define SV_LOCKSTARTINPUT 98 +#define SV_DYNAMICDRAG 99 +#define SV_CSYSVALUES 100 + +#define SYSCLR_SHADOWHILITEBGND (-50) +#define SYSCLR_SHADOWHILITEFGND (-49) +#define SYSCLR_SHADOWTEXT (-48) +#define SYSCLR_ENTRYFIELD (-47) +#define SYSCLR_MENUDISABLEDTEXT (-46) +#define SYSCLR_MENUHILITE (-45) +#define SYSCLR_MENUHILITEBGND (-44) +#define SYSCLR_PAGEBACKGROUND (-43) +#define SYSCLR_FIELDBACKGROUND (-42) +#define SYSCLR_BUTTONLIGHT (-41) +#define SYSCLR_BUTTONMIDDLE (-40) +#define SYSCLR_BUTTONDARK (-39) +#define SYSCLR_BUTTONDEFAULT (-38) +#define SYSCLR_TITLEBOTTOM (-37) +#define SYSCLR_SHADOW (-36) +#define SYSCLR_ICONTEXT (-35) +#define SYSCLR_DIALOGBACKGROUND (-34) +#define SYSCLR_HILITEFOREGROUND (-33) +#define SYSCLR_HILITEBACKGROUND (-32) +#define SYSCLR_INACTIVETITLETEXTBGND (-31) +#define SYSCLR_ACTIVETITLETEXTBGND (-30) +#define SYSCLR_INACTIVETITLETEXT (-29) +#define SYSCLR_ACTIVETITLETEXT (-28) +#define SYSCLR_OUTPUTTEXT (-27) +#define SYSCLR_WINDOWSTATICTEXT (-26) +#define SYSCLR_SCROLLBAR (-25) +#define SYSCLR_BACKGROUND (-24) +#define SYSCLR_ACTIVETITLE (-23) +#define SYSCLR_INACTIVETITLE (-22) +#define SYSCLR_MENU (-21) +#define SYSCLR_WINDOW (-20) +#define SYSCLR_WINDOWFRAME (-19) +#define SYSCLR_MENUTEXT (-18) +#define SYSCLR_WINDOWTEXT (-17) +#define SYSCLR_TITLETEXT (-16) +#define SYSCLR_ACTIVEBORDER (-15) +#define SYSCLR_INACTIVEBORDER (-14) +#define SYSCLR_APPWORKSPACE (-13) +#define SYSCLR_HELPBACKGROUND (-12) +#define SYSCLR_HELPTEXT (-11) +#define SYSCLR_HELPHILITE (-10) + +#define SYSCLR_CSYSCOLORS 41 + +#define WM_CTLCOLORCHANGE 0x0129 +#define WM_QUERYCTLTYPE 0x0130 /*0x012a?*/ + + +typedef struct _CTLCOLOR +{ + LONG clrIndex; + LONG clrValue; +} CTLCOLOR; +typedef CTLCOLOR *PCTLCOLOR; + +typedef struct _PARAM +{ + ULONG id; + ULONG cb; + BYTE ab[1]; +} PARAM; +typedef PARAM *NPPARAM; +typedef PARAM *PPARAM; + +typedef struct _PRESPARAMS +{ + ULONG cb; + PARAM aparam[1]; +} PRESPARAMS; +typedef PRESPARAMS *NPPRESPARAMS; +typedef PRESPARAMS *PPRESPARAMS; + + +LONG WinQueryControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor, + ULONG cCtlColor, PCTLCOLOR pCtlColor); +ULONG WinQueryPresParam (HWND hwnd, ULONG id1, ULONG id2, PULONG pulId, + ULONG cbBuf, PVOID pbBuf, ULONG fs); +LONG WinQuerySysColor (HWND hwndDesktop, LONG clr, LONG lReserved); +LONG WinQuerySysValue (HWND hwndDesktop, LONG iSysValue); +BOOL WinRemovePresParam (HWND hwnd, ULONG id); +LONG WinSetControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor, + ULONG cCtlColor, PCTLCOLOR pCtlColor); +BOOL WinSetPresParam (HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam); +BOOL WinSetSysColors (HWND hwndDesktop, ULONG flOptions, ULONG flFormat, + LONG clrFirst, ULONG cclr, __const__ LONG *pclr); +BOOL WinSetSysValue (HWND hwndDesktop, LONG iSysValue, LONG lValue); + +#endif /* INCL_WINSYS */ + + +#if defined (INCL_WINTHUNKAPI) + +PFN WinQueryClassThunkProc (PCSZ pszClassname); +LONG WinQueryWindowModel (HWND hwnd); +PFN WinQueryWindowThunkProc (HWND hwnd); +BOOL WinSetClassThunkProc (PCSZ pszClassname, PFN pfnThunkProc); +BOOL WinSetWindowThunkProc (HWND hwnd, PFN pfnThunkProc); + +#endif /* INCL_WINTHUNKAPI */ + + +#if defined (INCL_WINTIMER) + +#define TID_CURSOR 0xffff +#define TID_SCROLL 0xfffe +#define TID_FLASHWINDOW 0xfffd +#define TID_USERMAX 0x7fff + +ULONG WinGetCurrentTime (HAB hab); +ULONG WinStartTimer (HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout); +BOOL WinStopTimer (HAB hab, HWND hwnd, ULONG idTimer); + +#endif /* INCL_WINTIMER */ + +#if defined (INCL_WINTRACKRECT) + +#define TF_LEFT 0x0001 +#define TF_TOP 0x0002 +#define TF_RIGHT 0x0004 +#define TF_BOTTOM 0x0008 +#define TF_SETPOINTERPOS 0x0010 +#define TF_GRID 0x0020 +#define TF_STANDARD 0x0040 +#define TF_ALLINBOUNDARY 0x0080 +#define TF_VALIDATETRACKRECT 0x0100 +#define TF_PARTINBOUNDARY 0x0200 + +#define TF_MOVE 0x000f + +typedef struct _TRACKINFO +{ + LONG cxBorder; + LONG cyBorder; + LONG cxGrid; + LONG cyGrid; + LONG cxKeyboard; + LONG cyKeyboard; + RECTL rclTrack; + RECTL rclBoundary; + POINTL ptlMinTrackSize; + POINTL ptlMaxTrackSize; + ULONG fs; +} TRACKINFO; +typedef TRACKINFO *PTRACKINFO; + +BOOL WinShowTrackRect (HWND hwnd, BOOL fShow); +BOOL WinTrackRect (HWND hwnd, HPS hps, PTRACKINFO pti); + +#endif /* INCL_WINTRACKRECT */ + +/* -------------------- MULTIPLE LINE ENTRIES ----------------------------- */ + +#if defined (INCL_WINMLE) + +#define MLS_WORDWRAP 0x0001 +#define MLS_BORDER 0x0002 +#define MLS_VSCROLL 0x0004 +#define MLS_HSCROLL 0x0008 +#define MLS_READONLY 0x0010 +#define MLS_IGNORETAB 0x0020 +#define MLS_DISABLEUNDO 0x0040 + +#define MLFFMTRECT_FORMATRECT 0x0007 +#define MLFFMTRECT_LIMITHORZ 0x0001 +#define MLFFMTRECT_LIMITVERT 0x0002 +#define MLFFMTRECT_MATCHWINDOW 0x0004 + +#define MLFIE_CFTEXT 0 +#define MLFIE_NOTRANS 1 +#define MLFIE_WINFMT 2 +#define MLFIE_RTF 3 + +#define MLFEFR_RESIZE 0x0001 +#define MLFEFR_TABSTOP 0x0002 +#define MLFEFR_FONT 0x0004 +#define MLFEFR_TEXT 0x0008 +#define MLFEFR_WORDWRAP 0x0010 +#define MLFETL_TEXTBYTES 0x0020 + +#define MLFMARGIN_LEFT 0x0001 +#define MLFMARGIN_BOTTOM 0x0002 +#define MLFMARGIN_RIGHT 0x0003 +#define MLFMARGIN_TOP 0x0004 + +#define MLFQS_MINMAXSEL 0 +#define MLFQS_MINSEL 1 +#define MLFQS_MAXSEL 2 +#define MLFQS_ANCHORSEL 3 +#define MLFQS_CURSORSEL 4 + +#define MLFCLPBD_TOOMUCHTEXT 0x0001 +#define MLFCLPBD_ERROR 0x0002 + +#define MLFSEARCH_CASESENSITIVE 0x0001 +#define MLFSEARCH_SELECTMATCH 0x0002 +#define MLFSEARCH_CHANGEALL 0x0004 + +#define MLM_SETTEXTLIMIT 0x01b0 +#define MLM_QUERYTEXTLIMIT 0x01b1 +#define MLM_SETFORMATRECT 0x01b2 +#define MLM_QUERYFORMATRECT 0x01b3 +#define MLM_SETWRAP 0x01b4 +#define MLM_QUERYWRAP 0x01b5 +#define MLM_SETTABSTOP 0x01b6 +#define MLM_QUERYTABSTOP 0x01b7 +#define MLM_SETREADONLY 0x01b8 +#define MLM_QUERYREADONLY 0x01b9 + +#define MLM_QUERYCHANGED 0x01ba +#define MLM_SETCHANGED 0x01bb +#define MLM_QUERYLINECOUNT 0x01bc +#define MLM_CHARFROMLINE 0x01bd +#define MLM_LINEFROMCHAR 0x01be +#define MLM_QUERYLINELENGTH 0x01bf +#define MLM_QUERYTEXTLENGTH 0x01c0 + +#define MLM_FORMAT 0x01c1 +#define MLM_SETIMPORTEXPORT 0x01c2 +#define MLM_IMPORT 0x01c3 +#define MLM_EXPORT 0x01c4 +#define MLM_DELETE 0x01c6 +#define MLM_QUERYFORMATLINELENGTH 0x01c7 +#define MLM_QUERYFORMATTEXTLENGTH 0x01c8 +#define MLM_INSERT 0x01c9 + +#define MLM_SETSEL 0x01ca +#define MLM_QUERYSEL 0x01cb +#define MLM_QUERYSELTEXT 0x01cc + +#define MLM_QUERYUNDO 0x01cd +#define MLM_UNDO 0x01ce +#define MLM_RESETUNDO 0x01cf + +#define MLM_QUERYFONT 0x01d0 +#define MLM_SETFONT 0x01d1 +#define MLM_SETTEXTCOLOR 0x01d2 +#define MLM_QUERYTEXTCOLOR 0x01d3 +#define MLM_SETBACKCOLOR 0x01d4 +#define MLM_QUERYBACKCOLOR 0x01d5 + +#define MLM_QUERYFIRSTCHAR 0x01d6 +#define MLM_SETFIRSTCHAR 0x01d7 + +#define MLM_CUT 0x01d8 +#define MLM_COPY 0x01d9 +#define MLM_PASTE 0x01da +#define MLM_CLEAR 0x01db + +#define MLM_ENABLEREFRESH 0x01dc +#define MLM_DISABLEREFRESH 0x01dd + +#define MLM_SEARCH 0x01de +#define MLM_QUERYIMPORTEXPORT 0x01df + +#define MLN_OVERFLOW 0x0001 +#define MLN_PIXHORZOVERFLOW 0x0002 +#define MLN_PIXVERTOVERFLOW 0x0003 +#define MLN_TEXTOVERFLOW 0x0004 +#define MLN_VSCROLL 0x0005 +#define MLN_HSCROLL 0x0006 +#define MLN_CHANGE 0x0007 +#define MLN_SETFOCUS 0x0008 +#define MLN_KILLFOCUS 0x0009 +#define MLN_MARGIN 0x000a +#define MLN_SEARCHPAUSE 0x000b +#define MLN_MEMERROR 0x000c +#define MLN_UNDOOVERFLOW 0x000d +#define MLN_CLPBDFAIL 0x000f + + +typedef LONG IPT; +typedef IPT *PIPT; +typedef LONG PIX; +typedef ULONG LINE; + + +typedef struct _FORMATRECT /* Note 1 */ +{ + LONG cxFormat; + LONG cyFormat; +} MLEFORMATRECT; +typedef MLEFORMATRECT *PFORMATRECT; + +typedef struct _MLECTLDATA +{ + USHORT cbCtlData; + USHORT afIEFormat; + ULONG cchText; + IPT iptAnchor; + IPT iptCursor; + LONG cxFormat; + LONG cyFormat; + ULONG afFormatFlags; + PVOID pHWXCtlData; +} MLECTLDATA; +typedef MLECTLDATA *PMLECTLDATA; + +typedef struct _MLEOVERFLOW +{ + ULONG afErrInd; + LONG nBytesOver; + LONG pixHorzOver; + LONG pixVertOver; +} MLEOVERFLOW; +typedef MLEOVERFLOW *POVERFLOW; + +typedef struct _MLEMARGSTRUCT +{ + USHORT afMargins; + USHORT usMouMsg; + IPT iptNear; +} MLEMARGSTRUCT; +typedef MLEMARGSTRUCT *PMARGSTRUCT; + +typedef struct _SEARCH /* Note 1 */ +{ + USHORT cb; + USHORT _pad; + PCHAR pchFind; + PCHAR pchReplace; + SHORT cchFind; + SHORT cchReplace; + IPT iptStart; + IPT iptStop; + USHORT cchFound; +} MLE_SEARCHDATA; +typedef MLE_SEARCHDATA *PMLE_SEARCHDATA; + +#endif /* INCL_WINMLE */ + +/* --------------- GRAPHICS PROGRAMMING INTERFACE ------------------------- */ + +#define GPI_ERROR 0 +#define GPI_OK 1 +#define GPI_ALTERROR (-1) + +#define HRGN_ERROR ((HRGN)(-1)) + +#define CLR_ERROR (-255) +#define CLR_NOINDEX (-254) +#define CLR_FALSE (-5) +#define CLR_TRUE (-4) +#define CLR_DEFAULT (-3) +#define CLR_WHITE (-2) +#define CLR_BLACK (-1) +#define CLR_BACKGROUND 0 +#define CLR_BLUE 1 +#define CLR_RED 2 +#define CLR_PINK 3 +#define CLR_GREEN 4 +#define CLR_CYAN 5 +#define CLR_YELLOW 6 +#define CLR_NEUTRAL 7 +#define CLR_DARKGRAY 8 +#define CLR_DARKBLUE 9 +#define CLR_DARKRED 10 +#define CLR_DARKPINK 11 +#define CLR_DARKGREEN 12 +#define CLR_DARKCYAN 13 +#define CLR_BROWN 14 +#define CLR_PALEGRAY 15 + +#define RGB_ERROR (-255) +#define RGB_BLACK 0x00000000 +#define RGB_BLUE 0x000000ff +#define RGB_GREEN 0x0000ff00 +#define RGB_CYAN 0x0000ffff +#define RGB_RED 0x00ff0000 +#define RGB_PINK 0x00ff00ff +#define RGB_YELLOW 0x00ffff00 +#define RGB_WHITE 0x00ffffff + +#define PRIM_LINE 1 +#define PRIM_CHAR 2 +#define PRIM_MARKER 3 +#define PRIM_AREA 4 +#define PRIM_IMAGE 5 + +#define AM_ERROR (-1) +#define AM_PRESERVE 0 +#define AM_NOPRESERVE 1 + +#define FM_ERROR (-1) +#define FM_DEFAULT 0 +#define FM_OR 1 +#define FM_OVERPAINT 2 +#define FM_LEAVEALONE 5 + +#define FM_XOR 4 +#define FM_AND 6 +#define FM_SUBTRACT 7 +#define FM_MASKSRCNOT 8 +#define FM_ZERO 9 +#define FM_NOTMERGESRC 10 +#define FM_NOTXORSRC 11 +#define FM_INVERT 12 +#define FM_MERGESRCNOT 13 +#define FM_NOTCOPYSRC 14 +#define FM_MERGENOTSRC 15 +#define FM_NOTMASKSRC 16 +#define FM_ONE 17 + +#define BM_ERROR (-1) +#define BM_DEFAULT 0 +#define BM_OR 1 +#define BM_OVERPAINT 2 +#define BM_LEAVEALONE 5 + +#define BM_XOR 4 +#define BM_AND 6 +#define BM_SUBTRACT 7 +#define BM_MASKSRCNOT 8 +#define BM_ZERO 9 +#define BM_NOTMERGESRC 10 +#define BM_NOTXORSRC 11 +#define BM_INVERT 12 +#define BM_MERGESRCNOT 13 +#define BM_NOTCOPYSRC 14 +#define BM_MERGENOTSRC 15 +#define BM_NOTMASKSRC 16 +#define BM_ONE 17 +#define BM_SRCTRANSPARENT 18 +#define BM_DESTTRANSPARENT 19 + +#define LINETYPE_ERROR (-1) +#define LINETYPE_DEFAULT 0 +#define LINETYPE_DOT 1 +#define LINETYPE_SHORTDASH 2 +#define LINETYPE_DASHDOT 3 +#define LINETYPE_DOUBLEDOT 4 +#define LINETYPE_LONGDASH 5 +#define LINETYPE_DASHDOUBLEDOT 6 +#define LINETYPE_SOLID 7 +#define LINETYPE_INVISIBLE 8 +#define LINETYPE_ALTERNATE 9 + +#define LINEWIDTH_ERROR (-1) +#define LINEWIDTH_DEFAULT 0L +#define LINEWIDTH_NORMAL 0x00010000 +#define LINEWIDTH_THICK 0x00020000 + +#define LINEWIDTHGEOM_ERROR (-1) + +#define LINEEND_ERROR (-1) +#define LINEEND_DEFAULT 0 +#define LINEEND_FLAT 1 +#define LINEEND_SQUARE 2 +#define LINEEND_ROUND 3 + +#define LINEJOIN_ERROR (-1) +#define LINEJOIN_DEFAULT 0 +#define LINEJOIN_BEVEL 1 +#define LINEJOIN_ROUND 2 +#define LINEJOIN_MITRE 3 + +#define CHDIRN_ERROR (-1) +#define CHDIRN_DEFAULT 0 +#define CHDIRN_LEFTRIGHT 1 +#define CHDIRN_TOPBOTTOM 2 +#define CHDIRN_RIGHTLEFT 3 +#define CHDIRN_BOTTOMTOP 4 + +#define TA_NORMAL_HORIZ 0x0001 +#define TA_LEFT 0x0002 +#define TA_CENTER 0x0003 +#define TA_RIGHT 0x0004 +#define TA_STANDARD_HORIZ 0x0005 +#define TA_NORMAL_VERT 0x0100 +#define TA_TOP 0x0200 +#define TA_HALF 0x0300 +#define TA_BASE 0x0400 +#define TA_BOTTOM 0x0500 +#define TA_STANDARD_VERT 0x0600 + +#define CM_ERROR (-1) +#define CM_DEFAULT 0 +#define CM_MODE1 1 +#define CM_MODE2 2 +#define CM_MODE3 3 + +#define MARKSYM_ERROR (-1) +#define MARKSYM_DEFAULT 0 +#define MARKSYM_CROSS 1 +#define MARKSYM_PLUS 2 +#define MARKSYM_DIAMOND 3 +#define MARKSYM_SQUARE 4 +#define MARKSYM_SIXPOINTSTAR 5 +#define MARKSYM_EIGHTPOINTSTAR 6 +#define MARKSYM_SOLIDDIAMOND 7 +#define MARKSYM_SOLIDSQUARE 8 +#define MARKSYM_DOT 9 +#define MARKSYM_SMALLCIRCLE 10 +#define MARKSYM_BLANK 64 + +#define TXTBOX_TOPLEFT 0 +#define TXTBOX_BOTTOMLEFT 1 +#define TXTBOX_TOPRIGHT 2 +#define TXTBOX_BOTTOMRIGHT 3 +#define TXTBOX_CONCAT 4 +#define TXTBOX_COUNT 5 + +#define PVIS_ERROR 0 +#define PVIS_INVISIBLE 1 +#define PVIS_VISIBLE 2 + +#define RVIS_ERROR 0 +#define RVIS_INVISIBLE 1 +#define RVIS_PARTIAL 2 +#define RVIS_VISIBLE 3 + +#define FONT_DEFAULT 1 +#define FONT_MATCH 2 + +#define LCIDT_FONT 6 +#define LCIDT_BITMAP 7 + +#define LCID_ALL (-1) + +#define CHS_OPAQUE 0x0001 +#define CHS_VECTOR 0x0002 +#define CHS_LEAVEPOS 0x0008 +#define CHS_CLIP 0x0010 +#define CHS_UNDERSCORE 0x0200 +#define CHS_STRIKEOUT 0x0400 + +#define FWEIGHT_DONT_CARE 0 +#define FWEIGHT_ULTRA_LIGHT 1 +#define FWEIGHT_EXTRA_LIGHT 2 +#define FWEIGHT_LIGHT 3 +#define FWEIGHT_SEMI_LIGHT 4 +#define FWEIGHT_NORMAL 5 +#define FWEIGHT_SEMI_BOLD 6 +#define FWEIGHT_BOLD 7 +#define FWEIGHT_EXTRA_BOLD 8 +#define FWEIGHT_ULTRA_BOLD 9 + +#define FWIDTH_DONT_CARE 0 +#define FWIDTH_ULTRA_CONDENSED 1 +#define FWIDTH_EXTRA_CONDENSED 2 +#define FWIDTH_CONDENSED 3 +#define FWIDTH_SEMI_CONDENSED 4 +#define FWIDTH_NORMAL 5 +#define FWIDTH_SEMI_EXPANDED 6 +#define FWIDTH_EXPANDED 7 +#define FWIDTH_EXTRA_EXPANDED 8 +#define FWIDTH_ULTRA_EXPANDED 9 + +#define FTYPE_ITALIC 0x0001 +#define FTYPE_ITALIC_DONT_CARE 0x0002 +#define FTYPE_OBLIQUE 0x0004 +#define FTYPE_OBLIQUE_DONT_CARE 0x0008 +#define FTYPE_ROUNDED 0x0010 +#define FTYPE_ROUNDED_DONT_CARE 0x0020 + +#define QFA_PUBLIC 1 +#define QFA_PRIVATE 2 +#define QFA_ERROR GPI_ALTERROR + +#define QF_PUBLIC 0x0001 +#define QF_PRIVATE 0x0002 +#define QF_NO_GENERIC 0x0004 +#define QF_NO_DEVICE 0x0008 + +#define QCD_LCT_FORMAT 0 +#define QCD_LCT_LOINDEX 1 +#define QCD_LCT_HIINDEX 2 +#define QCD_LCT_OPTIONS 3 + +#define QLCT_ERROR (-1) +#define QLCT_RGB (-2) + +#define QLCT_NOTLOADED (-1) + +#define PAL_ERROR (-1) + +#define PC_RESERVED 0x01 +#define PC_EXPLICIT 0x02 +#define PC_NOCOLLAPSE 0x04 + +#define SCP_ALTERNATE 0 +#define SCP_WINDING 2 +#define SCP_AND 4 +#define SCP_RESET 0 +#define SCP_INCL 0 +#define SCP_EXCL 8 + +#define MPATH_STROKE 6 + +#define FPATH_ALTERNATE 0 +#define FPATH_WINDING 2 +#define FPATH_INCL 0 +#define FPATH_EXCL 8 + +#define CVTC_WORLD 1 +#define CVTC_MODEL 2 +#define CVTC_DEFAULTPAGE 3 +#define CVTC_PAGE 4 +#define CVTC_DEVICE 5 + +#define TRANSFORM_REPLACE 0 +#define TRANSFORM_ADD 1 +#define TRANSFORM_PREEMPT 2 + +#define SEGEM_ERROR 0 +#define SEGEM_INSERT 1 +#define SEGEM_REPLACE 2 + +#define POLYGON_NOBOUNDARY 0x0000 +#define POLYGON_BOUNDARY 0x0001 + +#define POLYGON_ALTERNATE 0x0000 +#define POLYGON_WINDING 0x0002 + +#define POLYGON_INCL 0x0000 +#define POLYGON_EXCL 0x0008 + +#define POLYGON_FILL 0x0000 +#define POLYGON_NOFILL 0x0010 + +#define LCOL_RESET 0x0001 +#define LCOL_REALIZABLE 0x0002 +#define LCOL_PURECOLOR 0x0004 +#define LCOL_OVERRIDE_DEFAULT_COLORS 0x0008 +#define LCOL_REALIZED 0x0010 + +#define LCOLF_DEFAULT 0 +#define LCOLF_INDRGB 1 +#define LCOLF_CONSECRGB 2 +#define LCOLF_RGB 3 +#define LCOLF_PALETTE 4 + +#define LCOLOPT_REALIZED 0x0001 +#define LCOLOPT_INDEX 0x0002 + +#define BA_NOBOUNDARY 0 +#define BA_BOUNDARY 0x0001 + +#define BA_ALTERNATE 0 +#define BA_WINDING 0x0002 + +#define BA_INCL 0 +#define BA_EXCL 8 + +#define DRO_FILL 1 +#define DRO_OUTLINE 2 +#define DRO_OUTLINEFILL 3 + +#define PATSYM_ERROR (-1) +#define PATSYM_DEFAULT 0 +#define PATSYM_DENSE1 1 +#define PATSYM_DENSE2 2 +#define PATSYM_DENSE3 3 +#define PATSYM_DENSE4 4 +#define PATSYM_DENSE5 5 +#define PATSYM_DENSE6 6 +#define PATSYM_DENSE7 7 +#define PATSYM_DENSE8 8 +#define PATSYM_VERT 9 +#define PATSYM_HORIZ 10 +#define PATSYM_DIAG1 11 +#define PATSYM_DIAG2 12 +#define PATSYM_DIAG3 13 +#define PATSYM_DIAG4 14 +#define PATSYM_NOSHADE 15 +#define PATSYM_SOLID 16 +#define PATSYM_HALFTONE 17 +#define PATSYM_HATCH 18 +#define PATSYM_DIAGHATCH 19 +#define PATSYM_BLANK 64 + +#define LCID_ERROR (-1) +#define LCID_DEFAULT 0 + +#define CRGN_OR 1 +#define CRGN_COPY 2 +#define CRGN_XOR 4 +#define CRGN_AND 6 +#define CRGN_DIFF 7 + +#define RGN_ERROR 0 +#define RGN_NULL 1 +#define RGN_RECT 2 +#define RGN_COMPLEX 3 + +#define PRGN_ERROR 0 +#define PRGN_OUTSIDE 1 +#define PRGN_INSIDE 2 + +#define RRGN_ERROR 0 +#define RRGN_OUTSIDE 1 +#define RRGN_PARTIAL 2 +#define RRGN_INSIDE 3 + +#define EQRGN_ERROR 0 +#define EQRGN_NOTEQUAL 1 +#define EQRGN_EQUAL 2 + +#define RECTDIR_LFRT_TOPBOT 1 +#define RECTDIR_RTLF_TOPBOT 2 +#define RECTDIR_LFRT_BOTTOP 3 +#define RECTDIR_RTLF_BOTTOP 4 + +#define PMF_SEGBASE 0 +#define PMF_LOADTYPE 1 +#define PMF_RESOLVE 2 +#define PMF_LCIDS 3 +#define PMF_RESET 4 +#define PMF_SUPPRESS 5 +#define PMF_COLORTABLES 6 +#define PMF_COLORREALIZABLE 7 +#define PMF_DEFAULTS 8 +#define PMF_DELETEOBJECTS 9 + +#define RS_DEFAULT 0 +#define RS_NODISCARD 1 +#define LC_DEFAULT 0 +#define LC_NOLOAD 1 +#define LC_LOADDISC 3 +#define LT_DEFAULT 0 +#define LT_NOMODIFY 1 +#define LT_ORIGINALVIEW 4 +#define RES_DEFAULT 0 +#define RES_NORESET 1 +#define RES_RESET 2 +#define SUP_DEFAULT 0 +#define SUP_NOSUPPRESS 1 +#define SUP_SUPPRESS 2 +#define CTAB_DEFAULT 0 +#define CTAB_NOMODIFY 1 +#define CTAB_REPLACE 3 +#define CTAB_REPLACEPALETTE 4 +#define CREA_DEFAULT 0 +#define CREA_REALIZE 1 +#define CREA_NOREALIZE 2 +#define CREA_DOREALIZE 3 + +#define DDEF_DEFAULT 0 +#define DDEF_IGNORE 1 +#define DDEF_LOADDISC 3 +#define DOBJ_DEFAULT 0 +#define DOBJ_NODELETE 1 +#define DOBJ_DELETE 2 +#define RSP_DEFAULT 0 +#define RSP_NODISCARD 1 + +#define LBB_COLOR 0x0001 +#define LBB_BACK_COLOR 0x0002 +#define LBB_MIX_MODE 0x0004 +#define LBB_BACK_MIX_MODE 0x0008 +#define LBB_WIDTH 0x0010 +#define LBB_GEOM_WIDTH 0x0020 +#define LBB_TYPE 0x0040 +#define LBB_END 0x0080 +#define LBB_JOIN 0x0100 + +#define CBB_COLOR 0x0001 +#define CBB_BACK_COLOR 0x0002 +#define CBB_MIX_MODE 0x0004 +#define CBB_BACK_MIX_MODE 0x0008 +#define CBB_SET 0x0010 +#define CBB_MODE 0x0020 +#define CBB_BOX 0x0040 +#define CBB_ANGLE 0x0080 +#define CBB_SHEAR 0x0100 +#define CBB_DIRECTION 0x0200 +#define CBB_TEXT_ALIGN 0x0400 +#define CBB_EXTRA 0x0800 +#define CBB_BREAK_EXTRA 0x1000 + +#define MBB_COLOR 0x0001 +#define MBB_BACK_COLOR 0x0002 +#define MBB_MIX_MODE 0x0004 +#define MBB_BACK_MIX_MODE 0x0008 +#define MBB_SET 0x0010 +#define MBB_SYMBOL 0x0020 +#define MBB_BOX 0x0040 + +#define ABB_COLOR 0x0001 +#define ABB_BACK_COLOR 0x0002 +#define ABB_MIX_MODE 0x0004 +#define ABB_BACK_MIX_MODE 0x0008 +#define ABB_SET 0x0010 +#define ABB_SYMBOL 0x0020 +#define ABB_REF_POINT 0x0040 + +#define IBB_COLOR 0x0001 +#define IBB_BACK_COLOR 0x0002 +#define IBB_MIX_MODE 0x0004 +#define IBB_BACK_MIX_MODE 0x0008 + + +typedef PVOID PBUNDLE; + +typedef LONG FIXED; +typedef FIXED *PFIXED; + +typedef LHANDLE HMF; +typedef HMF *PHMF; + + +typedef struct _SIZEL +{ + LONG cx; + LONG cy; +} SIZEL; +typedef SIZEL *PSIZEL; + +typedef struct _RGNRECT +{ + ULONG ircStart; + ULONG crc; + ULONG crcReturned; + ULONG ulDirection; +} RGNRECT; +typedef RGNRECT *PRGNRECT; + +typedef struct _MATRIXLF +{ + FIXED fxM11; + FIXED fxM12; + LONG lM13; + FIXED fxM21; + FIXED fxM22; + LONG lM23; + LONG lM31; + LONG lM32; + LONG lM33; +} MATRIXLF; +typedef MATRIXLF *PMATRIXLF; + +typedef struct _ARCPARAMS +{ + LONG lP; + LONG lQ; + LONG lR; + LONG lS; +} ARCPARAMS; +typedef ARCPARAMS *PARCPARAMS; + +typedef struct _SIZEF +{ + FIXED cx; + FIXED cy; +} SIZEF; +typedef SIZEF *PSIZEF; + +typedef struct _POLYGON +{ + ULONG ulPoints; + PPOINTL aPointl; +} POLYGON; +typedef POLYGON *PPOLYGON; + +typedef struct _POLYSET +{ + ULONG ulPolys; + POLYGON aPolygon[1]; +} POLYSET; +typedef POLYSET *PPOLYSET; + +typedef struct _GRADIENTL +{ + LONG x; + LONG y; +} GRADIENTL; +typedef GRADIENTL *PGRADIENTL; + +typedef struct _KERNINGPAIRS +{ + SHORT sFirstChar; + SHORT sSecondChar; + LONG lKerningAmount; +} KERNINGPAIRS; +typedef KERNINGPAIRS *PKERNINGPAIRS; + +typedef struct _FACENAMEDESC +{ + USHORT usSize; + USHORT usWeightClass; + USHORT usWidthClass; + USHORT usReserved; + ULONG flOptions; +} FACENAMEDESC; +typedef FACENAMEDESC *PFACENAMEDESC; + +typedef CHAR FFDESCS[2][FACESIZE]; +typedef FFDESCS *PFFDESCS; + +typedef struct _FFDESCS2 +{ + ULONG cbLength; + ULONG cbFacenameOffset; + BYTE abFamilyName[1]; +} FFDESCS2; +typedef FFDESCS2 *PFFDESCS2; + + +typedef struct _LINEBUNDLE +{ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + FIXED fxWidth; + LONG lGeomWidth; + USHORT usType; + USHORT usEnd; + USHORT usJoin; + USHORT usReserved; +} LINEBUNDLE; +typedef LINEBUNDLE *PLINEBUNDLE; + +typedef struct _CHARBUNDLE +{ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usPrecision; + SIZEF sizfxCell; + POINTL ptlAngle; + POINTL ptlShear; + USHORT usDirection; + USHORT usTextAlign; + FIXED fxExtra; + FIXED fxBreakExtra; +} CHARBUNDLE; +typedef CHARBUNDLE *PCHARBUNDLE; + +typedef struct _MARKERBUNDLE +{ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usSymbol; + SIZEF sizfxCell; +} MARKERBUNDLE; +typedef MARKERBUNDLE *PMARKERBUNDLE; + +typedef struct _AREABUNDLE +{ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; + USHORT usSet; + USHORT usSymbol; + POINTL ptlRefPoint; +} AREABUNDLE; +typedef AREABUNDLE *PAREABUNDLE; + +typedef struct _IMAGEBUNDLE +{ + LONG lColor; + LONG lBackColor; + USHORT usMixMode; + USHORT usBackMixMode; +} IMAGEBUNDLE; +typedef IMAGEBUNDLE *PIMAGEBUNDLE; + + +#define MAKEFIXED(i,f) MAKELONG(f,i) +#define FIXEDFRAC(fx) (LOUSHORT(fx)) +#define FIXEDINT(fx) ((SHORT)HIUSHORT(fx)) + + +LONG GpiAnimatePalette (HPAL hpal, ULONG ulFormat, ULONG ulStart, + ULONG ulCount, __const__ ULONG *aulTable); +BOOL GpiBeginArea (HPS hps, ULONG flOptions); +BOOL GpiBeginElement (HPS hps, LONG lType, PCSZ pszDesc); +BOOL GpiBeginPath (HPS hps, LONG lPath); +LONG GpiBox (HPS hps, LONG lControl, __const__ POINTL *pptlPoint, LONG lHRound, + LONG lVRound); +LONG GpiCallSegmentMatrix (HPS hps, LONG lSegment, LONG lCount, + __const__ MATRIXLF *pmatlfArray, LONG lOptions); +LONG GpiCharString (HPS hps, LONG lCount, PCCH pchString); +LONG GpiCharStringAt (HPS hps, __const__ POINTL *pptlPoint, LONG lCount, + PCCH pchString); +LONG GpiCharStringPos (HPS hps, __const__ RECTL *prclRect, ULONG flOptions, + LONG lCount, PCCH pchString, __const__ LONG *alAdx); +LONG GpiCharStringPosAt (HPS hps, __const__ POINTL *pptlStart, + __const__ RECTL *prclRect, ULONG flOptions, LONG lCount, PCCH pchString, + __const__ LONG *alAdx); +BOOL GpiCloseFigure (HPS hps); +LONG GpiCombineRegion (HPS hps, HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2, + LONG lMode); +BOOL GpiComment (HPS hps, LONG lLength, __const__ BYTE *pbData); +BOOL GpiConvert (HPS hps, LONG lSrc, LONG lTarg, LONG lCount, + PPOINTL aptlPoints); +BOOL GpiConvertWithMatrix (HPS hps, LONG lCountp, PPOINTL aptlPoints, + LONG lCount, __const__ MATRIXLF *pmatlfArray); +HMF GpiCopyMetaFile (HMF hmf); +BOOL GpiCreateLogColorTable (HPS hps, ULONG flOptions, LONG lFormat, + LONG lStart, LONG lCount, __const__ LONG *alTable); +LONG GpiCreateLogFont (HPS hps, __const__ STR8 *pName, LONG lLcid, + __const__ FATTRS *pfatAttrs); +HPAL GpiCreatePalette (HAB hab, ULONG flOptions, ULONG ulFormat, + ULONG ulCount, __const__ ULONG *aulTable); +HRGN GpiCreateRegion (HPS hps, LONG lCount, __const__ RECTL *arclRectangles); +BOOL GpiDeleteElement (HPS hps); +BOOL GpiDeleteElementRange (HPS hps, LONG lFirstElement, LONG lLastElement); +BOOL GpiDeleteElementsBetweenLabels (HPS hps, LONG lFirstLabel, + LONG lLastLabel); +BOOL GpiDeleteMetaFile (HMF hmf); +BOOL GpiDeletePalette (HPAL hpal); +BOOL GpiDeleteSetId (HPS hps, LONG lLcid); +BOOL GpiDestroyRegion (HPS hps, HRGN hrgn); +LONG GpiElement (HPS hps, LONG lType, PCSZ pszDesc, LONG lLength, + __const__ BYTE *pbData); +LONG GpiEndArea (HPS hps); +BOOL GpiEndElement (HPS hps); +BOOL GpiEndPath (HPS hps); +LONG GpiEqualRegion (HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2); +LONG GpiExcludeClipRectangle (HPS hps, __const__ RECTL *prclRectangle); +LONG GpiFillPath (HPS hps, LONG lPath, LONG lOptions); +LONG GpiFrameRegion (HPS hps, HRGN hrgn, __const__ SIZEL *thickness); +LONG GpiFullArc (HPS hps, LONG lControl, FIXED fxMultiplier); +LONG GpiImage (HPS hps, LONG lFormat, __const__ SIZEL *psizlImageSize, + LONG lLength, __const__ BYTE *pbData); +LONG GpiIntersectClipRectangle (HPS hps, __const__ RECTL *prclRectangle); +BOOL GpiLabel (HPS hps, LONG lLabel); +LONG GpiLine (HPS hps, __const__ POINTL *pptlEndPoint); +BOOL GpiLoadFonts (HAB hab, PCSZ pszFilename); +HMF GpiLoadMetaFile (HAB hab, PCSZ pszFilename); +BOOL GpiLoadPublicFonts (HAB hab, PCSZ pszFileName); +LONG GpiMarker (HPS hps, __const__ POINTL *pptlPoint); +BOOL GpiModifyPath (HPS hps, LONG lPath, LONG lMode); +BOOL GpiMove (HPS hps, __const__ POINTL *pptlPoint); +LONG GpiOffsetClipRegion (HPS hps, __const__ POINTL *pptlPoint); +BOOL GpiOffsetElementPointer (HPS hps, LONG loffset); +BOOL GpiOffsetRegion (HPS hps, HRGN Hrgn, __const__ POINTL *pptlOffset); +LONG GpiOutlinePath (HPS hps, LONG lPath, LONG lOptions); +LONG GpiPaintRegion (HPS hps, HRGN hrgn); +LONG GpiPartialArc (HPS hps, __const__ POINTL *pptlCenter, FIXED fxMultiplier, + FIXED fxStartAngle, FIXED fxSweepAngle); +HRGN GpiPathToRegion (HPS GpiH, LONG lPath, LONG lOptions); +LONG GpiPlayMetaFile (HPS hps, HMF hmf, LONG lCount1, + __const__ LONG *alOptarray, PLONG plSegCount, LONG lCount2, PSZ pszDesc); +LONG GpiPointArc (HPS hps, __const__ POINTL *pptl2); +LONG GpiPolyFillet (HPS hps, LONG lCount, __const__ POINTL *aptlPoints); +LONG GpiPolyFilletSharp (HPS hps, LONG lCount, __const__ POINTL *aptlPoints, + __const__ FIXED *afxPoints); +LONG GpiPolygons (HPS hps, ULONG ulCount, __const__ POLYGON *paplgn, + ULONG flOptions, ULONG flModel); +LONG GpiPolyLine (HPS hps, LONG lCount, __const__ POINTL *aptlPoints); +LONG GpiPolyLineDisjoint (HPS hps, LONG lCount, __const__ POINTL *aptlPoints); +LONG GpiPolyMarker (HPS hps, LONG lCount, __const__ POINTL *aptlPoints); +LONG GpiPolySpline (HPS hps, LONG lCount, __const__ POINTL *aptlPoints); +BOOL GpiPop (HPS hps, LONG lCount); +LONG GpiPtInRegion (HPS hps, HRGN hrgn, __const__ POINTL *pptlPoint); +LONG GpiPtVisible (HPS hps, __const__ POINTL *pptlPoint); +BOOL GpiQueryArcParams (HPS hps, PARCPARAMS parcpArcParams); +LONG GpiQueryAttrMode (HPS hps); +LONG GpiQueryAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, + PBUNDLE ppbunAttrs); +LONG GpiQueryBackColor (HPS hps); +LONG GpiQueryBackMix (HPS hps); +BOOL GpiQueryCharAngle (HPS hps, PGRADIENTL pgradlAngle); +BOOL GpiQueryCharBox (HPS hps, PSIZEF psizfxSize); +BOOL GpiQueryCharBreakExtra (HPS hps, PFIXED BreakExtra); +LONG GpiQueryCharDirection (HPS hps); +BOOL GpiQueryCharExtra (HPS hps, PFIXED Extra); +LONG GpiQueryCharMode (HPS hps); +LONG GpiQueryCharSet (HPS hps); +BOOL GpiQueryCharShear (HPS hps, PPOINTL pptlShear); +BOOL GpiQueryCharStringPos (HPS hps, ULONG flOptions, LONG lCount, + PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions); +BOOL GpiQueryCharStringPosAt (HPS hps, PPOINTL pptlStart, ULONG flOptions, + LONG lCount, PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions); +LONG GpiQueryClipBox (HPS hps, PRECTL prclBound); +HRGN GpiQueryClipRegion (HPS hps); +LONG GpiQueryColor (HPS hps); +BOOL GpiQueryColorData (HPS hps, LONG lCount, PLONG alArray); +LONG GpiQueryColorIndex (HPS hps, ULONG flOptions, LONG lRgbColor); +ULONG GpiQueryCp (HPS hps); +BOOL GpiQueryCurrentPosition (HPS hps, PPOINTL pptlPoint); +BOOL GpiQueryDefArcParams (HPS hps, PARCPARAMS parcpArcParams); +BOOL GpiQueryDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, + PBUNDLE ppbunAttrs); +BOOL GpiQueryDefCharBox (HPS hps, PSIZEL psizlSize); +BOOL GpiQueryDefTag (HPS hps, PLONG plTag); +BOOL GpiQueryDefViewingLimits (HPS hps, PRECTL prclLimits); +BOOL GpiQueryDefaultViewMatrix (HPS hps, LONG lCount, PMATRIXLF pmatlfArray); +LONG GpiQueryEditMode (HPS hps); +LONG GpiQueryElement (HPS hps, LONG lOff, LONG lMaxLength, PBYTE pbData); +LONG GpiQueryElementPointer (HPS hps); +LONG GpiQueryElementType (HPS hps, PLONG plType, LONG lLength, PSZ pszData); +ULONG GpiQueryFaceString (HPS PS, PCSZ FamilyName, PFACENAMEDESC attrs, + LONG length, PSZ CompoundFaceName); +ULONG GpiQueryFontAction (HAB anchor, ULONG options); +LONG GpiQueryFontFileDescriptions (HAB hab, PCSZ pszFilename, PLONG plCount, + PFFDESCS affdescsNames); +BOOL GpiQueryFontMetrics (HPS hps, LONG lMetricsLength, + PFONTMETRICS pfmMetrics); +LONG GpiQueryFonts (HPS hps, ULONG flOptions, PCSZ pszFacename, + PLONG plReqFonts, LONG lMetricsLength, PFONTMETRICS afmMetrics); +LONG GpiQueryFullFontFileDescs (HAB hab, PCSZ pszFilename, PLONG plCount, + PVOID pNames, PLONG plNamesBuffLength); +BOOL GpiQueryGraphicsField (HPS hps, PRECTL prclField); +LONG GpiQueryKerningPairs (HPS hps, LONG lCount, PKERNINGPAIRS akrnprData); +LONG GpiQueryLineEnd (HPS hps); +LONG GpiQueryLineJoin (HPS hps); +LONG GpiQueryLineType (HPS hps); +FIXED GpiQueryLineWidth (HPS hps); +LONG GpiQueryLineWidthGeom (HPS hps); +LONG GpiQueryLogColorTable (HPS hps, ULONG flOptions, LONG lStart, LONG lCount, + PLONG alArray); +BOOL GpiQueryLogicalFont (HPS PS, LONG lcid, PSTR8 name, PFATTRS attrs, + LONG length); +LONG GpiQueryMarker (HPS hps); +BOOL GpiQueryMarkerBox (HPS hps, PSIZEF psizfxSize); +LONG GpiQueryMarkerSet (HPS hps); +BOOL GpiQueryMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, PBYTE pbData); +LONG GpiQueryMetaFileLength (HMF hmf); +LONG GpiQueryMix (HPS hps); +BOOL GpiQueryModelTransformMatrix (HPS hps, LONG lCount, + PMATRIXLF pmatlfArray); +LONG GpiQueryNearestColor (HPS hps, ULONG flOptions, LONG lRgbIn); +LONG GpiQueryNumberSetIds (HPS hps); +BOOL GpiQueryPageViewport (HPS hps, PRECTL prclViewport); +HPAL GpiQueryPalette (HPS hps); +LONG GpiQueryPaletteInfo (HPAL hpal, HPS hps, ULONG flOptions, + ULONG ulStart, ULONG ulCount, PULONG aulArray); +LONG GpiQueryPattern (HPS hps); +BOOL GpiQueryPatternRefPoint (HPS hps, PPOINTL pptlRefPoint); +LONG GpiQueryPatternSet (HPS hps); +LONG GpiQueryRealColors (HPS hps, ULONG flOptions, LONG lStart, LONG lCount, + PLONG alColors); +LONG GpiQueryRegionBox (HPS hps, HRGN hrgn, PRECTL prclBound); +BOOL GpiQueryRegionRects (HPS hps, HRGN hrgn, PRECTL prclBound, + PRGNRECT prgnrcControl, PRECTL prclRect); +LONG GpiQueryRGBColor (HPS hps, ULONG flOptions, LONG lColorIndex); +BOOL GpiQuerySegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount, + PMATRIXLF pmatlfArray); +BOOL GpiQuerySetIds (HPS hps, LONG lCount, PLONG alTypes, PSTR8 aNames, + PLONG allcids); +BOOL GpiQueryTextAlignment (HPS hps, PLONG plHoriz, PLONG plVert); +BOOL GpiQueryTextBox (HPS hps, LONG lCount1, PCH pchString, LONG lCount2, + PPOINTL aptlPoints); +BOOL GpiQueryViewingLimits (HPS hps, PRECTL prclLimits); +BOOL GpiQueryViewingTransformMatrix (HPS hps, LONG lCount, + PMATRIXLF pmatlfArray); +BOOL GpiQueryWidthTable (HPS hps, LONG lFirstChar, LONG lCount, PLONG alData); +LONG GpiRectInRegion (HPS hps, HRGN hrgn, __const__ RECTL *prclRect); +LONG GpiRectVisible (HPS hps, __const__ RECTL *prclRectangle); +BOOL GpiRotate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, FIXED fxAngle, + __const__ POINTL *pptlCenter); +BOOL GpiSaveMetaFile (HMF hmf, PCSZ pszFilename); +BOOL GpiScale (HPS hps, PMATRIXLF pmfatlfArray, LONG lOptions, + __const__ FIXED *afxScale, __const__ POINTL *pptlCenter); +HPAL GpiSelectPalette (HPS hps, HPAL hpal); +BOOL GpiSetArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams); +BOOL GpiSetAttrMode (HPS hps, LONG lMode); +BOOL GpiSetAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, ULONG flDefMask, + __const__ VOID *ppbunAttrs); +BOOL GpiSetBackColor (HPS hps, LONG lColor); +BOOL GpiSetBackMix (HPS hps, LONG lMixMode); +BOOL GpiSetCharAngle (HPS hps, __const__ GRADIENTL *pgradlAngle); +BOOL GpiSetCharBox (HPS hps, __const__ SIZEF *psizfxBox); +BOOL GpiSetCharBreakExtra (HPS hps, FIXED BreakExtra); +BOOL GpiSetCharDirection (HPS hps, LONG lDirection); +BOOL GpiSetCharExtra (HPS hps, FIXED Extra); +BOOL GpiSetCharMode (HPS hps, LONG lMode); +BOOL GpiSetCharSet (HPS hps, LONG llcid); +BOOL GpiSetCharShear (HPS hps, __const__ POINTL *pptlAngle); +BOOL GpiSetClipPath (HPS hps, LONG lPath, LONG lOptions); +LONG GpiSetClipRegion (HPS hps, HRGN hrgn, PHRGN phrgnOld); +BOOL GpiSetColor (HPS hps, LONG lColor); +BOOL GpiSetCp (HPS hps, ULONG ulCodePage); +BOOL GpiSetCurrentPosition (HPS hps, __const__ POINTL *pptlPoint); +BOOL GpiSetDefArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams); +BOOL GpiSetDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, + __const__ VOID *ppbunAttrs); +BOOL GpiSetDefaultViewMatrix (HPS hps, LONG lCount, + __const__ MATRIXLF *pmatlfarray, LONG lOptions); +BOOL GpiSetDefTag (HPS hps, LONG lTag); +BOOL GpiSetDefViewingLimits (HPS hps, __const__ RECTL *prclLimits); +BOOL GpiSetEditMode (HPS hps, LONG lMode); +BOOL GpiSetElementPointer (HPS hps, LONG lElement); +BOOL GpiSetElementPointerAtLabel (HPS hps, LONG lLabel); +BOOL GpiSetGraphicsField (HPS hps, __const__ RECTL *prclField); +BOOL GpiSetLineEnd (HPS hps, LONG lLineEnd); +BOOL GpiSetLineJoin (HPS hps, LONG lLineJoin); +BOOL GpiSetLineType (HPS hps, LONG lLineType); +BOOL GpiSetLineWidth (HPS hps, FIXED fxLineWidth); +BOOL GpiSetLineWidthGeom (HPS hps, LONG lLineWidth); +BOOL GpiSetMarker (HPS hps, LONG lSymbol); +BOOL GpiSetMarkerBox (HPS hps, __const__ SIZEF *psizfxSize); +BOOL GpiSetMarkerSet (HPS hps, LONG lSet); +BOOL GpiSetMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, + __const__ BYTE *pbBuffer); +BOOL GpiSetMix (HPS hps, LONG lMixMode); +BOOL GpiSetModelTransformMatrix (HPS hps, LONG lCount, + __const__ MATRIXLF *pmatlfArray, LONG lOptions); +BOOL GpiSetPageViewport (HPS hps, __const__ RECTL *prclViewport); +BOOL GpiSetPaletteEntries (HPAL hpal, ULONG ulFormat, ULONG ulStart, + ULONG ulCount, __const__ ULONG *aulTable); +BOOL GpiSetPattern (HPS hps, LONG lPatternSymbol); +BOOL GpiSetPatternRefPoint (HPS hps, __const__ POINTL *pptlRefPoint); +BOOL GpiSetPatternSet (HPS hps, LONG lSet); +BOOL GpiSetRegion (HPS hps, HRGN hrgn, LONG lcount, + __const__ RECTL *arclRectangles); +BOOL GpiSetSegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount, + __const__ MATRIXLF *pmatlfarray, LONG lOptions); +BOOL GpiSetTextAlignment (HPS hps, LONG lHoriz, LONG lVert); +BOOL GpiSetViewingLimits (HPS hps, __const__ RECTL *prclLimits); +BOOL GpiSetViewingTransformMatrix (HPS hps, LONG lCount, + __const__ MATRIXLF *pmatlfArray, LONG lOptions); +LONG GpiStrokePath (HPS hps, LONG lPath, ULONG flOptions); +BOOL GpiTranslate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, + __const__ POINTL *pptlTranslation); +BOOL GpiUnloadFonts (HAB hab, PCSZ pszFilename); +BOOL GpiUnloadPublicFonts (HAB hab, PCSZ pszFilename); + + +#if defined (INCL_GPIBITMAPS) || !defined (INCL_NOCOMMON) + +#define ROP_SRCCOPY 0x00cc +#define ROP_SRCPAINT 0x00ee +#define ROP_SRCAND 0x0088 +#define ROP_SRCINVERT 0x0066 +#define ROP_SRCERASE 0x0044 +#define ROP_NOTSRCCOPY 0x0033 +#define ROP_NOTSRCERASE 0x0011 +#define ROP_MERGECOPY 0x00c0 +#define ROP_MERGEPAINT 0x00bb +#define ROP_PATCOPY 0x00f0 +#define ROP_PATPAINT 0x00fb +#define ROP_PATINVERT 0x005a +#define ROP_DSTINVERT 0x0055 +#define ROP_ZERO 0x0000 +#define ROP_ONE 0x00ff + +#define BBO_OR 0 +#define BBO_AND 1 +#define BBO_IGNORE 2 +#define BBO_PAL_COLORS 4 +#define BBO_NO_COLOR_INFO 8 + +#define FF_BOUNDARY 0 +#define FF_SURFACE 1 + +#define HBM_ERROR ((HBITMAP)(-1)) + + +LONG GpiBitBlt (HPS hpsTarget, HPS hpsSource, LONG lCount, + __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions); +BOOL GpiDeleteBitmap (HBITMAP hbm); +HBITMAP GpiLoadBitmap (HPS hps, HMODULE Resource, ULONG idBitmap, + LONG lWidth, LONG lHeight); +HBITMAP GpiSetBitmap (HPS hps, HBITMAP hbm); +LONG GpiWCBitBlt (HPS hpsTarget, HBITMAP hbmSource, LONG lCount, + __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions); + +#endif /* INCL_GPIBITMAPS */ + + +#if defined (INCL_GPIBITMAPS) + +#define BFT_ICON 0x4349 +#define BFT_BMAP 0x4d42 +#define BFT_POINTER 0x5450 +#define BFT_COLORICON 0x4943 +#define BFT_COLORPOINTER 0x5043 +#define BFT_BITMAPARRAY 0x4142 + +#define CBD_BITS 0 +#define CBD_COMPRESSION 1 +#define CBD_DECOMPRESSION 2 + +#define CBD_COLOR_CONVERSION 0x0001 + +#define CBM_INIT 0x0004 + +#define BCA_UNCOMP 0 +#define BCA_RLE8 1 +#define BCA_RLE4 2 +#define BCA_HUFFMAN1D 3 +#define BCA_RLE24 4 + +#define BMB_ERROR (-1) + +#define BRU_METRIC 0 + +#define BRA_BOTTOMUP 0 + +#define BRH_NOTHALFTONED 0 +#define BRH_ERRORDIFFUSION 1 +#define BRH_PANDA 2 +#define BRH_SUPERCIRCLE 3 + +#define BCE_PALETTE (-1) +#define BCE_RGB 0 + + +typedef struct _RGB +{ + BYTE bBlue; + BYTE bGreen; + BYTE bRed; +} RGB; + +typedef struct _RGB2 +{ + BYTE bBlue; + BYTE bGreen; + BYTE bRed; + BYTE fcOptions; +} RGB2; +typedef RGB2 *PRGB2; + +typedef struct _BITMAPINFOHEADER +{ + ULONG cbFix; + USHORT cx; + USHORT cy; + USHORT cPlanes; + USHORT cBitCount; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER *PBITMAPINFOHEADER; + +typedef struct _BITMAPINFO +{ + ULONG cbFix; + USHORT cx; + USHORT cy; + USHORT cPlanes; + USHORT cBitCount; + RGB argbColor[1]; +} BITMAPINFO; +typedef BITMAPINFO *PBITMAPINFO; + +typedef struct _BITMAPINFO2 +{ + ULONG cbFix; + ULONG cx; + ULONG cy; + USHORT cPlanes; + USHORT cBitCount; + ULONG ulCompression; + ULONG cbImage; + ULONG cxResolution; + ULONG cyResolution; + ULONG cclrUsed; + ULONG cclrImportant; + USHORT usUnits; + USHORT usReserved; + USHORT usRecording; + USHORT usRendering; + ULONG cSize1; + ULONG cSize2; + ULONG ulColorEncoding; + ULONG ulIdentifier; + RGB2 argbColor[1]; +} BITMAPINFO2; +typedef BITMAPINFO2 *PBITMAPINFO2; + +typedef struct _BITMAPINFOHEADER2 +{ + ULONG cbFix; + ULONG cx; + ULONG cy; + USHORT cPlanes; + USHORT cBitCount; + ULONG ulCompression; + ULONG cbImage; + ULONG cxResolution; + ULONG cyResolution; + ULONG cclrUsed; + ULONG cclrImportant; + USHORT usUnits; + USHORT usReserved; + USHORT usRecording; + USHORT usRendering; + ULONG cSize1; + ULONG cSize2; + ULONG ulColorEncoding; + ULONG ulIdentifier; +} BITMAPINFOHEADER2; +typedef BITMAPINFOHEADER2 *PBITMAPINFOHEADER2; + +typedef struct _BITMAPFILEHEADER +{ + USHORT usType; + ULONG cbSize; + SHORT xHotspot; + SHORT yHotspot; + ULONG offBits; + BITMAPINFOHEADER bmp; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER *PBITMAPFILEHEADER; + +typedef struct _BITMAPARRAYFILEHEADER +{ + USHORT usType; + ULONG cbSize; + ULONG offNext; + USHORT cxDisplay; + USHORT cyDisplay; + BITMAPFILEHEADER bfh; +} BITMAPARRAYFILEHEADER; +typedef BITMAPARRAYFILEHEADER *PBITMAPARRAYFILEHEADER; + +typedef struct _BITMAPFILEHEADER2 +{ + USHORT usType; + ULONG cbSize; + SHORT xHotspot; + SHORT yHotspot; + ULONG offBits; + BITMAPINFOHEADER2 bmp2; +} BITMAPFILEHEADER2; +typedef BITMAPFILEHEADER2 *PBITMAPFILEHEADER2; + +typedef struct _BITMAPARRAYFILEHEADER2 +{ + USHORT usType; + ULONG cbSize; + ULONG offNext; + USHORT cxDisplay; + USHORT cyDisplay; + BITMAPFILEHEADER2 bfh2; +} BITMAPARRAYFILEHEADER2; +typedef BITMAPARRAYFILEHEADER2 *PBITMAPARRAYFILEHEADER2; + + +HBITMAP GpiCreateBitmap (HPS hps, __const__ BITMAPINFOHEADER2 *pbmpNew, + ULONG flOptions, __const__ BYTE *pbInitData, + __const__ BITMAPINFO2 *pbmiInfoTable); +LONG GpiDrawBits (HPS hps, __const__ VOID *pBits, + __const__ BITMAPINFO2 *pbmiInfoTable, LONG lCount, + __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions); +LONG GpiFloodFill (HPS hps, LONG lOptions, LONG lColor); +LONG GpiQueryBitmapBits (HPS hps, LONG lScanStart, LONG lScans, PBYTE pbBuffer, + PBITMAPINFO2 pbmiInfoTable); +BOOL GpiQueryBitmapDimension (HBITMAP hbm, PSIZEL psizlBitmapDimension); +HBITMAP GpiQueryBitmapHandle (HPS hps, LONG lLcid); +BOOL GpiQueryBitmapInfoHeader (HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData); +BOOL GpiQueryBitmapParameters (HBITMAP hbm, PBITMAPINFOHEADER pbmpData); +BOOL GpiQueryDeviceBitmapFormats (HPS hps, LONG lCount, PLONG alArray); +LONG GpiSetBitmapBits (HPS hps, LONG lScanStart, LONG lScans, + __const__ BYTE *pbBuffer, __const__ BITMAPINFO2 *pbmiInfoTable); +LONG GpiQueryPel (HPS hps, PPOINTL pptlPoint); +BOOL GpiSetBitmapDimension (HBITMAP hbm, + __const__ SIZEL *psizlBitmapDimension); +BOOL GpiSetBitmapId (HPS hps, HBITMAP hbm, LONG lLcid); +LONG GpiSetPel (HPS hps, __const__ POINTL *pptlPoint); + + +#endif /* INCL_GPIBITMAPS */ + + +#if defined (INCL_GPICONTROL) || !defined (INCL_NOCOMMON) + +#define GPIA_NOASSOC 0x0000 +#define GPIA_ASSOC 0x4000 + +#define GPIF_DEFAULT 0x0000 +#define GPIF_SHORT 0x0100 +#define GPIF_LONG 0x0200 + +#define GPIM_AREAEXCL 0x8000 + +#define GPIT_NORMAL 0x0000 +#define GPIT_MICRO 0x1000 +#define GPIT_INK 0x2000 + +#define HDC_ERROR ((HDC)(-1)) + +#define PU_ARBITRARY 0x0004 +#define PU_PELS 0x0008 +#define PU_LOMETRIC 0x000c +#define PU_HIMETRIC 0x0010 +#define PU_LOENGLISH 0x0014 +#define PU_HIENGLISH 0x0018 +#define PU_TWIPS 0x001c + + +BOOL GpiAssociate (HPS hps, HDC hdc); +HPS GpiCreatePS (HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions); +BOOL GpiDestroyPS (HPS hps); +BOOL GpiErase (HPS hps); +HDC GpiQueryDevice (HPS hps); +BOOL GpiRestorePS (HPS hps, LONG lPSid); +LONG GpiSavePS (HPS hps); + +#endif /* INCL_GPICONTROL */ + + +#if defined (INCL_GPICONTROL) + +#define DCTL_ERASE 1 +#define DCTL_DISPLAY 2 +#define DCTL_BOUNDARY 3 +#define DCTL_DYNAMIC 4 +#define DCTL_CORRELATE 5 + +#define DCTL_ERROR (-1) +#define DCTL_OFF 0 +#define DCTL_ON 1 + +#define DM_ERROR 0 +#define DM_DRAW 1 +#define DM_RETAIN 2 +#define DM_DRAWANDRETAIN 3 + +#define GPIE_SEGMENT 0 +#define GPIE_ELEMENT 1 +#define GPIE_DATA 2 + +#define GRES_ATTRS 0x0001 +#define GRES_SEGMENTS 0x0002 +#define GRES_ALL 0x0004 + +#define PS_UNITS 0x00fc +#define PS_FORMAT 0x0f00 +#define PS_TYPE 0x1000 +#define PS_MODE 0x2000 +#define PS_ASSOCIATE 0x4000 +#define PS_NORESET 0x8000 + +#define SDW_ERROR (-1) +#define SDW_OFF 0 +#define SDW_ON 1 + + +LONG GpiErrorSegmentData (HPS hps, PLONG plSegment, PLONG plContext); +LONG GpiQueryDrawControl (HPS hps, LONG lControl); +LONG GpiQueryDrawingMode (HPS hps); +ULONG GpiQueryPS (HPS hps, PSIZEL psizlSize); +BOOL GpiResetPS (HPS hps, ULONG flOptions); +LONG GpiQueryStopDraw (HPS hps); +BOOL GpiSetDrawControl (HPS hps, LONG lControl, LONG lValue); +BOOL GpiSetDrawingMode (HPS hps, LONG lMode); +BOOL GpiSetPS (HPS hps, __const__ SIZEL *psizlsize, ULONG flOptions); +BOOL GpiSetStopDraw (HPS hps, LONG lValue); + +#endif /* INCL_GPICONTROL */ + + +#if defined (INCL_GPICORRELATION) + +#define GPI_HITS 2 + +#define PICKAP_DEFAULT 0 +#define PICKAP_REC 2 + +#define PICKSEL_VISIBLE 0 +#define PICKSEL_ALL 1 + + +LONG GpiCorrelateChain (HPS hps, LONG lType, __const__ POINTL *pptlPick, + LONG lMaxHits, LONG lMaxDepth, PLONG pl2); +LONG GpiCorrelateFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment, + LONG lType, __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth, + PLONG plSegTag); +LONG GpiCorrelateSegment (HPS hps, LONG lSegment, LONG lType, + __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth, PLONG alSegTag); +BOOL GpiQueryBoundaryData (HPS hps, PRECTL prclBoundary); +BOOL GpiQueryPickAperturePosition (HPS hps, PPOINTL pptlPoint); +BOOL GpiQueryPickApertureSize (HPS hps, PSIZEL psizlSize); +BOOL GpiQueryTag (HPS hps, PLONG plTag); +BOOL GpiResetBoundaryData (HPS hps); +BOOL GpiSetPickAperturePosition (HPS hps, __const__ POINTL *pptlPick); +BOOL GpiSetPickApertureSize (HPS hps, LONG lOptions, + __const__ SIZEL *psizlSize); +BOOL GpiSetTag (HPS hps, LONG lTag); + +#endif /* INCL_GPICORRELATION */ + + +#if defined (INCL_GPIINK) + +#define PPE_KEEPPATH 0 +#define PPE_ERASEPATH 1 + +#define PPS_INKMOVE 0 +#define PPS_INKDOWN 1 +#define PPS_INKUP 2 + + +BOOL GpiBeginInkPath (HPS hps, LONG lPath, ULONG flOptions); +BOOL GpiEndInkPath (HPS hps, ULONG flOptions); +LONG GpiStrokeInkPath (HPS hps, LONG lPath, LONG lCount, + __const__ POINTL *aptlPoints, ULONG flOptions); + +#endif /* INCL_GPIINK */ + + +#if defined (INCL_GPISEGMENTS) + +#define DFORM_NOCONV 0 + +#define DFORM_S370SHORT 1 +#define DFORM_PCSHORT 2 +#define DFORM_PCLONG 4 + +#define ATTR_ERROR (-1) +#define ATTR_DETECTABLE 1 +#define ATTR_VISIBLE 2 +#define ATTR_CHAINED 6 +#define ATTR_DYNAMIC 8 +#define ATTR_FASTCHAIN 9 +#define ATTR_PROP_DETECTABLE 10 +#define ATTR_PROP_VISIBLE 11 + +#define ATTR_OFF 0 +#define ATTR_ON 1 + +#define LOWER_PRI (-1) +#define HIGHER_PRI 1 + + +BOOL GpiCloseSegment (HPS hps); +BOOL GpiDeleteSegment (HPS hps, LONG lSegid); +BOOL GpiDeleteSegments (HPS hps, LONG lFirstSegment, LONG lLastSegment); +BOOL GpiDrawChain (HPS hps); +BOOL GpiDrawDynamics (HPS hps); +BOOL GpiDrawFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment); +BOOL GpiDrawSegment (HPS hps, LONG lSegment); +LONG GpiGetData (HPS hps, LONG lSegid, PLONG plOffset, LONG lFormat, + LONG lLength, PBYTE pbData); +BOOL GpiOpenSegment (HPS hps, LONG lSegment); +LONG GpiPutData (HPS hps, LONG lFormat, PLONG plCount, __const__ BYTE *pbData); +LONG GpiQueryInitialSegmentAttrs (HPS hps, LONG lAttribute); +LONG GpiQuerySegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute); +LONG GpiQuerySegmentNames (HPS hps, LONG lFirstSegid, LONG lLastSegid, + LONG lMax, PLONG alSegids); +LONG GpiQuerySegmentPriority (HPS hps, LONG lRefSegid, LONG lOrder); +BOOL GpiRemoveDynamics (HPS hps, LONG lFirstSegid, LONG lLastSegid); +BOOL GpiSetInitialSegmentAttrs (HPS hps, LONG lAttribute, LONG lValue); +BOOL GpiSetSegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute, LONG lValue); +BOOL GpiSetSegmentPriority (HPS hps, LONG lSegid, LONG lRefSegid, LONG lOrder); + +#endif /* INCL_GPISEGMENTS */ + + +/* ---------------------- DEVICE CONTEXTS --------------------------------- */ + +#define DEV_ERROR 0 +#define DEV_OK 1 +#define DEV_BAD_PARAMETERS 2 +#define DEV_WARNING 3 +#define DEV_PROP_BUF_TOO_SMALL 4 +#define DEV_ITEM_BUF_TOO_SMALL 5 +#define DEV_INV_INP_JOBPROPERTIES 6 + +#define ADDRESS 0 +#define DRIVER_NAME 1 +#define DRIVER_DATA 2 +#define DATA_TYPE 3 +#define COMMENT 4 +#define PROC_NAME 5 +#define PROC_PARAMS 6 +#define SPL_PARAMS 7 +#define NETWORK_PARAMS 8 + +#define OD_SCREEN 0 +#define OD_QUEUED 2 +#define OD_DIRECT 5 +#define OD_INFO 6 +#define OD_METAFILE 7 +#define OD_MEMORY 8 +#define OD_METAFILE_NOQUERY 9 + +#define CAPS_FAMILY 0 +#define CAPS_IO_CAPS 1 +#define CAPS_TECHNOLOGY 2 +#define CAPS_DRIVER_VERSION 3 +#define CAPS_WIDTH 4 +#define CAPS_HEIGHT 5 +#define CAPS_WIDTH_IN_CHARS 6 +#define CAPS_HEIGHT_IN_CHARS 7 +#define CAPS_HORIZONTAL_RESOLUTION 8 +#define CAPS_VERTICAL_RESOLUTION 9 +#define CAPS_CHAR_WIDTH 10 +#define CAPS_CHAR_HEIGHT 11 +#define CAPS_SMALL_CHAR_WIDTH 12 +#define CAPS_SMALL_CHAR_HEIGHT 13 +#define CAPS_COLORS 14 +#define CAPS_COLOR_PLANES 15 +#define CAPS_COLOR_BITCOUNT 16 +#define CAPS_COLOR_TABLE_SUPPORT 17 +#define CAPS_MOUSE_BUTTONS 18 +#define CAPS_FOREGROUND_MIX_SUPPORT 19 +#define CAPS_BACKGROUND_MIX_SUPPORT 20 +#define CAPS_DEVICE_WINDOWING 31 +#define CAPS_ADDITIONAL_GRAPHICS 32 +#define CAPS_VIO_LOADABLE_FONTS 21 +#define CAPS_WINDOW_BYTE_ALIGNMENT 22 +#define CAPS_BITMAP_FORMATS 23 +#define CAPS_RASTER_CAPS 24 +#define CAPS_MARKER_HEIGHT 25 +#define CAPS_MARKER_WIDTH 26 +#define CAPS_DEVICE_FONTS 27 +#define CAPS_GRAPHICS_SUBSET 28 +#define CAPS_GRAPHICS_VERSION 29 +#define CAPS_GRAPHICS_VECTOR_SUBSET 30 +#define CAPS_PHYS_COLORS 33 +#define CAPS_COLOR_INDEX 34 +#define CAPS_GRAPHICS_CHAR_WIDTH 35 +#define CAPS_GRAPHICS_CHAR_HEIGHT 36 +#define CAPS_HORIZONTAL_FONT_RES 37 +#define CAPS_VERTICAL_FONT_RES 38 +#define CAPS_DEVICE_FONT_SIM 39 +#define CAPS_LINEWIDTH_THICK 40 +#define CAPS_DEVICE_POLYSET_POINTS 41 + +#define CAPS_IO_DUMMY 1 +#define CAPS_IO_SUPPORTS_OP 2 +#define CAPS_IO_SUPPORTS_IP 3 +#define CAPS_IO_SUPPORTS_IO 4 + +#define CAPS_TECH_UNKNOWN 0 +#define CAPS_TECH_VECTOR_PLOTTER 1 +#define CAPS_TECH_RASTER_DISPLAY 2 +#define CAPS_TECH_RASTER_PRINTER 3 +#define CAPS_TECH_RASTER_CAMERA 4 +#define CAPS_TECH_POSTSCRIPT 5 + +#define CAPS_COLTABL_RGB_8 0x0001 +#define CAPS_COLTABL_RGB_8_PLUS 0x0002 +#define CAPS_COLTABL_TRUE_MIX 0x0004 +#define CAPS_COLTABL_REALIZE 0x0008 + +#define CAPS_FM_OR 0x0001 +#define CAPS_FM_OVERPAINT 0x0002 +#define CAPS_FM_XOR 0x0008 +#define CAPS_FM_LEAVEALONE 0x0010 +#define CAPS_FM_AND 0x0020 +#define CAPS_FM_GENERAL_BOOLEAN 0x0040 + +#define CAPS_BM_OR 0x0001 +#define CAPS_BM_OVERPAINT 0x0002 +#define CAPS_BM_XOR 0x0008 +#define CAPS_BM_LEAVEALONE 0x0010 +#define CAPS_BM_AND 0x0020 +#define CAPS_BM_GENERAL_BOOLEAN 0x0040 +#define CAPS_BM_SRCTRANSPARENT 0x0080 +#define CAPS_BM_DESTTRANSPARENT 0x0100 + +#define CAPS_DEV_WINDOWING_SUPPORT 0x0001 + +#define CAPS_DEV_FONT_SIM_BOLD 0x0001 +#define CAPS_DEV_FONT_SIM_ITALIC 0x0002 +#define CAPS_DEV_FONT_SIM_UNDERSCORE 0x0004 +#define CAPS_DEV_FONT_SIM_STRIKEOUT 0x0008 + +#define CAPS_VDD_DDB_TRANSFER 0x0001 +#define CAPS_GRAPHICS_KERNING_SUPPORT 0x0002 +#define CAPS_FONT_OUTLINE_DEFAULT 0x0004 +#define CAPS_FONT_IMAGE_DEFAULT 0x0008 +#define CAPS_SCALED_DEFAULT_MARKERS 0x0040 +#define CAPS_COLOR_CURSOR_SUPPORT 0x0080 +#define CAPS_PALETTE_MANAGER 0x0100 +#define CAPS_COSMETIC_WIDELINE_SUPPORT 0x0200 +#define CAPS_DIRECT_FILL 0x0400 +#define CAPS_REBUILD_FILLS 0x0800 +#define CAPS_CLIP_FILLS 0x1000 +#define CAPS_ENHANCED_FONTMETRICS 0x2000 +#define CAPS_TRANSFORM_SUPPORT 0x4000 +#define CAPS_EXTERNAL_16_BITCOUNT 0x8000 + +#define CAPS_BYTE_ALIGN_REQUIRED 0 +#define CAPS_BYTE_ALIGN_RECOMMENDED 1 +#define CAPS_BYTE_ALIGN_NOT_REQUIRED 2 + +#define CAPS_RASTER_BITBLT 0x0001 +#define CAPS_RASTER_BANDING 0x0002 +#define CAPS_RASTER_BITBLT_SCALING 0x0004 +#define CAPS_RASTER_SET_PEL 0x0010 +#define CAPS_RASTER_FONTS 0x0020 +#define CAPS_RASTER_FLOOD_FILL 0x0040 + +#define DEVESC_ERROR (-1) +#define DEVESC_NOTIMPLEMENTED 0 + +#define DEVESC_QUERYESCSUPPORT 0 +#define DEVESC_GETSCALINGFACTOR 1 +#define DEVESC_QUERYVIOCELLSIZES 2 +#define DEVESC_GETCP 8000 +#define DEVESC_STARTDOC 8150 +#define DEVESC_ENDDOC 8151 +#define DEVESC_NEXTBAND 8152 +#define DEVESC_ABORTDOC 8153 +#define DEVESC_GETJOBID 8160 +#define DEVESC_QUERY_RASTER 8161 +#define DEVESC_QUERYSIZE 8162 +#define DEVESC_QUERYJOBPROPERTIES 8163 +#define DEVESC_SETJOBPROPERTIES 8164 +#define DEVESC_DEFAULTJOBPROPERTIES 8165 +#define DEVESC_CHANGEOUTPUTPORT 8166 +#define DEVESC_NEWFRAME 16300 +#define DEVESC_DRAFTMODE 16301 +#define DEVESC_FLUSHOUTPUT 16302 +#define DEVESC_RAWDATA 16303 +#define DEVESC_SETMODE 16304 +#define DEVESC_SEP 16305 +#define DEVESC_MACRO 16307 +#define DEVESC_BEGIN_BITBLT 16309 +#define DEVESC_END_BITBLT 16310 +#define DEVESC_SEND_COMPDATA 16311 +#define DEVESC_DBE_FIRST 24450 +#define DEVESC_DBE_LAST 24455 +#define DEVESC_CHAR_EXTRA 16998 +#define DEVESC_BREAK_EXTRA 16999 +#define DEVESC_STD_JOURNAL 32600 +#define DEVESC_STARTDOC_WPROP 49150 +#define DEVESC_NEWFRAME_WPROP 49151 + +#define DPDM_ERROR (-1) +#define DPDM_NONE 0 + +#define DPDM_POSTJOBPROP 0 +#define DPDM_CHANGEPROP 1 +#define DPDM_QUERYJOBPROP 2 + +#define DQHC_ERROR (-1) + +#define HCAPS_CURRENT 1 +#define HCAPS_SELECTABLE 2 + + +typedef PSZ *PDEVOPENDATA; + + +typedef struct _DRIVDATA +{ + LONG cb; + LONG lVersion; + CHAR szDeviceName[32]; + CHAR abGeneralData[1]; +} DRIVDATA; +typedef DRIVDATA *PDRIVDATA; + +typedef struct _DEVOPENSTRUC +{ + PSZ pszLogAddress; + PSZ pszDriverName; + PDRIVDATA pdriv; + PSZ pszDataType; + PSZ pszComment; + PSZ pszQueueProcName; + PSZ pszQueueProcParams; + PSZ pszSpoolerParams; + PSZ pszNetworkParams; +} DEVOPENSTRUC; +typedef DEVOPENSTRUC *PDEVOPENSTRUC; + +typedef struct _ESCMODE +{ + ULONG mode; + BYTE modedata[1]; +} ESCMODE; +typedef ESCMODE *PESCMODE; + +typedef struct _VIOSIZECOUNT +{ + LONG maxcount; + LONG count; +} VIOSIZECOUNT; +typedef VIOSIZECOUNT *PVIOSIZECOUNT; + +typedef struct _VIOFONTCELLSIZE +{ + LONG cx; + LONG cy; +} VIOFONTCELLSIZE; +typedef VIOFONTCELLSIZE *PVIOFONTCELLSIZE; + +typedef struct _SFACTORS +{ + LONG x; + LONG y; +} SFACTORS; +typedef SFACTORS *PSFACTORS; + +typedef struct _BANDRECT +{ + LONG xleft; + LONG ybottom; + LONG xright; + LONG ytop; +} BANDRECT; +typedef BANDRECT *PBANDRECT; + +typedef struct _HCINFO +{ + CHAR szFormname[32]; + LONG cx; + LONG cy; + LONG xLeftClip; + LONG yBottomClip; + LONG xRightClip; + LONG yTopClip; + LONG xPels; + LONG yPels; + LONG flAttributes; +} HCINFO; +typedef HCINFO *PHCINFO; + +HMF DevCloseDC (HDC hdc); +LONG DevEscape (HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData, + PLONG plOutCount, PBYTE pbOutData); +HDC DevOpenDC (HAB hab, LONG lType, PCSZ pszToken, LONG lCount, + PDEVOPENDATA pdopData, HDC hdcComp); +LONG DevPostDeviceModes (HAB hab, PDRIVDATA pdrivDriverData , + PCSZ pszDriverName, PCSZ pszDeviceName, PCSZ pszName, ULONG flOptions); +BOOL DevQueryCaps (HDC hdc, LONG lStart, LONG lCount, PLONG alArray); +BOOL DevQueryDeviceNames (HAB hab, PCSZ pszDriverName, PLONG pldn, + PSTR32 aDeviceName, PSTR64 aDeviceDesc, PLONG pldt, PSTR16 aDataType); +LONG DevQueryHardcopyCaps (HDC hdc, LONG lStartForm, LONG lForms, + PHCINFO phciHcInfo); + +/* ------------------ PRESENTATION MANAGER SHELL -------------------------- */ + +#define MAXNAMEL 60 + +#define HINI_PROFILE (HINI)0 +#define HINI_USERPROFILE (HINI)(-1) +#define HINI_SYSTEMPROFILE (HINI)(-2) +#define HINI_USER HINI_USERPROFILE +#define HINI_SYSTEM HINI_SYSTEMPROFILE + +typedef LHANDLE HSWITCH; +typedef HSWITCH *PHSWITCH; + +typedef LHANDLE HPROGRAM; +typedef HPROGRAM *PHPROGRAM; + +typedef LHANDLE HINI; +typedef HINI *PHINI; + +typedef LHANDLE HAPP; + + +typedef struct _PRFPROFILE +{ + ULONG cchUserName; + PSZ pszUserName; + ULONG cchSysName; + PSZ pszSysName; +} PRFPROFILE; +typedef PRFPROFILE *PPRFPROFILE; + + +#if defined (INCL_WINPROGRAMLIST) + +#define MAXPATHL 128 +#define SGH_ROOT (HPROGRAM)(-1L) + +#define PROG_DEFAULT 0 +#define PROG_FULLSCREEN 1 +#define PROG_WINDOWABLEVIO 2 +#define PROG_PM 3 +#define PROG_GROUP 5 +#define PROG_REAL 4 +#define PROG_VDM 4 +#define PROG_WINDOWEDVDM 7 +#define PROG_DLL 6 +#define PROG_PDD 8 +#define PROG_VDD 9 +#define PROG_WINDOW_REAL 10 +#define PROG_WINDOW_PROT 11 +#define PROG_WINDOW_AUTO 12 +#define PROG_SEAMLESSVDM 13 +#define PROG_SEAMLESSCOMMON 14 +#define PROG_30_STDSEAMLESSCOMMON 14 +#define PROG_31_STDSEAMLESSVDM 15 +#define PROG_31_STDSEAMLESSCOMMON 16 +#define PROG_31_ENHSEAMLESSVDM 17 +#define PROG_31_ENHSEAMLESSCOMMON 18 +#define PROG_31_ENH 19 +#define PROG_31_STD 20 +#define PROG_DOS_GAME 21 +#define PROG_WIN_GAME 22 +#define PROG_DOS_MODE 23 +#define PROG_RESERVED 255 + +#define SAF_VALIDFLAGS 0x001f + +#define SAF_INSTALLEDCMDLINE 0x0001 +#define SAF_STARTCHILDAPP 0x0002 +#define SAF_MAXIMIZED 0x0004 +#define SAF_MINIMIZED 0x0008 +#define SAF_BACKGROUND 0x0010 + +#define SHE_VISIBLE 0x00 +#define SHE_INVISIBLE 0x01 +#define SHE_RESERVED 0xff + +#define SHE_UNPROTECTED 0x00 +#define SHE_PROTECTED 0x02 + + +typedef ULONG PROGCATEGORY; +typedef PROGCATEGORY *PPROGCATEGORY; + +typedef struct _HPROGARRAY +{ + HPROGRAM ahprog[1]; +} HPROGARRAY; +typedef HPROGARRAY *PHPROGARRAY; + +typedef struct _PROGTYPE +{ + PROGCATEGORY progc; + ULONG fbVisible; +} PROGTYPE; +typedef PROGTYPE *PPROGTYPE; + +typedef struct _PROGTITLE +{ + HPROGRAM hprog; + PROGTYPE progt; + PSZ pszTitle; +} PROGTITLE; +typedef PROGTITLE *PPROGTITLE; + +typedef struct _PROGDETAILS +{ + ULONG Length; + PROGTYPE progt; + PSZ pszTitle; + PSZ pszExecutable; + PSZ pszParameters; + PSZ pszStartupDir; + PSZ pszIcon; + PSZ pszEnvironment; + SWP swpInitial; +} PROGDETAILS; +typedef PROGDETAILS *PPROGDETAILS; + + +HPROGRAM PrfAddProgram (HINI hini, PPROGDETAILS pDetails, HPROGRAM hprogGroup); +BOOL PrfChangeProgram (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails); +HPROGRAM PrfCreateGroup (HINI hini, PCSZ pszTitle, UCHAR chVisibility); +BOOL PrfDestroyGroup (HINI hini, HPROGRAM hprogGroup); +PROGCATEGORY PrfQueryProgramCategory (HINI hini, PCSZ pszExe); +ULONG PrfQueryProgramHandle (HINI hini, PCSZ pszExe, + PHPROGARRAY phprogArray, ULONG cchBufferMax, PULONG pulCount); +ULONG PrfQueryProgramTitles (HINI hini, HPROGRAM hprogGroup, + PPROGTITLE pTitles, ULONG ulBufferLength, PULONG pulCount); +ULONG PrfQueryDefinition (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails, + ULONG ulBufferLength); +BOOL PrfRemoveProgram (HINI hini, HPROGRAM hprog); + +HAPP WinStartApp (HWND hwndNotify, PPROGDETAILS pDetails, + PCSZ pszParams, PVOID Reserved, ULONG fbOptions); +BOOL WinTerminateApp (HAPP happ); + +#endif /* INCL_WINPROGRAMLIST */ + + +#if defined (INCL_WINSWITCHLIST) || !defined (INCL_NOCOMMON) + +#define SWL_INVISIBLE 0x01 +#define SWL_GRAYED 0x02 +#define SWL_VISIBLE 0x04 + +#define SWL_NOTJUMPABLE 0x01 +#define SWL_JUMPABLE 0x02 + +typedef struct _SWCNTRL +{ + HWND hwnd; + HWND hwndIcon; + HPROGRAM hprog; + PID idProcess; + ULONG idSession; + ULONG uchVisibility; + ULONG fbJump; + CHAR szSwtitle[MAXNAMEL+4]; + ULONG bProgType; +} SWCNTRL; +typedef SWCNTRL *PSWCNTRL; + +HSWITCH WinAddSwitchEntry (__const__ SWCNTRL *pswctl); +ULONG WinRemoveSwitchEntry (HSWITCH hsw); + +#endif /* INCL_WINSWITCHLIST || !INCL_NOCOMMON */ + +#if defined (INCL_WINSWITCHLIST) + +typedef struct _SWENTRY +{ + HSWITCH hswitch; + SWCNTRL swctl; +} SWENTRY; +typedef SWENTRY *PSWENTRY; + +typedef struct _SWBLOCK +{ + ULONG cswentry; + SWENTRY aswentry[1]; +} SWBLOCK; +typedef SWBLOCK *PSWBLOCK; + + +ULONG WinChangeSwitchEntry (HSWITCH hsw, __const__ SWCNTRL *pswctl); +HSWITCH WinCreateSwitchEntry (HAB hab, __const__ SWCNTRL *pswctl); +ULONG WinQuerySessionTitle (HAB hab, ULONG usSession, PSZ pszTitle, + ULONG usTitlelen); +ULONG WinQuerySwitchEntry (HSWITCH hsw, PSWCNTRL pswctl); +HSWITCH WinQuerySwitchHandle (HWND hwnd, PID pid); +ULONG WinQuerySwitchList (HAB hab, PSWBLOCK pswblk, ULONG usDataLength); +ULONG WinQueryTaskSizePos (HAB hab, ULONG usScreenGroup, PSWP pswp); +ULONG WinQueryTaskTitle (ULONG usSession, PSZ pszTitle, ULONG usTitlelen); +ULONG WinSwitchToProgram (HSWITCH hsw); + +#endif /* INCL_WINSWITCHLIST */ + + +#if defined (INCL_WINSHELLDATA) + +#define PL_ALTERED 0x008e + +BOOL PrfCloseProfile (HINI hini); +HINI PrfOpenProfile (HAB hab, PCSZ pszFileName); +BOOL PrfQueryProfile (HAB hab, PPRFPROFILE pPrfProfile); +BOOL PrfQueryProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey, PVOID pBuffer, + PULONG pulBufferLength); +LONG PrfQueryProfileInt (HINI hini, PCSZ pszApp, PCSZ pszKey, LONG sDefault); +BOOL PrfQueryProfileSize (HINI hini, PCSZ pszApp, PCSZ pszKey, + PULONG pulReqLen); +ULONG PrfQueryProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey, + PCSZ pszDefault, PVOID pBuffer, ULONG ulBufferLength); +BOOL PrfReset (HAB hab, __const__ PRFPROFILE *pPrfProfile); +BOOL PrfWriteProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey, + CPVOID pData, ULONG ulDataLength); +BOOL PrfWriteProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey, + PCSZ pszData); + +#endif /* INCL_WINSHELLDATA */ + +/* ------------------ STANDARD DIALOGS: FILE ------------------------------ */ + +#if defined (INCL_WINSTDFILE) + +#define FDM_FILTER (WM_USER+40) +#define FDM_VALIDATE (WM_USER+41) +#define FDM_ERROR (WM_USER+42) + +#define DID_FILE_DIALOG 256 +#define DID_FILENAME_TXT 257 +#define DID_FILENAME_ED 258 +#define DID_DRIVE_TXT 259 +#define DID_DRIVE_CB 260 +#define DID_FILTER_TXT 261 +#define DID_FILTER_CB 262 +#define DID_DIRECTORY_TXT 263 +#define DID_DIRECTORY_LB 264 +#define DID_FILES_TXT 265 +#define DID_FILES_LB 266 +#define DID_HELP_PB 267 +#define DID_APPLY_PB 268 +#define DID_READ_ONLY 269 +#define DID_DIRECTORY_SELECTED 270 +#define DID_OK_PB DID_OK +#define DID_CANCEL_PB DID_CANCEL + +#define FDS_CENTER 0x00000001 +#define FDS_CUSTOM 0x00000002 +#define FDS_FILTERUNION 0x00000004 +#define FDS_HELPBUTTON 0x00000008 +#define FDS_APPLYBUTTON 0x00000010 +#define FDS_PRELOAD_VOLINFO 0x00000020 +#define FDS_MODELESS 0x00000040 +#define FDS_INCLUDE_EAS 0x00000080 +#define FDS_OPEN_DIALOG 0x00000100 +#define FDS_SAVEAS_DIALOG 0x00000200 +#define FDS_MULTIPLESEL 0x00000400 +#define FDS_ENABLEFILELB 0x00000800 +#define FDS_NATIONAL_LANGUAGE 0x80000000 + +#define FDS_EFSELECTION 0 +#define FDS_LBSELECTION 1 + +#define FDS_SUCCESSFUL 0 +#define FDS_ERR_DEALLOCATE_MEMORY 1 +#define FDS_ERR_FILTER_TRUNC 2 +#define FDS_ERR_INVALID_DIALOG 3 +#define FDS_ERR_INVALID_DRIVE 4 +#define FDS_ERR_INVALID_FILTER 5 +#define FDS_ERR_INVALID_PATHFILE 6 +#define FDS_ERR_OUT_OF_MEMORY 7 +#define FDS_ERR_PATH_TOO_LONG 8 +#define FDS_ERR_TOO_MANY_FILE_TYPES 9 +#define FDS_ERR_INVALID_VERSION 10 +#define FDS_ERR_INVALID_CUSTOM_HANDLE 11 +#define FDS_ERR_DIALOG_LOAD_ERROR 12 +#define FDS_ERR_DRIVE_ERROR 13 + +#define IDS_FILE_ALL_FILES_SELECTOR 1000 +#define IDS_FILE_BACK_CUR_PATH 1001 +#define IDS_FILE_BACK_PREV_PATH 1002 +#define IDS_FILE_BACK_SLASH 1003 +#define IDS_FILE_BASE_FILTER 1004 +#define IDS_FILE_BLANK 1005 +#define IDS_FILE_COLON 1006 +#define IDS_FILE_DOT 1007 +#define IDS_FILE_DRIVE_LETTERS 1008 +#define IDS_FILE_FWD_CUR_PATH 1009 +#define IDS_FILE_FWD_PREV_PATH 1010 +#define IDS_FILE_FORWARD_SLASH 1011 +#define IDS_FILE_PARENT_DIR 1012 +#define IDS_FILE_Q_MARK 1013 +#define IDS_FILE_SPLAT 1014 +#define IDS_FILE_SPLAT_DOT 1015 +#define IDS_FILE_SAVEAS_TITLE 1016 +#define IDS_FILE_SAVEAS_FILTER_TXT 1017 +#define IDS_FILE_SAVEAS_FILENM_TXT 1018 +#define IDS_FILE_DUMMY_FILE_NAME 1019 +#define IDS_FILE_DUMMY_FILE_EXT 1020 +#define IDS_FILE_DUMMY_DRIVE 1021 +#define IDS_FILE_DUMMY_ROOT_DIR 1022 +#define IDS_FILE_PATH_PTR 1023 +#define IDS_FILE_VOLUME_PREFIX 1024 +#define IDS_FILE_VOLUME_SUFFIX 1025 +#define IDS_FILE_PATH_PTR2 1026 +#define IDS_FILE_INVALID_CHARS 1027 +#define IDS_FILE_ETC_BACK_SLASH 1028 +#define IDS_FILE_OPEN_PARENTHESIS 1029 +#define IDS_FILE_CLOSE_PARENTHESIS 1030 +#define IDS_FILE_SEMICOLON 1031 +#define IDS_FILE_BAD_DRIVE_NAME 1100 +#define IDS_FILE_BAD_DRIVE_OR_PATH_NAME 1101 +#define IDS_FILE_BAD_FILE_NAME 1102 +#define IDS_FILE_BAD_FQF 1103 +#define IDS_FILE_BAD_NETWORK_NAME 1104 +#define IDS_FILE_BAD_SUB_DIR_NAME 1105 +#define IDS_FILE_DRIVE_NOT_AVAILABLE 1106 +#define IDS_FILE_FQFNAME_TOO_LONG 1107 +#define IDS_FILE_OPEN_DIALOG_NOTE 1108 +#define IDS_FILE_PATH_TOO_LONG 1109 +#define IDS_FILE_SAVEAS_DIALOG_NOTE 1110 +#define IDS_FILE_DRIVE_DISK_CHANGE 1120 +#define IDS_FILE_DRIVE_NOT_READY 1122 +#define IDS_FILE_DRIVE_LOCKED 1123 +#define IDS_FILE_DRIVE_NO_SECTOR 1124 +#define IDS_FILE_DRIVE_SOME_ERROR 1125 +#define IDS_FILE_DRIVE_INVALID 1126 +#define IDS_FILE_INSERT_DISK_NOTE 1127 +#define IDS_FILE_OK_WHEN_READY 1128 + +typedef PSZ APSZ[1]; +typedef APSZ *PAPSZ; + +typedef struct _FILEDLG +{ + ULONG cbSize; + ULONG fl; + ULONG ulUser; + LONG lReturn; + LONG lSRC; + PSZ pszTitle; + PSZ pszOKButton; + PFNWP pfnDlgProc; + PSZ pszIType; + PAPSZ papszITypeList; + PSZ pszIDrive; + PAPSZ papszIDriveList; + HMODULE hMod; + CHAR szFullFile[CCHMAXPATH]; + PAPSZ papszFQFilename; + ULONG ulFQFCount; + USHORT usDlgId; + SHORT x; + SHORT y; + SHORT sEAType; +} FILEDLG; +typedef FILEDLG *PFILEDLG; + + +MRESULT WinDefFileDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +HWND WinFileDlg (HWND hwndP, HWND hwndO, PFILEDLG pfild); +BOOL WinFreeFileDlgList (PAPSZ papszFQFilename); + +#endif /* INCL_WINSTDFILE */ + +/* ------------------ STANDARD DIALOGS: FONT ------------------------------ */ + +#if defined (INCL_WINSTDFONT) + +#define FNTM_FACENAMECHANGED (WM_USER+50) +#define FNTM_POINTSIZECHANGED (WM_USER+51) +#define FNTM_STYLECHANGED (WM_USER+52) +#define FNTM_COLORCHANGED (WM_USER+53) +#define FNTM_UPDATEPREVIEW (WM_USER+54) +#define FNTM_FILTERLIST (WM_USER+55) + +#define FNTS_CENTER 0x00000001 +#define FNTS_CUSTOM 0x00000002 +#define FNTS_OWNERDRAWPREVIEW 0x00000004 +#define FNTS_HELPBUTTON 0x00000008 +#define FNTS_APPLYBUTTON 0x00000010 +#define FNTS_RESETBUTTON 0x00000020 +#define FNTS_MODELESS 0x00000040 +#define FNTS_INITFROMFATTRS 0x00000080 +#define FNTS_BITMAPONLY 0x00000100 +#define FNTS_VECTORONLY 0x00000200 +#define FNTS_FIXEDWIDTHONLY 0x00000400 +#define FNTS_PROPORTIONALONLY 0x00000800 +#define FNTS_NOSYNTHESIZEDFONTS 0x00001000 +#define FNTS_NATIONAL_LANGUAGE 0x80000000 + +#define FNTF_NOVIEWSCREENFONTS 0x0001 +#define FNTF_NOVIEWPRINTERFONTS 0x0002 +#define FNTF_SCREENFONTSELECTED 0x0004 +#define FNTF_PRINTERFONTSELECTED 0x0008 + +#define CLRC_FOREGROUND 1 +#define CLRC_BACKGROUND 2 + +#define FNTI_BITMAPFONT 0x0001 +#define FNTI_VECTORFONT 0x0002 +#define FNTI_FIXEDWIDTHFONT 0x0004 +#define FNTI_PROPORTIONALFONT 0x0008 +#define FNTI_SYNTHESIZED 0x0010 +#define FNTI_DEFAULTLIST 0x0020 +#define FNTI_FAMILYNAME 0x0100 +#define FNTI_STYLENAME 0x0200 +#define FNTI_POINTSIZE 0x0400 + +#define FNTS_SUCCESSFUL 0 +#define FNTS_ERR_INVALID_DIALOG 3 +#define FNTS_ERR_ALLOC_SHARED_MEM 4 +#define FNTS_ERR_INVALID_PARM 5 +#define FNTS_ERR_OUT_OF_MEMORY 7 +#define FNTS_ERR_INVALID_VERSION 10 +#define FNTS_ERR_DIALOG_LOAD_ERROR 12 + +#define DID_FONT_DIALOG 300 +#define DID_NAME 301 +#define DID_STYLE 302 +#define DID_DISPLAY_FILTER 303 +#define DID_PRINTER_FILTER 304 +#define DID_SIZE 305 +#define DID_SAMPLE 306 +#define DID_OUTLINE 307 +#define DID_UNDERSCORE 308 +#define DID_STRIKEOUT 309 +#define DID_HELP_BUTTON 310 +#define DID_APPLY_BUTTON 311 +#define DID_RESET_BUTTON 312 +#define DID_OK_BUTTON DID_OK +#define DID_CANCEL_BUTTON DID_CANCEL +#define DID_NAME_PREFIX 313 +#define DID_STYLE_PREFIX 314 +#define DID_SIZE_PREFIX 315 +#define DID_SAMPLE_GROUPBOX 316 +#define DID_EMPHASIS_GROUPBOX 317 +#define DID_FONT_ISO_SUPPORT 318 +#define DID_FONT_ISO_UNTESTED 319 + +#define IDS_FONT_SAMPLE 350 +#define IDS_FONT_BLANK 351 +#define IDS_FONT_KEY_0 352 +#define IDS_FONT_KEY_9 353 +#define IDS_FONT_KEY_SEP 354 +#define IDS_FONT_DISP_ONLY 355 +#define IDS_FONT_PRINTER_ONLY 356 +#define IDS_FONT_COMBINED 357 +#define IDS_FONT_WEIGHT1 358 +#define IDS_FONT_WEIGHT2 359 +#define IDS_FONT_WEIGHT3 360 +#define IDS_FONT_WEIGHT4 361 +#define IDS_FONT_WEIGHT5 362 +#define IDS_FONT_WEIGHT6 363 +#define IDS_FONT_WEIGHT7 364 +#define IDS_FONT_WEIGHT8 365 +#define IDS_FONT_WEIGHT9 366 +#define IDS_FONT_WIDTH1 367 +#define IDS_FONT_WIDTH2 368 +#define IDS_FONT_WIDTH3 369 +#define IDS_FONT_WIDTH4 370 +#define IDS_FONT_WIDTH5 371 +#define IDS_FONT_WIDTH6 372 +#define IDS_FONT_WIDTH7 373 +#define IDS_FONT_WIDTH8 374 +#define IDS_FONT_WIDTH9 375 +#define IDS_FONT_OPTION0 376 +#define IDS_FONT_OPTION1 377 +#define IDS_FONT_OPTION2 378 +#define IDS_FONT_OPTION3 379 +#define IDS_FONT_POINT_SIZE_LIST 380 + +typedef struct _FONTDLG +{ + ULONG cbSize; + HPS hpsScreen; + HPS hpsPrinter; + PSZ pszTitle; + PSZ pszPreview; + PSZ pszPtSizeList; + PFNWP pfnDlgProc; + PSZ pszFamilyname; + FIXED fxPointSize; + ULONG fl; + ULONG flFlags; + ULONG flType; + ULONG flTypeMask; + ULONG flStyle; + ULONG flStyleMask; + LONG clrFore; + LONG clrBack; + ULONG ulUser; + LONG lReturn; + LONG lSRC; + LONG lEmHeight; + LONG lXHeight; + LONG lExternalLeading; + HMODULE hMod; + FATTRS fAttrs; + SHORT sNominalPointSize; + USHORT usWeight; + USHORT usWidth; + SHORT x; + SHORT y; + USHORT usDlgId; + USHORT usFamilyBufLen; + USHORT usReserved; +} FONTDLG; +typedef FONTDLG *PFONTDLG; + +typedef struct _STYLECHANGE +{ + USHORT usWeight; + USHORT usWeightOld; + USHORT usWidth; + USHORT usWidthOld; + ULONG flType; + ULONG flTypeOld; + ULONG flTypeMask; + ULONG flTypeMaskOld; + ULONG flStyle; + ULONG flStyleOld; + ULONG flStyleMask; + ULONG flStyleMaskOld; +} STYLECHANGE; +typedef STYLECHANGE *PSTYLECHANGE; + +HWND WinFontDlg (HWND hwndP, HWND hwndO, PFONTDLG pfntd); +MRESULT WinDefFontDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); + +#endif /* INCL_WINSTDFONT */ + +/* -------------------------- SPIN BUTTON --------------------------------- */ + +#if defined (INCL_WINSTDSPIN) + +#define SPBS_ALLCHARACTERS 0x0000 +#define SPBS_NUMERICONLY 0x0001 +#define SPBS_READONLY 0x0002 +#define SPBS_SERVANT 0x0000 +#define SPBS_MASTER 0x0010 +#define SPBS_JUSTDEFAULT 0x0000 +#define SPBS_JUSTRIGHT 0x0004 +#define SPBS_JUSTLEFT 0x0008 +#define SPBS_JUSTCENTER 0x000c +#define SPBS_NOBORDER 0x0020 +#define SPBS_PADWITHZEROS 0x0080 +#define SPBS_FASTSPIN 0x0100 + +#define SPBM_OVERRIDESETLIMITS 0x0200 +#define SPBM_QUERYLIMITS 0x0201 +#define SPBM_SETTEXTLIMIT 0x0202 +#define SPBM_SPINUP 0x0203 +#define SPBM_SPINDOWN 0x0204 +#define SPBM_QUERYVALUE 0x0205 +#define SPBM_SETARRAY 0x0206 +#define SPBM_SETLIMITS 0x0207 +#define SPBM_SETCURRENTVALUE 0x0208 +#define SPBM_SETMASTER 0x0209 + +#define SPBN_UPARROW 0x020a +#define SPBN_DOWNARROW 0x020b +#define SPBN_ENDSPIN 0x020c +#define SPBN_CHANGE 0x020d +#define SPBN_SETFOCUS 0x020e +#define SPBN_KILLFOCUS 0x020f + +#define SPBQ_UPDATEIFVALID 0 +#define SPBQ_ALWAYSUPDATE 1 +#define SPBQ_DONOTUPDATE 3 + +#endif /* INCL_WINSTDSPIN */ + +/* ----------------------------- SLIDER ----------------------------------- */ + +#if defined (INCL_WINSTDSLIDER) + +#define SLM_ADDDETENT 0x0369 +#define SLM_QUERYDETENTPOS 0x036a +#define SLM_QUERYSCALETEXT 0x036b +#define SLM_QUERYSLIDERINFO 0x036c +#define SLM_QUERYTICKPOS 0x036d +#define SLM_QUERYTICKSIZE 0x036e +#define SLM_REMOVEDETENT 0x036f +#define SLM_SETSCALETEXT 0x0370 +#define SLM_SETSLIDERINFO 0x0371 +#define SLM_SETTICKSIZE 0x0372 + +#define SLN_CHANGE 1 +#define SLN_SLIDERTRACK 2 +#define SLN_SETFOCUS 3 +#define SLN_KILLFOCUS 4 + +#define SLS_HORIZONTAL 0x0000 +#define SLS_VERTICAL 0x0001 +#define SLS_CENTER 0x0000 +#define SLS_BOTTOM 0x0002 +#define SLS_TOP 0x0004 +#define SLS_LEFT 0x0002 +#define SLS_RIGHT 0x0004 +#define SLS_SNAPTOINCREMENT 0x0008 +#define SLS_BUTTONSBOTTOM 0x0010 +#define SLS_BUTTONSTOP 0x0020 +#define SLS_BUTTONSLEFT 0x0010 +#define SLS_BUTTONSRIGHT 0x0020 +#define SLS_OWNERDRAW 0x0040 +#define SLS_READONLY 0x0080 +#define SLS_RIBBONSTRIP 0x0100 +#define SLS_HOMEBOTTOM 0x0000 +#define SLS_HOMETOP 0x0200 +#define SLS_HOMELEFT 0x0000 +#define SLS_HOMERIGHT 0x0200 +#define SLS_PRIMARYSCALE1 0x0000 +#define SLS_PRIMARYSCALE2 0x0400 + +#define SMA_SCALE1 0x0001 +#define SMA_SCALE2 0x0002 +#define SMA_SHAFTDIMENSIONS 0x0000 +#define SMA_SHAFTPOSITION 0x0001 +#define SMA_SLIDERARMDIMENSIONS 0x0002 +#define SMA_SLIDERARMPOSITION 0x0003 +#define SMA_RANGEVALUE 0x0000 +#define SMA_INCREMENTVALUE 0x0001 +#define SMA_SETALLTICKS 0xffff + +#define SDA_RIBBONSTRIP 1 +#define SDA_SLIDERSHAFT 2 +#define SDA_BACKGROUND 3 +#define SDA_SLIDERARM 4 + +#define PMERR_UPDATE_IN_PROGRESS 0x1f06 +#define SLDERR_INVALID_PARAMETERS (-1) + + +typedef struct _SLDCDATA +{ + ULONG cbSize; + USHORT usScale1Increments; + USHORT usScale1Spacing; + USHORT usScale2Increments; + USHORT usScale2Spacing; +} SLDCDATA; +typedef SLDCDATA *PSLDCDATA; + +#endif /* INCL_WINSTDSLIDER */ + +/* ------------------------- CIRCULAR SLIDER ------------------------------ */ + +#if defined (INCL_WINCIRCULARSLIDER) + +#define CSM_QUERYRANGE 0x053d +#define CSM_SETRANGE 0x053e +#define CSM_QUERYVALUE 0x053f +#define CSM_SETVALUE 0x0540 +#define CSM_QUERYRADIUS 0x0541 +#define CSM_SETINCREMENT 0x0542 +#define CSM_QUERYINCREMENT 0x0543 +#define CSM_SETBITMAPDATA 0x0544 +#define CSN_SETFOCUS 0x0548 +#define CSN_CHANGED 0x0549 +#define CSN_TRACKING 0x054a +#define CSN_QUERYBACKGROUNDCOLOR 0x054b + +#define CSS_NOBUTTON 0x0001 +#define CSS_NOTEXT 0x0002 +#define CSS_NONUMBER 0x0004 +#define CSS_POINTSELECT 0x0008 +#define CSS_360 0x0010 +#define CSS_MIDPOINT 0x0020 +#define CSS_PROPORTIONALTICKS 0x0040 +#define CSS_NOTICKS 0x0080 +#define CSS_CIRCULARVALUE 0x0100 + +typedef struct _CSBITMAPDATA +{ + HBITMAP hbmLeftUp; + HBITMAP hbmLeftDown; + HBITMAP hbmRightUp; + HBITMAP hbmRightDown; +} CSBITMAPDATA; +typedef CSBITMAPDATA *PCSBITMAPDATA; + +#endif /* INCL_WINCIRCULARSLIDER */ + +/* ---------------------------- NOTEBOOK ---------------------------------- */ + +#if defined (INCL_WINSTDBOOK) + +#define BFA_PAGEDATA 0x0001 +#define BFA_PAGEFROMHWND 0x0002 +#define BFA_PAGEFROMDLGTEMPLATE 0x0004 +#define BFA_PAGEFROMDLGRES 0x0008 +#define BFA_STATUSLINE 0x0010 +#define BFA_MAJORTABBITMAP 0x0020 +#define BFA_MINORTABBITMAP 0x0040 +#define BFA_MAJORTABTEXT 0x0080 +#define BFA_MINORTABTEXT 0x0100 +#define BFA_BIDIINFO 0x0200 + +#define BKM_CALCPAGERECT 0x0353 +#define BKM_DELETEPAGE 0x0354 +#define BKM_INSERTPAGE 0x0355 +#define BKM_INVALIDATETABS 0x0356 +#define BKM_TURNTOPAGE 0x0357 +#define BKM_QUERYPAGECOUNT 0x0358 +#define BKM_QUERYPAGEID 0x0359 +#define BKM_QUERYPAGEDATA 0x035a +#define BKM_QUERYPAGEWINDOWHWND 0x035b +#define BKM_QUERYTABBITMAP 0x035c +#define BKM_QUERYTABTEXT 0x035d +#define BKM_SETDIMENSIONS 0x035e +#define BKM_SETPAGEDATA 0x035f +#define BKM_SETPAGEWINDOWHWND 0x0360 +#define BKM_SETSTATUSLINETEXT 0x0361 +#define BKM_SETTABBITMAP 0x0362 +#define BKM_SETTABTEXT 0x0363 +#define BKM_SETNOTEBOOKCOLORS 0x0364 +#define BKM_QUERYPAGESTYLE 0x0365 +#define BKM_QUERYSTATUSLINETEXT 0x0366 +#define BKM_SETPAGEINFO 0x0367 +#define BKM_QUERYPAGEINFO 0x0368 +#define BKM_SETTABCOLOR 0x0374 +#define BKM_SETNOTEBOOKBUTTONS 0x0375 + +#define BKN_PAGESELECTED 0x0082 +#define BKN_NEWPAGESIZE 0x0083 +#define BKN_HELP 0x0084 +#define BKN_PAGEDELETED 0x0085 +#define BKN_PAGESELECTEDPENDING 0x0086 + +#define BKA_ALL 0x0001 +#define BKA_SINGLE 0x0002 +#define BKA_TAB 0x0004 + +#define BKA_LAST 0x0002 +#define BKA_FIRST 0x0004 +#define BKA_NEXT 0x0008 +#define BKA_PREV 0x0010 +#define BKA_TOP 0x0020 + +#define BKA_MAJORTAB 0x0001 +#define BKA_MINORTAB 0x0002 +#define BKA_PAGEBUTTON 0x0100 + +#define BKA_STATUSTEXTON 0x0001 +#define BKA_MAJOR 0x0040 +#define BKA_MINOR 0x0080 +#define BKA_AUTOPAGESIZE 0x0100 +#define BKA_END 0x0200 + +#define BKA_TEXT 0x0400 +#define BKA_BITMAP 0x0800 + +#define BKA_AUTOCOLOR (-1) +#define BKA_MAXBUTTONID 7999 + +#define BKS_BACKPAGESBR 0x0001 +#define BKS_BACKPAGESBL 0x0002 +#define BKS_BACKPAGESTR 0x0004 +#define BKS_BACKPAGESTL 0x0008 + +#define BKS_MAJORTABRIGHT 0x0010 +#define BKS_MAJORTABLEFT 0x0020 +#define BKS_MAJORTABTOP 0x0040 +#define BKS_MAJORTABBOTTOM 0x0080 + +#define BKS_SQUARETABS 0x0000 +#define BKS_ROUNDEDTABS 0x0100 +#define BKS_POLYGONTABS 0x0200 + +#define BKS_SOLIDBIND 0x0000 +#define BKS_SPIRALBIND 0x0400 + +#define BKS_STATUSTEXTLEFT 0x0000 +#define BKS_STATUSTEXTRIGHT 0x1000 +#define BKS_STATUSTEXTCENTER 0x2000 + +#define BKS_TABTEXTLEFT 0x0000 +#define BKS_TABTEXTRIGHT 0x4000 +#define BKS_TABTEXTCENTER 0x8000 + +#define BKS_BUTTONAREA 0x0200 +#define BKS_TABBEDDIALOG 0x0800 + +#define BKA_BACKGROUNDPAGECOLORINDEX 0x0001 +#define BKA_BACKGROUNDPAGECOLOR 0x0002 +#define BKA_BACKGROUNDMAJORCOLORINDEX 0x0003 +#define BKA_BACKGROUNDMAJORCOLOR 0x0004 +#define BKA_BACKGROUNDMINORCOLORINDEX 0x0005 +#define BKA_BACKGROUNDMINORCOLOR 0x0006 +#define BKA_FOREGROUNDMAJORCOLORINDEX 0x0007 +#define BKA_FOREGROUNDMAJORCOLOR 0x0008 +#define BKA_FOREGROUNDMINORCOLORINDEX 0x0009 +#define BKA_FOREGROUNDMINORCOLOR 0x000a + +#define BOOKERR_INVALID_PARAMETERS (-1) + + +typedef struct _BOOKTEXT +{ + PSZ pString; + ULONG textLen; +} BOOKTEXT; +typedef BOOKTEXT *PBOOKTEXT; + +typedef struct _NOTEBOOKBUTTON +{ + PSZ pszText; + ULONG idButton; + LHANDLE hImage; + LONG flStyle; +} NOTEBOOKBUTTON; +typedef NOTEBOOKBUTTON *PNOTEBOOKBUTTON; + +typedef struct _DELETENOTIFY +{ + HWND hwndBook; + HWND hwndPage; + ULONG ulAppPageData; + HBITMAP hbmTab; +} DELETENOTIFY; +typedef DELETENOTIFY *PDELETENOTIFY; + +typedef struct _PAGESELECTNOTIFY +{ + HWND hwndBook; + ULONG ulPageIdCur; + ULONG ulPageIdNew; +} PAGESELECTNOTIFY; +typedef PAGESELECTNOTIFY *PPAGESELECTNOTIFY; + +typedef struct _BOOKPAGEINFO +{ + ULONG cb; + ULONG fl; + BOOL bLoadDlg; + ULONG ulPageData; + HWND hwndPage; + PFN pfnPageDlgProc; + ULONG idPageDlg; + HMODULE hmodPageDlg; + PVOID pPageDlgCreateParams; + PDLGTEMPLATE pdlgtPage; + ULONG cbStatusLine; + PSZ pszStatusLine; + HBITMAP hbmMajorTab; + HBITMAP hbmMinorTab; + ULONG cbMajorTab; + PSZ pszMajorTab; + ULONG cbMinorTab; + PSZ pszMinorTab; + PVOID pBidiInfo; +} BOOKPAGEINFO; +typedef BOOKPAGEINFO *PBOOKPAGEINFO; + +#endif /* INCL_WINSTDBOOK */ + +/* -------------------------- DRAG AND DROP ------------------------------- */ + +#if defined (INCL_WINSTDDRAG) + +#define PMERR_NOT_DRAGGING 0x1f00 +#define PMERR_ALREADY_DRAGGING 0x1f01 + +#define WM_DRAGFIRST 0x0310 +#define WM_DRAGLAST 0x032f + +#define DM_DROP 0x032f +#define DM_DRAGOVER 0x032e +#define DM_DRAGLEAVE 0x032d +#define DM_DROPHELP 0x032c +#define DM_ENDCONVERSATION 0x032b +#define DM_PRINT 0x032a +#define DM_RENDER 0x0329 +#define DM_RENDERCOMPLETE 0x0328 +#define DM_RENDERPREPARE 0x0327 +#define DM_DRAGFILECOMPLETE 0x0326 +#define DM_EMPHASIZETARGET 0x0325 +#define DM_DRAGERROR 0x0324 +#define DM_FILERENDERED 0x0323 +#define DM_RENDERFILE 0x0322 +#define DM_DRAGOVERNOTIFY 0x0321 +#define DM_PRINTOBJECT 0x0320 +#define DM_DISCARDOBJECT 0x031f +#define DM_DROPNOTIFY 0x031e + +#define MSGF_DRAG 0x0010 + +#define DC_OPEN 0x0001 +#define DC_REF 0x0002 +#define DC_GROUP 0x0004 +#define DC_CONTAINER 0x0008 +#define DC_PREPARE 0x0010 +#define DC_REMOVEABLEMEDIA 0x0020 + +#define DF_MOVE 0x0001 +#define DF_SOURCE 0x0002 +#define DF_SUCCESSFUL 0x0004 + +#define DFF_MOVE 1 +#define DFF_COPY 2 +#define DFF_DELETE 3 + +#define DGS_DRAGINPROGRESS 0x0001 +#define DGS_LAZYDRAGINPROGRESS 0x0002 + +#define DME_IGNOREABORT 1 +#define DME_IGNORECONTINUE 2 +#define DME_REPLACE 3 +#define DME_RETRY 4 + +#define DMFL_TARGETSUCCESSFUL 0x0001 +#define DMFL_TARGETFAIL 0x0002 +#define DMFL_NATIVERENDER 0x0004 +#define DMFL_RENDERRETRY 0x0008 +#define DMFL_RENDEROK 0x0010 +#define DMFL_RENDERFAIL 0x0020 + +#define DO_DEFAULT 0xbffe +#define DO_UNKNOWN 0xbfff +#define DO_COPYABLE 0x0001 +#define DO_MOVEABLE 0x0002 +#define DO_LINKABLE 0x0004 +#define DO_CREATEABLE 0x0008 +#define DO_CREATEPROGRAMOBJECTABLE 0x0010 + +#define DO_COPY 0x0010 +#define DO_MOVE 0x0020 +#define DO_LINK 0x0018 +#define DO_CREATE 0x0040 +#define DO_CREATEPROGRAMOBJECT 0x0080 + +#define DOR_NODROP 0x0000 +#define DOR_DROP 0x0001 +#define DOR_NODROPOP 0x0002 +#define DOR_NEVERDROP 0x0003 + +#define DRG_ICON 0x0001 +#define DRG_BITMAP 0x0002 +#define DRG_POLYGON 0x0004 +#define DRG_STRETCH 0x0008 +#define DRG_TRANSPARENT 0x0010 +#define DRG_CLOSED 0x0020 +#define DRG_MINIBITMAP 0x0040 + +#define DRR_SOURCE 1 +#define DRR_TARGET 2 +#define DRR_ABORT 3 + +#define DRT_ASM "Assembler Code" +#define DRT_BASIC "BASIC Code" +#define DRT_BINDATA "Binary Data" +#define DRT_BITMAP "Bitmap" +#define DRT_C "C Code" +#define DRT_COBOL "COBOL Code" +#define DRT_DLL "Dynamic Link Library" +#define DRT_DOSCMD "DOS Command File" +#define DRT_EXE "Executable" +#define DRT_FORTRAN "FORTRAN Code" +#define DRT_ICON "Icon" +#define DRT_LIB "Library" +#define DRT_METAFILE "Metafile" +#define DRT_OS2CMD "OS/2 Command File" +#define DRT_PASCAL "Pascal Code" +#define DRT_RESOURCE "Resource File" +#define DRT_TEXT "Plain Text" +#define DRT_UNKNOWN "Unknown" + +typedef LHANDLE HSTR; + +typedef struct _DRAGIMAGE +{ + USHORT cb; + USHORT cptl; + LHANDLE hImage; + SIZEL sizlStretch; + ULONG fl; + SHORT cxOffset; + SHORT cyOffset; +} DRAGIMAGE; +typedef DRAGIMAGE *PDRAGIMAGE; + +typedef struct _DRAGINFO +{ + ULONG cbDraginfo; + USHORT cbDragitem; + USHORT usOperation; + HWND hwndSource; + SHORT xDrop; + SHORT yDrop; + USHORT cditem; + USHORT usReserved; +} DRAGINFO; +typedef DRAGINFO *PDRAGINFO; + +typedef struct _DRAGITEM +{ + HWND hwndItem; + ULONG ulItemID; + HSTR hstrType; + HSTR hstrRMF; + HSTR hstrContainerName; + HSTR hstrSourceName; + HSTR hstrTargetName; + SHORT cxOffset; + SHORT cyOffset; + USHORT fsControl; + USHORT fsSupportedOps; +} DRAGITEM; +typedef DRAGITEM *PDRAGITEM; + +typedef struct _DRAGTRANSFER +{ + ULONG cb; + HWND hwndClient; + PDRAGITEM pditem; + HSTR hstrSelectedRMF; + HSTR hstrRenderToName; + ULONG ulTargetInfo; + USHORT usOperation; + USHORT fsReply; +} DRAGTRANSFER; +typedef DRAGTRANSFER *PDRAGTRANSFER; + +typedef struct _RENDERFILE +{ + HWND hwndDragFiles; + HSTR hstrSource; + HSTR hstrTarget; + USHORT fMove; + USHORT usRsvd; +} RENDERFILE; +typedef RENDERFILE *PRENDERFILE; + + +BOOL DrgAcceptDroppedFiles (HWND hwnd, PCSZ pszPath, PCSZ pszTypes, + ULONG ulDefaultOp, ULONG ulReserved); +BOOL DrgAccessDraginfo (PDRAGINFO pdinfo); +HSTR DrgAddStrHandle (PCSZ psz); +PDRAGINFO DrgAllocDraginfo (ULONG cDitem); +PDRAGTRANSFER DrgAllocDragtransfer (ULONG cdxfer); +BOOL DrgCancelLazyDrag (VOID); +BOOL DrgDeleteDraginfoStrHandles (PDRAGINFO pdinfo); +BOOL DrgDeleteStrHandle (HSTR hstr); +HWND DrgDrag (HWND hwndSource, PDRAGINFO pdinfo, PDRAGIMAGE pdimg, + ULONG cdimg, LONG vkTerminate, PVOID pReserved); +BOOL DrgDragFiles (HWND hwnd, PSZ *apszFiles, PSZ *apszTypes, PSZ *apszTargets, + ULONG cFiles, HPOINTER hptrDrag, ULONG vkTerm, BOOL fSourceRender, + ULONG ulReserved); +BOOL DrgFreeDraginfo (PDRAGINFO pdinfo); +BOOL DrgFreeDragtransfer (PDRAGTRANSFER pdxfer); +HPS DrgGetPS (HWND hwnd); +BOOL DrgLazyDrag (HWND hwndSource, PDRAGINFO pDraginfo, PDRAGIMAGE pdimg, + ULONG cdimg, PVOID pReserved); +BOOL DrgLazyDrop (HWND hwndTarget, ULONG ulOperation, PPOINTL pptlDrop); +BOOL DrgPostTransferMsg (HWND hwnd, ULONG msg, PDRAGTRANSFER pdxfer, ULONG fl, + ULONG ulReserved, BOOL fRetry); +BOOL DrgPushDraginfo (PDRAGINFO pdinfo, HWND hwndDest); +PDRAGINFO DrgQueryDraginfoPtr (PDRAGINFO pReserved); +PDRAGINFO DrgQueryDraginfoPtrFromHwnd (HWND hwndSource); +PDRAGINFO DrgQueryDraginfoPtrFromDragitem (__const__ DRAGITEM *pDragitem); +BOOL DrgQueryDragitem (PDRAGINFO pdinfo, ULONG cbBuffer, PDRAGITEM pditem, + ULONG iItem); +ULONG DrgQueryDragitemCount (PDRAGINFO pdinfo); +PDRAGITEM DrgQueryDragitemPtr (PDRAGINFO pdinfo, ULONG ulIndex); +ULONG DrgQueryDragStatus (VOID); +BOOL DrgQueryNativeRMF (PDRAGITEM pditem, ULONG cbBuffer, PCHAR pBuffer); +ULONG DrgQueryNativeRMFLen (PDRAGITEM pditem); +ULONG DrgQueryStrName (HSTR hstr, ULONG cbBuffer, PSZ pBuffer); +ULONG DrgQueryStrNameLen (HSTR hstr); +BOOL DrgQueryTrueType (PDRAGITEM pditem, ULONG cbBuffer, PSZ pBuffer); +ULONG DrgQueryTrueTypeLen (PDRAGITEM pditem); +PDRAGINFO DrgReallocDraginfo (PDRAGINFO pDraginfoOld, ULONG cditem); +BOOL DrgReleasePS (HPS hps); +MRESULT DrgSendTransferMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2); +BOOL DrgSetDragImage (PDRAGINFO pdinfo, PDRAGIMAGE pdimg, ULONG cdimg, + PVOID pReserved); +BOOL DrgSetDragitem (PDRAGINFO pdinfo, PDRAGITEM pditem, ULONG cbBuffer, + ULONG iItem); +BOOL DrgSetDragPointer (PDRAGINFO pdinfo, HPOINTER hptr); +BOOL DrgVerifyNativeRMF (PDRAGITEM pditem, PCSZ pszRMF); +BOOL DrgVerifyRMF (PDRAGITEM pditem, PCSZ pszMech, PCSZ pszFmt); +BOOL DrgVerifyTrueType (PDRAGITEM pditem, PCSZ pszType); +BOOL DrgVerifyType (PDRAGITEM pditem, PCSZ pszType); +BOOL DrgVerifyTypeSet (PDRAGITEM pditem, PCSZ pszType, ULONG cbMatch, + PSZ pszMatch); + +#endif /* INCL_WINSTDDRAG */ + +/* -------------------------- VALUE SET ----------------------------------- */ + +#if defined (INCL_WINSTDVALSET) + +#define VDA_ITEM 0x0001 +#define VDA_ITEMBACKGROUND 0x0002 +#define VDA_SURROUNDING 0x0003 +#define VDA_BACKGROUND 0x0004 + +#define VIA_BITMAP 0x0001 +#define VIA_ICON 0x0002 +#define VIA_TEXT 0x0004 +#define VIA_RGB 0x0008 +#define VIA_COLORINDEX 0x0010 +#define VIA_OWNERDRAW 0x0020 +#define VIA_DISABLED 0x0040 +#define VIA_DRAGGABLE 0x0080 +#define VIA_DROPONABLE 0x0100 + +#define VM_QUERYITEM 0x0375 +#define VM_QUERYITEMATTR 0x0376 +#define VM_QUERYMETRICS 0x0377 +#define VM_QUERYSELECTEDITEM 0x0378 +#define VM_SELECTITEM 0x0379 +#define VM_SETITEM 0x037a +#define VM_SETITEMATTR 0x037b +#define VM_SETMETRICS 0x037c + +#define VMA_ITEMSIZE 0x0001 +#define VMA_ITEMSPACING 0x0002 + +#define VN_SELECT 0x0078 +#define VN_ENTER 0x0079 +#define VN_DRAGLEAVE 0x007a +#define VN_DRAGOVER 0x007b +#define VN_DROP 0x007c +#define VN_DROPHELP 0x007d +#define VN_INITDRAG 0x007e +#define VN_SETFOCUS 0x007f +#define VN_KILLFOCUS 0x0080 +#define VN_HELP 0x0081 + +#define VS_BITMAP 0x0001 +#define VS_ICON 0x0002 +#define VS_TEXT 0x0004 +#define VS_RGB 0x0008 +#define VS_COLORINDEX 0x0010 +#define VS_BORDER 0x0020 +#define VS_ITEMBORDER 0x0040 +#define VS_SCALEBITMAPS 0x0080 +#define VS_RIGHTTOLEFT 0x0100 +#define VS_OWNERDRAW 0x0200 + +#define VSERR_INVALID_PARAMETERS (-1) + + +typedef struct _VSCDATA +{ + ULONG cbSize; + USHORT usRowCount; + USHORT usColumnCount; +} VSCDATA; +typedef VSCDATA *PVSCDATA; + +typedef struct _VSDRAGINIT +{ + HWND hwnd; + LONG x; + LONG y; + LONG cx; + LONG cy; + USHORT usRow; + USHORT usColumn; +} VSDRAGINIT; +typedef VSDRAGINIT *PVSDRAGINIT; + +typedef struct _VSDRAGINFO +{ + PDRAGINFO pDragInfo; + USHORT usRow; + USHORT usColumn; +} VSDRAGINFO; +typedef VSDRAGINFO *PVSDRAGINFO; + +typedef struct _VSTEXT +{ + PSZ pszItemText; + ULONG ulBufLen; +} VSTEXT; +typedef VSTEXT *PVSTEXT; + +#endif /* INCL_WINSTDVALSET */ + +/* ---------------------------- CONTAINER --------------------------------- */ + +#if defined (INCL_WINSTDCNR) + +#define CA_CONTAINERTITLE 0x00000200 +#define CA_TITLESEPARATOR 0x00000400 +#define CA_TITLELEFT 0x00000800 +#define CA_TITLERIGHT 0x00001000 +#define CA_TITLECENTER 0x00002000 +#define CA_OWNERDRAW 0x00004000 +#define CA_DETAILSVIEWTITLES 0x00008000 +#define CA_ORDEREDTARGETEMPH 0x00010000 +#define CA_DRAWBITMAP 0x00020000 +#define CA_DRAWICON 0x00040000 +#define CA_TITLEREADONLY 0x00080000 +#define CA_OWNERPAINTBACKGROUND 0x00100000 +#define CA_MIXEDTARGETEMPH 0x00200000 +#define CA_TREELINE 0x00400000 + +#define CCS_EXTENDSEL 0x0001 +#define CCS_MULTIPLESEL 0x0002 +#define CCS_SINGLESEL 0x0004 +#define CCS_AUTOPOSITION 0x0008 +#define CCS_VERIFYPOINTERS 0x0010 +#define CCS_READONLY 0x0020 +#define CCS_MINIRECORDCORE 0x0040 +#define CCS_MINIICONS 0x0800 +#define CCS_NOCONTROLPTR 0x1000 + +#define CFA_LEFT 0x00000001 +#define CFA_RIGHT 0x00000002 +#define CFA_CENTER 0x00000004 +#define CFA_TOP 0x00000008 +#define CFA_VCENTER 0x00000010 +#define CFA_BOTTOM 0x00000020 +#define CFA_INVISIBLE 0x00000040 +#define CFA_BITMAPORICON 0x00000100 +#define CFA_SEPARATOR 0x00000200 +#define CFA_HORZSEPARATOR 0x00000400 +#define CFA_STRING 0x00000800 +#define CFA_OWNER 0x00001000 +#define CFA_DATE 0x00002000 +#define CFA_TIME 0x00004000 +#define CFA_FIREADONLY 0x00008000 +#define CFA_FITITLEREADONLY 0x00010000 +#define CFA_ULONG 0x00020000 +#define CFA_RANGE 0x00040000 +#define CFA_NEWCOMP 0x00080000 +#define CFA_OBJECT 0x00100000 +#define CFA_LIST 0x00200000 +#define CFA_CLASS 0x00400000 +#define CFA_IGNORE 0x80000000 + +#define CID_LEFTCOLTITLEWND 0x7ff0 +#define CID_RIGHTCOLTITLEWND 0x7ff1 +#define CID_BLANKBOX 0x7ff2 +#define CID_HSCROLL 0x7ff3 +#define CID_RIGHTHSCROLL 0x7ff4 +#define CID_CNRTITLEWND 0x7ff5 +#define CID_LEFTDVWND 0x7ff7 +#define CID_RIGHTDVWND 0x7ff8 +#define CID_VSCROLL 0x7ff9 +#define CID_MLE 0x7ffa + +#define CM_ALLOCDETAILFIELDINFO 0x0330 +#define CM_ALLOCRECORD 0x0331 +#define CM_ARRANGE 0x0332 +#define CM_ERASERECORD 0x0333 +#define CM_FILTER 0x0334 +#define CM_FREEDETAILFIELDINFO 0x0335 +#define CM_FREERECORD 0x0336 +#define CM_HORZSCROLLSPLITWINDOW 0x0337 +#define CM_INSERTDETAILFIELDINFO 0x0338 +#define CM_INSERTRECORD 0x0339 +#define CM_INVALIDATEDETAILFIELDINFO 0x033a +#define CM_INVALIDATERECORD 0x033b +#define CM_PAINTBACKGROUND 0x033c +#define CM_QUERYCNRINFO 0x033d +#define CM_QUERYDETAILFIELDINFO 0x033e +#define CM_QUERYDRAGIMAGE 0x033f +#define CM_QUERYRECORD 0x0340 +#define CM_QUERYRECORDEMPHASIS 0x0341 +#define CM_QUERYRECORDFROMRECT 0x0342 +#define CM_QUERYRECORDRECT 0x0343 +#define CM_QUERYVIEWPORTRECT 0x0344 +#define CM_REMOVEDETAILFIELDINFO 0x0345 +#define CM_REMOVERECORD 0x0346 +#define CM_SCROLLWINDOW 0x0347 +#define CM_SEARCHSTRING 0x0348 +#define CM_SETCNRINFO 0x0349 +#define CM_SETRECORDEMPHASIS 0x034a +#define CM_SORTRECORD 0x034b +#define CM_OPENEDIT 0x034c +#define CM_CLOSEEDIT 0x034d +#define CM_COLLAPSETREE 0x034e +#define CM_EXPANDTREE 0x034f +#define CM_QUERYRECORDINFO 0x0350 +#define CM_INSERTRECORDARRAY 0x0351 +#define CM_MOVETREE 0x0352 +#define CM_SETTEXTVISIBILITY 0x0353 +#define CM_SETGRIDINFO 0x0354 +#define CM_QUERYGRIDINFO 0x0355 +#define CM_SNAPTOGRID 0x0356 + +#define CMA_TOP 0x0001 +#define CMA_BOTTOM 0x0002 +#define CMA_LEFT 0x0004 +#define CMA_RIGHT 0x0008 +#define CMA_PERIMETER 0x0010 +#define CMA_USER 0x0020 + +#define CMA_FIRST 0x0010 +#define CMA_LAST 0x0020 +#define CMA_END 0x0040 +#define CMA_PREV 0x0080 +#define CMA_NEXT 0x0100 + +#define CMA_HORIZONTAL 0x0200 +#define CMA_VERTICAL 0x0400 +#define CMA_ICON 0x0800 +#define CMA_TEXT 0x1000 +#define CMA_PARTIAL 0x2000 +#define CMA_COMPLETE 0x4000 + +#define CMA_PARENT 0x0001 +#define CMA_FIRSTCHILD 0x0002 +#define CMA_LASTCHILD 0x0004 + +#define CMA_CNRTITLE 0x0001 +#define CMA_DELTA 0x0002 +#define CMA_FLWINDOWATTR 0x0004 +#define CMA_LINESPACING 0x0008 +#define CMA_PFIELDINFOLAST 0x0010 + +#define CMA_PSORTRECORD 0x0020 +#define CMA_PTLORIGIN 0x0040 +#define CMA_SLBITMAPORICON 0x0080 +#define CMA_XVERTSPLITBAR 0x0100 +#define CMA_PFIELDINFOOBJECT 0x0200 + +#define CMA_TREEICON 0x0400 +#define CMA_TREEBITMAP 0x0800 +#define CMA_CXTREEINDENT 0x1000 +#define CMA_CXTREELINE 0x2000 +#define CMA_SLTREEBITMAPORICON 0x4000 + +#define CMA_ITEMORDER 0x0001 +#define CMA_WINDOW 0x0002 +#define CMA_WORKSPACE 0x0004 +#define CMA_ZORDER 0x0008 + +#define CMA_DELTATOP 0x0001 +#define CMA_DELTABOT 0x0002 +#define CMA_DELTAHOME 0x0004 +#define CMA_DELTAEND 0x0008 + +#define CMA_NOREPOSITION 0x0001 +#define CMA_REPOSITION 0x0002 +#define CMA_TEXTCHANGED 0x0004 +#define CMA_ERASE 0x0008 +#define CMA_NOTEXTCHANGED 0x0010 +#define CMA_FILTER 0x1000 + +#define CMA_FREE 0x0001 +#define CMA_INVALIDATE 0x0002 + +#define CMA_ARRANGESTANDARD 0x0000 +#define CMA_ARRANGEGRID 0x0001 +#define CMA_ARRANGESELECTED 0x0002 + +#define CMA_AVAIL 0x0001 +#define CMA_UNAVAIL 0x0002 + +#define CN_DRAGAFTER 0x0065 +#define CN_DRAGLEAVE 0x0066 +#define CN_DRAGOVER 0x0067 +#define CN_DROP 0x0068 +#define CN_DROPHELP 0x0069 +#define CN_ENTER 0x006a +#define CN_INITDRAG 0x006b +#define CN_EMPHASIS 0x006c +#define CN_KILLFOCUS 0x006d +#define CN_SCROLL 0x006e +#define CN_QUERYDELTA 0x006f +#define CN_SETFOCUS 0x0070 +#define CN_REALLOCPSZ 0x0071 +#define CN_BEGINEDIT 0x0072 +#define CN_ENDEDIT 0x0073 +#define CN_COLLAPSETREE 0x0074 +#define CN_EXPANDTREE 0x0075 +#define CN_HELP 0x0076 +#define CN_CONTEXTMENU 0x0077 +#define CN_VERIFYEDIT 0x0086 +#define CN_PICKUP 0x0087 +#define CN_DROPNOTIFY 0x0088 +#define CN_GRIDRESIZED 0x0089 + +#define CRA_SELECTED 0x00000001 +#define CRA_TARGET 0x00000002 +#define CRA_CURSORED 0x00000004 +#define CRA_INUSE 0x00000008 +#define CRA_FILTERED 0x00000010 +#define CRA_DROPONABLE 0x00000020 +#define CRA_RECORDREADONLY 0x00000040 +#define CRA_EXPANDED 0x00000080 +#define CRA_COLLAPSED 0x00000100 +#define CRA_PICKED 0x00000200 +#define CRA_LOCKED 0x00000400 +#define CRA_DISABLED 0x00001000 +#define CRA_SOURCE 0x00004000 +#define CRA_IGNORE 0x00008000 +#define CRA_OWNERFREE 0x00010000 +#define CRA_OWNERDRAW 0x00020000 + +#define CV_TEXT 0x00000001 +#define CV_NAME 0x00000002 +#define CV_ICON 0x00000004 +#define CV_DETAIL 0x00000008 +#define CV_FLOW 0x00000010 +#define CV_MINI 0x00000020 +#define CV_TREE 0x00000040 +#define CV_GRID 0x00000080 +#define CV_EXACTLENGTH 0x10000000 + +#define PMERR_NOFILTERED_ITEMS 0x1f02 +#define PMERR_COMPARISON_FAILED 0x1f03 +#define PMERR_RECORD_CURRENTLY_INSERTED 0x1f04 +#define PMERR_FI_CURRENTLY_INSERTED 0x1f05 + + +typedef struct _TREEITEMDESC +{ + HBITMAP hbmExpanded; + HBITMAP hbmCollapsed; + HPOINTER hptrExpanded; + HPOINTER hptrCollapsed; +} TREEITEMDESC; +typedef TREEITEMDESC *PTREEITEMDESC; + +typedef struct _FIELDINFO +{ + ULONG cb; + ULONG flData; + ULONG flTitle; + PVOID pTitleData; + ULONG offStruct; + PVOID pUserData; + struct _FIELDINFO *pNextFieldInfo; + ULONG cxWidth; +} FIELDINFO; +typedef FIELDINFO *PFIELDINFO; + +typedef struct _RECORDCORE +{ + ULONG cb; + ULONG flRecordAttr; + POINTL ptlIcon; + struct _RECORDCORE *preccNextRecord; + PSZ pszIcon; + HPOINTER hptrIcon; + HPOINTER hptrMiniIcon; + HBITMAP hbmBitmap; + HBITMAP hbmMiniBitmap; + PTREEITEMDESC pTreeItemDesc; + PSZ pszText; + PSZ pszName; + PSZ pszTree; +} RECORDCORE; +typedef RECORDCORE *PRECORDCORE; + +typedef struct _MINIRECORDCORE +{ + ULONG cb; + ULONG flRecordAttr; + POINTL ptlIcon; + struct _MINIRECORDCORE *preccNextRecord; + PSZ pszIcon; + HPOINTER hptrIcon; +} MINIRECORDCORE; +typedef MINIRECORDCORE *PMINIRECORDCORE; + +typedef struct _TREEMOVE +{ + PRECORDCORE preccMove; + PRECORDCORE preccNewParent; + PRECORDCORE pRecordOrder; + BOOL flMoveSiblings; +} TREEMOVE; +typedef TREEMOVE *PTREEMOVE; + +typedef struct _CNRINFO +{ + ULONG cb; + PVOID pSortRecord; + PFIELDINFO pFieldInfoLast; + PFIELDINFO pFieldInfoObject; + PSZ pszCnrTitle; + ULONG flWindowAttr; + POINTL ptlOrigin; + ULONG cDelta; + ULONG cRecords; + SIZEL slBitmapOrIcon; + SIZEL slTreeBitmapOrIcon; + HBITMAP hbmExpanded; + HBITMAP hbmCollapsed; + HPOINTER hptrExpanded; + HPOINTER hptrCollapsed; + LONG cyLineSpacing; + LONG cxTreeIndent; + LONG cxTreeLine; + ULONG cFields; + LONG xVertSplitbar; +} CNRINFO; +typedef CNRINFO *PCNRINFO; + +typedef struct _GRIDSQUARE +{ + ULONG ulNumber; + ULONG ulState; + RECTL rctlSquare; +} GRIDSQUARE; +typedef GRIDSQUARE *PGRIDSQUARE; + +typedef struct _GRIDINFO +{ + ULONG cb; + SHORT cxGrid; + SHORT cyGrid; + SHORT sGridRows; + SHORT sGridCols; + LONG cGridSquares; + PGRIDSQUARE pGrid; +} GRIDINFO; +typedef GRIDINFO *PGRIDINFO; + +typedef struct _CDATE +{ + UCHAR day; + UCHAR month; + USHORT year; +} CDATE; +typedef CDATE *PCDATE; + +typedef struct _CTIME +{ + UCHAR hours; + UCHAR minutes; + UCHAR seconds; + UCHAR ucReserved; +} CTIME; +typedef CTIME *PCTIME; + +typedef struct _CNRDRAGINIT +{ + HWND hwndCnr; + PRECORDCORE pRecord; + LONG x; + LONG y; + LONG cx; + LONG cy; +} CNRDRAGINIT; +typedef CNRDRAGINIT *PCNRDRAGINIT; + +typedef struct _FIELDINFOINSERT +{ + ULONG cb; + PFIELDINFO pFieldInfoOrder; + ULONG fInvalidateFieldInfo; + ULONG cFieldInfoInsert; +} FIELDINFOINSERT; +typedef FIELDINFOINSERT *PFIELDINFOINSERT; + +typedef struct _RECORDINSERT +{ + ULONG cb; + PRECORDCORE pRecordOrder; + PRECORDCORE pRecordParent; + ULONG fInvalidateRecord; + ULONG zOrder; + ULONG cRecordsInsert; +} RECORDINSERT; +typedef RECORDINSERT *PRECORDINSERT; + +typedef struct _QUERYRECFROMRECT +{ + ULONG cb; + RECTL rect; + ULONG fsSearch; +} QUERYRECFROMRECT; +typedef QUERYRECFROMRECT *PQUERYRECFROMRECT; + +typedef struct _QUERYRECORDRECT +{ + ULONG cb; + PRECORDCORE pRecord; + ULONG fRightSplitWindow; + ULONG fsExtent; +} QUERYRECORDRECT; +typedef QUERYRECORDRECT *PQUERYRECORDRECT; + +typedef struct _SEARCHSTRING +{ + ULONG cb; + PSZ pszSearch; + ULONG fsPrefix; + ULONG fsCaseSensitive; + ULONG usView; +} SEARCHSTRING; +typedef SEARCHSTRING *PSEARCHSTRING; + +typedef struct _CNRDRAGINFO +{ + PDRAGINFO pDragInfo; + PRECORDCORE pRecord; +} CNRDRAGINFO; +typedef CNRDRAGINFO *PCNRDRAGINFO; + +typedef struct _CNRLAZYDRAGINFO +{ + PDRAGINFO pDragInfo; + PRECORDCORE pRecord; + HWND hwndTarget; +} CNRLAZYDRAGINFO; +typedef CNRLAZYDRAGINFO *PCNRLAZYDRAGINFO; + +typedef struct _NOTIFYRECORDEMPHASIS +{ + HWND hwndCnr; + PRECORDCORE pRecord; + ULONG fEmphasisMask; +} NOTIFYRECORDEMPHASIS; +typedef NOTIFYRECORDEMPHASIS *PNOTIFYRECORDEMPHASIS; + +typedef struct _NOTIFYRECORDENTER +{ + HWND hwndCnr; + ULONG fKey; + PRECORDCORE pRecord; +} NOTIFYRECORDENTER; +typedef NOTIFYRECORDENTER *PNOTIFYRECORDENTER; + +typedef struct _NOTIFYDELTA +{ + HWND hwndCnr; + ULONG fDelta; +} NOTIFYDELTA; +typedef NOTIFYDELTA *PNOTIFYDELTA; + +typedef struct _NOTIFYSCROLL +{ + HWND hwndCnr; + LONG lScrollInc; + ULONG fScroll; +} NOTIFYSCROLL; +typedef NOTIFYSCROLL *PNOTIFYSCROLL; + +typedef struct _CNREDITDATA +{ + ULONG cb; + HWND hwndCnr; + PRECORDCORE pRecord; + PFIELDINFO pFieldInfo; + PSZ *ppszText; + ULONG cbText; + ULONG id; +} CNREDITDATA; +typedef CNREDITDATA *PCNREDITDATA; + +typedef struct _OWNERBACKGROUND +{ + HWND hwnd; + HPS hps; + RECTL rclBackground; + LONG idWindow; +} OWNERBACKGROUND; +typedef OWNERBACKGROUND *POWNERBACKGROUND; + +typedef struct _CNRDRAWITEMINFO +{ + PRECORDCORE pRecord; + PFIELDINFO pFieldInfo; +} CNRDRAWITEMINFO; +typedef CNRDRAWITEMINFO *PCNRDRAWITEMINFO; + +#endif /* INCL_WINSTDCNR */ + +/* ------------------------- WORKPLACE SHELL ------------------------------ */ + +#if defined (INCL_WPCLASS) || !defined (INCL_NOCOMMON) + +#define CCHMAXCLASS 3 + +#define QC_First 0 +#define QC_Next 1 +#define QC_Last 2 +#define QC_FIRST QC_First +#define QC_NEXT QC_Next +#define QC_LAST QC_Last + +#define CO_FAILIFEXISTS 0 +#define CO_REPLACEIFEXISTS 1 +#define CO_UPDATEIFEXISTS 2 + +#if !defined (LOCATION_DESKTOP) +#define LOCATION_DESKTOP ((PSZ)0xffff0001) +#endif + +typedef struct _OBJCLASS +{ + struct _OBJCLASS *pNext; + PSZ pszClassName; + PSZ pszModName; +} OBJCLASS; +typedef OBJCLASS *POBJCLASS; + +HOBJECT WinCopyObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest, + ULONG ulReserved); +HOBJECT WinCreateObject (PCSZ pszClassName, PCSZ pszTitle, PCSZ pszSetupString, + PCSZ pszLocation, ULONG ulFlags); +HOBJECT WinCreateShadow (HOBJECT hObjectofObject, HOBJECT hObjectofDest, + ULONG ulReserved); +BOOL WinDeregisterObjectClass (PCSZ pszClassName); +BOOL WinDestroyObject (HOBJECT hObject); +BOOL WinEnumObjectClasses (POBJCLASS pObjClass, PULONG pulSize); +BOOL WinIsSOMDDReady (VOID); +BOOL WinIsWPDServerReady (VOID); +HOBJECT WinMoveObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest, + ULONG ulReserved); +BOOL WinOpenObject (HOBJECT hObject, ULONG ulView, BOOL fFlag); +BOOL WinQueryActiveDesktopPathname (PSZ pszPathName, ULONG ulSize); +HOBJECT WinQueryObject (PCSZ pszObjectID); +BOOL WinQueryObjectPath (HOBJECT hobject, PSZ pszPathName, ULONG ulSize); +BOOL WinRegisterObjectClass (PCSZ pszClassName, PCSZ pszModName); +BOOL WinReplaceObjectClass (PCSZ pszOldClassName, PCSZ pszNewClassName, + BOOL fReplace); +ULONG WinRestartSOMDD (BOOL fState); +ULONG WinRestartWPDServer (BOOL fState); +BOOL WinSaveObject (HOBJECT hObject, BOOL fAsync); +BOOL WinSetObjectData (HOBJECT hObject, PCSZ pszSetupString); + +#endif /* INCL_WPCLASS || !INCL_NOCOMMON */ + +#if !defined (INCL_NOCOMMON) + +BOOL WinFreeFileIcon (HPOINTER hptr); +HPOINTER WinLoadFileIcon (PCSZ pszFileName, BOOL fPrivate); +BOOL WinRestoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd); +#if defined (INCL_WINPOINTERS) +BOOL WinSetFileIcon (PCSZ pszFileName, __const__ ICONINFO *pIconInfo); +#endif +BOOL WinShutdownSystem (HAB hab, HMQ hmq); +BOOL WinStoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd); + +#endif /* !INCL_NOCOMMON */ + +/* ---------------------------- SPOOLER ----------------------------------- */ + +#if defined (INCL_SPL) + +#define SPL_ERROR 0 +#define SPL_OK 1 + +#define SPL_INI_SPOOLER "PM_SPOOLER" +#define SPL_INI_QUEUE "PM_SPOOLER_QUEUE" +#define SPL_INI_PRINTER "PM_SPOOLER_PRINTER" +#define SPL_INI_PRINTERDESCR "PM_SPOOLER_PRINTER_DESCR" +#define SPL_INI_QUEUEDESCR "PM_SPOOLER_QUEUE_DESCR" +#define SPL_INI_QUEUEDD "PM_SPOOLER_QUEUE_DD" +#define SPL_INI_QUEUEDDDATA "PM_SPOOLER_QUEUE_DDDATA" + +#define SPLC_ABORT 1 +#define SPLC_PAUSE 2 +#define SPLC_CONTINUE 3 + +#define SPLDATA_PRINTERJAM 0x0001 +#define SPLDATA_FORMCHGREQD 0x0002 +#define SPLDATA_CARTCHGREQD 0x0004 +#define SPLDATA_PENCHGREQD 0x0008 +#define SPLDATA_DATAERROR 0x0010 +#define SPLDATA_UNEXPECTERROR 0x0020 +#define SPLDATA_OTHER 0x8000 + +#define SPLINFO_QPERROR 0x0001 +#define SPLINFO_DDERROR 0x0002 +#define SPLINFO_SPLERROR 0x0004 +#define SPLINFO_OTHERERROR 0x0080 +#define SPLINFO_INFORMATION 0x0100 +#define SPLINFO_WARNING 0x0200 +#define SPLINFO_ERROR 0x0400 +#define SPLINFO_SEVERE 0x0800 +#define SPLINFO_USERINTREQD 0x1000 + +#define SPLPORT_VERSION_REGULAR 0 +#define SPLPORT_VERSION_VIRTUAL 1 + +#define SSQL_ERROR (-1) + +#define QP_RAWDATA_BYPASS 0x0001 +#define QP_PRINT_SEPARATOR_PAGE 0x0002 + +#define QPDAT_ADDRESS 0 +#define QPDAT_DRIVER_NAME 1 +#define QPDAT_DRIVER_DATA 2 +#define QPDAT_DATA_TYPE 3 +#define QPDAT_COMMENT 4 +#define QPDAT_PROC_PARAMS 5 +#define QPDAT_SPL_PARAMS 6 +#define QPDAT_NET_PARAMS 7 +#define QPDAT_DOC_NAME 8 +#define QPDAT_QUEUE_NAME 9 +#define QPDAT_TOKEN 10 +#define QPDAT_JOBID 11 + +typedef LHANDLE HSPL; +typedef LHANDLE HSTD; +typedef HSTD *PHSTD; +typedef PSZ *PQMOPENDATA; +typedef unsigned long SPLERR; + +typedef struct _SQPOPENDATA +{ + PSZ pszLogAddress; + PSZ pszDriverName; + PDRIVDATA pdriv; + PSZ pszDataType; + PSZ pszComment; + PSZ pszProcParams; + PSZ pszSpoolParams; + PSZ pszNetworkParams; + PSZ pszDocName; + PSZ pszQueueName; + PSZ pszToken; + USHORT idJobId; +} SQPOPENDATA; +typedef SQPOPENDATA *PSQPOPENDATA; + + +BOOL SplStdClose (HDC hdc); +BOOL SplStdDelete (HSTD hMetaFile); +BOOL SplStdGetBits (HSTD hMetaFile, LONG offData, LONG cbData, PCH pchData); +BOOL SplStdOpen (HDC hdc); +LONG SplStdQueryLength (HSTD hMetaFile); +BOOL SplStdStart (HDC hdc); +HSTD SplStdStop (HDC hdc); + +SPLERR SplControlDevice (PSZ pszComputerName, PSZ pszPortName, + ULONG ulControl); +SPLERR SplCopyJob (PCSZ pszSrcComputerName, PCSZ pszSrcQueueName, + ULONG ulSrcJob, PCSZ pszTrgComputerName, PCSZ pszTrgQueueName, + PULONG pulTrgJob); +SPLERR SplCreateDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf); +SPLERR SplCreatePort (PCSZ pszComputerName, PCSZ pszPortName, + PCSZ pszPortDriver, ULONG ulVersion, PVOID pBuf, ULONG cbBuf); +SPLERR SplCreateQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf); +SPLERR SplDeleteDevice (PSZ pszComputerName, PSZ pszPrintDeviceName); +SPLERR SplDeleteJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob); +SPLERR SplDeletePort (PCSZ pszComputerName, PCSZ pszPortName); +SPLERR SplDeleteQueue (PSZ pszComputerName, PSZ pszQueueName); +SPLERR SplEnumDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded, + PVOID pReserved); +SPLERR SplEnumDriver (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded, + PVOID pReserved); +SPLERR SplEnumJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel, + PVOID pBuf, ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, + PULONG pcbNeeded, PVOID pReserved); +SPLERR SplEnumPort (PCSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded, + PVOID pReserved); +SPLERR SplEnumPrinter (PSZ pszComputerName, ULONG uLevel, ULONG flType, + PVOID pBuf, ULONG cbbuf, PULONG pcReturned, PULONG pcTotal, + PULONG pcbNeeded, PVOID pReserved); +SPLERR SplEnumQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded, + PVOID pReserved); +SPLERR SplEnumQueueProcessor (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf, + ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded, + PVOID pReserved); +SPLERR SplHoldJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob); +SPLERR SplHoldQueue (PSZ pszComputerName, PSZ pszQueueName); +SPLERR SplPurgeQueue (PSZ pszComputerName, PSZ pszQueueName); +SPLERR SplQueryDevice (PSZ pszComputerName, PSZ pszPrintDeviceName, + ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded); +SPLERR SplQueryDriver (PCSZ pszComputerName, PCSZ pszDriverName, + PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf, + PULONG pcbNeeded); +SPLERR SplQueryJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob, + ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded); +SPLERR SplQueryPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel, + PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded); +SPLERR SplQueryQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel, + PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded); +SPLERR SplReleaseJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob); +SPLERR SplReleaseQueue (PSZ pszComputerName, PSZ pszQueueName); +SPLERR SplSetDevice (PSZ pszComputerName, PSZ pszPrintDeviceName, + ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum); +SPLERR SplSetDriver (PCSZ pszComputerName, PCSZ pszDriverName, + PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf, + ULONG ulParmNum); +SPLERR SplSetJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob, + ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum); +SPLERR SplSetPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel, + PVOID pBuf, ULONG cbBuf, ULONG ulParmNum); +SPLERR SplSetQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel, + PVOID pBuf, ULONG cbBuf, ULONG ulParmNum); + +ULONG SplMessageBox (PSZ pszLogAddr, ULONG fErrInfo, ULONG fErrData, + PSZ pszText, PSZ pszCaption, ULONG idWindow, ULONG fStyle); +BOOL SplQmAbort (HSPL hspl); +BOOL SplQmAbortDoc (HSPL hspl); +BOOL SplQmClose (HSPL hspl); +BOOL SplQmEndDoc (HSPL hspl); +ULONG SplQmGetJobID (HSPL hspl, ULONG ulLevel, PVOID pBuf, ULONG cbBuf, + PULONG pcbNeeded); +BOOL SplQmNewPage (HSPL hspl, ULONG ulPageNumber); +HSPL SplQmOpen (PSZ pszToken, LONG lCount, PQMOPENDATA pqmdopData); +BOOL SplQmStartDoc (HSPL hspl, PSZ pszDocName); +BOOL SplQmWrite (HSPL hspl, LONG lCount, PVOID pData); + +#if defined (INCL_SPLDOSPRINT) + +#define CNLEN 15 +#define DTLEN 9 +#define PDLEN 8 +#define QNLEN 12 +#define UNLEN 20 + +#define DRIV_DEVICENAME_SIZE 31 +#define DRIV_NAME_SIZE 8 +#define FORMNAME_SIZE 31 +#define MAXCOMMENTSZ 48 +#define PRINTERNAME_SIZE 32 +#define QP_DATATYPE_SIZE 15 + +#define PRD_STATUS_MASK 0x0003 +#define PRD_DEVSTATUS 0x0ffc + +#define PRD_ACTIVE 0 +#define PRD_PAUSED 1 + +#define PRD_DELETE 0 +#define PRD_PAUSE 1 +#define PRD_CONT 2 +#define PRD_RESTART 3 + +#define PRD_LOGADDR_PARMNUM 3 +#define PRD_COMMENT_PARMNUM 7 +#define PRD_DRIVERS_PARMNUM 8 +#define PRD_TIMEOUT_PARMNUM 10 + +#define PRJ_NOTIFYNAME_PARMNUM 3 +#define PRJ_DATATYPE_PARMNUM 4 +#define PRJ_PARMS_PARMNUM 5 +#define PRJ_POSITION_PARMNUM 6 +#define PRJ_JOBFILEINUSE_PARMNUM 7 +#define PRJ_COMMENT_PARMNUM 11 +#define PRJ_DOCUMENT_PARMNUM 12 +#define PRJ_STATUSCOMMENT_PARMNUM 13 +#define PRJ_PRIORITY_PARMNUM 14 +#define PRJ_PROCPARMS_PARMNUM 16 +#define PRJ_DRIVERDATA_PARMNUM 18 +#define PRJ_SPOOLFILENAME_PARMNUM 19 +#define PRJ_PAGESSPOOLED_PARMNUM 20 +#define PRJ_PAGESSENT_PARMNUM 21 +#define PRJ_PAGESPRINTED_PARMNUM 22 +#define PRJ_TIMEPRINTED_PARMNUM 23 +#define PRJ_EXTENDSTATUS_PARMNUM 24 +#define PRJ_STARTPAGE_PARMNUM 25 +#define PRJ_ENDPAGE_PARMNUM 26 +#define PRJ_MAXPARMNUM 26 + +#define PRJ_QSTATUS 0x0003 +#define PRJ_DEVSTATUS 0x0ffc + +#define PRJ_COMPLETE 0x0004 +#define PRJ_INTERV 0x0008 +#define PRJ_ERROR 0x0010 +#define PRJ_DESTOFFLINE 0x0020 +#define PRJ_DESTPAUSED 0x0040 +#define PRJ_NOTIFY 0x0080 +#define PRJ_DESTNOPAPER 0x0100 +#define PRJ_DESTFORMCHG 0x0200 +#define PRJ_DESTCRTCHG 0x0400 +#define PRJ_DESTPENCHG 0x0800 +#define PRJ_JOBFILEINUSE 0x4000 +#define PRJ_DELETED 0x8000 + +#define PRJ_QS_QUEUED 0 +#define PRJ_QS_PAUSED 1 +#define PRJ_QS_SPOOLING 2 +#define PRJ_QS_PRINTING 3 + +#define PRJ_MAX_PRIORITY 99 +#define PRJ_MIN_PRIORITY 1 +#define PRJ_NO_PRIORITY 0 + +#define PRJ4_INPRINTER 0x0001 +#define PRJ4_STACKED 0x0002 +#define PRJ4_HELDINPRINTER 0x0004 +#define PRJ4_JOBSTARTED 0x0008 + +#define PRPO_PORT_DRIVER 1 +#define PRPO_PROTOCOL_CNV 2 +#define PRPO_MODE 3 +#define PRPO_PRIORITY 4 + +#define PRPORT_AUTODETECT 1 +#define PRPORT_DISABLE_BIDI 2 +#define PRPORT_ENABLE_BIDI 3 + +#define PRQ_PRIORITY_PARMNUM 2 +#define PRQ_STARTTIME_PARMNUM 3 +#define PRQ_UNTILTIME_PARMNUM 4 +#define PRQ_SEPARATOR_PARMNUM 5 +#define PRQ_PROCESSOR_PARMNUM 6 +#define PRQ_DESTINATIONS_PARMNUM 7 +#define PRQ_PARMS_PARMNUM 8 +#define PRQ_COMMENT_PARMNUM 9 +#define PRQ_TYPE_PARMNUM 10 +#define PRQ_PRINTERS_PARMNUM 12 +#define PRQ_DRIVERNAME_PARMNUM 13 +#define PRQ_DRIVERDATA_PARMNUM 14 +#define PRQ_REMOTE_COMPUTER_PARMNUM 15 +#define PRQ_REMOTE_QUEUE_PARMNUM 16 +#define PRQ_MAXPARMNUM 16 + +#define PRQ_MAX_PRIORITY 1 +#define PRQ_DEF_PRIORITY 5 +#define PRQ_MIN_PRIORITY 9 +#define PRQ_NO_PRIORITY 0 + +#define PRQ_STATUS_MASK 3 +#define PRQ_ACTIVE 0 +#define PRQ_PAUSED 1 +#define PRQ_ERROR 2 +#define PRQ_PENDING 3 + +#define PRQ3_PAUSED 0x0001 +#define PRQ3_PENDING 0x0002 + +#define PRQ3_TYPE_RAW 0x0001 +#define PRQ3_TYPE_BYPASS 0x0002 +#define PRQ3_TYPE_APPDEFAULT 0x0004 + +#define SPL_PR_QUEUE 0x0001 +#define SPL_PR_DIRECT_DEVICE 0x0002 +#define SPL_PR_QUEUED_DEVICE 0x0004 +#define SPL_PR_LOCAL_ONLY 0x0100 + +typedef struct _DRIVPROPS +{ + PSZ pszKeyName; + ULONG cbBuf; + PVOID pBuf; +} DRIVPROPS; +typedef DRIVPROPS *PDRIVPROPS; + +typedef struct _PRINTERINFO +{ + ULONG flType; + PSZ pszComputerName; + PSZ pszPrintDestinationName; + PSZ pszDescription; + PSZ pszLocalName; +} PRINTERINFO; +typedef PRINTERINFO *PPRINTERINFO; + +typedef struct _PRJINFO +{ + USHORT uJobId; + CHAR szUserName[UNLEN+1]; + CHAR pad_1; + CHAR szNotifyName[CNLEN+1]; + CHAR szDataType[DTLEN+1]; + PSZ pszParms; + USHORT uPosition; + USHORT fsStatus; + PSZ pszStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; +} PRJINFO; +typedef PRJINFO *PPRJINFO; + +typedef struct _PRJINFO2 +{ + USHORT uJobId; + USHORT uPriority; + PSZ pszUserName; + USHORT uPosition; + USHORT fsStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; + PSZ pszDocument; +} PRJINFO2; +typedef PRJINFO2 *PPRJINFO2; + +typedef struct _PRJINFO3 +{ + USHORT uJobId; + USHORT uPriority; + PSZ pszUserName; + USHORT uPosition; + USHORT fsStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; + PSZ pszDocument; + PSZ pszNotifyName; + PSZ pszDataType; + PSZ pszParms; + PSZ pszStatus; + PSZ pszQueue; + PSZ pszQProcName; + PSZ pszQProcParms; + PSZ pszDriverName; + PDRIVDATA pDriverData; + PSZ pszPrinterName; +} PRJINFO3; +typedef PRJINFO3 *PPRJINFO3; + +typedef struct _PRJINFO4 +{ + USHORT uJobId; + USHORT uPriority; + PSZ pszUserName; + USHORT uPosition; + USHORT fsStatus; + ULONG ulSubmitted; + ULONG ulSize; + PSZ pszComment; + PSZ pszDocument; + PSZ pszSpoolFileName; + PSZ pszPortName; + PSZ pszStatus; + ULONG ulPagesSpooled; + ULONG ulPagesSent; + ULONG ulPagesPrinted; + ULONG ulTimePrinted; + ULONG ulExtendJobStatus; + ULONG ulStartPage; + ULONG ulEndPage; +} PRJINFO4; +typedef PRJINFO4 *PPRJINFO4; + +typedef struct _PRDINFO +{ + CHAR szName[PDLEN+1]; + CHAR szUserName[UNLEN+1]; + USHORT uJobId; + USHORT fsStatus; + PSZ pszStatus; + USHORT time; +} PRDINFO; +typedef PRDINFO *PPRDINFO; + +typedef struct _PRDINFO3 +{ + PSZ pszPrinterName; + PSZ pszUserName; + PSZ pszLogAddr; + USHORT uJobId; + USHORT fsStatus; + PSZ pszStatus; + PSZ pszComment; + PSZ pszDrivers; + USHORT time; + USHORT usTimeOut; +} PRDINFO3; +typedef PRDINFO3 *PPRDINFO3; + +typedef struct _PRQINFO +{ + CHAR szName[QNLEN+1]; + CHAR pad_1; + USHORT uPriority; + USHORT uStartTime; + USHORT uUntilTime; + PSZ pszSepFile; + PSZ pszPrProc; + PSZ pszDestinations; + PSZ pszParms; + PSZ pszComment; + USHORT fsStatus; + USHORT cJobs; +} PRQINFO; +typedef PRQINFO *PPRQINFO; + +typedef struct _PRQINFO3 +{ + PSZ pszName; + USHORT uPriority; + USHORT uStartTime; + USHORT uUntilTime; + USHORT fsType; + PSZ pszSepFile; + PSZ pszPrProc; + PSZ pszParms; + PSZ pszComment; + USHORT fsStatus; + USHORT cJobs; + PSZ pszPrinters; + PSZ pszDriverName; + PDRIVDATA pDriverData; +} PRQINFO3; +typedef PRQINFO3 *PPRQINFO3; + +typedef struct _PRQINFO6 +{ + PSZ pszName; + USHORT uPriority; + USHORT uStartTime; + USHORT uUntilTime; + USHORT fsType; + PSZ pszSepFile; + PSZ pszPrProc; + PSZ pszParms; + PSZ pszComment; + USHORT fsStatus; + USHORT cJobs; + PSZ pszPrinters; + PSZ pszDriverName; + PDRIVDATA pDriverData; + PSZ pszRemoteComputerName; + PSZ pszRemoteQueueName; +} PRQINFO6; +typedef PRQINFO6 *PPRQINFO6; + +typedef struct _PRIDINFO +{ + USHORT uJobId; + CHAR szComputerName[CNLEN+1]; + CHAR szQueueName[QNLEN+1]; + CHAR pad_1; +} PRIDINFO; +typedef PRIDINFO *PPRIDINFO; + +typedef struct _PRDRIVINFO +{ + CHAR szDrivName[DRIV_NAME_SIZE+1+DRIV_DEVICENAME_SIZE+1]; +} PRDRIVINFO; +typedef PRDRIVINFO *PPRDRIVINFO; + +typedef struct _PRDRIVINFO2 +{ + PSZ pszPrinterName; + PSZ pszDriverName; + USHORT usFlags; + USHORT cDriverProps; +} PRDRIVINFO2; +typedef PRDRIVINFO2 *PPRDRIVINFO2; + +typedef struct _PRQPROCINFO +{ + CHAR szQProcName[QNLEN+1]; +} PRQPROCINFO; +typedef PRQPROCINFO *PPRQPROCINFO; + +typedef struct _PRPORTINFO +{ + CHAR szPortName[PDLEN+1]; +} PRPORTINFO; +typedef PRPORTINFO *PPRPORTINFO; + +typedef struct _PRPORTINFO1 +{ + PSZ pszPortName; + PSZ pszPortDriverName; + PSZ pszPortDriverPathName; +} PRPORTINFO1; +typedef PRPORTINFO1 *PPRPORTINFO1; + +typedef struct _PRPORTINFO2 +{ + PSZ pszPortName; + PSZ pszPortDriver; + PSZ pszProtocolConverter; + ULONG ulReserved; + ULONG ulMode; + ULONG ulPriority; +} PRPORTINFO2; +typedef PRPORTINFO2 *PPRPORTINFO2; + +typedef struct _QMJOBINFO +{ + ULONG ulJobID; + PSZ pszComputerName; + PSZ pszQueueName; +} QMJOBINFO; +typedef QMJOBINFO *PQMJOBINFO; + +#endif /* INCL_SPLDOSPRINT */ +#endif /* INCL_SPL */ + +/* -------------------------- HELP MANAGER -------------------------------- */ + +#if defined (INCL_WINHELP) + +#define CMIC_HIDE_PANEL_ID 0x0000 +#define CMIC_SHOW_PANEL_ID 0x0001 +#define CMIC_TOGGLE_PANEL_ID 0x0002 + +#define CTRL_PREVIOUS_ID ((USHORT)0x0001) +#define CTRL_SEARCH_ID ((USHORT)0x0002) +#define CTRL_PRINT_ID ((USHORT)0x0003) +#define CTRL_INDEX_ID ((USHORT)0x0004) +#define CTRL_CONTENTS_ID ((USHORT)0x0005) +#define CTRL_BACK_ID ((USHORT)0x0006) +#define CTRL_FORWARD_ID ((USHORT)0x0007) +#define CTRL_TUTORIAL_ID ((USHORT)0x00ff) +#define CTRL_USER_ID_BASE ((USHORT)0x0101) + +#define HM_MSG_BASE 0x0220 +#define HM_DISMISS_WINDOW 0x0221 +#define HM_DISPLAY_HELP 0x0222 +#define HM_EXT_HELP 0x0223 +#define HM_GENERAL_HELP 0x0223 /*!*/ +#define HM_SET_ACTIVE_WINDOW 0x0224 +#define HM_LOAD_HELP_TABLE 0x0225 +#define HM_CREATE_HELP_TABLE 0x0226 +#define HM_SET_HELP_WINDOW_TITLE 0x0227 +#define HM_SET_SHOW_PANEL_ID 0x0228 +#define HM_REPLACE_HELP_FOR_HELP 0x0229 +#define HM_REPLACE_USING_HELP 0x0229 /*!*/ +#define HM_HELP_INDEX 0x022a +#define HM_HELP_CONTENTS 0x022b +#define HM_KEYS_HELP 0x022c +#define HM_SET_HELP_LIBRARY_NAME 0x022d +#define HM_ERROR 0x022e +#define HM_HELPSUBITEM_NOT_FOUND 0x022f +#define HM_QUERY_KEYS_HELP 0x0230 +#define HM_TUTORIAL 0x0231 +#define HM_EXT_HELP_UNDEFINED 0x0232 +#define HM_GENERAL_HELP_UNDEFINED 0x0232 /*!*/ +#define HM_ACTIONBAR_COMMAND 0x0233 +#define HM_INFORM 0x0234 +#define HM_SET_OBJCOM_WINDOW 0x0238 +#define HM_UPDATE_OBJCOM_WINDOW_CHAIN 0x0239 +#define HM_QUERY_DDF_DATA 0x023a +#define HM_INVALIDATE_DDF_DATA 0x023b +#define HM_QUERY 0x023c +#define HM_SET_COVERPAGE_SIZE 0x023d +#define HM_NOTIFY 0x0242 +#define HM_SET_USERDATA 0x0243 +#define HM_CONTROL 0x0244 + +#define HM_RESOURCEID 0 +#define HM_PANELNAME 1 + +#define HMERR_NO_FRAME_WND_IN_CHAIN 0x1001 +#define HMERR_INVALID_ASSOC_APP_WND 0x1002 +#define HMERR_INVALID_ASSOC_HELP_INST 0x1003 +#define HMERR_INVALID_DESTROY_HELP_INST 0x1004 +#define HMERR_NO_HELP_INST_IN_CHAIN 0x1005 +#define HMERR_INVALID_HELP_INSTANCE_HDL 0x1006 +#define HMERR_INVALID_QUERY_APP_WND 0x1007 +#define HMERR_HELP_INST_CALLED_INVALID 0x1008 +#define HMERR_HELPTABLE_UNDEFINE 0x1009 +#define HMERR_HELP_INSTANCE_UNDEFINE 0x100a +#define HMERR_HELPITEM_NOT_FOUND 0x100b +#define HMERR_INVALID_HELPSUBITEM_SIZE 0x100c +#define HMERR_HELPSUBITEM_NOT_FOUND 0x100d + +#define HMERR_INDEX_NOT_FOUND 0x2001 +#define HMERR_CONTENT_NOT_FOUND 0x2002 +#define HMERR_OPEN_LIB_FILE 0x2003 +#define HMERR_READ_LIB_FILE 0x2004 +#define HMERR_CLOSE_LIB_FILE 0x2005 +#define HMERR_INVALID_LIB_FILE 0x2006 +#define HMERR_NO_MEMORY 0x2007 +#define HMERR_ALLOCATE_SEGMENT 0x2008 +#define HMERR_FREE_MEMORY 0x2009 +#define HMERR_PANEL_NOT_FOUND 0x2010 +#define HMERR_DATABASE_NOT_OPEN 0x2011 +#define HMERR_LOAD_DLL 0x2013 + +#define HMPANELTYPE_NUMBER 0 +#define HMPANELTYPE_NAME 1 + +#define HMQVP_NUMBER 0x0001 +#define HMQVP_NAME 0x0002 +#define HMQVP_GROUP 0x0003 + +#define HMQW_COVERPAGE 0x0001 +#define HMQW_INDEX 0x0002 +#define HMQW_TOC 0x0003 +#define HMQW_SEARCH 0x0004 +#define HMQW_VIEWPAGES 0x0005 +#define HMQW_LIBRARY 0x0006 +#define HMQW_VIEWPORT 0x0007 +#define HMQW_OBJCOM_WINDOW 0x0008 +#define HMQW_INSTANCE 0x0009 +#define HMQW_ACTIVEVIEWPORT 0x000a +#define CONTROL_SELECTED 0x000b + +#define HMQW_GROUP_VIEWPORT 0x00f1 +#define HMQW_RES_VIEWPORT 0x00f2 +#define USERDATA 0x00f3 + +#define HWND_PARENT (HWND)NULL + +#define OPEN_COVERPAGE 0x0001 +#define OPEN_PAGE 0x0002 +#define SWAP_PAGE 0x0003 +#define OPEN_TOC 0x0004 +#define OPEN_INDEX 0x0005 +#define OPEN_HISTORY 0x0006 +#define OPEN_SEARCH_HIT_LIST 0x0007 +#define OPEN_LIBRARY 0x0008 + + +typedef USHORT HELPSUBTABLE; +typedef HELPSUBTABLE *PHELPSUBTABLE; + + +typedef struct _ACVP +{ + ULONG cb; + HAB hAB; + HMQ hmq; + ULONG ObjectID; + HWND hWndParent; + HWND hWndOwner; + HWND hWndACVP; +} ACVP; +typedef ACVP *PACVP; + +typedef struct _HELPTABLE +{ + USHORT idAppWindow; + PHELPSUBTABLE phstHelpSubTable; + USHORT idExtPanel; +} HELPTABLE; +typedef HELPTABLE *PHELPTABLE; + +typedef struct _HELPINIT +{ + ULONG cb; + ULONG ulReturnCode; + PSZ pszTutorialName; + PHELPTABLE phtHelpTable; + HMODULE hmodHelpTableModule; + HMODULE hmodAccelActionBarModule; + ULONG idAccelTable; + ULONG idActionBar; + PSZ pszHelpWindowTitle; + ULONG fShowPanelId; + PSZ pszHelpLibraryName; +} HELPINIT; +typedef HELPINIT *PHELPINIT; + +BOOL WinAssociateHelpInstance (HWND hwndHelpInstance, HWND hwndApp); +HWND WinCreateHelpInstance (HAB hab, PHELPINIT phinitHMInitStructure); +BOOL WinCreateHelpTable (HWND hwndHelpInstance, + __const__ HELPTABLE *phtHelpTable); +BOOL WinDestroyHelpInstance (HWND hwndHelpInstance); +BOOL WinLoadHelpTable (HWND hwndHelpInstance, ULONG idHelpTable, + HMODULE Module); +HWND WinQueryHelpInstance (HWND hwndApp); + +#endif /* INCL_WINHELP */ + + +#if defined (INCL_DDF) + +#define ART_RUNIN 0x0010 +#define ART_LEFT 0x0001 +#define ART_RIGHT 0x0002 +#define ART_CENTER 0x0004 + +#define CLR_UNCHANGED (-6) + +#define HMBT_NONE 1 +#define HMBT_ALL 2 +#define HMBT_FIT 3 + +#define HMERR_DDF_MEMORY 0x3001 +#define HMERR_DDF_ALIGN_TYPE 0x3002 +#define HMERR_DDF_BACKCOLOR 0x3003 +#define HMERR_DDF_FORECOLOR 0x3004 +#define HMERR_DDF_FONTSTYLE 0x3005 +#define HMERR_DDF_REFTYPE 0x3006 +#define HMERR_DDF_LIST_UNCLOSED 0x3007 +#define HMERR_DDF_LIST_UNINITIALIZED 0x3008 +#define HMERR_DDF_LIST_BREAKTYPE 0x3009 +#define HMERR_DDF_LIST_SPACING 0x300A +#define HMERR_DDF_HINSTANCE 0x300B +#define HMERR_DDF_EXCEED_MAX_LENGTH 0x300C +#define HMERR_DDF_EXCEED_MAX_INC 0x300D +#define HMERR_DDF_INVALID_DDF 0x300E +#define HMERR_DDF_FORMAT_TYPE 0x300F +#define HMERR_DDF_INVALID_PARM 0x3010 +#define HMERR_DDF_INVALID_FONT 0x3011 +#define HMERR_DDF_SEVERE 0x3012 + +#define HMLS_SINGLELINE 1 +#define HMLS_DOUBLELINE 2 + +#define REFERENCE_BY_ID 0 +#define REFERENCE_BY_RES 1 + +typedef VOID *HDDF; + +BOOL DdfBeginList (HDDF hddf, ULONG ulWidthDT, ULONG fBreakType, + ULONG fSpacing); +BOOL DdfBitmap (HDDF hddf, HBITMAP hbm, ULONG fAlign); +BOOL DdfEndList (HDDF hddf); +BOOL DdfHyperText (HDDF hddf, PCSZ pszText, PCSZ pszReference, + ULONG fReferenceType); +BOOL DdfInform (HDDF hddf, PCSZ pszText, ULONG resInformNumber); +HDDF DdfInitialize (HWND hwndHelpInstance, ULONG cbBuffer, ULONG ulIncrement); +BOOL DdfListItem (HDDF hddf, PCSZ pszTerm, PCSZ pszDescription); +BOOL DdfMetafile (HDDF hddf, HMF hmf, __const__ RECTL *prclRect); +BOOL DdfPara (HDDF hddf); +BOOL DdfSetColor (HDDF hddf, COLOR fBackColor, COLOR fForColor); +BOOL DdfSetFont (HDDF hddf, PCSZ pszFaceName, ULONG ulWidth, ULONG ulHeight); +BOOL DdfSetFontStyle (HDDF hddf, ULONG fFontStyle); +BOOL DdfSetFormat (HDDF hddf, ULONG fFormatType); +BOOL DdfSetTextAlign (HDDF hddf, ULONG fAlign); +BOOL DdfText (HDDF hddf, PCSZ pszText); + +#endif /* INCL_DDF */ + +/* ---------------------- Advanced Video ---------------------------------- */ + +#if defined (INCL_FONTFILEFORMAT) + +#define FONTDEFFONT1 0x0047 +#define FONTDEFFONT2 0x0042 +#define FONTDEFFONT3 0x0042 +#define FONTDEFCHAR1 0x0081 +#define FONTDEFCHAR2 0x0081 +#define FONTDEFCHAR3 0x00b8 +#define FONTDEFDEVFONT 0x2000 +#define FONTDEFFOCA32 0x4000 +#define SPACE_UNDEF 0x8000 + +#define FONT_SIGNATURE 0xfffffffe +#define FONT_METRICS 0x00000001 +#define FONT_DEFINITION 0x00000002 +#define FONT_KERNPAIRS 0x00000003 +#define FONT_ADDITIONALMETRICS 0x00000004 +#define FONT_ENDRECORD 0xffffffff + +#define QUERY_PUBLIC_FONTS 0x0001 +#define QUERY_PRIVATE_FONTS 0x0002 + +#define CDEF_GENERIC 0x0001 +#define CDEF_BOLD 0x0002 +#define CDEF_ITALIC 0x0004 +#define CDEF_UNDERSCORE 0x0008 +#define CDEF_STRIKEOUT 0x0010 +#define CDEF_OUTLINE 0x0020 + +typedef struct _FOCAMETRICS +{ + ULONG ulIdentity; + ULONG ulSize; + CHAR szFamilyname[32]; + CHAR szFacename[32]; + SHORT usRegistryId; + SHORT usCodePage; + SHORT yEmHeight; + SHORT yXHeight; + SHORT yMaxAscender; + SHORT yMaxDescender; + SHORT yLowerCaseAscent; + SHORT yLowerCaseDescent; + SHORT yInternalLeading; + SHORT yExternalLeading; + SHORT xAveCharWidth; + SHORT xMaxCharInc; + SHORT xEmInc; + SHORT yMaxBaselineExt; + SHORT sCharSlope; + SHORT sInlineDir; + SHORT sCharRot; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT xDeviceRes; + SHORT yDeviceRes; + SHORT usFirstChar; + SHORT usLastChar; + SHORT usDefaultChar; + SHORT usBreakChar; + SHORT usNominalPointSize; + SHORT usMinimumPointSize; + SHORT usMaximumPointSize; + SHORT fsTypeFlags; + SHORT fsDefn; + SHORT fsSelectionFlags; + SHORT fsCapabilities; + SHORT ySubscriptXSize; + SHORT ySubscriptYSize; + SHORT ySubscriptXOffset; + SHORT ySubscriptYOffset; + SHORT ySuperscriptXSize; + SHORT ySuperscriptYSize; + SHORT ySuperscriptXOffset; + SHORT ySuperscriptYOffset; + SHORT yUnderscoreSize; + SHORT yUnderscorePosition; + SHORT yStrikeoutSize; + SHORT yStrikeoutPosition; + SHORT usKerningPairs; + SHORT sFamilyClass; + PSZ pszDeviceNameOffset; +} FOCAMETRICS; +typedef FOCAMETRICS *PFOCAMETRICS; + +typedef struct _FONTFILEMETRICS +{ + ULONG ulIdentity; + ULONG ulSize; + CHAR szFamilyname[32]; + CHAR szFacename[32]; + SHORT usRegistryId; + SHORT usCodePage; + SHORT yEmHeight; + SHORT yXHeight; + SHORT yMaxAscender; + SHORT yMaxDescender; + SHORT yLowerCaseAscent; + SHORT yLowerCaseDescent; + SHORT yInternalLeading; + SHORT yExternalLeading; + SHORT xAveCharWidth; + SHORT xMaxCharInc; + SHORT xEmInc; + SHORT yMaxBaselineExt; + SHORT sCharSlope; + SHORT sInlineDir; + SHORT sCharRot; + USHORT usWeightClass; + USHORT usWidthClass; + SHORT xDeviceRes; + SHORT yDeviceRes; + SHORT usFirstChar; + SHORT usLastChar; + SHORT usDefaultChar; + SHORT usBreakChar; + SHORT usNominalPointSize; + SHORT usMinimumPointSize; + SHORT usMaximumPointSize; + SHORT fsTypeFlags; + SHORT fsDefn; + SHORT fsSelectionFlags; + SHORT fsCapabilities; + SHORT ySubscriptXSize; + SHORT ySubscriptYSize; + SHORT ySubscriptXOffset; + SHORT ySubscriptYOffset; + SHORT ySuperscriptXSize; + SHORT ySuperscriptYSize; + SHORT ySuperscriptXOffset; + SHORT ySuperscriptYOffset; + SHORT yUnderscoreSize; + SHORT yUnderscorePosition; + SHORT yStrikeoutSize; + SHORT yStrikeoutPosition; + SHORT usKerningPairs; + SHORT sFamilyClass; + ULONG ulReserved; + PANOSE panose; +} FONTFILEMETRICS; +typedef FONTFILEMETRICS *PFONTFILEMETRICS; + +typedef struct _FONTDEFINITIONHEADER +{ + ULONG ulIdentity; + ULONG ulSize; + SHORT fsFontdef; + SHORT fsChardef; + SHORT usCellSize; + SHORT xCellWidth; + SHORT yCellHeight; + SHORT xCellIncrement; + SHORT xCellA; + SHORT xCellB; + SHORT xCellC; + SHORT pCellBaseOffset; +} FONTDEFINITIONHEADER; +typedef FONTDEFINITIONHEADER *PFONTDEFINITIONHEADER; + +typedef struct _FONTSIGNATURE +{ + ULONG ulIdentity; + ULONG ulSize; + CHAR achSignature[12]; +} FONTSIGNATURE; +typedef FONTSIGNATURE *PFONTSIGNATURE; + +typedef struct _ADDITIONALMETRICS +{ + ULONG ulIdentity; + ULONG ulSize; + PANOSE panose; +} ADDITIONALMETRICS; +typedef ADDITIONALMETRICS *PADDITIONALMETRICS; + +typedef struct _FOCAFONT +{ + FONTSIGNATURE fsSignature; + FOCAMETRICS fmMetrics; + FONTDEFINITIONHEADER fdDefinitions; +} FOCAFONT; +typedef FOCAFONT *PFOCAFONT; + +typedef FOCAFONT FOCAFONT32; +typedef FOCAFONT32 *PFOCAFONT32; + +#endif /* INCL_FONTFILEFORMAT */ + +/* ---------------------- Advanced Video ---------------------------------- */ + +#if defined (INCL_AVIO) + +#define FORMAT_CGA 0x0001 +#define FORMAT_4BYTE 0x0003 + +#define VQF_PUBLIC 0x0001 +#define VQF_PRIVATE 0x0002 + +typedef USHORT HVPS; +typedef HVPS *PHVPS; + +USHORT VioAssociate (HDC hdc, HVPS hvps); +USHORT VioCreateLogFont (PFATTRS pfatattrs, LONG llcid, PSTR8 pName, + HVPS hvps); +USHORT VioCreatePS (PHVPS phvps, SHORT sDepth, SHORT sWidth, SHORT sFormat, + SHORT sAttrs, HVPS hvpsReserved); +USHORT VioDeleteSetId (LONG llcid, HVPS hvps); +USHORT VioDestroyPS (HVPS hvps); +USHORT VioGetDeviceCellSize (PSHORT psHeight, PSHORT psWidth, HVPS hvps); +USHORT VioGetOrg (PSHORT psRow, PSHORT psColumn, HVPS hvps); +USHORT VioQueryFonts (PLONG plRemfonts, PFONTMETRICS afmMetrics, + LONG lMetricsLength, PLONG plFonts, PSZ pszFacename, ULONG flOptions, + HVPS hvps); +USHORT VioQuerySetIds (PLONG allcids, PSTR8 pNames, PLONG alTypes, LONG lcount, + HVPS hvps); +USHORT VioSetDeviceCellSize (SHORT sHeight, SHORT sWidth, HVPS hvps); +USHORT VioSetOrg (SHORT sRow, SHORT sColumn, HVPS hvps); +USHORT VioShowPS (SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps); + +MRESULT WinDefAVioWindowProc (HWND hwnd, USHORT msg, ULONG mp1, ULONG mp2); + +#endif /* INCL_AVIO */ + +/* --------------------------- MONITORS ----------------------------------- */ + +#if defined (INCL_DOSMONITORS) + +#define MONITOR_DEFAULT 0x0000 +#define MONITOR_BEGIN 0x0001 +#define MONITOR_END 0x0002 + +typedef SHANDLE HMONITOR; +typedef HMONITOR *PHMONITOR; + +typedef struct _MONIN +{ + USHORT cb; + BYTE abReserved[18]; + BYTE abBuffer[108]; +} MONIN; +typedef MONIN *PMONIN; + +typedef struct _MONOUT +{ + USHORT cb; + UCHAR buffer[18]; + BYTE abBuf[108]; +} MONOUT; +typedef MONOUT *PMONOUT; + +USHORT DosMonOpen (PSZ pszDevName, PHMONITOR phmon); +USHORT DosMonClose (HMONITOR hmon); +USHORT DosMonReg (HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf, + USHORT fPosition, USHORT usIndex); +USHORT DosMonRead (PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf, + PUSHORT pcbData); +USHORT DosMonWrite (PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData); + +#endif /* INCL_DOSMONITORS */ + +/* -------------------------- SUBSYSTEMS ---------------------------------- */ + +#if defined (INCL_KBD) + +#define IO_WAIT 0 +#define IO_NOWAIT 1 + +#define KBDSTF_RIGHTSHIFT 0x0001 +#define KBDSTF_LEFTSHIFT 0x0002 +#define KBDSTF_CONTROL 0x0004 +#define KBDSTF_ALT 0x0008 +#define KBDSTF_SCROLLLOCK_ON 0x0010 +#define KBDSTF_NUMLOCK_ON 0x0020 +#define KBDSTF_CAPSLOCK_ON 0x0040 +#define KBDSTF_INSERT_ON 0x0080 +#define KBDSTF_LEFTCONTROL 0x0100 +#define KBDSTF_LEFTALT 0x0200 +#define KBDSTF_RIGHTCONTROL 0x0400 +#define KBDSTF_RIGHTALT 0x0800 +#define KBDSTF_SCROLLLOCK 0x1000 +#define KBDSTF_NUMLOCK 0x2000 +#define KBDSTF_CAPSLOCK 0x4000 +#define KBDSTF_SYSREQ 0x8000 + +#define KBDTRF_SHIFT_KEY_IN 0x01 +#define KBDTRF_EXTENDED_CODE 0x02 +#define KBDTRF_CONVERSION_REQUEST 0x20 +#define KBDTRF_FINAL_CHAR_IN 0x40 +#define KBDTRF_INTERIM_CHAR_IN 0x80 + +#define KEYBOARD_ECHO_ON 0x0001 +#define KEYBOARD_ECHO_OFF 0x0002 +#define KEYBOARD_BINARY_MODE 0x0004 +#define KEYBOARD_ASCII_MODE 0x0008 +#define KEYBOARD_MODIFY_STATE 0x0010 +#define KEYBOARD_MODIFY_INTERIM 0x0020 +#define KEYBOARD_MODIFY_TURNAROUND 0x0040 +#define KEYBOARD_2B_TURNAROUND 0x0080 +#define KEYBOARD_SHIFT_REPORT 0x0100 + +#define KR_KBDCHARIN 0x00000001 +#define KR_KBDPEEK 0x00000002 +#define KR_KBDFLUSHBUFFER 0x00000004 +#define KR_KBDGETSTATUS 0x00000008 +#define KR_KBDSETSTATUS 0x00000010 +#define KR_KBDSTRINGIN 0x00000020 +#define KR_KBDOPEN 0x00000040 +#define KR_KBDCLOSE 0x00000080 +#define KR_KBDGETFOCUS 0x00000100 +#define KR_KBDFREEFOCUS 0x00000200 +#define KR_KBDGETCP 0x00000400 +#define KR_KBDSETCP 0x00000800 +#define KR_KBDXLATE 0x00001000 +#define KR_KBDSETCUSTXT 0x00002000 + +typedef USHORT HKBD; +typedef HKBD *PHKBD; + +typedef struct _KBDKEYINFO +{ + UCHAR chChar; + UCHAR chScan; + UCHAR fbStatus; + UCHAR bNlsShift; + USHORT fsState; + ULONG time; +} KBDKEYINFO; +typedef KBDKEYINFO *PKBDKEYINFO; + +typedef struct _KBDINFO +{ + USHORT cb; + USHORT fsMask; + USHORT chTurnAround; + USHORT fsInterim; + USHORT fsState; +} KBDINFO; +typedef KBDINFO *PKBDINFO; + +typedef struct _KBDHWID +{ + USHORT cb; + USHORT idKbd; + USHORT usReserved1; + USHORT usReserved2; +} KBDHWID; +typedef KBDHWID *PKBDHWID; + +typedef struct _KBDTRANS +{ + UCHAR chChar; + UCHAR chScan; + UCHAR fbStatus; + UCHAR bNlsShift; + USHORT fsState; + ULONG time; + USHORT fsDD; + USHORT fsXlate; + USHORT fsShift; + USHORT sZero; +} KBDTRANS; +typedef KBDTRANS *PKBDTRANS; + +typedef struct _STRINGINBUF +{ + USHORT cb; + USHORT cchIn; +} STRINGINBUF; +typedef STRINGINBUF *PSTRINGINBUF; + +USHORT KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd); +USHORT KbdClose (HKBD hkbd); +USHORT KbdDeRegister (VOID); +USHORT KbdFlushBuffer (HKBD hkbd); +USHORT KbdFreeFocus (HKBD hkbd); +USHORT KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd); +USHORT KbdGetFocus (USHORT fWait, HKBD hkbd); +USHORT KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd); +USHORT KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd); +USHORT KbdOpen (PHKBD phkbd); +USHORT KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd); +USHORT KbdRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask); +USHORT KbdSetCp (USHORT usReserved, USHORT idCP, HKBD hkbd); +USHORT KbdSetCustXt (PUSHORT pusCodePage, HKBD hkbd); +USHORT KbdSetFgnd (VOID); +USHORT KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd); +USHORT KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd); +USHORT KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fWait, HKBD hkbd); +USHORT KbdSynch (USHORT fWait); +USHORT KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd); + +#endif /* INCL_KBD */ + +#if defined (INCL_VIO) + +#define ANSI_OFF 0 +#define ANSI_ON 1 + +#define COLORS_2 0x01 +#define COLORS_4 0x02 +#define COLORS_16 0x04 + +#define VGMT_OTHER 0x01 +#define VGMT_GRAPHICS 0x02 +#define VGMT_DISABLEBURST 0x04 + +#define VP_NOWAIT 0x0000 +#define VP_WAIT 0x0001 +#define VP_OPAQUE 0x0000 +#define VP_TRANSPARENT 0x0002 + +#define VMWR_POPUP 0 +#define VMWN_POPUP 0 + +#define VSRWI_SAVEANDREDRAW 0 +#define VSRWI_REDRAW 1 + +#define VSRWN_SAVE 0 +#define VSRWN_REDRAW 1 + +#define UNDOI_GETOWNER 0 +#define UNDOI_RELEASEOWNER 1 + +#define UNDOK_ERRORCODE 0 +#define UNDOK_TERMINATE 1 + +#define LOCKIO_NOWAIT 0 +#define LOCKIO_WAIT 1 + +#define LOCK_SUCCESS 0 +#define LOCK_FAIL 1 + +#define VCC_SBCSCHAR 0 +#define VCC_DBCSFULLCHAR 1 +#define VCC_DBCS1STHALF 2 +#define VCC_DBCS2NDHALF 3 + +#define VGFI_GETCURFONT 0 +#define VGFI_GETROMFONT 1 + +#define VIO_CONFIG_CURRENT 0 +#define VIO_CONFIG_PRIMARY 1 +#define VIO_CONFIG_SECONDARY 2 + +#define DISPLAY_MONOCHROME 0 +#define DISPLAY_CGA 1 +#define DISPLAY_EGA 2 +#define DISPLAY_VGA 3 +#define DISPLAY_8514A 7 +#define DISPLAY_IMAGEADAPTER 8 +#define DISPLAY_XGA 9 + +#define MONITOR_MONOCHROME 0x0000 +#define MONITOR_COLOR 0x0001 +#define MONITOR_ENHANCED 0x0002 +#define MONITOR_8503 0x0003 +#define MONITOR_851X_COLOR 0x0004 +#define MONITOR_8514 0x0009 +#define MONITOR_FLATPANEL 0x000a +#define MONITOR_8507_8604 0x000b +#define MONITOR_8515 0x000c +#define MONITOR_9515 0x000f +#define MONITOR_9517 0x0011 +#define MONITOR_9518 0x0012 + +#define VR_VIOGETCURPOS 0x00000001 +#define VR_VIOGETCURTYPE 0x00000002 +#define VR_VIOGETMODE 0x00000004 +#define VR_VIOGETBUF 0x00000008 +#define VR_VIOGETPHYSBUF 0x00000010 +#define VR_VIOSETCURPOS 0x00000020 +#define VR_VIOSETCURTYPE 0x00000040 +#define VR_VIOSETMODE 0x00000080 +#define VR_VIOSHOWBUF 0x00000100 +#define VR_VIOREADCHARSTR 0x00000200 +#define VR_VIOREADCELLSTR 0x00000400 +#define VR_VIOWRTNCHAR 0x00000800 +#define VR_VIOWRTNATTR 0x00001000 +#define VR_VIOWRTNCELL 0x00002000 +#define VR_VIOWRTTTY 0x00004000 +#define VR_VIOWRTCHARSTR 0x00008000 +#define VR_VIOWRTCHARSTRATT 0x00010000 +#define VR_VIOWRTCELLSTR 0x00020000 +#define VR_VIOSCROLLUP 0x00040000 +#define VR_VIOSCROLLDN 0x00080000 +#define VR_VIOSCROLLLF 0x00100000 +#define VR_VIOSCROLLRT 0x00200000 +#define VR_VIOSETANSI 0x00400000 +#define VR_VIOGETANSI 0x00800000 +#define VR_VIOPRTSC 0x01000000 +#define VR_VIOSCRLOCK 0x02000000 +#define VR_VIOSCRUNLOCK 0x04000000 +#define VR_VIOSAVREDRAWWAIT 0x08000000 +#define VR_VIOSAVREDRAWUNDO 0x10000000 +#define VR_VIOPOPUP 0x20000000 +#define VR_VIOENDPOPUP 0x40000000 +#define VR_VIOPRTSCTOGGLE 0x80000000 + +#define VR_VIOMODEWAIT 0x00000001 +#define VR_VIOMODEUNDO 0x00000002 +#define VR_VIOGETFONT 0x00000004 +#define VR_VIOGETCONFIG 0x00000008 +#define VR_VIOSETCP 0x00000010 +#define VR_VIOGETCP 0x00000020 +#define VR_VIOSETFONT 0x00000040 +#define VR_VIOGETSTATE 0x00000080 +#define VR_VIOSETSTATE 0x00000100 + + +typedef USHORT HVIO; +typedef HVIO *PHVIO; + + +typedef struct _VIOMODEINFO +{ + USHORT cb; + UCHAR fbType; + UCHAR color; + USHORT col; + USHORT row; + USHORT hres; + USHORT vres; + UCHAR fmt_ID; + UCHAR attrib; + ULONG buf_addr; + ULONG buf_length; + ULONG full_length; + ULONG partial_length; + PCH ext_data_addr; +} VIOMODEINFO; +typedef VIOMODEINFO *PVIOMODEINFO; + +typedef struct _VIOCONFIGINFO +{ + USHORT cb; + USHORT adapter; + USHORT display; + ULONG cbMemory; + USHORT Configuration; + USHORT VDHVersion; + USHORT Flags; + ULONG HWBufferSize; + ULONG FullSaveSize; + ULONG PartSaveSize; + USHORT EMAdaptersOFF; + USHORT EMDisplaysOFF; +} VIOCONFIGINFO; +typedef VIOCONFIGINFO *PVIOCONFIGINFO; + +typedef struct _VIOPHYSBUF +{ + PBYTE pBuf; + ULONG cb; + SEL asel[1]; +} VIOPHYSBUF; +typedef VIOPHYSBUF *PVIOPHYSBUF; + +typedef struct _VIOPALSTATE +{ + USHORT cb; + USHORT type; + USHORT iFirst; + USHORT acolor[1]; +} VIOPALSTATE; +typedef VIOPALSTATE *PVIOPALSTATE; + +typedef struct _VIOOVERSCAN +{ + USHORT cb; + USHORT type; + USHORT color; +} VIOOVERSCAN; +typedef VIOOVERSCAN *PVIOOVERSCAN; + +typedef struct _VIOINTENSITY +{ + USHORT cb; + USHORT type; + USHORT fs; +} VIOINTENSITY; +typedef VIOINTENSITY *PVIOINTENSITY; + +typedef struct _VIOCOLORREG +{ + USHORT cb; + USHORT type; + USHORT firstcolorreg; + USHORT numcolorregs; + PCH colorregaddr; +} VIOCOLORREG; +typedef VIOCOLORREG *PVIOCOLORREG; + +typedef struct _VIOSETULINELOC +{ + USHORT cb; + USHORT type; + USHORT scanline; +} VIOSETULINELOC; +typedef VIOSETULINELOC *PVIOSETULINELOC; + +typedef struct _VIOSETTARGET +{ + USHORT cb; + USHORT type; + USHORT defaultalgorithm; +} VIOSETTARGET; +typedef VIOSETTARGET *PVIOSETTARGET; + +typedef struct _VIOCURSORINFO +{ + USHORT yStart; + USHORT cEnd; + USHORT cx; + USHORT attr; +} VIOCURSORINFO; +typedef VIOCURSORINFO *PVIOCURSORINFO; + +typedef struct _VIOFONTINFO +{ + USHORT cb; + USHORT type; + USHORT cxCell; + USHORT cyCell; + ULONG pbData; /* PVOID16 / _far16ptr */ + USHORT cbData; +} VIOFONTINFO; +typedef VIOFONTINFO *PVIOFONTINFO; + + +USHORT VioCheckCharType (PUSHORT pType, USHORT usRow, USHORT usColumn, + HVIO hvio); +USHORT VioDeRegister (VOID); +USHORT VioEndPopUp (HVIO hvio); +USHORT VioGetAnsi (PUSHORT pfAnsi, HVIO hvio); +USHORT VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio); +USHORT VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, HVIO hvio); +USHORT VioGetCp (USHORT usReserved, PUSHORT pusCodePage, HVIO hvio); +USHORT VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio); +USHORT VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio); +USHORT VioGetFont (PVIOFONTINFO pviofi, HVIO hvio); +USHORT VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio); +USHORT VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved); +USHORT VioGetState (PVOID pState, HVIO hvio); +USHORT VioGlobalReg (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1, + ULONG ulFunMask2, USHORT usReturn); +USHORT VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, USHORT usReserved); +USHORT VioModeWait (USHORT usReqType, PUSHORT pNotifyType, USHORT usReserved); +USHORT VioPopUp (PUSHORT pfWait, HVIO hvio); +USHORT VioPrtSc (HVIO hvio); +USHORT VioPrtScToggle (HVIO hvio); +USHORT VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT VioReadCharStr (PCH pch, PUSHORT pcb, USHORT usRow, USHORT usColumn, + HVIO hvio); +USHORT VioRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1, + ULONG ulFunMask2); +USHORT VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd, + USHORT usReserved); +USHORT VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pusNotifyType, + USHORT usReserved); +USHORT VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio); +USHORT VioScrollDn (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow, + USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio); +USHORT VioScrollLf (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow, + USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio); +USHORT VioScrollRt (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow, + USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio); +USHORT VioScrollUp (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow, + USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio); +USHORT VioScrUnLock (HVIO hvio); +USHORT VioSetAnsi (USHORT fAnsi, HVIO hvio); +USHORT VioSetCp (USHORT usReserved, USHORT usCodePage, HVIO hvio); +USHORT VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio); +USHORT VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio); +USHORT VioSetFont (PVIOFONTINFO pviofi, HVIO hvio); +USHORT VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio); +USHORT VioSetState (CPVOID pState, HVIO hvio); +USHORT VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio); +USHORT VioWrtCellStr (PCCH pchCellStr, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT VioWrtCharStr (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn, + HVIO hvio); +USHORT VioWrtCharStrAtt (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn, + PBYTE pAttr, HVIO hvio); +USHORT VioWrtNAttr (__const__ BYTE *pAttr, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT VioWrtNCell (__const__ BYTE *pCell, USHORT cb, USHORT usRow, + USHORT usColumn, HVIO hvio); +USHORT VioWrtNChar (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn, + HVIO hvio); +USHORT VioWrtTTY (PCCH pch, USHORT cb, HVIO hvio); + +#endif /* INCL_VIO */ + +#if defined (INCL_MOU) + +#define MHK_BUTTON1 0x0001 +#define MHK_BUTTON2 0x0002 +#define MHK_BUTTON3 0x0004 + +#define MOU_NOWAIT 0x0000 +#define MOU_WAIT 0x0001 + +#define MOUSE_MOTION 0x0001 +#define MOUSE_MOTION_WITH_BN1_DOWN 0x0002 +#define MOUSE_BN1_DOWN 0x0004 +#define MOUSE_MOTION_WITH_BN2_DOWN 0x0008 +#define MOUSE_BN2_DOWN 0x0010 +#define MOUSE_MOTION_WITH_BN3_DOWN 0x0020 +#define MOUSE_BN3_DOWN 0x0040 + +#define MOUSE_QUEUEBUSY 0x0001 +#define MOUSE_BLOCKREAD 0x0002 +#define MOUSE_FLUSH 0x0004 +#define MOUSE_UNSUPPORTED_MODE 0x0008 +#define MOUSE_DISABLED 0x0100 +#define MOUSE_MICKEYS 0x0200 + +#define MOU_NODRAW 0x0001 +#define MOU_DRAW 0x0000 +#define MOU_MICKEYS 0x0002 +#define MOU_PELS 0x0000 + +#define MR_MOUGETNUMBUTTONS 0x00000001 +#define MR_MOUGETNUMMICKEYS 0x00000002 +#define MR_MOUGETDEVSTATUS 0x00000004 +#define MR_MOUGETNUMQUEEL 0x00000008 +#define MR_MOUREADEVENTQUE 0x00000010 +#define MR_MOUGETSCALEFACT 0x00000020 +#define MR_MOUGETEVENTMASK 0x00000040 +#define MR_MOUSETSCALEFACT 0x00000080 +#define MR_MOUSETEVENTMASK 0x00000100 +#define MR_MOUOPEN 0x00000800 +#define MR_MOUCLOSE 0x00001000 +#define MR_MOUGETPTRSHAPE 0x00002000 +#define MR_MOUSETPTRSHAPE 0x00004000 +#define MR_MOUDRAWPTR 0x00008000 +#define MR_MOUREMOVEPTR 0x00010000 +#define MR_MOUGETPTRPOS 0x00020000 +#define MR_MOUSETPTRPOS 0x00040000 +#define MR_MOUINITREAL 0x00080000 +#define MR_MOUSETDEVSTATUS 0x00100000 + + +typedef USHORT HMOU; +typedef HMOU *PHMOU; + + +typedef struct _MOUEVENTINFO +{ + USHORT fs; + ULONG time; + SHORT row; + SHORT col; +} MOUEVENTINFO; +typedef MOUEVENTINFO *PMOUEVENTINFO; + +typedef struct _MOUQUEINFO +{ + USHORT cEvents; + USHORT cmaxEvents; +} MOUQUEINFO; +typedef MOUQUEINFO *PMOUQUEINFO; + +typedef struct _PTRLOC +{ + USHORT row; + USHORT col; +} PTRLOC; +typedef PTRLOC *PPTRLOC; + +typedef struct _NOPTRRECT +{ + USHORT row; + USHORT col; + USHORT cRow; + USHORT cCol; +} NOPTRRECT; +typedef NOPTRRECT *PNOPTRRECT; + +typedef struct _PTRSHAPE +{ + USHORT cb; + USHORT col; + USHORT row; + USHORT colHot; + USHORT rowHot; +} PTRSHAPE; +typedef PTRSHAPE *PPTRSHAPE; + +typedef struct _SCALEFACT +{ + USHORT rowScale; + USHORT colScale; +} SCALEFACT; +typedef SCALEFACT *PSCALEFACT; + +typedef struct _THRESHOLD +{ + USHORT Length; + USHORT Level1; + USHORT Lev1Mult; + USHORT Level2; + USHORT lev2Mult; +} THRESHOLD; +typedef THRESHOLD *PTHRESHOLD; + + +USHORT MouClose (HMOU hmou); +USHORT MouDeRegister (VOID); +USHORT MouDrawPtr (HMOU hmou); +USHORT MouFlushQue (HMOU hmou); +USHORT MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou); +USHORT MouGetEventMask (PUSHORT pfsEvents, HMOU hmou); +USHORT MouGetNumButtons (PUSHORT pcButtons, HMOU hmou); +USHORT MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou); +USHORT MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou); +USHORT MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou); +USHORT MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou); +USHORT MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou); +USHORT MouGetThreshold (PTHRESHOLD pthreshold, HMOU hmou); +USHORT MouInitReal (PCSZ pszDriverName); +USHORT MouOpen (PCSZ pszDvrName, PHMOU phmou); +USHORT MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, HMOU hmou); +USHORT MouRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask); +USHORT MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou); +USHORT MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou); +USHORT MouSetEventMask (PUSHORT pfsEvents, HMOU hmou); +USHORT MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou); +USHORT MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou); +USHORT MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou); +USHORT MouSetThreshold (PTHRESHOLD pthreshold, HMOU hmou); +USHORT MouSynch (USHORT fWait); + +#endif /* INCL_MOU */ + +/* ------------------------------ THE END --------------------------------- */ + +#pragma pack(4) + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* not _OS2EMX_H */ + +/* Note 1: + + There are some inconsistencies in the structure names defined in + the header files of the IBM Developer's Toolkit for OS/2. To make + C++ modules compiled with those headers linkable with C++ modules + compiled with this header, we have to use the same (questionable) + structure names. */ + +/* + * Local variables: + * indent-tabs-mode: t + * end: + */ + diff --git a/rossubsys/os2/include/ros2.h b/rossubsys/os2/include/ros2.h new file mode 100644 index 00000000000..8c08b14195d --- /dev/null +++ b/rossubsys/os2/include/ros2.h @@ -0,0 +1,91 @@ +/* $ $ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * FILE: dll/doscalls.c + * PURPOSE: supportheader for Kernelservices. + * Use this file if your dll or application + * is going to use both, the os2 base services + * as well as the native API of NTDLL.DLL + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 1-08-2002 Created + */ + +/* How to use: + History got us another time. If you want to write a module + that uses either native-api or os2-services...no problem. + But if you want to use both of them you run into type conflicts. + BOOL is not very surprising. But there are many other types + whose names are equal. This results from the fact that NT + should originally become OS/2 3.0. + So your solution lies in including this file instead of os2.h + and ntddk.h. What this file here does is, it puts the os2-types+ + functions into the namespace OS2 while the nt-types+functions are + put into the namespace NT. The still conflicting #defines are handled + like this: If ntddk.h defintes a symbol FOO and os2.h does the same, + this file here undefines the ntddk.h-one and renames it to NT_FOO. + This is only done for conflicting symbols. Of course, this list is a + source for errors. But is there a better solution than renaming + all of the symbols? +*/ + +#ifndef __ROS2_H__ +#define __ROS2_H__ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +namespace NT +{ +#include +#include +} + + +/* rename all the symbols */ +#define NT_FILE_CREATE FILE_CREATE +#undef FILE_CREATE +#define NT_CREATE_SUSPENDED CREATE_SUSPENDED +#undef CREATE_SUSPENDED + +namespace OS2 +{ +#include "os2.h" +} + +using namespace OS2; + +APIRET STDCALL Dos32Open(PSZ pszFileName, PHFILE pHf, + PULONG pulAction, ULONG cbFile, + ULONG ulAttribute, ULONG fsOpenFlags, + ULONG fsOpenMode, PVOID reserved ); //ULONGPEAOP2 peaop2) +APIRET STDCALL Dos32Close(HFILE hFile); +APIRET STDCALL Dos32Read(HFILE hFile, PVOID pBuffer, + ULONG cbRead, PULONG pcbActual); +APIRET STDCALL Dos32Write(HFILE hFile, PVOID pBuffer, + ULONG cbWrite, PULONG pcbActual); +ULONG STDCALL DosSleep (ULONG ulInterval); +ULONG STDCALL DosBeep (ULONG ulFrequency, ULONG ulDuration); +VOID STDCALL DosExit (ULONG ulAction, ULONG ulResult); + +//ULONG STDCALL DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction, +// PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength, +// PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength); + +typedef ULONG foo_TID; +typedef foo_TID* foo_PTID; +typedef void (*foo_PFNTHREAD)(ULONG ulThreadArg); + +ULONG STDCALL DosCreateThread (foo_PTID ptidThreadID, foo_PFNTHREAD pfnThreadAddr, + ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __ROS2_H__ */ diff --git a/rossubsys/os2/install.bat b/rossubsys/os2/install.bat new file mode 100644 index 00000000000..f0e4dd6da96 --- /dev/null +++ b/rossubsys/os2/install.bat @@ -0,0 +1,20 @@ +@echo off +if "%1" == "" goto NoParameter +set ROS_INSTALL=%1 +goto Install +:NoParameter +set ROS_INSTALL=c:\reactos +:Install +echo Installing to %ROS_INSTALL% +@echo off + +md %ROS_INSTALL% +md %ROS_INSTALL%\bin +md %ROS_INSTALL%\symbols +md %ROS_INSTALL%\system32 + +copy ..\os2\apps\bepslep\bepslep.exe %ROS_INSTALL%\bin +copy ..\os2\lib\doscalls\doscalls.dll %ROS_INSTALL%\system32 +copy ..\os2\lib\doscalls\doscalls.sym %ROS_INSTALL%\symbols +copy ..\os2\server\os2ss.exe %ROS_INSTALL%\system32 +copy ..\os2\server\os2ss.sym %ROS_INSTALL%\symbols diff --git a/rossubsys/os2/lib/directory.xml b/rossubsys/os2/lib/directory.xml new file mode 100644 index 00000000000..98087f300de --- /dev/null +++ b/rossubsys/os2/lib/directory.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/rossubsys/os2/lib/doscalls/devices/devices.cpp b/rossubsys/os2/lib/doscalls/devices/devices.cpp new file mode 100644 index 00000000000..23d92950e8c --- /dev/null +++ b/rossubsys/os2/lib/doscalls/devices/devices.cpp @@ -0,0 +1,65 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: devices.cpp + * CONTAINS: device io ctl main function. + * PURPOSE: Kernelservices for OS/2 apps + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 13-03-2002 Created + * 25-07-2002 Work to make it compile + * 10-11-2002 Done som little things + */ + +#define INCL_DOSDEVICES +#define INCL_DOSERRORS +#include "ros2.h" + + +/*******************************************/ +/* DosDevIOCtl performs control functions */ +/* on a device specified by an opened */ +/* device handle. */ +/*******************************************/ +/*HFILE hDevice; Device handle returned by DosOpen, or a standard (open) device handle. */ +/*ULONG category; Device category. */ +/*ULONG function; Device-specific function code. */ +/*PVOID pParams; Address of the command-specific argument list. */ +/*ULONG cbParmLenMax; Length, in bytes, of pParams. */ +/*PULONG pcbParmLen; Pointer to the length of parameters. */ +/*PVOID pData; Address of the data area. */ +/*ULONG cbDataLenMax; Length, in bytes, of pData. */ +/*PULONG pcbDataLen; Pointer to the length of data. */ +/*APIRET ulrc; Return Code. + + ulrc (APIRET) - returns + Return Code. + + DosDevIOCtl returns one of the following values: + + 0 NO_ERROR + 1 ERROR_INVALID_FUNCTION + 6 ERROR_INVALID_HANDLE + 15 ERROR_INVALID_DRIVE + 31 ERROR_GEN_FAILURE + 87 ERROR_INVALID_PARAMETER + 111 ERROR_BUFFER_OVERFLOW + 115 ERROR_PROTECTION_VIOLATION + 117 ERROR_INVALID_CATEGORY + 119 ERROR_BAD_DRIVER_LEVEL + 163 ERROR_UNCERTAIN_MEDIA + 165 ERROR_MONITORS_NOT_SUPPORTED + +*/ +APIRET STDCALL DosDevIOCtl(HFILE hDevice, ULONG category, ULONG function, + PVOID pParams,ULONG cbParmLenMax,PULONG pcbParmLen, + PVOID pData,ULONG cbDataLenMax,PULONG pcbDataLen) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/rossubsys/os2/lib/doscalls/devices/ioctl_async.cpp b/rossubsys/os2/lib/doscalls/devices/ioctl_async.cpp new file mode 100644 index 00000000000..eb10004c183 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/devices/ioctl_async.cpp @@ -0,0 +1,97 @@ +/* $Id: ioctl_async.cpp,v 1.2 2004/01/31 01:29:11 robertk Exp $ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: ipctl_async.cpp + * PURPOSE: This file is to be directly included into devices.cpp + * CONTAINS: implementation of the category 1 (async I/O) + * ioctl functioncodes. + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 10-11-2002 Created + */ + + +/* This function implements the async ioctls. It + is called from the real DosIOCtl function. This + function implies that it is only called, if the + cathegory was 0x01. + All other parameters are the same as DosIoCtl. + + FIXME: implement me +*/ +APIRET EvaluateAsyncIoCtl( HFILE hDevice, ULONG function, + PVOID pParams, ULONG cbParmLenMax, PULONG pcbParmLen, + PVOID pData, ULONG cbDataLenMax, PULONG pcbDataLen) +{ + switch( function ) + { + case 0x41: //ASYNC_SETBAUDRATE + //+------------------------------------+ + //|Field Length C Datatype | + //|------------------------------------| + //|Bit Rate WORD USHORT | + //+------------------------------------+ + break; + + case 0x42: // Set Line Characteristics (stop, parity, data bits) + return ERROR_INVALID_PARAMETER; // example + break; + case 0x43: // Extended Set Bit Rate . + break; + case 0x44: // Transmit Byte Immediate . + break; + case 0x45: // Set Break OFF . + break; + case 0x46: // Set Modem Control Signals . + break; + case 0x47: // Behave as if XOFF Received (stop transmit) . + break; + case 0x48: // Behave as if XON Received (start transmit) . + break; + case 0x49: // Reserved . + break; + case 0x53: // Set Device Control Block (DCB) Parameters . + break; + case 0x54: // Set Enhanced Mode Parameters . + break; + case 0x61: // Query Current Bit Rate . + break; + case 0x62: // Query Line Characteristics . + break; + case 0x63: // Extended Query Bit Rate . + break; + case 0x64: // Query COM Status . + break; + case 0x65: // Query Transmit Data Status . + break; + case 0x66: // Query Modem Control Output Signals . + break; + case 0x67: // Query Current Modem Input Signals . + break; + case 0x68: // Query Number of Characters in Receive Queue . + break; + case 0x69: // Query Number of Characters in Transmit Queue . + break; + case 0x72: // Query COM Event Information . + break; + case 0x73: // Query Device Control Block (DCB) Parameters . + break; + case 0x74: // Query Enhanced Mode Parameters . + break; + default: + return ERROR_INVALID_FUNCTION; + break; + } + return ERROR_INVALID_FUNCTION; +} + + + + + + +/* EOF */ diff --git a/rossubsys/os2/lib/doscalls/doscalls.def b/rossubsys/os2/lib/doscalls/doscalls.def new file mode 100644 index 00000000000..20ace6c8753 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/doscalls.def @@ -0,0 +1,35 @@ +; $Id: doscalls.def,v 1.6 2004/01/31 01:29:11 robertk Exp $ +; +; Def for doscalls.dll - part of the OS/2-sub system +; for ReactOS. Provides Access to OS/2 kernel services. + +LIBRARY doscalls.dll + +DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services to OS/2-apps" + +EXPORTS +; FIXME: fill in all exports + +<<<<<<< doscalls.def +DosSleep +DosClose +DosOpen +DosRead +DosWrite +DosDevIOCtl +DosBeep +DosExit +DosCreateThread +======= +DosSleep +Dos32Close +Dos32Open +Dos32Read +Dos32Write +;DosDevIOCtl +DosBeep +DosExit +DosCreateThread +>>>>>>> 1.5 + +; EOF diff --git a/rossubsys/os2/lib/doscalls/doscalls.def.bak b/rossubsys/os2/lib/doscalls/doscalls.def.bak new file mode 100644 index 00000000000..879c26b1def --- /dev/null +++ b/rossubsys/os2/lib/doscalls/doscalls.def.bak @@ -0,0 +1,23 @@ +; $Id: doscalls.def.bak,v 1.1 2002/09/04 22:19:47 robertk Exp $ +; +; Def for doscalls.dll - part of the OS/2-sub system +; for ReactOS. Provides Access to OS/2 kernel services. + +LIBRARY doscalls.dll + +DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services to OS/2-apps" + +EXPORTS +; FIXME: fill in all exports + +Dos32Sleep@4 @229 +Dos32Close@4 @257 +Dos32Open@32 @273 +Dos32Read@16 @281 +Dos32Write@16 @282 +Dos32DevIOCtl@36 @284 +Dos32Beep@8 @286 +Dos32Exit@8 @234 +Dos32CreateThread@20 @311 + +; EOF diff --git a/rossubsys/os2/lib/doscalls/doscalls.edf b/rossubsys/os2/lib/doscalls/doscalls.edf new file mode 100644 index 00000000000..1288f6fe75d --- /dev/null +++ b/rossubsys/os2/lib/doscalls/doscalls.edf @@ -0,0 +1,35 @@ +; $Id: doscalls.edf,v 1.4 2004/01/31 01:29:11 robertk Exp $ +; +; Def for doscalls.dll - part of the OS/2-sub system +; for ReactOS. Provides Access to OS/2 kernel services. + +LIBRARY doscalls.dll + +DESCRIPTION "Part of the ReactOS OS/2 sub system, provides base kernel services to OS/2-apps" + +EXPORTS +; FIXME: fill in all exports + +<<<<<<< doscalls.edf +DosSleep=DosSleep +DosClose=DosClose +DosOpen=DosOpen +DosRead=DosRead +DosWrite=DosWrite +DosDevIOCtl=DosDevIOCtl +DosBeep=DosBeep +DosExit=DosExit +DosCreateThread=DosCreateThread +======= +DosSleep=DosSleep@4 @229 +Dos32Close=Dos32Close@4 @257 +Dos32Open=Dos32Open@32 @273 +Dos32Read=Dos32Read@16 @281 +Dos32Write=Dos32Write@16 @282 +;DosDevIOCtl=DosDevIOCtl@36 @284 +DosBeep=DosBeep@8 @286 +DosExit=DosExit@8 @234 +DosCreateThread=DosCreateThread@20 @311 +>>>>>>> 1.3 + +; EOF diff --git a/rossubsys/os2/lib/doscalls/doscalls.rc b/rossubsys/os2/lib/doscalls/doscalls.rc new file mode 100644 index 00000000000..ea5631f90de --- /dev/null +++ b/rossubsys/os2/lib/doscalls/doscalls.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS-OS/2 subsystem base services\0" +#define REACTOS_STR_INTERNAL_NAME "doscalls\0" +#define REACTOS_STR_ORIGINAL_FILENAME "doscalls.dll\0" +#include diff --git a/rossubsys/os2/lib/doscalls/doscalls.xml b/rossubsys/os2/lib/doscalls/doscalls.xml new file mode 100644 index 00000000000..c6da163092f --- /dev/null +++ b/rossubsys/os2/lib/doscalls/doscalls.xml @@ -0,0 +1,23 @@ + + + ../../include + -lgcc + + devices.cpp + ioctl_async.cpp + + + directory.cpp + openclose.cpp + + + memory.cpp + + + doscalls.cpp + error.cpp + + + process.cpp + + diff --git a/rossubsys/os2/lib/doscalls/file/directory.cpp b/rossubsys/os2/lib/doscalls/file/directory.cpp new file mode 100644 index 00000000000..d271cc18966 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/file/directory.cpp @@ -0,0 +1,179 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: directory.cpp + * PURPOSE: Kernelservices for OS/2 apps + * CONTAINS: Directory related CP-functions. + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 10-11-2002 Created + */ + + +#define INCL_DOSFILEMGR +#define INCL_DOSERRORS +#include "ros2.h" + + + + +/****************************************** + DosDelete removes a file name from a + directory. The deleted file may be + recoverable. + + pszFile (PSZ) - input + Address of the name of the file to be deleted. + + ulrc (APIRET) - returns + Return Code. + + DosDelete returns one of the following values: + 0 NO_ERROR + 2 ERROR_FILE_NOT_FOUND + 3 ERROR_PATH_NOT_FOUND + 5 ERROR_ACCESS_DENIED + 26 ERROR_NOT_DOS_DISK + 32 ERROR_SHARING_VIOLATION + 36 ERROR_SHARING_BUFFER_EXCEEDED + 87 ERROR_INVALID_PARAMETER + 206 ERROR_FILENAME_EXCED_RANGE +*******************************************/ +APIRET DosDelete(PSZ pszFile) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/****************************************** + DosDeleteDir removes a subdirectory + from the specified disk. + + pszDir (PSZ) - input + Address of the fully qualified path name of the subdirectory to be removed. + + ulrc (APIRET) - returns + Return Code. + + DosDeleteDir returns one of the following values: + + 0 NO_ERROR + 2 ERROR_FILE_NOT_FOUND + 3 ERROR_PATH_NOT_FOUND + 5 ERROR_ACCESS_DENIED + 16 ERROR_CURRENT_DIRECTORY + 26 ERROR_NOT_DOS_DISK + 87 ERROR_INVALID_PARAMETER + 108 ERROR_DRIVE_LOCKED + 206 ERROR_FILENAME_EXCED_RANGE +******************************************/ +APIRET DosDeleteDir(PSZ pszDir) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + + + + +/******************************************* + DosCopy copies the source file or + subdirectory to the destination file or + subdirectory. + + pszOld (PSZ) - input + Address of the ASCIIZ path name of the source file, + subdirectory, or character device. + + Global file-name characters are not allowed. + + pszNew (PSZ) - input + Address of the ASCIIZ path name of the target file, + subdirectory, or character device. + + Global file-name characters are not allowed. + + option (ULONG) - input + ULONG bit flags that define how the DosCopy + function is done. + + + Bit Description + + 31-3 Reserved. These bits must be set to + zero. + + 2 DCPY_FAILEAS (0x00000004) + Discard the EAs if the source file + contains EAs and the destination file + system does not support EAs. + + 0 Discard the EAs (extended attributes) if + the destination file system does not + support EAs. + + 1 Fail the copy if the destination file + system does not support EAs. + + 1 DCPY_APPEND (x00000002) + Append the source file to the target + file's end of data. + + 0 Replace the target file with the source + file. + 1 Append the source file to the target file's + end of data. + + This is ignored when copying a + directory, or if the target file does not + exist. + + 0 DCPY_EXISTING (0x00000001) + Existing Target File Disposition. + + 0 Do not copy the source file to the target + if the file name already exists within the + target directory. If a single file is being + copied and the target already exists, an + error is returned. + + 1 Copy the source file to the target even if + the file name already exists within the + target directory. + + Bit flag DCPY_FAILEAS can be used in + combination with bit flag DCPY_APPEND or + DCPY_EXISTING. + + ulrc (APIRET) - returns + Return Code. + + DosCopy returns one of the following values: + + 0 NO_ERROR + 2 ERROR_FILE_NOT_FOUND + 3 ERROR_PATH_NOT_FOUND + 5 ERROR_ACCESS_DENIED + 26 ERROR_NOT_DOS_DISK + 32 ERROR_SHARING_VIOLATION + 36 ERROR_SHARING_BUFFER_EXCEEDED + 87 ERROR_INVALID_PARAMETER + 108 ERROR_DRIVE_LOCKED + 112 ERROR_DISK_FULL + 206 ERROR_FILENAME_EXCED_RANGE + 267 ERROR_DIRECTORY + 282 ERROR_EAS_NOT_SUPPORTED + 283 ERROR_NEED_EAS_FOUND +*******************************************/ +APIRET DosCopy(PSZ pszOld,PSZ pszNew, ULONG option) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + + + + +/* EOF */ diff --git a/rossubsys/os2/lib/doscalls/file/openclose.cpp b/rossubsys/os2/lib/doscalls/file/openclose.cpp new file mode 100644 index 00000000000..2b6e167bc38 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/file/openclose.cpp @@ -0,0 +1,199 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: openclose.cpp + * PURPOSE: Kernelservices for OS/2 apps + * CONTAINS: Open close write and handle related stuff. + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 13-03-2002 Created + * 25-07-2002 Work to make it compile + */ + + +#define INCL_DOSFILEMGR +#define INCL_DOSERRORS +#include "ros2.h" + + +<<<<<<< openclose.cpp + +APIRET STDCALL DosOpen(PSZ pszFileName, PHFILE pHf, +======= +APIRET STDCALL Dos32Open(PSZ pszFileName, PHFILE pHf, +>>>>>>> 1.4 + PULONG pulAction, ULONG cbFile, + ULONG ulAttribute, ULONG fsOpenFlags, + ULONG fsOpenMode, PVOID reserved ) //ULONGPEAOP2 peaop2) +{ +/* NTAPI +ZwCreateFile( +OUT PHANDLE FileHandle, +IN ACCESS_MASK DesiredAccess, +IN POBJECT_ATTRIBUTES ObjectAttributes, +OUT PIO_STATUS_BLOCK IoStatusBlock, +IN PLARGE_INTEGER AllocationSize OPTIONAL, +IN ULONG FileAttributes, +IN ULONG ShareAccess, +IN ULONG CreateDisposition, +IN ULONG CreateOptions, +IN PVOID EaBuffer OPTIONAL, +IN ULONG EaLength +);*/ + +/* + + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING NtPathU; + HANDLE FileHandle; + NTSTATUS Status; + ULONG Flags = 0; + + switch (dwCreationDisposition) + { + case CREATE_NEW: + dwCreationDisposition = FILE_CREATE; + break; + + case CREATE_ALWAYS: + dwCreationDisposition = FILE_OVERWRITE_IF; + break; + + case OPEN_EXISTING: + dwCreationDisposition = FILE_OPEN; + break; + + case OPEN_ALWAYS: + dwCreationDisposition = OPEN_ALWAYS; + break; + + case TRUNCATE_EXISTING: + dwCreationDisposition = FILE_OVERWRITE; + } + + DPRINT("CreateFileW(lpFileName %S)\n",lpFileName); + + if (dwDesiredAccess & GENERIC_READ) + dwDesiredAccess |= FILE_GENERIC_READ; + + if (dwDesiredAccess & GENERIC_WRITE) + dwDesiredAccess |= FILE_GENERIC_WRITE; + + if (!(dwFlagsAndAttributes & FILE_FLAG_OVERLAPPED)) + { + Flags |= FILE_SYNCHRONOUS_IO_ALERT; + } + + if (!RtlDosPathNameToNtPathName_U ((LPWSTR)lpFileName, + &NtPathU, + NULL, + NULL)) + return INVALID_HANDLE_VALUE; + + DPRINT("NtPathU \'%S\'\n", NtPathU.Buffer); + + ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES); + ObjectAttributes.RootDirectory = NULL; + ObjectAttributes.ObjectName = &NtPathU; + ObjectAttributes.Attributes = OBJ_CASE_INSENSITIVE; + ObjectAttributes.SecurityDescriptor = NULL; + ObjectAttributes.SecurityQualityOfService = NULL; + + Status = NtCreateFile (&FileHandle, + dwDesiredAccess, + &ObjectAttributes, + &IoStatusBlock, + NULL, + dwFlagsAndAttributes, + dwShareMode, + dwCreationDisposition, + Flags, + NULL, + 0); + if (!NT_SUCCESS(Status)) + { + SetLastErrorByStatus (Status); + return INVALID_HANDLE_VALUE; + } + + return FileHandle;*/ + + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/* close a Handle. seems finished */ +APIRET STDCALL DosClose(HFILE hFile) +{ + NT::NTSTATUS nErrCode; + nErrCode = NT::ZwClose( (NT::HANDLE)hFile ); + switch( nErrCode ) + { +/* + case STATUS_SUCCESS: + return NO_ERROR; + case STATUS_INVALID_HANDLE: + return ERROR_INVALID_HANDLE; + case STATUS_HANDLE_NOT_CLOSABLE: + return ERROR_FILE_NOT_FOUND; + */ + } + return nErrCode; +} + + + +APIRET STDCALL DosRead(HFILE hFile, PVOID pBuffer, + ULONG cbRead, PULONG pcbActual) +{ + NT::NTSTATUS nErrCode; + NT::IO_STATUS_BLOCK isbStatus; + // read data from file + nErrCode = NT::ZwReadFile( (NT::HANDLE)hFile, NULL, NULL, NULL, + &isbStatus, pBuffer, cbRead, + NULL, NULL ); + // contains the # bytes actually read. + *pcbActual = isbStatus.Information; + switch(nErrCode) + { +/* + case STATUS_INVALID_HANDLE: + return ERROR_INVALID_HANDLE; + // FIXME: complete this + */ + } + return NO_ERROR; +} + +/* Generic write to a stream given by hFile */ +APIRET STDCALL DosWrite(HFILE hFile, PVOID pBuffer, + ULONG cbWrite, PULONG pcbActual) +{ + NT::NTSTATUS nErrCode; + NT::IO_STATUS_BLOCK StatusBlk; + nErrCode = NtWriteFile( (NT::HANDLE)hFile, NULL, NULL, NULL, + &StatusBlk, pBuffer, cbWrite, 0, NULL ); + // FIXME *pcbActual = StatusBlk.Information; + // do an errorcode translation FIXME: correct + return ERROR_CALL_NOT_IMPLEMENTED; + switch(nErrCode) + { +/* + case STATUS_SUCCESS: + case STATUS_PENDING: + case STATUS_ACCESS_DENIED: + case STATUS_INVALID_HANDLE: + case STATUS_FILE_LOCK_CONFLICT: + return 0; + */ + } + return 0; +} + + + diff --git a/rossubsys/os2/lib/doscalls/implemented_functions_info.txt b/rossubsys/os2/lib/doscalls/implemented_functions_info.txt new file mode 100644 index 00000000000..0533e990cae --- /dev/null +++ b/rossubsys/os2/lib/doscalls/implemented_functions_info.txt @@ -0,0 +1,1063 @@ +Creator: robert K. robertk@mok.lvcm.com + +This is a list of all functions of the doscalls.dll from OS/2. +Since ReactOS is an OS with flat model and since we have no +ambitions to support 16-Bit OS/2 apps, we'll not implement souch +16Bit-functions. Above that, we want to port ReacOS and the OS/2 sub +system to other platforms (i.e. the PowerPC ;-D ). These platforms +however don't permit segmented code and memory. + + +Semantics of this file: +======================= +Functions with nothing behind are not yet implemented/considered. +Functions with a ??? should be considered later. +Functions with a --- will not be implemented. +Functions with a - xxx are implemented in some file + +in the directory xxx: +file- file, pipe io +sync- thread synchronisation +mem - memory considerations +misc- internal and indifferent stuff +mou - mouse sub system +kbd - keyboard sub system +vio - video/console io +run - processes and threads +... + + +1 DosICreateThread ??? +2 Dos16Cwait --- +3 Dos16EnterCritSec --- +4 DosIExecPgm ??? +5 Dos16Exit --- +6 Dos16ExitCritSec +7 Dos16ExitList +8 Dos16GetInfoSeg +9 Dos16GetPrty +10 Dos16KillProcess +11 Dos16SetPrty +12 Dos16Ptrace +13 Dos16HoldSignal +14 Dos16SetSigHandler +15 Dos16FlagProcess +16 Dos16MakePipe +17 DosISysSemClear +18 DosISemRequest +19 DosISysSemSet +20 Dos16SemSetWait +21 DosISemWait +22 Dos16MuxSemWait +23 Dos16CloseSem +24 Dos16CreateSem +25 Dos16OpenSem +26 Dos16ResumeThread +27 Dos16SuspendThread +28 Dos16SetDateTime +29 Dos16TimerAsync +30 Dos16TimerStart +31 Dos16TimerStop +32 Dos16Sleep +33 Dos16GetDateTime +34 Dos16AllocSeg +35 Dos16AllocShrSeg +36 Dos16GetShrSeg +37 Dos16GiveSeg +38 Dos16ReallocSeg +39 Dos16FreeSeg +40 Dos16AllocHuge +41 Dos16GetHugeShift +42 Dos16ReallocHuge +43 Dos16CreateCSAlias +44 Dos16LoadModule +45 Dos16GetProcAddr +46 Dos16FreeModule +47 Dos16GetModHandle +48 Dos16GetModName +49 Dos16GetMachineMode +50 Dos16Beep +51 Dos16CLIAccess +52 Dos16DevConfig +53 Dos16DevIOCtl +54 Dos16SGSwitch +55 Dos16SGSwitchMe +56 Dos16BufReset +57 Dos16ChDir +58 Dos16ChgFilePtr +59 Dos16Close +60 Dos16Delete +61 Dos16DupHandle +62 Dos16FileLocks +63 Dos16FindClose +64 Dos16FindFirst +65 Dos16FindNext +66 Dos16MkDir +67 Dos16Move +68 Dos16NewSize +69 Dos16PortAccess +70 Dos16Open +71 Dos16QCurDir +72 Dos16QCurDisk +73 Dos16QFHandState +74 Dos16QFileInfo +75 Dos16QFileMode +76 Dos16QFSInfo +77 Dos16QHandType +78 Dos16QVerify +79 DosIRead +80 Dos16RmDir +81 Dos16SelectDisk +82 Dos16SetFHandState +83 Dos16SetFileInfo +84 Dos16SetFileMode +85 Dos16SetMaxFH +86 Dos16SetVerify +87 DosIWrite +88 Dos16SystemService +89 Dos16SetVec +90 Dos16SysTrace +91 Dos16GetEnv +92 Dos16GetVersion +93 Dos16QTraceInfo +94 Dos16GetPID +95 Dos16Open2 +96 Dos16LibInit +97 Dos16SetFSInfo +98 Dos16QPathInfo +99 Dos16DevIOCtl2 +100 DosICanonicalize +101 Dos16SetFgnd +102 Dos16SwapTaskInit +103 Dos16ReadPhys +104 Dos16SetPathInfo +105 Dos16SGSwitchProc2 +106 STRUCHECK +107 STRURESUPDATE +108 DosISetRelMaxFH +109 DosIDevIOCtl +110 Dos32ForceDelete +111 Dos32KillThread +112 Dos32QueryRASInfo +113 Dos32DumpProcess +114 Dos32SuppressPopUps +115 THK32ALLOCMEM +116 THK32FREEMEM +117 THK32ALLOCSTACK +118 DosOpen2Compt +119 Dos16GetSTDA +120 Dos16Error +121 Dos16GetSeg +122 Dos16LockSeg +123 Dos16UnlockSeg +124 Dos16SGSwitchProc +125 DosIRamSemWake +126 Dos16SizeSeg +127 Dos16MemAvail +128 DosIRamSemRequest +129 DosPhysicalDisk +130 Dos16GetCP +131 DosISetCP +132 DosGlobalSeg +133 Dos16Profile +134 Dos16SendSignal +135 DosHugeShift +136 DosHugeIncr +137 Dos16Read +138 Dos16Write +139 Dos16ErrClass +140 Dos16SemRequest +141 Dos16SemClear +142 Dos16SemWait +143 Dos16SemSet +144 Dos16ExecPgm +145 Dos16CreateThread +146 Dos16SubSet +147 Dos16SubAlloc +148 Dos16SubFree +149 Dos16ReadAsync +150 Dos16WriteAsync +151 Dos16SearchPath +152 Dos16ScanEnv +153 Dos16SetCP +154 Dos16QProcStatus +155 Dos16GetResource +156 Dos16GetPPID +157 Dos16CallBack +158 DosICallBack +159 DosRetForward +160 Dos16R2StackRealloc +161 Dos16FSRamSemRequest +162 Dos16FSRamSemClear +163 Dos16QAppType +164 Dos16SetProcCP +165 Dos16DynamicTrace +166 Dos16QSysInfo +167 DosIMakeNmPipe +168 DosICallNmPipe +169 DosIConnectNmPipe +170 DosIDisconnectNmPipe +171 DosIPeekNmPipe +172 DosIQNmPipeInfo +173 DosIQNmPHandState +174 DosISetNmPHandState +175 DosITransactNmPipe +176 DosIWaitNmPipe +177 DosISetNmPipeSem +178 DosIQNmPipeSemState +179 DosIRawReadNmPipe +180 DosIRawWriteNmPipe +181 Dos16FSAttach +182 Dos16QFSAttach +183 Dos16FSCtl +184 Dos16FindFirst2 +185 Dos16MkDir2 +186 Dos16FileIO +187 Dos16FindNotifyClose +188 Dos16FindNotifyFirst +189 Dos16FindNotifyNext +190 Dos16SetTraceInfo +191 Dos16EditName +192 Dos16LogMode +193 Dos16LogEntry +194 Dos16GetLogBuffer +195 Dos16LogRegister +196 Dos16LogRead +197 Dos16FindFromName +198 Dos16OPLockRelease +199 Dos16OPLockWait +200 DosICopy +201 Dos16Copy +202 DosIQAppType +203 DosForceDelete +204 DosEnumAttribute +205 Dos16OPLockShutdown +206 DosShutdown +207 DosGetResource2 +208 DosFreeResource +209 Dos32SetMaxFH +210 Dos32SetVerify +211 Dos32ErrClass +212 Dos32Error +213 DosCreateVDM +214 DosMaxPathLen +215 DosPageSize +216 DosLocalInfo +217 DosGlobalInfo +218 Dos32SetFileInfo +219 Dos32SetPathInfo +220 Dos32SetDefaultDisk +221 Dos32SetFHState +222 Dos32SetFSInfo +223 Dos32QueryPathInfo +224 Dos32QueryHType +225 Dos32QueryVerify +226 Dos32DeleteDir +227 Dos32ScanEnv +228 Dos32SearchPath +229 Dos32Sleep +230 Dos32GetDateTime +231 Dos32DevConfig +232 Dos32EnterCritSec +233 Dos32ExitCritSec +234 Dos32Exit run +235 Dos32KillProcess +236 Dos32SetPriority +237 Dos32ResumeThread +238 Dos32SuspendThread +239 Dos32CreatePipe +240 Dos32CallNPipe +241 Dos32ConnectNPipe +242 Dos32DisConnectNPipe +243 Dos32CreateNPipe +244 Dos32PeekNPipe +245 Dos32QueryNPHState +246 Dos32RawReadNPipe +247 Dos32RawWriteNPipe +248 Dos32QueryNPipeInfo +249 Dos32QueryNPipeSemState +250 Dos32SetNPHState +251 Dos32SetNPipeSem +252 Dos32TransactNPipe +253 Dos32WaitNPipe +254 Dos32ResetBuffer +255 Dos32SetCurrentDir +256 Dos32SetFilePtr +257 Dos32Close +258 Dos32Copy +259 Dos32Delete +260 Dos32DupHandle +261 Dos32EditName +262 THK32FREESTACK +263 Dos32FindClose +264 Dos32FindFirst +265 Dos32FindNext +266 Dos16OpenVDD +267 Dos16RequestVDD +268 Dos16CloseVDD +269 Dos32FSAttach +270 Dos32CreateDir +271 Dos32Move +272 Dos32SetFileSize +273 Dos32Open +274 Dos32QueryCurrentDir +275 Dos32QueryCurrentDisk +276 Dos32QueryFHState +277 Dos32QueryFSAttach +278 Dos32QueryFSInfo +279 Dos32QueryFileInfo +280 Dos32WaitChild +281 Dos32Read +282 Dos32Write +283 Dos32ExecPgm +284 Dos32DevIOCtl +285 Dos32FSCtl +286 Dos32Beep +287 Dos32PhysicalDisk +288 Dos32SetCp +289 Dos32SetProcessCp +290 Dos32StopTimer +291 Dos32QueryCp +292 Dos32SetDateTime +293 Thk32AllocBlock +294 Thk32FreeBlock +295 Thk32R3DS +296 Dos32ExitList +297 Dos32AllocProtectedMem +298 Dos32AliasMem +299 Dos32AllocMem +300 Dos32AllocSharedMem +301 Dos32GetNamedSharedMem +302 Dos32GetSharedMem +303 Dos32GiveSharedMem +304 Dos32FreeMem +305 Dos32SetMem +306 Dos32QueryMem +307 Dos32QueryMemState +308 Dos32OpenVDD +309 Dos32RequestVDD +310 Dos32CloseVDD +311 Dos32CreateThread +312 Dos32GetInfoBlocks +313 Dos16AllocProtSeg +314 Dos16AllocShrProtSeg +315 Dos16AllocProtHuge +316 Dos32DynamicTrace +317 Dos32Debug +318 Dos32LoadModule +319 Dos32QueryModuleHandle +320 Dos32QueryModuleName +321 Dos32QueryProcAddr +322 Dos32FreeModule +323 Dos32QueryAppType +324 Dos32CreateEventSem +325 Dos32OpenEventSem +326 Dos32CloseEventSem +327 Dos32ResetEventSem +328 Dos32PostEventSem +329 Dos32WaitEventSem +330 Dos32QueryEventSem +331 Dos32CreateMutexSem +332 Dos32OpenMutexSem +333 Dos32CloseMutexSem +334 Dos32RequestMutexSem +335 Dos32ReleaseMutexSem +336 Dos32QueryMutexSem +337 Dos32CreateMuxWaitSem +338 Dos32OpenMuxWaitSem +339 Dos32CloseMuxWaitSem +340 Dos32WaitMuxWaitSem +341 Dos32AddMuxWaitSem +342 Dos32DeleteMuxWaitSem +343 Dos32QueryMuxWaitSem +344 Dos32SubSetMem +345 Dos32SubAllocMem +346 Dos32SubFreeMem +347 Dos32SubUnsetMem +348 Dos32QuerySysInfo +349 Dos32WaitThread +350 Dos32AsyncTimer +351 Dos32StartTimer +352 Dos32GetResource +353 Dos32FreeResource +354 Dos32SetExceptionHandler +355 Dos32UnsetExceptionHandler +356 Dos32RaiseException +357 Dos32UnwindException +358 Dos32QueryPageUsage +359 Dos16QueryModFromCS +360 Dos32QueryModFromEIP +361 DosFPDataArea +362 Dos32TmrQueryFreq +363 Dos32TmrQueryTime +364 Dos32AliasPerfCtrs +365 Dos32ConfigPerf +366 Dos32DeconPerf +367 Dos32RegisterPerfCtrs +368 Dos32QuerySysState +369 Dos32FlatCS +370 Dos32FlatDS +371 Dos32QueryABIOSSupport +372 Dos32EnumAttribute +373 Dos32QueryDosProperty +374 Dos32SetDosProperty +375 Dos16QueryDosProperty +376 Dos16SetDosProperty +377 Dos32Profile +378 Dos32SetSignalExceptionFocus +379 Dos32SendSignalException +380 Dos32EnterMustComplete +381 Dos32ExitMustComplete +382 Dos32SetRelMaxFH +383 Dos16PutMessage +384 Dos16TrueGetMessage +385 Dos16InsMessage +386 Dos32InsertMessage +387 Dos32PutMessage +388 Dos32TrueGetMessage +389 DosIQueryMessageCP +390 Dos32IQueryMessageCP +391 Dos16CaseMap +392 Dos16GetCollate +393 Dos16GetCtryInfo +394 Dos16GetDBCSEv +395 Dos32QueryCtryInfo +396 Dos32QueryDBCSEnv +397 Dos32MapCase +398 Dos32QueryCollate +399 Dos16MakeNmPipe +400 Dos16QNmPipeInfo +401 Dos16ConnectNmPipe +402 Dos16DisconnectNmPipe +403 Dos16QNmPHandState +404 Dos16SetNmPHandState +405 Dos16PeekNmPipe +406 Dos16WaitNmPipe +407 Dos16TransactNmPipe +408 Dos16CallNmPipe +409 Dos16RawReadNmPipe +410 Dos16RawWriteNmPipe +411 Dos16SetNmPipeSem +412 Dos16QNmPipeSemState +413 StartLazyWriter +414 _QueInst_Data +415 Dos32Shutdown +416 Dos32ICacheModule +417 Dos32ReplaceModule +418 Dos32AcknowledgeSignalException +419 Dos32TIB +420 Dos16TmrQueryFreq +421 Dos16TmrQueryTime +422 Dos16RegisterPerfCtrs +423 Dos16FlatToSel +424 Dos16SelToFlat +425 Dos32FlatToSel +426 Dos32SelToFlat +427 DosIODelayCnt +428 Dos32SetFileLocks +429 Dos32CancelLockRequest +430 Dos32GetLocaleModule +430 LogOpen +431 LogClose +432 LogAddEntries +433 LogGetEntries +434 LogSetState +435 LogSetName +436 LogQueryState +437 Dos16OpenChangeNotify +438 Dos16ResetChangeNotify +439 Dos16CloseChangeNotify +440 Dos32OpenChangeNotify +441 Dos32ResetChangeNotify +442 Dos32CloseChangeNotify +443 Dos16QueryABIOSSupport +444 Dos32ForceSystemDump +447 Dos32GetProcessorStatus +448 Dos32SetProcessorStatus +449 Dos16CreateSpinLock +450 Dos16AcquireSpinLock +451 Dos16ReleaseSpinLock +452 Dos16FreeSpinLock +453 Dos32TestPSD +454 Dos32AllocThreadLocalMemory +455 Dos32FreeThreadLocalMemory +460 Dos32VerifyPIDTID +464 PTDA_LANMAN_SEC +465 PTDA_PID +466 SAS_SEL +467 TCB_OPCOOKIE +468 TCB_OPFLAGS +469 TCB_NEWFLAGS +470 TCB_USER_ID +471 TCB_PROC_ID +472 TCB_FSHARING +473 TCB_SRVATTRIB +474 TCB_ALLOWED +475 TCB_PRTCB +476 TCB_NUMBER +477 TCB_THISSFT +478 TCB_THISCDS +479 TKOPTDA +480 PTDA_CRITSEC +481 PTDA_HOLDSIGCNT +482 PTDA_PPTDAPARENT +483 PTDA_PGDATA +484 PTDA_HANDLE +485 PTDA_MODULE +486 PTDA_LDTHANDLE +487 PTDA_CODEPAGE_TAG +488 PTDA_JFN_LENGTH +489 PTDA_JFN_PTABLE +490 PTDA_JFN_FLG_PTR +491 PTDA_EXTERR_LOCUS +492 PTDA_EXTERR +493 PTDA_EXTERR_ACTION +494 PTDA_EXTERR_CLASS +495 PTDA_PPID +496 PTDA_PROCTYPE +497 PTDA_CURRTCB +498 PTDA_CURRTSD +499 PTDA_SIGNATURE +500 T32EXITLIST +501 T32ALLOCPROTECTEDMEM +502 T32ALIASMEM +503 T32ALLOCMEM +504 T32ALLOCSHAREDMEM +505 T32GETNAMEDSHAREDMEM +506 T32GETSHAREDMEM +507 T32GIVESHAREDMEM +508 T32FREEMEM +509 T32SETMEM +510 T32QUERYMEM +511 T32QUERYMEMSTATE +512 T32OPENVDD +513 T32REQUESTVDD +514 T32CLOSEVDD +515 T32CREATETHREAD +516 T32DYNAMICTRACE +517 T32DEBUG +518 T32QUERYPROCADDR +519 T32CREATEEVENTSEM +520 T32OPENEVENTSEM +521 T32CLOSEEVENTSEM +522 T32RESETEVENTSEM +523 T32POSTEVENTSEM +524 T32WAITEVENTSEM +525 T32QUERYEVENTSEM +526 T32CREATEMUTEXSEM +527 T32OPENMUTEXSEM +528 T32CLOSEMUTEXSEM +529 T32REQUESTMUTEXSEM +530 T32RELEASEMUTEXSEM +531 T32QUERYMUTEXSEM +532 T32CREATEMUXWAITSEM +533 T32OPENMUXWAITSEM +534 T32CLOSEMUXWAITSEM +535 T32WAITMUXWAITSEM +536 T32ADDMUXWAITSEM +537 T32DELETEMUXWAITSEM +538 T32QUERYMUXWAITSEM +539 T32QUERYSYSINFO +540 T32WAITTHREAD +541 DosIOpenL +541 T32GETRESOURCE +542 DosIProtectOpenL +542 T32FREERESOURCE +543 DosISetFileSizeL +543 T32EXCEPTIONCALLBACK +544 DosIProtectSetFileSizeL +544 T32QUERYPAGEUSAGE +545 Dos32ExceptionCallBack +546 TI32ASYNCTIMER +546 THK32STRLEN +547 TI32STARTTIMER +547 THK_UNITHUNK +548 Dos32R3ExceptionDispatcher +549 DosLibiDisp +550 DosLibiDisp16 +551 DosLibiDisp32 +552 DosR3ExitAddr +553 Dos32R3ExitAddr +554 Dos32IRead +555 T32IREAD +556 Dos32IWrite +557 Dos32CreateSpinLock +557 T32IWRITE +558 Dos32AcquireSpinLock +558 T32TMRQUERYFREQ +559 Dos32ReleaseSpinLock +559 T32TMRQUERYTIME +560 Dos32FreeSpinLock +560 T32ALIASPERFCTRS +561 Dos32PMR3WaitEventSem +561 T32CONFIGUREPERF +562 Dos32PMR3PostEventSem +562 T32DECONPERF +563 Dos32QueryThreadAffinity +563 T32REGISTERPERFCTRS +564 Dos32SetThreadAffinity +564 T32QUERYSYSSTATE +565 DosISetFileInfo +566 DosISetPathInfo +567 DosOpenL +567 T32QUERYDOSPROPERTY +568 DosSetFilePtrL +568 T32SETDOSPROPERTY +569 DosIFindNext +570 DosSetFileSizeL +570 T32PROFILE +571 T32QUERYRESOURCESIZE +572 Dos32QueryResourceSize +573 DosQueryResourceSize +574 T32SETSIGNALEXCEPTIONFOCUS +574 DosPMSemWait +575 T32SENDSIGNALEXCEPTION +575 DosPMMuxSemWait +576 T32STARTTIMER +576 THK16_UNITHUNK +577 T32STOPTIMER +577 HT16_STARTUP +578 T32ASYNCTIMER +578 HT16_CLEANUP +579 T32INITIALIZEPORTHOLE +579 HT32_STARTUP +580 Dos32InitializePorthole +581 T32QUERYHEADERINFO +581 HT32_CLEANUP +582 Dos32QueryHeaderInfo +583 DosInitializePorthole +584 DosQueryHeaderInfo +585 T32QUERYPROCTYPE +585 _Dos32IMonRead +586 Dos32QueryProcType +587 DosQueryProcType +588 T32IEXITMUSTCOMPLETE +588 _Dos32IMonWrite +589 DosISigDispatch +590 T32ICACHEMODULE +590 Dos32PMPostEventSem +591 T32DLLTERM +591 Dos32PMWaitEventSem +592 Dos32DllTermDisp +593 T32IRAISEEXCEPTION +593 Dos32PMRequestMutexSem +594 Dos32IRaiseException +595 T32ACKNOWLEDGESIGNALEXC +595 Dos32PMWaitMuxWaitSem +596 Dos32PM16SemChk +597 Dos32IQueryFHState +598 Dos32ISetFHState +599 Dos32LDTSel +600 Dos32R3Frestor +601 DosIFindFirst +602 T32SETFILELOCKS +603 T32CANCELLOCKREQUEST +604 T32IMONREAD +605 T32IMONWRITE +606 DosMonOpen +607 DosMonClose +608 DosMonRead +609 DosMonWrite +610 DosMonReg +611 T32KILLTHREAD +612 TQUERYRASINFO +615 Dos32IProtectWrite +617 DosIProtectSetFileInfo +618 Dos32IProtectSetFileInfo +619 Dos32IProtectSetFHState +620 Dos32IProtectQueryFHState +621 Dos32ProtectSetFilePtr +622 Dos16ProtectClose +623 Dos16ProtectFileIO +624 Dos16ProtectFileLocks +625 DosIProtectRead +626 DosIProtectWrite +627 Dos16ProtectNewSize +628 Dos16ProtectOpen +629 Dos16ProtectQFHandState +630 Dos16ProtectSetFHandState +631 Dos16ProtectQFileInfo +632 Dos16ProtectSetFileInfo +634 Dos16ProtectChgFilePtr +635 Dos16ProtectEnumAttribute +636 Dos32ProtectEnumAttribute +637 Dos32ProtectOpen +638 Dos32ProtectClose +639 Dos32ProtectSetFileLocks +640 Dos32ProtectSetFileSize +641 Dos32ProtectRead +642 Dos32ProtectWrite +643 Dos32ProtectSetFileInfo +644 Dos32ProtectSetFHState +645 Dos32ProtectQueryFHState +646 Dos32ProtectQueryFileInfo +647 Dos32IProtectRead +649 DosCloseMessageFile +650 DosLDRDirtyWorker +651 Dos16LDRDirtyWorker +652 Dos32IGetInfoBlocks +653 T32IGETINFOBLOCKS +656 T32GETPROCESSORSTATUS +657 T32SETPROCESSORSTATUS +658 T32TESTPSD +659 T32QUERYTHREADAFFINITY +660 T32SETTHREADAFFINITY +661 Dos32ReadQueue +662 Dos32PurgeQueue +663 Dos32CloseQueue +664 Dos32QueryQueue +665 Dos32PeekQueue +666 Dos32WriteQueue +667 Dos32OpenQueue +668 Dos32CreateQueue +669 Dos32StartSession +670 Dos32SelectSession +671 Dos32SetSession +672 Dos32StopSession +673 DosRegisterNotification +674 Dos16ReadQueue +675 Dos16PurgeQueue +676 Dos16CloseQueue +677 Dos16QueryQueue +678 Dos16PeekQueue +679 Dos16WriteQueue +680 Dos16OpenQueue +681 Dos16CreateQueue +682 Dos16SMGetmem +683 Dos16SMFreemem +684 Dos16SMGetSGCB +685 Dos16SMInitSGCB +686 Dos16SMSGDoPopup +687 Dos16SMSwitch +688 Dos16SMServeAppReq +689 Dos16GetTimes +690 Dos16SMSetTitle +691 Dos16ScrUnlock +692 Dos16SMDoAppReq +693 Dos16StopSession +694 Dos16SelectSession +695 Dos16ScrLock +696 Dos16SavRedrawWait +697 Dos16SavRedrawUndo +698 Dos16SMSGEndPopup +699 Dos16SetSession +700 Dos16SetMNLockTime +701 Dos16ModeUndo +702 Dos16StartSession +703 Dos16SMGetStatus +704 Dos16ModeWait +705 Dos16SMTerminate +706 Dos16SMGetAppReq +707 Dos16SMInitialize +708 Dos16SMStart +709 Dos16SMParentSwitch +710 Dos16SMPause +711 Dos16SMHDeinit +712 Dos16SMPMPresent +713 Dos16SMRegisterDD +714 Dos16SMNotifyDD +715 Dos16SMNotifyDD2 +716 Dos16SMOpenDD +717 Dos16SMSetSessionType +718 OS2BaseInit +719 MouGetPtrShape +720 MouSetPtrShape +721 MouGetNumMickeys +722 MouGetThreshold +723 MouShellInit +724 MouGetScaleFact +725 MouFlushQue +726 MouGetNumButtons +727 MouClose +728 MouSetThreshold +729 MouSetScaleFact +730 MouGetNumQueEl +731 MouDeRegister +732 MouGetEventMask +733 MouSetEventMask +734 MouOpen +735 MouRemovePtr +736 MouGetPtrPos +737 MouReadEventQue +738 MouSetPtrPos +739 MouGetDevStatus +740 MouSynch +741 MouRegister +742 MouSetDevStatus +743 MouDrawPtr +744 MouInitReal +745 KbdSetCustXt +746 KbdInit +747 KbdGetCp +748 KbdCharIn +749 KbdSetCp +750 KbdLoadInstance +751 KbdSynch +752 KbdRegister +753 KbdStringIn +754 KbdGetStatus +755 KbdSetStatus +756 KbdGetFocus +757 KbdFlushBuffer +758 KbdXlate +759 KbdSwitchFgnd +760 KbdShellInit +761 KbdClose +762 KbdFreeFocus +763 KbdFree +764 KbdDeRegister +765 KbdSetFgnd +766 KbdPeek +767 KbdOpen +768 KbdGetHWId +769 KbdSetHWId +770 VioEndPopup +771 VioGetPhysBuf +772 VioGetAnsi +773 VioFree +774 VioSetAnsi +775 VioDeRegister +776 VioScrollUp +777 VioPrtSc +778 VioGetCurPos +779 VioWrtCellStr +780 VioPopUp +781 VioScrollRt +782 VioWrtCharStr +783 Avs_Prtsc +784 VioSetCurPos +785 VioSrfUnblock +786 VioSrfBlock +787 VioScrUnlock +788 VioWrtTty +789 VioSave +790 VioGetMode +791 VioSetMode +792 VioScrLock +793 VioReadCellStr +794 VioSavRedrawWait +795 VioWrtNAttr +796 VioGetCurType +797 VioSavRedrawUndo +798 VioGetFont +799 VioReadCharStr +800 VioGetBuf +801 VioSetCurType +802 VioSetFont +803 VioHetInit +804 VioModeUndo +805 VioSswSwitch +806 VioModeWait +807 Avs_PrtscToggle +808 VioGetCp +809 VioRestore +810 VioSetCp +811 VioShowBuf +812 VioScrollLf +813 VioRegister +814 VioGetConfig +815 VioScrollDn +816 VioWrtCharStrAtt +817 VioGetState +818 VioPrtScToggle +819 VioSetState +820 VioWrtNCell +821 VioWrtNChar +822 VioShellInit +823 VioAssociate +824 VioCreatePS +825 VioDeleteSetId +826 VioGetDeviceCellSize +827 VioGetOrg +828 VioCreateLogFont +829 VioDestroyPS +830 VioQuerySetIds +831 VioSetOrg +832 VioQueryFonts +833 VioSetDeviceCellSize +834 VioShowPS +835 VioGetPSAddress +836 VioQueryConsole +837 VioRedrawSize +838 VioGlobalReg +839 XVioSetCAState +840 XVioCheckCharType +841 XVioDestroyCA +842 XVioCreateCA +843 VioCheckCharType +844 XVioGetCAState +845 BVSMAIN +846 BVSREDRAWSIZE +847 BVSGETPTRDRAWNAME +848 AnsiInject +849 AnsiKeydef +850 AnsiInterp +851 BKSMAIN +852 BMSMAIN +853 MouGetHotKey +854 MouSetHotKey +855 Dos16SMSysInit +856 QhKeybdHandle +857 QhMouseHandle +858 SMQueueRamSem +859 SMArray +860 SMPIDArray +861 SMInitialized +862 SMArraySize +863 BVSGLOBAL +864 SMGINSTANCE +865 BVHINSTANCE +866 THK32ALIASMEM +867 THK32FREEALIAS +868 THK32ALLOCVARLEN +869 THK32HANDLEBOUNDARY +870 THK32HANDLESTRING +871 THK32DEALLOC +872 THK32XHNDLR +873 Dos32SetExtLIBPATH +874 Dos32QueryExtLIBPATH +875 Dos32PM16SemRst +876 Dos32SysCtl +877 Dos32QueryThreadContext +878 DosSGQueryTopmost +976 Dos32PerfSysCall +981 Dos32OpenL +982 Dos32ProtectOpenL +983 Dos32ProtectSetFileLocksL +984 Dos32ProtectSetFilePtrL +985 Dos32ProtectSetFileSizeL +986 Dos32SetFileLocksL +987 Dos32CancelLockRequestL +988 Dos32SetFilePtrL +989 Dos32SetFileSizeL +990 Dos32ListIOL +991 Dos16FSRamSemRequest2 +992 Dos16FSRamSemClear2 +995 Dos32SystemService +996 Dos32ListIO +997 Dos32CreateThread2 +998 Dos16SetExtLIBPATH +999 Dos16QueryExtLIBPATH +1000 T32EXITLIST +1001 T32ALLOCPROTECTEDMEM +1002 T32ALIASMEM +1003 T32ALLOCMEM +1004 T32ALLOCSHAREDMEM +1005 T32GETNAMEDSHAREDMEM +1006 T32GETSHAREDMEM +1007 T32GIVESHAREDMEM +1008 T32FREEMEM +1009 T32SETMEM +1010 T32QUERYMEM +1011 T32QUERYMEMSTATE +1012 T32OPENVDD +1013 T32REQUESTVDD +1014 T32CLOSEVDD +1015 T32CREATETHREAD +1016 T32DYNAMICTRACE +1017 T32DEBUG +1018 T32QUERYPROCADDR +1019 T32CREATEEVENTSEM +1020 T32OPENEVENTSEM +1021 T32CLOSEEVENTSEM +1022 T32RESETEVENTSEM +1023 T32POSTEVENTSEM +1024 T32WAITEVENTSEM +1025 T32QUERYEVENTSEM +1026 T32CREATEMUTEXSEM +1027 T32OPENMUTEXSEM +1028 T32CLOSEMUTEXSEM +1029 T32REQUESTMUTEXSEM +1030 T32RELEASEMUTEXSEM +1031 T32QUERYMUTEXSEM +1032 T32CREATEMUXWAITSEM +1033 T32OPENMUXWAITSEM +1034 T32CLOSEMUXWAITSEM +1035 T32WAITMUXWAITSEM +1036 T32ADDMUXWAITSEM +1037 T32DELETEMUXWAITSEM +1038 T32QUERYMUXWAITSEM +1039 T32QUERYSYSINFO +1040 T32WAITTHREAD +1041 T32GETRESOURCE +1042 T32FREERESOURCE +1043 T32EXCEPTIONCALLBACK +1044 T32QUERYPAGEUSAGE +1045 T32FORCESYSTEMDUMP +1046 TI32ASYNCTIMER +1047 TI32STARTTIMER +1048 T32QUERYABIOSSUPPORT +1049 T32QUERYMODFROMEIP +1050 T32ALIASPERFCTRS +1051 T32CONFIGUREPERF +1052 T32DECONPERF +1053 T32REGISTERPERFCTRS +1054 T32QUERYSYSSTATE +1055 T32IREAD +1056 T32IWRITE +1057 T32TMRQUERYFREQ +1058 T32TMRQUERYTIME +1059 T32IMONREAD +1060 T32IMONWRITE +1061 T32QUERYRESOURCESIZE +1062 T32PROFILE +1063 T32SETSIGNALEXCEPTIONFOCUS +1064 T32SENDSIGNALEXCEPTION +1065 T32STARTTIMER +1066 T32STOPTIMER +1067 T32ASYNCTIMER +1068 T32INITIALIZEPORTHOLE +1069 T32QUERYHEADERINFO +1070 T32QUERYPROCTYPE +1071 T32IEXITMUSTCOMPLETE +1072 T32ICACHEMODULE +1073 T32DLLTERM +1074 T32IRAISEEXCEPTION +1075 T32ACKNOWLEDGESIGNALEXCEPTION +1076 T32QUERYDOSPROPERTY +1077 T32SETDOSPROPERTY +1078 T32SETFILELOCKS +1079 T32CANCELLOCKREQUEST +1080 T32KILLTHREAD +1081 TQUERYRASINFO +1082 T32DUMPPROCESS +1083 T32SUPPRESSPOPUPS +1084 T32IPROTECTWRITE +1085 T32PROTECTSETFILELOCKS +1086 T32IPROTECTREAD +1087 T32PMPOSTEVENTSEM +1088 T32PMWAITEVENTSEM +1089 T32PMREQUESTMUTEXSEM +1090 T32PMWAITMUXWAITSEM +1091 T32PM16SEMCHK +1092 T32ALLOCTHREADLOCALMEMORY +1093 T32FREETHREADLOCALMEMORY +1094 T32SETEXTLIBPATH +1095 T32QUERYEXTLIBPATH +1096 T32PM16SEMRST +1097 T32VERIFYPIDTID +1098 T32SYSCTL +1099 T32QUERYTHREADCONTEXT +1101 T32PERFSYSCALL +1102 T32LISTIO +1103 T32PMR3WAITEVENTSEM +1104 T32PMR3POSTEVENTSEM +1105 T32CREATETHREAD2 +1106 T32PROTECTSETFILELOCKSL +1107 T32IPROTECTSETFILEPTRL +1108 T32SETFILELOCKSL +1109 T32CANCELLOCKREQUESTL +1110 T32ISETFILEPTRL +1111 T32LISTIOL +1116 T32ISETFILEPTR +1117 T32IPROTECTSETFILEPTR +9004 Dos32CreateRamSem +9005 Dos32CloseRamSem +9006 Dos32OpenRamSem +9007 Dos32RequestRamSem +9008 Dos32ReleaseRamSem +9010 Dos32QueryProcessInfo +9011 Dos32QueryThreadInfo +9018 Dos32FindFromName + + diff --git a/rossubsys/os2/lib/doscalls/makefile b/rossubsys/os2/lib/doscalls/makefile new file mode 100644 index 00000000000..e84ae7225d8 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/makefile @@ -0,0 +1,61 @@ +# $Id: makefile,v 1.7 2004/01/31 01:29:11 robertk Exp $ + +PATH_TO_TOP = ../../../reactos + +PATH_TO_OS2_TOP = ../.. + +TARGET_TYPE = dynlink + +#TARGET_DEFONLY = yes + +TARGET_NAME = doscalls + +TARGET_BASE = 0x68E00000 + +TARGET_CPPFLAGS =\ + -Wall \ + -I$(PATH_TO_OS2_TOP)/include \ + -D__DOSCALLSDLL__ +# removed CFLAGX +# -fno-builtin \ +# -nostdinc \ +# -nostdlib \ + +TARGET_ENTRY = _DllMain@12 + +TARGET_LFLAGS = -nostartfiles + +TARGET_LIBS = doscalls.a + +TARGET_SDKLIBS = ntdll.a + +TARGET_GCCLIBS = stdc++ + +TARGET_OBJECTS = $(TARGET_NAME).o + + +MISC_OBJECTS = misc/doscalls.o misc/error.o + +FILE_OBJECTS = file/openclose.o + +RUN_OBJECTS = run/process.o + +DEVICES_OBJECTS = devices/devices.o + +OTHER_OBJECTS = + +SYNC_OBJECTS = + +TARGET_OBJECTS = $(FILE_OBJECTS) $(RUN_OBJECTS) $(DEVICES_OBJECTS) \ + $(MISC_OBJECTS) $(OTHER_OBJECTS) $(SYNC_OBJECTS) + +#TARGET_CLEAN = file/*.o vio/*.o sync/*.o mem/*.o \ +# misc/*.o mou/*.o kbd/*.o run/*.o \ +# doscalls.dll temp.exp + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + + +# EOF diff --git a/rossubsys/os2/lib/doscalls/memory/memory.cpp b/rossubsys/os2/lib/doscalls/memory/memory.cpp new file mode 100644 index 00000000000..4be00abaa63 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/memory/memory.cpp @@ -0,0 +1,40 @@ + + + +// TODO: HEader: To be pasted + + + + +// INCL_DOSMEMMGR || !INCL_NOCOMMON +#define INCL_DOSMEMMGR +#undefine INCL_NOCOMMON + +#include + + +// TODO: Expain that this is for memory alloc/free funcs of Os2 api + + + +// TODO: Implement functions and give them bodies +ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize, + ULONG ulAllocationFlags); +ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName, + ULONG ulObjectSize, ULONG ulAllocationFlags); +ULONG DosFreeMem (PVOID pBaseAddress); +ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName, + ULONG ulAttributeFlags); +ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags); +ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId, + ULONG ulAttributeFlags); +ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize, + PULONG pulAllocationFlags); +ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize, + ULONG ulAttributeFlags); +ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize); +ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize); +ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize); +ULONG DosSubUnsetMem (PVOID pOffset); + +// TODO: Add file to makefile \ No newline at end of file diff --git a/rossubsys/os2/lib/doscalls/misc/doscalls.cpp b/rossubsys/os2/lib/doscalls/misc/doscalls.cpp new file mode 100644 index 00000000000..cc40f9c31f1 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/misc/doscalls.cpp @@ -0,0 +1,33 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * FILE: dll/doscalls.c + * PURPOSE: Kernelservices for OS/2 apps + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 13-03-2002 Created + */ + + +// here's only the NTDLL needet +#include + + + + +BOOL STDCALL DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) +{ + switch (ul_reason_for_call) + { + case 1://DLL_PROCESS_ATTACH: + case 2://DLL_THREAD_ATTACH: + case 3://DLL_THREAD_DETACH: + case 0://DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/rossubsys/os2/lib/doscalls/misc/error.cpp b/rossubsys/os2/lib/doscalls/misc/error.cpp new file mode 100644 index 00000000000..93a4c8462ed --- /dev/null +++ b/rossubsys/os2/lib/doscalls/misc/error.cpp @@ -0,0 +1,165 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: error.cpp + * CONTAINS: Error related CP-functions. + * PURPOSE: Kernelservices for OS/2 apps + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 13-03-2002 Created + * 25-07-2002 Work to make it compile + */ + + +#define INCL_DOSPROCESS +#define INCL_DOSERRORS +#include "ros2.h" +// we need the extra definitions of this file +namespace NT { +#include +} + + +/******************************************* + DosBeep generates sound from the + speaker. + + freq (ULONG) - input + Cycles per second (Hertz) in the range of 0x25 to + 0x7FFF. + + dur (ULONG) - input + The length of the sound in milliseconds. + + ulrc (APIRET) - returns + Return Code. + + DosBeep returns one of the following values: + + 0 NO_ERROR + 395 ERROR_INVALID_FREQUENCY +*******************************************/ +APIRET STDCALL DosBeep(ULONG freq, ULONG dur) +{ + NT::BEEP_SET_PARAMETERS BeepSetParameters; + NT::HANDLE hBeep; + NT::IO_STATUS_BLOCK ComplStatus; + NT::UNICODE_STRING unistr; + NT::NTSTATUS stat; + NT::OBJECT_ATTRIBUTES oa = {sizeof oa, 0, &unistr, NT::OBJ_CASE_INSENSITIVE, 0, 0}; + + // init String still bevore use. + NT::RtlInitUnicodeString( &unistr, (NT::PWSTR)L"\\\\.\\Beep" ); + + if( freq<0x25 || freq>0x7FFF ) + return ERROR_INVALID_FREQUENCY; //395; // + + /* Set beep data */ + BeepSetParameters.Frequency = freq; + BeepSetParameters.Duration = dur; + + /* open the beep dirver */ + stat = NT::ZwOpenFile( &hBeep, + FILE_READ_DATA | FILE_WRITE_DATA, + &oa, + &ComplStatus, + 0, // no sharing + FILE_OPEN ); + + if ( stat<0 ) + { + return ERROR_NOT_READY; + } + + /* actually beep */ + NT::ZwDeviceIoControlFile(hBeep, 0, // Event + 0, // APC-routine + 0, // UserAPCContext + &ComplStatus, IOCTL_BEEP_SET, + &BeepSetParameters, + sizeof(NT::BEEP_SET_PARAMETERS), + NULL, + 0 ); + NT::ZwClose(hBeep); + + return NO_ERROR; +} + + +/****************************************** + DosError disables or enables error + notification to end users. + + error (ULONG) - input + Error and Exception pop-up flags. + + The unused high-order bits are reserved, and must be zero. The following values can be specified + for this parameter. They can be combined using the "logical or" ( | ) operator. + + FERR_DISABLEHARDERR (0x00000000) + Disable hard error pop-ups. + + FERR_ENABLEHARDERR (0x00000001) + Enable hard error pop-ups. + + FERR_ENABLEEXCEPTION (0x00000000) + Enable program exception and untrapped numeric-processor exception pop-ups. + + FERR_DISABLEEXCEPTION (0x00000002) + Disable program exception and untrapped numeric-processor exception pop-ups. + + ulrc (APIRET) - returns + Return Code. + + DosError returns one of the following values: + + 0 NO_ERROR + 87 ERROR_INVALID_PARAMETER +*******************************************/ +APIRET DosError( ULONG error) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/******************************************* + DosMove moves a file object to another + location, and changes its name. + + pszOld (PSZ) - input + Address of the old path name of the file or + subdirectory to be moved. + + pszNew (PSZ) - input + Address of the new path name of the file or + subdirectory. + + ulrc (APIRET) - returns + Return Code. + + DosMove returns the one of following values: + + 0 NO_ERROR + 2 ERROR_FILE_NOT_FOUND + 3 ERROR_PATH_NOT_FOUND + 5 ERROR_ACCESS_DENIED + 17 ERROR_NOT_SAME_DEVICE + 26 ERROR_NOT_DOS_DISK + 32 ERROR_SHARING_VIOLATION + 36 ERROR_SHARING_BUFFER_EXCEEDED + 87 ERROR_INVALID_PARAMETER + 108 ERROR_DRIVE_LOCKED + 206 ERROR_FILENAME_EXCED_RANGE + 250 ERROR_CIRCULARITY_REQUESTED + 251 ERROR_DIRECTORY_IN_CDS +*******************************************/ +APIRET DosMove(PSZ pszOld, PSZ pszNew) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/rossubsys/os2/lib/doscalls/run/process.cpp b/rossubsys/os2/lib/doscalls/run/process.cpp new file mode 100644 index 00000000000..68c7bcdcbe6 --- /dev/null +++ b/rossubsys/os2/lib/doscalls/run/process.cpp @@ -0,0 +1,58 @@ +/* $Id$ +*/ +/* + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS OS/2 sub system + * PART: doscalls.dll + * FILE: process.cpp + * CONTAINS: process and thread related CP-functions. + * PURPOSE: Kernelservices for OS/2 apps + * PROGRAMMER: Robert K. nonvolatil@yahoo.de + * REVISION HISTORY: + * 13-03-2002 Created + * 25-07-2002 Work to make it compile + */ + + +//#if defined (INCL_DOS) +#define INCL_DOSPROCESS +#define INCL_DOSERRORS +#include "ros2.h" + + +APIRET STDCALL DosSleep(ULONG msec) +{ + NT::NTSTATUS stat; + NT::TIME Interv; + Interv.QuadPart= -(10000 * msec); + stat = NT::NtDelayExecution( TRUE, &Interv ); + return 0; +} + + +/* $Id$ */ +/* Terminates the current thread or the current Process. + Decission is made by action + FIXME: move this code to OS2.EXE */ +VOID APIENTRY DosExit(ULONG action, ULONG result) +{ + // decide what to do + if( action == EXIT_THREAD) + { + NT::NtTerminateThread( NULL, result ); + } + else // EXIT_PROCESS + { + NT::NtTerminateProcess( NULL, result ); + } +} + + +APIRET STDCALL DosCreateThread(PTID ptid, PFNTHREAD pfn, + ULONG param, ULONG flag, ULONG cbStack) +{ + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/rossubsys/os2/makefile b/rossubsys/os2/makefile new file mode 100644 index 00000000000..5ceda24e9f3 --- /dev/null +++ b/rossubsys/os2/makefile @@ -0,0 +1,14 @@ +all: + @echo To build "os2" there are two paths: + @echo --- + @echo 1. copy the os2 folder into the reactos\modules folder + @echo 2. link reactos/modules/os2 to os2 + @echo UNIX + @echo cd $${ROS_SRC_ROOT}/reactos/modules + @echo ln -s $${ROS_SRC_ROOT}/os2 os2 + @echo WINDOWS + @echo cd %%ROS_SRC_ROOT%%\reactos\modules + @echo junction os2 %%ROS_SRC_ROOT%%\os2 + @echo --- + @echo Eventually you can run "make depends" in the %%ROS_SRC_ROOT%%\reactos + @echo directory to compile it. diff --git a/rossubsys/os2/server/dllmain.c b/rossubsys/os2/server/dllmain.c new file mode 100644 index 00000000000..8d84b68e2b4 --- /dev/null +++ b/rossubsys/os2/server/dllmain.c @@ -0,0 +1,50 @@ +/* $Id$ + * + * dllmain.c - OS/2 Enviroment Subsystem Server + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include "os2srv.h" + +#define NDEBUG +#include + +/* DLL entry point */ + +HANDLE Os2SrvDllHandle = 0; + +/* FUNCTIONS *****************************************************************/ + +BOOL STDCALL +DllMain(HANDLE hDll, + DWORD dwReason, + LPVOID lpReserved) +{ + if (DLL_PROCESS_ATTACH == dwReason) + { + Os2SrvDllHandle = hDll; + } + + return TRUE; +} + +/* EOF */ diff --git a/rossubsys/os2/server/os2srv.def b/rossubsys/os2/server/os2srv.def new file mode 100644 index 00000000000..81fe14ca814 --- /dev/null +++ b/rossubsys/os2/server/os2srv.def @@ -0,0 +1,3 @@ +LIBRARY os2srv.dll +EXPORTS +ServerDllInitialization@8 diff --git a/rossubsys/os2/server/os2srv.h b/rossubsys/os2/server/os2srv.h new file mode 100644 index 00000000000..f80eb73fec4 --- /dev/null +++ b/rossubsys/os2/server/os2srv.h @@ -0,0 +1,13 @@ +#ifndef _OS2SS_H_INCLUDED_ +#define _OS2SS_H_INCLUDED_ + +/* PSDK/NDK Headers */ +#include +#include + +#define NTOS_MODE_USER +#include + +#include + +#endif /* ndef _OS2SS_H_INCLUDED_ */ diff --git a/rossubsys/os2/server/os2srv.rc b/rossubsys/os2/server/os2srv.rc new file mode 100644 index 00000000000..f4e3fff12c3 --- /dev/null +++ b/rossubsys/os2/server/os2srv.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS-OS/2 Environment Subsystem Server\0" +#define REACTOS_STR_INTERNAL_NAME "os2srv\0" +#define REACTOS_STR_ORIGINAL_FILENAME "os2srv.dll\0" +#include diff --git a/rossubsys/os2/server/os2srv.xml b/rossubsys/os2/server/os2srv.xml new file mode 100644 index 00000000000..3c5706ac87d --- /dev/null +++ b/rossubsys/os2/server/os2srv.xml @@ -0,0 +1,11 @@ + + + . + + + ntdll + csrsrv + dllmain.c + server.c + os2srv.rc + diff --git a/rossubsys/os2/server/server.c b/rossubsys/os2/server/server.c new file mode 100644 index 00000000000..fa95de2d600 --- /dev/null +++ b/rossubsys/os2/server/server.c @@ -0,0 +1,84 @@ +/* $Id$ + * + * server.c - OS/2 Enviroment Subsystem Server - Initialization + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include "os2srv.h" + +//#define NDEBUG +#include + +HANDLE Os2ApiPort = NULL; + +/********************************************************************** + * NAME PRIVATE + * Os2StaticServerThread/1 + */ +VOID STDCALL Os2StaticServerThread (PVOID x) +{ + NTSTATUS Status = STATUS_SUCCESS; + PPORT_MESSAGE Request = (PPORT_MESSAGE) x; + PPORT_MESSAGE Reply = NULL; + ULONG MessageType = 0; + + DPRINT("VMSSRV: %s called\n", __FUNCTION__); + + MessageType = Request->u2.s2.Type; + DPRINT("VMSSRV: %s received a message (Type=%d)\n", + __FUNCTION__, MessageType); + switch (MessageType) + { + default: + Reply = Request; + Status = NtReplyPort (Os2ApiPort, Reply); + break; + } +} + +/*===================================================================== + * PUBLIC API + *===================================================================*/ + +NTSTATUS STDCALL ServerDllInitialization (ULONG ArgumentCount, + LPWSTR *Argument) +{ + NTSTATUS Status = STATUS_SUCCESS; + + DPRINT("VMSSRV: %s called\n", __FUNCTION__); + + // Get the listening port from csrsrv.dll + Os2ApiPort = CsrQueryApiPort (); + if (NULL == Os2ApiPort) + { + return STATUS_UNSUCCESSFUL; + } + // Register our message dispatcher + Status = CsrAddStaticServerThread (Os2StaticServerThread); + if (NT_SUCCESS(Status)) + { + //TODO: perform the real OS/2 server internal initialization here + } + return Status; +} + +/* EOF */ diff --git a/rossubsys/os2/utils/LXDUMP.EXE b/rossubsys/os2/utils/LXDUMP.EXE new file mode 100644 index 0000000000000000000000000000000000000000..ba1ce7017b08a074093710731cec6670172f3e48 GIT binary patch literal 54547 zcmagFc~}!k)IM6BbXGzVLf8U?W)G_gpt5S%!XjYU5fwoeWkhr!0auI$G)=%!#NBbg zUB+?Lab_YqihzK)42z?dpUd00Kt|5|;wSDTQa)_Gta1KV$Ge>{48dizrf`5J(H$A8(~ z%m%o}FS{?W@tOZ4XZ?>1`X9OYe`MDG$R+>D66&$u_p!3E(n;T&zK{P?Z}j&6m$moy zS3Q)?N@vymlzpzIsD&Ez5U+RKP-h5U+6Nq?_=c`g3SHD>wYY8{4YE7e+(S_ zpX~p>LGhJPYVKWqtpqw#J&>lJ@EGNj?M9E;W#NkdWmfT(TJq@sRkkSU{$J(IFQ0?0 z&+#i~2wjSQK(JoEd7&Ctwy}L%&g^{2`i0oGy=BKQdtD&gp)WYTz)-IHWomn$dhqKn z#DU~rq=t9(RDIp|vHF&}UyZ9r)n9KB0fGMCoc))`6e~Xl)o@^|j1xS-1u}-j zh$3Og0eI^%j*coe=;?A=z+D-s793opS6KwylCkH--g72^Sov5-6a>&N>?ggJ1IQ+M z8ZnS+070ss4FLAiS=mlTqu3#Oz06%5C60kf1c24LnviEVC^-6Zf@ZfX<|feS^hqQE zT(bis0Xb0Yj4%h_L?MYmVv;!Sc_i)v?M}8l^!j2l7AzpM zu^K@kVQ#vZ6BGfLa}kzugFxUho!nQ;kp4EG7}qdb&t7& z-Z=$iTmhG?{fjkAt6|+p6~v+cD&G}$pbu2s-EAF|&yr~`lHk!Crar%vFcJTf8L8DYh*+=}r&!p4CQ3{Y+QP4U!F$V0rC(`qry+gE z{3f3DzSdv-jxVL|BARPXDk}Hva#6NZ`E6=SR$PO}?Y8g>i_vF02~3x&@ho(p18#T) zuruFq!qu!CK;L?;%YJF|qG}kVd#gyZ+0_w{)JfSvP(_kE2|*Z%u;e`Umn+)Y;D3PI z90)W*?5s0jk%Dn3s%Bt&%hlE$Qi5g+|2T9EJNOO6*im#h>9i63)%_@EZL;6@mu3QM=2c}bZ*>3enhT!^z_!=bI#_59(+6AtUEz0 z(|PO!Nd?J@xeMhXShtQLy7N=_{`#0u1hDR!NOXF#g1?zmWH1cL+nc8jkh+WKw&H&_ ze{1~23D3I41*eAHD)@L~RbNHidHN}0qp*Jvo9A@24i;Dol@&T5ci&8cck9cYw)k4^ zLAO|1s`pp((Ln_Z_TjitKJlZ^Mi zr%s8^?L{T93NFRIn>M;MsmEMQo4!eoeS0q_a*t{CKs633CdOq+P0SzMdRxVz3CinK zby{HuRtjzIaM`#*T`|cfxci^$fo`F5%@U~Ut!Na10k7zcBEKiqMKXnbPDxR)qk^fF zpkO$S#0sLQ6HHlKQ^ zgXdFfw8X3esz8)^Zjvdo)BQ0g5ZPGGSI?^9qZG4g^7TF81nr1UpB||gYt{ulkk9k1 zYNJ)q!p;*3f(5$%*UAr6eS)CXMK?*#9HloYHx0P1Y{M#IT~Smq1Wj z`UbQU?ddlo54sHwD79PMsq@Cn{(=aKyXd5vi`^1@M{D`l8eS4+p0(gS#AR)M2O#tz z+6D!*f;P0P_79-P76EQ#TO7CdCBdz&L2OJ>&#B`>q5D?#sVQpTHa53&lf&h}+T+L` zVIvQ-c2qQgqg0Z(lqkVRK^QuUL*a_KNcoiM@9o9}(c^XZYL6`_m!b~{in4&eOI^^f z(5+tlDmg6GbztJdxgx}VA1=|Ak{GGK<4?-{>*6l9U&OCr>)5gPlcbst7oXctvR7RW zWkaa9UTv-jqf)RD)rQSrxO!dx4e{Uwb$Xd7MTxO39>mas#)6Io!P+S^piA`X*Gv%@ zGqBBsdzFy*x-&zwmWZt;EcGwNp1M9sbRu9{zUb&-N5sZb&T1Zn+p#QDHi3NE6+1~h zdT2{nNkvctB~kb)(Is~n&J8_0Zurd{bR@`0Y6|vZ3X6uZHGo9JHnK4)6Kf>8v#?0F zHe!d#Tq`rA;j5?xBZB%yv0EOdv2Q#^UPL}#e}bGwK0=lfh~x%GZLGZ&qP?(BqzB+! zml7w$gg~G|sz%`1ir^XY$RejD00hr3p_Z8hC(AgvYp_J_NKaNUs}y)2MZDWx;7D{l z9xFmyX#^S;MvyxF(QHf7On{=>HIS$e_e3Y~&?uFO!Tl)3qMQ?RcQb4Fd<8YTqYXU$H{U=bQgptaWtYD=u@lQToIAv+poZr5#; zECw1ck`(*h?kd_fFKmGujJVz}K)<4&2;g9|UBHMO4w#ey7gqBkl4e?usQ|g$BwM#& zMEhV`YFXMlrgme@@@*?e?YINl*6AcY+Kmo8uD0d%v&oU>NI;k4k?H2+`x4^5NrFKO zAbaSvJEoH!o(E0NN89aD^A7vWHntOkuBKxv^qHXQvv#+$R8xFL<7ekncWz%yo5}=J zxc@!zD5<%G1Y0^qBw-3ms&>}6e{jPOVfIA_Yb83*nx5ZQ>8XOfBz4x6Hkys6%$(@6 zOVf^E>3Xi4Bduc_3@RJWqT0C08$xK6_i<^$tOu^t+Q?HmNFR35c&nK=_ul6(v5;Ca zViXBOogJj#VL<6>CG4#SH;+FuNldG@5lV%M$FkYi@+IiQbONCEYDbTo-W)x)#Eqdc z3%7y#Pm7_0(+7>zHg5gPW9O}<90(I?UqaevUzhTZt>K%1i&oVX^qKG#)DeVmQy@7B z9l%J$bAAA7!-vK^H*?)>m2G-u?-s(Enn2LLX$gUdY*n_>x~KK5NUHvSDyt24%9oZ>S*GUMf&lYPAeN2@5lj`u+L zQO~fODUZHwo@1Ws2pXu7GVA7FNt!V|&TMYy(y5=RG(GU%^`E*Src?rF%^2j*(KxT&KwK%4$Mn3FHSSPiV5#( zEa2~IT+Xk1y(@=jI_I7EL5hNh&N?%v+sr25~^{ANoHJ>0JgeG%%MB9G%$TC2@9KH_lUc;pbV z(IZ-MiA9ON7_E(1@0}L?(m}kpfDqlp3+B;=^{`nXAYSIbCP~c;?!~I9BRx-P8CPNVWx064336V%yUvS zvK`IT<{U?C4Kz`Y^4{e?zPN4_`z$E3n3BNX6D%ysPxs+p<JNbk&W!V^A6l<{JV6bxC(9B{Qyi0yuLIVGC6KpUN z{RdYwkAKxNAt|MfBjs%4oUtUGzL&;HIhM?6<{aQ;x@$QZocA16eKjYGvxtMRN@6)> zoTVJ+AG0~hoV=tMP5~#6vz7C2N>cUmQ{UZgs$K`G4dedtzw!7bA=Sm4q6ov>IE0mO zR*M7t*&O!qI)eonXJOH4j?RL!j}SVJ+v)RP)FsyDzI`2#+c|6JEU)$kmS z@@{d?tHl|wpcz+?oQ94GmUY{s>pffj~Nhs~YaJh$;3=0#|_I;_rmr%w0~LlwAj zh+SnybW++N`5iQ6I%F~&-7QVh{8_)$d?y=jax(1wPJrgM$f~(x*oScs!GAG@*A69A zIV;Hgl|w15agyZZuw}{tr!-E}bh{%QGEPI2f1du{OU*~RlNbRk=0bwY^{MNayRBiH z0Hltl=1GpCYRP9&pRkSn>hHncJ~C-re|6f}OW`62xj*Y!=G0s_$bVtUWBcn=?zyI?VdIFqX?wuuif}!8;cEX!8)Dh+5?A zrGm{Jho=4mKAqCvUAJ51rh2Bnu*N#T)sg$DsZ`XvMI}(1%SrP6cbu6Y@6=o-se8%4hmhk|8n1QHDZGFvW00f zMt6dhQ>1bLJkkE%m)`o5r?|}mQ{1AtD$JY2X`W3oHq133QJZ5)#O4L2Nm%jHho-5I zc?5Rlw6~eBnZH?xSy;-js`ZTkv`IC2>(7(1^QP!PKTR^ZID`nw9pa)dFV=B2^5mE# z&0?x%F;SE6u=v#0^k8TTTlsbU&WmgokuQ~I+9f%fO#QF~xGdTUt7|2_reEP5b;A!D?QCqkgWgWdeHVl5pj&XGukpHQHpr*VeI)44$^zBO%pOZ?b}GBh(^14 zG>|28K7`&vxlY}fQ-dT;b8*)?Qzw(3260nOE3;@eFlj8d)DGx0TCVodmcMlnUp>d4 zYgQbXN}SUe3;ra?=Ac4_^<{|uyF$K9!!*Mz%6e$~OeSTE8xLei|B3%{UHGb=mpDr1 zN)Iiy!Dd=E47s>q$xS}upcz!k*|L$dw`Z8J&&HWO1%@eYvCyV{(UiSanrVw-nKb$? zs(g;-@Y>2xgp@{?XeY;K#y8+;p zq05??x)E%6IK!{3&!It`0FA39HJU&3sjWV&T~+mC#1V~dzq7(8gsZF=F)uY0j<`EV zw)0P!Z}9+Z1;K`CAyLk$2jxfQ4iG2kRmnk|uDKcS?eLa$@11$0=H55WJaYUuWZfo* z%3kPMS1j6({SX;BoOYfFtGt_+6TlUb9(y&>|MHThm+Sp1BC5+-{=_taNt*fb6F=(H#{y@hv#cZc_y zN6iIf_EiYL!!D5gJIxAnOfZ~hz9w&i>yf;XyZqBSH(<_-ov>Afe#9m}9_&Z9zWCk* zNGGww9~Bh>=_HUXAb%m1*;Q}e$BCj-vuR(X$>|ytAgsqsWjjN=c0#)p+U(>EoYcD;eql=hJH=^imDQLb|KN6l)Su;T;<1k6J58YXh~B<6XOws)qTq+|7k_aS{vb(}p+VMOyo264HW26(!D_i zWy#E|TI>h=uwx(2uRb-+pyjZ2rkNeI1%%FGk-qz8X2ZJA;pbwY&zSXlDkGt{2@*EYUj+vtQlCLDf2#)69cvK(X=spObT7GlH5nLCeef` z4{N(c1N&VU-Q~<{Uj)t1nl_0OcsW`Ag^^V^-hmC()9Fdn0O##kQgv3GuW z!2UjWkS^ueAJWjRjQfq@+Smh=xox&Cl!| zh%sF)=`uBvbjaa4pG@<-R{6rbO@ur}Uc3E6Vyotf-$PnAn%70_AZyI6eJJK_<`KI) zZXEC0=`Q7x%#O@Yi%mx*C+ePg?4u3e^jf0j6Baw3B|x?b!`Pzl??FS0PJy9*n$~ip zIUby~*5G>VySG}#h@3rpnGS`;1JJ`UR>1W#BcVg&AQpYp9N_Ow$uGrgaq@7N{A&HD z$v`T{VzAoju1Xvy(Ft253H~-sl}gJ~sta^x zMET6|#1lS?1=F4ifloC<_+El0Oh+_YvSr4W>No=TruC#Xj5~{Nk{cL=$`-k0P}Y>( zVGptK8Xuq}ROFa?U0d{;A-t@Y(SmGbFK@I;Kb2;@UP(G-DQ%$rjfHE`9@@FxKll%y z!{EwuS_~6t{X_!dit)<%D{@&1*A>GiQ`)2#HGg^3p!INrhnuz7%?+z(X>zS?#%x*! z#<5qJX1%qE>OAKC_MbS#+Yij2gjil-v1t59S!2Iv)lYcvw_$YxW6QjEbSw+ABZdzuDQHMQ&rhenFBo#~r71y2cpM)?2)RZNvrs^3M!i{(FCK+-0-(#;CAIe z*nTJ=VIvy>-bC$jNOQ&-i@>haM=`}m`i@sOxRu(=mY|Uv@q>lABbv>;Y{^br^af>x zew0kw-Kk&65&8)_^YerOKxrIJiYb_^WPgSo#8k*KMMOxbX z>jxsqG}VQyK)Z(Ew&;ns5#ljs+O$VHL*XE_j$$fXA+tJZ(jaefA`GSnvO~$rcJr!S z#dy;ckVT#Aa)5?7%?n;HzI^(MZ)dw8p*G&;13FrW9Su!EMu=%sU)fUQfRQqq@inS+ zPY3?-B^Gn>aC|3BJp0<=d`z2QoeE z(^~p92rS)p{310djtRuyke~=giM4tW)bJ#NNnFG>jo<`aFA?Wh(1Nn4W&U4qd&ZWC zKCVJ&8Kf-fl9PferpvB}Nn@s!*Wc@QDBq)9VEIhLSiGFJI=yw0JA)L0KXZMDeN)SO z)$f8-vPe&v8psGVLS$5?pA23=jrzS>LfC;%OEn=jQfvfvIBMkdjT{V#wO+xn3=Xcd zg6bH~iOzRmWbz7h9U zX93c*;w8%fCdw(v>ut20%0S40En}-~5I?ng5h3$X(gbeI?lkexxS1V|2>jr7^Qmyx zcd@WWbCeFnBMWR6kg9DYLVd2K!MA2NNJxL|$1NAoKi<6*0e?wIQr-5kMTBl6nkF03 z7q!5-B4tx%&6Wt0V5Ie*Ze* zS2b5_h`|2e21g*X{$!pmN1z2UZ4O#b%(ykiwaW%~`J}lW>*tf{L&mMi^?uQU$F?EF z-1*Pz3%uX4y>9rhJz&||+#hFNsjEDRcZga-q{*7GS5s~e({1c%O%V^c#zcM-5 zk=n#=U#y*j!;1UWKjqshUJ`_F(1EVd+$Q&g+N^`oIf*SZ0pv$kwh=Hgc<9x(n6L#_ zmoW`nmk{K@-1f0CwS?{AxlQ>473@Su=n~E~z5Zgzod}A(RbO{&)y)R+CW4%Rc22R0 zvV}?$iM1@P{SYIMWERggfn~IPJRTzBqF*o0X?OS2P>L88gevV9gz%OvmbunOe;sfT z-MlDHzV7yHV|U0#wkR6ea+smL4IYXY%2{zFA}%eeH;EbsjL``;{X|gwk_g*+<)YLe=D7{<9Mr* z;lOnYcBl0=0;7M3io1xSVER+arq>@thmE_5AFVuSnrYu?hz7CQNlt=p#eRl(ig*FY zsN~ZOoVt0Ai0py@7wPwpW-(B(1h|)@9hf=8cf*FIHC8K=7;D_oXlPUeB6i+nfu{bd zn;S{kek1&LR?Fhcqr!0wWZkmGYQq~*3x4q``R9)7cBT$pZ!41wzihv4AUyQ$p(s(G z^34XIQ|ig3L=72K8lnJfyE2Y?7Spbge#Z};#bhw-oTRvWrzHURNX?^0v~Uc;dW^ui z*Ddnd>IiyF-z?%$FB$Cr=m@w*JM!kJi}56FxUh~{!6?D&zydOa*L0B2ID(E3xucXZ zdg$f}dTrJfhZw3^W_1n|2eE!=9o`ldu#zM`#Z-?noW}a_Ig< zIyIy)E5bjV63Z+y>iaIv?eC=Lv@ZBW({52^7U@L#p8`YMMgSt2Qn^WaJK_axTsu7-C)v9>d~hHd6;*WPWjbKP7%{5 z9!(4=AAvJj1Q1@+(yNsjxu{9o;GZQ8Qb~;bb15a*Wh*Jv5t~C!hBxVZl@&HC3xg-= zO!}}pm%fQRfb-1p8Q08hHjdc5qIXk|we?3tNH)J~(6?A7(+1Fl52qRg83cecY6xZY z4m$`4LKNAkD;!T&G$M8xW*GF zT-1j%Y}$k*G;0W7Y(xZ-msuDdj<(^BED|c?sJA=wDJbAR!_4)#vGzIv4|%JuuCqWn zW*(kFig@2LHu~J7Vx%qYLv=)RCjv>h4VGAtWT@o#Q~RjT+)S?Lsllcn@vCckv3bes zuCD9cZ95kCaRcD3N{QZOzArn=0Aujo%aYC$17F(q&#vS8@3EJ>eL;-POM6Rw;#swC zs|mJK_nUMjpYsZxQf;n*zIq(lphKmcPIM%!Nipm(gZl(qu0uQIsTG3j=gg+C1-j~s zG#pu*_4?}Y*)azlZnmZSBW_fi^~l)1&uZx-(l1cQ?j2EO;}%H$C{|!H# zwW+<+R~xK1z$k_4gfXb~PHc|Hb|a6Y0oONJM*nlO%t8Ifmq^Fwac+Mz^=RU$-b9ZC zVpD6%ocMsQQuJXEf<92X64(KK6~i7}kkspOwD*nMr+{ZAR;aXbSkyQ1NAx{-WB7rc zMyNVd@1(??gEVDsr|-hnN{&r`g6pvB6`BC;*Gq=ABh$)-4PqeU=@W*R4fnoQA4p6P zsl(h1Xeq4io31UGTD!Qd<7jf)Ky^E9x6|u!C&SGiKmqv?CxrH}%WC2khP*dO0KH5amV6 z4^GXivpKUJW`0?p(RX`{aUcC6?VX1?a!MZVVU=>vu4(>~<3uZH3zL}`Yv@3*1G`QQ zA?lxNA8XgTuZ?1u{Fwi#faN@D@;iA_8 zvw>@ycNW!tEyuR_3J=iRFxD!_Xof&;Gf!sO5*;oR2K1NH8kSbN^-YZKBoe`;Znv9l z0lg(WIXj^3R8u*_ZQzUv{~QWaAMe^m0P57VbhmMI0{sjfQM)nk|ZzoN-12KkCd)0RS;zPE4>jxuAA+u)oV)>2Md=immy2nBBGdLLabd$ zagMBT6{#qx!J%ZerzpVR-%IcvDPX2iXpxx*-M5sIU+P|#F9mtt#&mZGNl1;0Lvmux zN=t2vmqjA6Zh84Jxx_qvN+L*D#WGzbkBym)Sg%Z8%O!!_Y(NBGFZ~5?zwUDRd(ga! zrFc2)0uG`4t%yqvUx7d`V+ow?_n(-n5cE;6Ys6cEi(*bC1Qvy;nFLVN;&wfty9Asv zx(or$dQnX`_LXA#$*>^J2y)_Ooqle`+>=ms!#2;{G%b`d`FgPQhBFl%49XTVBP>(UuyZa7h z&N`NP0*R~Ij=n5=v|&$-m>IOkeBLU(feQaakCoU;SB6d;;;zDH>_%sS*~ z{qAFwJ(PWv1BigORujuR#5jy-fVCcAm&sThS(-Fm%T>$)ApH^>Xdr0x*No*tc7~zSE(Ep&@V7?HqBuJ z%@ij^Q)tKr!UdA5$B8R31r;K-itll$ zOB4CqACcJ7aAgazWR8=r*%vT+K3m?kj{0}tGNL^ zWjwbBn+1-4Ll0`x*}yq0;J*9~x{2<#f8H7KT5o+6LmfA*_?KM5M<<}pFqlI|&FlqD ziwNjqVm!>|vWd4y1l&wNpLrw}|2y1bL!<}SVx_bS?NBlxvmXd{3!*2t7+@vmh-0HR z9|&qVX;&rIlsQ3~JiXH{D7!22KoF6XdOrU}u6pCVx?I}AYs!E9{~-*W_!I*HFK2Z+!>t=?3FvOhE+-5W5rfrc zhgxxO@r&0os$xht9W8$+3tT`D3 zREL{LP4rPrG^MFtd|ys}0L3(%XCS52p!w9YrZ{I3l}98u8&#)8eaT;jZ zO+%lnm%vqz<)bOiVTOxyn&e08IMW*tNP?1Oe8~w?4X(f?Mdz|k9eJ+dDKH&L_RNFX?q>0OuDxjp(eDh zeD?IrKu?-#>(-fHqx!526j`Vq?MFCya+3Aw!d#*{O1+HoB}u5BPjM*IiEd^B^=)HR zc;t};6M@0^UHLHwOQ0IX(_xwZsi^zM}b*bv6 zDYgHkS+{l>*yMg6G#KExFLb#VmFy{w2689$?8WR3*jP`|N4eJ%)Wjd;%sfWnHO9@G z47Yr=0b8% zNjHjuWkmfF0!}fP?xUp>>@qtj05E@FXxHZ7-j<%0lsM<=1q6UO*RCR$ehT;ls9Ldl z{esNcf~+O{LB4G*u(H1NS3r`p>b`Bctqms4=+NK724Su9mln&J_pvAv5>JUA!A!nn z%e0`=vhJk?ds%JPyT%3t3}NemSe@|h2>ZPUlifQQTCM`WLYB6b?pn{(l%kYJO-ir|}q4>*LZ+N!)uv;{~`x^*-0cPKpzUNSt|e7Q#Aukz?c7 z$oRvtwqPvxayx`rj;om(#}voP%~?~Ol2$?XMW~v)V%C{cG;?wI$I3pLkFdo}!E|7% z1`SlnX>|0rb|({C7r|sysDaLOmvoNc^;+5xOpsG0-uP2(HSlmG#=?%W5(kwm)MAm` zJ!eY*qdEnO;p5i0V8|(6ZfuB%Ub3>swYHFiNO~`843MZSih9HGElhi=?Y`bO;ws)w zGyRpFVed#C(>O;mR72Lz)^o$VwgztS7bT#x{|gl=H0K;e?(hZ2MU8^WQwVAfXSNYZ zHC|0*p!!3Flrpi0`ixWG#dK0g>0x;xZRcT&u+9B=Kk+hP*9kxuvjDIrc^4=?l(f%zcR}0t!L`2T8tCv?Ia3-j?JQD?{G8< zjxeibTh&G}GyxHlrk8O#jZF44EoKtfl=fT`6Jp35I3d@2`YJ3WkAY6f$n8(;w^y}4 zFQNTQ8{s&*O+%+CR5)BE`8*PlvTIRCF&FI4sP-`+`c7iS5K=A9C>RrtD_$wwV?=@> zvKf&6q=aF0aQouv{Vt?=CB$?BzF_yjQd3JpZiJA(M7Mve(85aWig=sjxV93)bLKrt zPi05Va~XSdsWx2i&%%e8Y{pu@Fy zDyH;l)A%mhlX>#rgYdT63zZ4FXSS_7B1^pC=eL}wheY!eJGgSb@i_CSk-0wM-O0TE z4aPr=N8j1iD#9pY%z-UQ*EY&rd2kP)m{M*p?|$zRN> z_Hj~0{K~Q<;53C|j+~M%Oxn}-=b|hp(750M`e=Kns0AI}0!ds3e+O|zx_}-FS9|*@4o6X1BOV+{CPw)5_7&Y zE(1We(abRSG|UOt4%jQPl02=X0ZBym0i9m1$Y_K?)Rw7VMld~jpQxiY0`eR$p461d1#ZWT zX9jzV^c;Jeg$LZ8;IBG|J+RjwWZy%(b+9l>m7EAK4D#LZ;QLUYjBg6r!fEa&`D~_$ zXem+GZh!=g)Wtg75G4sUvl7lJ`*Rd!^U4#nO@!dp zvRLg=0*SJ$L{et6S7xRqarPKXOYF-0wi}lj{JY@X65FyR+A9EGY~Tr##E^Ck0bj12 zNRyN>$_$GyI7$|!Eg)zwL&1^wn0Cj&V@UfCbnud=i^(N)o( zHII-I*5!^XJFaAE%?K-esSM50)n-Sww~9qDH186%DJ7Z~pufJzxtO->{J&mnNY#rX zIh8YwwnW#& zz4*!|>zCg~fT{ewmCcOpEmo(=GZt-q*#6ex=&Rr5eW%1jE^3Ma&v&mf)*HKg)Uu%m zWCtd$UIb%98%fjA;oi)x$1=j4%%wY47)ho*J0gsQq^-pi7EnbnJ!_`pjC^*CWBo+y z?1-3*H)Q09?!p{MyT7UL457~Ax(ethoe>1ujiosh7?izl>gNw2V)}bWhkPJIZG)q9 ziP4uwfB2dMVhlw3bW%qY9LT|`1;Hfb&*z?&QDjCx##lC`slJ==nU|#-k3fYm-x;)BVPEqZxsah13=eIE+ zx~y=Q7}q?)@~4PQBD<1Y)9Mz{uhZV2jNaBHI(0Z|>KI0UU)davzXLy;a*iMQt zWy=!ZeKc0SB*-EK^vANfYO*@+&zmybd}iYeNA}Dqbp#bV{e1b{qq(ZPILm*hr-s1= zM|GxH{ChPCPU!$lG3)PC?|N0(Rei)W9sfR$bY9ur~PG#6#(<4zs$U zf=4aP4BBs=aWQq z7?FDq?fOkI=Zq6r#z~Ui#>wev)S;M&$oc-tcKEI7#YjZnvcpmxMaACZse(EigiDbp za$N{>4M)#JKE8f4XU+Bx$XS}3mtU|9faQhXtteVqylVCLC8aWXS@{~ynzieIi4#yI zp$|JGPe5(iQ}lsjaHKwAXYlOMHGPH?eA`Noh{f>|{!9NONh(s**5=`V9yy5p)6o0M zuXH&*LUn~aF%YJp`e4WPo1v+)cp@f_AN-VQJ7Y%uuH?kJ=UZLWS=IYQBJs_Ba^1Gx zn94&tf3iTkx$L<|exgLHY$TCyP46G=qZW=GJ@Rab*u-i!nt0T4e>24^FdVBh=AI16 z0UM|x>ozS9AR3N9lAMdh8)o6B6f&!GRypj^>(dYJvT8a>SnFHdZprkuFZW$vi@$Zu zX`jXdCaIbE41krq1(_j>2ruN1zQhE_ge~d(h#8dXL5H8$ z-E(MKf@WlUUQvI#dWlAuMLmWMX+)Fn$)&}U&;jMMhCc@=sf_?ZWMZ7{i z7Y*(`eOkyT&$L+dml|a=n{UcYdVO5FP=+YGb^dd-7srk9Uy_rudp=$xpRbz^it3(B zRQJBGE&PYLO6E>f{>+#1uq}GDM@2Ou3BiF1B5Aq86|^P8a_lKMzmF6DtONd@AUo6} z9CKnRqOm)A6=h!k+eGy5W4iud6f4X+B1lWHiw>?<5oA*ntoq1FJ(ubY(_{h%n7$G= zTD^6};$RB&vhZ0E$Miyxa>GB86$hUYmOf(3NErL8#A^L8w(!^9?`|(82|wuB>J%zN zwbXJt`*Vx=v#nvg7~NK~1T$sZdr|7ZW60f>o7b&7GV1abQy9LH?*R4hA5 zRWYfR>)qqG=C?(tul;=fsXy3hUu~eV;4@Bz(G`h4NZ(FBH<$Bk2}Oy|P3W6N_4}dg zCin5pqLBS=*RAd+IDG$1Yn&8TAt$c}ZAV;hyxBK+F;r=pcaDQ)j$)IP+<$hm%(wIJ z;-Q1)HC6M;GDa9h^*v)s?N>D}f4%I^?!_~zh!A83IkcxP$S++FTBwD^WjRHKdC2no zoV@%J7GSN&Ut7MaBoCCXEf%E8a@HWc5+*y{wx}q7*_SQ2qdXrJuc}j=2c&#tRRL0* zb7Y4}DKd9up$spJ@hF;~8f1+yk4pswYfaY_mM(~NSmJEzRbUpK9`7&o@t;Lrc*K|N zM@}tX0b-YygZarbd_cNe-tH}o^ASwM&wI@Sn2mVH6z8rQN?WG z=OhuOR1g{-9vPPs8Wty|l_iBogwlPIlS7k3qpG63!{bsTHkTNs&5K-+;t1M2DdEwf zNz_PbYO*vgbb(83LqYt!(B$a(7PR9fMFr96(u6}9^yJjABE(n{u|5KbW_c}Ti}&Os zxjDg#lgn~s`M}r5c&3?TRZ01XI87I}*4!g3*bGU|FWSsG(##5+VdN-XHCxzgJHMcy zG+&1QY8`HERN(?y8%GwnH+Yqh)MdfP79@y}0!1hZaW18UNE=vytSXil=X2bh?WYP0Xhwd zkgr?~(fuN4#ASHpuel+YDU~_YPkWZ_CFKwvHXuIULXrDR5)t~G9GQTms^%TNv#M;> z-cJt$X4S2G==H6dFNqE)Tq9q7DtFj7)H&FBesR%SVy{{{C+xeP@Y|3Jz2;Z*q{!03ykB?K0?XnOv8!dms$#FCe2Pus%0!Y) z%*xgK%;Q((ZFZI?EN1-!IjjZ_jWTI&zH8Z{MuBbR zUy(P_f>Zj;!r$BSjDJxEy}$A{FJfy%<=US3!qU?D!xw&6H}%vG{nVC+NJvsa;IiAY z$gWi|>v=o%gE84(s4S}2YzK9y4p;%HA6$$r|(U?TTVKb$Mbb0u;h4U!&maXB($ zPE$&4)9SLuj~1rhK%a=s4VR|gS-U#lygXy+jOmX#X5PdZ1lz-vI0WNULMS)wZ$r!F?FB-+koW{GC5 z>G2ZH4qVt%NNc8K`3f0b)R?<}3ir*BE>Ubna#zWVWeCFid9{;yQJz~saz0xYC+mxh zdAd!?3kbx|t^$F{&Vj%5JTEO=myg)|;(IHURl2;eK(;N}(l;)rROX+oXPK?=oncgv zm-|=pIOmA5Z|?FQW7>*R`AY8oRqy}$k++QLtM@Zm<~x5W*wphZQ1jW0V>r4M+)-?r zMqahLp?o!0##(hfy0Gt$XNtVYQX{eBMQZRaLnz#jqooEXzz*`2OVc6{;=Pi>@G)6S z37n|AL3%?lUk6%@Wp9lBFZSL&ys0Yd13o87+q9%4lora>pea(Jr3K1R3cl$jg+hU} zr7d#5v@zTYwn@PY7)*;fIn+^ynbGm`T5)Ea(eXB;);dTpSPFP4s8GOBM4UM>s70}q zQpxvQ`<#?=^Ywk7?~m_~uMgzxv-a9+uYFrS9kE=Tzsxkd{+c@pPHAEu^%;9agz-s(Z-9l0Tj=-B6~T zz)fsj_@|9=9<$cDYHi@x!zN7}ea5hH!EL(+Ew+uSn7@4I3%A<-TlM`4=Ob~G)_D@m zlM*Lo&KN)cYvxrZ|4e=B-0#BF_w^s1|DEPiB6q3( z?(^gNJ)(E=k4`?v{l4FCKf5>LCbc(W)OUlUYWi*b^~b}vwClr$hYnt_K6bu&ZMntB zJ-KzO&bV`SKp#5e%jl7LPR&H;RNs(*MmzS0=5=d+H%z6Eytr;n*z51}t1CO+<@G-BR0%t{NAYQt@l&RNFz`a*yz< zs1f?iyIy?aC-bsFiQDv^kdY51zI4y4+xRy#o4IYO)f;br#Th?rbm2DZ8?{l-eDU}t zV^&s1=c*7@%1 zude+|?%dG+`jW6oIZ59gAG$oWBs;eKzdliy_=-w~T&Ng&Lf`q=u<;|bZSk2KoEz5t zBZVJ6a`>zJirzW&*A+znifjH?nn zj4!_DS06w0+5N-bKhdt4YDgS?oJ(`Y^G6OOss4G(x3-FcdG+?N7|#9RqOT{7G>8B0 zl2Nt#@V%k09eqPJNXmcC|M??}&y0CGBEpbj7#}D6E+NzyZ`8i{htAya%qI+s`Obs+ z;rBe4`d^QXUn!kfQX29GU$JV%+C^m-Xa9YPx+>%CtrI3xa8LaC0{8r;lBK`b#2UU# zeS}+i_nqCx@9bYza)(RTe(#^&Tlsi$-pr!oRU~zyf||IDfp`_!#dA=byV}B+pgyH*=#S zxWe1GR4#`r;z~|tb7kBE+#|zVM?L2Y2{CIYCB4eM$<5?;bIsfV?nCY<_jwd=_U8`d zQ}mHs@a+;p?9ckDu-&D>hYtS$BtKh{^LmXqbjxGaA|)P z-(Rizvs*P>!@b9^;P{tr8ElOV=lOo2I9z2XufhpCVcJkFABc%=aE%_W-ab-ojNrfd z_z_+=J3n^wd_(B@8J3l*em|x5Gj7X15E^^F~kUB*%Q2WLL@Hpe}=;Ffo->gMJ;j@$7s^}m|o zfMkCvocTk42AuQ~fhWCrr=WHS7>_pt1vm~np4i`CmFHf(5zaXo%w;KXdd^kC6g3aw zd-1;n$OK-`2qTb7u~+^DqppPB_-#!o#qk^j5~GbZCHar|26vf8`CKBk0%i{?Pw+qD zS(qx3U}oiMRi4W^ZVgt=Sw4tggM(`bZ%sAF{RKor*KIC=X$;^MfBo^c9RHuj{}=J! zch!F_|DKK?z-#%o{yc|AA;%BFV=sGb+Y!cpt>x>&SX4v=KNeB#5&U92V*2r0@mSrD zPr^g&$B*H)+iLp}et3U|_?({S5mm{vsMTuzq?Uh2%?|~vL&ML(V^s)`LB?+j;pgJ< zdI&!ckB7n-P#?|+KNHFFJ|D@_S$KXXQ2xgAS$MSZ{IBr%hUate=;rxsurNYJEDWMS ztKIgjhX0S2|5n4Rd2QCbg3R>XTpR}U|Ns4eyawnrC;attnJ+XYH+WUjA#8Y}bDc8$ z9YWheoDNhZG_ymULfN5CbflA)f?+r+!iiIzytaVwy{iWvv((QVp*2N;78RFz+z~a4 zQFAkD&hJ|?aJEys^!q>{uyi3#i^@ZGYs_|%C}M1Z^a#*wLdKxS@cEg$E8q;T17cv| z9gCWi8*E~R*4?0zz8lAJLPkV&gL9}jOOt2cq{0bM`xEfl>LuXfL?S{L+8_u4B6&dX zlu@H-j>h>dlexc5EQ(ET5SK>Sgf_mtxs(juKBUH9@4&RBPoDtW(f(Iy-cnn02yiSN`fj?3`B zZ4%V+r&Gx(koO+Li$jfm^W0ZpX$SoFflzs zZV~#0n>6{bO*k$th-ks$qD{08&mfkp!)@Y%SkW3~6K2Np#|3MDu=VCoXm+{L(Lk@F zy@Y1;v3_2y>q462Ox1peB(%%TP|<098whu2s)D( z$?EGhq-8*xFyEw+#v{F4QE>=SMWrE`%{|S;=^si$&^2X|zM8B7TOiA%5$EHmq{YB& z>^2B3(s9DAZrHL}`0&O(ExFSsI!v0ioe`|<1YIb5+JwcS8acEtD^!c&8$(rN6Y*jb zvL=KIAK(bS8%XP#xxCMUN~rJZtqD&LYC>c3B?6*<)4%qUQ0Y62Eir{^jR?A z48Fgke<)Rly+xde3Nzcp80rLIz@)LIwmDbW(pb|v7l`+nH1m)(;BFiTm`)v`Yi&b> zTn~Jk&Al1?97ArRH539{6GyGOwpGseZQ9?E6~4cbNL%f}R=01{|{#s>XkOFdYjWpNNZm0Csuq2vaVLwPs{@gt#qHVxU4`aK`5 zJuEk&7_Gtqhp&%k`r>n;9k@Xfc}3fBh!{l3XM7VA?NnLN$Tp!v_(HN%Kbnrh7BjHW zM%^0~NKGV0XViX+nv&)D@zEUjHW6Yl;S|aElec0BkHY?Ot*ZwojHTnm##TRXc1^+g zVlBwB)vro!*amZyiq z0%jS~1+6d~k z5939Or_fFc;q)V}b_a!GD6|(RYx?>jge|5}t4ERp)GKjFn*N~;s0;m`W>K@IX`1i=Ao zU6dN2wZ|+E>2n&(Cmf-o#$*%J;&77t4Kt z6v1)n9UwqCTte?pI_!Cvz$}jB7fe8yaZGj{MQI>%j@6{Aq!maagu*z8((gHes_K%C z5s}aq>`)Rzm*KRwqGD)%jqt8b7;X|de4Z9d+0NTT)RXtuY~(?y7`BK{_5B~ct*$TB z-#@nu#&oXf66_DuzlX747MF0aRhoq*9BkzXp*_A8cBxHJ^<@wTt}=;u2>ir)4cH$V zm3+eUku5D(%{#)~&1$~gFEJH@Zt@wB+Vp!qm{onavNidHH#QTy$J+fJ`Br-=s#N;G zs8n?x>e5{2BG_FhTd-|#;O#J2cGFQ%PQTrQR;)MUM>r{MLOY7Eo40k-nRE28IETHx z7m>+_vEwbKAx_2Bx8g_o8!-JVfH7wwL&U*zlhFXv7&1fIMaWV$@NBh|#5Nr?$K%)H zh_8Pn1Pyc!oyb3^{!bMCk-`!6f2Z&d)VV&UF4btGk3%7#{ex}WrW2Li1$-3 zg!*3$b;RKy>ctQlwVk2rs3B`a^18#KUUOB&2=<%IMsAw>o$H5!0KBtVG>TJ5!j zw1toof=KTguSRMkqy<2#B^(^H2k|3msmjJx4@c<=?E%7=42)-v$xJ^_M6TdDQ45rT zmx;L4AfhKC(beNXB;US-FwR2ndE-tfMc<20;IAaJgOJ_>5~UpRDewvk>~9nBO$OA7 zDW?G}5~rWUqu73qqMlTu63zftSS#VzYEKMD%mYeHOb1~3c00k!0K-g#L@hG0xi2hm z_7@}10U^)+1Q7f>aRj{;*gqij|6(MxVoDcaMRq;{u(1kkdJka5_DKXAtiTdD5H7Ue zNiekxtJMHxwf})Y9dJ<~+gdF^(!1!_RxyUc`S$lI`Vfl-2RgtC?BV?Y+pQ!qP?ASk zl1K{Y*{4zT({hqpY@*^MY{mk`6bcvFH&gWeN^~qm&u7uoDO_y-2SqPeGE5i_SfRax zV7W?$MoKb@lGIYrYQIGXK%zp>M6s~8s00+ww=bh;y%If!qEACcS;Y|)F0emA(H-zx zK#_=%;{eOEA0^nQ45qD3q9m`fBq@6Vbm){KgOa_uO)z?UI|vEkV&xvhRVd!fV5G8 zOKxlje;kx?g&AS!x;2M;T0+^R2@Pp zLw2Y^^O|IFuF+Rx6mfMv!v8Dq>-xbtD7^;LNge}@P!~c|T@S@y=nBR^8jQzrSg@3z zB%LxEsrO)B%8WM#U@Pwv_3qKHxa@-hMT3hjz4&v%T&&P7)kB9u1tH(z zR_LJlCOF)(OgBrJ5XV-8jPw)Bw_ELx6F<+Rd^Vg`;!lQb4_Es^G)%MUlE^XQnMS8T1c~rgpj;d1t4kkOb3jUx<>+mAz*a z)P6)=coYcK0>!=86bmLT^8Ax1zp6T}{bm;rGSq$mh+0U{72ONIz-aU52prqevy z8EJo%qT;WLLKPtDDT?ZURTSC}Q8+@7lYW4!0rqS!LG)up{hgxPuZlv&AgYO?cFR$n zEmWK~g1iufP;rhD&m{%^LeiABL<>d)!Gg8_=9~2J$_>!MUNf! zarCIRr{Uqd7o9_FID#bq!vE9w@5ldwd=DHWp5_93Hjt#Y7+4<{aj=lqeNnyXHe~YD zGr+PJ6QO}}COSEj5SEGbG*X~aag-zqx`b%#kRftGXTku(1R~EiUBx*Vsx(U|uTNGkZ+rA_>iqs+_JPeA`FqqAP#son+ z9n&P&6wZN~sr}C9X-aLlRd4T+3{L4RFMu-nS6SpTUBymXtf1j$)Hf#JAamW`_9|Lov(f zI}j=T78KW zRR5Z#!HEva!z>*!hAc{P1Tn|A#kb@B71ph&m@cJTbr1mu2%uN3W5tjjfsRD!qGAxU zA56VPAr__ds*N%Nxrn59kyI{Eni72Ka;&G%@cq<MMGxom>dZxB!l8H!>W3_xi!p@$=>1aJtXw(1|K zK#~2Cb^{@gkr|YS+i6%vXzm1xXaSd4zk*9ZZgBS*oX-UBjTLapv>n=3@$=%mHx#Ui z*+Gq`)Y2O;4)`|Vl+>R}3IpP8vUU)|j0pGFT4^W4fJ}&$zWxSPMu^N#OfTJJrph0)&8OEeShm zG;%{*EhFesG>%-@^RR^E_)x@44}*_A%%rzOiiNu(t8|~w1qn{3Ik$o*?@rj<=JlfX|+^SCJ?NnQ>R{KX3_ZH%kPJ1m~ zd?UGpuprV}G}CJLQQT83olf@NzK%S74p1PGdbz7d z<6s69n6YaIBd&l^(iYeU;|+)UXUgxsDB|97fzCD6KS+KT<{2dgsKZvKdT4mA#?m33 z_sb@n&|#??UD#XLfqo&hr%RWB@7s-^dN?{*%H6?~Kd^4whk#io zfbTbC0@426y{R5VDzOi48F2lN)YI-6V#iKIA-kC0*d`X96)Zi{y=Wvn30{NOBd9LQ z5*1x+-+}b$(p+Q(M#UvRfMcA{%)_hlG*J$zdkzn)l)wzeJ-(-j^?wF$-F2t=U2qYZ5vjdsO9H6y9kYhMgrI6%@rLVw* zvZhcf=Oy>*QL@#>b`~(tVF?rlS@c*Wb9YT+PhdcI@IDMz@gTdl8N0YKg7#QI;5z`NLVhwCC=KA|$qby1D4UE}2r zlx4EQwfA>WvSB)s=Z})x8DQyY011Y<%0d_z`t9VS!MKkh8=HhvoBqLXFo0{x*f-bz zh^(-XBuz&$TzHdZT2AYj^+2GZmt|UbV-YkF`jT&hfSDo*#EDE1#IS0^v=(M6df-TF ziKP)Vdk|W2deRSK0)@d~R`OwZOIy$Xh>Ws?PekT=nW=xdNgcvWs>Zs|SR^{o_@zn; zM`N(+=Pydnz-SZG#@^fGNUk457+um93H&z+Eij5k==V@T7Rye68Ym8RW)E^(ES&<< z+f&fZgj4XBe~dTC_MIEmFQ zGulu1o|h!rVMlW@?0(n+Tp*5--e-t9hB!Eg7{?GnC*S@iW%Rs^M3kW#JJ7Z`6SS6dqrb+PFbrC2;2Fc^A5#|wiAZnA6PY^x2=LRiWkW51e zYp?g2BBU{t0ZM^WcqbtPu(({fD6K}>vD;)A=z+v?DGC9t6amJQMu~9%c z0lyk7xI0W*b7zau5rPOmmYt_y&k_M$|JJ)M@s35VOBzR!>yma;9-tc6 zztzs9PL#*&=w}m?gh?i#<1<(N8x%HE44kxLlDk3U*V6hsLaM66&RARO=T2xw;d>i6 zl3>1b0uTNMTsq+D4mcugX|awkh}3sbT=Hsz`%Eku7F5LJv!t_MVXVl@$5)#b%b?Ji zS@9-tq!ai-Ey6QE1Gdk=gxL@avw;aeEmZg?0z4zahaz(e$U{9I3$^EesI#EraU%Ms zpj5Yn!rx2(g%*$-x*dj*&;d!di8%VqpDvpOu%e}-r%ARgCU*y#vj7T%x;_m|(m(Q0 zG+6B$K+@f!NtgCQlffWJ^_9OZ)4or(&|q6NX}EZ-T=#mLV1cqVNPTq;I!oO{AR$cy z1G2nWLQ1cx?#~4M?Y~ieCODPqswdY|<4LvDAMByrs2dWOCeXP`o_>RA8+HJIWkOH` z!L~MpL~txgM=b)ViL=l;(i|$OoO(CVNE!%QscgT2*8r_3 zPBT>p97RDfI+@re>8YhPa>wnA9Gc;hWC2OBsHgFw0sW&}`aKXKJo)bG{SJNVfy#am zr~>uGM*lb9PAff5^jkERv;vB4D* zu=sUEIL6jD{ewlT4ky0p)K)|4p$c5bgdvDSsbW)qsQjuX8!Mt@zdnimzZdcUE_~MZ z1O7An)qN%!8xp)w%pT73?qfUL7KICjB(tp=D?IYAbKP3V9+SPnMCB8+=J>4}n3;rxW|GQ+ijo$|xx*JJcVDKQMDvl%Xfz|G$OrL?ljUxDHTlWpf!$NcrA9FLU-zxF8&Lh_b=!j*UR<#j9-z__e2KA z`hzeu%Urx+g@j7<0aTtif~K$Ty;{tBhtz1&fJ3N2jAMv@1)~4fV*5+7J{8fsBjsvz>NnR-uOm&Slx{j0z`GR?+F+|Ue_N-s5p~~^)hTy!d6Kr z(`aZH(cEKQLkcuDpCoPpjy)#22DrkMQKSRhRPRE+L2p;PyNpiU`Fai&GKT6RfmF1+ zN#k8-iWl>HI^V@AWt{;u{3du|5T-4u{@6N5WX?Z827z;$C4eF)I!t3=v5s^9I}E2^ zY4>HB#+eBmX}DR1^JJmy$BjC`pGVKs?`&Gb6?UL->O(!MoRotDCPAzwTLF+0Gyd-{9$@mS(@t>YR%#)xabh!h%ijX?+#HEFt23BRP7{rJ3RgmLNSkwY@TA7YpZTL8;Y+?T*fVz#WJt z2WAX{t60!6FloO>XY!Rp^tWhCyl*uEN#A%99=;VDePW&?CfnS5HB0n=(btA4#idOl z)GviEQL6?)W2);a*&VP*% zbF|nTjZ^u)t)q(Dfoqt0t13W^pFs61FhZ%mil|yvPkGTWDsjvqy(FFX#9c1_64~(s z|2cNMY12Z+fXT|}I&zH21=tJCh;7k}nw7G)Nna79S!k0>M9+t*5(r1$#-g(dpGc3Q zZ(%wFDTWr22}+xhvW}|7XT}g<{gmntvt?%tj@E{_E&>LFQ)T%->TEJQmbs^&!3z#^ zXAyf5M)md=z7E6?T-b-L=0nk58f!rzgoG|Q5V0kRdNp?Q>Z@8nyO%6P81{dQ@K*WW z0vv`TlvOa3QGGLs20d+WM#!Q!D@Y7oQ6Yw^&KhiUp$S_6qzdJed|$3g&gCpdXCHY8nxZj@6y^lMK|@6ZHO(Lc4!B)>LDAW4D~W9D7RW*sn;M zUb!?*H*s*39l9`dqo!F8}?bw0E-hW zt?u3bKpd~%{s`XX7lYpYcf5#}y@Ev&t0`XpGD|4_mb{MGLtFTsf2mkaFKUY3n~E|Jonq7>{n@GX*Dz77<*RkTRFLG=K!gj=(r%u6mi- zLsF34-HhFRaIe}H*;lmPo!1>P3qslB%@Tck%2?;j@fAsWOmK`ji%dF7UW3YK=fS^gxLaOvs=XjP|l-yjR^PKRxG?sGdFBYB? z=bXcUj}mxcpweY5=hRP8h4|kfN>)%3E$GM~bzi1)G9xumA+@DTboNM}!|&;j7A;+3 zVUIYcN92ecUIl|pF&;6D*LX{h{{ph z^o(Uphds z(R~3YwYx8{quP`Ad%mD|sGEiN%LleA$F*npKZIr0tF)Y2ZD6&!W{ih+3nfJTb(pkf=;d)gp**W-H1$NFf;KLw7|LkMuur(#coQh@U zR5Z*fXibB36zX2KrkH^*G|Cw;-AF!K>G!mp(?T2HbwaCRYIOMH-X@kALM0*4xWu+p zCB9W!K|pNQmUFIWhTFq%%m~e(TSMi}(JyDI`m#%J=dTwn_TpvJC=K8LQ4 zojBo&BiDlmt{XGy#P#5L>q>&0GDoR==z7_Tb-*a!m}q3jt|zCarX=EX^>s#;q{3KU zT2WeFSz3}v2XJE=gsr+4VSq_nsZP4fNV(mMou||S{)}ziAK-~s*i)Q;;$6I za(^<`nC~O(FI9ZIcP8K2Xm*b9yzhG7?6LDOmR^=84iOB=g?++C77{fNvx;_oV8)jw zO)`m7Dq*+^o3mepDcf9v;~_bE&>TSa)@g8myznpKgEa%Omk_&~X%5(HMZs8f=vj}d z(?I!4&m&{>7mYZAP|+>kRsb#Ld^ql~cd5-ATVv&`PB?!Q5-h+GVxsYjtG@mGOl(YW zcAH_EYj)wtYRnvk>93G;DizGs8Sw-Ek%Yr6VSc;Fl(fzd#QXyR`E?)H0}pQYD~}0M$VX9Yo5(Tz_z2+ zw(B1(`l@#?$ZTgBpCCs zf$=K?`TIiU*Lq?ZpK6>#j}{||u{?#QW)1hw8+hMyJeB9xsD%`Y6sA+*gSn!F*5t!i z3x%R$I*J{aDp=eN{mRXzu6oRdxcJ_~*fXPX6nlkEyw^ZSv5OUBa1#3<`6PBaubqx! zFEEOgT6Prsz0vUv{@IX2_ZkA3vEp2 z)7WPZ$2UkHij^8+t5(>g5h`?$4*hwd1MY*H?f}=mPz;z}KF=cdTa6g{Jn#6o=@K3E zejcA%VIbX5%zLAZIS zC=P6w39DtA17(Uj`4NJL-zOGp#QqP$_)v$jBiwNbZ(0R$i)z6!?t#qVLXlS3su4D6 zF@`p20<&WgkCWVI8!FYpY(v`YXnIDo`Y3=%siiq$@(F){Az@+QsRgU1W}#73xtqrA%Q%PH;`U{nmLJUE+?UZoZ^FVZVPTJ38Ye6~ zDX8{oRHOm$nRc(UMq_nPUyj}ku>~K214-P|4S2ug=zvpfE8daYatHw0$avN8cfOA) zj);{ANt4>KsR8=J-8H4Wjs~%S(JsMNhVOPo4iP#Y-)GztyDuY}7?@F$sS)mpm7c{u z5hgn^US&ldJ=xR+My3cVcf+(aRYeF1L~OMx0jp?KjnImo zqY4RNPMW4FKb6$rI^7|tFlGO31Jk5HCMOoj0&$@92D(=u(;!cRVI7(cvPu)nbY7bd zz1(&BL-$un9-EF%Sci+^HL&EJ8<`yFY}7agK-zxQ?U8i+9_pr^?8vv8Z^zf_9g+(2 z1+(*jBgSisbe-<@eCax<5js3eBc*q-%?($9$=a_oTL)dhWT&`Q7ycat)K(q))&n;| zu#JmBDTiaW>#!=$`Tb0(;Mxb&7*%02>LrMTlh>h{h34S=7OM!3fy^%;y&A-4>SKBv zqzC7~%qI{-lXFb^5o$#UdQD620YVVkA-q4r<|SF_6p*KYzE2c0lxlL{qeXXtlj;eG zTJI{V7I-?NJf~czE_jZ(K2XW^QV}V@U|W zosmV7Q$qG%Y^O|Rj@u+39AgWrpNO3|ozE2b; z%n;W^3-@SJzk|Q3O$q^D7?8VUG*7IkGK=Nt=D^hn<(ldXxC5{}8lU&KNynoJRbTBu z-S_fB&emWNXy2dg%*-{J;I}Yh#KcN}LepT#p?(7P@oCtZ$p1IA8JH(+Ce4$#Nm4T^ zyKQJu@ylA$plGhY0u2j0W|65>0jene5Y~p$5z;{F@~zSrv`OM!w8SD06e&FZ>@F>^_R&DVehfyAK`3$; zExXndm0f2La_^-+P9>0iPx$nq17I>SU`<14&^Jr&i)1BT40pnX@LkmjeboUFPCD$q zc(YUe8gGUuq0d9fQFF7?=<4R>{dwpw1F_f{@|w!*|AJOLLd;2r{YPa)B6uO(slnG% zbG%9Tm}ds;@3Za;i=E?<=$I_-aZwPsJhOy6cS zE?#dYxd_uli2ilDfS^}fwcn}n^z#ogx2QSaZNQ?hxnbSttH&ZNSeT6@u#%%)*`Q|| zL4{NK@QiEogM*khifde_?{|0c`kk^613u&!Qx;@m)eJWX%+_Mk9QFo0op5_Vhwzzj zE=8EZN+&ryi`S@>eq<0jeEYE_jwU9;Ask3NgY{L6yaO0}Z-PPUU-F+d&vOKuv_0Rm zAK{oZ8@P8YXl{n)F31lRnr?q*2e`O>&(ru7E_&LaiE&kq$`LUoo8J^7{J>5^2=z<2 z?;%ReRKX&_6fi%~wy;I5@;8MoTm(x1q(VJMJfKBXZr}6Qt7%QWhSs1d9h)Mrq4!Q0 zk!!Ad9^PVKHA*0dP9o$!sc$@~328-)zpT%Tk4oC-oyk!5X1E0ViP~N>Y+oj%1+;4> zBnLgnI%Z!^*0rMZ`bV&bZ!>^(b(Dineypi`3~w}Hg1D0Yj73T@DXl{5$ilf4P$~&^ z?MN+siW+y{tKpmj^YRLUSsIWfjVBp}R_x*QA6pm{1ww^3kg1cM!M&Ma(Gy?&#nvng z2n%#@IrkTnii8DPC5^I2G@tDj7Duc@C5w<6xQZoQj5!BJ#ONkWaKfa!F&lwWVDE$jWz5GMxhlur%4_RZ}cw8$0jUL6c%IIED{{GO0>@dG~Q?Y zkS55N@{pBM8bj*wO}Is^mIyR{iO(WgJBEpzbUWxX@IFl&DAJZ~@bodL1&yG>`nTZO zd%FccZ#7tW?wunD?fD~q)^NLD#-nZ$pldK)VJiqDNVN!&JLorsxznfbq;SGxB#OxNGL&~3J~e;9)LH>x$)yP@m~c~%JI_jCSe9d*PQj-F$-&;*Br)`EAcob+*Ww5^ zSA}Ev;yAGF#33BgRO)1GNBVd%atxr@RI{(~3)S`2kRPAMN?~#mXgG|WNU0pJ`#7wM zW35(9VI=%eAsz8QKU$Oz0b_dSi=WdBFARovJ+vd|^Nn4RIDk~V_YbDSe_VvJTup|C$nw(9rql2>|Y zO($&xEgU(qjv-8^5Pj{=X6E@gC_=Pq*^x&Wc!MySw6eYLSHt+nXj5Z00M10MXf?Tg zh1<@UKot$U!!#U$q!U7wiF%diNt022P_9^bKPo(l?}dV&Ui}6% zYMx}6*zuB&g;-&qmz&|KGQ|L=3M+8q0E0;>1KeF@`f6Qi6+JLs&?o?VsU$qbs^~P&!@G!7xcx~HD<8cYr&B^!{j*rl7PJ15~idu z`$xz)N%ut)SNgTHwGrTmKV%kWYyDq(4K*`)oW4;$tg^_}y{^1p<;||{O^y+?ozc~8 zcib!ovdeF;9OvrJb;Q!U7sl!bMzg0Pn#InJHuy(?Vb=k(&V-dWME{Tgx<{Nz~^jRiZ5q9|`hvlHn2|cUO`#tR-VmQl|eUwhWBM3B@kc&xNLk@I8WXWVCl=2KMTNrFPMp>UU^A zwxKi>hSg`n!H1fFbIdjxySJKEHcUr8PwjA=F#G-T1WSXhmcvar_Y(vBJLxPeSEgbw zAH@|0|BdkN%$n%&gN_A*GO_!QH1N_PL?t_8AlpD>w_o4nV-xJ#QVXq2!z=oI$ z4>frUVw4$zt9y0%aQ*f>5#{Q3;#Qy$uI|l_Sl@C6*x)~hvti1Muv5Rg#9{Hz@fJnn z7BWRm=tQj5Yp{H`rpF)0VuA`JQXJ!cS0jwkzq!80A0fuNn>9kLxVFb-i@rcL55qir zkkMNd!)o5uU0S|ezx}wJW%)Gy_ODp5qWl*9_6^_~oarB!0*$KQo(ts$4)s;oKZ9?u z0CRP3)K@K_w?XXf&hnM|?GG^mtMyf%BjEdqC9;-J)Ndcpf(y!r>bHN!D6i5#@EKtG z?Jp9ES6I3NeHDGj<$ISQ(_Kl}o;brX&G!!mz*R|Cl-8saQ0Rg(7JiVbAmrFi7rHa) zp$4H#xZt;9QI`&BSpw$|i+iXE4L{YJ9nHRRGV!uf)Zn_T8CWZpr0wXF)a#s)X!tPd z4w}*E2r^xoXxxp3J0DfY6>Tyw*d`f0SVT?-5&v6PFsoOZM(Eb>!8+@wSKvG0DDw*p z-=#G2E!gnAPb*9j=XKe{;vU$wA=s4S&^*-SzkNqLxfT4ASOT+>AWGC?6QQ6LbAasl zbVobZe3cF`o05Mkr+TQtyEHoao8$)9mluR_CU16(XK6HPyqi7kCPmrx$G)1;Y$u{` z6&h1mn4a~_gqh~m7J_@vAA?+XGpnbEtaGTI*xE)nFY>{sAs zM<)kN7ldghPj)oJreppb^O6sb_70%!Fxqrf8E%&v%?cIVH4_S;(I3TN8l}~>fQ@a* zj^%JbXKEYno66Su!-S9Gn}wx1)I-rAQofN$0z7QMx!@^^MzgsuLKLL7Z;2$77)@e-DB_%_@~g^z25r5f_mk(q$GgKH}1Kv%&Tuj{ac z=}~3)zfsOLg+I90Y3^MSnfwiXuw3P&YWa`rKi_%Nb)LH;pI7Ot{s0i$1gEe1HG)`> zze|JtQB@D%rTQCv^*sc{whS@dAjKdPp^5y%k={FWu7gJ5UC$jl|8Pu0V%f$-=}XMz zy(@IC_l&#AlJKn1@kis2_+N704J|UkwL1n_3WIgx-qmq>cO7)+MSqR!-f(@P{7?d6ssb6@Z31x6k?vkWRPZU zm?4we^u31az{OeetW#*h%r>4r!{FQAAqMz{XAM`VN#naun-WxS2)Rz zA!5;d+pZ*FN&iB;7(=eyTJr2l2VTK$g5{s1>}QrNY<5kz0|~d+qvyiLQSRuX8@l8X zuvbe$}@yLoAad~QETk_!viFX z4`F_@#Oy=i{a_Do|Fi`fXNWjc>(|l}8#>0f&?2`&1M-w%3;U)c5gE5j zu>B~06qdNY`xqIX^$&7GHVhDBg`xP`oH8}+qDO!^r$9#O_zS4x{~BNP39Yh|17B*i z2p`GZuu5Z#)5!A;Dgn6`$0NVPEI&s$3V1*A^A8giYO%=T&CC}vbc}yN&Q*m@x?j!| zIgnS7j&GL9zfBCu-1$vuvozQPd5?~BkhemL2USsptzB)>NXkHq)vYKDL#&38cTH&x zIWd~?J8Ys9heGSJ#AiN2d9b&Z9>@JB3-AddT)f*3)2XhGFbuUOh$$M!uo*X^*Wlrh zADiisR|GTzhHMH&3X$wL3AyM+l^98wyXZ%Vz^bnvd&6QV)h_xG2C@kVTLBYrBplrK zIK3MA`j>+DaH#+s;nS`>X*1TeP|xjh0E<4(G*t2Dhrlqc0L2Ms$$q`QzYVGSfsQ{M z+jZKdUlAn|h^Sk6xe=>Ly&)~D?~cOFor}x)T2u)c(tks92(5QC=gYF$ zMP2j^zTH~*{~B)tv7Tp2^geou_#5zl;mzH(0-M9S?zvy>mW(uG$BH2u^r*76t3&$y zL?D2R|B`C5u$g*|Y7HmvXNUUSYp|gO1_yVs%R8uZfbLt3QRSZAf&PudcPU=kpFK$E z4#W@`V;xWrh1&eLvy~%->^_AoPA``ch-{bt&uPO=jtE&d&%n}jFcxz(tW{C{Gmok4 z3>H&J!@)T^M4YP;@79T-+y0|AL!1)W=KfIapTShC-`JV1Q#%LCs`R!GL6*K_DBOct z2y4%L^m@V;RWxG6nVQstn6ftczw_qkT>I6Y**aPJ5%;VJf`KVj zktuQv=KZiyDN38+TCy~svFLoM&YPb41)$|CFE&Zc!%(T(2iv;38OmT zQO#=fYcRto`w3 zxgV4@c-mOiD174HtmB*!jC&tBmA%U&>6j4%WOu7{2!}CYcSSlD5ZKB|t8@|tfe{AP z)g<0+fcv*gTKEA(#y1WeC~uG^e;x>gx1jm8kbLP{=>f#;ODFZq!LZXh2EqY#(wjF# ziUx~VD?bHtj6C&O7I>K2wFA9X7Fqf7rncZ#i8KSgtT-8uTMCq|6X1-kjx-4;$Ep@K z?+c;*B%BNT-)cz(H{%pscB+L=bViGzINqR^7GB*AYI&2JsYl$Zfvxlf_-d67!tQZT zr;TQuGfMhLJ6Jq`1*lGZjEOFk0JA)}8B2W2KQkmrx?L;yRNyxbUcfpw&^$!iAV0 zh^YfnX%osu*$44yPma0AbO}3xs4vRj-ay^cI*alV3>-aQ;G+&Wp0St+s{#igz?@MQ zUOIfg#|tVQE*9)PtjP>B^`y4ryCmYy-4*;osiwGx_6vwn*sg^m3btPWCG4Zn#JBMu z!Jr@O{wd&$*o}7Je3L=%{JZ$U0{lTj%hX~|gccuDz+-~~F|KTB(I#9Hk;1-j>X&*6 z-|rm7_dAuCAHfgl{1(%s)Q_B@VunV@)}_Ul_rqR@0r73b&?KrA$a`3wu$vLk!3qUT z!;cZOhtEtpEMyP_WRWI*aC{4d>%H%z-Qn($h!{k!jPKbJS!Rd z)Oz5K<08(+#RA@yW&BVs<6QbO>)SwfEOMvKB2vGDup_=9B}&5xV}%wY*@3w<{N>#W zC*}SWYO;!KLL|NX+7CTY%gzG-|ad$HLNou5+94gc5$OX?t8G{-k*U&)C)C! z_1J})-d!{7OC{erph4l(R$=V1v*=vY1sbQ$uNgC%HEN~?gS>c6rmEAhI^sM)^5gs- zIi)lmWS%A1GxYN;k$`UxU6wjw96oxKGFe6-8XO%ojSP|c!9)ZaXR|(W;>%;wv2Q=S zaIE3j$#0#3`eMgEVO3R>P3@H-q%NT?nR6SGY&}G78 zqMKu1#s)ZMc>Y^aN$gS!+|a|}?p1E?29CS(^3~qgK3A~P1+1mz)-8oH7}|lkkiCS<5yAuV-CdRXqwCjhj|G?Che}Ye9t-;LSP*C`4;@nR0vU0t=T#m$#O0a3rEQiC`bMx1vzJ z_qVPpHPZF1rRD7UR(7T9Wsq{0E4#@xUAf9NtM?|?oVhc&?0IwNXXWIx=jGd6EgW6u zIzJtkzv4dE8N|eloVj$PtA%41x@P2ZbgwHObgL^pvvSzIt~qnF=W*HWV%Pln6v&;2 zTxMEwt#nJQg@tg*tNfCk#j=*~dPS??`di%gitXphZLbL{0i^q0SCr%GT`uEp+yR?B z89=)9wRDvOjh;MtYVu^GbpvZqB~rfsm7=gKJ{UD|0;N-;?oyGMn24KV5j(HE zM7b(9t|BoGh-2a^dM}GL<|=o^macL-R#4ZVZieml>q=Ktl(GwBajonXe`DCSWyaa1 z>r2aVdn`8Wr%q15&y+-9ZvAC{oRQrzJJp!Gp!bg1MdNYF?2<*}3-HUhps^4U9zH%B z*~_=h;u>SRP?w6IO*hVh&s8WdAt5c0*wwQLv7!(d!~mu{XpMcqMx(t1;F+Z>vP#Q= zW;AYCNvSi|pe=h78$ljWc0X+?t}+c0H5$vx0hceT#oe`6#;snDINV#iq1<7_&9zR{ zCL7e3Q-haY42-8$r6o>ebQMy01!axfZJp&9MVAwomI02NZp-iP1GG^gapi4qjVN&( zU4QE^ZrF%aOngLK(UN^%=w4j9J(zBaW_RO8Kw`-EO>fxfSiPYvg2NrT?1o$;if*)( zmzG}LP4gkONMOiPknYW;gqI<7({Y5+LYR+g^& zIoig{#aFryuKP7QaNqCGq+$#y=#c&Y12(JoVCRIuu0SjO4Do9ivaQ1%!#|gxPZ^9x zl6LHmt|KljPuNIZzJl~0Qy>`3gh0X!mD&e=;#8w@O)(UYOyTnHwdj+kqO&Nv)JDRg zFNfEnr%W|kHvbZIB7=*Nry6k+^19WlAfi!OS61*f)RVzG>*ge>*2_ZR`n*>dlT+vp zsKU71HG)ETUXqP3(Mszm@j92y^uWGpcU4Y#G?fY94pElGyp6) z*6X2PhRF%1_Kw!eDGUCWDH*fu7U;{=uOI5oj3rUj0lPH%`uKqMCZQ{(jVxUOT{!(S zf4xa$EmHxlK&}3B9Nr+wDtqZFx~}?qne`?iy{mKcdhP(579^0jI6ODp>5 z%o}D3GS{Y^i`&4_5Kw{8>E)}DC&n*6J?u+R&cC;q$WFEZF6-|bb(_K2%U(nGnmmx0v!k_yvu5om%Z{s@;&wKH2r{ z35p@5@cDCf{ByME=3susF7JEq&1)D4dLU)~~FD;z6+ zrk4l10iL}ra=8&V!diy}QPTIpRf3n3Y$(Glo}Z7+w{CMhXhzoM+9SI!4hT&_A;sT+S* z%UqiTN_W-TUzDboF?l|;5pq?ripfA$B>a48Dl(J%O8j2=A2(?on?FuUoP;SPm?>Ia z?r_4>L7H(Y-sLlA;F~{4U@a1tP5^%29HioH%*if@^48ne=j%^{tmg zBN0^~%qZ?t2V;y}z9l`2d<{mfI6r5;MGj)Bl3B>S4unuJuP{Fo2yj|trspfz1@L58 zvWz(7#F9HN9f6#=Md`UY2ow~jTdgu3q{W*4-1$Z>6P}Zt8HMu-3yd5&IhN(l%bYDE z&7C*bYRR9IK9?cNE(-WyX0Sxr^YZ7w^8)hY=Pk45=M?4ST4sP3YT0a<_$UmkIpY|P zWzV4u`RVg5SwVidg_itz**Uqn0OhC8McR4UMk~BD1>k88xGyL`%w=K|5+^JGG31h- z%Z)SUrWeeou6G?3N1Z#qEORk9E6{l`a4)x9FUn;t zl1SNKF^}&P2NrG+g-I;3ydv_(*q~hNwPObx#KJjwtZ-h%i z>Y94E5i+X`CGxUc;<`*-FIujYpGp67%v_Hk;|Gl<8()2DPVO65gXMae&*sUDY3eG< z*rcE$Bq$`C|L7d_CwFmlC#NxPqEng8T$W_A$N?&RZLHaQIl6I^_oDP+nwnegxGWvD zaGzJu5Ar8xIMrAYZ((qVVEQ;`0ta$^^&<+4%BTpUaLf)2I>#;LiTC~CGO8f8jYE7&5(Qbf5K)8Csr9`Ri3( z1zEF=MgOzU#TYlinMkeeM5ASuR<4Hap_qI(&V}`5;Qtc(M5S*YB=P&YOm37*Fpu6b zb|XXuP6a2=4tes7@I_;O^|ODy6_vRGJ$%DD<7L@!{d97IK7G_cPRWHJ!PD4GDWCS_g8__zf88smY~E3jBDMq@7X9RrPIOCO1H zZ5|LT^v4A9c=n4oPLbM1W5uc!Wz6+$V+$31WpG@=gb5W~@4_EZk@Xa^Ex8gNSE48+ zZspzNYo>)j$_8&tw@_NrOo{m4TNYVhR<2&b1o+*Aatp2d;5?<(D}aYUNeSHQl_Yv) zWW_|rvg@i1W!&PD(#pjYz@M{>^&ZCttV%MI9!+ScP)Q%x~U%zxmB;-(24Q-kaf8X?G^!X9SAfy@ZmJopY@$c@78v zp?rWu+%Z$>Lb!;NnX;18Nz1gE2jYZcOl#$@$Vf)AYNq36ysS!!+sTA?$`&`0w0YHt z{KAKA2$w4Qu0s8&r@ku6J8XJdt|Dod6%Bu_fTn8($VXbj&2M2HjXK(@6a0B=72on1l`wE6mAD{`Oz6Bd8oOfdTU>GbY)_jN3e2VKoA6vP; zdaJaQM)xDK%t#X|CH{fR>i?QQ`~~7NzOr1TT=hzYY6HPwP_N15>Wo@L<#>sL_cZup zFQZ&}VR@jh%d$&f-Z*yqO&;(Uep9k>?Z+~DyiV<4e567)MT$(w#+4SDR9gGE(ymyu dD=e^W-jlh~jlcOc%u(O4YybcN literal 0 HcmV?d00001 From 2ca9fcd3b05993076cffbe89b0daacbd27c90f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 15:23:36 +0000 Subject: [PATCH 33/50] Resuscitate POSIX subsystem from revision 21378. svn path=/trunk/; revision=65460 --- rossubsys/posix/Makefile | 14 + rossubsys/posix/apps/baresh/.cvsignore | 5 + rossubsys/posix/apps/baresh/Makefile | 30 + rossubsys/posix/apps/baresh/baresh.rc | 4 + rossubsys/posix/apps/baresh/sh.c | 60 + rossubsys/posix/apps/baresh/sh.rc | 38 + rossubsys/posix/apps/bootpsx/bootpsx.c | 121 ++ rossubsys/posix/apps/bootpsx/bootpsx.rc | 4 + rossubsys/posix/apps/bootpsx/makefile | 21 + rossubsys/posix/apps/posixw32/.cvsignore | 5 + rossubsys/posix/apps/posixw32/00readme.txt | 90 ++ rossubsys/posix/apps/posixw32/Makefile | 29 + rossubsys/posix/apps/posixw32/console.c | 1243 +++++++++++++++++ rossubsys/posix/apps/posixw32/posixw32.c | 649 +++++++++ rossubsys/posix/apps/posixw32/posixw32.h | 53 + rossubsys/posix/apps/posixw32/posixw32.rc | 6 + rossubsys/posix/apps/posixw32/readme.txt | 80 ++ rossubsys/posix/apps/posixw32/vt100.c | 1124 +++++++++++++++ rossubsys/posix/apps/posixw32/vt100.h | 320 +++++ rossubsys/posix/copying | 340 +++++ rossubsys/posix/directory.xml | 14 + rossubsys/posix/include/aio.h | 74 + rossubsys/posix/include/arpa/inet.h | 56 + rossubsys/posix/include/assert.h | 58 + rossubsys/posix/include/cpio.h | 63 + rossubsys/posix/include/ctype.h | 61 + rossubsys/posix/include/dirent.h | 73 + rossubsys/posix/include/dlfcn.h | 58 + rossubsys/posix/include/errno.h | 131 ++ rossubsys/posix/include/fcntl.h | 149 ++ rossubsys/posix/include/fmtmsg.h | 93 ++ rossubsys/posix/include/fnmatch.h | 66 + rossubsys/posix/include/ftw.h | 73 + rossubsys/posix/include/glob.h | 73 + rossubsys/posix/include/grp.h | 59 + rossubsys/posix/include/iconv.h | 47 + rossubsys/posix/include/inttypes.h | 60 + rossubsys/posix/include/iso646.h | 54 + rossubsys/posix/include/libgen.h | 52 + rossubsys/posix/include/limits.h | 48 + rossubsys/posix/include/math.h | 65 + rossubsys/posix/include/netinet/in.h | 43 + rossubsys/posix/include/psx/.cvsignore | 1 + rossubsys/posix/include/psx/debug.h | 146 ++ rossubsys/posix/include/psx/dirent.h | 57 + rossubsys/posix/include/psx/dlfcn.h | 53 + rossubsys/posix/include/psx/errno.h | 45 + rossubsys/posix/include/psx/fdtable.h | 73 + rossubsys/posix/include/psx/interlock.h | 45 + rossubsys/posix/include/psx/lpcproto.h | 91 ++ rossubsys/posix/include/psx/path.h | 112 ++ rossubsys/posix/include/psx/pdata.h | 135 ++ rossubsys/posix/include/psx/pthread.h | 61 + rossubsys/posix/include/psx/safeobj.h | 59 + rossubsys/posix/include/psx/spawn.h | 54 + rossubsys/posix/include/psx/stdlib.h | 55 + rossubsys/posix/include/psx/template.h | 83 ++ rossubsys/posix/include/psx/tls.h | 48 + rossubsys/posix/include/pthread.h | 141 ++ rossubsys/posix/include/pwd.h | 60 + rossubsys/posix/include/sched.h | 62 + rossubsys/posix/include/signal.h | 322 +++++ rossubsys/posix/include/stdarg.h | 57 + rossubsys/posix/include/stddef.h | 63 + rossubsys/posix/include/stdio.h | 165 +++ rossubsys/posix/include/stdlib.h | 130 ++ rossubsys/posix/include/string.h | 69 + rossubsys/posix/include/sys/errno.h | 44 + rossubsys/posix/include/sys/ipc.h | 64 + rossubsys/posix/include/sys/mman.h | 43 + rossubsys/posix/include/sys/msg.h | 64 + rossubsys/posix/include/sys/resource.h | 49 + rossubsys/posix/include/sys/sem.h | 72 + rossubsys/posix/include/sys/shm.h | 64 + rossubsys/posix/include/sys/socket.h | 43 + rossubsys/posix/include/sys/stat.h | 124 ++ rossubsys/posix/include/sys/statvfs.h | 43 + rossubsys/posix/include/sys/time.h | 48 + rossubsys/posix/include/sys/timeb.h | 43 + rossubsys/posix/include/sys/times.h | 43 + rossubsys/posix/include/sys/types.h | 100 ++ rossubsys/posix/include/sys/uio.h | 43 + rossubsys/posix/include/sys/un.h | 43 + rossubsys/posix/include/sys/utsname.h | 54 + rossubsys/posix/include/sys/wait.h | 71 + rossubsys/posix/include/time.h | 114 ++ rossubsys/posix/include/types.h | 44 + rossubsys/posix/include/ucontext.h | 62 + rossubsys/posix/include/unistd.h | 508 +++++++ rossubsys/posix/include/utime.h | 50 + rossubsys/posix/include/wchar.h | 139 ++ rossubsys/posix/install.bat | 22 + rossubsys/posix/lib/.cvsignore | 5 + rossubsys/posix/lib/crt0w32.c | 46 + rossubsys/posix/lib/psxdll/.cvsignore | 7 + rossubsys/posix/lib/psxdll/Makefile | 172 +++ rossubsys/posix/lib/psxdll/csrapi.def | 6 + rossubsys/posix/lib/psxdll/dirent/.cvsignore | 2 + rossubsys/posix/lib/psxdll/dirent/closedir.c | 36 + rossubsys/posix/lib/psxdll/dirent/opendir.c | 100 ++ rossubsys/posix/lib/psxdll/dirent/readdir.c | 209 +++ rossubsys/posix/lib/psxdll/dlfcn/.cvsignore | 2 + rossubsys/posix/lib/psxdll/dlfcn/dlclose.c | 60 + rossubsys/posix/lib/psxdll/dlfcn/dlerror.c | 36 + rossubsys/posix/lib/psxdll/dlfcn/dlopen.c | 129 ++ rossubsys/posix/lib/psxdll/dlfcn/dlsym.c | 92 ++ rossubsys/posix/lib/psxdll/errno/.cvsignore | 2 + rossubsys/posix/lib/psxdll/errno/errno.c | 57 + rossubsys/posix/lib/psxdll/fcntl/.cvsignore | 2 + rossubsys/posix/lib/psxdll/fcntl/fcntl.c | 351 +++++ rossubsys/posix/lib/psxdll/fcntl/open.c | 180 +++ rossubsys/posix/lib/psxdll/libgen/.cvsignore | 2 + rossubsys/posix/lib/psxdll/libgen/basename.c | 114 ++ rossubsys/posix/lib/psxdll/misc/.cvsignore | 2 + rossubsys/posix/lib/psxdll/misc/fdtable.c | 238 ++++ rossubsys/posix/lib/psxdll/misc/heap.c | 17 + rossubsys/posix/lib/psxdll/misc/init.c | 65 + rossubsys/posix/lib/psxdll/misc/interlock.c | 83 ++ rossubsys/posix/lib/psxdll/misc/main.c | 149 ++ rossubsys/posix/lib/psxdll/misc/path.c | 460 ++++++ rossubsys/posix/lib/psxdll/misc/pdata.c | 607 ++++++++ rossubsys/posix/lib/psxdll/misc/safeobj.c | 45 + rossubsys/posix/lib/psxdll/misc/spawn.c | 630 +++++++++ rossubsys/posix/lib/psxdll/misc/template.c | 25 + rossubsys/posix/lib/psxdll/misc/tls.c | 89 ++ rossubsys/posix/lib/psxdll/psxdll.def | 229 +++ rossubsys/posix/lib/psxdll/psxdll.edf | 229 +++ rossubsys/posix/lib/psxdll/psxdll.rc | 39 + rossubsys/posix/lib/psxdll/pthread/.cvsignore | 2 + rossubsys/posix/lib/psxdll/pthread/create.c | 198 +++ rossubsys/posix/lib/psxdll/pthread/exit.c | 78 ++ rossubsys/posix/lib/psxdll/pthread/join.c | 98 ++ rossubsys/posix/lib/psxdll/pthread/kill.c | 22 + rossubsys/posix/lib/psxdll/pthread/mutex.c | 465 ++++++ rossubsys/posix/lib/psxdll/pthread/self.c | 23 + rossubsys/posix/lib/psxdll/sched/.cvsignore | 2 + rossubsys/posix/lib/psxdll/sched/yield.c | 33 + rossubsys/posix/lib/psxdll/signal/.cvsignore | 2 + rossubsys/posix/lib/psxdll/signal/raise.c | 25 + rossubsys/posix/lib/psxdll/stdlib/.cvsignore | 2 + rossubsys/posix/lib/psxdll/stdlib/abort.c | 22 + rossubsys/posix/lib/psxdll/stdlib/exit.c | 51 + rossubsys/posix/lib/psxdll/stdlib/malloc.c | 55 + rossubsys/posix/lib/psxdll/string/.cvsignore | 2 + rossubsys/posix/lib/psxdll/string/strcoll.c | 23 + rossubsys/posix/lib/psxdll/string/strdup.c | 44 + rossubsys/posix/lib/psxdll/string/strerror.c | 27 + .../posix/lib/psxdll/sys/stat/.cvsignore | 2 + rossubsys/posix/lib/psxdll/sys/stat/chmod.c | 30 + rossubsys/posix/lib/psxdll/sys/stat/mkdir.c | 34 + rossubsys/posix/lib/psxdll/sys/stat/mkfifo.c | 24 + rossubsys/posix/lib/psxdll/sys/stat/mknod.c | 23 + rossubsys/posix/lib/psxdll/sys/stat/stat.c | 36 + rossubsys/posix/lib/psxdll/sys/stat/umask.c | 24 + .../posix/lib/psxdll/sys/utsname/.cvsignore | 2 + .../posix/lib/psxdll/sys/utsname/uname.c | 178 +++ rossubsys/posix/lib/psxdll/unistd/.cvsignore | 2 + rossubsys/posix/lib/psxdll/unistd/access.c | 59 + rossubsys/posix/lib/psxdll/unistd/close.c | 42 + rossubsys/posix/lib/psxdll/unistd/dup.c | 41 + rossubsys/posix/lib/psxdll/unistd/fork.c | 250 ++++ rossubsys/posix/lib/psxdll/unistd/getcwd.c | 89 ++ rossubsys/posix/lib/psxdll/unistd/getpid.c | 45 + rossubsys/posix/lib/psxdll/unistd/getppid.c | 42 + rossubsys/posix/lib/psxdll/unistd/read.c | 117 ++ rossubsys/posix/lib/psxdll/unistd/sleep.c | 27 + rossubsys/posix/lib/psxdll/unistd/write.c | 68 + rossubsys/posix/lib/psxx/.cvsignore | 7 + rossubsys/posix/lib/psxx/Makefile | 57 + rossubsys/posix/lib/psxx/misc/.cvsignore | 6 + rossubsys/posix/lib/psxx/misc/main.c | 10 + rossubsys/posix/lib/psxx/misc/psxx.def | 631 +++++++++ rossubsys/posix/lib/psxx/misc/psxx.edf | 631 +++++++++ rossubsys/posix/lib/psxx/misc/psxx.rc | 38 + rossubsys/posix/lib/psxx/misc/stubs.c | 629 +++++++++ rossubsys/posix/server/.cvsignore | 6 + rossubsys/posix/server/Makefile | 52 + rossubsys/posix/server/call/.cvsignore | 4 + rossubsys/posix/server/call/_exit.c | 39 + rossubsys/posix/server/call/null.c | 38 + rossubsys/posix/server/include/.cvsignore | 1 + rossubsys/posix/server/include/psxss.h | 155 ++ rossubsys/posix/server/misc/.cvsignore | 3 + rossubsys/posix/server/misc/init.c | 320 +++++ rossubsys/posix/server/misc/main.c | 89 ++ rossubsys/posix/server/misc/print.c | 18 + rossubsys/posix/server/misc/psxss.rc | 4 + rossubsys/posix/server/ob/.cvsignore | 2 + rossubsys/posix/server/ob/process.c | 56 + rossubsys/posix/server/ob/session.c | 307 ++++ rossubsys/posix/server/ob/terminal.c | 56 + rossubsys/posix/server/port/.cvsignore | 2 + rossubsys/posix/server/port/api.c | 196 +++ rossubsys/posix/server/port/sbapi.c | 76 + rossubsys/posix/server/port/session.c | 195 +++ rossubsys/posix/server/port/utils.c | 69 + rossubsys/posix/server/port/utils.h | 4 + rossubsys/posix/tools/mksystab/.cvsignore | 6 + rossubsys/posix/tools/mksystab/Makefile | 54 + rossubsys/posix/tools/mksystab/mksystab.c | 379 +++++ rossubsys/posix/tools/mksystab/postbuild.cmd | 20 + rossubsys/posix/tools/mksystab/syscall.db | 130 ++ 202 files changed, 21003 insertions(+) create mode 100644 rossubsys/posix/Makefile create mode 100644 rossubsys/posix/apps/baresh/.cvsignore create mode 100644 rossubsys/posix/apps/baresh/Makefile create mode 100644 rossubsys/posix/apps/baresh/baresh.rc create mode 100644 rossubsys/posix/apps/baresh/sh.c create mode 100644 rossubsys/posix/apps/baresh/sh.rc create mode 100644 rossubsys/posix/apps/bootpsx/bootpsx.c create mode 100644 rossubsys/posix/apps/bootpsx/bootpsx.rc create mode 100644 rossubsys/posix/apps/bootpsx/makefile create mode 100644 rossubsys/posix/apps/posixw32/.cvsignore create mode 100644 rossubsys/posix/apps/posixw32/00readme.txt create mode 100644 rossubsys/posix/apps/posixw32/Makefile create mode 100644 rossubsys/posix/apps/posixw32/console.c create mode 100644 rossubsys/posix/apps/posixw32/posixw32.c create mode 100644 rossubsys/posix/apps/posixw32/posixw32.h create mode 100644 rossubsys/posix/apps/posixw32/posixw32.rc create mode 100644 rossubsys/posix/apps/posixw32/readme.txt create mode 100644 rossubsys/posix/apps/posixw32/vt100.c create mode 100644 rossubsys/posix/apps/posixw32/vt100.h create mode 100644 rossubsys/posix/copying create mode 100644 rossubsys/posix/directory.xml create mode 100644 rossubsys/posix/include/aio.h create mode 100644 rossubsys/posix/include/arpa/inet.h create mode 100644 rossubsys/posix/include/assert.h create mode 100644 rossubsys/posix/include/cpio.h create mode 100644 rossubsys/posix/include/ctype.h create mode 100644 rossubsys/posix/include/dirent.h create mode 100644 rossubsys/posix/include/dlfcn.h create mode 100644 rossubsys/posix/include/errno.h create mode 100644 rossubsys/posix/include/fcntl.h create mode 100644 rossubsys/posix/include/fmtmsg.h create mode 100644 rossubsys/posix/include/fnmatch.h create mode 100644 rossubsys/posix/include/ftw.h create mode 100644 rossubsys/posix/include/glob.h create mode 100644 rossubsys/posix/include/grp.h create mode 100644 rossubsys/posix/include/iconv.h create mode 100644 rossubsys/posix/include/inttypes.h create mode 100644 rossubsys/posix/include/iso646.h create mode 100644 rossubsys/posix/include/libgen.h create mode 100644 rossubsys/posix/include/limits.h create mode 100644 rossubsys/posix/include/math.h create mode 100644 rossubsys/posix/include/netinet/in.h create mode 100644 rossubsys/posix/include/psx/.cvsignore create mode 100644 rossubsys/posix/include/psx/debug.h create mode 100644 rossubsys/posix/include/psx/dirent.h create mode 100644 rossubsys/posix/include/psx/dlfcn.h create mode 100644 rossubsys/posix/include/psx/errno.h create mode 100644 rossubsys/posix/include/psx/fdtable.h create mode 100644 rossubsys/posix/include/psx/interlock.h create mode 100644 rossubsys/posix/include/psx/lpcproto.h create mode 100644 rossubsys/posix/include/psx/path.h create mode 100644 rossubsys/posix/include/psx/pdata.h create mode 100644 rossubsys/posix/include/psx/pthread.h create mode 100644 rossubsys/posix/include/psx/safeobj.h create mode 100644 rossubsys/posix/include/psx/spawn.h create mode 100644 rossubsys/posix/include/psx/stdlib.h create mode 100644 rossubsys/posix/include/psx/template.h create mode 100644 rossubsys/posix/include/psx/tls.h create mode 100644 rossubsys/posix/include/pthread.h create mode 100644 rossubsys/posix/include/pwd.h create mode 100644 rossubsys/posix/include/sched.h create mode 100644 rossubsys/posix/include/signal.h create mode 100644 rossubsys/posix/include/stdarg.h create mode 100644 rossubsys/posix/include/stddef.h create mode 100644 rossubsys/posix/include/stdio.h create mode 100644 rossubsys/posix/include/stdlib.h create mode 100644 rossubsys/posix/include/string.h create mode 100644 rossubsys/posix/include/sys/errno.h create mode 100644 rossubsys/posix/include/sys/ipc.h create mode 100644 rossubsys/posix/include/sys/mman.h create mode 100644 rossubsys/posix/include/sys/msg.h create mode 100644 rossubsys/posix/include/sys/resource.h create mode 100644 rossubsys/posix/include/sys/sem.h create mode 100644 rossubsys/posix/include/sys/shm.h create mode 100644 rossubsys/posix/include/sys/socket.h create mode 100644 rossubsys/posix/include/sys/stat.h create mode 100644 rossubsys/posix/include/sys/statvfs.h create mode 100644 rossubsys/posix/include/sys/time.h create mode 100644 rossubsys/posix/include/sys/timeb.h create mode 100644 rossubsys/posix/include/sys/times.h create mode 100644 rossubsys/posix/include/sys/types.h create mode 100644 rossubsys/posix/include/sys/uio.h create mode 100644 rossubsys/posix/include/sys/un.h create mode 100644 rossubsys/posix/include/sys/utsname.h create mode 100644 rossubsys/posix/include/sys/wait.h create mode 100644 rossubsys/posix/include/time.h create mode 100644 rossubsys/posix/include/types.h create mode 100644 rossubsys/posix/include/ucontext.h create mode 100644 rossubsys/posix/include/unistd.h create mode 100644 rossubsys/posix/include/utime.h create mode 100644 rossubsys/posix/include/wchar.h create mode 100644 rossubsys/posix/install.bat create mode 100644 rossubsys/posix/lib/.cvsignore create mode 100644 rossubsys/posix/lib/crt0w32.c create mode 100644 rossubsys/posix/lib/psxdll/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/Makefile create mode 100644 rossubsys/posix/lib/psxdll/csrapi.def create mode 100644 rossubsys/posix/lib/psxdll/dirent/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/dirent/closedir.c create mode 100644 rossubsys/posix/lib/psxdll/dirent/opendir.c create mode 100644 rossubsys/posix/lib/psxdll/dirent/readdir.c create mode 100644 rossubsys/posix/lib/psxdll/dlfcn/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/dlfcn/dlclose.c create mode 100644 rossubsys/posix/lib/psxdll/dlfcn/dlerror.c create mode 100644 rossubsys/posix/lib/psxdll/dlfcn/dlopen.c create mode 100644 rossubsys/posix/lib/psxdll/dlfcn/dlsym.c create mode 100644 rossubsys/posix/lib/psxdll/errno/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/errno/errno.c create mode 100644 rossubsys/posix/lib/psxdll/fcntl/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/fcntl/fcntl.c create mode 100644 rossubsys/posix/lib/psxdll/fcntl/open.c create mode 100644 rossubsys/posix/lib/psxdll/libgen/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/libgen/basename.c create mode 100644 rossubsys/posix/lib/psxdll/misc/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/misc/fdtable.c create mode 100644 rossubsys/posix/lib/psxdll/misc/heap.c create mode 100644 rossubsys/posix/lib/psxdll/misc/init.c create mode 100644 rossubsys/posix/lib/psxdll/misc/interlock.c create mode 100644 rossubsys/posix/lib/psxdll/misc/main.c create mode 100644 rossubsys/posix/lib/psxdll/misc/path.c create mode 100644 rossubsys/posix/lib/psxdll/misc/pdata.c create mode 100644 rossubsys/posix/lib/psxdll/misc/safeobj.c create mode 100644 rossubsys/posix/lib/psxdll/misc/spawn.c create mode 100644 rossubsys/posix/lib/psxdll/misc/template.c create mode 100644 rossubsys/posix/lib/psxdll/misc/tls.c create mode 100644 rossubsys/posix/lib/psxdll/psxdll.def create mode 100644 rossubsys/posix/lib/psxdll/psxdll.edf create mode 100644 rossubsys/posix/lib/psxdll/psxdll.rc create mode 100644 rossubsys/posix/lib/psxdll/pthread/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/pthread/create.c create mode 100644 rossubsys/posix/lib/psxdll/pthread/exit.c create mode 100644 rossubsys/posix/lib/psxdll/pthread/join.c create mode 100644 rossubsys/posix/lib/psxdll/pthread/kill.c create mode 100644 rossubsys/posix/lib/psxdll/pthread/mutex.c create mode 100644 rossubsys/posix/lib/psxdll/pthread/self.c create mode 100644 rossubsys/posix/lib/psxdll/sched/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/sched/yield.c create mode 100644 rossubsys/posix/lib/psxdll/signal/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/signal/raise.c create mode 100644 rossubsys/posix/lib/psxdll/stdlib/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/stdlib/abort.c create mode 100644 rossubsys/posix/lib/psxdll/stdlib/exit.c create mode 100644 rossubsys/posix/lib/psxdll/stdlib/malloc.c create mode 100644 rossubsys/posix/lib/psxdll/string/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/string/strcoll.c create mode 100644 rossubsys/posix/lib/psxdll/string/strdup.c create mode 100644 rossubsys/posix/lib/psxdll/string/strerror.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/chmod.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/mkdir.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/mkfifo.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/mknod.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/stat.c create mode 100644 rossubsys/posix/lib/psxdll/sys/stat/umask.c create mode 100644 rossubsys/posix/lib/psxdll/sys/utsname/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/sys/utsname/uname.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/.cvsignore create mode 100644 rossubsys/posix/lib/psxdll/unistd/access.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/close.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/dup.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/fork.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/getcwd.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/getpid.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/getppid.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/read.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/sleep.c create mode 100644 rossubsys/posix/lib/psxdll/unistd/write.c create mode 100644 rossubsys/posix/lib/psxx/.cvsignore create mode 100644 rossubsys/posix/lib/psxx/Makefile create mode 100644 rossubsys/posix/lib/psxx/misc/.cvsignore create mode 100644 rossubsys/posix/lib/psxx/misc/main.c create mode 100644 rossubsys/posix/lib/psxx/misc/psxx.def create mode 100644 rossubsys/posix/lib/psxx/misc/psxx.edf create mode 100644 rossubsys/posix/lib/psxx/misc/psxx.rc create mode 100644 rossubsys/posix/lib/psxx/misc/stubs.c create mode 100644 rossubsys/posix/server/.cvsignore create mode 100644 rossubsys/posix/server/Makefile create mode 100644 rossubsys/posix/server/call/.cvsignore create mode 100644 rossubsys/posix/server/call/_exit.c create mode 100644 rossubsys/posix/server/call/null.c create mode 100644 rossubsys/posix/server/include/.cvsignore create mode 100644 rossubsys/posix/server/include/psxss.h create mode 100644 rossubsys/posix/server/misc/.cvsignore create mode 100644 rossubsys/posix/server/misc/init.c create mode 100644 rossubsys/posix/server/misc/main.c create mode 100644 rossubsys/posix/server/misc/print.c create mode 100644 rossubsys/posix/server/misc/psxss.rc create mode 100644 rossubsys/posix/server/ob/.cvsignore create mode 100644 rossubsys/posix/server/ob/process.c create mode 100644 rossubsys/posix/server/ob/session.c create mode 100644 rossubsys/posix/server/ob/terminal.c create mode 100644 rossubsys/posix/server/port/.cvsignore create mode 100644 rossubsys/posix/server/port/api.c create mode 100644 rossubsys/posix/server/port/sbapi.c create mode 100644 rossubsys/posix/server/port/session.c create mode 100644 rossubsys/posix/server/port/utils.c create mode 100644 rossubsys/posix/server/port/utils.h create mode 100644 rossubsys/posix/tools/mksystab/.cvsignore create mode 100644 rossubsys/posix/tools/mksystab/Makefile create mode 100644 rossubsys/posix/tools/mksystab/mksystab.c create mode 100644 rossubsys/posix/tools/mksystab/postbuild.cmd create mode 100644 rossubsys/posix/tools/mksystab/syscall.db diff --git a/rossubsys/posix/Makefile b/rossubsys/posix/Makefile new file mode 100644 index 00000000000..c26056bf918 --- /dev/null +++ b/rossubsys/posix/Makefile @@ -0,0 +1,14 @@ +all: + @echo To build "posix" there are two paths: + @echo --- + @echo 1. copy the posix folder into the reactos\modules folder + @echo 2. link reactos/modules/posix to posix + @echo UNIX + @echo cd $${ROS_SRC_ROOT}/reactos/modules + @echo ln -s $${ROS_SRC_ROOT}/posix posix + @echo WINDOWS + @echo cd %%ROS_SRC_ROOT%%\reactos\modules + @echo junction posix %%ROS_SRC_ROOT%%\posix + @echo --- + @echo Eventually you can run "make depends" in the %%ROS_SRC_ROOT%%\reactos + @echo directory to compile it. diff --git a/rossubsys/posix/apps/baresh/.cvsignore b/rossubsys/posix/apps/baresh/.cvsignore new file mode 100644 index 00000000000..7e878167e8e --- /dev/null +++ b/rossubsys/posix/apps/baresh/.cvsignore @@ -0,0 +1,5 @@ +*.o +*.d +*.exe +*.coff +*.sym diff --git a/rossubsys/posix/apps/baresh/Makefile b/rossubsys/posix/apps/baresh/Makefile new file mode 100644 index 00000000000..89225a6eea7 --- /dev/null +++ b/rossubsys/posix/apps/baresh/Makefile @@ -0,0 +1,30 @@ +# $Id: Makefile,v 1.9 2003/01/05 18:27:19 robd Exp $ +# +# To run it in Win32 console mode, undefine __SUBSYSTEM_WINDOWS__ +# and pass "console" in the ld's --subsystem option. +# +# + +PATH_TO_TOP = ../../../reactos + +PATH_TO_PSX_TOP = ../.. + +TARGET_TYPE = program + +#TARGET_APPTYPE = console +TARGET_APPTYPE = windows + +TARGET_NAME = baresh + +TARGET_CFLAGS = -D__SUBSYSTEM_WINDOWS__ + +TARGET_LIBS = $(PATH_TO_PSX_TOP)/lib/crt0w32.o \ + $(PATH_TO_TOP)/dk/psx/lib/psxdll.a + +TARGET_OBJECTS = sh.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/posix/apps/baresh/baresh.rc b/rossubsys/posix/apps/baresh/baresh.rc new file mode 100644 index 00000000000..d8a17ab4c09 --- /dev/null +++ b/rossubsys/posix/apps/baresh/baresh.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "Bare sh for ReactOS POSIX Subsystem\0" +#define REACTOS_STR_INTERNAL_NAME "sh\0" +#define REACTOS_STR_ORIGINAL_FILENAME "sh\0" +#include diff --git a/rossubsys/posix/apps/baresh/sh.c b/rossubsys/posix/apps/baresh/sh.c new file mode 100644 index 00000000000..394b6444c35 --- /dev/null +++ b/rossubsys/posix/apps/baresh/sh.c @@ -0,0 +1,60 @@ +/* $Id: sh.c,v 1.3 2002/10/29 04:44:59 rex Exp $ + * + * baresh - Bare Shell for the PSX subsystem. + * Copyright (c) 2002 Emanuele Aliberti + * License: GNU GPL v2 + */ +#include +#include +#include + +#define INPUT_BUFFER_SIZE 128 + +int run=1; + +void cmd_exit(char*buf) +{ + run=0; +} + +void cmd_pwd(char * buf) +{ + char pwd[1024]; + + getcwd(pwd,sizeof pwd); + printf("%s\n",pwd); +} + +void cmd_ls(char*buf) +{ + char pwd[1024]; + DIR * dir; + struct dirent * entry; + + getcwd(pwd,sizeof pwd); + dir=opendir(pwd); + while (NULL!=(entry=readdir(dir))) + { + printf("%s\n",entry->d_name); + } + closedir(dir); +} + +int main(int argc,char*argv[]) +{ + char buf[INPUT_BUFFER_SIZE]; + + while (run) + { + printf("# "); + if (gets(buf)) + { + if (!strcmp("exit",buf)) cmd_exit(buf); + else if (!strcmp("pwd",buf)) cmd_pwd(buf); + else if (!strcmp("ls",buf)) cmd_ls(buf); + else printf("%s: unknown command\n",argv[0]); + } + } + return 0; +} +/* EOF */ diff --git a/rossubsys/posix/apps/baresh/sh.rc b/rossubsys/posix/apps/baresh/sh.rc new file mode 100644 index 00000000000..efc286da8ef --- /dev/null +++ b/rossubsys/posix/apps/baresh/sh.rc @@ -0,0 +1,38 @@ +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD + PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", RES_STR_COMPANY_NAME + VALUE "FileDescription", "Bare sh for POSIX+\0" + VALUE "FileVersion", RES_STR_FILE_VERSION + VALUE "InternalName", "sh\0" + VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "sh\0" + VALUE "ProductName", RES_STR_PRODUCT_NAME + VALUE "ProductVersion", RES_STR_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + diff --git a/rossubsys/posix/apps/bootpsx/bootpsx.c b/rossubsys/posix/apps/bootpsx/bootpsx.c new file mode 100644 index 00000000000..20515a26b93 --- /dev/null +++ b/rossubsys/posix/apps/bootpsx/bootpsx.c @@ -0,0 +1,121 @@ +/* $Id$ + * + * PROJECT: ReactOS Operating System / POSIX Environment Subsystem + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include +#include + +#define NTOS_MODE_USER +#include +#include + +#define RETRY_COUNT 3 + +/********************************************************************** + * PsxCheckSubSystem/1 + */ +NTSTATUS STDCALL +PsxCheckSubSystem (LPCSTR argv0) +{ + NTSTATUS Status = STATUS_SUCCESS; + UNICODE_STRING DirectoryName = {0, 0, NULL}; + OBJECT_ATTRIBUTES DirectoryAttributes = {0}; + HANDLE hDir = (HANDLE) 0; + + RtlInitUnicodeString (& DirectoryName, L"\\POSIX"); + InitializeObjectAttributes (& DirectoryAttributes, + & DirectoryName, + 0,0,0); + Status = NtOpenDirectoryObject (& hDir, + DIRECTORY_TRAVERSE, + & DirectoryAttributes); + if(NT_SUCCESS(Status)) + { + NtClose (hDir); + } + + return Status; +} + +/********************************************************************** + * PsxBootstrap/1 + */ +NTSTATUS STDCALL +PsxBootstrap (LPCSTR argv0) +{ + NTSTATUS Status = STATUS_SUCCESS; + UNICODE_STRING Program = {0, 0, NULL}; + HANDLE SmApiPort = (HANDLE) 0; + + + printf("Connecting to the SM: "); + Status = SmConnectApiPort (NULL, + (HANDLE) 0, + IMAGE_SUBSYSTEM_UNKNOWN, + & SmApiPort); + if(!NT_SUCCESS(Status)) + { + fprintf(stderr,"\n%s: SmConnectApiPort failed with 0x%08lx\n", + argv0, Status); + return Status; + } + RtlInitUnicodeString (& Program, L"POSIX"); + Status = SmExecuteProgram (SmApiPort, & Program); + if(STATUS_SUCCESS != Status) + { + fprintf(stderr, "%s: SmExecuteProgram = %08lx\n", argv0, Status); + } + NtClose (SmApiPort); + return Status; +} + +/********************************************************************** + * + * ENTRY POINT PUBLIC + * + *********************************************************************/ +int main (int argc, char * argv []) +{ + NTSTATUS Status = STATUS_SUCCESS; + INT RetryCount = RETRY_COUNT; + + while(RetryCount > 0) + { + Status = PsxCheckSubSystem (argv[0]); + if(STATUS_SUCCESS == Status) + { + if (RETRY_COUNT == RetryCount) + { + fprintf(stderr,"POSIX already booted.\n"); + }else{ + fprintf(stderr,"POSIX booted.\n"); + } + break; + }else{ + Status = PsxBootstrap (argv[0]); + } + -- RetryCount; + } + return NT_SUCCESS(Status) ? EXIT_SUCCESS : EXIT_FAILURE; +} +/* EOF */ diff --git a/rossubsys/posix/apps/bootpsx/bootpsx.rc b/rossubsys/posix/apps/bootpsx/bootpsx.rc new file mode 100644 index 00000000000..7ad1217f084 --- /dev/null +++ b/rossubsys/posix/apps/bootpsx/bootpsx.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "W32 Utility to boot the POSIX Subsystem\0" +#define REACTOS_STR_INTERNAL_NAME "bootpsx\0" +#define REACTOS_STR_ORIGINAL_FILENAME "bootpsx.exe\0" +#include diff --git a/rossubsys/posix/apps/bootpsx/makefile b/rossubsys/posix/apps/bootpsx/makefile new file mode 100644 index 00000000000..a83343f10e6 --- /dev/null +++ b/rossubsys/posix/apps/bootpsx/makefile @@ -0,0 +1,21 @@ +# $Id: Makefile 13504 2005-02-12 14:33:41Z ea $ + +PATH_TO_TOP = ../../../reactos + +TARGET_TYPE = program + +TARGET_APPTYPE = console + +TARGET_NAME = bootpsx + +TARGET_SDKLIBS = ntdll.a smdll.a kernel32.a + +TARGET_OBJECTS = $(TARGET_NAME).o + +TARGET_CFLAGS = -Wall -Werror + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/posix/apps/posixw32/.cvsignore b/rossubsys/posix/apps/posixw32/.cvsignore new file mode 100644 index 00000000000..7e878167e8e --- /dev/null +++ b/rossubsys/posix/apps/posixw32/.cvsignore @@ -0,0 +1,5 @@ +*.o +*.d +*.exe +*.coff +*.sym diff --git a/rossubsys/posix/apps/posixw32/00readme.txt b/rossubsys/posix/apps/posixw32/00readme.txt new file mode 100644 index 00000000000..4172f568646 --- /dev/null +++ b/rossubsys/posix/apps/posixw32/00readme.txt @@ -0,0 +1,90 @@ +08/08/96 - John L. Miller, johnmil@cs.cmu.edu, johnmil@jprc.com + +FILES INCLUDED: + 00readme.txt - this file + VT100.H - Definitions for VT-100 emulator. + VT100.C - Front end parsing code for VT-100 emulator + CONSOLE.C - Back-end code to allow VT-100 in WinNt/Win95 console + +Many UNIX users take terminals for granted, as something you get for free +with the operating system. Unfortunately, this isn't the case for many +non-unix operating systems, especially PC-based ones. After a number of +projects, I decided it would be nice if there was source publicly available +for doing VT-100 emulation. + +The files included with this distribution are not a complete implementation +of VT-100 terminal emulation, but do provide complete enough coverage to +use many vt-100 functions over the network. For instance, its enough to +use EMACS to edit, or to connect up to your favorite mud with ANSI color +and graphics characters. + +The VT-100 emulator is broken into two parts. The first is the front end, +vt100.c and vt100.h. These files were written to be fairly device-independant, +though admittedly if you're running under a 16-bit operating system instead +of a 32-bit, you might need to change some of the 'int' values to 'long.' +Otherwise, it should work 'as-is'. + +The second part is a back-end. The back-end is responsible for doing the +workhorse activities. The front-end parses a character stream, and decides +whether to clear a part of the screen, or move the cursor, or switch fonts. +Then it calls routines in the back-end to perform these activities. + +The back-end functions are, for the most part, very straight forward, and +quite easy to implement compared to writing a vt-100 emulator from scratch. +CONSOLE.C is a back-end for use in console (command, dos) windows under +Windows 95 and Windows NT. This console vt-100 emulator is also being used +in my TINTIN-III port and kerberized encrypted telnet port. + + +TO USE THIS VT-100 EMULATOR: + +First, it's intended to be linked directly into source code. You'll need +to change printf's and puts' in your source code to call vtprintf() and +vtputs() instead. You can add additional functions to vt100.c as you see +fit to handle other output functions like putchar() and write(). Another +routine you may want to use is vtProcessedTextOut(), which accepts a +buffer to output, and a count of characters in that buffer. + +Second, you need to make sure that your source code calls vtInitVT100() +before it does ANYTHING else. This initializes the vt-100 emulator. + +Third, if you want to use this VT-100 emulator with anything besides +Windows NT and Windows 95 consoles, you'll need to implement your own +back end. The list of functions you will need to supply, as well as what +they need to do is contained in vt100.h. The list (minus descriptions) +is as follows: + + int beInitVT100Terminal(); + int beAbsoluteCursor(int row, int col); + int beOffsetCursor(int row, int column); + int beRestoreCursor(void); + int beSaveCursor(void); + int beSetTextAttributes(int fore, int back); + int beRawTextOut(char *text, int len); + int beEraseText(int rowFrom, int colFrom, int rowTo, int colTo); + int beDeleteText(int rowFrom, int colFrom, int rowTo, int colTo); + int beInsertRow(int row); + int beTransmitText(char *text, int len); + int beAdvanceToTab(void); + int beClearTab(int col); + int beSetScrollingRows(int fromRow, int toRow); + int beRingBell(void); + int beGetTermMode(); + int beSetTermMode(int newMode); + +For details on what each of these does, read the descriptions of each +function included in vt100.h, and read over CONSOLE.C for examples. I've +included copious comments in all of these files to try to make them as +easy to use as possible. + +In any case, it should be easier than writing a VT-100 emulator from +scratch. + +KNOWN BUGS - + +o Many features of VT-100 emulation aren't implemented. This includes + support for graphics character set 0 and many of the + answerback functions. + +Well, good luck! + diff --git a/rossubsys/posix/apps/posixw32/Makefile b/rossubsys/posix/apps/posixw32/Makefile new file mode 100644 index 00000000000..961503b3823 --- /dev/null +++ b/rossubsys/posix/apps/posixw32/Makefile @@ -0,0 +1,29 @@ +# $Id$ +# +# Win32 Terminal Emulator for the POSIX+ subsystem. +# + +PATH_TO_TOP = ../../../reactos + +PATH_TO_TOP_PSX = ../.. + +TARGET_NAME = posixw32 + +TARGET_TYPE = program + +TARGET_APPTYPE = console + +TARGET_CFLAGS = -I$(PATH_TO_TOP_PSX)/include + +TARGET_SDKLIBS = ntdll.a smdll.a kernel32.a + +TARGET_OBJECTS = \ + $(TARGET_NAME).o \ + console.o \ + vt100.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/posix/apps/posixw32/console.c b/rossubsys/posix/apps/posixw32/console.c new file mode 100644 index 00000000000..66702c4124f --- /dev/null +++ b/rossubsys/posix/apps/posixw32/console.c @@ -0,0 +1,1243 @@ +/* console.c + * + * AUTHOR: John L. Miller, johnmil@cs.cmu.edu / johnmil@jprc.com + * DATE: 8/4/96 + * + * Copyright (c) 1996 John L. Miller + * + * Full permission is granted to use, modify and distribute + * this code, provided: + * 1) This comment field is included in its entirity + * 2) No money is charged for any work including or based on + * portions of this code. + * + * If you're a nice person and find this useful, I'd appreciate a + * note letting me know about it. e-mail is usually what spurs me + * on to improve and support software I've written. + * + * This file contains functions intended to provide the back + * end to a console window for my semi-vt100 emulator. + */ + +/* Note - one HUGE difference between console windows and terminal + * windows. Console windows displays start at (0,0). Terminal displays + * start at (1,1). YUCK! + */ + +#include +#include "vt100.h" + +int topScrollRow=TOP_EDGE; +int bottomScrollRow=BOTTOM_EDGE; + +/* This variable will contain terminal configuration flags, such as + * reverse/standard video, whether wrapping is enabled, and so on. + */ +int conTermMode; + +/* Variable to hold the cursor position for save/restore cursor calls */ +COORD cursorPosSave={1,1}; + +/* Handles to the current console for input and output */ +HANDLE hConIn, hConOut; + +/* Array of all the tabs which are currently set. Ironically, I think the + * primary emulator can CLEAR tags, but not set them. + */ +int tabSet[132]={0}; +int numTabs = 0; + + +/* This section contains console-specific color information. NT consoles can + * have Red, blue, green, and intensity flags set. Hence, 4 con_colors. + */ +#define NUM_CON_COLORS 4 + +/* Foreground and background colors are separated out */ +int conForeColors, conBackColors; + +/* mapping between foreground and background console colors: needed + * when reverse video is being used + */ +int conColorMapping[NUM_CON_COLORS][2] = +{ + {FOREGROUND_RED, BACKGROUND_RED}, + {FOREGROUND_BLUE, BACKGROUND_BLUE}, + {FOREGROUND_GREEN, BACKGROUND_GREEN}, + {FOREGROUND_INTENSITY, BACKGROUND_INTENSITY} +}; + + +/* Device-independant foreground and background flags stored here. + * probably a bad division of labor, but hey, since we don't use + * all of their flags in our console stuff (and hence can't retrieve + * them), the information has to live SOMEWHERE. + */ + +int scForeFlags, scBackFlags; + +/* Defines for array indexing for translation of flags */ +#define SC_FLAG 0 +#define CONSOLE_FLAG 1 + +/* Color mapping between SC (the vt-100 emulator device independant + * flags) and NT console character specific flags. Flags which have no analog + * are set to 0. Note that all global character attributes (character set + * underline, bold, reverse) are all stored in foreground only + */ +const int scForeMapping[NUM_SC_ATTRIBUTES][2] = +{ + {SC_RED,FOREGROUND_RED}, + {SC_GREEN,FOREGROUND_GREEN}, + {SC_BLUE,FOREGROUND_BLUE}, + {SC_BOLD,FOREGROUND_INTENSITY}, + {SC_UL,0}, + {SC_BL,0}, + {SC_RV,0}, + {SC_ASCII,0}, + {SC_G0,0}, + {SC_G1,0}, + {SC_GRAPHICS,0} +}; + +/* Background color mapping between SC and console */ +const int scBackMapping[NUM_SC_ATTRIBUTES][2] = +{ + {SC_RED,BACKGROUND_RED}, + {SC_GREEN,BACKGROUND_GREEN}, + {SC_BLUE,BACKGROUND_BLUE}, + {SC_BOLD,BACKGROUND_INTENSITY}, + {SC_UL,0}, + {SC_BL,0}, + {SC_RV,0}, + {SC_ASCII,0}, + {SC_G0,0}, + {SC_G1,0}, + {SC_GRAPHICS,0} +}; + +/* These arrays map character vals 0-255 to new values. + * Since the G0 and G1 character sets don't have a direct analog in + * NT, I'm settling for replacing the ones I know what to set them + * to. + */ +char G0Chars[256]; +char G1Chars[256]; + +/* These four sets of variables are just precomputed combinations of + * all the possible flags to save time for masking. + */ +int allFore[2], allBack[2]; +int bothFore[2], bothBack[2]; + + +/* FORWARD DECLARATIONS */ +int +RawPrintLine( + char *text, + int len, + int scrollAtEnd + ); + +int +Scroll( + int row + ); +/* END FORWARD DECLARATIONS */ + + + +/* beInitVT100Terminal() - + * + * This function is called by the VT100 emulator as soon as the + * front-end terminal is initialized. It's responsible for setting + * initial state of the terminal, and initing our many wacky variables. + */ + +int +beInitVT100Terminal() +{ + int i; + CONSOLE_SCREEN_BUFFER_INFO csbi; + + /* Set tabs to every 8 spaces initially */ + numTabs = 0; + for (numTabs=0; numTabs < 132/8; numTabs++) + tabSet[numTabs] = (numTabs+1)*8; + + /* Init the cursor save position to HOME */ + cursorPosSave.X = 1; + cursorPosSave.Y = 1; + + /* Disable scrolling window limits */ + topScrollRow=TOP_EDGE; + bottomScrollRow=BOTTOM_EDGE; + + conTermMode = ANSI_MODE|WRAP_MODE|REPEAT_MODE; + + hConIn = GetStdHandle(STD_INPUT_HANDLE); + hConOut = GetStdHandle(STD_OUTPUT_HANDLE); + + /* Init our time-saving mask variables */ + allFore[SC_FLAG] = allBack[SC_FLAG] = 0; + allFore[CONSOLE_FLAG] = allBack[CONSOLE_FLAG] = 0; + bothFore[SC_FLAG] = bothBack[SC_FLAG] = 0; + bothFore[CONSOLE_FLAG] = bothBack[CONSOLE_FLAG] = 0; + + for (i=0; i= csbi.dwSize.X) + { + cursorPos.X -= csbi.dwSize.X; + cursorPos.Y += 1; + } + + if (cursorPos.Y < 0) + cursorPos.Y = 0; + + SetConsoleCursorPosition(hConOut, cursorPos); + + return(0); +} + + +/* beRestoreCursor - + * + * Saved cursor position should be stored in a static + * variable in the back end. This function restores the + * cursor to the position stored in that variable. + */ + +int +beRestoreCursor(void) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + COORD cursorPos; + + GetConsoleScreenBufferInfo(hConOut, &csbi); + + cursorPos = csbi.dwCursorPosition; + + cursorPos.Y += cursorPosSave.Y; + + SetConsoleCursorPosition(hConOut, cursorPos); + + return(0); +} + +/* beSaveCursor - + * + * The back-end should maintain a static variable with the + * last STORED cursor position in it. This function replaces + * the contents of that variable with the current cursor position. + * The cursor may be restored to this position by using the + * beRestoreCursor function. + */ + +int +beSaveCursor(void) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + + GetConsoleScreenBufferInfo(hConOut, &csbi); + cursorPosSave = csbi.dwCursorPosition; + + cursorPosSave.Y -= csbi.srWindow.Top; + + return(0); +} + + +/* beGetTextAttributes - + * + * given a pointer to 'fore'ground and 'back'ground ints, + * fill them with a device-independant description of the + * current foreground and background colors, as well as any + * font information in the foreground variable. + */ + +int +beGetTextAttributes( + int *fore, + int *back + ) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi; + int i; + + /* Since it's entirely possible that the text attributes were + * changed without our terminal being notified, we might as well + * make sure they're accurate. + */ + + /* First, strip out everything in the screen buffer variables + * that we can detect + */ + + scForeFlags &= ~bothFore[SC_FLAG]; + scBackFlags &= ~bothBack[SC_FLAG]; + + /* Now, find out what the real settings are, and set the + * flag values accordingly. + */ + + GetConsoleScreenBufferInfo(hConOut, &csbi); + + + /* If reverse video is set, we need to reverse our color mappings + * before any calculations get made. + */ + + if (scForeFlags & SC_RV) + { + int tmpFore, tmpBack; + + tmpFore = csbi.wAttributes & conForeColors; + tmpBack = csbi.wAttributes & conBackColors; + + csbi.wAttributes &= ~(conForeColors | conBackColors); + + for (i=0; i (csbi.dwSize.X - csbi.dwCursorPosition.X)) + end = (csbi.dwSize.X - csbi.dwCursorPosition.X); + + /* If we're in non-ascii mode, we need to do a little + * magic to get the right characters out. + */ + + if (scForeFlags & SC_G1) + { + for (i=0; i toRow) + return(-1); + + topScrollRow = fromRow; + bottomScrollRow = toRow; + + return(0); +} + + +/* beRingBell - + * + * Ring the system bell once. + */ + +int +beRingBell(void) +{ + MessageBeep((UINT)-1); + return(0); +} + + +/* beGetTermMode - + * + * Return the value of conTermMode, which is the terminal settings which + * can be queried/set by [?#h/l. + */ + +int +beGetTermMode() +{ + return(conTermMode); +} + + +/* beSetTermMode - + * + * Set the terminal as requested, assuming we can. Right now we only handle a + * couple of the possible flags, but we store many of the others. + */ + +int beSetTermMode( + int newMode + ) +{ + int i, changes; + CONSOLE_SCREEN_BUFFER_INFO csbi; + COORD newSize; + SMALL_RECT newWindowRect; + DWORD dwConMode; + + changes = conTermMode ^ newMode; + + /* For each bit set in 'changes', determine the + * appropriate course of action. + */ + + for (i=0; i < NUM_TERM_ATTR_MODES; i++) + { + if (termAttrMode[i] & changes) + { + switch(termAttrMode[i]) + { + case COL132_MODE: + GetConsoleScreenBufferInfo(hConOut, &csbi); + newSize.Y = csbi.dwSize.Y; + newSize.X = (newMode & COL132_MODE) ? 132 : 80; + if (newSize.X != csbi.dwSize.X) + { + newWindowRect.Top = csbi.srWindow.Top; + newWindowRect.Bottom = csbi.srWindow.Bottom; + newWindowRect.Left = 0; + newWindowRect.Right = csbi.dwSize.X - 1; + SetConsoleScreenBufferSize(hConOut, newSize); + SetConsoleWindowInfo(hConOut, TRUE, &newWindowRect); + } + break; + + case WRAP_MODE: + GetConsoleMode(hConOut,&dwConMode); + if ( (newMode & WRAP_MODE) + && (! (dwConMode & ENABLE_WRAP_AT_EOL_OUTPUT)) + ) + { + dwConMode |= ENABLE_WRAP_AT_EOL_OUTPUT; + SetConsoleMode(hConOut, dwConMode); + } + if ( (!(newMode & WRAP_MODE)) + && (dwConMode & ENABLE_WRAP_AT_EOL_OUTPUT) + ) + { + dwConMode &= ~ENABLE_WRAP_AT_EOL_OUTPUT; + SetConsoleMode(hConOut, dwConMode); + } + break; + + case CURSORAPPL_MODE: + case ANSI_MODE: + case SMOOTHSCROLL_MODE: + case REVSCREEN_MODE: + case ORIGINREL_MODE: + case REPEAT_MODE: + /* bugbug - we don't handle any of these. */ + break; + } + } + } + + conTermMode = newMode; + + return(0); +} diff --git a/rossubsys/posix/apps/posixw32/posixw32.c b/rossubsys/posix/apps/posixw32/posixw32.c new file mode 100644 index 00000000000..b1d214e6d59 --- /dev/null +++ b/rossubsys/posix/apps/posixw32/posixw32.c @@ -0,0 +1,649 @@ +/* $Id$ + * + * PROJECT : ReactOS Operating System / POSIX+ Environment Subsystem + * DESCRIPTION: POSIXW32 - A DEC VT-100 terminal emulator for the PSX subsystem + * DESCRIPTION: that runs in the Win32 subsystem. + * COPYRIGHT : Copyright (c) 2001-2002 Emanuele Aliberti + * LICENSE : GNU GPL v2 + * DATE : 2001-05-05 + * AUTHOR : Emanuele Aliberti + * NOTE : This IS a Win32 program, but will fail if the PSX subsystem + * NOTE : is not installed. The PSX subsystem consists of two more + * NOTE : files: PSXSS.EXE, PSXDLL.DLL. + * WARNING : If you use this program under a real NT descendant, be + * WARNING : sure to have disabled the PSX subsystem. + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + * 2002-03-16 EA Today it actually compiled. + * 2002-06-08 EA Renamed (old name was CSRTERM) + */ +#include +#include +#include + +#define NTOS_MODE_USER +#include +#include +#include + +#include "vt100.h" +#include "posixw32.h" + +/*** OPTIONS *********************************************************/ + +#define PRIVATE static + +#define INPUT_QUEUE_SIZE 32 + +#ifdef NDEBUG +#define TRACE +#else +//#define TRACE OutputDebugString(__FUNCTION__) +#define TRACE vtprintf("%s\n",__FUNCTION__) +#endif + +/*** GLOBALS *********************************************************/ + +PRIVATE LPCSTR MyName = "POSIXW32"; +PRIVATE CSRTERM_SESSION Session = +{ + 0, //Identifier + { //ServerPort + {0,0,NULL}, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_SESSIONAPI_PORT_NAME, + INVALID_HANDLE_VALUE + } +}; + +/*** PRIVATE FUNCTIONS ***********************************************/ +VOID STDCALL Debug_Print (LPCSTR Format, ...) +{ + CHAR Buffer [512]; + va_list ArgumentPointer; + + va_start(ArgumentPointer, Format); + vsprintf(Buffer, Format, ArgumentPointer); + va_end(ArgumentPointer); + OutputDebugStringA (Buffer); +} +/********************************************************************** + * OutPort/2 PRIVATE + * + * DESCRIPTION + * Notify to PSXSS that input data is ready by sending a + * software interrupt on the \POSIX+\SessionPort port. + */ +PRIVATE DWORD STDCALL OutPort (PCHAR Buffer, ULONG Size) +{ + NTSTATUS Status; + PSX_TERMINAL_READ TerminalRead; +TRACE; + if (Size > 0) + { + /* LPC */ + TerminalRead.Header.MessageType = LPC_NEW_MESSAGE; + TerminalRead.PsxHeader.Context = PSX_CONNECTION_TYPE_TERMINAL; + TerminalRead.PsxHeader.Procedure = PSX_TERMINAL_INTERRUPT; + /* Terminal I/O */ + TerminalRead.Size = Size; +#if 0 + RtlCopyMemory (TerminalRead.Buffer, Buffer, Size); + Status = NtRequestWaitReplyPort ( + Session.ServerPort.Handle, + & TerminalRead + /* FIXME */ + ); +#endif + if (!NT_SUCCESS(Status)) + { + vtprintf ("%s: %s: NtRequestWaitReplyPort failed with %08x\n", + MyName, __FUNCTION__, Status); + return 0; + } + } + return Size; +} +/********************************************************************** + * ProcessConnectionRequest/1 PRIVATE + * + * DESCRIPTION + * Initialize our data for managing the control connection + * initiated by the PSXSS.EXE process. + */ +PRIVATE NTSTATUS STDCALL ProcessConnectionRequest (PLPC_MAX_MESSAGE Request) +{ + PPSX_CONNECT_PORT_DATA ConnectData = (PPSX_CONNECT_PORT_DATA) & Request->Data; + +TRACE; + if (PSX_CONNECTION_TYPE_SERVER != ConnectData->ConnectionType) + { + + return STATUS_UNSUCCESSFUL; + } + if (PSX_LPC_PROTOCOL_VERSION != ConnectData->Version) + { + + return STATUS_UNSUCCESSFUL; + } + Session.SsLinkIsActive = TRUE; + return STATUS_SUCCESS; +} +/********************************************************************** + * ProcessRequest/1 PRIVATE + * + * DESCRIPTION + * + */ +PRIVATE NTSTATUS STDCALL ProcessRequest (PPSX_MAX_MESSAGE Request) +{ +TRACE; + /* TODO */ + vtprintf("TEST VT-100\n"); + + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxSessionPortListener/1 PRIVATE + * + * DESCRIPTION + * Manage messages from the PSXSS, that is LPC messages we get + * from the PSXSS process to our \POSIX+\Sessions\P port. + * + * NOTE + * This function is the thread 's entry point created in + * CreateSessionObiects(). + */ +PRIVATE DWORD STDCALL PsxSessionPortListener (LPVOID Arg) +{ + NTSTATUS Status; + LPC_TYPE RequestType; + PSX_MAX_MESSAGE Request; + PPSX_MAX_MESSAGE Reply = NULL; + BOOL NullReply = FALSE; + +TRACE; + + while (TRUE) + { + Reply = NULL; + NullReply = FALSE; + while (!NullReply) + { + Status = NtReplyWaitReceivePort ( + Session.Port.Handle, + 0, + (PLPC_MESSAGE) Reply, + (PLPC_MESSAGE) & Request + ); + if (!NT_SUCCESS(Status)) + { + break; + } + RequestType = PORT_MESSAGE_TYPE(Request); + switch (RequestType) + { + case LPC_CONNECTION_REQUEST: + ProcessConnectionRequest ((PLPC_MAX_MESSAGE) & Request); + NullReply = TRUE; + continue; + case LPC_CLIENT_DIED: + case LPC_PORT_CLOSED: + case LPC_DEBUG_EVENT: + case LPC_ERROR_EVENT: + case LPC_EXCEPTION: + NullReply = TRUE; + continue; + default: + if (RequestType != LPC_REQUEST) + { + NullReply = TRUE; + continue; + } + } + Reply = & Request; + Reply->PsxHeader.Status = ProcessRequest (& Request); + NullReply = FALSE; + } + if ((STATUS_INVALID_HANDLE == Status) || + (STATUS_OBJECT_TYPE_MISMATCH == Status)) + { + break; + } + } + Session.SsLinkIsActive = FALSE; + TerminateThread (GetCurrentThread(), Status); +} +/********************************************************************** + * CreateSessionObiects/1 PRIVATE + * + * DESCRIPTION + * Create the session objects which are mananged by our side: + * + * \POSIX+\Sessions\P + * \POSIX+\Sessions\D + */ +PRIVATE NTSTATUS STDCALL CreateSessionObjects (DWORD Pid) +{ + NTSTATUS Status; + ULONG Id = 0; + OBJECT_ATTRIBUTES Oa; + LARGE_INTEGER SectionSize = {PSX_TERMINAL_SECTION_SIZE,0}; + +TRACE; + + + /* Critical section */ + Status = RtlInitializeCriticalSection (& Session.Lock); + if (!NT_SUCCESS(Status)) + { + vtprintf ( + "%s: %s: RtlInitializeCriticalSection failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + /* Port and port management thread */ + swprintf ( + Session.Port.NameBuffer, + PSX_NS_SESSION_PORT_TEMPLATE, + PSX_NS_SUBSYSTEM_DIRECTORY_NAME, + PSX_NS_SESSION_DIRECTORY_NAME, + Pid + ); + OutputDebugStringW(Session.Port.NameBuffer); + RtlInitUnicodeString (& Session.Port.Name, Session.Port.NameBuffer); + InitializeObjectAttributes (& Oa, & Session.Port.Name, 0, NULL, NULL); + Status = NtCreatePort (& Session.Port.Handle, & Oa, 0, 0, 0x10000); + if (!NT_SUCCESS(Status)) + { + RtlDeleteCriticalSection (& Session.Lock); + vtprintf ("%s: %s: NtCreatePort failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + Session.Port.Thread.Handle = + CreateThread ( + NULL, + 0, + PsxSessionPortListener, + 0, + CREATE_SUSPENDED, + & Session.Port.Thread.Id + ); + if ((HANDLE) NULL == Session.Port.Thread.Handle) + { + Status = (NTSTATUS) GetLastError(); + NtClose (Session.Port.Handle); + RtlDeleteCriticalSection (& Session.Lock); + vtprintf ("%s: %s: CreateThread failed with %d\n", + MyName, __FUNCTION__, Status); + return Status; + } + /* Section */ + swprintf ( + Session.Section.NameBuffer, + PSX_NS_SESSION_DATA_TEMPLATE, + PSX_NS_SUBSYSTEM_DIRECTORY_NAME, + PSX_NS_SESSION_DIRECTORY_NAME, + Pid + ); + OutputDebugStringW(Session.Section.NameBuffer); + RtlInitUnicodeString (& Session.Section.Name, Session.Section.NameBuffer); + InitializeObjectAttributes (& Oa, & Session.Section.Name, 0, 0, 0); + Status = NtCreateSection ( + & Session.Section.Handle, + SECTION_ALL_ACCESS, /* DesiredAccess */ + & Oa, + & SectionSize, + PAGE_READWRITE, /* Protect 4 */ + SEC_COMMIT, /* Attributes */ + 0 /* FileHandle: 0=pagefile.sys */ + ); + if (!NT_SUCCESS(Status)) + { + NtClose (Session.Port.Handle); + NtTerminateThread (Session.Port.Thread.Handle, Status); + RtlDeleteCriticalSection (& Session.Lock); + vtprintf ("%s: %s: NtCreateSection failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + Session.Section.BaseAddress = NULL; + Session.Section.ViewSize = SectionSize.u.LowPart; + Status = NtMapViewOfSection ( + Session.Section.Handle, + NtCurrentProcess(), + & Session.Section.BaseAddress, + 0, /* ZeroBits */ + 0, /* Commitsize */ + 0, /* SectionOffset */ + & Session.Section.ViewSize, + ViewUnmap, + 0, /* AllocationType */ + PAGE_READWRITE /* Protect 4 */ + ); + if (!NT_SUCCESS(Status)) + { + NtClose (Session.Port.Handle); + NtTerminateThread (Session.Port.Thread.Handle, Status); + NtClose (Session.Section.Handle); + RtlDeleteCriticalSection (& Session.Lock); + vtprintf ("%s: %s: NtMapViewOfSection failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + return Status; +} +/********************************************************************** + * RunPsxSs/0 + * + * DESCRIPTION + * This function is called only when initializing the session + * with PSXSS fails. We assume that it failed because the + * subsystem, being optional, is not running, therefore we + * ask the SM to start it up. + */ +PRIVATE NTSTATUS RunPsxSs(VOID) +{ + NTSTATUS Status; + HANDLE SmApiPort; + UNICODE_STRING Program; + + RtlInitUnicodeString (& Program, L"POSIX"); + Status = SmConnectApiPort (NULL, 0, 0, & SmApiPort); + if(!NT_SUCCESS(Status)) + { + return Status; + } + Status = SmExecuteProgram (SmApiPort, & Program); + NtClose (SmApiPort); + return Status; +} +/********************************************************************** + * CreateTerminalToPsxChannel/0 PRIVATE + * + * DESCRIPTION + * + */ +PRIVATE NTSTATUS STDCALL CreateTerminalToPsxChannel (VOID) +{ + PSX_CONNECT_PORT_DATA ConnectData; + ULONG ConnectDataLength = sizeof ConnectData; + SECURITY_QUALITY_OF_SERVICE Sqos; + NTSTATUS Status; + LONG Count = 2; + +TRACE; + + + /* + * Initialize the connection data object before + * calling PSXSS. + */ + ConnectData.ConnectionType = PSX_CONNECTION_TYPE_TERMINAL; + ConnectData.Version = PSX_LPC_PROTOCOL_VERSION; + /* + * Try connecting to \POSIX+\SessionPort. + */ + RtlInitUnicodeString (& Session.ServerPort.Name, Session.ServerPort.NameBuffer); + while (Count--) + { + OutputDebugStringW(Session.ServerPort.Name.Buffer); + Status = NtConnectPort ( + & Session.ServerPort.Handle, + & Session.ServerPort.Name, + & Sqos, + NULL, + NULL, + 0, + & ConnectData, + & ConnectDataLength + ); + if (STATUS_SUCCESS != Status) + { + if(Count) + { + vtprintf("%s: %s: asking SM to start PSXSS...\n",MyName,__FUNCTION__); + RunPsxSs(); + continue; + } + vtprintf ("%s: %s: NtConnectPort failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + break; + } + Session.Identifier = ConnectData.PortIdentifier; + return STATUS_SUCCESS; +} + +/********************************************************************** + * InitializeSsIoChannel PRIVATE + * + * DESCRIPTION + * Connect to the session port (CreateControChannel) of the PSX + * subsystem. If that succeeds, create our objects in the system + * name space (CreateSessionObjects). + */ +PRIVATE NTSTATUS STDCALL InitializeSsIoChannel (VOID) +{ + NTSTATUS Status = STATUS_SUCCESS; + DWORD Pid = GetCurrentProcessId(); + +TRACE; + + + Status = CreateTerminalToPsxChannel (); + if (STATUS_SUCCESS != Status) + { + vtprintf ("%s: %s: CreateTerminalToPsxChannel failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + Status = CreateSessionObjects (Pid); + if (STATUS_SUCCESS != Status) + { + vtprintf ("%s: %s: CreateSessionObjects failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxCreateLeaderProcess/1 PRIVATE + * + * DESCRIPTION + * Create a new PSXSS process. We are running under Win32 server + * and can not run directly a PSX image: we make SM run it for us. + * + */ +PRIVATE NTSTATUS STDCALL PsxCreateLeaderProcess (char * Command) +{ + NTSTATUS Status; +TRACE; + + if (NULL == Command) + { + Command = "sh"; + } + /* TODO: request SM to create the process: LPC:SmExecPgm() */ + vtprintf ("%s: %s: calling SMSS not implemented!", MyName, __FUNCTION__); + return STATUS_SUCCESS; +} +/********************************************************************** + * PrintInformationProcess/0 + * + * DESCRIPTION + */ +PRIVATE VOID STDCALL PrintInformationProcess (VOID) +{ + +TRACE; + + vtputs ("Leader:"); + vtprintf (" UniqueProcess %08x\n", Session.Client.UniqueProcess); + vtprintf (" UniqueThread %08x\n", Session.Client.UniqueThread); +} +/********************************************************************** + * PostMortem/0 + * + * DESCRIPTION + */ +PRIVATE INT STDCALL PostMortem (VOID) +{ + DWORD ExitCode; + +TRACE; + + + PrintInformationProcess (); + if (TRUE == GetExitCodeProcess (Session.Client.UniqueProcess, & ExitCode)) + { + vtprintf (" ExitCode %d\n", ExitCode); + } + return 0; +} +/********************************************************************** + * InputTerminalEmulator/0 + * + * DESCRIPTION + * Process user terminal input. + * + * NOTE + * This code is run in the main thread. + */ +PRIVATE BOOL STDCALL InputTerminalEmulator (VOID) +{ + HANDLE StandardInput; + INPUT_RECORD InputRecord [INPUT_QUEUE_SIZE]; + DWORD NumberOfEventsRead = 0; + INT CurrentEvent; + + +TRACE; + + StandardInput = GetStdHandle (STD_INPUT_HANDLE); + if (INVALID_HANDLE_VALUE == StandardInput) + { + return FALSE; + } + while ((TRUE == Session.SsLinkIsActive) && + ReadConsoleInput ( + StandardInput, + InputRecord, + (sizeof InputRecord) / sizeof (INPUT_RECORD), + & NumberOfEventsRead + )) + { + for ( CurrentEvent = 0; + (CurrentEvent < NumberOfEventsRead); + CurrentEvent ++ + ) + { + switch (InputRecord [CurrentEvent].EventType) + { + case KEY_EVENT: + OutPort (& InputRecord [CurrentEvent].Event.KeyEvent.uChar.AsciiChar, 1); + break; + case MOUSE_EVENT: + /* TODO: send a sequence of move cursor codes */ + /* InputRecord [CurrentEvent].Event.MouseEvent; */ + break; + case WINDOW_BUFFER_SIZE_EVENT: + /* TODO: send a SIGWINCH signal to the leader process. */ + /* InputRecord [CurrentEvent].Event.WindowBufferSizeEvent.dwSize; */ + break; + /* Next events should be ignored. */ + case MENU_EVENT: + vtprintf ("%s: %s: MENU_EVENT received from CSRSS\n", MyName, __FUNCTION__); + case FOCUS_EVENT: + vtprintf ("%s: %s: FOCUS_EVENT received from CSRSS\n", MyName, __FUNCTION__); + break; + } + } + NumberOfEventsRead = 0; + } + return TRUE; +} +/********************************************************************** + * Startup/1 + * + * DESCRIPTION + * Initialize the program. + */ +PRIVATE VOID STDCALL Startup (LPSTR Command) +{ + NTSTATUS Status; + DWORD ThreadId; + + +TRACE; + + /* PSX process info */ + Session.Client.UniqueProcess = INVALID_HANDLE_VALUE; + Session.Client.UniqueThread = INVALID_HANDLE_VALUE; + /* Initialize the VT-100 emulator */ + vtInitVT100 (); + /* Connect to PSXSS */ + Status = InitializeSsIoChannel (); + if (!NT_SUCCESS(Status)) + { + vtprintf ("%s: failed to connect to PSXSS (Status=%08x)!\n", + MyName, Status); + exit (EXIT_FAILURE); + } + /* Create the leading process for this session */ + Status = PsxCreateLeaderProcess (Command); + if (!NT_SUCCESS(Status)) + { + vtprintf ("%s: failed to create the PSX process (Status=%08x)!\n", + MyName, Status); + exit (EXIT_FAILURE); + } +} +/********************************************************************** + * Shutdown/0 PRIVATE + * + * DESCRIPTION + * Shutdown the program. + */ +PRIVATE INT STDCALL Shutdown (VOID) +{ + +TRACE; + + /* TODO: try exiting cleanly: close any open resource */ + /* TODO: notify PSXSS the session is terminating */ + RtlDeleteCriticalSection (& Session.Lock); + return PostMortem (); +} +/********************************************************************** + * + * ENTRY POINT PUBLIC + * + *********************************************************************/ +int main (int argc, char * argv []) +{ + +TRACE; + + Startup (argv[1]); /* Initialization */ + InputTerminalEmulator (); /* Process user input */ + return Shutdown (); +} +/* EOF */ diff --git a/rossubsys/posix/apps/posixw32/posixw32.h b/rossubsys/posix/apps/posixw32/posixw32.h new file mode 100644 index 00000000000..d3e1626fcf5 --- /dev/null +++ b/rossubsys/posix/apps/posixw32/posixw32.h @@ -0,0 +1,53 @@ +#ifndef _CSRTERM_H +#define _CSRTERM_H + +/* PSX session: CSR terminal emulator side */ + +#define NAME_BUFFER_SIZE 64 + +typedef struct _PSXSS_PORT +{ + UNICODE_STRING Name; + WCHAR NameBuffer [NAME_BUFFER_SIZE]; + HANDLE Handle; + +} PSXSS_PORT, * PPSXSS_PORT; + +typedef struct _CSRTERM_SESSION_PORT +{ + UNICODE_STRING Name; + WCHAR NameBuffer [NAME_BUFFER_SIZE]; + HANDLE Handle; + struct { + HANDLE Handle; + DWORD Id; + } Thread; + +} CSRTERM_SESSION_PORT; + +typedef struct _CSRTERM_SESSION_SECTION +{ + UNICODE_STRING Name; + WCHAR NameBuffer [NAME_BUFFER_SIZE]; + HANDLE Handle; + ULONG Size; + PVOID BaseAddress; + ULONG ViewSize; + +} CSRTERM_SESSION_SECTION; + +typedef struct _CSRTERM_SESSION +{ + ULONG Identifier; /* PortID for ServerPort in PSXSS */ + PSXSS_PORT ServerPort; /* \POSIX+\SessionPort */ + CSRTERM_SESSION_PORT Port; /* \POSIX+\Sessions\P */ + CSRTERM_SESSION_SECTION Section; /* \POSIX+\Sessions\D */ + CLIENT_ID Client; + CRITICAL_SECTION Lock; + BOOL SsLinkIsActive; + +} CSRTERM_SESSION, * PCSRTERM_SESSION; + +#define LOCK_SESSION RtlEnterCriticalSection(& Session.Lock) +#define UNLOCK_SESSION RtlLeaveCriticalSection(& Session.Lock) +#endif /* ndef _CSRTERM_H */ diff --git a/rossubsys/posix/apps/posixw32/posixw32.rc b/rossubsys/posix/apps/posixw32/posixw32.rc new file mode 100644 index 00000000000..f29da60632c --- /dev/null +++ b/rossubsys/posix/apps/posixw32/posixw32.rc @@ -0,0 +1,6 @@ +/* $Id$ */ +#define REACTOS_STR_FILE_DESCRIPTION "W32 Terminal Emulator for POSIX+ LPC pseudo tty\0" +#define REACTOS_STR_INTERNAL_NAME "posixw32\0" +#define REACTOS_STR_ORIGINAL_FILENAME "posixw32.exe\0" +#include +/* EOF */ diff --git a/rossubsys/posix/apps/posixw32/readme.txt b/rossubsys/posix/apps/posixw32/readme.txt new file mode 100644 index 00000000000..4a81a20059c --- /dev/null +++ b/rossubsys/posix/apps/posixw32/readme.txt @@ -0,0 +1,80 @@ +$Id: readme.txt,v 1.3 2002/10/29 04:45:05 rex Exp $ + +posixw32 - a Win32 client terminal emulator for the POSIX+ subsystem + +SYNOPSYS + + posixw32 [program] + + program program to be run in the terminal; if none is given, + the shell for the current user (W32 session's) is + used. + +DESCRIPTION + + posixw32 emulates a DEC VT-100 terminal (on top of the CSRSS + subsystem, hence the name) which is the controlling terminal + for a process [program] running in the context of the PSX + subsystem. posixw32 is a Win32 console application, not a PSX + application. The process created by the PSX subsystem on behalf + of posixw32 is not the child of the posixw32 instance that + requested it. posixw32 simply performs terminal I/O in the CSRSS + world (the W32 world!) for [program]. + +NOTES + + The role of posixw32 is creating a session in the PSX subsystem + managing any I/O for it. This is how it works: + + 1. posixw32 creates two well known named objects in the system + name space that will allow the PSX subsystem server to build + the I/O channel for the session. To let the PSX subsystem + process recognize the objects, they contain a numeric suffix + which is the process identifier (n) the system gives to each + instance of posixw32: + + \POSIX+\Session\Pn LPC port (IPC rendez-vous object) + \POSIX+\Session\Dn section (shared memory object) + + posixw32 also creates a new thread to manage the calls though + the LPC port. Port Pn is used by the subsystem to control the + terminal which posixw32 emulates. + + 2. posixw32 connects to the PSX subsystem session port + + \POSIX+\SessionPort + + and asks the subsystem to create a new session. + + 3. The PSX subsystem, if it decides to accept the request, creates + a new session for that calling instance of posixw32 (n), and in + turn connects back to the terminal control port + + \POSIX+\Session\Pn + + 4. When posixw32 makes the PSX subsystem create the new session, it + also tells the subsystem what program should be the session + leader process. The PSX subsystem creates that process (the + image file to start must be marked IMAGE_SUBSYSTEM_POSIX_GUI or + IMAGE_SUBSYSTEM_POSIX_CUI). + + 5. The requested process [program] runs in the context of the + PSX subsystem and performs any terminal I/O via the channel + posixw32 and the PSX susbstem created. + +REVISIONS + 2001-05-05 created + 2002-03-03 simplified + 2002-06-08 renamed to avoid future name clash + +AUTHOR + + Emanuele Aliberti + +CREDITS + + John L. Miller (johnmil@cs.cmu.edu, johnmil@jprc.com) code for + a basic VT-100 emulator for Win32 consoles is used to process + tc* calls output. + +EOF diff --git a/rossubsys/posix/apps/posixw32/vt100.c b/rossubsys/posix/apps/posixw32/vt100.c new file mode 100644 index 00000000000..5d7f52dc9ae --- /dev/null +++ b/rossubsys/posix/apps/posixw32/vt100.c @@ -0,0 +1,1124 @@ +/* vt100.c + * + * AUTHOR: John L. Miller, johnmil@cs.cmu.edu / johnmil@jprc.com + * DATE: 8/4/96 + * + * Copyright (c) 1996 John L. Miller + * + * Full permission is granted to use, modify and distribute + * this code, provided: + * 1) This comment field is included in its entirity + * 2) No money is charged for any work including or based on + * portions of this code. + * + * If you're a nice person and find this useful, I'd appreciate a + * note letting me know about it. e-mail is usually what spurs me + * on to improve and support software I've written. + * + */ + +/* This is the main code body for my generic vt-100 emulator. This code + * body provides parsing for most of the vt-100 escape sequences, but it + * doesn't actually do anything with some of them. The idea behind this + * parser is to provide a generic front-end that you can initialize, then + * send all of your output to. The output is parsed by the routines in this + * program, then spit out to a back-end. + * + * What back-end you say? Well, the one you have to supply yourself. There's a + * dozen or so routines you have to provide for character-based I/O, cursor + * movement, erasing and deleting text, and setting text and terminal attributes. + * + * For a list of the routines your back end must supply, read vt100.h closely. + * + * In case it's not obvious, these routines were written for a system running win32. + * for vt100.c and vt100.h, most of the code should be easily portable to other + * operating systems. Yeah, like they NEED a vt-100 emulator :p + */ + +#include +#include +#include +#include "vt100.h" + + +/* NOTE - many of the functions look like they should + * take X-Y pairs. Bear in mind this is a text display, + * so for this we're talking ROWS and COLUMNS. So parm + * lists go (row, column), which is the opposite of (x, y). + */ + +char cBuffer[MAXVTBUFLEN+1]; /* terminal output buffer for unprocessed characters */ +int BufLen; /* Number of characters in cBuffer waiting for output */ + +/* List of all device-independant colors. These colors will be transmitted to a + * back-end routine responsible for setting the foreground and background text + * colors appropriately. Note that the color combinations are ordered to correspond + * with combinations of red (0x1), green (0x2) and blue (0x4) bit flags. + */ + +int ScColorTrans[8]= { 0, + SC_RED, + SC_GREEN, + SC_RED|SC_GREEN, + SC_BLUE, + SC_RED|SC_BLUE, + SC_RED|SC_GREEN, + SC_RED|SC_GREEN|SC_BLUE + }; + + +/* List of terminal attributes which we track (used by [?#h and [?#l) */ + +int termAttrMode[NUM_TERM_ATTR_MODES] = { 0, + CURSORAPPL_MODE, + ANSI_MODE, + COL132_MODE, + SMOOTHSCROLL_MODE, + REVSCREEN_MODE, + ORIGINREL_MODE, + WRAP_MODE, + REPEAT_MODE, + }; + +/* FORWARD FUNCTION DECLARATIONS - + * these functions are intended for use only in this module */ + +static int ProcessBracket(int Start); +static int ProcessEscape(int Start); +static int ProcessControl(int Start); +static int ProcessBuffer(void); + +/* END FORWARD FUNCTION DECLARATIONS */ + + + +/* vtputs() - + * + * front-end 'puts()' substitute. Call this routine instead + * of 'puts()', and it'll pass the output through the vt100 emulator. + */ + +vtputs(char *f) +{ + char cbuf[1024]; + + strcpy(cbuf,f); + strcat(cbuf,"\n"); + vtProcessedTextOut(cbuf, strlen(cbuf)); + + return(0); +} + + +/* vtprintf - + * + * This routine is a substitute for printf(). Call this routine with the + * same parameters you would use for printf, and output will be channelled + * through the vt-100 emulator. + */ + +vtprintf(char *format, ...) +{ + char cbuf[1024]; + va_list va; + + va_start(va, format); + vsprintf(cbuf,format, va); + va_end(va); + + vtProcessedTextOut(cbuf, strlen(cbuf)); + + return(0); +} + +/* vtInitVT100 - + * + * Set the initial state of the VT-100 emulator, and call the initialization + * routine for the back end. This routine MUST be invoked before any other, or + * the VT-100 emulator will most likely roll over and die. + */ + +vtInitVT100(void) +{ + int i=0; + + cBuffer[0]='\0'; + BufLen=0; + + beInitVT100Terminal(); /* call the back-end initialization. */ + + return(0); +} + + +/* ProcessBracket - + * + * Helper routine for processing escape sequences. By the time this + * routine is invoked, '[' has already been read in the input + * stream. 'Start' is an index in cBuffer to the ''. + * + * If an escape sequence is successfully parsed, return the index of the + * first character AFTER the escape sequence. Otherwise, return 'Start'. + * + */ + +static int ProcessBracket(int Start) +{ + int End; /* Current character being examined in cBuffer */ + int args[10], numargs=0; /* numerical args after [ */ + int iMode; + int i; + int itmp=0; + int left; + int iForeground, iBackground; + + /* If there's no valid escape sequence, return as we were called. */ + + if ((cBuffer[Start+1] != '[')||(Start+2 >= BufLen)) + return(Start); + + End = Start + 2; + + /* Loop through the buffer, hacking out all numeric + * arguments (consecutive string of digits and + * semicolons + */ + + do { + itmp = 0; /* itmp will hold the current arguments integer value */ + + /* the semicolon is a delimiter */ + if (cBuffer[End] == ';') + { + End++; + + if (End >= BufLen) + return(Start); + } + + /* Parse this argument into a number. */ + + while (isdigit(cBuffer[End])) + { + itmp = itmp*10 + (cBuffer[End]-'0'); + End++; + if (End >= BufLen) + return(Start); + } + + /* Save the numeric argument if we actually + * parsed a number. + */ + + if (End != Start + 2) + args[numargs++] = itmp; + + } while (cBuffer[End] == ';'); + + /* At this point, we've come across a character that isn't a number + * and isn't a semicolon. This means it is the command specifier. + */ + + /* Number of characters left in the input stream. I don't use + * this as rigorously as I should here. + */ + + left = BufLen - End; + + /* Return if there's definitely not enough characters for a + * full escape sequence. + */ + + if (left <= 0) + return(Start); + + /* Giant switch statement, parsing the command specifier that followed + * up [arg;arg;...arg + */ + + switch (cBuffer[End]) + { + /* Cursor Up: Esc [ Pn A */ + case 'A': + beOffsetCursor(numargs ? -args[0] : -1, 0); + End += 1; + break; + + /* Cursor Down: Esc [ Pn B */ + case 'B': + beOffsetCursor(numargs ? args[0] : 1, 0); + End += 1; + break; + + /* Cursor Right: Esc [ Pn C */ + case 'C': + beOffsetCursor(0, numargs ? args[0] : 1); + End += 1; + break; + + /* Cursor Left: Esc [ Pn D */ + case 'D': + beOffsetCursor(0, numargs ? -args[0] : -1); + End += 1; + break; + + /* Direct Addressing : Esc [ Pn(row);Pn(col)H or + * Esc [ Pn(row);Pn(col)f + */ + case 'H': + case 'f': + if (numargs == 0) + beAbsoluteCursor(1,1); + else if (numargs == 1) + beAbsoluteCursor(args[0] > 0 ? args[0] : 1,1); + else if (numargs == 2) + beAbsoluteCursor(args[0] > 0 ? args[0] : 1, args[1] > 0 ? args[1] : 1); + + End += 1; + break; + + /* Erase from Cursor to end of screen Esc [ J + * Erase from Beginning of screen to cursor Esc [ 1 J + * Erase Entire screen Esc [ 2 J + */ + case 'J': + if (numargs == 0) + beEraseText(CUR_ROW, CUR_COL, BOTTOM_EDGE, RIGHT_EDGE); + else if (args[0] == 1) + beEraseText(TOP_EDGE, LEFT_EDGE, CUR_ROW, CUR_COL); + else + beEraseText(TOP_EDGE, LEFT_EDGE, BOTTOM_EDGE, RIGHT_EDGE); + + End += 1; + break; + + /* Erase from Cursor to end of line Esc [ K + * Erase from Beginning of line to cursor Esc [ 1 K + * Erase Entire line Esc [ 2 K + */ + case 'K': + if (numargs == 0) + beEraseText(CUR_ROW, CUR_COL, CUR_ROW, RIGHT_EDGE); + else if (args[0] == 1) + beEraseText(CUR_ROW, LEFT_EDGE, CUR_ROW, CUR_COL); + else + beEraseText(CUR_ROW, LEFT_EDGE, CUR_ROW, RIGHT_EDGE); + + End += 1; + break; + + + /* Set Graphics Rendition: + * ESC[#;#;....;#m + * The graphics rendition is basically foreground and background + * color and intensity. + */ + case 'm': + beGetTextAttributes(&iForeground, &iBackground); + + if (numargs < 1) + { + /* If we just get ESC[m, treat it as though + * we should shut off all extra text + * attributes + */ + + iForeground &= ~(SC_BOLD|SC_UL|SC_BL|SC_RV|SC_GRAPHICS|SC_G0|SC_G1); + iForeground |= SC_ASCII; + + beSetTextAttributes(iForeground, iBackground); + End += 1; + break; + } + + /* Loop through all the color specs we got, and combine them + * together. Note that things like 'reverse video', 'bold', + * and 'blink' are only applied to the foreground. The back end + * is responsible for applying these properties to all text. + */ + for (i=0; i < numargs; i++) + { + switch(args[i]) + { + /* 0 for normal display */ + case 0: + iForeground &= ~SC_BOLD; + break; + + /* 1 for bold on */ + case 1: + iForeground |= SC_BOLD; + break; + + /* 4 underline (mono only) */ + case 4: + iForeground |= SC_UL; + break; + + /* 5 blink on */ + case 5: + iForeground |= SC_BL; + break; + + /* 7 reverse video on */ + case 7: + iForeground |= SC_RV; + break; + + /* 8 nondisplayed (invisible) BUGBUG - not doing this. */ + + + /* 30-37 is bit combination of 30+ red(1) green(2) blue(4) + * 30 black foreground + */ + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + iForeground &= ~(SC_RED|SC_GREEN|SC_BLUE); + iForeground |= ScColorTrans[args[i]-30]; + break; + + /* 40-47 is bit combo similar to 30-37, but for background. */ + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + iBackground &= ~(SC_RED|SC_GREEN|SC_BLUE); + iBackground |= ScColorTrans[args[i]-30]; + break; + } + } + + beSetTextAttributes(iForeground, iBackground); + + End += 1; + break; + + + /* + * Set with Esc [ Ps h + * Reset with Esc [ Ps l + * Mode name Ps Set Reset + * ------------------------------------------------------------------- + * Keyboard action 2 Locked Unlocked + * Insertion 4 Insert Overwrite + * Send - Receive 12 Full Echo + * Line feed/New line 20 New line Line feed + */ + case 'h': + case 'l': + /* BUGBUG - many of the terminal modes are set with '?' as the + * first character rather than a number sign. These are dealt with + * later in this switch statement because they must be. Most other + * settings are just ignored, however. + */ + End += 1; + break; + + /* Insert line Esc [ Pn L */ + case 'L': + beInsertRow(CUR_ROW); + End += 1; + break; + + /* Delete line Esc [ Pn M */ + case 'M': + do { + beDeleteText(CUR_ROW,LEFT_EDGE, CUR_ROW, RIGHT_EDGE); + } while (--args[0] > 0); + + End += 1; + break; + + /* Delete character Esc [ Pn P */ + case 'P': + do { + beDeleteText(CUR_ROW, CUR_COL, CUR_ROW, CUR_COL); + } while (--args[0] > 0); + End += 1; + break; + + /* Set the Scrolling region Esc [ Pn(top);Pn(bot) r */ + case 'r': + if (numargs == 0) + beSetScrollingRows(TOP_EDGE,BOTTOM_EDGE); + else if (numargs == 2) + beSetScrollingRows(args[0],args[1]); + End += 1; + break; + + /* Print screen or region Esc [ i + * Print cursor line Esc [ ? 1 i + * Enter auto print Esc [ ? 5 i + * Exit auto print Esc [ ? 4 i + * Enter print controller Esc [ 5 i + * Exit print controller Esc [ 4 i + */ + case 'i': + /* BUGBUG - print commands are not acted upon. */ + End += 1; + break; + + + /* Clear tab at current column Esc [ g + * Clear all tabs Esc [ 3 g + */ + case 'g': + if (numargs == 0) + beClearTab(CUR_COL); + else + if ((numargs == 1) && (args[0] == 3)) + beClearTab(ALL_TABS); + + End += 1; + break; + + /* BUGBUG - queries which require responses are ignored. */ + + /* Esc [ c DA:Device Attributes + * or + * + * Esc [ x DECREQTPARM: Request Terminal Parameters + * * values other than 1 are ignored. Upon + * receipt of a value of 1, the following + * response is sent: + * Esc[3;;;;;1;0x + * + * * Where , , , and + * are as for VT100s with the following + * exceptions: + * Values of 5 and 6 bits per + * character are sent as 7 bits. + * , + * These two numbers will always + * be the same. 9600 baud is + * sent for 7200 baud. + * + * Esc [ Ps n DSR: Device Status Report + * * Parameter values other than 5, 6, are ignored. + * If the parameter value is 5, the sequence + * Esc [ O n is returned. If the parameter value is + * 6, the CPR: Cursor Position Report sequence + * Esc [ Pn ; Pn R is returned with the Pn set to + * cursor row and column numbers. + * + * Cursor Controls: + * ESC[#;#R Reports current cursor line & column + */ + + /* spec [h [l + * Cursor key ?1 Application Cursor + * ANSI/VT52 ?2 ANSI VT52 + * Column ?3 132 80 + * Scrolling ?4 Smooth Jump + * Screen ?5 Reverse Normal + * Origin ?6 Relative Absolute + * Wraparound ?7 Wrap Truncate + * Auto key repeat ?8 Repeating No repeat + */ + case '?': + /* We didn't catch the numeric argument because the '?' stopped + * it before. Parse it now. + */ + args[0]=0; + while (isdigit(cBuffer[++End])) + { + if (End >= BufLen) + return(Start); + args[0] = 10*args[0] + (cBuffer[End]-'0'); + } + + /* If we don't handle this particular '?' command (and + * there are plenty we don't) then just ignore it. + */ + if ( (args[0] > 8) + ||( (cBuffer[End] != 'l') && (cBuffer[End] != 'h')) + ) + { + End++; + if (End >= BufLen) + return(Start); + break; + } + + /* This command sets terminal status. Get the current status, + * determine what needs to be changed, and send it back. + */ + + iMode = beGetTermMode(); + + /* If we need a given mode and it's not already set, set it. */ + + if ((cBuffer[End] == 'h') && (!(iMode & termAttrMode[args[0]]))) + { + beSetTermMode(iMode | termAttrMode[args[0]]); + } + + /* likewise, clear it as appropriate */ + if ((cBuffer[End] == 'l') && (iMode & termAttrMode[args[0]])) + { + beSetTermMode(iMode & ~termAttrMode[args[0]]); + } + + End++; + break; + + /* If it's an escape sequence we don't treat, pretend as though we never saw + * it. + */ + default: + End += 1; + break; + } + + return(End); + +} + + +/* ProcessEscape - + * + * At this point, has been seen. Start points to the escape + * itself, and then this routine is responsible for parsing the + * rest of the escape sequence, and either pawning off further parsing, + * or acting upon it as appropriate. + * + * Note that the escape sequences being parsed are still contained in cBuffer. + */ + +static int ProcessEscape(int Start) +{ + int End; + int left; + int fore, back; + int i; + + /* if it's definitely not a full escape sequence, return that we haven't + * seen it. + */ + if ((cBuffer[Start] != 27)||(Start+1 >= BufLen)) + return(Start); + + End = Start + 1; + + /* At this point, if the sequence is x, 'End' points at + * x + */ + + /* left = number of characters left unparsed in the buffer. */ + left = BufLen - End -1; + + /* Main switch statement - parse the escape sequence according to the + * next character we see. + */ + + switch (cBuffer[End]) + { + /* Hard Reset Esc c BUGBUG - not imp'd. */ + case 'c': + End += 1; + break; + + /* Cursor up Esc A */ + case 'A': + beOffsetCursor(-1,0); + End += 1; + break; + + /* Cursor down Esc B */ + case 'B': + beOffsetCursor(1,0); + End += 1; + break; + + /* Cursor right Esc C */ + case 'C': + beOffsetCursor(0,1); + End += 1; + break; + + /* Cursor left Esc D */ + case 'D': + beOffsetCursor(0,-1); + End += 1; + break; + + /* Newline command: Esc E */ + case 'E': + beRawTextOut("\n",strlen("\n")); + End += 1; + break; + + /* Invoke the Graphics character set Esc F */ + case 'F': + beGetTextAttributes(&fore, &back); + if (! (fore & SC_GRAPHICS)) + { + fore &= ~(SC_ASCII|SC_G0|SC_G1); + fore |= SC_GRAPHICS; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* Invoke the ASCII character set Esc G */ + case 'G': + beGetTextAttributes(&fore, &back); + if (! (fore & SC_ASCII)) + { + fore &= ~(SC_G0|SC_G1|SC_GRAPHICS); + fore |= SC_ASCII; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* Move the cursor to (1,1): Home cursor Esc H */ + case 'H': + beAbsoluteCursor(TOP_EDGE,LEFT_EDGE); + End += 1; + break; + + /* Reverse line feed Esc I */ + case 'I': + beOffsetCursor(-1,0); + End += 1; + break; + + /* Erase to end of screen Esc J */ + case 'J': + beEraseText(CUR_ROW, CUR_COL, BOTTOM_EDGE, RIGHT_EDGE); + End += 1; + break; + + /* Erase to end of line Esc K */ + case 'K': + beEraseText(CUR_ROW, CUR_COL, CUR_ROW, RIGHT_EDGE); + End += 1; + break; + + /* Reverse Line: Esc M */ + case 'M': + beAbsoluteCursor(CUR_ROW, LEFT_EDGE); + beOffsetCursor(-1,0); + End += 1; + break; + + /* Switch to G1 graphics character set. Esc N */ + case 'N': + beGetTextAttributes(&fore, &back); + if (! (fore & SC_G1)) + { + fore &= ~(SC_G0|SC_ASCII|SC_GRAPHICS); + fore |= SC_G1; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* Switch to G0 graphics character set Esc O */ + case 'O': + beGetTextAttributes(&fore, &back); + if (! (fore & SC_G0)) + { + fore &= ~(SC_G1|SC_ASCII|SC_GRAPHICS); + fore |= SC_G0; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* Print cursor line Esc V BUGBUG - unimp'd */ + case 'V': + End += 1; + break; + + /* Enter print controller Esc W BUGBUG - unimp'd */ + case 'W': + End += 1; + break; + + /* Exit print controller Esc X BUGBUG - unimp'd */ + case 'X': + End += 1; + break; + + /* Cursor address Esc Y row col BUGBUG - unimp'd and needed */ + case 'Y': + End += 1; + break; + + /* Identify terminal type Esc Z */ + case 'Z': + beTransmitText(ANSWERBACK_MESSAGE,strlen(ANSWERBACK_MESSAGE)); + End += 1; + break; + + /* One of dozens of escape sequences starting [. Parse further */ + case '[': + /* pass in the escape as the starting point */ + End = ProcessBracket(End-1); + break; + + /* Print screen Esc ] BUGBUG - unimp'd */ + case ']': + End += 1; + break; + + /* Enter auto print Esc ^ BUGBUG - unimpd' */ + case '^': + End += 1; + break; + + /* Exit auto print Esc - BUGBUG - unimpd' */ + case '-': + End += 1; + break; + + /* Alternate keypad Esc = BUGBUG - unimpd' */ + case '=': + End += 1; + break; + + /* Numeric keypad Esc > BUGBUG - unimpd' */ + case '>': + End += 1; + break; + + /* Enter ANSI mode Esc < BUGBUG - unimpd' */ + case '<': + End += 1; + break; + + /* Save cursor position & Attributes: Esc 7 */ + case '7': + beSaveCursor(); + End += 1; + break; + + /* Restore cursor position & attributes: Esc 8 */ + case '8': + beRestoreCursor(); + End += 1; + break; + + /* Set character size - BUGBUG - unimp'd. + * # 1 Double ht, single width top half chars + * # 2 Double ht, single width lower half chars + * # 3 Double ht, double width top half chars + * # 4 Double ht, double width lower half chars + * # 5 Single ht, single width chars + * # 6 Single ht, double width chars + */ + case '#': + End += 1; + break; + + /* Select character set + * ESC ( A British + * ESC ( C Finnish + * ESC ( E Danish or Norwegian + * ESC ( H Swedish + * ESC ( K German + * ESC ( Q French Canadian + * ESC ( R Flemish or French/Belgian + * ESC ( Y Italian + * ESC ( Z Spanish + * ESC ( 1 Alternative Character + * ESC ( 4 Dutch + * ESC ( 5 Finnish + * ESC ( 6 Danish or Norwegian + * ESC ( 7 Swedish + * ESC ( = Swiss (French or German) + */ + case '(': + case ')': + /* BUGBUG - most character sets aren't implemented. */ + beGetTextAttributes(&fore, &back); + switch (cBuffer[++End]) + { + case 'B': /* ESC ( B North American ASCII set */ + i=SC_ASCII; + break; + + case '0': /* ESC ( 0 Line Drawing */ + i=SC_G1; + break; + + case '2': /* ESC ( 2 Alternative Line drawing */ + i=SC_G0; + break; + + default: + /* Make sure the screen mode isn't set. */ + i = 0xFFFFFFFF; + break; + } + + if (! (fore & i)) + { + fore &= ~(SC_ASCII|SC_G0|SC_G1|SC_GRAPHICS); + fore |= i; + beSetTextAttributes(fore, back); + } + + End += 1; + break; + + /* Unknown escape sequence */ + default: + { + char cbuf[80]; + sprintf(cbuf,"%c", cBuffer[End]); + beRawTextOut(cbuf+Start,6); + End += 1; + } + } + + return(End); +} + + +/* ProcessControl - + * + * Process a probable escape or control sequence + * starting at the supplied index. Return the index + * of the first character *after* the escape sequence we + * process. + * In the case of an incomplete sequence, ie one + * that isn't completed by the end of the buffer, return + * 'Start'. + * In the case of an invalid sequence, + * note the invalid escape sequence, and return Start+1 + */ + +static int ProcessControl(int Start) +{ + int fore, back; + int End = Start; + + /* Check to make sure we at least have enough characters + * for a control character + */ + + if (Start >= BufLen) + return(Start); + + switch (cBuffer[Start]) + { + /* NUL 0 Fill character; ignored on input. + * DEL 127 Fill character; ignored on input. + */ + case 0: + case 127: + End += 1; + break; + + /* ENQ 5 Transmit answerback message. */ + case 5: + beTransmitText(ANSWERBACK_MESSAGE,strlen(ANSWERBACK_MESSAGE)); + End += 1; + break; + + /* BEL 7 Ring the bell. */ + case 7: + beRingBell(); + End += 1; + break; + + /* BS 8 Move cursor left. */ + case 8: + beOffsetCursor(0,-1); + End += 1; + break; + + /* HT 9 Move cursor to next tab stop. */ + case 9: + beAdvanceToTab(); + End += 1; + break; + + /* LF 10 Line feed; causes print if in autoprint. */ + case 10: + beOffsetCursor(1,0); + End += 1; + break; + + /* VT 11 Same as LF. + * FF 12 Same as LF. + */ + case 11: + case 12: + beOffsetCursor(1,0); + End += 1; + break; + + /* CR 13 Move cursor to left margin or newline. */ + case 13: + beOffsetCursor(1,0); + beAbsoluteCursor(CUR_ROW,LEFT_EDGE); + End += 1; + break; + + /* SO 14 Invoke G1 character set. */ + case 14: + beGetTextAttributes(&fore, &back); + if (! (fore & SC_G1)) + { + fore &= ~(SC_ASCII|SC_G0|SC_G1|SC_GRAPHICS); + fore |= SC_G1; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* SI 15 Invoke G0 character set. */ + case 15: + beGetTextAttributes(&fore, &back); + if (! (fore & SC_G0)) + { + fore &= ~(SC_ASCII|SC_G0|SC_G1|SC_GRAPHICS); + fore |= SC_G0; + beSetTextAttributes(fore, back); + } + End += 1; + break; + + /* CAN 24 Cancel escape sequence and display checkerboard. BUGBUG - not imp'd. + * SUB 26 Same as CAN. + */ + case 24: + End += 1; + break; + + /* ESC 27 Introduce a control sequence. */ + case 27: + End = ProcessEscape(Start); + break; + + /* Print any other control character received. */ + default: + { + char buf[4]; + sprintf(buf,"^%c",'A' + cBuffer[Start] - 1); + beRawTextOut(buf, 2); + End += 1; + } + break; + } + + return(End); +} + + +/* ProcessBuffer - + * + * Process the current contents of the terminal character buffer. + */ +static int ProcessBuffer(void) +{ + int Start=0,End=0; + + /* Null-terminate the buffer. Why? Heck, why not? */ + + cBuffer[BufLen] = '\0'; + + /* Loop through the entire buffer. Start will be incremented + * to point at the start of unprocessed text in the buffer as + * we go. + */ + while (Start < BufLen) + { + End = Start; + + /* Since we null-terminated, null < 27 and we have a termination condition */ + while ((cBuffer[End] > 27)||(cBuffer[End] == 10)||(cBuffer[End] == 13)) + End++; + + /* At this point, if Start < End, we have a string of characters which + * doesn't have any control sequences, and should be printed raw. + */ + + if (End > Start) + beRawTextOut(cBuffer+Start, End-Start); + + if (End >= BufLen) + { + break; + } + + /* At this point, 'End' points to the beginning of an escape + * sequence. We'll reset 'start' to be AFTER parsing the + * escape sequence. Note that if the escape sequence + * is incomplete, ProcessControl should return the + * same value passed in. Otherwise, it'll return the + * index of the first character after the valid + * escape sequence. + */ + + Start = ProcessControl(End); + + if (Start == End) + { + /* The escape sequence was incomplete. + * Move the unprocessed portion of the input buffer + * to start at the beginning of the buffer, then + * return. + */ + + while (End < BufLen) + { + cBuffer[End-Start] = cBuffer[End]; + End += 1; + } + + BufLen = End-Start; + return(0); + } + } + + /* If we made it this far, Start == Buflen, and so we've finished + * processing the buffer completely. + */ + BufLen = 0; + cBuffer[BufLen] = '\0'; + + return(0); +} + + +/* vtProcessedTextOut - + * + * Output characters to terminal, passing them through the vt100 emulator. + * Return -1 on error + */ +int +vtProcessedTextOut(char *cbuf, int count) +{ + /* If we have a buffer overflow, error out if we haven't already crashed. */ + + if ((count + BufLen) > MAXVTBUFLEN) + { + beRawTextOut("ERROR: VT-100 internal buffer overflow!",39); + return(-1); + } + + /* Otherwise, add our requested information to the + * output buffer, and attempt to parse it. + */ + + memcpy(cBuffer + BufLen, cbuf, count); + BufLen += count; + + return(ProcessBuffer()); +} + diff --git a/rossubsys/posix/apps/posixw32/vt100.h b/rossubsys/posix/apps/posixw32/vt100.h new file mode 100644 index 00000000000..808bf765ce2 --- /dev/null +++ b/rossubsys/posix/apps/posixw32/vt100.h @@ -0,0 +1,320 @@ +/* vt100.h + * + * AUTHOR: John L. Miller, johnmil@cs.cmu.edu / johnmil@jprc.com + * DATE: 8/4/96 + * + * Copyright (c) 1996 John L. Miller + * + * Full permission is granted to use, modify and distribute + * this code, provided: + * 1) This comment field is included in its entirity + * 2) No money is charged for any work including or based on + * portions of this code. + * + * If you're a nice person and find this useful, I'd appreciate a + * note letting me know about it. e-mail is usually what spurs me + * on to improve and support software I've written. + * + */ + + +/* This identifier should be spit back to the computer when a terminal + * id is requested. + */ +#define ANSWERBACK_MESSAGE "vt100" + +/* Various terminal-related modes Entries are as follows: + * Identification esc. ID If set, if clear + */ + + /* Keyboard action 2 Locked Unlocked */ +#define CAPS_MODE 0x00000001 + /* Insertion 4 Insert Overwrite */ +#define INSERT_MODE 0x00000002 + /* Send - Receive 12 Full Echo */ +#define FULLDUPLEX_MODE 0x00000004 + /* Line feed/New line 20 New line Line feed */ +#define NEWLINE_MODE 0x00000008 + + +#define NUM_TERM_ATTR_MODES 9 /* We only track eight '?' escape sequences */ + + /* Cursor key ?1 Application Cursor */ +#define CURSORAPPL_MODE 0x00000010 + /* ANSI/VT52 ?2 ANSI VT52 */ +#define ANSI_MODE 0x00000020 + /* Column ?3 132 80 */ +#define COL132_MODE 0x00000040 + /* Scrolling ?4 Smooth Jump */ +#define SMOOTHSCROLL_MODE 0x00000080 + /* Screen ?5 Reverse Normal */ +#define REVSCREEN_MODE 0x00000100 + /* Origin ?6 Relative Absolute */ +#define ORIGINREL_MODE 0x00000200 + /* Wraparound ?7 Wrap Truncate */ +#define WRAP_MODE 0x00000400 + /* Auto key repeat ?8 Repeating No repeat */ +#define REPEAT_MODE 0x00000800 + + + /* Print form feed ?18 Yes No */ +#define PRINTFF_MODE 0x00001000 + /* Print extent ?19 Full screen Scrolling region */ +#define PRINTFULLSCR_MODE 0x00002000 + /* Keypad application 'Esc =' numeric 'Esc >' */ +#define KEYPADNUMERIC_MODE 0x00004000 + /* default mode that we start the emulator with */ +#define DEFAULT_MODE (NEWLINE_MODE|ANSI_MODE|REPEAT_MODE) + + /* This constant is VERY important - the size of the buffer for + * unprocessed vt-100 prints! + */ +#define MAXVTBUFLEN 4096 + + /* Constants used in place of actual row and column numbers + * for the cursor movement and text erasing and deleting functions. + */ +#define CUR_ROW -999 +#define CUR_COL -999 +#define ALL_TABS -1999 + +#define LEFT_EDGE 0 +#define RIGHT_EDGE 12000 +#define TOP_EDGE 0 +#define BOTTOM_EDGE 12000 + + /* Text attribute definitions; color, font, bold. */ +#define NUM_SC_ATTRIBUTES 11 + +#define SC_RED 0x0001 +#define SC_GREEN 0x0002 +#define SC_BLUE 0x0004 +#define SC_BOLD 0x0010 +#define SC_UL 0x0020 /* Underlined */ +#define SC_BL 0x0040 /* Blinking */ +#define SC_RV 0x0080 /* Reverse video */ +#define SC_ASCII 0x0100 /* Normal ASCII (USASCII) */ +#define SC_G0 0x0200 /* graphics set G0 */ +#define SC_G1 0x0400 /* Graphics set G1 */ +#define SC_GRAPHICS 0x0800 /* Good question */ + + +/* forward variable declarations */ + +extern int termAttrMode[NUM_TERM_ATTR_MODES]; +extern int alltermAttrModes; + + +/* prototypes from vt100.c */ + +/* functions meant for use outside of the emulator */ + +int vtputs(char *f); +int vtprintf(char *format, ...); +int vtInitVT100(void); +int vtProcessedTextOut(char *cbuf, int count); + + +/* Prototype for functions which MUST BE SUPPLIED BY THE BACK END!!! */ + +/* Back-end specific initialization is performed in this function. + * this is gauranteed to be called before any other requests are made + * of the back end. + */ + +/* beInitVT100Terminal() - + * + * This function is called by the VT100 emulator as soon as the + * front-end terminal is initialized. It's responsible for setting + * initial state of the terminal, and initing our many wacky variables. + */ +int beInitVT100Terminal(); + + +/* beAbsoluteCursor - + * + * Given an input row and column, move the cursor to the + * absolute screen coordinates requested. Note that if the + * display window has scrollbars, the column is adjusted + * to take that into account, but the row is not. This allows + * for large scrollback in terminal windows. + * + * ROW must be able to accept CUR_ROW, TOP_EDGE, BOTTOM_EDGE, + * or a row number. + * + * COLUMN must be able to accept CUR_COL, LEFT_EDGE, RIGHT_EDGE, + * or a column number. + */ +int beAbsoluteCursor(int row, int col); + + +/* beOffsetCursor - + * + * Given an input row and column offset, move the cursor by that + * many positions. For instance, row=0 and column=-1 would move + * the cursor left a single column. + * + * If the cursor can't move the requested amount, results are + * unpredictable. + */ +int beOffsetCursor(int row, int column); + + +/* beRestoreCursor - + * + * Saved cursor position should be stored in a static + * variable in the back end. This function restores the + * cursor to the position stored in that variable. + */ +int beRestoreCursor(void); + + +/* beSaveCursor - + * + * The back-end should maintain a static variable with the + * last STORED cursor position in it. This function replaces + * the contents of that variable with the current cursor position. + * The cursor may be restored to this position by using the + * beRestoreCursor function. + */ +int beSaveCursor(void); + + +/* beGetTextAttributes - + * + * given a pointer to 'fore'ground and 'back'ground ints, + * fill them with a device-independant description of the + * current foreground and background colors, as well as any + * font information in the foreground variable. + */ +int beGetTextAttributes(int *fore, int *back); + + +/* beSetTextAttributes - + * + * Given a foreground and a background device independant (SC) color and font + * specification, apply these to the display, and save the state in the + * static screen variables. + * + * Note that many font-specific constants (bold/underline/reverse, G0/G1/ASCII) + * are stored ONLY in the foreground specification. + */ +int beSetTextAttributes(int fore, int back); + + +/* beRawTextOut- + * + * The name of this function is misleading. Given a pointer to + * ascii text and a count of bytes to print, print them to the + * display device. If wrapping is enabled, wrap text. If there is a + * scrolling region set and the cursor is in it, + * scroll only within that region. 'beRawTextOut' means that it's guaranteed + * not to have control sequences within the text. + */ +int beRawTextOut(char *text, int len); + + +/* beEraseText - + * + * Given a 'from' and a 'to' position in display coordinates, + * this function will fill in all characters between the two + * (inclusive) with spaces. Note that the coordinates do NOT + * specify a rectangle. erasing from (1,1) to (2,2) erases + * all of the first row, and the first two characters of the + * second. + * + * Note that this routine must be able to handle TOP_EDGE, + * BOTTOM_EDGE, LEFT_EDGE, RIGHT_EDGE, CUR_ROW, and CUR_COL + * in the appropriate parameters. + */ +int beEraseText(int rowFrom, int colFrom, int rowTo, int colTo); + + +/* beDeleteText - + * + * Given a screen cursor 'from' and 'to' position, this function + * will delete all text between the two. Text will be scrolled + * up as appropriate to fill the deleted space. Note that, as in + * beEraseText, the two coordinates don't specify a rectangle, but + * rather a starting position and ending position. In other words, + * deleting from (1,1) to (2,2) should move the text from (2,3) to the + * end of the second row to (1,1), move line 3 up to line 2, and so on. + * + * This function must be able to process TOP_EDGE, BOTTOM_EDGE, LEFT_EDGE, + * RIGHT_EDGE, CUR_ROW, and CUR_COL specifications in the appropriate + * variables as well as regular row and column specifications. + */ +int beDeleteText(int rowFrom, int colFrom, int rowTo, int colTo); + + +/* beInsertRow - + * + * Given a row number or CUR_ROW, TOP_EDGE or BOTTOM_EDGE as an input, + * this function will scroll all text from the current row down down by one, + * and create a blank row under the cursor. + */ +int beInsertRow(int row); + + +/* beTransmitText - + * + * Given a pointer to text and byte count, this routine should transmit data + * to whatever host made the request it's responding to. Typically this routin + * should transmit data as though the user had typed it in. + */ +int beTransmitText(char *text, int len); + + +/* beAdvanceToTab - + * + * This routine will destructively advance the cursor to the + * next set tab, or to the end of the line if there are no + * more tabs to the right of the cursor. + */ + +int beAdvanceToTab(void); + + +/* beClearTab - + * + * This function accepts a constant, and will try to clear tabs + * appropriately. Its argument is either + * ALL_TABS, meaning all tabs should be removed + * CUR_COL, meaning the tab in the current column should be wiped, or + * a column value, meaning if there's a tab there it should be wiped. + * + */ +int beClearTab(int col); + + +/* beSetScrollingRows - + * + * Given a pair of row numbers, this routine will set the scrolling + * rows to those values. Note that this routine will accept + * TOP_ROW and BOTTOM_ROW as values, meaning that scrolling should + * be enabled for the entire display, regardless of resizing. + */ +int beSetScrollingRows(int fromRow, int toRow); + + +/* beRingBell - + * + * Ring the system bell once. + */ +int beRingBell(void); + + +/* beGetTermMode - + * + * Return the value of conTermMode, which is the terminal settings which + * can be queried/set by [?#h/l. + */ +int beGetTermMode(); + + +/* beSetTermMode - + * + * Set the terminal as requested, assuming we can. Right now we only handle a + * couple of the possible flags, but we store many of the others. + */ +int beSetTermMode(int newMode); diff --git a/rossubsys/posix/copying b/rossubsys/posix/copying new file mode 100644 index 00000000000..dc63aaca038 --- /dev/null +++ b/rossubsys/posix/copying @@ -0,0 +1,340 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/rossubsys/posix/directory.xml b/rossubsys/posix/directory.xml new file mode 100644 index 00000000000..98346505386 --- /dev/null +++ b/rossubsys/posix/directory.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/rossubsys/posix/include/aio.h b/rossubsys/posix/include/aio.h new file mode 100644 index 00000000000..d1de333058c --- /dev/null +++ b/rossubsys/posix/include/aio.h @@ -0,0 +1,74 @@ +/* $Id: aio.h,v 1.4 2002/10/29 04:45:06 rex Exp $ + */ +/* + * aio.h + * + * asynchronous input and output (REALTIME). Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __AIO_H_INCLUDED__ +#define __AIO_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef struct _tag_aiocb +{ + int aio_fildes; /* file descriptor */ + off_t aio_offset; /* file offset */ + volatile void* aio_buf; /* location of buffer */ + size_t aio_nbytes; /* length of transfer */ + int aio_reqprio; /* request priority offset */ + struct sigevent aio_sigevent; /* signal number and value */ + int aio_lio_opcode; /* operation to be performed */ +} aiocb; + +/* CONSTANTS */ +#define AIO_CANCELED 0 +#define AIO_NOTCANCELED 1 +#define AIO_ALLDONE 2 + +#define LIO_WAIT 0 +#define LIO_NOWAIT 1 +#define LIO_READ 2 +#define LIO_WRITE 3 +#define LIO_NOP 4 + +/* PROTOTYPES */ +int aio_cancel(int, struct aiocb *); +int aio_error(const struct aiocb *); +int aio_fsync(int, struct aiocb *); +int aio_read(struct aiocb *); +ssize_t aio_return(struct aiocb *); +int aio_suspend(const struct aiocb *const[], int, const struct timespec *); +int aio_write(struct aiocb *); +int lio_listio(int, struct aiocb *const[], int, struct sigevent *); + +/* MACROS */ + +#endif /* __AIO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/arpa/inet.h b/rossubsys/posix/include/arpa/inet.h new file mode 100644 index 00000000000..3e74ad5ace5 --- /dev/null +++ b/rossubsys/posix/include/arpa/inet.h @@ -0,0 +1,56 @@ +/* $Id: inet.h,v 1.4 2002/10/29 04:45:06 rex Exp $ + */ +/* + * arpa/inet.h + * + * definitions for internet operations. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __ARPA_INET_H_INCLUDED__ +#define __ARPA_INET_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +uint32_t htonl(uint32_t hostlong); +uint16_t htons(uint16_t hostshort); +uint32_t ntohl(uint32_t netlong); +uint16_t ntohs(uint16_t netshort); + +in_addr_t inet_addr(const char *cp); +in_addr_t inet_lnaof(struct in_addr in); +struct in_addr inet_makeaddr(in_addr_t net, in_addr_t lna); +in_addr_t inet_netof(struct in_addr in); +in_addr_t inet_network(const char *cp); +char *inet_ntoa(struct in_addr in); + +/* MACROS */ + +#endif /* __ARPA_INET_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/assert.h b/rossubsys/posix/include/assert.h new file mode 100644 index 00000000000..05e5b573940 --- /dev/null +++ b/rossubsys/posix/include/assert.h @@ -0,0 +1,58 @@ +/* $Id: assert.h,v 1.5 2002/10/29 04:45:08 rex Exp $ + */ +/* + * assert.h + * + * verify program assertion. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __ASSERT_H_INCLUDED__ +#define __ASSERT_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +#ifdef NDEBUG +#define assert(IGNORE) ((void) 0) +#else /* !NDEBUG */ + +#include +#include + +#define assert(EXPRESSION) \ + if(!(EXPRESSION)) \ + { \ + fputs("__FILE__, line __LINE__: assertion \"EXPRESSION\" failed\n", stderr); \ + abort(); \ + } + +#endif /* NDEBUG */ + +#endif /* __ASSERT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/cpio.h b/rossubsys/posix/include/cpio.h new file mode 100644 index 00000000000..37534deae37 --- /dev/null +++ b/rossubsys/posix/include/cpio.h @@ -0,0 +1,63 @@ +/* $Id: cpio.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * cpio.h + * + * cpio archive values. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __CPIO_H_INCLUDED__ +#define __CPIO_H_INCLUDED__ + +/* INCLUDES */ + +/* TYPES */ + +/* CONSTANTS */ +#define C_IRUSR (0000400) /* read by owner */ +#define C_IWUSR (0000200) /* write by owner */ +#define C_IXUSR (0000100) /* execute by owner */ +#define C_IRGRP (0000040) /* read by group */ +#define C_IWGRP (0000020) /* write by group */ +#define C_IXGRP (0000010) /* execute by group */ +#define C_IROTH (0000004) /* read by others */ +#define C_IWOTH (0000002) /* write by others */ +#define C_IXOTH (0000001) /* execute by others */ +#define C_ISUID (0004000) /* set user ID */ +#define C_ISGID (0002000) /* set group ID */ +#define C_ISVTX (0001000) /* on directories, restricted deletion flag */ +#define C_ISDIR (0040000) /* directory */ +#define C_ISFIFO (0010000) /* FIFO */ +#define C_ISREG (0100000) /* regular file */ +#define C_ISBLK (0060000) /* block special */ +#define C_ISCHR (0020000) /* character special */ +#define C_ISCTG (0110000) /* reserved */ +#define C_ISLNK (0120000) /* symbolic link */ +#define C_ISSOCK (0140000) /* socket */ + +#define MAGIC "070707" + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __CPIO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/ctype.h b/rossubsys/posix/include/ctype.h new file mode 100644 index 00000000000..0a5f85cc1b1 --- /dev/null +++ b/rossubsys/posix/include/ctype.h @@ -0,0 +1,61 @@ +/* $Id: ctype.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * ctype.h + * + * character types. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __CTYPE_H_INCLUDED__ +#define __CTYPE_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +int isalnum(int); +int isalpha(int); +int isascii(int); +int iscntrl(int); +int isdigit(int); +int isgraph(int); +int islower(int); +int isprint(int); +int ispunct(int); +int isspace(int); +int isupper(int); +int isxdigit(int); +int toascii(int); +int tolower(int); +int toupper(int); + +/* MACROS */ +/* FIXME: the standard isn't clear about these */ +#define _toupper(c) (toupper(c)) +#define _tolower(c) (tolower(c)) + +#endif /* __CTYPE_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/dirent.h b/rossubsys/posix/include/dirent.h new file mode 100644 index 00000000000..b6f71315900 --- /dev/null +++ b/rossubsys/posix/include/dirent.h @@ -0,0 +1,73 @@ +/* $Id: dirent.h,v 1.6 2002/10/29 04:45:08 rex Exp $ + */ +/* + * dirent.h + * + * format of directory entries. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __DIRENT_H_INCLUDED__ +#define __DIRENT_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include + +/* TYPES */ +typedef void DIR; + +#define NAME_MAX (255) + +struct dirent +{ + ino_t d_ino; /* file serial number */ + char * d_name /* [NAME_MAX + 1] */; /* name of entry */ +}; + +/* for Unicode filenames */ +struct _Wdirent +{ + ino_t d_ino; /* file serial number */ + wchar_t * d_name/* [NAME_MAX + 1] */; /* name of entry */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int closedir(DIR *); +DIR *opendir(const char *); +struct dirent *readdir(DIR *); +int readdir_r(DIR *, struct dirent *, struct dirent **); +void rewinddir(DIR *); +void seekdir(DIR *, long int); +long int telldir(DIR *); + +/* for Unicode filenames */ +DIR *_Wopendir(const wchar_t *); +struct _Wdirent *_Wreaddir(DIR *); +int _Wreaddir_r(DIR *, struct _Wdirent *, struct _Wdirent **); + + +/* MACROS */ + +#endif /* __DIRENT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/dlfcn.h b/rossubsys/posix/include/dlfcn.h new file mode 100644 index 00000000000..9296966c5b5 --- /dev/null +++ b/rossubsys/posix/include/dlfcn.h @@ -0,0 +1,58 @@ +/* $Id: dlfcn.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * dlfcn.h + * + * dynamic linking. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __DLFCN_H_INCLUDED__ +#define __DLFCN_H_INCLUDED__ + +/* INCLUDES */ + +/* TYPES */ + +/* CONSTANTS */ +#define RTLD_LAZY (0x00000000) /* Relocations are performed at an \ + implementation-dependent time. */ +#define RTLD_NOW (0x00000001) /* Relocations are performed when \ + the object is loaded. */ + +#define RTLD_GLOBAL (0x00000010) /* All symbols are available for \ + relocation processing of other \ + modules. */ +#define RTLD_LOCAL (0x00000020) /* All symbols are not made available \ + for relocation processing by other \ + modules. */ + +#define RTLD_NEXT ((void *)(-1)) + +/* PROTOTYPES */ +void *dlopen(const char *, int); +void *dlsym(void *, const char *); +int dlclose(void *); +char *dlerror(void); + +/* MACROS */ + +#endif /* __DLFCN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/errno.h b/rossubsys/posix/include/errno.h new file mode 100644 index 00000000000..8e210fe28f2 --- /dev/null +++ b/rossubsys/posix/include/errno.h @@ -0,0 +1,131 @@ +/* $Id: errno.h,v 1.5 2002/10/29 04:45:08 rex Exp $ + */ +/* + * errno.h + * + * system error numbers. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __ERRNO_H_INCLUDED__ +#define __ERRNO_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +/* errors from 0 to 42 are the same as in Microsoft POSIX */ +#define EZERO ( 0) /* No error. */ +#define EPERM ( 1) /* Operation not permitted. */ +#define ENOENT ( 2) /* No such file or directory. */ +#define ESRCH ( 3) /* No such process. */ +#define EINTR ( 4) /* Interrupted function. */ +#define EIO ( 5) /* I/O error. */ +#define ENXIO ( 6) /* No such device or address. */ +#define E2BIG ( 7) /* Argument list too long. */ +#define ENOEXEC ( 8) /* Executable file format error. */ +#define EBADF ( 9) /* Bad file descriptor. */ +#define ECHILD ( 10) /* No child processes. */ +#define EAGAIN ( 11) /* Resource unavailable, try again */ +#define ENOMEM ( 12) /* Not enough space. */ +#define EACCES ( 13) /* Permission denied. */ +#define EFAULT ( 14) /* Bad address. */ +#define ENOTBLK ( 15) /* Reserved. */ +#define EBUSY ( 16) /* Device or resource busy. */ +#define EEXIST ( 17) /* File exists. */ +#define EXDEV ( 18) /* Cross-device link. */ +#define ENODEV ( 19) /* No such device. */ +#define ENOTDIR ( 20) /* Not a directory. */ +#define EISDIR ( 21) /* Is a directory. */ +#define EINVAL ( 22) /* Invalid argument. */ +#define ENFILE ( 23) /* Too many files open in system. */ +#define EMFILE ( 24) /* Too many open files. */ +#define ENOTTY ( 25) /* Inappropriate I/O control operation. */ +#define ETXTBSY ( 26) /* Text file busy. */ +#define EFBIG ( 27) /* File too large. */ +#define ENOSPC ( 28) /* No space left on device. */ +#define ESPIPE ( 29) /* Invalid seek. */ +#define EROFS ( 30) /* Read-only file system. */ +#define EMLINK ( 31) /* Too many links. */ +#define EPIPE ( 32) /* Broken pipe. */ +#define EDOM ( 33) /* Mathematics argument out of domain of function. */ +#define ERANGE ( 34) /* Result too large. */ +#define EUCLEAN ( 35) /* Reserved. */ +#define EDEADLK ( 36) /* Resource deadlock would occur. */ +#define UNKNOWN ( 37) /* Reserved. */ +#define ENAMETOOLONG ( 38) /* Filename too long. */ +#define ENOLCK ( 39) /* No locks available. */ +#define ENOSYS ( 40) /* Function not supported. */ +#define ENOTEMPTY ( 41) /* Directory not empty. */ +#define EILSEQ ( 42) /* Illegal byte sequence. */ +/* from this point, constants are in no particular order */ +#define ENODATA ( 44) /* No message is available on the STREAM head read queue. */ +#define ENOSR ( 45) /* No STREAM resources. */ +#define ENOSTR ( 46) /* Not a STREAM. */ +#define ECANCELED ( 47) /* Operation canceled. */ +#define ENOBUFS ( 48) /* No buffer space available. */ +#define EOVERFLOW ( 49) /* Value too large to be stored in data type. */ +#define ENOTSUP ( 50) /* Not supported. */ +#define EADDRINUSE ( 51) /* Address in use. */ +#define EADDRNOTAVAIL ( 52) /* Address not available. */ +#define EAFNOSUPPORT ( 53) /* Address family not supported. */ +#define ECONNABORTED ( 54) /* Connection aborted. */ +#define ECONNREFUSED ( 55) /* Connection refused. */ +#define ECONNRESET ( 56) /* Connection reset. */ +#define EALREADY ( 57) /* Connection already in progress. */ +#define EDESTADDRREQ ( 58) /* Destination address required. */ +#define EHOSTUNREACH ( 59) /* Host is unreachable. */ +#define EISCONN ( 60) /* Socket is connected. */ +#define ENETDOWN ( 61) /* Network is down. */ +#define ENETUNREACH ( 62) /* Network unreachable. */ +#define ENOPROTOOPT ( 63) /* Protocol not available. */ +#define ENOTCONN ( 64) /* The socket is not connected. */ +#define ENOTSOCK ( 65) /* Not a socket. */ +#define EPROTO ( 66) /* Protocol error. */ +#define EPROTONOSUPPORT ( 67) /* Protocol not supported. */ +#define EPROTOTYPE ( 68) /* Socket type not supported. */ +#define EOPNOTSUPP ( 69) /* Operation not supported on socket. */ +#define ETIMEDOUT ( 70) /* Connection timed out. */ +#define EINPROGRESS ( 71) /* Operation in progress. */ +#define EBADMSG ( 72) /* Bad message. */ +#define EMSGSIZE ( 73) /* Message too large. */ +#define ENOMSG ( 74) /* No message of the desired type. */ +#define EDQUOT ( 75) /* Reserved. */ +#define EIDRM ( 76) /* Identifier removed. */ +#define ELOOP ( 77) /* Too many levels of symbolic links. */ +#define EMULTIHOP ( 78) /* Reserved. */ +#define ENOLINK ( 79) /* Reserved. */ +#define ESTALE ( 80) /* Reserved. */ +#define ETIME ( 81) /* Streamioctl() timeout. */ +#define EWOULDBLOCK ( 82) /* Operation would block */ + +#define EDEADLOCK EDEADLK /* Resource deadlock avoided */ + +/* PROTOTYPES */ +int * __PdxGetThreadErrNum(void); /* returns a pointer to the current thread's errno */ + +/* MACROS */ +#define errno (*__PdxGetThreadErrNum()) + +#endif /* __ERRNO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/fcntl.h b/rossubsys/posix/include/fcntl.h new file mode 100644 index 00000000000..650d9e39ab9 --- /dev/null +++ b/rossubsys/posix/include/fcntl.h @@ -0,0 +1,149 @@ +/* $Id: fcntl.h,v 1.6 2002/10/29 04:45:08 rex Exp $ + */ +/* + * fcntl.h + * + * file control options. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __FCNTL_H_INCLUDED__ +#define __FCNTL_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +/* + the structure flock describes a file lock + */ +struct flock +{ + short l_type; /* type of lock; F_RDLCK, F_WRLCK, F_UNLCK */ + short l_whence; /* flag for starting offset */ + off_t l_start; /* relative offset in bytes */ + off_t l_len; /* size; if 0 then until EOF */ + pid_t l_pid; /* process ID of the process holding the lock; + returned with F_GETLK */ +}; + +/* CONSTANTS */ +/* + values for cmd used by fcntl() + */ +enum __fcntl_cmd +{ + F_DUPFD, /* duplicate file descriptor */ + F_GETFD, /* get file descriptor flags */ + F_GETLK, /* get record locking information */ + F_SETFD, /* set file descriptor flags */ + F_GETFL, /* get file status flags and file access modes */ + F_SETFL, /* set file status flags */ + F_SETLK, /* set record locking information */ + F_SETLKW, /* set record locking information; wait if blocked */ +/* ReactOS-specific */ + F_NEWFD, /* create new file descriptor */ + F_DELFD, /* delete file descriptor */ + F_GETALL, /* get a copy of the internal descriptor object */ + F_SETALL, /* initialize internal descriptor object */ + F_GETXP, /* get file descriptor extra data pointer */ + F_SETXP, /* set file descriptor extra data pointer */ + F_GETXS, /* get file descriptor extra data size */ + F_SETXS, /* set file descriptor extra data size */ + F_GETFH, /* get file handle */ + F_SETFH /* set file handle */ +}; + +/* + file descriptor flags used for fcntl() + */ +/* Close the file descriptor upon execution of an exec family function. */ +#define FD_CLOEXEC (0x00000001) + +/* + values for l_type used for record locking with fcntl() + */ +/* Shared or read lock. */ +#define F_RDLCK (1) +/* Unlock. */ +#define F_UNLCK (2) +/* Exclusive or write lock. */ +#define F_WRLCK (3) + +/* + file flags used for open() + */ +/* Create file if it does not exist. */ +#define O_CREAT (0x00000100) +/* Truncate flag. */ +#define O_TRUNC (0x00000200) +/* Exclusive use flag. */ +#define O_EXCL (0x00000400) +/* Do not assign controlling terminal. */ +#define O_NOCTTY (0x00000800) +/* ReactOS-specific */ +/* File must be a directory */ +#define _O_DIRFILE (0x00100000) + +/* + file status flags used for open() and fcntl() + */ +/* Set append mode. */ +#define O_APPEND (0x00000008) +/* Non-blocking mode. */ +#define O_NONBLOCK (0x00001000) +/* Write according to synchronised I/O data integrity completion. */ +#define O_DSYNC (0x00002000) +/* Synchronised read I/O operations. */ +#define O_RSYNC (0x00004000) +/* Write according to synchronised I/O file integrity completion. */ +#define O_SYNC (0x00008000) + +/* + file access modes used for open() and fcntl() + */ +/* Open for reading only. */ +#define O_RDONLY (0x00000000) +/* Open for writing only. */ +#define O_WRONLY (0x00000001) +/* Open for reading and writing. */ +#define O_RDWR (0x00000002) + +/* + mask for use with file access modes + */ +#define O_ACCMODE (0x00000007) + +/* PROTOTYPES */ +int creat(const char *, mode_t); +int fcntl(int, int, ...); +int open(const char *, int, ...); + +int _Wcreat(const wchar_t *, mode_t); +int _Wopen(const wchar_t *, int, ...); + +/* MACROS */ + +#endif /* __FCNTL_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/fmtmsg.h b/rossubsys/posix/include/fmtmsg.h new file mode 100644 index 00000000000..4775793dfab --- /dev/null +++ b/rossubsys/posix/include/fmtmsg.h @@ -0,0 +1,93 @@ +/* $Id: fmtmsg.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * fmtmsg.h + * + * message display structures. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __FMTMSG_H_INCLUDED__ +#define __FMTMSG_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +/* Major Classifications */ +/* NOTE: these are unique values, not flags. Their bits can overlap, but + cannot overlap with those of other categories */ +#define MM_HARD (0x00000001) /* Source of the condition is hardware. */ +#define MM_SOFT (0x00000002) /* Source of the condition is software. */ +#define MM_FIRM (0x00000003) /* Source of the condition is firmware. */ + +/* Message Source Subclassifications */ +/* NOTE: these are unique values, not flags. Their bits can overlap, but + cannot overlap with those of other categories */ +#define MM_APPL (0x00000010) /* Condition detected by application. */ +#define MM_UTIL (0x00000020) /* Condition detected by utility. */ +#define MM_OPSYS (0x00000030) /* Condition detected by operating system. */ + +/* Status Subclassifications */ +/* NOTE: these are unique values, not flags. Their bits can overlap, but + cannot overlap with those of other categories */ +#define MM_RECOVER (0x00000100) /* Recoverable error. */ +#define MM_NRECOV (0x00000200) /* Non-recoverable error. */ + +/* Display Subclassifications */ +/* NOTE: these, unlike other classification constants, are flags. Their + bits must be distinct */ +#define MM_PRINT (0x00001000) /* Display message on standard error. */ +#define MM_CONSOLE (0x00002000) /* Display message on system console. */ + +/* Identifiers for the levels of severity */ +#define MM_NOSEV (0) /* No severity level provided for the message. */ +#define MM_INFO (1) /* Informative message. */ +#define MM_WARNING (2) /* Application has detected unusual non-error \ + condition. */ +#define MM_ERROR (3) /* Application has encountered a non-fatal fault. */ +#define MM_HALT (4) /* Error causing application to halt. */ + +/* Null values and identifiers */ +#define MM_NULLLBL ((char *)0) /* Null label */ +#define MM_NULLSEV (0) /* Null severity */ +#define MM_NULLMC (0L) /* Null class */ +#define MM_NULLTXT ((char *)0) /* Null text */ +#define MM_NULLACT ((char *)0) /* Null action */ +#define MM_NULLTAG ((char *)0) /* Null tag */ + +/* Return values */ +#define MM_OK ( 0) /* The function succeeded. */ +#define MM_NOTOK (-1) /* The function failed completely. */ +#define MM_NOMSG (-2) /* The function was unable to generate a message on \ + standard error, but otherwise succeeded. */ +#define MM_NOCON (-3) /* The function was unable to generate a console \ + message, but otherwise succeeded. */ + +/* PROTOTYPES */ +int fmtmsg(long, const char*, int, const char*, const char*, const char*); + +/* MACROS */ + +#endif /* __FMTMSG_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/fnmatch.h b/rossubsys/posix/include/fnmatch.h new file mode 100644 index 00000000000..10f4f22109e --- /dev/null +++ b/rossubsys/posix/include/fnmatch.h @@ -0,0 +1,66 @@ +/* $Id: fnmatch.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * fnmatch.h + * + * filename-matching types. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __FNMATCH_H_INCLUDED__ +#define __FNMATCH_H_INCLUDED__ + +/* INCLUDES */ +#ifdef __PSXDLL__ + +/* headers for internal usage by psxdll.dll and ReactOS */ + +#else /* ! __PSXDLL__ */ + +/* standard POSIX headers */ + +#endif + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +/* Flags */ +#define FNM_PATHNAME (0x00000001) /* Slash in string only matches slash \ + in pattern. */ +#define FNM_PERIOD (0x00000002) /* Leading period in string must be \ + exactly matched by period in \ + pattern. */ +#define FNM_NOESCAPE (0x00000004) /* Disable backslash escaping. */ + +/* Return values */ +#define FNM_NOMATCH (1) /* The string does not match the specified \ + pattern. */ +#define FNM_NOSYS (2) /* The implementation does not support this \ + function. */ + +/* PROTOTYPES */ +int fnmatch(const char *, const char *, int); + +/* MACROS */ + +#endif /* __FNMATCH_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/ftw.h b/rossubsys/posix/include/ftw.h new file mode 100644 index 00000000000..60cb86933ae --- /dev/null +++ b/rossubsys/posix/include/ftw.h @@ -0,0 +1,73 @@ +/* $Id: ftw.h,v 1.4 2002/10/29 04:45:08 rex Exp $ + */ +/* + * ftw.h + * + * file tree traversal. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __FTW_H_INCLUDED__ +#define __FTW_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct FTW +{ + int base; + int level; +}; + +/* CONSTANTS */ +/* Values of the third argument to the application-supplied function + that is passed as the second argument to ftw() and nftw() */ +#define FTW_F (1) /* File. */ +#define FTW_D (2) /* Directory. */ +#define FTW_DNR (3) /* Directory without read permission. */ +#define FTW_DP (4) /* Directory with subdirectories visited. */ +#define FTW_NS (5) /* Unknown type, stat() failed. */ +#define FTW_SL (6) /* Symbolic link. */ +#define FTW_SLN (7) /* Symbolic link that names a non-existent file. */ + +/* Values of the fourth argument to nftw() */ +#define FTW_PHYS (0x00000001) /* Physical walk, does not follow symbolic \ + links. Otherwise, nftw() will follow \ + links but will not walk down any path \ + that crosses itself. */ +#define FTW_MOUNT (0x00000002) /* The walk will not cross a mount point. */ +#define FTW_DEPTH (0x00000004) /* All subdirectories will be visited before \ + the directory itself. */ +#define FTW_CHDIR (0x00000008) /* The walk will change to each directory \ + before reading it. */ + +/* PROTOTYPES */ +int ftw(const char *, + int (*)(const char *, const struct stat *, int), int); +int nftw(const char *, int (*) + (const char *, const struct stat *, int, struct FTW*), + int, int); + +/* MACROS */ + +#endif /* __FTW_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/glob.h b/rossubsys/posix/include/glob.h new file mode 100644 index 00000000000..ff36fce0084 --- /dev/null +++ b/rossubsys/posix/include/glob.h @@ -0,0 +1,73 @@ +/* $Id: glob.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * glob.h + * + * pathname pattern-matching types. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __GLOB_H_INCLUDED__ +#define __GLOB_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +typedef struct __tagglob_t +{ + size_t gl_pathc; /* count of paths matched by pattern */ + char **gl_pathv; /* pointer to a list of matched pathnames */ + size_t gl_offs; /* slots to reserve at the beginning of gl_pathv */ +} glob_t; + +/* CONSTANTS */ +/* Values for the flags argument */ +#define GLOB_APPEND (0x00000001) /* Append generated pathnames to \ + those previously obtained. */ +#define GLOB_DOOFFS (0x00000002) /* Specify how many null pointers to \ + add to the beginning of */ +#define GLOB_ERR (0x00000004) /* Cause glob() to return on error. */ +#define GLOB_MARK (0x00000008) /* Each pathname that is a directory \ + that matches pattern has a slash \ + appended. */ +#define GLOB_NOCHECK (0x00000010) /* If pattern does not match any pathname, \ + then return a list consisting of only \ + pattern. */ +#define GLOB_NOESCAPE (0x00000020) /* Disable backslash escaping. */ +#define GLOB_NOSORT (0x00000040) /* Do not sort the pathnames returned. */ + +/* Error return values */ +#define GLOB_ABORTED (-1) /* The scan was stopped because GLOB_ERR was set \ + or errfunc returned non-zero. */ +#define GLOB_NOMATCH (-2) /* The pattern does not match any existing pathname, \ + and GLOB_NOCHECK was not set in flags. */ +#define GLOB_NOSPACE (-3) /* An attempt to allocate memory failed. */ +#define GLOB_NOSYS (-4) /* The implementation does not support this function. */ + +/* PROTOTYPES */ +int glob(const char *, int, int (*)(const char *, int), glob_t *); +void globfree (glob_t *); + +/* MACROS */ + +#endif /* __GLOB_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/grp.h b/rossubsys/posix/include/grp.h new file mode 100644 index 00000000000..e24576b983f --- /dev/null +++ b/rossubsys/posix/include/grp.h @@ -0,0 +1,59 @@ +/* $Id: grp.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * grp.h + * + * group structure. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __GRP_H_INCLUDED__ +#define __GRP_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct group +{ + char *gr_name; /* the name of the group */ + gid_t gr_gid; /* numerical group ID */ + char **gr_mem; /* pointer to a null-terminated array of character + pointers to member names */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +struct group *getgrgid(gid_t); +struct group *getgrnam(const char *); +int getgrgid_r(gid_t, struct group *, char *, + size_t, struct group **); +int getgrnam_r(const char *, struct group *, char *, + size_t , struct group **); +struct group *getgrent(void); +void endgrent(void); +void setgrent(void); + +/* MACROS */ + +#endif /* __GRP_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/iconv.h b/rossubsys/posix/include/iconv.h new file mode 100644 index 00000000000..15af2d22208 --- /dev/null +++ b/rossubsys/posix/include/iconv.h @@ -0,0 +1,47 @@ +/* $Id: iconv.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * iconv.h + * + * codeset conversion facility. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __ICONV_H_INCLUDED__ +#define __ICONV_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +typedef (void *) iconv_t; + +/* CONSTANTS */ + +/* PROTOTYPES */ +iconv_t iconv_open(const char *, const char *); +size_t iconv(iconv_t, char **, size_t *, char **, size_t *); +int iconv_close(iconv_t); + +/* MACROS */ + +#endif /* __ICONV_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/inttypes.h b/rossubsys/posix/include/inttypes.h new file mode 100644 index 00000000000..f15668a94df --- /dev/null +++ b/rossubsys/posix/include/inttypes.h @@ -0,0 +1,60 @@ +/* $Id: inttypes.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * inttypes.h + * + * fixed size integral types. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __INTTYPES_H_INCLUDED__ +#define __INTTYPES_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +/* signed */ +typedef signed char int8_t; /* 8-bit signed integral type. */ +typedef signed short int int16_t; /* 16-bit signed integral type. */ +typedef signed long int int32_t; /* 32-bit signed integral type. */ +typedef signed long long int64_t; /* 64-bit signed integral type. */ + +/* unsigned */ +typedef unsigned char uint8_t; /* 8-bit unsigned integral type. */ +typedef unsigned short int uint16_t; /* 16-bit unsigned integral type. */ +typedef unsigned long int uint32_t; /* 32-bit unsigned integral type. */ +typedef unsigned long long uint64_t; /* 64-bit unsigned integral type. */ + +/* pointer-sized */ +typedef signed long int intptr_t; /* Signed integral type large enough + to hold any pointer. */ +typedef unsigned long int uintptr_t; /* Unsigned integral type large + enough to hold any pointer. */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __INTTYPES_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/iso646.h b/rossubsys/posix/include/iso646.h new file mode 100644 index 00000000000..12e9c845435 --- /dev/null +++ b/rossubsys/posix/include/iso646.h @@ -0,0 +1,54 @@ +/* $Id: iso646.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * iso646.h + * + * alternative spellings. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __ISO646_H_INCLUDED__ +#define __ISO646_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +#define and && +#define and_eq &= +#define bitand & +#define bitor | +#define compl ~ +#define not ! +#define not_eq != +#define or || +#define or_eq |= +#define xor ^ +#define xor_eq ^= + +#endif /* __ISO646_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/libgen.h b/rossubsys/posix/include/libgen.h new file mode 100644 index 00000000000..e98d23ab5bf --- /dev/null +++ b/rossubsys/posix/include/libgen.h @@ -0,0 +1,52 @@ +/* $Id: libgen.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * libgen.h + * + * definitions for pattern matching functions. Conforming to the Single + * UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __LIBGEN_H_INCLUDED__ +#define __LIBGEN_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ +extern char *__loc1; /* LEGACY */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +char *basename(char *); +char *dirname(char *); +char *regcmp(const char *, ...); /* LEGACY */ +char *regex(const char *, const char *, ...); /* LEGACY */ + +wchar_t *_Wbasename(wchar_t *); +wchar_t *_Wdirname(wchar_t *); + +/* MACROS */ + +#endif /* __LIBGEN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/limits.h b/rossubsys/posix/include/limits.h new file mode 100644 index 00000000000..c5a2a52aec8 --- /dev/null +++ b/rossubsys/posix/include/limits.h @@ -0,0 +1,48 @@ +/* $Id: limits.h,v 1.5 2002/10/29 04:45:10 rex Exp $ + */ +/* + * limits.h + * + * implementation-dependent constants. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __LIMITS_H_INCLUDED__ +#define __LIMITS_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +/* TODO */ +#define OPEN_MAX (256) +#define NAME_MAX (255) +#define ARG_MAX (255) +#define PATH_MAX (32768) + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __LIMITS_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/math.h b/rossubsys/posix/include/math.h new file mode 100644 index 00000000000..9bc67191249 --- /dev/null +++ b/rossubsys/posix/include/math.h @@ -0,0 +1,65 @@ +/* $Id: math.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * math.h + * + * mathematical declarations. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __MATH_H_INCLUDED__ +#define __MATH_H_INCLUDED__ + +/* INCLUDES */ +#ifdef __PSXDLL__ + +/* headers for internal usage by psxdll.dll and ReactOS */ + +#else /* ! __PSXDLL__ */ + +/* standard POSIX headers */ + +#endif + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +#define M_E ((double) 2.7182818285) /* Value of e */ +#define M_LOG2E ((double) 1.4426950419) /* Value of log2(e) */ +#define M_LOG10E ((double) 0.4342944819) /* Value of log10(e) */ +#define M_LN2 ((double)-0.6931471806) /* Value of loge2 */ +#define M_LN10 ((double) 2.3025850929) /* Value of loge10 */ +#define M_PI ((double) 3.1415926536) /* Value of Pi */ +#define M_PI_2 ((double) 1.5707963268) /* Value of Pi/2 */ +#define M_PI_4 ((double) 0.7853981634) /* Value of Pi/4 */ +#define M_1_PI ((double) 0.3183098862) /* Value of 1/Pi */ +#define M_2_PI ((double) 0.6366197724) /* Value of 2/Pi */ +#define M_2_SQRTPI ((double) 1.1283791671) /* Value of 2/Sqrt(Pi) */ +#define M_SQRT2 ((double) 1.4142135624) /* Value of Sqrt(2) */ +#define M_SQRT1_2 ((double) 0.7071067812) /* Value of Sqrt(1/2) */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __MATH_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/netinet/in.h b/rossubsys/posix/include/netinet/in.h new file mode 100644 index 00000000000..e9e8ac8fe12 --- /dev/null +++ b/rossubsys/posix/include/netinet/in.h @@ -0,0 +1,43 @@ +/* $Id: in.h,v 1.4 2002/10/29 04:45:10 rex Exp $ + */ +/* + * netinet/in.h + * + * Internet Protocol family. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __NETINET_IN_H_INCLUDED__ +#define __NETINET_IN_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __NETINET_IN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/.cvsignore b/rossubsys/posix/include/psx/.cvsignore new file mode 100644 index 00000000000..4143547671c --- /dev/null +++ b/rossubsys/posix/include/psx/.cvsignore @@ -0,0 +1 @@ +syscall.h diff --git a/rossubsys/posix/include/psx/debug.h b/rossubsys/posix/include/psx/debug.h new file mode 100644 index 00000000000..faa89771363 --- /dev/null +++ b/rossubsys/posix/include/psx/debug.h @@ -0,0 +1,146 @@ +/* $Id: debug.h,v 1.4 2002/10/29 04:45:11 rex Exp $ + */ +/* + * psx/debug.h + * + * debugging utilities + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_DEBUG_H_INCLUDED__ +#define __PSX_DEBUG_H_INCLUDED__ + +/* INCLUDES */ +#ifdef __PSX_DEBUG_TO_STDERR__ +#include +#else /* !defined(__PSX_DEBUG_TO_STDERR__) */ +#include +#endif /* defined(__PSX_DEBUG_TO_STDERR__) */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#define __PSX_MODULE__ "psxdll.dll" + +#ifndef NDEBUG + +#ifdef __PSX_DEBUG_TO_STDERR__ + +#if 0 +#define DEBUGOUT(MODULE,TYPE,ARGS...) \ +do{ \ + fprintf(stderr,"%s:%s:%s:%d:%s():\n\t",(MODULE),(TYPE),__FILE__,__LINE__,__FUNCTION__); \ + fprintf(stderr,ARGS); \ + fprintf("\n"); \ +} \ +while(0) +#endif + +#define DEBUGOUT(MODULE,TYPE,ARGS...) \ +do{ \ + printf("%s:%s:%s:%d:%s():\n\t",(MODULE),(TYPE),__FILE__,__LINE__,__FUNCTION__); \ + printf(ARGS); \ + printf("\n"); \ +} \ +while(0) + + +#else /* !defined(__PSX_DEBUG_TO_STDERR__) */ + +#define DEBUGOUT(MODULE,TYPE,ARGS...) \ +do{ \ + DbgPrint("%s:%s:%s:%d:%s():\n\t",(MODULE),(TYPE),__FILE__,__LINE__,__FUNCTION__); \ + DbgPrint(ARGS); \ + DbgPrint("\n"); \ +} \ +while(0) + +#endif /* defined(__PSX_DEBUG_TO_STDERR__) */ + +#define DEBUGOUTIF(CONDITION,MODULE,TYPE,ARGS...) \ +if((CONDITION)) \ +{ \ + DEBUGOUT((MODULE),(TYPE),ARGS); \ +} + +#else /* defined(NDEBUG) */ + +#define DEBUGOUTIF(c,m,t,args...) +#define DEBUGOUT(m,t,args...) + +#endif /* !defined(NDEBUG) */ + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_HINTS__) +#define HINT(args...) DEBUGOUT(__PSX_MODULE__,"HINT",args) +#define HINTIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"HINT",args) +#else +#define HINT(args...) +#define HINTIF(c,args...) +#endif + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_INFOS__) +#define INFO(args...) DEBUGOUT(__PSX_MODULE__,"INFO",args) +#define INFOIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"INFO",args) +#else +#define INFO(args...) +#define INFOIF(c,args...) +#endif + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_WARNS__) +#define WARN(args...) DEBUGOUT(__PSX_MODULE__,"WARN",args) +#define WARNIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"WARN",args) +#else +#define WARN(args...) +#define WARNIF(c,args...) +#endif + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_ERRS__) +#define ERR(args...) DEBUGOUT(__PSX_MODULE__,"ERR",args) +#define ERRIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"ERR",args) +#else +#define ERR(args...) +#define ERRIF(c,args...) +#endif + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_TODOS__) +#define TODO(args...) DEBUGOUT(__PSX_MODULE__,"TODO",args) +#define TODOIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"TODO",args) +#else +#define TODO(args...) +#define TODOIF(c,args...) +#endif + +#if defined(__PSX_DEBUG_WANT_ALL__) || defined(__PSX_DEBUG_WANT_FIXMES__) +#define FIXME(args...) DEBUGOUT(__PSX_MODULE__,"FIXME",args) +#define FIXMEIF(c,args...) DEBUGOUTIF((c),__PSX_MODULE__,"FIXME",args) +#else +#define FIXME(args...) +#define FIXMEIF(c,args...) +#endif + + +#endif /* __PSX_DEBUG_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/dirent.h b/rossubsys/posix/include/psx/dirent.h new file mode 100644 index 00000000000..396fe1768f3 --- /dev/null +++ b/rossubsys/posix/include/psx/dirent.h @@ -0,0 +1,57 @@ +/* $Id: dirent.h,v 1.4 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/dirent.h + * + * internal dirent.h + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_DIRENT_H_INCLUDED__ +#define __PSX_DIRENT_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +struct __internal_DIR +{ + __magic_t signature; /* signature to verify object's validity across calls */ + union __any_dirent{ + struct dirent de_ansi; + struct _Wdirent de_unicode; + } ent; /* storage for return buffer of readdir() */ + int fildes; /* file descriptor of the directory */ + FILE_DIRECTORY_INFORMATION info; /* directory entry information */ + WCHAR name[MAX_PATH]; /* filename buffer */ +}; + +/* CONSTANTS */ +#define __IDIR_MAGIC MAGIC('I', 'D', 'I', 'R') + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __PSX_DIRENT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/dlfcn.h b/rossubsys/posix/include/psx/dlfcn.h new file mode 100644 index 00000000000..ae5d1546553 --- /dev/null +++ b/rossubsys/posix/include/psx/dlfcn.h @@ -0,0 +1,53 @@ +/* $Id: dlfcn.h,v 1.4 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/dlfcn.h + * + * internal dlfcn.h + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_DLFCN_H_INCLUDED__ +#define __PSX_DLFCN_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +/* internal representation for loaded DLLs */ +/* TODO: get rid of this. The handle should be enough, with a proper PE loader */ +struct __dlobj +{ + int global; /* if non-zero, all the other fields have no meaning */ + void *handle; /* pointer to the module mapping */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +void __dl_set_last_error(int); + +/* MACROS */ +#define __dl_get_reloc_flag(m) ((m) & (RTLD_LAZY | RTLD_NOW)) +#define __dl_get_scope_flag(m) ((m) & (RTLD_GLOBAL | RTLD_LOCAL)) + +#endif /* __PSX_DLFCN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/errno.h b/rossubsys/posix/include/psx/errno.h new file mode 100644 index 00000000000..6ea07f89497 --- /dev/null +++ b/rossubsys/posix/include/psx/errno.h @@ -0,0 +1,45 @@ +/* $Id: errno.h,v 1.4 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/errno.h + * + * internal errno.h + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_ERRNO_H_INCLUDED__ +#define __PSX_ERRNO_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +#define __status_to_errno(s) (s) +#define __set_errno_from_status(s) (errno = __status_to_errno((s))) + +#endif /* __PSX_ERRNO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/fdtable.h b/rossubsys/posix/include/psx/fdtable.h new file mode 100644 index 00000000000..edc88318c5b --- /dev/null +++ b/rossubsys/posix/include/psx/fdtable.h @@ -0,0 +1,73 @@ +/* $Id: fdtable.h,v 1.5 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/fdtable.h + * + * POSIX+ subsystem file descriptor table data structure + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_FDTABLE_H_INCLUDED__ +#define __PSX_FDTABLE_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef struct __tagfildes_t +{ + void *FileHandle; + int OpenFlags; + int FdFlags; + size_t ExtraDataSize; + void *ExtraData; +} __fildes_t; + +typedef struct __tagfdtable_t +{ + __magic_t Signature; + int32_t LowestUnusedFileNo; + int32_t UsedDescriptors; + int32_t AllocatedDescriptors; + uint32_t DescriptorsBitmap[OPEN_MAX / 32]; + __fildes_t *Descriptors; +} __fdtable_t; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int __fdtable_init(__fdtable_t *); +int __fdtable_free(__fdtable_t *); + +int __fdtable_entry_isavail(__fdtable_t *, int); +int __fdtable_entry_nextavail(__fdtable_t *, int); +int __fdtable_entry_add(__fdtable_t *, int, __fildes_t *, __fildes_t **); +int __fdtable_entry_remove(__fdtable_t *, int); +__fildes_t *__fdtable_entry_get(__fdtable_t *, int); + +/* MACROS */ +#define __FDTABLE_MAGIC MAGIC('F', 'D', 'T', 'B') + +#endif /* __PSX_FDTABLE_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/interlock.h b/rossubsys/posix/include/psx/interlock.h new file mode 100644 index 00000000000..7858637d8e8 --- /dev/null +++ b/rossubsys/posix/include/psx/interlock.h @@ -0,0 +1,45 @@ +/* $Id: interlock.h,v 1.4 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/interlock.h + * + * inter-locked increment/decrement + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_INTERLOCK_H_INCLUDED__ +#define __PSX_INTERLOCK_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +int __interlock_inc(int *); +int __interlock_dec(int *); +int __interlock_add(int *, int); + +/* MACROS */ + +#endif /* __PSX_INTERLOCK_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/lpcproto.h b/rossubsys/posix/include/psx/lpcproto.h new file mode 100644 index 00000000000..f7664011fe9 --- /dev/null +++ b/rossubsys/posix/include/psx/lpcproto.h @@ -0,0 +1,91 @@ +/* $Id: lpcproto.h,v 1.7 2004/01/18 21:27:32 ea Exp $ + * + * ReactOS POSIX+ Environment Subsystem + * LPC protocol spoken by PSXSS.EXE, PSXDLL.DLL, CSRTERM.EXE. + */ +#ifndef _PSX_LPCPROTO_H +#define _PSX_LPCPROTO_H + +#define NTOS_MODE_USER +#include + +#ifndef PRIVATE +#define PRIVATE static +#endif + +/* Protocol version */ +#define PSX_LPC_PROTOCOL_VERSION 1 + +/* POSIX+ system name space */ +#define PSX_NS_SUBSYSTEM_DIRECTORY_NAME L"POSIX+" +#define PSX_NS_SESSION_DIRECTORY_NAME L"Sessions" +#define PSX_NS_SYSTEM_DIRECTORY_NAME L"System" +#define PSX_NS_API_PORT_NAME L"ApiPort" +#define PSX_NS_SBAPI_PORT_NAME L"SbApiPort" +#define PSX_NS_SESSIONAPI_PORT_NAME L"SessionPort" +#define PSX_NS_API_PORT_TEMPLATE L"\\%s\\%s" +#define PSX_NS_SESSION_PORT_TEMPLATE L"\\%s\\%s\\P%d" +#define PSX_NS_SESSION_DATA_TEMPLATE L"\\%s\\%s\\D%d" + +/* ConnectData protocol */ + +typedef enum { + PSX_CONNECTION_TYPE_PROCESS, + PSX_CONNECTION_TYPE_TERMINAL, + PSX_CONNECTION_TYPE_SERVER +} PSX_CONNECTION_TYPE; + +typedef struct _PSX_CONNECT_PORT_DATA +{ + PSX_CONNECTION_TYPE ConnectionType; /* IN OUT */ + ULONG Version; /* IN OUT */ + ULONG PortIdentifier; /* OUT */ +} PSX_CONNECT_PORT_DATA, * PPSX_CONNECT_PORT_DATA; + +/* LPC message subsystem-specific header */ + +typedef struct _PSX_MESSAGE_HEADER +{ + WORD Context; + WORD Procedure; + NTSTATUS Status; +} PSX_MESSAGE_HEADER, * PPSX_MESSAGE_HEADER; + +typedef PSX_MESSAGE_HEADER PSX_MESSAGE, * PPSX_MESSAGE; + +#define PSX_MAX_LPC_DATA_SIZE 128 /* compute it*/ + +typedef struct _PSX_MAX_MESSAGE +{ + //LPC_MESSAGE_HEADER Header; + LPC_MESSAGE Header; + PSX_MESSAGE_HEADER PsxHeader; + BYTE Data [PSX_MAX_LPC_DATA_SIZE]; +} PSX_MAX_MESSAGE, * PPSX_MAX_MESSAGE; + +/* Terminal I/O */ + +/* \POSIX+\SessionPort API */ + +#define PSX_TERMINAL_SECTION_SIZE 65536L +#define PSX_TERMINAL_SECTION_OFFSET 8192L + +typedef enum { + PSX_TERMINAL_INTERRUPT, + PSX_TERMINAL_SESSION_STATUS_REQUEST +} PSX_TERMINAL_API; + +typedef struct _PSX_TERMINAL_IO +{ + //LPC_MESSAGE_HEADER Header; + LPC_MESSAGE Header; + PSX_MESSAGE_HEADER PsxHeader; + ULONG Size; + ULONG Offset; +} PSX_TERMINAL_READ, * PPSX_TERMINAL_READ; + +/* System I/O (system calls) */ + +#include + +#endif /* ndef _PSX_LPCPROTO_H */ diff --git a/rossubsys/posix/include/psx/path.h b/rossubsys/posix/include/psx/path.h new file mode 100644 index 00000000000..eb96621901f --- /dev/null +++ b/rossubsys/posix/include/psx/path.h @@ -0,0 +1,112 @@ +/* $Id: path.h,v 1.4 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/path.h + * + * POSIX+ subsystem path functions + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_PATH_H_INCLUDED__ +#define __PSX_PATH_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +BOOLEAN +__PdxPosixPathGetNextComponent_U +( + IN UNICODE_STRING PathName, + IN OUT PUNICODE_STRING PathComponent, + OUT PBOOLEAN TrailingDelimiter OPTIONAL +); + +BOOLEAN +__PdxPosixPathResolve_U +( + IN UNICODE_STRING PathName, + OUT PUNICODE_STRING ResolvedPathName, + IN WCHAR PathDelimiter OPTIONAL +); + +BOOLEAN +__PdxPosixPathGetNextComponent_A +( + IN ANSI_STRING PathName, + IN OUT PANSI_STRING PathComponent, + OUT PBOOLEAN TrailingDelimiter OPTIONAL +); + +BOOLEAN +__PdxPosixPathResolve_A +( + IN ANSI_STRING PathName, + OUT PANSI_STRING ResolvedPathName, + IN CHAR PathDelimiter OPTIONAL +); + +BOOLEAN +__PdxPosixPathNameToNtPathName +( + IN PWCHAR PosixPath, + OUT PUNICODE_STRING NativePath, + IN PUNICODE_STRING CurDir OPTIONAL, + IN PUNICODE_STRING RootDir OPTIONAL +); + +/* MACROS */ +/* returns non-zero if the argument is a path delimiter */ +#define IS_CHAR_DELIMITER_U(WCH) (((WCH) == L'/') || ((WCH) == L'\\')) +#define IS_CHAR_DELIMITER_A(CH) (((CH) == '/') || ((CH) == '\\')) + +/* returns non-zero if the argument is an empty path component */ +#define IS_COMPONENT_EMPTY_U(WCOMPONENT) (WCOMPONENT.Length == 0) +#define IS_COMPONENT_EMPTY_A(COMPONENT) (COMPONENT.Length == 0) + +/* returns non-zero if the argument is "." */ +#define IS_COMPONENT_DOT_U(WCOMPONENT) \ +((WCOMPONENT.Length == sizeof(WCHAR)) && (WCOMPONENT.Buffer[0] == L'.')) + +#define IS_COMPONENT_DOT_A(COMPONENT) \ +((COMPONENT.Length == 1) && (COMPONENT.Buffer[0] == '.')) + +/* returns non-zero if the argument is ".." */ +#define IS_COMPONENT_DOTDOT_U(WCOMPONENT) \ +( \ + (WCOMPONENT.Length == (sizeof(WCHAR) * 2)) && \ + (WCOMPONENT.Buffer[0] == L'.') && \ + (WCOMPONENT.Buffer[1] == L'.') \ +) + +#define IS_COMPONENT_DOTDOT_A(COMPONENT) \ +( \ + (COMPONENT.Length == 2) && \ + (COMPONENT.Buffer[0] == '.') && \ + (COMPONENT.Buffer[1] == '.') \ +) + +#endif /* __PSX_PATH_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/pdata.h b/rossubsys/posix/include/psx/pdata.h new file mode 100644 index 00000000000..30c69fecb06 --- /dev/null +++ b/rossubsys/posix/include/psx/pdata.h @@ -0,0 +1,135 @@ +/* $Id: pdata.h,v 1.8 2002/10/29 04:45:13 rex Exp $ + */ +/* + * psx/pdata.h + * + * POSIX+ subsystem process environment data structure + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_PDATA_H_INCLUDED__ +#define __PSX_PDATA_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef struct __tagPDX_PDATA +{ + BOOL Spawned; /* TRUE if process has been created through __PdxSpawnPosixProcess() */ + int ArgCount; /* count of arguments passed to exec() */ + char **ArgVect; /* array of arguments passed to exec() */ + char ***Environment; /* pointer to user-provided environ variable */ + UNICODE_STRING NativePathBuffer; /* static buffer used by low-level calls for pathname conversions */ + UNICODE_STRING CurDir; /* current working directory */ + UNICODE_STRING RootPath; /* NT path to the process's root directory */ + HANDLE RootHandle; /* handle to the process's root directory */ + __fdtable_t FdTable; /* file descriptors table */ + /* WARNING: PRELIMINARY CODE FOR DEBUGGING PURPOSES ONLY - DO NOT CHANGE */ + CRITICAL_SECTION Lock; + LONG TlsIndex; +} __PDX_PDATA, * __PPDX_PDATA; + +/* serialized process data block, used by __PdxSpawnPosixProcess() and __PdxExecThunk(). + The layout of buffers inside the Buffer byte array is as following: + + ArgVect[0] + null byte + ArgVect[1] + null byte + ... + ArgVect[ArgCount - 1] + null byte + Environment[0] + null byte + Environment[1] + null byte + ... + Environment[n - 1] + null byte (NOTE: the value of n is stored in ProcessData.Environment) + CurDir.Buffer + RootPath.Buffer + FdTable.Descriptors[0] + FdTable.Descriptors[1] + ... + FdTable.Descriptors[FdTable.AllocatedDescriptors - 1] + FdTable.Descriptors[x].ExtraData + FdTable.Descriptors[y].ExtraData + ... + padding for page boundary alignment + */ +typedef struct __tagPDX_SERIALIZED_PDATA +{ + __PDX_PDATA ProcessData; + ULONG AllocSize; + BYTE Buffer[1]; +} __PDX_SERIALIZED_PDATA, *__PPDX_SERIALIZED_PDATA; + +typedef struct __tagPDX_TDATA +{ + __PPDX_PDATA ProcessData; + int ErrNum; +} __PDX_TDATA, * __PPDX_TDATA; + +/* CONSTANTS */ + +/* PROTOTYPES */ +NTSTATUS STDCALL __PdxSerializeProcessData(IN __PPDX_PDATA, OUT __PPDX_SERIALIZED_PDATA *); +NTSTATUS STDCALL __PdxUnserializeProcessData(IN OUT __PPDX_SERIALIZED_PDATA *, OUT __PPDX_PDATA * OPTIONAL); + +NTSTATUS +STDCALL +__PdxProcessDataToProcessParameters +( + OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, + IN __PPDX_PDATA ProcessData, + IN PUNICODE_STRING ImageFile +); + +/* MACROS */ +/* WARNING: PRELIMINARY CODE FOR DEBUGGING PURPOSES ONLY - DO NOT CHANGE */ +VOID __PdxSetProcessData(__PPDX_PDATA); +__PPDX_PDATA __PdxGetProcessData(VOID); + +#include + +#define __PdxAcquirePdataLock() (RtlEnterCriticalSection(&__PdxGetProcessData()->Lock)) +#define __PdxReleasePdataLock() (RtlLeaveCriticalSection(&__PdxGetProcessData()->Lock)) + +#if 0 +#define __PdxAcquirePdataLock() (RtlAcquirePebLock()) +#define __PdxReleasePdataLock() (RtlReleasePebLock()) + +#define __PdxSetProcessData(PPDATA) ((void)((NtCurrentPeb()->SubSystemData) = (PPDATA))) +#define __PdxGetProcessData() ((__PPDX_PDATA)(&(NtCurrentPeb()->SubSystemData))) +#endif + +#define __PdxGetNativePathBuffer() ((PUNICODE_STRING)(&(__PdxGetProcessData()->NativePathBuffer))) +#define __PdxGetCurDir() ((PUNICODE_STRING)(&(__PdxGetProcessData()->CurDir))) +#define __PdxGetRootPath() ((PUNICODE_STRING)(&(__PdxGetProcessData()->RootPath))) +#define __PdxGetRootHandle() ((HANDLE)(__PdxGetProcessData()->RootHandle)) +#define __PdxGetFdTable() ((__fdtable_t *)(__PdxGetProcessData()->FdTable)) + +#define __PdxSetNativePathBuffer(BUF) ((void)((__PdxGetProcessData()->NativePathBuffer) = (BUF))) +#define __PdxSetCurDir(CURDIR) ((void)((__PdxGetProcessData()->CurDir) = (CURDIR))) +#define __PdxSetRootPath(ROOTPATH) ((void)((__PdxGetProcessData()->RootPath) = (ROOTPATH))) +#define __PdxSetRootHandle(ROOTHANDLE) ((void)((__PdxGetProcessData()->RootHandle) = (ROOTHANDLE))) +#define __PdxSetFdTable(FDTABLE) ((void)((__PdxGetProcessData()->FdTable) = (FDTABLE))) + +#endif /* __PSX_PDATA_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/pthread.h b/rossubsys/posix/include/psx/pthread.h new file mode 100644 index 00000000000..88dd80a6b45 --- /dev/null +++ b/rossubsys/posix/include/psx/pthread.h @@ -0,0 +1,61 @@ +/* $Id: pthread.h,v 1.4 2002/10/29 04:45:15 rex Exp $ + */ +/* + * psx/pthread.h + * + * internal pthread.h + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_PTHREAD_H_INCLUDED__ +#define __PSX_PTHREAD_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +struct __mutexattr +{ + __magic_t signature; + int pshared; + int protocol; + int type; +}; + +struct __mutex +{ + __magic_t signature; + void * handle; + int protocol; + int type; +}; + +/* CONSTANTS */ +#define __PTHREAD_MUTEX_MAGIC (MAGIC('P', 'T', 'M', 'X')) +#define __PTHREAD_MUTEX_ATTR_MAGIC (MAGIC('P', 'T', 'M', 'A')) + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __PSX_PTHREAD_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/safeobj.h b/rossubsys/posix/include/psx/safeobj.h new file mode 100644 index 00000000000..34b72e83bd1 --- /dev/null +++ b/rossubsys/posix/include/psx/safeobj.h @@ -0,0 +1,59 @@ +/* $Id: safeobj.h,v 1.4 2002/10/29 04:45:15 rex Exp $ + */ +/* + * psx/safeobj.h + * + * types and definitions for safe checking of user-provided objects + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_SAFEOBJ_H_INCLUDED__ +#define __PSX_SAFEOBJ_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +typedef uint32_t __magic_t; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int __safeobj_validate(void *, __magic_t); + +/* MACROS */ +/* builds a magic number from 4 characters */ +#define MAGIC(a,b,c,d) ( \ + (((uint32_t)(uint8_t)(a)) << 24) | \ + (((uint32_t)(uint8_t)(b)) << 16) | \ + (((uint32_t)(uint8_t)(c)) << 8) | \ + (((uint32_t)(uint8_t)(d)) << 0) \ +) + +/* retrieves a comma-separated list of the 4 characters in a magic number */ +#define MAGIC_DECOMPOSE(m) \ + ((uint8_t)(m >> 24)), \ + ((uint8_t)(m >> 16)), \ + ((uint8_t)(m >> 8)), \ + ((uint8_t)(m >> 0)) + +#endif /* __PSX_SAFEOBJ_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/spawn.h b/rossubsys/posix/include/psx/spawn.h new file mode 100644 index 00000000000..41b5aa87371 --- /dev/null +++ b/rossubsys/posix/include/psx/spawn.h @@ -0,0 +1,54 @@ +/* $Id: spawn.h,v 1.3 2002/10/29 04:45:15 rex Exp $ + */ +/* + * psx/spawn.h + * + * spawn POSIX+ processes + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __PSX_SPAWN_H_INCLUDED__ +#define __PSX_SPAWN_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +NTSTATUS STDCALL __PdxSpawnPosixProcess +( + OUT PHANDLE ProcessHandle, + OUT PHANDLE ThreadHandle, + IN POBJECT_ATTRIBUTES FileObjectAttributes, + IN POBJECT_ATTRIBUTES ProcessObjectAttributes, + IN HANDLE InheritFromProcessHandle, + IN __PPDX_PDATA ProcessData +); + +/* MACROS */ + +#endif /* __PSX_SPAWN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/stdlib.h b/rossubsys/posix/include/psx/stdlib.h new file mode 100644 index 00000000000..74c00e82cc0 --- /dev/null +++ b/rossubsys/posix/include/psx/stdlib.h @@ -0,0 +1,55 @@ +/* $Id: stdlib.h,v 1.5 2003/01/05 18:27:20 robd Exp $ + */ +/* + * psx/stdlib.h + * + * internal stdlib.h + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PSX_STDLIB_H_INCLUDED__ +#define __PSX_STDLIB_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +/* FIXME? Windows NT's ntdll doesn't export RtlGetProcessHeap() */ +//#define RtlGetProcessHeap() ((HANDLE)NtCurrentPeb()->ProcessHeap) +#ifndef _RTLGETPROCESSHEAP_DEFINED_ +#define _RTLGETPROCESSHEAP_DEFINED_ +#define RtlGetProcessHeap() (NtCurrentPeb()->ProcessHeap) +#endif + +#define __malloc(SIZE) (RtlAllocateHeap(RtlGetProcessHeap(), 0, (SIZE))) +#define __realloc(PTR,SIZE) (RtlReAllocateHeap(RtlGetProcessHeap(), 0, (PTR), (SIZE))) +#define __free(PTR) (RtlFreeHeap(RtlGetProcessHeap(), 0, (PTR))) + +#endif /* __PSX_STDLIB_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/template.h b/rossubsys/posix/include/psx/template.h new file mode 100644 index 00000000000..7998718c387 --- /dev/null +++ b/rossubsys/posix/include/psx/template.h @@ -0,0 +1,83 @@ +/* $Id: template.h,v 1.6 2002/10/29 04:45:15 rex Exp $ + How to create a new header file from this template: + - copy the template in the new file (never edit this file directly, unless + that's what you want) + - search for the string "EDITME" in the file, and follow the instructions + - remove this comment block, all blocks containing REMOVEME, and all EDITME + instructions + - save your file, and Have Fun! (TM) + */ +/* $*Id*$ (EDITME: remove asterisks from "$*Id*$") + */ +/* + * psx/template.h (EDITME: replace with the real name of the header) + * + * template for POSIX headers (EDITME: replace this line with the real file + * description) + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by John Doe (EDITME: your name and e-mail go + * here) + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +/* + Tags are used to prevent double inclusion of C header files. This + technique should be documented in all good C manuals + + How to generate an unique tag for your header: + - uppercase the name of the header, where "name" is the filename and + the optional relative path (e.g. "stdio.h", "sys/types.h") + - replace all non-alphanumeric characters in the obtained name with an + underscore character ("_") + - prepend a double underscore ("__"), and append the string "_INCLUDED__" + - replace all occurrences of "__PSX_TEMPLATE_H_INCLUDED__" in this file + with your tag + + Example tags: + sys/types.h -> SYS/TYPES.H -> SYS_TYPES_H -> __SYS_TYPES_H_INCLUDED__ + iso646.h -> ISO646.H -> ISO646_H -> __ISO646_H_INCLUDED__ + + (REMOVEME) + */ +#ifndef __PSX_TEMPLATE_H_INCLUDED__ /* EDITME: replace macro with unique tag */ +#define __PSX_TEMPLATE_H_INCLUDED__ /* EDITME: replace macro with unique tag */ +/* + Explanation of the sections: + INCLUDES #include directives should be grouped here + OBJECTS declare global variables here + TYPES types, structures and unions here + CONSTANTS symbolic constants (simple #define's), enums, constants + PROTOTYPES ANSI C function prototypes + MACROS parametrized macros + + (REMOVEME) + */ +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __PSX_TEMPLATE_H_INCLUDED__ */ /* EDITME: replace macro with unique tag */ + +/* EOF */ + diff --git a/rossubsys/posix/include/psx/tls.h b/rossubsys/posix/include/psx/tls.h new file mode 100644 index 00000000000..69e741e1288 --- /dev/null +++ b/rossubsys/posix/include/psx/tls.h @@ -0,0 +1,48 @@ +/* $Id: tls.h,v 1.3 2002/10/29 04:45:15 rex Exp $ + */ +/* + * psx/tls.h + * + * types and calls for TLS management + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __PSX_TLS_H_INCLUDED__ +#define __PSX_TLS_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +typedef unsigned int __tls_index_t; + +/* CONSTANTS */ + +/* PROTOTYPES */ +__tls_index_t __tls_alloc(); +int __tls_free(__tls_index_t index); +void * __tls_get_val(__tls_index_t index); +int __tls_put_val(__tls_index_t index, void * data); + +/* MACROS */ + +#endif /* __PSX_TLS_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/pthread.h b/rossubsys/posix/include/pthread.h new file mode 100644 index 00000000000..23317c2f083 --- /dev/null +++ b/rossubsys/posix/include/pthread.h @@ -0,0 +1,141 @@ +/* $Id: pthread.h,v 1.4 2002/10/29 04:45:16 rex Exp $ + */ +/* + * pthread.h + * + * threads. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PTHREAD_H_INCLUDED__ +#define __PTHREAD_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ +#define PTHREAD_MUTEX_NORMAL (1) +#define PTHREAD_MUTEX_ERRORCHECK (2) +#define PTHREAD_MUTEX_RECURSIVE (3) + +#define PTHREAD_MUTEX_DEFAULT (PTHREAD_MUTEX_NORMAL) + +#define PTHREAD_PROCESS_PRIVATE (1) +#define PTHREAD_PROCESS_SHARED (2) + +#define PTHREAD_PRIO_NONE (1) + +/* PROTOTYPES */ +int pthread_attr_destroy(pthread_attr_t *); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); +int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); +int pthread_attr_getinheritsched(const pthread_attr_t *, int *); +int pthread_attr_getschedparam(const pthread_attr_t *, + struct sched_param *); +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); +int pthread_attr_getscope(const pthread_attr_t *, int *); +int pthread_attr_getstackaddr(const pthread_attr_t *, void **); +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); +int pthread_attr_init(pthread_attr_t *); +int pthread_attr_setdetachstate(pthread_attr_t *, int); +int pthread_attr_setguardsize(pthread_attr_t *, size_t); +int pthread_attr_setinheritsched(pthread_attr_t *, int); +int pthread_attr_setschedparam(pthread_attr_t *, + const struct sched_param *); +int pthread_attr_setschedpolicy(pthread_attr_t *, int); +int pthread_attr_setscope(pthread_attr_t *, int); +int pthread_attr_setstackaddr(pthread_attr_t *, void *); +int pthread_attr_setstacksize(pthread_attr_t *, size_t); +int pthread_cancel(pthread_t); +void pthread_cleanup_push(void (*)(void *), void *); +void pthread_cleanup_pop(int); +int pthread_cond_broadcast(pthread_cond_t *); +int pthread_cond_destroy(pthread_cond_t *); +int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *); +int pthread_cond_signal(pthread_cond_t *); +int pthread_cond_timedwait(pthread_cond_t *, + pthread_mutex_t *, const struct timespec *); +int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); +int pthread_condattr_destroy(pthread_condattr_t *); +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); +int pthread_condattr_init(pthread_condattr_t *); +int pthread_condattr_setpshared(pthread_condattr_t *, int); +int pthread_create(pthread_t *, const pthread_attr_t *, + void *(*)(void *), void *); +int pthread_detach(pthread_t); +int pthread_equal(pthread_t, pthread_t); +void pthread_exit(void *); +int pthread_getconcurrency(void); +int pthread_getschedparam(pthread_t, int *, struct sched_param *); +void *pthread_getspecific(pthread_key_t); +int pthread_join(pthread_t, void **); +int pthread_key_create(pthread_key_t *, void (*)(void *)); +int pthread_key_delete(pthread_key_t); +int pthread_mutex_destroy(pthread_mutex_t *); +int pthread_mutex_getprioceiling(const pthread_mutex_t *, int *); +int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *); +int pthread_mutex_lock(pthread_mutex_t *); +int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *); +int pthread_mutex_trylock(pthread_mutex_t *); +int pthread_mutex_unlock(pthread_mutex_t *); +int pthread_mutexattr_destroy(pthread_mutexattr_t *); +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *, + int *); +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *, int *); +int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *); +int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *); +int pthread_mutexattr_init(pthread_mutexattr_t *); +int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int); +int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int); +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); +int pthread_mutexattr_settype(pthread_mutexattr_t *, int); +int pthread_once(pthread_once_t *, void (*)(void)); +int pthread_rwlock_destroy(pthread_rwlock_t *); +int pthread_rwlock_init(pthread_rwlock_t *, + const pthread_rwlockattr_t *); +int pthread_rwlock_rdlock(pthread_rwlock_t *); +int pthread_rwlock_tryrdlock(pthread_rwlock_t *); +int pthread_rwlock_trywrlock(pthread_rwlock_t *); +int pthread_rwlock_unlock(pthread_rwlock_t *); +int pthread_rwlock_wrlock(pthread_rwlock_t *); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); +int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, + int *); +int pthread_rwlockattr_init(pthread_rwlockattr_t *); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); +pthread_t + pthread_self(void); +int pthread_setcancelstate(int, int *); +int pthread_setcanceltype(int, int *); +int pthread_setconcurrency(int); +int pthread_setschedparam(pthread_t, int , + const struct sched_param *); +int pthread_setspecific(pthread_key_t, const void *); +void pthread_testcancel(void); + +/* MACROS */ + +#endif /* __PTHREAD_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/pwd.h b/rossubsys/posix/include/pwd.h new file mode 100644 index 00000000000..0c8639bc618 --- /dev/null +++ b/rossubsys/posix/include/pwd.h @@ -0,0 +1,60 @@ +/* $Id: pwd.h,v 1.4 2002/10/29 04:45:16 rex Exp $ + */ +/* + * pwd.h + * + * password structure. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __PWD_H_INCLUDED__ +#define __PWD_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct passwd +{ + char *pw_name; /* user's login name */ + uid_t pw_uid; /* numerical user ID */ + gid_t pw_gid; /* numerical group ID */ + char *pw_dir; /* initial working directory */ + char *pw_shell; /* program to use as shell */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +struct passwd *getpwnam(const char *); +struct passwd *getpwuid(uid_t); +int getpwnam_r(const char *, struct passwd *, char *, + size_t, struct passwd **); +int getpwuid_r(uid_t, struct passwd *, char *, + size_t, struct passwd **); +void endpwent(void); +struct passwd *getpwent(void); +void setpwent(void); + +/* MACROS */ + +#endif /* __PWD_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sched.h b/rossubsys/posix/include/sched.h new file mode 100644 index 00000000000..d18b2cfab50 --- /dev/null +++ b/rossubsys/posix/include/sched.h @@ -0,0 +1,62 @@ +/* $Id: sched.h,v 1.4 2002/10/29 04:45:18 rex Exp $ + */ +/* + * sched.h + * + * execution scheduling (REALTIME). Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SCHED_H_INCLUDED__ +#define __SCHED_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +struct sched_param +{ + int sched_priority; /* process execution scheduling priority */ +}; + +/* CONSTANTS */ +/* First in-first out (FIFO) scheduling policy */ +#define SCHED_FIFO (1) +/* Round robin scheduling policy */ +#define SCHED_RR (2) +/* Another scheduling policy */ +#define SCHED_OTHER (3) + +/* PROTOTYPES */ +int sched_get_priority_max(int); +int sched_get_priority_min(int); +int sched_getparam(pid_t, struct sched_param *); +int sched_getscheduler(pid_t); +int sched_rr_get_interval(pid_t, struct timespec *); +int sched_setparam(pid_t, const struct sched_param *); +int sched_setscheduler(pid_t, int, const struct sched_param *); +int sched_yield(void); + +/* MACROS */ + +#endif /* __SCHED_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/signal.h b/rossubsys/posix/include/signal.h new file mode 100644 index 00000000000..5f11c57e8fc --- /dev/null +++ b/rossubsys/posix/include/signal.h @@ -0,0 +1,322 @@ +/* $Id: signal.h,v 1.5 2002/10/29 04:45:18 rex Exp $ + */ +/* + * signal.h + * + * signals. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SIGNAL_H_INCLUDED__ +#define __SIGNAL_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ + +/* TYPES */ +/* pre-declaration of time.h types to suppress warnings caused by circular + dependencies */ +struct timespec; + +typedef int sig_atomic_t; /* Integral type of an object that can be + accessed as an atomic entity, even in the + presence of asynchronous interrupts */ + +typedef unsigned long int sigset_t; /* Integral or structure type of an object + used to represent sets of signals. */ + +union sigval +{ + int sival_int; /* integer signal value */ + void* sival_ptr; /* pointer signal value */ +}; + +struct sigevent +{ + int sigev_notify; /* notification type */ + int sigev_signo; /* signal number */ + union sigval sigev_value; /* signal value */ + void (* sigev_notify_function)(union sigval); /* notification function */ + pthread_attr_t * sigev_notify_attributes; /* notification attributes */ +}; + + +typedef struct __tagsiginfo_t +{ + int si_signo; /* signal number */ + int si_errno; /* if non-zero, an errno value associated with + this signal, as defined in */ + int si_code; /* signal code */ + pid_t si_pid; /* sending process ID */ + uid_t si_uid; /* real user ID of sending process */ + void *si_addr; /* address of faulting instruction */ + int si_status; /* exit value or signal */ + long si_band; /* band event for SIGPOLL */ + union sigval si_value; /* signal value */ +} siginfo_t; + +struct sigaction +{ + void (* sa_handler)(int); /* what to do on receipt of signal */ + sigset_t sa_mask; /* set of signals to be blocked during + execution of the signal handling function */ + int sa_flags; /* special flags */ + void (* sa_sigaction)(int, siginfo_t *, void *); + /* pointer to signal handler function + or one of the macros SIG_IGN or SIG_DFL */ +}; + +typedef struct __tagstack_t +{ + void *ss_sp; /* stack base or pointer */ + size_t ss_size; /* stack size */ + int ss_flags; /* flags */ +} stack_t; + +struct sigstack +{ + int ss_onstack; /* non-zero when signal stack is in use */ + void *ss_sp; /* signal stack pointer */ +}; + +/* CONSTANTS */ +#define SIG_DFL ((void (*)(int))(0xFFFFFFFF)) /* Request for default signal handling. */ +#define SIG_ERR ((void (*)(int))(0x00000000)) /* Return value from signal() in case of error. */ +#define SIG_IGN ((void (*)(int))(0x00000001)) /* Request that signal be ignored. */ +#define SIG_HOLD ((void (*)(int))(0x00000002)) /* Request that signal be held. */ + +#define SIGEV_NONE (0) /* No asynchronous notification will be delivered \ + when the event of interest occurs. */ +#define SIGEV_SIGNAL (1) /* A queued signal, with an application-defined \ + value, will be generated when the event of \ + interest occurs. */ +#define SIGEV_THREAD (2) /* A notification function will be called to perform \ + notification. */ + +/* TODO: realtime features not supported yet */ +#define SIGRTMIN (-1) +#define SIGRTMAX (-1) + +#define SIGABRT ( 1) /* Process abort signal. */ +#define SIGALRM ( 2) /* Alarm clock. */ +#define SIGFPE ( 3) /* Erroneous arithmetic operation. */ +#define SIGHUP ( 4) /* Hangup. */ +#define SIGILL ( 5) /* Illegal instruction. */ +#define SIGINT ( 6) /* Terminal interrupt signal. */ +#define SIGKILL ( 7) /* Kill (cannot be caught or ignored). */ +#define SIGPIPE ( 8) /* Write on a pipe with no one to read it. */ +#define SIGQUIT ( 9) /* Terminal quit signal. */ +#define SIGSEGV (10) /* Invalid memory reference. */ +#define SIGTERM (11) /* Termination signal. */ +#define SIGUSR1 (12) /* User-defined signal 1. */ +#define SIGUSR2 (13) /* User-defined signal 2. */ +#define SIGCHLD (14) /* Child process terminated or stopped. */ +#define SIGCONT (15) /* Continue executing, if stopped. */ +#define SIGSTOP (16) /* Stop executing (cannot be caught or ignored). */ +#define SIGTSTP (17) /* Terminal stop signal. */ +#define SIGTTIN (18) /* Background process attempting read. */ +#define SIGTTOU (19) /* Background process attempting write. */ +#define SIGBUS (20) /* Access to an undefined portion of a memory object. */ +#define SIGPOLL (21) /* Pollable event. */ +#define SIGPROF (22) /* Profiling timer expired. */ +#define SIGSYS (23) /* Bad system call. */ +#define SIGTRAP (24) /* Trace/breakpoint trap. */ +#define SIGURG (25) /* High bandwidth data is available at a socket. */ +#define SIGVTALRM (26) /* Virtual timer expired. */ +#define SIGXCPU (27) /* CPU time limit exceeded. */ +#define SIGXFSZ (28) /* File size limit exceeded. */ + +/* FIXME: the following constants need to be reviewed */ +/* Do not generate SIGCHLD when children stop. */ +#define SA_NOCLDSTOP (0x00000001) +/* The resulting set is the union of the current set and the signal set + pointed to by the argument set. */ +#define SA_ONSTACK (0x00000002) +/* Causes signal dispositions to be set to SIG_DFL on entry to signal + handlers. */ +#define SA_RESETHAND (0x00000004) +/* Causes certain functions to become restartable. */ +#define SA_RESTART (0x00000008) +/* Causes extra information to be passed to signal handlers at the time + of receipt of a signal. */ +#define SA_SIGINFO (0x00000010) +/* Causes implementations not to create zombie processes on child death. */ +#define SA_NOCLDWAIT (0x00000020) +/* Causes signal not to be automatically blocked on entry to signal + handler. */ +#define SA_NODEFER (0x00000040) + +/* FIXME: the following constants need to be reviewed */ +/* The resulting set is the intersection of the current set and the + complement of the signal set pointed to by the argument set. */ +#define SIG_BLOCK (1) +/* The resulting set is the signal set pointed to by the argument + set. */ +#define SIG_UNBLOCK (2) +/* Causes signal delivery to occur on an alternate stack. */ +#define SIG_SETMASK (3) + +/* FIXME: the following constants need to be reviewed */ +/* Process is executing on an alternate signal stack. */ +#define SS_ONSTACK (1) +/* Alternate signal stack is disabled. */ +#define SS_DISABLE (2) + +/* Minimum stack size for a signal handler. */ /* FIXME */ +#define MINSIGSTKSZ (0) +/* Default size in bytes for the alternate signal stack. */ /* FIXME */ +#define SIGSTKSZ (0) + +/* + signal-specific reasons why the signal was generated + */ +/* SIGILL */ +/* illegal opcode */ +#define ILL_ILLOPC (1) +/* illegal operand */ +#define ILL_ILLOPN (2) +/* illegal addressing mode */ +#define ILL_ILLADR (3) +/* illegal trap */ +#define ILL_ILLTRP (4) +/* privileged opcode */ +#define ILL_PRVOPC (5) +/* privileged register */ +#define ILL_PRVREG (6) +/* coprocessor error */ +#define ILL_COPROC (7) +/* internal stack error */ +#define ILL_BADSTK (8) + +/* SIGFPE */ +/* integer divide by zero */ +#define FPE_INTDIV +/* integer overflow */ +#define FPE_INTOVF +/* floating point divide by zero */ +#define FPE_FLTDIV +/* floating point overflow */ +#define FPE_FLTOVF +/* floating point underflow */ +#define FPE_FLTUND +/* floating point inexact result */ +#define FPE_FLTRES +/* invalid floating point operation */ +#define FPE_FLTINV +/* subscript out of range */ +#define FPE_FLTSUB + +/* SIGSEGV */ +/* address not mapped to object */ +#define SEGV_MAPERR +/* invalid permissions for mapped object */ +#define SEGV_ACCERR + +/* SIGBUS */ +/* invalid address alignment */ +#define BUS_ADRALN +/* non-existent physical address */ +#define BUS_ADRERR +/* object specific hardware error */ +#define BUS_OBJERR + +/* SIGTRAP */ +/* process breakpoint */ +#define TRAP_BRKPT +/* process trace trap */ +#define TRAP_TRACE + +/* SIGCHLD */ +/* child has exited */ +#define CLD_EXITED +/* child has terminated abnormally and did not create a core file */ +#define CLD_KILLED +/* child has terminated abnormally and created a core file */ +#define CLD_DUMPED +/* traced child has trapped */ +#define CLD_TRAPPED +/* child has stopped */ +#define CLD_STOPPED +/* stopped child has continued */ +#define CLD_CONTINUED + +/* SIGPOLL */ +/* data input available */ +#define POLL_IN +/* output buffers available */ +#define POLL_OUT +/* input message available */ +#define POLL_MSG +/* I/O error */ +#define POLL_ERR +/* high priority input available */ +#define POLL_PRI +/* device disconnected */ +#define POLL_HUP +/* signal sent by kill() */ +#define SI_USER +/* signal sent by the sigqueue() */ +#define SI_QUEUE +/* signal generated by expiration of a timer set by timer_settime() */ +#define SI_TIMER +/* signal generated by completion of an asynchronous I/O request */ +#define SI_ASYNCIO +/* signal generated by arrival of a message on an empty message queue */ +#define SI_MESGQ + +/* PROTOTYPES */ +void (*bsd_signal(int, void (*)(int)))(int); +int kill(pid_t, int); +int killpg(pid_t, int); +int pthread_kill(pthread_t, int); +int pthread_sigmask(int, const sigset_t *, sigset_t *); +int raise(int); +int sigaction(int, const struct sigaction *, struct sigaction *); +int sigaddset(sigset_t *, int); +int sigaltstack(const stack_t *, stack_t *); +int sigdelset(sigset_t *, int); +int sigemptyset(sigset_t *); +int sigfillset(sigset_t *); +int sighold(int); +int sigignore(int); +int siginterrupt(int, int); +int sigismember(const sigset_t *, int); +void (*signal(int, void (*)(int)))(int); +int sigpause(int); +int sigpending(sigset_t *); +int sigprocmask(int, const sigset_t *, sigset_t *); +int sigqueue(pid_t, int, const union sigval); +int sigrelse(int); +void (*sigset(int, void (*)(int)))(int); +int sigstack(struct sigstack *ss, + struct sigstack *oss); /* LEGACY */ +int sigsuspend(const sigset_t *); +int sigtimedwait(const sigset_t *, siginfo_t *, + const struct timespec *); +int sigwait(const sigset_t *set, int *sig); +int sigwaitinfo(const sigset_t *, siginfo_t *); + +/* MACROS */ + +#endif /* __SIGNAL_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/stdarg.h b/rossubsys/posix/include/stdarg.h new file mode 100644 index 00000000000..e9b488991b3 --- /dev/null +++ b/rossubsys/posix/include/stdarg.h @@ -0,0 +1,57 @@ +/* $Id: stdarg.h,v 1.4 2002/10/29 04:45:18 rex Exp $ + */ +/* + * stdarg.h + * + * handle variable argument list. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __STDARG_H_INCLUDED__ +#define __STDARG_H_INCLUDED__ + +/* OBJECTS */ + +/* TYPES */ +typedef char* va_list; + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +/* taken from mingw's stdarg.h */ + +/* Amount of space required in an argument list (ie. the stack) for an + argument of type t. */ +#define __va_argsiz(t) \ + (((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) + +#define va_start(ap, pN) \ + ((ap) = ((va_list) (&pN) + __va_argsiz(pN))) + +#define va_end(ap) ((void)0) + +#define va_arg(ap, t) \ + (((ap) = (ap) + __va_argsiz(t)), \ + *((t*) (void*) ((ap) - __va_argsiz(t)))) + +#endif /* __STDARG_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/stddef.h b/rossubsys/posix/include/stddef.h new file mode 100644 index 00000000000..e08eb18ce30 --- /dev/null +++ b/rossubsys/posix/include/stddef.h @@ -0,0 +1,63 @@ +/* $Id: stddef.h,v 1.5 2003/01/05 18:27:19 robd Exp $ + */ +/* + * stddef.h + * + * standard type definitions. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __STDDEF_H_INCLUDED__ +#define __STDDEF_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +typedef signed long int ptrdiff_t; + +#ifndef _WCHAR_T_ +#define _WCHAR_T_ +#define _WCHAR_T +#define _WCHAR_T_DEFINED +#ifndef __WCHAR_TYPE__ +#define __WCHAR_TYPE__ short unsigned int +#endif +#ifndef __cplusplus +typedef __WCHAR_TYPE__ wchar_t; +#endif /* C++ */ +#endif /* _WCHAR_T_ */ + +//typedef unsigned short int wchar_t; + +/* CONSTANTS */ +#ifndef NULL +#define NULL ((void *)(0)) /* Null pointer constant. */ +#endif + +/* PROTOTYPES */ + +/* MACROS */ +#define offsetof(t,m) ((size_t) &((t *)0)->m) + +#endif /* __STDDEF_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/stdio.h b/rossubsys/posix/include/stdio.h new file mode 100644 index 00000000000..1ed4a091757 --- /dev/null +++ b/rossubsys/posix/include/stdio.h @@ -0,0 +1,165 @@ +/* $Id: stdio.h,v 1.4 2002/10/29 04:45:19 rex Exp $ + */ +/* + * stdio.h + * + * standard buffered input/output. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __STDIO_H_INCLUDED__ +#define __STDIO_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include + +/* OBJECTS */ +extern char *optarg; +extern int opterr; +extern int optind; /* LEGACY */ +extern int optopt; + +/* TYPES */ +typedef struct __tagFILE +{ + int _dummy; +} FILE; + +typedef struct __tagfpos_t +{ + int _dummy; +} fpos_t; + + +/* CONSTANTS */ +/* Size of buffers. */ +#define BUFSIZ (0x10000) + +/* Maximum size in bytes of the longest filename string that the implementation + guarantees can be opened. */ +#define FILENAME_MAX (255) + +/* Number of streams which the implementation guarantees can be open + simultaneously. The value will be at least eight. */ +#define FOPEN_MAX (8) + +/* Input/output fully buffered. */ +#define _IOFBF (1) +/* Input/output line buffered. */ +#define _IOLBF (2) +/* Input/output unbuffered. */ +#define _IONBF (3) + +/* Maximum size of character array to hold ctermid() output. */ +#define L_ctermid (255) +/* Maximum size of character array to hold cuserid() output. (LEGACY) */ +#define L_cuserid (255) +/* Maximum size of character array to hold tmpnam() output. */ +#define L_tmpnam (255) + +/* Minimum number of unique filenames generated by tmpnam(). Maximum number + of times an application can call tmpnam() reliably. The value of TMP_MAX + will be at least 10,000. */ +#define TMP_MAX (0xFFFF) + +/* End-of-file return value. */ +#define EOF (-1) + +/* default directory prefix for tempnam() */ +#define P_tmpdir "/tmp/" + +/* Standard error output stream. */ +#define stderr ((FILE *)STDERR_FILENO) +/* Standard input stream. */ +#define stdin ((FILE *)STDIN_FILENO) +/* Standard output stream. */ +#define stdout ((FILE *)STDOUT_FILENO) + +/* PROTOTYPES */ +void clearerr(FILE *); +char *ctermid(char *); +char *cuserid(char *); /* LEGACY */ +int fclose(FILE *); +FILE *fdopen(int, const char *); +int feof(FILE *); +int ferror(FILE *); +int fflush(FILE *); +int fgetc(FILE *); +int fgetpos(FILE *, fpos_t *); +char *fgets(char *, int, FILE *); +int fileno(FILE *); +void flockfile(FILE *); +FILE *fopen(const char *, const char *); +int fprintf(FILE *, const char *, ...); +int fputc(int, FILE *); +int fputs(const char *, FILE *); +size_t fread(void *, size_t, size_t, FILE *); +FILE *freopen(const char *, const char *, FILE *); +int fscanf(FILE *, const char *, ...); +int fseek(FILE *, long int, int); +int fseeko(FILE *, off_t, int); +int fsetpos(FILE *, const fpos_t *); +long int ftell(FILE *); +off_t ftello(FILE *); +int ftrylockfile(FILE *); +void funlockfile(FILE *); +size_t fwrite(const void *, size_t, size_t, FILE *); +int getc(FILE *); +int getchar(void); +int getc_unlocked(FILE *); +int getchar_unlocked(void); +int getopt(int, char * const[], const char *); /* LEGACY */ +char *gets(char *); +int getw(FILE *); +int pclose(FILE *); +void perror(const char *); +FILE *popen(const char *, const char *); +int printf(const char *, ...); +int putc(int, FILE *); +int putchar(int); +int putc_unlocked(int, FILE *); +int putchar_unlocked(int); +int puts(const char *); +int putw(int, FILE *); +int remove(const char *); +int rename(const char *, const char *); +void rewind(FILE *); +int scanf(const char *, ...); +void setbuf(FILE *, char *); +int setvbuf(FILE *, char *, int, size_t); +int snprintf(char *, size_t, const char *, ...); +int sprintf(char *, const char *, ...); +int sscanf(const char *, const char *, int, ...); +char *tempnam(const char *, const char *); +FILE *tmpfile(void); +char *tmpnam(char *); +int ungetc(int, FILE *); +int vfprintf(FILE *, const char *, va_list); +int vprintf(const char *, va_list); +int vsnprintf(char *, size_t, const char *, va_list); +int vsprintf(char *, const char *, va_list); + +/* MACROS */ + +#endif /* __STDIO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/stdlib.h b/rossubsys/posix/include/stdlib.h new file mode 100644 index 00000000000..a69282cd910 --- /dev/null +++ b/rossubsys/posix/include/stdlib.h @@ -0,0 +1,130 @@ +/* $Id: stdlib.h,v 1.4 2002/10/29 04:45:19 rex Exp $ + */ +/* + * stdlib.h + * + * standard library definitions. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __STDLIB_H_INCLUDED__ +#define __STDLIB_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef struct __tagdiv_t +{ + int quot; /* quotient */ + int rem; /* remainder */ +} div_t; + +typedef struct __tagldiv_t +{ + long int quot; /* quotient */ + long int rem; /* remainder */ +} ldiv_t; + +/* CONSTANTS */ +#define EXIT_FAILURE (-1) /* Unsuccessful termination for exit(), evaluates \ + to a non-zero value. */ +#define EXIT_SUCCESS (0) /* Successful termination for exit(), evaluates to 0. */ + +/* FIXME */ +#define RAND_MAX (32767) /* Maximum value returned by rand(), at least 32,767. */ + +/* FIXME */ +#define MB_CUR_MAX (1) /* Integer expression whose value is the maximum number \ + of bytes in a character specified by the current \ + locale. */ + +/* PROTOTYPES */ +long a64l(const char *); +void abort(void); +int abs(int); +int atexit(void (*)(void)); +double atof(const char *); +int atoi(const char *); +long int atol(const char *); +void *bsearch(const void *, const void *, size_t, size_t, + int (*)(const void *, const void *)); +void *calloc(size_t, size_t); +div_t div(int, int); +double drand48(void); +char *ecvt(double, int, int *, int *); +double erand48(unsigned short int[3]); +void exit(int); +char *fcvt (double, int, int *, int *); +void free(void *); +char *gcvt(double, int, char *); +char *getenv(const char *); +int getsubopt(char **, char *const *, char **); +int grantpt(int); +char *initstate(unsigned int, char *, size_t); +long int jrand48(unsigned short int[3]); +char *l64a(long); +long int labs(long int); +void lcong48(unsigned short int[7]); +ldiv_t ldiv(long int, long int); +long int lrand48(void); +void *malloc(size_t); +int mblen(const char *, size_t); +size_t mbstowcs(wchar_t *, const char *, size_t); +int mbtowc(wchar_t *, const char *, size_t); +char *mktemp(char *); +int mkstemp(char *); +long int mrand48(void); +long int nrand48(unsigned short int [3]); +char *ptsname(int); +int putenv(char *); +void qsort(void *, size_t, size_t, int (*)(const void *, + const void *)); +int rand(void); +int rand_r(unsigned int *); +long random(void); +void *realloc(void *, size_t); +char *realpath(const char *, char *); +unsigned short int seed48(unsigned short int[3]); +void setkey(const char *); +char *setstate(const char *); +void srand(unsigned int); +void srand48(long int); +void srandom(unsigned); +double strtod(const char *, char **); +long int strtol(const char *, char **, int); +unsigned long int + strtoul(const char *, char **, int); +int system(const char *); +int ttyslot(void); /* LEGACY */ +int unlockpt(int); +void *valloc(size_t); /* LEGACY */ +size_t wcstombs(char *, const wchar_t *, size_t); +int wctomb(char *, wchar_t); + +/* MACROS */ + +#endif /* __STDLIB_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/string.h b/rossubsys/posix/include/string.h new file mode 100644 index 00000000000..f673ca0a165 --- /dev/null +++ b/rossubsys/posix/include/string.h @@ -0,0 +1,69 @@ +/* $Id: string.h,v 1.4 2002/10/29 04:45:19 rex Exp $ + */ +/* + * string.h + * + * string operations. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __STRING_H_INCLUDED__ /* replace with the appropriate tag */ +#define __STRING_H_INCLUDED__ /* replace with the appropriate tag */ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +void *memccpy(void *, const void *, int, size_t); +void *memchr(const void *, int, size_t); +int memcmp(const void *, const void *, size_t); +void *memcpy(void *, const void *, size_t); +void *memmove(void *, const void *, size_t); +void *memset(void *, int, size_t); +char *strcat(char *, const char *); +char *strchr(const char *, int); +int strcmp(const char *, const char *); +int strcoll(const char *, const char *); +char *strcpy(char *, const char *); +size_t strcspn(const char *, const char *); +char *strdup(const char *); +char *strerror(int); +size_t strlen(const char *); +char *strncat(char *, const char *, size_t); +int strncmp(const char *, const char *, size_t); +char *strncpy(char *, const char *, size_t); +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +size_t strspn(const char *, const char *); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +char *strtok_r(char *, const char *, char **); +size_t strxfrm(char *, const char *, size_t); + +/* MACROS */ + +#endif /* __STRING_H_INCLUDED__ */ /* replace with the appropriate tag */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/errno.h b/rossubsys/posix/include/sys/errno.h new file mode 100644 index 00000000000..933f925bf85 --- /dev/null +++ b/rossubsys/posix/include/sys/errno.h @@ -0,0 +1,44 @@ +/* $Id: errno.h,v 1.3 2002/10/29 04:45:19 rex Exp $ + */ +/* + * sys/errno.h + * + * dummy include file for Microsoft POSIX and Interix compatibility + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __SYS_ERRNO_H_INCLUDED__ +#define __SYS_ERRNO_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_ERRNO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/ipc.h b/rossubsys/posix/include/sys/ipc.h new file mode 100644 index 00000000000..7d53fcf4d36 --- /dev/null +++ b/rossubsys/posix/include/sys/ipc.h @@ -0,0 +1,64 @@ +/* $Id: ipc.h,v 1.5 2002/10/29 04:45:19 rex Exp $ + */ +/* + * sys/ipc.h + * + * interprocess communication access structure. Conforming to the Single + * UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_IPC_H_INCLUDED__ +#define __SYS_IPC_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct ipc_perm +{ + uid_t uid; /* owner's user ID */ + gid_t gid; /* owner's group ID */ + uid_t cuid; /* creator's user ID */ + gid_t cgid; /* creator's group ID */ + mode_t mode; /* read/write permission */ +}; + +/* CONSTANTS */ +/* Mode bits */ +#define IPC_CREAT (0x00000200) /* Create entry if key does not exist */ +#define IPC_EXCL (0x00000400) /* Fail if key exists */ +#define IPC_NOWAIT (0x00000800) /* Error if request must wait */ + +/* Keys */ +#define IPC_PRIVATE (0xFFFFFFFF) /* Private key */ + +/* Control commands */ +#define IPC_RMID (1) /* Remove identifier */ +#define IPC_SET (2) /* Set options */ +#define IPC_STAT (3) /* Get options */ + +/* PROTOTYPES */ +key_t ftok(const char *, int); + +/* MACROS */ + +#endif /* __SYS_IPC_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/mman.h b/rossubsys/posix/include/sys/mman.h new file mode 100644 index 00000000000..8008e0bac22 --- /dev/null +++ b/rossubsys/posix/include/sys/mman.h @@ -0,0 +1,43 @@ +/* $Id: mman.h,v 1.4 2002/10/29 04:45:20 rex Exp $ + */ +/* + * sys/mman.h + * + * memory management declarations. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_SOCKET_H_INCLUDED__ +#define __SYS_SOCKET_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_SOCKET_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/msg.h b/rossubsys/posix/include/sys/msg.h new file mode 100644 index 00000000000..1bc5a28cf0d --- /dev/null +++ b/rossubsys/posix/include/sys/msg.h @@ -0,0 +1,64 @@ +/* $Id: msg.h,v 1.5 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/msg.h + * + * message queue structures. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_SOCKET_H_INCLUDED__ +#define __SYS_SOCKET_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +typedef unsigned int msgqnum_t; /* Used for the number of messages in the message queue */ +typedef unsigned int msglen_t; /* Used for the number of bytes allowed in a message queue */ + +struct msqid_ds +{ + struct ipc_perm msg_perm; /* operation permission structure */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* maximum number of bytes allowed on queue */ + pid_t msg_lspid; /* process ID of last msgsnd() */ + pid_t msg_lrpid; /* process ID of last msgrcv() */ + time_t msg_stime; /* time of last msgsnd() */ + time_t msg_rtime; /* time of last msgrcv() */ + time_t msg_ctime; /* time of last change */ +}; + +/* CONSTANTS */ +/* Message operation flag */ +#define MSG_NOERROR (0x00001000) /* No error if big message */ + +/* PROTOTYPES */ +int msgctl(int, int, struct msqid_ds *); +int msgget(key_t, int); +ssize_t msgrcv(int, void *, size_t, long int, int); +int msgsnd(int, const void *, size_t, int); + +/* MACROS */ + +#endif /* __SYS_SOCKET_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/resource.h b/rossubsys/posix/include/sys/resource.h new file mode 100644 index 00000000000..43c7c975492 --- /dev/null +++ b/rossubsys/posix/include/sys/resource.h @@ -0,0 +1,49 @@ +/* $Id: resource.h,v 1.5 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/resource.h + * + * definitions for XSI resource operations. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_RESOURCE_H_INCLUDED__ +#define __SYS_RESOURCE_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +struct rusage +{ + struct timeval ru_utime; /* user time used */ + struct timeval ru_stime; /* system time used */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_RESOURCE_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/sem.h b/rossubsys/posix/include/sys/sem.h new file mode 100644 index 00000000000..e7dbcf06c67 --- /dev/null +++ b/rossubsys/posix/include/sys/sem.h @@ -0,0 +1,72 @@ +/* $Id: sem.h,v 1.5 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/sem.h + * + * semaphore facility. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_SEM_H_INCLUDED__ +#define __SYS_SEM_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission structure */ + unsigned short int sem_nsems; /* number of semaphores in set */ + time_t sem_otime; /* last semop time */ + time_t sem_ctime; /* last time changed by semctl() */ +}; + +struct sembuf +{ + unsigned short int sem_num; /* semaphore number */ + short int sem_op; /* semaphore operation */ + short int sem_flg; /* operation flags */ +}; + +/* CONSTANTS */ +/* Semaphore operation flags */ +#define SEM_UNDO (0x00001000) /* Set up adjust on exit entry */ + +/* Command definitions for the function semctl() */ +#define GETNCNT (1) /* Get semncnt */ +#define GETPID (2) /* Get sempid */ +#define GETVAL (3) /* Get semval */ +#define GETALL (4) /* Get all cases of semval */ +#define GETZCNT (5) /* Get semzcnt */ +#define SETVAL (6) /* Set semval */ +#define SETALL (7) /* Set all cases of semval */ + +/* PROTOTYPES */ +int semctl(int, int, int, ...); +int semget(key_t, int, int); +int semop(int, struct sembuf *, size_t); + +/* MACROS */ + +#endif /* __SYS_SEM_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/shm.h b/rossubsys/posix/include/sys/shm.h new file mode 100644 index 00000000000..90f97559c10 --- /dev/null +++ b/rossubsys/posix/include/sys/shm.h @@ -0,0 +1,64 @@ +/* $Id: shm.h,v 1.5 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/shm.h + * + * shared memory facility. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_SHM_H_INCLUDED__ +#define __SYS_SHM_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +typedef unsigned short shmatt_t; + +struct shmid_ds +{ + struct ipc_perm shm_perm; /* operation permission structure */ + size_t shm_segsz; /* size of segment in bytes */ + pid_t shm_lpid; /* process ID of last shared memory operation */ + pid_t shm_cpid; /* process ID of creator */ + shmatt_t shm_nattch; /* number of current attaches */ + time_t shm_atime; /* time of last shmat() */ + time_t shm_dtime; /* time of last shmdt() */ + time_t shm_ctime; /* time of last change by shmctl() */ +}; + +/* CONSTANTS */ +#define SHM_RDONLY (0x00000200) /* Attach read-only (else read-write). */ +#define SHM_RND (0x00000400) /* Round attach address to SHMLBA. */ + +#define SHMLBA (4096) /* Segment low boundary address multiple. */ + +/* PROTOTYPES */ +void *shmat(int, const void *, int); +int shmctl(int, int, struct shmid_ds *); +int shmdt(const void *); +int shmget(key_t, size_t, int); + +/* MACROS */ + +#endif /* __SYS_SHM_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/socket.h b/rossubsys/posix/include/sys/socket.h new file mode 100644 index 00000000000..193a76a07bd --- /dev/null +++ b/rossubsys/posix/include/sys/socket.h @@ -0,0 +1,43 @@ +/* $Id: socket.h,v 1.4 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/socket.h + * + * Internet Protocol family. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_SOCKET_H_INCLUDED__ +#define __SYS_SOCKET_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_SOCKET_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/stat.h b/rossubsys/posix/include/sys/stat.h new file mode 100644 index 00000000000..a033f6d6797 --- /dev/null +++ b/rossubsys/posix/include/sys/stat.h @@ -0,0 +1,124 @@ +/* $Id: stat.h,v 1.5 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/stat.h + * + * data returned by the stat() function. Conforming to the Single + * UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_STAT_H_INCLUDED__ +#define __SYS_STAT_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +struct stat +{ + mode_t st_mode; /* mode of file (see below) */ + ino_t st_ino; /* file serial number */ + dev_t st_dev; /* ID of device containing file */ + nlink_t st_nlink; /* number of links to the file */ + uid_t st_uid; /* user ID of file */ + gid_t st_gid; /* group ID of file */ + off_t st_size; /* file size in bytes (if file is a regular file) */ + time_t st_atime; /* time of last access */ + time_t st_mtime; /* time of last data modification */ + time_t st_ctime; /* time of last status change */ + dev_t st_rdev; /* device ID (if file is character or block special) */ + blksize_t st_blksize; /* a filesystem-specific preferred I/O block size for + this object. In some filesystem types, this may + vary from file to file */ + blkcnt_t st_blocks; /* number of blocks allocated for this object */ +}; + +/* CONSTANTS */ +/* + file type + */ +#define S_IFIFO (000010000) /* FIFO special */ +#define S_IFCHR (000020000) /* character special */ +#define S_IFDIR (000040000) /* directory */ +#define S_IFBLK (000060000) /* block special */ +#define S_IFREG (000100000) /* regular */ +#define S_IFLNK (000200000) /* symbolic link */ +#define S_IFSOCK (000400000) /* socket */ + +/* type of file */ +#define S_IFMT (000770000) + +/* + file mode bits + */ +#define S_IRUSR (000000400) /* read permission, owner */ +#define S_IWUSR (000000200) /* write permission, owner */ +#define S_IXUSR (000000100) /* execute/search permission, owner */ +#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) /* read, write, execute/search by owner */ + +#define S_IRGRP (000000040) /* read permission, group */ +#define S_IWGRP (000000020) /* write permission, group */ +#define S_IXGRP (000000010) /* execute/search permission, group */ +#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) /* read, write, execute/search by group */ + +#define S_IROTH (000000004) /* read permission, others */ +#define S_IWOTH (000000002) /* write permission, others */ +#define S_IXOTH (000000001) /* execute/search permission, others */ +#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) /* read, write, execute/search by others */ + +#define S_ISUID (000004000) /* set-user-ID on execution */ +#define S_ISGID (000002000) /* set-group-ID on execution */ + +#define S_ISVTX (000010000) /* on directories, restricted deletion flag */ + +/* + the following macros will test whether a file is of the specified type + */ +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) +#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) + +/* shared memory, semaphores and message queues are unlikely to be ever + implemented as files */ +#define S_TYPEISMQ(buf) (0) /* Test for a message queue */ +#define S_TYPEISSEM(buf) (0) /* Test for a semaphore */ +#define S_TYPEISSHM(buf) (0) /* Test for a shared memory object */ + +/* PROTOTYPES */ +int chmod(const char *, mode_t); +int fchmod(int, mode_t); +int fstat(int, struct stat *); +int lstat(const char *, struct stat *); +int mkdir(const char *, mode_t); +int mkfifo(const char *, mode_t); +int mknod(const char *, mode_t, dev_t); +int stat(const char *, struct stat *); +mode_t umask(mode_t); + +/* MACROS */ + +#endif /* __SYS_STAT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/statvfs.h b/rossubsys/posix/include/sys/statvfs.h new file mode 100644 index 00000000000..7811325a7ce --- /dev/null +++ b/rossubsys/posix/include/sys/statvfs.h @@ -0,0 +1,43 @@ +/* $Id: statvfs.h,v 1.4 2002/10/29 04:45:21 rex Exp $ + */ +/* + * sys/statvfs.h + * + * VFS Filesystem information structure. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_STATVFS_H_INCLUDED__ +#define __SYS_STATVFS_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_STATVFS_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/time.h b/rossubsys/posix/include/sys/time.h new file mode 100644 index 00000000000..6949c2699ed --- /dev/null +++ b/rossubsys/posix/include/sys/time.h @@ -0,0 +1,48 @@ +/* $Id: time.h,v 1.5 2002/10/29 04:45:22 rex Exp $ + */ +/* + * sys/time.h + * + * time types. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_TIME_H_INCLUDED__ +#define __SYS_TIME_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct timeval +{ + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_TIME_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/timeb.h b/rossubsys/posix/include/sys/timeb.h new file mode 100644 index 00000000000..4f1a4a5675b --- /dev/null +++ b/rossubsys/posix/include/sys/timeb.h @@ -0,0 +1,43 @@ +/* $Id: timeb.h,v 1.4 2002/10/29 04:45:22 rex Exp $ + */ +/* + * sys/timeb.h + * + * additional definitions for date and time. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_TIMEB_H_INCLUDED__ +#define __SYS_TIMEB_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_TIMEB_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/times.h b/rossubsys/posix/include/sys/times.h new file mode 100644 index 00000000000..cffb8ce19b2 --- /dev/null +++ b/rossubsys/posix/include/sys/times.h @@ -0,0 +1,43 @@ +/* $Id: times.h,v 1.4 2002/10/29 04:45:22 rex Exp $ + */ +/* + * sys/times.h + * + * file access and modification times structure. Conforming to the Single + * UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_TIMES_H_INCLUDED__ +#define __SYS_TIMES_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_TIMES_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/types.h b/rossubsys/posix/include/sys/types.h new file mode 100644 index 00000000000..10bd5d37cc8 --- /dev/null +++ b/rossubsys/posix/include/sys/types.h @@ -0,0 +1,100 @@ +/* $Id: types.h,v 1.6 2002/10/29 04:45:22 rex Exp $ + */ +/* + * sys/types.h + * + * data types. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_TYPES_H_INCLUDED__ +#define __SYS_TYPES_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +/* FIXME: all these types need to be checked */ +typedef unsigned long int blkcnt_t; /* Used for file block counts */ +typedef unsigned long int blksize_t; /* Used for block sizes */ +typedef long long clock_t; /* Used for system times in clock ticks or CLOCKS_PER_SEC */ +typedef int clockid_t; /* Used for clock ID type in the clock and timer functions. */ +typedef unsigned long int dev_t; /* Used for device IDs. */ +typedef unsigned long int fsblkcnt_t; /* Used for file system block counts */ +typedef unsigned long int fsfilcnt_t; /* Used for file system file counts */ +typedef unsigned long int gid_t; /* Used for group IDs. */ +typedef int id_t; /* Used as a general identifier; can be used to contain at least a + pid_t, uid_t or a gid_t. */ +typedef unsigned long int ino_t; /* Used for file serial numbers. */ +typedef int key_t; /* Used for interprocess communication. */ +typedef unsigned long int mode_t; /* Used for some file attributes. */ +typedef unsigned long int nlink_t; /* Used for link counts. */ +typedef long off_t; /* Used for file sizes. */ +typedef long int pid_t; /* Used for process IDs and process group IDs. */ + +/* pthread types */ +typedef void * pthread_cond_t; /* Used for condition variables. */ +typedef void * pthread_condattr_t; /* Used to identify a condition attribute object. */ +typedef void * pthread_key_t; /* Used for thread-specific data keys. */ +typedef void * pthread_attr_t; /* Used to identify a thread attribute object. */ + +typedef void * pthread_mutex_t; +typedef void * pthread_mutexattr_t; + +typedef void * pthread_once_t; /* Used for dynamic package initialisation. */ +typedef void * pthread_rwlock_t; /* Used for read-write locks. */ +typedef void * pthread_rwlockattr_t; /* Used for read-write lock attributes. */ +typedef unsigned long int pthread_t; /* Used to identify a thread. */ + +typedef unsigned int size_t; /* Used for sizes of objects. */ +typedef signed int ssize_t; /* Used for a count of bytes or an error indication. */ +typedef long long suseconds_t; /* Used for time in microseconds */ +typedef long int time_t; /* Used for time in seconds. */ +typedef void * timer_t; /* Used for timer ID returned by timer_create(). */ +typedef int uid_t; /* Used for user IDs. */ +typedef unsigned long long useconds_t; /* Used for time in microseconds. */ + +/* + additional types for sockets and streams - for compatibility with Microsoft POSIX + */ +typedef unsigned char u_char; +typedef unsigned short int u_short; +typedef unsigned short int ushort; +typedef unsigned int u_int; +typedef unsigned long int u_long; + +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned char unchar; + +typedef char *caddr_t; + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ +/* for compatibility with Microsoft POSIX */ +#define _CRTAPI1 __cdecl +#define _CRTAPI2 __cdecl + +#endif /* __SYS_TYPES_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/uio.h b/rossubsys/posix/include/sys/uio.h new file mode 100644 index 00000000000..672e60b9dba --- /dev/null +++ b/rossubsys/posix/include/sys/uio.h @@ -0,0 +1,43 @@ +/* $Id: uio.h,v 1.4 2002/10/29 04:45:23 rex Exp $ + */ +/* + * sys/uio.h + * + * definitions for vector I/O operations. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_UIO_H_INCLUDED__ +#define __SYS_UIO_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_UIO_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/un.h b/rossubsys/posix/include/sys/un.h new file mode 100644 index 00000000000..776a619659d --- /dev/null +++ b/rossubsys/posix/include/sys/un.h @@ -0,0 +1,43 @@ +/* $Id: un.h,v 1.4 2002/10/29 04:45:23 rex Exp $ + */ +/* + * sys/un.h + * + * declarations for definitions for UNIX-domain sockets. Conforming to the + * Single UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_UN_H_INCLUDED__ +#define __SYS_UN_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __SYS_UN_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/utsname.h b/rossubsys/posix/include/sys/utsname.h new file mode 100644 index 00000000000..67413d02720 --- /dev/null +++ b/rossubsys/posix/include/sys/utsname.h @@ -0,0 +1,54 @@ +/* $Id: utsname.h,v 1.4 2002/10/29 04:45:23 rex Exp $ + */ +/* + * sys/utsname.h + * + * system name structure. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_UTSNAME_H_INCLUDED__ +#define __SYS_UTSNAME_H_INCLUDED__ + +/* INCLUDES */ + +/* OBJECTS */ + +/* TYPES */ +struct utsname +{ + char sysname[255]; /* name of this implementation of the operating system */ + char nodename[255]; /* name of this node within an implementation-dependent + communications network */ + char release[255]; /* current release level of this implementation */ + char version[255]; /* current version level of this release */ + char machine[255]; /* name of the hardware type on which the system is + running */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int uname(struct utsname *); + +/* MACROS */ + +#endif /* __SYS_UTSNAME_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/sys/wait.h b/rossubsys/posix/include/sys/wait.h new file mode 100644 index 00000000000..3e1750ccd01 --- /dev/null +++ b/rossubsys/posix/include/sys/wait.h @@ -0,0 +1,71 @@ +/* $Id: wait.h,v 1.5 2002/10/29 04:45:23 rex Exp $ + */ +/* + * sys/wait.h + * + * declarations for waiting. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __SYS_WAIT_H_INCLUDED__ +#define __SYS_WAIT_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef enum __tagidtype_t +{ + P_ALL, + P_PID, + P_PGID +} idtype_t; + +/* CONSTANTS */ +/* Possible values for the options argument to waitid() */ +#define WEXITED (0x00000001) /* Wait for processes that have exited */ +#define WSTOPPED (0x00000002) /* Status will be returned for any child that has stopped upon receipt of a signal */ +#define WNOWAIT (0x00000004) /* Keep the process whose status is returned in infop in a waitable state */ + +#define WCONTINUED (0x00000008) /* Status will be returned for any child that was stopped and has been continued */ +#define WNOHANG (0x00000010) /* Return immediately if there are no children to wait for */ +#define WUNTRACED (0x00000020) /* Report status of stopped child process */ + +/* PROTOTYPES */ +pid_t wait(int *); +pid_t wait3(int *, int, struct rusage *); +int waitid(idtype_t, id_t, siginfo_t *, int); +pid_t waitpid(pid_t, int *, int); + +/* MACROS */ +/* Macros for analysis of process status values */ +#define WEXITSTATUS(__STATUS__) (1) /* Return exit status */ +#define WIFCONTINUED(__STATUS__) (1) /* True if child has been continued */ +#define WIFEXITED(__STATUS__) (1) /* True if child exited normally */ +#define WIFSIGNALED(__STATUS__) (1) /* True if child exited due to uncaught signal */ +#define WIFSTOPPED(__STATUS__) (1) /* True if child is currently stopped */ +#define WSTOPSIG(__STATUS__) (1) /* Return signal number that caused process to stop */ +#define WTERMSIG(__STATUS__) (1) /* Return signal number that caused process to terminate */ + +#endif /* __SYS_WAIT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/time.h b/rossubsys/posix/include/time.h new file mode 100644 index 00000000000..e428378c18f --- /dev/null +++ b/rossubsys/posix/include/time.h @@ -0,0 +1,114 @@ +/* $Id: time.h,v 1.5 2002/10/29 04:45:25 rex Exp $ + */ +/* + * time.h + * + * time types. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __TIME_H_INCLUDED__ +#define __TIME_H_INCLUDED__ + +/* INCLUDES */ +#include +#include + +/* OBJECTS */ +/* extern static int getdate_err; */ /* FIXME */ +extern int daylight; +extern long int timezone; +extern char *tzname[]; + +/* TYPES */ +/* pre-declaration of signal.h types to suppress warnings caused by circular + dependencies */ +struct sigevent; + +struct tm +{ + int tm_sec; /* seconds [0,61] */ + int tm_min; /* minutes [0,59] */ + int tm_hour; /* hour [0,23] */ + int tm_mday; /* day of month [1,31] */ + int tm_mon; /* month of year [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* day of week [0,6] (Sunday = 0) */ + int tm_yday; /* day of year [0,365] */ + int tm_isdst; /* daylight savings flag */ +}; + +struct timespec +{ + time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; + +struct itimerspec +{ + struct timespec it_interval; /* timer period */ + struct timespec it_value; /* timer expiration */ +}; + +/* CONSTANTS */ +/* FIXME: all the constants are wrong */ +/* Number of clock ticks per second returned by the times() function (LEGACY). */ +#define CLK_TCK (1) +/* A number used to convert the value returned by the clock() function into + seconds. */ +#define CLOCKS_PER_SEC (1) +/* The identifier of the systemwide realtime clock. */ +#define CLOCK_REALTIME (0) +/* Flag indicating time is absolute with respect to the clock associated with a + timer. */ +#define TIMER_ABSTIME (1) + +/* PROTOTYPES */ +char *asctime(const struct tm *); +char *asctime_r(const struct tm *, char *); +clock_t clock(void); +int clock_getres(clockid_t, struct timespec *); +int clock_gettime(clockid_t, struct timespec *); +int clock_settime(clockid_t, const struct timespec *); +char *ctime(const time_t *); +char *ctime_r(const time_t *, char *); +double difftime(time_t, time_t); +struct tm *getdate(const char *); +struct tm *gmtime(const time_t *); +struct tm *gmtime_r(const time_t *, struct tm *); +struct tm *localtime(const time_t *); +struct tm *localtime_r(const time_t *, struct tm *); +time_t mktime(struct tm *); +int nanosleep(const struct timespec *, struct timespec *); +size_t strftime(char *, size_t, const char *, const struct tm *); +char *strptime(const char *, const char *, struct tm *); +time_t time(time_t *); +int timer_create(clockid_t, struct sigevent *, timer_t *); +int timer_delete(timer_t); +int timer_gettime(timer_t, struct itimerspec *); +int timer_getoverrun(timer_t); +int timer_settime(timer_t, int, const struct itimerspec *, + struct itimerspec *); +void tzset(void); + +/* MACROS */ + +#endif /* __TIME_H_INCLUDED__ */ /* replace with the appropriate tag */ + +/* EOF */ + diff --git a/rossubsys/posix/include/types.h b/rossubsys/posix/include/types.h new file mode 100644 index 00000000000..4379f3b830f --- /dev/null +++ b/rossubsys/posix/include/types.h @@ -0,0 +1,44 @@ +/* $Id: types.h,v 1.3 2002/10/29 04:45:25 rex Exp $ + */ +/* + * types.h + * + * dummy include file for Microsoft POSIX and Interix compatibility + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __TYPES_H_INCLUDED__ +#define __TYPES_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ + +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ + +#endif /* __TYPES_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/ucontext.h b/rossubsys/posix/include/ucontext.h new file mode 100644 index 00000000000..18340f88aaf --- /dev/null +++ b/rossubsys/posix/include/ucontext.h @@ -0,0 +1,62 @@ +/* $Id: ucontext.h,v 1.4 2002/10/29 04:45:25 rex Exp $ + */ +/* + * ucontext.h + * + * user context. Conforming to the Single UNIX(r) Specification Version 2, + * System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __UCONTEXT_H_INCLUDED__ +#define __UCONTEXT_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +typedef void * mcontext_t; + +typedef struct __tagucontext_t ucontext_t; + +struct __tagucontext_t +{ + ucontext_t *uc_link; /* pointer to the context that will be resumed + when this context returns */ + sigset_t uc_sigmask; /* the set of signals that are blocked when this + context is active */ + stack_t uc_stack; /* the stack used by this context */ + mcontext_t uc_mcontext; /* a machine-specific representation of the saved + context */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int getcontext(ucontext_t *); +int setcontext(const ucontext_t *); +void makecontext(ucontext_t *, (void *)(), int, ...); +int swapcontext(ucontext_t *, const ucontext_t *); + +/* MACROS */ + +#endif /* __UCONTEXT_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/unistd.h b/rossubsys/posix/include/unistd.h new file mode 100644 index 00000000000..6b8b786ee26 --- /dev/null +++ b/rossubsys/posix/include/unistd.h @@ -0,0 +1,508 @@ +/* $Id: unistd.h,v 1.5 2002/10/29 04:45:25 rex Exp $ + */ +/* + * unistd.h + * + * standard symbolic constants and types. Conforming to the Single UNIX(r) + * Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __UNISTD_H_INCLUDED__ +#define __UNISTD_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include + +/* OBJECTS */ +extern char *optarg; +extern int optind, opterr, optopt; + +/* TYPES */ + +/* CONSTANTS */ +/* FIXME: set these constants appropriately */ +/* Integer value indicating version of the ISOPOSIX-1 standard (C + language binding). */ +#define _POSIX_VERSION (0) + +/* Integer value indicating version of the ISO POSIX-2 standard + (Commands). */ +#define _POSIX2_VERSION (0) + +/* Integer value indicating version of the ISO POSIX-2 standard (C + language binding). */ +#define _POSIX2_C_VERSION (0) + +/* Integer value indicating version of the X/Open Portability Guide to + which the implementation conforms. */ +#define _XOPEN_VERSION (500) + +/* The version of the XCU specification to which the implementation + conforms */ +/* TODO: set to an appropriate value when commands and utilities will + be available */ +#define _XOPEN_XCU_VERSION (-1) + +#if _XOPEN_XCU_VERSION != -1 +#error TODO: define these constants +#define _POSIX2_C_BIND +#define _POSIX2_C_VERSION +#define _POSIX2_CHAR_TERM +#define _POSIX2_LOCALEDEF +#define _POSIX2_UPE +#define _POSIX2_VERSION +#endif + +#if 0 +/* TODO: check for conformance to the following specs */ +#define _XOPEN_XPG2 +#define _XOPEN_XPG3 +#define _XOPEN_XPG4 +#define _XOPEN_UNIX +#endif + +#if 0 +/* TODO: don't forget these features */ +/* The use of chown() is restricted to a process with appropriate + privileges, and to changing the group ID of a file only to the + effective group ID of the process or to one of its supplementary + group IDs. */ +#define _POSIX_CHOWN_RESTRICTED + +/* Terminal special characters defined in can be disabled + using this character value. */ +#define _POSIX_VDISABLE + +/* Each process has a saved set-user-ID and a saved set-group-ID. */ +#define _POSIX_SAVED_IDS + +/* Implementation supports job control. */ +#define _POSIX_JOB_CONTROL + +#endif + +/* Pathname components longer than {NAME_MAX} generate an error. */ +#define _POSIX_NO_TRUNC (1) + +/* The implementation supports the threads option. */ +#define _POSIX_THREADS (1) + +/* FIXME: none of the following is strictly true yet */ +/* The implementation supports the thread stack address attribute + option. */ /* FIXME: not currently implemented. Should be trivial */ +#define _POSIX_THREAD_ATTR_STACKADDR (1) + +/* The implementation supports the thread stack size attribute + option. */ /* FIXME: not currently implemented. Should be trivial */ +#define _POSIX_THREAD_ATTR_STACKSIZE (1) + +/* The implementation supports the process-shared synchronisation + option. */ /* FIXME? not sure */ +#define _POSIX_THREAD_PROCESS_SHARED (1) + +/* The implementation supports the thread-safe functions option. */ +/* FIXME: fix errno (currently not thread-safe) */ +#define _POSIX_THREAD_SAFE_FUNCTIONS (1) + +/* + Constants for Options and Feature Groups + */ + +/* Implementation supports the C Language Binding option. This will + always have a value other than -1. */ +#define _POSIX2_C_BIND (1) + +/* Implementation supports the C Language Development Utilities + option. */ /* FIXME: please change this when C compiler and + utilities are ported */ +#define _POSIX2_C_DEV (-1) + +/* Implementation supports at least one terminal type. */ /* FIXME: + please change this when terminal emulation is complete */ +#define _POSIX2_CHAR_TERM (-1) + +/* Implementation supports the FORTRAN Development Utilities option. */ +/* FIXME: please change this when Fortran compiler and utilities are + ported */ +#define _POSIX2_FORT_DEV (-1) + +/* Implementation supports the FORTRAN Run-time Utilities option. */ +/* FIXME: please change this when Fortran runtimes are ported */ +#define _POSIX2_FORT_RUN (-1) + +/* Implementation supports the creation of locales by the localedef + utility. */ /* FIXME: please change this when locales are ready */ +#define _POSIX2_LOCALEDEF (-1) + +/* Implementation supports the Software Development Utilities option. */ +/* FIXME? */ +#define _POSIX2_SW_DEV (-1) + +/* The implementation supports the User Portability Utilities option. */ +/* FIXME? */ +#define _POSIX2_UPE (-1) + +/* The implementation supports the X/Open Encryption Feature Group. */ +/* FIXME: please change this when encryption is ready */ +#define _XOPEN_CRYPT (-1) + +/* The implementation supports the Issue 4, Version 2 Enhanced + Internationalisation Feature Group. This is always set to a value + other than -1. */ /* TODO: high priority. Support for this feature is + needed for a conforming implementation */ +#define _XOPEN_ENH_I18N (-1) + +/* The implementation supports the Legacy Feature Group. */ +#define _XOPEN_LEGACY (1) + +/* The implementation supports the X/Open Realtime Feature Group. */ +/* FIXME? unlikely to be ever supported */ +#define _XOPEN_REALTIME (-1) + +/* The implementation supports the X/Open Realtime Threads Feature + Group. */ /* FIXME? really unlikely to be ever supported */ +#define _XOPEN_REALTIME_THREADS (-1) + +/* The implementation supports the Issue 4, Version 2 Shared Memory + Feature Group. This is always set to a value other than -1. */ /* TODO: + high priority. Support for this feature is needed for a conforming + implementation */ +#define _XOPEN_SHM (-1) + +/* Implementation provides a C-language compilation environment with + 32-bit int, long, pointer and off_t types. */ +#define _XBS5_ILP32_OFF32 (1) + +/* Implementation provides a C-language compilation environment with + 32-bit int, long and pointer types and an off_t type using at + least 64 bits. */ /* FIXME? check the off_t type */ +#define _XBS5_ILP32_OFFBIG (1) + +/* Implementation provides a C-language compilation environment with + 32-bit int and 64-bit long, pointer and off_t types. */ /* FIXME: on + some architectures this may be true */ +#define _XBS5_LP64_OFF64 (-1) + +/* Implementation provides a C-language compilation environment with + an int type using at least 32 bits and long, pointer and off_t + types using at least 64 bits. */ /* FIXME: on some architectures + this may be true */ +#define _XBS5_LPBIG_OFFBIG (-1) + +/* Implementation supports the File Synchronisation option. */ +/* TODO: high priority. Implement this */ +#define _POSIX_FSYNC + +/* Implementation supports the Memory Mapped Files option. */ +/* TODO: high priority. Implement this */ +#define _POSIX_MAPPED_FILES + +/* Implementation supports the Memory Protection option. */ +/* TODO: high priority. Implement this */ +#define _POSIX_MEMORY_PROTECTION + +#if 0 +/* Implementation supports the Prioritized Input and Output option. */ +/* FIXME? unlikely to be ever supported */ +#define _POSIX_PRIORITIZED_IO +#endif + +/* FIXME: these should be implemented */ +/* Asynchronous input or output operations may be performed for the + associated file. */ +#define _POSIX_ASYNC_IO (-1) + +/* Prioritized input or output operations may be performed for the + associated file. */ +#define _POSIX_PRIO_IO (-1) + +/* Synchronised input or output operations may be performed for the + associated file. */ +#define _POSIX_SYNC_IO (-1) + +/* + null pointer + */ +#ifndef NULL +/* NULL seems to be defined pretty much everywhere - we prevent + redefinition */ +#define NULL ((void *)(0)) +#endif + +/* + constants for the access() function + */ + +#define R_OK (0x00000004) /* Test for read permission. */ +#define W_OK (0x00000002) /* Test for write permission. */ +#define X_OK (0x00000001) /* Test for execute (search) permission. */ +#define F_OK (0) /* Test for existence of file. */ + +/* + constants for the confstr() function + */ +#define _CS_PATH (1) +#define _CS_XBS5_ILP32_OFF32_CFLAGS (2) +#define _CS_XBS5_ILP32_OFF32_LDFLAGS (3) +#define _CS_XBS5_ILP32_OFF32_LIBS (4) +#define _CS_XBS5_ILP32_OFF32_LINTFLAGS (5) +#define _CS_XBS5_ILP32_OFFBIG_CFLAGS (6) +#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS (7) +#define _CS_XBS5_ILP32_OFFBIG_LIBS (8) +#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS (9) +#define _CS_XBS5_LP64_OFF64_CFLAGS (10) +#define _CS_XBS5_LP64_OFF64_LDFLAGS (11) +#define _CS_XBS5_LP64_OFF64_LIBS (12) +#define _CS_XBS5_LP64_OFF64_LINTFLAGS (13) +#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS (14) +#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS (15) +#define _CS_XBS5_LPBIG_OFFBIG_LIBS (16) +#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS (17) + +/* + constants for the lseek() and fcntl() functions + */ + +#define SEEK_SET (0) /* Set file offset to offset. */ +#define SEEK_CUR (1) /* Set file offset to current plus offset. */ +#define SEEK_END (2) /* Set file offset to EOF plus offset. */ + +/* + constants for pathconf() + */ +/* constants 1 to 9 are the same as in Microsoft POSIX */ +#define _PC_LINK_MAX ( 1) +#define _PC_MAX_CANON ( 2) +#define _PC_MAX_INPUT ( 3) +#define _PC_NAME_MAX ( 4) +#define _PC_PATH_MAX ( 5) +#define _PC_PIPE_BUF ( 6) +#define _PC_CHOWN_RESTRICTED ( 7) +#define _PC_NO_TRUNC ( 8) +#define _PC_VDISABLE ( 9) +/* from this point, constants are in no particular order */ +#define _PC_ALLOC_SIZE_MIN ( 10) +#define _PC_ASYNC_IO ( 11) +#define _PC_FILESIZEBITS ( 12) +#define _PC_PRIO_IO ( 13) +#define _PC_REC_INCR_XFER_SIZE ( 14) +#define _PC_REC_MAX_XFER_SIZE ( 15) +#define _PC_REC_MIN_XFER_SIZE ( 16) +#define _PC_REC_XFER_ALIGN ( 17) +#define _PC_SYNC_IO ( 18) + +/* + constants for sysconf() + */ +/* constants 1 to 10 are the same as in Microsoft POSIX */ +#define _SC_ARG_MAX ( 1) +#define _SC_CHILD_MAX ( 2) +#define _SC_CLK_TCK ( 3) +#define _SC_NGROUPS_MAX ( 4) +#define _SC_OPEN_MAX ( 5) +#define _SC_JOB_CONTROL ( 6) +#define _SC_SAVED_IDS ( 7) +#define _SC_STREAM_MAX ( 8) +#define _SC_TZNAME_MAX ( 9) +#define _SC_VERSION ( 10) +/* from this point, constants are in no particular order */ +#define _SC_2_C_BIND ( 11) +#define _SC_2_C_DEV ( 12) +#define _SC_2_C_VERSION ( 13) +#define _SC_2_FORT_DEV ( 14) +#define _SC_2_FORT_RUN ( 15) +#define _SC_2_LOCALEDEF ( 16) +#define _SC_2_SW_DEV ( 17) +#define _SC_2_UPE ( 18) +#define _SC_2_VERSION ( 19) +#define _SC_AIO_LISTIO_MAX ( 20) +#define _SC_AIO_MAX ( 21) +#define _SC_AIO_PRIO_DELTA_MAX ( 22) +#define _SC_ASYNCHRONOUS_IO ( 23) +#define _SC_ATEXIT_MAX ( 24) +#define _SC_BC_BASE_MAX ( 25) +#define _SC_BC_DIM_MAX ( 26) +#define _SC_BC_SCALE_MAX ( 27) +#define _SC_BC_STRING_MAX ( 28) +#define _SC_COLL_WEIGHTS_MAX ( 29) +#define _SC_DELAYTIMER_MAX ( 30) +#define _SC_EXPR_NEST_MAX ( 31) +#define _SC_FSYNC ( 32) +#define _SC_GETGR_R_SIZE_MAX ( 33) +#define _SC_GETPW_R_SIZE_MAX ( 34) +#define _SC_IOV_MAX ( 35) +#define _SC_LINE_MAX ( 36) +#define _SC_LOGIN_NAME_MAX ( 37) +#define _SC_MAPPED_FILES ( 38) +#define _SC_MEMLOCK ( 39) +#define _SC_MEMLOCK_RANGE ( 40) +#define _SC_MEMORY_PROTECTION ( 41) +#define _SC_MESSAGE_PASSING ( 42) +#define _SC_MQ_OPEN_MAX ( 43) +#define _SC_MQ_PRIO_MAX ( 44) +#define _SC_PAGE_SIZE ( 45) +#define _SC_PASS_MAX ( 46) /* LEGACY */ +#define _SC_PRIORITIZED_IO ( 47) +#define _SC_PRIORITY_SCHEDULING ( 48) +#define _SC_RE_DUP_MAX ( 49) +#define _SC_REALTIME_SIGNALS ( 50) +#define _SC_RTSIG_MAX ( 51) +#define _SC_SEMAPHORES ( 52) +#define _SC_SEM_NSEMS_MAX ( 53) +#define _SC_SEM_VALUE_MAX ( 54) +#define _SC_SHARED_MEMORY_OBJECTS ( 55) +#define _SC_SIGQUEUE_MAX ( 56) +#define _SC_SYNCHRONIZED_IO ( 57) +#define _SC_THREADS ( 58) +#define _SC_THREAD_ATTR_STACKADDR ( 59) +#define _SC_THREAD_ATTR_STACKSIZE ( 60) +#define _SC_THREAD_DESTRUCTOR_ITERATIONS ( 61) +#define _SC_THREAD_KEYS_MAX ( 62) +#define _SC_THREAD_PRIORITY_SCHEDULING ( 63) +#define _SC_THREAD_PRIO_INHERIT ( 64) +#define _SC_THREAD_PRIO_PROTECT ( 65) +#define _SC_THREAD_PROCESS_SHARED ( 66) +#define _SC_THREAD_SAFE_FUNCTIONS ( 67) +#define _SC_THREAD_STACK_MIN ( 68) +#define _SC_THREAD_THREADS_MAX ( 69) +#define _SC_TIMERS ( 70) +#define _SC_TIMER_MAX ( 71) +#define _SC_TTY_NAME_MAX ( 72) +#define _SC_XOPEN_VERSION ( 73) +#define _SC_XOPEN_CRYPT ( 74) +#define _SC_XOPEN_ENH_I18N ( 75) +#define _SC_XOPEN_SHM ( 76) +#define _SC_XOPEN_UNIX ( 77) +#define _SC_XOPEN_XCU_VERSION ( 78) +#define _SC_XOPEN_LEGACY ( 79) +#define _SC_XOPEN_REALTIME ( 80) +#define _SC_XOPEN_REALTIME_THREADS ( 81) +#define _SC_XBS5_ILP32_OFF32 ( 82) +#define _SC_XBS5_ILP32_OFFBIG ( 83) +#define _SC_XBS5_LP64_OFF64 ( 84) +#define _SC_XBS5_LPBIG_OFFBIG ( 85) + + +#define _SC_PAGESIZE _SC_PAGE_SIZE + +/* possible values for the function argument to the lockf() function */ +#define F_LOCK (1) /* Lock a section for exclusive use. */ +#define F_ULOCK (2) /* Unlock locked sections. */ +#define F_TEST (3) /* Test section for locks by other processes. */ +#define F_TLOCK (4) /* Test and lock a section for exclusive use. */ + +#define STDIN_FILENO (0) /* File number of stdin. */ +#define STDOUT_FILENO (1) /* File number of stdout. */ +#define STDERR_FILENO (2) /* File number of stderr. */ + +/* PROTOTYPES */ +int access(const char *, int); +unsigned int alarm(unsigned int); +int brk(void *); +int chdir(const char *); +int chroot(const char *); /* LEGACY */ +int chown(const char *, uid_t, gid_t); +int close(int); +size_t confstr(int, char *, size_t); +char *crypt(const char *, const char *); +char *ctermid(char *); +char *cuserid(char *s); /* LEGACY */ +int dup(int); +int dup2(int, int); +void encrypt(char[64], int); +int execl(const char *, const char *, ...); +int execle(const char *, const char *, ...); +int execlp(const char *, const char *, ...); +int execv(const char *, char *const []); +int execve(const char *, char *const [], char *const []); +int execvp(const char *, char *const []); +void _exit(int); +int fchown(int, uid_t, gid_t); +int fchdir(int); +int fdatasync(int); +pid_t fork(void); +long int fpathconf(int, int); +int fsync(int); +int ftruncate(int, off_t); +char *getcwd(char *, size_t); +int getdtablesize(void); /* LEGACY */ +gid_t getegid(void); +uid_t geteuid(void); +gid_t getgid(void); +int getgroups(int, gid_t []); +long gethostid(void); +char *getlogin(void); +int getlogin_r(char *, size_t); +int getopt(int, char * const [], const char *); +int getpagesize(void); /* LEGACY */ +char *getpass(const char *); /* LEGACY */ +pid_t getpgid(pid_t); +pid_t getpgrp(void); +pid_t getpid(void); +pid_t getppid(void); +pid_t getsid(pid_t); +uid_t getuid(void); +char *getwd(char *); +int isatty(int); +int lchown(const char *, uid_t, gid_t); +int link(const char *, const char *); +int lockf(int, int, off_t); +off_t lseek(int, off_t, int); +int nice(int); +long int pathconf(const char *, int); +int pause(void); +int pipe(int [2]); +ssize_t pread(int, void *, size_t, off_t); +int pthread_atfork(void (*)(void), void (*)(void), + void(*)(void)); +ssize_t pwrite(int, const void *, size_t, off_t); +ssize_t read(int, void *, size_t); +int readlink(const char *, char *, size_t); +int rmdir(const char *); +void *sbrk(intptr_t); +int setgid(gid_t); +int setpgid(pid_t, pid_t); +pid_t setpgrp(void); +int setregid(gid_t, gid_t); +int setreuid(uid_t, uid_t); +pid_t setsid(void); +int setuid(uid_t); +unsigned int sleep(unsigned int); +void swab(const void *, void *, ssize_t); +int symlink(const char *, const char *); +void sync(void); +long int sysconf(int); +pid_t tcgetpgrp(int); +int tcsetpgrp(int, pid_t); +int truncate(const char *, off_t); +char *ttyname(int); +int ttyname_r(int, char *, size_t); +useconds_t ualarm(useconds_t, useconds_t); +int unlink(const char *); +int usleep(useconds_t); +pid_t vfork(void); +ssize_t write(int, const void *, size_t); + +/* MACROS */ + +#endif /* __UNISTD_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/utime.h b/rossubsys/posix/include/utime.h new file mode 100644 index 00000000000..c78ab039631 --- /dev/null +++ b/rossubsys/posix/include/utime.h @@ -0,0 +1,50 @@ +/* $Id: utime.h,v 1.4 2002/10/29 04:45:26 rex Exp $ + */ +/* + * utime.h + * + * access and modification times structure. Conforming to the Single + * UNIX(r) Specification Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __UTIME_H_INCLUDED__ +#define __UTIME_H_INCLUDED__ + +/* INCLUDES */ +#include + +/* OBJECTS */ + +/* TYPES */ +struct utimbuf +{ + time_t actime; /* access time */ + time_t modtime; /* modification time */ +}; + +/* CONSTANTS */ + +/* PROTOTYPES */ +int utime(const char *, const struct utimbuf *); + +/* MACROS */ + +#endif /* __UTIME_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/include/wchar.h b/rossubsys/posix/include/wchar.h new file mode 100644 index 00000000000..42269ada306 --- /dev/null +++ b/rossubsys/posix/include/wchar.h @@ -0,0 +1,139 @@ +/* $Id: wchar.h,v 1.4 2002/10/29 04:45:26 rex Exp $ + */ +/* + * wchar.h + * + * wide-character types. Conforming to the Single UNIX(r) Specification + * Version 2, System Interface & Headers Issue 5 + * + * This file is part of the ReactOS Operating System. + * + * Contributors: + * Created by KJK::Hyperion + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ +#ifndef __WCHAR_H_INCLUDED__ +#define __WCHAR_H_INCLUDED__ + +/* INCLUDES */ +#include +#include +#include +#include +#include +#include + +/* OBJECTS */ + +/* TYPES */ +typedef wchar_t wint_t; /* An integral type capable of storing any valid + value of wchar_t, or WEOF */ +typedef long int wctype_t; /* A scalar type of a data object that can hold + values which represent locale-specific + character classification. */ +typedef void * mbstate_t; /* An object type other than an array type that + can hold the conversion state information + necessary to convert between sequences of + (possibly multibyte) characters and + wide-characters */ + +/* CONSTANTS */ + +/* PROTOTYPES */ +wint_t btowc(int); +int fwprintf(FILE *, const wchar_t *, ...); +int fwscanf(FILE *, const wchar_t *, ...); +int iswalnum(wint_t); +int iswalpha(wint_t); +int iswcntrl(wint_t); +int iswdigit(wint_t); +int iswgraph(wint_t); +int iswlower(wint_t); +int iswprint(wint_t); +int iswpunct(wint_t); +int iswspace(wint_t); +int iswupper(wint_t); +int iswxdigit(wint_t); +int iswctype(wint_t, wctype_t); +wint_t fgetwc(FILE *); +wchar_t *fgetws(wchar_t *, int, FILE *); +wint_t fputwc(wchar_t, FILE *); +int fputws(const wchar_t *, FILE *); +int fwide(FILE *, int); +wint_t getwc(FILE *); +wint_t getwchar(void); +int mbsinit(const mbstate_t *); +size_t mbrlen(const char *, size_t, mbstate_t *); +size_t mbrtowc(wchar_t *, const char *, size_t, + mbstate_t *); +size_t mbsrtowcs(wchar_t *, const char **, size_t, + mbstate_t *); +wint_t putwc(wchar_t, FILE *); +wint_t putwchar(wchar_t); +int swprintf(wchar_t *, size_t, const wchar_t *, ...); +int swscanf(const wchar_t *, const wchar_t *, ...); +wint_t towlower(wint_t); +wint_t towupper(wint_t); +wint_t ungetwc(wint_t, FILE *); +int vfwprintf(FILE *, const wchar_t *, va_list); +int vwprintf(const wchar_t *, va_list); +int vswprintf(wchar_t *, size_t, const wchar_t *, + va_list); +size_t wcrtomb(char *, wchar_t, mbstate_t *); +wchar_t *wcscat(wchar_t *, const wchar_t *); +wchar_t *wcschr(const wchar_t *, wchar_t); +int wcscmp(const wchar_t *, const wchar_t *); +int wcscoll(const wchar_t *, const wchar_t *); +wchar_t *wcscpy(wchar_t *, const wchar_t *); +size_t wcscspn(const wchar_t *, const wchar_t *); +size_t wcsftime(wchar_t *, size_t, const wchar_t *, + const struct tm *); +size_t wcslen(const wchar_t *); +wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t); +int wcsncmp(const wchar_t *, const wchar_t *, size_t); +wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t); +wchar_t *wcspbrk(const wchar_t *, const wchar_t *); +wchar_t *wcsrchr(const wchar_t *, wchar_t); +size_t wcsrtombs(char *, const wchar_t **, size_t, + mbstate_t *); +size_t wcsspn(const wchar_t *, const wchar_t *); +wchar_t *wcsstr(const wchar_t *, const wchar_t *); +double wcstod(const wchar_t *, wchar_t **); +wchar_t *wcstok(wchar_t *, const wchar_t *, wchar_t **); +long int wcstol(const wchar_t *, wchar_t **, int); +unsigned long int wcstoul(const wchar_t *, wchar_t **, int); +wchar_t *wcswcs(const wchar_t *, const wchar_t *); +int wcswidth(const wchar_t *, size_t); +size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); +int wctob(wint_t); +wctype_t wctype(const char *); +int wcwidth(wchar_t); +wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); +int wmemcmp(const wchar_t *, const wchar_t *, size_t); +wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t); +wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t); +wchar_t *wmemset(wchar_t *, wchar_t, size_t); +int wprintf(const wchar_t *, ...); +int wscanf(const wchar_t *, ...); + +/* MACROS */ +#define WCHAR_MAX (0xFFFF) +#define WCHAR_MIN (0x0000) + +/* FIXME? */ +#define WEOF (0xFFFF) + +#endif /* __WCHAR_H_INCLUDED__ */ + +/* EOF */ + diff --git a/rossubsys/posix/install.bat b/rossubsys/posix/install.bat new file mode 100644 index 00000000000..4380b9a2f24 --- /dev/null +++ b/rossubsys/posix/install.bat @@ -0,0 +1,22 @@ +@echo off +if "%1" == "" goto NoParameter +set ROS_INSTALL=%1 +goto Install +:NoParameter +set ROS_INSTALL=c:\reactos +:Install +echo Installing to %ROS_INSTALL% +@echo off + +md %ROS_INSTALL% +md %ROS_INSTALL%\bin +md %ROS_INSTALL%\symbols +md %ROS_INSTALL%\system32 + +copy ..\posix\apps\baresh\baresh.exe %ROS_INSTALL%\bin +copy ..\posix\apps\posixw32\posixw32.exe %ROS_INSTALL%\bin +copy ..\posix\server\psxss.exe %ROS_INSTALL%\system32 +copy ..\posix\lib\psxdll\psxdll.dll %ROS_INSTALL%\system32 +copy ..\posix\lib\psxdll\psxdll.map %ROS_INSTALL%\symbols +copy ..\posix\lib\psxx\psxx.dll %ROS_INSTALL%\system32 +copy ..\posix\lib\psxx\psxx.map %ROS_INSTALL%\symbols diff --git a/rossubsys/posix/lib/.cvsignore b/rossubsys/posix/lib/.cvsignore new file mode 100644 index 00000000000..7e878167e8e --- /dev/null +++ b/rossubsys/posix/lib/.cvsignore @@ -0,0 +1,5 @@ +*.o +*.d +*.exe +*.coff +*.sym diff --git a/rossubsys/posix/lib/crt0w32.c b/rossubsys/posix/lib/crt0w32.c new file mode 100644 index 00000000000..ffd3eb732be --- /dev/null +++ b/rossubsys/posix/lib/crt0w32.c @@ -0,0 +1,46 @@ +/* $Id: crt0w32.c,v 1.4 2002/10/29 04:45:26 rex Exp $ + * + * PROJECT : ReactOS / POSIX+ personality + * FILE : subsys/psx/lib/crt0w32.c + * DESCRIPTION: startup code for POSIX+ applications. + * DATE : 2002-01-18 + * AUTHOR : Emanuele Aliberti + */ + +extern void __stdcall __PdxInitializeData(int*,char***); +extern int main (int,char**,char**); +extern void exit(int); + +/* ANSI ENVIRONMENT */ + +char **_environ = (char**) 0; + +int errno = 0; + +#ifdef __SUBSYSTEM_WINDOWS__ +void WinMainCRTStartup (void) +#else +void mainCRTStartup (void) +#endif +{ + char * argv[2] = {"none", 0}; + + /* TODO: parse the command line */ + exit(main(1,argv,0)); +} + +void __main () +{ + /* + * Store in PSXDLL.DLL two well known global symbols + * references. + */ + __PdxInitializeData (& errno, & _environ); /* PSXDLL.__PdxInitializeData */ + /* CRT initialization. */ +#ifdef __SUBSYSTEM_WINDOWS__ + WinMainCRTStartup (); +#else + mainCRTStartup (); +#endif +} +/* EOF */ diff --git a/rossubsys/posix/lib/psxdll/.cvsignore b/rossubsys/posix/lib/psxdll/.cvsignore new file mode 100644 index 00000000000..541cdb996ea --- /dev/null +++ b/rossubsys/posix/lib/psxdll/.cvsignore @@ -0,0 +1,7 @@ +*.o +*.d +*.a +*.exe +*.dll +*.coff +*.sym diff --git a/rossubsys/posix/lib/psxdll/Makefile b/rossubsys/posix/lib/psxdll/Makefile new file mode 100644 index 00000000000..0dab020b7eb --- /dev/null +++ b/rossubsys/posix/lib/psxdll/Makefile @@ -0,0 +1,172 @@ +# $Id: Makefile,v 1.14 2003/01/05 18:27:19 robd Exp $ + +PATH_TO_TOP = ../../../reactos + +PATH_TO_PSX_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = psxdll + +TARGET_LIBPATH = $(PATH_TO_TOP)/dk/psx/lib + +TARGET_SDKLIBS = ntdll.a + +TARGET_BASE = 0x68EB0000 + +TARGET_ENTRY = _DllMain@12 + +TARGET_CFLAGS =\ + -Wall \ + -nostdinc \ + -nostdlib \ + -fno-builtin \ + -I$(PATH_TO_PSX_TOP)/include \ + -I$(PATH_TO_TOP)/include \ + -D__PSXDLL__ \ + -D__PSX_DEBUG_WANT_ALL__ + +TARGET_LFLAGS = -nostartfiles + +OBJECTS_MISC = \ + misc/main.o \ + misc/init.o \ + misc/heap.o \ + misc/interlock.o \ + misc/safeobj.o \ + misc/spawn.o \ + misc/path.o \ + misc/pdata.o \ + misc/fdtable.o \ + misc/tls.o + +OBJECTS_DIRENT = \ + dirent/opendir.o \ + dirent/readdir.o \ + dirent/closedir.o + +OBJECTS_DLFCN = \ + dlfcn/dlopen.o \ + dlfcn/dlclose.o \ + dlfcn/dlsym.o \ + dlfcn/dlerror.o + +OBJECTS_ERRNO = \ + errno/errno.o + +OBJECTS_FCNTL = \ + fcntl/open.o \ + fcntl/fcntl.o + +OBJECTS_LIBGEN = \ + libgen/basename.o + +OBJECTS_SCHED = \ + sched/yield.o + +OBJECTS_SIGNAL = \ + pthread/kill.o \ + signal/raise.o + +OBJECTS_STDLIB = \ + stdlib/abort.o \ + stdlib/malloc.o \ + stdlib/exit.o + +OBJECTS_STRING = \ + string/strdup.o \ + string/strerror.o + +OBJECTS_PTHREAD = \ + pthread/create.o \ + pthread/exit.o \ + pthread/join.o \ + pthread/mutex.o \ + pthread/self.o + +OBJECTS_SYS_STAT = \ + sys/stat/chmod.o \ + sys/stat/mkdir.o \ + sys/stat/mkfifo.o \ + sys/stat/mknod.o \ + sys/stat/stat.o \ + sys/stat/umask.o + +OBJECTS_SYS_UTSNAME = \ + sys/utsname/uname.o + +OBJECTS_UNISTD = \ + unistd/access.o \ + unistd/close.o \ + unistd/dup.o \ + unistd/fork.o \ + unistd/getcwd.o \ + unistd/getpid.o \ + unistd/getppid.o \ + unistd/read.o \ + unistd/sleep.o \ + unistd/write.o + +OBJECTS = \ + $(OBJECTS_MISC) \ + $(OBJECTS_DIRENT) \ + $(OBJECTS_DLFCN) \ + $(OBJECTS_ERRNO) \ + $(OBJECTS_FCNTL) \ + $(OBJECTS_LIBGEN) \ + $(OBJECTS_SCHED) \ + $(OBJECTS_SIGNAL) \ + $(OBJECTS_STDLIB) \ + $(OBJECTS_STRING) \ + $(OBJECTS_PTHREAD) \ + $(OBJECTS_SYS_STAT) \ + $(OBJECTS_SYS_UTSNAME) \ + $(OBJECTS_UNISTD) + +#TARGET_OBJECTS = $(TARGET_NAME).o + +TARGET_OBJECTS = \ + $(OBJECTS_MISC) \ + $(OBJECTS_DIRENT) \ + $(OBJECTS_DLFCN) \ + $(OBJECTS_ERRNO) \ + $(OBJECTS_FCNTL) \ + $(OBJECTS_LIBGEN) \ + $(OBJECTS_SCHED) \ + $(OBJECTS_SIGNAL) \ + $(OBJECTS_STDLIB) \ + $(OBJECTS_STRING) \ + $(OBJECTS_PTHREAD) \ + $(OBJECTS_SYS_STAT) \ + $(OBJECTS_SYS_UTSNAME) \ + $(OBJECTS_UNISTD) + +#TARGET_CLEAN = $(OBJECTS) csrapi.a + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + + +#DEP_OBJECTS = $(OBJECTS) + +#include $(TOOLS_PATH)/depend.mk + +#DTFLAGS = -k -l $@ + +#$(TARGET_NAME).a: $(TARGET_NAME).def +# $(DLLTOOL) \ +# $(DTFLAGS) \ +# -D $(TARGET_NAME).dll \ +# -d $(TARGET_NAME).def + +#csrapi.a: csrapi.def +# $(DLLTOOL) \ +# $(DTFLAGS) \ +# -D ntdll.dll \ +# -d csrapi.def + +#$(TARGET_NAME).o: csrapi.a $(OBJECTS) +# $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o + +# EOF diff --git a/rossubsys/posix/lib/psxdll/csrapi.def b/rossubsys/posix/lib/psxdll/csrapi.def new file mode 100644 index 00000000000..18c3a9783c0 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/csrapi.def @@ -0,0 +1,6 @@ +; $Id: csrapi.def,v 1.3 2002/10/29 04:45:26 rex Exp $ + +LIBRARY NTDLL.DLL +EXPORTS + +CsrClientCallServer@16 \ No newline at end of file diff --git a/rossubsys/posix/lib/psxdll/dirent/.cvsignore b/rossubsys/posix/lib/psxdll/dirent/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dirent/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/dirent/closedir.c b/rossubsys/posix/lib/psxdll/dirent/closedir.c new file mode 100644 index 00000000000..677c06638e2 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dirent/closedir.c @@ -0,0 +1,36 @@ +/* $Id: closedir.c,v 1.4 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dirent/closedir.c + * PURPOSE: Close a directory stream + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 01/02/2002: Created + * 13/02/2002: KJK::Hyperion: modified to use file descriptors + */ + +#include +#include +#include +#include +#include +#include + +int closedir(DIR *dirp) +{ + /* check the "magic" signature */ + if(!__safeobj_validate(dirp, __IDIR_MAGIC)) + { + errno = EBADF; + return (-1); + } + + /* this will close the handle, deallocate the internal object and + invalidate the descriptor */ + return (close(((struct __internal_DIR *)dirp)->fildes)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dirent/opendir.c b/rossubsys/posix/lib/psxdll/dirent/opendir.c new file mode 100644 index 00000000000..43efd4d23d8 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dirent/opendir.c @@ -0,0 +1,100 @@ +/* $Id: opendir.c,v 1.4 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dirent/opendir.c + * PURPOSE: Open a directory + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/01/2002: Created + * 13/02/2002: KJK::Hyperion: modified to use file descriptors + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +DIR *opendir(const char *dirname) +{ + ANSI_STRING strDirName; + UNICODE_STRING wstrDirName; + DIR *pdData; + + RtlInitAnsiString(&strDirName, (PCSZ)dirname); + RtlAnsiStringToUnicodeString(&wstrDirName, &strDirName, TRUE); + + pdData = (DIR *)_Wopendir(wstrDirName.Buffer); + + RtlFreeUnicodeString(&wstrDirName); + + return (pdData); + +} + +DIR *_Wopendir(const wchar_t *dirname) +{ + struct __internal_DIR *pidData; + int nFileNo; + + /* allocate internal object */ + pidData = __malloc(sizeof(*pidData)); + + /* allocation failed */ + if(pidData == 0) + { + errno = ENOMEM; + return (0); + } + + /* open the directory */ + nFileNo = _Wopen(dirname, O_RDONLY | _O_DIRFILE); + + /* failure */ + if(nFileNo < 0) + { + __free(pidData); + return (0); + } + + /* directory file descriptors must be closed on exec() */ + if(fcntl(nFileNo, F_SETFD, FD_CLOEXEC) == -1) + WARN + ( + "couldn't set FD_CLOEXEC flag on file number %u, errno %u", + nFileNo, + errno + ); + + /* associate the internal data to the file descriptor */ + if(fcntl(nFileNo, F_SETXP, pidData) == -1) + WARN + ( + "couldn't associate the object at 0x%X to the file number %u, errno %u", + pidData, + nFileNo, + errno + ); + + if(fcntl(nFileNo, F_SETXS, sizeof(*pidData)) == -1) + WARN + ( + "couldn't set the extra data size of the file number %u, errno %u", + nFileNo, + errno + ); + + pidData->signature = __IDIR_MAGIC; + + /* success */ + return ((DIR *)pidData); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dirent/readdir.c b/rossubsys/posix/lib/psxdll/dirent/readdir.c new file mode 100644 index 00000000000..0e120050e69 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dirent/readdir.c @@ -0,0 +1,209 @@ +/* $Id: readdir.c,v 1.7 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dirent/readdir.c + * PURPOSE: Read directory + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/01/2002: Created + * 13/02/2002: KJK::Hyperion: modified to use file descriptors + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct dirent *readdir(DIR *dirp) +{ + struct _Wdirent *lpwdReturn; + struct __internal_DIR *pidData; + ANSI_STRING strFileName; + UNICODE_STRING wstrFileName; + NTSTATUS nErrCode; + + /* call Unicode function */ + lpwdReturn = _Wreaddir(dirp); + + /* failure */ + if(lpwdReturn == 0) + return (0); + + /* get the internal data object */ + pidData = ((struct __internal_DIR *)dirp); + + /* create NT Unicode string from the Unicode dirent's buffer */ + RtlInitUnicodeString(&wstrFileName, pidData->ent.de_unicode.d_name); + + /* HACK: make the ANSI string point to the same buffer where the Unicode string is stored */ + strFileName.Buffer = (PCSZ)&pidData->info.FileName[0]; + strFileName.Length = 0; + strFileName.MaximumLength = MAX_PATH; + + /* convert the filename to ANSI */ + nErrCode = RtlUnicodeStringToAnsiString(&strFileName, &wstrFileName, FALSE); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + + /* make the ANSI dirent filename point to the ANSI buffer */ + pidData->ent.de_ansi.d_name = strFileName.Buffer; + + /* null-terminate the ANSI name */ + pidData->ent.de_ansi.d_name[strFileName.Length] = 0; + + /* success */ + return (&(pidData->ent.de_ansi)); +} + +int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) +{ + errno = ENOSYS; + return (0); +} + +struct _Wdirent *_Wreaddir(DIR *dirp) +{ + HANDLE hFile; + HANDLE hDir; + OBJECT_ATTRIBUTES oaFileAttribs; + UNICODE_STRING wstrFileName; + FILE_INTERNAL_INFORMATION fiiInfo; + IO_STATUS_BLOCK isbStatus; + NTSTATUS nErrCode; + struct __internal_DIR *pidData; + + /* check the "magic" signature */ + if(!__safeobj_validate(dirp, __IDIR_MAGIC)) + { + errno = EINVAL; + return (0); + } + + /* get internal data */ + pidData = (struct __internal_DIR *)dirp; + + /* get handle */ + hDir = (HANDLE)fcntl(pidData->fildes, F_GETFH); + + /* failure */ + if(((int)hDir) == -1) + return (0); + + /* read next directory entry */ + nErrCode = NtQueryDirectoryFile + ( + hDir, + NULL, + NULL, + NULL, + &isbStatus, + (PVOID)&pidData->info, + sizeof(pidData->info) + sizeof(WCHAR) * (MAX_PATH - 1), + FileDirectoryInformation, + TRUE, + NULL, + FALSE + ); + + /* failure or EOF */ + if(!NT_SUCCESS(nErrCode)) + { + if(nErrCode == (NTSTATUS)STATUS_NO_MORE_FILES) + return (0); + else + { + ERR("NtQueryDirectoryFile() failed with status 0x%08X", nErrCode); + errno = __status_to_errno(nErrCode); + return (0); + } + } + + /* null-terminate the filename, just in case */ + pidData->info.FileName[pidData->info.FileNameLength / sizeof(WCHAR)] = 0; + + INFO("this entry: %ls", pidData->info.FileName); + + /* file inodes are not returned by NtQueryDirectoryFile, we have to open every file */ + /* set file's object attributes */ + wstrFileName.Length = pidData->info.FileNameLength; + wstrFileName.MaximumLength = sizeof(WCHAR) * MAX_PATH; + wstrFileName.Buffer = &pidData->info.FileName[0]; + + oaFileAttribs.Length = sizeof(OBJECT_ATTRIBUTES); + oaFileAttribs.RootDirectory = hDir; + oaFileAttribs.ObjectName = &wstrFileName; + oaFileAttribs.Attributes = 0; + oaFileAttribs.SecurityDescriptor = NULL; + oaFileAttribs.SecurityQualityOfService = NULL; + + /* open the file */ + nErrCode = NtOpenFile + ( + &hFile, + FILE_READ_ATTRIBUTES | SYNCHRONIZE, + &oaFileAttribs, + &isbStatus, + 0, + FILE_SYNCHRONOUS_IO_NONALERT + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtOpenFile() failed with status %#X", nErrCode); + errno = __status_to_errno(nErrCode); + return (0); + } + + /* get the internal information for the file */ + nErrCode = NtQueryInformationFile + ( + hFile, + &isbStatus, + &fiiInfo, + sizeof(FILE_INTERNAL_INFORMATION), + FileInternalInformation + ); + + /* close the handle (not needed anymore) */ + NtClose(hFile); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtQueryInformationFile() failed with status %#X", nErrCode); + errno = __status_to_errno(nErrCode); + return (0); + } + + /* return file inode */ + pidData->ent.de_unicode.d_ino = (ino_t)fiiInfo.IndexNumber.QuadPart; + + /* return file name */ + pidData->ent.de_unicode.d_name = &pidData->info.FileName[0]; + + /* success */ + return &(pidData->ent.de_unicode); +} + +int _Wreaddir_r(DIR *dirp, struct _Wdirent *entry, struct _Wdirent **result) +{ + errno = ENOSYS; + return (0); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dlfcn/.cvsignore b/rossubsys/posix/lib/psxdll/dlfcn/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dlfcn/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/dlfcn/dlclose.c b/rossubsys/posix/lib/psxdll/dlfcn/dlclose.c new file mode 100644 index 00000000000..6fdad8ba35f --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dlfcn/dlclose.c @@ -0,0 +1,60 @@ +/* $Id: dlclose.c,v 1.4 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dlfcn/dlclose.c + * PURPOSE: Close a dlopen() object + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +int dlclose(void *handle) +{ + if(handle == 0) + { + ERR("invalid handle passed to dlclose"); + + __dl_set_last_error(EFAULT); /* FIXME? maybe EINVAL? */ + return (-1); + } + + if(((struct __dlobj *)handle)->global) + { + TODO("global symbol matching not implemented"); + + __dl_set_last_error(EINVAL); + return (-1); + } + else + { + NTSTATUS nErrCode = LdrUnloadDll(((struct __dlobj *)handle)->handle); + + if(!NT_SUCCESS(nErrCode)) + { + ERR("LdrUnloadDll(%#x) failed with status %d", ((struct __dlobj *)handle)->handle, nErrCode); + + free(handle); + __dl_set_last_error(__status_to_errno(nErrCode)); + return (-1); + } + } + + free(handle); + + return (0); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dlfcn/dlerror.c b/rossubsys/posix/lib/psxdll/dlfcn/dlerror.c new file mode 100644 index 00000000000..221aaaea79e --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dlfcn/dlerror.c @@ -0,0 +1,36 @@ +/* $Id: dlerror.c,v 1.4 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dlfcn/dlerror.c + * PURPOSE: Gain access to an executable object file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static int __dl_last_error = 0; + +void __dl_set_last_error(int err) +{ + FIXME("dlfcn error handling not thread safe"); + __dl_last_error = err; +} + +char *dlerror(void) +{ + return strerror(__dl_last_error); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dlfcn/dlopen.c b/rossubsys/posix/lib/psxdll/dlfcn/dlopen.c new file mode 100644 index 00000000000..f127a7d7c27 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dlfcn/dlopen.c @@ -0,0 +1,129 @@ +/* $Id: dlopen.c,v 1.4 2002/10/29 04:45:28 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dlfcn/dlopen.c + * PURPOSE: Gain access to an executable object file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void *__wdlopen(const wchar_t *, int); + +void *dlopen(const char *file, int mode) +{ + /* TODO: ANSI-to-Unicode stubs like this need to be standardized in some way */ + void * pRetVal; + ANSI_STRING strFile; + UNICODE_STRING wstrFile; + + RtlInitAnsiString(&strFile, (LPSTR)file); + RtlAnsiStringToUnicodeString (&wstrFile, &strFile, TRUE); + + pRetVal = __wdlopen((wchar_t *)wstrFile.Buffer, mode); + + free(wstrFile.Buffer); + + return pRetVal; + +} + +void *__wdlopen(const wchar_t *file, int mode) +{ + NTSTATUS nErrCode; + UNICODE_STRING wstrNativePath; + struct __dlobj * pdloObject; + + if(file == 0) + { + /* POSIX dynamic linking allows for global symbol matching */ + pdloObject = (struct __dlobj *)malloc(sizeof(struct __dlobj)); + + TODO("\ +move the global symbol matching semantics into the PE Loader \ +(NTDLL Ldr family of calls), and just return a pointer to the module \ +image\ +"); + + pdloObject->global = 1; + return (pdloObject); + } + + FIXME("\ +LdrLoadDll() only accepts DOS paths - probably because the POSIX \ +standard didn't specify dynamic linking interfaces at the time Windows NT \ +was born \ +"); + +#if 0 + /* TODO: LdrLoadNtDll() or LdrLoadDllEx() (the former is preferrable, since + the latter is more likely to be implemented with different purposes from + Microsoft), accepting native NT paths */ + + if(wcschr(file, '/'L) != NULL) + { + /* TODO: RtlPosixPathNameToNtPathName_U */ + if(!RtlPosixPathNameToNtPathName_U((LPWSTR)file, &wstrNativePath, NULL, NULL)) + { + __dl_set_last_error(ENOENT); + return (NULL); + } + } + else + { + RtlInitUnicodeString(&wstrNativePath, (LPWSTR)file); + } +#endif + + RtlInitUnicodeString(&wstrNativePath, (LPWSTR)file); + + pdloObject = (struct __dlobj *)malloc(sizeof(struct __dlobj)); + pdloObject->global = 0; + + WARN("\ +mode flags are not fully supported by Windows NT, due to the \ +completely different semantics of dynamical linking (for \ +example the global symbol matching is unsupported). This \ +implementation will then behave as if mode was set to \ +(RTLD_NOW | RTLD_GLOBAL), and fail if other flags are set.\ +"); + + if(__dl_get_scope_flag(mode) == RTLD_LOCAL) + { + __dl_set_last_error(EINVAL); + return (NULL); + } + + /* load the DLL */ + nErrCode = LdrLoadDll + ( + NULL, + 0, + &wstrNativePath, + (PVOID*)&pdloObject->handle + ); + + if(!NT_SUCCESS(nErrCode)) + { + __dl_set_last_error(__status_to_errno(nErrCode)); + return (NULL); + } + + return (pdloObject); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/dlfcn/dlsym.c b/rossubsys/posix/lib/psxdll/dlfcn/dlsym.c new file mode 100644 index 00000000000..31f9c326dfa --- /dev/null +++ b/rossubsys/posix/lib/psxdll/dlfcn/dlsym.c @@ -0,0 +1,92 @@ +/* $Id: dlsym.c,v 1.4 2002/10/29 04:45:30 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/dlfcn/dlsym.c + * PURPOSE: Obtain the address of a symbol from a dlopen() object + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include + +void *__dlsymn(void *, unsigned long int); +void *__dlsym(void *, int, const char *, unsigned long int); + +void *dlsym(void *handle, const char *name) +{ + return (__dlsym(handle, 1, name, 0)); +} + +void *__dlsymn(void *handle, unsigned long int ordinal) +{ + return (__dlsym(handle, 0, 0, ordinal)); +} + +void *__dlsym(void *handle, int by_name, const char *name, unsigned long int ordinal) +{ + struct __dlobj * pdloObject; + + void * pProcAddr; + NTSTATUS nErrCode; + + if(handle == RTLD_NEXT) + { + FIXME("implement RTLD_NEXT semantics"); + return (NULL); + } + + pdloObject = (struct __dlobj *) handle; + + if(pdloObject->global) + { + FIXME("implement global symbol matching"); + return (NULL); + } + + if(by_name) + { + ANSI_STRING strName; + + RtlInitAnsiString(&strName, (LPSTR)name); + + nErrCode = LdrGetProcedureAddress + ( + pdloObject->handle, + &strName, + 0, + (PVOID *)&pProcAddr + ); + + } + else + { + nErrCode = LdrGetProcedureAddress + ( + pdloObject->handle, + NULL, + ordinal, + (PVOID *)&pProcAddr + ); + } + + if(!NT_SUCCESS(nErrCode)) + { + __dl_set_last_error(__status_to_errno(nErrCode)); + return (NULL); + } + + return pProcAddr; + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/errno/.cvsignore b/rossubsys/posix/lib/psxdll/errno/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/errno/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/errno/errno.c b/rossubsys/posix/lib/psxdll/errno/errno.c new file mode 100644 index 00000000000..aca467c797b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/errno/errno.c @@ -0,0 +1,57 @@ +/* $Id: errno.c,v 1.6 2003/08/22 13:55:15 ea Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/errno/errno.c + * PURPOSE: Internal errno implementation + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/12/2001: Created + */ + +#include +#include +#include +#include + +int * __PdxGetThreadErrNum(void) +{ + return &(((__PPDX_TDATA) (NtCurrentTeb()->TlsSlots[__PdxGetProcessData()->TlsIndex]) )->ErrNum); +} + +/********************************************************************** + * NAME EXPORTED + * RtlNtStatusToPsxErrno + * + * DESCRIPTION + * Convert an Executive status ID into a POSIX error number + * (errno.h). + * + * NOTE + * Not present in the legacy WNT (a ReactOS extension to support + * the POSIX+ subsystem). + * + * ARGUMENTS + * Status The Executive status ID to convert. + * + * RETURN VALUE + * errno as in errno.h + * + * REVISIONS + * 1999-11-30 ea + * 2003-08-22 ea: moved here from NTDLL + */ +INT STDCALL +RtlNtStatusToPsxErrno(IN NTSTATUS Status) +{ +#if 0 + switch (Status) + { + } +#endif + return -1; /* generic POSIX error */ +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/fcntl/.cvsignore b/rossubsys/posix/lib/psxdll/fcntl/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/fcntl/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/fcntl/fcntl.c b/rossubsys/posix/lib/psxdll/fcntl/fcntl.c new file mode 100644 index 00000000000..159eba6fae9 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/fcntl/fcntl.c @@ -0,0 +1,351 @@ +/* $Id: fcntl.c,v 1.7 2002/10/29 04:45:31 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/fcntl/fcntl.c + * PURPOSE: File control + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 13/02/2002: Created + * 15/02/2002: Implemented fcntl() (KJK::Hyperion) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int fcntl(int fildes, int cmd, ...) +{ + __fdtable_t *pftFdTable; + __fildes_t *pfdDescriptor; + NTSTATUS nErrCode; + int nRetVal; + int nThirdArg; + void *pThirdArg; + va_list vlArgs; + + /* lock the environment */ + __PdxAcquirePdataLock(); + INFO("environment locked"); + + /* get the file descriptors table */ + pftFdTable = &__PdxGetProcessData()->FdTable; + INFO("file descriptors table at 0x%08X", pftFdTable); + + /* fildes is an invalid descriptor, or it's a closed or uninitialized + descriptor and the requested operation is not the creation of a new + descriptor */ + if + ( + fildes < 0 || + fildes >= OPEN_MAX || + ( + (cmd != F_NEWFD) && + ( + __fdtable_entry_isavail(pftFdTable, fildes) == 0 || + __fdtable_entry_get(pftFdTable, fildes) == 0 + ) + ) + ) + { + INFO("invalid file descriptor"); + errno = EBADF; + __PdxReleasePdataLock(); + return (-1); + } + + /* get the file descriptor referenced by fildes */ + pfdDescriptor = __fdtable_entry_get(pftFdTable, fildes); + INFO("file descriptor %d at 0x%08X", fildes, pftFdTable); + + /* get third argument as integer */ + va_start(vlArgs, cmd); + nThirdArg = va_arg(vlArgs, int); + va_end(vlArgs); + + /* get third argument as pointer */ + va_start(vlArgs, cmd); + pThirdArg = va_arg(vlArgs, void *); + va_end(vlArgs); + + /* initialize return value */ + nRetVal = -1; + + switch(cmd) + { + case F_DUPFD: + { + int nDupFileNo; + __fildes_t *pfdDupDescriptor; + + INFO("requested operation: F_DUPFD"); + + /* allocate the duplicated descriptor */ + nDupFileNo = __fdtable_entry_add(pftFdTable, nThirdArg, 0, &pfdDupDescriptor); + + if(nDupFileNo) + { + ERR("__fdtable_entry_add() failed, errno %d", errno); + break; + } + + /* copy the open flags */ + pfdDupDescriptor->OpenFlags = pfdDescriptor->OpenFlags; + + /* clear the FD_CLOEXEC flag */ + pfdDupDescriptor->FdFlags = pfdDescriptor->FdFlags & ~FD_CLOEXEC; + + /* duplicate the extra data */ + if(pfdDescriptor->ExtraDataSize != 0 && pfdDescriptor->ExtraData != 0) + { + /* allocate space for the duplicated extra data */ + pfdDupDescriptor->ExtraDataSize = pfdDescriptor->ExtraDataSize; + pfdDupDescriptor->ExtraData = __malloc(pfdDupDescriptor->ExtraDataSize); + + /* failure */ + if(pfdDupDescriptor->ExtraData == 0) + { + errno = ENOMEM; + break; + } + + /* copy the extra data */ + memcpy(pfdDupDescriptor->ExtraData, pfdDescriptor->ExtraData, pfdDupDescriptor->ExtraDataSize); + INFO + ( + "copied %u bytes from 0x%08X into 0x%08X", + pfdDupDescriptor->ExtraDataSize, + pfdDescriptor->ExtraData, + pfdDupDescriptor->ExtraData + ); + } + + /* duplicate the handle */ + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + pfdDescriptor->FileHandle, + NtCurrentProcess(), + &pfdDupDescriptor->FileHandle, + 0, + 0, + DUPLICATE_SAME_ACCESS /* | DUPLICATE_SAME_ATTRIBUTES */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + __free(pfdDupDescriptor->ExtraData); + errno = __status_to_errno(nErrCode); + break; + } + + INFO + ( + "duplicated handle 0x%08X into handle 0x%08X", + pfdDescriptor->FileHandle, + pfdDupDescriptor->FileHandle + ); + + /* return the duplicated file number */ + nRetVal = nDupFileNo; + break; + } + + case F_GETFD: + { + INFO("requested operation: F_GETFD"); + nRetVal = pfdDescriptor->FdFlags; + break; + } + + case F_SETFD: + { + INFO("requested operation: F_SETFD"); + pfdDescriptor->FdFlags = nThirdArg; + nRetVal = 0; + break; + } + + case F_GETFL: + { + INFO("requested operation: F_GETFL"); + nRetVal = pfdDescriptor->OpenFlags; + break; + } + + case F_SETFL: + { + INFO("requested operation: F_SETFL"); + pfdDescriptor->OpenFlags = nThirdArg; + nRetVal = 0; + break; + } + + case F_GETLK: + { + INFO("requested operation: F_GETLK"); + errno = EINVAL; + break; + } + + case F_SETLK: + { + INFO("requested operation: F_SETLK"); + errno = EINVAL; + break; + } + + case F_SETLKW: + { + INFO("requested operation: F_SETLKW"); + errno = EINVAL; + break; + } + + case F_NEWFD: + { + INFO("requested operation: F_NEWFD"); + /* allocate a new descriptor */ + nRetVal = __fdtable_entry_add(pftFdTable, fildes, (__fildes_t *)pThirdArg, 0); + break; + } + + case F_DELFD: + { + INFO("requested operation: F_DELFD"); + /* invalid return pointer */ + if(pThirdArg == 0) + { + errno = EINVAL; + break; + } + + memcpy((__fildes_t *)pThirdArg, pfdDescriptor, sizeof(*pfdDescriptor)); + + /* remove file descriptor */ + nRetVal = __fdtable_entry_remove(pftFdTable, fildes); + + } + + case F_GETALL: + { + INFO("requested operation: F_GETALL"); + /* invalid return pointer */ + if(pThirdArg == 0) + { + errno = EINVAL; + break; + } + + /* return a copy of the file descriptor */ + memcpy((__fildes_t *)pThirdArg, pfdDescriptor, sizeof(*pfdDescriptor)); + nRetVal = 0; + + break; + } + + case F_SETALL: + { + INFO("requested operation: F_SETALL"); + /* invalid file descriptor to copy attributes from */ + if(pThirdArg == 0) + { + errno = EINVAL; + break; + } + + /* copy the attributes of file descriptor from the provided descriptor */ + memcpy(pfdDescriptor, pThirdArg, sizeof(*pfdDescriptor)); + nRetVal = 0; + + break; + } + + case F_GETXP: + { + INFO("requested operation: F_GETXP"); + /* invalid return pointer */ + if(pThirdArg == 0) + { + errno = EINVAL; + break; + } + + /* return a pointer to the extra data associated to the descriptor */ + *((void **)pThirdArg) = pfdDescriptor->ExtraData; + nRetVal = 0; + + break; + } + + case F_SETXP: + { + INFO("requested operation: F_SETXP"); + /* set the pointer to the extra data associated */ + pfdDescriptor->ExtraData = pThirdArg; + nRetVal = 0; + break; + } + + case F_GETXS: + { + INFO("requested operation: F_GETXS"); + nRetVal = pfdDescriptor->ExtraDataSize; + break; + } + + case F_SETXS: + { + INFO("requested operation: F_SETXS"); + pfdDescriptor->ExtraDataSize = nThirdArg; + nRetVal = 0; + break; + } + + case F_GETFH: + { + INFO("requested operation: F_GETFH"); + /* invalid return pointer */ + if(pThirdArg == 0) + { + errno = EINVAL; + break; + } + + /* return the handle associated to the descriptor */ + *((void **)pThirdArg) = pfdDescriptor->FileHandle; + nRetVal = 0; + break; + } + + case F_SETFH: + { + INFO("requested operation: F_SETFH"); + pfdDescriptor->FileHandle = pThirdArg; + nRetVal = 0; + break; + } + + default: + INFO("invalid operation requested"); + errno = EINVAL; + } + + /* unlock the environment */ + __PdxReleasePdataLock(); + INFO("environment unlocked"); + + return (nRetVal); +} + +/* EOF */ \ No newline at end of file diff --git a/rossubsys/posix/lib/psxdll/fcntl/open.c b/rossubsys/posix/lib/psxdll/fcntl/open.c new file mode 100644 index 00000000000..735d238915a --- /dev/null +++ b/rossubsys/posix/lib/psxdll/fcntl/open.c @@ -0,0 +1,180 @@ +/* $Id: open.c,v 1.5 2002/10/29 04:45:31 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/fcntl/open.c + * PURPOSE: Open a file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 04/02/2002: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int open(const char *path, int oflag, ...) +{ + ANSI_STRING strPath; + UNICODE_STRING wstrPath; + int nRetVal; + + RtlInitAnsiString(&strPath, (PCSZ)path); + RtlAnsiStringToUnicodeString(&wstrPath, &strPath, TRUE); + + nRetVal = _Wopen(wstrPath.Buffer, oflag); + + RtlFreeUnicodeString(&wstrPath); + + return (nRetVal); +} + +int _Wopen(const wchar_t *path, int oflag, ...) +{ + OBJECT_ATTRIBUTES oaFileAttribs; + IO_STATUS_BLOCK isbStatus; + UNICODE_STRING wstrNativePath; + NTSTATUS nErrCode; + ULONG nDesiredAccess; + ULONG nCreateDisposition; + ULONG nCreateOptions; + HANDLE hFile; +#if 0 + mode_t mFileMode; +#endif + int nFileNo; + __fildes_t fdDescriptor; + + /* translate file access flag */ + switch(oflag & O_ACCMODE) + { + case O_RDONLY: + { + nDesiredAccess = FILE_READ_ACCESS; + nCreateOptions = 0; + break; + } + + case O_WRONLY: + { + nDesiredAccess = FILE_WRITE_ACCESS; + nCreateOptions = FILE_NON_DIRECTORY_FILE; /* required by the specification */ + break; + } + + case O_RDWR: + { + nDesiredAccess = FILE_READ_ACCESS | FILE_WRITE_ACCESS; + nCreateOptions = FILE_NON_DIRECTORY_FILE; /* required by the specification */ + break; + } + + default: + { + errno = EINVAL; + return (-1); + } + + } + + /* miscellaneous flags */ + if((oflag & _O_DIRFILE) == _O_DIRFILE) + nCreateOptions |= FILE_DIRECTORY_FILE; + + /* creation disposition */ + if((oflag & O_CREAT) == O_CREAT) + if((oflag & O_EXCL) == O_EXCL) + nCreateDisposition = FILE_CREATE; /* O_CREAT + O_EXCL: create file, fail if file exists */ + else + nCreateDisposition = FILE_OPEN_IF; /* O_CREAT: open file, create if file doesn't exist */ + else if((oflag & O_TRUNC) == O_TRUNC) + nCreateDisposition = FILE_OVERWRITE; /* O_TRUNC: truncate existing file */ + else + nCreateDisposition = FILE_OPEN; /* normal: open file, fail if file doesn't exist */ + + /* lock the environment */ + __PdxAcquirePdataLock(); + + /* convert the path into a native path */ + if(!__PdxPosixPathNameToNtPathName((LPWSTR)path, __PdxGetNativePathBuffer(), __PdxGetCurDir(), NULL)) + { + __PdxReleasePdataLock(); + return (-1); + } + + /* set file generic object attributes */ + oaFileAttribs.Length = sizeof(oaFileAttribs); + oaFileAttribs.RootDirectory = __PdxGetRootHandle(); + oaFileAttribs.ObjectName = &wstrNativePath; + oaFileAttribs.Attributes = OBJ_INHERIT; /* child processes inherit all file descriptors */ + oaFileAttribs.SecurityDescriptor = NULL; + oaFileAttribs.SecurityQualityOfService = NULL; + + /* open or create the file */ + nErrCode = NtCreateFile + ( + &hFile, + nDesiredAccess | SYNCHRONIZE, + &oaFileAttribs, + &isbStatus, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + nCreateDisposition, + nCreateOptions | FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateFile() failed with status 0x%08X", nErrCode); + __PdxReleasePdataLock(); + errno = __status_to_errno(nErrCode); + return (-1); + } + + /* initialize descriptor constructor */ + memset(&fdDescriptor, 0, sizeof(fdDescriptor)); + fdDescriptor.FileHandle = hFile; + fdDescriptor.OpenFlags = oflag; + + /* allocate a new file descriptor */ + nFileNo = fcntl(0, F_NEWFD, &fdDescriptor); + + /* unlock the environment */ + __PdxReleasePdataLock(); + + /* could not allocate the file descriptor */ + if(nFileNo < 0) + { + NtClose(hFile); + return (-1); + } + + /* return the file number */ + return (nFileNo); +} + +int creat(const char *path, mode_t mode) +{ + return (open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); +} + +int _Wcreat(const wchar_t *path, mode_t mode) +{ + return (_Wopen(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/libgen/.cvsignore b/rossubsys/posix/lib/psxdll/libgen/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/libgen/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/libgen/basename.c b/rossubsys/posix/lib/psxdll/libgen/basename.c new file mode 100644 index 00000000000..8db0b49a738 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/libgen/basename.c @@ -0,0 +1,114 @@ +/* $Id: basename.c,v 1.4 2002/10/29 04:45:31 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/libgen/basename.c + * PURPOSE: Return the last component of a pathname + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include +#include + +static const char *__basename_dot = "."; +static const wchar_t *__Wbasename_dot = L"."; + +char *basename(char *path) +{ + char *pcTail; + size_t nStrLen; + + /* null or empty string */ + if(path == 0 && ((nStrLen = strlen(path)) == 0)) + return ((char *)__basename_dot); + + if(nStrLen == 1) + { + /* path is "/", return "/" */ + if(IS_CHAR_DELIMITER_A(path[0])) + { + path[0] = '/'; + path[1] = 0; + return (path); + } + /* path is a single character, return it */ + else + { + return (path); + } + } + + /* tail of the string (null terminator excluded) */ + pcTail = &path[nStrLen - 1]; + + /* skip trailing slashes */ + while(pcTail > path && IS_CHAR_DELIMITER_A(*pcTail)) + pcTail --; + + pcTail[1] = 0; + + /* go backwards until a delimiter char or the beginning of the string */ + while(pcTail >= path) + /* delimiter found, return the basename */ + if(IS_CHAR_DELIMITER_A(*pcTail)) + return (&pcTail[1]); + else + pcTail --; + + /* return all the path */ + return (path); +} + +wchar_t *_Wbasename(wchar_t *path) +{ + wchar_t *pwcTail; + size_t nStrLen; + + /* null or empty string */ + if(path == 0 && ((nStrLen = wcslen(path)) == 0)) + return ((wchar_t *)__Wbasename_dot); + + if(nStrLen == 1) + { + /* path is "/", return "/" */ + if(IS_CHAR_DELIMITER_U(path[0])) + { + path[0] = L'/'; + path[1] = 0; + return (path); + } + /* path is a single character, return it */ + else + { + return (path); + } + } + + /* tail of the string (null terminator excluded) */ + pwcTail = &path[nStrLen - 1]; + + /* skip trailing slashes */ + while(pwcTail > path && IS_CHAR_DELIMITER_U(*pwcTail)) + pwcTail --; + + pwcTail[1] = 0; + + /* go backwards until a delimiter char or the beginning of the string */ + while(pwcTail >= path) + /* delimiter found, return the basename */ + if(IS_CHAR_DELIMITER_U(*pwcTail)) + return (&pwcTail[1]); + else + pwcTail --; + + /* return all the path */ + return (path); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/.cvsignore b/rossubsys/posix/lib/psxdll/misc/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/misc/fdtable.c b/rossubsys/posix/lib/psxdll/misc/fdtable.c new file mode 100644 index 00000000000..76aa0fa3b28 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/fdtable.c @@ -0,0 +1,238 @@ +/* $Id: fdtable.c,v 1.6 2002/10/29 04:45:31 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/fdtable.c + * PURPOSE: File descriptors table functions + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 12/02/2002: Created + */ + +#include +#include +#include +#include +#include +#include + +int __fdtable_init(__fdtable_t * fdtable) +{ + if(fdtable == 0) + { + errno = EINVAL; + return (-1); + } + + memset(fdtable, 0, sizeof(*fdtable)); + + fdtable->Signature = __FDTABLE_MAGIC; + + return (0); +} + +int __fdtable_free(__fdtable_t * fdtable) +{ + if(fdtable == 0) + { + errno = EINVAL; + return (-1); + } + + __free(&fdtable->Descriptors); + + memset(fdtable, 0, sizeof(*fdtable)); + + fdtable->Signature = MAGIC('B', 'A', 'A', 'D'); + + return (0); +} + +int __fdtable_entry_isavail(__fdtable_t * fdtable, int fileno) +{ + return ((fdtable->DescriptorsBitmap[fileno / 32] >> (fileno % 32)) % 2); +} + +int __fdtable_entry_nextavail(__fdtable_t * fdtable, int fileno) +{ + int nCurMapIndex; + int nUnusedIndex; + uint32_t nCurMapCell; + + nUnusedIndex = fileno; + + /* The file descriptors bitmap is an array of 32 bit unsigned integers (32 bit + integers were chosen for proper data alignment without padding). The array is + big enough to hold at least OPEN_MAX bits, that is it has OPEN_MAX / 32 cells + (see also the __fdtable_t definition in psx/fdtable.h). Bits correspond to + file numbers: if a bit is 1, the corresponding file number is in use, else + it's unused. Bit numbering is right-to-left wise, that is the rightmost (least + significative) bit of cell 0 corresponds to file number 0, the leftmost (most + significative) bit of cell 0 to file number 7, the leftmost bit of cell 1 to + file number 8, and so on + */ + /* NOTE: I'm sure the algorytm can be greatly optimized, but I prefer to privilege + readability - it allows for more maintenable code. Please don't pretend to + outsmart the compiler: such optimizations as performing divisions as bit shifts + are useless */ + + /* index of the bitmap cell containing nUnusedIndex */ + nCurMapIndex = nUnusedIndex / 32; + + /* get a copy of the bitmap cell containg nUnusedIndex, and shift it to the right + so that the rightmost (least significative) bit is the one referencing nUnusedIndex */ + nCurMapCell = fdtable->DescriptorsBitmap[nCurMapIndex] >> (nUnusedIndex % 32); + + while(1) + { + /* if the least significative bit of the current cell is 0, we've found an unused + fileno, and we return it */ + if((nCurMapCell % 2) == 0) + return (nUnusedIndex); + + /* on to next fileno */ + nUnusedIndex ++; + + /* this is NOT a failure. -1 with undefined errno means that no unused file + number exists */ + if(nUnusedIndex >= OPEN_MAX) + return (-1); + + /* this fileno is referenced in the next cell */ + if((nUnusedIndex % 32) == 0) + { + nCurMapIndex ++; + nCurMapCell = fdtable->DescriptorsBitmap[nCurMapIndex]; + } + /* on to next fileno (bit) in the current cell */ + else + nCurMapCell >>= 1; + } + + return (-1); +} + +int __fdtable_entry_add(__fdtable_t * fdtable, int fileno, __fildes_t * fildes, __fildes_t ** newfd) +{ + int nFileNo; + + /* descriptors count reached OPEN_MAX */ + if(fdtable->UsedDescriptors >= OPEN_MAX) + { + ERR("file descriptor table full"); + errno = EMFILE; + return (-1); + } + + /* base fileno less than zero: use the lowest unused fileno */ + if(fileno < 0) + nFileNo = fdtable->LowestUnusedFileNo; + /* base fileno greater than or equal to zero: use the next available fileno */ + else + nFileNo = __fdtable_entry_nextavail(fdtable, fileno); + + INFO("lowest unused file number is %d", nFileNo); + + /* descriptors count reached OPEN_MAX */ + if(nFileNo < 0) + { + ERR("nFileNo is less than zero"); + errno = EMFILE; + return (-1); + } + + /* if the table doesn't have enough space for the next entry ... */ + if(nFileNo >= fdtable->AllocatedDescriptors) + { + void * pTemp; + + INFO + ( + "growing the array from %lu to %lu bytes", + fdtable->AllocatedDescriptors * sizeof(*fdtable->Descriptors), + (nFileNo + 1) * sizeof(*fdtable->Descriptors) + ); + + /* ... try to increase the size of the table */ + if(fdtable->AllocatedDescriptors * sizeof(*fdtable->Descriptors) == 0) + pTemp = __malloc((nFileNo + 1) * sizeof(*fdtable->Descriptors)); + else + pTemp = __realloc + ( + fdtable->Descriptors, + (nFileNo + 1) * sizeof(*fdtable->Descriptors) + ); + + /* reallocation failed */ + if(pTemp == 0) + { + ERR("__realloc() failed"); + errno = ENOMEM; + return (-1); + } + + /* update the table */ + fdtable->AllocatedDescriptors = nFileNo + 1; + fdtable->Descriptors = pTemp; + } + + /* initialize descriptor */ + if(fildes == 0) + memset(&fdtable->Descriptors[nFileNo], 0, sizeof(__fildes_t)); + else + memcpy(&fdtable->Descriptors[nFileNo], fildes, sizeof(__fildes_t)); + + if(newfd != 0) + *newfd = &fdtable->Descriptors[nFileNo]; + + INFO + ( + "file number %d: handle 0x%08X, open flags 0x%08X, flags 0x%08X, extra data size %u, extra data at 0x%08X", + nFileNo, + fdtable->Descriptors[nFileNo].FileHandle, + fdtable->Descriptors[nFileNo].OpenFlags, + fdtable->Descriptors[nFileNo].FdFlags, + fdtable->Descriptors[nFileNo].ExtraDataSize, + fdtable->Descriptors[nFileNo].ExtraData + ); + + INFO + ( + "incrementing used descriptors count from %u to %u", + fdtable->UsedDescriptors, + fdtable->UsedDescriptors + 1 + ); + fdtable->UsedDescriptors ++; + + INFO + ( + "setting bit %u of cell %u of the bitmap to 1", + nFileNo % 32, + nFileNo / 32 + ); + fdtable->DescriptorsBitmap[nFileNo / 32] |= (1 << (nFileNo % 32)); + + fdtable->LowestUnusedFileNo = __fdtable_entry_nextavail(fdtable, nFileNo); + INFO("setting the lowest unused file number to %d", fdtable->LowestUnusedFileNo); + + return (nFileNo); +} + +int __fdtable_entry_remove(__fdtable_t * fdtable, int fileno) +{ + return (-1); +} + +__fildes_t *__fdtable_entry_get(__fdtable_t * fdtable, int fileno) +{ + /* this fileno hasn't been allocated */ + if(fileno >= fdtable->AllocatedDescriptors) + return (0); + + /* TODO: check the fileno against the bitmap */ + return (&fdtable->Descriptors[fileno]); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/heap.c b/rossubsys/posix/lib/psxdll/misc/heap.c new file mode 100644 index 00000000000..722de19730b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/heap.c @@ -0,0 +1,17 @@ +/* $Id: heap.c,v 1.3 2002/10/29 04:45:33 rex Exp $ + * + * FILE: reactos/subsys/psx/lib/psxdll/misc/heap.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * PURPOSE: Support routines for crt0.c + * UPDATE HISTORY: + * 2001-05-06 + */ +#define NTOS_MODE_USER +#include +#include +HANDLE STDCALL GetProcessHeap (VOID) +{ + return (HANDLE)NtCurrentPeb()->ProcessHeap; +} +/* EOF */ diff --git a/rossubsys/posix/lib/psxdll/misc/init.c b/rossubsys/posix/lib/psxdll/misc/init.c new file mode 100644 index 00000000000..990e27eb6f9 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/init.c @@ -0,0 +1,65 @@ +/* $Id: init.c,v 1.5 2002/10/29 04:45:33 rex Exp $ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: reactos/subsys/psx/lib/psxdll/misc/init.c + * PURPOSE: Client initialization + * PROGRAMMER: Emanuele Aliberti + * UPDATE HISTORY: + * 2001-05-06 + */ +#define NTOS_MODE_USER +#include +#include + +/* DLL GLOBALS */ +int * errno = NULL; +char *** _environ = NULL; +HANDLE ApiPort = INVALID_HANDLE_VALUE; +/* + * Called by startup code in crt0.o, where real + * errno and _environ are actually defined. + */ +VOID STDCALL __PdxInitializeData (int * errno_arg, char *** environ_arg) +{ + errno = errno_arg; + _environ = environ_arg; +} +/* + * Called by DLL's entry point when reason==PROCESS_ATTACH. + */ +NTSTATUS STDCALL PsxConnectApiPort (VOID) +{ + UNICODE_STRING usApiPortName; + LPWSTR wsApiPortName = L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_API_PORT_NAME; + SECURITY_QUALITY_OF_SERVICE Sqos; + ULONG MaxMessageSize = 0; + NTSTATUS Status; + PSX_CONNECT_PORT_DATA ConnectData; + ULONG ConnectDataLength = sizeof ConnectData; + + RtlInitUnicodeString (& usApiPortName, wsApiPortName); + RtlZeroMemory (& Sqos, sizeof Sqos); + ConnectData.ConnectionType = PSX_CONNECTION_TYPE_PROCESS; + ConnectData.Version = PSX_LPC_PROTOCOL_VERSION; + ConnectData.PortIdentifier = 0; + Status = NtConnectPort ( + & ApiPort, + & usApiPortName, + & Sqos, + NULL, + NULL, + & MaxMessageSize, + & ConnectData, + & ConnectDataLength + ); + if (!NT_SUCCESS(Status)) + { + /* TODO: emit a diagnostic message */ + return Status; + } + /* TODO: save returned data */ + return STATUS_SUCCESS; +} +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/interlock.c b/rossubsys/posix/lib/psxdll/misc/interlock.c new file mode 100644 index 00000000000..983dd71f789 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/interlock.c @@ -0,0 +1,83 @@ +/* $Id: interlock.c,v 1.4 2002/10/29 04:45:33 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/interlock.c + * PURPOSE: inter-locked increments/decrements + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 20/01/2002: Adapted from lib/kernel32/synch/intrlck.c + */ + +/* + * NOTE by KJK::Hyperion: I do not understand what's behind these functions. + * Don't ask me how they work, or to fix errors in them. + * Please refer to the authors referenced in the original + * file, lib/kernel32/synch/intrlck.c + */ + +/* TODO? move these in some shared library */ + +#include + +int __interlock_inc(int * addend) +{ + int ret = 0; + + __asm__ + ( + " lock\n" /* for SMP systems */ + " incl (%1)\n" + " je 2f\n" + " jl 1f\n" + " incl %0\n" + " jmp 2f\n" + "1: dec %0\n" + "2:\n" + :"=r" (ret):"r" (addend), "0" (0): "memory" + ); + + return (ret); +} + +int __interlock_dec(int * addend) +{ + int ret = 0; + + __asm__ + ( + " lock\n" /* for SMP systems */ + " decl (%1)\n" + " je 2f\n" + " jl 1f\n" + " incl %0\n" + " jmp 2f\n" + "1: dec %0\n" + "2:\n" + :"=r" (ret):"r" (addend), "0" (0): "memory" + ); + + return (ret); + +} + +int __interlock_add(int * addend, int increment) +{ + int ret = 0; + + __asm__ + ( + " lock\n" /* for SMP systems */ + " xaddl %0,(%1)" + :"=r" (ret) + :"r" (addend), "0" (increment) + :"memory" + ); + + return (ret); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/main.c b/rossubsys/posix/lib/psxdll/misc/main.c new file mode 100644 index 00000000000..fd3085c13bd --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/main.c @@ -0,0 +1,149 @@ +/* $Id: main.c,v 1.6 2002/10/29 04:45:33 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/main.c + * PURPOSE: psxdll.dll entry point + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include + +#define DLL_PROCESS_ATTACH 1 +#define DLL_THREAD_ATTACH 2 +#define DLL_THREAD_DETACH 3 +#define DLL_PROCESS_DETACH 0 + +/* WARNING: PRELIMINARY CODE FOR DEBUGGING PURPOSES ONLY - DO NOT CHANGE */ +static __PDX_PDATA __PdxPdata; +static WCHAR __tempPathBuf[32768]; +static char * __tempSelf = "-sh"; +static char * __tempArgv[2] = {0, 0}; + +VOID __PdxSetProcessData(__PPDX_PDATA NewPdata) +{ + memcpy(&__PdxPdata, NewPdata, sizeof(__PdxPdata)); +} + +__PPDX_PDATA __PdxGetProcessData(VOID) +{ + return &__PdxPdata; +} + +BOOL STDCALL DllMain(PVOID pDllInstance, DWORD nReason, PVOID pUnknown) +{ + ULONG nJunk; + + switch(nReason) + { + /* process created, first thread created */ + case DLL_PROCESS_ATTACH: + { + __PPDX_TDATA ThreadData; + int i; + + INFO("new process and new thread created"); + + __PdxPdata.Spawned = 1; + + __PdxPdata.ArgCount = 1; + __tempArgv[0] = __tempSelf; + __PdxPdata.ArgVect = __tempArgv; + + __PdxPdata.NativePathBuffer.Length = 0; + __PdxPdata.NativePathBuffer.MaximumLength = sizeof(__tempPathBuf); + __PdxPdata.NativePathBuffer.Buffer = __tempPathBuf; + + INFO("about to initialize process data lock"); + RtlInitializeCriticalSection(&__PdxPdata.Lock); + + INFO("about to allocate TLS slot"); + __PdxPdata.TlsIndex = RtlFindClearBitsAndSet(NtCurrentPeb()->TlsBitmap, 1, 0); + + if(__PdxPdata.TlsIndex == -1) + { + DbgBreakPoint(); + NtRaiseHardError(STATUS_NO_MEMORY, 0, 0, 0, 1, (ULONG)&nJunk); + return (FALSE); + } + + INFO("allocated TLS slot %d", __PdxPdata.TlsIndex); + + INFO("about to allocate thread data"); + ThreadData = __malloc(sizeof(*ThreadData)); + + if(ThreadData == 0) + { + DbgBreakPoint(); + NtRaiseHardError(STATUS_NO_MEMORY, 0, 0, 0, 1, (ULONG)&nJunk); + return (FALSE); + } + + NtCurrentTeb()->TlsSlots[__PdxPdata.TlsIndex] = ThreadData; + + INFO("about to initialize file descriptors table"); + __fdtable_init(&__PdxPdata.FdTable); + + INFO("end of initialization"); + return (TRUE); + } + + /* process about to exit */ + case DLL_PROCESS_DETACH: + { + INFO("process about to exit"); + + INFO("about to deallocate thread data"); + __free(NtCurrentTeb()->TlsSlots[__PdxPdata.TlsIndex]); + + return (TRUE); + } + + /* thread created */ + case DLL_THREAD_ATTACH: + { + __PPDX_TDATA ThreadData; + + INFO("new thread created"); + + INFO("about to allocate thread data"); + ThreadData = __malloc(sizeof(*ThreadData)); + + if(ThreadData == 0) + { + DbgBreakPoint(); + NtRaiseHardError(STATUS_NO_MEMORY, 0, 0, 0, 1, (ULONG)&nJunk); + return (FALSE); + } + + NtCurrentTeb()->TlsSlots[__PdxPdata.TlsIndex] = ThreadData; + + return (TRUE); + } + + /* thread exited */ + case DLL_THREAD_DETACH: + { + INFO("thread about to exit"); + + INFO("about to deallocate thread data"); + __free(NtCurrentTeb()->TlsSlots[__PdxPdata.TlsIndex]); + + return (TRUE); + } + } + + return (FALSE); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/path.c b/rossubsys/posix/lib/psxdll/misc/path.c new file mode 100644 index 00000000000..bc9405920b2 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/path.c @@ -0,0 +1,460 @@ +/* $Id: path.c,v 1.4 2002/10/29 04:45:33 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/path.c + * PURPOSE: POSIX subsystem path utilities + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 31/01/2002: Created + */ + +#include +#include +#include +#include +#include +#include + +BOOLEAN +__PdxPosixPathGetNextComponent_U +( + IN UNICODE_STRING PathName, + IN OUT PUNICODE_STRING PathComponent, + OUT PBOOLEAN TrailingDelimiter OPTIONAL +) +{ + int i, j; + USHORT l = PathName.Length / sizeof(WCHAR); + + if(PathComponent->Buffer == 0) + i = 0; + else + i = ((ULONG)PathComponent->Buffer - (ULONG)PathName.Buffer + PathComponent->Length) / sizeof(WCHAR); + + /* skip leading empty components */ + while(1) + if(i >= l) + { + PathComponent->Length = PathComponent->MaximumLength = 0; + return (FALSE); + } + else if(IS_CHAR_DELIMITER_U(PathName.Buffer[i])) + i ++; + else + break; + + if(i > l) + { + PathComponent->Length = PathComponent->MaximumLength = 0; + return (FALSE); + } + + PathComponent->Buffer = &PathName.Buffer[i]; + + j = i + 1; + + /* advance until the end of the string, or the next delimiter */ + while(1) + { + if(j >= l) + { + + if(TrailingDelimiter != 0) + *TrailingDelimiter = FALSE; + + break; + } + else if (IS_CHAR_DELIMITER_U(PathName.Buffer[j])) + { + + if(TrailingDelimiter != 0) + *TrailingDelimiter = TRUE; + + break; + } + else + j ++; + } + + PathComponent->Length = PathComponent->MaximumLength = (j - i) * sizeof(WCHAR); + + return (TRUE); + +} + +BOOLEAN +__PdxPosixPathResolve_U +( + IN UNICODE_STRING PathName, + OUT PUNICODE_STRING ResolvedPathName, + IN WCHAR PathDelimiter OPTIONAL +) +{ + UNICODE_STRING wstrThisComponent = {0, 0, NULL}; + PWCHAR pwcCurPos; + PWCHAR pwcStartPos; + BOOLEAN bIsDirectory; + + if(PathDelimiter == 0) + PathDelimiter = L'/'; + + /* start from the beginning of the return buffer */ + pwcCurPos = ResolvedPathName->Buffer; + + /* path begins with a delimiter (absolute path) */ + if(IS_CHAR_DELIMITER_U(PathName.Buffer[0])) + { + /* put a delimiter in front of the return buffer */ + *pwcCurPos = PathDelimiter; + /* move to next character */ + pwcCurPos ++; + } + + pwcStartPos = pwcCurPos; + + /* repeat until the end of the path string */ + while(__PdxPosixPathGetNextComponent_U(PathName, &wstrThisComponent, &bIsDirectory)) + { + /* ".": skip */ + if(IS_COMPONENT_DOT_U(wstrThisComponent)) + continue; + /* "..": go back to the last component */ + else if(IS_COMPONENT_DOTDOT_U(wstrThisComponent)) + { + if(pwcCurPos == pwcStartPos) + continue; + + /* skip the last (undefined) character */ + pwcCurPos --; + /* down to the previous path delimiter */ + do{ pwcCurPos --; }while(!IS_CHAR_DELIMITER_U(*pwcCurPos)); + /* include the delimiter */ + pwcCurPos ++; + } + else + { + /* copy this component into the return string */ + memcpy + ( + pwcCurPos, + wstrThisComponent.Buffer, + wstrThisComponent.Length + ); + + /* move the current position to the end of the string */ + pwcCurPos = (PWCHAR)((PBYTE)pwcCurPos + wstrThisComponent.Length); + + /* component had a trailing delimiter */ + if(bIsDirectory) + { + /* append a delimiter */ + *pwcCurPos = PathDelimiter; + /* on to next character */ + pwcCurPos ++; + } + } + } + + /* set the return string's length as the byte offset between the initial buffer + position and the current position */ + ResolvedPathName->Length = ((ULONG)pwcCurPos - (ULONG)ResolvedPathName->Buffer); + + return (TRUE); + +} + +BOOLEAN +__PdxPosixPathGetNextComponent_A +( + IN ANSI_STRING PathName, + IN OUT PANSI_STRING PathComponent, + OUT PBOOLEAN TrailingDelimiter OPTIONAL +) +{ + int i, j; + + if(PathComponent->Buffer == 0) + i = 0; + else + i = ((ULONG)PathComponent->Buffer - (ULONG)PathName.Buffer + PathComponent->Length); + + /* skip leading empty components */ + while(1) + if(i >= PathName.Length) + { + PathComponent->Length = PathComponent->MaximumLength = 0; + return (FALSE); + } + else if(IS_CHAR_DELIMITER_A(PathName.Buffer[i])) + i ++; + else + break; + + if(i > PathName.Length) + { + PathComponent->Length = PathComponent->MaximumLength = 0; + return (FALSE); + } + + PathComponent->Buffer = &PathName.Buffer[i]; + + j = i + 1; + + /* advance until the end of the string, or the next delimiter */ + while(1) + { + if(j >= PathName.Length) + { + + if(TrailingDelimiter != 0) + *TrailingDelimiter = FALSE; + + break; + } + else if (IS_CHAR_DELIMITER_A(PathName.Buffer[j])) + { + + if(TrailingDelimiter != 0) + *TrailingDelimiter = TRUE; + + break; + } + else + j ++; + } + + PathComponent->Length = PathComponent->MaximumLength = j - i; + + return (TRUE); + +} + +BOOLEAN +__PdxPosixPathResolve_A +( + IN ANSI_STRING PathName, + OUT PANSI_STRING ResolvedPathName, + IN CHAR PathDelimiter OPTIONAL +) +{ + ANSI_STRING strThisComponent = {0, 0, NULL}; + PCHAR pcCurPos; + PCHAR pcStartPos; + BOOLEAN bIsDirectory; + + if(PathDelimiter == 0) + PathDelimiter = '/'; + + /* start from the beginning of the return buffer */ + pcCurPos = ResolvedPathName->Buffer; + + /* path begins with a delimiter (absolute path) */ + if(IS_CHAR_DELIMITER_A(PathName.Buffer[0])) + { + /* put a delimiter in front of the return buffer */ + *pcCurPos = PathDelimiter; + /* move to next character */ + pcCurPos ++; + } + + pcStartPos = pcCurPos; + + /* repeat until the end of the path string */ + while(__PdxPosixPathGetNextComponent_A(PathName, &strThisComponent, &bIsDirectory)) + { + /* ".": skip */ + if(IS_COMPONENT_DOT_A(strThisComponent)) + continue; + /* "..": go back to the last component */ + else if(IS_COMPONENT_DOTDOT_A(strThisComponent)) + { + if(pcCurPos == pcStartPos) + continue; + + /* skip the last (undefined) character */ + pcCurPos --; + /* down to the previous path delimiter */ + do{ pcCurPos --; }while(!IS_CHAR_DELIMITER_A(*pcCurPos)); + /* include the delimiter */ + pcCurPos ++; + } + else + { + /* copy this component into the return string */ + strncpy + ( + pcCurPos, + strThisComponent.Buffer, + strThisComponent.Length + ); + + /* move the current position to the end of the string */ + pcCurPos = (PCHAR)((PBYTE)pcCurPos + strThisComponent.Length); + + /* component had a trailing delimiter */ + if(bIsDirectory) + { + /* append a delimiter */ + *pcCurPos = PathDelimiter; + /* on to next character */ + pcCurPos ++; + } + } + } + + /* set the return string's length as the byte offset between the initial buffer + position and the current position */ + ResolvedPathName->Length = ((ULONG)pcCurPos - (ULONG)ResolvedPathName->Buffer); + + return (TRUE); + +} + +BOOLEAN +__PdxPosixPathNameToNtPathName +( + IN PWCHAR PosixPath, + OUT PUNICODE_STRING NativePath, + IN PUNICODE_STRING CurDir OPTIONAL, + IN PUNICODE_STRING RootDir OPTIONAL +) +{ + UNICODE_STRING wstrPosixPath; + UNICODE_STRING wstrTempString; + + /* parameter validation */ + if + ( + PosixPath == 0 || + NativePath == 0 || + NativePath->Buffer == 0 || + NativePath->MaximumLength == 0 || + (RootDir != 0 && RootDir->Buffer == 0) + ) + { + errno = EINVAL; + return (FALSE); + } + + RtlInitUnicodeString(&wstrPosixPath, PosixPath); + + /* path is null */ + if(0 == wstrPosixPath.Length) + { + errno = EINVAL; + return (FALSE); + } + + /* first, copy the root path into the return buffer */ + /* if no root dir passed by the caller... */ + if(RootDir == 0) + /* return buffer too small */ + if(NativePath->MaximumLength < sizeof(WCHAR)) + { + errno = ENOBUFS; + return (FALSE); + } + /* set the first character to a backslash, and set length accordingly */ + else + { + NativePath->Buffer[0] = L'\\'; + NativePath->Length = sizeof(WCHAR); + } + /* ... else copy the root dir into the return buffer */ + else + /* return buffer too small */ + if(NativePath->MaximumLength < RootDir->Length) + { + errno = ENOBUFS; + return (FALSE); + } + /* copy the root directory into the return buffer, and set length */ + else + { + memcpy(NativePath->Buffer, RootDir->Buffer, RootDir->Length); + NativePath->Length = RootDir->Length; + } + + /* path is "/" - our work is done */ + if(sizeof(WCHAR) == wstrPosixPath.Length && IS_CHAR_DELIMITER_U(wstrPosixPath.Buffer[0])) + return (TRUE); + + /* temp string pointing to the tail of the return buffer */ + wstrTempString.Length = 0; + wstrTempString.MaximumLength = NativePath->MaximumLength - NativePath->Length; + wstrTempString.Buffer = (PWCHAR)(((PBYTE)(NativePath->Buffer)) + NativePath->Length); + + /* path begins with '/': absolute path. Append the resolved path to the return buffer */ + if(IS_CHAR_DELIMITER_U(wstrPosixPath.Buffer[0])) + { + /* copy the resolved path in the return buffer */ + __PdxPosixPathResolve_U(wstrPosixPath, &wstrTempString, L'\\'); + + return (TRUE); + } + else + { + UNICODE_STRING wstrAbsolutePath; + + if(CurDir == 0) + CurDir = __PdxGetCurDir(); + + /* initialize the buffer for the absolute path */ + wstrAbsolutePath.Length = 0; + wstrAbsolutePath.MaximumLength = 0xFFFF; + wstrAbsolutePath.Buffer = __malloc(0xFFFF); + + /* if the current directory is not null... */ + if(!(CurDir->Buffer == 0 || CurDir->Length == 0)) + { + /* copy it into the absolute path buffer */ + memcpy(wstrAbsolutePath.Buffer, CurDir->Buffer, CurDir->Length); + wstrAbsolutePath.Length += CurDir->Length; + } + + /* not enough space to append an extra slash */ + if((wstrAbsolutePath.MaximumLength - wstrAbsolutePath.Length) < (USHORT)sizeof(WCHAR)) + { + __free(wstrAbsolutePath.Buffer); + NativePath->Length = 0; + errno = ENOBUFS; + return (FALSE); + } + + /* append an extra slash */ + wstrAbsolutePath.Buffer[wstrAbsolutePath.Length / sizeof(WCHAR)] = L'/'; + wstrAbsolutePath.Length += sizeof(WCHAR); + + /* not enough space to copy the relative path */ + if((wstrAbsolutePath.MaximumLength - wstrAbsolutePath.Length) < wstrPosixPath.Length) + { + __free(wstrAbsolutePath.Buffer); + NativePath->Length = 0; + errno = ENOBUFS; + return (FALSE); + } + + /* append the relative path to the absolute path */ + memcpy( + (PWCHAR)(((PBYTE)wstrAbsolutePath.Buffer) + wstrAbsolutePath.Length), + wstrPosixPath.Buffer, + wstrPosixPath.Length + ); + wstrAbsolutePath.Length += wstrPosixPath.Length; + + /* resolve the path */ + __PdxPosixPathResolve_U(wstrAbsolutePath, &wstrTempString, L'\\'); + + __free(wstrAbsolutePath.Buffer); + + return (TRUE); + } + + return (FALSE); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/pdata.c b/rossubsys/posix/lib/psxdll/misc/pdata.c new file mode 100644 index 00000000000..a61a9b0cdf0 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/pdata.c @@ -0,0 +1,607 @@ +/* $Id: pdata.c,v 1.6 2002/12/26 18:14:36 robd Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/pdata.c + * PURPOSE: Process data management + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 06/03/2002: Created + * 07/03/2002: Added __PdxUnserializeProcessData() (KJK::Hyperion + * ) + * 11/03/2002: Added __PdxProcessDataToProcessParameters() + * (KJK::Hyperion ) + */ + +#include +#include +#include +#include +#include +#include +#include + +NTSTATUS +STDCALL +__PdxProcessDataToProcessParameters +( + OUT PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, + IN __PPDX_PDATA ProcessData, + IN PUNICODE_STRING ImageFile +) +{ + NTSTATUS nErrCode; + UNICODE_STRING wstrEmpty = {0, 0, NULL}; + UNICODE_STRING wstrCommandLine = {0, 0, NULL}; + __fildes_t * fdDescriptor; + int i; + + /* RtlInitUnicodeString(&wstrEmpty, L""); */ + /* TODO: error checking */ + + /* build the command line string from argument count and argument vector */ + if(ProcessData->ArgVect) + { + BOOL bQuoteArg; + BOOL bFirstArg; + ANSI_STRING strArgument; + PWCHAR pwcBufferTail; + + for(i = 0; i < ProcessData->ArgCount; i ++) + { + RtlInitAnsiString(&strArgument, ProcessData->ArgVect[i]); + + bFirstArg = (i == 0); + bQuoteArg = (strchr(strArgument.Buffer, ' ') != 0); + + /* allocate buffer space for the argument, a blank space if the argument is + not the first, and two quotes if the argument contains a space */ + /* TODO: check this operation for overflow */ + wstrCommandLine.MaximumLength += + (strArgument.Length + (bFirstArg ? 0 : 1) + (bQuoteArg ? 2 : 0)) * + sizeof(WCHAR); + + if(bFirstArg) + { + wstrCommandLine.Buffer = __malloc(wstrCommandLine.MaximumLength); + } + else + { + wstrCommandLine.Buffer = + __realloc(wstrCommandLine.Buffer, wstrCommandLine.MaximumLength); + } + + /* buffer tail */ + pwcBufferTail = + (PWCHAR)((ULONG)wstrCommandLine.Buffer + wstrCommandLine.Length); + + /* append the separator if the argument isn't the first */ + if(!bFirstArg) + { + *pwcBufferTail = L' '; + pwcBufferTail ++; + } + + /* append the opening quote if the argument contains spaces */ + if(bQuoteArg) + { + *pwcBufferTail = L'"'; + pwcBufferTail ++; + } + + mbstowcs(pwcBufferTail, strArgument.Buffer, strArgument.Length); + + /* append closing quote */ + if(bQuoteArg) + { + pwcBufferTail = (PWCHAR)((ULONG)pwcBufferTail + strArgument.Length * sizeof(WCHAR)); + *pwcBufferTail = L'"'; + } + + wstrCommandLine.Length = wstrCommandLine.MaximumLength; + } + } + + nErrCode = RtlCreateProcessParameters + ( + ProcessParameters, + ImageFile, + NULL, + &wstrEmpty, + &wstrCommandLine, + 0, + &wstrEmpty, + &wstrEmpty, + &wstrEmpty, + &wstrEmpty + ); + + /* standard input handle */ + fdDescriptor = __fdtable_entry_get(&ProcessData->FdTable, STDIN_FILENO); + + if(fdDescriptor != NULL) + (*ProcessParameters)->hStdInput = fdDescriptor->FileHandle; + + /* standard output handle */ + fdDescriptor = __fdtable_entry_get(&ProcessData->FdTable, STDOUT_FILENO); + + if(fdDescriptor != NULL) + (*ProcessParameters)->hStdOutput = fdDescriptor->FileHandle; + + /* standard error handle */ + fdDescriptor = __fdtable_entry_get(&ProcessData->FdTable, STDERR_FILENO); + + if(fdDescriptor != NULL) + (*ProcessParameters)->hStdError = fdDescriptor->FileHandle; + + /* POSIX+ and NT environments are incompatible, we set the environment to + nothing */ + (*ProcessParameters)->Environment = NULL; + +/* +typedef struct _RTL_USER_PROCESS_PARAMETERS { + ULONG AllocationSize; + ULONG Size; + ULONG Flags; + ULONG DebugFlags; + HANDLE hConsole; + ULONG ProcessGroup; + HANDLE hStdInput; + HANDLE hStdOutput; + HANDLE hStdError; + UNICODE_STRING CurrentDirectoryName; + HANDLE CurrentDirectoryHandle; + UNICODE_STRING DllPath; + UNICODE_STRING ImagePathName; + UNICODE_STRING CommandLine; + PWSTR Environment; + ULONG dwX; + ULONG dwY; + ULONG dwXSize; + ULONG dwYSize; + ULONG dwXCountChars; + ULONG dwYCountChars; + ULONG dwFillAttribute; + ULONG dwFlags; + ULONG wShowWindow; + UNICODE_STRING WindowTitle; + UNICODE_STRING DesktopInfo; + UNICODE_STRING ShellInfo; + UNICODE_STRING RuntimeInfo; +} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS; + */ + (*ProcessParameters)->hConsole = (PVOID)-1; + (*ProcessParameters)->Flags = 0; + + return (STATUS_SUCCESS); +} + +/* serialize a process data block in a contiguous, page-aligned block, suitable + for transfer across processes */ +NTSTATUS +STDCALL +__PdxSerializeProcessData +( + IN __PPDX_PDATA ProcessData, + OUT __PPDX_SERIALIZED_PDATA *SerializedProcessData +) +{ + __PPDX_SERIALIZED_PDATA pspdProcessData = 0; + NTSTATUS nErrCode; + PBYTE pBufferTail; + ULONG ulAllocSize = sizeof(__PDX_SERIALIZED_PDATA) - 1; + size_t *pnArgLengths; + size_t *pnEnvVarsLengths; + int nEnvVarsCount; + int i; + + /* calculate buffer length */ + /* FIXME please! this is the most inefficient way to do it */ + + /* argv */ + INFO("serializing arguments\n"); + + if(ProcessData->ArgVect != 0) + { + pnArgLengths = __malloc(ProcessData->ArgCount * sizeof(size_t)); + + for(i = 0; i < ProcessData->ArgCount; i ++) + { + int nStrLen; + + if(ProcessData->ArgVect[i] == 0) + { + INFO("argument %d is NULL\n", i); + pnArgLengths[i] = 0; + continue; + } + + nStrLen = strlen(ProcessData->ArgVect[i]) + 1; + ulAllocSize += nStrLen; + pnArgLengths[i] = nStrLen; + + INFO + ( + "argument %d: \"%s\", length %d\n", + i, + ProcessData->ArgVect[i], + nStrLen + ); + } + + } + else + INFO("arguments vector is NULL\n"); + + /* environ */ + pnEnvVarsLengths = NULL; + nEnvVarsCount = 0; + + if(ProcessData->Environment == 0) + INFO("pointer to environ is NULL\n"); + else if((ProcessData->Environment) == 0) + INFO("environ is NULL\n"); + else + { + for(i = 0; *(ProcessData->Environment)[i] != 0; i++) + { + int nStrLen = strlen(*(ProcessData->Environment)[i]) + 1; + ulAllocSize += nStrLen; + + nEnvVarsCount ++; + __realloc(pnEnvVarsLengths, nEnvVarsCount * sizeof(size_t)); + pnEnvVarsLengths[i] = nStrLen; + + INFO + ( + "environment variable %d: \"%s\", length %d\n", + i, + *(ProcessData->Environment)[i], + nStrLen + ); + } + + INFO("(%d environment variables were found)\n", nEnvVarsCount); + } + + /* current directory */ + ulAllocSize += ProcessData->CurDir.Length; + + INFO + ( + "current directory: \"%.*ls\"\n", + ProcessData->CurDir.Length / sizeof(WCHAR), + ProcessData->CurDir.Buffer + ); + + /* root directory */ + ulAllocSize += ProcessData->RootPath.Length; + + INFO + ( + "root directory: \"%.*ls\"\n", + ProcessData->RootPath.Length / sizeof(WCHAR), + ProcessData->RootPath.Buffer + ); + + /* file descriptors table */ + ulAllocSize += sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors; + INFO + ( + "descriptors table contains %d allocated descriptors, combined length %d\n", + ProcessData->FdTable.AllocatedDescriptors, + sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors + ); + + /* extra descriptors data */ + for(i = 0; ProcessData->FdTable.AllocatedDescriptors; i ++) + if(ProcessData->FdTable.Descriptors[i].ExtraData != NULL) + { + ulAllocSize += ProcessData->FdTable.Descriptors[i].ExtraDataSize; + + INFO + ( + "descriptor %d has %d bytes of associated data\n", + i, + ProcessData->FdTable.Descriptors[i].ExtraDataSize + ); + + } + + /* allocate return block */ + INFO("about to allocate %d bytes\n", ulAllocSize); + + nErrCode = NtAllocateVirtualMemory + ( + NtCurrentProcess(), + (PVOID *)&pspdProcessData, + 0, + &ulAllocSize, + MEM_COMMIT, + PAGE_READWRITE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtAllocateVirtualMemory() failed with status 0x%08X\n", nErrCode); + __free(pnArgLengths); + __free(pnEnvVarsLengths); + *SerializedProcessData = 0; + return nErrCode; + } + + INFO("%d bytes actually allocated\n", ulAllocSize); + pspdProcessData->AllocSize = ulAllocSize; + + /* copy data */ + /* static data */ + memcpy(&pspdProcessData->ProcessData, ProcessData, sizeof(__PDX_PDATA)); + + /* buffers */ + pBufferTail = &pspdProcessData->Buffer[0]; + INFO("buffer tail begins at 0x%08X\n", pBufferTail); + + /* argv */ + pspdProcessData->ProcessData.ArgVect = 0; + + for(i = 0; i < ProcessData->ArgCount; i ++) + { + INFO + ( + "copying %d bytes of argument %d (\"%s\") to 0x%08X\n", + pnArgLengths[i], + i, + ProcessData->ArgVect[i], + pBufferTail + ); + + strncpy(pBufferTail, ProcessData->ArgVect[i], pnArgLengths[i]); + pBufferTail += pnArgLengths[i]; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + pnArgLengths[i], + pBufferTail + ); + + } + + __free(pnArgLengths); + + /* environ */ + pspdProcessData->ProcessData.Environment = (char ***)nEnvVarsCount; + + for(i = 0; i < nEnvVarsCount; i ++) + { + INFO + ( + "copying %d bytes of environment variable %d (\"%s\") to 0x%08X\n", + pnEnvVarsLengths[i], + i, + ProcessData->Environment[i], + pBufferTail + ); + + strncpy(pBufferTail, *ProcessData->Environment[i], pnEnvVarsLengths[i]); + pBufferTail += pnEnvVarsLengths[i]; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + pnEnvVarsLengths[i], + pBufferTail + ); + } + + __free(pnEnvVarsLengths); + + /* current directory */ + INFO + ( + "copying %d bytes of current directory (\"%.*ls\") to 0x%08X\n", + ProcessData->CurDir.Length, + ProcessData->CurDir.Length / sizeof(WCHAR), + ProcessData->CurDir.Buffer, + pBufferTail + ); + + memcpy(pBufferTail, ProcessData->CurDir.Buffer, ProcessData->CurDir.Length); + pBufferTail += ProcessData->CurDir.Length; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + ProcessData->CurDir.Length, + pBufferTail + ); + + /* root directory */ + INFO + ( + "copying %d bytes of root directory (\"%.*ls\") to 0x%08X\n", + ProcessData->RootPath.Length, + ProcessData->RootPath.Length / sizeof(WCHAR), + ProcessData->RootPath.Buffer, + pBufferTail + ); + + memcpy + ( + pBufferTail, + ProcessData->RootPath.Buffer, + ProcessData->RootPath.Length + ); + + pBufferTail += ProcessData->RootPath.Length; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + ProcessData->RootPath.Length, + pBufferTail + ); + + /* file descriptors table */ + /* save the offset to the descriptors array */ + pspdProcessData->ProcessData.FdTable.Descriptors = + (PVOID)((ULONG)pBufferTail - (ULONG)pspdProcessData); + + INFO + ( + "descriptors table contains %d allocated descriptors, combined length %d\n", + ProcessData->FdTable.AllocatedDescriptors, + sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors + ); + + memcpy + ( + pBufferTail, + ProcessData->FdTable.Descriptors, + sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors + ); + + pBufferTail += + sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + sizeof(__fildes_t) * ProcessData->FdTable.AllocatedDescriptors, + pBufferTail + ); + + /* extra descriptors data */ + for(i = 0; ProcessData->FdTable.AllocatedDescriptors; i ++) + if(ProcessData->FdTable.Descriptors[i].ExtraData != 0) + { + INFO + ( + "descriptor %d has %d bytes of associated data\n", + i, + ProcessData->FdTable.Descriptors[i].ExtraDataSize + ); + + memcpy + ( + pBufferTail, + ProcessData->FdTable.Descriptors[i].ExtraData, + ProcessData->FdTable.Descriptors[i].ExtraDataSize + ); + + pBufferTail += ProcessData->FdTable.Descriptors[i].ExtraDataSize; + + INFO + ( + "buffer tail increased by %d bytes, new tail at 0x%08X\n", + ProcessData->FdTable.Descriptors[i].ExtraDataSize, + pBufferTail + ); + } + + /* success */ + *SerializedProcessData = pspdProcessData; + + return (STATUS_SUCCESS); +} + +/* unserialize a process data block. Dynamic data will be moved into the default + heap */ +NTSTATUS +STDCALL +__PdxUnserializeProcessData +( + IN OUT __PPDX_SERIALIZED_PDATA *SerializedProcessData, + OUT __PPDX_PDATA *ProcessData OPTIONAL +) +{ + int i; + int nEnvVarsCount; + __PPDX_PDATA ppdReturnBlock; + BOOLEAN bInPlace; + PBYTE pBufferTail; + + /* no return buffer */ + if(NULL == ProcessData) + { + /* perform an in-place conversion */ + ppdReturnBlock = &((*SerializedProcessData)->ProcessData); + bInPlace = TRUE; + } + else + { + /* use the provided return buffer */ + ppdReturnBlock = *ProcessData; + bInPlace = FALSE; + } + + /* non in-place conversion: copy static data */ + if(!bInPlace) + { + memcpy(ppdReturnBlock, *SerializedProcessData, sizeof(*ppdReturnBlock)); + } + + pBufferTail = &((*SerializedProcessData)->Buffer[0]); + + /* allocate arguments array */ + ppdReturnBlock->ArgVect = __malloc(ppdReturnBlock->ArgCount * sizeof(char *)); + + /* duplicate arguments */ + for(i = 0; i < ppdReturnBlock->ArgCount; i ++) + { + int nStrLen = strlen(pBufferTail) + 1; + ppdReturnBlock->ArgVect[i] = __malloc(nStrLen); + strncpy(ppdReturnBlock->ArgVect[i], pBufferTail, nStrLen); + pBufferTail += nStrLen; + } + + /* allocate environment array */ + nEnvVarsCount = ppdReturnBlock->Environment; + ppdReturnBlock->Environment = __malloc(nEnvVarsCount * sizeof(char *)); + + /* duplicate environment */ + for(i = 0; i < nEnvVarsCount; i ++) + { + int nStrLen = strlen(pBufferTail) + 1; + ppdReturnBlock->Environment[i] = __malloc(nStrLen); + strncpy(ppdReturnBlock->Environment[i], pBufferTail, nStrLen); + pBufferTail += nStrLen; + } + + /* static buffer for path conversions */ + ppdReturnBlock->NativePathBuffer.Buffer = __malloc(0xFFFF); + ppdReturnBlock->NativePathBuffer.Length = 0; + ppdReturnBlock->NativePathBuffer.MaximumLength = 0xFFFF; + + /* current directory */ + ppdReturnBlock->CurDir.Buffer = __malloc(ppdReturnBlock->CurDir.Length); + ppdReturnBlock->CurDir.MaximumLength = ppdReturnBlock->CurDir.Length; + memcpy(ppdReturnBlock->CurDir.Buffer, pBufferTail, ppdReturnBlock->CurDir.Length); + pBufferTail += ppdReturnBlock->CurDir.Length; + + /* root directory */ + ppdReturnBlock->RootPath.Buffer = __malloc(ppdReturnBlock->RootPath.Length); + ppdReturnBlock->RootPath.MaximumLength = ppdReturnBlock->RootPath.Length; + memcpy(ppdReturnBlock->RootPath.Buffer, pBufferTail, ppdReturnBlock->RootPath.Length); + pBufferTail += ppdReturnBlock->RootPath.Length; + + /* file descriptors table */ + ppdReturnBlock->FdTable.Descriptors = __malloc(ppdReturnBlock->FdTable.AllocatedDescriptors * sizeof(__fildes_t)); + memcpy(ppdReturnBlock->FdTable.Descriptors, pBufferTail, ppdReturnBlock->FdTable.AllocatedDescriptors * sizeof(__fildes_t)); + pBufferTail += ppdReturnBlock->FdTable.AllocatedDescriptors * sizeof(__fildes_t); + + for(i = 0; i < ppdReturnBlock->FdTable.AllocatedDescriptors; i ++) + { + if(ppdReturnBlock->FdTable.Descriptors[i].ExtraData != 0) + { + ppdReturnBlock->FdTable.Descriptors[i].ExtraData = __malloc(ppdReturnBlock->FdTable.Descriptors[i].ExtraDataSize); + memcpy(ppdReturnBlock->FdTable.Descriptors[i].ExtraData, pBufferTail, ppdReturnBlock->FdTable.Descriptors[i].ExtraDataSize); + pBufferTail += ppdReturnBlock->FdTable.Descriptors[i].ExtraDataSize; + } + } +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/safeobj.c b/rossubsys/posix/lib/psxdll/misc/safeobj.c new file mode 100644 index 00000000000..8c4193648fd --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/safeobj.c @@ -0,0 +1,45 @@ +/* $Id: safeobj.c,v 1.4 2002/10/29 04:45:33 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/safeobj.c + * PURPOSE: safe checking of user-provided objects + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 09/01/2002: Created + */ + +#include +#include + +int __safeobj_validate(void *obj, __magic_t refsignature) +{ + if(obj == 0) + return (0); + else + { + /* cast the object to a magic number */ + __magic_t mSignature = *((__magic_t *)obj); + + ERRIF + ( + mSignature != refsignature, + "invalid object at %X: signature is \"%c%c%c%c\", should be \"%c%c%c%c\"", + obj, + MAGIC_DECOMPOSE(refsignature), + MAGIC_DECOMPOSE(mSignature) + ); + + if(mSignature == refsignature) + /* signatures match: ok */ + return (-1); + else + /* signatures mismatch: fail */ + return (0); + + } +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/spawn.c b/rossubsys/posix/lib/psxdll/misc/spawn.c new file mode 100644 index 00000000000..4ac8e6c4ade --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/spawn.c @@ -0,0 +1,630 @@ +/* $Id: spawn.c,v 1.9 2002/12/26 18:14:36 robd Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/spawn.c + * PURPOSE: Create the first POSIX+ process + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 25/02/2002: Created + */ + +/* + * NOTE by KJK::Hyperion: + * The __PdxSpawnPosixProcess() call solves the chicken-egg dilemma of + * creating the first POSIX+ process in a group without the ability to + * fork+exec (for example from inside a Win32 process). Processes created by + * __PdxSpawnPosixProcess() will *not* inherit anything from the parent, not + * even handles: all creation parameters have to be specified explicitely + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +typedef struct _PORT_MESSAGE { + USHORT DataSize; + USHORT MessageSize; + USHORT MessageType; + USHORT VirtualRangesOffset; + CLIENT_ID ClientId; + ULONG MessageId; + ULONG SectionSize; + // UCHAR Data[]; +} PORT_MESSAGE, *PPORT_MESSAGE; + +NTSTATUS STDCALL CsrClientCallServer( + IN PVOID Message, + IN PVOID Unknown, + IN ULONG Opcode, + IN ULONG Size +); + +NTSTATUS STDCALL __PdxSpawnPosixProcess +( + OUT PHANDLE ProcessHandle, + OUT PHANDLE ThreadHandle, + IN POBJECT_ATTRIBUTES FileObjectAttributes, + IN POBJECT_ATTRIBUTES ProcessObjectAttributes, + IN HANDLE InheritFromProcessHandle, + IN __PPDX_PDATA ProcessData +) +{ + struct CSRSS_MESSAGE { + ULONG Unknown1; + ULONG Opcode; + ULONG Status; + ULONG Unknown2; + }; + + struct __tagcsrmsg{ + PORT_MESSAGE PortMessage; + struct CSRSS_MESSAGE CsrssMessage; + PROCESS_INFORMATION ProcessInformation; + CLIENT_ID Debugger; + ULONG CreationFlags; + ULONG VdmInfo[2]; + } csrmsg; + + __PPDX_SERIALIZED_PDATA pspdProcessData; + IO_STATUS_BLOCK isbStatus; + PROCESS_BASIC_INFORMATION pbiProcessInfo; + INITIAL_TEB itInitialTeb; + PRTL_USER_PROCESS_PARAMETERS pppProcessParameters; + SECTION_IMAGE_INFORMATION siiInfo; + CONTEXT ctxThreadContext; + CLIENT_ID ciClientId; + NTSTATUS nErrCode; + HANDLE hExeFile; + HANDLE hExeImage; + HANDLE hProcess; + PVOID pPdataBuffer = 0; + PVOID pParamsBuffer = 0; + ULONG nDestBufferSize; + ULONG nCurFilDesOffset; + ULONG nVirtualSize; + ULONG nCommitSize; + PVOID pCommitBottom; + ULONG nOldProtect; + int i; + + /* STEP 1: map executable image in memory */ + /* 1.1: open the file for execution */ + nErrCode = NtOpenFile + ( + &hExeFile, + SYNCHRONIZE | FILE_EXECUTE, + FileObjectAttributes, + &isbStatus, + FILE_SHARE_READ | FILE_SHARE_DELETE, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtOpenFile() failed with status 0x%08X\n", nErrCode); + return (nErrCode); + } + + /* 1.2: create an image section for the file */ + nErrCode = NtCreateSection + ( + &hExeImage, + SECTION_ALL_ACCESS, + NULL, + 0, + PAGE_EXECUTE, + SEC_IMAGE, + hExeFile + ); + + /* close file handle (not needed anymore) */ + NtClose(hExeFile); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateSection() failed with status 0x%08X\n", nErrCode); + return (nErrCode); + } + + /* 1.3: get section image information */ + nErrCode = NtQuerySection + ( + hExeImage, + SectionImageInformation, + &siiInfo, + sizeof(siiInfo), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateSection() failed with status 0x%08X\n", nErrCode); + NtClose(hExeImage); + return (nErrCode); + } + + /* STEP 2: create process */ + nErrCode = NtCreateProcess + ( + &hProcess, + PROCESS_ALL_ACCESS, + ProcessObjectAttributes, + InheritFromProcessHandle, + FALSE, + hExeImage, + NULL, + NULL + ); + + /* close image handle (not needed anymore) */ + NtClose(hExeImage); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateProcess() failed with status 0x%08X\n", nErrCode); + return (nErrCode); + } + + /* STEP 3: write process environment and process parameters */ + /* 3.1: convert process data into process parameters */ + __PdxProcessDataToProcessParameters + ( + &pppProcessParameters, + ProcessData, + FileObjectAttributes->ObjectName + ); + + /* 3.2: serialize the process data for transfer */ + /* FIXME: the serialized data can be allocated and written directly in the + destination process */ + __PdxSerializeProcessData(ProcessData, &pspdProcessData); + + /* 3.2.1: adjust some fields */ + pspdProcessData->ProcessData.Spawned = TRUE; + + /* 3.3: allocate memory in the destination process */ + /* 3.3.1: process data */ + nDestBufferSize = pspdProcessData->AllocSize; + + nErrCode = NtAllocateVirtualMemory + ( + hProcess, + &pPdataBuffer, + 0, + &nDestBufferSize, + MEM_COMMIT, + PAGE_READWRITE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtAllocateVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.3.2: process parameters */ + nDestBufferSize = pppProcessParameters->Size; + + nErrCode = NtAllocateVirtualMemory + ( + hProcess, + &pParamsBuffer, + 0, + &nDestBufferSize, + MEM_COMMIT, + PAGE_READWRITE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtAllocateVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.4: get pointer to the PEB */ + nErrCode = NtQueryInformationProcess + ( + hProcess, + ProcessBasicInformation, + &pbiProcessInfo, + sizeof(pbiProcessInfo), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtQueryInformationProcess() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.5: write pointers in the PEB */ + /* 3.5.1: process data */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + (PVOID)((ULONG)pbiProcessInfo.PebBaseAddress + offsetof(PEB, SubSystemData)), + &pPdataBuffer, + sizeof(PVOID), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.5.2: process parameters */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + (PVOID)((ULONG)pbiProcessInfo.PebBaseAddress + offsetof(PEB, ProcessParameters)), + &pParamsBuffer, + sizeof(PVOID), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.6: write data */ + /* 3.6.1: process data */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + pPdataBuffer, + pspdProcessData, + pspdProcessData->AllocSize, + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + + /* 3.6.2 process parameters */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + pParamsBuffer, + pppProcessParameters, + pppProcessParameters->Size, + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto undoPData; + } + +undoPData: + /* deallocate the temporary data block in the current process */ + NtFreeVirtualMemory + ( + NtCurrentProcess(), + (PVOID *)&pspdProcessData, + 0, + MEM_RELEASE + ); + + /* destroy process parameters */ + RtlDestroyProcessParameters(pppProcessParameters); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + goto failProcess; + + /* STEP 4: duplicate handles */ + /* 4.1: handles in the structure itself */ + /* 4.1.1: root directory */ + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + ProcessData->RootHandle, + hProcess, + (PHANDLE)((ULONG)pPdataBuffer + offsetof(__PDX_PDATA, RootHandle)), + 0, + 0, + DUPLICATE_SAME_ACCESS | 4 /* | DUPLICATE_SAME_ATTRIBUTES */ /* FIXME */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtDuplicateObject() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* 4.2: file descriptors table */ + for + ( + /* pspdProcessData->ProcessData.FdTable.Descriptors contains the offset to + the descriptors array inside pspdProcessData->Buffer[], that is to the + first element of the array */ + i = 0, + nCurFilDesOffset = (ULONG)pspdProcessData->ProcessData.FdTable.Descriptors; + /* iterate through all allocated descriptors */ + i < ProcessData->FdTable.AllocatedDescriptors; + /* at every step, go on to next input descriptor, and increase the offset to + the next output descriptor */ + i ++, nCurFilDesOffset += sizeof(__fildes_t) + ) + /* FIXME? check the table's bitmap instead? */ + if(ProcessData->FdTable.Descriptors[i].FileHandle != NULL) + { + /* duplicate the source handle, ProcessData->FdTable.Descriptors[i], from + the current process into the process identified by hProcess, at an + address calculated by adding to the serialized data block base address: + - the offset to the current descriptor + - the offset to the handle field of the descriptor */ + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + ProcessData->FdTable.Descriptors[i].FileHandle, + hProcess, + (PHANDLE)( + (ULONG)pPdataBuffer + nCurFilDesOffset + offsetof(__fildes_t, FileHandle) + ), + 0, + 0, + DUPLICATE_SAME_ACCESS | 4 /* | DUPLICATE_SAME_ATTRIBUTES */ /* FIXME */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtDuplicateObject() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* duplicate standard handles */ + /* standard input */ + if(i == STDIN_FILENO) + { + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + ProcessData->FdTable.Descriptors[i].FileHandle, + hProcess, + (PHANDLE)((ULONG)pParamsBuffer + offsetof(RTL_USER_PROCESS_PARAMETERS, hStdInput)), + 0, + 0, + DUPLICATE_SAME_ACCESS | 4 /* | DUPLICATE_SAME_ATTRIBUTES */ /* FIXME */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtDuplicateObject() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + } + /* standard output */ + else if(i == STDOUT_FILENO) + { + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + ProcessData->FdTable.Descriptors[i].FileHandle, + hProcess, + (PHANDLE)((ULONG)pParamsBuffer + offsetof(RTL_USER_PROCESS_PARAMETERS, hStdOutput)), + 0, + 0, + DUPLICATE_SAME_ACCESS | 4 /* | DUPLICATE_SAME_ATTRIBUTES */ /* FIXME */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtDuplicateObject() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + } + /* standard error */ + else if(i == STDERR_FILENO) + { + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + ProcessData->FdTable.Descriptors[i].FileHandle, + hProcess, + (PHANDLE)((ULONG)pParamsBuffer + offsetof(RTL_USER_PROCESS_PARAMETERS, hStdError)), + 0, + 0, + DUPLICATE_SAME_ACCESS | 4 /* | DUPLICATE_SAME_ATTRIBUTES */ /* FIXME */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtDuplicateObject() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + } + } + + /* STEP 5: create first thread */ + /* 5.1: set up the stack */ + itInitialTeb.StackAllocate = NULL; + nVirtualSize = 0x100000; + nCommitSize = 0x100000 - PAGE_SIZE; + + /* 5.1.1: reserve the stack */ + nErrCode = NtAllocateVirtualMemory + ( + hProcess, + &itInitialTeb.StackAllocate, + 0, + &nVirtualSize, + MEM_RESERVE, + PAGE_READWRITE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtAllocateVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + itInitialTeb.StackBase = + (PVOID)((ULONG)itInitialTeb.StackAllocate + nVirtualSize); + + itInitialTeb.StackLimit = + (PVOID)((ULONG)itInitialTeb.StackBase - nCommitSize); + + /* 5.1.2: commit the stack */ + nVirtualSize = nCommitSize + PAGE_SIZE; + pCommitBottom = + (PVOID)((ULONG)itInitialTeb.StackBase - nVirtualSize); + + nErrCode = NtAllocateVirtualMemory + ( + hProcess, + &pCommitBottom, + 0, + &nVirtualSize, + MEM_COMMIT, + PAGE_READWRITE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtAllocateVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* 5.1.3: set up the guard page */ + nVirtualSize = PAGE_SIZE; + + nErrCode = NtProtectVirtualMemory + ( + hProcess, + &pCommitBottom, + &nVirtualSize, + PAGE_GUARD | PAGE_READWRITE, + &nOldProtect + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtProtectVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* 5.2: initialize the thread context */ + memset(&ctxThreadContext, 0, sizeof(ctxThreadContext)); + + ctxThreadContext.Eip = (ULONG)siiInfo.EntryPoint; + ctxThreadContext.SegGs = USER_DS; + ctxThreadContext.SegFs = USER_DS; + ctxThreadContext.SegEs = USER_DS; + ctxThreadContext.SegDs = USER_DS; + ctxThreadContext.SegCs = USER_CS; + ctxThreadContext.SegSs = USER_DS; + ctxThreadContext.Esp = (ULONG)itInitialTeb.StackBase - 4; + ctxThreadContext.EFlags = (1 << 1) + (1 << 9); + + /* 5.3: create the thread object */ + nErrCode = NtCreateThread + ( + ThreadHandle, + THREAD_ALL_ACCESS, + NULL, + hProcess, + &ciClientId, + &ctxThreadContext, + &itInitialTeb, + TRUE /* FIXME: the thread is only created in suspended state for easier + debugging. This behavior is subject to future changes */ + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateThread() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* 6: register the process with the Win32 subsystem (temporary code for + debugging purposes) */ + + memset(&csrmsg, 0, sizeof(csrmsg)); + + //csrmsg.PortMessage = {0}; + //csrmsg.CsrssMessage = {0}; + csrmsg.ProcessInformation.hProcess = hProcess; + csrmsg.ProcessInformation.hThread = *ThreadHandle; + csrmsg.ProcessInformation.dwProcessId = (DWORD)ciClientId.UniqueProcess; + csrmsg.ProcessInformation.dwThreadId = (DWORD)ciClientId.UniqueThread; + //csrmsg.Debugger = {0}; + //csrmsg.CreationFlags = 0; + //csrmsg.VdmInfo = {0}; + + nErrCode = CsrClientCallServer(&csrmsg, 0, 0x10000, 0x24); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("CsrClientCallServer() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + nErrCode = NtResumeThread(*ThreadHandle, NULL); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtResumeThread() failed with status 0x%08X\n", nErrCode); + goto failProcess; + } + + /* success */ + return (STATUS_SUCCESS); + + /* failure */ +failProcess: + NtTerminateProcess + ( + hProcess, + nErrCode + ); + + return (nErrCode); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/template.c b/rossubsys/posix/lib/psxdll/misc/template.c new file mode 100644 index 00000000000..42acc5744ff --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/template.c @@ -0,0 +1,25 @@ +/* $Id: template.c,v 1.5 2002/10/29 04:45:35 rex Exp $ + How to create a new source file from this template: + - copy the template in the new file (never edit this file directly, unless + that's what you want) + - search for the string "EDITME" in the file, and follow the instructions + - remove this comment block, all blocks containing DELETEME, and all EDITME + instructions + - save your file, and Have Fun! (TM) + */ +/* $*Id*$ (EDITME: remove asterisks from "$*Id*$") + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: (EDITME: put real path of the file here) + * PURPOSE: (EDITME: put a very syntetic description of the file here) + * PROGRAMMER: John Doe (EDITME: your name and e-mail go here) + * UPDATE HISTORY: + * (EDITME: put here the creation date): Created + */ + +/* EDITME: your code here */ + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/misc/tls.c b/rossubsys/posix/lib/psxdll/misc/tls.c new file mode 100644 index 00000000000..2ea238c9370 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/misc/tls.c @@ -0,0 +1,89 @@ +/* $Id: tls.c,v 1.3 2002/10/29 04:45:35 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/misc/tls.c + * PURPOSE: Thread local storage + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 30/04/2002: Created + */ + +#include +#include +#include +#include + +__tls_index_t __tls_alloc() +{ + ULONG nIndex; + + RtlAcquirePebLock(); + + nIndex = RtlFindClearBitsAndSet(NtCurrentPeb()->TlsBitmap, 1, 0); + + if (nIndex == (ULONG)-1) + errno = ENOMEM; + else + NtCurrentTeb()->TlsSlots[nIndex] = 0; + + RtlReleasePebLock(); + + return(nIndex); + +} + +int __tls_free(__tls_index_t index) +{ + if (index >= TLS_MINIMUM_AVAILABLE) + { + errno = ERANGE; + return (-1); + } + + RtlAcquirePebLock(); + + if(RtlAreBitsSet(NtCurrentPeb()->TlsBitmap, index, 1)) + { + NtSetInformationThread + ( + NtCurrentThread(), + ThreadZeroTlsCell, + &index, + sizeof(DWORD) + ); + + RtlClearBits(NtCurrentPeb()->TlsBitmap, index, 1); + } + + RtlReleasePebLock(); + + return (0); +} + +void * __tls_get_val(__tls_index_t index) +{ + if(index >= TLS_MINIMUM_AVAILABLE) + { + errno = ERANGE; + return (0); + } + + return (NtCurrentTeb()->TlsSlots[index]); +} + +int __tls_put_val(__tls_index_t index, void * data) +{ + if(index >= TLS_MINIMUM_AVAILABLE) + { + errno = ERANGE; + return (-1); + } + + NtCurrentTeb()->TlsSlots[index] = data; + return (0); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/psxdll.def b/rossubsys/posix/lib/psxdll/psxdll.def new file mode 100644 index 00000000000..b40e1208b3c --- /dev/null +++ b/rossubsys/posix/lib/psxdll/psxdll.def @@ -0,0 +1,229 @@ +; $Id: psxdll.def,v 1.11 2003/08/22 13:55:15 ea Exp $ +; +; ReactOS POSIX+ Client Library +; + +LIBRARY PSXDLL.DLL +EXPORTS + +;ctype +isalnum +isalpha +iscntrl +isdigit +isgraph +islower +isprint +ispunct +isspace +isupper +iswalpha +iswctype +iswdigit +iswlower +iswspace +iswxdigit +isxdigit +tolower +toupper +towlower +towupper + +;dirent +opendir +readdir +closedir + +;dlfcn +dlopen +dlclose +dlsym +dlerror + +;errno +__PdxGetThreadErrNum + +;fcntl +open +creat +fcntl + +;libgen +basename + +;math +atan +ceil +cos +fabs +floor +log +pow +sin +sqrt +tan + +;misc +;misc/fdtable +__fdtable_init +__fdtable_free +__fdtable_entry_nextavail +__fdtable_entry_add +__fdtable_entry_remove +__fdtable_entry_get +;misc/heap +;for Microsoft POSIX and Interix compatibility +GetProcessHeap@0 +HeapAlloc +HeapFree +HeapReAlloc +HeapSize +;misc/init +__PdxInitializeData@8 +;misc/path +__PdxPosixPathGetNextComponent_A +__PdxPosixPathGetNextComponent_U +__PdxPosixPathResolve_A +__PdxPosixPathResolve_U +__PdxPosixPathNameToNtPathName +;misc/safeobj +__safeobj_validate +;misc/spawn +__PdxSpawnPosixProcess@24 + +;pthread +pthread_create +pthread_exit +pthread_join +pthread_mutex_destroy +pthread_mutex_init +pthread_mutex_lock +pthread_mutex_trylock +pthread_mutex_unlock +pthread_mutex_getprioceiling +pthread_mutex_setprioceiling +pthread_mutexattr_destroy +pthread_mutexattr_getpshared +pthread_mutexattr_init +pthread_mutexattr_setpshared +pthread_mutexattr_gettype +pthread_mutexattr_settype +pthread_mutexattr_getprioceiling +pthread_mutexattr_getprotocol +pthread_mutexattr_setprioceiling +pthread_mutexattr_setprotocol + +;sched +sched_yield + +;signal +pthread_kill +raise + +;stdio +;temporary forward exports, soon to be changed +printf +gets + +;stdlib +abs +abort +atoi +atol +malloc +mbstowcs +realloc +free +calloc +exit +;FIXME: should the two calls be distinct? +_exit + +;string +;forward-exports to NTDLL +memchr +memcmp +memcpy +memmove +memset +strcat +strchr +strcmp +strcpy +strcspn +strlen +strncat +strncmp +strncpy +strpbrk +strrchr +strspn +strstr +;implemented internally +strdup + +;sys/stat +chmod +fchmod +fstat +lstat +mkdir +mkfifo +mknod +stat +umask + +;sys/utsname +uname + +;unistd +access +close +dup +dup2 +fork +getcwd +getpid +getppid +pread +read +sleep +write + +;wchar +;forward-exports to NTDLL +wcscat +wcschr +wcscmp +wcscpy +wcscspn +wcslen +wcsncat +wcsncmp +wcsncpy +wcspbrk +wcsrchr +wcsspn +wcsstr +wcstol +wcstombs +wcstoul +;implemented internally + +;others (FIXME: cathegorize these calls) +RtlAnsiCharToUnicodeChar +RtlFillMemory +RtlMoveMemory +RtlMultiByteToUnicodeN +RtlNtStatusToPsxErrno +RtlUnicodeToMultiByteN +RtlUnicodeToMultiByteSize +RtlUnwind +RtlUpcaseUnicodeChar +RtlUpcaseUnicodeToMultiByteN +RtlZeroMemory + +;WARNING: PRELIMINARY CODE FOR DEBUGGING PURPOSES ONLY - DO NOT CHANGE +__PdxGetProcessData + +;EOF diff --git a/rossubsys/posix/lib/psxdll/psxdll.edf b/rossubsys/posix/lib/psxdll/psxdll.edf new file mode 100644 index 00000000000..f13da80fc1b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/psxdll.edf @@ -0,0 +1,229 @@ +; $Id: psxdll.edf,v 1.10 2003/08/22 13:55:15 ea Exp $ +; +; ReactOS POSIX+ Client Library +; + +LIBRARY PSXDLL.DLL +EXPORTS + +;ctype +isalnum=NTDLL.isalnum +isalpha=NTDLL.isalpha +iscntrl=NTDLL.iscntrl +isdigit=NTDLL.isdigit +isgraph=NTDLL.isgraph +islower=NTDLL.islower +isprint=NTDLL.isprint +ispunct=NTDLL.ispunct +isspace=NTDLL.isspace +isupper=NTDLL.isupper +iswalpha=NTDLL.iswalpha +iswctype=NTDLL.iswctype +iswdigit=NTDLL.iswdigit +iswlower=NTDLL.iswlower +iswspace=NTDLL.iswspace +iswxdigit=NTDLL.iswxdigit +isxdigit=NTDLL.isxdigit +tolower=NTDLL.tolower +toupper=NTDLL.toupper +towlower=NTDLL.towlower +towupper=NTDLL.towupper + +;dirent +opendir=opendir +readdir=readdir +closedir=closedir + +;dlfcn +dlopen=dlopen +dlclose=dlclose +dlsym=dlsym +dlerror=dlerror + +;errno +__PdxGetThreadErrNum=__PdxGetThreadErrNum + +;fcntl +open=open +creat=creat +fcntl=fcntl + +;libgen +basename=basename + +;math +atan=NTDLL.atan +ceil=NTDLL.ceil +cos=NTDLL.cos +fabs=NTDLL.fabs +floor=NTDLL.floor +log=NTDLL.log +pow=NTDLL.pow +sin=NTDLL.sin +sqrt=NTDLL.sqrt +tan=NTDLL.tan + +;misc +;misc/fdtable +__fdtable_init=__fdtable_init +__fdtable_free=__fdtable_free +__fdtable_entry_nextavail=__fdtable_entry_nextavail +__fdtable_entry_add=__fdtable_entry_add +__fdtable_entry_remove=__fdtable_entry_remove +__fdtable_entry_get=__fdtable_entry_get +;misc/heap +;for Microsoft POSIX and Interix compatibility +GetProcessHeap=GetProcessHeap@0 +HeapAlloc=NTDLL.RtlAllocateHeap +HeapFree=NTDLL.RtlFreeHeap +HeapReAlloc=NTDLL.ReAllocateHeap +HeapSize=NTDLL.RtlSizeHeap +;misc/init +__PdxInitializeData=__PdxInitializeData@8 +;misc/path +__PdxPosixPathGetNextComponent_A=__PdxPosixPathGetNextComponent_A +__PdxPosixPathGetNextComponent_U=__PdxPosixPathGetNextComponent_U +__PdxPosixPathResolve_A=__PdxPosixPathResolve_A +__PdxPosixPathResolve_U=__PdxPosixPathResolve_U +__PdxPosixPathNameToNtPathName=__PdxPosixPathNameToNtPathName +;misc/safeobj +__safeobj_validate=__safeobj_validate +;misc/spawn +__PdxSpawnPosixProcess=__PdxSpawnPosixProcess@24 + +;pthread +pthread_create=pthread_create +pthread_exit=pthread_exit +pthread_join=pthread_join +pthread_mutex_destroy=pthread_mutex_destroy +pthread_mutex_init=pthread_mutex_init +pthread_mutex_lock=pthread_mutex_lock +pthread_mutex_trylock=pthread_mutex_trylock +pthread_mutex_unlock=pthread_mutex_unlock +pthread_mutex_getprioceiling=pthread_mutex_getprioceiling +pthread_mutex_setprioceiling=pthread_mutex_setprioceiling +pthread_mutexattr_destroy=pthread_mutexattr_destroy +pthread_mutexattr_getpshared=pthread_mutexattr_getpshared +pthread_mutexattr_init=pthread_mutexattr_init +pthread_mutexattr_setpshared=pthread_mutexattr_setpshared +pthread_mutexattr_gettype=pthread_mutexattr_gettype +pthread_mutexattr_settype=pthread_mutexattr_settype +pthread_mutexattr_getprioceiling=pthread_mutexattr_getprioceiling +pthread_mutexattr_getprotocol=pthread_mutexattr_getprotocol +pthread_mutexattr_setprioceiling=pthread_mutexattr_setprioceiling +pthread_mutexattr_setprotocol=pthread_mutexattr_setprotocol + +;sched +sched_yield=sched_yield + +;signal +pthread_kill=pthread_kill +raise=raise + +;stdio +;temporary forward exports, soon to be changed +printf=MSVCRT.printf +gets=MSVCRT.gets + +;stdlib +abs=NTDLL.abs +abort=abort +atoi=NTDLL.atoi +atol=NTDLL.atol +malloc=malloc +mbstowcs=NTDLL.mbstowcs +realloc=realloc +free=free +calloc=calloc +exit=exit +;FIXME: should the two calls be distinct? +_exit=exit + +;string +;forward-exports to NTDLL +memchr=NTDLL.memchr +memcmp=NTDLL.memcmp +memcpy=NTDLL.memcpy +memmove=NTDLL.memmove +memset=NTDLL.memset +strcat=NTDLL.strcat +strchr=NTDLL.strchr +strcmp=NTDLL.strcmp +strcpy=NTDLL.strcpy +strcspn=NTDLL.strcspn +strlen=NTDLL.strlen +strncat=NTDLL.strncat +strncmp=NTDLL.strncmp +strncpy=NTDLL.strncpy +strpbrk=NTDLL.strpbrk +strrchr=NTDLL.strrchr +strspn=NTDLL.strspn +strstr=NTDLL.strstr +;implemented internally +strdup + +;sys/stat +chmod=chmod +fchmod=fchmod +fstat=fstat +lstat=lstat +mkdir=mkdir +mkfifo=mkfifo +mknod=mknod +stat=stat +umask=umask + +;sys/utsname +uname=uname + +;unistd +access=access +close=close +dup=dup +dup2=dup2 +fork=fork +getcwd=getcwd +getpid=getpid +getppid=getppid +pread=pread +read=read +sleep=sleep +write=write + +;wchar +;forward-exports to NTDLL +wcscat=NTDLL.wcscat +wcschr=NTDLL.wcschr +wcscmp=NTDLL.wcscmp +wcscpy=NTDLL.wcscpy +wcscspn=NTDLL.wcscspn +wcslen=NTDLL.wcslen +wcsncat=NTDLL.wcsncat +wcsncmp=NTDLL.wcsncmp +wcsncpy=NTDLL.wcsncpy +wcspbrk=NTDLL.wcspbrk +wcsrchr=NTDLL.wcsrchr +wcsspn=NTDLL.wcsspn +wcsstr=NTDLL.wcsstr +wcstol=NTDLL.wcstol +wcstombs=NTDLL.wcstombs +wcstoul=NTDLL.wcstoul +;implemented internally + +;others (FIXME: cathegorize these calls) +RtlAnsiCharToUnicodeChar=NTDLL.RtlAnsiCharToUnicodeChar +RtlFillMemory=NTDLL.RtlFillMemory +RtlMoveMemory=NTDLL.RtlMoveMemory +RtlMultiByteToUnicodeN=NTDLL.RtlMultiByteToUnicodeN +RtlNtStatusToPsxErrno=RtlNtStatusToPsxErrno@4 +RtlUnicodeToMultiByteN=NTDLL.RtlUnicodeToMultiByteN +RtlUnicodeToMultiByteSize=NTDLL.RtlUnicodeToMultiByteSize +RtlUnwind=NTDLL.RtlUnwind +RtlUpcaseUnicodeChar=NTDLL.RtlUpcaseUnicodeChar +RtlUpcaseUnicodeToMultiByteN=NTDLL.RtlUpcaseUnicodeToMultiByteN +RtlZeroMemory=NTDLL.RtlZeroMemory + +;WARNING: PRELIMINARY CODE FOR DEBUGGING PURPOSES ONLY - DO NOT CHANGE +__PdxGetProcessData=__PdxGetProcessData + +;EOF diff --git a/rossubsys/posix/lib/psxdll/psxdll.rc b/rossubsys/posix/lib/psxdll/psxdll.rc new file mode 100644 index 00000000000..250039acbf2 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/psxdll.rc @@ -0,0 +1,39 @@ +/* $Id: psxdll.rc,v 1.5 2003/09/27 21:23:23 ea Exp $ +*/ +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD + PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", RES_STR_COMPANY_NAME + VALUE "FileDescription", "POSIX+ Subsystem Client Library\0" + VALUE "FileVersion", RES_STR_FILE_VERSION + VALUE "InternalName", "psxdll\0" + VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "psxdll.dll\0" + VALUE "ProductName", RES_STR_PRODUCT_NAME + VALUE "ProductVersion", RES_STR_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/rossubsys/posix/lib/psxdll/pthread/.cvsignore b/rossubsys/posix/lib/psxdll/pthread/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/pthread/create.c b/rossubsys/posix/lib/psxdll/pthread/create.c new file mode 100644 index 00000000000..4c6ba991512 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/create.c @@ -0,0 +1,198 @@ +/* $Id: create.c,v 1.5 2002/10/29 04:45:36 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/create.c + * PURPOSE: Thread creation + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include + +/* thread creation code adapted from kernel32's CreateRemoteThread() function */ + +static void __threadentry (void *(*start_routine)(void*), void *arg) +{ + INFO("hello world! thread successfully created"); + + TODO("initialize thread data"); + TODO("notify DLLs"); + TODO("notify psxss"); + + INFO("about to call start routine at %#x with argument %#x", start_routine, arg); + + pthread_exit(start_routine(arg)); +} + +int pthread_create(pthread_t *thread, const pthread_attr_t *attr, + void *(*start_routine)(void*), void *arg) +{ + HANDLE hThread; + OBJECT_ATTRIBUTES oaThreadAttrs; + CLIENT_ID ciId; + CONTEXT cxThreadContext; + INITIAL_TEB itInitialTeb; + BOOLEAN fSuspended; + ULONG nOldPageProtection; + NTSTATUS nErrCode; + + /* initialize generic object attributes */ + oaThreadAttrs.Length = sizeof(OBJECT_ATTRIBUTES); + oaThreadAttrs.RootDirectory = NULL; + oaThreadAttrs.ObjectName = NULL; + oaThreadAttrs.Attributes = 0; + oaThreadAttrs.SecurityDescriptor = NULL; + oaThreadAttrs.SecurityQualityOfService = NULL; + + /* initialize thread attributes */ + fSuspended = FALSE; /* FIXME? really needed? can we hardcode this to FALSE? */ + + /* stack attributes */ + FIXME("stack size defaulted to 0x100000 - thread attributes ignored"); + + /* stack reserve size */ + itInitialTeb.StackReserve = 0x100000; + + /* stack commit size */ + itInitialTeb.StackCommit = itInitialTeb.StackReserve - PAGE_SIZE; + + /* guard page */ + itInitialTeb.StackCommit += PAGE_SIZE; + + /* reserve stack */ + itInitialTeb.StackAllocate = NULL; + + nErrCode = NtAllocateVirtualMemory + ( + NtCurrentProcess(), + &itInitialTeb.StackAllocate, + 0, + &itInitialTeb.StackReserve, + MEM_RESERVE, + PAGE_READWRITE + ); + + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); /* FIXME? TODO? pthread specific error codes? */ + } + + itInitialTeb.StackBase = (PVOID)((ULONG)itInitialTeb.StackAllocate + itInitialTeb.StackReserve); + itInitialTeb.StackLimit = (PVOID)((ULONG)itInitialTeb.StackBase - itInitialTeb.StackCommit); + + /* commit stack */ + nErrCode = NtAllocateVirtualMemory + ( + NtCurrentProcess(), + &itInitialTeb.StackLimit, + 0, + &itInitialTeb.StackCommit, + MEM_COMMIT, + PAGE_READWRITE + ); + + if(!NT_SUCCESS(nErrCode)) + { + NtFreeVirtualMemory + ( + NtCurrentProcess(), + itInitialTeb.StackAllocate, + &itInitialTeb.StackReserve, + MEM_RELEASE + ); + + return (__status_to_errno(nErrCode)); + } + + /* protect guard page */ + nErrCode = NtProtectVirtualMemory + ( + NtCurrentProcess(), + itInitialTeb.StackLimit, + PAGE_SIZE, + PAGE_GUARD | PAGE_READWRITE, + &nOldPageProtection + ); + + if(!NT_SUCCESS(nErrCode)) + { + NtFreeVirtualMemory + ( + NtCurrentProcess(), + itInitialTeb.StackAllocate, + &itInitialTeb.StackReserve, + MEM_RELEASE + ); + + return (__status_to_errno(nErrCode)); + } + + /* initialize thread registers */ + +//#ifdef __i386__ + memset(&cxThreadContext, 0, sizeof(CONTEXT)); + cxThreadContext.Eip = (LONG)__threadentry; + cxThreadContext.SegGs = USER_DS; + cxThreadContext.SegFs = TEB_SELECTOR; + cxThreadContext.SegEs = USER_DS; + cxThreadContext.SegDs = USER_DS; + cxThreadContext.SegCs = USER_CS; + cxThreadContext.SegSs = USER_DS; + cxThreadContext.Esp = (ULONG)itInitialTeb.StackBase - 12; + cxThreadContext.EFlags = (1<<1) + (1<<9); + + /* initialize call stack */ + *((PULONG)((ULONG)itInitialTeb.StackBase - 4)) = (ULONG)arg; /* thread argument */ + *((PULONG)((ULONG)itInitialTeb.StackBase - 8)) = (ULONG)start_routine; /* thread start routine */ + *((PULONG)((ULONG)itInitialTeb.StackBase - 12)) = 0xDEADBEEF; /* "shouldn't see me" */ +//#else +//#error Unsupported architecture +//#endif + + INFO("about to create new thread - start routine at %#x, argument %#x", start_routine, arg); + + /* create thread */ + nErrCode = NtCreateThread + ( + &hThread, + THREAD_ALL_ACCESS, + &oaThreadAttrs, + NtCurrentProcess(), + &ciId, + &cxThreadContext, + &itInitialTeb, + fSuspended + ); + + if(!NT_SUCCESS(nErrCode)) + { + NtFreeVirtualMemory + ( + NtCurrentProcess(), + itInitialTeb.StackAllocate, + &itInitialTeb.StackReserve, + MEM_RELEASE + ); + + return (__status_to_errno(nErrCode)); + } + + /* FIXME? should we return the thread handle or the thread id? */ + if(thread != 0) + *thread = (pthread_t)&ciId.UniqueThread; /* for the moment, we return the id */ + + return (0); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/pthread/exit.c b/rossubsys/posix/lib/psxdll/pthread/exit.c new file mode 100644 index 00000000000..e8634f5f2be --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/exit.c @@ -0,0 +1,78 @@ +/* $Id: exit.c,v 1.4 2002/10/29 04:45:38 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/exit.c + * PURPOSE: Thread termination + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include + +void pthread_exit(void *value_ptr) +{ + NTSTATUS nErrCode; + BOOLEAN fLastThread; + + /* terminate process if this is the last thread of the current process */ + nErrCode = NtQueryInformationThread + ( + NtCurrentThread(), + ThreadAmILastThread, + &fLastThread, + sizeof(BOOLEAN), + NULL + ); + + if(NT_SUCCESS(nErrCode)) + { + if(fLastThread) + { + INFO("this thread is the last in the current process - about to call exit(0)"); + exit(0); + } + } + else + { + WARN + ( + "NtQueryInformationThread(ThreadAmILastThread) failed with status %#x. \ +Can't determine if the current thread is the last in the process. The process \ +could hang", + nErrCode + ); + + } + + TODO("Notify psxss of thread termination"); + + LdrShutdownThread(); /* detach DLLs */ + + /* kill this thread */ + + WARNIF( + sizeof(ULONG) < sizeof(typeof(value_ptr)), + "\ +the value returned from the current thread will be truncated (pointers shorter \ +than long integers on this architecture?) - expect trouble" + ); + + INFO("bye bye. Current thread about to die"); + + NtTerminateThread(NtCurrentThread(), (ULONG)value_ptr); + + /* "The pthread_exit() function cannot return to its caller." */ + NtDelayExecution(FALSE, NULL); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/pthread/join.c b/rossubsys/posix/lib/psxdll/pthread/join.c new file mode 100644 index 00000000000..c7e72cd05e2 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/join.c @@ -0,0 +1,98 @@ +/* $Id: join.c,v 1.4 2002/10/29 04:45:38 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/join.c + * PURPOSE: Wait for thread termination + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include + +int pthread_join(pthread_t thread, void **value_ptr) +{ + HANDLE hThread; + NTSTATUS nErrCode; + OBJECT_ATTRIBUTES oaThreadAttrs; + CLIENT_ID ciId; + THREAD_BASIC_INFORMATION tbiThreadInfo; + + /* "[EDEADLK] A deadlock was detected or the value of thread specifies + the calling thread" */ + if(thread == pthread_self()) + return (EDEADLK); + + /* initialize id */ + ciId.UniqueProcess = (HANDLE)-1; + ciId.UniqueThread = (HANDLE)thread; + + /* initialize object attributes */ + oaThreadAttrs.Length = sizeof(OBJECT_ATTRIBUTES); + oaThreadAttrs.RootDirectory = NULL; + oaThreadAttrs.ObjectName = NULL; + oaThreadAttrs.Attributes = 0; + oaThreadAttrs.SecurityDescriptor = NULL; + oaThreadAttrs.SecurityQualityOfService = NULL; + + /* open the thread */ + nErrCode = NtOpenThread + ( + &hThread, + SYNCHRONIZE | THREAD_QUERY_INFORMATION, + &oaThreadAttrs, + &ciId + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* wait for thread termination */ + nErrCode = NtWaitForSingleObject + ( + hThread, + FALSE, + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + NtClose(hThread); + return (__status_to_errno(nErrCode)); + } + + /* get thread basic information (includes return code) */ + nErrCode = NtQueryInformationThread + ( + hThread, + ThreadBasicInformation, + &tbiThreadInfo, + sizeof(THREAD_BASIC_INFORMATION), + NULL + ); + + NtClose(hThread); + + if(!value_ptr) + return (EFAULT); + + *value_ptr = (void *)tbiThreadInfo.ExitStatus; + + return (0); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/pthread/kill.c b/rossubsys/posix/lib/psxdll/pthread/kill.c new file mode 100644 index 00000000000..70c2cdc2627 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/kill.c @@ -0,0 +1,22 @@ +/* $Id: kill.c,v 1.4 2002/10/29 04:45:38 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/kill.c + * PURPOSE: Send a signal to a thread + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include + +int pthread_kill(pthread_t thread, int sig) +{ + return (ENOSYS); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/pthread/mutex.c b/rossubsys/posix/lib/psxdll/pthread/mutex.c new file mode 100644 index 00000000000..2a37508d665 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/mutex.c @@ -0,0 +1,465 @@ +/* $Id: mutex.c,v 1.4 2002/10/29 04:45:38 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/mutex.c + * PURPOSE: Mutex functions + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int pthread_mutex_init(pthread_mutex_t *mutex, + const pthread_mutexattr_t *attr) +{ + struct __mutex *pmMutex; + struct __mutexattr *pmaMutexAttrs; + BOOL bShared; + OBJECT_ATTRIBUTES oaMutexAttrs; + NTSTATUS nErrCode; + + /* invalid return buffer */ + if(mutex == NULL) + return (EINVAL); + + /* object still open */ + if(__safeobj_validate(*mutex, __PTHREAD_MUTEX_MAGIC)) + return (EBUSY); + + if(attr == NULL) + { + /* use default attributes */ + /* create new mutex object */ + pmMutex = (struct __mutex *)malloc(sizeof(struct __mutex)); + + /* malloc() failure */ + if(!pmMutex) + return (ENOMEM); + + /* set the attributes */ + bShared = FALSE; + pmMutex->type = PTHREAD_MUTEX_RECURSIVE; + } + else if(__safeobj_validate(*attr, __PTHREAD_MUTEX_ATTR_MAGIC)) + { + /* use provided attributes */ + /* create new mutex object */ + pmMutex = (struct __mutex *)malloc(sizeof(struct __mutex)); + + /* malloc() failure */ + if(!pmMutex) + return (ENOMEM); + + /* get the attributes object */ + pmaMutexAttrs = (struct __mutexattr *) *attr; + + /* set the attributes */ + bShared = (pmaMutexAttrs->pshared != PTHREAD_PROCESS_PRIVATE); + pmMutex->type = pmaMutexAttrs->type; + } + else + return (EINVAL); + + /* necessary for the mutex to be considered valid later */ + pmMutex->signature = __PTHREAD_MUTEX_MAGIC; + + /* creation of the native mutex object */ + pmMutex->handle = 0; + + /* initialize generic object attributes */ + oaMutexAttrs.Length = sizeof(OBJECT_ATTRIBUTES); + oaMutexAttrs.RootDirectory = NULL; + oaMutexAttrs.ObjectName = NULL; + oaMutexAttrs.Attributes = 0; + oaMutexAttrs.SecurityDescriptor = NULL; + oaMutexAttrs.SecurityQualityOfService = NULL; + + /* process-exclusive mutex */ + if(bShared) + oaMutexAttrs.Attributes |= OBJ_EXCLUSIVE; + + /* try to create the object */ + nErrCode = NtCreateMutant + ( + &pmMutex->handle, + MUTANT_ALL_ACCESS, + &oaMutexAttrs, + FALSE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + /* free the internal mutex object */ + free(pmMutex); + /* return errno */ + return (__status_to_errno(nErrCode)); + } + + /* return the pointer to the mutex */ + *mutex = (pthread_mutex_t)pmMutex; + + /* success */ + return (0); + +} + +int pthread_mutex_destroy(pthread_mutex_t *mutex) +{ + struct __mutex *pmMutex; + NTSTATUS nErrCode; + MUTANT_BASIC_INFORMATION mbiMutexInfo; + + /* invalid pointer or pointer to invalid object */ + if(mutex == NULL || !__safeobj_validate(*mutex, __PTHREAD_MUTEX_MAGIC)) + { + return (EINVAL); + } + + pmMutex = (struct __mutex *)*mutex; + + /* query the mutex's status */ + nErrCode = NtQueryMutant + ( + pmMutex->handle, + MutantBasicInformation, + &mbiMutexInfo, + sizeof(MUTANT_BASIC_INFORMATION), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* the thread is owned - cannot destroy it */ + if(mbiMutexInfo.Count <= 0) + { + return (EBUSY); + } + + /* try to close the handle */ + nErrCode = NtClose(pmMutex->handle); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* free the object, nil the pointer */ + free(*mutex); + *mutex = NULL; + + /* success */ + return (0); + +} + +int pthread_mutex_lock(pthread_mutex_t *mutex) +{ + struct __mutex * pmMutex; + NTSTATUS nErrCode; + + /* invalid pointer or pointer to invalid object */ + if(mutex == NULL || !__safeobj_validate(*mutex, __PTHREAD_MUTEX_MAGIC)) + return (EINVAL); + + pmMutex = (struct __mutex *)*mutex; + + /* decide the behavior from the mutex type */ + switch(pmMutex->type) + { + case PTHREAD_MUTEX_NORMAL: + { + /* unconditionally try to lock the mutex */ + /* FIXME? should we "artificially" hang the thread if it's the mutex owner, since + NT mutexes always behave recursively? */ + +#if 0 + if(0 /* mutex owner */ == pthread_self() */) + NtDelayExecution(FALSE, NULL); +#endif + + nErrCode = NtWaitForSingleObject(pmMutex->handle, FALSE, NULL); + break; + } + + case PTHREAD_MUTEX_ERRORCHECK: + { + /* prevent a thread from recursively locking the same mutex */ + if(0 /* mutex owner */ == pthread_self()) /* FIXME: implement the correct logic */ + return (EDEADLK); + else + nErrCode = NtWaitForSingleObject(pmMutex->handle, FALSE, NULL); + + break; + } + + case PTHREAD_MUTEX_RECURSIVE: + { + /* allow recursive locking */ + /* ASSERT: this is the default behavior for NT */ + nErrCode = NtWaitForSingleObject(pmMutex->handle, FALSE, NULL); + break; + } + + default: + /* we should never reach this point */ + INFO("you should never read this"); + + } + + if(nErrCode == STATUS_ABANDONED) + { + FIXME("mutex abandoned, not sure on what to do: should we try to lock the mutex again?"); + } + else if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* success */ + return (0); + +} + +int pthread_mutex_trylock(pthread_mutex_t *mutex) +{ + struct __mutex * pmMutex; + NTSTATUS nErrCode; + MUTANT_BASIC_INFORMATION mbiMutexInfo; + + /* invalid pointer or pointer to invalid object */ + if(mutex == NULL || !__safeobj_validate(*mutex, __PTHREAD_MUTEX_MAGIC)) + return (EINVAL); + + pmMutex = (struct __mutex *)*mutex; + + /* query the mutex's status */ + nErrCode = NtQueryMutant + ( + pmMutex->handle, + MutantBasicInformation, + &mbiMutexInfo, + sizeof(MUTANT_BASIC_INFORMATION), + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* mutex already locked */ + if(mbiMutexInfo.Count <= 0) + return (EBUSY); + + /* mutex not locked - mutex type attribute doesn't matter */ + nErrCode = NtWaitForSingleObject(pmMutex->handle, FALSE, NULL); + + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* success */ + return (0); + +} + +int pthread_mutex_unlock(pthread_mutex_t *mutex) +{ + struct __mutex * pmMutex; + NTSTATUS nErrCode; + + /* invalid pointer or pointer to invalid object */ + if(mutex == NULL || !__safeobj_validate(*mutex, __PTHREAD_MUTEX_MAGIC)) + return (EINVAL); + + pmMutex = (struct __mutex *)*mutex; + + /* try to release the mutex */ + nErrCode = NtReleaseMutant(pmMutex->handle, NULL); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + return (__status_to_errno(nErrCode)); + } + + /* success */ + return (0); + +} + +/* mutex attributes routines */ + +int pthread_mutexattr_init(pthread_mutexattr_t *attr) +{ + struct __mutexattr * pmaMutexAttrs; + + /* invalid return pointer */ + if(!attr) + return (EINVAL); + + /* allocate internal structure for mutex attributes */ + pmaMutexAttrs = (struct __mutexattr *)malloc(sizeof(struct __mutexattr)); + + /* failure */ + if(pmaMutexAttrs == 0) + return (ENOMEM); + + /* attribute defaults */ + pmaMutexAttrs->pshared = PTHREAD_PROCESS_PRIVATE; + pmaMutexAttrs->type = PTHREAD_MUTEX_DEFAULT; + + /* return the pointer to the attributes object */ + *attr = (pthread_mutexattr_t)pmaMutexAttrs; + + /* success */ + return (0); + +} + +int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) +{ + /* invalid pointer or pointer to invalid object */ + if(attr == NULL || !__safeobj_validate(*attr, __PTHREAD_MUTEX_ATTR_MAGIC)) + return (EINVAL); + + /* deallocate internal structure */ + free(*attr); + + /* success */ + return (0); + +} + +#define PTHREAD_MUTEXATTR_GET(PATTR,PVAR,FIELD) \ + if( \ + (PATTR) == NULL || \ + (PVAR) == NULL || \ + !__safeobj_validate(*(PATTR), __PTHREAD_MUTEX_ATTR_MAGIC) \ + ) \ + return (EINVAL); \ + else \ + { \ + (*(PVAR)) = ((struct __mutexattr *)*(PATTR))->FIELD; \ + return (0); \ + } + +int pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, + int *pshared) +{ + PTHREAD_MUTEXATTR_GET(attr, pshared, pshared) +} + +int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type) +{ + PTHREAD_MUTEXATTR_GET(attr, type, type) +} + +int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, + int pshared) +{ + /* invalid pointer or pointer to invalid object */ + if(attr == NULL || !__safeobj_validate(*attr, __PTHREAD_MUTEX_ATTR_MAGIC)) + return (EINVAL); + + /* validate value */ + switch(pshared) + { + case PTHREAD_PROCESS_SHARED: break; + case PTHREAD_PROCESS_PRIVATE: break; + default: return (EINVAL); + } + + ((struct __mutexattr *)*attr)->pshared = pshared; + + return (0); + +} + +int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) +{ + /* invalid pointer or pointer to invalid object */ + if(attr == NULL || !__safeobj_validate(*attr, __PTHREAD_MUTEX_ATTR_MAGIC)) + return (EINVAL); + + /* validate value */ + switch(type) + { + case PTHREAD_MUTEX_NORMAL: break; + case PTHREAD_MUTEX_ERRORCHECK: break; + case PTHREAD_MUTEX_RECURSIVE: break; + default: return (EINVAL); + } + + ((struct __mutexattr *)*attr)->type = type; + + return (0); + +} + +/* STUBS */ + +int pthread_mutex_setprioceiling(pthread_mutex_t *mutex, + int prioceiling, int *old_ceiling) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +int pthread_mutex_getprioceiling(const pthread_mutex_t *mutex, + int *prioceiling) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr, + int *protocol) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, + int protocol) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, + int prioceiling) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, + int *prioceiling) +{ + TODO("realtime threads not currently implemented"); + return (ENOSYS); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/pthread/self.c b/rossubsys/posix/lib/psxdll/pthread/self.c new file mode 100644 index 00000000000..14c3ddd4410 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/pthread/self.c @@ -0,0 +1,23 @@ +/* $Id: self.c,v 1.4 2002/10/29 04:45:38 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/pthread/self.c + * PURPOSE: get calling thread's ID + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/12/2001: Created + */ + +#include +#include +#include + +pthread_t pthread_self(void) +{ + return ((pthread_t)(NtCurrentTeb()->Cid).UniqueThread); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sched/.cvsignore b/rossubsys/posix/lib/psxdll/sched/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sched/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/sched/yield.c b/rossubsys/posix/lib/psxdll/sched/yield.c new file mode 100644 index 00000000000..ee5b2c121ea --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sched/yield.c @@ -0,0 +1,33 @@ +/* $Id: yield.c,v 1.4 2002/10/29 04:45:39 rex Exp $ +*/ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sched/yield.c + * PURPOSE: Yield processor + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include + +int sched_yield(void) +{ + NTSTATUS nErrCode; + + nErrCode = NtYieldExecution(); + + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (-1); + } + + return (0); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/signal/.cvsignore b/rossubsys/posix/lib/psxdll/signal/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/signal/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/signal/raise.c b/rossubsys/posix/lib/psxdll/signal/raise.c new file mode 100644 index 00000000000..b33c8fa275b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/signal/raise.c @@ -0,0 +1,25 @@ +/* $Id: raise.c,v 1.4 2002/10/29 04:45:41 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/signal/raise.c + * PURPOSE: Send a signal to the executing process + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include + +int raise(int sig) +{ + /* returns zero if pthread_kill() returned zero, non-zero otherwise */ + /* pthread_kill() returns the error number and doesn't set errno */ + return (((errno = pthread_kill(pthread_self(), sig))) == 0 ? (0) : (1)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/stdlib/.cvsignore b/rossubsys/posix/lib/psxdll/stdlib/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/stdlib/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/stdlib/abort.c b/rossubsys/posix/lib/psxdll/stdlib/abort.c new file mode 100644 index 00000000000..ffafe34fec4 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/stdlib/abort.c @@ -0,0 +1,22 @@ +/* $Id: abort.c,v 1.4 2002/10/29 04:45:41 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/stdlib/abort.c + * PURPOSE: Generate an abnormal process abort + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include + +void abort(void) +{ + raise(SIGABRT); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/stdlib/exit.c b/rossubsys/posix/lib/psxdll/stdlib/exit.c new file mode 100644 index 00000000000..b8b31868881 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/stdlib/exit.c @@ -0,0 +1,51 @@ +/* $Id: exit.c,v 1.4 2002/10/29 04:45:41 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/stdlib/exit.c + * PURPOSE: Terminate a process + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/12/2001: Created + */ + +#include +#include +#include + +void exit(int status) +{ + TODO("call all functions registered with atexit()"); + + TODO("flush all output streams, close all open streams"); + TODO("remove all files created by tmpfile()"); + + TODO("close all of the file descriptors, directory streams,conversion \ +descriptors and message catalogue descriptors"); + TODO("send SIGCHILD to the parent process"); + TODO("set parent pid of children to pid of psxss"); + TODO("detach each attached shared-memory segment"); + TODO("for each semaphore for which the calling process has set a semadj \ +value(), add the value to the semval of the semaphore."); + TODO("if the process is a controlling process, send SIGHUP to each process \ +in the foreground process group..."); + TODO("... and disassociate the terminal from the session"); + TODO("if the exit causes a process group to become orphaned, and if any \ +member of the newly-orphaned process group is stopped, send SIGHUP and \ +SIGCONT to each process in the newly-orphaned process group"); + TODO("all open named semaphores in the calling process are closed"); + TODO("remove any memory locks"); + TODO("destroy memory mappings"); + TODO("close all open message queue descriptors"); + +#if 0 + ExitProcess(status); +#endif + + NtTerminateProcess(NtCurrentProcess(), status); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/stdlib/malloc.c b/rossubsys/posix/lib/psxdll/stdlib/malloc.c new file mode 100644 index 00000000000..3d215fd03b0 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/stdlib/malloc.c @@ -0,0 +1,55 @@ +/* $Id: malloc.c,v 1.4 2002/10/29 04:45:41 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/stdlib/malloc.c + * PURPOSE: Memory allocator + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 27/12/2001: Created + */ + +#include +#include + +void * malloc(size_t size) +{ + void * pTemp = __malloc(size); + + if(!pTemp) + errno = ENOMEM; + + return (pTemp); +} + +void free(void * ptr) +{ + __free(ptr); +} + +void * calloc(size_t nelem, size_t elsize) +{ + return (__malloc(nelem * elsize)); +} + +void * realloc(void * ptr, size_t size) +{ + void * pTemp; + + if(size == 0) + __free(ptr); + + if(ptr == 0) + return __malloc(size); + + pTemp = __realloc(ptr, size); + + if(pTemp == 0) + errno = ENOMEM; + + return (pTemp); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/string/.cvsignore b/rossubsys/posix/lib/psxdll/string/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/string/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/string/strcoll.c b/rossubsys/posix/lib/psxdll/string/strcoll.c new file mode 100644 index 00000000000..acdb8fa2a53 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/string/strcoll.c @@ -0,0 +1,23 @@ +/* $Id: strcoll.c,v 1.4 2002/10/29 04:45:42 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/string/strcoll.c + * PURPOSE: string comparison using collating information + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 20/01/2002: Created + */ + +#include +#include + +int strcoll(const char *s1, const char *s2) +{ + TODO("locale semantics currently unimplemented"); + return (strcmp(s1, s2)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/string/strdup.c b/rossubsys/posix/lib/psxdll/string/strdup.c new file mode 100644 index 00000000000..ee37f975afd --- /dev/null +++ b/rossubsys/posix/lib/psxdll/string/strdup.c @@ -0,0 +1,44 @@ +/* $Id: strdup.c,v 1.4 2002/10/29 04:45:42 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/string/strdup.c + * PURPOSE: Duplicate a string + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 21/01/2002: Created + */ + +#include +#include +#include + +char *strdup(const char *s1) +{ + char *pchRetBuf; + int nStrLen; + + HINT("strdup() is inefficient - consider dropping zero-terminated strings"); + + if (s1 == 0) + return 0; + + nStrLen = strlen(s1); + + /* allocate enough buffer space for s1 and the null terminator */ + pchRetBuf = (char *) malloc(nStrLen + 1); + + if (pchRetBuf == 0) + /* memory allocation failed */ + return 0; + + /* copy the string */ + strcpy(pchRetBuf, s1); + + return pchRetBuf; + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/string/strerror.c b/rossubsys/posix/lib/psxdll/string/strerror.c new file mode 100644 index 00000000000..4ef4dd7a335 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/string/strerror.c @@ -0,0 +1,27 @@ +/* $Id: strerror.c,v 1.4 2002/10/29 04:45:43 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/string/strerror.c + * PURPOSE: Get error message string + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 20/01/2002: Created + */ + +#include +#include +#include + +static char *__errstr = ""; +char *strerror(int errnum) +{ + INFO("errnum %#x", errnum); + TODO("getting error string not currently implemented"); + errno = EINVAL; + return (__errstr); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/.cvsignore b/rossubsys/posix/lib/psxdll/sys/stat/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/sys/stat/chmod.c b/rossubsys/posix/lib/psxdll/sys/stat/chmod.c new file mode 100644 index 00000000000..4290a615739 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/chmod.c @@ -0,0 +1,30 @@ +/* $Id: chmod.c,v 1.3 2002/10/29 04:45:44 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/chmod.c + * PURPOSE: Change mode of a file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include +#include + +int chmod(const char *path, mode_t mode) +{ + errno = ENOSYS; + return (-1); +} + +int fchmod(int fildes, mode_t mode) +{ + errno = ENOSYS; + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/mkdir.c b/rossubsys/posix/lib/psxdll/sys/stat/mkdir.c new file mode 100644 index 00000000000..1c679b4876b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/mkdir.c @@ -0,0 +1,34 @@ +/* $Id: mkdir.c,v 1.3 2002/10/29 04:45:44 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/mkdir.c + * PURPOSE: Make a directory + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include +#include +#include + +int mkdir(const char *path, mode_t mode) +{ + int nFileNo; + + switch((nFileNo = open(path, O_CREAT | O_EXCL | _O_DIRFILE, mode))) + { + case -1: + return (-1); + + default: + close(nFileNo); + return (0); + } +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/mkfifo.c b/rossubsys/posix/lib/psxdll/sys/stat/mkfifo.c new file mode 100644 index 00000000000..5960ebef72c --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/mkfifo.c @@ -0,0 +1,24 @@ +/* $Id: mkfifo.c,v 1.3 2002/10/29 04:45:44 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/mkfifo.c + * PURPOSE: Make a FIFO special file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include +#include + +int mkfifo(const char *path, mode_t mode) +{ + errno = ENOSYS; + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/mknod.c b/rossubsys/posix/lib/psxdll/sys/stat/mknod.c new file mode 100644 index 00000000000..d412be266ef --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/mknod.c @@ -0,0 +1,23 @@ +/* $Id: mknod.c,v 1.3 2002/10/29 04:45:44 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/mknod.c + * PURPOSE: Make a directory, a special or regular file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include + +int mknod(const char *path, mode_t mode, dev_t dev) +{ + errno = ENOSYS; + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/stat.c b/rossubsys/posix/lib/psxdll/sys/stat/stat.c new file mode 100644 index 00000000000..3a7da05e984 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/stat.c @@ -0,0 +1,36 @@ +/* $Id: stat.c,v 1.3 2002/10/29 04:45:44 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/stat.c + * PURPOSE: Get file status + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include +#include + +int fstat(int fildes, struct stat *buf) +{ + errno = ENOSYS; + return (-1); +} + +int lstat(const char *path, struct stat *buf) +{ + errno = ENOSYS; + return (-1); +} + +int stat(const char *path, struct stat *buf) +{ + errno = ENOSYS; + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/stat/umask.c b/rossubsys/posix/lib/psxdll/sys/stat/umask.c new file mode 100644 index 00000000000..042b29e985e --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/stat/umask.c @@ -0,0 +1,24 @@ +/* $Id: umask.c,v 1.3 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/sys/stat/umask.c + * PURPOSE: + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/05/2002: Created + */ + +#include +#include +#include + +mode_t umask(mode_t cmask) +{ + errno = ENOSYS; + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/sys/utsname/.cvsignore b/rossubsys/posix/lib/psxdll/sys/utsname/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/utsname/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/sys/utsname/uname.c b/rossubsys/posix/lib/psxdll/sys/utsname/uname.c new file mode 100644 index 00000000000..4a2932fa348 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/sys/utsname/uname.c @@ -0,0 +1,178 @@ +/* $Id: uname.c,v 1.4 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: lib/psxdll/sys/utsname/uname.c + * PURPOSE: Get name of current system + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 19/12/2001: Created + */ + +#include +#include +#include +#include +#include +#include +#include + +int uname(struct utsname *name) +{ + NTSTATUS nErrCode; + OBJECT_ATTRIBUTES oaKeyAttribs; + UNICODE_STRING wstrKeyPath; + UNICODE_STRING wstrValueName; + UNICODE_STRING wstrValueData; + ANSI_STRING strValueData; + PKEY_VALUE_PARTIAL_INFORMATION pkvpiKeyValue; + ULONG nKeyValueSize; + HANDLE hKey; + + /* system name and version info are fixed strings, at the moment */ /* FIXME? */ + strncpy(name->sysname, "ReactOS" , 255); + strncpy(name->release, "0.0" , 255); + strncpy(name->version, "pre-alpha", 255); + + /* hardware identifier */ + /* FIXME: this should definitely be determined programmatically */ + strncpy(name->machine, "i386" , 255); + + /* we use the active computer's name as the node name */ + /* TODO: POSIX-style registry functions */ + + /* initialize the registry key path */ + RtlInitUnicodeString( + &wstrKeyPath, + L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName" + ); + + /* initialize object attributes */ + oaKeyAttribs.Length = sizeof(OBJECT_ATTRIBUTES); + oaKeyAttribs.RootDirectory = NULL; + oaKeyAttribs.ObjectName = &wstrKeyPath; + oaKeyAttribs.Attributes = OBJ_CASE_INSENSITIVE /* | OBJ_OPENLINK | OBJ_OPENIF */ /* FIXME? */; + oaKeyAttribs.SecurityDescriptor = NULL; + oaKeyAttribs.SecurityQualityOfService = NULL; + + /* open the key object */ + nErrCode = NtOpenKey + ( + &hKey, + KEY_QUERY_VALUE, + &oaKeyAttribs + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + + ERR("NtOpenKey() failed with status 0x%08X", nErrCode); + errno = __status_to_errno(nErrCode); + return (-1); + } + + /* initialize the registry value name */ + RtlInitUnicodeString(&wstrValueName, L"ComputerName"); + + /* fake query - null buffer and zero length to pre-fetch the appropriate buffer size */ + nErrCode = NtQueryValueKey + ( + hKey, + &wstrValueName, + KeyValuePartialInformation, + NULL, + 0, + &nKeyValueSize + ); + + /* success */ + if(nErrCode == (NTSTATUS)STATUS_BUFFER_TOO_SMALL) + { + + /* allocate the appropriate buffer size */ + if(nKeyValueSize < sizeof(KEY_VALUE_PARTIAL_INFORMATION)) /* just to be sure */ + nKeyValueSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION); + + pkvpiKeyValue = __malloc(nKeyValueSize); + + } + /* failure */ + else + { + + ERR("NtQueryValueKey() failed with status 0x%08X", nErrCode); + NtClose(hKey); + errno = __status_to_errno(nErrCode); + return (-1); + } + + /* query the value */ + nErrCode = NtQueryValueKey + ( + hKey, + &wstrValueName, + KeyValuePartialInformation, + pkvpiKeyValue, + nKeyValueSize, + &nKeyValueSize + ); + + /* close the key handle (not needed anymore) */ + NtClose(hKey); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtQueryValueKey() failed with status 0x%08X", nErrCode); + __free(pkvpiKeyValue); + errno = __status_to_errno(nErrCode); + return (-1); + } + + /* make wstrValueData refer to the Data field of the key value information */ + wstrValueData.Length = pkvpiKeyValue->DataLength; + wstrValueData.MaximumLength = wstrValueData.Length; + wstrValueData.Buffer = (PWCHAR)&(pkvpiKeyValue->Data[0]); + + /* make strValueData refer to the nodename buffer */ + strValueData.Length = 0; + strValueData.MaximumLength = 254; + strValueData.Buffer = name->nodename; + + RtlUnicodeStringToAnsiString + ( + &strValueData, + &wstrValueData, + FALSE + ); + + /* free the key value buffer */ + __free(pkvpiKeyValue); + + /* null-terminate the returned string */ + name->nodename[strValueData.Length] = '0'; + + INFO + ( + " \ +name->sysname = \"%s\"\n\ +tname->nodename = \"%s\"\n\ +tname->release = \"%s\"\n\ +tname->version = \"%s\"\n\ +tname->machine = \"%s\"", + name->sysname, + name->nodename, + name->release, + name->version, + name->machine + ); + + /* success */ + return (0); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/.cvsignore b/rossubsys/posix/lib/psxdll/unistd/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/lib/psxdll/unistd/access.c b/rossubsys/posix/lib/psxdll/unistd/access.c new file mode 100644 index 00000000000..3cca44b2744 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/access.c @@ -0,0 +1,59 @@ +/* $Id: access.c,v 1.3 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/access.c + * PURPOSE: Determine accessibility of a file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 13/02/2002: Created + */ + +#include +#include +#include +#include + +int access(const char *path, int amode) +{ + OBJECT_ATTRIBUTES oaFileAttribs; + IO_STATUS_BLOCK isbStatus; + ACCESS_MASK amDesiredAccess = 0; + NTSTATUS nErrCode; + HANDLE hFile; + + if(amode != F_OK) + { + if(amode && R_OK) amDesiredAccess |= GENERIC_READ; + if(amode && W_OK) amDesiredAccess |= GENERIC_WRITE; + if(amode && X_OK) amDesiredAccess |= GENERIC_EXECUTE; + } + + nErrCode = NtCreateFile + ( + &hFile, + amDesiredAccess, + &oaFileAttribs, + &isbStatus, + 0, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_OPEN, + 0, + 0, + 0 + ); + + if(NT_SUCCESS(nErrCode)) + { + NtClose(hFile); + return (0); + } + + errno = __status_to_errno(nErrCode); + return (-1); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/close.c b/rossubsys/posix/lib/psxdll/unistd/close.c new file mode 100644 index 00000000000..3f1cf431643 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/close.c @@ -0,0 +1,42 @@ +/* $Id: close.c,v 1.4 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/close.c + * PURPOSE: Close a file descriptor + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 13/02/2002: Created + */ + +#include +#include +#include +#include +#include +#include + +int close(int fildes) +{ + __fildes_t fdDescriptor; + NTSTATUS nErrCode; + + if(fcntl(fildes, F_DELFD, &fdDescriptor) == -1) + return (-1); + + __free(fdDescriptor.ExtraData); + + nErrCode = NtClose(fdDescriptor.FileHandle); + + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (-1); + } + + return (0); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/dup.c b/rossubsys/posix/lib/psxdll/unistd/dup.c new file mode 100644 index 00000000000..9ada728a229 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/dup.c @@ -0,0 +1,41 @@ +/* $Id: dup.c,v 1.4 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/dup.c + * PURPOSE: Duplicate an open file descriptor + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 13/02/2002: Created + */ + +#include +#include +#include +#include + +int dup(int fildes) +{ + return (fcntl(fildes, F_DUPFD, 0)); +} + +int dup2(int fildes, int fildes2) +{ + if(fildes < 0 || fildes >= OPEN_MAX) + { + errno = EBADF; + return (-1); + } + + /* TODO: check if fildes is valid */ + + if(fildes == fildes2) + return fildes2; + + close(fildes2); + return (fcntl(fildes, F_DUPFD, fildes2)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/fork.c b/rossubsys/posix/lib/psxdll/unistd/fork.c new file mode 100644 index 00000000000..53674acce5b --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/fork.c @@ -0,0 +1,250 @@ +/* $Id: fork.c,v 1.3 2002/10/29 04:45:46 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/fork.c + * PURPOSE: create a new process + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 14/05/2002: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +typedef struct _PORT_MESSAGE { + USHORT DataSize; + USHORT MessageSize; + USHORT MessageType; + USHORT VirtualRangesOffset; + CLIENT_ID ClientId; + ULONG MessageId; + ULONG SectionSize; + /* UCHAR Data[]; */ +} PORT_MESSAGE, *PPORT_MESSAGE; + +struct CSRSS_MESSAGE { + ULONG Unknown1; + ULONG Opcode; + ULONG Status; + ULONG Unknown2; +}; + +NTSTATUS STDCALL CsrClientCallServer( + IN PVOID Message, + IN PVOID Unknown, + IN ULONG Opcode, + IN ULONG Size +); + +pid_t fork(void) +{ + NTSTATUS nErrCode; + CONTEXT ctxThreadContext; + HANDLE hProcess; + HANDLE hThread; + INITIAL_TEB itInitialTeb; + CLIENT_ID ciClientId; + MEMORY_BASIC_INFORMATION mbiStackInfo; + THREAD_BASIC_INFORMATION tbiThreadInfo; + + struct __tagcsrmsg{ + PORT_MESSAGE PortMessage; + struct CSRSS_MESSAGE CsrssMessage; + PROCESS_INFORMATION ProcessInformation; + CLIENT_ID Debugger; + ULONG CreationFlags; + ULONG VdmInfo[2]; + } csrmsg; + + /* STEP 1: Duplicate current process */ + nErrCode = NtCreateProcess + ( + &hProcess, + PROCESS_ALL_ACCESS, + NULL, + NtCurrentProcess(), + TRUE, + 0, + 0, + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateProcess() failed with status 0x%08X\n", nErrCode); + goto fail; + } + + /* STEP 2: Duplicate current thread */ + /* 2.1: duplicate registers */ + ctxThreadContext.ContextFlags = + CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT; + + /* get the current thread's registers */ + nErrCode = NtGetContextThread(NtCurrentThread(), &ctxThreadContext); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtGetContextThread() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* redirect the child process to the child_branch label (see 4.3 below) */ + ctxThreadContext.Eip = (ULONG)&&child_branch; + + /* 2.2: duplicate stack */ + /* get stack base and size */ + nErrCode = NtQueryVirtualMemory + ( + NtCurrentProcess(), + (PVOID)ctxThreadContext.Esp, + MemoryBasicInformation, + &mbiStackInfo, + sizeof(mbiStackInfo), + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtQueryVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + itInitialTeb.StackCommit = 0; + itInitialTeb.StackReserve = 0; + itInitialTeb.StackBase = (PVOID)((ULONG)(mbiStackInfo.BaseAddress) + mbiStackInfo.RegionSize); + itInitialTeb.StackLimit = mbiStackInfo.BaseAddress; + itInitialTeb.StackAllocate = mbiStackInfo.AllocationBase; + + /* 2.3: create duplicate thread */ + nErrCode = NtCreateThread + ( + &hThread, + THREAD_ALL_ACCESS, + NULL, + hProcess, + (CLIENT_ID *)&ciClientId, + &ctxThreadContext, + &itInitialTeb, + TRUE + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtCreateThread() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* 2.4: duplicate the TEB */ + /* store the client id in the child thread's stack (see 4.3b) */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + &ciClientId, + &ciClientId, + sizeof(ciClientId), + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* get the child thread's TEB base */ + nErrCode = NtQueryInformationThread + ( + hThread, + ThreadBasicInformation, + &tbiThreadInfo, + sizeof(tbiThreadInfo), + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtQueryInformationThread() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* copy the TEB */ + nErrCode = NtWriteVirtualMemory + ( + hProcess, + tbiThreadInfo.TebBaseAddress, + NtCurrentTeb(), + sizeof(TEB), + 0 + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteVirtualMemory() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* STEP 3: Call Win32 subsystem */ + memset(&csrmsg, 0, sizeof(csrmsg)); + + csrmsg.ProcessInformation.hProcess = hProcess; + csrmsg.ProcessInformation.hThread = hThread; + csrmsg.ProcessInformation.dwProcessId = (DWORD)ciClientId.UniqueProcess; + csrmsg.ProcessInformation.dwThreadId = (DWORD)ciClientId.UniqueThread; + + nErrCode = CsrClientCallServer(&csrmsg, 0, 0x10000, 0x24); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + ERR("CsrClientCallServer() failed with status 0x%08X\n", nErrCode); + goto cleanup_and_fail; + } + + /* STEP 4: Finalization */ + /* 4.1: resume thread */ + nErrCode = NtResumeThread(hThread, 0); + + /* 4.2: close superfluous handles */ + NtClose(hProcess); + NtClose(hThread); + + /* 4.3: (parent) return the child process id */ + return ((pid_t)(ciClientId.UniqueProcess)); + + /* 4.3b: (child) cleanup and return 0 */ +child_branch: + /* restore the thread and process id in the TEB */ + memcpy(&NtCurrentTeb()->Cid, &ciClientId, sizeof(ciClientId)); + + /* return 0 */ + return (0); + +cleanup_and_fail: + NtTerminateProcess(hProcess, nErrCode); + +fail: + errno = __status_to_errno(nErrCode); + return (-1); + +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/getcwd.c b/rossubsys/posix/lib/psxdll/unistd/getcwd.c new file mode 100644 index 00000000000..38fcff72d57 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/getcwd.c @@ -0,0 +1,89 @@ +/* $Id: getcwd.c,v 1.4 2002/10/29 04:45:48 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/getcwd.c + * PURPOSE: Get the pathname of the current working directory + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 01/02/2002: Created + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +wchar_t *_Wgetcwd(wchar_t *buf, size_t size) +{ + PUNICODE_STRING pwstrCurDir; + + __PdxAcquirePdataLock(); + + pwstrCurDir = __PdxGetCurDir(); + + if(size < (pwstrCurDir->Length / sizeof(WCHAR))) + { + __PdxReleasePdataLock(); + errno = ERANGE; + return (0); + } + else + { + wcsncpy(buf, pwstrCurDir->Buffer, pwstrCurDir->Length); + __PdxReleasePdataLock(); + return (buf); + } +} + +char *getcwd(char *buf, size_t size) +{ + PUNICODE_STRING pwstrCurDir; + + __PdxAcquirePdataLock(); + + pwstrCurDir = __PdxGetCurDir(); + + if(size < (pwstrCurDir->Length / sizeof(WCHAR))) + { + __PdxReleasePdataLock(); + errno = ERANGE; + return (0); + } + else + { + ANSI_STRING strBuffer; + NTSTATUS nErrCode; + + strBuffer.Length = 0; + strBuffer.MaximumLength = size; + strBuffer.Buffer = buf; + + nErrCode = RtlUnicodeStringToAnsiString + ( + &strBuffer, + pwstrCurDir, + FALSE + ); + + __PdxReleasePdataLock(); + + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + + return (buf); + } + + __PdxReleasePdataLock(); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/getpid.c b/rossubsys/posix/lib/psxdll/unistd/getpid.c new file mode 100644 index 00000000000..eeb4171cff3 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/getpid.c @@ -0,0 +1,45 @@ +/* $Id: getpid.c,v 1.5 2002/10/29 04:45:48 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/getpid.c + * PURPOSE: Get the process ID + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include +#include + +pid_t getpid(void) +{ + PROCESS_BASIC_INFORMATION pbiInfo; + NTSTATUS nErrCode; + + nErrCode = NtQueryInformationProcess + ( + NtCurrentProcess(), + ProcessBasicInformation, + &pbiInfo, + sizeof(pbiInfo), + NULL + ); + + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + + return (pbiInfo.UniqueProcessId); +#if 0 + return ((pid_t)NtCurrentTeb()->Cid.UniqueProcess); +#endif +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/getppid.c b/rossubsys/posix/lib/psxdll/unistd/getppid.c new file mode 100644 index 00000000000..fc318351f16 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/getppid.c @@ -0,0 +1,42 @@ +/* $Id: getppid.c,v 1.4 2002/10/29 04:45:48 rex Exp $ +*/ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/getppid.c + * PURPOSE: Get the parent process ID + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include +#include + +pid_t getppid(void) +{ + PROCESS_BASIC_INFORMATION pbiInfo; + NTSTATUS nErrCode; + + nErrCode = NtQueryInformationProcess + ( + NtCurrentProcess(), + ProcessBasicInformation, + &pbiInfo, + sizeof(pbiInfo), + NULL + ); + + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + + return (pbiInfo.InheritedFromUniqueProcessId); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/read.c b/rossubsys/posix/lib/psxdll/unistd/read.c new file mode 100644 index 00000000000..929d705ea32 --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/read.c @@ -0,0 +1,117 @@ +/* $Id: read.c,v 1.4 2002/10/29 04:45:48 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/read.c + * PURPOSE: Read from a file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + */ + +#include +#include +#include +#include +#include +#include + +ssize_t __read(int fildes, void *buf, size_t nbyte, off_t *offset) +{ + HANDLE hFile; + NTSTATUS nErrCode; + IO_STATUS_BLOCK isbStatus; + + /* get the file handle for the specified file descriptor */ + if(fcntl(fildes, F_GETFH, &hFile) == -1) + return (-1); + + if(offset != NULL) + { + /* NT always moves the file pointer, while Unix pread() must not: we have to + duplicate the handle and work on the duplicate */ /* FIXME? better save + the file position and restore it later? */ + HANDLE hDupFile; + + /* duplicate the handle */ + nErrCode = NtDuplicateObject + ( + NtCurrentProcess(), + hFile, + NtCurrentProcess(), + &hDupFile, + 0, + 0, + DUPLICATE_SAME_ACCESS + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + + /* read data from file at the specified offset */ + nErrCode = NtReadFile + ( + hDupFile, + NULL, + NULL, + NULL, + &isbStatus, + buf, + nbyte, + (PLARGE_INTEGER)offset, + NULL + ); + + NtClose(hDupFile); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + } + else + { + /* read data from file at the current offset */ + nErrCode = NtReadFile + ( + hFile, + NULL, + NULL, + NULL, + &isbStatus, + buf, + nbyte, + NULL, + NULL + ); + + /* failure */ + if(!NT_SUCCESS(nErrCode)) + { + errno = __status_to_errno(nErrCode); + return (0); + } + } + + return ((ssize_t)isbStatus.Information); +} + +ssize_t read(int fildes, void *buf, size_t nbyte) +{ + return (__read(fildes, buf, nbyte, NULL)); +} + +ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset) +{ + return (__read(fildes, buf, nbyte, &offset)); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/sleep.c b/rossubsys/posix/lib/psxdll/unistd/sleep.c new file mode 100644 index 00000000000..767c7ba115a --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/sleep.c @@ -0,0 +1,27 @@ +/* $Id: sleep.c,v 1.3 2002/10/29 04:45:48 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/sleep.c + * PURPOSE: Suspend execution for an interval of time + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 14/05/2002: Created + */ + +#include +#include + +unsigned int sleep(unsigned int seconds) +{ + LARGE_INTEGER lnDelay = RtlEnlargedIntegerMultiply(seconds, 10000000); + + if(!NT_SUCCESS(NtDelayExecution(FALSE, &lnDelay))) + return seconds; + + return 0; +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxdll/unistd/write.c b/rossubsys/posix/lib/psxdll/unistd/write.c new file mode 100644 index 00000000000..55186ea9d8a --- /dev/null +++ b/rossubsys/posix/lib/psxdll/unistd/write.c @@ -0,0 +1,68 @@ +/* $Id: write.c,v 1.6 2002/10/29 04:45:48 rex Exp $ + */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS POSIX+ Subsystem + * FILE: subsys/psx/lib/psxdll/unistd/write.c + * PURPOSE: Write on a file + * PROGRAMMER: KJK::Hyperion + * UPDATE HISTORY: + * 15/02/2002: Created + * 21/03/2002: Implemented write() (KJK::Hyperion ) + */ + +#include +#include +#include +#include +#include +#include +#include + +ssize_t write(int fildes, const void *buf, size_t nbyte) +{ + __fildes_t fdDescriptor; + NTSTATUS nErrCode; + IO_STATUS_BLOCK isbStatus; + + if(nbyte == 0) + return (0); + + if(fcntl(fildes, F_GETALL, &fdDescriptor) == -1) + { + ERR("fcntl() failed, errno %d", errno); + return (0); + } + + if((fdDescriptor.OpenFlags && O_APPEND) == O_APPEND) + { + TODO("move file pointer to the end"); + } + + INFO("handle for descriptor %d is %d", fildes, fdDescriptor.FileHandle); + + nErrCode = NtWriteFile + ( + fdDescriptor.FileHandle, + NULL, + NULL, + NULL, + &isbStatus, + (PVOID)buf, + nbyte, + NULL, + NULL + ); + + if(!NT_SUCCESS(nErrCode)) + { + ERR("NtWriteFile() failed with status 0x%08X", nErrCode); + errno = __status_to_errno(nErrCode); + return (0); + } + + return (isbStatus.Information); +} + +/* EOF */ + diff --git a/rossubsys/posix/lib/psxx/.cvsignore b/rossubsys/posix/lib/psxx/.cvsignore new file mode 100644 index 00000000000..541cdb996ea --- /dev/null +++ b/rossubsys/posix/lib/psxx/.cvsignore @@ -0,0 +1,7 @@ +*.o +*.d +*.a +*.exe +*.dll +*.coff +*.sym diff --git a/rossubsys/posix/lib/psxx/Makefile b/rossubsys/posix/lib/psxx/Makefile new file mode 100644 index 00000000000..025265e1207 --- /dev/null +++ b/rossubsys/posix/lib/psxx/Makefile @@ -0,0 +1,57 @@ +# $Id: Makefile,v 1.1 2003/09/27 18:52:31 guido Exp $ +# +# PSXX.DLL +# + +PATH_TO_TOP = ../../../reactos + +PATH_TO_PSX_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = psxx + +#TARGET_LIBPATH = $(PATH_TO_PSX_TOP)/dk/lib + +TARGET_SDKLIBS = ntdll.a + +#TARGET_BASE = 0x77dc0000 + +TARGET_ENTRY = _DllMain@12 + +TARGET_CFLAGS = -D__PSXX__ -D__PSXDLL__ + +TARGET_LFLAGS = \ + -Wl,--file-alignment,0x1000 \ + -Wl,--section-alignment,0x1000 \ + -Wl,--subsystem,posix:19.90 + + +TARGET_PATH = misc + + +MISC_OBJECTS = \ + misc/$(TARGET_NAME).coff \ + misc/main.o \ + misc/stubs.o + +TARGET_OBJECTS = \ + $(MISC_OBJECTS) + +#TARGET_CLEAN = \ +# misc/*.o \ +# misc/*.coff + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +#DTFLAGS = -k -l $@ + +#$(TARGET_NAME).a: $(TARGET_PATH)/$(TARGET_NAME).def +# $(DLLTOOL) \ +# $(DTFLAGS) \ +# -D $(TARGET_NAME).dll \ +# -d $(TARGET_PATH)/$(TARGET_NAME).def + +# EOF diff --git a/rossubsys/posix/lib/psxx/misc/.cvsignore b/rossubsys/posix/lib/psxx/misc/.cvsignore new file mode 100644 index 00000000000..f0022c19403 --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/.cvsignore @@ -0,0 +1,6 @@ +*.o +*.d +*.exe +*.dll +*.coff +*.sym diff --git a/rossubsys/posix/lib/psxx/misc/main.c b/rossubsys/posix/lib/psxx/misc/main.c new file mode 100644 index 00000000000..c93e80765b9 --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/main.c @@ -0,0 +1,10 @@ +/* $Id: main.c,v 1.3 2002/10/29 04:45:50 rex Exp $ + */ +#define NTOS_MODE_USER +#include + +BOOL STDCALL DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) +{ + return TRUE; +} +/* EOF */ diff --git a/rossubsys/posix/lib/psxx/misc/psxx.def b/rossubsys/posix/lib/psxx/misc/psxx.def new file mode 100644 index 00000000000..a9af92ce3a7 --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/psxx.def @@ -0,0 +1,631 @@ +; $Id: psxx.def,v 1.3 2002/10/29 04:45:50 rex Exp $ +; +; ReactOS - POSIX+ - X/11 over W32k +; +LIBRARY psxx.dll +; +EXPORTS +XActivateScreenSaver +XAddConnectionWatch +XAddExtension +XAddHost +XAddHosts +XAddPixel +XAddToExtensionList +XAddToSaveSet +XAllPlanes +XAllocClassHint +XAllocColor +XAllocColorCells +XAllocColorPlanes +XAllocIconSize +XAllocNamedColor +XAllocSizeHints +XAllocStandardColormap +XAllocWMHints +XAllowEvents +XAutoRepeatOff +XAutoRepeatOn +XBaseFontNameListOfFontSet +XBell +XBitmapBitOrder +XBitmapPad +XBitmapUnit +XBlackPixel +XBlackPixelOfScreen +XCellsOfScreen +XChangeActivePointerGrab +XChangeGC +XChangeKeyboardControl +XChangeKeyboardMapping +XChangePointerControl +XChangeProperty +XChangeSaveSet +XChangeWindowAttributes +XCheckIfEvent +XCheckMaskEvent +XCheckTypedEvent +XCheckTypedWindowEvent +XCheckWindowEvent +XCirculateSubwindows +XCirculateSubwindowsDown +XCirculateSubwindowsUp +XClearArea +XClearWindow +XClipBox +XCloseDisplay +XCloseIM +XCloseOM +XConfigureWindow +XConnectionNumber +XContextDependentDrawing +XContextualDrawing +XConvertCase +XConvertSelection +XCopyArea +XCopyColormapAndFree +XCopyGC +XCopyPlane +XCreateBitmapFromData +XCreateColormap +XCreateFontCursor +XCreateFontSet +XCreateGC +XCreateGlyphCursor +XCreateIC +XCreateImage +XCreateOC +XCreatePixmap +XCreatePixmapCursor +XCreatePixmapFromBitmapData +XCreateRegion +XCreateSimpleWindow +XCreateWindow +XDefaultColormap +XDefaultColormapOfScreen +XDefaultDepth +XDefaultDepthOfScreen +XDefaultGC +XDefaultGCOfScreen +XDefaultRootWindow +XDefaultScreen +XDefaultScreenOfDisplay +XDefaultString +XDefaultVisual +XDefaultVisualOfScreen +XDefineCursor +XDeleteContext +XDeleteModifiermapEntry +XDeleteProperty +XDestroyIC +XDestroyImage +XDestroyOC +XDestroyRegion +XDestroySubwindows +XDestroyWindow +XDirectionalDependentDrawing +XDisableAccessControl +XDisplayCells +XDisplayHeight +XDisplayHeightMM +XDisplayKeycodes +XDisplayMotionBufferSize +XDisplayName +XDisplayOfIM +XDisplayOfOM +XDisplayOfScreen +XDisplayPlanes +XDisplayString +XDisplayWidth +XDisplayWidthMM +XDoesBackingStore +XDoesSaveUnders +XDrawArc +XDrawArcs +XDrawImageString +XDrawImageString16 +XDrawLine +XDrawLines +XDrawPoint +XDrawPoints +XDrawRectangle +XDrawRectangles +XDrawSegments +XDrawString +XDrawString16 +XDrawText +XDrawText16 +XEHeadOfExtensionList +XESetBeforeFlush +XESetCloseDisplay +XESetCopyGC +XESetCreateFont +XESetCreateGC +XESetError +XESetErrorString +XESetEventToWire +XESetFlushGC +XESetFreeFont +XESetFreeGC +XESetPrintErrorValues +XESetWireToError +XESetWireToEvent +XEmptyRegion +XEnableAccessControl +XEqualRegion +XEventMaskOfScreen +XEventsQueued +XExtendedMaxRequestSize +XExtentsOfFontSet +XFetchBuffer +XFetchBytes +XFetchName +XFillArc +XFillArcs +XFillPolygon +XFillRectangle +XFillRectangles +XFilterEvent +XFindContext +XFindOnExtensionList +XFlush +XFlushGC +XFontsOfFontSet +XForceScreenSaver +XFree +XFreeColormap +XFreeColors +XFreeCursor +XFreeExtensionList +XFreeFont +XFreeFontInfo +XFreeFontNames +XFreeFontPath +XFreeFontSet +XFreeGC +XFreeModifiermap +XFreePixmap +XFreeStringList +XGContextFromGC +XGeometry +XGetAtomName +XGetAtomNames +XGetClassHint +XGetCommand +XGetDefault +XGetErrorDatabaseText +XGetErrorText +XGetFontPath +XGetFontProperty +XGetGCValues +XGetGeometry +XGetICValues +XGetIMValues +XGetIconName +XGetIconSizes +XGetImage +XGetInputFocus +XGetKeyboardControl +XGetKeyboardMapping +XGetModifierMapping +XGetMotionEvents +XGetNormalHints +XGetOCValues +XGetOMValues +XGetPixel +XGetPointerControl +XGetPointerMapping +XGetRGBColormaps +XGetScreenSaver +XGetSelectionOwner +XGetSizeHints +XGetStandardColormap +XGetSubImage +XGetTextProperty +XGetTransientForHint +XGetVisualInfo +XGetWMClientMachine +XGetWMColormapWindows +XGetWMHints +XGetWMIconName +XGetWMName +XGetWMNormalHints +XGetWMProtocols +XGetWMSizeHints +XGetWindowAttributes +XGetWindowProperty +XGetZoomHints +XGrabButton +XGrabKey +XGrabKeyboard +XGrabPointer +XGrabServer +XHeightMMOfScreen +XHeightOfScreen +XIMOfIC +XIconifyWindow +XIfEvent +XImageByteOrder +XInitExtension +XInitImage +XInitThreads +XInsertModifiermapEntry +XInstallColormap +XInternAtom +XInternAtoms +XInternalConnectionNumbers +XIntersectRegion +XKeycodeToKeysym +XKeysymToKeycode +XKeysymToString +XKillClient +XLastKnownRequestProcessed +XListDepths +XListExtensions +XListFonts +XListFontsWithInfo +XListHosts +XListInstalledColormaps +XListPixmapFormats +XListProperties +XLoadFont +XLoadQueryFont +XLocaleOfFontSet +XLocaleOfIM +XLocaleOfOM +XLockDisplay +XLookupColor +XLookupKeysym +XLookupString +XLowerWindow +XMapRaised +XMapSubwindows +XMapWindow +XMaskEvent +XMatchVisualInfo +XMaxCmapsOfScreen +XMaxRequestSize +XMinCmapsOfScreen +XMoveResizeWindow +XMoveWindow +XNewModifiermap +XNextEvent +XNextRequest +XNoOp +XOMOfOC +XOffsetRegion +XOpenDisplay +XOpenIM +XOpenOM +XParseColor +XParseGeometry +XPeekEvent +XPeekIfEvent +XPending +XPlanesOfScreen +XPointInRegion +XPolygonRegion +XProcessInternalConnection +XProtocolRevision +XProtocolVersion +XPutBackEvent +XPutImage +XPutPixel +XQLength +XQueryBestCursor +XQueryBestSize +XQueryBestStipple +XQueryBestTile +XQueryColor +XQueryColors +XQueryExtension +XQueryFont +XQueryKeymap +XQueryPointer +XQueryTextExtents +XQueryTextExtents16 +XQueryTree +XRaiseWindow +XReadBitmapFile +XReadBitmapFileData +XRebindKeysym +XRecolorCursor +XReconfigureWMWindow +XRectInRegion +XRefreshKeyboardMapping +XRegisterIMInstantiateCallback +XRemoveConnectionWatch +XRemoveFromSaveSet +XRemoveHost +XRemoveHosts +XReparentWindow +XResetScreenSaver +XResizeWindow +XResourceManagerString +XRestackWindows +XRootWindow +XRootWindowOfScreen +XRotateBuffers +XRotateWindowProperties +XSaveContext +XScreenCount +XScreenNumberOfScreen +XScreenOfDisplay +XScreenResourceString +XSelectInput +XSendEvent +XServerVendor +XSetAccessControl +XSetAfterFunction +XSetArcMode +XSetAuthorization +XSetBackground +XSetClassHint +XSetClipMask +XSetClipOrigin +XSetClipRectangles +XSetCloseDownMode +XSetCommand +XSetDashes +XSetErrorHandler +XSetFillRule +XSetFillStyle +XSetFont +XSetFontPath +XSetForeground +XSetFunction +XSetGraphicsExposures +XSetICFocus +XSetICValues +XSetIMValues +XSetIOErrorHandler +XSetIconName +XSetIconSizes +XSetInputFocus +XSetLineAttributes +XSetLocaleModifiers +XSetModifierMapping +XSetNormalHints +XSetOCValues +XSetOMValues +XSetPlaneMask +XSetPointerMapping +XSetRGBColormaps +XSetRegion +XSetScreenSaver +XSetSelectionOwner +XSetSizeHints +XSetStandardColormap +XSetStandardProperties +XSetState +XSetStipple +XSetSubwindowMode +XSetTSOrigin +XSetTextProperty +XSetTile +XSetTransientForHint +XSetWMClientMachine +XSetWMColormapWindows +XSetWMHints +XSetWMIconName +XSetWMName +XSetWMNormalHints +XSetWMProperties +XSetWMProtocols +XSetWMSizeHints +XSetWindowBackground +XSetWindowBackgroundPixmap +XSetWindowBorder +XSetWindowBorderPixmap +XSetWindowBorderWidth +XSetWindowColormap +XSetZoomHints +XShrinkRegion +XStoreBuffer +XStoreBytes +XStoreColor +XStoreColors +XStoreName +XStoreNamedColor +XStringListToTextProperty +XStringToKeysym +XSubImage +XSubtractRegion +XSupportsLocale +XSync +XSynchronize +XTextExtents +XTextExtents16 +XTextPropertyToStringList +XTextWidth +XTextWidth16 +XTranslateCoordinates +XUndefineCursor +XUngrabButton +XUngrabKey +XUngrabKeyboard +XUngrabPointer +XUngrabServer +XUninstallColormap +XUnionRectWithRegion +XUnionRegion +XUnloadFont +XUnlockDisplay +XUnmapSubwindows +XUnmapWindow +XUnregisterIMInstantiateCallback +XUnsetICFocus +XVaCreateNestedList +XVendorRelease +XVisualIDFromVisual +XWMGeometry +XWarpPointer +XWhitePixel +XWhitePixelOfScreen +XWidthMMOfScreen +XWidthOfScreen +XWindowEvent +XWithdrawWindow +XWriteBitmapFile +XXorRegion +XcmsAddColorSpace +XcmsAddFunctionSet +XcmsAllocColor +XcmsAllocNamedColor +XcmsCCCOfColormap +XcmsCIELabClipL +XcmsCIELabClipLab +XcmsCIELabClipab +XcmsCIELabQueryMaxC +XcmsCIELabQueryMaxL +XcmsCIELabQueryMaxLC +XcmsCIELabQueryMinL +XcmsCIELabToCIEXYZ +XcmsCIELabWhiteShiftColors +XcmsCIELuvClipL +XcmsCIELuvClipLuv +XcmsCIELuvClipuv +XcmsCIELuvQueryMaxC +XcmsCIELuvQueryMaxL +XcmsCIELuvQueryMaxLC +XcmsCIELuvQueryMinL +XcmsCIELuvToCIEuvY +XcmsCIELuvWhiteShiftColors +XcmsCIEXYZToCIELab +XcmsCIEXYZToCIEuvY +XcmsCIEXYZToCIExyY +XcmsCIEXYZToRGBi +XcmsCIEuvYToCIELuv +XcmsCIEuvYToCIEXYZ +XcmsCIEuvYToTekHVC +XcmsCIExyYToCIEXYZ +XcmsClientWhitePointOfCCC +XcmsConvertColors +XcmsCreateCCC +XcmsDefaultCCC +XcmsDisplayOfCCC +XcmsFormatOfPrefix +XcmsFreeCCC +XcmsLookupColor +XcmsPrefixOfFormat +XcmsQueryBlack +XcmsQueryBlue +XcmsQueryColor +XcmsQueryColors +XcmsQueryGreen +XcmsQueryRed +XcmsQueryWhite +XcmsRGBToRGBi +XcmsRGBiToCIEXYZ +XcmsRGBiToRGB +XcmsScreenNumberOfCCC +XcmsScreenWhitePointOfCCC +XcmsSetCCCOfColormap +XcmsSetCompressionProc +XcmsSetWhiteAdjustProc +XcmsSetWhitePoint +XcmsStoreColor +XcmsStoreColors +XcmsTekHVCClipC +XcmsTekHVCClipV +XcmsTekHVCClipVC +XcmsTekHVCQueryMaxC +XcmsTekHVCQueryMaxV +XcmsTekHVCQueryMaxVC +XcmsTekHVCQueryMaxVSamples +XcmsTekHVCQueryMinV +XcmsTekHVCToCIEuvY +XcmsTekHVCWhiteShiftColors +XcmsVisualOfCCC +XmbDrawImageString +XmbDrawString +XmbDrawText +XmbLookupString +XmbResetIC +XmbSetWMProperties +XmbTextEscapement +XmbTextExtents +XmbTextListToTextProperty +XmbTextPerCharExtents +XmbTextPropertyToTextList +Xpermalloc +XrmCombineDatabase +XrmCombineFileDatabase +XrmDestroyDatabase +XrmEnumerateDatabase +XrmGetDatabase +XrmGetFileDatabase +XrmGetResource +XrmGetStringDatabase +XrmInitialize +XrmLocaleOfDatabase +XrmMergeDatabases +XrmParseCommand +XrmPermStringToQuark +XrmPutFileDatabase +XrmPutLineResource +XrmPutResource +XrmPutStringResource +XrmQGetResource +XrmQGetSearchList +XrmQGetSearchResource +XrmQPutResource +XrmQPutStringResource +XrmQuarkToString +XrmSetDatabase +XrmStringToBindingQuarkList +XrmStringToQuark +XrmStringToQuarkList +XrmUniqueQuark +XwcDrawImageString +XwcDrawString +XwcDrawText +XwcFreeStringList +XwcLookupString +XwcResetIC +XwcTextEscapement +XwcTextExtents +XwcTextListToTextProperty +XwcTextPerCharExtents +XwcTextPropertyToTextList +_XAllocID +_XAllocIDs +_XAllocScratch +_XAllocTemp +_XAsyncErrorHandler +_XConnectDisplay +_XCreateMutex_fn_p +_XDeqAsyncHandler +_XEatData +_XError +_XFlushGCCache +_XFlushIt +_XFreeMutex_fn_p +_XFreeTemp +_XGetAsyncData +_XGetAsyncReply +_XIOError +_XInitImageFuncPtrs +_XKillTimer +_XLockMutex_fn_p +_XRead +_XReadEvents +_XReadPad +_XRegisterFilterByMask +_XRegisterFilterByType +_XRegisterInternalConnection +_XReply +_XSend +_XSetLastRequestRead +_XSetTimer +_XUnknownNativeEvent +_XUnlockMutex_fn_p +_XUnregisterFilter +_XUnregisterInternalConnection +_XVIDtoVisual +_XWinSelectWindow +_Xdebug_p +_Xglobal_lock_p +_Xthread_init +_Xthread_waiter +; EOF diff --git a/rossubsys/posix/lib/psxx/misc/psxx.edf b/rossubsys/posix/lib/psxx/misc/psxx.edf new file mode 100644 index 00000000000..e760cc0b035 --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/psxx.edf @@ -0,0 +1,631 @@ +; $Id: psxx.edf,v 1.3 2002/10/29 04:45:50 rex Exp $ +; +; ReactOS - POSIX+ - X/11 over W32k +; +LIBRARY psxx.dll +; +EXPORTS +XActivateScreenSaver +XAddConnectionWatch +XAddExtension +XAddHost +XAddHosts +XAddPixel +XAddToExtensionList +XAddToSaveSet +XAllPlanes +XAllocClassHint +XAllocColor +XAllocColorCells +XAllocColorPlanes +XAllocIconSize +XAllocNamedColor +XAllocSizeHints +XAllocStandardColormap +XAllocWMHints +XAllowEvents +XAutoRepeatOff +XAutoRepeatOn +XBaseFontNameListOfFontSet +XBell +XBitmapBitOrder +XBitmapPad +XBitmapUnit +XBlackPixel +XBlackPixelOfScreen +XCellsOfScreen +XChangeActivePointerGrab +XChangeGC +XChangeKeyboardControl +XChangeKeyboardMapping +XChangePointerControl +XChangeProperty +XChangeSaveSet +XChangeWindowAttributes +XCheckIfEvent +XCheckMaskEvent +XCheckTypedEvent +XCheckTypedWindowEvent +XCheckWindowEvent +XCirculateSubwindows +XCirculateSubwindowsDown +XCirculateSubwindowsUp +XClearArea +XClearWindow +XClipBox +XCloseDisplay +XCloseIM +XCloseOM +XConfigureWindow +XConnectionNumber +XContextDependentDrawing +XContextualDrawing +XConvertCase +XConvertSelection +XCopyArea +XCopyColormapAndFree +XCopyGC +XCopyPlane +XCreateBitmapFromData +XCreateColormap +XCreateFontCursor +XCreateFontSet +XCreateGC +XCreateGlyphCursor +XCreateIC +XCreateImage +XCreateOC +XCreatePixmap +XCreatePixmapCursor +XCreatePixmapFromBitmapData +XCreateRegion +XCreateSimpleWindow +XCreateWindow +XDefaultColormap +XDefaultColormapOfScreen +XDefaultDepth +XDefaultDepthOfScreen +XDefaultGC +XDefaultGCOfScreen +XDefaultRootWindow +XDefaultScreen +XDefaultScreenOfDisplay +XDefaultString +XDefaultVisual +XDefaultVisualOfScreen +XDefineCursor +XDeleteContext +XDeleteModifiermapEntry +XDeleteProperty +XDestroyIC +XDestroyImage +XDestroyOC +XDestroyRegion +XDestroySubwindows +XDestroyWindow +XDirectionalDependentDrawing +XDisableAccessControl +XDisplayCells +XDisplayHeight +XDisplayHeightMM +XDisplayKeycodes +XDisplayMotionBufferSize +XDisplayName +XDisplayOfIM +XDisplayOfOM +XDisplayOfScreen +XDisplayPlanes +XDisplayString +XDisplayWidth +XDisplayWidthMM +XDoesBackingStore +XDoesSaveUnders +XDrawArc +XDrawArcs +XDrawImageString +XDrawImageString16 +XDrawLine +XDrawLines +XDrawPoint +XDrawPoints +XDrawRectangle +XDrawRectangles +XDrawSegments +XDrawString +XDrawString16 +XDrawText +XDrawText16 +XEHeadOfExtensionList +XESetBeforeFlush +XESetCloseDisplay +XESetCopyGC +XESetCreateFont +XESetCreateGC +XESetError +XESetErrorString +XESetEventToWire +XESetFlushGC +XESetFreeFont +XESetFreeGC +XESetPrintErrorValues +XESetWireToError +XESetWireToEvent +XEmptyRegion +XEnableAccessControl +XEqualRegion +XEventMaskOfScreen +XEventsQueued +XExtendedMaxRequestSize +XExtentsOfFontSet +XFetchBuffer +XFetchBytes +XFetchName +XFillArc +XFillArcs +XFillPolygon +XFillRectangle +XFillRectangles +XFilterEvent +XFindContext +XFindOnExtensionList +XFlush +XFlushGC +XFontsOfFontSet +XForceScreenSaver +XFree +XFreeColormap +XFreeColors +XFreeCursor +XFreeExtensionList +XFreeFont +XFreeFontInfo +XFreeFontNames +XFreeFontPath +XFreeFontSet +XFreeGC +XFreeModifiermap +XFreePixmap +XFreeStringList +XGContextFromGC +XGeometry +XGetAtomName +XGetAtomNames +XGetClassHint +XGetCommand +XGetDefault +XGetErrorDatabaseText +XGetErrorText +XGetFontPath +XGetFontProperty +XGetGCValues +XGetGeometry +XGetICValues +XGetIMValues +XGetIconName +XGetIconSizes +XGetImage +XGetInputFocus +XGetKeyboardControl +XGetKeyboardMapping +XGetModifierMapping +XGetMotionEvents +XGetNormalHints +XGetOCValues +XGetOMValues +XGetPixel +XGetPointerControl +XGetPointerMapping +XGetRGBColormaps +XGetScreenSaver +XGetSelectionOwner +XGetSizeHints +XGetStandardColormap +XGetSubImage +XGetTextProperty +XGetTransientForHint +XGetVisualInfo +XGetWMClientMachine +XGetWMColormapWindows +XGetWMHints +XGetWMIconName +XGetWMName +XGetWMNormalHints +XGetWMProtocols +XGetWMSizeHints +XGetWindowAttributes +XGetWindowProperty +XGetZoomHints +XGrabButton +XGrabKey +XGrabKeyboard +XGrabPointer +XGrabServer +XHeightMMOfScreen +XHeightOfScreen +XIMOfIC +XIconifyWindow +XIfEvent +XImageByteOrder +XInitExtension +XInitImage +XInitThreads +XInsertModifiermapEntry +XInstallColormap +XInternAtom +XInternAtoms +XInternalConnectionNumbers +XIntersectRegion +XKeycodeToKeysym +XKeysymToKeycode +XKeysymToString +XKillClient +XLastKnownRequestProcessed +XListDepths +XListExtensions +XListFonts +XListFontsWithInfo +XListHosts +XListInstalledColormaps +XListPixmapFormats +XListProperties +XLoadFont +XLoadQueryFont +XLocaleOfFontSet +XLocaleOfIM +XLocaleOfOM +XLockDisplay +XLookupColor +XLookupKeysym +XLookupString +XLowerWindow +XMapRaised +XMapSubwindows +XMapWindow +XMaskEvent +XMatchVisualInfo +XMaxCmapsOfScreen +XMaxRequestSize +XMinCmapsOfScreen +XMoveResizeWindow +XMoveWindow +XNewModifiermap +XNextEvent +XNextRequest +XNoOp +XOMOfOC +XOffsetRegion +XOpenDisplay +XOpenIM +XOpenOM +XParseColor +XParseGeometry +XPeekEvent +XPeekIfEvent +XPending +XPlanesOfScreen +XPointInRegion +XPolygonRegion +XProcessInternalConnection +XProtocolRevision +XProtocolVersion +XPutBackEvent +XPutImage +XPutPixel +XQLength +XQueryBestCursor +XQueryBestSize +XQueryBestStipple +XQueryBestTile +XQueryColor +XQueryColors +XQueryExtension +XQueryFont +XQueryKeymap +XQueryPointer +XQueryTextExtents +XQueryTextExtents16 +XQueryTree +XRaiseWindow +XReadBitmapFile +XReadBitmapFileData +XRebindKeysym +XRecolorCursor +XReconfigureWMWindow +XRectInRegion +XRefreshKeyboardMapping +XRegisterIMInstantiateCallback +XRemoveConnectionWatch +XRemoveFromSaveSet +XRemoveHost +XRemoveHosts +XReparentWindow +XResetScreenSaver +XResizeWindow +XResourceManagerString +XRestackWindows +XRootWindow +XRootWindowOfScreen +XRotateBuffers +XRotateWindowProperties +XSaveContext +XScreenCount +XScreenNumberOfScreen +XScreenOfDisplay +XScreenResourceString +XSelectInput +XSendEvent +XServerVendor +XSetAccessControl +XSetAfterFunction +XSetArcMode +XSetAuthorization +XSetBackground +XSetClassHint +XSetClipMask +XSetClipOrigin +XSetClipRectangles +XSetCloseDownMode +XSetCommand +XSetDashes +XSetErrorHandler +XSetFillRule +XSetFillStyle +XSetFont +XSetFontPath +XSetForeground +XSetFunction +XSetGraphicsExposures +XSetICFocus +XSetICValues +XSetIMValues +XSetIOErrorHandler +XSetIconName +XSetIconSizes +XSetInputFocus +XSetLineAttributes +XSetLocaleModifiers +XSetModifierMapping +XSetNormalHints +XSetOCValues +XSetOMValues +XSetPlaneMask +XSetPointerMapping +XSetRGBColormaps +XSetRegion +XSetScreenSaver +XSetSelectionOwner +XSetSizeHints +XSetStandardColormap +XSetStandardProperties +XSetState +XSetStipple +XSetSubwindowMode +XSetTSOrigin +XSetTextProperty +XSetTile +XSetTransientForHint +XSetWMClientMachine +XSetWMColormapWindows +XSetWMHints +XSetWMIconName +XSetWMName +XSetWMNormalHints +XSetWMProperties +XSetWMProtocols +XSetWMSizeHints +XSetWindowBackground +XSetWindowBackgroundPixmap +XSetWindowBorder +XSetWindowBorderPixmap +XSetWindowBorderWidth +XSetWindowColormap +XSetZoomHints +XShrinkRegion +XStoreBuffer +XStoreBytes +XStoreColor +XStoreColors +XStoreName +XStoreNamedColor +XStringListToTextProperty +XStringToKeysym +XSubImage +XSubtractRegion +XSupportsLocale +XSync +XSynchronize +XTextExtents +XTextExtents16 +XTextPropertyToStringList +XTextWidth +XTextWidth16 +XTranslateCoordinates +XUndefineCursor +XUngrabButton +XUngrabKey +XUngrabKeyboard +XUngrabPointer +XUngrabServer +XUninstallColormap +XUnionRectWithRegion +XUnionRegion +XUnloadFont +XUnlockDisplay +XUnmapSubwindows +XUnmapWindow +XUnregisterIMInstantiateCallback +XUnsetICFocus +XVaCreateNestedList +XVendorRelease +XVisualIDFromVisual +XWMGeometry +XWarpPointer +XWhitePixel +XWhitePixelOfScreen +XWidthMMOfScreen +XWidthOfScreen +XWindowEvent +XWithdrawWindow +XWriteBitmapFile +XXorRegion +XcmsAddColorSpace +XcmsAddFunctionSet +XcmsAllocColor +XcmsAllocNamedColor +XcmsCCCOfColormap +XcmsCIELabClipL +XcmsCIELabClipLab +XcmsCIELabClipab +XcmsCIELabQueryMaxC +XcmsCIELabQueryMaxL +XcmsCIELabQueryMaxLC +XcmsCIELabQueryMinL +XcmsCIELabToCIEXYZ +XcmsCIELabWhiteShiftColors +XcmsCIELuvClipL +XcmsCIELuvClipLuv +XcmsCIELuvClipuv +XcmsCIELuvQueryMaxC +XcmsCIELuvQueryMaxL +XcmsCIELuvQueryMaxLC +XcmsCIELuvQueryMinL +XcmsCIELuvToCIEuvY +XcmsCIELuvWhiteShiftColors +XcmsCIEXYZToCIELab +XcmsCIEXYZToCIEuvY +XcmsCIEXYZToCIExyY +XcmsCIEXYZToRGBi +XcmsCIEuvYToCIELuv +XcmsCIEuvYToCIEXYZ +XcmsCIEuvYToTekHVC +XcmsCIExyYToCIEXYZ +XcmsClientWhitePointOfCCC +XcmsConvertColors +XcmsCreateCCC +XcmsDefaultCCC +XcmsDisplayOfCCC +XcmsFormatOfPrefix +XcmsFreeCCC +XcmsLookupColor +XcmsPrefixOfFormat +XcmsQueryBlack +XcmsQueryBlue +XcmsQueryColor +XcmsQueryColors +XcmsQueryGreen +XcmsQueryRed +XcmsQueryWhite +XcmsRGBToRGBi +XcmsRGBiToCIEXYZ +XcmsRGBiToRGB +XcmsScreenNumberOfCCC +XcmsScreenWhitePointOfCCC +XcmsSetCCCOfColormap +XcmsSetCompressionProc +XcmsSetWhiteAdjustProc +XcmsSetWhitePoint +XcmsStoreColor +XcmsStoreColors +XcmsTekHVCClipC +XcmsTekHVCClipV +XcmsTekHVCClipVC +XcmsTekHVCQueryMaxC +XcmsTekHVCQueryMaxV +XcmsTekHVCQueryMaxVC +XcmsTekHVCQueryMaxVSamples +XcmsTekHVCQueryMinV +XcmsTekHVCToCIEuvY +XcmsTekHVCWhiteShiftColors +XcmsVisualOfCCC +XmbDrawImageString +XmbDrawString +XmbDrawText +XmbLookupString +XmbResetIC +XmbSetWMProperties +XmbTextEscapement +XmbTextExtents +XmbTextListToTextProperty +XmbTextPerCharExtents +XmbTextPropertyToTextList +Xpermalloc +XrmCombineDatabase +XrmCombineFileDatabase +XrmDestroyDatabase +XrmEnumerateDatabase +XrmGetDatabase +XrmGetFileDatabase +XrmGetResource +XrmGetStringDatabase +XrmInitialize +XrmLocaleOfDatabase +XrmMergeDatabases +XrmParseCommand +XrmPermStringToQuark +XrmPutFileDatabase +XrmPutLineResource +XrmPutResource +XrmPutStringResource +XrmQGetResource +XrmQGetSearchList +XrmQGetSearchResource +XrmQPutResource +XrmQPutStringResource +XrmQuarkToString +XrmSetDatabase +XrmStringToBindingQuarkList +XrmStringToQuark +XrmStringToQuarkList +XrmUniqueQuark +XwcDrawImageString +XwcDrawString +XwcDrawText +XwcFreeStringList +XwcLookupString +XwcResetIC +XwcTextEscapement +XwcTextExtents +XwcTextListToTextProperty +XwcTextPerCharExtents +XwcTextPropertyToTextList +_XAllocID +_XAllocIDs +_XAllocScratch +_XAllocTemp +_XAsyncErrorHandler +_XConnectDisplay +_XCreateMutex_fn_p +_XDeqAsyncHandler +_XEatData +_XError +_XFlushGCCache +_XFlushIt +_XFreeMutex_fn_p +_XFreeTemp +_XGetAsyncData +_XGetAsyncReply +_XIOError +_XInitImageFuncPtrs +_XKillTimer +_XLockMutex_fn_p +_XRead +_XReadEvents +_XReadPad +_XRegisterFilterByMask +_XRegisterFilterByType +_XRegisterInternalConnection +_XReply +_XSend +_XSetLastRequestRead +_XSetTimer +_XUnknownNativeEvent +_XUnlockMutex_fn_p +_XUnregisterFilter +_XUnregisterInternalConnection +_XVIDtoVisual +_XWinSelectWindow +_Xdebug_p +_Xglobal_lock_p +_Xthread_init +_Xthread_waiter +; EOF diff --git a/rossubsys/posix/lib/psxx/misc/psxx.rc b/rossubsys/posix/lib/psxx/misc/psxx.rc new file mode 100644 index 00000000000..f6167b74469 --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/psxx.rc @@ -0,0 +1,38 @@ +#include +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +VS_VERSION_INFO VERSIONINFO + FILEVERSION RES_UINT_FV_MAJOR,RES_UINT_FV_MINOR,RES_UINT_FV_REVISION,RES_UINT_FV_BUILD + PRODUCTVERSION RES_UINT_PV_MAJOR,RES_UINT_PV_MINOR,RES_UINT_PV_REVISION,RES_UINT_PV_BUILD + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", RES_STR_COMPANY_NAME + VALUE "FileDescription", "X11R6 client library for the POSIX+ Subsystem\0" + VALUE "FileVersion", RES_STR_FILE_VERSION + VALUE "InternalName", "psxx\0" + VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT + VALUE "OriginalFilename", "psxx.dll\0" + VALUE "ProductName", RES_STR_PRODUCT_NAME + VALUE "ProductVersion", RES_STR_PRODUCT_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + diff --git a/rossubsys/posix/lib/psxx/misc/stubs.c b/rossubsys/posix/lib/psxx/misc/stubs.c new file mode 100644 index 00000000000..a23d5d02cda --- /dev/null +++ b/rossubsys/posix/lib/psxx/misc/stubs.c @@ -0,0 +1,629 @@ +/* $Id: stubs.c,v 1.3 2002/10/29 04:45:50 rex Exp $ + * + * ReactOS - POSIX+ - X/11 over W32k + */ +#define X_NOT_IMPLEMENTED(n) void n(void) {} +X_NOT_IMPLEMENTED(XActivateScreenSaver) +X_NOT_IMPLEMENTED(XAddConnectionWatch) +X_NOT_IMPLEMENTED(XAddExtension) +X_NOT_IMPLEMENTED(XAddHost) +X_NOT_IMPLEMENTED(XAddHosts) +X_NOT_IMPLEMENTED(XAddPixel) +X_NOT_IMPLEMENTED(XAddToExtensionList) +X_NOT_IMPLEMENTED(XAddToSaveSet) +X_NOT_IMPLEMENTED(XAllPlanes) +X_NOT_IMPLEMENTED(XAllocClassHint) +X_NOT_IMPLEMENTED(XAllocColor) +X_NOT_IMPLEMENTED(XAllocColorCells) +X_NOT_IMPLEMENTED(XAllocColorPlanes) +X_NOT_IMPLEMENTED(XAllocIconSize) +X_NOT_IMPLEMENTED(XAllocNamedColor) +X_NOT_IMPLEMENTED(XAllocSizeHints) +X_NOT_IMPLEMENTED(XAllocStandardColormap) +X_NOT_IMPLEMENTED(XAllocWMHints) +X_NOT_IMPLEMENTED(XAllowEvents) +X_NOT_IMPLEMENTED(XAutoRepeatOff) +X_NOT_IMPLEMENTED(XAutoRepeatOn) +X_NOT_IMPLEMENTED(XBaseFontNameListOfFontSet) +X_NOT_IMPLEMENTED(XBell) +X_NOT_IMPLEMENTED(XBitmapBitOrder) +X_NOT_IMPLEMENTED(XBitmapPad) +X_NOT_IMPLEMENTED(XBitmapUnit) +X_NOT_IMPLEMENTED(XBlackPixel) +X_NOT_IMPLEMENTED(XBlackPixelOfScreen) +X_NOT_IMPLEMENTED(XCellsOfScreen) +X_NOT_IMPLEMENTED(XChangeActivePointerGrab) +X_NOT_IMPLEMENTED(XChangeGC) +X_NOT_IMPLEMENTED(XChangeKeyboardControl) +X_NOT_IMPLEMENTED(XChangeKeyboardMapping) +X_NOT_IMPLEMENTED(XChangePointerControl) +X_NOT_IMPLEMENTED(XChangeProperty) +X_NOT_IMPLEMENTED(XChangeSaveSet) +X_NOT_IMPLEMENTED(XChangeWindowAttributes) +X_NOT_IMPLEMENTED(XCheckIfEvent) +X_NOT_IMPLEMENTED(XCheckMaskEvent) +X_NOT_IMPLEMENTED(XCheckTypedEvent) +X_NOT_IMPLEMENTED(XCheckTypedWindowEvent) +X_NOT_IMPLEMENTED(XCheckWindowEvent) +X_NOT_IMPLEMENTED(XCirculateSubwindows) +X_NOT_IMPLEMENTED(XCirculateSubwindowsDown) +X_NOT_IMPLEMENTED(XCirculateSubwindowsUp) +X_NOT_IMPLEMENTED(XClearArea) +X_NOT_IMPLEMENTED(XClearWindow) +X_NOT_IMPLEMENTED(XClipBox) +X_NOT_IMPLEMENTED(XCloseDisplay) +X_NOT_IMPLEMENTED(XCloseIM) +X_NOT_IMPLEMENTED(XCloseOM) +X_NOT_IMPLEMENTED(XConfigureWindow) +X_NOT_IMPLEMENTED(XConnectionNumber) +X_NOT_IMPLEMENTED(XContextDependentDrawing) +X_NOT_IMPLEMENTED(XContextualDrawing) +X_NOT_IMPLEMENTED(XConvertCase) +X_NOT_IMPLEMENTED(XConvertSelection) +X_NOT_IMPLEMENTED(XCopyArea) +X_NOT_IMPLEMENTED(XCopyColormapAndFree) +X_NOT_IMPLEMENTED(XCopyGC) +X_NOT_IMPLEMENTED(XCopyPlane) +X_NOT_IMPLEMENTED(XCreateBitmapFromData) +X_NOT_IMPLEMENTED(XCreateColormap) +X_NOT_IMPLEMENTED(XCreateFontCursor) +X_NOT_IMPLEMENTED(XCreateFontSet) +X_NOT_IMPLEMENTED(XCreateGC) +X_NOT_IMPLEMENTED(XCreateGlyphCursor) +X_NOT_IMPLEMENTED(XCreateIC) +X_NOT_IMPLEMENTED(XCreateImage) +X_NOT_IMPLEMENTED(XCreateOC) +X_NOT_IMPLEMENTED(XCreatePixmap) +X_NOT_IMPLEMENTED(XCreatePixmapCursor) +X_NOT_IMPLEMENTED(XCreatePixmapFromBitmapData) +X_NOT_IMPLEMENTED(XCreateRegion) +X_NOT_IMPLEMENTED(XCreateSimpleWindow) +X_NOT_IMPLEMENTED(XCreateWindow) +X_NOT_IMPLEMENTED(XDefaultColormap) +X_NOT_IMPLEMENTED(XDefaultColormapOfScreen) +X_NOT_IMPLEMENTED(XDefaultDepth) +X_NOT_IMPLEMENTED(XDefaultDepthOfScreen) +X_NOT_IMPLEMENTED(XDefaultGC) +X_NOT_IMPLEMENTED(XDefaultGCOfScreen) +X_NOT_IMPLEMENTED(XDefaultRootWindow) +X_NOT_IMPLEMENTED(XDefaultScreen) +X_NOT_IMPLEMENTED(XDefaultScreenOfDisplay) +X_NOT_IMPLEMENTED(XDefaultString) +X_NOT_IMPLEMENTED(XDefaultVisual) +X_NOT_IMPLEMENTED(XDefaultVisualOfScreen) +X_NOT_IMPLEMENTED(XDefineCursor) +X_NOT_IMPLEMENTED(XDeleteContext) +X_NOT_IMPLEMENTED(XDeleteModifiermapEntry) +X_NOT_IMPLEMENTED(XDeleteProperty) +X_NOT_IMPLEMENTED(XDestroyIC) +X_NOT_IMPLEMENTED(XDestroyImage) +X_NOT_IMPLEMENTED(XDestroyOC) +X_NOT_IMPLEMENTED(XDestroyRegion) +X_NOT_IMPLEMENTED(XDestroySubwindows) +X_NOT_IMPLEMENTED(XDestroyWindow) +X_NOT_IMPLEMENTED(XDirectionalDependentDrawing) +X_NOT_IMPLEMENTED(XDisableAccessControl) +X_NOT_IMPLEMENTED(XDisplayCells) +X_NOT_IMPLEMENTED(XDisplayHeight) +X_NOT_IMPLEMENTED(XDisplayHeightMM) +X_NOT_IMPLEMENTED(XDisplayKeycodes) +X_NOT_IMPLEMENTED(XDisplayMotionBufferSize) +X_NOT_IMPLEMENTED(XDisplayName) +X_NOT_IMPLEMENTED(XDisplayOfIM) +X_NOT_IMPLEMENTED(XDisplayOfOM) +X_NOT_IMPLEMENTED(XDisplayOfScreen) +X_NOT_IMPLEMENTED(XDisplayPlanes) +X_NOT_IMPLEMENTED(XDisplayString) +X_NOT_IMPLEMENTED(XDisplayWidth) +X_NOT_IMPLEMENTED(XDisplayWidthMM) +X_NOT_IMPLEMENTED(XDoesBackingStore) +X_NOT_IMPLEMENTED(XDoesSaveUnders) +X_NOT_IMPLEMENTED(XDrawArc) +X_NOT_IMPLEMENTED(XDrawArcs) +X_NOT_IMPLEMENTED(XDrawImageString) +X_NOT_IMPLEMENTED(XDrawImageString16) +X_NOT_IMPLEMENTED(XDrawLine) +X_NOT_IMPLEMENTED(XDrawLines) +X_NOT_IMPLEMENTED(XDrawPoint) +X_NOT_IMPLEMENTED(XDrawPoints) +X_NOT_IMPLEMENTED(XDrawRectangle) +X_NOT_IMPLEMENTED(XDrawRectangles) +X_NOT_IMPLEMENTED(XDrawSegments) +X_NOT_IMPLEMENTED(XDrawString) +X_NOT_IMPLEMENTED(XDrawString16) +X_NOT_IMPLEMENTED(XDrawText) +X_NOT_IMPLEMENTED(XDrawText16) +X_NOT_IMPLEMENTED(XEHeadOfExtensionList) +X_NOT_IMPLEMENTED(XESetBeforeFlush) +X_NOT_IMPLEMENTED(XESetCloseDisplay) +X_NOT_IMPLEMENTED(XESetCopyGC) +X_NOT_IMPLEMENTED(XESetCreateFont) +X_NOT_IMPLEMENTED(XESetCreateGC) +X_NOT_IMPLEMENTED(XESetError) +X_NOT_IMPLEMENTED(XESetErrorString) +X_NOT_IMPLEMENTED(XESetEventToWire) +X_NOT_IMPLEMENTED(XESetFlushGC) +X_NOT_IMPLEMENTED(XESetFreeFont) +X_NOT_IMPLEMENTED(XESetFreeGC) +X_NOT_IMPLEMENTED(XESetPrintErrorValues) +X_NOT_IMPLEMENTED(XESetWireToError) +X_NOT_IMPLEMENTED(XESetWireToEvent) +X_NOT_IMPLEMENTED(XEmptyRegion) +X_NOT_IMPLEMENTED(XEnableAccessControl) +X_NOT_IMPLEMENTED(XEqualRegion) +X_NOT_IMPLEMENTED(XEventMaskOfScreen) +X_NOT_IMPLEMENTED(XEventsQueued) +X_NOT_IMPLEMENTED(XExtendedMaxRequestSize) +X_NOT_IMPLEMENTED(XExtentsOfFontSet) +X_NOT_IMPLEMENTED(XFetchBuffer) +X_NOT_IMPLEMENTED(XFetchBytes) +X_NOT_IMPLEMENTED(XFetchName) +X_NOT_IMPLEMENTED(XFillArc) +X_NOT_IMPLEMENTED(XFillArcs) +X_NOT_IMPLEMENTED(XFillPolygon) +X_NOT_IMPLEMENTED(XFillRectangle) +X_NOT_IMPLEMENTED(XFillRectangles) +X_NOT_IMPLEMENTED(XFilterEvent) +X_NOT_IMPLEMENTED(XFindContext) +X_NOT_IMPLEMENTED(XFindOnExtensionList) +X_NOT_IMPLEMENTED(XFlush) +X_NOT_IMPLEMENTED(XFlushGC) +X_NOT_IMPLEMENTED(XFontsOfFontSet) +X_NOT_IMPLEMENTED(XForceScreenSaver) +X_NOT_IMPLEMENTED(XFree) +X_NOT_IMPLEMENTED(XFreeColormap) +X_NOT_IMPLEMENTED(XFreeColors) +X_NOT_IMPLEMENTED(XFreeCursor) +X_NOT_IMPLEMENTED(XFreeExtensionList) +X_NOT_IMPLEMENTED(XFreeFont) +X_NOT_IMPLEMENTED(XFreeFontInfo) +X_NOT_IMPLEMENTED(XFreeFontNames) +X_NOT_IMPLEMENTED(XFreeFontPath) +X_NOT_IMPLEMENTED(XFreeFontSet) +X_NOT_IMPLEMENTED(XFreeGC) +X_NOT_IMPLEMENTED(XFreeModifiermap) +X_NOT_IMPLEMENTED(XFreePixmap) +X_NOT_IMPLEMENTED(XFreeStringList) +X_NOT_IMPLEMENTED(XGContextFromGC) +X_NOT_IMPLEMENTED(XGeometry) +X_NOT_IMPLEMENTED(XGetAtomName) +X_NOT_IMPLEMENTED(XGetAtomNames) +X_NOT_IMPLEMENTED(XGetClassHint) +X_NOT_IMPLEMENTED(XGetCommand) +X_NOT_IMPLEMENTED(XGetDefault) +X_NOT_IMPLEMENTED(XGetErrorDatabaseText) +X_NOT_IMPLEMENTED(XGetErrorText) +X_NOT_IMPLEMENTED(XGetFontPath) +X_NOT_IMPLEMENTED(XGetFontProperty) +X_NOT_IMPLEMENTED(XGetGCValues) +X_NOT_IMPLEMENTED(XGetGeometry) +X_NOT_IMPLEMENTED(XGetICValues) +X_NOT_IMPLEMENTED(XGetIMValues) +X_NOT_IMPLEMENTED(XGetIconName) +X_NOT_IMPLEMENTED(XGetIconSizes) +X_NOT_IMPLEMENTED(XGetImage) +X_NOT_IMPLEMENTED(XGetInputFocus) +X_NOT_IMPLEMENTED(XGetKeyboardControl) +X_NOT_IMPLEMENTED(XGetKeyboardMapping) +X_NOT_IMPLEMENTED(XGetModifierMapping) +X_NOT_IMPLEMENTED(XGetMotionEvents) +X_NOT_IMPLEMENTED(XGetNormalHints) +X_NOT_IMPLEMENTED(XGetOCValues) +X_NOT_IMPLEMENTED(XGetOMValues) +X_NOT_IMPLEMENTED(XGetPixel) +X_NOT_IMPLEMENTED(XGetPointerControl) +X_NOT_IMPLEMENTED(XGetPointerMapping) +X_NOT_IMPLEMENTED(XGetRGBColormaps) +X_NOT_IMPLEMENTED(XGetScreenSaver) +X_NOT_IMPLEMENTED(XGetSelectionOwner) +X_NOT_IMPLEMENTED(XGetSizeHints) +X_NOT_IMPLEMENTED(XGetStandardColormap) +X_NOT_IMPLEMENTED(XGetSubImage) +X_NOT_IMPLEMENTED(XGetTextProperty) +X_NOT_IMPLEMENTED(XGetTransientForHint) +X_NOT_IMPLEMENTED(XGetVisualInfo) +X_NOT_IMPLEMENTED(XGetWMClientMachine) +X_NOT_IMPLEMENTED(XGetWMColormapWindows) +X_NOT_IMPLEMENTED(XGetWMHints) +X_NOT_IMPLEMENTED(XGetWMIconName) +X_NOT_IMPLEMENTED(XGetWMName) +X_NOT_IMPLEMENTED(XGetWMNormalHints) +X_NOT_IMPLEMENTED(XGetWMProtocols) +X_NOT_IMPLEMENTED(XGetWMSizeHints) +X_NOT_IMPLEMENTED(XGetWindowAttributes) +X_NOT_IMPLEMENTED(XGetWindowProperty) +X_NOT_IMPLEMENTED(XGetZoomHints) +X_NOT_IMPLEMENTED(XGrabButton) +X_NOT_IMPLEMENTED(XGrabKey) +X_NOT_IMPLEMENTED(XGrabKeyboard) +X_NOT_IMPLEMENTED(XGrabPointer) +X_NOT_IMPLEMENTED(XGrabServer) +X_NOT_IMPLEMENTED(XHeightMMOfScreen) +X_NOT_IMPLEMENTED(XHeightOfScreen) +X_NOT_IMPLEMENTED(XIMOfIC) +X_NOT_IMPLEMENTED(XIconifyWindow) +X_NOT_IMPLEMENTED(XIfEvent) +X_NOT_IMPLEMENTED(XImageByteOrder) +X_NOT_IMPLEMENTED(XInitExtension) +X_NOT_IMPLEMENTED(XInitImage) +X_NOT_IMPLEMENTED(XInitThreads) +X_NOT_IMPLEMENTED(XInsertModifiermapEntry) +X_NOT_IMPLEMENTED(XInstallColormap) +X_NOT_IMPLEMENTED(XInternAtom) +X_NOT_IMPLEMENTED(XInternAtoms) +X_NOT_IMPLEMENTED(XInternalConnectionNumbers) +X_NOT_IMPLEMENTED(XIntersectRegion) +X_NOT_IMPLEMENTED(XKeycodeToKeysym) +X_NOT_IMPLEMENTED(XKeysymToKeycode) +X_NOT_IMPLEMENTED(XKeysymToString) +X_NOT_IMPLEMENTED(XKillClient) +X_NOT_IMPLEMENTED(XLastKnownRequestProcessed) +X_NOT_IMPLEMENTED(XListDepths) +X_NOT_IMPLEMENTED(XListExtensions) +X_NOT_IMPLEMENTED(XListFonts) +X_NOT_IMPLEMENTED(XListFontsWithInfo) +X_NOT_IMPLEMENTED(XListHosts) +X_NOT_IMPLEMENTED(XListInstalledColormaps) +X_NOT_IMPLEMENTED(XListPixmapFormats) +X_NOT_IMPLEMENTED(XListProperties) +X_NOT_IMPLEMENTED(XLoadFont) +X_NOT_IMPLEMENTED(XLoadQueryFont) +X_NOT_IMPLEMENTED(XLocaleOfFontSet) +X_NOT_IMPLEMENTED(XLocaleOfIM) +X_NOT_IMPLEMENTED(XLocaleOfOM) +X_NOT_IMPLEMENTED(XLockDisplay) +X_NOT_IMPLEMENTED(XLookupColor) +X_NOT_IMPLEMENTED(XLookupKeysym) +X_NOT_IMPLEMENTED(XLookupString) +X_NOT_IMPLEMENTED(XLowerWindow) +X_NOT_IMPLEMENTED(XMapRaised) +X_NOT_IMPLEMENTED(XMapSubwindows) +X_NOT_IMPLEMENTED(XMapWindow) +X_NOT_IMPLEMENTED(XMaskEvent) +X_NOT_IMPLEMENTED(XMatchVisualInfo) +X_NOT_IMPLEMENTED(XMaxCmapsOfScreen) +X_NOT_IMPLEMENTED(XMaxRequestSize) +X_NOT_IMPLEMENTED(XMinCmapsOfScreen) +X_NOT_IMPLEMENTED(XMoveResizeWindow) +X_NOT_IMPLEMENTED(XMoveWindow) +X_NOT_IMPLEMENTED(XNewModifiermap) +X_NOT_IMPLEMENTED(XNextEvent) +X_NOT_IMPLEMENTED(XNextRequest) +X_NOT_IMPLEMENTED(XNoOp) +X_NOT_IMPLEMENTED(XOMOfOC) +X_NOT_IMPLEMENTED(XOffsetRegion) +X_NOT_IMPLEMENTED(XOpenDisplay) +X_NOT_IMPLEMENTED(XOpenIM) +X_NOT_IMPLEMENTED(XOpenOM) +X_NOT_IMPLEMENTED(XParseColor) +X_NOT_IMPLEMENTED(XParseGeometry) +X_NOT_IMPLEMENTED(XPeekEvent) +X_NOT_IMPLEMENTED(XPeekIfEvent) +X_NOT_IMPLEMENTED(XPending) +X_NOT_IMPLEMENTED(XPlanesOfScreen) +X_NOT_IMPLEMENTED(XPointInRegion) +X_NOT_IMPLEMENTED(XPolygonRegion) +X_NOT_IMPLEMENTED(XProcessInternalConnection) +X_NOT_IMPLEMENTED(XProtocolRevision) +X_NOT_IMPLEMENTED(XProtocolVersion) +X_NOT_IMPLEMENTED(XPutBackEvent) +X_NOT_IMPLEMENTED(XPutImage) +X_NOT_IMPLEMENTED(XPutPixel) +X_NOT_IMPLEMENTED(XQLength) +X_NOT_IMPLEMENTED(XQueryBestCursor) +X_NOT_IMPLEMENTED(XQueryBestSize) +X_NOT_IMPLEMENTED(XQueryBestStipple) +X_NOT_IMPLEMENTED(XQueryBestTile) +X_NOT_IMPLEMENTED(XQueryColor) +X_NOT_IMPLEMENTED(XQueryColors) +X_NOT_IMPLEMENTED(XQueryExtension) +X_NOT_IMPLEMENTED(XQueryFont) +X_NOT_IMPLEMENTED(XQueryKeymap) +X_NOT_IMPLEMENTED(XQueryPointer) +X_NOT_IMPLEMENTED(XQueryTextExtents) +X_NOT_IMPLEMENTED(XQueryTextExtents16) +X_NOT_IMPLEMENTED(XQueryTree) +X_NOT_IMPLEMENTED(XRaiseWindow) +X_NOT_IMPLEMENTED(XReadBitmapFile) +X_NOT_IMPLEMENTED(XReadBitmapFileData) +X_NOT_IMPLEMENTED(XRebindKeysym) +X_NOT_IMPLEMENTED(XRecolorCursor) +X_NOT_IMPLEMENTED(XReconfigureWMWindow) +X_NOT_IMPLEMENTED(XRectInRegion) +X_NOT_IMPLEMENTED(XRefreshKeyboardMapping) +X_NOT_IMPLEMENTED(XRegisterIMInstantiateCallback) +X_NOT_IMPLEMENTED(XRemoveConnectionWatch) +X_NOT_IMPLEMENTED(XRemoveFromSaveSet) +X_NOT_IMPLEMENTED(XRemoveHost) +X_NOT_IMPLEMENTED(XRemoveHosts) +X_NOT_IMPLEMENTED(XReparentWindow) +X_NOT_IMPLEMENTED(XResetScreenSaver) +X_NOT_IMPLEMENTED(XResizeWindow) +X_NOT_IMPLEMENTED(XResourceManagerString) +X_NOT_IMPLEMENTED(XRestackWindows) +X_NOT_IMPLEMENTED(XRootWindow) +X_NOT_IMPLEMENTED(XRootWindowOfScreen) +X_NOT_IMPLEMENTED(XRotateBuffers) +X_NOT_IMPLEMENTED(XRotateWindowProperties) +X_NOT_IMPLEMENTED(XSaveContext) +X_NOT_IMPLEMENTED(XScreenCount) +X_NOT_IMPLEMENTED(XScreenNumberOfScreen) +X_NOT_IMPLEMENTED(XScreenOfDisplay) +X_NOT_IMPLEMENTED(XScreenResourceString) +X_NOT_IMPLEMENTED(XSelectInput) +X_NOT_IMPLEMENTED(XSendEvent) +X_NOT_IMPLEMENTED(XServerVendor) +X_NOT_IMPLEMENTED(XSetAccessControl) +X_NOT_IMPLEMENTED(XSetAfterFunction) +X_NOT_IMPLEMENTED(XSetArcMode) +X_NOT_IMPLEMENTED(XSetAuthorization) +X_NOT_IMPLEMENTED(XSetBackground) +X_NOT_IMPLEMENTED(XSetClassHint) +X_NOT_IMPLEMENTED(XSetClipMask) +X_NOT_IMPLEMENTED(XSetClipOrigin) +X_NOT_IMPLEMENTED(XSetClipRectangles) +X_NOT_IMPLEMENTED(XSetCloseDownMode) +X_NOT_IMPLEMENTED(XSetCommand) +X_NOT_IMPLEMENTED(XSetDashes) +X_NOT_IMPLEMENTED(XSetErrorHandler) +X_NOT_IMPLEMENTED(XSetFillRule) +X_NOT_IMPLEMENTED(XSetFillStyle) +X_NOT_IMPLEMENTED(XSetFont) +X_NOT_IMPLEMENTED(XSetFontPath) +X_NOT_IMPLEMENTED(XSetForeground) +X_NOT_IMPLEMENTED(XSetFunction) +X_NOT_IMPLEMENTED(XSetGraphicsExposures) +X_NOT_IMPLEMENTED(XSetICFocus) +X_NOT_IMPLEMENTED(XSetICValues) +X_NOT_IMPLEMENTED(XSetIMValues) +X_NOT_IMPLEMENTED(XSetIOErrorHandler) +X_NOT_IMPLEMENTED(XSetIconName) +X_NOT_IMPLEMENTED(XSetIconSizes) +X_NOT_IMPLEMENTED(XSetInputFocus) +X_NOT_IMPLEMENTED(XSetLineAttributes) +X_NOT_IMPLEMENTED(XSetLocaleModifiers) +X_NOT_IMPLEMENTED(XSetModifierMapping) +X_NOT_IMPLEMENTED(XSetNormalHints) +X_NOT_IMPLEMENTED(XSetOCValues) +X_NOT_IMPLEMENTED(XSetOMValues) +X_NOT_IMPLEMENTED(XSetPlaneMask) +X_NOT_IMPLEMENTED(XSetPointerMapping) +X_NOT_IMPLEMENTED(XSetRGBColormaps) +X_NOT_IMPLEMENTED(XSetRegion) +X_NOT_IMPLEMENTED(XSetScreenSaver) +X_NOT_IMPLEMENTED(XSetSelectionOwner) +X_NOT_IMPLEMENTED(XSetSizeHints) +X_NOT_IMPLEMENTED(XSetStandardColormap) +X_NOT_IMPLEMENTED(XSetStandardProperties) +X_NOT_IMPLEMENTED(XSetState) +X_NOT_IMPLEMENTED(XSetStipple) +X_NOT_IMPLEMENTED(XSetSubwindowMode) +X_NOT_IMPLEMENTED(XSetTSOrigin) +X_NOT_IMPLEMENTED(XSetTextProperty) +X_NOT_IMPLEMENTED(XSetTile) +X_NOT_IMPLEMENTED(XSetTransientForHint) +X_NOT_IMPLEMENTED(XSetWMClientMachine) +X_NOT_IMPLEMENTED(XSetWMColormapWindows) +X_NOT_IMPLEMENTED(XSetWMHints) +X_NOT_IMPLEMENTED(XSetWMIconName) +X_NOT_IMPLEMENTED(XSetWMName) +X_NOT_IMPLEMENTED(XSetWMNormalHints) +X_NOT_IMPLEMENTED(XSetWMProperties) +X_NOT_IMPLEMENTED(XSetWMProtocols) +X_NOT_IMPLEMENTED(XSetWMSizeHints) +X_NOT_IMPLEMENTED(XSetWindowBackground) +X_NOT_IMPLEMENTED(XSetWindowBackgroundPixmap) +X_NOT_IMPLEMENTED(XSetWindowBorder) +X_NOT_IMPLEMENTED(XSetWindowBorderPixmap) +X_NOT_IMPLEMENTED(XSetWindowBorderWidth) +X_NOT_IMPLEMENTED(XSetWindowColormap) +X_NOT_IMPLEMENTED(XSetZoomHints) +X_NOT_IMPLEMENTED(XShrinkRegion) +X_NOT_IMPLEMENTED(XStoreBuffer) +X_NOT_IMPLEMENTED(XStoreBytes) +X_NOT_IMPLEMENTED(XStoreColor) +X_NOT_IMPLEMENTED(XStoreColors) +X_NOT_IMPLEMENTED(XStoreName) +X_NOT_IMPLEMENTED(XStoreNamedColor) +X_NOT_IMPLEMENTED(XStringListToTextProperty) +X_NOT_IMPLEMENTED(XStringToKeysym) +X_NOT_IMPLEMENTED(XSubImage) +X_NOT_IMPLEMENTED(XSubtractRegion) +X_NOT_IMPLEMENTED(XSupportsLocale) +X_NOT_IMPLEMENTED(XSync) +X_NOT_IMPLEMENTED(XSynchronize) +X_NOT_IMPLEMENTED(XTextExtents) +X_NOT_IMPLEMENTED(XTextExtents16) +X_NOT_IMPLEMENTED(XTextPropertyToStringList) +X_NOT_IMPLEMENTED(XTextWidth) +X_NOT_IMPLEMENTED(XTextWidth16) +X_NOT_IMPLEMENTED(XTranslateCoordinates) +X_NOT_IMPLEMENTED(XUndefineCursor) +X_NOT_IMPLEMENTED(XUngrabButton) +X_NOT_IMPLEMENTED(XUngrabKey) +X_NOT_IMPLEMENTED(XUngrabKeyboard) +X_NOT_IMPLEMENTED(XUngrabPointer) +X_NOT_IMPLEMENTED(XUngrabServer) +X_NOT_IMPLEMENTED(XUninstallColormap) +X_NOT_IMPLEMENTED(XUnionRectWithRegion) +X_NOT_IMPLEMENTED(XUnionRegion) +X_NOT_IMPLEMENTED(XUnloadFont) +X_NOT_IMPLEMENTED(XUnlockDisplay) +X_NOT_IMPLEMENTED(XUnmapSubwindows) +X_NOT_IMPLEMENTED(XUnmapWindow) +X_NOT_IMPLEMENTED(XUnregisterIMInstantiateCallback) +X_NOT_IMPLEMENTED(XUnsetICFocus) +X_NOT_IMPLEMENTED(XVaCreateNestedList) +X_NOT_IMPLEMENTED(XVendorRelease) +X_NOT_IMPLEMENTED(XVisualIDFromVisual) +X_NOT_IMPLEMENTED(XWMGeometry) +X_NOT_IMPLEMENTED(XWarpPointer) +X_NOT_IMPLEMENTED(XWhitePixel) +X_NOT_IMPLEMENTED(XWhitePixelOfScreen) +X_NOT_IMPLEMENTED(XWidthMMOfScreen) +X_NOT_IMPLEMENTED(XWidthOfScreen) +X_NOT_IMPLEMENTED(XWindowEvent) +X_NOT_IMPLEMENTED(XWithdrawWindow) +X_NOT_IMPLEMENTED(XWriteBitmapFile) +X_NOT_IMPLEMENTED(XXorRegion) +X_NOT_IMPLEMENTED(XcmsAddColorSpace) +X_NOT_IMPLEMENTED(XcmsAddFunctionSet) +X_NOT_IMPLEMENTED(XcmsAllocColor) +X_NOT_IMPLEMENTED(XcmsAllocNamedColor) +X_NOT_IMPLEMENTED(XcmsCCCOfColormap) +X_NOT_IMPLEMENTED(XcmsCIELabClipL) +X_NOT_IMPLEMENTED(XcmsCIELabClipLab) +X_NOT_IMPLEMENTED(XcmsCIELabClipab) +X_NOT_IMPLEMENTED(XcmsCIELabQueryMaxC) +X_NOT_IMPLEMENTED(XcmsCIELabQueryMaxL) +X_NOT_IMPLEMENTED(XcmsCIELabQueryMaxLC) +X_NOT_IMPLEMENTED(XcmsCIELabQueryMinL) +X_NOT_IMPLEMENTED(XcmsCIELabToCIEXYZ) +X_NOT_IMPLEMENTED(XcmsCIELabWhiteShiftColors) +X_NOT_IMPLEMENTED(XcmsCIELuvClipL) +X_NOT_IMPLEMENTED(XcmsCIELuvClipLuv) +X_NOT_IMPLEMENTED(XcmsCIELuvClipuv) +X_NOT_IMPLEMENTED(XcmsCIELuvQueryMaxC) +X_NOT_IMPLEMENTED(XcmsCIELuvQueryMaxL) +X_NOT_IMPLEMENTED(XcmsCIELuvQueryMaxLC) +X_NOT_IMPLEMENTED(XcmsCIELuvQueryMinL) +X_NOT_IMPLEMENTED(XcmsCIELuvToCIEuvY) +X_NOT_IMPLEMENTED(XcmsCIELuvWhiteShiftColors) +X_NOT_IMPLEMENTED(XcmsCIEXYZToCIELab) +X_NOT_IMPLEMENTED(XcmsCIEXYZToCIEuvY) +X_NOT_IMPLEMENTED(XcmsCIEXYZToCIExyY) +X_NOT_IMPLEMENTED(XcmsCIEXYZToRGBi) +X_NOT_IMPLEMENTED(XcmsCIEuvYToCIELuv) +X_NOT_IMPLEMENTED(XcmsCIEuvYToCIEXYZ) +X_NOT_IMPLEMENTED(XcmsCIEuvYToTekHVC) +X_NOT_IMPLEMENTED(XcmsCIExyYToCIEXYZ) +X_NOT_IMPLEMENTED(XcmsClientWhitePointOfCCC) +X_NOT_IMPLEMENTED(XcmsConvertColors) +X_NOT_IMPLEMENTED(XcmsCreateCCC) +X_NOT_IMPLEMENTED(XcmsDefaultCCC) +X_NOT_IMPLEMENTED(XcmsDisplayOfCCC) +X_NOT_IMPLEMENTED(XcmsFormatOfPrefix) +X_NOT_IMPLEMENTED(XcmsFreeCCC) +X_NOT_IMPLEMENTED(XcmsLookupColor) +X_NOT_IMPLEMENTED(XcmsPrefixOfFormat) +X_NOT_IMPLEMENTED(XcmsQueryBlack) +X_NOT_IMPLEMENTED(XcmsQueryBlue) +X_NOT_IMPLEMENTED(XcmsQueryColor) +X_NOT_IMPLEMENTED(XcmsQueryColors) +X_NOT_IMPLEMENTED(XcmsQueryGreen) +X_NOT_IMPLEMENTED(XcmsQueryRed) +X_NOT_IMPLEMENTED(XcmsQueryWhite) +X_NOT_IMPLEMENTED(XcmsRGBToRGBi) +X_NOT_IMPLEMENTED(XcmsRGBiToCIEXYZ) +X_NOT_IMPLEMENTED(XcmsRGBiToRGB) +X_NOT_IMPLEMENTED(XcmsScreenNumberOfCCC) +X_NOT_IMPLEMENTED(XcmsScreenWhitePointOfCCC) +X_NOT_IMPLEMENTED(XcmsSetCCCOfColormap) +X_NOT_IMPLEMENTED(XcmsSetCompressionProc) +X_NOT_IMPLEMENTED(XcmsSetWhiteAdjustProc) +X_NOT_IMPLEMENTED(XcmsSetWhitePoint) +X_NOT_IMPLEMENTED(XcmsStoreColor) +X_NOT_IMPLEMENTED(XcmsStoreColors) +X_NOT_IMPLEMENTED(XcmsTekHVCClipC) +X_NOT_IMPLEMENTED(XcmsTekHVCClipV) +X_NOT_IMPLEMENTED(XcmsTekHVCClipVC) +X_NOT_IMPLEMENTED(XcmsTekHVCQueryMaxC) +X_NOT_IMPLEMENTED(XcmsTekHVCQueryMaxV) +X_NOT_IMPLEMENTED(XcmsTekHVCQueryMaxVC) +X_NOT_IMPLEMENTED(XcmsTekHVCQueryMaxVSamples) +X_NOT_IMPLEMENTED(XcmsTekHVCQueryMinV) +X_NOT_IMPLEMENTED(XcmsTekHVCToCIEuvY) +X_NOT_IMPLEMENTED(XcmsTekHVCWhiteShiftColors) +X_NOT_IMPLEMENTED(XcmsVisualOfCCC) +X_NOT_IMPLEMENTED(XmbDrawImageString) +X_NOT_IMPLEMENTED(XmbDrawString) +X_NOT_IMPLEMENTED(XmbDrawText) +X_NOT_IMPLEMENTED(XmbLookupString) +X_NOT_IMPLEMENTED(XmbResetIC) +X_NOT_IMPLEMENTED(XmbSetWMProperties) +X_NOT_IMPLEMENTED(XmbTextEscapement) +X_NOT_IMPLEMENTED(XmbTextExtents) +X_NOT_IMPLEMENTED(XmbTextListToTextProperty) +X_NOT_IMPLEMENTED(XmbTextPerCharExtents) +X_NOT_IMPLEMENTED(XmbTextPropertyToTextList) +X_NOT_IMPLEMENTED(Xpermalloc) +X_NOT_IMPLEMENTED(XrmCombineDatabase) +X_NOT_IMPLEMENTED(XrmCombineFileDatabase) +X_NOT_IMPLEMENTED(XrmDestroyDatabase) +X_NOT_IMPLEMENTED(XrmEnumerateDatabase) +X_NOT_IMPLEMENTED(XrmGetDatabase) +X_NOT_IMPLEMENTED(XrmGetFileDatabase) +X_NOT_IMPLEMENTED(XrmGetResource) +X_NOT_IMPLEMENTED(XrmGetStringDatabase) +X_NOT_IMPLEMENTED(XrmInitialize) +X_NOT_IMPLEMENTED(XrmLocaleOfDatabase) +X_NOT_IMPLEMENTED(XrmMergeDatabases) +X_NOT_IMPLEMENTED(XrmParseCommand) +X_NOT_IMPLEMENTED(XrmPermStringToQuark) +X_NOT_IMPLEMENTED(XrmPutFileDatabase) +X_NOT_IMPLEMENTED(XrmPutLineResource) +X_NOT_IMPLEMENTED(XrmPutResource) +X_NOT_IMPLEMENTED(XrmPutStringResource) +X_NOT_IMPLEMENTED(XrmQGetResource) +X_NOT_IMPLEMENTED(XrmQGetSearchList) +X_NOT_IMPLEMENTED(XrmQGetSearchResource) +X_NOT_IMPLEMENTED(XrmQPutResource) +X_NOT_IMPLEMENTED(XrmQPutStringResource) +X_NOT_IMPLEMENTED(XrmQuarkToString) +X_NOT_IMPLEMENTED(XrmSetDatabase) +X_NOT_IMPLEMENTED(XrmStringToBindingQuarkList) +X_NOT_IMPLEMENTED(XrmStringToQuark) +X_NOT_IMPLEMENTED(XrmStringToQuarkList) +X_NOT_IMPLEMENTED(XrmUniqueQuark) +X_NOT_IMPLEMENTED(XwcDrawImageString) +X_NOT_IMPLEMENTED(XwcDrawString) +X_NOT_IMPLEMENTED(XwcDrawText) +X_NOT_IMPLEMENTED(XwcFreeStringList) +X_NOT_IMPLEMENTED(XwcLookupString) +X_NOT_IMPLEMENTED(XwcResetIC) +X_NOT_IMPLEMENTED(XwcTextEscapement) +X_NOT_IMPLEMENTED(XwcTextExtents) +X_NOT_IMPLEMENTED(XwcTextListToTextProperty) +X_NOT_IMPLEMENTED(XwcTextPerCharExtents) +X_NOT_IMPLEMENTED(XwcTextPropertyToTextList) +X_NOT_IMPLEMENTED(_XAllocID) +X_NOT_IMPLEMENTED(_XAllocIDs) +X_NOT_IMPLEMENTED(_XAllocScratch) +X_NOT_IMPLEMENTED(_XAllocTemp) +X_NOT_IMPLEMENTED(_XAsyncErrorHandler) +X_NOT_IMPLEMENTED(_XConnectDisplay) +X_NOT_IMPLEMENTED(_XCreateMutex_fn_p) +X_NOT_IMPLEMENTED(_XDeqAsyncHandler) +X_NOT_IMPLEMENTED(_XEatData) +X_NOT_IMPLEMENTED(_XError) +X_NOT_IMPLEMENTED(_XFlushGCCache) +X_NOT_IMPLEMENTED(_XFlushIt) +X_NOT_IMPLEMENTED(_XFreeMutex_fn_p) +X_NOT_IMPLEMENTED(_XFreeTemp) +X_NOT_IMPLEMENTED(_XGetAsyncData) +X_NOT_IMPLEMENTED(_XGetAsyncReply) +X_NOT_IMPLEMENTED(_XIOError) +X_NOT_IMPLEMENTED(_XInitImageFuncPtrs) +X_NOT_IMPLEMENTED(_XKillTimer) +X_NOT_IMPLEMENTED(_XLockMutex_fn_p) +X_NOT_IMPLEMENTED(_XRead) +X_NOT_IMPLEMENTED(_XReadEvents) +X_NOT_IMPLEMENTED(_XReadPad) +X_NOT_IMPLEMENTED(_XRegisterFilterByMask) +X_NOT_IMPLEMENTED(_XRegisterFilterByType) +X_NOT_IMPLEMENTED(_XRegisterInternalConnection) +X_NOT_IMPLEMENTED(_XReply) +X_NOT_IMPLEMENTED(_XSend) +X_NOT_IMPLEMENTED(_XSetLastRequestRead) +X_NOT_IMPLEMENTED(_XSetTimer) +X_NOT_IMPLEMENTED(_XUnknownNativeEvent) +X_NOT_IMPLEMENTED(_XUnlockMutex_fn_p) +X_NOT_IMPLEMENTED(_XUnregisterFilter) +X_NOT_IMPLEMENTED(_XUnregisterInternalConnection) +X_NOT_IMPLEMENTED(_XVIDtoVisual) +X_NOT_IMPLEMENTED(_XWinSelectWindow) +X_NOT_IMPLEMENTED(_Xdebug_p) +X_NOT_IMPLEMENTED(_Xglobal_lock_p) +X_NOT_IMPLEMENTED(_Xthread_init) +X_NOT_IMPLEMENTED(_Xthread_waiter) +/* EOF */ diff --git a/rossubsys/posix/server/.cvsignore b/rossubsys/posix/server/.cvsignore new file mode 100644 index 00000000000..f0022c19403 --- /dev/null +++ b/rossubsys/posix/server/.cvsignore @@ -0,0 +1,6 @@ +*.o +*.d +*.exe +*.dll +*.coff +*.sym diff --git a/rossubsys/posix/server/Makefile b/rossubsys/posix/server/Makefile new file mode 100644 index 00000000000..547dd0481e1 --- /dev/null +++ b/rossubsys/posix/server/Makefile @@ -0,0 +1,52 @@ +# $Id: Makefile,v 1.5 2003/01/05 18:27:19 robd Exp $ +# +# ReactOS POSIX+ Environment Subsystem +# + +PATH_TO_TOP = ../../reactos + +TARGET_TYPE = program + +TARGET_PATH = misc + +TARGET_NAME = psxss + +TARGET_APPTYPE = console + +TARGET_SDKLIBS = ntdll.a kernel32.a + +TARGET_CFLAGS = -Iinclude -I../include -D__PSXSS_ON_W32__ + +PSXSS_MISC_OBJECTS = \ + misc/main.o \ + misc/init.o \ + misc/print.o + +PSXSS_OB_OBJECTS = \ + ob/process.o \ + ob/session.o \ + ob/terminal.o + +PSXSS_PORT_OBJECTS = \ + port/api.o \ + port/sbapi.o \ + port/session.o \ + port/utils.o + +PSXSS_CALL_OBJECTS = \ + call/null.o \ + call/_exit.o \ + call/stubs.o \ + call/syscall.o + +TARGET_OBJECTS = \ + $(PSXSS_MISC_OBJECTS) \ + $(PSXSS_OB_OBJECTS) \ + $(PSXSS_PORT_OBJECTS) \ + $(PSXSS_CALL_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/posix/server/call/.cvsignore b/rossubsys/posix/server/call/.cvsignore new file mode 100644 index 00000000000..fb1d79a92b5 --- /dev/null +++ b/rossubsys/posix/server/call/.cvsignore @@ -0,0 +1,4 @@ +stubs.c +syscall.c +*.o +*.d diff --git a/rossubsys/posix/server/call/_exit.c b/rossubsys/posix/server/call/_exit.c new file mode 100644 index 00000000000..1193ae600f1 --- /dev/null +++ b/rossubsys/posix/server/call/_exit.c @@ -0,0 +1,39 @@ +/* $Id: _exit.c,v 1.4 2004/01/18 21:27:32 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/call/_exit.c + * DESCRIPTION: System call _exit(). + * DATE : 2002-04-05 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#define NTOS_MODE_USER +#include +#include +#include + +NTSTATUS STDCALL syscall__exit (PPSX_MAX_MESSAGE Msg) +{ + Msg->PsxHeader.Status = STATUS_SUCCESS; + /* TODO */ + return STATUS_SUCCESS; +} +/* EOF */ diff --git a/rossubsys/posix/server/call/null.c b/rossubsys/posix/server/call/null.c new file mode 100644 index 00000000000..2710d9a8cac --- /dev/null +++ b/rossubsys/posix/server/call/null.c @@ -0,0 +1,38 @@ +/* $Id: null.c,v 1.4 2004/01/18 21:27:32 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/call/null.c + * DESCRIPTION: Void system call. + * DATE : 2002-04-05 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#define NTOS_MODE_USER +#include +#include +#include + +NTSTATUS STDCALL syscall_null (PPSX_MAX_MESSAGE Msg) +{ + Msg->PsxHeader.Status = STATUS_SUCCESS; + return STATUS_SUCCESS; +} +/* EOF */ diff --git a/rossubsys/posix/server/include/.cvsignore b/rossubsys/posix/server/include/.cvsignore new file mode 100644 index 00000000000..4143547671c --- /dev/null +++ b/rossubsys/posix/server/include/.cvsignore @@ -0,0 +1 @@ +syscall.h diff --git a/rossubsys/posix/server/include/psxss.h b/rossubsys/posix/server/include/psxss.h new file mode 100644 index 00000000000..e7fbf98948f --- /dev/null +++ b/rossubsys/posix/server/include/psxss.h @@ -0,0 +1,155 @@ +/* $Id: psxss.h,v 1.3 2002/10/29 04:45:54 rex Exp $ */ +#ifndef _PSX_PSXSS_H +#define _PSX_PSXSS_H + +#define NTOS_MODE_USER +#include +#include +#include + +#ifdef __PSXSS_ON_W32__ +#include +#endif + +#define NAME_BUFFER_SIZE 64 + +/* PSXSS GLOBAL DATA */ + +typedef struct _SERVER_DIRECTORY +{ + HANDLE hObject; + LPWSTR wsName; + UNICODE_STRING usName; + +} SERVER_DIRECTORY; + +#define PSXSS_THREADS_PER_PORT 2 + +typedef struct _SERVER_PORT +{ + HANDLE hObject; + LPWSTR wsName; + UNICODE_STRING usName; + PTHREAD_START_ROUTINE EntryPoint; + struct { + HANDLE hObject; + DWORD Id; + } ThreadInfo [PSXSS_THREADS_PER_PORT]; + +} SERVER_PORT, * PSERVER_PORT; + +#define SERVER_DIRECTORY_COUNT 3 +#define SERVER_PORT_COUNT 3 + +typedef struct _SERVER +{ + HANDLE Heap; + SERVER_DIRECTORY Directory [SERVER_DIRECTORY_COUNT]; + SERVER_PORT Port [SERVER_PORT_COUNT]; + +} SERVER; + +#define PSX_PORT_API 0 +#define PSX_PORT_SBAPI 1 +#define PSX_PORT_SESSION 2 + +#define PSX_DIRECTORY_POSIX 0 +#define PSX_DIRECTORY_SESSIONS 1 +#define PSX_DIRECTORY_SYSTEM 2 + +extern SERVER Server; /* server/misc/init.c */ + +/* System call type */ +typedef NTSTATUS (STDCALL *PSX_SYSTEM_CALL)(PPSX_MAX_MESSAGE); + +/* System calls table */ + +extern PSX_SYSTEM_CALL SystemCall []; /* server/call/syscall.c */ + +/* Listener's Threads */ +VOID STDCALL ApiPortListener (PVOID); +VOID STDCALL SbApiPortListener (PVOID); +VOID STDCALL SessionPortListener (PVOID); + +/* TERMINAL OBJECT */ + +typedef struct _PSX_TERMINAL +{ + DWORD Id; + /* TODO */ +} PSX_TERMINAL, * PPSX_TERMINAL; + +/* PROCESS OBJECT */ + +typedef enum +{ + PROCESS_STATUS_INITIALIZATION, + PROCESS_STATUS_READY, + PROCESS_STATUS_WAITING, + PROCESS_STATUS_DEAD, + PROCESS_STATUS_ZOMBIE + +} PROCESS_STATUS; + +typedef DWORD PSX_SECURITY; /* TODO */ + +struct _PSX_SESSION; + +typedef struct _PSX_PROCESS +{ + INT Id; /* pid */ + HANDLE hProcess; /* hProcess */ + PROCESS_STATUS Status; + struct _PSX_PROCESS * Parent; + struct _PSX_SESSION * Session; + PPSX_TERMINAL ControlTty; + PSX_SECURITY Security; + +} PSX_PROCESS, * PPSX_PROCESS; + +/* SESSION OBJECT */ + +typedef enum +{ + SESSION_STATUS_INITIALIZATION, + SESSION_STATUS_READY, + SESSION_STATUS_SHUTDOWN, + SESSION_STATUS_ERROR + +} SESSION_STATUS; + +typedef struct _PSX_SESSION +{ + DWORD Id; + ULONG ReferenceCount; + SESSION_STATUS Status; + HANDLE Heap; + struct { + HANDLE hPort; + ULONG ulPortIdentifier; + } SessionChannel; + struct { + ULONG Id; /* csrterm pid */ + HANDLE hPort; /* LPC port owned by csrterm: \POSIX+\Sessions\P{Id} */ + struct { + HANDLE Handle; /* Section owned by csrterm: \POSIX+\Sessions\D{Id} */ + PVOID BaseAddress; + ULONG ViewSize; + } Section; + } TerminalChannel; + PPSX_PROCESS Leader; + CRITICAL_SECTION Lock; + struct _PSX_SESSION * Previous; + struct _PSX_SESSION * Next; + +} PSX_SESSION, * PPSX_SESSION; + +/* prototypes */ + +VOID STDCALL debug_print (LPWSTR Template, ...); +NTSTATUS STDCALL PsxInitializeSessions (VOID); /* ob/session.c */ +NTSTATUS STDCALL PsxCreateSession (PLPC_MAX_MESSAGE,HANDLE,ULONG); +NTSTATUS STDCALL PsxInitializeProcesses (VOID); /* ob/process.c */ +NTSTATUS STDCALL PsxCreateProcess (PLPC_MAX_MESSAGE,HANDLE,ULONG); + +#endif /* ndef _PSX_PSXSS_H */ diff --git a/rossubsys/posix/server/misc/.cvsignore b/rossubsys/posix/server/misc/.cvsignore new file mode 100644 index 00000000000..0a94a2b5b10 --- /dev/null +++ b/rossubsys/posix/server/misc/.cvsignore @@ -0,0 +1,3 @@ +*.o +*.d +*.coff diff --git a/rossubsys/posix/server/misc/init.c b/rossubsys/posix/server/misc/init.c new file mode 100644 index 00000000000..bb98b77d982 --- /dev/null +++ b/rossubsys/posix/server/misc/init.c @@ -0,0 +1,320 @@ +/* $Id: init.c,v 1.3 2002/10/29 04:45:54 rex Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/srv/init.c + * DESCRIPTION: POSIX+ server initialization. + * DATE : 2001-05-05 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include + +#ifdef __PSXSS_ON_W32__ +#include +#endif + +/*** GLOBALS *********************************************************/ + +SERVER Server = +{ + /* .Heap */ + INVALID_HANDLE_VALUE, + /* .Directory */ + { + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME, + {0,0,NULL} + }, + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_SESSION_DIRECTORY_NAME, + {0,0,NULL} + }, + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_SYSTEM_DIRECTORY_NAME, + {0,0,NULL} + }, + }, + /* .Port */ + { + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_API_PORT_NAME, + {0,0,NULL}, + ApiPortListener + }, + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_SBAPI_PORT_NAME, + {0,0,NULL}, + SbApiPortListener + }, + { INVALID_HANDLE_VALUE, + L"\\"PSX_NS_SUBSYSTEM_DIRECTORY_NAME"\\"PSX_NS_SESSIONAPI_PORT_NAME, + {0,0,NULL}, + SessionPortListener + } + } +}; + +/*** FUNCTIONS *******************************************************/ + +/********************************************************************** + * PdxInitializeHeap/0 PRIVATE + * + * DESCRIPTION + * Initialize the PSX server process' heap. + */ +PRIVATE HANDLE STDCALL +PdxInitializeHeap (VOID) +{ + return Server.Heap = (HANDLE)NtCurrentPeb()->ProcessHeap; +} +/********************************************************************** + * PdxCreateDirectory/1 PRIVATE + * + * DESCRIPTION + * Create a directory in the system name space. + */ +PRIVATE NTSTATUS STDCALL +PdxCreateDirectory ( + IN ULONG ulIndex + ) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS Status; + + RtlCreateUnicodeString ( + & Server.Directory[ulIndex].usName, + Server.Directory[ulIndex].wsName + ); + InitializeObjectAttributes ( + & ObjectAttributes, + & Server.Directory[ulIndex].usName, + 0, + NULL, + NULL + ); + Status = NtCreateDirectoryObject( + & Server.Directory[ulIndex].hObject, + DIRECTORY_ALL_ACCESS, + & ObjectAttributes + ); + if (!NT_SUCCESS(Status)) + { + debug_print( + L"PSXSS: %s directory creation failed (Status = %08x)", + Server.Directory[ulIndex].wsName, + Status + ); + + } + return Status; +} +/********************************************************************** + * PdxInitializeDirectories/0 PRIVATE + * + * DESCRIPTION + * Create the directories used by the POSIX+ subsystem + * components in the system name space. + */ +PRIVATE NTSTATUS STDCALL +PdxInitializeDirectories (VOID) +{ + NTSTATUS Status; + ULONG ulIndex; + + for ( ulIndex = 0; + (ulIndex < (sizeof Server.Directory / sizeof Server.Directory[0])); + ulIndex ++) + { + Status = PdxCreateDirectory (ulIndex); + if (!NT_SUCCESS(Status)) return Status; + } + return STATUS_SUCCESS; +} +/********************************************************************** + * PdxInitializeListener/1 PRIVATE + * + * DESCRIPTION + * Initialize a thread to make an LPC port listen. + */ +PRIVATE NTSTATUS STDCALL +PdxInitializeListener (ULONG ulIndex) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES Oa; + ULONG ulThreadIndex; + + RtlInitUnicodeString ( + & Server.Port[ulIndex].usName, + Server.Port[ulIndex].wsName + ); + InitializeObjectAttributes( + & Oa, + & Server.Port[ulIndex].usName, + 0, + NULL, + NULL + ); + /* Create the listening LPC port */ + Status = NtCreatePort ( + & Server.Port[ulIndex].hObject, + & Oa, + 260, + 328, + 0 + ); + if (!NT_SUCCESS(Status)) + { + debug_print( + L"PSXSS: Unable to create port \"%s\": Status %08x\n", + Server.Port[ulIndex].wsName, + Status); + return Status; + } + /* + * Create the server thread that will process + * messages sent to this port. + */ + for ( ulThreadIndex = 0; + (ulThreadIndex < PSXSS_THREADS_PER_PORT); + ulThreadIndex ++ + ) + { +#ifdef __PSXSS_ON_W32__ + Server.Port[ulIndex].ThreadInfo[ulThreadIndex].hObject = + CreateThread ( + NULL, + 0, + (PTHREAD_START_ROUTINE) Server.Port[ulIndex].EntryPoint, + (PVOID) ulIndex, + CREATE_SUSPENDED, + & Server.Port[ulIndex].ThreadInfo[ulThreadIndex].Id + ); + if (NULL == Server.Port[ulIndex].ThreadInfo[ulThreadIndex].hObject) +#else + if (!NT_SUCCESS(Status)) +#endif + { + debug_print( + L"PSXSS: Unable to create a server thread for port \"%s\": Status %08x\n", + Server.Port[ulIndex].wsName, + Status + ); + NtClose (Server.Port[ulIndex].hObject); + return Status; + } + } + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxInitializeListeners/0 PRIVATE + * + * DESCRIPTION + * Initialize the LPC ports and associate threads. + */ +PRIVATE NTSTATUS STDCALL +PdxInitializeListeners (VOID) +{ + NTSTATUS Status; + ULONG ulIndex; + + for ( ulIndex = 0; + (ulIndex < (sizeof Server.Port / sizeof Server.Port[0])); + ulIndex ++) + { + Status = PdxInitializeListener (ulIndex); + if (!NT_SUCCESS(Status)) return Status; + } + return STATUS_SUCCESS; +} +/********************************************************************** + * PdxRunServer/0 PRIVATE + * + * DESCRIPTION + * Wake up all suspended threads. + */ +PRIVATE NTSTATUS STDCALL +PdxRunServer (VOID) +{ + NTSTATUS Status; + ULONG ulIndex; + ULONG ulThreadIndex; + + for ( ulIndex = 0; + (ulIndex < (sizeof Server.Port / sizeof Server.Port[0])); + ulIndex ++) + { + for (ulThreadIndex = 0; + (ulThreadIndex < PSXSS_THREADS_PER_PORT); + ulThreadIndex ++ + ) + { +#ifdef __PSXSS_ON_W32__ + if (0xFFFFFFFF == ResumeThread (Server.Port[ulIndex].ThreadInfo[ulThreadIndex].hObject)) +#else + Status = NtResumeThread (Server.Port[ulIndex].ThreadInfo[ulThreadIndex].hObject, NULL); + if (!NT_SUCCESS(Status)) +#endif + { + debug_print( + L"PSXSS: "__FUNCTION__": NtResumeThread failed with Status = %08x", + Status + ); + return Status; + } + } + } + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxServerInitialization/2 + * + * DESCRIPTION + * Initialize the PSX server process. + */ +NTSTATUS STDCALL +PsxServerInitialization ( + IN ULONG ArgumentCount, + IN PWSTR *ArgumentArray + ) +{ + NTSTATUS Status; + + /* Get our heap */ + PdxInitializeHeap (); + /* Initialize POSIX+ and Sessions */ + Status = PdxInitializeDirectories (); + if (!NT_SUCCESS(Status)) return Status; + /* LPCs dispatchers */ + Status = PdxInitializeListeners (); + if (!NT_SUCCESS(Status)) return Status; + /* Terminal manager */ + Status = PsxInitializeSessions (); + if (!NT_SUCCESS(Status)) return Status; + /* Process manager */ + Status = PsxInitializeProcesses (); + if (!NT_SUCCESS(Status)) return Status; + /* OK. Run! */ + Status = PdxRunServer (); + /* Done */ + return Status; +} +/* EOF */ diff --git a/rossubsys/posix/server/misc/main.c b/rossubsys/posix/server/misc/main.c new file mode 100644 index 00000000000..cd6f080417b --- /dev/null +++ b/rossubsys/posix/server/misc/main.c @@ -0,0 +1,89 @@ +/* $Id: main.c,v 1.3 2002/10/29 04:45:54 rex Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/misc/main.c + * DESCRIPTION: POSIX+ server main. + * DATE : 2001-05-05 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + * + * 19990605 (Emanuele Aliberti) + * Compiled successfully with egcs 1.1.2 + * 20020323 (Emanuele Aliberti) + * Converted to Win32 for testing it using NT LPC. + */ +#include +#include +#include + +/*** EXTERNAL ********************************************************/ + +NTSTATUS STDCALL +PsxServerInitialization ( + IN ULONG ArgumentCount, + IN PWSTR *ArgumentArray + ); + +/*** ENTRY POINT *****************************************************/ + +#ifdef __PSXSS_ON_W32__ // W32 PSXSS.EXE +int main (int argc, char * argv[]) +{ + INT c; + + debug_print(L"POSIX+ Subsystem for ReactOS "KERNEL_RELEASE_STR); + + if (STATUS_SUCCESS == PsxServerInitialization(0,NULL)) + { + debug_print(L"PSXSS: server active"); + while (TRUE) + { + c = getch(); + if (c == 1) break; + } + } + else + { + debug_print(L"PSXSS: Subsystem initialization failed.\n"); + } + return 0; +} +#else /* Native PSXSS.EXE */ +VOID NtProcessStartup (PPEB Peb) +{ + UNICODE_STRING Banner; + + RtlInitUnicodeString (& Banner, L"POSIX+ Subsystem for ReactOS "KERNEL_RELEASE_STR); + NtDisplayString(& Banner); + + if (STATUS_SUCCESS == PsxServerInitialization(0,NULL)) + { + DbgPrint("PSXSS: server active\n"); + /* TODO */ + } + else + { + DbgPrint("PSXSS: Subsystem initialization failed.\n"); + } + NtTerminateProcess (NtCurrentProcess(), 0); +} +#endif +/* EOF */ diff --git a/rossubsys/posix/server/misc/print.c b/rossubsys/posix/server/misc/print.c new file mode 100644 index 00000000000..1b4db8bbf39 --- /dev/null +++ b/rossubsys/posix/server/misc/print.c @@ -0,0 +1,18 @@ +/* $Id: print.c,v 1.3 2002/10/29 04:45:54 rex Exp $ */ +#define UNICODE +#include +VOID STDCALL debug_print (LPWSTR Template, ...) +{ + WCHAR Buffer [1024]; + va_list ArgumentPointer; + + va_start(ArgumentPointer, Template); + vswprintf(Buffer, Template, ArgumentPointer); + va_end(ArgumentPointer); +#ifdef __PSXSS_ON_W32__ + _putws (Buffer); +#else +#error TODO +#endif +} +/* EOF */ diff --git a/rossubsys/posix/server/misc/psxss.rc b/rossubsys/posix/server/misc/psxss.rc new file mode 100644 index 00000000000..29d68b46e39 --- /dev/null +++ b/rossubsys/posix/server/misc/psxss.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "POSIX+ Environment Subsystem Server\0" +#define REACTOS_STR_INTERNAL_NAME "psxss\0" +#define REACTOS_STR_ORIGINAL_FILENAME "psxss.exe\0" +#include diff --git a/rossubsys/posix/server/ob/.cvsignore b/rossubsys/posix/server/ob/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/server/ob/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/server/ob/process.c b/rossubsys/posix/server/ob/process.c new file mode 100644 index 00000000000..3dad481e832 --- /dev/null +++ b/rossubsys/posix/server/ob/process.c @@ -0,0 +1,56 @@ +/* $Id: process.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/ob/session.c + * DESCRIPTION: terminal + * DATE : 2002-04-04 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include + +/********************************************************************** + * PsxInitializeProcesses/0 + */ +NTSTATUS STDCALL +PsxInitializeProcesses (VOID) +{ + debug_print (L"PSXSS: ->%s", __FUNCTION__); + /* TODO */ + debug_print (L"PSXSS: <-%s", __FUNCTION__); + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxCreateProcess/3 + */ +NTSTATUS STDCALL +PsxCreateProcess ( + PLPC_MAX_MESSAGE pRequest, + HANDLE hConnectedPort, + ULONG ulPortIdentifier + ) +{ + debug_print (L"PSXSS: ->%s", __FUNCTION__); + /* TODO */ + debug_print (L"PSXSS: <-%s", __FUNCTION__); + return STATUS_SUCCESS; +} +/* EOF */ diff --git a/rossubsys/posix/server/ob/session.c b/rossubsys/posix/server/ob/session.c new file mode 100644 index 00000000000..c8d2685bd71 --- /dev/null +++ b/rossubsys/posix/server/ob/session.c @@ -0,0 +1,307 @@ +/* $Id: session.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/ob/session.c + * DESCRIPTION: terminal + * DATE : 2002-04-04 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include + +#define LOCK_ALL_SESSIONS RtlEnterCriticalSection(& Sessions.Lock) +#define UNLOCK_ALL_SESSIONS RtlLeaveCriticalSection(& Sessions.Lock) +#define LOCK_THIS_SESSION RtlEnterCriticalSection(& Session->Lock) +#define UNLOCK_THIS_SESSION RtlLeaveCriticalSection(& Session->Lock) + + +/* A double-linked list for the PSX_SESSION instances */ + +static struct +{ + ULONG NextFreeId; + LONG Count; + PPSX_SESSION List; + CRITICAL_SECTION Lock; + +} Sessions; + +/**** FUNCTIONS ******************************************************/ + +/********************************************************************** + * PsxInitializeSessions/0 + * + * DESCRIPTION + * Initialize the PSX session manager. + * ARGUMENTS + * None. + * RETURN VALUE + * None. + */ +NTSTATUS STDCALL +PsxInitializeSessions (VOID) +{ + debug_print (L"PSXSS: ->%s", __FUNCTION__); + /* Initalize the attributes */ + Sessions.NextFreeId = 0; + Sessions.Count = 0; + Sessions.List = NULL; + RtlInitializeCriticalSection (& Sessions.Lock); + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxCreateSessionObjects/1 PRIVATE + * + */ +PRIVATE NTSTATUS STDCALL +PsxCreateSessionObjects ( + IN PLPC_MAX_MESSAGE pRequest, + IN OUT PPSX_SESSION pSession + ) +{ + NTSTATUS Status; + OBJECT_ATTRIBUTES Oa; + WCHAR NameBuffer [NAME_BUFFER_SIZE]; + UNICODE_STRING Name; + SECURITY_QUALITY_OF_SERVICE Sqos; + PSX_CONNECT_PORT_DATA ConnectData; + ULONG ConnectDataSize = sizeof ConnectData; + + /* Port */ + swprintf ( + NameBuffer, + PSX_NS_SESSION_PORT_TEMPLATE, + PSX_NS_SUBSYSTEM_DIRECTORY_NAME, + PSX_NS_SESSION_DIRECTORY_NAME, + pRequest->Header.ClientId.UniqueProcess + ); + debug_print (L"PSXSS: %s: %s", __FUNCTION__, NameBuffer); + RtlInitUnicodeString (& Name, NameBuffer); + InitializeObjectAttributes (& Oa, & Name, 0, NULL, NULL); + RtlZeroMemory (& Sqos, sizeof Sqos); + ConnectData.ConnectionType = PSX_CONNECTION_TYPE_SERVER; + ConnectData.Version = PSX_LPC_PROTOCOL_VERSION; + ConnectData.PortIdentifier = 0; + Status = NtConnectPort ( + & pSession->TerminalChannel.hPort, + & Name, + & Sqos, + NULL, + NULL, + NULL, + (PVOID) & ConnectData, + & ConnectDataSize + ); + if (!NT_SUCCESS(Status)) + { + debug_print (L"PSXSS: %s: NtConnectPort failed with %08x\n", __FUNCTION__, Status); + return Status; + } + /* TODO: */ + /* Section */ + swprintf ( + NameBuffer, + PSX_NS_SESSION_DATA_TEMPLATE, + PSX_NS_SUBSYSTEM_DIRECTORY_NAME, + PSX_NS_SESSION_DIRECTORY_NAME, + pRequest->Header.ClientId.UniqueProcess + ); + debug_print (L"PSXSS: : %s", __FUNCTION__, NameBuffer); + RtlInitUnicodeString (& Name, NameBuffer); + InitializeObjectAttributes (& Oa, & Name, 0, 0, 0); + Status = NtOpenSection ( + & pSession->TerminalChannel.Section.Handle, + SECTION_ALL_ACCESS, /* DesiredAccess */ + & Oa + ); + if (!NT_SUCCESS(Status)) + { + NtClose (pSession->TerminalChannel.hPort); + debug_print (L"PSXSS: %s: NtOpenSection failed with %08x\n", __FUNCTION__, Status); + return Status; + } + pSession->TerminalChannel.Section.BaseAddress = NULL; + pSession->TerminalChannel.Section.ViewSize = PSX_TERMINAL_SECTION_SIZE; + Status = NtMapViewOfSection ( + pSession->TerminalChannel.Section.Handle, + NtCurrentProcess(), + & pSession->TerminalChannel.Section.BaseAddress, + 0, /* ZeroBits */ + 0, /* Commitsize */ + 0, /* SectionOffset */ + & pSession->TerminalChannel.Section.ViewSize, + ViewUnmap, + 0, /* AllocationType */ + PAGE_READWRITE /* Protect 4 */ + ); + if (!NT_SUCCESS(Status)) + { + NtClose (pSession->TerminalChannel.hPort); + NtClose (pSession->TerminalChannel.Section.Handle); + debug_print (L"PSXSS: %s: NtMapViewOfSection failed with %08x\n", __FUNCTION__, Status); + return Status; + } + return Status; +} +/********************************************************************** + * PsxCreateSession/3 + * + * DESCRIPTION + * Create a new PSX_SESSION object and insert it in the + * PSX sessions table. + * ARGUMENTS + * MessageHeader + * Id + * RETURN VALUE + * A status value on error; otherwise STATUS_SUCCESS. + */ +NTSTATUS STDCALL +PsxCreateSession ( + IN PLPC_MAX_MESSAGE pRequest, + IN HANDLE hConnectedPort, + IN ULONG ulPortIdentifier + ) +{ + PPSX_SESSION Session = NULL; + + debug_print (L"PSXSS: ->%s", __FUNCTION__); + /* Create the PSX_SESSION object */ + Session = RtlAllocateHeap (Server.Heap, 0, sizeof (PSX_SESSION)); + if (NULL == Session) + { + debug_print (L"PSXSS: %s: failed to create a new session object", __FUNCTION__); + return STATUS_MEMORY_NOT_ALLOCATED; + } + RtlZeroMemory (Session, sizeof (PSX_SESSION)); + /* Initialiaze the new PSX_SESSION object */ + Session->SessionChannel.hPort = hConnectedPort; + Session->SessionChannel.ulPortIdentifier = ulPortIdentifier; + LOCK_ALL_SESSIONS; + Session->Id = Sessions.NextFreeId ++; + UNLOCK_ALL_SESSIONS; + Session->Status = SESSION_STATUS_INITIALIZATION; + Session->Heap = + RtlCreateHeap ( + HEAP_GROWABLE, + NULL, + 65536, + 65536, + NULL, + NULL + ); + if (INVALID_HANDLE_VALUE == Session->Heap) + { + RtlFreeHeap (Server.Heap, 0, Session); + debug_print (L"PSX: %s: failed to create a new heap for session # %d", __FUNCTION__, Session->Id); + return STATUS_MEMORY_NOT_ALLOCATED; + } + RtlInitializeCriticalSection (& Session->Lock); + /* TODO: open the terminal's shared section */ + /* TODO: connect to the terminal's port */ + /* Inset the new PSX_SESSION object in the sessions table */ + LOCK_ALL_SESSIONS; + if (NULL == Sessions.List) + { + Sessions.List = Session; + Session->Previous = Session; + } + Session->Next = Sessions.List; /* Last one points to the top one */ + Session->Previous = Sessions.List->Previous; + Sessions.List->Previous = Session; /* Top one now points to the new one (tail) */ + ++ Sessions.Count; + UNLOCK_ALL_SESSIONS; + /* DONE */ + debug_print (L"%s: session # %d created", __FUNCTION__, Session->Id); + Session->Status = SESSION_STATUS_READY; + return STATUS_SUCCESS; +} +/********************************************************************** + * PsxTerminateSession/1 + * + * DESCRIPTION + * Remove a PSX_SESSION object from the PSX sessions table and + * destroy it. + * + * ARGUMENTS + * + * RETURN VALUE + * A status value on error; otherwise STATUS_SUCCESS. + */ +NTSTATUS STDCALL +PsxTerminateSession ( + IN PPSX_SESSION Session + ) +{ + LONG Id; + PPSX_SESSION Previous = NULL; + PPSX_SESSION Next = NULL; + + /* Release any resource managed by the session */ + RtlDestroyHeap (Session->Heap); + /* Remove the session object from the sessions table */ + LOCK_ALL_SESSIONS; + Id = Session->Id; + Previous = Session->Previous; + Next = Session->Next; + /* TODO: handle the case of no session left */ + Next->Previous = Previous; + Previous->Next = Next; + -- Sessions.Count; + UNLOCK_ALL_SESSIONS; + /* Delete the old PSX_SESSION object */ + RtlFreeHeap (Server.Heap, 0, Session); + /* DONE */ + debug_print(L"PSX: session # %d deleted", Id); + return STATUS_SUCCESS; +} + +NTSTATUS STDCALL +PsxWriteTerminalSession ( + IN PPSX_SESSION Session, + IN PVOID Buffer, + IN ULONG Size, + IN OUT PULONG Written + ) +{ + LOCK_THIS_SESSION; + /* TODO: lock this session's section for writing */ + /* TODO: copy the data in this session's section */ + /* TODO: request a WRITE operation to the session terminal */ + /* TODO: unlock this session's section */ + UNLOCK_THIS_SESSION; +} + +NTSTATUS STDCALL +PsxReadTerminalSession ( + IN PPSX_SESSION Session, + OUT PVOID Buffer, + IN ULONG Size, + IN OUT PULONG Read + ) +{ + LOCK_THIS_SESSION; + /* TODO: lock this session's section for reading */ + /* TODO: request a READ operation to the session terminal */ + /* TODO: copy the data from this session's section */ + /* TODO: unlock this session's section */ + UNLOCK_THIS_SESSION; +} +/* EOF */ diff --git a/rossubsys/posix/server/ob/terminal.c b/rossubsys/posix/server/ob/terminal.c new file mode 100644 index 00000000000..c74b5be47d8 --- /dev/null +++ b/rossubsys/posix/server/ob/terminal.c @@ -0,0 +1,56 @@ +/* $Id: terminal.c,v 1.3 2002/10/29 04:45:57 rex Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/ob/terminal.c + * DESCRIPTION: terminal + * DATE : 2002-04-04 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include + +/********************************************************************** + * WriteTerminal/4 + */ +NTSTATUS STDCALL +WriteTerminal ( + IN PPSX_TERMINAL Terminal, + IN PVOID Buffer, + IN ULONG Size, + IN OUT PULONG WrittenSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} +/********************************************************************** + * ReadTerminal/4 + */ +NTSTATUS STDCALL +ReadTerminal ( + IN PPSX_TERMINAL Terminal, + IN OUT PVOID Buffer, + IN ULONG Size, + IN OUT PULONG ReadSize + ) +{ + return STATUS_NOT_IMPLEMENTED; +} +/* EOF */ diff --git a/rossubsys/posix/server/port/.cvsignore b/rossubsys/posix/server/port/.cvsignore new file mode 100644 index 00000000000..6142305dc12 --- /dev/null +++ b/rossubsys/posix/server/port/.cvsignore @@ -0,0 +1,2 @@ +*.o +*.d diff --git a/rossubsys/posix/server/port/api.c b/rossubsys/posix/server/port/api.c new file mode 100644 index 00000000000..d6d8b27db2c --- /dev/null +++ b/rossubsys/posix/server/port/api.c @@ -0,0 +1,196 @@ +/* $Id: api.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/port/api.c + * DESCRIPTION: \POSIX+\ApiPort LPC port logic. + * DATE : 2001-04-04 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include +#include "utils.h" + +/********************************************************************** + * ProcessConnectionRequest/ PRIVATE + * + * DESCRIPTION + * This is called when a PSX process attaches to PSXDLL.DLL. + */ +PRIVATE NTSTATUS STDCALL +ProcessConnectionRequest (PLPC_MAX_MESSAGE pRequest) +{ + PPSX_CONNECT_PORT_DATA pConnectData = (PPSX_CONNECT_PORT_DATA) & pRequest->Data; + NTSTATUS Status; + HANDLE hConnectedPort; + ULONG ulPortIdentifier; + + debug_print (L"PSXSS: ->%s", __FUNCTION__); + /* Check if the caller is a process */ + Status = PsxCheckConnectionRequest ( + pConnectData, + PSX_CONNECTION_TYPE_PROCESS + ); + if (!NT_SUCCESS(Status)) + { + Status = NtAcceptConnectPort ( + & hConnectedPort, + NULL, + & pRequest->Header, + FALSE, /* reject connection request */ + NULL, + NULL + ); + if (!NT_SUCCESS(Status)) + { + debug_print( + L"PSXSS: %s: NtAcceptConnectPort failed with status=%08x", + __FUNCTION__, + Status + ); + } + return STATUS_UNSUCCESSFUL; + } + /* OK, accept the connection */ + Status = NtAcceptConnectPort ( + & hConnectedPort, + & ulPortIdentifier, + & pRequest->Header, + TRUE, /* accept connection request */ + NULL, + NULL + ); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: NtAcceptConnectPort failed with status=%08x", __FUNCTION__, Status); + return Status; + } + Status = PsxCreateProcess (pRequest,hConnectedPort,ulPortIdentifier); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: PsxCreateProcess failed with status=%08x", __FUNCTION__, Status); + return Status; + } + Status = NtCompleteConnectPort (hConnectedPort); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: NtCompleteConnectPort failed with status=%08x", __FUNCTION__, Status); + return Status; + } + debug_print (L"PSXSS: <-%s", __FUNCTION__); + return STATUS_SUCCESS; +} +/********************************************************************** + * ProcessRequest/ PRIVATE + * + * DESCRIPTION + * This is the actual POSIX system calls dispatcher. + */ +PRIVATE NTSTATUS STDCALL +ProcessRequest (PPSX_MAX_MESSAGE pRequest) +{ + debug_print (L"PSXSS: ->%s", __FUNCTION__); + + if (pRequest->PsxHeader.Procedure < PSX_SYSCALL_APIPORT_COUNT) + { + pRequest->PsxHeader.Status = + SystemCall [pRequest->PsxHeader.Procedure] (pRequest); + } + else + { + pRequest->PsxHeader.Status = STATUS_INVALID_SYSTEM_SERVICE; + } + return STATUS_SUCCESS; +} +/********************************************************************** + * ApiPortListener/1 + * + * DESCRIPTION + * The thread to process messages from the \POSIX+\ApiPort + * LPC port. Mostly used by PSXDLL.DLL. + */ +VOID STDCALL +ApiPortListener (PVOID pArg) +{ + ULONG ulIndex = (ULONG) pArg; + NTSTATUS Status; + LPC_TYPE RequestType; + ULONG PortIdentifier; + PSX_MAX_MESSAGE Request; + PPSX_MAX_MESSAGE Reply = NULL; + BOOL NullReply = FALSE; + + debug_print (L"PSXSS: ->%s pArg=%d", __FUNCTION__, ulIndex); + + while (TRUE) + { + Reply = NULL; + NullReply = FALSE; + while (!NullReply) + { + Status = NtReplyWaitReceivePort ( + Server.Port[ulIndex].hObject, + 0, + (PLPC_MESSAGE) Reply, + (PLPC_MESSAGE) & Request + ); + if (!NT_SUCCESS(Status)) + { + break; + } + RequestType = PORT_MESSAGE_TYPE(Request); + switch (RequestType) + { + case LPC_CONNECTION_REQUEST: + ProcessConnectionRequest ((PLPC_MAX_MESSAGE) & Request); + NullReply = TRUE; + continue; + case LPC_CLIENT_DIED: + case LPC_PORT_CLOSED: + case LPC_DEBUG_EVENT: + case LPC_ERROR_EVENT: + case LPC_EXCEPTION: + NullReply = TRUE; + continue; + default: + if (RequestType != LPC_REQUEST) + { + NullReply = TRUE; + continue; + } + } + Reply = & Request; + Reply->PsxHeader.Status = ProcessRequest (& Request); + NullReply = FALSE; + } + if ((STATUS_INVALID_HANDLE == Status) || + (STATUS_OBJECT_TYPE_MISMATCH == Status)) + { + break; + } + } +#ifdef __PSXSS_ON_W32__ + TerminateThread(GetCurrentThread(),Status); +#else + NtTerminateThread(NtCurrentThread(),Status); +#endif +} +/* EOF */ diff --git a/rossubsys/posix/server/port/sbapi.c b/rossubsys/posix/server/port/sbapi.c new file mode 100644 index 00000000000..c29ee14fded --- /dev/null +++ b/rossubsys/posix/server/port/sbapi.c @@ -0,0 +1,76 @@ +/* $Id: sbapi.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/port/sbapi.c + * DESCRIPTION: \POSIX+\SbApiPort LPC logic. + * DATE : 2001-03-23 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include "utils.h" + + +/********************************************************************** + * ProcessConnectionRequest/ PRIVATE + */ +PRIVATE NTSTATUS STDCALL +ProcessConnectionRequest (PPSX_MESSAGE pRequest) +{ + return STATUS_NOT_IMPLEMENTED; +} +/********************************************************************** + * ProcessRequest/ PRIVATE + */ +PRIVATE NTSTATUS STDCALL +ProcessRequest (PPSX_MESSAGE pRequest) +{ + return STATUS_NOT_IMPLEMENTED; +} +/********************************************************************** + * SbApiPortListener/1 + * + * DESCRIPTION + * The \POSIX+\SbApiPort LPC port message dispatcher. + * + * NOTE + * what is this port for? Is "Sb" for "shared block"? + */ +VOID STDCALL +SbApiPortListener (PVOID pArg) +{ + NTSTATUS Status; + ULONG PortIdentifier; + PSX_MAX_MESSAGE Request; + PPSX_MAX_MESSAGE Reply = NULL; + + debug_print (L"PSXSS: ->%s pArg=%d", TEXT(__FUNCTION__), (ULONG) pArg); + + RtlZeroMemory (& Request, sizeof Request); + /* TODO */ +#ifdef __PSXSS_ON_W32__ + Sleep(30000); + TerminateThread(GetCurrentThread(),Status); +#else + NtTerminateThread(NtCurrentThread(),Status); +#endif +} +/* EOF */ diff --git a/rossubsys/posix/server/port/session.c b/rossubsys/posix/server/port/session.c new file mode 100644 index 00000000000..abd0889521d --- /dev/null +++ b/rossubsys/posix/server/port/session.c @@ -0,0 +1,195 @@ +/* $Id: session.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/port/session.c + * DESCRIPTION: \POSIX+\SessionPort LPC port logic. + * DATE : 2002-04-04 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include +#include "utils.h" + +/********************************************************************** + * ProcessConnectionRequest/ PRIVATE + */ +PRIVATE NTSTATUS STDCALL +ProcessConnectionRequest (PLPC_MAX_MESSAGE pRequest) +{ + PPSX_CONNECT_PORT_DATA pConnectData = (PPSX_CONNECT_PORT_DATA) & pRequest->Data; + NTSTATUS Status; + HANDLE hConnectedPort; + ULONG ulPortIdentifier; + + debug_print (L"PSXSS: ->%s", TEXT(__FUNCTION__)); + + /* Check if the caller is a terminal */ + Status = PsxCheckConnectionRequest ( + pConnectData, + PSX_CONNECTION_TYPE_TERMINAL + ); + if (!NT_SUCCESS(Status)) + { + Status = NtAcceptConnectPort ( + & hConnectedPort, + NULL, + & pRequest->Header, + FALSE, /* reject connection request */ + NULL, + NULL + ); + if (!NT_SUCCESS(Status)) + { + debug_print( + L"PSXSS: %s: NtAcceptConnectPort failed with status=%08x", + TEXT(__FUNCTION__), + Status + ); + } + return STATUS_UNSUCCESSFUL; + } + /* OK, accept the connection */ + Status = NtAcceptConnectPort ( + & hConnectedPort, + & ulPortIdentifier, + & pRequest->Header, + TRUE, /* accept connection request */ + NULL, + NULL + ); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: NtAcceptConnectPort failed with status=%08x", TEXT(__FUNCTION__), Status); + return Status; + } + /* OK, now create a new PSX_SESSION object */ + Status = PsxCreateSession ( + pRequest, + hConnectedPort, + ulPortIdentifier + ); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: PsxCreateSession failed with status=%08x", TEXT(__FUNCTION__), Status); + return Status; + } + Status = NtCompleteConnectPort (hConnectedPort); + if (!NT_SUCCESS(Status)) + { + debug_print(L"PSXSS: %s: NtCompleteConnectPort failed with status=%08x", TEXT(__FUNCTION__), Status); + return Status; + } + debug_print (L"PSXSS: <-%s", TEXT(__FUNCTION__)); + return STATUS_SUCCESS; +} +/********************************************************************** + * ProcessRequest/ PRIVATE + */ +PRIVATE NTSTATUS STDCALL +ProcessRequest (PPSX_MAX_MESSAGE pRequest) +{ + debug_print (L"PSXSS: ->%s", TEXT(__FUNCTION__)); + /* TODO: Read data from the section */ + /* TODO: send data to the process */ + debug_print (L"PSXSS: <-%s", TEXT(__FUNCTION__)); + return STATUS_NOT_IMPLEMENTED; +} +/********************************************************************** + * SessionPortListener/1 + * + * DESCRIPTION + * Listen on port \POSIX+\SessionPort and create new sessions + * when a new terminal emulator calls. + * + * ARGUMENTS + * \POSIX+\SessionPort handle. + * + * RETURN VALUE + * None. + */ +VOID STDCALL +SessionPortListener (PVOID pArg) +{ + ULONG ulIndex = (ULONG) pArg; + NTSTATUS Status; + LPC_TYPE RequestType; + ULONG PortIdentifier; + PSX_MAX_MESSAGE Request; + PPSX_MAX_MESSAGE Reply = NULL; + BOOL NullReply = FALSE; + + debug_print (L"PSXSS: ->%s pArg=%d", TEXT(__FUNCTION__), ulIndex); + + while (TRUE) + { + Reply = NULL; + NullReply = FALSE; + while (!NullReply) + { + Status = NtReplyWaitReceivePort ( + Server.Port[ulIndex].hObject, + 0, + (PLPC_MESSAGE) Reply, + (PLPC_MESSAGE) & Request + ); + if (!NT_SUCCESS(Status)) + { + break; + } + RequestType = PORT_MESSAGE_TYPE(Request); + switch (RequestType) + { + case LPC_CONNECTION_REQUEST: + ProcessConnectionRequest ((PLPC_MAX_MESSAGE) & Request); + NullReply = TRUE; + continue; + case LPC_CLIENT_DIED: + case LPC_PORT_CLOSED: + case LPC_DEBUG_EVENT: + case LPC_ERROR_EVENT: + case LPC_EXCEPTION: + NullReply = TRUE; + continue; + default: + if (RequestType != LPC_REQUEST) + { + NullReply = TRUE; + continue; + } + } + Reply = & Request; + Reply->PsxHeader.Status = ProcessRequest (& Request); + NullReply = FALSE; + } + if ((STATUS_INVALID_HANDLE == Status) || + (STATUS_OBJECT_TYPE_MISMATCH == Status)) + { + break; + } + } +#ifdef __PSXSS_ON_W32__ + TerminateThread(GetCurrentThread(),Status); +#else + NtTerminateThread(NtCurrentThread(),Status); +#endif +} +/* EOF */ diff --git a/rossubsys/posix/server/port/utils.c b/rossubsys/posix/server/port/utils.c new file mode 100644 index 00000000000..6e3c16e0d81 --- /dev/null +++ b/rossubsys/posix/server/port/utils.c @@ -0,0 +1,69 @@ +/* $Id: utils.c,v 1.4 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Environment Subsystem Server + * FILE : reactos/subsys/psx/server/port/utils.c + * DESCRIPTION: LPC port utilities. + * DATE : 2002-04-07 + * AUTHOR : Emanuele Aliberti + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include +#include "utils.h" + +/********************************************************************** + * PsxCheckConnectionRequest/2 + * + * DESCRIPTION + * Check if we can accept the connection request sent to + * an LPC port. Protocol version and ConnectionType MUST match. + */ +NTSTATUS STDCALL +PsxCheckConnectionRequest ( + IN OUT PPSX_CONNECT_PORT_DATA pConnectData, + IN PSX_CONNECTION_TYPE ConnectionType + ) +{ + /* Check if the caller is ConnectionType */ + if (ConnectionType != pConnectData->ConnectionType) + { + debug_print( + L"PSXSS: %s: ConnectionType=%d, expected %d", + TEXT(__FUNCTION__), + pConnectData->ConnectionType, + ConnectionType + ); + return STATUS_UNSUCCESSFUL; + } + /* Check if the LPC protocol version matches */ + if (PSX_LPC_PROTOCOL_VERSION != pConnectData->Version) + { + debug_print( + L"PSXSS: %s: Version=%d, expected %d", + TEXT(__FUNCTION__), + pConnectData->Version, + PSX_LPC_PROTOCOL_VERSION + ); + pConnectData->Version = PSX_LPC_PROTOCOL_VERSION; + return STATUS_UNSUCCESSFUL; + } + return STATUS_SUCCESS; +} +/* EOF */ diff --git a/rossubsys/posix/server/port/utils.h b/rossubsys/posix/server/port/utils.h new file mode 100644 index 00000000000..fe17468cd23 --- /dev/null +++ b/rossubsys/posix/server/port/utils.h @@ -0,0 +1,4 @@ +#ifndef _UTILS_H +#define _UTILS_H +NTSTATUS STDCALL PsxCheckConnectionRequest (PPSX_CONNECT_PORT_DATA,PSX_CONNECTION_TYPE); +#endif diff --git a/rossubsys/posix/tools/mksystab/.cvsignore b/rossubsys/posix/tools/mksystab/.cvsignore new file mode 100644 index 00000000000..bd4f908d5e0 --- /dev/null +++ b/rossubsys/posix/tools/mksystab/.cvsignore @@ -0,0 +1,6 @@ +*.o +*.d +*.exe +*.coff +*.sym +mksystab.map \ No newline at end of file diff --git a/rossubsys/posix/tools/mksystab/Makefile b/rossubsys/posix/tools/mksystab/Makefile new file mode 100644 index 00000000000..87fa226a82a --- /dev/null +++ b/rossubsys/posix/tools/mksystab/Makefile @@ -0,0 +1,54 @@ +# $Id: Makefile,v 1.1 2003/01/05 18:08:11 robd Exp $ +# +# Tool to generate the POSIX+ server system calls table +# and other auxiliary C files. +# + +PATH_TO_TOP = ../../../reactos + +PATH_TO_PSX_TOP = ../.. + +TARGET_TYPE = program + +TARGET_NAME = mksystab + +TARGET_APPTYPE = console + +TARGET_NORC = yes + +SYSCALL_DB=syscall.db +SYSTAB_C=$(PATH_TO_PSX_TOP)/server/call/syscall.c +SYSTAB_H=$(PATH_TO_PSX_TOP)/server/include/syscall.h +SYSCALL_H=$(PATH_TO_PSX_TOP)/include/psx/syscall.h +STUBS_C=$(PATH_TO_PSX_TOP)/server/call/stubs.c + +TARGET_OBJECTS = \ + $(TARGET_NAME).o + + +#all: systab + +#$(TARGET_NAME)$(EXE_POSTFIX): $(TARGET_NAME).c +# $(CC) $(CFLAGS) -o $(TARGET_NAME)$(EXE_POSTFIX) $(TARGET_NAME).c + +#systab: $(TARGET_NAME)$(EXE_POSTFIX) +# $(TARGET_NAME)$(EXE_POSTFIX) \ +# $(SYSCALL_DB) \ +# $(SYSTAB_C) \ +# $(SYSTAB_H) \ +# $(SYSCALL_H) \ +# $(STUBS_C) + +#clean: +# - $(RM) $(TARGET_NAME)$(EXE_POSTFIX) +# - $(RM) *.o +# - $(RM) $(SYSTAB_C) +# - $(RM) $(SYSTAB_H) +# - $(RM) $(SYSCALL_H) +# - $(RM) $(STUBS_C) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/posix/tools/mksystab/mksystab.c b/rossubsys/posix/tools/mksystab/mksystab.c new file mode 100644 index 00000000000..4f998ee9eed --- /dev/null +++ b/rossubsys/posix/tools/mksystab/mksystab.c @@ -0,0 +1,379 @@ +/* $Id: mksystab.c,v 1.2 2003/12/21 20:11:46 ea Exp $ + * + * PROJECT : ReactOS / POSIX+ Subsystem + * DESCRIPTION: Build the system calls table for + * DESCRIPTION: the POSIX+ LPC server process. + * NOTE : this code is supposed to be portable. + * AUTHOR : Emanuele Aliberti + * DATE : 2001-05-26 + * REVISIONS + * 2002-03-19 EA added stub file generation + * 2002-04-06 EA added to the CVS repository + */ +#include +#include +#include +#include + +#define PARSER_CONTEXT_LINE_SIZE 1024 +#define PARSER_CONTEXT_INTERFACE_SIZE 64 + +const char * myname = "mksystab"; + +const char * syscall_name_prefix = "syscall_"; +const char * proxy_name_prefix = "psxss_"; + +typedef enum { + METHOD_SUCCESS, + METHOD_EOF, + METHOD_FAILURE +} METHOD_TYPE; + +typedef struct _PARSER_CONTEXT +{ + int line_number; + int id; + char line [PARSER_CONTEXT_LINE_SIZE]; + char status; + char interface [PARSER_CONTEXT_INTERFACE_SIZE]; + int argc; + +} PARSER_CONTEXT, * PPARSER_CONTEXT; + +typedef struct _MFILE +{ + char * name; + FILE * fp; + char * fopen_mode; + METHOD_TYPE (*prologue)(int,PPARSER_CONTEXT); + METHOD_TYPE (*iter)(int,PPARSER_CONTEXT); + METHOD_TYPE (*epilog)(int,PPARSER_CONTEXT); + +} MFILE, * PMFILE; + +/* MFILE file table */ + +METHOD_TYPE db_prologue (int self, PPARSER_CONTEXT context); +METHOD_TYPE db_iter (int self, PPARSER_CONTEXT context); +METHOD_TYPE db_epilog (int self, PPARSER_CONTEXT context); + +METHOD_TYPE systab_prologue (int self, PPARSER_CONTEXT context); +METHOD_TYPE systab_iter (int self, PPARSER_CONTEXT context); +METHOD_TYPE systab_epilog (int self, PPARSER_CONTEXT context); + +METHOD_TYPE psx_include_prologue (int self, PPARSER_CONTEXT context); +METHOD_TYPE psx_include_iter (int self, PPARSER_CONTEXT context); +METHOD_TYPE psx_include_epilog (int self, PPARSER_CONTEXT context); + +METHOD_TYPE server_include_prologue (int self, PPARSER_CONTEXT context); +METHOD_TYPE server_include_iter (int self, PPARSER_CONTEXT context); +METHOD_TYPE server_include_epilog (int self, PPARSER_CONTEXT context); + +METHOD_TYPE stubs_prologue (int self, PPARSER_CONTEXT context); +METHOD_TYPE stubs_iter (int self, PPARSER_CONTEXT context); +METHOD_TYPE stubs_epilog (int self, PPARSER_CONTEXT context); + + +MFILE mf [] = +{ + { NULL, NULL, "r", db_prologue, db_iter, db_epilog }, /* it must be 1st */ + { NULL, NULL, "w", systab_prologue, systab_iter, systab_epilog }, + { NULL, NULL, "w", server_include_prologue, server_include_iter, server_include_epilog }, + { NULL, NULL, "w", psx_include_prologue, psx_include_iter, psx_include_epilog }, + { NULL, NULL, "w", stubs_prologue, stubs_iter, stubs_epilog } +}; + + +/* mf objects methods */ + +int mf_open (int index) +{ + mf [index].fp = fopen (mf [index].name, mf [index].fopen_mode); + if (NULL == mf [index].fp) + { + fprintf (stderr, "%s: error %d while opening \"%s\".", myname, errno, mf [index].name); + return METHOD_FAILURE; + } + return METHOD_SUCCESS; +} + +void mf_close (int index) +{ + fclose (mf[index].fp); +} + +/* db file methods */ + +METHOD_TYPE db_prologue (int self, PPARSER_CONTEXT context) +{ + if (METHOD_FAILURE == mf_open (self)) + { + return METHOD_FAILURE; + } + fprintf (stderr, "Processing \"%s\"...\n", mf [self].name); + return METHOD_SUCCESS; +} + +METHOD_TYPE db_iter (int self, PPARSER_CONTEXT context) +{ + char * eol; + + do + { + if (feof(mf [self].fp)) + { + return METHOD_EOF; + } + if (NULL == fgets (context->line, PARSER_CONTEXT_LINE_SIZE, mf [self].fp)) + { + return METHOD_EOF; + } + ++ context->line_number; + eol = strchr(context->line, '\n'); + if (eol) + { + *eol = '\0'; + } + /* Is line empty or a comment? */ + } while (0 == strlen (context->line) || context->line[0] == '#'); + /* Line is not a comment nor an empty line */ + if (3 != sscanf (context->line, "%c%s%d", & context->status, context->interface, & context->argc)) + { + fprintf (stderr, "Syntax error at line %d.\n", context->line_number); + return METHOD_FAILURE; + } + return METHOD_SUCCESS; +} + +METHOD_TYPE db_epilog (int self, PPARSER_CONTEXT context) +{ + mf_close (self); + return METHOD_SUCCESS; +} + +/* systab file methods */ + +METHOD_TYPE systab_prologue (int self, PPARSER_CONTEXT context) +{ + if (METHOD_FAILURE == mf_open (self)) + { + return METHOD_FAILURE; + } + fprintf (mf[self].fp, "/* POSIX+ system calls (machine generated: do not edit!) */\n"); + fprintf (mf[self].fp, "#include \n"); + fprintf (mf[self].fp, "#include \n"); + fprintf (mf[self].fp, "PSX_SYSTEM_CALL SystemCall [] =\n"); + fprintf (mf[self].fp, "{\n"); + return METHOD_SUCCESS; +} + +METHOD_TYPE systab_iter (int self, PPARSER_CONTEXT context) +{ + switch (context->status) + { + case '+': + case '-': /* unimplemented interface */ + fprintf (mf[self].fp, "(void*)%s%s,\n", syscall_name_prefix, context->interface); + break; + default: + fprintf (stderr, "%s: unknown interface status \"%c\" at line %d.\n", + myname, context->status, context->line_number); + return METHOD_FAILURE; + } + return METHOD_SUCCESS; +} + +METHOD_TYPE systab_epilog (int self, PPARSER_CONTEXT context) +{ + fprintf (mf[self].fp, "0\n};\n"); + fprintf (mf[self].fp, "/* EOF */\n"); + return METHOD_SUCCESS; +} + + +/* server/include file methods */ + +METHOD_TYPE server_include_prologue (int self, PPARSER_CONTEXT context) +{ + if (METHOD_FAILURE == mf_open (self)) + { + return METHOD_FAILURE; + } + fprintf (mf[self].fp, "/* POSIX+ system calls (machine generated: do not edit!) */\n"); + fprintf (mf[self].fp, "#ifndef _SERVER_SYSCALL_H\n"); + fprintf (mf[self].fp, "#define _SERVER_SYSCALL_H\n"); + return METHOD_SUCCESS; +} + +METHOD_TYPE server_include_iter (int self, PPARSER_CONTEXT context) +{ + char interface [PARSER_CONTEXT_INTERFACE_SIZE*2]; + + sprintf (interface, "%s%s", syscall_name_prefix, context->interface); + fprintf (mf[self].fp, "NTSTATUS STDCALL %s (PPSX_MAX_MESSAGE);\n", interface); + + return METHOD_SUCCESS; +} + +METHOD_TYPE server_include_epilog (int self, PPARSER_CONTEXT context) +{ + fprintf (mf[self].fp, "#endif /* ndef _SERVER_SYSCALL_H */\n"); + fprintf (mf[self].fp, "/* EOF */\n"); + return METHOD_SUCCESS; +} + + +/* psx/include file methods */ + +METHOD_TYPE psx_include_prologue (int self, PPARSER_CONTEXT context) +{ + if (METHOD_FAILURE == mf_open (self)) + { + return METHOD_FAILURE; + } + fprintf (mf[self].fp, "/* POSIX+ system calls (machine generated: do not edit!) */\n"); + fprintf (mf[self].fp, "#ifndef _PSX_SYSCALL_H\n"); + fprintf (mf[self].fp, "#define _PSX_SYSCALL_H\n"); + return METHOD_SUCCESS; +} + +METHOD_TYPE psx_include_iter (int self, PPARSER_CONTEXT context) +{ + char interface [PARSER_CONTEXT_INTERFACE_SIZE*2]; + + sprintf (interface, "%s%s", proxy_name_prefix, context->interface); + fprintf (mf[self].fp, "#define %s %d\n", strupr(interface), context->id ++); + + return METHOD_SUCCESS; +} + +METHOD_TYPE psx_include_epilog (int self, PPARSER_CONTEXT context) +{ + fprintf (mf[self].fp, "#define PSX_SYSCALL_APIPORT_COUNT %d\n", context->id ++); + fprintf (mf[self].fp, "#endif /* ndef _PSX_SYSCALL_H */\n"); + fprintf (mf[self].fp, "/* EOF */\n"); + return METHOD_SUCCESS; +} + + +/* stubs file methods */ + +METHOD_TYPE stubs_prologue (int self, PPARSER_CONTEXT context) +{ + if (METHOD_FAILURE == mf_open (self)) + { + return METHOD_FAILURE; + } + fprintf( mf[self].fp, + "/* POSIX+ system calls not yet implemented */\n" + "/* (machine generated: do not edit!) */\n" + "#include \n"); + return METHOD_SUCCESS; +} + +METHOD_TYPE stubs_iter (int self, PPARSER_CONTEXT context) +{ + if ('-' == context->status) + { + fprintf ( + mf[self].fp, + "NTSTATUS STDCALL %s%s(PPSX_MAX_MESSAGE Msg){Msg->PsxHeader.Status=STATUS_NOT_IMPLEMENTED;return(STATUS_SUCCESS);}\n", + syscall_name_prefix, + context->interface + ); + } + return METHOD_SUCCESS; +} + +METHOD_TYPE stubs_epilog (int self, PPARSER_CONTEXT context) +{ + fprintf (mf[self].fp, "/* EOF */\n"); + return METHOD_SUCCESS; +} + + +/* main loop */ + +METHOD_TYPE mksystab () +{ + int index; + int index_top = (sizeof mf / sizeof mf[0]); + int iterate = 1; + PARSER_CONTEXT context; + METHOD_TYPE mt; + + /* initialize the parser's context */ + context.line_number = 0; + context.id = 0; + + /* prologue */ + for (index = 0; index < index_top; index ++) + { + if (METHOD_FAILURE == mf[index].prologue (index, & context)) + { + return METHOD_FAILURE; + } + } + /* iter */ + while (iterate) + { + for (index = 0; index < index_top; index ++) + { + mt = mf[index].iter (index, & context); + if (METHOD_EOF == mt) + { + if (0 == index) /* input MUST be 1st MFILE */ + { + iterate = 0; + break; /* input reached EOF */ + } + return METHOD_FAILURE; + } + else if (METHOD_FAILURE == mt) + { + return METHOD_FAILURE; + } + } + } + /* epilog */ + for (index = 0; index < index_top; index ++) + { + if (METHOD_FAILURE == mf[index].epilog (index, & context)) + { + return METHOD_FAILURE; + } + } + + /* done */ + return METHOD_SUCCESS; +} + +/* entry point */ + +int main (int argc, char **argv) +{ + int status = 0; + int index; + + /* Check user parameters */ + if ((1 + (sizeof mf / sizeof (MFILE))) != argc) + { + printf ("ReactOS Operating System - POSIX+ Environment Subsystem\n"); + printf ("Build the system calls table of the POSIX+ server.\n\n"); + printf ("usage: %s syscall.db syscall.c syscall.h syscall.h stubs.c\n", argv[0]); + exit (METHOD_FAILURE); + } + /* initialize descriptors */ + for (index = 0; index < (sizeof mf / sizeof mf[0]); index ++) + { + mf [index].name = argv [index + 1]; + } + + /* do process them */ + status = mksystab (); + + return (status); +} + + +/* EOF */ diff --git a/rossubsys/posix/tools/mksystab/postbuild.cmd b/rossubsys/posix/tools/mksystab/postbuild.cmd new file mode 100644 index 00000000000..998c134eedc --- /dev/null +++ b/rossubsys/posix/tools/mksystab/postbuild.cmd @@ -0,0 +1,20 @@ +@echo off + +setlocal + +set PATH_TO_TOP=..\..\..\reactos + +set PATH_TO_PSX_TOP=..\.. + +set TARGET_NAME=mksystab + +set SYSCALL_DB=syscall.db +set SYSTAB_C=%PATH_TO_PSX_TOP%\server\call\syscall.c +set SYSTAB_H=%PATH_TO_PSX_TOP%\server\include\syscall.h +set SYSCALL_H=%PATH_TO_PSX_TOP%\include\psx\syscall.h +set STUBS_C=%PATH_TO_PSX_TOP%\server\call\stubs.c + + +mksystab %SYSCALL_DB% %SYSTAB_C% %SYSTAB_H% %SYSCALL_H% %STUBS_C% + +endlocal diff --git a/rossubsys/posix/tools/mksystab/syscall.db b/rossubsys/posix/tools/mksystab/syscall.db new file mode 100644 index 00000000000..3e9e5ccd90f --- /dev/null +++ b/rossubsys/posix/tools/mksystab/syscall.db @@ -0,0 +1,130 @@ +# $Id: syscall.db,v 1.1 2003/01/05 18:08:11 robd Exp $ +# +# ReactOS - Operating System +# Symbolic system calls table for the POSIX+ server. +# +# NOTE: the PSXSS server implements only the system calls +# that can NOT be implemented in full/correctly in the +# PSXDLL library. +# +# ENTRY SYNTAX +# status interface_name argc +# +# status = + | - +# +# LEGENDA +# + means the system call is implemented in the server; +# - means "{errno=ENOSYS;return -1;}". +# ++ null 0 +- fork 0 +- authenticateuser 0 +- waitpid 3 ++ _exit 1 +- kill 2 +- sigaction 3 +- sigprocmask 3 +- sigpending 1 +- sigsuspend 1 +- alarm 1 +- getpsids 0 +- syscall12 0 +- syscall13 0 +- getgroups 2 +- syscall15 0 +- syscall16 0 +- setsid 0 +- setpgid 2 +- syscall19 0 +- syscall20 0 +- times 1 +- ttyname 3 +- isatty 1 +- sysconf 1 +- open 2 +- umask 1 +- link 2 +- mkdir 2 +- mkfifo 2 +- rmdir 1 +- rename 2 +- stat 2 +- fstat 2 +- access 2 +- chmod 2 +- chown 3 +- utime 2 +- pathconf 2 +- fpathconf 2 +- pipe 1 +- syscall41 0 +- dup2 2 +- close 1 +- read 3 +- write 3 +- fcntl 3 +- lseek 3 +- tcgetattr 2 +- tcsetattr 3 +- tcsendbreak 2 +- tcdrain 1 +- tcflush 2 +- tcflow 2 +- tcgetpgrp 1 +- tcsetpgrp 2 +- getpwuid 1 +- getpwnam 1 +- getgrgid 1 +- getgrnam 1 +- unlink 1 +- readdir 1 +- ftruncate 2 +- syscall63 0 +- semctl 4 +- semget 3 +- semop 3 +- shmat 3 +- shmctl 3 +- shmdt 1 +- shmget 3 +- msgctl 3 +- msgget 2 +- msgrcv 5 +- msgsnd 4 +- socket 3 +- accept 3 +- bind 3 +- connect 3 +- getpeername 3 +- getsockname 3 +- getsockopt 5 +- listen 2 +- recv 4 +- recvfrom 6 +- send 4 +- sendto 6 +- setsockopt 5 +- shutdown 2 +- gethostbyname 1 +- gethostbyaddr 3 +- getprotobyname 1 +- getprotobynumber 1 +- getservbyname 2 +- getservbyport 2 +- select 5 +- statvfs 2 +- fstatvfs 2 +- ptsname 1 +- _fdptcheck 0 +- ioctl 2 +- mmap 6 +- syscall102 0 +- uidtontsid 1 +- gettzenv 0 +- pututxline 1 +- renamewtmpx 0 +- fsync 1 +- setgetitimer 0 +- setuser 0 +- ipcs 0 +# EOF From 16aefd4c544e1aa226b95822da04ce897e88f64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 15:24:49 +0000 Subject: [PATCH 34/50] Resuscitate VMS subsystem (yeah, you've correctly read: VMS!!) from revision 24496. svn path=/trunk/; revision=65461 --- rossubsys/vms/copying | 340 ++++++++++++++++++++++ rossubsys/vms/directory.xml | 13 + rossubsys/vms/include/vms/lpcproto.h | 12 + rossubsys/vms/lib/directory.xml | 3 + rossubsys/vms/lib/vmsdll/dllmain.c | 39 +++ rossubsys/vms/lib/vmsdll/lib/stubs.c | 1 + rossubsys/vms/lib/vmsdll/makefile | 44 +++ rossubsys/vms/lib/vmsdll/readme.txt | 7 + rossubsys/vms/lib/vmsdll/rms/stubs.c | 0 rossubsys/vms/lib/vmsdll/sys/stubs.c | 30 ++ rossubsys/vms/lib/vmsdll/vmsdll.def | 32 ++ rossubsys/vms/lib/vmsdll/vmsdll.rc | 4 + rossubsys/vms/lib/vmsdll/vmsdll.xml | 16 + rossubsys/vms/makefile | 14 + rossubsys/vms/readme.txt | 5 + rossubsys/vms/server/dllmain.c | 50 ++++ rossubsys/vms/server/makefile | 24 ++ rossubsys/vms/server/server.c | 90 ++++++ rossubsys/vms/server/vmssrv.def | 3 + rossubsys/vms/server/vmssrv.h | 13 + rossubsys/vms/server/vmssrv.rc | 4 + rossubsys/vms/server/vmssrv.xml | 11 + rossubsys/vms/tools/directory.xml | 3 + rossubsys/vms/tools/mksystab/mksystab.xml | 0 24 files changed, 758 insertions(+) create mode 100644 rossubsys/vms/copying create mode 100644 rossubsys/vms/directory.xml create mode 100644 rossubsys/vms/include/vms/lpcproto.h create mode 100644 rossubsys/vms/lib/directory.xml create mode 100644 rossubsys/vms/lib/vmsdll/dllmain.c create mode 100644 rossubsys/vms/lib/vmsdll/lib/stubs.c create mode 100644 rossubsys/vms/lib/vmsdll/makefile create mode 100644 rossubsys/vms/lib/vmsdll/readme.txt create mode 100644 rossubsys/vms/lib/vmsdll/rms/stubs.c create mode 100644 rossubsys/vms/lib/vmsdll/sys/stubs.c create mode 100644 rossubsys/vms/lib/vmsdll/vmsdll.def create mode 100644 rossubsys/vms/lib/vmsdll/vmsdll.rc create mode 100644 rossubsys/vms/lib/vmsdll/vmsdll.xml create mode 100644 rossubsys/vms/makefile create mode 100644 rossubsys/vms/readme.txt create mode 100644 rossubsys/vms/server/dllmain.c create mode 100644 rossubsys/vms/server/makefile create mode 100644 rossubsys/vms/server/server.c create mode 100644 rossubsys/vms/server/vmssrv.def create mode 100644 rossubsys/vms/server/vmssrv.h create mode 100644 rossubsys/vms/server/vmssrv.rc create mode 100644 rossubsys/vms/server/vmssrv.xml create mode 100644 rossubsys/vms/tools/directory.xml create mode 100644 rossubsys/vms/tools/mksystab/mksystab.xml diff --git a/rossubsys/vms/copying b/rossubsys/vms/copying new file mode 100644 index 00000000000..dc63aaca038 --- /dev/null +++ b/rossubsys/vms/copying @@ -0,0 +1,340 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/rossubsys/vms/directory.xml b/rossubsys/vms/directory.xml new file mode 100644 index 00000000000..a194009e030 --- /dev/null +++ b/rossubsys/vms/directory.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/rossubsys/vms/include/vms/lpcproto.h b/rossubsys/vms/include/vms/lpcproto.h new file mode 100644 index 00000000000..2099945a456 --- /dev/null +++ b/rossubsys/vms/include/vms/lpcproto.h @@ -0,0 +1,12 @@ +#ifndef __VMS_SYS_LPCPROTO_H +#define __VMS_SYS_LPCPROTO_H + +#define VMS_LPCPROTO_VERSION 1 + +#define CSR_VMS_SRV 1 + +#define VMS_OBNS_ROOT L"\\VMS" +#define VMS_API_PORT_NAME L"\\VMS\\ApiPort" +#define VMS_SBAPI_PORT_NAME L"\\VMS\\SbApiPort" + +#endif diff --git a/rossubsys/vms/lib/directory.xml b/rossubsys/vms/lib/directory.xml new file mode 100644 index 00000000000..fafd35669d8 --- /dev/null +++ b/rossubsys/vms/lib/directory.xml @@ -0,0 +1,3 @@ + + + diff --git a/rossubsys/vms/lib/vmsdll/dllmain.c b/rossubsys/vms/lib/vmsdll/dllmain.c new file mode 100644 index 00000000000..a7ef3186b2f --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/dllmain.c @@ -0,0 +1,39 @@ +/* $Id$ + * + * dllmain.c + * + * A stub DllMain function which will be called by DLLs which do not + * have a user supplied DllMain. + * + * Contributors: + * Created by Colin Peters + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warrenties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * $Revision: 1.5 $ + * $Author$ + * $Date$ + * + */ + +#include + + +/* LIBRARY ENTRY POINT ********************************************************/ + +BOOL +WINAPI +DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) +{ + return TRUE; +} + +/* EOF */ diff --git a/rossubsys/vms/lib/vmsdll/lib/stubs.c b/rossubsys/vms/lib/vmsdll/lib/stubs.c new file mode 100644 index 00000000000..1a1ac2be5f1 --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/lib/stubs.c @@ -0,0 +1 @@ +void lib$find_file () { } diff --git a/rossubsys/vms/lib/vmsdll/makefile b/rossubsys/vms/lib/vmsdll/makefile new file mode 100644 index 00000000000..b32d9715c16 --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/makefile @@ -0,0 +1,44 @@ +# $Id$ +# +PATH_TO_TOP = ../../../reactos + +TARGET_TYPE = dynlink + +TARGET_NAME = vmsdll + +TARGET_CFLAGS = -Wall -Werror -fno-builtin \ + -D__USE_W32API \ + -D_WIN32_IE=0x0500 \ + -D_WIN32_WINNT=0x501 \ + -DWINVER=0x600 \ + +TARGET_LFLAGS = -nostartfiles -nostdlib + +TARGET_SDKLIBS = ntdll.a + +LIB_OBJECTS = \ + lib\stubs.o + +RMS_OBJECTS = \ + rms\stubs.o + +MISC_OBJECTS = \ + dllmain.o + +SYS_OBJECTS = \ + sys\stubs.o + +TARGET_OBJECTS = \ + $(LIB_OBJECTS) \ + $(RMS_OBJECTS) \ + $(SYS_OBJECTS) \ + $(MISC_OBJECTS) + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +include $(TOOLS_PATH)/depend.mk + diff --git a/rossubsys/vms/lib/vmsdll/readme.txt b/rossubsys/vms/lib/vmsdll/readme.txt new file mode 100644 index 00000000000..75a81a558c6 --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/readme.txt @@ -0,0 +1,7 @@ +VMSDLL - ReactOS VMS+ Environment Subsystem Client Library + +lib = Library APIs + +rms = Record Management Services APIs + +sys = System APIs diff --git a/rossubsys/vms/lib/vmsdll/rms/stubs.c b/rossubsys/vms/lib/vmsdll/rms/stubs.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/rossubsys/vms/lib/vmsdll/sys/stubs.c b/rossubsys/vms/lib/vmsdll/sys/stubs.c new file mode 100644 index 00000000000..4ba6c1b72ce --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/sys/stubs.c @@ -0,0 +1,30 @@ +/* $Id$ */ +void sys$ascefc (void) {} +void sys$asctim (void) {} +void sys$assign (void) {} +void sys$bintim (void) {} +void sys$clref (void) {} +void sys$crelnm (void) {} +void sys$crelnt (void) {} +void sys$dclast (void) {} +void sys$enq (void) {} +void sys$forcex (void) {} +void sys$gettim (void) {} +void sys$hiber (void) {} +void sys$numtim (void) {} +void sys$qio (void) {} +void sys$qiow (void) {} +void sys$readef (void) {} +void sys$schdwk (void) {} +void sys$setef (void) {} +void sys$setast (void) {} +void sys$setime (void) {} +void sys$setimr (void) {} +void sys$setpri (void) {} +void sys$setprn (void) {} +void sys$synch (void) {} +void sys$trnlnm (void) {} +void sys$waitfr (void) {} +void sys$wake (void) {} + +/* EOF */ diff --git a/rossubsys/vms/lib/vmsdll/vmsdll.def b/rossubsys/vms/lib/vmsdll/vmsdll.def new file mode 100644 index 00000000000..764c4977c03 --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/vmsdll.def @@ -0,0 +1,32 @@ +LIBRARY vmsdll.dll +EXPORTS +; LIB +lib$find_file +; SYS +sys$ascefc +sys$asctim +sys$assign +sys$bintim +sys$clref +sys$crelnm +sys$crelnt +sys$dclast +sys$enq +sys$forcex +sys$gettim +sys$hiber +sys$numtim +sys$qio +sys$qiow +sys$readef +sys$schdwk +sys$setef +sys$setast +sys$setime +sys$setimr +sys$setpri +sys$setprn +sys$synch +sys$trnlnm +sys$waitfr +sys$wake diff --git a/rossubsys/vms/lib/vmsdll/vmsdll.rc b/rossubsys/vms/lib/vmsdll/vmsdll.rc new file mode 100644 index 00000000000..9cbb160765f --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/vmsdll.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS/VMS API Client Library\0" +#define REACTOS_STR_INTERNAL_NAME "vmsdll\0" +#define REACTOS_STR_ORIGINAL_FILENAME "vmdsll.dll\0" +#include diff --git a/rossubsys/vms/lib/vmsdll/vmsdll.xml b/rossubsys/vms/lib/vmsdll/vmsdll.xml new file mode 100644 index 00000000000..0ebd47dda25 --- /dev/null +++ b/rossubsys/vms/lib/vmsdll/vmsdll.xml @@ -0,0 +1,16 @@ + + + ../include + -lgcc + dllmain.c + vmsdll.rc + + stubs.c + + + stubs.c + + + stubs.c + + diff --git a/rossubsys/vms/makefile b/rossubsys/vms/makefile new file mode 100644 index 00000000000..de7d057c312 --- /dev/null +++ b/rossubsys/vms/makefile @@ -0,0 +1,14 @@ +all: + @echo To build "vms" there are two paths: + @echo --- + @echo 1. copy the vms folder into the reactos\modules folder + @echo 2. link reactos/modules/vms to vms + @echo UNIX + @echo cd $${ROS_SRC_ROOT}/reactos/modules + @echo ln -s $${ROS_SRC_ROOT}/vms vms + @echo WINDOWS + @echo cd %%ROS_SRC_ROOT%%\reactos\modules + @echo junction vms %%ROS_SRC_ROOT%%\vms + @echo --- + @echo Eventually you can run "make depends" in the %%ROS_SRC_ROOT%%\reactos + @echo directory to compile it. diff --git a/rossubsys/vms/readme.txt b/rossubsys/vms/readme.txt new file mode 100644 index 00000000000..7760e6e7bcd --- /dev/null +++ b/rossubsys/vms/readme.txt @@ -0,0 +1,5 @@ +$Id$ + +This directory contains the ReactOS VMS personality. +Make sure you also have a copy of the rest of the ReactOS +source before you attempt to build anything in this module. diff --git a/rossubsys/vms/server/dllmain.c b/rossubsys/vms/server/dllmain.c new file mode 100644 index 00000000000..61b87c63efc --- /dev/null +++ b/rossubsys/vms/server/dllmain.c @@ -0,0 +1,50 @@ +/* $Id$ + * + * dllmain.c - VMS Enviroment Subsystem Server + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include "vmssrv.h" + +#define NDEBUG +#include + +/* DLL entry point */ + +HANDLE VmsSrvDllHandle = 0; + +/* FUNCTIONS *****************************************************************/ + +BOOL STDCALL +DllMain(HANDLE hDll, + DWORD dwReason, + LPVOID lpReserved) +{ + if (DLL_PROCESS_ATTACH == dwReason) + { + VmsSrvDllHandle = hDll; + } + + return TRUE; +} + +/* EOF */ diff --git a/rossubsys/vms/server/makefile b/rossubsys/vms/server/makefile new file mode 100644 index 00000000000..aa14055fa8d --- /dev/null +++ b/rossubsys/vms/server/makefile @@ -0,0 +1,24 @@ +# $Id$ +# +# ReactOS VMS+ Environment Subsystem Server +# + +PATH_TO_TOP = ../../reactos + +TARGET_TYPE = program + +TARGET_APPTYPE = native + +TARGET_NAME = vmsss + +TARGET_SDKLIBS = ntdll.a smdll.a + +TARGET_CFLAGS = -Iinclude -I../include + +TARGET_OBJECTS = vmsss.o init.o server.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/rossubsys/vms/server/server.c b/rossubsys/vms/server/server.c new file mode 100644 index 00000000000..3ef07e8a44a --- /dev/null +++ b/rossubsys/vms/server/server.c @@ -0,0 +1,90 @@ +/* $Id$ + * + * server.c - VMS Enviroment Subsystem Server - Initialization + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software 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 software 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 software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include "vmssrv.h" + +//#define NDEBUG +#include + +HANDLE VmsApiPort = NULL; + +/********************************************************************** + * NAME PRIVATE + * VmsApiNull/2 + */ +NTSTATUS NTAPI VmsApiNull (IN OUT PCSR_API_MESSAGE ApiMessage, + IN OUT PULONG Reply) +{ + DPRINT("VMSSRV: %s called\n", __FUNCTION__); + + *Reply = 0; + return STATUS_SUCCESS; +} + +PCSR_API_ROUTINE VmsServerApiDispatchTable [1] = +{ + VmsApiNull +}; + +BOOLEAN VmsServerApiValidTable [1] = +{ + TRUE +}; + +PCHAR VmsServerApiNameTable [1] = +{ + "Null", +}; + +/*===================================================================== + * PUBLIC API + *===================================================================*/ + +NTSTATUS NTAPI ServerDllInitialization (PCSR_SERVER_DLL LoadedServerDll) +{ + NTSTATUS Status = STATUS_SUCCESS; + + DPRINT("VMSSRV: %s called\n", __FUNCTION__); + + // Get the listening port from csrsrv.dll + VmsApiPort = CsrQueryApiPort (); + if (NULL == VmsApiPort) + { + Status = STATUS_UNSUCCESSFUL; + } else { + // Set CSR information + LoadedServerDll->ApiBase = 0; + LoadedServerDll->HighestApiSupported = 0; + LoadedServerDll->DispatchTable = VmsServerApiDispatchTable; + LoadedServerDll->ValidTable = VmsServerApiValidTable; + LoadedServerDll->NameTable = VmsServerApiNameTable; + LoadedServerDll->SizeOfProcessData = 0; + LoadedServerDll->ConnectCallback = NULL; + LoadedServerDll->DisconnectCallback = NULL; + } + return Status; +} + +/* EOF */ diff --git a/rossubsys/vms/server/vmssrv.def b/rossubsys/vms/server/vmssrv.def new file mode 100644 index 00000000000..eba427ccc8f --- /dev/null +++ b/rossubsys/vms/server/vmssrv.def @@ -0,0 +1,3 @@ +LIBRARY vmssrv.dll +EXPORTS +ServerDllInitialization@4 diff --git a/rossubsys/vms/server/vmssrv.h b/rossubsys/vms/server/vmssrv.h new file mode 100644 index 00000000000..d1e73118984 --- /dev/null +++ b/rossubsys/vms/server/vmssrv.h @@ -0,0 +1,13 @@ +#ifndef _VMSSS_H_INCLUDED_ +#define _VMSSS_H_INCLUDED_ + +/* PSDK/NDK Headers */ +#include +#include + +#define NTOS_MODE_USER +#include + +#include + +#endif /* ndef _VMSSS_H_INCLUDED_ */ diff --git a/rossubsys/vms/server/vmssrv.rc b/rossubsys/vms/server/vmssrv.rc new file mode 100644 index 00000000000..bac7382b57d --- /dev/null +++ b/rossubsys/vms/server/vmssrv.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS/VMS Environment Subsystem Server\0" +#define REACTOS_STR_INTERNAL_NAME "vmssrv\0" +#define REACTOS_STR_ORIGINAL_FILENAME "vmssrv.dll\0" +#include diff --git a/rossubsys/vms/server/vmssrv.xml b/rossubsys/vms/server/vmssrv.xml new file mode 100644 index 00000000000..3e2efe903f7 --- /dev/null +++ b/rossubsys/vms/server/vmssrv.xml @@ -0,0 +1,11 @@ + + + . + + + ntdll + csrsrv + dllmain.c + server.c + vmssrv.rc + diff --git a/rossubsys/vms/tools/directory.xml b/rossubsys/vms/tools/directory.xml new file mode 100644 index 00000000000..fc962ed2317 --- /dev/null +++ b/rossubsys/vms/tools/directory.xml @@ -0,0 +1,3 @@ + + + diff --git a/rossubsys/vms/tools/mksystab/mksystab.xml b/rossubsys/vms/tools/mksystab/mksystab.xml new file mode 100644 index 00000000000..e69de29bb2d From d010ffc7dfbb7b063dc7c978804c3d0e8863272f Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 23 Nov 2014 15:49:24 +0000 Subject: [PATCH 35/50] [NTFS] - In NtfsQueryDirectory(), don't upcase name in dir search pattern, it can conflict with POSIX names. - In CompareFileName(), handle the fact that for Win32 & DOS we do case insensitive comparisons by upcasing name before match. Don't do it for POSIX names! This fixes name completion in cmd for POSIX. And doesn't break it for Win32 :-). svn path=/trunk/; revision=65462 --- reactos/drivers/filesystems/ntfs/dirctl.c | 9 +-------- reactos/drivers/filesystems/ntfs/mft.c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/dirctl.c b/reactos/drivers/filesystems/ntfs/dirctl.c index ddf5662e80d..60c59a81566 100644 --- a/reactos/drivers/filesystems/ntfs/dirctl.c +++ b/reactos/drivers/filesystems/ntfs/dirctl.c @@ -348,14 +348,7 @@ NtfsQueryDirectory(PNTFS_IRP_CONTEXT IrpContext) return STATUS_INSUFFICIENT_RESOURCES; } - Status = RtlUpcaseUnicodeString(&Pattern, SearchPattern, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("RtlUpcaseUnicodeString('%wZ') failed with status 0x%08lx\n", &Pattern, Status); - ExFreePoolWithTag(Ccb->DirectorySearchPattern, TAG_NTFS); - Ccb->DirectorySearchPattern = NULL; - return Status; - } + memcpy(Ccb->DirectorySearchPattern, SearchPattern->Buffer, SearchPattern->Length); Ccb->DirectorySearchPattern[SearchPattern->Length / sizeof(WCHAR)] = 0; } } diff --git a/reactos/drivers/filesystems/ntfs/mft.c b/reactos/drivers/filesystems/ntfs/mft.c index 3e83fe8efaa..3a3f00e0ab9 100644 --- a/reactos/drivers/filesystems/ntfs/mft.c +++ b/reactos/drivers/filesystems/ntfs/mft.c @@ -466,6 +466,7 @@ CompareFileName(PUNICODE_STRING FileName, PINDEX_ENTRY_ATTRIBUTE IndexEntry, BOOLEAN DirSearch) { + BOOLEAN Ret, Alloc = FALSE; UNICODE_STRING EntryName; EntryName.Buffer = IndexEntry->FileName.Name; @@ -474,7 +475,25 @@ CompareFileName(PUNICODE_STRING FileName, if (DirSearch) { - return FsRtlIsNameInExpression(FileName, &EntryName, (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX), NULL); + UNICODE_STRING IntFileName; + if (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX) + { + ASSERT(NT_SUCCESS(RtlUpcaseUnicodeString(&IntFileName, FileName, TRUE))); + Alloc = TRUE; + } + else + { + IntFileName = *FileName; + } + + Ret = FsRtlIsNameInExpression(&IntFileName, &EntryName, (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX), NULL); + + if (Alloc) + { + RtlFreeUnicodeString(&IntFileName); + } + + return Ret; } else { From d35b779e4841f3d7a8f5a848021d06c3888c3291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 15:50:49 +0000 Subject: [PATCH 36/50] [WINSRV]: Pave the way for proper ReactOS shutdown. Part 1/X CORE-8322 svn path=/trunk/; revision=65463 --- reactos/win32ss/user/winsrv/consrv.cmake | 1 + reactos/win32ss/user/winsrv/consrv/console.c | 2 - reactos/win32ss/user/winsrv/consrv/consrv.h | 27 ++++----- reactos/win32ss/user/winsrv/consrv/init.c | 2 +- reactos/win32ss/user/winsrv/consrv/shutdown.c | 56 +++++++++++++++++++ reactos/win32ss/user/winsrv/winsrv.h | 42 ++++++++++++++ 6 files changed, 112 insertions(+), 18 deletions(-) create mode 100644 reactos/win32ss/user/winsrv/consrv/shutdown.c create mode 100644 reactos/win32ss/user/winsrv/winsrv.h diff --git a/reactos/win32ss/user/winsrv/consrv.cmake b/reactos/win32ss/user/winsrv/consrv.cmake index 0f5545cc0e8..0f1109cc008 100644 --- a/reactos/win32ss/user/winsrv/consrv.cmake +++ b/reactos/win32ss/user/winsrv/consrv.cmake @@ -16,6 +16,7 @@ list(APPEND CONSRV_SOURCE consrv/lineinput.c consrv/popup.c consrv/settings.c + consrv/shutdown.c consrv/subsysreg.c consrv/condrv/coninput.c consrv/condrv/conoutput.c diff --git a/reactos/win32ss/user/winsrv/consrv/console.c b/reactos/win32ss/user/winsrv/consrv/console.c index 6e342e9a9e0..e48c487c6bf 100644 --- a/reactos/win32ss/user/winsrv/consrv/console.c +++ b/reactos/win32ss/user/winsrv/consrv/console.c @@ -12,8 +12,6 @@ #include "consrv.h" -#include - /* This is for COM usage */ #define COBJMACROS #include diff --git a/reactos/win32ss/user/winsrv/consrv/consrv.h b/reactos/win32ss/user/winsrv/consrv/consrv.h index 0b57e2ea230..869cb45c62d 100644 --- a/reactos/win32ss/user/winsrv/consrv/consrv.h +++ b/reactos/win32ss/user/winsrv/consrv/consrv.h @@ -9,31 +9,21 @@ #ifndef __CONSRV_H__ #define __CONSRV_H__ +/* Main header */ +#include "../winsrv.h" + /* PSDK/NDK Headers */ -#include #define WIN32_NO_STATUS #define _INC_WINDOWS #define COM_NO_WINDOWS_H -#include -#include + #include #include #include -#include + #define NTOS_MODE_USER #include #include -#include -#include - -/* Public Win32K Headers */ -#include - -/* PSEH for SEH Support */ -#include - -/* CSRSS Header */ -#include /* CONSOLE Headers */ #include @@ -82,4 +72,11 @@ typedef struct _CONSOLE_PROCESS_DATA #include "handle.h" #include "lineinput.h" +/* shutdown.c */ +ULONG +NTAPI +ConsoleClientShutdown(IN PCSR_PROCESS CsrProcess, + IN ULONG Flags, + IN BOOLEAN FirstPhase); + #endif /* __CONSRV_H__ */ diff --git a/reactos/win32ss/user/winsrv/consrv/init.c b/reactos/win32ss/user/winsrv/consrv/init.c index 3cd60cef013..9c619b0e64c 100644 --- a/reactos/win32ss/user/winsrv/consrv/init.c +++ b/reactos/win32ss/user/winsrv/consrv/init.c @@ -548,7 +548,7 @@ CSR_SERVER_DLL_INIT(ConServerDllInitialization) LoadedServerDll->DisconnectCallback = ConSrvDisconnect; LoadedServerDll->NewProcessCallback = ConSrvNewProcess; // LoadedServerDll->HardErrorCallback = ConSrvHardError; - LoadedServerDll->ShutdownProcessCallback = NULL; + LoadedServerDll->ShutdownProcessCallback = ConsoleClientShutdown; ConSrvDllInstance = LoadedServerDll->ServerHandle; diff --git a/reactos/win32ss/user/winsrv/consrv/shutdown.c b/reactos/win32ss/user/winsrv/consrv/shutdown.c new file mode 100644 index 00000000000..4b212452840 --- /dev/null +++ b/reactos/win32ss/user/winsrv/consrv/shutdown.c @@ -0,0 +1,56 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Console Server DLL + * FILE: win32ss/user/winsrv/consrv/shutdown.c + * PURPOSE: Processes Shutdown + * PROGRAMMERS: Alex Ionescu + */ + +/* INCLUDES *******************************************************************/ + +#include "consrv.h" + +#define NDEBUG +#include + +/* FUNCTIONS ******************************************************************/ + +// NOTE: See http://blogs.msdn.com/b/ntdebugging/archive/2007/06/09/how-windows-shuts-down.aspx +ULONG +NTAPI +ConsoleClientShutdown(IN PCSR_PROCESS CsrProcess, + IN ULONG Flags, + IN BOOLEAN FirstPhase) +{ + PCONSOLE_PROCESS_DATA ProcessData = ConsoleGetPerProcessData(CsrProcess); + + if ( ProcessData->ConsoleHandle != NULL || + ProcessData->HandleTable != NULL ) + { + DPRINT1("ConsoleClientShutdown(0x%p, 0x%x, %s) - Console process [0x%x, 0x%x]\n", + CsrProcess, Flags, FirstPhase ? "FirstPhase" : "LastPhase", + CsrProcess->ClientId.UniqueProcess, CsrProcess->ClientId.UniqueThread); + + /* We are done with the process itself */ + CsrDereferenceProcess(CsrProcess); + return CsrShutdownCsrProcess; + } + else + { + DPRINT1("ConsoleClientShutdown(0x%p, 0x%x, %s) - Non-console process [0x%x, 0x%x]\n", + CsrProcess, Flags, FirstPhase ? "FirstPhase" : "LastPhase", + CsrProcess->ClientId.UniqueProcess, CsrProcess->ClientId.UniqueThread); + + /* On first pass, ignore the process since the GUI server should take it... */ + if (FirstPhase) return CsrShutdownNonCsrProcess; + + /* ... otherwise, call the generic handler */ + // FIXME: Should call a generic shutdown handler!! + CsrDereferenceProcess(CsrProcess); + return CsrShutdownCsrProcess; + } + + return CsrShutdownNonCsrProcess; +} + +/* EOF */ diff --git a/reactos/win32ss/user/winsrv/winsrv.h b/reactos/win32ss/user/winsrv/winsrv.h new file mode 100644 index 00000000000..7c3f157d238 --- /dev/null +++ b/reactos/win32ss/user/winsrv/winsrv.h @@ -0,0 +1,42 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS User API Server DLL + * FILE: win32ss/user/winsrv/winsrv.h + * PURPOSE: Main header - Definitions + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +#ifndef __WINSRV_H__ +#define __WINSRV_H__ + +#include + +/* PSDK/NDK Headers */ + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include +#include +#include +#include +/* Undocumented user definitions */ +#include + +#define NTOS_MODE_USER +#include +#include +#include +#include + +/* Public Win32K Headers */ +#include + +/* PSEH for SEH Support */ +#include + +/* CSRSS Header */ +#include + +#endif /* __WINSRV_H__ */ From 72074af697da394ca8d43f6704a12b2edb57dece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 15:57:13 +0000 Subject: [PATCH 37/50] Whitespace fixes. svn path=/trunk/; revision=65464 --- reactos/ntoskrnl/po/poshtdwn.c | 6 +++--- reactos/ntoskrnl/po/power.c | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/po/poshtdwn.c b/reactos/ntoskrnl/po/poshtdwn.c index 0dbd3772938..f32adaa4cdf 100644 --- a/reactos/ntoskrnl/po/poshtdwn.c +++ b/reactos/ntoskrnl/po/poshtdwn.c @@ -277,9 +277,9 @@ PopGracefulShutdown(IN PVOID Context) /* Note that modified pages should be written here (MiShutdownSystem) */ #ifdef NEWCC - /* Flush all user files before we start shutting down IO */ - /* This is where modified pages are written back by the IO manager */ - CcShutdownSystem(); + /* Flush all user files before we start shutting down IO */ + /* This is where modified pages are written back by the IO manager */ + CcShutdownSystem(); #endif /* In this step, the I/O manager does last-chance shutdown notification */ diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index 758eb9de437..6bccb3e045b 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -682,7 +682,8 @@ NtPowerInformation(IN POWER_INFORMATION_LEVEL PowerInformationLevel, Status = STATUS_SUCCESS; break; } - case SystemPowerCapabilities: + + case SystemPowerCapabilities: { PSYSTEM_POWER_CAPABILITIES PowerCapabilities = (PSYSTEM_POWER_CAPABILITIES)OutputBuffer; @@ -794,8 +795,8 @@ NtSetThreadExecutionState(IN EXECUTION_STATE esFlags, NTSTATUS NTAPI NtSetSystemPowerState(IN POWER_ACTION SystemAction, - IN SYSTEM_POWER_STATE MinSystemState, - IN ULONG Flags) + IN SYSTEM_POWER_STATE MinSystemState, + IN ULONG Flags) { KPROCESSOR_MODE PreviousMode = KeGetPreviousMode(); POP_POWER_ACTION Action = {0}; @@ -834,7 +835,7 @@ NtSetSystemPowerState(IN POWER_ACTION SystemAction, } /* Do it as a kernel-mode caller for consistency with system state */ - return ZwSetSystemPowerState (SystemAction, MinSystemState, Flags); + return ZwSetSystemPowerState(SystemAction, MinSystemState, Flags); } /* Read policy settings (partial shutdown vs. full shutdown) */ From 60205c7b0be21a53d9b9c5ce8ce83f36761b12a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 16:09:00 +0000 Subject: [PATCH 38/50] [WIN32K]: Use the logon process ID instead of a full win32k process object, it simplifies code in some parts. svn path=/trunk/; revision=65465 --- reactos/win32ss/user/ntuser/desktop.c | 2 +- reactos/win32ss/user/ntuser/main.c | 30 ++++++++++++++---------- reactos/win32ss/user/ntuser/simplecall.c | 28 +++++++++------------- reactos/win32ss/user/ntuser/winsta.c | 8 +++---- reactos/win32ss/user/ntuser/winsta.h | 2 +- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/reactos/win32ss/user/ntuser/desktop.c b/reactos/win32ss/user/ntuser/desktop.c index 37357ac4d51..857da893f0d 100644 --- a/reactos/win32ss/user/ntuser/desktop.c +++ b/reactos/win32ss/user/ntuser/desktop.c @@ -1701,7 +1701,7 @@ NtUserSwitchDesktop(HDESK hdesk) * is the logon application itself */ if((pdesk->rpwinstaParent->Flags & WSS_LOCKED) && - LogonProcess != PsGetCurrentProcessWin32Process()) + gpidLogon != PsGetCurrentProcessId()) { ObDereferenceObject(pdesk); ERR("Switching desktop 0x%p denied because the window station is locked!\n", hdesk); diff --git a/reactos/win32ss/user/ntuser/main.c b/reactos/win32ss/user/ntuser/main.c index bfc68de9d16..44648aa8c19 100644 --- a/reactos/win32ss/user/ntuser/main.c +++ b/reactos/win32ss/user/ntuser/main.c @@ -213,10 +213,8 @@ DestroyProcessInfo(PEPROCESS Process) /* * Deregister logon application automatically */ - if(LogonProcess == ppiCurrent) - { - LogonProcess = NULL; - } + if (gpidLogon == ppiCurrent->peProcess->UniqueProcessId) + gpidLogon = 0; /* Close the current window station */ UserSetProcessWindowStation(NULL); @@ -409,7 +407,7 @@ UserCreateThreadInfo(struct _ETHREAD *Thread) /* Assign a default window station and desktop to the process */ /* Do not try to open a desktop or window station before winlogon initializes */ - if(ptiCurrent->ppi->hdeskStartup == NULL && LogonProcess != NULL) + if (ptiCurrent->ppi->hdeskStartup == NULL && gpidLogon != 0) { HWINSTA hWinSta = NULL; HDESK hDesk = NULL; @@ -749,17 +747,23 @@ DriverEntry( /* Register Object Manager Callbacks */ CalloutData.ProcessCallout = Win32kProcessCallback; CalloutData.ThreadCallout = Win32kThreadCallback; - CalloutData.WindowStationParseProcedure = IntWinStaObjectParse; - CalloutData.WindowStationDeleteProcedure = IntWinStaObjectDelete; - CalloutData.WindowStationOkToCloseProcedure = IntWinstaOkToClose; - CalloutData.DesktopOkToCloseProcedure = IntDesktopOkToClose; - CalloutData.DesktopDeleteProcedure = IntDesktopObjectDelete; - CalloutData.DesktopCloseProcedure = IntDesktopObjectClose; - CalloutData.DesktopOpenProcedure = IntDesktopObjectOpen; + // CalloutData.GlobalAtomTableCallout = NULL; + // CalloutData.PowerEventCallout = NULL; + // CalloutData.PowerStateCallout = NULL; + // CalloutData.JobCallout = NULL; CalloutData.BatchFlushRoutine = NtGdiFlushUserBatch; + CalloutData.DesktopOpenProcedure = IntDesktopObjectOpen; + CalloutData.DesktopOkToCloseProcedure = IntDesktopOkToClose; + CalloutData.DesktopCloseProcedure = IntDesktopObjectClose; + CalloutData.DesktopDeleteProcedure = IntDesktopObjectDelete; + CalloutData.WindowStationOkToCloseProcedure = IntWinstaOkToClose; + // CalloutData.WindowStationCloseProcedure = NULL; + CalloutData.WindowStationDeleteProcedure = IntWinStaObjectDelete; + CalloutData.WindowStationParseProcedure = IntWinStaObjectParse; + // CalloutData.WindowStationOpenProcedure = NULL; /* Register our per-process and per-thread structures. */ - PsEstablishWin32Callouts((PWIN32_CALLOUTS_FPNS)&CalloutData); + PsEstablishWin32Callouts(&CalloutData); /* Register service hook callbacks */ #if DBG diff --git a/reactos/win32ss/user/ntuser/simplecall.c b/reactos/win32ss/user/ntuser/simplecall.c index 7996c9f4fed..3bcb5aaeec7 100644 --- a/reactos/win32ss/user/ntuser/simplecall.c +++ b/reactos/win32ss/user/ntuser/simplecall.c @@ -12,8 +12,8 @@ DBG_DEFAULT_CHANNEL(UserMisc); -/* registered Logon process */ -PPROCESSINFO LogonProcess = NULL; +/* Registered logon process ID */ +HANDLE gpidLogon = 0; BOOL FASTCALL co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register) @@ -21,39 +21,34 @@ co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register) NTSTATUS Status; PEPROCESS Process; - Status = PsLookupProcessByProcessId(ProcessId, - &Process); + Status = PsLookupProcessByProcessId(ProcessId, &Process); if (!NT_SUCCESS(Status)) { EngSetLastError(RtlNtStatusToDosError(Status)); return FALSE; } + ProcessId = Process->UniqueProcessId; + + ObDereferenceObject(Process); + if (Register) { /* Register the logon process */ - if (LogonProcess != NULL) - { - ObDereferenceObject(Process); + if (gpidLogon != 0) return FALSE; - } - LogonProcess = (PPROCESSINFO)Process->Win32Process; + gpidLogon = ProcessId; } else { /* Deregister the logon process */ - if (LogonProcess != (PPROCESSINFO)Process->Win32Process) - { - ObDereferenceObject(Process); + if (gpidLogon != ProcessId) return FALSE; - } - LogonProcess = NULL; + gpidLogon = 0; } - ObDereferenceObject(Process); - return TRUE; } @@ -451,7 +446,6 @@ NtUserCallTwoParam( STUB RETURN( 0); - case TWOPARAM_ROUTINE_SETCARETPOS: RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2)); diff --git a/reactos/win32ss/user/ntuser/winsta.c b/reactos/win32ss/user/ntuser/winsta.c index 8fcc7b7a9a2..7782bd88c71 100644 --- a/reactos/win32ss/user/ntuser/winsta.c +++ b/reactos/win32ss/user/ntuser/winsta.c @@ -947,7 +947,7 @@ NtUserLockWindowStation(HWINSTA hWindowStation) TRACE("About to set process window station with handle (%p)\n", hWindowStation); - if(PsGetCurrentProcessWin32Process() != LogonProcess) + if (gpidLogon != PsGetCurrentProcessId()) { ERR("Unauthorized process attempted to lock the window station!\n"); EngSetLastError(ERROR_ACCESS_DENIED); @@ -992,7 +992,7 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation) TRACE("About to set process window station with handle (%p)\n", hWindowStation); - if(PsGetCurrentProcessWin32Process() != LogonProcess) + if (gpidLogon != PsGetCurrentProcessId()) { ERR("Unauthorized process attempted to unlock the window station!\n"); EngSetLastError(ERROR_ACCESS_DENIED); @@ -1338,12 +1338,12 @@ NtUserBuildNameList( BOOL APIENTRY NtUserSetLogonNotifyWindow(HWND hWnd) { - if(LogonProcess != PsGetCurrentProcessWin32Process()) + if (gpidLogon != PsGetCurrentProcessId()) { return FALSE; } - if(!IntIsWindow(hWnd)) + if (!IntIsWindow(hWnd)) { return FALSE; } diff --git a/reactos/win32ss/user/ntuser/winsta.h b/reactos/win32ss/user/ntuser/winsta.h index 04fd0078001..d5922474722 100644 --- a/reactos/win32ss/user/ntuser/winsta.h +++ b/reactos/win32ss/user/ntuser/winsta.h @@ -35,7 +35,7 @@ typedef struct _WINSTATION_OBJECT } WINSTATION_OBJECT, *PWINSTATION_OBJECT; extern WINSTATION_OBJECT *InputWindowStation; -extern PPROCESSINFO LogonProcess; +extern HANDLE gpidLogon; extern HWND hwndSAS; extern UNICODE_STRING gustrWindowStationsDir; From 734795e23e130fceaac746a639f30ead83a3d33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 18:36:25 +0000 Subject: [PATCH 39/50] [TASKMGR] Improve formatting memory size usage in the status bar of Task Manager. Patch by Ismael Ferreras Morezuelas (swyter). CORE-8810 #resolve #comment Committed in r65466, thanks d:^D svn path=/trunk/; revision=65466 --- .../base/applications/taskmgr/CMakeLists.txt | 2 +- .../base/applications/taskmgr/lang/bg-BG.rc | 2 +- .../base/applications/taskmgr/lang/cs-CZ.rc | 2 +- .../base/applications/taskmgr/lang/da-DK.rc | 2 +- .../base/applications/taskmgr/lang/de-DE.rc | 2 +- .../base/applications/taskmgr/lang/el-GR.rc | 2 +- .../base/applications/taskmgr/lang/en-US.rc | 2 +- .../base/applications/taskmgr/lang/es-ES.rc | 2 +- .../base/applications/taskmgr/lang/fr-FR.rc | 2 +- .../base/applications/taskmgr/lang/he-IL.rc | 2 +- .../base/applications/taskmgr/lang/hu-HU.rc | 2 +- .../base/applications/taskmgr/lang/id-ID.rc | 2 +- .../base/applications/taskmgr/lang/it-IT.rc | 2 +- .../base/applications/taskmgr/lang/ja-JP.rc | 2 +- .../base/applications/taskmgr/lang/ko-KR.rc | 2 +- .../base/applications/taskmgr/lang/nl-NL.rc | 2 +- .../base/applications/taskmgr/lang/no-NO.rc | 2 +- .../base/applications/taskmgr/lang/pl-PL.rc | 2 +- .../base/applications/taskmgr/lang/pt-BR.rc | 2 +- .../base/applications/taskmgr/lang/ro-RO.rc | 2 +- .../base/applications/taskmgr/lang/ru-RU.rc | 2 +- .../base/applications/taskmgr/lang/sk-SK.rc | 2 +- .../base/applications/taskmgr/lang/sq-AL.rc | 2 +- .../base/applications/taskmgr/lang/sv-SE.rc | 2 +- .../base/applications/taskmgr/lang/tr-TR.rc | 2 +- .../base/applications/taskmgr/lang/uk-UA.rc | 2 +- .../base/applications/taskmgr/lang/zh-CN.rc | 2 +- .../base/applications/taskmgr/lang/zh-TW.rc | 2 +- reactos/base/applications/taskmgr/perfpage.c | 37 +++++++++++++------ 29 files changed, 54 insertions(+), 39 deletions(-) diff --git a/reactos/base/applications/taskmgr/CMakeLists.txt b/reactos/base/applications/taskmgr/CMakeLists.txt index 959a1aa6ed8..68bae6c0ad1 100644 --- a/reactos/base/applications/taskmgr/CMakeLists.txt +++ b/reactos/base/applications/taskmgr/CMakeLists.txt @@ -23,6 +23,6 @@ list(APPEND SOURCE add_executable(taskmgr ${SOURCE} taskmgr.rc) set_module_type(taskmgr win32gui UNICODE) -add_importlibs(taskmgr advapi32 user32 gdi32 shell32 comctl32 msvcrt kernel32 ntdll) +add_importlibs(taskmgr advapi32 user32 gdi32 shell32 shlwapi comctl32 msvcrt kernel32 ntdll) add_pch(taskmgr precomp.h SOURCE) add_cd_file(TARGET taskmgr DESTINATION reactos/system32 FOR all) diff --git a/reactos/base/applications/taskmgr/lang/bg-BG.rc b/reactos/base/applications/taskmgr/lang/bg-BG.rc index 0c5377e4b0c..3d838d9cf64 100644 --- a/reactos/base/applications/taskmgr/lang/bg-BG.rc +++ b/reactos/base/applications/taskmgr/lang/bg-BG.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Невъзможно намаляване на първенство" IDS_MSG_WARNINGCHANGEPRIORITY "ВНИМАНИЕ: Промяната на първенството на това действие може да\nпричини нежелани последствия, включително неустойчивост на системата. Сигурен ли сте, \nче искате да смените старшинството?" IDS_MSG_TRAYICONCPUUSAGE "Заетост на ЦПУ: %d%%" - IDS_STATUS_MEMUSAGE "Заета памет: %dK / %dK" + IDS_STATUS_MEMUSAGE "Заета памет: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Заетост на ЦПУ: %3d%%" IDS_STATUS_PROCESSES "Действия: %d" IDS_NOT_RESPONDING "Не отговаря" diff --git a/reactos/base/applications/taskmgr/lang/cs-CZ.rc b/reactos/base/applications/taskmgr/lang/cs-CZ.rc index 518b9fe851e..79571b80ae1 100644 --- a/reactos/base/applications/taskmgr/lang/cs-CZ.rc +++ b/reactos/base/applications/taskmgr/lang/cs-CZ.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Není možné změnit prioritu" IDS_MSG_WARNINGCHANGEPRIORITY "Upozornění: Změna priority procesu může\nzpůsobit nestabilitu systému a jiné nepředvídatelné problémy. Jste si jisti\nse změnou priority procesu?" IDS_MSG_TRAYICONCPUUSAGE "Využití CPU: %d%%" - IDS_STATUS_MEMUSAGE "Využití paměti: %dK / %dK" + IDS_STATUS_MEMUSAGE "Využití paměti: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Využití CPU: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" IDS_NOT_RESPONDING "Neodpovídá" diff --git a/reactos/base/applications/taskmgr/lang/da-DK.rc b/reactos/base/applications/taskmgr/lang/da-DK.rc index e3ef07a3e32..a42d42e6cf7 100644 --- a/reactos/base/applications/taskmgr/lang/da-DK.rc +++ b/reactos/base/applications/taskmgr/lang/da-DK.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "CPU Usage: %d%%" - IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" + IDS_STATUS_MEMUSAGE "Mem Usage: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" IDS_NOT_RESPONDING "Not Responding" diff --git a/reactos/base/applications/taskmgr/lang/de-DE.rc b/reactos/base/applications/taskmgr/lang/de-DE.rc index 8365434242a..b1990af826c 100644 --- a/reactos/base/applications/taskmgr/lang/de-DE.rc +++ b/reactos/base/applications/taskmgr/lang/de-DE.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Kann die Priorität nicht ändern" IDS_MSG_WARNINGCHANGEPRIORITY "WARNUNG: Das Ändern der Prioritätsklasse dieses Prozesses\nkann zu unerwünschten Ergebnissen, einschl. Systeminstabilität, führen.\nSind Sie sicher, dass Sie sie ändern möchten?" IDS_MSG_TRAYICONCPUUSAGE "CPU-Auslastung: %d%%" - IDS_STATUS_MEMUSAGE "zugesicherter Speicher: %dK / %dK" + IDS_STATUS_MEMUSAGE "zugesicherter Speicher: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU-Auslastung: %3d%%" IDS_STATUS_PROCESSES "Prozesse: %d" IDS_NOT_RESPONDING "Keine Rückmeldung" diff --git a/reactos/base/applications/taskmgr/lang/el-GR.rc b/reactos/base/applications/taskmgr/lang/el-GR.rc index 0f4d87ea3ba..2aa31e0a8bb 100644 --- a/reactos/base/applications/taskmgr/lang/el-GR.rc +++ b/reactos/base/applications/taskmgr/lang/el-GR.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "CPU Usage: %d%%" - IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" + IDS_STATUS_MEMUSAGE "Mem Usage: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" IDS_NOT_RESPONDING "Not Responding" diff --git a/reactos/base/applications/taskmgr/lang/en-US.rc b/reactos/base/applications/taskmgr/lang/en-US.rc index 920992df94c..010d4ea0e0d 100644 --- a/reactos/base/applications/taskmgr/lang/en-US.rc +++ b/reactos/base/applications/taskmgr/lang/en-US.rc @@ -431,7 +431,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "CPU Usage: %d%%" - IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" + IDS_STATUS_MEMUSAGE "Mem Usage: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" IDS_NOT_RESPONDING "Not Responding" diff --git a/reactos/base/applications/taskmgr/lang/es-ES.rc b/reactos/base/applications/taskmgr/lang/es-ES.rc index 595f1c1a2ba..5dabd18a8c4 100644 --- a/reactos/base/applications/taskmgr/lang/es-ES.rc +++ b/reactos/base/applications/taskmgr/lang/es-ES.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "No se pudo cambiar la prioridad" IDS_MSG_WARNINGCHANGEPRIORITY "Advertencia: El cambio de prioridad en ciertos procesos podría provocar la inestabilidad del sistema.\n¿Seguro que desea cambiar la prioridad?" IDS_MSG_TRAYICONCPUUSAGE "Promedio CPU: %d%%" - IDS_STATUS_MEMUSAGE "Uso de memoria: %dK / %dK" + IDS_STATUS_MEMUSAGE "Uso de memoria: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Uso de CPU: %3d%%" IDS_STATUS_PROCESSES "Procesos: %d" IDS_NOT_RESPONDING "No responde" diff --git a/reactos/base/applications/taskmgr/lang/fr-FR.rc b/reactos/base/applications/taskmgr/lang/fr-FR.rc index aa453bd5439..4d8e64b7f1f 100644 --- a/reactos/base/applications/taskmgr/lang/fr-FR.rc +++ b/reactos/base/applications/taskmgr/lang/fr-FR.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Impossible de changer la priorité" IDS_MSG_WARNINGCHANGEPRIORITY "ATTENTION : Changer la priorité du processus peut causer des\neffets indésirables comme l'instabilité du système.\nÊtes-vous sûr de vouloir changer la priorité ?" IDS_MSG_TRAYICONCPUUSAGE "UC utilisée : %d%%" - IDS_STATUS_MEMUSAGE "Fichier d'échange utilisé : %dK / %dK" + IDS_STATUS_MEMUSAGE "Fichier d'échange utilisé : %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "UC utilisée : %3d%%" IDS_STATUS_PROCESSES "Processus : %d" IDS_NOT_RESPONDING "Ne répond pas" diff --git a/reactos/base/applications/taskmgr/lang/he-IL.rc b/reactos/base/applications/taskmgr/lang/he-IL.rc index 2a706d12a91..6ac0d150129 100644 --- a/reactos/base/applications/taskmgr/lang/he-IL.rc +++ b/reactos/base/applications/taskmgr/lang/he-IL.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "CPU Usage: %d%%" - IDS_STATUS_MEMUSAGE "Mem Usage: %dK / %dK" + IDS_STATUS_MEMUSAGE "Mem Usage: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU Usage: %3d%%" IDS_STATUS_PROCESSES "Processes: %d" IDS_NOT_RESPONDING "Not Responding" diff --git a/reactos/base/applications/taskmgr/lang/hu-HU.rc b/reactos/base/applications/taskmgr/lang/hu-HU.rc index 896f2d51464..2fea5c50c1b 100644 --- a/reactos/base/applications/taskmgr/lang/hu-HU.rc +++ b/reactos/base/applications/taskmgr/lang/hu-HU.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Nem lehetséges a prioritás megváltoztatása" IDS_MSG_WARNINGCHANGEPRIORITY "FIGYELEM: A prioritás megváltoztatása\nkellemetlenségeket, akár rendszer instabilitást is okozhat.\nBiztosan megakarod változtatni a prioritást?" IDS_MSG_TRAYICONCPUUSAGE "CPU használat: %d%%" - IDS_STATUS_MEMUSAGE "Mem használat: %dK / %dK" + IDS_STATUS_MEMUSAGE "Mem használat: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU használat: %3d%%" IDS_STATUS_PROCESSES "Folyamatok: %d" IDS_NOT_RESPONDING "Nem válaszol" diff --git a/reactos/base/applications/taskmgr/lang/id-ID.rc b/reactos/base/applications/taskmgr/lang/id-ID.rc index 2c7f9740f6e..724c5a2e4c3 100644 --- a/reactos/base/applications/taskmgr/lang/id-ID.rc +++ b/reactos/base/applications/taskmgr/lang/id-ID.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "Pemakaian CPU: %d%%" - IDS_STATUS_MEMUSAGE "Pemakaian Mem: %dK / %dK" + IDS_STATUS_MEMUSAGE "Pemakaian Mem: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Pemakaian CPU: %3d%%" IDS_STATUS_PROCESSES "Proses: %d" IDS_NOT_RESPONDING "Tidak Merespon" diff --git a/reactos/base/applications/taskmgr/lang/it-IT.rc b/reactos/base/applications/taskmgr/lang/it-IT.rc index 421ac702d6b..31deb63f22d 100644 --- a/reactos/base/applications/taskmgr/lang/it-IT.rc +++ b/reactos/base/applications/taskmgr/lang/it-IT.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Impossibile cambiare la Priorità" IDS_MSG_WARNINGCHANGEPRIORITY "ATTENZIONE: La modifica della classe di priorità può provocare\n effetti indesiderati compresa la perdita di dati o l'instabilità del sistema.\nSei sicuro di voler procedere?" IDS_MSG_TRAYICONCPUUSAGE "Uso CPU: %d%%" - IDS_STATUS_MEMUSAGE "Uso Mem: %dK / %dK" + IDS_STATUS_MEMUSAGE "Uso Mem: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Uso CPU: %3d%%" IDS_STATUS_PROCESSES "Processi: %d" IDS_NOT_RESPONDING "Non risponde" diff --git a/reactos/base/applications/taskmgr/lang/ja-JP.rc b/reactos/base/applications/taskmgr/lang/ja-JP.rc index c4ce74573a2..6f78c034bfe 100644 --- a/reactos/base/applications/taskmgr/lang/ja-JP.rc +++ b/reactos/base/applications/taskmgr/lang/ja-JP.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "優先度を変更できません" IDS_MSG_WARNINGCHANGEPRIORITY "警告: このプロセスの優先度クラスを変更すると、システムが不安定に\nなるなど、予期しない結果になることがあります。\n優先度クラスを変更しますか?" IDS_MSG_TRAYICONCPUUSAGE "CPU 使用率: %d%%" - IDS_STATUS_MEMUSAGE "メモリ使用量: %dKB / %dKB" + IDS_STATUS_MEMUSAGE "メモリ使用量: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU 使用率: %3d%%" IDS_STATUS_PROCESSES "プロセス: %d" IDS_NOT_RESPONDING "応答なし" diff --git a/reactos/base/applications/taskmgr/lang/ko-KR.rc b/reactos/base/applications/taskmgr/lang/ko-KR.rc index de3236b5959..88d4ec07ebd 100644 --- a/reactos/base/applications/taskmgr/lang/ko-KR.rc +++ b/reactos/base/applications/taskmgr/lang/ko-KR.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "우선 순위를 바꿀 수 없음" IDS_MSG_WARNINGCHANGEPRIORITY "경고: 이 프로세스의 우선 순위 클래스를 변경하면 시스템 불안정을 포함하여\n예기치 않은 결과를 초래할 수도 있습니다.\n우선 순위 클래스를 변경하시겠습니까?" IDS_MSG_TRAYICONCPUUSAGE "CPU 사용: %d%%" - IDS_STATUS_MEMUSAGE "메모리 사용: %dK / %dK" + IDS_STATUS_MEMUSAGE "메모리 사용: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU 사용: %3d%%" IDS_STATUS_PROCESSES "프로세스: %d" IDS_NOT_RESPONDING "응답 없음" diff --git a/reactos/base/applications/taskmgr/lang/nl-NL.rc b/reactos/base/applications/taskmgr/lang/nl-NL.rc index fcc775e1b94..ac7e845fba4 100644 --- a/reactos/base/applications/taskmgr/lang/nl-NL.rc +++ b/reactos/base/applications/taskmgr/lang/nl-NL.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Kan de prioriteit niet wijzigen" IDS_MSG_WARNINGCHANGEPRIORITY "Waarschuwing: het wijzigen van de prioriteitsklasse van dit proces\nkan ongewenste resultaten hebben, zoals een instabiel systeem. Weet u\nzeker dat u de prioriteitsklasse wilt wijzigen?" IDS_MSG_TRAYICONCPUUSAGE "CPU-gebruik: %d%%" - IDS_STATUS_MEMUSAGE "Geheugengebruik: %dK / %dK" + IDS_STATUS_MEMUSAGE "Geheugengebruik: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU-gebruik: %3d%%" IDS_STATUS_PROCESSES "Processen: %d" IDS_NOT_RESPONDING "Reageert niet" diff --git a/reactos/base/applications/taskmgr/lang/no-NO.rc b/reactos/base/applications/taskmgr/lang/no-NO.rc index f5c48ec4bbe..5e785e71c4b 100644 --- a/reactos/base/applications/taskmgr/lang/no-NO.rc +++ b/reactos/base/applications/taskmgr/lang/no-NO.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Ikke i stand til endre prioritet" IDS_MSG_WARNINGCHANGEPRIORITY "ADVARSEL: Endring av prioritet klasse av denne prosess kan\nforutsake uønsket resultat inkluderer systemet kan bli ustabilt. Er du\nsikker på at du vil endre prioritet klassen?" IDS_MSG_TRAYICONCPUUSAGE "Prosessorbruk: %d%%" - IDS_STATUS_MEMUSAGE "Tildelt minne: %dK / %dK" + IDS_STATUS_MEMUSAGE "Tildelt minne: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Prosessorbruk: %3d%%" IDS_STATUS_PROCESSES "Prosesser: %d" IDS_NOT_RESPONDING "Ingen reaksjon" diff --git a/reactos/base/applications/taskmgr/lang/pl-PL.rc b/reactos/base/applications/taskmgr/lang/pl-PL.rc index 7205b00e207..06bf6f4e3b9 100644 --- a/reactos/base/applications/taskmgr/lang/pl-PL.rc +++ b/reactos/base/applications/taskmgr/lang/pl-PL.rc @@ -441,7 +441,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Nie można zmienić priorytetu" IDS_MSG_WARNINGCHANGEPRIORITY "UWAGA: Zmiana priorytetu tego procesu może przynieść\nniepożądane skutki, w tym również niestabilność systemu.\nCzy na pewno chcesz zmieni priorytet?" IDS_MSG_TRAYICONCPUUSAGE "Użycie procesora: %d%%" - IDS_STATUS_MEMUSAGE "Pam. zadeklar.: %dK / %dK" + IDS_STATUS_MEMUSAGE "Pam. zadeklar.: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Użycie procesora: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" IDS_NOT_RESPONDING "Nie odpowiada" diff --git a/reactos/base/applications/taskmgr/lang/pt-BR.rc b/reactos/base/applications/taskmgr/lang/pt-BR.rc index 7c123d7d9d1..a708bd2cedf 100644 --- a/reactos/base/applications/taskmgr/lang/pt-BR.rc +++ b/reactos/base/applications/taskmgr/lang/pt-BR.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Não é possível alterar a prioridade" IDS_MSG_WARNINGCHANGEPRIORITY "AVISO: a alteração da classe de prioridade do processo\npode causar efeitos indesejáveis, inclusive a instabilidade do sistema. Tem\ncerteza de que deseja alterar a classe de prioridade?" IDS_MSG_TRAYICONCPUUSAGE "Uso de CPU: %d%%" - IDS_STATUS_MEMUSAGE "Uso de Memória: %dK / %dK" + IDS_STATUS_MEMUSAGE "Uso de Memória: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Uso de CPU: %3d%%" IDS_STATUS_PROCESSES "Processo: %d" IDS_NOT_RESPONDING "Não respondendo" diff --git a/reactos/base/applications/taskmgr/lang/ro-RO.rc b/reactos/base/applications/taskmgr/lang/ro-RO.rc index e6c2665acb9..9362ceb28df 100644 --- a/reactos/base/applications/taskmgr/lang/ro-RO.rc +++ b/reactos/base/applications/taskmgr/lang/ro-RO.rc @@ -439,7 +439,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Nu se poate schimba prioritatea" IDS_MSG_WARNINGCHANGEPRIORITY "Schimbarea priorității poate duce la efecte colaterale\nprecum instabilitatea sistemului.\nSigur doriți schimbarea priorității procesului?" IDS_MSG_TRAYICONCPUUSAGE "Utilizare procesor: %d%%" - IDS_STATUS_MEMUSAGE "Utilizare memorie: %dko/%dko" + IDS_STATUS_MEMUSAGE "Utilizare memorie: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Utilizare procesor: %3d%%" IDS_STATUS_PROCESSES "Procese: %d" IDS_NOT_RESPONDING "EXECUȚIE ANORMALĂ" diff --git a/reactos/base/applications/taskmgr/lang/ru-RU.rc b/reactos/base/applications/taskmgr/lang/ru-RU.rc index 4fc295e1b22..c1341868987 100644 --- a/reactos/base/applications/taskmgr/lang/ru-RU.rc +++ b/reactos/base/applications/taskmgr/lang/ru-RU.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Не удалось изменить приоритет" IDS_MSG_WARNINGCHANGEPRIORITY "ВНИМАНИЕ: Изменение приоритета этого процесса может привести к нежелательным результатам, в том числе к нестабильной работе системы.\nВы действительно хотите изменить класс приоритета?" IDS_MSG_TRAYICONCPUUSAGE "Загрузка ЦП: %d%%" - IDS_STATUS_MEMUSAGE "Выделение памяти: %dK / %dK" + IDS_STATUS_MEMUSAGE "Выделение памяти: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Загрузка ЦП: %3d%%" IDS_STATUS_PROCESSES "Процессов: %d" IDS_NOT_RESPONDING "Не отвечает" diff --git a/reactos/base/applications/taskmgr/lang/sk-SK.rc b/reactos/base/applications/taskmgr/lang/sk-SK.rc index c7d3268882e..a306b23ce8e 100644 --- a/reactos/base/applications/taskmgr/lang/sk-SK.rc +++ b/reactos/base/applications/taskmgr/lang/sk-SK.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Priorita sa nedá zmeniť." IDS_MSG_WARNINGCHANGEPRIORITY "UPOZORNENIE: Zmena triedy priority procesu môže mať\nnežiadúce dôsledky vrátane nestability systému.\nNaozaj chcete zmeniť triedu priority procesu?" IDS_MSG_TRAYICONCPUUSAGE "Využitie procesora: %d%%" - IDS_STATUS_MEMUSAGE "Využitá pamäť: %dK / %dK" + IDS_STATUS_MEMUSAGE "Využitá pamäť: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Využitie procesora: %3d%%" IDS_STATUS_PROCESSES "Procesy: %d" IDS_NOT_RESPONDING "Neodpovedá" diff --git a/reactos/base/applications/taskmgr/lang/sq-AL.rc b/reactos/base/applications/taskmgr/lang/sq-AL.rc index 5c1c812b896..21b0dae5dfa 100644 --- a/reactos/base/applications/taskmgr/lang/sq-AL.rc +++ b/reactos/base/applications/taskmgr/lang/sq-AL.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "E pamundur ndryshimi i prioritetit" IDS_MSG_WARNINGCHANGEPRIORITY "KUJDES: Ndryshimi i klases se prioritetit te ketij procesi mund te \nsjell rrezultate te padeshirushme ne stabilitetin e sistemit. Jeni i sigurt\nper ndryshimin e klases se prioriteteve?" IDS_MSG_TRAYICONCPUUSAGE "Perdorimi i CPU: %d%%" - IDS_STATUS_MEMUSAGE "Perdorimi i Mem: %dK / %dK" + IDS_STATUS_MEMUSAGE "Perdorimi i Mem: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Perdorimi i CPU: %3d%%" IDS_STATUS_PROCESSES "Proceset: %d" IDS_NOT_RESPONDING "Nuk pergjigjet" diff --git a/reactos/base/applications/taskmgr/lang/sv-SE.rc b/reactos/base/applications/taskmgr/lang/sv-SE.rc index 6d4ed2c758c..a20c225b14e 100644 --- a/reactos/base/applications/taskmgr/lang/sv-SE.rc +++ b/reactos/base/applications/taskmgr/lang/sv-SE.rc @@ -435,7 +435,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Kunde inte ändra prioritet" IDS_MSG_WARNINGCHANGEPRIORITY "VARNING: Ändring av prioritetsklassen hos den här processen kan\norsaka oönskade effekter och påverka systemets stabilitet. Är du\nsäker på att du vill ändra prioritetsklassen?" IDS_MSG_TRAYICONCPUUSAGE "Processoranvändning: %d%%" - IDS_STATUS_MEMUSAGE "Minnesanv: %dK / %dK" + IDS_STATUS_MEMUSAGE "Minnesanv: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Processoranv: %3d%%" IDS_STATUS_PROCESSES "Processer: %d" IDS_NOT_RESPONDING "Svarar inte" diff --git a/reactos/base/applications/taskmgr/lang/tr-TR.rc b/reactos/base/applications/taskmgr/lang/tr-TR.rc index 1e56cbc2467..c414f409f0a 100644 --- a/reactos/base/applications/taskmgr/lang/tr-TR.rc +++ b/reactos/base/applications/taskmgr/lang/tr-TR.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Önceliğin Değiştirilememesi" IDS_MSG_WARNINGCHANGEPRIORITY "UYARI: Bu işlemin öncelik sınıfının değiştirilmesi, dizge\nkararsızlığını içeren istenmeyen sonuçlara neden olabilir. Öncelik \nsınıfını değiştirmek istediğinizden emin misiniz?" IDS_MSG_TRAYICONCPUUSAGE "CPU Kullanımı: %%%d" - IDS_STATUS_MEMUSAGE "Bellek Kullanımı: %d KB / %d KB" + IDS_STATUS_MEMUSAGE "Bellek Kullanımı: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU Kullanımı: %%%3d" IDS_STATUS_PROCESSES "İşlem: %d" IDS_NOT_RESPONDING "Yanıt Vermiyor" diff --git a/reactos/base/applications/taskmgr/lang/uk-UA.rc b/reactos/base/applications/taskmgr/lang/uk-UA.rc index cb6febe53ca..79883af45df 100644 --- a/reactos/base/applications/taskmgr/lang/uk-UA.rc +++ b/reactos/base/applications/taskmgr/lang/uk-UA.rc @@ -433,7 +433,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Неможливо змінити пріоритет" IDS_MSG_WARNINGCHANGEPRIORITY "УВАГА! Зміна класу пріоритету цього процесу може призвести до \nнебажаних наслідків, включаючи нестабільну роботу \nсистеми. Ви дійсно бажаєте змінити пріоритет класу?" IDS_MSG_TRAYICONCPUUSAGE "Використання ЦП: %d%%" - IDS_STATUS_MEMUSAGE "Пам'ять: %dK / %dK" + IDS_STATUS_MEMUSAGE "Пам'ять: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "Використання ЦП: %3d%%" IDS_STATUS_PROCESSES "Процесів: %d" IDS_NOT_RESPONDING "Не відповідає" diff --git a/reactos/base/applications/taskmgr/lang/zh-CN.rc b/reactos/base/applications/taskmgr/lang/zh-CN.rc index 54ba7e466b9..ff773f68285 100644 --- a/reactos/base/applications/taskmgr/lang/zh-CN.rc +++ b/reactos/base/applications/taskmgr/lang/zh-CN.rc @@ -439,7 +439,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "Unable to Change Priority" IDS_MSG_WARNINGCHANGEPRIORITY "WARNING: Changing the priority class of this process may\ncause undesired results including system instability. Are you\nsure you want to change the priority class?" IDS_MSG_TRAYICONCPUUSAGE "CPU 使用情况: %d%%" - IDS_STATUS_MEMUSAGE "内存使用情况: %dK / %dK" + IDS_STATUS_MEMUSAGE "内存使用情况: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU 使用情况: %3d%%" IDS_STATUS_PROCESSES "處理程序: %d" IDS_NOT_RESPONDING "没有回应" diff --git a/reactos/base/applications/taskmgr/lang/zh-TW.rc b/reactos/base/applications/taskmgr/lang/zh-TW.rc index 51c54f82601..6c607ed5db9 100644 --- a/reactos/base/applications/taskmgr/lang/zh-TW.rc +++ b/reactos/base/applications/taskmgr/lang/zh-TW.rc @@ -441,7 +441,7 @@ BEGIN IDS_MSG_UNABLECHANGEPRIORITY "無法更改優先順序" IDS_MSG_WARNINGCHANGEPRIORITY "警告: 更改此程序的優先順序可能導致系統不穩定。\n你是否確定要更改優先順序?" IDS_MSG_TRAYICONCPUUSAGE "CPU 使用情況: %d%%" - IDS_STATUS_MEMUSAGE "記憶體使用情況: %dK / %dK" + IDS_STATUS_MEMUSAGE "記憶體使用情況: %s / %s (%d%%)" IDS_STATUS_CPUUSAGE "CPU 使用情況: %3d%%" IDS_STATUS_PROCESSES "處理程序: %d" IDS_NOT_RESPONDING "沒有回應" diff --git a/reactos/base/applications/taskmgr/perfpage.c b/reactos/base/applications/taskmgr/perfpage.c index b6753127ebd..a14b479decc 100644 --- a/reactos/base/applications/taskmgr/perfpage.c +++ b/reactos/base/applications/taskmgr/perfpage.c @@ -21,6 +21,7 @@ */ #include "precomp.h" +#include TGraphCtrl PerformancePageCpuUsageHistoryGraph; TGraphCtrl PerformancePageMemUsageHistoryGraph; @@ -311,20 +312,20 @@ void RefreshPerformancePage(void) DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) { - ULONG CommitChargeTotal; - ULONG CommitChargeLimit; - ULONG CommitChargePeak; + ULONGLONG CommitChargeTotal; + ULONGLONG CommitChargeLimit; + ULONGLONG CommitChargePeak; ULONG CpuUsage; ULONG CpuKernelUsage; - ULONG KernelMemoryTotal; - ULONG KernelMemoryPaged; - ULONG KernelMemoryNonPaged; + ULONGLONG KernelMemoryTotal; + ULONGLONG KernelMemoryPaged; + ULONGLONG KernelMemoryNonPaged; - ULONG PhysicalMemoryTotal; - ULONG PhysicalMemoryAvailable; - ULONG PhysicalMemorySystemCache; + ULONGLONG PhysicalMemoryTotal; + ULONGLONG PhysicalMemoryAvailable; + ULONGLONG PhysicalMemorySystemCache; ULONG TotalHandles; ULONG TotalThreads; @@ -342,6 +343,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) int nBarsUsed1; int nBarsUsed2; + WCHAR szChargeTotalFormat[256]; + WCHAR szChargeLimitFormat[256]; + /* Wait for an the event or application close */ if (GetMessage(&msg, NULL, 0, 0) <= 0) return 0; @@ -353,14 +357,25 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) */ CommitChargeTotal = PerfDataGetCommitChargeTotalK(); CommitChargeLimit = PerfDataGetCommitChargeLimitK(); - CommitChargePeak = PerfDataGetCommitChargePeakK(); + CommitChargePeak = PerfDataGetCommitChargePeakK(); _ultow(CommitChargeTotal, Text, 10); SetWindowTextW(hPerformancePageCommitChargeTotalEdit, Text); _ultow(CommitChargeLimit, Text, 10); SetWindowTextW(hPerformancePageCommitChargeLimitEdit, Text); _ultow(CommitChargePeak, Text, 10); SetWindowTextW(hPerformancePageCommitChargePeakEdit, Text); - wsprintfW(Text, szMemUsage, CommitChargeTotal, CommitChargeLimit); + + StrFormatByteSizeW(CommitChargeTotal * 1024, + szChargeTotalFormat, + sizeof(szChargeTotalFormat)); + + StrFormatByteSizeW(CommitChargeLimit * 1024, + szChargeLimitFormat, + sizeof(szChargeLimitFormat)); + + wsprintfW(Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat, + (UINT)((CommitChargeTotal * 100) / CommitChargeLimit)); + SendMessageW(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text); /* From 2fb9a4573b802002c6fecda6199491b532170d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 19:16:41 +0000 Subject: [PATCH 40/50] Fixup a potential division by zero (that happens anyway in my tests). svn path=/trunk/; revision=65467 --- reactos/base/applications/taskmgr/perfpage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/applications/taskmgr/perfpage.c b/reactos/base/applications/taskmgr/perfpage.c index a14b479decc..84b4923a6d1 100644 --- a/reactos/base/applications/taskmgr/perfpage.c +++ b/reactos/base/applications/taskmgr/perfpage.c @@ -374,7 +374,7 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) sizeof(szChargeLimitFormat)); wsprintfW(Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat, - (UINT)((CommitChargeTotal * 100) / CommitChargeLimit)); + (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0)); SendMessageW(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text); From 4a61f5ee5b2b4be7352b07d2e951a765c96977f3 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 23 Nov 2014 19:53:16 +0000 Subject: [PATCH 41/50] [NTFS] - Implement NtfsGetPositionInformation(), NtfsGetBasicInformation() - Add a fixme in NtfsGetStandardInformation() regarding the number of links svn path=/trunk/; revision=65468 --- reactos/drivers/filesystems/ntfs/finfo.c | 31 +++++++----------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/finfo.c b/reactos/drivers/filesystems/ntfs/finfo.c index eb91ae9d60f..a1cdad2de0d 100644 --- a/reactos/drivers/filesystems/ntfs/finfo.c +++ b/reactos/drivers/filesystems/ntfs/finfo.c @@ -59,7 +59,7 @@ NtfsGetStandardInformation(PNTFS_FCB Fcb, StandardInfo->AllocationSize = Fcb->RFCB.AllocationSize; StandardInfo->EndOfFile = Fcb->RFCB.FileSize; - StandardInfo->NumberOfLinks = 0; + StandardInfo->NumberOfLinks = 0; /* FIXME */ StandardInfo->DeletePending = FALSE; StandardInfo->Directory = NtfsFCBIsDirectory(Fcb); @@ -75,15 +75,12 @@ NtfsGetPositionInformation(PFILE_OBJECT FileObject, PFILE_POSITION_INFORMATION PositionInfo, PULONG BufferLength) { - UNREFERENCED_PARAMETER(FileObject); - DPRINT("NtfsGetPositionInformation() called\n"); if (*BufferLength < sizeof(FILE_POSITION_INFORMATION)) return STATUS_BUFFER_OVERFLOW; - PositionInfo->CurrentByteOffset.QuadPart = 0; -// FileObject->CurrentByteOffset.QuadPart; + PositionInfo->CurrentByteOffset.QuadPart = FileObject->CurrentByteOffset.QuadPart; DPRINT("Getting position %I64x\n", PositionInfo->CurrentByteOffset.QuadPart); @@ -102,29 +99,19 @@ NtfsGetBasicInformation(PFILE_OBJECT FileObject, PFILE_BASIC_INFORMATION BasicInfo, PULONG BufferLength) { + PFILENAME_ATTRIBUTE FileName = &Fcb->Entry; + DPRINT("NtfsGetBasicInformation() called\n"); if (*BufferLength < sizeof(FILE_BASIC_INFORMATION)) return STATUS_BUFFER_OVERFLOW; -#if 0 - CdfsDateTimeToFileTime(Fcb, - &BasicInfo->CreationTime); - CdfsDateTimeToFileTime(Fcb, - &BasicInfo->LastAccessTime); - CdfsDateTimeToFileTime(Fcb, - &BasicInfo->LastWriteTime); - CdfsDateTimeToFileTime(Fcb, - &BasicInfo->ChangeTime); + BasicInfo->CreationTime.QuadPart = FileName->CreationTime; + BasicInfo->LastAccessTime.QuadPart = FileName->LastAccessTime; + BasicInfo->LastWriteTime.QuadPart = FileName->LastWriteTime; + BasicInfo->ChangeTime.QuadPart = FileName->ChangeTime; - CdfsFileFlagsToAttributes(Fcb, - &BasicInfo->FileAttributes); -#else - UNREFERENCED_PARAMETER(FileObject); - UNREFERENCED_PARAMETER(Fcb); - UNREFERENCED_PARAMETER(DeviceObject); - UNREFERENCED_PARAMETER(BasicInfo); -#endif + NtfsFileFlagsToAttributes(FileName->FileAttributes, &BasicInfo->FileAttributes); *BufferLength -= sizeof(FILE_BASIC_INFORMATION); From f43bb8d7df37433ed1ecd387e5ea383ca23a2212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 20:10:15 +0000 Subject: [PATCH 42/50] [TASKMGR] - Show programs command line in taskmgr. Patch by Ismael Ferreras Morezuelas with minor modifications by me. - int nMaxCount --> ULONG nMaxCount (that makes everything clearer and removes MSVC warnings). CORE-5467 #resolve #comment Feature committed in revision 65469, cheers ;) svn path=/trunk/; revision=65469 --- reactos/base/applications/taskmgr/column.c | 1 + reactos/base/applications/taskmgr/column.h | 4 +- .../base/applications/taskmgr/lang/bg-BG.rc | 2 + .../base/applications/taskmgr/lang/cs-CZ.rc | 2 + .../base/applications/taskmgr/lang/da-DK.rc | 2 + .../base/applications/taskmgr/lang/de-DE.rc | 2 + .../base/applications/taskmgr/lang/el-GR.rc | 2 + .../base/applications/taskmgr/lang/en-US.rc | 2 + .../base/applications/taskmgr/lang/es-ES.rc | 12 +- .../base/applications/taskmgr/lang/fr-FR.rc | 2 + .../base/applications/taskmgr/lang/he-IL.rc | 2 + .../base/applications/taskmgr/lang/hu-HU.rc | 2 + .../base/applications/taskmgr/lang/id-ID.rc | 2 + .../base/applications/taskmgr/lang/it-IT.rc | 2 + .../base/applications/taskmgr/lang/ja-JP.rc | 2 + .../base/applications/taskmgr/lang/ko-KR.rc | 2 + .../base/applications/taskmgr/lang/nl-NL.rc | 2 + .../base/applications/taskmgr/lang/no-NO.rc | 2 + .../base/applications/taskmgr/lang/pl-PL.rc | 2 + .../base/applications/taskmgr/lang/pt-BR.rc | 2 + .../base/applications/taskmgr/lang/ro-RO.rc | 2 + .../base/applications/taskmgr/lang/ru-RU.rc | 2 + .../base/applications/taskmgr/lang/sk-SK.rc | 2 + .../base/applications/taskmgr/lang/sq-AL.rc | 2 + .../base/applications/taskmgr/lang/sv-SE.rc | 2 + .../base/applications/taskmgr/lang/tr-TR.rc | 2 + .../base/applications/taskmgr/lang/uk-UA.rc | 2 + .../base/applications/taskmgr/lang/zh-CN.rc | 2 + .../base/applications/taskmgr/lang/zh-TW.rc | 2 + reactos/base/applications/taskmgr/perfdata.c | 140 +++++++++++++++++- reactos/base/applications/taskmgr/perfdata.h | 20 ++- reactos/base/applications/taskmgr/procpage.c | 18 ++- reactos/base/applications/taskmgr/resource.h | 2 + reactos/base/applications/taskmgr/taskmgr.c | 4 +- 34 files changed, 232 insertions(+), 21 deletions(-) diff --git a/reactos/base/applications/taskmgr/column.c b/reactos/base/applications/taskmgr/column.c index 093f78327c7..71b8db3426f 100644 --- a/reactos/base/applications/taskmgr/column.c +++ b/reactos/base/applications/taskmgr/column.c @@ -54,6 +54,7 @@ const PresetColumnEntry ColumnPresets[COLUMN_NMAX] = { DECLARE_COLUMN_PRESET(IOREADBYTES, 70, FALSE) DECLARE_COLUMN_PRESET(IOWRITEBYTES, 70, FALSE) DECLARE_COLUMN_PRESET(IOOTHERBYTES, 70, FALSE) + DECLARE_COLUMN_PRESET(COMMANDLINE, 450, FALSE) }; static int InsertColumn(int nCol, LPCWSTR lpszColumnHeading, int nFormat, int nWidth, int nSubItem); diff --git a/reactos/base/applications/taskmgr/column.h b/reactos/base/applications/taskmgr/column.h index 9aeb3ec4cfd..a92efa313cf 100644 --- a/reactos/base/applications/taskmgr/column.h +++ b/reactos/base/applications/taskmgr/column.h @@ -47,7 +47,8 @@ #define COLUMN_IOREADBYTES 22 #define COLUMN_IOWRITEBYTES 23 #define COLUMN_IOOTHERBYTES 24 -#define COLUMN_NMAX 25 +#define COLUMN_COMMANDLINE 25 +#define COLUMN_NMAX 26 /* * temporary fix: @@ -104,6 +105,7 @@ extern const PresetColumnEntry ColumnPresets[COLUMN_NMAX]; #define Column_IOWriteBytes Columns[COLUMN_IOWRITEBYTES] #define Column_IOOther Columns[COLUMN_IOOTHER] #define Column_IOOtherBytes Columns[COLUMN_IOOTHERBYTES] +#define Column_CommandLine Columns[COLUMN_COMMANDLINE] void ProcessPage_OnViewSelectColumns(void); void AddColumns(void); diff --git a/reactos/base/applications/taskmgr/lang/bg-BG.rc b/reactos/base/applications/taskmgr/lang/bg-BG.rc index 3d838d9cf64..9a381020513 100644 --- a/reactos/base/applications/taskmgr/lang/bg-BG.rc +++ b/reactos/base/applications/taskmgr/lang/bg-BG.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "В/И байтове за писане", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 125, 127, 65, 10 CONTROL "Други В/И", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 125, 138, 115, 10 CONTROL "Други В/И байтове", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 125, 149, 115, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 125, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "В/И прочетени байтове" IDS_TAB_IOWRITESBYTES "В/И записани байтове" IDS_TAB_IOOTHERBYTES "В/И други байтове" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Избор на стълбове..." IDS_MENU_16BITTASK "&Показване на 16битови задачи" IDS_MENU_WINDOWS "&Прозорци" diff --git a/reactos/base/applications/taskmgr/lang/cs-CZ.rc b/reactos/base/applications/taskmgr/lang/cs-CZ.rc index 79571b80ae1..ac024b8a1f0 100644 --- a/reactos/base/applications/taskmgr/lang/cs-CZ.rc +++ b/reactos/base/applications/taskmgr/lang/cs-CZ.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "I/O zapsané bajty", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 72, 10 CONTROL "I/O ostatní", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 48, 10 CONTROL "I/O ostatní bajty", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O přečtené bajty" IDS_TAB_IOWRITESBYTES "I/O zapsané bajty" IDS_TAB_IOOTHERBYTES "I/O ostatní bajty" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Vybrat sloupce..." IDS_MENU_16BITTASK "&Zobrazit 16-bitové úlohy" IDS_MENU_WINDOWS "&Okna" diff --git a/reactos/base/applications/taskmgr/lang/da-DK.rc b/reactos/base/applications/taskmgr/lang/da-DK.rc index a42d42e6cf7..26dbe41e104 100644 --- a/reactos/base/applications/taskmgr/lang/da-DK.rc +++ b/reactos/base/applications/taskmgr/lang/da-DK.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "I/O Skrevet Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O Andet", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Andre Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Select Columns..." IDS_MENU_16BITTASK "&Show 16-bit tasks" IDS_MENU_WINDOWS "&Windows" diff --git a/reactos/base/applications/taskmgr/lang/de-DE.rc b/reactos/base/applications/taskmgr/lang/de-DE.rc index b1990af826c..bc4cd00169b 100644 --- a/reactos/base/applications/taskmgr/lang/de-DE.rc +++ b/reactos/base/applications/taskmgr/lang/de-DE.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "E/A-Bytes (Schreiben)", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 127, 105, 10 // 107 CONTROL "E/A (Andere)", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 138, 105, 10 // 107 CONTROL "E/A-Bytes (Andere)", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 149, 110, 10 // 107 + CONTROL "Befeh&lszeile", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 160, 65, 10 // 107 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "E/A-Bytes (Lesen)" IDS_TAB_IOWRITESBYTES "E/A-Bytes (Schreiben)" IDS_TAB_IOOTHERBYTES "E/A-Bytes (Andere)" + IDS_TAB_COMMANDLINE "Befehlszeile" IDS_MENU_SELECTCOLUMNS "&Spalten auswählen..." IDS_MENU_16BITTASK "&16-Bit-Tasks anzeigen" IDS_MENU_WINDOWS "&Fenster" diff --git a/reactos/base/applications/taskmgr/lang/el-GR.rc b/reactos/base/applications/taskmgr/lang/el-GR.rc index 2aa31e0a8bb..7a65c88db56 100644 --- a/reactos/base/applications/taskmgr/lang/el-GR.rc +++ b/reactos/base/applications/taskmgr/lang/el-GR.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O Write Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O Other", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Other Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Select Columns..." IDS_MENU_16BITTASK "&Show 16-bit tasks" IDS_MENU_WINDOWS "&Windows" diff --git a/reactos/base/applications/taskmgr/lang/en-US.rc b/reactos/base/applications/taskmgr/lang/en-US.rc index 010d4ea0e0d..d25de52cf73 100644 --- a/reactos/base/applications/taskmgr/lang/en-US.rc +++ b/reactos/base/applications/taskmgr/lang/en-US.rc @@ -313,6 +313,7 @@ BEGIN CONTROL "I/O Write Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O Other", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Other Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -408,6 +409,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Select Columns..." IDS_MENU_16BITTASK "&Show 16-bit tasks" IDS_MENU_WINDOWS "&Windows" diff --git a/reactos/base/applications/taskmgr/lang/es-ES.rc b/reactos/base/applications/taskmgr/lang/es-ES.rc index 5dabd18a8c4..768703c8f20 100644 --- a/reactos/base/applications/taskmgr/lang/es-ES.rc +++ b/reactos/base/applications/taskmgr/lang/es-ES.rc @@ -292,7 +292,7 @@ BEGIN DEFPUSHBUTTON "Aceptar", IDOK, 126, 178, 50, 14 // 84 PUSHBUTTON "Cancelar", IDCANCEL, 180, 178, 50, 14 // 138 LTEXT "Seleccione las columnas que aparecerán en la página de Procesos del Administrador de tareas.", IDC_STATIC, 7, 7, 221, 17 // 181 - CONTROL "Nombre de ruta de la &imagen", IDC_IMAGENAME, "Button", BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP, 7, 28, 88, 10 // 56 + CONTROL "Nombre de ruta de la &imagen", IDC_IMAGENAME, "Button", BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP, 7, 28, 105, 10 // 56 CONTROL "Identificador de proceso (&PID)", IDC_PID, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 39, 120, 10 // 88 CONTROL "Uso de &CPU", IDC_CPUUSAGE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 50, 53, 10 CONTROL "Ti&empo de CPU", IDC_CPUTIME, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 61, 65, 10 // 48 @@ -301,8 +301,8 @@ BEGIN CONTROL "Uso má&ximo de la memoria", IDC_PEAKMEMORYUSAGE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 94, 120, 10 // 82 CONTROL "Err&ores de página", IDC_PAGEFAULTS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 105, 80, 10 // 53 CONTROL "O&bjetos de USUARIO", IDC_USEROBJECTS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 116, 80, 10 // 62 - CONTROL "Lecturas de E/S", IDC_IOREADS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 127, 60, 10 // 49 - CONTROL "Bytes de lectura de E/S", IDC_IOREADBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 138, 65, 10 + CONTROL "Lecturas de E/S", IDC_IOREADS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 127, 70, 10 // 49 + CONTROL "Bytes de lectura de E/S", IDC_IOREADBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 138, 85, 10 CONTROL "I&d. de sesión", IDC_SESSIONID, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 149, 65, 10 // 50 CONTROL "&Nombre de usuario", IDC_USERNAME, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 7, 160, 75, 10 // 51 CONTROL "Diferencia de erro&res de página", IDC_PAGEFAULTSDELTA, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 28, 120, 10 // 107, 60 @@ -310,13 +310,14 @@ BEGIN CONTROL "B&loque paginado", IDC_PAGEDPOOL, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 50, 67, 10 // 107, 53 CONTROL "Blo&que no paginado", IDC_NONPAGEDPOOL, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 61, 115, 10 // 107 CONTROL "P&rioridad base", IDC_BASEPRIORITY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 72, 80, 10 // 107 - CONTROL "&Recuento de identificadores", IDC_HANDLECOUNT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 83, 59, 10 // 107 - CONTROL "Nú&mero de subprocesos", IDC_THREADCOUNT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 94, 59, 10 // 107 + CONTROL "&Recuento de identificadores", IDC_HANDLECOUNT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 83, 105, 10 // 107 + CONTROL "Nú&mero de subprocesos", IDC_THREADCOUNT, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 94, 85, 10 // 107 CONTROL "Objetos &GDI", IDC_GDIOBJECTS, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 105, 55, 10 // 107 CONTROL "Escrituras de E/S", IDC_IOWRITES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 116, 90, 10 // 107 CONTROL "Bytes de escritura de E/S", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 127, 105, 10 // 107 CONTROL "Otros de E/S", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 138, 60, 10 CONTROL "Otros bytes de E/S", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 149, 75, 10 + CONTROL "&Línea de comandos", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 127, 160, 75, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "Bytes de lectura de E/S" IDS_TAB_IOWRITESBYTES "Bytes de escritura de E/S" IDS_TAB_IOOTHERBYTES "Otros bytes de E/S" + IDS_TAB_COMMANDLINE "Línea de comandos" IDS_MENU_SELECTCOLUMNS "&Seleccionar columnas..." IDS_MENU_16BITTASK "Mos&trar tareas de 16-bit" IDS_MENU_WINDOWS "&Ventanas" diff --git a/reactos/base/applications/taskmgr/lang/fr-FR.rc b/reactos/base/applications/taskmgr/lang/fr-FR.rc index 4d8e64b7f1f..94d3c584a92 100644 --- a/reactos/base/applications/taskmgr/lang/fr-FR.rc +++ b/reactos/base/applications/taskmgr/lang/fr-FR.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "Octets d'écriture E/S", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 129, 127, 108, 10 CONTROL "Autres E/S", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 129, 138, 108, 10 CONTROL "Octets d'autres E/S", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 129, 149, 108, 10 + CONTROL "&Ligne de commande", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 129, 160, 95, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "Octets de lecture E/S" IDS_TAB_IOWRITESBYTES "Octets d'écriture E/S" IDS_TAB_IOOTHERBYTES "Octets d'autres E/S" + IDS_TAB_COMMANDLINE "Ligne de commande" IDS_MENU_SELECTCOLUMNS "&Sélectionner les colonnes..." IDS_MENU_16BITTASK "&Afficher les tâches 16 bits" IDS_MENU_WINDOWS "&Fenêtres" diff --git a/reactos/base/applications/taskmgr/lang/he-IL.rc b/reactos/base/applications/taskmgr/lang/he-IL.rc index 6ac0d150129..518e0b8f9f3 100644 --- a/reactos/base/applications/taskmgr/lang/he-IL.rc +++ b/reactos/base/applications/taskmgr/lang/he-IL.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O Write Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O Other", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Other Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Select Columns..." IDS_MENU_16BITTASK "&Show 16-bit tasks" IDS_MENU_WINDOWS "&Windows" diff --git a/reactos/base/applications/taskmgr/lang/hu-HU.rc b/reactos/base/applications/taskmgr/lang/hu-HU.rc index 2fea5c50c1b..9a429414256 100644 --- a/reactos/base/applications/taskmgr/lang/hu-HU.rc +++ b/reactos/base/applications/taskmgr/lang/hu-HU.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O Írott bájtok", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "Egyéb I/O mûveletek", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "Egyéb I/O mûveletek bájtjai", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Olvasott bájtok" IDS_TAB_IOWRITESBYTES "I/O Írott bájtok" IDS_TAB_IOOTHERBYTES "Egyéb I/O bájtok" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Oszlopok kiválasztása..." IDS_MENU_16BITTASK "&16bites feladatok megjelenítése" IDS_MENU_WINDOWS "&Ablak" diff --git a/reactos/base/applications/taskmgr/lang/id-ID.rc b/reactos/base/applications/taskmgr/lang/id-ID.rc index 724c5a2e4c3..ff67ec3d092 100644 --- a/reactos/base/applications/taskmgr/lang/id-ID.rc +++ b/reactos/base/applications/taskmgr/lang/id-ID.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O Write Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O Other", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Other Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Select Columns..." IDS_MENU_16BITTASK "&Show 16-bit tasks" IDS_MENU_WINDOWS "&Windows" diff --git a/reactos/base/applications/taskmgr/lang/it-IT.rc b/reactos/base/applications/taskmgr/lang/it-IT.rc index 31deb63f22d..a3197c4f0ca 100644 --- a/reactos/base/applications/taskmgr/lang/it-IT.rc +++ b/reactos/base/applications/taskmgr/lang/it-IT.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "Scritture I/O Byte", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 69, 10 CONTROL "Altro I/O", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "Altro I/O Bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "&Linea di comando", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Letture Bytes" IDS_TAB_IOWRITESBYTES "I/O Scritture Bytes" IDS_TAB_IOOTHERBYTES "I/O Altro Bytes" + IDS_TAB_COMMANDLINE "Linea di comando" IDS_MENU_SELECTCOLUMNS "&Selezione Colonne..." IDS_MENU_16BITTASK "&Mostra task 16-bit" IDS_MENU_WINDOWS "&Finestre" diff --git a/reactos/base/applications/taskmgr/lang/ja-JP.rc b/reactos/base/applications/taskmgr/lang/ja-JP.rc index 6f78c034bfe..38be0860eab 100644 --- a/reactos/base/applications/taskmgr/lang/ja-JP.rc +++ b/reactos/base/applications/taskmgr/lang/ja-JP.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "I/O 書き込みバイト数", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O その他", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O その他のバイト数", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O 読み取りバイト数" IDS_TAB_IOWRITESBYTES "I/O 書き込みバイト数" IDS_TAB_IOOTHERBYTES "I/O その他のバイト数" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "列の選択(&S)..." IDS_MENU_16BITTASK "16 ビット タスクの表示(&S)" IDS_MENU_WINDOWS "ウィンドウ(&W)" diff --git a/reactos/base/applications/taskmgr/lang/ko-KR.rc b/reactos/base/applications/taskmgr/lang/ko-KR.rc index 88d4ec07ebd..b54eda8a81a 100644 --- a/reactos/base/applications/taskmgr/lang/ko-KR.rc +++ b/reactos/base/applications/taskmgr/lang/ko-KR.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O 쓰기 바이트", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O 기타", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O 기타 바이트", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O 읽기 바이트" IDS_TAB_IOWRITESBYTES "I/O 쓰기 바이트" IDS_TAB_IOOTHERBYTES "I/O 기타 바이트" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "열 선택(&S)" IDS_MENU_16BITTASK "16비트 작업 보이기(&S)" IDS_MENU_WINDOWS "창(&W)" diff --git a/reactos/base/applications/taskmgr/lang/nl-NL.rc b/reactos/base/applications/taskmgr/lang/nl-NL.rc index ac7e845fba4..ddeb52a0616 100644 --- a/reactos/base/applications/taskmgr/lang/nl-NL.rc +++ b/reactos/base/applications/taskmgr/lang/nl-NL.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "I/O: geschreven bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 117, 127, 100, 10 CONTROL "I/O: overig", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 117, 138, 100, 10 CONTROL "I/O: overige bytes", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 117, 149, 100, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 117, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O: gelezen bytes" IDS_TAB_IOWRITESBYTES "I/O: geschreven bytes" IDS_TAB_IOOTHERBYTES "I/O: overige bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Kolommen selecteren..." IDS_MENU_16BITTASK "16-&bits taken weergeven" IDS_MENU_WINDOWS "&Vensters" diff --git a/reactos/base/applications/taskmgr/lang/no-NO.rc b/reactos/base/applications/taskmgr/lang/no-NO.rc index 5e785e71c4b..1e538c93f6a 100644 --- a/reactos/base/applications/taskmgr/lang/no-NO.rc +++ b/reactos/base/applications/taskmgr/lang/no-NO.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "I/O skrevne byte", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 70, 10 CONTROL "I/O Annet", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Andre byte", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Leser Byte" IDS_TAB_IOWRITESBYTES "I/O Skriver Byte" IDS_TAB_IOOTHERBYTES "I/O Annet Byte" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Velg kolonner..." IDS_MENU_16BITTASK "&Vis 16-biter oppgave" IDS_MENU_WINDOWS "&Vinduer" diff --git a/reactos/base/applications/taskmgr/lang/pl-PL.rc b/reactos/base/applications/taskmgr/lang/pl-PL.rc index 06bf6f4e3b9..a3643c8d086 100644 --- a/reactos/base/applications/taskmgr/lang/pl-PL.rc +++ b/reactos/base/applications/taskmgr/lang/pl-PL.rc @@ -323,6 +323,7 @@ BEGIN CONTROL "Zapisy We/Wy w bajtach", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "Inne We/Wy", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "Inne We/Wy w bajtach", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Linia poleceń", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -418,6 +419,7 @@ BEGIN IDS_TAB_IOREADBYTES "Odczyty We/Wy w bajtach" IDS_TAB_IOWRITESBYTES "Zapisy We/Wy w bajtach" IDS_TAB_IOOTHERBYTES "Inne We/Wy w bajtach" + IDS_TAB_COMMANDLINE "Linia poleceń" IDS_MENU_SELECTCOLUMNS "Wybierz &kolumny..." IDS_MENU_16BITTASK "Pokaż 16-&bitowe zadania" IDS_MENU_WINDOWS "O&kna" diff --git a/reactos/base/applications/taskmgr/lang/pt-BR.rc b/reactos/base/applications/taskmgr/lang/pt-BR.rc index a708bd2cedf..fe940cf563f 100644 --- a/reactos/base/applications/taskmgr/lang/pt-BR.rc +++ b/reactos/base/applications/taskmgr/lang/pt-BR.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "Bytes de gravação de E/S", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 123, 127, 97, 10 CONTROL "Outras E/S", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 123, 138, 47, 10 CONTROL "Outros bytes de E/S", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 123, 149, 77, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 123, 160, 95, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "Bytes de leitura de E/S" IDS_TAB_IOWRITESBYTES "Bytes de gravação de E/S" IDS_TAB_IOOTHERBYTES "Outros Bytes de E/S" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Selecionar colunas..." IDS_MENU_16BITTASK "&Exibir tarefas de 16 bits" IDS_MENU_WINDOWS "&Janelas" diff --git a/reactos/base/applications/taskmgr/lang/ro-RO.rc b/reactos/base/applications/taskmgr/lang/ro-RO.rc index 9362ceb28df..60deced0e79 100644 --- a/reactos/base/applications/taskmgr/lang/ro-RO.rc +++ b/reactos/base/applications/taskmgr/lang/ro-RO.rc @@ -321,6 +321,7 @@ BEGIN CONTROL "In/Ex octeți scriși", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 120, 127, 110, 10 CONTROL "In/Ex altceva", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 120, 138, 110, 10 CONTROL "In/Ex octeți din altceva", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 120, 149, 110, 10 + CONTROL "&Linia de comandă", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 120, 160, 65, 10 END /* String Tables */ @@ -416,6 +417,7 @@ BEGIN IDS_TAB_IOREADBYTES "In/Ex octeți citiți" IDS_TAB_IOWRITESBYTES "In/Ex octeți scriși" IDS_TAB_IOOTHERBYTES "In/Ex octeți din altceva" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Selectare coloane…" IDS_MENU_16BITTASK "Afișează activități pe 16 &biți" IDS_MENU_WINDOWS "F&erestre" diff --git a/reactos/base/applications/taskmgr/lang/ru-RU.rc b/reactos/base/applications/taskmgr/lang/ru-RU.rc index c1341868987..f0018964379 100644 --- a/reactos/base/applications/taskmgr/lang/ru-RU.rc +++ b/reactos/base/applications/taskmgr/lang/ru-RU.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "Записано байт", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "Прочий ввод-вывод", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 90, 10 CONTROL "Прочих байт при вводе-выводе", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 122, 10 + CONTROL "Коммандная строка", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 90, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "Прочитано байт" IDS_TAB_IOWRITESBYTES "Записано байт" IDS_TAB_IOOTHERBYTES "Прочих байт при вводе-выводе" + IDS_TAB_COMMANDLINE "Коммандная строка" IDS_MENU_SELECTCOLUMNS "В&ыбрать столбцы..." IDS_MENU_16BITTASK "&Отображать 16-разрядные задачи" IDS_MENU_WINDOWS "&Окна" diff --git a/reactos/base/applications/taskmgr/lang/sk-SK.rc b/reactos/base/applications/taskmgr/lang/sk-SK.rc index a306b23ce8e..0598c835aa1 100644 --- a/reactos/base/applications/taskmgr/lang/sk-SK.rc +++ b/reactos/base/applications/taskmgr/lang/sk-SK.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "Vstup a výstup - zapísané bajty", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 130, 127, 112, 10 CONTROL "Vstup a výstup - iné", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 130, 138, 77, 10 CONTROL "Vstup a výstup - iné bajty", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 130, 149, 97, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 130, 160, 95, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "Vstup a výstup - prečítané bajty" IDS_TAB_IOWRITESBYTES "Vstup a výstup - zapísané bajty" IDS_TAB_IOOTHERBYTES "Vstup a výstup - iné bajty" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Vybrať stĺpce..." IDS_MENU_16BITTASK "&Zobraziť 16-bitové úlohy" IDS_MENU_WINDOWS "&Okna" diff --git a/reactos/base/applications/taskmgr/lang/sq-AL.rc b/reactos/base/applications/taskmgr/lang/sq-AL.rc index 21b0dae5dfa..5d6196e67d2 100644 --- a/reactos/base/applications/taskmgr/lang/sq-AL.rc +++ b/reactos/base/applications/taskmgr/lang/sq-AL.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "Shkruan I/O Bytes", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O te tjere", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O Byte te tjere", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Lexo Bytes" IDS_TAB_IOWRITESBYTES "I/O Shkruaj Bytes" IDS_TAB_IOOTHERBYTES "I/O te tjere Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "Zgjidh kolonat..." IDS_MENU_16BITTASK "&Shfaq 16-bit tasks" IDS_MENU_WINDOWS "Dritare" diff --git a/reactos/base/applications/taskmgr/lang/sv-SE.rc b/reactos/base/applications/taskmgr/lang/sv-SE.rc index a20c225b14e..4f854368f1c 100644 --- a/reactos/base/applications/taskmgr/lang/sv-SE.rc +++ b/reactos/base/applications/taskmgr/lang/sv-SE.rc @@ -317,6 +317,7 @@ BEGIN CONTROL "I/O, &antal tecken skrivna", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 133, 127, 113, 10 CONTROL "And&ra I/O åtgärder", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 133, 138, 89, 10 CONTROL "Antal tecken, andra I/O åtgärder", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 133, 149, 141, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 133, 160, 95, 10 END /* String Tables */ @@ -412,6 +413,7 @@ BEGIN IDS_TAB_IOREADBYTES "Antal tecken lästa, andra I/O-åtgärder" IDS_TAB_IOWRITESBYTES "Antal tecken skrivna, andra I/O-åtgärder" IDS_TAB_IOOTHERBYTES "I/O, antal tecken" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Välj kolumner..." IDS_MENU_16BITTASK "&Visa 16-bitsprocesser" IDS_MENU_WINDOWS "&Fönster" diff --git a/reactos/base/applications/taskmgr/lang/tr-TR.rc b/reactos/base/applications/taskmgr/lang/tr-TR.rc index c414f409f0a..41deacebe76 100644 --- a/reactos/base/applications/taskmgr/lang/tr-TR.rc +++ b/reactos/base/applications/taskmgr/lang/tr-TR.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "G/Ç Yazma Çokluları", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "G/Ç Başka", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "G/Ç Başka Çoklular", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "G/Ç Okuma Çokluları" IDS_TAB_IOWRITESBYTES "G/Ç Yazma Çokluları" IDS_TAB_IOOTHERBYTES "G/Ç Başka Çoklular" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "&Dikeçleri Seç..." IDS_MENU_16BITTASK "&16 Bitlik Görevleri Göster" IDS_MENU_WINDOWS "&Pencereler" diff --git a/reactos/base/applications/taskmgr/lang/uk-UA.rc b/reactos/base/applications/taskmgr/lang/uk-UA.rc index 79883af45df..370b382a0aa 100644 --- a/reactos/base/applications/taskmgr/lang/uk-UA.rc +++ b/reactos/base/applications/taskmgr/lang/uk-UA.rc @@ -315,6 +315,7 @@ BEGIN CONTROL "Записано байтів", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 67, 10 CONTROL "Інший ввід-вивід", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 71, 10 CONTROL "Інших байтів при вводі-виводі", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 114, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -410,6 +411,7 @@ BEGIN IDS_TAB_IOREADBYTES "Прочитано байтів" IDS_TAB_IOWRITESBYTES "Записано байтів" IDS_TAB_IOOTHERBYTES "Інших байтів під час вводу-виводу" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "В&ибрати стовпці..." IDS_MENU_16BITTASK "&Відображати 16-розрядні завдання" IDS_MENU_WINDOWS "В&ікна" diff --git a/reactos/base/applications/taskmgr/lang/zh-CN.rc b/reactos/base/applications/taskmgr/lang/zh-CN.rc index ff773f68285..d42e0dd0361 100644 --- a/reactos/base/applications/taskmgr/lang/zh-CN.rc +++ b/reactos/base/applications/taskmgr/lang/zh-CN.rc @@ -321,6 +321,7 @@ BEGIN CONTROL "I/O 写入字节", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "I/O 其他", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "I/O 其他字节", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -416,6 +417,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O Read Bytes" IDS_TAB_IOWRITESBYTES "I/O Write Bytes" IDS_TAB_IOOTHERBYTES "I/O Other Bytes" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "选择列(&S)..." IDS_MENU_16BITTASK "显示 16 位任务(&S)" IDS_MENU_WINDOWS "窗口(&W)" diff --git a/reactos/base/applications/taskmgr/lang/zh-TW.rc b/reactos/base/applications/taskmgr/lang/zh-TW.rc index 6c607ed5db9..eb6ee185bff 100644 --- a/reactos/base/applications/taskmgr/lang/zh-TW.rc +++ b/reactos/base/applications/taskmgr/lang/zh-TW.rc @@ -323,6 +323,7 @@ BEGIN CONTROL "I/O 寫入位元組", IDC_IOWRITEBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 127, 65, 10 CONTROL "其他 I/O", IDC_IOOTHER, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 138, 46, 10 CONTROL "其他 I/O 位元組", IDC_IOOTHERBYTES, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 149, 65, 10 + CONTROL "Command &Line", IDC_COMMANDLINE, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 107, 160, 65, 10 END /* String Tables */ @@ -418,6 +419,7 @@ BEGIN IDS_TAB_IOREADBYTES "I/O 讀取位元組" IDS_TAB_IOWRITESBYTES "I/O 寫入位元組" IDS_TAB_IOOTHERBYTES "其他 I/O 位元組" + IDS_TAB_COMMANDLINE "Command Line" IDS_MENU_SELECTCOLUMNS "選擇列(&S)..." IDS_MENU_16BITTASK "顯示 16 位工作(&S)" IDS_MENU_WINDOWS "窗口(&W)" diff --git a/reactos/base/applications/taskmgr/perfdata.c b/reactos/base/applications/taskmgr/perfdata.c index ac23b16c10c..3ecb0d81631 100644 --- a/reactos/base/applications/taskmgr/perfdata.c +++ b/reactos/base/applications/taskmgr/perfdata.c @@ -3,7 +3,8 @@ * * perfdata.c * - * Copyright (C) 1999 - 2001 Brian Palmer + * Copyright (C) 1999 - 2001 Brian Palmer + * Copyright (C) 2014 Ismael Ferreras Morezuelas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,11 +27,12 @@ #include #define NTOS_MODE_USER +#include #include CRITICAL_SECTION PerfDataCriticalSection; PPERFDATA pPerfDataOld = NULL; /* Older perf data (saved to establish delta values) */ -PPERFDATA pPerfData = NULL; /* Most recent copy of perf data */ +PPERFDATA pPerfData = NULL; /* Most recent copy of perf data */ ULONG ProcessCountOld = 0; ULONG ProcessCount = 0; double dbIdleTime; @@ -46,6 +48,10 @@ SYSTEM_HANDLE_INFORMATION SystemHandleInfo; PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorTimeInfo = NULL; PSID SystemUserSid = NULL; +PCMD_LINE_CACHE global_cache = NULL; + +#define CMD_LINE_MIN(a, b) (a < b ? a - sizeof(WCHAR) : b) + typedef struct _SIDTOUSERNAME { LIST_ENTRY List; @@ -371,7 +377,7 @@ void PerfDataRefresh(void) pPerfData[Idx].HandleCount = pSPI->HandleCount; pPerfData[Idx].ThreadCount = pSPI->NumberOfThreads; pPerfData[Idx].SessionId = pSPI->SessionId; - pPerfData[Idx].UserName[0] = L'\0'; + pPerfData[Idx].UserName[0] = UNICODE_NULL; pPerfData[Idx].USERObjectCount = 0; pPerfData[Idx].GDIObjectCount = 0; ProcessUser = SystemUserSid; @@ -472,7 +478,7 @@ ULONG PerfDataGetProcessorSystemUsage(void) return (ULONG)dbKernelTime; } -BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount) +BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount) { BOOL bSuccessful; @@ -504,7 +510,7 @@ ULONG PerfDataGetProcessId(ULONG Index) return ProcessId; } -BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, int nMaxCount) +BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount) { BOOL bSuccessful; @@ -522,6 +528,130 @@ BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, int nMaxCount) return bSuccessful; } +BOOL PerfDataGetCommandLine(ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount) +{ + static const LPWSTR ellipsis = L"..."; + + PROCESS_BASIC_INFORMATION pbi = {0}; + UNICODE_STRING CommandLineStr = {0}; + + PVOID ProcessParams = NULL; + HANDLE hProcess; + ULONG ProcessId; + + NTSTATUS Status; + BOOL result; + + PCMD_LINE_CACHE new_entry; + LPWSTR new_string; + + PCMD_LINE_CACHE cache = global_cache; + + /* [A] Search for a string already in cache? If so, use it */ + while (cache && cache->pnext != NULL) + { + if (cache->idx == Index && cache->str != NULL) + { + /* Found it. Use it, and add some ellipsis at the very end to make it cute */ + wcsncpy(lpCommandLine, cache->str, CMD_LINE_MIN(nMaxCount, cache->len)); + wcscpy(lpCommandLine + CMD_LINE_MIN(nMaxCount, cache->len) - sizeof(ellipsis)/sizeof(WCHAR), ellipsis); + return TRUE; + } + + cache = cache->pnext; + } + + /* [B] We don't; let's allocate and load a value from the process mem... and cache it */ + ProcessId = PerfDataGetProcessId(Index); + + /* Default blank command line in case things don't work out */ + wcsncpy(lpCommandLine, L"", nMaxCount); + + /* Ask for a handle to the target process so that we can read its memory and query stuff */ + hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, ProcessId); + if (!hProcess) + goto cleanup; + + /* First off, get the ProcessEnvironmentBlock location in that process' address space */ + Status = NtQueryInformationProcess(hProcess, 0, &pbi, sizeof(pbi), NULL); + if (!NT_SUCCESS(Status)) + goto cleanup; + + /* Then get the PEB.ProcessParameters member pointer */ + result = ReadProcessMemory(hProcess, + (PVOID)((ULONG_PTR)pbi.PebBaseAddress + FIELD_OFFSET(PEB, ProcessParameters)), + &ProcessParams, + sizeof(ProcessParams), + NULL); + if (!result) + goto cleanup; + + /* Then copy the PEB->ProcessParameters.CommandLine member + to get the pointer to the string buffer and its size */ + result = ReadProcessMemory(hProcess, + (PVOID)((ULONG_PTR)ProcessParams + FIELD_OFFSET(RTL_USER_PROCESS_PARAMETERS, CommandLine)), + &CommandLineStr, + sizeof(CommandLineStr), + NULL); + if (!result) + goto cleanup; + + /* Allocate the next cache entry and its accompanying string in one go */ + new_entry = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(CMD_LINE_CACHE) + CommandLineStr.Length + sizeof(UNICODE_NULL)); + if (!new_entry) + goto cleanup; + + new_string = (LPWSTR)((ULONG_PTR)new_entry + sizeof(CMD_LINE_CACHE)); + + /* Bingo, the command line should be stored there, + copy the string from the other process */ + result = ReadProcessMemory(hProcess, + CommandLineStr.Buffer, + new_string, + CommandLineStr.Length, + NULL); + if (!result) + { + /* Weird, after sucessfully reading the mem of that process + various times it fails now, forget it and bail out */ + HeapFree(GetProcessHeap(), 0, new_entry); + goto cleanup; + } + + /* Add our pointer to the cache... */ + new_entry->idx = Index; + new_entry->str = new_string; + new_entry->len = CommandLineStr.Length; + + if (!global_cache) + global_cache = new_entry; + else + cache->pnext = new_entry; + + /* ... and print the buffer for the first time */ + wcsncpy(lpCommandLine, new_string, CMD_LINE_MIN(nMaxCount, CommandLineStr.Length)); + +cleanup: + if (hProcess) CloseHandle(hProcess); + return TRUE; +} + +void PerfDataDeallocCommandLineCache() +{ + PCMD_LINE_CACHE cache = global_cache; + PCMD_LINE_CACHE cache_old; + + while (cache && cache->pnext != NULL) + { + cache_old = cache; + cache = cache->pnext; + + HeapFree(GetProcessHeap(), 0, cache_old); + } +} + ULONG PerfDataGetSessionId(ULONG Index) { ULONG SessionId; diff --git a/reactos/base/applications/taskmgr/perfdata.h b/reactos/base/applications/taskmgr/perfdata.h index 6bb7005ceaa..51e11f47b2e 100644 --- a/reactos/base/applications/taskmgr/perfdata.h +++ b/reactos/base/applications/taskmgr/perfdata.h @@ -55,19 +55,31 @@ typedef struct _PERFDATA LARGE_INTEGER KernelTime; } PERFDATA, *PPERFDATA; +typedef struct _CMD_LINE_CACHE +{ + DWORD idx; + LPWSTR str; + ULONG len; + struct _CMD_LINE_CACHE* pnext; +} CMD_LINE_CACHE, *PCMD_LINE_CACHE; + BOOL PerfDataInitialize(void); void PerfDataUninitialize(void); void PerfDataRefresh(void); -BOOL PerfDataGet(ULONG Index, PPERFDATA *lppData); -ULONG PerfDataGetProcessIndex(ULONG pid); +BOOL PerfDataGet(ULONG Index, PPERFDATA *lppData); +ULONG PerfDataGetProcessIndex(ULONG pid); ULONG PerfDataGetProcessCount(void); ULONG PerfDataGetProcessorUsage(void); ULONG PerfDataGetProcessorSystemUsage(void); -BOOL PerfDataGetImageName(ULONG Index, LPTSTR lpImageName, int nMaxCount); +BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, ULONG nMaxCount); ULONG PerfDataGetProcessId(ULONG Index); -BOOL PerfDataGetUserName(ULONG Index, LPTSTR lpUserName, int nMaxCount); +BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, ULONG nMaxCount); + +BOOL PerfDataGetCommandLine(ULONG Index, LPWSTR lpCommandLine, ULONG nMaxCount); +void PerfDataDeallocCommandLineCache(); + ULONG PerfDataGetSessionId(ULONG Index); ULONG PerfDataGetCPUUsage(ULONG Index); LARGE_INTEGER PerfDataGetCPUTime(ULONG Index); diff --git a/reactos/base/applications/taskmgr/procpage.c b/reactos/base/applications/taskmgr/procpage.c index 40739e31f5b..35a7b32f0b3 100644 --- a/reactos/base/applications/taskmgr/procpage.c +++ b/reactos/base/applications/taskmgr/procpage.c @@ -52,9 +52,9 @@ void AddProcess(ULONG Index); void UpdateProcesses(); void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds); void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam); -void CommaSeparateNumberString(LPWSTR strNumber, int nMaxCount); +void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount); void ProcessPageShowContextMenu(DWORD dwProcessId); -BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCount); +BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount); DWORD WINAPI ProcessPageRefreshThread(void *lpParameter); int ProcessRunning(ULONG ProcessId); @@ -245,7 +245,7 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam) Index = PerfDataGetProcessIndex(pData->ProcessId); ColumnIndex = pnmdi->item.iSubItem; - PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, pnmdi->item.cchTextMax); + PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, (ULONG)pnmdi->item.cchTextMax); break; @@ -290,7 +290,7 @@ void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam) } } -void CommaSeparateNumberString(LPWSTR strNumber, int nMaxCount) +void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount) { WCHAR temp[260]; UINT i, j, k; @@ -530,7 +530,7 @@ void AddProcess(ULONG Index) } } -BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCount) +BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount) { IO_COUNTERS iocounters; LARGE_INTEGER time; @@ -541,6 +541,8 @@ BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, int nMaxCoun wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_USERNAME) PerfDataGetUserName(Index, lpText, nMaxCount); + if (ColumnDataHints[ColumnIndex] == COLUMN_COMMANDLINE) + PerfDataGetCommandLine(Index, lpText, nMaxCount); if (ColumnDataHints[ColumnIndex] == COLUMN_SESSIONID) wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index)); if (ColumnDataHints[ColumnIndex] == COLUMN_CPUUSAGE) @@ -753,6 +755,12 @@ int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPara PerfDataGetUserName(IndexParam2, text2, sizeof (text2) / sizeof (*text2)); ret = _wcsicmp(text1, text2); } + else if (TaskManagerSettings.SortColumn == COLUMN_COMMANDLINE) + { + PerfDataGetCommandLine(IndexParam1, text1, sizeof (text1) / sizeof (*text1)); + PerfDataGetCommandLine(IndexParam2, text2, sizeof (text2) / sizeof (*text2)); + ret = _wcsicmp(text1, text2); + } else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID) { l1 = PerfDataGetSessionId(IndexParam1); diff --git a/reactos/base/applications/taskmgr/resource.h b/reactos/base/applications/taskmgr/resource.h index 785193b62ab..8aca1bde315 100644 --- a/reactos/base/applications/taskmgr/resource.h +++ b/reactos/base/applications/taskmgr/resource.h @@ -113,6 +113,7 @@ #define IDC_IOOTHERBYTES 1047 #define IDC_CPU_USAGE_GRAPH 1047 #define IDC_CPU29 1048 +#define IDC_COMMANDLINE 1048 #define IDC_MEM_USAGE_GRAPH2 1048 #define IDC_MEM_USAGE_GRAPH 1048 #define IDC_CPU30 1049 @@ -222,6 +223,7 @@ #define IDS_TAB_IOREADBYTES 337 #define IDS_TAB_IOWRITESBYTES 338 #define IDS_TAB_IOOTHERBYTES 339 +#define IDS_TAB_COMMANDLINE 368 #define IDS_MENU_SELECTCOLUMNS 340 #define IDS_MENU_16BITTASK 341 diff --git a/reactos/base/applications/taskmgr/taskmgr.c b/reactos/base/applications/taskmgr/taskmgr.c index 2eb384b6af9..1b8a4b01ff6 100644 --- a/reactos/base/applications/taskmgr/taskmgr.c +++ b/reactos/base/applications/taskmgr/taskmgr.c @@ -480,6 +480,8 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) TaskManagerSettings.Maximized = TRUE; else TaskManagerSettings.Maximized = FALSE; + /* Get rid of the allocated command line cache, if any */ + PerfDataDeallocCommandLineCache(); return DefWindowProcW(hDlg, message, wParam, lParam); case WM_TIMER: @@ -1140,7 +1142,7 @@ LPWSTR GetLastErrorText(LPWSTR lpszBuf, DWORD dwSize) DWORD dwRet; LPWSTR lpszTemp = NULL; - dwRet = FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_ARGUMENT_ARRAY, + dwRet = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY, NULL, GetLastError(), LANG_NEUTRAL, From 1dc01e0746d14fa5100182915e560c8c010297fb Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 23 Nov 2014 20:52:59 +0000 Subject: [PATCH 43/50] [NTFS] - Fix $FILENAME_ATTRIBUTE definition to allow reading reparse points tag - Add missing file attribute (reparse point) svn path=/trunk/; revision=65470 --- reactos/drivers/filesystems/ntfs/ntfs.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 058fbdd8930..f2ee2b62240 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -195,6 +195,7 @@ typedef enum #define NTFS_FILE_TYPE_HIDDEN 0x2 #define NTFS_FILE_TYPE_SYSTEM 0x4 #define NTFS_FILE_TYPE_ARCHIVE 0x20 +#define NTFS_FILE_TYPE_REPARSE 0x400 #define NTFS_FILE_TYPE_COMPRESSED 0x800 #define NTFS_FILE_TYPE_DIRECTORY 0x10000000 @@ -308,7 +309,15 @@ typedef struct ULONGLONG AllocatedSize; ULONGLONG DataSize; ULONG FileAttributes; - ULONG AlignmentOrReserved; + union + { + struct + { + USHORT PackedEaSize; + USHORT AlignmentOrReserved; + } EaInfo; + ULONG ReparseTag; + } Extended; UCHAR NameLength; UCHAR NameType; WCHAR Name[1]; From 398b0a3c4feb9e1e42f163c336121f468129857e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 23 Nov 2014 23:04:45 +0000 Subject: [PATCH 44/50] [CONSRV]: Implement CREATE_NO_WINDOW support. svn path=/trunk/; revision=65471 --- reactos/win32ss/user/winsrv/consrv/console.c | 1 + reactos/win32ss/user/winsrv/consrv/console.h | 1 + .../user/winsrv/consrv/frontends/gui/conwnd.c | 33 ++++- .../user/winsrv/consrv/frontends/gui/conwnd.h | 2 + .../winsrv/consrv/frontends/gui/guiterm.c | 123 ++++++++++++------ reactos/win32ss/user/winsrv/consrv/init.c | 1 + 6 files changed, 117 insertions(+), 44 deletions(-) diff --git a/reactos/win32ss/user/winsrv/consrv/console.c b/reactos/win32ss/user/winsrv/consrv/console.c index e48c487c6bf..5f3853f5a52 100644 --- a/reactos/win32ss/user/winsrv/consrv/console.c +++ b/reactos/win32ss/user/winsrv/consrv/console.c @@ -922,6 +922,7 @@ CSR_API(SrvAllocConsole) /* Initialize the console initialization info structure */ ConsoleInitInfo.ConsoleStartInfo = AllocConsoleRequest->ConsoleStartInfo; + ConsoleInitInfo.IsWindowVisible = TRUE; // The console window is always visible. ConsoleInitInfo.TitleLength = AllocConsoleRequest->TitleLength; ConsoleInitInfo.ConsoleTitle = AllocConsoleRequest->ConsoleTitle; ConsoleInitInfo.DesktopLength = AllocConsoleRequest->DesktopLength; diff --git a/reactos/win32ss/user/winsrv/consrv/console.h b/reactos/win32ss/user/winsrv/consrv/console.h index 7118dffb327..5f6bf9a6777 100644 --- a/reactos/win32ss/user/winsrv/consrv/console.h +++ b/reactos/win32ss/user/winsrv/consrv/console.h @@ -11,6 +11,7 @@ typedef struct _CONSOLE_INIT_INFO { PCONSOLE_START_INFO ConsoleStartInfo; + BOOLEAN IsWindowVisible; ULONG TitleLength; PWCHAR ConsoleTitle; diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c index d8d93ca55f3..2752121174f 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c @@ -686,7 +686,11 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create) SetWindowLongPtrW(GuiData->hWindow, GWLP_USERDATA, (DWORD_PTR)GuiData); - SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); + if (GuiData->IsWindowVisible) + { + SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); + } + // FIXME: HACK: Potential HACK for CORE-8129; see revision 63595. //CreateSysMenu(GuiData->hWindow); @@ -1048,6 +1052,9 @@ OnPaint(PGUI_CONSOLE_DATA GuiData) PAINTSTRUCT ps; RECT rcPaint; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + BeginPaint(GuiData->hWindow, &ps); if (ps.hdc != NULL && ps.rcPaint.left < ps.rcPaint.right && @@ -1096,6 +1103,9 @@ OnPaletteChanged(PGUI_CONSOLE_DATA GuiData) { PCONSOLE_SCREEN_BUFFER ActiveBuffer = GuiData->ActiveBuffer; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + // See WM_PALETTECHANGED message // if ((HWND)wParam == hWnd) break; @@ -1306,6 +1316,9 @@ OnTimer(PGUI_CONSOLE_DATA GuiData) PCONSRV_CONSOLE Console = GuiData->Console; PCONSOLE_SCREEN_BUFFER Buff; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + SetTimer(GuiData->hWindow, CONGUI_UPDATE_TIMER, CURSOR_BLINK_TIME, NULL); if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; @@ -1431,7 +1444,11 @@ OnNcDestroy(HWND hWnd) { PGUI_CONSOLE_DATA GuiData = GuiGetGuiData(hWnd); - KillTimer(hWnd, CONGUI_UPDATE_TIMER); + if (GuiData->IsWindowVisible) + { + KillTimer(hWnd, CONGUI_UPDATE_TIMER); + } + GetSystemMenu(hWnd, TRUE); if (GuiData) @@ -1868,6 +1885,9 @@ OnSize(PGUI_CONSOLE_DATA GuiData, WPARAM wParam, LPARAM lParam) { PCONSRV_CONSOLE Console = GuiData->Console; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return; if ((GuiData->WindowSizeLock == FALSE) && @@ -2191,6 +2211,9 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SETCURSOR: { + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) goto Default; + /* * The message was sent because we are manually triggering a change. * Check whether the mouse is indeed present on this console window @@ -2263,6 +2286,9 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_CONTEXTMENU: { + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) break; + if (DefWindowProcW(hWnd /*GuiData->hWindow*/, WM_NCHITTEST, 0, lParam) == HTCLIENT) { HMENU hMenu = CreatePopupMenu(); @@ -2391,6 +2417,9 @@ ConWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) DWORD Width, Height; UINT WidthUnit, HeightUnit; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) break; + GetScreenBufferSizeUnits(Buff, GuiData, &WidthUnit, &HeightUnit); Width = Buff->ScreenBufferSize.X * WidthUnit ; diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h index 456501b031c..a102ef5f42b 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.h @@ -40,6 +40,8 @@ typedef struct _GUI_CONSOLE_DATA HANDLE hGuiInitEvent; HANDLE hGuiTermEvent; + BOOLEAN IsWindowVisible; + POINT OldCursor; LONG_PTR WndStyle; diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c b/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c index 6884f098b18..6fa11ae428d 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c @@ -39,6 +39,7 @@ typedef struct _GUI_INIT_INFO PCONSOLE_INFO ConsoleInfo; PCONSOLE_START_INFO ConsoleStartInfo; ULONG ProcessId; + BOOLEAN IsWindowVisible; } GUI_INIT_INFO, *PGUI_INIT_INFO; static BOOL ConsInitialized = FALSE; @@ -179,7 +180,7 @@ GuiConsoleInputThread(PVOID Data) CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, + GuiData->IsWindowVisible ? HWND_DESKTOP : HWND_MESSAGE, NULL, ConSrvDllInstance, (PVOID)GuiData); @@ -204,22 +205,33 @@ GuiConsoleInputThread(PVOID Data) GuiData->GuiInfo.WindowOrigin.x = rcWnd.left; GuiData->GuiInfo.WindowOrigin.y = rcWnd.top; - /* Move and resize the window to the user's values */ - /* CAN WE DEADLOCK ?? */ - GuiConsoleMoveWindow(GuiData); // FIXME: This MUST be done via the CreateWindowExW call. - SendMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0); + if (GuiData->IsWindowVisible) + { + /* Move and resize the window to the user's values */ + /* CAN WE DEADLOCK ?? */ + GuiConsoleMoveWindow(GuiData); // FIXME: This MUST be done via the CreateWindowExW call. + SendMessageW(GuiData->hWindow, PM_RESIZE_TERMINAL, 0, 0); + } // FIXME: HACK: Potential HACK for CORE-8129; see revision 63595. CreateSysMenu(GuiData->hWindow); - /* Switch to full-screen mode if necessary */ - // FIXME: Move elsewhere, it cause misdrawings of the window. - if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE); + if (GuiData->IsWindowVisible) + { + /* Switch to full-screen mode if necessary */ + // FIXME: Move elsewhere, it cause misdrawings of the window. + if (GuiData->GuiInfo.FullScreen) SwitchFullScreen(GuiData, TRUE); - DPRINT("PM_CREATE_CONSOLE -- showing window\n"); - // ShowWindow(NewWindow, (int)GuiData->GuiInfo.ShowWindow); - ShowWindowAsync(NewWindow, (int)GuiData->GuiInfo.ShowWindow); - DPRINT("Window showed\n"); + DPRINT("PM_CREATE_CONSOLE -- showing window\n"); + // ShowWindow(NewWindow, (int)GuiData->GuiInfo.ShowWindow); + ShowWindowAsync(NewWindow, (int)GuiData->GuiInfo.ShowWindow); + DPRINT("Window showed\n"); + } + else + { + DPRINT("PM_CREATE_CONSOLE -- hidden window\n"); + ShowWindowAsync(NewWindow, SW_HIDE); + } continue; } @@ -369,6 +381,7 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, GuiData->Console = Console; GuiData->ActiveBuffer = Console->ActiveBuffer; GuiData->hWindow = NULL; + GuiData->IsWindowVisible = GuiInitInfo->IsWindowVisible; /* The console can be resized */ Console->FixedSize = FALSE; @@ -383,33 +396,36 @@ GuiInitFrontEnd(IN OUT PFRONTEND This, /* 1. Load the default settings */ GuiConsoleGetDefaultSettings(&TermInfo, GuiInitInfo->ProcessId); - /* 3. Load the remaining console settings via the registry */ - if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) + if (GuiData->IsWindowVisible) { - /* Load the terminal infos from the registry */ - GuiConsoleReadUserSettings(&TermInfo, - ConsoleInfo->ConsoleTitle, - GuiInitInfo->ProcessId); + /* 2. Load the remaining console settings via the registry */ + if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0) + { + /* Load the terminal infos from the registry */ + GuiConsoleReadUserSettings(&TermInfo, + ConsoleInfo->ConsoleTitle, + GuiInitInfo->ProcessId); - /* - * Now, update them with the properties the user might gave to us - * via the STARTUPINFO structure before calling CreateProcess - * (and which was transmitted via the ConsoleStartInfo structure). - * We therefore overwrite the values read in the registry. - */ - if (ConsoleStartInfo->dwStartupFlags & STARTF_USESHOWWINDOW) - { - TermInfo.ShowWindow = ConsoleStartInfo->wShowWindow; - } - if (ConsoleStartInfo->dwStartupFlags & STARTF_USEPOSITION) - { - TermInfo.AutoPosition = FALSE; - TermInfo.WindowOrigin.x = ConsoleStartInfo->dwWindowOrigin.X; - TermInfo.WindowOrigin.y = ConsoleStartInfo->dwWindowOrigin.Y; - } - if (ConsoleStartInfo->dwStartupFlags & STARTF_RUNFULLSCREEN) - { - TermInfo.FullScreen = TRUE; + /* + * Now, update them with the properties the user might gave to us + * via the STARTUPINFO structure before calling CreateProcess + * (and which was transmitted via the ConsoleStartInfo structure). + * We therefore overwrite the values read in the registry. + */ + if (ConsoleStartInfo->dwStartupFlags & STARTF_USESHOWWINDOW) + { + TermInfo.ShowWindow = ConsoleStartInfo->wShowWindow; + } + if (ConsoleStartInfo->dwStartupFlags & STARTF_USEPOSITION) + { + TermInfo.AutoPosition = FALSE; + TermInfo.WindowOrigin.x = ConsoleStartInfo->dwWindowOrigin.X; + TermInfo.WindowOrigin.y = ConsoleStartInfo->dwWindowOrigin.Y; + } + if (ConsoleStartInfo->dwStartupFlags & STARTF_RUNFULLSCREEN) + { + TermInfo.FullScreen = TRUE; + } } } @@ -539,6 +555,10 @@ GuiDrawRegion(IN OUT PFRONTEND This, SMALL_RECT* Region) { PGUI_CONSOLE_DATA GuiData = This->Data; + + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + DrawRegion(GuiData, Region); } @@ -558,6 +578,9 @@ GuiWriteStream(IN OUT PFRONTEND This, if (NULL == GuiData || NULL == GuiData->hWindow) return; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return; + Buff = GuiData->ActiveBuffer; if (GetType(Buff) != TEXTMODE_BUFFER) return; @@ -617,6 +640,9 @@ GuiSetCursorInfo(IN OUT PFRONTEND This, { PGUI_CONSOLE_DATA GuiData = This->Data; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return TRUE; + if (GuiData->ActiveBuffer == Buff) { InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y); @@ -633,6 +659,9 @@ GuiSetScreenInfo(IN OUT PFRONTEND This, { PGUI_CONSOLE_DATA GuiData = This->Data; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return TRUE; + if (GuiData->ActiveBuffer == Buff) { /* Redraw char at old position (remove cursor) */ @@ -935,6 +964,9 @@ GuiSetDisplayMode(IN OUT PFRONTEND This, if (NewMode & ~(CONSOLE_FULLSCREEN_MODE | CONSOLE_WINDOWED_MODE)) return FALSE; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return TRUE; + FullScreen = ((NewMode & CONSOLE_FULLSCREEN_MODE) != 0); if (FullScreen != GuiData->GuiInfo.FullScreen) @@ -951,12 +983,15 @@ GuiShowMouseCursor(IN OUT PFRONTEND This, { PGUI_CONSOLE_DATA GuiData = This->Data; - /* Set the reference count */ - if (Show) ++GuiData->MouseCursorRefCount; - else --GuiData->MouseCursorRefCount; + if (GuiData->IsWindowVisible) + { + /* Set the reference count */ + if (Show) ++GuiData->MouseCursorRefCount; + else --GuiData->MouseCursorRefCount; - /* Effectively show (or hide) the cursor (use special values for (w|l)Param) */ - PostMessageW(GuiData->hWindow, WM_SETCURSOR, -1, -1); + /* Effectively show (or hide) the cursor (use special values for (w|l)Param) */ + PostMessageW(GuiData->hWindow, WM_SETCURSOR, -1, -1); + } return GuiData->MouseCursorRefCount; } @@ -967,6 +1002,9 @@ GuiSetMouseCursor(IN OUT PFRONTEND This, { PGUI_CONSOLE_DATA GuiData = This->Data; + /* Do nothing if the window is hidden */ + if (!GuiData->IsWindowVisible) return TRUE; + /* * Set the cursor's handle. If the given handle is NULL, * then restore the default cursor. @@ -1068,6 +1106,7 @@ GuiLoadFrontEnd(IN OUT PFRONTEND FrontEnd, GuiInitInfo->ConsoleInfo = ConsoleInfo; GuiInitInfo->ConsoleStartInfo = ConsoleInitInfo->ConsoleStartInfo; GuiInitInfo->ProcessId = ProcessId; + GuiInitInfo->IsWindowVisible = ConsoleInitInfo->IsWindowVisible; /* Finally, initialize the frontend structure */ FrontEnd->Vtbl = &GuiVtbl; diff --git a/reactos/win32ss/user/winsrv/consrv/init.c b/reactos/win32ss/user/winsrv/consrv/init.c index 9c619b0e64c..72194cdd0c2 100644 --- a/reactos/win32ss/user/winsrv/consrv/init.c +++ b/reactos/win32ss/user/winsrv/consrv/init.c @@ -434,6 +434,7 @@ ConSrvConnect(IN PCSR_PROCESS CsrProcess, /* Initialize the console initialization info structure */ ConsoleInitInfo.ConsoleStartInfo = &ConnectInfo->ConsoleStartInfo; + ConsoleInitInfo.IsWindowVisible = ConnectInfo->IsWindowVisible; ConsoleInitInfo.TitleLength = ConnectInfo->TitleLength; ConsoleInitInfo.ConsoleTitle = ConnectInfo->ConsoleTitle; ConsoleInitInfo.DesktopLength = ConnectInfo->DesktopLength; From 620eec28ea7b4edb8bc1d020803029ea20882964 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 24 Nov 2014 02:50:18 +0000 Subject: [PATCH 45/50] [NtUser] - Synchronize mouse messages. Part II - Dedicated to Giannis Adamopoulos and Amine Khaldi. - Additional fixes are added. - This should be more accurate, based on "Hit Testing: Which HWND is the mouse over?": http://blogs.msdn.com/b/dwayneneed/archive/2008/09/08/transparent-windows-in-wpf.aspx - Note: Older FireFox menu item hilite select seem to work now, do not need to keep moving the mouse to keep it hilited to be selected. - Test results: https://reactos.org/sites/all/modules/reactos/testman/compare.php?ids=33709,33710,33713 svn path=/trunk/; revision=65472 --- reactos/win32ss/user/ntuser/keyboard.c | 12 ++- reactos/win32ss/user/ntuser/message.c | 14 ++- reactos/win32ss/user/ntuser/msgqueue.c | 133 ++++++++++++++++++++----- reactos/win32ss/user/ntuser/msgqueue.h | 10 +- reactos/win32ss/user/ntuser/timer.c | 4 +- 5 files changed, 135 insertions(+), 38 deletions(-) diff --git a/reactos/win32ss/user/ntuser/keyboard.c b/reactos/win32ss/user/ntuser/keyboard.c index 097b8524bd8..c8a7a73721f 100644 --- a/reactos/win32ss/user/ntuser/keyboard.c +++ b/reactos/win32ss/user/ntuser/keyboard.c @@ -936,10 +936,16 @@ ProcessKeyEvent(WORD wVk, WORD wScanCode, DWORD dwFlags, BOOL bInjected, DWORD d Msg.lParam |= KF_MENUMODE << 16; } + // Post mouse move before posting key buttons, to keep it syned. + if (pFocusQueue->QF_flags & QF_MOUSEMOVED) + { + IntCoalesceMouseMove(pti); + } + /* Post a keyboard message */ TRACE("Posting keyboard msg %u wParam 0x%x lParam 0x%x\n", Msg.message, Msg.wParam, Msg.lParam); if (!Wnd) {ERR("Window is NULL\n");} - MsqPostMessage(pti, &Msg, TRUE, QS_KEY, 0); + MsqPostMessage(pti, &Msg, TRUE, QS_KEY, 0, dwExtraInfo); } return TRUE; @@ -1154,7 +1160,7 @@ IntTranslateKbdMessage(LPMSG lpMsg, NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR; NewMsg.wParam = HIWORD(lpMsg->lParam); NewMsg.lParam = LOWORD(lpMsg->lParam); - MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0); + MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0, 0); return TRUE; } @@ -1183,7 +1189,7 @@ IntTranslateKbdMessage(LPMSG lpMsg, { TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam); NewMsg.wParam = wch[i]; - MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0); + MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0, 0); } bResult = TRUE; } diff --git a/reactos/win32ss/user/ntuser/message.c b/reactos/win32ss/user/ntuser/message.c index e705a8ffa7a..4662b4ff8ef 100644 --- a/reactos/win32ss/user/ntuser/message.c +++ b/reactos/win32ss/user/ntuser/message.c @@ -802,6 +802,12 @@ co_IntPeekMessage( PMSG Msg, pti->timeLast = LargeTickCount.u.LowPart; pti->pcti->tickLastMsgChecked = LargeTickCount.u.LowPart; + // Post mouse moves while looping through peek messages. + if (pti->MessageQueue->QF_flags & QF_MOUSEMOVED) + { + IntCoalesceMouseMove(pti); + } + /* Dispatch sent messages here. */ while ( co_MsqDispatchOneSentMessage(pti) ) { @@ -1087,7 +1093,7 @@ UserPostThreadMessage( PTHREADINFO pti, KeQueryTickCount(&LargeTickCount); Message.time = MsqCalculateMessageTime(&LargeTickCount); - MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0); + MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0, 0); return TRUE; } @@ -1218,7 +1224,7 @@ UserPostMessage( HWND Wnd, } else { - MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0); + MsqPostMessage(pti, &Message, FALSE, QS_POSTMESSAGE, 0, 0); } } return TRUE; @@ -1411,6 +1417,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd, CLEANUP: if (Window) UserDerefObjectCo(Window); + // Current Thread and it's a Copy Data message, then free kernel memory. if ( !ptiSendTo && Msg == WM_COPYDATA ) { ExFreePool((PVOID) lParam); @@ -1677,7 +1684,7 @@ CLEANUP: END_CLEANUP; } - +#if 0 /* This HACK function posts a message if the destination's message queue belongs to another thread, otherwise it sends the message. It does not support broadcast @@ -1721,6 +1728,7 @@ co_IntPostOrSendMessage( HWND hWnd, return (LRESULT)Result; } +#endif static LRESULT FASTCALL co_IntDoSendMessage( HWND hWnd, diff --git a/reactos/win32ss/user/ntuser/msgqueue.c b/reactos/win32ss/user/ntuser/msgqueue.c index 7550aa31adc..f40c02f1e46 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.c +++ b/reactos/win32ss/user/ntuser/msgqueue.c @@ -15,6 +15,9 @@ DBG_DEFAULT_CHANNEL(UserMsgQ); static PPAGED_LOOKASIDE_LIST pgMessageLookasideList; PUSER_MESSAGE_QUEUE gpqCursor; +ULONG_PTR gdwMouseMoveExtraInfo = 0; +DWORD gdwMouseMoveTimeStamp = 0; + /* FUNCTIONS *****************************************************************/ @@ -311,6 +314,36 @@ UpdateKeyStateFromMsg(PUSER_MESSAGE_QUEUE MessageQueue, MSG* msg) } } +/* + Get down key states from the queue of prior processed input message key states. + + This fixes the left button dragging on the desktop and release sticking outline issue. + USB Tablet pointer seems to stick the most and leaves the box outline displayed. + */ +WPARAM FASTCALL +MsqGetDownKeyState(PUSER_MESSAGE_QUEUE MessageQueue) +{ + WPARAM ret = 0; + + if (gspv.bMouseBtnSwap) + { + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_RBUTTON)) ret |= MK_LBUTTON; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_LBUTTON)) ret |= MK_RBUTTON; + } + else + { + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_LBUTTON)) ret |= MK_LBUTTON; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_RBUTTON)) ret |= MK_RBUTTON; + } + + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_MBUTTON)) ret |= MK_MBUTTON; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_SHIFT)) ret |= MK_SHIFT; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_CONTROL)) ret |= MK_CONTROL; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_XBUTTON1)) ret |= MK_XBUTTON1; + if (IS_KEY_DOWN(MessageQueue->afKeyState, VK_XBUTTON2)) ret |= MK_XBUTTON2; + return ret; +} + HANDLE FASTCALL IntMsqSetWakeMask(DWORD WakeMask) { @@ -397,26 +430,18 @@ MsqWakeQueue(PTHREADINFO pti, DWORD MessageBits, BOOL KeyEvent) VOID FASTCALL ClearMsgBitsMask(PTHREADINFO pti, UINT MessageBits) { - PUSER_MESSAGE_QUEUE Queue; UINT ClrMask = 0; - Queue = pti->MessageQueue; - if (MessageBits & QS_KEY) { if (--pti->nCntsQBits[QSRosKey] == 0) ClrMask |= QS_KEY; } - if (MessageBits & QS_MOUSEMOVE) // ReactOS hard coded. + if (MessageBits & QS_MOUSEMOVE) { // Account for tracking mouse moves.. if (pti->nCntsQBits[QSRosMouseMove]) { pti->nCntsQBits[QSRosMouseMove] = 0; // Throttle down count. Up to > 3:1 entries are ignored. - } - // Handle mouse move bits here. - if (Queue->MouseMoved) - { ClrMask |= QS_MOUSEMOVE; - Queue->MouseMoved = FALSE; } } if (MessageBits & QS_MOUSEBUTTON) @@ -472,10 +497,11 @@ MsqDecPaintCountQueue(PTHREADINFO pti) } /* - Post Mouse Move. + Post the move or update the message still pending to be processed. + Do not overload the queue with mouse move messages. */ VOID FASTCALL -MsqPostMouseMove(PTHREADINFO pti, MSG* Msg) +MsqPostMouseMove(PTHREADINFO pti, MSG* Msg, LONG_PTR ExtraInfo) { PUSER_MESSAGE Message; PLIST_ENTRY ListHead; @@ -483,22 +509,59 @@ MsqPostMouseMove(PTHREADINFO pti, MSG* Msg) ListHead = &MessageQueue->HardwareMessagesListHead; - MessageQueue->MouseMoved = TRUE; - + // Do nothing if empty. if (!IsListEmpty(ListHead->Flink)) - { // Look at the end of the list, + { + // Look at the end of the list, Message = CONTAINING_RECORD(ListHead->Blink, USER_MESSAGE, ListEntry); - // If the mouse move message is existing, + + // If the mouse move message is existing on the list, if (Message->Msg.message == WM_MOUSEMOVE) { - TRACE("Post Old MM Message in Q\n"); - Message->Msg = *Msg; // Overwrite the message with updated data! + // Overwrite the message with updated data! + Message->Msg = *Msg; + MsqWakeQueue(pti, QS_MOUSEMOVE, TRUE); return; } } - TRACE("Post New MM Message to Q\n"); - MsqPostMessage(pti, Msg, TRUE, QS_MOUSEMOVE, 0); + + MsqPostMessage(pti, Msg, TRUE, QS_MOUSEMOVE, 0, ExtraInfo); +} + +/* + Bring together the mouse move message. + Named "Coalesce" from Amine email ;^) (jt). + */ +VOID FASTCALL +IntCoalesceMouseMove(PTHREADINFO pti) +{ + MSG Msg; + LARGE_INTEGER LargeTickCount; + + // Force time stamp to update, keeping message time in sync. + if (gdwMouseMoveTimeStamp == 0) + { + KeQueryTickCount(&LargeTickCount); + gdwMouseMoveTimeStamp = MsqCalculateMessageTime(&LargeTickCount); + } + + // Build mouse move message. + Msg.hwnd = NULL; + Msg.message = WM_MOUSEMOVE; + Msg.wParam = 0; + Msg.lParam = MAKELONG(gpsi->ptCursor.x, gpsi->ptCursor.y); + Msg.time = gdwMouseMoveTimeStamp; + Msg.pt = gpsi->ptCursor; + + // Post the move. + MsqPostMouseMove(pti, &Msg, gdwMouseMoveExtraInfo); + + // Zero the time stamp. + gdwMouseMoveTimeStamp = 0; + + // Clear flag since the move was posted. + pti->MessageQueue->QF_flags &= ~QF_MOUSEMOVED; } VOID FASTCALL @@ -626,7 +689,10 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook gpqCursor = MessageQueue; /* Mouse move is a special case */ - MsqPostMouseMove(pti, Msg); + MessageQueue->QF_flags |= QF_MOUSEMOVED; + gdwMouseMoveExtraInfo = dwExtraInfo; + gdwMouseMoveTimeStamp = Msg->time; + MsqWakeQueue(pti, QS_MOUSEMOVE, TRUE); } else { @@ -636,8 +702,15 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook // ptiLastInput = pti; // Once this is set during Reboot or Shutdown, this prevents the exit window having foreground. // Find all the Move Mouse calls and fix mouse set active focus issues...... } + + // Post mouse move before posting mouse buttons, keep it in sync. + if (pti->MessageQueue->QF_flags & QF_MOUSEMOVED) + { + IntCoalesceMouseMove(pti); + } + TRACE("Posting mouse message to hwnd=%p!\n", UserHMGetHandle(pwnd)); - MsqPostMessage(pti, Msg, TRUE, QS_MOUSEBUTTON, 0); + MsqPostMessage(pti, Msg, TRUE, QS_MOUSEBUTTON, 0, dwExtraInfo); } } else if (hdcScreen) @@ -1207,7 +1280,8 @@ MsqPostMessage(PTHREADINFO pti, MSG* Msg, BOOLEAN HardwareMessage, DWORD MessageBits, - DWORD dwQEvent) + DWORD dwQEvent, + LONG_PTR ExtraInfo) { PUSER_MESSAGE Message; PUSER_MESSAGE_QUEUE MessageQueue; @@ -1244,6 +1318,7 @@ MsqPostMessage(PTHREADINFO pti, if (Msg->message == WM_HOTKEY) MessageBits |= QS_HOTKEY; // Justin Case, just set it. Message->dwQEvent = dwQEvent; + Message->ExtraInfo = ExtraInfo; Message->QS_Flags = MessageBits; Message->pti = pti; MsqWakeQueue(pti, MessageBits, TRUE); @@ -1375,12 +1450,13 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT } else { - pwndMsg = co_WinPosWindowFromPoint(NULL, &msg->pt, &hittest, FALSE);//TRUE); + pwndMsg = co_WinPosWindowFromPoint(pwndMsg, &msg->pt, &hittest, FALSE); } TRACE("Got mouse message for %p, hittest: 0x%x\n", msg->hwnd, hittest); - if (pwndMsg == NULL || pwndMsg->head.pti != pti) + // Null window or not the same "Hardware" message queue. + if (pwndMsg == NULL || pwndMsg->head.pti->MessageQueue != pti->MessageQueue) { /* Remove and ignore the message */ *RemoveMessages = TRUE; @@ -1470,6 +1546,12 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT TRACE("Message out of range!!!\n"); RETURN(FALSE); } + + // Update mouse move down keys. + if (message == WM_MOUSEMOVE) + { + msg->wParam = MsqGetDownKeyState(MessageQueue); + } } if(gspv.bMouseClickLock) @@ -1739,7 +1821,8 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti, */ if ( ( !Window || // 1 ( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2 - ( Window != PWND_BOTTOM && Window->head.h == CurrentMessage->Msg.hwnd ) ) && // 3 + ( Window != PWND_BOTTOM && Window->head.h == CurrentMessage->Msg.hwnd ) || // 3 + ( CurrentMessage->Msg.message == WM_MOUSEMOVE ) ) && // Null window for mouse moves. ( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) || ( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) ) { diff --git a/reactos/win32ss/user/ntuser/msgqueue.h b/reactos/win32ss/user/ntuser/msgqueue.h index 61f52279e3d..c7c61d7bd71 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.h +++ b/reactos/win32ss/user/ntuser/msgqueue.h @@ -51,9 +51,7 @@ typedef struct _USER_MESSAGE_QUEUE /* Queue for hardware messages for the queue. */ LIST_ENTRY HardwareMessagesListHead; - /* True if a WM_MOUSEMOVE is pending */ - BOOLEAN MouseMoved; - /* Current WM_MOUSEMOVE message */ + /* Last click message for translating double clicks */ MSG msgDblClk; /* Current capture window for this queue. */ PWND spwndCapture; @@ -92,7 +90,7 @@ typedef struct _USER_MESSAGE_QUEUE #define QF_FMENUSTATUSBREAK 0x00000004 #define QF_FMENUSTATUS 0x00000008 #define QF_FF10STATUS 0x00000010 -#define QF_MOUSEMOVED 0x00000020 // See MouseMoved. +#define QF_MOUSEMOVED 0x00000020 #define QF_ACTIVATIONCHANGE 0x00000040 #define QF_TABSWITCHING 0x00000080 #define QF_KEYSTATERESET 0x00000100 @@ -122,7 +120,7 @@ NTSTATUS FASTCALL co_MsqSendMessage(PTHREADINFO ptirec, UINT uTimeout, BOOL Block, INT HookMessage, ULONG_PTR *uResult); PUSER_MESSAGE FASTCALL MsqCreateMessage(LPMSG Msg); VOID FASTCALL MsqDestroyMessage(PUSER_MESSAGE Message); -VOID FASTCALL MsqPostMessage(PTHREADINFO, MSG*, BOOLEAN, DWORD, DWORD); +VOID FASTCALL MsqPostMessage(PTHREADINFO, MSG*, BOOLEAN, DWORD, DWORD, LONG_PTR); VOID FASTCALL MsqPostQuitMessage(PTHREADINFO pti, ULONG ExitCode); BOOLEAN APIENTRY MsqPeekMessage(IN PTHREADINFO pti, @@ -186,6 +184,7 @@ co_MsqSendMessageAsync(PTHREADINFO ptiReceiver, BOOL HasPackedLParam, INT HookMessage); +VOID FASTCALL IntCoalesceMouseMove(PTHREADINFO); LRESULT FASTCALL IntDispatchMessage(MSG* Msg); BOOL FASTCALL IntTranslateKbdMessage(LPMSG lpMsg, UINT flags); VOID FASTCALL co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook); @@ -246,6 +245,7 @@ BOOL FASTCALL co_MsqReplyMessage(LRESULT); VOID FASTCALL MsqWakeQueue(PTHREADINFO,DWORD,BOOL); VOID FASTCALL ClearMsgBitsMask(PTHREADINFO,UINT); BOOL FASTCALL IntCallMsgFilter(LPMSG,INT); +WPARAM FASTCALL MsqGetDownKeyState(PUSER_MESSAGE_QUEUE); int UserShowCursor(BOOL bShow); PCURICON_OBJECT diff --git a/reactos/win32ss/user/ntuser/timer.c b/reactos/win32ss/user/ntuser/timer.c index f3355a5095c..76697ac6e17 100644 --- a/reactos/win32ss/user/ntuser/timer.c +++ b/reactos/win32ss/user/ntuser/timer.c @@ -320,7 +320,7 @@ SystemTimerProc(HWND hwnd, { if (pDesk->htEx == HTCLIENT) // In a client area. { - wParam = UserGetMouseButtonsState(); + wParam = MsqGetDownKeyState(pWnd->head.pti->MessageQueue); Msg = WM_MOUSEHOVER; if (pWnd->ExStyle & WS_EX_LAYOUTRTL) @@ -405,7 +405,7 @@ PostTimerMessages(PWND Window) Msg.wParam = (WPARAM) pTmr->nID; Msg.lParam = (LPARAM) pTmr->pfn; - MsqPostMessage(pti, &Msg, FALSE, (QS_POSTMESSAGE|QS_ALLPOSTMESSAGE), 0); + MsqPostMessage(pti, &Msg, FALSE, (QS_POSTMESSAGE|QS_ALLPOSTMESSAGE), 0, 0); pTmr->flags &= ~TMRF_READY; ClearMsgBitsMask(pti, QS_TIMER); Hit = TRUE; From d23756ccb7932a838a8313c890f9bfa81beda4e0 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 24 Nov 2014 19:54:22 +0000 Subject: [PATCH 46/50] [NTFS] ASSERT -> NT_VERIFY Spotted by Thomas. Thanks :-) svn path=/trunk/; revision=65473 --- reactos/drivers/filesystems/ntfs/mft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/ntfs/mft.c b/reactos/drivers/filesystems/ntfs/mft.c index 3a3f00e0ab9..32774d2db12 100644 --- a/reactos/drivers/filesystems/ntfs/mft.c +++ b/reactos/drivers/filesystems/ntfs/mft.c @@ -478,7 +478,7 @@ CompareFileName(PUNICODE_STRING FileName, UNICODE_STRING IntFileName; if (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX) { - ASSERT(NT_SUCCESS(RtlUpcaseUnicodeString(&IntFileName, FileName, TRUE))); + NT_VERIFY(NT_SUCCESS(RtlUpcaseUnicodeString(&IntFileName, FileName, TRUE))); Alloc = TRUE; } else From f2e863d92997e2cd9d6af20581e03786b7bd86dc Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 24 Nov 2014 20:01:34 +0000 Subject: [PATCH 47/50] [NTFS] Warn about unimplemented sub-node browsing while looking into a MFT directory stream. Might likely explain why we cannnot enumerate all the files on a Win7 volume. svn path=/trunk/; revision=65474 --- reactos/drivers/filesystems/ntfs/mft.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/reactos/drivers/filesystems/ntfs/mft.c b/reactos/drivers/filesystems/ntfs/mft.c index 32774d2db12..acecf2dd583 100644 --- a/reactos/drivers/filesystems/ntfs/mft.c +++ b/reactos/drivers/filesystems/ntfs/mft.c @@ -566,6 +566,14 @@ NtfsFindMftRecord(PDEVICE_EXTENSION Vcb, while (IndexEntry < IndexEntryEnd && !(IndexEntry->Flags & NTFS_INDEX_ENTRY_END)) { + UNICODE_STRING EntryName; + EntryName.Buffer = IndexEntry->FileName.Name; + EntryName.Length = + EntryName.MaximumLength = IndexEntry->FileName.NameLength * sizeof(WCHAR); + + if (IndexEntry->Flags & NTFS_INDEX_ENTRY_NODE) + DPRINT1("Warning: sub-node browsing unimplemented! (%wZ)\n", &EntryName); + if ((IndexEntry->Data.Directory.IndexedFile & NTFS_MFT_MASK) > 0x10 && CurrentEntry >= *FirstEntry && CompareFileName(FileName, IndexEntry, DirSearch)) @@ -657,6 +665,14 @@ NtfsFindMftRecord(PDEVICE_EXTENSION Vcb, while (IndexEntry < IndexEntryEnd && !(IndexEntry->Flags & NTFS_INDEX_ENTRY_END)) { + UNICODE_STRING EntryName; + EntryName.Buffer = IndexEntry->FileName.Name; + EntryName.Length = + EntryName.MaximumLength = IndexEntry->FileName.NameLength * sizeof(WCHAR); + + if (IndexEntry->Flags & NTFS_INDEX_ENTRY_NODE) + DPRINT1("Warning: sub-node browsing unimplemented! (%wZ)\n", &EntryName); + if ((IndexEntry->Data.Directory.IndexedFile & NTFS_MFT_MASK) > 0x10 && CurrentEntry >= *FirstEntry && CompareFileName(FileName, IndexEntry, DirSearch)) From 10d2eaf33bf085dab328d937884b21e4fec6dc7c Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 24 Nov 2014 20:02:40 +0000 Subject: [PATCH 48/50] [NTFS] Add the reparse point attribute definition svn path=/trunk/; revision=65475 --- reactos/drivers/filesystems/ntfs/ntfs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index f2ee2b62240..bb72e0113ff 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -380,6 +380,13 @@ typedef struct ULONG Unknown2; } VOLINFO_ATTRIBUTE, *PVOLINFO_ATTRIBUTE; +typedef struct { + ULONG ReparseTag; + USHORT DataLength; + USHORT Reserved; + UCHAR Data[1]; +} REPARSE_POINT_ATTRIBUTE, *PREPARSE_POINT_ATTRIBUTE; + typedef struct { NTFSIDENTIFIER Identifier; From c6f12ff6bafaf39a3eb9d9765cbfad1c9b5b07b5 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 25 Nov 2014 09:08:34 +0000 Subject: [PATCH 49/50] [PSDK] When I wrote "the compiler can optimize this better" I was obviously referring to a sane compiler like MSVC. Optimize (U)Int32x32To64 on x86 GCC builds by using __emul(u), since the native math results in horribly inefficient code doing 3 multiplications and some shifts. svn path=/trunk/; revision=65480 --- reactos/include/psdk/ntdef.h | 13 +++++++++---- reactos/include/psdk/winnt.h | 17 +++++++++-------- reactos/include/xdk/ntbasedef.h | 13 +++++++++---- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/reactos/include/psdk/ntdef.h b/reactos/include/psdk/ntdef.h index 444bb8a1a84..fe01526c8fb 100644 --- a/reactos/include/psdk/ntdef.h +++ b/reactos/include/psdk/ntdef.h @@ -828,10 +828,15 @@ extern "C++" { \ #define MAXULONG 0xffffffff #define MAXLONGLONG (0x7fffffffffffffffLL) -/* Multiplication and Shift Operations. Note: we don't use inline - asm functions, the compiler can optimize this better. */ -#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) -#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +/* 32 to 64 bit multiplication. GCC is really bad at optimizing the native math */ +#if defined(_M_IX86) && defined(__GNUC__) && \ + !defined(MIDL_PASS)&& !defined(RC_INVOKED) && !defined(_M_CEE_PURE) + #define Int32x32To64(a,b) __emul(a,b) + #define UInt32x32To64(a,b) __emulu(a,b) +#else + #define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) + #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +#endif #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) /* Use native math */ diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 55be73a43c4..b9201aebfb2 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -761,10 +761,15 @@ extern "C++" { \ #define MAXDWORD 0xffffffff #define MAXLONGLONG (0x7fffffffffffffffLL) -/* Multiplication and Shift Operations. Note: we don't use inline - asm functions, the compiler can optimize this better. */ -#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) -#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +/* 32 to 64 bit multiplication. GCC is really bad at optimizing the native math */ +#if defined(_M_IX86) && defined(__GNUC__) && \ + !defined(MIDL_PASS)&& !defined(RC_INVOKED) && !defined(_M_CEE_PURE) + #define Int32x32To64(a,b) __emul(a,b) + #define UInt32x32To64(a,b) __emulu(a,b) +#else + #define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) + #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +#endif #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) /* Use native math */ @@ -1709,10 +1714,6 @@ extern "C++" { \ #define THREAD_BASE_PRIORITY_MAX 2 #define THREAD_BASE_PRIORITY_MIN (-2) #define THREAD_BASE_PRIORITY_IDLE (-15) - -#define PROCESS_SET_LIMITED_INFORMATION 0x2000 -#define THREAD_RESUME 0x1000 - /* * To prevent gcc compiler warnings, bracket these defines when initialising * a SID_IDENTIFIER_AUTHORITY, eg. diff --git a/reactos/include/xdk/ntbasedef.h b/reactos/include/xdk/ntbasedef.h index 30b2c1e2f6d..3555b1e2c63 100644 --- a/reactos/include/xdk/ntbasedef.h +++ b/reactos/include/xdk/ntbasedef.h @@ -747,10 +747,15 @@ $if(_WINNT_) $endif(_WINNT_) #define MAXLONGLONG (0x7fffffffffffffffLL) -/* Multiplication and Shift Operations. Note: we don't use inline - asm functions, the compiler can optimize this better. */ -#define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) -#define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +/* 32 to 64 bit multiplication. GCC is really bad at optimizing the native math */ +#if defined(_M_IX86) && defined(__GNUC__) && \ + !defined(MIDL_PASS)&& !defined(RC_INVOKED) && !defined(_M_CEE_PURE) + #define Int32x32To64(a,b) __emul(a,b) + #define UInt32x32To64(a,b) __emulu(a,b) +#else + #define Int32x32To64(a,b) (((__int64)(long)(a))*((__int64)(long)(b))) + #define UInt32x32To64(a,b) ((unsigned __int64)(unsigned int)(a)*(unsigned __int64)(unsigned int)(b)) +#endif #if defined(MIDL_PASS)|| defined(RC_INVOKED) || defined(_M_CEE_PURE) /* Use native math */ From 2e4fc079dcd648c67d11a5d248d56257581d43c4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 25 Nov 2014 09:46:18 +0000 Subject: [PATCH 50/50] [PSDK/XDK] Add back definitions that go lost in the last commit. winnt.h is autogenerated, please do not modify it directly, but instead modify the related file in XDK and regenerate the headers from XDK. svn path=/trunk/; revision=65481 --- reactos/include/psdk/winnt.h | 4 ++++ reactos/include/xdk/winnt_old.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index b9201aebfb2..de89e859e64 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -1714,6 +1714,10 @@ extern "C++" { \ #define THREAD_BASE_PRIORITY_MAX 2 #define THREAD_BASE_PRIORITY_MIN (-2) #define THREAD_BASE_PRIORITY_IDLE (-15) + +#define PROCESS_SET_LIMITED_INFORMATION 0x2000 +#define THREAD_RESUME 0x1000 + /* * To prevent gcc compiler warnings, bracket these defines when initialising * a SID_IDENTIFIER_AUTHORITY, eg. diff --git a/reactos/include/xdk/winnt_old.h b/reactos/include/xdk/winnt_old.h index b5da8053295..4488e4a795c 100644 --- a/reactos/include/xdk/winnt_old.h +++ b/reactos/include/xdk/winnt_old.h @@ -358,6 +358,10 @@ #define THREAD_BASE_PRIORITY_MAX 2 #define THREAD_BASE_PRIORITY_MIN (-2) #define THREAD_BASE_PRIORITY_IDLE (-15) + +#define PROCESS_SET_LIMITED_INFORMATION 0x2000 +#define THREAD_RESUME 0x1000 + /* * To prevent gcc compiler warnings, bracket these defines when initialising * a SID_IDENTIFIER_AUTHORITY, eg.