ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2008
----- 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
31 participants
710 discussions
Start a n
N
ew thread
[tkreuzer] 38284: don't define strcasecmp to strcmp, use _stricmp, and define strcasecmp to _strnicmp.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 17:35:35 2008 New Revision: 38284 URL:
http://svn.reactos.org/svn/reactos?rev=38284&view=rev
Log: don't define strcasecmp to strcmp, use _stricmp, and define strcasecmp to _strnicmp. Modified: trunk/reactos/base/applications/network/ftp/fake.h Modified: trunk/reactos/base/applications/network/ftp/fake.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
============================================================================== --- trunk/reactos/base/applications/network/ftp/fake.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/network/ftp/fake.h [iso-8859-1] Mon Dec 22 17:35:35 2008 @@ -6,8 +6,8 @@ #define getwd getcwd -#define strcasecmp strcmp -#define strncasecmp strnicmp +#define strcasecmp _stricmp +#define strncasecmp _strnicmp struct timezone { int tz_minuteswest; /* minutes W of Greenwich */
16 years
1
0
0
0
[tkreuzer] 38283: Replace deprectaed function (unlink, stricmp) with new ones (_unlink, _stricmp)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 17:24:18 2008 New Revision: 38283 URL:
http://svn.reactos.org/svn/reactos?rev=38283&view=rev
Log: Replace deprectaed function (unlink, stricmp) with new ones (_unlink, _stricmp) Modified: trunk/rosapps/dflat32/config.c trunk/rosapps/dflat32/direct.c trunk/rosapps/dflat32/edit.c trunk/rosapps/dflat32/helpbox.c Modified: trunk/rosapps/dflat32/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/dflat32/config.c?rev=38283…
============================================================================== --- trunk/rosapps/dflat32/config.c [iso-8859-1] (original) +++ trunk/rosapps/dflat32/config.c [iso-8859-1] Mon Dec 22 17:24:18 2008 @@ -479,7 +479,7 @@ char path[64]; DfBuildFileName(path, ".DfCfg"); fclose(fp); - unlink(path); + _unlink(path); strcpy(DfCfg.version, DF_VERSION); } ConfigLoaded = TRUE; Modified: trunk/rosapps/dflat32/direct.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/dflat32/direct.c?rev=38283…
============================================================================== --- trunk/rosapps/dflat32/direct.c [iso-8859-1] (original) +++ trunk/rosapps/dflat32/direct.c [iso-8859-1] Mon Dec 22 17:24:18 2008 @@ -78,7 +78,7 @@ static int dircmp(const void *c1, const void *c2) { - return stricmp(*(char **)c1, *(char **)c2); + return _stricmp(*(char **)c1, *(char **)c2); } Modified: trunk/rosapps/dflat32/edit.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/dflat32/edit.c?rev=38283&r…
============================================================================== --- trunk/rosapps/dflat32/edit.c [iso-8859-1] (original) +++ trunk/rosapps/dflat32/edit.c [iso-8859-1] Mon Dec 22 17:24:18 2008 @@ -241,7 +241,7 @@ while (wnd1 != NULL) { if (wnd1->extension && - stricmp(FileName, wnd1->extension) == 0) + _stricmp(FileName, wnd1->extension) == 0) { DfSendMessage(wnd1, DFM_SETFOCUS, TRUE, 0); DfSendMessage(wnd1, DFM_RESTORE, 0, 0); @@ -462,7 +462,7 @@ char msg[30]; sprintf(msg, "Delete %s?", fn); if (DfYesNoBox(msg)) { - unlink(wnd->extension); + _unlink(wnd->extension); DfSendMessage(wnd, DFM_CLOSE_WINDOW, 0, 0); } } Modified: trunk/rosapps/dflat32/helpbox.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/dflat32/helpbox.c?rev=3828…
============================================================================== --- trunk/rosapps/dflat32/helpbox.c [iso-8859-1] (original) +++ trunk/rosapps/dflat32/helpbox.c [iso-8859-1] Mon Dec 22 17:24:18 2008 @@ -536,7 +536,7 @@ FindHelp(Help); if (ThisHelp != NULL) { if (LastStack == NULL || - stricmp(Help, LastStack->hname)) { + _stricmp(Help, LastStack->hname)) { /* ---- add the window to the history stack ---- */ ThisStack = DfCalloc(1,sizeof(struct HelpStack)); ThisStack->hname = DfMalloc(strlen(Help)+1);
16 years
1
0
0
0
[tkreuzer] 38282: use _str(n)icmp instead of non-standard str(n)casecmp
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 17:11:21 2008 New Revision: 38282 URL:
http://svn.reactos.org/svn/reactos?rev=38282&view=rev
Log: use _str(n)icmp instead of non-standard str(n)casecmp Modified: trunk/reactos/lib/sdk/crt/locale/locale.c Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Mon Dec 22 17:11:21 2008 @@ -150,7 +150,7 @@ size_t i; for (i = 0; i < sizeof(_country_synonyms)/sizeof(char*); i += 2 ) { - if (!strcasecmp(_country_synonyms[i],name)) + if (!_stricmp(_country_synonyms[i],name)) { TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); name[0] = _country_synonyms[i+1][0]; @@ -172,7 +172,7 @@ if (!buff[0] || !cmp[0]) return 0; /* Partial matches are allowed, e.g. "Germ" matches "Germany" */ - return !strncasecmp(cmp, buff, strlen(cmp)); + return !_strnicmp(cmp, buff, strlen(cmp)); } @@ -271,12 +271,12 @@ else { /* Special codepage values: OEM & ANSI */ - if (strcasecmp(locale->search_codepage,"OCP")) + if (_stricmp(locale->search_codepage,"OCP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, locale->found_codepage, MAX_ELEM_LEN); } - if (strcasecmp(locale->search_codepage,"ACP")) + if (_stricmp(locale->search_codepage,"ACP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, locale->found_codepage, MAX_ELEM_LEN);
16 years
1
0
0
0
[tkreuzer] 38281: Use _getch instead of deprecated getch
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 16:58:41 2008 New Revision: 38281 URL:
http://svn.reactos.org/svn/reactos?rev=38281&view=rev
Log: Use _getch instead of deprecated getch Modified: trunk/rosapps/applications/sysutils/utils/binpatch/patch.c Modified: trunk/rosapps/applications/sysutils/utils/binpatch/patch.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
============================================================================== --- trunk/rosapps/applications/sysutils/utils/binpatch/patch.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/utils/binpatch/patch.c [iso-8859-1] Mon Dec 22 16:58:41 2008 @@ -444,7 +444,7 @@ printf("(S)kip, (R)etry, (A)bort, (M)anually enter filename"); do { - c = getch(); + c = _getch(); } while (c != 's' && c != 'r' && c != 'a' && c != 'm'); printf("\n"); @@ -496,7 +496,7 @@ printf("Do you want to make a backup of %s? (Y)es, (N)o, (A)bort", fileName); do { - c = getch(); + c = _getch(); } while (c != 'y' && c != 'n' && c != 'a'); printf("\n"); @@ -511,7 +511,7 @@ printf("File %s already exists, overwrite? (Y)es, (N)o, (A)bort", buffer); do { - c = getch(); + c = _getch(); } while (c != 'y' && c != 'n' && c != 'a'); printf("\n");
16 years
1
0
0
0
[jmorlan] 38280: - Make IF command a special form; necessary to make nested multi-line IF blocks work properly - Implement IF /I option, IF CMDEXTVERSION, and generic comparisons (EQU etc) - Make IF ERRORLEVEL return true if the errorlevel is greater than the number - Remove hacked support for multi-line IF blocks from batch.c
by jmorlan@svn.reactos.org
Author: jmorlan Date: Mon Dec 22 16:34:51 2008 New Revision: 38280 URL:
http://svn.reactos.org/svn/reactos?rev=38280&view=rev
Log: - Make IF command a special form; necessary to make nested multi-line IF blocks work properly - Implement IF /I option, IF CMDEXTVERSION, and generic comparisons (EQU etc) - Make IF ERRORLEVEL return true if the errorlevel is greater than the number - Remove hacked support for multi-line IF blocks from batch.c Modified: trunk/reactos/base/shell/cmd/batch.c trunk/reactos/base/shell/cmd/batch.h trunk/reactos/base/shell/cmd/cmd.c trunk/reactos/base/shell/cmd/cmd.h trunk/reactos/base/shell/cmd/cmdtable.c trunk/reactos/base/shell/cmd/if.c trunk/reactos/base/shell/cmd/parser.c Modified: trunk/reactos/base/shell/cmd/batch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -269,7 +269,6 @@ SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN); bc->bEcho = bEcho; /* Preserve echo across batch calls */ bc->shiftlevel = 0; - bc->bCmdBlock = -1; bc->ffind = NULL; bc->forvar = _T('\0'); @@ -445,39 +444,6 @@ first = textline; - /* cmd block over multiple lines (..) */ - if (bc->bCmdBlock >= 0) - { - if (*first == _T(')')) - { - first++; - /* Strip leading spaces and trailing space/control chars */ - while(_istspace (*first)) - first++; - if ((_tcsncicmp (first, _T("else"), 4) == 0) && (_tcschr(first, _T('(')))) - { - bc->bExecuteBlock[bc->bCmdBlock] = !bc->bExecuteBlock[bc->bCmdBlock]; - } - else - { - bc->bCmdBlock--; - } - continue; - } - if (bc->bCmdBlock < MAX_PATH) - if (!bc->bExecuteBlock[bc->bCmdBlock]) - { - /* increase the bCmdBlock count when there is another conditon which opens a new bracket */ - if ((_tcsncicmp (first, _T("if"), 2) == 0) && _tcschr(first, _T('('))) - { - bc->bCmdBlock++; - if ((bc->bCmdBlock > 0) && (bc->bCmdBlock < MAX_PATH)) - bc->bExecuteBlock[bc->bCmdBlock] = bc->bExecuteBlock[bc->bCmdBlock - 1]; - } - continue; - } - } - break; } Modified: trunk/reactos/base/shell/cmd/batch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.h?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/batch.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.h [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -21,8 +21,6 @@ HANDLE hFind; /* Preserve find handle when doing a for */ REDIRECTION *RedirList; TCHAR forvar; - INT bCmdBlock; - BOOL bExecuteBlock[MAX_PATH]; } BATCH_CONTEXT, *LPBATCH_CONTEXT; Modified: trunk/reactos/base/shell/cmd/cmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -879,7 +879,7 @@ if(bc) bNewBatch = FALSE; - Success = DoCommand(Cmd->CommandLine); + Success = DoCommand(Cmd->Command.CommandLine); if(bNewBatch && bc) AddBatchRedirection(&Cmd->Redirections); @@ -902,6 +902,9 @@ break; case C_PIPE: ExecutePipeline(Cmd); + break; + case C_IF: + Success = ExecuteIf(Cmd); break; } Modified: trunk/reactos/base/shell/cmd/cmd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -256,6 +256,15 @@ VOID History_del_current_entry(LPTSTR str);/*CTRL-D*/ INT CommandHistory (LPTSTR param); #endif + + +/* Prototypes for IF.C */ +#define IFFLAG_NEGATE 1 /* NOT */ +#define IFFLAG_IGNORECASE 2 /* /I */ +enum { IF_CMDEXTVERSION, IF_DEFINED, IF_ERRORLEVEL, IF_EXIST, + IF_STRINGEQ, /* == */ + IF_EQU, IF_GTR, IF_GEQ, IF_LSS, IF_LEQ, IF_NEQ }; +BOOL ExecuteIf(struct _PARSED_COMMAND *Cmd); /* Prototypes for INTERNAL.C */ @@ -330,15 +339,28 @@ /* Prototypes from PARSER.C */ -enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE }; +enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_IFFAILURE, C_IFSUCCESS, C_PIPE, C_IF }; typedef struct _PARSED_COMMAND { struct _PARSED_COMMAND *Subcommands; struct _PARSED_COMMAND *Next; struct _REDIRECTION *Redirections; - TCHAR *Tail; BYTE Type; - TCHAR CommandLine[]; + union + { + struct + { + TCHAR *Tail; + TCHAR CommandLine[]; + } Command; + struct + { + BYTE Flags; + BYTE Operator; + TCHAR *LeftArg; + TCHAR *RightArg; + } If; + }; } PARSED_COMMAND; PARSED_COMMAND *ParseCommand(LPTSTR Line); VOID EchoCommand(PARSED_COMMAND *Cmd); Modified: trunk/reactos/base/shell/cmd/cmdtable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdtable.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -120,7 +120,7 @@ {_T("history"), 0, CommandHistory}, #endif - {_T("if"), 0, cmd_if}, +// {_T("if"), 0, cmd_if}, #ifdef INCLUDE_CMD_LABEL {_T("label"), 0, cmd_label}, Modified: trunk/reactos/base/shell/cmd/if.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/if.c?rev=38…
============================================================================== --- trunk/reactos/base/shell/cmd/if.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/if.c [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -32,15 +32,30 @@ #include <precomp.h> +static INT GenericCmp(INT (*StringCmp)(LPCTSTR, LPCTSTR), + LPCTSTR Left, LPCTSTR Right) +{ + TCHAR *end; + INT nLeft = _tcstol(Left, &end, 0); + if (*end == _T('\0')) + { + INT nRight = _tcstol(Right, &end, 0); + if (*end == _T('\0')) + { + /* both arguments are numeric */ + return (nLeft < nRight) ? -1 : (nLeft > nRight); + } + } + return StringCmp(Left, Right); +} -#define X_EXEC 1 -#define X_EMPTY 0x80 +BOOL ExecuteIf(PARSED_COMMAND *Cmd) +{ + INT result = FALSE; /* when set cause 'then' clause to be executed */ + LPTSTR param; -INT cmd_if (LPTSTR param) -{ - INT x_flag = 0; /* when set cause 'then' clause to be executed */ - LPTSTR pp; - +#if 0 + /* FIXME: need to handle IF /?; will require special parsing */ TRACE ("cmd_if: (\'%s\')\n", debugstr_aw(param)); if (!_tcsncmp (param, _T("/?"), 2)) @@ -48,178 +63,89 @@ ConOutResPaging(TRUE,STRING_IF_HELP1); return 0; } +#endif - /* First check if param string begins with 'not' */ - if (!_tcsnicmp (param, _T("not"), 3) && _istspace (*(param + 3))) + if (Cmd->If.Operator == IF_CMDEXTVERSION) { - x_flag = X_EXEC; /* Remember 'NOT' */ - param += 3; /* Step over 'NOT' */ - while (_istspace (*param)) /* And subsequent spaces */ - param++; + /* IF CMDEXTVERSION n: check if Command Extensions version + * is greater or equal to n */ + DWORD n = _tcstoul(Cmd->If.RightArg, ¶m, 10); + if (*param != _T('\0')) + { + error_syntax(Cmd->If.RightArg); + return FALSE; + } + result = (2 >= n); } + else if (Cmd->If.Operator == IF_DEFINED) + { + /* IF DEFINED var: check if environment variable exists */ + result = (GetEnvVarOrSpecial(Cmd->If.RightArg) != NULL); + } + else if (Cmd->If.Operator == IF_ERRORLEVEL) + { + /* IF ERRORLEVEL n: check if last exit code is greater or equal to n */ + INT n = _tcstol(Cmd->If.RightArg, ¶m, 10); + if (*param != _T('\0')) + { + error_syntax(Cmd->If.RightArg); + return FALSE; + } + result = (nErrorLevel >= n); + } + else if (Cmd->If.Operator == IF_EXIST) + { + /* IF EXIST filename: check if file exists (wildcards allowed) */ + WIN32_FIND_DATA f; + HANDLE hFind; - /* Check for 'exist' form */ - if (!_tcsnicmp (param, _T("exist"), 5) && _istspace (*(param + 5))) - { - UINT i; - BOOL bInside = FALSE; + StripQuotes(Cmd->If.RightArg); - param += 5; - while (_istspace (*param)) - param++; - - pp = param; - - /* find the whole path to the file */ - for(i = 0; i < _tcslen(param); i++) + hFind = FindFirstFile(Cmd->If.RightArg, &f); + if (hFind != INVALID_HANDLE_VALUE) { - if(param[i] == _T('\"')) - bInside = !bInside; - if((param[i] == _T(' ')) && !bInside) - { - break; - } - pp++; + result = TRUE; + FindClose(hFind); } - *pp++ = _T('\0'); - i = 0; - /* remove quotes */ - while(i < _tcslen(param)) - { - if(param[i] == _T('\"')) - memmove(¶m[i],¶m[i + 1], _tcslen(¶m[i]) * sizeof(TCHAR)); - else - i++; - } - - if (*pp) - { - WIN32_FIND_DATA f; - HANDLE hFind; - - hFind = FindFirstFile (param, &f); - x_flag ^= (hFind == INVALID_HANDLE_VALUE) ? 0 : X_EXEC; - if (hFind != INVALID_HANDLE_VALUE) - { - FindClose (hFind); - } - } - else - return 0; - } - else if (!_tcsnicmp (param, _T("defined"), 7) && _istspace (*(param + 7))) - { - /* Check for 'defined' form */ - TCHAR Value [1]; - INT ValueSize = 0; - - param += 7; - /* IF [NOT] DEFINED var COMMAND */ - /* ^ */ - while (_istspace (*param)) - param++; - /* IF [NOT] DEFINED var COMMAND */ - /* ^ */ - pp = param; - while (*pp && !_istspace (*pp)) - pp++; - /* IF [NOT] DEFINED var COMMAND */ - /* ^ */ - if (*pp) - { - *pp++ = _T('\0'); - ValueSize = GetEnvironmentVariable(param, Value, sizeof(Value) / sizeof(Value[0])); - x_flag ^= (0 == ValueSize) - ? 0 - : X_EXEC; - x_flag |= X_EMPTY; - } - else - return 0; - } - else if (!_tcsnicmp (param, _T("errorlevel"), 10) && _istspace (*(param + 10))) - { - /* Check for 'errorlevel' form */ - INT n = 0; - - pp = param + 10; - while (_istspace (*pp)) - pp++; - - while (_istdigit (*pp)) - n = n * 10 + (*pp++ - _T('0')); - - x_flag ^= (nErrorLevel != n) ? 0 : X_EXEC; - - x_flag |= X_EMPTY; /* Syntax error if comd empty */ } else { - BOOL bInQuote = FALSE; - INT p1len; - pp = param; - while ( *pp && ( bInQuote || *pp != _T('=') ) ) + /* Do case-insensitive string comparisons if /I specified */ + INT (*StringCmp)(LPCTSTR, LPCTSTR) = + (Cmd->If.Flags & IFFLAG_IGNORECASE) ? _tcsicmp : _tcscmp; + + if (Cmd->If.Operator == IF_STRINGEQ) { - if ( *pp == _T('\"') ) - bInQuote = !bInQuote; - ++pp; + /* IF str1 == str2 */ + result = StringCmp(Cmd->If.LeftArg, Cmd->If.RightArg) == 0; } - p1len = pp-param; - /* check for "==" */ - if ( *pp++ != _T('=') || *pp++ != _T('=') ) + else { - error_syntax ( NULL ); - return 1; - } - while (_istspace (*pp)) /* Skip subsequent spaces */ - pp++; - - /* are the two sides equal*/ - if ( !_tcsncmp(param,pp,p1len)) - x_flag ^= X_EXEC; - pp += p1len; - - if ( x_flag ) - { - x_flag |= X_EMPTY; + result = GenericCmp(StringCmp, Cmd->If.LeftArg, Cmd->If.RightArg); + switch (Cmd->If.Operator) + { + case IF_EQU: result = (result == 0); break; + case IF_NEQ: result = (result != 0); break; + case IF_LSS: result = (result < 0); break; + case IF_LEQ: result = (result <= 0); break; + case IF_GTR: result = (result > 0); break; + case IF_GEQ: result = (result >= 0); break; + } } } - while (_istspace (*pp)) /* skip spaces */ - pp++; - - if (*pp == _T('(')) + if (result ^ ((Cmd->If.Flags & IFFLAG_NEGATE) != 0)) { - if (bc) - { - pp++; - bc->bCmdBlock++; - if ((bc->bCmdBlock >= 0) && (bc->bCmdBlock < MAX_PATH)) - bc->bExecuteBlock[bc->bCmdBlock] = x_flag & X_EXEC; - /* commands are in the next lines */ - if (*pp == _T('\0')) - return 0; - } + /* full condition was true, do the command */ + return ExecuteCommand(Cmd->Subcommands); } - - if (x_flag & X_EMPTY) + else { - while (_istspace (*pp)) /* Then skip spaces */ - pp++; - - if (*pp == _T('\0')) /* If nothing left then syntax err */ - { - error_syntax (NULL); - return 1; - } + /* full condition was false, do the "else" command if there is one */ + if (Cmd->Subcommands->Next) + return ExecuteCommand(Cmd->Subcommands->Next); + return TRUE; } - - if (x_flag & X_EXEC) - { - ParseCommandLine (pp); - } - - return 0; } /* EOF */ Modified: trunk/reactos/base/shell/cmd/parser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/parser.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/parser.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/parser.c [iso-8859-1] Mon Dec 22 16:34:51 2008 @@ -1,3 +1,8 @@ +/* + * PARSER.C - command parsing. + * + */ + #include <precomp.h> #define C_OP_LOWEST C_MULTI @@ -6,10 +11,28 @@ static const TCHAR RedirString[][3] = { _T("<"), _T(">"), _T(">>") }; +static const TCHAR *const IfOperatorString[] = { + _T("cmdextversion"), + _T("defined"), + _T("errorlevel"), + _T("exist"), +#define IF_MAX_UNARY IF_EXIST + _T("=="), + _T("equ"), + _T("gtr"), + _T("geq"), + _T("lss"), + _T("leq"), + _T("neq"), +#define IF_MAX_COMPARISON IF_NEQ +}; + +/* These three characters act like spaces to the parser in most contexts */ +#define STANDARD_SEPS _T(",;=") + static BOOL IsSeparator(TCHAR Char) { - /* These three characters act like spaces to the parser */ - return _istspace(Char) || (Char && _tcschr(_T(",;="), Char)); + return _istspace(Char) || (Char && _tcschr(STANDARD_SEPS, Char)); } enum { TOK_END, TOK_NORMAL, TOK_OPERATOR, TOK_REDIRECTION, @@ -70,35 +93,43 @@ /* Yes, cmd has a Lexical Analyzer. Whenever the parser gives an "xxx was * unexpected at this time." message, it shows what the last token read was */ -static int ParseToken(TCHAR ExtraEnd, BOOL PreserveSpace) +static int ParseToken(TCHAR ExtraEnd, TCHAR *Separators) { TCHAR *Out = CurrentToken; - TCHAR Char = CurChar; + TCHAR Char; int Type; BOOL bInQuote = FALSE; - if (!PreserveSpace) - { - while (Char != _T('\n') && IsSeparator(Char)) - Char = ParseChar(); - } - - while (Char && Char != _T('\n')) + for (Char = CurChar; Char && Char != _T('\n'); Char = ParseChar()) { bInQuote ^= (Char == _T('"')); if (!bInQuote) { - /* Check for all the myriad ways in which this token - * may be brought to an untimely end. */ + if (Separators != NULL) + { + if (_istspace(Char) || _tcschr(Separators, Char)) + { + /* Skip leading separators */ + if (Out == CurrentToken) + continue; + break; + } + } + + /* Check for numbered redirection */ if ((Char >= _T('0') && Char <= _T('9') && (ParsePos == &ParseLine[1] || IsSeparator(ParsePos[-2])) - && (*ParsePos == _T('<') || *ParsePos == _T('>'))) - || _tcschr(_T(")&|<>") + (InsideBlock ? 0 : 1), Char) - || (!PreserveSpace && IsSeparator(Char)) - || (Char == ExtraEnd)) + && (*ParsePos == _T('<') || *ParsePos == _T('>')))) { break; } + + if (Char == ExtraEnd) + break; + if (InsideBlock && Char == _T(')')) + break; + if (_tcschr(_T("&|<>"), Char)) + break; if (Char == _T('^')) { @@ -112,7 +143,6 @@ if (Out == &CurrentToken[CMDLINE_LENGTH - 1]) break; *Out++ = Char; - Char = ParseChar(); } /* Check if we got at least one character before reaching a special one. @@ -214,7 +244,7 @@ if (!*Tok) { /* The file name was not part of this token, so it'll be the next one */ - if (ParseToken(0, FALSE) != TOK_NORMAL) + if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL) goto fail; Tok = CurrentToken; } @@ -284,7 +314,7 @@ InsideBlock--; /* Process any trailing redirections */ - while (ParseToken(0, FALSE) == TOK_REDIRECTION) + while (ParseToken(0, STANDARD_SEPS) == TOK_REDIRECTION) { if (!ParseRedirection(&Cmd->Redirections)) { @@ -292,6 +322,94 @@ return NULL; } } + return Cmd; +} + +/* Parse an IF statement */ +static PARSED_COMMAND *ParseIf(void) +{ + PARSED_COMMAND *Cmd = cmd_alloc(sizeof(PARSED_COMMAND)); + memset(Cmd, 0, sizeof(PARSED_COMMAND)); + Cmd->Type = C_IF; + + int Type = ParseToken(0, STANDARD_SEPS); + if (_tcsicmp(CurrentToken, _T("/I")) == 0) + { + Cmd->If.Flags |= IFFLAG_IGNORECASE; + Type = ParseToken(0, STANDARD_SEPS); + } + if (_tcsicmp(CurrentToken, _T("not")) == 0) + { + Cmd->If.Flags |= IFFLAG_NEGATE; + Type = ParseToken(0, STANDARD_SEPS); + } + + if (Type != TOK_NORMAL) + { + FreeCommand(Cmd); + ParseError(); + return NULL; + } + + /* Check for unary operators */ + for (; Cmd->If.Operator <= IF_MAX_UNARY; Cmd->If.Operator++) + { + if (_tcsicmp(CurrentToken, IfOperatorString[Cmd->If.Operator]) == 0) + { + if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL) + { + FreeCommand(Cmd); + ParseError(); + return NULL; + } + Cmd->If.RightArg = cmd_dup(CurrentToken); + goto condition_done; + } + } + + /* It must be a two-argument (comparison) operator. It could be ==, so + * the equals sign can't be treated as whitespace here. */ + Cmd->If.LeftArg = cmd_dup(CurrentToken); + ParseToken(0, _T(",;")); + + /* The right argument can come immediately after == */ + if (_tcsnicmp(CurrentToken, _T("=="), 2) == 0 && CurrentToken[2]) + { + Cmd->If.RightArg = cmd_dup(&CurrentToken[2]); + goto condition_done; + } + + for (; Cmd->If.Operator <= IF_MAX_COMPARISON; Cmd->If.Operator++) + { + if (_tcsicmp(CurrentToken, IfOperatorString[Cmd->If.Operator]) == 0) + { + if (ParseToken(0, STANDARD_SEPS) != TOK_NORMAL) + break; + Cmd->If.RightArg = cmd_dup(CurrentToken); + goto condition_done; + } + } + FreeCommand(Cmd); + ParseError(); + return NULL; + +condition_done: + Cmd->Subcommands = ParseCommandOp(C_OP_LOWEST); + if (Cmd->Subcommands == NULL) + { + FreeCommand(Cmd); + return NULL; + } + if (_tcsicmp(CurrentToken, _T("else")) == 0) + { + Cmd->Subcommands->Next = ParseCommandOp(C_OP_LOWEST); + if (Cmd->Subcommands->Next == NULL) + { + FreeCommand(Cmd); + return NULL; + } + } + return Cmd; } @@ -318,7 +436,7 @@ { /* "Ignore" the rest of the line. * (Line continuations will still be parsed, though.) */ - while (ParseToken(0, TRUE) != TOK_END) + while (ParseToken(0, NULL) != TOK_END) ; return NULL; } @@ -339,7 +457,7 @@ /* Get the head of the command */ while (1) { - Type = ParseToken(_T('('), FALSE); + Type = ParseToken(_T('('), STANDARD_SEPS); if (Type == TOK_NORMAL) { Pos = _stpcpy(ParsedLine, CurrentToken); @@ -367,12 +485,22 @@ } TailOffset = Pos - ParsedLine; - /* FIXME: FOR, IF, and REM need special processing by the parser. */ + /* Check for special forms */ + if (_tcsicmp(ParsedLine, _T("if")) == 0) + { + if (RedirList) + { + ParseError(); + FreeRedirection(RedirList); + return NULL; + } + return ParseIf(); + } /* Now get the tail */ while (1) { - Type = ParseToken(0, TRUE); + Type = ParseToken(0, NULL); if (Type == TOK_NORMAL) { if (Pos + _tcslen(CurrentToken) >= &ParsedLine[CMDLINE_LENGTH]) @@ -394,13 +522,13 @@ } } - Cmd = cmd_alloc(FIELD_OFFSET(PARSED_COMMAND, CommandLine[Pos + 1 - ParsedLine])); + Cmd = cmd_alloc(FIELD_OFFSET(PARSED_COMMAND, Command.CommandLine[Pos + 1 - ParsedLine])); Cmd->Type = C_COMMAND; Cmd->Next = NULL; Cmd->Subcommands = NULL; Cmd->Redirections = RedirList; - _tcscpy(Cmd->CommandLine, ParsedLine); - Cmd->Tail = Cmd->CommandLine + TailOffset; + _tcscpy(Cmd->Command.CommandLine, ParsedLine); + Cmd->Command.Tail = Cmd->Command.CommandLine + TailOffset; return Cmd; } @@ -487,7 +615,7 @@ switch (Cmd->Type) { case C_COMMAND: - ConOutPrintf(_T("%s"), Cmd->CommandLine); + ConOutPrintf(_T("%s"), Cmd->Command.CommandLine); break; case C_QUIET: return; @@ -509,6 +637,23 @@ ConOutPrintf(_T(" %s "), OpString[Cmd->Type - C_OP_LOWEST]); EchoCommand(Sub->Next); break; + case C_IF: + ConOutPrintf(_T("if")); + if (Cmd->If.Flags & IFFLAG_IGNORECASE) + ConOutPrintf(_T(" /I")); + if (Cmd->If.Flags & IFFLAG_NEGATE) + ConOutPrintf(_T(" not")); + if (Cmd->If.LeftArg) + ConOutPrintf(_T(" %s"), Cmd->If.LeftArg); + ConOutPrintf(_T(" %s %s "), IfOperatorString[Cmd->If.Operator], Cmd->If.RightArg); + Sub = Cmd->Subcommands; + EchoCommand(Sub); + if (Sub->Next) + { + ConOutPrintf(_T(" else ")); + EchoCommand(Sub->Next); + } + break; } for (Redir = Cmd->Redirections; Redir; Redir = Redir->Next) @@ -526,5 +671,10 @@ if (Cmd->Next) FreeCommand(Cmd->Next); FreeRedirection(Cmd->Redirections); + if (Cmd->Type == C_IF) + { + cmd_free(Cmd->If.LeftArg); + cmd_free(Cmd->If.RightArg); + } cmd_free(Cmd); }
16 years
1
0
0
0
[tkreuzer] 38279: Remove all stuff that is either already defined in crtdefs.h or doesn't belong in the header, based on what ms defines.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 14:59:56 2008 New Revision: 38279 URL:
http://svn.reactos.org/svn/reactos?rev=38279&view=rev
Log: Remove all stuff that is either already defined in crtdefs.h or doesn't belong in the header, based on what ms defines. Modified: trunk/reactos/include/crt/assert.h trunk/reactos/include/crt/fcntl.h trunk/reactos/include/crt/io.h trunk/reactos/include/crt/stdlib.h trunk/reactos/include/crt/string.h trunk/reactos/include/crt/sys/stat.h trunk/reactos/include/crt/sys/timeb.h trunk/reactos/include/crt/sys/types.h trunk/reactos/include/crt/sys/utime.h trunk/reactos/include/crt/tchar.h trunk/reactos/include/crt/time.h trunk/reactos/include/crt/wchar.h Modified: trunk/reactos/include/crt/assert.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/assert.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/assert.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/assert.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -7,37 +7,14 @@ #define __ASSERT_H_ #include <crtdefs.h> -#ifdef __cplusplus -#include <stdlib.h> -#endif #ifdef NDEBUG + #ifndef assert #define assert(_Expression) ((void)0) #endif -#else -#ifndef _CRT_TERMINATE_DEFINED -#define _CRT_TERMINATE_DEFINED -__declspec(noreturn) void __cdecl exit(int _Code); -_CRTIMP __declspec(noreturn) void __cdecl _exit(int _Code); -#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */ -/* C99 function name */ -void __cdecl __declspec(noreturn) _Exit(int); /* Declare to get noreturn attribute. */ -__CRT_INLINE void __cdecl _Exit(int status) -{ _exit(status); } -#endif - -#if __MINGW_GNUC_PREREQ(4,4) -#pragma push_macro("abort") -#undef abort -#endif - void __cdecl __declspec(noreturn) abort(void); -#if __MINGW_GNUC_PREREQ(4,4) -#pragma pop_macro("abort") -#endif - -#endif +#else /* !NDEBUG */ #ifdef __cplusplus extern "C" { Modified: trunk/reactos/include/crt/fcntl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/fcntl.h?rev=38…
============================================================================== --- trunk/reactos/include/crt/fcntl.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/fcntl.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -4,8 +4,6 @@ * No warranty is given; refer to the file DISCLAIMER within this package. */ #include <crtdefs.h> - -#include <io.h> #ifndef _INC_FCNTL #define _INC_FCNTL Modified: trunk/reactos/include/crt/io.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/io.h?rev=38279…
============================================================================== --- trunk/reactos/include/crt/io.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/io.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -168,60 +168,6 @@ #define _A_SYSTEM 0x04 #define _A_SUBDIR 0x10 #define _A_ARCH 0x20 - -#ifndef _SIZE_T_DEFINED -#define _SIZE_T_DEFINED -#undef size_t -#ifdef _WIN64 -#if defined(__GNUC__) && defined(__STRICT_ANSI__) - typedef unsigned int size_t __attribute__ ((mode (DI))); -#else - typedef unsigned __int64 size_t; -#endif -#else - typedef unsigned int size_t; -#endif -#endif - -#ifndef _SSIZE_T_DEFINED -#define _SSIZE_T_DEFINED -#undef ssize_t -#ifdef _WIN64 -#if defined(__GNUC__) && defined(__STRICT_ANSI__) - typedef int ssize_t __attribute__ ((mode (DI))); -#else - typedef __int64 ssize_t; -#endif -#else - typedef int ssize_t; -#endif -#endif - -#ifndef _OFF_T_DEFINED -#define _OFF_T_DEFINED -#ifndef _OFF_T_ -#define _OFF_T_ - typedef long _off_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) - typedef long off_t; -#endif -#endif -#endif - -#ifndef _OFF64_T_DEFINED -#define _OFF64_T_DEFINED -#if defined(__GNUC__) && defined(__STRICT_ANSI__) - typedef int _off64_t __attribute__ ((mode (DI))); -#if !defined(NO_OLDNAMES) || defined(_POSIX) - typedef int off64_t __attribute__ ((mode (DI))); -#endif -#else - typedef long long _off64_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) - typedef long long off64_t; -#endif -#endif -#endif /* Some defines for _access nAccessMode (MS doesn't define them, but * it doesn't seem to hurt to add them). */ @@ -248,7 +194,6 @@ _CRTIMP int __cdecl _isatty(int _FileHandle); _CRTIMP int __cdecl _locking(int _FileHandle,int _LockMode,long _NumOfBytes); _CRTIMP long __cdecl _lseek(int _FileHandle,long _Offset,int _Origin); - _off64_t lseek64(int fd,_off64_t offset, int whence); _CRTIMP char *__cdecl _mktemp(char *_TemplateName); _CRTIMP int __cdecl _pipe(int *_PtHandles,unsigned int _PipeSize,int _TextMode); _CRTIMP int __cdecl _read(int _FileHandle,void *_DstBuf,unsigned int _MaxCharCount); Modified: trunk/reactos/include/crt/stdlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/stdlib.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/stdlib.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/stdlib.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -577,6 +577,4 @@ #pragma pack(pop) #include <sec_api/stdlib_s.h> -#include <malloc.h> - -#endif +#endif Modified: trunk/reactos/include/crt/string.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/string.h?rev=3…
============================================================================== --- trunk/reactos/include/crt/string.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/string.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -24,8 +24,6 @@ #define NULL ((void *)0) #endif #endif - -#define _WConst_return _CONST_RETURN #ifndef _CRT_MEMORY_DEFINED #define _CRT_MEMORY_DEFINED Modified: trunk/reactos/include/crt/sys/stat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sys/stat.h?rev…
============================================================================== --- trunk/reactos/include/crt/sys/stat.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/sys/stat.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -19,47 +19,7 @@ extern "C" { #endif -#ifndef _CRTIMP -#define _CRTIMP __declspec(dllimport) -#endif - #include <sys/types.h> - -#ifdef _USE_32BIT_TIME_T -#ifdef _WIN64 -#undef _USE_32BIT_TIME_T -#endif -#else -#if _INTEGRAL_MAX_BITS < 64 -#define _USE_32BIT_TIME_T -#endif -#endif - -#ifndef _TIME32_T_DEFINED - typedef long __time32_t; -#define _TIME32_T_DEFINED -#endif - -#ifndef _TIME64_T_DEFINED -#if _INTEGRAL_MAX_BITS >= 64 - typedef __int64 __time64_t; -#endif -#define _TIME64_T_DEFINED -#endif - -#ifndef _TIME_T_DEFINED -#ifdef _USE_32BIT_TIME_T - typedef __time32_t time_t; -#else - typedef __time64_t time_t; -#endif -#define _TIME_T_DEFINED -#endif - -#ifndef _WCHAR_T_DEFINED - typedef unsigned short wchar_t; -#define _WCHAR_T_DEFINED -#endif #ifndef _STAT_DEFINED Modified: trunk/reactos/include/crt/sys/timeb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sys/timeb.h?re…
============================================================================== --- trunk/reactos/include/crt/sys/timeb.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/sys/timeb.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -3,8 +3,8 @@ * This file is part of the w64 mingw-runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ -#ifndef _TIMEB_H_ -#define _TIMEB_H_ +#ifndef _INC_TIMEB +#define _INC_TIMEB #include <crtdefs.h> @@ -16,41 +16,6 @@ #ifdef __cplusplus extern "C" { -#endif - -#ifndef _CRTIMP -#define _CRTIMP __declspec(dllimport) -#endif - -#ifdef _USE_32BIT_TIME_T -#ifdef _WIN64 -#undef _USE_32BIT_TIME_T -#endif -#else -#if _INTEGRAL_MAX_BITS < 64 -#define _USE_32BIT_TIME_T -#endif -#endif - -#ifndef _TIME32_T_DEFINED - typedef long __time32_t; -#define _TIME32_T_DEFINED -#endif - -#ifndef _TIME64_T_DEFINED -#if _INTEGRAL_MAX_BITS >= 64 - typedef __int64 __time64_t; -#endif -#define _TIME64_T_DEFINED -#endif - -#ifndef _TIME_T_DEFINED -#ifdef _USE_32BIT_TIME_T - typedef __time32_t time_t; -#else - typedef __time64_t time_t; -#endif -#define _TIME_T_DEFINED #endif #ifndef _TIMEB_DEFINED Modified: trunk/reactos/include/crt/sys/types.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sys/types.h?re…
============================================================================== --- trunk/reactos/include/crt/sys/types.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/sys/types.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -11,37 +11,6 @@ #endif #include <crtdefs.h> - -#ifdef _USE_32BIT_TIME_T -#ifdef _WIN64 -#undef _USE_32BIT_TIME_T -#endif -#else -#if _INTEGRAL_MAX_BITS < 64 -#define _USE_32BIT_TIME_T -#endif -#endif - -#ifndef _TIME32_T_DEFINED -#define _TIME32_T_DEFINED -typedef long __time32_t; -#endif - -#ifndef _TIME64_T_DEFINED -#define _TIME64_T_DEFINED -#if _INTEGRAL_MAX_BITS >= 64 -typedef __int64 __time64_t; -#endif -#endif - -#ifndef _TIME_T_DEFINED -#define _TIME_T_DEFINED -#ifdef _USE_32BIT_TIME_T -typedef __time32_t time_t; -#else -typedef __time64_t time_t; -#endif -#endif #ifndef _INO_T_DEFINED #define _INO_T_DEFINED @@ -59,58 +28,12 @@ #endif #endif -#ifndef _PID_T_ -#define _PID_T_ -#ifndef _WIN64 -typedef int _pid_t; -#else -typedef __int64 _pid_t; +#ifndef _OFF_T_DEFINED +#define _OFF_T_DEFINED + typedef long _off_t; +# ifndef NO_OLDNAMES + typedef long off_t; +# endif #endif -#ifndef NO_OLDNAMES -typedef _pid_t pid_t; -#endif -#endif /* Not _PID_T_ */ - -#ifndef _MODE_T_ -#define _MODE_T_ -typedef unsigned short _mode_t; - -#ifndef NO_OLDNAMES -typedef _mode_t mode_t; -#endif -#endif /* Not _MODE_T_ */ - -#ifndef _OFF_T_DEFINED -#define _OFF_T_DEFINED -#ifndef _OFF_T_ -#define _OFF_T_ - typedef long _off_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) - typedef long off_t; -#endif -#endif -#endif - -#ifndef _OFF64_T_DEFINED -#define _OFF64_T_DEFINED - typedef long long _off64_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) - typedef long long off64_t; -#endif -#endif - -#ifndef TIMESPEC_DEFINED -#define TIMESPEC_DEFINED -struct timespec { - time_t tv_sec; /* Seconds */ - long tv_nsec; /* Nanoseconds */ -}; - -struct itimerspec { - struct timespec it_interval; /* Timer period */ - struct timespec it_value; /* Timer expiration */ -}; -#endif - -#endif +#endif /* !_INC_TYPES */ Modified: trunk/reactos/include/crt/sys/utime.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/sys/utime.h?re…
============================================================================== --- trunk/reactos/include/crt/sys/utime.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/sys/utime.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -16,46 +16,6 @@ #ifdef __cplusplus extern "C" { -#endif - -#ifndef _CRTIMP -#define _CRTIMP __declspec(dllimport) -#endif - -#ifndef _WCHAR_T_DEFINED - typedef unsigned short wchar_t; -#define _WCHAR_T_DEFINED -#endif - -#ifdef _USE_32BIT_TIME_T -#ifdef _WIN64 -#undef _USE_32BIT_TIME_T -#endif -#else -#if _INTEGRAL_MAX_BITS < 64 -#define _USE_32BIT_TIME_T -#endif -#endif - -#ifndef _TIME32_T_DEFINED -#define _TIME32_T_DEFINED - typedef long __time32_t; -#endif - -#ifndef _TIME64_T_DEFINED -#define _TIME64_T_DEFINED -#if _INTEGRAL_MAX_BITS >= 64 - typedef __int64 __time64_t; -#endif -#endif - -#ifndef _TIME_T_DEFINED -#define _TIME_T_DEFINED -#ifdef _USE_32BIT_TIME_T - typedef __time32_t time_t; -#else - typedef __time64_t time_t; -#endif #endif #ifndef _UTIMBUF_DEFINED Modified: trunk/reactos/include/crt/tchar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/tchar.h?rev=38…
============================================================================== --- trunk/reactos/include/crt/tchar.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/tchar.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -79,11 +79,13 @@ #define _WConst_return _CONST_RETURN -#ifdef _UNICODE - #ifdef __cplusplus } #endif + + +#ifdef _UNICODE +/** UNICODE ******************************************************************/ #include <wchar.h> @@ -479,10 +481,7 @@ #define _tseekdir _wseekdir #else - -#ifdef __cplusplus -} -#endif +/** ANSI *********************************************************************/ #include <string.h> @@ -753,6 +752,7 @@ #define _tsetlocale setlocale #ifdef _MBCS +/** MBCS *********************************************************************/ #ifdef __cplusplus } @@ -851,7 +851,9 @@ #define _tclen _mbclen #define _tccpy _mbccpy #define _tccpy_l _mbccpy_l -#else + + +#else /* !_MB_MAP_DIRECT */ _CRTIMP _CONST_RETURN char *__cdecl _tcschr(const char *_Str,unsigned int _Val); _CRTIMP size_t __cdecl _tcscspn(const char *_Str,const char *_Control); @@ -957,7 +959,9 @@ #define _istlead _ismbblead #define _istleadbyte isleadbyte #define _istleadbyte_l _isleadbyte_l -#else + +#else /* !_MBCS */ +/** SBCS *********************************************************************/ #ifndef __TCHAR_DEFINED #define __TCHAR_DEFINED @@ -1106,8 +1110,10 @@ #define _strtok_l(_String,_Delimiters,_Locale) (strtok(_String,_Delimiters)) #define _strnset_l(_Destination,_Value,_Count,_Locale) (_strnset(_Destination,_Value,_Count)) #define _strset_l(_Destination,_Value,_Locale) (_strset(_Destination,_Value)) -#endif -#endif + +#endif /* !_MBCS */ +#endif /* !UNICODE */ +/*****************************************************************************/ #define _T(x) __T(x) #define _TEXT(x) __T(x) Modified: trunk/reactos/include/crt/time.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/time.h?rev=382…
============================================================================== --- trunk/reactos/include/crt/time.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/time.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -18,15 +18,6 @@ extern "C" { #endif -#ifndef _CRTIMP -#define _CRTIMP __declspec(dllimport) -#endif - -#ifndef _WCHAR_T_DEFINED -#define _WCHAR_T_DEFINED - typedef unsigned short wchar_t; -#endif - #ifndef _TIME32_T_DEFINED #define _TIME32_T_DEFINED typedef long __time32_t; @@ -68,20 +59,6 @@ #endif #else typedef unsigned int size_t; -#endif -#endif - -#ifndef _SSIZE_T_DEFINED -#define _SSIZE_T_DEFINED -#undef ssize_t -#ifdef _WIN64 -#if defined(__GNUC__) && defined(__STRICT_ANSI__) - typedef int ssize_t __attribute__ ((mode (DI))); -#else - typedef __int64 ssize_t; -#endif -#else - typedef int ssize_t; #endif #endif @@ -181,7 +158,7 @@ #endif #define _WTIME_DEFINED -#endif +#endif /* !_WTIME_DEFINED */ #ifndef RC_INVOKED double __cdecl difftime(time_t _Time1,time_t _Time2); @@ -224,17 +201,6 @@ void __cdecl tzset(void); #endif -#ifndef _TIMEVAL_DEFINED /* also in winsock[2].h */ -#define _TIMEVAL_DEFINED -struct timeval { - long tv_sec; - long tv_usec; -}; -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp,uvp,cmp) ((tvp)->tv_sec cmp (uvp)->tv_sec || (tvp)->tv_sec==(uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#endif /* _TIMEVAL_DEFINED */ - #ifdef __cplusplus } #endif @@ -243,8 +209,5 @@ #include <sec_api/time_s.h> -/* Adding timespec definition. */ -#include <sys/timeb.h> - #endif /* End _TIME_H_ */ Modified: trunk/reactos/include/crt/wchar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/wchar.h?rev=38…
============================================================================== --- trunk/reactos/include/crt/wchar.h [iso-8859-1] (original) +++ trunk/reactos/include/crt/wchar.h [iso-8859-1] Mon Dec 22 14:59:56 2008 @@ -19,16 +19,6 @@ #endif #ifndef WCHAR_MAX #define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */ -#endif - -#ifndef __GNUC_VA_LIST -#define __GNUC_VA_LIST - typedef __builtin_va_list __gnuc_va_list; -#endif - -#ifndef _VA_LIST_DEFINED -#define _VA_LIST_DEFINED - typedef __gnuc_va_list va_list; #endif #ifndef WEOF @@ -147,12 +137,6 @@ #define NULL ((void *)0) #endif #endif - -#ifndef _CONST_RETURN -#define _CONST_RETURN -#endif - -#define _WConst_return _CONST_RETURN #ifndef _CRT_CTYPEDATA_DEFINED #define _CRT_CTYPEDATA_DEFINED @@ -300,7 +284,7 @@ extern "C++" _CRTIMP int __cdecl _wopen(const wchar_t *_Filename,int _OpenFlag,int _PermissionMode = 0); extern "C++" _CRTIMP int __cdecl _wsopen(const wchar_t *_Filename,int _OpenFlag,int _ShareFlag,int _PermissionMode = 0); #endif -#endif +#endif /* !_WIO_DEFINED */ #ifndef _WLOCALE_DEFINED #define _WLOCALE_DEFINED @@ -329,8 +313,8 @@ #ifndef _CRT_WSYSTEM_DEFINED #define _CRT_WSYSTEM_DEFINED _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); -#endif -#endif +#endif /* !_CRT_WSYSTEM_DEFINED */ +#endif /* !_WPROCESS_DEFINED */ #ifndef _WCTYPE_INLINE_DEFINED #undef _CRT_WCTYPE_NOINLINE @@ -385,19 +369,16 @@ #ifndef _OFF_T_DEFINED #define _OFF_T_DEFINED -#ifndef _OFF_T_ -#define _OFF_T_ typedef long _off_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) +#ifndef NO_OLDNAMES typedef long off_t; -#endif #endif #endif #ifndef _OFF64_T_DEFINED #define _OFF64_T_DEFINED typedef long long _off64_t; -#if !defined(NO_OLDNAMES) || defined(_POSIX) +#ifndef NO_OLDNAMES typedef long long off64_t; #endif #endif @@ -520,11 +501,6 @@ #ifndef _WCONIO_DEFINED #define _WCONIO_DEFINED - -#ifndef WEOF -#define WEOF (wint_t)(0xFFFF) -#endif - _CRTIMP wchar_t *_cgetws(wchar_t *_Buffer); _CRTIMP wint_t __cdecl _getwch(void); _CRTIMP wint_t __cdecl _getwche(void); @@ -550,10 +526,6 @@ #ifndef _WSTDIO_DEFINED #define _WSTDIO_DEFINED - -#ifndef WEOF -#define WEOF (wint_t)(0xFFFF) -#endif #ifdef _POSIX_ _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode); @@ -621,9 +593,6 @@ _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args); _CRTIMP int __cdecl __swprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,...); _CRTIMP int __cdecl __vswprintf_l(wchar_t *_Dest,const wchar_t *_Format,_locale_t _Plocinfo,va_list _Args); -#ifndef RC_INVOKED -#include <vadefs.h> -#endif #ifdef _CRT_NON_CONFORMING_SWPRINTFS #ifndef __cplusplus @@ -871,5 +840,5 @@ #pragma pack(pop) -#include <sec_api/wchar_s.h> -#endif +//#include <sec_api/wchar_s.h> +#endif
16 years
1
0
0
0
[tkreuzer] 38278: Don't use wine's headers and wintrnl.h for exception handling in crt. Instead include ndk and add the few definitions we need to cppexcept.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 14:32:47 2008 New Revision: 38278 URL:
http://svn.reactos.org/svn/reactos?rev=38278&view=rev
Log: Don't use wine's headers and wintrnl.h for exception handling in crt. Instead include ndk and add the few definitions we need to cppexcept.h Modified: trunk/reactos/lib/sdk/crt/except/cpp.c trunk/reactos/lib/sdk/crt/except/cppexcept.c trunk/reactos/lib/sdk/crt/include/internal/wine/cppexcept.h trunk/reactos/lib/sdk/crt/precomp.h trunk/reactos/lib/sdk/crt/wine/undname.c Modified: trunk/reactos/lib/sdk/crt/except/cpp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/cpp.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/cpp.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/except/cpp.c [iso-8859-1] Mon Dec 22 14:32:47 2008 @@ -19,28 +19,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/config.h" -#include "wine/port.h" - -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winternl.h" -#include "wine/exception.h" -#include "winnt.h" -#include "excpt.h" -#include "wine/debug.h" -#include <malloc.h> -#include <stdlib.h> -#include <stdio.h> +#include <precomp.h> #include <internal/wine/msvcrt.h> #include <internal/wine/cppexcept.h> -#include <internal/mtdll.h> - -WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); typedef exception bad_cast; typedef exception bad_typeid; @@ -75,7 +57,6 @@ const type_info *type_descriptor; const rtti_object_hierarchy *type_hierarchy; } rtti_object_locator; - #ifdef __i386__ /* thiscall functions are i386-specific */ Modified: trunk/reactos/lib/sdk/crt/except/cppexcept.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/cppexce…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/cppexcept.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/except/cppexcept.c [iso-8859-1] Mon Dec 22 14:32:47 2008 @@ -23,20 +23,11 @@ *
www.thecodeproject.com
. */ -#include "wine/config.h" -#include "wine/port.h" - +#define __WINE_DEBUG_CHANNEL__ +#include <precomp.h> #include <stdarg.h> -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winternl.h" #include <internal/wine/msvcrt.h> -#include "wine/exception.h" -#include "excpt.h" -#include "wine/debug.h" - #include <internal/wine/cppexcept.h> #ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ @@ -328,7 +319,7 @@ /* setup an exception block for nested exceptions */ - nested_frame.frame.Handler = (PEXCEPTION_HANDLER)catch_function_nested_handler; + nested_frame.frame.Handler = (PEXCEPTION_ROUTINE)catch_function_nested_handler; nested_frame.prev_rec = thread_data->exc_record; nested_frame.cxx_frame = frame; nested_frame.descr = descr; Modified: trunk/reactos/lib/sdk/crt/include/internal/wine/cppexcept.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
============================================================================== --- trunk/reactos/lib/sdk/crt/include/internal/wine/cppexcept.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/include/internal/wine/cppexcept.h [iso-8859-1] Mon Dec 22 14:32:47 2008 @@ -20,6 +20,57 @@ #ifndef __MSVCRT_CPPEXCEPT_H #define __MSVCRT_CPPEXCEPT_H + +#include <pseh/pseh2.h> + +/* Macros to define assembler functions somewhat portably */ + +#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef" +#define __ASM_NAME(name) "_" name + +#ifdef __GNUC__ +# define __ASM_GLOBAL_FUNC(name,code) \ + __asm__( ".align 4\n\t" \ + ".globl " __ASM_NAME(#name) "\n\t" \ + __ASM_FUNC(#name) "\n" \ + __ASM_NAME(#name) ":\n\t" \ + code ); +#else /* __GNUC__ */ +# define __ASM_GLOBAL_FUNC(name,code) \ + void __asm_dummy_##name(void) { \ + asm( ".align 4\n\t" \ + ".globl " __ASM_NAME(#name) "\n\t" \ + __ASM_FUNC(#name) "\n" \ + __ASM_NAME(#name) ":\n\t" \ + code ); \ + } +#endif /* __GNUC__ */ + +#define EH_NONCONTINUABLE 0x01 +#define EH_UNWINDING 0x02 +#define EH_EXIT_UNWIND 0x04 +#define EH_STACK_INVALID 0x08 +#define EH_NESTED_CALL 0x10 + +static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame ) +{ + frame->Next = (struct _EXCEPTION_REGISTRATION_RECORD *)__readfsdword(0); + __writefsdword(0, (unsigned long)frame); + return frame->Next; +} + +static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame ) +{ + __writefsdword(0, (unsigned long)frame->Next); + return frame->Next; +} + +#define __TRY _SEH2_TRY +#define __EXCEPT(func) _SEH2_EXCEPT(func(_SEH2_GetExceptionInformation())) +#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION) +#define __EXCEPT_ALL _SEH2_EXCEPT(_SEH_EXECUTE_HANDLER) +#define __ENDTRY _SEH2_END +#define __FINALLY(func) _SEH2_FINALLY { func(!_SEH2_AbnormalTermination()); } #define CXX_FRAME_MAGIC 0x19930520 #define CXX_EXCEPTION 0xe06d7363 Modified: trunk/reactos/lib/sdk/crt/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/precomp.h?rev=…
============================================================================== --- trunk/reactos/lib/sdk/crt/precomp.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/precomp.h [iso-8859-1] Mon Dec 22 14:32:47 2008 @@ -39,7 +39,9 @@ /* kernelmode libcnt should not include Wine-debugging crap */ #ifndef _LIBCNT_ #include "wine/debug.h" +#ifndef __WINE_DEBUG_CHANNEL__ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); +#endif #else #include <debug.h> #define TRACE DPRINT Modified: trunk/reactos/lib/sdk/crt/wine/undname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/wine/undname.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/wine/undname.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/wine/undname.c [iso-8859-1] Mon Dec 22 14:32:47 2008 @@ -19,27 +19,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "wine/config.h" -#include "wine/port.h" - +#define __WINE_DEBUG_CHANNEL__ +#include <precomp.h> #include <assert.h> -#include <stdio.h> -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winternl.h" -#include "wine/exception.h" -#include "winnt.h" -#include "excpt.h" -#include "wine/debug.h" -#include <malloc.h> -#include <stdlib.h> #include <internal/wine/msvcrt.h> #include <internal/wine/cppexcept.h> -#include <internal/mtdll.h> WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
16 years
1
0
0
0
[tkreuzer] 38277: - Add reactos/wine/sys/types.h compatibility header - winspool: add reactos/wine to include folders
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 14:28:26 2008 New Revision: 38277 URL:
http://svn.reactos.org/svn/reactos?rev=38277&view=rev
Log: - Add reactos/wine/sys/types.h compatibility header - winspool: add reactos/wine to include folders Added: trunk/reactos/include/reactos/wine/sys/ (with props) trunk/reactos/include/reactos/wine/sys/types.h (with props) Modified: trunk/reactos/dll/win32/winspool/winspool.rbuild Modified: trunk/reactos/dll/win32/winspool/winspool.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/winspoo…
============================================================================== --- trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/winspool.rbuild [iso-8859-1] Mon Dec 22 14:28:26 2008 @@ -1,6 +1,7 @@ <module name="winspool" type="win32dll" extension=".drv" baseaddress="${BASEADDRESS_WINSPOOL}" installbase="system32" installname="winspool.drv" allowwarnings="true" unicode="yes"> <importlibrary definition="winspool.spec" /> <include base="winspool">.</include> + <include base="ReactOS">include/reactos/wine</include> <define name="_DISABLE_TIDENTS" /> <library>ntdll</library> <library>kernel32</library> Propchange: trunk/reactos/include/reactos/wine/sys/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Mon Dec 22 14:28:26 2008 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/reactos/include/reactos/wine/sys/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/reactos/include/reactos/wine/sys/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/include/reactos/wine/sys/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/reactos/include/reactos/wine/sys/types.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/sys/t…
============================================================================== --- trunk/reactos/include/reactos/wine/sys/types.h (added) +++ trunk/reactos/include/reactos/wine/sys/types.h [iso-8859-1] Mon Dec 22 14:28:26 2008 @@ -1,0 +1,18 @@ +#ifndef __WINE_SYS_TYPES_H +#define __WINE_SYS_TYPES_H + +#include_next <sys/types.h> + +#ifndef _PID_T_ +#define _PID_T_ +#ifndef _WIN64 +typedef int _pid_t; +#else +typedef __int64 _pid_t; +#endif +#ifndef NO_OLDNAMES +typedef _pid_t pid_t; +#endif +#endif /* Not _PID_T_ */ + +#endif /* __WINE_SYS_TYPES_H */ Propchange: trunk/reactos/include/reactos/wine/sys/types.h ------------------------------------------------------------------------------ svn:eol-style = native
16 years
1
0
0
0
[tkreuzer] 38276: Add ssize_t to rosdhcp.h, as ms crt headers (and so our future crt headers) don't define it.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Dec 22 14:25:44 2008 New Revision: 38276 URL:
http://svn.reactos.org/svn/reactos?rev=38276&view=rev
Log: Add ssize_t to rosdhcp.h, as ms crt headers (and so our future crt headers) don't define it. Modified: trunk/reactos/base/services/dhcp/include/rosdhcp.h Modified: trunk/reactos/base/services/dhcp/include/rosdhcp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/dhcp/include…
============================================================================== --- trunk/reactos/base/services/dhcp/include/rosdhcp.h [iso-8859-1] (original) +++ trunk/reactos/base/services/dhcp/include/rosdhcp.h [iso-8859-1] Mon Dec 22 14:25:44 2008 @@ -27,6 +27,20 @@ #define DHCP_BACKOFF_MAX 300 #define _PATH_DHCLIENT_PID "\\systemroot\\system32\\drivers\\etc\\dhclient.pid" typedef void *VOIDPTR; + +#ifndef _SSIZE_T_DEFINED +#define _SSIZE_T_DEFINED +#undef ssize_t +#ifdef _WIN64 +#if defined(__GNUC__) && defined(__STRICT_ANSI__) + typedef int ssize_t __attribute__ ((mode (DI))); +#else + typedef __int64 ssize_t; +#endif +#else + typedef int ssize_t; +#endif +#endif typedef u_int32_t uintTIME; #define TIME uintTIME
16 years
1
0
0
0
[sginsberg] 38275: - Less hack, more assert
by sginsberg@svn.reactos.org
Author: sginsberg Date: Mon Dec 22 13:55:23 2008 New Revision: 38275 URL:
http://svn.reactos.org/svn/reactos?rev=38275&view=rev
Log: - Less hack, more assert Modified: trunk/reactos/ntoskrnl/config/cmparse.c Modified: trunk/reactos/ntoskrnl/config/cmparse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Mon Dec 22 13:55:23 2008 @@ -492,16 +492,7 @@ ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyCell == Cell); ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyHive == Hive); ASSERT(KeyBody->KeyControlBlock->ParentKcb == ParentKcb); - //ASSERT(KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen == KeyNode->MaxNameLen); - if (KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen != KeyNode->MaxNameLen) - { - /* HACK: this gets unsynced due to (?) mismatching KCB referencing */ - DPRINT1("BUG: KCB MaxNameLen %d does not match KeyNode's MaxNameLen %d!\n", - KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen, KeyNode->MaxNameLen); - - /* Manually sync MaxNameLens, remove once fixed */ - KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen = KeyNode->MaxNameLen; - } + ASSERT(KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen == KeyNode->MaxNameLen); /* Update the timestamp */ KeQuerySystemTime(&TimeStamp);
16 years
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200