ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2009
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
641 discussions
Start a n
N
ew thread
[dgorbachev] 43569: Update cvconst.h file, from Wine.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Oct 18 20:52:08 2009 New Revision: 43569 URL:
http://svn.reactos.org/svn/reactos?rev=43569&view=rev
Log: Update cvconst.h file, from Wine. Modified: trunk/reactos/include/psdk/cvconst.h Modified: trunk/reactos/include/psdk/cvconst.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/cvconst.h?rev…
============================================================================== --- trunk/reactos/include/psdk/cvconst.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/cvconst.h [iso-8859-1] Sun Oct 18 20:52:08 2009 @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* information in this file is highly derivated from MSDN DIA information pages */ +/* information in this file is highly derived from MSDN DIA information pages */ /* symbols & types enumeration */ enum SymTagEnum @@ -186,7 +186,7 @@ CV_REG_LDTR = 114, CV_REG_TR = 115, - CV_REG_PSEUDO1 = 116, /* this includes Pseudo02 to Pseuso09 */ + CV_REG_PSEUDO1 = 116, /* this includes Pseudo02 to Pseudo09 */ CV_REG_ST0 = 128, /* this includes ST1 to ST7 */ CV_REG_CTRL = 136, CV_REG_STAT = 137, @@ -473,7 +473,7 @@ CV_AMD64_LDTR = CV_REG_LDTR, CV_AMD64_TR = CV_REG_TR, - CV_AMD64_PSEUDO1 = CV_REG_PSEUDO1, /* this includes Pseudo02 to Pseuso09 */ + CV_AMD64_PSEUDO1 = CV_REG_PSEUDO1, /* this includes Pseudo02 to Pseudo09 */ CV_AMD64_ST0 = CV_REG_ST0, /* this includes ST1 to ST7 */ CV_AMD64_CTRL = CV_REG_CTRL, CV_AMD64_STAT = CV_REG_STAT, @@ -528,7 +528,7 @@ CV_AMD64_R13 = 341, CV_AMD64_R14 = 342, CV_AMD64_R15 = 343, -} CV_HREG_e; +}; typedef enum {
15 years, 2 months
1
0
0
0
[cwittich] 43568: add a regression test for RosBE (flex/bison)
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 18 20:40:13 2009 New Revision: 43568 URL:
http://svn.reactos.org/svn/reactos?rev=43568&view=rev
Log: add a regression test for RosBE (flex/bison) Added: trunk/tools/RosBE/RosBE-Windows/regtest/ (with props) trunk/tools/RosBE/RosBE-Windows/regtest/parser.l (with props) trunk/tools/RosBE/RosBE-Windows/regtest/parser.y (with props) trunk/tools/RosBE/RosBE-Windows/regtest/regtest.cmd (with props) Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sun Oct 18 20:40:13 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/tools/RosBE/RosBE-Windows/regtest/parser.l URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/regtest/…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/regtest/parser.l (added) +++ trunk/tools/RosBE/RosBE-Windows/regtest/parser.l [iso-8859-1] Sun Oct 18 20:40:13 2009 @@ -1,0 +1,482 @@ +/* -*-C-*- + * IDL Compiler + * + * Copyright 2002 Ove Kaaven + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +%option stack +%option noinput nounput noyy_top_state +%option 8bit never-interactive prefix="parser_" + +nl \r?\n +ws [ \f\t\r] +cident [a-zA-Z_][0-9a-zA-Z_]* +u_suffix (u|U) +l_suffix (l|L) +int [0-9]+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)? +hexd [0-9a-fA-F] +hex 0(x|X){hexd}+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)? +uuid {hexd}{8}-{hexd}{4}-{hexd}{4}-{hexd}{4}-{hexd}{12} +double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* + +%x QUOTE +%x WSTRQUOTE +%x ATTR +%x PP_LINE + +%{ + +#include "config.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <assert.h> +#include <errno.h> +#include <limits.h> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#else +#define YY_NO_UNISTD_H +#endif + +#include "widl.h" +#include "utils.h" +#include "parser.h" +#include "wine/wpp.h" + +#include "parser.tab.h" + +extern char *temp_name; + +static void addcchar(char c); +static char *get_buffered_cstring(void); + +static char *cbuffer; +static int cbufidx; +static int cbufalloc = 0; + +static int kw_token(const char *kw); +static int attr_token(const char *kw); + +#define MAX_IMPORT_DEPTH 10 +struct { + YY_BUFFER_STATE state; + char *input_name; + int line_number; + char *temp_name; +} import_stack[MAX_IMPORT_DEPTH]; +int import_stack_ptr = 0; + +/* converts an integer in string form to an unsigned long and prints an error + * on overflow */ +static unsigned long xstrtoul(const char *nptr, char **endptr, int base) +{ + unsigned long l; + + errno = 0; + l = strtoul(nptr, endptr, base); + if (l == ULONG_MAX && errno == ERANGE) + error_loc("integer constant %s is too large\n", nptr); + return l; +} + +UUID *parse_uuid(const char *u) +{ + UUID* uuid = xmalloc(sizeof(UUID)); + char b[3]; + /* it would be nice to use UuidFromStringA */ + uuid->Data1 = strtoul(u, NULL, 16); + uuid->Data2 = strtoul(u+9, NULL, 16); + uuid->Data3 = strtoul(u+14, NULL, 16); + b[2] = 0; + memcpy(b, u+19, 2); uuid->Data4[0] = strtoul(b, NULL, 16); + memcpy(b, u+21, 2); uuid->Data4[1] = strtoul(b, NULL, 16); + memcpy(b, u+24, 2); uuid->Data4[2] = strtoul(b, NULL, 16); + memcpy(b, u+26, 2); uuid->Data4[3] = strtoul(b, NULL, 16); + memcpy(b, u+28, 2); uuid->Data4[4] = strtoul(b, NULL, 16); + memcpy(b, u+30, 2); uuid->Data4[5] = strtoul(b, NULL, 16); + memcpy(b, u+32, 2); uuid->Data4[6] = strtoul(b, NULL, 16); + memcpy(b, u+34, 2); uuid->Data4[7] = strtoul(b, NULL, 16); + return uuid; +} + +%} + +/* + ************************************************************************** + * The flexer starts here + ************************************************************************** + */ +%% +<INITIAL,ATTR>^{ws}*\#{ws}* yy_push_state(PP_LINE); +<PP_LINE>[^\n]* { + int lineno; + char *cptr, *fname; + yy_pop_state(); + lineno = (int)strtol(yytext, &cptr, 10); + if(!lineno) + error_loc("Malformed '#...' line-directive; invalid linenumber\n"); + fname = strchr(cptr, '"'); + if(!fname) + error_loc("Malformed '#...' line-directive; missing filename\n"); + fname++; + cptr = strchr(fname, '"'); + if(!cptr) + error_loc("Malformed '#...' line-directive; missing terminating \"\n"); + *cptr = '\0'; + line_number = lineno - 1; /* We didn't read the newline */ + free( input_name ); + input_name = xstrdup(fname); + } +<INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0; +<QUOTE>\" { + yy_pop_state(); + parser_lval.str = get_buffered_cstring(); + return aSTRING; + } +<INITIAL,ATTR>L\" yy_push_state(WSTRQUOTE); +<WSTRQUOTE>\" { + yy_pop_state(); + parser_lval.str = get_buffered_cstring(); + return aWSTRING; + } +<QUOTE,WSTRQUOTE>\\\\ | +<QUOTE,WSTRQUOTE>\\\" addcchar(yytext[1]); +<QUOTE,WSTRQUOTE>\\. addcchar('\\'); addcchar(yytext[1]); +<QUOTE,WSTRQUOTE>. addcchar(yytext[0]); +<INITIAL,ATTR>\[ yy_push_state(ATTR); return '['; +<ATTR>\] yy_pop_state(); return ']'; +<ATTR>{cident} return attr_token(yytext); +<ATTR>{uuid} { + parser_lval.uuid = parse_uuid(yytext); + return aUUID; + } +<INITIAL,ATTR>{hex} { + parser_lval.num = xstrtoul(yytext, NULL, 0); + return aHEXNUM; + } +<INITIAL,ATTR>{int} { + parser_lval.num = xstrtoul(yytext, NULL, 0); + return aNUM; + } +<INITIAL>{double} { + parser_lval.dbl = strtod(yytext, NULL); + return aDOUBLE; + } +SAFEARRAY{ws}*/\( return tSAFEARRAY; +{cident} return kw_token(yytext); +<INITIAL,ATTR>\n line_number++; +<INITIAL,ATTR>{ws} +<INITIAL,ATTR>\<\< return SHL; +<INITIAL,ATTR>\>\> return SHR; +<INITIAL,ATTR>\-\> return MEMBERPTR; +<INITIAL,ATTR>== return EQUALITY; +<INITIAL,ATTR>!= return INEQUALITY; +<INITIAL,ATTR>\>= return GREATEREQUAL; +<INITIAL,ATTR>\<= return LESSEQUAL; +<INITIAL,ATTR>\|\| return LOGICALOR; +<INITIAL,ATTR>&& return LOGICALAND; +<INITIAL,ATTR>. return yytext[0]; +<<EOF>> { + if (import_stack_ptr) + return aEOF; + else yyterminate(); + } +%% + +#ifndef parser_wrap +int parser_wrap(void) +{ + return 1; +} +#endif + +struct keyword { + const char *kw; + int token; +}; + +/* This table MUST be alphabetically sorted on the kw field */ +static const struct keyword keywords[] = { + {"FALSE", tFALSE}, + {"NULL", tNULL}, + {"TRUE", tTRUE}, + {"__cdecl", tCDECL}, + {"__fastcall", tFASTCALL}, + {"__int64", tINT64}, + {"__pascal", tPASCAL}, + {"__stdcall", tSTDCALL}, + {"_cdecl", tCDECL}, + {"_fastcall", tFASTCALL}, + {"_pascal", tPASCAL}, + {"_stdcall", tSTDCALL}, + {"boolean", tBOOLEAN}, + {"byte", tBYTE}, + {"case", tCASE}, + {"cdecl", tCDECL}, + {"char", tCHAR}, + {"coclass", tCOCLASS}, + {"const", tCONST}, + {"cpp_quote", tCPPQUOTE}, + {"default", tDEFAULT}, + {"dispinterface", tDISPINTERFACE}, + {"double", tDOUBLE}, + {"enum", tENUM}, + {"error_status_t", tERRORSTATUST}, + {"extern", tEXTERN}, + {"float", tFLOAT}, + {"handle_t", tHANDLET}, + {"hyper", tHYPER}, + {"import", tIMPORT}, + {"importlib", tIMPORTLIB}, + {"inline", tINLINE}, + {"int", tINT}, + {"interface", tINTERFACE}, + {"library", tLIBRARY}, + {"long", tLONG}, + {"methods", tMETHODS}, + {"module", tMODULE}, + {"pascal", tPASCAL}, + {"properties", tPROPERTIES}, + {"register", tREGISTER}, + {"short", tSHORT}, + {"signed", tSIGNED}, + {"sizeof", tSIZEOF}, + {"small", tSMALL}, + {"static", tSTATIC}, + {"stdcall", tSTDCALL}, + {"struct", tSTRUCT}, + {"switch", tSWITCH}, + {"typedef", tTYPEDEF}, + {"union", tUNION}, + {"unsigned", tUNSIGNED}, + {"void", tVOID}, + {"wchar_t", tWCHAR}, +}; +#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) + +/* keywords only recognized in attribute lists + * This table MUST be alphabetically sorted on the kw field + */ +static const struct keyword attr_keywords[] = +{ + {"aggregatable", tAGGREGATABLE}, + {"allocate", tALLOCATE}, + {"appobject", tAPPOBJECT}, + {"async", tASYNC}, + {"async_uuid", tASYNCUUID}, + {"auto_handle", tAUTOHANDLE}, + {"bindable", tBINDABLE}, + {"broadcast", tBROADCAST}, + {"byte_count", tBYTECOUNT}, + {"call_as", tCALLAS}, + {"callback", tCALLBACK}, + {"code", tCODE}, + {"comm_status", tCOMMSTATUS}, + {"context_handle", tCONTEXTHANDLE}, + {"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE}, + {"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE}, + {"control", tCONTROL}, + {"defaultcollelem", tDEFAULTCOLLELEM}, + {"defaultvalue", tDEFAULTVALUE}, + {"defaultvtable", tDEFAULTVTABLE}, + {"displaybind", tDISPLAYBIND}, + {"dllname", tDLLNAME}, + {"dual", tDUAL}, + {"endpoint", tENDPOINT}, + {"entry", tENTRY}, + {"explicit_handle", tEXPLICITHANDLE}, + {"handle", tHANDLE}, + {"helpcontext", tHELPCONTEXT}, + {"helpfile", tHELPFILE}, + {"helpstring", tHELPSTRING}, + {"helpstringcontext", tHELPSTRINGCONTEXT}, + {"helpstringdll", tHELPSTRINGDLL}, + {"hidden", tHIDDEN}, + {"id", tID}, + {"idempotent", tIDEMPOTENT}, + {"iid_is", tIIDIS}, + {"immediatebind", tIMMEDIATEBIND}, + {"implicit_handle", tIMPLICITHANDLE}, + {"in", tIN}, + {"in_line", tIN_LINE}, + {"input_sync", tINPUTSYNC}, + {"lcid", tLCID}, + {"length_is", tLENGTHIS}, + {"local", tLOCAL}, + {"nonbrowsable", tNONBROWSABLE}, + {"noncreatable", tNONCREATABLE}, + {"nonextensible", tNONEXTENSIBLE}, + {"object", tOBJECT}, + {"odl", tODL}, + {"oleautomation", tOLEAUTOMATION}, + {"optional", tOPTIONAL}, + {"out", tOUT}, + {"pointer_default", tPOINTERDEFAULT}, + {"propget", tPROPGET}, + {"propput", tPROPPUT}, + {"propputref", tPROPPUTREF}, + {"ptr", tPTR}, + {"public", tPUBLIC}, + {"range", tRANGE}, + {"readonly", tREADONLY}, + {"ref", tREF}, + {"requestedit", tREQUESTEDIT}, + {"restricted", tRESTRICTED}, + {"retval", tRETVAL}, + {"size_is", tSIZEIS}, + {"source", tSOURCE}, + {"strict_context_handle", tSTRICTCONTEXTHANDLE}, + {"string", tSTRING}, + {"switch_is", tSWITCHIS}, + {"switch_type", tSWITCHTYPE}, + {"transmit_as", tTRANSMITAS}, + {"unique", tUNIQUE}, + {"uuid", tUUID}, + {"v1_enum", tV1ENUM}, + {"vararg", tVARARG}, + {"version", tVERSION}, + {"wire_marshal", tWIREMARSHAL}, +}; + + +#define KWP(p) ((const struct keyword *)(p)) + +static int kw_cmp_func(const void *s1, const void *s2) +{ + return strcmp(KWP(s1)->kw, KWP(s2)->kw); +} + +static int kw_token(const char *kw) +{ + struct keyword key, *kwp; + key.kw = kw; + kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); + if (kwp) { + parser_lval.str = xstrdup(kwp->kw); + return kwp->token; + } + parser_lval.str = xstrdup(kw); + return is_type(kw) ? aKNOWNTYPE : aIDENTIFIER; +} + +static int attr_token(const char *kw) +{ + struct keyword key, *kwp; + key.kw = kw; + kwp = bsearch(&key, attr_keywords, sizeof(attr_keywords)/sizeof(attr_keywords[0]), + sizeof(attr_keywords[0]), kw_cmp_func); + if (kwp) { + parser_lval.str = xstrdup(kwp->kw); + return kwp->token; + } + return kw_token(kw); +} + +static void addcchar(char c) +{ + if(cbufidx >= cbufalloc) + { + cbufalloc += 1024; + cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); + if(cbufalloc > 65536) + parser_warning("Reallocating string buffer larger than 64kB\n"); + } + cbuffer[cbufidx++] = c; +} + +static char *get_buffered_cstring(void) +{ + addcchar(0); + return xstrdup(cbuffer); +} + +void pop_import(void) +{ + int ptr = import_stack_ptr-1; + + fclose(yyin); + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( import_stack[ptr].state ); + if (temp_name) { + unlink(temp_name); + free(temp_name); + } + temp_name = import_stack[ptr].temp_name; + input_name = import_stack[ptr].input_name; + line_number = import_stack[ptr].line_number; + import_stack_ptr--; +} + +struct imports { + char *name; + struct imports *next; +} *first_import; + +int do_import(char *fname) +{ + FILE *f; + char *path; + struct imports *import; + int ptr = import_stack_ptr; + int ret; + + import = first_import; + while (import && strcmp(import->name, fname)) + import = import->next; + if (import) return 0; /* already imported */ + + import = xmalloc(sizeof(struct imports)); + import->name = xstrdup(fname); + import->next = first_import; + first_import = import; + + /* don't search for a file name with a path in the include directories, + * for compatibility with MIDL */ + if (strchr( fname, '/' ) || strchr( fname, '\\' )) + path = strdup( fname ); + else if (!(path = wpp_find_include( fname, input_name ))) + error_loc("Unable to open include file %s\n", fname); + + import_stack[ptr].temp_name = temp_name; + import_stack[ptr].input_name = input_name; + import_stack[ptr].line_number = line_number; + import_stack_ptr++; + input_name = path; + line_number = 1; + + ret = wpp_parse_temp( path, NULL, &temp_name ); + if (ret) exit(1); + + if((f = fopen(temp_name, "r")) == NULL) + error_loc("Unable to open %s\n", temp_name); + + import_stack[ptr].state = YY_CURRENT_BUFFER; + yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE)); + return 1; +} + +void abort_import(void) +{ + int ptr; + + for (ptr=0; ptr<import_stack_ptr; ptr++) + unlink(import_stack[ptr].temp_name); +} Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/parser.l ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/tools/RosBE/RosBE-Windows/regtest/parser.y URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/regtest/…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/regtest/parser.y (added) +++ trunk/tools/RosBE/RosBE-Windows/regtest/parser.y [iso-8859-1] Sun Oct 18 20:40:13 2009 @@ -1,0 +1,1636 @@ +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +%{ + +#include "jscript.h" +#include "engine.h" + +#define YYLEX_PARAM ctx +#define YYPARSE_PARAM ctx + +static int parser_error(const char*); +static void set_error(parser_ctx_t*,UINT); +static BOOL explicit_error(parser_ctx_t*,void*,WCHAR); +static BOOL allow_auto_semicolon(parser_ctx_t*); +static void program_parsed(parser_ctx_t*,source_elements_t*); +static source_elements_t *function_body_parsed(parser_ctx_t*,source_elements_t*); + +typedef struct _statement_list_t { + statement_t *head; + statement_t *tail; +} statement_list_t; + +static literal_t *new_string_literal(parser_ctx_t*,const WCHAR*); +static literal_t *new_null_literal(parser_ctx_t*); +static literal_t *new_undefined_literal(parser_ctx_t*); +static literal_t *new_boolean_literal(parser_ctx_t*,VARIANT_BOOL); + +typedef struct _property_list_t { + prop_val_t *head; + prop_val_t *tail; +} property_list_t; + +static property_list_t *new_property_list(parser_ctx_t*,literal_t*,expression_t*); +static property_list_t *property_list_add(parser_ctx_t*,property_list_t*,literal_t*,expression_t*); + +typedef struct _element_list_t { + array_element_t *head; + array_element_t *tail; +} element_list_t; + +static element_list_t *new_element_list(parser_ctx_t*,int,expression_t*); +static element_list_t *element_list_add(parser_ctx_t*,element_list_t*,int,expression_t*); + +typedef struct _argument_list_t { + argument_t *head; + argument_t *tail; +} argument_list_t; + +static argument_list_t *new_argument_list(parser_ctx_t*,expression_t*); +static argument_list_t *argument_list_add(parser_ctx_t*,argument_list_t*,expression_t*); + +typedef struct _case_list_t { + case_clausule_t *head; + case_clausule_t *tail; +} case_list_t; + +static catch_block_t *new_catch_block(parser_ctx_t*,const WCHAR*,statement_t*); +static case_clausule_t *new_case_clausule(parser_ctx_t*,expression_t*,statement_list_t*); +static case_list_t *new_case_list(parser_ctx_t*,case_clausule_t*); +static case_list_t *case_list_add(parser_ctx_t*,case_list_t*,case_clausule_t*); +static case_clausule_t *new_case_block(parser_ctx_t*,case_list_t*,case_clausule_t*,case_list_t*); + +typedef struct _variable_list_t { + variable_declaration_t *head; + variable_declaration_t *tail; +} variable_list_t; + +static variable_declaration_t *new_variable_declaration(parser_ctx_t*,const WCHAR*,expression_t*); +static variable_list_t *new_variable_list(parser_ctx_t*,variable_declaration_t*); +static variable_list_t *variable_list_add(parser_ctx_t*,variable_list_t*,variable_declaration_t*); + +static statement_t *new_block_statement(parser_ctx_t*,statement_list_t*); +static statement_t *new_var_statement(parser_ctx_t*,variable_list_t*); +static statement_t *new_empty_statement(parser_ctx_t*); +static statement_t *new_expression_statement(parser_ctx_t*,expression_t*); +static statement_t *new_if_statement(parser_ctx_t*,expression_t*,statement_t*,statement_t*); +static statement_t *new_while_statement(parser_ctx_t*,BOOL,expression_t*,statement_t*); +static statement_t *new_for_statement(parser_ctx_t*,variable_list_t*,expression_t*,expression_t*, + expression_t*,statement_t*); +static statement_t *new_forin_statement(parser_ctx_t*,variable_declaration_t*,expression_t*,expression_t*,statement_t*); +static statement_t *new_continue_statement(parser_ctx_t*,const WCHAR*); +static statement_t *new_break_statement(parser_ctx_t*,const WCHAR*); +static statement_t *new_return_statement(parser_ctx_t*,expression_t*); +static statement_t *new_with_statement(parser_ctx_t*,expression_t*,statement_t*); +static statement_t *new_labelled_statement(parser_ctx_t*,const WCHAR*,statement_t*); +static statement_t *new_switch_statement(parser_ctx_t*,expression_t*,case_clausule_t*); +static statement_t *new_throw_statement(parser_ctx_t*,expression_t*); +static statement_t *new_try_statement(parser_ctx_t*,statement_t*,catch_block_t*,statement_t*); + +struct statement_list_t { + statement_t *head; + statement_t *tail; +}; + +static statement_list_t *new_statement_list(parser_ctx_t*,statement_t*); +static statement_list_t *statement_list_add(statement_list_t*,statement_t*); + +typedef struct _parameter_list_t { + parameter_t *head; + parameter_t *tail; +} parameter_list_t; + +static parameter_list_t *new_parameter_list(parser_ctx_t*,const WCHAR*); +static parameter_list_t *parameter_list_add(parser_ctx_t*,parameter_list_t*,const WCHAR*); + +static void push_func(parser_ctx_t*); +static inline void pop_func(parser_ctx_t *ctx) +{ + ctx->func_stack = ctx->func_stack->next; +} + +static expression_t *new_function_expression(parser_ctx_t*,const WCHAR*,parameter_list_t*, + source_elements_t*,const WCHAR*,DWORD); +static expression_t *new_binary_expression(parser_ctx_t*,expression_type_t,expression_t*,expression_t*); +static expression_t *new_unary_expression(parser_ctx_t*,expression_type_t,expression_t*); +static expression_t *new_conditional_expression(parser_ctx_t*,expression_t*,expression_t*,expression_t*); +static expression_t *new_array_expression(parser_ctx_t*,expression_t*,expression_t*); +static expression_t *new_member_expression(parser_ctx_t*,expression_t*,const WCHAR*); +static expression_t *new_new_expression(parser_ctx_t*,expression_t*,argument_list_t*); +static expression_t *new_call_expression(parser_ctx_t*,expression_t*,argument_list_t*); +static expression_t *new_this_expression(parser_ctx_t*); +static expression_t *new_identifier_expression(parser_ctx_t*,const WCHAR*); +static expression_t *new_literal_expression(parser_ctx_t*,literal_t*); +static expression_t *new_array_literal_expression(parser_ctx_t*,element_list_t*,int); +static expression_t *new_prop_and_value_expression(parser_ctx_t*,property_list_t*); + +static source_elements_t *new_source_elements(parser_ctx_t*); +static source_elements_t *source_elements_add_statement(source_elements_t*,statement_t*); + +%} + +%pure_parser +%start Program + +%union { + int ival; + const WCHAR *srcptr; + LPCWSTR wstr; + literal_t *literal; + struct _argument_list_t *argument_list; + case_clausule_t *case_clausule; + struct _case_list_t *case_list; + catch_block_t *catch_block; + struct _element_list_t *element_list; + expression_t *expr; + const WCHAR *identifier; + struct _parameter_list_t *parameter_list; + struct _property_list_t *property_list; + source_elements_t *source_elements; + statement_t *statement; + struct _statement_list_t *statement_list; + struct _variable_list_t *variable_list; + variable_declaration_t *variable_declaration; +} + +/* keywords */ +%token kBREAK kCASE kCATCH kCONTINUE kDEFAULT kDELETE kDO kELSE kIF kFINALLY kFOR kIN +%token kINSTANCEOF kNEW kNULL kUNDEFINED kRETURN kSWITCH kTHIS kTHROW kTRUE kFALSE kTRY kTYPEOF kVAR kVOID kWHILE kWITH +%token tANDAND tOROR tINC tDEC tHTMLCOMMENT + +%token <srcptr> kFUNCTION '}' + +/* tokens */ +%token <identifier> tIdentifier +%token <ival> tAssignOper tEqOper tShiftOper tRelOper +%token <literal> tNumericLiteral +%token <wstr> tStringLiteral + +%type <source_elements> SourceElements +%type <source_elements> FunctionBody +%type <statement> Statement +%type <statement> Block +%type <statement> VariableStatement +%type <statement> EmptyStatement +%type <statement> ExpressionStatement +%type <statement> IfStatement +%type <statement> IterationStatement +%type <statement> ContinueStatement +%type <statement> BreakStatement +%type <statement> ReturnStatement +%type <statement> WithStatement +%type <statement> LabelledStatement +%type <statement> SwitchStatement +%type <statement> ThrowStatement +%type <statement> TryStatement +%type <statement> Finally +%type <statement_list> StatementList StatementList_opt +%type <parameter_list> FormalParameterList FormalParameterList_opt +%type <expr> Expression Expression_opt Expression_err +%type <expr> ExpressionNoIn ExpressionNoIn_opt +%type <expr> FunctionExpression +%type <expr> AssignmentExpression AssignmentExpressionNoIn +%type <expr> ConditionalExpression ConditionalExpressionNoIn +%type <expr> LeftHandSideExpression +%type <expr> LogicalORExpression LogicalORExpressionNoIn +%type <expr> LogicalANDExpression LogicalANDExpressionNoIn +%type <expr> BitwiseORExpression BitwiseORExpressionNoIn +%type <expr> BitwiseXORExpression BitwiseXORExpressionNoIn +%type <expr> BitwiseANDExpression BitwiseANDExpressionNoIn +%type <expr> EqualityExpression EqualityExpressionNoIn +%type <expr> RelationalExpression RelationalExpressionNoIn +%type <expr> ShiftExpression +%type <expr> AdditiveExpression +%type <expr> MultiplicativeExpression +%type <expr> Initialiser_opt Initialiser +%type <expr> InitialiserNoIn_opt InitialiserNoIn +%type <expr> UnaryExpression +%type <expr> PostfixExpression +%type <expr> NewExpression +%type <expr> CallExpression +%type <expr> MemberExpression +%type <expr> PrimaryExpression +%type <identifier> Identifier_opt +%type <variable_list> VariableDeclarationList +%type <variable_list> VariableDeclarationListNoIn +%type <variable_declaration> VariableDeclaration +%type <variable_declaration> VariableDeclarationNoIn +%type <case_list> CaseClausules CaseClausules_opt +%type <case_clausule> CaseClausule DefaultClausule CaseBlock +%type <catch_block> Catch +%type <argument_list> Arguments +%type <argument_list> ArgumentList +%type <literal> Literal +%type <expr> ArrayLiteral +%type <expr> ObjectLiteral +%type <ival> Elision Elision_opt +%type <element_list> ElementList +%type <property_list> PropertyNameAndValueList +%type <literal> PropertyName +%type <literal> BooleanLiteral +%type <srcptr> KFunction + +%nonassoc LOWER_THAN_ELSE +%nonassoc kELSE + +%% + +/* ECMA-262 3rd Edition 14 */ +Program + : SourceElements HtmlComment + { program_parsed(ctx, $1); } + +HtmlComment + : tHTMLCOMMENT {} + | /* empty */ {} + +/* ECMA-262 3rd Edition 14 */ +SourceElements + : /* empty */ { $$ = new_source_elements(ctx); } + | SourceElements Statement + { $$ = source_elements_add_statement($1, $2); } + +/* ECMA-262 3rd Edition 13 */ +FunctionExpression + : KFunction Identifier_opt left_bracket FormalParameterList_opt right_bracket '{' FunctionBody '}' + { $$ = new_function_expression(ctx, $2, $4, $7, $1, $8-$1+1); } + +KFunction + : kFUNCTION { push_func(ctx); $$ = $1; } + +/* ECMA-262 3rd Edition 13 */ +FunctionBody + : SourceElements { $$ = function_body_parsed(ctx, $1); } + +/* ECMA-262 3rd Edition 13 */ +FormalParameterList + : tIdentifier { $$ = new_parameter_list(ctx, $1); } + | FormalParameterList ',' tIdentifier + { $$ = parameter_list_add(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 13 */ +FormalParameterList_opt + : /* empty */ { $$ = NULL; } + | FormalParameterList { $$ = $1; } + +/* ECMA-262 3rd Edition 12 */ +Statement + : Block { $$ = $1; } + | VariableStatement { $$ = $1; } + | EmptyStatement { $$ = $1; } + | ExpressionStatement { $$ = $1; } + | IfStatement { $$ = $1; } + | IterationStatement { $$ = $1; } + | ContinueStatement { $$ = $1; } + | BreakStatement { $$ = $1; } + | ReturnStatement { $$ = $1; } + | WithStatement { $$ = $1; } + | LabelledStatement { $$ = $1; } + | SwitchStatement { $$ = $1; } + | ThrowStatement { $$ = $1; } + | TryStatement { $$ = $1; } + +/* ECMA-262 3rd Edition 12.2 */ +StatementList + : Statement { $$ = new_statement_list(ctx, $1); } + | StatementList Statement + { $$ = statement_list_add($1, $2); } + +/* ECMA-262 3rd Edition 12.2 */ +StatementList_opt + : /* empty */ { $$ = NULL; } + | StatementList { $$ = $1; } + +/* ECMA-262 3rd Edition 12.1 */ +Block + : '{' StatementList '}' { $$ = new_block_statement(ctx, $2); } + | '{' '}' { $$ = new_block_statement(ctx, NULL); } + +/* ECMA-262 3rd Edition 12.2 */ +VariableStatement + : kVAR VariableDeclarationList semicolon_opt + { $$ = new_var_statement(ctx, $2); } + +/* ECMA-262 3rd Edition 12.2 */ +VariableDeclarationList + : VariableDeclaration { $$ = new_variable_list(ctx, $1); } + | VariableDeclarationList ',' VariableDeclaration + { $$ = variable_list_add(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 12.2 */ +VariableDeclarationListNoIn + : VariableDeclarationNoIn + { $$ = new_variable_list(ctx, $1); } + | VariableDeclarationListNoIn ',' VariableDeclarationNoIn + { $$ = variable_list_add(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 12.2 */ +VariableDeclaration + : tIdentifier Initialiser_opt + { $$ = new_variable_declaration(ctx, $1, $2); } + +/* ECMA-262 3rd Edition 12.2 */ +VariableDeclarationNoIn + : tIdentifier InitialiserNoIn_opt + { $$ = new_variable_declaration(ctx, $1, $2); } + +/* ECMA-262 3rd Edition 12.2 */ +Initialiser_opt + : /* empty */ { $$ = NULL; } + | Initialiser { $$ = $1; } + +/* ECMA-262 3rd Edition 12.2 */ +Initialiser + : '=' AssignmentExpression + { $$ = $2; } + +/* ECMA-262 3rd Edition 12.2 */ +InitialiserNoIn_opt + : /* empty */ { $$ = NULL; } + | InitialiserNoIn { $$ = $1; } + +/* ECMA-262 3rd Edition 12.2 */ +InitialiserNoIn + : '=' AssignmentExpressionNoIn + { $$ = $2; } + +/* ECMA-262 3rd Edition 12.3 */ +EmptyStatement + : ';' { $$ = new_empty_statement(ctx); } + +/* ECMA-262 3rd Edition 12.4 */ +ExpressionStatement + : Expression semicolon_opt + { $$ = new_expression_statement(ctx, $1); } + +/* ECMA-262 3rd Edition 12.5 */ +IfStatement + : kIF left_bracket Expression_err right_bracket Statement kELSE Statement + { $$ = new_if_statement(ctx, $3, $5, $7); } + | kIF left_bracket Expression_err right_bracket Statement %prec LOWER_THAN_ELSE + { $$ = new_if_statement(ctx, $3, $5, NULL); } + +/* ECMA-262 3rd Edition 12.6 */ +IterationStatement + : kDO Statement kWHILE left_bracket Expression_err right_bracket semicolon_opt + { $$ = new_while_statement(ctx, TRUE, $5, $2); } + | kWHILE left_bracket Expression_err right_bracket Statement + { $$ = new_while_statement(ctx, FALSE, $3, $5); } + | kFOR left_bracket ExpressionNoIn_opt + { if(!explicit_error(ctx, $3, ';')) YYABORT; } + semicolon Expression_opt + { if(!explicit_error(ctx, $6, ';')) YYABORT; } + semicolon Expression_opt right_bracket Statement + { $$ = new_for_statement(ctx, NULL, $3, $6, $9, $11); } + | kFOR left_bracket kVAR VariableDeclarationListNoIn + { if(!explicit_error(ctx, $4, ';')) YYABORT; } + semicolon Expression_opt + { if(!explicit_error(ctx, $7, ';')) YYABORT; } + semicolon Expression_opt right_bracket Statement + { $$ = new_for_statement(ctx, $4, NULL, $7, $10, $12); } + | kFOR left_bracket LeftHandSideExpression kIN Expression_err right_bracket Statement + { $$ = new_forin_statement(ctx, NULL, $3, $5, $7); } + | kFOR left_bracket kVAR VariableDeclarationNoIn kIN Expression_err right_bracket Statement + { $$ = new_forin_statement(ctx, $4, NULL, $6, $8); } + +/* ECMA-262 3rd Edition 12.7 */ +ContinueStatement + : kCONTINUE /* NONL */ Identifier_opt semicolon_opt + { $$ = new_continue_statement(ctx, $2); } + +/* ECMA-262 3rd Edition 12.8 */ +BreakStatement + : kBREAK /* NONL */ Identifier_opt semicolon_opt + { $$ = new_break_statement(ctx, $2); } + +/* ECMA-262 3rd Edition 12.9 */ +ReturnStatement + : kRETURN /* NONL */ Expression_opt semicolon_opt + { $$ = new_return_statement(ctx, $2); } + +/* ECMA-262 3rd Edition 12.10 */ +WithStatement + : kWITH left_bracket Expression right_bracket Statement + { $$ = new_with_statement(ctx, $3, $5); } + +/* ECMA-262 3rd Edition 12.12 */ +LabelledStatement + : tIdentifier ':' Statement + { $$ = new_labelled_statement(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 12.11 */ +SwitchStatement + : kSWITCH left_bracket Expression right_bracket CaseBlock + { $$ = new_switch_statement(ctx, $3, $5); } + +/* ECMA-262 3rd Edition 12.11 */ +CaseBlock + : '{' CaseClausules_opt '}' + { $$ = new_case_block(ctx, $2, NULL, NULL); } + | '{' CaseClausules_opt DefaultClausule CaseClausules_opt '}' + { $$ = new_case_block(ctx, $2, $3, $4); } + +/* ECMA-262 3rd Edition 12.11 */ +CaseClausules_opt + : /* empty */ { $$ = NULL; } + | CaseClausules { $$ = $1; } + +/* ECMA-262 3rd Edition 12.11 */ +CaseClausules + : CaseClausule { $$ = new_case_list(ctx, $1); } + | CaseClausules CaseClausule + { $$ = case_list_add(ctx, $1, $2); } + +/* ECMA-262 3rd Edition 12.11 */ +CaseClausule + : kCASE Expression ':' StatementList_opt + { $$ = new_case_clausule(ctx, $2, $4); } + +/* ECMA-262 3rd Edition 12.11 */ +DefaultClausule + : kDEFAULT ':' StatementList_opt + { $$ = new_case_clausule(ctx, NULL, $3); } + +/* ECMA-262 3rd Edition 12.13 */ +ThrowStatement + : kTHROW /* NONL */ Expression semicolon_opt + { $$ = new_throw_statement(ctx, $2); } + +/* ECMA-262 3rd Edition 12.14 */ +TryStatement + : kTRY Block Catch { $$ = new_try_statement(ctx, $2, $3, NULL); } + | kTRY Block Finally { $$ = new_try_statement(ctx, $2, NULL, $3); } + | kTRY Block Catch Finally + { $$ = new_try_statement(ctx, $2, $3, $4); } + +/* ECMA-262 3rd Edition 12.14 */ +Catch + : kCATCH left_bracket tIdentifier right_bracket Block + { $$ = new_catch_block(ctx, $3, $5); } + +/* ECMA-262 3rd Edition 12.14 */ +Finally + : kFINALLY Block { $$ = $2; } + +/* ECMA-262 3rd Edition 11.14 */ +Expression_opt + : /* empty */ { $$ = NULL; } + | Expression { $$ = $1; } + +Expression_err + : Expression { $$ = $1; } + | error { set_error(ctx, IDS_SYNTAX_ERROR); YYABORT; } + +/* ECMA-262 3rd Edition 11.14 */ +Expression + : AssignmentExpression { $$ = $1; } + | Expression ',' AssignmentExpression + { $$ = new_binary_expression(ctx, EXPR_COMMA, $1, $3); } + +/* ECMA-262 3rd Edition 11.14 */ +ExpressionNoIn_opt + : /* empty */ { $$ = NULL; } + | ExpressionNoIn { $$ = $1; } + +/* ECMA-262 3rd Edition 11.14 */ +ExpressionNoIn + : AssignmentExpressionNoIn + { $$ = $1; } + | ExpressionNoIn ',' AssignmentExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_COMMA, $1, $3); } + +/* ECMA-262 3rd Edition 11.13 */ +AssignmentExpression + : ConditionalExpression { $$ = $1; } + | LeftHandSideExpression '=' AssignmentExpression + { $$ = new_binary_expression(ctx, EXPR_ASSIGN, $1, $3); } + | LeftHandSideExpression tAssignOper AssignmentExpression + { $$ = new_binary_expression(ctx, $2, $1, $3); } + +/* ECMA-262 3rd Edition 11.13 */ +AssignmentExpressionNoIn + : ConditionalExpressionNoIn + { $$ = $1; } + | LeftHandSideExpression '=' AssignmentExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_ASSIGN, $1, $3); } + | LeftHandSideExpression tAssignOper AssignmentExpressionNoIn + { $$ = new_binary_expression(ctx, $2, $1, $3); } + +/* ECMA-262 3rd Edition 11.12 */ +ConditionalExpression + : LogicalORExpression { $$ = $1; } + | LogicalORExpression '?' AssignmentExpression ':' AssignmentExpression + { $$ = new_conditional_expression(ctx, $1, $3, $5); } + +/* ECMA-262 3rd Edition 11.12 */ +ConditionalExpressionNoIn + : LogicalORExpressionNoIn + { $$ = $1; } + | LogicalORExpressionNoIn '?' AssignmentExpressionNoIn ':' AssignmentExpressionNoIn + { $$ = new_conditional_expression(ctx, $1, $3, $5); } + +/* ECMA-262 3rd Edition 11.11 */ +LogicalORExpression + : LogicalANDExpression { $$ = $1; } + | LogicalORExpression tOROR LogicalANDExpression + { $$ = new_binary_expression(ctx, EXPR_OR, $1, $3); } + +/* ECMA-262 3rd Edition 11.11 */ +LogicalORExpressionNoIn + : LogicalANDExpressionNoIn + { $$ = $1; } + | LogicalORExpressionNoIn tOROR LogicalANDExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_OR, $1, $3); } + +/* ECMA-262 3rd Edition 11.11 */ +LogicalANDExpression + : BitwiseORExpression { $$ = $1; } + | LogicalANDExpression tANDAND BitwiseORExpression + { $$ = new_binary_expression(ctx, EXPR_AND, $1, $3); } + +/* ECMA-262 3rd Edition 11.11 */ +LogicalANDExpressionNoIn + : BitwiseORExpressionNoIn + { $$ = $1; } + | LogicalANDExpressionNoIn tANDAND BitwiseORExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_AND, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseORExpression + : BitwiseXORExpression { $$ = $1; } + | BitwiseORExpression '|' BitwiseXORExpression + { $$ = new_binary_expression(ctx, EXPR_BOR, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseORExpressionNoIn + : BitwiseXORExpressionNoIn + { $$ = $1; } + | BitwiseORExpressionNoIn '|' BitwiseXORExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_BOR, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseXORExpression + : BitwiseANDExpression { $$ = $1; } + | BitwiseXORExpression '^' BitwiseANDExpression + { $$ = new_binary_expression(ctx, EXPR_BXOR, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseXORExpressionNoIn + : BitwiseANDExpressionNoIn + { $$ = $1; } + | BitwiseXORExpressionNoIn '^' BitwiseANDExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_BXOR, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseANDExpression + : EqualityExpression { $$ = $1; } + | BitwiseANDExpression '&' EqualityExpression + { $$ = new_binary_expression(ctx, EXPR_BAND, $1, $3); } + +/* ECMA-262 3rd Edition 11.10 */ +BitwiseANDExpressionNoIn + : EqualityExpressionNoIn + { $$ = $1; } + | BitwiseANDExpressionNoIn '&' EqualityExpressionNoIn + { $$ = new_binary_expression(ctx, EXPR_BAND, $1, $3); } + +/* ECMA-262 3rd Edition 11.9 */ +EqualityExpression + : RelationalExpression { $$ = $1; } + | EqualityExpression tEqOper RelationalExpression + { $$ = new_binary_expression(ctx, $2, $1, $3); } + +/* ECMA-262 3rd Edition 11.9 */ +EqualityExpressionNoIn + : RelationalExpressionNoIn { $$ = $1; } + | EqualityExpressionNoIn tEqOper RelationalExpressionNoIn + { $$ = new_binary_expression(ctx, $2, $1, $3); } + +/* ECMA-262 3rd Edition 11.8 */ +RelationalExpression + : ShiftExpression { $$ = $1; } + | RelationalExpression tRelOper ShiftExpression + { $$ = new_binary_expression(ctx, $2, $1, $3); } + | RelationalExpression kINSTANCEOF ShiftExpression + { $$ = new_binary_expression(ctx, EXPR_INSTANCEOF, $1, $3); } + | RelationalExpression kIN ShiftExpression + { $$ = new_binary_expression(ctx, EXPR_IN, $1, $3); } + +/* ECMA-262 3rd Edition 11.8 */ +RelationalExpressionNoIn + : ShiftExpression { $$ = $1; } + | RelationalExpressionNoIn tRelOper ShiftExpression + { $$ = new_binary_expression(ctx, $2, $1, $3); } + | RelationalExpressionNoIn kINSTANCEOF ShiftExpression + { $$ = new_binary_expression(ctx, EXPR_INSTANCEOF, $1, $3); } + +/* ECMA-262 3rd Edition 11.7 */ +ShiftExpression + : AdditiveExpression { $$ = $1; } + | ShiftExpression tShiftOper AdditiveExpression + { $$ = new_binary_expression(ctx, $2, $1, $3); } + +/* ECMA-262 3rd Edition 11.6 */ +AdditiveExpression + : MultiplicativeExpression + { $$ = $1; } + | AdditiveExpression '+' MultiplicativeExpression + { $$ = new_binary_expression(ctx, EXPR_ADD, $1, $3); } + | AdditiveExpression '-' MultiplicativeExpression + { $$ = new_binary_expression(ctx, EXPR_SUB, $1, $3); } + +/* ECMA-262 3rd Edition 11.5 */ +MultiplicativeExpression + : UnaryExpression { $$ = $1; } + | MultiplicativeExpression '*' UnaryExpression + { $$ = new_binary_expression(ctx, EXPR_MUL, $1, $3); } + | MultiplicativeExpression '/' UnaryExpression + { $$ = new_binary_expression(ctx, EXPR_DIV, $1, $3); } + | MultiplicativeExpression '%' UnaryExpression + { $$ = new_binary_expression(ctx, EXPR_MOD, $1, $3); } + +/* ECMA-262 3rd Edition 11.4 */ +UnaryExpression + : PostfixExpression { $$ = $1; } + | kDELETE UnaryExpression + { $$ = new_unary_expression(ctx, EXPR_DELETE, $2); } + | kVOID UnaryExpression { $$ = new_unary_expression(ctx, EXPR_VOID, $2); } + | kTYPEOF UnaryExpression + { $$ = new_unary_expression(ctx, EXPR_TYPEOF, $2); } + | tINC UnaryExpression { $$ = new_unary_expression(ctx, EXPR_PREINC, $2); } + | tDEC UnaryExpression { $$ = new_unary_expression(ctx, EXPR_PREDEC, $2); } + | '+' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_PLUS, $2); } + | '-' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_MINUS, $2); } + | '~' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_BITNEG, $2); } + | '!' UnaryExpression { $$ = new_unary_expression(ctx, EXPR_LOGNEG, $2); } + +/* ECMA-262 3rd Edition 11.2 */ +PostfixExpression + : LeftHandSideExpression + { $$ = $1; } + | LeftHandSideExpression /* NONL */ tINC + { $$ = new_unary_expression(ctx, EXPR_POSTINC, $1); } + | LeftHandSideExpression /* NONL */ tDEC + { $$ = new_unary_expression(ctx, EXPR_POSTDEC, $1); } + + +/* ECMA-262 3rd Edition 11.2 */ +LeftHandSideExpression + : NewExpression { $$ = $1; } + | CallExpression { $$ = $1; } + +/* ECMA-262 3rd Edition 11.2 */ +NewExpression + : MemberExpression { $$ = $1; } + | kNEW NewExpression { $$ = new_new_expression(ctx, $2, NULL); } + +/* ECMA-262 3rd Edition 11.2 */ +MemberExpression + : PrimaryExpression { $$ = $1; } + | FunctionExpression { $$ = $1; } + | MemberExpression '[' Expression ']' + { $$ = new_array_expression(ctx, $1, $3); } + | MemberExpression '.' tIdentifier + { $$ = new_member_expression(ctx, $1, $3); } + | kNEW MemberExpression Arguments + { $$ = new_new_expression(ctx, $2, $3); } + +/* ECMA-262 3rd Edition 11.2 */ +CallExpression + : MemberExpression Arguments + { $$ = new_call_expression(ctx, $1, $2); } + | CallExpression Arguments + { $$ = new_call_expression(ctx, $1, $2); } + | CallExpression '[' Expression ']' + { $$ = new_array_expression(ctx, $1, $3); } + | CallExpression '.' tIdentifier + { $$ = new_member_expression(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 11.2 */ +Arguments + : '(' ')' { $$ = NULL; } + | '(' ArgumentList ')' { $$ = $2; } + +/* ECMA-262 3rd Edition 11.2 */ +ArgumentList + : AssignmentExpression { $$ = new_argument_list(ctx, $1); } + | ArgumentList ',' AssignmentExpression + { $$ = argument_list_add(ctx, $1, $3); } + +/* ECMA-262 3rd Edition 11.1 */ +PrimaryExpression + : kTHIS { $$ = new_this_expression(ctx); } + | tIdentifier { $$ = new_identifier_expression(ctx, $1); } + | Literal { $$ = new_literal_expression(ctx, $1); } + | ArrayLiteral { $$ = $1; } + | ObjectLiteral { $$ = $1; } + | '(' Expression ')' { $$ = $2; } + +/* ECMA-262 3rd Edition 11.1.4 */ +ArrayLiteral + : '[' ']' { $$ = new_array_literal_expression(ctx, NULL, 0); } + | '[' Elision ']' { $$ = new_array_literal_expression(ctx, NULL, $2+1); } + | '[' ElementList ']' { $$ = new_array_literal_expression(ctx, $2, 0); } + | '[' ElementList ',' Elision_opt ']' + { $$ = new_array_literal_expression(ctx, $2, $4+1); } + +/* ECMA-262 3rd Edition 11.1.4 */ +ElementList + : Elision_opt AssignmentExpression + { $$ = new_element_list(ctx, $1, $2); } + | ElementList ',' Elision_opt AssignmentExpression + { $$ = element_list_add(ctx, $1, $3, $4); } + +/* ECMA-262 3rd Edition 11.1.4 */ +Elision + : ',' { $$ = 1; } + | Elision ',' { $$ = $1 + 1; } + +/* ECMA-262 3rd Edition 11.1.4 */ +Elision_opt + : /* empty */ { $$ = 0; } + | Elision { $$ = $1; } + +/* ECMA-262 3rd Edition 11.1.5 */ +ObjectLiteral + : '{' '}' { $$ = new_prop_and_value_expression(ctx, NULL); } + | '{' PropertyNameAndValueList '}' + { $$ = new_prop_and_value_expression(ctx, $2); } + +/* ECMA-262 3rd Edition 11.1.5 */ +PropertyNameAndValueList + : PropertyName ':' AssignmentExpression + { $$ = new_property_list(ctx, $1, $3); } + | PropertyNameAndValueList ',' PropertyName ':' AssignmentExpression + { $$ = property_list_add(ctx, $1, $3, $5); } + +/* ECMA-262 3rd Edition 11.1.5 */ +PropertyName + : tIdentifier { $$ = new_string_literal(ctx, $1); } + | tStringLiteral { $$ = new_string_literal(ctx, $1); } + | tNumericLiteral { $$ = $1; } + +/* ECMA-262 3rd Edition 7.6 */ +Identifier_opt + : /* empty*/ { $$ = NULL; } + | tIdentifier { $$ = $1; } + +/* ECMA-262 3rd Edition 7.8 */ +Literal + : kNULL { $$ = new_null_literal(ctx); } + | kUNDEFINED { $$ = new_undefined_literal(ctx); } + | BooleanLiteral { $$ = $1; } + | tNumericLiteral { $$ = $1; } + | tStringLiteral { $$ = new_string_literal(ctx, $1); } + | '/' { $$ = parse_regexp(ctx); + if(!$$) YYABORT; } + +/* ECMA-262 3rd Edition 7.8.2 */ +BooleanLiteral + : kTRUE { $$ = new_boolean_literal(ctx, TRUE); } + | kFALSE { $$ = new_boolean_literal(ctx, FALSE); } + +semicolon_opt + : ';' + | error { if(!allow_auto_semicolon(ctx)) {YYABORT;} } + +left_bracket + : '(' + | error { set_error(ctx, IDS_LBRACKET); YYABORT; } + +right_bracket + : ')' + | error { set_error(ctx, IDS_RBRACKET); YYABORT; } + +semicolon + : ';' + | error { set_error(ctx, IDS_SEMICOLON); YYABORT; } + +%% + +static BOOL allow_auto_semicolon(parser_ctx_t *ctx) +{ + return ctx->nl || ctx->ptr == ctx->end || *(ctx->ptr-1) == '}'; +} + +static literal_t *new_string_literal(parser_ctx_t *ctx, const WCHAR *str) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->vt = VT_BSTR; + ret->u.wstr = str; + + return ret; +} + +static literal_t *new_null_literal(parser_ctx_t *ctx) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->vt = VT_NULL; + + return ret; +} + +static literal_t *new_undefined_literal(parser_ctx_t *ctx) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->vt = VT_EMPTY; + + return ret; +} + +static literal_t *new_boolean_literal(parser_ctx_t *ctx, VARIANT_BOOL bval) +{ + literal_t *ret = parser_alloc(ctx, sizeof(literal_t)); + + ret->vt = VT_BOOL; + ret->u.bval = bval; + + return ret; +} + +static prop_val_t *new_prop_val(parser_ctx_t *ctx, literal_t *name, expression_t *value) +{ + prop_val_t *ret = parser_alloc(ctx, sizeof(prop_val_t)); + + ret->name = name; + ret->value = value; + ret->next = NULL; + + return ret; +} + +static property_list_t *new_property_list(parser_ctx_t *ctx, literal_t *name, expression_t *value) +{ + property_list_t *ret = parser_alloc_tmp(ctx, sizeof(property_list_t)); + + ret->head = ret->tail = new_prop_val(ctx, name, value); + + return ret; +} + +static property_list_t *property_list_add(parser_ctx_t *ctx, property_list_t *list, literal_t *name, expression_t *value) +{ + list->tail = list->tail->next = new_prop_val(ctx, name, value); + + return list; +} + +static array_element_t *new_array_element(parser_ctx_t *ctx, int elision, expression_t *expr) +{ + array_element_t *ret = parser_alloc(ctx, sizeof(array_element_t)); + + ret->elision = elision; + ret->expr = expr; + ret->next = NULL; + + return ret; +} + +static element_list_t *new_element_list(parser_ctx_t *ctx, int elision, expression_t *expr) +{ + element_list_t *ret = parser_alloc_tmp(ctx, sizeof(element_list_t)); + + ret->head = ret->tail = new_array_element(ctx, elision, expr); + + return ret; +} + +static element_list_t *element_list_add(parser_ctx_t *ctx, element_list_t *list, int elision, expression_t *expr) +{ + list->tail = list->tail->next = new_array_element(ctx, elision, expr); + + return list; +} + +static argument_t *new_argument(parser_ctx_t *ctx, expression_t *expr) +{ + argument_t *ret = parser_alloc(ctx, sizeof(argument_t)); + + ret->expr = expr; + ret->next = NULL; + + return ret; +} + +static argument_list_t *new_argument_list(parser_ctx_t *ctx, expression_t *expr) +{ + argument_list_t *ret = parser_alloc_tmp(ctx, sizeof(argument_list_t)); + + ret->head = ret->tail = new_argument(ctx, expr); + + return ret; +} + +static argument_list_t *argument_list_add(parser_ctx_t *ctx, argument_list_t *list, expression_t *expr) +{ + list->tail = list->tail->next = new_argument(ctx, expr); + + return list; +} + +static catch_block_t *new_catch_block(parser_ctx_t *ctx, const WCHAR *identifier, statement_t *statement) +{ + catch_block_t *ret = parser_alloc(ctx, sizeof(catch_block_t)); + + ret->identifier = identifier; + ret->statement = statement; + + return ret; +} + +static case_clausule_t *new_case_clausule(parser_ctx_t *ctx, expression_t *expr, statement_list_t *stat_list) +{ + case_clausule_t *ret = parser_alloc(ctx, sizeof(case_clausule_t)); + + ret->expr = expr; + ret->stat = stat_list ? stat_list->head : NULL; + ret->next = NULL; + + return ret; +} + +static case_list_t *new_case_list(parser_ctx_t *ctx, case_clausule_t *case_clausule) +{ + case_list_t *ret = parser_alloc_tmp(ctx, sizeof(case_list_t)); + + ret->head = ret->tail = case_clausule; + + return ret; +} + +static case_list_t *case_list_add(parser_ctx_t *ctx, case_list_t *list, case_clausule_t *case_clausule) +{ + list->tail = list->tail->next = case_clausule; + + return list; +} + +static case_clausule_t *new_case_block(parser_ctx_t *ctx, case_list_t *case_list1, + case_clausule_t *default_clausule, case_list_t *case_list2) +{ + case_clausule_t *ret = NULL, *iter = NULL, *iter2; + statement_t *stat = NULL; + + if(case_list1) { + ret = case_list1->head; + iter = case_list1->tail; + } + + if(default_clausule) { + if(ret) + iter = iter->next = default_clausule; + else + ret = iter = default_clausule; + } + + if(case_list2) { + if(ret) + iter->next = case_list2->head; + else + ret = case_list2->head; + } + + if(!ret) + return NULL; + + for(iter = ret; iter; iter = iter->next) { + for(iter2 = iter; iter2 && !iter2->stat; iter2 = iter2->next); + if(!iter2) + break; + + while(iter != iter2) { + iter->stat = iter2->stat; + iter = iter->next; + } + + if(stat) { + while(stat->next) + stat = stat->next; + stat->next = iter->stat; + }else { + stat = iter->stat; + } + } + + return ret; +} + +static statement_t *new_block_statement(parser_ctx_t *ctx, statement_list_t *list) +{ + block_statement_t *ret = parser_alloc(ctx, sizeof(block_statement_t)); + + ret->stat.eval = block_statement_eval; + ret->stat.next = NULL; + ret->stat_list = list ? list->head : NULL; + + return &ret->stat; +} + +static variable_declaration_t *new_variable_declaration(parser_ctx_t *ctx, const WCHAR *identifier, expression_t *expr) +{ + variable_declaration_t *ret = parser_alloc(ctx, sizeof(variable_declaration_t)); + var_list_t *var_list = parser_alloc(ctx, sizeof(var_list_t)); + + ret->identifier = identifier; + ret->expr = expr; + ret->next = NULL; + + var_list->identifier = identifier; + var_list->next = NULL; + + if(ctx->func_stack->var_tail) + ctx->func_stack->var_tail = ctx->func_stack->var_tail->next = var_list; + else + ctx->func_stack->var_head = ctx->func_stack->var_tail = var_list; + + return ret; +} + +static variable_list_t *new_variable_list(parser_ctx_t *ctx, variable_declaration_t *decl) +{ + variable_list_t *ret = parser_alloc_tmp(ctx, sizeof(variable_list_t)); + + ret->head = ret->tail = decl; + + return ret; +} + +static variable_list_t *variable_list_add(parser_ctx_t *ctx, variable_list_t *list, variable_declaration_t *decl) +{ + list->tail = list->tail->next = decl; + + return list; +} + +static statement_t *new_var_statement(parser_ctx_t *ctx, variable_list_t *variable_list) +{ + var_statement_t *ret = parser_alloc(ctx, sizeof(var_statement_t)); + + ret->stat.eval = var_statement_eval; + ret->stat.next = NULL; + ret->variable_list = variable_list->head; + + return &ret->stat; +} + +static statement_t *new_empty_statement(parser_ctx_t *ctx) +{ + statement_t *ret = parser_alloc(ctx, sizeof(statement_t)); + + ret->eval = empty_statement_eval; + ret->next = NULL; + + return ret; +} + +static statement_t *new_expression_statement(parser_ctx_t *ctx, expression_t *expr) +{ + expression_statement_t *ret = parser_alloc(ctx, sizeof(expression_statement_t)); + + ret->stat.eval = expression_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + + return &ret->stat; +} + +static statement_t *new_if_statement(parser_ctx_t *ctx, expression_t *expr, statement_t *if_stat, statement_t *else_stat) +{ + if_statement_t *ret = parser_alloc(ctx, sizeof(if_statement_t)); + + ret->stat.eval = if_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + ret->if_stat = if_stat; + ret->else_stat = else_stat; + + return &ret->stat; +} + +static statement_t *new_while_statement(parser_ctx_t *ctx, BOOL dowhile, expression_t *expr, statement_t *stat) +{ + while_statement_t *ret = parser_alloc(ctx, sizeof(while_statement_t)); + + ret->stat.eval = while_statement_eval; + ret->stat.next = NULL; + ret->do_while = dowhile; + ret->expr = expr; + ret->statement = stat; + + return &ret->stat; +} + +static statement_t *new_for_statement(parser_ctx_t *ctx, variable_list_t *variable_list, expression_t *begin_expr, + expression_t *expr, expression_t *end_expr, statement_t *statement) +{ + for_statement_t *ret = parser_alloc(ctx, sizeof(for_statement_t)); + + ret->stat.eval = for_statement_eval; + ret->stat.next = NULL; + ret->variable_list = variable_list ? variable_list->head : NULL; + ret->begin_expr = begin_expr; + ret->expr = expr; + ret->end_expr = end_expr; + ret->statement = statement; + + return &ret->stat; +} + +static statement_t *new_forin_statement(parser_ctx_t *ctx, variable_declaration_t *variable, expression_t *expr, + expression_t *in_expr, statement_t *statement) +{ + forin_statement_t *ret = parser_alloc(ctx, sizeof(forin_statement_t)); + + ret->stat.eval = forin_statement_eval; + ret->stat.next = NULL; + ret->variable = variable; + ret->expr = expr; + ret->in_expr = in_expr; + ret->statement = statement; + + return &ret->stat; +} + +static statement_t *new_continue_statement(parser_ctx_t *ctx, const WCHAR *identifier) +{ + branch_statement_t *ret = parser_alloc(ctx, sizeof(branch_statement_t)); + + ret->stat.eval = continue_statement_eval; + ret->stat.next = NULL; + ret->identifier = identifier; + + return &ret->stat; +} + +static statement_t *new_break_statement(parser_ctx_t *ctx, const WCHAR *identifier) +{ + branch_statement_t *ret = parser_alloc(ctx, sizeof(branch_statement_t)); + + ret->stat.eval = break_statement_eval; + ret->stat.next = NULL; + ret->identifier = identifier; + + return &ret->stat; +} + +static statement_t *new_return_statement(parser_ctx_t *ctx, expression_t *expr) +{ + expression_statement_t *ret = parser_alloc(ctx, sizeof(expression_statement_t)); + + ret->stat.eval = return_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + + return &ret->stat; +} + +static statement_t *new_with_statement(parser_ctx_t *ctx, expression_t *expr, statement_t *statement) +{ + with_statement_t *ret = parser_alloc(ctx, sizeof(with_statement_t)); + + ret->stat.eval = with_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + ret->statement = statement; + + return &ret->stat; +} + +static statement_t *new_labelled_statement(parser_ctx_t *ctx, const WCHAR *identifier, statement_t *statement) +{ + labelled_statement_t *ret = parser_alloc(ctx, sizeof(labelled_statement_t)); + + ret->stat.eval = labelled_statement_eval; + ret->stat.next = NULL; + ret->identifier = identifier; + ret->statement = statement; + + return &ret->stat; +} + +static statement_t *new_switch_statement(parser_ctx_t *ctx, expression_t *expr, case_clausule_t *case_list) +{ + switch_statement_t *ret = parser_alloc(ctx, sizeof(switch_statement_t)); + + ret->stat.eval = switch_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + ret->case_list = case_list; + + return &ret->stat; +} + +static statement_t *new_throw_statement(parser_ctx_t *ctx, expression_t *expr) +{ + expression_statement_t *ret = parser_alloc(ctx, sizeof(expression_statement_t)); + + ret->stat.eval = throw_statement_eval; + ret->stat.next = NULL; + ret->expr = expr; + + return &ret->stat; +} + +static statement_t *new_try_statement(parser_ctx_t *ctx, statement_t *try_statement, + catch_block_t *catch_block, statement_t *finally_statement) +{ + try_statement_t *ret = parser_alloc(ctx, sizeof(try_statement_t)); + + ret->stat.eval = try_statement_eval; + ret->stat.next = NULL; + ret->try_statement = try_statement; + ret->catch_block = catch_block; + ret->finally_statement = finally_statement; + + return &ret->stat; +} + +static parameter_t *new_parameter(parser_ctx_t *ctx, const WCHAR *identifier) +{ + parameter_t *ret = parser_alloc(ctx, sizeof(parameter_t)); + + ret->identifier = identifier; + ret->next = NULL; + + return ret; +} + +static parameter_list_t *new_parameter_list(parser_ctx_t *ctx, const WCHAR *identifier) +{ + parameter_list_t *ret = parser_alloc_tmp(ctx, sizeof(parameter_list_t)); + + ret->head = ret->tail = new_parameter(ctx, identifier); + + return ret; +} + +static parameter_list_t *parameter_list_add(parser_ctx_t *ctx, parameter_list_t *list, const WCHAR *identifier) +{ + list->tail = list->tail->next = new_parameter(ctx, identifier); + + return list; +} + +static expression_t *new_function_expression(parser_ctx_t *ctx, const WCHAR *identifier, + parameter_list_t *parameter_list, source_elements_t *source_elements, const WCHAR *src_str, DWORD src_len) +{ + function_expression_t *ret = parser_alloc(ctx, sizeof(function_expression_t)); + + ret->expr.eval = function_expression_eval; + ret->identifier = identifier; + ret->parameter_list = parameter_list ? parameter_list->head : NULL; + ret->source_elements = source_elements; + ret->src_str = src_str; + ret->src_len = src_len; + + if(ret->identifier) { + function_declaration_t *decl = parser_alloc(ctx, sizeof(function_declaration_t)); + + decl->expr = ret; + decl->next = NULL; + + if(ctx->func_stack->func_tail) + ctx->func_stack->func_tail = ctx->func_stack->func_tail->next = decl; + else + ctx->func_stack->func_head = ctx->func_stack->func_tail = decl; + } + + return &ret->expr; +} + +static const expression_eval_t expression_eval_table[] = { + comma_expression_eval, + logical_or_expression_eval, + logical_and_expression_eval, + binary_or_expression_eval, + binary_xor_expression_eval, + binary_and_expression_eval, + instanceof_expression_eval, + in_expression_eval, + add_expression_eval, + sub_expression_eval, + mul_expression_eval, + div_expression_eval, + mod_expression_eval, + delete_expression_eval, + void_expression_eval, + typeof_expression_eval, + minus_expression_eval, + plus_expression_eval, + post_increment_expression_eval, + post_decrement_expression_eval, + pre_increment_expression_eval, + pre_decrement_expression_eval, + equal_expression_eval, + equal2_expression_eval, + not_equal_expression_eval, + not_equal2_expression_eval, + less_expression_eval, + lesseq_expression_eval, + greater_expression_eval, + greatereq_expression_eval, + binary_negation_expression_eval, + logical_negation_expression_eval, + left_shift_expression_eval, + right_shift_expression_eval, + right2_shift_expression_eval, + assign_expression_eval, + assign_lshift_expression_eval, + assign_rshift_expression_eval, + assign_rrshift_expression_eval, + assign_add_expression_eval, + assign_sub_expression_eval, + assign_mul_expression_eval, + assign_div_expression_eval, + assign_mod_expression_eval, + assign_and_expression_eval, + assign_or_expression_eval, + assign_xor_expression_eval, +}; + +static expression_t *new_binary_expression(parser_ctx_t *ctx, expression_type_t type, + expression_t *expression1, expression_t *expression2) +{ + binary_expression_t *ret = parser_alloc(ctx, sizeof(binary_expression_t)); + + ret->expr.eval = expression_eval_table[type]; + ret->expression1 = expression1; + ret->expression2 = expression2; + + return &ret->expr; +} + +static expression_t *new_unary_expression(parser_ctx_t *ctx, expression_type_t type, expression_t *expression) +{ + unary_expression_t *ret = parser_alloc(ctx, sizeof(unary_expression_t)); + + ret->expr.eval = expression_eval_table[type]; + ret->expression = expression; + + return &ret->expr; +} + +static expression_t *new_conditional_expression(parser_ctx_t *ctx, expression_t *expression, + expression_t *true_expression, expression_t *false_expression) +{ + conditional_expression_t *ret = parser_alloc(ctx, sizeof(conditional_expression_t)); + + ret->expr.eval = conditional_expression_eval; + ret->expression = expression; + ret->true_expression = true_expression; + ret->false_expression = false_expression; + + return &ret->expr; +} + +static expression_t *new_array_expression(parser_ctx_t *ctx, expression_t *member_expr, expression_t *expression) +{ + array_expression_t *ret = parser_alloc(ctx, sizeof(array_expression_t)); + + ret->expr.eval = array_expression_eval; + ret->member_expr = member_expr; + ret->expression = expression; + + return &ret->expr; +} + +static expression_t *new_member_expression(parser_ctx_t *ctx, expression_t *expression, const WCHAR *identifier) +{ + member_expression_t *ret = parser_alloc(ctx, sizeof(member_expression_t)); + + ret->expr.eval = member_expression_eval; + ret->expression = expression; + ret->identifier = identifier; + + return &ret->expr; +} + +static expression_t *new_new_expression(parser_ctx_t *ctx, expression_t *expression, argument_list_t *argument_list) +{ + call_expression_t *ret = parser_alloc(ctx, sizeof(call_expression_t)); + + ret->expr.eval = new_expression_eval; + ret->expression = expression; + ret->argument_list = argument_list ? argument_list->head : NULL; + + return &ret->expr; +} + +static expression_t *new_call_expression(parser_ctx_t *ctx, expression_t *expression, argument_list_t *argument_list) +{ + call_expression_t *ret = parser_alloc(ctx, sizeof(call_expression_t)); + + ret->expr.eval = call_expression_eval; + ret->expression = expression; + ret->argument_list = argument_list ? argument_list->head : NULL; + + return &ret->expr; +} + +static expression_t *new_this_expression(parser_ctx_t *ctx) +{ + expression_t *ret = parser_alloc(ctx, sizeof(expression_t)); + + ret->eval = this_expression_eval; + + return ret; +} + +static int parser_error(const char *str) +{ + return 0; +} + +static void set_error(parser_ctx_t *ctx, UINT error) +{ + ctx->hres = JSCRIPT_ERROR|error; +} + +static BOOL explicit_error(parser_ctx_t *ctx, void *obj, WCHAR next) +{ + if(obj || *(ctx->ptr-1)==next) return TRUE; + + set_error(ctx, IDS_SYNTAX_ERROR); + return FALSE; +} + + +static expression_t *new_identifier_expression(parser_ctx_t *ctx, const WCHAR *identifier) +{ + identifier_expression_t *ret = parser_alloc(ctx, sizeof(identifier_expression_t)); + + ret->expr.eval = identifier_expression_eval; + ret->identifier = identifier; + + return &ret->expr; +} + +static expression_t *new_array_literal_expression(parser_ctx_t *ctx, element_list_t *element_list, int length) +{ + array_literal_expression_t *ret = parser_alloc(ctx, sizeof(array_literal_expression_t)); + + ret->expr.eval = array_literal_expression_eval; + ret->element_list = element_list ? element_list->head : NULL; + ret->length = length; + + return &ret->expr; +} + +static expression_t *new_prop_and_value_expression(parser_ctx_t *ctx, property_list_t *property_list) +{ + property_value_expression_t *ret = parser_alloc(ctx, sizeof(property_value_expression_t)); + + ret->expr.eval = property_value_expression_eval; + ret->property_list = property_list ? property_list->head : NULL; + + return &ret->expr; +} + +static expression_t *new_literal_expression(parser_ctx_t *ctx, literal_t *literal) +{ + literal_expression_t *ret = parser_alloc(ctx, sizeof(literal_expression_t)); + + ret->expr.eval = literal_expression_eval; + ret->literal = literal; + + return &ret->expr; +} + +static source_elements_t *new_source_elements(parser_ctx_t *ctx) +{ + source_elements_t *ret = parser_alloc(ctx, sizeof(source_elements_t)); + + memset(ret, 0, sizeof(*ret)); + + return ret; +} + +static source_elements_t *source_elements_add_statement(source_elements_t *source_elements, statement_t *statement) +{ + if(source_elements->statement_tail) + source_elements->statement_tail = source_elements->statement_tail->next = statement; + else + source_elements->statement = source_elements->statement_tail = statement; + + return source_elements; +} + +static statement_list_t *new_statement_list(parser_ctx_t *ctx, statement_t *statement) +{ + statement_list_t *ret = parser_alloc_tmp(ctx, sizeof(statement_list_t)); + + ret->head = ret->tail = statement; + + return ret; +} + +static statement_list_t *statement_list_add(statement_list_t *list, statement_t *statement) +{ + list->tail = list->tail->next = statement; + + return list; +} + +static void push_func(parser_ctx_t *ctx) +{ + func_stack_t *new_func = parser_alloc_tmp(ctx, sizeof(func_stack_t)); + + new_func->func_head = new_func->func_tail = NULL; + new_func->var_head = new_func->var_tail = NULL; + + new_func->next = ctx->func_stack; + ctx->func_stack = new_func; +} + +static source_elements_t *function_body_parsed(parser_ctx_t *ctx, source_elements_t *source) +{ + source->functions = ctx->func_stack->func_head; + source->variables = ctx->func_stack->var_head; + pop_func(ctx); + + return source; +} + +static void program_parsed(parser_ctx_t *ctx, source_elements_t *source) +{ + source->functions = ctx->func_stack->func_head; + source->variables = ctx->func_stack->var_head; + pop_func(ctx); + + ctx->source = source; + if(!ctx->lexer_error) + ctx->hres = S_OK; +} + +void parser_release(parser_ctx_t *ctx) +{ + obj_literal_t *iter; + + if(--ctx->ref) + return; + + for(iter = ctx->obj_literals; iter; iter = iter->next) + jsdisp_release(iter->obj); + + jsheap_free(&ctx->heap); + heap_free(ctx); +} + +HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimiter, + parser_ctx_t **ret) +{ + parser_ctx_t *parser_ctx; + jsheap_t *mark; + HRESULT hres; + + const WCHAR html_tagW[] = {'<','/','s','c','r','i','p','t','>',0}; + + parser_ctx = heap_alloc_zero(sizeof(parser_ctx_t)); + if(!parser_ctx) + return E_OUTOFMEMORY; + + parser_ctx->ref = 1; + parser_ctx->hres = JSCRIPT_ERROR|IDS_SYNTAX_ERROR; + parser_ctx->is_html = delimiter && !strcmpiW(delimiter, html_tagW); + + parser_ctx->begin = parser_ctx->ptr = code; + parser_ctx->end = code + strlenW(code); + + script_addref(ctx); + parser_ctx->script = ctx; + + mark = jsheap_mark(&ctx->tmp_heap); + jsheap_init(&parser_ctx->heap); + + push_func(parser_ctx); + + parser_parse(parser_ctx); + jsheap_clear(mark); + if(FAILED(parser_ctx->hres)) { + hres = parser_ctx->hres; + parser_release(parser_ctx); + return hres; + } + + *ret = parser_ctx; + return S_OK; +} Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/parser.y ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/tools/RosBE/RosBE-Windows/regtest/regtest.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/regtest/…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/regtest/regtest.cmd (added) +++ trunk/tools/RosBE/RosBE-Windows/regtest/regtest.cmd [iso-8859-1] Sun Oct 18 20:40:13 2009 @@ -1,0 +1,32 @@ +@echo off +setlocal enabledelayedexpansion + +echo RosBE Regression Test +echo. + +set /p "dummyvar=Checking for Bison......" < NUL +bison 2> NUL + +if %ERRORLEVEL% == 1 ( + start /min bison parser.y -p parser_ -d -o parser.tab.c + choice /C:AB /T 3 /D A > NUL + taskkill /f /im "bison.exe" > NUL + if !ERRORLEVEL! == 0 ( + echo [broken] + ) else ( + echo [ok] + ) +) else ( + echo [missing] +) + +set /p "dummyvar=Checking for Flex......." <nul +flex -oparser.yy.c -Pparser_ parser.l +if %ERRORLEVEL% == 0 ( + echo [ok] +) else ( + echo [missing] +) +del parser.yy.c 2> NUL +del parser.tab.c 2> NUL +del parser.tab.h 2> NUL Propchange: trunk/tools/RosBE/RosBE-Windows/regtest/regtest.cmd ------------------------------------------------------------------------------ svn:eol-style = native
15 years, 2 months
1
0
0
0
[bfreisen] 43567: [PAINT] - opening files via command line - file date, time, size and paper resolution (pix. per meter) in attributes dialog - loading/saving PpM resolution from/to file - zoom tool shows and zooms to target rectangle - implemented missing scroll bar functionality - hiding status bar via menu item prepared
by bfreisen@svn.reactos.org
Author: bfreisen Date: Sun Oct 18 20:36:46 2009 New Revision: 43567 URL:
http://svn.reactos.org/svn/reactos?rev=43567&view=rev
Log: [PAINT] - opening files via command line - file date, time, size and paper resolution (pix. per meter) in attributes dialog - loading/saving PpM resolution from/to file - zoom tool shows and zooms to target rectangle - implemented missing scroll bar functionality - hiding status bar via menu item prepared Modified: trunk/reactos/base/applications/paint/definitions.h trunk/reactos/base/applications/paint/dialogs.c trunk/reactos/base/applications/paint/dib.c trunk/reactos/base/applications/paint/dib.h trunk/reactos/base/applications/paint/globalvar.h trunk/reactos/base/applications/paint/lang/bg-BG.rc trunk/reactos/base/applications/paint/lang/cs-CZ.rc trunk/reactos/base/applications/paint/lang/de-DE.rc trunk/reactos/base/applications/paint/lang/en-GB.rc trunk/reactos/base/applications/paint/lang/en-US.rc trunk/reactos/base/applications/paint/lang/es-ES.rc trunk/reactos/base/applications/paint/lang/eu-ES.rc trunk/reactos/base/applications/paint/lang/fr-FR.rc trunk/reactos/base/applications/paint/lang/it-IT.rc trunk/reactos/base/applications/paint/lang/ja-JP.rc trunk/reactos/base/applications/paint/lang/nl-NL.rc trunk/reactos/base/applications/paint/lang/no-NO.rc trunk/reactos/base/applications/paint/lang/pl-PL.rc trunk/reactos/base/applications/paint/lang/pt-BR.rc trunk/reactos/base/applications/paint/lang/pt-PT.rc trunk/reactos/base/applications/paint/lang/ro-RO.rc trunk/reactos/base/applications/paint/lang/ru-RU.rc trunk/reactos/base/applications/paint/lang/sk-SK.rc trunk/reactos/base/applications/paint/lang/uk-UA.rc trunk/reactos/base/applications/paint/main.c trunk/reactos/base/applications/paint/toolsettings.c trunk/reactos/base/applications/paint/winproc.c Modified: trunk/reactos/base/applications/paint/definitions.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/de…
============================================================================== --- trunk/reactos/base/applications/paint/definitions.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/definitions.h [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -165,3 +165,5 @@ #define IDS_OPENFILTER 926 #define IDS_SAVEFILTER 927 +#define IDS_FILESIZE 928 +#define IDS_PRINTRES 929 Modified: trunk/reactos/base/applications/paint/dialogs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/di…
============================================================================== --- trunk/reactos/base/applications/paint/dialogs.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/dialogs.c [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -9,6 +9,7 @@ /* INCLUDES *********************************************************/ #include <windows.h> +#include <tchar.h> #include "definitions.h" #include "globalvar.h" @@ -76,6 +77,25 @@ CheckDlgButton(hwnd, IDD_ATTRIBUTESRB5, BST_CHECKED); SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, imgXRes, FALSE); SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, imgYRes, FALSE); + TCHAR strrc[100]; + if (isAFile) + { + TCHAR date[100]; + TCHAR size[100]; + TCHAR temp[100]; + GetDateFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, date, sizeof(date)); + GetTimeFormat(LOCALE_USER_DEFAULT, 0, &fileTime, NULL, temp, sizeof(temp)); + _tcscat(date, _T(" ")); + _tcscat(date, temp); + LoadString(hProgInstance, IDS_FILESIZE, strrc, sizeof(strrc)); + _stprintf(size, strrc, fileSize); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT6, date); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT7, size); + } + TCHAR res[100]; + LoadString(hProgInstance, IDS_PRINTRES, strrc, sizeof(strrc)); + _stprintf(res, strrc, fileHPPM, fileVPPM); + SetDlgItemText(hwnd, IDD_ATTRIBUTESTEXT8, res); return TRUE; case WM_CLOSE: EndDialog(hwnd, 0); Modified: trunk/reactos/base/applications/paint/dib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/di…
============================================================================== --- trunk/reactos/base/applications/paint/dib.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/dib.c [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -39,7 +39,7 @@ return bm.bmHeight; } -void SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC) +void SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC, LPSYSTEMTIME time, int *size, int hRes, int vRes) { BITMAP bm; HANDLE hFile; @@ -64,6 +64,8 @@ bi.biPlanes = bm.bmPlanes; bi.biBitCount = bm.bmBitsPixel; bi.biCompression = BI_RGB; + bi.biXPelsPerMeter = hRes; + bi.biYPelsPerMeter = vRes; buffer = HeapAlloc(GetProcessHeap(), 0, imgDataSize); GetDIBits(hDC, hBitmap, 0, bm.bmHeight, buffer, (LPBITMAPINFO)&bi, DIB_RGB_COLORS); @@ -76,39 +78,64 @@ WriteFile(hFile, &bi, sizeof(BITMAPINFOHEADER), &dwBytesWritten, NULL); WriteFile(hFile, buffer, imgDataSize, &dwBytesWritten, NULL); + if (time) + { + FILETIME ft; + GetFileTime(hFile, NULL, NULL, &ft); + FileTimeToSystemTime(&ft, time); + } + if (size) + *size = GetFileSize(hFile, NULL); + CloseHandle(hFile); HeapFree(GetProcessHeap(), 0, buffer); } -HBITMAP LoadDIBFromFile(LPTSTR name) +void LoadDIBFromFile(HBITMAP *hBitmap, LPTSTR name, LPSYSTEMTIME time, int *size, int *hRes, int *vRes) { - HBITMAP hBitmap; BITMAPFILEHEADER bfh; BITMAPINFO *bi; PVOID pvBits; DWORD dwBytesRead; HANDLE hFile; + + if (!hBitmap) + return; hFile = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (hFile == INVALID_HANDLE_VALUE) - return NULL; + return; /* read header and check for 'BM' magic */ ReadFile(hFile, &bfh, sizeof(BITMAPFILEHEADER), &dwBytesRead, NULL); if (bfh.bfType != 0x4d42) { CloseHandle(hFile); - return NULL; + return; } + + if (time) + { + FILETIME ft; + GetFileTime(hFile, NULL, NULL, &ft); + FileTimeToSystemTime(&ft, time); + } + if (size) + *size = GetFileSize(hFile, NULL); bi = HeapAlloc(GetProcessHeap(), 0, bfh.bfOffBits - sizeof(BITMAPFILEHEADER)); if (!bi) - return NULL; + return; ReadFile(hFile, bi, bfh.bfOffBits - sizeof(BITMAPFILEHEADER), &dwBytesRead, NULL); - hBitmap = CreateDIBSection(NULL, bi, DIB_RGB_COLORS, &pvBits, NULL, 0); + *hBitmap = CreateDIBSection(NULL, bi, DIB_RGB_COLORS, &pvBits, NULL, 0); ReadFile(hFile, pvBits, bfh.bfSize - bfh.bfOffBits, &dwBytesRead, NULL); + + if (hRes) + *hRes = (*bi).bmiHeader.biXPelsPerMeter; + if (vRes) + *vRes = (*bi).bmiHeader.biYPelsPerMeter; + CloseHandle(hFile); HeapFree(GetProcessHeap(), 0, bi); - return hBitmap; } Modified: trunk/reactos/base/applications/paint/dib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/di…
============================================================================== --- trunk/reactos/base/applications/paint/dib.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/dib.h [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -12,6 +12,6 @@ int GetDIBHeight(HBITMAP hbm); -void SaveDIBToFile(HBITMAP hbm, LPTSTR name, HDC hdc); +void SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC, LPSYSTEMTIME time, int *size, int hRes, int vRes); -HBITMAP LoadDIBFromFile(LPTSTR name); +void LoadDIBFromFile(HBITMAP *hBitmap, LPTSTR name, LPSYSTEMTIME time, int *size, int *hRes, int *vRes); Modified: trunk/reactos/base/applications/paint/globalvar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/gl…
============================================================================== --- trunk/reactos/base/applications/paint/globalvar.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/globalvar.h [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -73,6 +73,10 @@ extern TCHAR filename[256]; extern TCHAR filepathname[1000]; extern BOOL isAFile; +extern int fileSize; +extern int fileHPPM; +extern int fileVPPM; +extern SYSTEMTIME fileTime; extern BOOL showGrid; extern BOOL showMiniature; Modified: trunk/reactos/base/applications/paint/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/bg-BG.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -1,6 +1,6 @@ /* - * US-English Language resource file - * Translated by: first times touched from en-GB.rc file by Mario Kacmar + * Bulgarian Language resource file + * Translated by: */ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT @@ -198,4 +198,6 @@ IDS_TOOLTIP16, "Çàîáëåí ïðàâîúãúëíèê" IDS_OPENFILTER, "Ôàéëîâå bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1Âñè÷êè ôàéëîâå (*.*)\1*.*\1" IDS_SAVEFILTER, "24 ðàçðÿäíè ôàéëîâå bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/cs-CZ.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Zaoblený obdélník" IDS_OPENFILTER, "Soubory bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1Vechny soubory (*.*)\1*.*\1" IDS_SAVEFILTER, "24bitová bitmapa (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/de-DE.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -134,12 +134,12 @@ EDITTEXT IDD_ATTRIBUTESEDIT2, 110, 40, 35, 12 LTEXT "Breite:", IDD_ATTRIBUTESTEXT1, 10, 40, 30, 10 LTEXT "Höhe:", IDD_ATTRIBUTESTEXT2, 80, 40, 30, 10 - LTEXT "Dateidatum:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 - LTEXT "Dateigröße:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT "Auflösung:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT6, 70, 5, 60, 10 - LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT7, 70, 15, 60, 10 - LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT8, 70, 25, 60, 10 + LTEXT "Dateidatum:", IDD_ATTRIBUTESTEXT3, 10, 5, 50, 10 + LTEXT "Dateigröße:", IDD_ATTRIBUTESTEXT4, 10, 15, 50, 10 + LTEXT "Auflösung:", IDD_ATTRIBUTESTEXT5, 10, 25, 50, 10 + LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "Nicht verfügbar", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 GROUPBOX "Maßeinheit", IDD_ATTRIBUTESGROUP1, 6, 57, 139, 27 AUTORADIOBUTTON "Zoll", IDD_ATTRIBUTESRB1, 12, 69, 35, 10, WS_GROUP AUTORADIOBUTTON "cm", IDD_ATTRIBUTESRB2, 52, 69, 35, 10 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Abgerundetes Rechteck" IDS_OPENFILTER, "Bitmapdateien (*.bmp;*.dib)\1*.bmp;*.dib\1Alle Dateien (*.*)\1*.*\1" IDS_SAVEFILTER, "24-Bit-Bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d Bytes" + IDS_PRINTRES, "%d x %d Pixel pro Meter" +END Modified: trunk/reactos/base/applications/paint/lang/en-GB.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/en-GB.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/en-GB.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -198,4 +198,6 @@ IDS_TOOLTIP16, "Rounded rectangle" IDS_OPENFILTER, "Bitmap files (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1" IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/en-US.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -198,4 +198,6 @@ IDS_TOOLTIP16, "Rounded rectangle" IDS_OPENFILTER, "Bitmap files (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1" IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/es-ES.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -198,4 +198,6 @@ IDS_TOOLTIP16, "Rectángulo redondeado" IDS_OPENFILTER, "Archivos de mapa de bits (*.bmp;*.dib)\1*.bmp;*.dib\1Todos los archivos (*.*)\1*.*\1" IDS_SAVEFILTER, "Mapa de bits de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/eu-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/eu-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/eu-ES.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -195,4 +195,6 @@ IDS_TOOLTIP16, "Laukizuzen biribildua" IDS_OPENFILTER, "Bit-mapa fitxategiak(*.bmp;*.dib)\1*.bmp;*.dib\1Fitxategi gustiak (*.*)\1*.*\1" IDS_SAVEFILTER, "24 Biteko bit-mapa (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/fr-FR.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Rectangle arrondi" IDS_OPENFILTER, "Bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1Tous les fichiers (*.*)\1*.*\1" IDS_SAVEFILTER, "Bitmap 24 bit (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/it-IT.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Rettangolo arrotondato" IDS_OPENFILTER, "Bitmap files (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1" IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/ja-JP.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -198,4 +198,6 @@ IDS_TOOLTIP16, "pÛlp`" IDS_OPENFILTER, "rbg}bv t@C (*.bmp;*.dib)\1*.bmp;*.dib\1·×ÄÌt@C (*.*)\1*.*\1" IDS_SAVEFILTER, "24 rbg rbg}bv (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/nl-NL.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Afgeronde rechthoek" IDS_OPENFILTER, "Bitmapbestanden (*.bmp;*.dib)\1*.bmp;*.dib\1Alle bestanden (*.*)\1*.*\1" IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/no-NO.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Avrundet rektangel" IDS_OPENFILTER, "Bitmap filer (*.bmp;*.dib)\1*.bmp;*.dib\1Alle filer (*.*)\1*.*\1" IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/pl-PL.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -200,4 +200,6 @@ IDS_TOOLTIP16, "Zaokr¹glony Prostok¹t" IDS_OPENFILTER, "Pliki Bitmapy (*.bmp;*.dib)\1*.bmp;*.dib\1Wszystkie pliki (*.*)\1*.*\1" IDS_SAVEFILTER, "Bitmapa 24 bit (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/pt-BR.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Retângulo arredondado" IDS_OPENFILTER, "Arquivos de bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1Todos os arquivos (*.*)\1*.*\1" IDS_SAVEFILTER, "Bitmaps de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/pt-PT.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -197,4 +197,6 @@ IDS_TOOLTIP16, "Retângulo arredondado" IDS_OPENFILTER, "Ficheiros de mapa de bits (*.bmp;*.dib)\1*.bmp;*.dib\1Todos os arquivos (*.*)\1*.*\1" IDS_SAVEFILTER, "Mapa de bits de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/ro-RO.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -200,6 +200,8 @@ IDS_TOOLTIP16, "Dreptunghi rotunjit" IDS_OPENFILTER, "FiÈiere bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1All files (*.*)\1*.*\1" IDS_SAVEFILTER, "Bitmap pe 24 biÈi (*.bmp;*.dib)\1*.bmp;*.dib\1" + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" END #pragma code_page(default) Modified: trunk/reactos/base/applications/paint/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/ru-RU.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -192,4 +192,6 @@ IDS_TOOLTIP16, "Ñêðóãëåííûé ïðÿìîóãîëüíèê" IDS_OPENFILTER, "Òî÷å÷íûå ðèñóíêè (*.bmp;*.dib)\1*.bmp;*.dib\1Âñå ôàéëû (*.*)\1*.*\1" IDS_SAVEFILTER, "24-ðàçðÿäíûé ðèñóíîê (*.bmp;*.dib)\1*.bmp;*.dib\1" + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" END Modified: trunk/reactos/base/applications/paint/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/sk-SK.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -199,4 +199,6 @@ IDS_TOOLTIP16, "Zaoblený obdånik" IDS_OPENFILTER, "Súbory bitových máp (*.bmp;*.dib)\1*.bmp;*.dib\1Vetky súbory (*.*)\1*.*\1" IDS_SAVEFILTER, "24-bitová mapa (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/la…
============================================================================== --- trunk/reactos/base/applications/paint/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/lang/uk-UA.rc [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -200,4 +200,6 @@ IDS_TOOLTIP16, "Ïðÿìîêóòíèê ç îêðóãëåíèìè êóòàìè" IDS_OPENFILTER, "Òî÷êîâ³ ðèñóíêè (*.bmp;*.dib)\1*.bmp;*.dib\1Óñ³ ôàéëè (*.*)\1*.*\1" IDS_SAVEFILTER, "24-ðîçðÿäíèé ðèñóíîê (*.bmp;*.dib)\1*.bmp;*.dib\1" -END + IDS_FILESIZE, "%d bytes" + IDS_PRINTRES, "%d x %d pixels per meter" +END Modified: trunk/reactos/base/applications/paint/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/ma…
============================================================================== --- trunk/reactos/base/applications/paint/main.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/main.c [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -103,6 +103,10 @@ TCHAR filename[256]; TCHAR filepathname[1000]; BOOL isAFile = FALSE; +int fileSize; +int fileHPPM = 2834; +int fileVPPM = 2834; +SYSTEMTIME fileTime; BOOL showGrid = FALSE; BOOL showMiniature = FALSE; @@ -339,6 +343,26 @@ SelectObject(hDrawingDC, hBms[0]); Rectangle(hDrawingDC, 0-1, 0-1, imgXRes+1, imgYRes+1); + if (lpszArgument[0] != 0) + { + HBITMAP bmNew = NULL; + LoadDIBFromFile(&bmNew, lpszArgument, &fileTime, &fileSize, &fileHPPM, &fileVPPM); + if (bmNew!=NULL) + { + TCHAR tempstr[1000]; + TCHAR resstr[100]; + insertReversible(bmNew); + TCHAR *temp; + GetFullPathName(lpszArgument, sizeof(filepathname), filepathname, &temp); + _tcscpy(filename, temp); + LoadString(hProgInstance, IDS_WINDOWTITLE, resstr, SIZEOF(resstr)); + _stprintf(tempstr, resstr, filename); + SetWindowText(hMainWnd, tempstr); + clearHistory(); + isAFile = TRUE; + } + } + /* initializing the CHOOSECOLOR structure for use with ChooseColor */ choosecolor.lStructSize = sizeof(CHOOSECOLOR); choosecolor.hwndOwner = hwnd; Modified: trunk/reactos/base/applications/paint/toolsettings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/to…
============================================================================== --- trunk/reactos/base/applications/paint/toolsettings.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/toolsettings.c [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -22,7 +22,7 @@ { case WM_VSCROLL: { - ZoomTo(125<<SendMessage(hTrackbarZoom, TBM_GETPOS, 0, 0)); + zoomTo(125<<SendMessage(hTrackbarZoom, TBM_GETPOS, 0, 0), 0, 0); } break; case WM_PAINT: Modified: trunk/reactos/base/applications/paint/winproc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/wi…
============================================================================== --- trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] Sun Oct 18 20:36:46 2009 @@ -48,10 +48,28 @@ SetScrollPos(hScrollbox, SB_VERT, 0, TRUE); } -void ZoomTo(int newZoom) +void zoomTo(int newZoom, int mouseX, int mouseY) { + long clientRectScrollbox[4]; + long clientRectImageArea[4]; + GetClientRect(hScrollbox, (LPRECT)&clientRectScrollbox); + GetClientRect(hImageArea, (LPRECT)&clientRectImageArea); + int x, y, w, h; + w = clientRectImageArea[2] * clientRectScrollbox[2] / (clientRectImageArea[2] * newZoom / zoom); + h = clientRectImageArea[3] * clientRectScrollbox[3] / (clientRectImageArea[3] * newZoom / zoom); + x = max(0, min(clientRectImageArea[2] - w, mouseX - w / 2)) * newZoom / zoom; + y = max(0, min(clientRectImageArea[3] - h, mouseY - h / 2)) * newZoom / zoom; + zoom = newZoom; - updateCanvasAndScrollbars(); + + ShowWindow(hSelection, SW_HIDE); + MoveWindow(hImageArea, 3, 3, imgXRes*zoom/1000, imgYRes*zoom/1000, FALSE); + InvalidateRect(hScrollbox, NULL, TRUE); + InvalidateRect(hImageArea, NULL, FALSE); + + SendMessage(hScrollbox, WM_HSCROLL, SB_THUMBPOSITION | (x << 16), 0); + SendMessage(hScrollbox, WM_VSCROLL, SB_THUMBPOSITION | (y << 16), 0); + int tbPos = 0; int tempZoom = newZoom; while (tempZoom>125) @@ -62,6 +80,34 @@ SendMessage(hTrackbarZoom, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)tbPos); } +void drawZoomFrame(int mouseX, int mouseY) +{ + long clientRectScrollbox[4]; + long clientRectImageArea[4]; + GetClientRect(hScrollbox, (LPRECT)&clientRectScrollbox); + GetClientRect(hImageArea, (LPRECT)&clientRectImageArea); + int x, y, w, h; + w = clientRectImageArea[2] * clientRectScrollbox[2] / (clientRectImageArea[2] * 2); + h = clientRectImageArea[3] * clientRectScrollbox[3] / (clientRectImageArea[3] * 2); + x = max(0, min(clientRectImageArea[2] - w, mouseX - w / 2)); + y = max(0, min(clientRectImageArea[3] - h, mouseY - h / 2)); + HDC hdc; + hdc = GetDC(hImageArea); + HPEN oldPen; + oldPen = SelectObject(hdc, CreatePen(PS_SOLID, 0, 0)); + HBRUSH oldBrush; + LOGBRUSH logbrush; + logbrush.lbStyle = BS_HOLLOW; + oldBrush = SelectObject(hdc, CreateBrushIndirect(&logbrush)); + int rop; + rop = SetROP2(hdc, R2_NOT); + Rectangle(hdc, x, y, x + w, y + h); + SetROP2(hdc, rop); + DeleteObject(SelectObject(hdc, oldBrush)); + DeleteObject(SelectObject(hdc, oldPen)); + ReleaseDC(hImageArea, hdc); +} + HDC hdc; BOOL drawing; @@ -163,6 +209,11 @@ CheckMenuItem(GetMenu(hMainWnd), IDM_IMAGEDRAWOPAQUE, MF_UNCHECKED | MF_BYCOMMAND); break; } + if (IsWindowVisible(hStatusBar)) + CheckMenuItem(GetMenu(hMainWnd), IDM_VIEWSTATUSBAR, MF_CHECKED | MF_BYCOMMAND); + else + CheckMenuItem(GetMenu(hMainWnd), IDM_VIEWSTATUSBAR, MF_UNCHECKED | MF_BYCOMMAND); + if (showGrid) CheckMenuItem(GetMenu(hMainWnd), IDM_VIEWSHOWGRID, MF_CHECKED | MF_BYCOMMAND); else @@ -246,46 +297,88 @@ SCROLLINFO vertScroll; GetClientRect(hScrollbox, (LPRECT)&clientRectScrollbox); GetClientRect(hImageArea, (LPRECT)&clientRectImageArea); - MoveWindow(hScrlClient, 0, 0, max(clientRectImageArea[2]+6, clientRectScrollbox[2]), max(clientRectImageArea[3]+6, clientRectScrollbox[3]), TRUE); horzScroll.cbSize = sizeof(SCROLLINFO); horzScroll.fMask = SIF_PAGE | SIF_RANGE; - horzScroll.nMax = 10000; + horzScroll.nMax = clientRectImageArea[2]+6-1; horzScroll.nMin = 0; - horzScroll.nPage = clientRectScrollbox[2]*10000/(clientRectImageArea[2]+6); + horzScroll.nPage = clientRectScrollbox[2]; horzScroll.nPos = 0; horzScroll.nTrackPos = 0; SetScrollInfo(hScrollbox, SB_HORZ, &horzScroll, TRUE); GetClientRect(hScrollbox, (LPRECT)clientRectScrollbox); vertScroll.cbSize = sizeof(SCROLLINFO); vertScroll.fMask = SIF_PAGE | SIF_RANGE; - vertScroll.nMax = 10000; + vertScroll.nMax = clientRectImageArea[3]+6-1; vertScroll.nMin = 0; - vertScroll.nPage = clientRectScrollbox[3]*10000/(clientRectImageArea[3]+6); + vertScroll.nPage = clientRectScrollbox[3]; vertScroll.nPos = 0; vertScroll.nTrackPos = 0; SetScrollInfo(hScrollbox, SB_VERT, &vertScroll, TRUE); + MoveWindow(hScrlClient, + -GetScrollPos(hScrollbox, SB_HORZ), -GetScrollPos(hScrollbox, SB_VERT), + max(clientRectImageArea[2]+6, clientRectScrollbox[2]), max(clientRectImageArea[3]+6, clientRectScrollbox[3]), TRUE); } break; case WM_HSCROLL: if (hwnd==hScrollbox) { - if ((LOWORD(wParam)==SB_THUMBPOSITION)||(LOWORD(wParam)==SB_THUMBTRACK)) - { - SetScrollPos(hScrollbox, SB_HORZ, HIWORD(wParam), TRUE); - MoveWindow(hScrlClient, -(imgXRes*zoom/1000+6)*GetScrollPos(hScrollbox, SB_HORZ)/10000, - -(imgYRes*zoom/1000+6)*GetScrollPos(hScrollbox, SB_VERT)/10000, imgXRes*zoom/1000+6, imgYRes*zoom/1000+6, TRUE); - } + SCROLLINFO si; + si.cbSize = sizeof(SCROLLINFO); + si.fMask = SIF_ALL; + GetScrollInfo(hScrollbox, SB_HORZ, &si); + switch (LOWORD(wParam)) + { + case SB_THUMBTRACK: + case SB_THUMBPOSITION: + si.nPos = HIWORD(wParam); + break; + case SB_LINELEFT: + si.nPos -= 5; + break; + case SB_LINERIGHT: + si.nPos += 5; + break; + case SB_PAGELEFT: + si.nPos -= si.nPage; + break; + case SB_PAGERIGHT: + si.nPos += si.nPage; + break; + } + SetScrollInfo(hScrollbox, SB_HORZ, &si, TRUE); + MoveWindow(hScrlClient, -GetScrollPos(hScrollbox, SB_HORZ), + -GetScrollPos(hScrollbox, SB_VERT), imgXRes*zoom/1000+6, imgYRes*zoom/1000+6, TRUE); } break; case WM_VSCROLL: if (hwnd==hScrollbox) { - if ((LOWORD(wParam)==SB_THUMBPOSITION)||(LOWORD(wParam)==SB_THUMBTRACK)) - { - SetScrollPos(hScrollbox, SB_VERT, HIWORD(wParam), TRUE); - MoveWindow(hScrlClient, -(imgXRes*zoom/1000+6)*GetScrollPos(hScrollbox, SB_HORZ)/10000, - -(imgYRes*zoom/1000+6)*GetScrollPos(hScrollbox, SB_VERT)/10000, imgXRes*zoom/1000+6, imgYRes*zoom/1000+6, TRUE); - } + SCROLLINFO si; + si.cbSize = sizeof(SCROLLINFO); + si.fMask = SIF_ALL; + GetScrollInfo(hScrollbox, SB_VERT, &si); + switch (LOWORD(wParam)) + { + case SB_THUMBTRACK: + case SB_THUMBPOSITION: + si.nPos = HIWORD(wParam); + break; + case SB_LINEUP: + si.nPos -= 5; + break; + case SB_LINEDOWN: + si.nPos += 5; + break; + case SB_PAGEUP: + si.nPos -= si.nPage; + break; + case SB_PAGEDOWN: + si.nPos += si.nPage; + break; + } + SetScrollInfo(hScrollbox, SB_VERT, &si, TRUE); + MoveWindow(hScrlClient, -GetScrollPos(hScrollbox, SB_HORZ), + -GetScrollPos(hScrollbox, SB_VERT), imgXRes*zoom/1000+6, imgYRes*zoom/1000+6, TRUE); } break; case WM_GETMINMAXINFO: @@ -375,7 +468,7 @@ undo(); } SendMessage(hImageArea, WM_PAINT, 0, 0); - if ((activeTool==6)&&(zoom<8000)) ZoomTo(zoom*2); + if ((activeTool==6)&&(zoom<8000)) zoomTo(zoom*2, (short)LOWORD(lParam), (short)HIWORD(lParam)); } break; case WM_RBUTTONDOWN: @@ -392,7 +485,7 @@ undo(); } SendMessage(hImageArea, WM_PAINT, 0, 0); - if ((activeTool==6)&&(zoom>125)) ZoomTo(zoom/2); + if ((activeTool==6)&&(zoom>125)) zoomTo(zoom/2, (short)LOWORD(lParam), (short)HIWORD(lParam)); } break; case WM_LBUTTONUP: @@ -435,6 +528,19 @@ TCHAR coordStr[100]; _stprintf(coordStr, _T("%d, %d"), (short)LOWORD(lParam)*1000/zoom, (short)HIWORD(lParam)*1000/zoom); SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM)coordStr); + + if (activeTool == 6) + { + SendMessage(hImageArea, WM_PAINT, 0, 0); + drawZoomFrame((short)LOWORD(lParam), (short)HIWORD(lParam)); + } + + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof(TRACKMOUSEEVENT); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hImageArea; + tme.dwHoverTime = 0; + TrackMouseEvent(&tme); } if (drawing) { @@ -461,9 +567,13 @@ } } } - } else + } + break; + case WM_MOUSELEAVE: { SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM)_T("")); + if (activeTool == 6) + SendMessage(hImageArea, WM_PAINT, 0, 0); } break; @@ -496,7 +606,8 @@ case IDM_FILEOPEN: if (GetOpenFileName(&ofn)!=0) { - HBITMAP bmNew = (HBITMAP)LoadDIBFromFile(ofn.lpstrFile); + HBITMAP bmNew = NULL; + LoadDIBFromFile(&bmNew, ofn.lpstrFile, &fileTime, &fileSize, &fileHPPM, &fileVPPM); if (bmNew!=NULL) { TCHAR tempstr[1000]; @@ -516,7 +627,7 @@ case IDM_FILESAVE: if (isAFile) { - SaveDIBToFile(hBms[currInd], filepathname, hDrawingDC); + SaveDIBToFile(hBms[currInd], filepathname, hDrawingDC, &fileTime, &fileSize, fileHPPM, fileVPPM); imageSaved = TRUE; } else @@ -527,7 +638,7 @@ { TCHAR tempstr[1000]; TCHAR resstr[100]; - SaveDIBToFile(hBms[currInd], sfn.lpstrFile, hDrawingDC); + SaveDIBToFile(hBms[currInd], sfn.lpstrFile, hDrawingDC, &fileTime, &fileSize, fileHPPM, fileVPPM); CopyMemory(filename, sfn.lpstrFileTitle, sizeof(filename)); CopyMemory(filepathname, sfn.lpstrFile, sizeof(filepathname)); LoadString(hProgInstance, IDS_WINDOWTITLE, resstr, SIZEOF(resstr)); @@ -588,7 +699,7 @@ } break; case IDM_EDITCOPYTO: - if (GetSaveFileName(&ofn)!=0) SaveDIBToFile(hSelBm, ofn.lpstrFile, hDrawingDC); + if (GetSaveFileName(&ofn)!=0) SaveDIBToFile(hSelBm, ofn.lpstrFile, hDrawingDC, NULL, NULL, fileHPPM, fileVPPM); break; case IDM_COLORSEDITPALETTE: if (ChooseColor(&choosecolor)) @@ -659,6 +770,13 @@ insertReversible(CopyImage(hSelBm, IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG)); updateCanvasAndScrollbars(); break; + + case IDM_VIEWSTATUSBAR: + if (IsWindowVisible(hStatusBar)) + ShowWindow(hStatusBar, SW_HIDE); + else + ShowWindow(hStatusBar, SW_SHOW); + break; case IDM_VIEWSHOWGRID: showGrid = !showGrid; @@ -672,25 +790,25 @@ break; case IDM_VIEWZOOM125: - ZoomTo(125); + zoomTo(125, 0, 0); break; case IDM_VIEWZOOM25: - ZoomTo(250); + zoomTo(250, 0, 0); break; case IDM_VIEWZOOM50: - ZoomTo(500); + zoomTo(500, 0, 0); break; case IDM_VIEWZOOM100: - ZoomTo(1000); + zoomTo(1000, 0, 0); break; case IDM_VIEWZOOM200: - ZoomTo(2000); + zoomTo(2000, 0, 0); break; case IDM_VIEWZOOM400: - ZoomTo(4000); + zoomTo(4000, 0, 0); break; case IDM_VIEWZOOM800: - ZoomTo(8000); + zoomTo(8000, 0, 0); break; case ID_FREESEL: selectTool(1);
15 years, 2 months
1
0
0
0
[tkreuzer] 43566: [FREELDR] - move wlmemory.c into arch specific folder - add elmemory.c and ntsetup.c for amd64 (stubbed)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 20:29:25 2009 New Revision: 43566 URL:
http://svn.reactos.org/svn/reactos?rev=43566&view=rev
Log: [FREELDR] - move wlmemory.c into arch specific folder - add elmemory.c and ntsetup.c for amd64 (stubbed) Added: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ (with props) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c (with props) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c (with props) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c - copied unchanged from r43562, branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_base.rbuild Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild [iso-8859-1] Sun Oct 18 20:29:25 2009 @@ -105,6 +105,13 @@ <if property="ARCH" value="i386"> <directory name="i386"> <file>ntsetup.c</file> + <file>wlmemory.c</file> + </directory> + </if> + <if property="ARCH" value="amd64"> + <directory name="amd64"> + <file>ntsetup.c</file> + <file>wlmemory.c</file> </directory> </if> </directory> Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_base.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/freeldr_base.rbuild [iso-8859-1] Sun Oct 18 20:29:25 2009 @@ -73,7 +73,14 @@ <file>conversion.c</file> <file>peloader.c</file> <file>winldr.c</file> - <file>wlmemory.c</file> + <file>wlregistry.c</file> + </directory> + </if> + <if property="ARCH" value="amd64"> + <directory name="windows"> + <file>conversion.c</file> + <file>peloader.c</file> + <file>winldr.c</file> <file>wlregistry.c</file> </directory> </if> Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Sun Oct 18 20:29:25 2009 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c (added) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c [iso-8859-1] Sun Oct 18 20:29:25 2009 @@ -1,0 +1,44 @@ +/* + * PROJECT: EFI Windows Loader + * LICENSE: GPL - See COPYING in the top level directory + * FILE: freeldr/windows/i386/ntsetup.c + * PURPOSE: i386-specific setup for Windows boot + * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.org) + */ + +/* INCLUDES ***************************************************************/ + +#include <freeldr.h> +#include <debug.h> + +// this is needed for new IDT filling +#if 0 +extern ULONG_PTR i386DivideByZero; +extern ULONG_PTR i386DebugException; +extern ULONG_PTR i386NMIException; +extern ULONG_PTR i386Breakpoint; +extern ULONG_PTR i386Overflow; +extern ULONG_PTR i386BoundException; +extern ULONG_PTR i386InvalidOpcode; +extern ULONG_PTR i386FPUNotAvailable; +extern ULONG_PTR i386DoubleFault; +extern ULONG_PTR i386CoprocessorSegment; +extern ULONG_PTR i386InvalidTSS; +extern ULONG_PTR i386SegmentNotPresent; +extern ULONG_PTR i386StackException; +extern ULONG_PTR i386GeneralProtectionFault; +extern ULONG_PTR i386PageFault; // exc 14 +extern ULONG_PTR i386CoprocessorError; // exc 16 +extern ULONG_PTR i386AlignmentCheck; // exc 17 +#endif + +/* FUNCTIONS **************************************************************/ + +// Last step before going virtual +void WinLdrSetupForNt(PLOADER_PARAMETER_BLOCK LoaderBlock, + PVOID *GdtIdt, + ULONG *PcrBasePage, + ULONG *TssBasePage) +{ + +} Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/ntsetup.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c (added) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c [iso-8859-1] Sun Oct 18 20:29:25 2009 @@ -1,0 +1,169 @@ +/* + * PROJECT: EFI Windows Loader + * LICENSE: GPL - See COPYING in the top level directory + * FILE: freeldr/winldr/wlmemory.c + * PURPOSE: Memory related routines + * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.org) + */ + +/* INCLUDES ***************************************************************/ + +#include <freeldr.h> + +#include <ndk/asm.h> +#include <debug.h> + +extern ULONG TotalNLSSize; +extern ULONG LoaderPagesSpanned; + +// This is needed because headers define wrong one for ReactOS +#undef KIP0PCRADDRESS +#define KIP0PCRADDRESS 0xffdff000 + +#define HYPER_SPACE_ENTRY 0x300 + +PCHAR MemTypeDesc[] = { + "ExceptionBlock ", // ? + "SystemBlock ", // ? + "Free ", + "Bad ", // used + "LoadedProgram ", // == Free + "FirmwareTemporary ", // == Free + "FirmwarePermanent ", // == Bad + "OsloaderHeap ", // used + "OsloaderStack ", // == Free + "SystemCode ", + "HalCode ", + "BootDriver ", // not used + "ConsoleInDriver ", // ? + "ConsoleOutDriver ", // ? + "StartupDpcStack ", // ? + "StartupKernelStack", // ? + "StartupPanicStack ", // ? + "StartupPcrPage ", // ? + "StartupPdrPage ", // ? + "RegistryData ", // used + "MemoryData ", // not used + "NlsData ", // used + "SpecialMemory ", // == Bad + "BBTMemory " // == Bad + }; + +VOID +WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock); + + +VOID +MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, + ULONG BasePage, + ULONG PageCount, + ULONG Type); +VOID +WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, + IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor); + +VOID +WinLdrRemoveDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR Descriptor); + +VOID +WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss); + +// This is needed only for SetProcessorContext routine +#pragma pack(2) + typedef struct + { + USHORT Limit; + ULONG Base; + } GDTIDT; +#pragma pack(4) + +/* GLOBALS ***************************************************************/ + +PHARDWARE_PTE PDE; +PHARDWARE_PTE HalPageTable; + +PUCHAR PhysicalPageTablesBuffer; +PUCHAR KernelPageTablesBuffer; +ULONG PhysicalPageTables; +ULONG KernelPageTables; + +MEMORY_ALLOCATION_DESCRIPTOR *Mad; +ULONG MadCount = 0; + + +/* FUNCTIONS **************************************************************/ + +BOOLEAN +MempAllocatePageTables() +{ + + return TRUE; +} + +VOID +MempAllocatePTE(ULONG Entry, PHARDWARE_PTE *PhysicalPT, PHARDWARE_PTE *KernelPT) +{ + +} + +BOOLEAN +MempSetupPaging(IN ULONG StartPage, + IN ULONG NumberOfPages) +{ + + return TRUE; +} + +VOID +MempDisablePages() +{ + +} + +VOID +MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, + ULONG BasePage, + ULONG PageCount, + ULONG Type) +{ + +} + +#ifdef _M_IX86 +VOID +WinLdrpMapApic() +{ + +} +#else +VOID +WinLdrpMapApic() +{ + /* Implement it for another arch */ +} +#endif + +BOOLEAN +WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, + ULONG PcrBasePage, + ULONG TssBasePage, + PVOID GdtIdt) +{ +return 1; +} + +// Two special things this func does: it sorts descriptors, +// and it merges free ones +VOID +WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, + IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor) +{ + +} + +VOID +WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss) +{ + +} + Propchange: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c ------------------------------------------------------------------------------ svn:eol-style = native Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c (removed) @@ -1,939 +1,0 @@ -/* - * PROJECT: EFI Windows Loader - * LICENSE: GPL - See COPYING in the top level directory - * FILE: freeldr/winldr/wlmemory.c - * PURPOSE: Memory related routines - * PROGRAMMERS: Aleksey Bragin (aleksey(a)reactos.org) - */ - -/* INCLUDES ***************************************************************/ - -#include <freeldr.h> - -#include <ndk/asm.h> -#include <debug.h> - -extern ULONG TotalNLSSize; -extern ULONG LoaderPagesSpanned; - -// This is needed because headers define wrong one for ReactOS -#undef KIP0PCRADDRESS -#define KIP0PCRADDRESS 0xffdff000 - -#define HYPER_SPACE_ENTRY 0x300 - -PCHAR MemTypeDesc[] = { - "ExceptionBlock ", // ? - "SystemBlock ", // ? - "Free ", - "Bad ", // used - "LoadedProgram ", // == Free - "FirmwareTemporary ", // == Free - "FirmwarePermanent ", // == Bad - "OsloaderHeap ", // used - "OsloaderStack ", // == Free - "SystemCode ", - "HalCode ", - "BootDriver ", // not used - "ConsoleInDriver ", // ? - "ConsoleOutDriver ", // ? - "StartupDpcStack ", // ? - "StartupKernelStack", // ? - "StartupPanicStack ", // ? - "StartupPcrPage ", // ? - "StartupPdrPage ", // ? - "RegistryData ", // used - "MemoryData ", // not used - "NlsData ", // used - "SpecialMemory ", // == Bad - "BBTMemory " // == Bad - }; - -VOID -WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock); - - -VOID -MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, - ULONG BasePage, - ULONG PageCount, - ULONG Type); -VOID -WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, - IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor); - -VOID -WinLdrRemoveDescriptor(IN PMEMORY_ALLOCATION_DESCRIPTOR Descriptor); - -VOID -WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss); - -// This is needed only for SetProcessorContext routine -#pragma pack(2) - typedef struct - { - USHORT Limit; - ULONG Base; - } GDTIDT; -#pragma pack(4) - -/* GLOBALS ***************************************************************/ - -PHARDWARE_PTE PDE; -PHARDWARE_PTE HalPageTable; - -PUCHAR PhysicalPageTablesBuffer; -PUCHAR KernelPageTablesBuffer; -ULONG PhysicalPageTables; -ULONG KernelPageTables; - -MEMORY_ALLOCATION_DESCRIPTOR *Mad; -ULONG MadCount = 0; - - -/* FUNCTIONS **************************************************************/ - -BOOLEAN -MempAllocatePageTables() -{ - ULONG NumPageTables, TotalSize; - PUCHAR Buffer; - // It's better to allocate PDE + PTEs contigiuos - - // Max number of entries = MaxPageNum >> 10 - // FIXME: This is a number to describe ALL physical memory - // and windows doesn't expect ALL memory mapped... - NumPageTables = (GetSystemMemorySize() >> MM_PAGE_SHIFT) >> 10; - - DPRINTM(DPRINT_WINDOWS, "NumPageTables = %d\n", NumPageTables); - - // Allocate memory block for all these things: - // PDE, HAL mapping page table, physical mapping, kernel mapping - TotalSize = (1+1+NumPageTables*2)*MM_PAGE_SIZE; - - // PDE+HAL+KernelPTEs == MemoryData - Buffer = MmAllocateMemoryWithType(TotalSize, LoaderMemoryData); - - // Physical PTEs = FirmwareTemporary - PhysicalPageTablesBuffer = (PUCHAR)Buffer + TotalSize - NumPageTables*MM_PAGE_SIZE; - MmSetMemoryType(PhysicalPageTablesBuffer, - NumPageTables*MM_PAGE_SIZE, - LoaderFirmwareTemporary); - - // This check is now redundant - if (Buffer + (TotalSize - NumPageTables*MM_PAGE_SIZE) != - PhysicalPageTablesBuffer) - { - DPRINTM(DPRINT_WINDOWS, "There was a problem allocating two adjacent blocks of memory!"); - } - - if (Buffer == NULL || PhysicalPageTablesBuffer == NULL) - { - UiMessageBox("Impossible to allocate memory block for page tables!"); - return FALSE; - } - - // Zero all this memory block - RtlZeroMemory(Buffer, TotalSize); - - // Set up pointers correctly now - PDE = (PHARDWARE_PTE)Buffer; - - // Map the page directory at 0xC0000000 (maps itself) - PDE[HYPER_SPACE_ENTRY].PageFrameNumber = (ULONG)PDE >> MM_PAGE_SHIFT; - PDE[HYPER_SPACE_ENTRY].Valid = 1; - PDE[HYPER_SPACE_ENTRY].Write = 1; - - // The last PDE slot is allocated for HAL's memory mapping (Virtual Addresses 0xFFC00000 - 0xFFFFFFFF) - HalPageTable = (PHARDWARE_PTE)&Buffer[MM_PAGE_SIZE*1]; - - // Map it - PDE[1023].PageFrameNumber = (ULONG)HalPageTable >> MM_PAGE_SHIFT; - PDE[1023].Valid = 1; - PDE[1023].Write = 1; - - // Store pointer to the table for easier access - KernelPageTablesBuffer = &Buffer[MM_PAGE_SIZE*2]; - - // Zero counters of page tables used - PhysicalPageTables = 0; - KernelPageTables = 0; - - return TRUE; -} - -VOID -MempAllocatePTE(ULONG Entry, PHARDWARE_PTE *PhysicalPT, PHARDWARE_PTE *KernelPT) -{ - //Print(L"Creating PDE Entry %X\n", Entry); - - // Identity mapping - *PhysicalPT = (PHARDWARE_PTE)&PhysicalPageTablesBuffer[PhysicalPageTables*MM_PAGE_SIZE]; - PhysicalPageTables++; - - PDE[Entry].PageFrameNumber = (ULONG)*PhysicalPT >> MM_PAGE_SHIFT; - PDE[Entry].Valid = 1; - PDE[Entry].Write = 1; - - if (Entry+(KSEG0_BASE >> 22) > 1023) - { - DPRINTM(DPRINT_WINDOWS, "WARNING! Entry: %X > 1023\n", Entry+(KSEG0_BASE >> 22)); - } - - // Kernel-mode mapping - *KernelPT = (PHARDWARE_PTE)&KernelPageTablesBuffer[KernelPageTables*MM_PAGE_SIZE]; - KernelPageTables++; - - PDE[Entry+(KSEG0_BASE >> 22)].PageFrameNumber = ((ULONG)*KernelPT >> MM_PAGE_SHIFT); - PDE[Entry+(KSEG0_BASE >> 22)].Valid = 1; - PDE[Entry+(KSEG0_BASE >> 22)].Write = 1; -} - -BOOLEAN -MempSetupPaging(IN ULONG StartPage, - IN ULONG NumberOfPages) -{ - PHARDWARE_PTE PhysicalPT; - PHARDWARE_PTE KernelPT; - ULONG Entry, Page; - - //Print(L"MempSetupPaging: SP 0x%X, Number: 0x%X\n", StartPage, NumberOfPages); - - // HACK - if (StartPage+NumberOfPages >= 0x80000) - { - // - // We can't map this as it requires more than 1 PDE - // and in fact it's not possible at all ;) - // - //Print(L"skipping...\n"); - return TRUE; - } - - // - // Now actually set up the page tables for identity mapping - // - for (Page=StartPage; Page < StartPage+NumberOfPages; Page++) - { - Entry = Page >> 10; - - if (((PULONG)PDE)[Entry] == 0) - { - MempAllocatePTE(Entry, &PhysicalPT, &KernelPT); - } - else - { - PhysicalPT = (PHARDWARE_PTE)(PDE[Entry].PageFrameNumber << MM_PAGE_SHIFT); - KernelPT = (PHARDWARE_PTE)(PDE[Entry+(KSEG0_BASE >> 22)].PageFrameNumber << MM_PAGE_SHIFT); - } - - if (Page == 0) - { - PhysicalPT[Page & 0x3ff].PageFrameNumber = Page; - PhysicalPT[Page & 0x3ff].Valid = 0; - PhysicalPT[Page & 0x3ff].Write = 0; - - KernelPT[Page & 0x3ff].PageFrameNumber = Page; - KernelPT[Page & 0x3ff].Valid = 0; - KernelPT[Page & 0x3ff].Write = 0; - } - else - { - PhysicalPT[Page & 0x3ff].PageFrameNumber = Page; - PhysicalPT[Page & 0x3ff].Valid = 1; - PhysicalPT[Page & 0x3ff].Write = 1; - - KernelPT[Page & 0x3ff].PageFrameNumber = Page; - KernelPT[Page & 0x3ff].Valid = 1; - KernelPT[Page & 0x3ff].Write = 1; - } - } - - return TRUE; -} - -VOID -MempDisablePages() -{ - ULONG i; - - // - // We need to delete kernel mapping from memory areas which are - // marked as Special or Permanent memory (thus non-accessible) - // - - for (i=0; i<MadCount; i++) - { - ULONG StartPage, EndPage, Page; - - StartPage = Mad[i].BasePage; - EndPage = Mad[i].BasePage + Mad[i].PageCount; - - if (Mad[i].MemoryType == LoaderFirmwarePermanent || - Mad[i].MemoryType == LoaderSpecialMemory || - Mad[i].MemoryType == LoaderFree || - (Mad[i].MemoryType == LoaderFirmwareTemporary && EndPage <= LoaderPagesSpanned) || - Mad[i].MemoryType == LoaderOsloaderStack || - Mad[i].MemoryType == LoaderLoadedProgram) - { - // - // But, the first megabyte of memory always stays! - // And, to tell the truth, we don't care about what's higher - // than LoaderPagesSpanned - if (Mad[i].MemoryType == LoaderFirmwarePermanent || - Mad[i].MemoryType == LoaderSpecialMemory) - { - if (StartPage < 0x100) - StartPage = 0x100; - - if (EndPage > LoaderPagesSpanned) - EndPage = LoaderPagesSpanned; - } - - for (Page = StartPage; Page < EndPage; Page++) - { - PHARDWARE_PTE KernelPT; - ULONG Entry = (Page >> 10) + (KSEG0_BASE >> 22); - - if (PDE[Entry].Valid) - { - KernelPT = (PHARDWARE_PTE)(PDE[Entry].PageFrameNumber << MM_PAGE_SHIFT); - - if (KernelPT) - { - KernelPT[Page & 0x3ff].PageFrameNumber = 0; - KernelPT[Page & 0x3ff].Valid = 0; - KernelPT[Page & 0x3ff].Write = 0; - } - } - } - } - } -} - -VOID -MempAddMemoryBlock(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, - ULONG BasePage, - ULONG PageCount, - ULONG Type) -{ - BOOLEAN Status; - - // - // Check for some weird stuff at the top - // - if (BasePage + PageCount > 0xF0000) - { - // - // Just skip this, without even adding to MAD list - // - return; - } - - // - // Set Base page, page count and type - // - Mad[MadCount].BasePage = BasePage; - Mad[MadCount].PageCount = PageCount; - Mad[MadCount].MemoryType = Type; - - // - // Check if it's more than the allowed for OS loader - // if yes - don't map the pages, just add as FirmwareTemporary - // - if (BasePage + PageCount > LoaderPagesSpanned) - { - if (Mad[MadCount].MemoryType != LoaderSpecialMemory && - Mad[MadCount].MemoryType != LoaderFirmwarePermanent && - Mad[MadCount].MemoryType != LoaderFree) - { - DPRINTM(DPRINT_WINDOWS, "Setting page %x %x to Temporary from %d\n", - BasePage, PageCount, Mad[MadCount].MemoryType); - Mad[MadCount].MemoryType = LoaderFirmwareTemporary; - } - - WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); - MadCount++; - - return; - } - - // - // Add descriptor - // - WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); - MadCount++; - - // - // Map it (don't map low 1Mb because it was already contigiously - // mapped in WinLdrTurnOnPaging) - // - if (BasePage >= 0x100) - { - Status = MempSetupPaging(BasePage, PageCount); - if (!Status) - { - DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging\n"); - return; - } - } -} - -#ifdef _M_IX86 -VOID -WinLdrpMapApic() -{ - BOOLEAN LocalAPIC; - LARGE_INTEGER MsrValue; - ULONG APICAddress, CpuInfo[4]; - - /* Check if we have a local APIC */ - __cpuid((int*)CpuInfo, 1); - LocalAPIC = (((CpuInfo[3] >> 9) & 1) != 0); - - /* If there is no APIC, just return */ - if (!LocalAPIC) - return; - - /* Read the APIC Address */ - MsrValue.QuadPart = __readmsr(0x1B); - APICAddress = (MsrValue.LowPart & 0xFFFFF000); - - DPRINTM(DPRINT_WINDOWS, "Local APIC detected at address 0x%x\n", - APICAddress); - - /* Map it */ - HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].PageFrameNumber - = APICAddress >> MM_PAGE_SHIFT; - HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].Valid = 1; - HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].Write = 1; - HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].WriteThrough = 1; - HalPageTable[(APIC_BASE - 0xFFC00000) >> MM_PAGE_SHIFT].CacheDisable = 1; -} -#else -VOID -WinLdrpMapApic() -{ - /* Implement it for another arch */ -} -#endif - -BOOLEAN -WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, - ULONG PcrBasePage, - ULONG TssBasePage, - PVOID GdtIdt) -{ - ULONG i, PagesCount, MemoryMapSizeInPages; - ULONG LastPageIndex, LastPageType, MemoryMapStartPage; - PPAGE_LOOKUP_TABLE_ITEM MemoryMap; - ULONG NoEntries; - PKTSS Tss; - BOOLEAN Status; - - // - // Creating a suitable memory map for the Windows can be tricky, so let's - // give a few advices: - // 1) One must not map the whole available memory pages to PDE! - // Map only what's needed - 16Mb, 24Mb, 32Mb max I think, - // thus occupying 4, 6 or 8 PDE entries for identical mapping, - // the same quantity for KSEG0_BASE mapping, one more entry for - // hyperspace and one more entry for HAL physical pages mapping. - // 2) Memory descriptors must map *the whole* physical memory - // showing any memory above 16/24/32 as FirmwareTemporary - // - // 3) Overall memory blocks count must not exceed 30 (?? why?) - // - - // - // During MmInitMachineDependent, the kernel zeroes PDE at the following address - // 0xC0300000 - 0xC03007FC - // - // Then it finds the best place for non-paged pool: - // StartPde C0300F70, EndPde C0300FF8, NumberOfPages C13, NextPhysPage 3AD - // - - // Before we start mapping pages, create a block of memory, which will contain - // PDE and PTEs - if (MempAllocatePageTables() == FALSE) - return FALSE; - - // Allocate memory for memory allocation descriptors - Mad = MmHeapAlloc(sizeof(MEMORY_ALLOCATION_DESCRIPTOR) * 1024); - - // Setup an entry for each descriptor - MemoryMap = MmGetMemoryMap(&NoEntries); - if (MemoryMap == NULL) - { - UiMessageBox("Can not retrieve the current memory map"); - return FALSE; - } - - // Calculate parameters of the memory map - MemoryMapStartPage = (ULONG_PTR)MemoryMap >> MM_PAGE_SHIFT; - MemoryMapSizeInPages = NoEntries * sizeof(PAGE_LOOKUP_TABLE_ITEM); - - DPRINTM(DPRINT_WINDOWS, "Got memory map with %d entries\n", NoEntries); - - // Always contigiously map low 1Mb of memory - Status = MempSetupPaging(0, 0x100); - if (!Status) - { - DPRINTM(DPRINT_WINDOWS, "Error during MempSetupPaging of low 1Mb\n"); - return FALSE; - } - - // Construct a good memory map from what we've got, - // but mark entries which the memory allocation bitmap takes - // as free entries (this is done in order to have the ability - // to place mem alloc bitmap outside lower 16Mb zone) - PagesCount = 1; - LastPageIndex = 0; - LastPageType = MemoryMap[0].PageAllocated; - for(i=1;i<NoEntries;i++) - { - // Check if its memory map itself - if (i >= MemoryMapStartPage && - i < (MemoryMapStartPage+MemoryMapSizeInPages)) - { - // Exclude it if current page belongs to the memory map - MemoryMap[i].PageAllocated = LoaderFree; - } - - // Process entry - if (MemoryMap[i].PageAllocated == LastPageType && - (i != NoEntries-1) ) - { - PagesCount++; - } - else - { - // Add the resulting region - MempAddMemoryBlock(LoaderBlock, LastPageIndex, PagesCount, LastPageType); - - // Reset our counter vars - LastPageIndex = i; - LastPageType = MemoryMap[i].PageAllocated; - PagesCount = 1; - } - } - - // TEMP, DEBUG! - // adding special reserved memory zones for vmware workstation -#if 0 - { - Mad[MadCount].BasePage = 0xfec00; - Mad[MadCount].PageCount = 0x10; - Mad[MadCount].MemoryType = LoaderSpecialMemory; - WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); - MadCount++; - - Mad[MadCount].BasePage = 0xfee00; - Mad[MadCount].PageCount = 0x1; - Mad[MadCount].MemoryType = LoaderSpecialMemory; - WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); - MadCount++; - - Mad[MadCount].BasePage = 0xfffe0; - Mad[MadCount].PageCount = 0x20; - Mad[MadCount].MemoryType = LoaderSpecialMemory; - WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); - MadCount++; - } -#endif - - DPRINTM(DPRINT_WINDOWS, "MadCount: %d\n", MadCount); - - WinLdrpDumpMemoryDescriptors(LoaderBlock); //FIXME: Delete! - - // Map our loader image, so we can continue running - /*Status = MempSetupPaging(OsLoaderBase >> MM_PAGE_SHIFT, OsLoaderSize >> MM_PAGE_SHIFT); - if (!Status) - { - UiMessageBox("Error during MempSetupPaging"); - return; - }*/ - - //VideoDisplayString(L"Hello from VGA, going into the kernel\n"); - DPRINTM(DPRINT_WINDOWS, "HalPageTable: 0x%X\n", HalPageTable); - - // Page Tables have been setup, make special handling for PCR and TSS - // (which is done in BlSetupFotNt in usual ntldr) - HalPageTable[(KI_USER_SHARED_DATA - 0xFFC00000) >> MM_PAGE_SHIFT].PageFrameNumber = PcrBasePage+1; - HalPageTable[(KI_USER_SHARED_DATA - 0xFFC00000) >> MM_PAGE_SHIFT].Valid = 1; - HalPageTable[(KI_USER_SHARED_DATA - 0xFFC00000) >> MM_PAGE_SHIFT].Write = 1; - - HalPageTable[(KIP0PCRADDRESS - 0xFFC00000) >> MM_PAGE_SHIFT].PageFrameNumber = PcrBasePage; - HalPageTable[(KIP0PCRADDRESS - 0xFFC00000) >> MM_PAGE_SHIFT].Valid = 1; - HalPageTable[(KIP0PCRADDRESS - 0xFFC00000) >> MM_PAGE_SHIFT].Write = 1; - - // Map APIC - WinLdrpMapApic(); - - // Map VGA memory - //VideoMemoryBase = MmMapIoSpace(0xb8000, 4000, MmNonCached); - //DPRINTM(DPRINT_WINDOWS, "VideoMemoryBase: 0x%X\n", VideoMemoryBase); - - Tss = (PKTSS)(KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); - - // Unmap what is not needed from kernel page table - MempDisablePages(); - - // Fill the memory descriptor list and - //PrepareMemoryDescriptorList(); - DPRINTM(DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n"); - List_PaToVa(&LoaderBlock->MemoryDescriptorListHead); - -#if DBG - { - ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000; - int j; - - DPRINTM(DPRINT_WINDOWS, "\nPDE\n"); - - for (i=0; i<128; i++) - { - DPRINTM(DPRINT_WINDOWS, "0x%04X | ", i*8); - - for (j=0; j<8; j++) - { - DPRINTM(DPRINT_WINDOWS, "0x%08X ", PDE_Addr[i*8+j]); - } - - DPRINTM(DPRINT_WINDOWS, "\n"); - } - } -#endif - - - // Enable paging - //BS->ExitBootServices(ImageHandle,MapKey); - - // Disable Interrupts - _disable(); - - // Re-initalize EFLAGS - __writeeflags(0); - - // Set the PDBR - __writecr3((ULONG_PTR)PDE); - - // Enable paging by modifying CR0 - __writecr0(__readcr0() | CR0_PG); - - // Set processor context - WinLdrSetProcessorContext(GdtIdt, KIP0PCRADDRESS, KSEG0_BASE | (TssBasePage << MM_PAGE_SHIFT)); - - // Zero KI_USER_SHARED_DATA page - memset((PVOID)KI_USER_SHARED_DATA, 0, MM_PAGE_SIZE); - - return TRUE; -} - -// Two special things this func does: it sorts descriptors, -// and it merges free ones -VOID -WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, - IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor) -{ - PLIST_ENTRY ListHead = &LoaderBlock->MemoryDescriptorListHead; - PLIST_ENTRY PreviousEntry, NextEntry; - PMEMORY_ALLOCATION_DESCRIPTOR PreviousDescriptor = NULL, NextDescriptor = NULL; - - DPRINTM(DPRINT_WINDOWS, "BP=0x%X PC=0x%X %s\n", NewDescriptor->BasePage, - NewDescriptor->PageCount, MemTypeDesc[NewDescriptor->MemoryType]); - - /* Find a place where to insert the new descriptor to */ - PreviousEntry = ListHead; - NextEntry = ListHead->Flink; - while (NextEntry != ListHead) - { - NextDescriptor = CONTAINING_RECORD(NextEntry, - MEMORY_ALLOCATION_DESCRIPTOR, - ListEntry); - if (NewDescriptor->BasePage < NextDescriptor->BasePage) - break; - - PreviousEntry = NextEntry; - PreviousDescriptor = NextDescriptor; - NextEntry = NextEntry->Flink; - } - - /* Don't forget about merging free areas */ - if (NewDescriptor->MemoryType != LoaderFree) - { - /* Just insert, nothing to merge */ - InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry); - } - else - { - /* Previous block also free? */ - if ((PreviousEntry != ListHead) && (PreviousDescriptor->MemoryType == LoaderFree) && - ((PreviousDescriptor->BasePage + PreviousDescriptor->PageCount) == - NewDescriptor->BasePage)) - { - /* Just enlarge previous descriptor's PageCount */ - PreviousDescriptor->PageCount += NewDescriptor->PageCount; - NewDescriptor = PreviousDescriptor; - } - else - { - /* Nope, just insert */ - InsertHeadList(PreviousEntry, &NewDescriptor->ListEntry); - } - - /* Next block is free ?*/ - if ((NextEntry != ListHead) && - (NextDescriptor->MemoryType == LoaderFree) && - ((NewDescriptor->BasePage + NewDescriptor->PageCount) == NextDescriptor->BasePage)) - { - /* Enlarge next descriptor's PageCount */ - NewDescriptor->PageCount += NextDescriptor->PageCount; - RemoveEntryList(&NextDescriptor->ListEntry); - } - } - - return; -} - -VOID -WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss) -{ - GDTIDT GdtDesc, IdtDesc, OldIdt; - PKGDTENTRY pGdt; - PKIDTENTRY pIdt; - ULONG Ldt = 0; - //ULONG i; - - DPRINTM(DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n", - GdtIdt, Pcr, Tss); - - // Kernel expects the PCR to be zero-filled on startup - // FIXME: Why zero it here when we can zero it right after allocation? - RtlZeroMemory((PVOID)Pcr, MM_PAGE_SIZE); //FIXME: Why zero only 1 page when we allocate 2? - - // Get old values of GDT and IDT - Ke386GetGlobalDescriptorTable(&GdtDesc); - __sidt(&IdtDesc); - - // Save old IDT - OldIdt.Base = IdtDesc.Base; - OldIdt.Limit = IdtDesc.Limit; - - // Prepare new IDT+GDT - GdtDesc.Base = KSEG0_BASE | (ULONG_PTR)GdtIdt; - GdtDesc.Limit = NUM_GDT * sizeof(KGDTENTRY) - 1; - IdtDesc.Base = (ULONG)((PUCHAR)GdtDesc.Base + GdtDesc.Limit + 1); - IdtDesc.Limit = NUM_IDT * sizeof(KIDTENTRY) - 1; - - // ======================== - // Fill all descriptors now - // ======================== - - pGdt = (PKGDTENTRY)GdtDesc.Base; - pIdt = (PKIDTENTRY)IdtDesc.Base; - - // - // Code selector (0x8) - // Flat 4Gb - // - pGdt[1].LimitLow = 0xFFFF; - pGdt[1].BaseLow = 0; - pGdt[1].HighWord.Bytes.BaseMid = 0; - pGdt[1].HighWord.Bytes.Flags1 = 0x9A; - pGdt[1].HighWord.Bytes.Flags2 = 0xCF; - pGdt[1].HighWord.Bytes.BaseHi = 0; - - // - // Data selector (0x10) - // Flat 4Gb - // - pGdt[2].LimitLow = 0xFFFF; - pGdt[2].BaseLow = 0; - pGdt[2].HighWord.Bytes.BaseMid = 0; - pGdt[2].HighWord.Bytes.Flags1 = 0x92; - pGdt[2].HighWord.Bytes.Flags2 = 0xCF; - pGdt[2].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x18) - // Flat 2Gb - // - pGdt[3].LimitLow = 0xFFFF; - pGdt[3].BaseLow = 0; - pGdt[3].HighWord.Bytes.BaseMid = 0; - pGdt[3].HighWord.Bytes.Flags1 = 0xFA; - pGdt[3].HighWord.Bytes.Flags2 = 0xCF; - pGdt[3].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x20) - // Flat 2Gb - // - pGdt[4].LimitLow = 0xFFFF; - pGdt[4].BaseLow = 0; - pGdt[4].HighWord.Bytes.BaseMid = 0; - pGdt[4].HighWord.Bytes.Flags1 = 0xF2; - pGdt[4].HighWord.Bytes.Flags2 = 0xCF; - pGdt[4].HighWord.Bytes.BaseHi = 0; - - // - // TSS Selector (0x28) - // - pGdt[5].LimitLow = 0x78-1; //FIXME: Check this - pGdt[5].BaseLow = (USHORT)(Tss & 0xffff); - pGdt[5].HighWord.Bytes.BaseMid = (UCHAR)((Tss >> 16) & 0xff); - pGdt[5].HighWord.Bytes.Flags1 = 0x89; - pGdt[5].HighWord.Bytes.Flags2 = 0x00; - pGdt[5].HighWord.Bytes.BaseHi = (UCHAR)((Tss >> 24) & 0xff); - - // - // PCR Selector (0x30) - // - pGdt[6].LimitLow = 0x01; - pGdt[6].BaseLow = (USHORT)(Pcr & 0xffff); - pGdt[6].HighWord.Bytes.BaseMid = (UCHAR)((Pcr >> 16) & 0xff); - pGdt[6].HighWord.Bytes.Flags1 = 0x92; - pGdt[6].HighWord.Bytes.Flags2 = 0xC0; - pGdt[6].HighWord.Bytes.BaseHi = (UCHAR)((Pcr >> 24) & 0xff); - - // - // Selector (0x38) - // - pGdt[7].LimitLow = 0xFFFF; - pGdt[7].BaseLow = 0; - pGdt[7].HighWord.Bytes.BaseMid = 0; - pGdt[7].HighWord.Bytes.Flags1 = 0xF3; - pGdt[7].HighWord.Bytes.Flags2 = 0x40; - pGdt[7].HighWord.Bytes.BaseHi = 0; - - // - // Some BIOS stuff (0x40) - // - pGdt[8].LimitLow = 0xFFFF; - pGdt[8].BaseLow = 0x400; - pGdt[8].HighWord.Bytes.BaseMid = 0; - pGdt[8].HighWord.Bytes.Flags1 = 0xF2; - pGdt[8].HighWord.Bytes.Flags2 = 0x0; - pGdt[8].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x48) - // - pGdt[9].LimitLow = 0; - pGdt[9].BaseLow = 0; - pGdt[9].HighWord.Bytes.BaseMid = 0; - pGdt[9].HighWord.Bytes.Flags1 = 0; - pGdt[9].HighWord.Bytes.Flags2 = 0; - pGdt[9].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x50) - // - pGdt[10].LimitLow = 0xFFFF; //FIXME: Not correct! - pGdt[10].BaseLow = 0; - pGdt[10].HighWord.Bytes.BaseMid = 0x2; - pGdt[10].HighWord.Bytes.Flags1 = 0x89; - pGdt[10].HighWord.Bytes.Flags2 = 0; - pGdt[10].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x58) - // - pGdt[11].LimitLow = 0xFFFF; - pGdt[11].BaseLow = 0; - pGdt[11].HighWord.Bytes.BaseMid = 0x2; - pGdt[11].HighWord.Bytes.Flags1 = 0x9A; - pGdt[11].HighWord.Bytes.Flags2 = 0; - pGdt[11].HighWord.Bytes.BaseHi = 0; - - // - // Selector (0x60) - // - pGdt[12].LimitLow = 0xFFFF; - pGdt[12].BaseLow = 0; //FIXME: Maybe not correct, but noone cares - pGdt[12].HighWord.Bytes.BaseMid = 0x2; - pGdt[12].HighWord.Bytes.Flags1 = 0x92; - pGdt[12].HighWord.Bytes.Flags2 = 0; - pGdt[12].HighWord.Bytes.BaseHi = 0; - - // - // Video buffer Selector (0x68) - // - pGdt[13].LimitLow = 0x3FFF; - pGdt[13].BaseLow = 0x8000; - pGdt[13].HighWord.Bytes.BaseMid = 0x0B; - pGdt[13].HighWord.Bytes.Flags1 = 0x92; - pGdt[13].HighWord.Bytes.Flags2 = 0; - pGdt[13].HighWord.Bytes.BaseHi = 0; - - // - // Points to GDT (0x70) - // - pGdt[14].LimitLow = NUM_GDT*sizeof(KGDTENTRY) - 1; - pGdt[14].BaseLow = 0x7000; - pGdt[14].HighWord.Bytes.BaseMid = 0xFF; - pGdt[14].HighWord.Bytes.Flags1 = 0x92; - pGdt[14].HighWord.Bytes.Flags2 = 0; - pGdt[14].HighWord.Bytes.BaseHi = 0xFF; - - // - // Some unused descriptors should go here - // - - // Copy the old IDT - RtlCopyMemory(pIdt, (PVOID)OldIdt.Base, OldIdt.Limit + 1); - - // Mask interrupts - //asm("cli\n"); // they are already masked before enabling paged mode - - // Load GDT+IDT - Ke386SetGlobalDescriptorTable(&GdtDesc); - __lidt(&IdtDesc); - - // Jump to proper CS and clear prefetch queue -#if defined(__GNUC__) - asm("ljmp $0x08, $1f\n" - "1:\n"); -#elif defined(_MSC_VER) - /* We can't express the above in MASM so we use this far return instead */ - DbgPrint("WinLdrSetProcessorContext: Performing untested far-return\n"); - __asm { - push 8 - push offset resume - retf - resume: - }; -#else -#error -#endif - - // Set SS selector - Ke386SetSs(0x10); // DataSelector=0x10 - - // Set DS and ES selectors - Ke386SetDs(0x10); - Ke386SetEs(0x10); // this is vital for rep stosd - - // LDT = not used ever, thus set to 0 - Ke386SetLocalDescriptorTable(Ldt); - - // Load TSR - Ke386SetTr(KGDT_TSS); - - // Clear GS - Ke386SetGs(0); - - // Set FS to PCR - Ke386SetFs(0x30); - - // Real end of the function, just for information - /* do not uncomment! - pop edi; - pop esi; - pop ebx; - mov esp, ebp; - pop ebp; - ret - */ -}
15 years, 2 months
1
0
0
0
[hpoussin] 43565: [freeldr/i386] Read up to 128 sectors at once
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Oct 18 20:24:35 2009 New Revision: 43565 URL:
http://svn.reactos.org/svn/reactos?rev=43565&view=rev
Log: [freeldr/i386] Read up to 128 sectors at once Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/include/arch.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sun Oct 18 20:24:35 2009 @@ -467,7 +467,7 @@ { DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); UCHAR* Ptr = (UCHAR*)Buffer; - ULONG i, Length; + ULONG i, Length, Sectors; BOOLEAN ret; *Count = 0; @@ -475,12 +475,13 @@ while (N > 0) { Length = N; - if (Length > Context->SectorSize) - Length = Context->SectorSize; + if (Length > DISKREADBUFFER_SIZE) + Length = DISKREADBUFFER_SIZE; + Sectors = (Length + Context->SectorSize - 1) / Context->SectorSize; ret = MachDiskReadLogicalSectors( Context->DriveNumber, Context->SectorNumber + Context->SectorOffset + i, - 1, + Sectors, (PVOID)DISKREADBUFFER); if (!ret) return EIO; @@ -488,7 +489,7 @@ Ptr += Length; *Count += Length; N -= Length; - i++; + i += Sectors; } return ESUCCESS; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Sun Oct 18 20:24:35 2009 @@ -168,7 +168,7 @@ { DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); UCHAR* Ptr = (UCHAR*)Buffer; - ULONG i, Length; + ULONG i, Length, Sectors; BOOLEAN ret; *Count = 0; @@ -176,12 +176,13 @@ while (N > 0) { Length = N; - if (Length > Context->SectorSize) - Length = Context->SectorSize; + if (Length > DISKREADBUFFER_SIZE) + Length = DISKREADBUFFER_SIZE; + Sectors = (Length + Context->SectorSize - 1) / Context->SectorSize; ret = MachDiskReadLogicalSectors( Context->DriveNumber, Context->SectorNumber + Context->SectorOffset + i, - 1, + Sectors, (PVOID)DISKREADBUFFER); if (!ret) return EIO; @@ -189,7 +190,7 @@ Ptr += Length; *Count += Length; N -= Length; - i++; + i += Sectors; } return ESUCCESS; Modified: trunk/reactos/boot/freeldr/freeldr/include/arch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch.h [iso-8859-1] Sun Oct 18 20:24:35 2009 @@ -46,6 +46,7 @@ #define BIOSCALLBUFOFFSET 0x0000 /* Buffer to store temporary data for any Int386() call */ #define FILESYSBUFFER 0x80000 /* Buffer to store file system data (e.g. cluster buffer for FAT) */ #define DISKREADBUFFER 0x90000 /* Buffer to store data read in from the disk via the BIOS */ +#define DISKREADBUFFER_SIZE 0x10000 #elif defined(_M_PPC) || defined(_M_MIPS) || defined(_M_ARM) #define DISKREADBUFFER 0x80000000 #define FILESYSBUFFER 0x80000000
15 years, 2 months
1
0
0
0
[tkreuzer] 43564: Add HYPER_SPACE, MI_MAKE_OWNER_PAGE, MI_MAKE_WRITE_PAGE and some globals
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 20:15:52 2009 New Revision: 43564 URL:
http://svn.reactos.org/svn/reactos?rev=43564&view=rev
Log: Add HYPER_SPACE, MI_MAKE_OWNER_PAGE, MI_MAKE_WRITE_PAGE and some globals Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/mm.h [iso-8859-1] Sun Oct 18 20:15:52 2009 @@ -16,6 +16,8 @@ #define PAGE_MASK(x) ((x)&(~0xfff)) #define PAE_PAGE_MASK(x) ((x)&(~0xfffLL)) + +#define HYPER_SPACE 0xFFFFF70000000000ULL /* Base addresses of PTE and PDE */ //#define PAGETABLE_MAP PTE_BASE @@ -56,5 +58,7 @@ #define MI_IS_PAGE_WRITEABLE(x) ((x)->u.Hard.Write == 1) #define MI_IS_PAGE_COPY_ON_WRITE(x)((x)->u.Hard.CopyOnWrite == 1) #define MI_IS_PAGE_DIRTY(x) ((x)->u.Hard.Dirty == 1) +#define MI_MAKE_OWNER_PAGE(x) ((x)->u.Hard.Owner = 1) +#define MI_MAKE_WRITE_PAGE(x) ((x)->u.Hard.Write = 1) #endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_MM_H */ Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/amd64/init.c [iso-8859-1] Sun Oct 18 20:15:52 2009 @@ -21,6 +21,8 @@ ULONG MmMaximumNonPagedPoolPercent; ULONG MmSizeOfNonPagedPoolInBytes; ULONG MmMaximumNonPagedPoolInBytes; + +PVOID MiSessionSpaceEnd; // 0xC0000000 ULONG64 MmUserProbeAddress; PVOID MmHighestUserAddress; @@ -50,6 +52,10 @@ PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor; MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor; +PMMPTE MmSystemPagePtes; +ULONG MxPfnAllocation; +PVOID MiSystemViewStart; +ULONG MmSystemViewSize; NTSTATUS NTAPI
15 years, 2 months
1
0
0
0
[tkreuzer] 43563: fix MmSetAddressRangeModified prototype
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 19:25:59 2009 New Revision: 43563 URL:
http://svn.reactos.org/svn/reactos?rev=43563&view=rev
Log: fix MmSetAddressRangeModified prototype Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h [iso-8859-1] Sun Oct 18 19:25:59 2009 @@ -4513,7 +4513,7 @@ NTAPI MmSetAddressRangeModified ( IN PVOID Address, - IN ULONG Length + IN SIZE_T Length ); NTKERNELAPI
15 years, 2 months
1
0
0
0
[tkreuzer] 43562: Merge trunk (r43561)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 19:24:21 2009 New Revision: 43562 URL:
http://svn.reactos.org/svn/reactos?rev=43562&view=rev
Log: Merge trunk (r43561) Added: branches/ros-amd64-bringup/reactos/base/applications/games/spider/lang/pl-PL.rc - copied unchanged from r43556, trunk/reactos/base/applications/games/spider/lang/pl-PL.rc branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken1.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken1.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken10.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken10.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken11.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken11.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken12.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken12.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken2.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken2.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken3.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken3.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken4.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken4.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken5.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken5.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken6.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken6.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken7.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken7.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken8.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken8.bmp branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken9.bmp - copied unchanged from r43556, trunk/reactos/dll/win32/cards/res/bavarian/Ruecken9.bmp branches/ros-amd64-bringup/reactos/dll/win32/rasadhlp/ - copied from r43556, trunk/reactos/dll/win32/rasadhlp/ branches/ros-amd64-bringup/reactos/include/ndk/i386/asm.h - copied unchanged from r43556, trunk/reactos/include/ndk/i386/asm.h branches/ros-amd64-bringup/reactos/include/psdk/ws2atm.h - copied unchanged from r43556, trunk/reactos/include/psdk/ws2atm.h branches/ros-amd64-bringup/reactos/lib/dnslib/ - copied from r43556, trunk/reactos/lib/dnslib/ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/mmsup.c - copied unchanged from r43556, trunk/reactos/ntoskrnl/mm/ARM3/mmsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/pagfault.c - copied unchanged from r43556, trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/virtual.c - copied unchanged from r43556, trunk/reactos/ntoskrnl/mm/ARM3/virtual.c Removed: branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken.bmp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port.hpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmsup.c Modified: branches/ros-amd64-bringup/reactos/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/downloader/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/fontview/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/games/solitaire/solitaire.cpp branches/ros-amd64-bringup/reactos/base/applications/games/spider/rsrc.rc branches/ros-amd64-bringup/reactos/base/applications/games/spider/spider.cpp branches/ros-amd64-bringup/reactos/base/applications/games/spider/spigame.cpp branches/ros-amd64-bringup/reactos/base/applications/magnify/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/winver/ (props changed) branches/ros-amd64-bringup/reactos/base/applications/write/ (props changed) branches/ros-amd64-bringup/reactos/base/services/telnetd/ (props changed) branches/ros-amd64-bringup/reactos/base/setup/usetup/interface/devinst.c branches/ros-amd64-bringup/reactos/base/shell/explorer/i386-stub-win32.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/ (props changed) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/fs/fat.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/arch/amd64/ (props changed) branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/fs/fat.h branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c branches/ros-amd64-bringup/reactos/dll/cpl/desk/appearance.c branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.c (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.rc (props changed) branches/ros-amd64-bringup/reactos/dll/keyboard/kbdlt1/kbdlt1.spec (props changed) branches/ros-amd64-bringup/reactos/dll/ntdll/include/ntdllp.h branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/startup.c branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c branches/ros-amd64-bringup/reactos/dll/win32/advapi32/reg/reg.c branches/ros-amd64-bringup/reactos/dll/win32/advapi32/sec/cred.c branches/ros-amd64-bringup/reactos/dll/win32/cards/cards.rc branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/isbad.c branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c branches/ros-amd64-bringup/reactos/dll/win32/msi/action.c branches/ros-amd64-bringup/reactos/dll/win32/msi/custom.c branches/ros-amd64-bringup/reactos/dll/win32/msi/files.c branches/ros-amd64-bringup/reactos/dll/win32/msi/media.c branches/ros-amd64-bringup/reactos/dll/win32/msi/msi.c branches/ros-amd64-bringup/reactos/dll/win32/msi/msipriv.h branches/ros-amd64-bringup/reactos/dll/win32/msi/msiserver.idl branches/ros-amd64-bringup/reactos/dll/win32/msi/package.c branches/ros-amd64-bringup/reactos/dll/win32/msi/suminfo.c branches/ros-amd64-bringup/reactos/dll/win32/msi/table.c branches/ros-amd64-bringup/reactos/dll/win32/shell32/shlview.c branches/ros-amd64-bringup/reactos/dll/win32/shlwapi/regstream.c branches/ros-amd64-bringup/reactos/dll/win32/shlwapi/shlwapi.spec branches/ros-amd64-bringup/reactos/dll/win32/user32/controls/edit.c branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c branches/ros-amd64-bringup/reactos/dll/win32/win32.rbuild branches/ros-amd64-bringup/reactos/dll/win32/winspool/stubs.c branches/ros-amd64-bringup/reactos/dll/win32/winspool/winspool.spec branches/ros-amd64-bringup/reactos/dll/win32/ws2_32_new/src/getxbyxx.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/create.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/dir.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fastfat.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fastfat.h branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fatstruc.h branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fcb.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fsctl.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fullfat.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/lock.c branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/volume.c branches/ros-amd64-bringup/reactos/drivers/multimedia/audio/sb16_nt4.old/ (props changed) branches/ros-amd64-bringup/reactos/drivers/multimedia/audio/sndblst.old/ (props changed) branches/ros-amd64-bringup/reactos/drivers/multimedia/bdasup/bdasup.c branches/ros-amd64-bringup/reactos/drivers/storage/class/ramdisk/ramdisk.c branches/ros-amd64-bringup/reactos/drivers/video/font/bmfd/ (props changed) branches/ros-amd64-bringup/reactos/drivers/video/font/ftfd/ (props changed) branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/audio_test/audio_test.c branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/api.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/private.hpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/control.c branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c branches/ros-amd64-bringup/reactos/drivers/wdm/audio/sysaudio/pin.c branches/ros-amd64-bringup/reactos/include/crt/_mingw.h branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h (props changed) branches/ros-amd64-bringup/reactos/include/ddk/bdasup.h branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h branches/ros-amd64-bringup/reactos/include/ddk/portcls.h branches/ros-amd64-bringup/reactos/include/ddk/winddk.h branches/ros-amd64-bringup/reactos/include/ndk/asm.h branches/ros-amd64-bringup/reactos/include/ndk/lpctypes.h branches/ros-amd64-bringup/reactos/include/ndk/mmfuncs.h branches/ros-amd64-bringup/reactos/include/ndk/mmtypes.h branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h branches/ros-amd64-bringup/reactos/include/psdk/ks.h branches/ros-amd64-bringup/reactos/include/psdk/msi.h branches/ros-amd64-bringup/reactos/include/psdk/windns.h branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h branches/ros-amd64-bringup/reactos/include/psdk/winnt.h branches/ros-amd64-bringup/reactos/include/reactos/winsock/nsp_dns.h branches/ros-amd64-bringup/reactos/lib/cmlib/cminit.c branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c branches/ros-amd64-bringup/reactos/lib/lib.rbuild branches/ros-amd64-bringup/reactos/lib/rtl/heap.c branches/ros-amd64-bringup/reactos/lib/rtl/unicode.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/string/strtol.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/string/strtoul.c branches/ros-amd64-bringup/reactos/lib/sdk/crt/time/ (props changed) branches/ros-amd64-bringup/reactos/ntoskrnl/cc/view.c branches/ros-amd64-bringup/reactos/ntoskrnl/ex/sysinfo.c branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/cc.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/kd.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/kd64.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/deviface.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd/kdmain.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/arm/kdsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/i386/kdsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdbreak.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdtrap.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/freeldr.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/exp.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/mtrr.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/patpge.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/trap.s branches/ros-amd64-bringup/reactos/ntoskrnl/ke/powerpc/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/arm/init.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/expool.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/i386/init.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/miarm.h branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/pool.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/procsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/arm/stubs.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/balance.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/marea.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/pool.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ppool.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/procsup.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/section.c branches/ros-amd64-bringup/reactos/ntoskrnl/mm/virtual.c branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild branches/ros-amd64-bringup/reactos/ntoskrnl/ps/process.c branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmmain.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/engobjects.h (props changed) branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/msgqueue.h branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/input.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/ntuser.c branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/region.c branches/ros-amd64-bringup/reactos/tools/hpp/ (props changed) branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.vcproj branches/ros-amd64-bringup/reactos/tools/rbuild_helper/ (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.c (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/log2lines.mak (props changed) branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-amd64-bringup/reactos/base/applications/games/solitaire/solitaire.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/spider/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/spider/spider.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/applications/games/spider/spigame.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/setup/usetup/interface/devinst.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/base/shell/explorer/i386-stub-win32.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/fs/fat.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/fs/fat.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
Modified: branches/ros-amd64-bringup/reactos/dll/cpl/desk/appearance.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/c…
Modified: branches/ros-amd64-bringup/reactos/dll/ntdll/include/ntdllp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/n…
Modified: branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/startup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/n…
Modified: branches/ros-amd64-bringup/reactos/dll/ntdll/ldr/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/n…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/advapi32/sec/cred.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/cards/cards.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Removed: branches/ros-amd64-bringup/reactos/dll/win32/cards/res/bavarian/Ruecken.bmp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/gdi32/objects/font.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/isbad.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/mem/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/action.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/custom.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/files.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/media.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/msi.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/msipriv.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/msiserver.idl URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/package.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/suminfo.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/msi/table.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shell32/shlview.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shlwapi/regstream.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/shlwapi/shlwapi.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/controls/edit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/user32/windows/dialog.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winspool/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/winspool/winspool.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/dll/win32/ws2_32_new/src/getxbyxx.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/w…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/create.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/dir.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fastfat.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fastfat.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fatstruc.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fcb.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fsctl.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/fullfat.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/lock.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/filesystems/fastfat_new/volume.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/multimedia/bdasup/bdasup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/audio_test/audio_test.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/api.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/interfaces.hpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_dmus.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavepci.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/pin_wavert.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Removed: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port.hpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Removed: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_factory.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/port_wavertstream.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/private.hpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/control.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/sysaudio/pin.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
Modified: branches/ros-amd64-bringup/reactos/include/crt/_mingw.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ddk/bdasup.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ddk/portcls.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/asm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/lpctypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/mmfuncs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/mmtypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/ndk/pstypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/psdk/ks.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/psdk/msi.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/psdk/windns.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/psdk/wingdi.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/include/reactos/winsock/nsp_dns.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
Modified: branches/ros-amd64-bringup/reactos/lib/cmlib/cminit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/c…
Modified: branches/ros-amd64-bringup/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
Modified: branches/ros-amd64-bringup/reactos/lib/lib.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/l…
Modified: branches/ros-amd64-bringup/reactos/lib/rtl/heap.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/r…
Modified: branches/ros-amd64-bringup/reactos/lib/rtl/unicode.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/r…
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/stdio/file.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/string/strtol.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
Modified: branches/ros-amd64-bringup/reactos/lib/sdk/crt/string/strtoul.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/s…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/cc/view.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/arm/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/cc.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/i386/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/kd.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/kd64.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/io/iomgr/deviface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd/kdmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/arm/kdsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/i386/kdsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdbreak.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdtrap.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/arm/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/mtrr.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/patpge.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/powerpc/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/arm/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ARM3/syspte.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/arm/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/balance.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmfault.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/mmsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/pool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/ppool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/procsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/section.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/process.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ps/thread.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/vdm/vdmmain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/include/msgqueue.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/input.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/msgqueue.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
15 years, 2 months
1
0
0
0
[tkreuzer] 43561: Fix parameters of ExAllocatePoolWithQuota and ExAllocatePoolWithQuotaTag
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 19:12:19 2009 New Revision: 43561 URL:
http://svn.reactos.org/svn/reactos?rev=43561&view=rev
Log: Fix parameters of ExAllocatePoolWithQuota and ExAllocatePoolWithQuotaTag Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Sun Oct 18 19:12:19 2009 @@ -662,7 +662,7 @@ PVOID NTAPI ExAllocatePoolWithQuota(IN POOL_TYPE PoolType, - IN ULONG NumberOfBytes) + IN SIZE_T NumberOfBytes) { // // Allocate the pool @@ -693,7 +693,7 @@ PVOID NTAPI ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType, - IN ULONG NumberOfBytes, + IN SIZE_T NumberOfBytes, IN ULONG Tag) { //
15 years, 2 months
1
0
0
0
[tkreuzer] 43560: ULONG -> ULONG_PTR
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 18:39:24 2009 New Revision: 43560 URL:
http://svn.reactos.org/svn/reactos?rev=43560&view=rev
Log: ULONG -> ULONG_PTR Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/wdm/audio/legacy/wdmaud/mixer.c [iso-8859-1] Sun Oct 18 18:39:24 2009 @@ -1789,7 +1789,7 @@ if (DeviceInfo->Flags == MIXER_GETLINEINFOF_DESTINATION) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); @@ -1800,7 +1800,7 @@ /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DESTINATION_LINE); + MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DESTINATION_LINE); ASSERT(MixerLineSrc); /* copy cached data */ @@ -1809,13 +1809,13 @@ } else if (DeviceInfo->Flags == MIXER_GETLINEINFOF_SOURCE) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DESTINATION_LINE); + MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DESTINATION_LINE); ASSERT(MixerLineSrc); if (DeviceInfo->u.MixLine.dwSource >= MixerLineSrc->Line.cConnections) @@ -1825,7 +1825,7 @@ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLine(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwSource); + MixerLineSrc = GetSourceMixerLine(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwSource); if (MixerLineSrc) { DPRINT("Line %u Name %S\n", MixerLineSrc->Line.dwSource, MixerLineSrc->Line.szName); @@ -1835,13 +1835,13 @@ } else if (DeviceInfo->Flags == MIXER_GETLINEINFOF_LINEID) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwLineID); + MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwLineID); if (!MixerLineSrc) { DPRINT1("Failed to find Line with id %u\n", DeviceInfo->u.MixLine.dwLineID); @@ -1854,13 +1854,13 @@ } else if (DeviceInfo->Flags == MIXER_GETLINEINFOF_COMPONENTTYPE) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByComponentType(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwComponentType); + MixerLineSrc = GetSourceMixerLineByComponentType(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwComponentType); ASSERT(MixerLineSrc); /* copy cached data */ @@ -1897,13 +1897,13 @@ if (DeviceInfo->Flags == MIXER_GETLINECONTROLSF_ALL) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwLineID); + MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwLineID); ASSERT(MixerLineSrc); if (MixerLineSrc) { @@ -1913,13 +1913,13 @@ } else if (DeviceInfo->Flags == MIXER_GETLINECONTROLSF_ONEBYTYPE) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwLineID); + MixerLineSrc = GetSourceMixerLineByLineId(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwLineID); ASSERT(MixerLineSrc); Index = 0; @@ -1937,13 +1937,13 @@ } else if (DeviceInfo->Flags == MIXER_GETLINECONTROLSF_ONEBYID) { - if ((ULONG)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) + if ((ULONG_PTR)DeviceInfo->hDevice >= DeviceExtension->MixerInfoCount) { /* invalid parameter */ return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0); } - DPRINT1("MixerId %u ControlId %u\n",(ULONG)DeviceInfo->hDevice, DeviceInfo->u.MixControls.dwControlID); - Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwControlID, NULL, &MixerControl, NULL); + DPRINT1("MixerId %u ControlId %u\n",(ULONG_PTR)DeviceInfo->hDevice, DeviceInfo->u.MixControls.dwControlID); + Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixControls.dwControlID, NULL, &MixerControl, NULL); if (NT_SUCCESS(Status)) { RtlMoveMemory(DeviceInfo->u.MixControls.pamxctrl, MixerControl, sizeof(MIXERCONTROLW)); @@ -2147,7 +2147,7 @@ DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* get mixer control */ - Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixDetails.dwControlID, &MixerLine, &MixerControl, &NodeId); + Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixDetails.dwControlID, &MixerLine, &MixerControl, &NodeId); if (!NT_SUCCESS(Status)) { @@ -2199,7 +2199,7 @@ DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* get mixer control */ - Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG)DeviceInfo->hDevice], DeviceInfo->u.MixDetails.dwControlID, &MixerLine, &MixerControl, &NodeId); + Status = GetMixerControlById(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixDetails.dwControlID, &MixerLine, &MixerControl, &NodeId); if (!NT_SUCCESS(Status)) {
15 years, 2 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200