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
November 2007
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
888 discussions
Start a n
N
ew thread
[gedmurphy] 30269: fix the header mess and get it building with rosbe, albeit with many warnings at the moment
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Nov 8 15:47:25 2007 New Revision: 30269 URL:
http://svn.reactos.org/svn/reactos?rev=30269&view=rev
Log: fix the header mess and get it building with rosbe, albeit with many warnings at the moment Modified: trunk/reactos/base/applications/mstsc/bitmap.c trunk/reactos/base/applications/mstsc/bsops.c trunk/reactos/base/applications/mstsc/bsops.h trunk/reactos/base/applications/mstsc/cache.c trunk/reactos/base/applications/mstsc/channels.c trunk/reactos/base/applications/mstsc/connectdialog.c trunk/reactos/base/applications/mstsc/iso.c trunk/reactos/base/applications/mstsc/licence.c trunk/reactos/base/applications/mstsc/mcs.c trunk/reactos/base/applications/mstsc/mppc.c trunk/reactos/base/applications/mstsc/mstsc.rbuild trunk/reactos/base/applications/mstsc/orders.c trunk/reactos/base/applications/mstsc/orders.h trunk/reactos/base/applications/mstsc/pstcache.c trunk/reactos/base/applications/mstsc/rdesktop.h trunk/reactos/base/applications/mstsc/rdp.c trunk/reactos/base/applications/mstsc/rdp5.c trunk/reactos/base/applications/mstsc/rdpfile.c trunk/reactos/base/applications/mstsc/secure.c trunk/reactos/base/applications/mstsc/ssl_calls.c trunk/reactos/base/applications/mstsc/tcp.c trunk/reactos/base/applications/mstsc/todo.h trunk/reactos/base/applications/mstsc/uimain.c trunk/reactos/base/applications/mstsc/uimain.h trunk/reactos/base/applications/mstsc/win32.c Modified: trunk/reactos/base/applications/mstsc/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/bi…
============================================================================== --- trunk/reactos/base/applications/mstsc/bitmap.c (original) +++ trunk/reactos/base/applications/mstsc/bitmap.c Thu Nov 8 15:47:25 2007 @@ -28,7 +28,7 @@ /* indent is confused by this file */ /* *INDENT-OFF* */ -#include "rdesktop.h" +#include "todo.h" #define CVAL(p) (*(p++)) #ifdef NEED_ALIGN Modified: trunk/reactos/base/applications/mstsc/bsops.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/bs…
============================================================================== --- trunk/reactos/base/applications/mstsc/bsops.c (original) +++ trunk/reactos/base/applications/mstsc/bsops.c Thu Nov 8 15:47:25 2007 @@ -18,23 +18,24 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <stdlib.h> -#include <string.h> -#include "bsops.h" +//#include <stdlib.h> +//#include <string.h> +//#include "bsops.h" +#include "todo.h" /* globals */ static char * g_bs = 0; static int g_bs_size = 0; -static int g_width = 800; -static int g_height = 600; +static int g_width1 = 800; +static int g_height1 = 600; static int g_bpp = 8; static int g_Bpp = 1; -static int g_clip_left = 0; -static int g_clip_top = 0; -static int g_clip_right = 800; -static int g_clip_bottom = 600; +static int g_clip_left1 = 0; +static int g_clip_top1 = 0; +static int g_clip_right1 = 800; +static int g_clip_bottom1 = 600; /* for bs_patblt */ static unsigned char g_hatch_patterns[] = @@ -82,9 +83,9 @@ { char * p; - if (x >= 0 && x < g_width && y >= 0 && y < g_height) - { - p = g_bs + (y * g_width * g_Bpp) + (x * g_Bpp); + if (x >= 0 && x < g_width1 && y >= 0 && y < g_height1) + { + p = g_bs + (y * g_width1 * g_Bpp) + (x * g_Bpp); if (g_Bpp == 1) { return *((unsigned char *) p); @@ -112,12 +113,12 @@ char * p; if (!use_clip || - (x >= g_clip_left && x < g_clip_right && - y >= g_clip_top && y < g_clip_bottom)) - { - if (x >= 0 && x < g_width && y >= 0 && y < g_height) - { - p = g_bs + (y * g_width * g_Bpp) + (x * g_Bpp); + (x >= g_clip_left1 && x < g_clip_right1 && + y >= g_clip_top1 && y < g_clip_bottom1)) + { + if (x >= 0 && x < g_width1 && y >= 0 && y < g_height1) + { + p = g_bs + (y * g_width1 * g_Bpp) + (x * g_Bpp); if (rop != 12) { pixel = bs_do_rop(rop, pixel, bs_get_pixel(x, y)); @@ -144,9 +145,9 @@ { char * p; - if (x >= 0 && x < g_width && y >= 0 && y < g_height) - { - p = g_bs + (y * g_width * g_Bpp) + (x * g_Bpp); + if (x >= 0 && x < g_width1 && y >= 0 && y < g_height1) + { + p = g_bs + (y * g_width1 * g_Bpp) + (x * g_Bpp); return p; } else @@ -163,17 +164,17 @@ { free(g_bs); } - g_width = width; - g_height = height; + g_width1 = width; + g_height1 = height; g_bpp = bpp; g_Bpp = (bpp + 7) / 8; g_bs_size = width * height * g_Bpp; g_bs = malloc(g_bs_size); memset(g_bs, 0, g_bs_size); - g_clip_left = 0; - g_clip_top = 0; - g_clip_right = width; - g_clip_bottom = height; + g_clip_left1 = 0; + g_clip_top1 = 0; + g_clip_right1 = width; + g_clip_bottom1 = height; } /*****************************************************************************/ @@ -190,20 +191,20 @@ void bs_set_clip(int x, int y, int cx, int cy) { - g_clip_left = x; - g_clip_top = y; - g_clip_right = x + cx; - g_clip_bottom = y + cy; + g_clip_left1 = x; + g_clip_top1 = y; + g_clip_right1 = x + cx; + g_clip_bottom1 = y + cy; } /*****************************************************************************/ void bs_reset_clip(void) { - g_clip_left = 0; - g_clip_top = 0; - g_clip_right = g_width; - g_clip_bottom = g_height; + g_clip_left1 = 0; + g_clip_top1 = 0; + g_clip_right1 = g_width1; + g_clip_bottom1 = g_height1; } /*****************************************************************************/ @@ -326,29 +327,29 @@ int dx; int dy; - if (g_clip_left > *x) - { - dx = g_clip_left - *x; + if (g_clip_left1 > *x) + { + dx = g_clip_left1 - *x; } else { dx = 0; } - if (g_clip_top > *y) - { - dy = g_clip_top - *y; + if (g_clip_top1 > *y) + { + dy = g_clip_top1 - *y; } else { dy = 0; } - if (*x + *cx > g_clip_right) - { - *cx = (*cx - ((*x + *cx) - g_clip_right)); - } - if (*y + *cy > g_clip_bottom) - { - *cy = (*cy - ((*y + *cy) - g_clip_bottom)); + if (*x + *cx > g_clip_right1) + { + *cx = (*cx - ((*x + *cx) - g_clip_right1)); + } + if (*y + *cy > g_clip_bottom1) + { + *cy = (*cy - ((*y + *cy) - g_clip_bottom1)); } *cx = *cx - dx; *cy = *cy - dy; @@ -793,13 +794,13 @@ return; } /* nothing to draw, memset and leave */ - if (x + cx < 0 || y + cy < 0 || x >= g_width || y >= g_height) + if (x + cx < 0 || y + cy < 0 || x >= g_width1 || y >= g_height1) { memset(dst, 0, cx * cy * g_Bpp); return; } /* check if it goes over an edge */ - if (x < 0 || y < 0 || x + cx > g_width || y + cy > g_height) + if (x < 0 || y < 0 || x + cx > g_width1 || y + cy > g_height1) { memset(dst, 0, cx * cy * g_Bpp); if (x < 0) @@ -808,9 +809,9 @@ dst += -x * g_Bpp; x = 0; } - if (x + cx > g_width) - { - cx = g_width - x; + if (x + cx > g_width1) + { + cx = g_width1 - x; } for (i = 0; i < cy; i++) { Modified: trunk/reactos/base/applications/mstsc/bsops.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/bs…
============================================================================== --- trunk/reactos/base/applications/mstsc/bsops.h (original) +++ trunk/reactos/base/applications/mstsc/bsops.h Thu Nov 8 15:47:25 2007 @@ -17,6 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef __BSOPS_MSTSC_H +#define __BSOPS_MSTSC_H int bs_get_pixel(int x, int y); void bs_set_pixel(int x, int y, int pixel, int rop, int use_clip); @@ -47,3 +50,5 @@ int brush_style, char * brush_pattern, int brush_x_org, int brush_y_org, int bgcolour, int fgcolour); + +#endif /* __BSOPS_MSTSC_H */ Modified: trunk/reactos/base/applications/mstsc/cache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ca…
============================================================================== --- trunk/reactos/base/applications/mstsc/cache.c (original) +++ trunk/reactos/base/applications/mstsc/cache.c Thu Nov 8 15:47:25 2007 @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" /* BITMAP CACHE */ extern int g_pstcache_fd[]; Modified: trunk/reactos/base/applications/mstsc/channels.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ch…
============================================================================== --- trunk/reactos/base/applications/mstsc/channels.c (original) +++ trunk/reactos/base/applications/mstsc/channels.c Thu Nov 8 15:47:25 2007 @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" #define MAX_CHANNELS 6 #define CHANNEL_CHUNK_LENGTH 1600 Modified: trunk/reactos/base/applications/mstsc/connectdialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/co…
============================================================================== --- trunk/reactos/base/applications/mstsc/connectdialog.c (original) +++ trunk/reactos/base/applications/mstsc/connectdialog.c Thu Nov 8 15:47:25 2007 @@ -18,11 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <windows.h> -#include <commctrl.h> -#include <stdio.h> -#include <todo.h> -#include "resource.h" +#include "todo.h" #define MAX_KEY_NAME 255 @@ -72,6 +68,8 @@ HWND hDisplayPage; HBITMAP hHeader; BITMAP headerbitmap; + HICON hMstscSm; + HICON hMstscLg; HICON hLogon; HICON hConn; HICON hRemote; @@ -541,11 +539,19 @@ Pixel, sizeof(Pixel) / sizeof(WCHAR))) { +#ifdef _MSC_VER _swprintf(Buffer, Pixel, pInfo->DisplayDeviceList->Resolutions[position].dmPelsWidth, pInfo->DisplayDeviceList->Resolutions[position].dmPelsHeight, Pixel); +#else + swprintf(Buffer, + Pixel, + pInfo->DisplayDeviceList->Resolutions[position].dmPelsWidth, + pInfo->DisplayDeviceList->Resolutions[position].dmPelsHeight, + Pixel); +#endif } } @@ -678,11 +684,20 @@ Pixel, sizeof(Pixel) / sizeof(WCHAR))) { +#ifdef _MSC_VER _swprintf(Buffer, Pixel, width, height, Pixel); +#else + swprintf(Buffer, + Pixel, + width, + height, + Pixel); +#endif + SendDlgItemMessageW(pInfo->hDisplayPage, IDC_SETTINGS_RESOLUTION_TEXT, WM_SETTEXT, @@ -918,6 +933,34 @@ /* add main settings pointer */ pInfo->pRdpSettings = pRdpSettings; + /* set the dialog icons */ + pInfo->hMstscSm = LoadImageW(hInst, + MAKEINTRESOURCEW(IDI_MSTSC), + IMAGE_ICON, + 16, + 16, + LR_DEFAULTCOLOR); + if (pInfo->hMstscSm) + { + SendMessageW(hwnd, + WM_SETICON, + ICON_SMALL, + (WPARAM)pInfo->hMstscSm); + } + pInfo->hMstscLg = LoadImageW(hInst, + MAKEINTRESOURCEW(IDI_MSTSC), + IMAGE_ICON, + 32, + 32, + LR_DEFAULTCOLOR); + if (pInfo->hMstscLg) + { + SendMessageW(hwnd, + WM_SETICON, + ICON_BIG, + (WPARAM)pInfo->hMstscLg); + } + pInfo->hHeader = (HBITMAP)LoadImageW(hInst, MAKEINTRESOURCEW(IDB_HEADER), IMAGE_BITMAP, @@ -940,10 +983,10 @@ (DLGPROC)GeneralDlgProc)) { WCHAR str[256]; - LoadStringW(hInst, IDS_TAB_GENERAL, str, 256); ZeroMemory(&item, sizeof(TCITEM)); item.mask = TCIF_TEXT; - item.pszText = str; + if (LoadStringW(hInst, IDS_TAB_GENERAL, str, 256)) + item.pszText = str; item.cchTextMax = 256; (void)TabCtrl_InsertItem(pInfo->hTab, 0, &item); } @@ -954,10 +997,10 @@ (DLGPROC)DisplayDlgProc)) { WCHAR str[256]; - LoadStringW(hInst, IDS_TAB_DISPLAY, str, 256); ZeroMemory(&item, sizeof(TCITEM)); item.mask = TCIF_TEXT; - item.pszText = str; + if (LoadStringW(hInst, IDS_TAB_DISPLAY, str, 256)) + item.pszText = str; item.cchTextMax = 256; (void)TabCtrl_InsertItem(pInfo->hTab, 1, &item); } @@ -1057,6 +1100,13 @@ { if (pInfo) { + if (pInfo->hMstscSm) + DestroyIcon(pInfo->hMstscSm); + if (pInfo->hMstscLg) + DestroyIcon(pInfo->hMstscLg); + if (pInfo->hHeader) + DeleteObject(pInfo->hHeader); + HeapFree(GetProcessHeap(), 0, pInfo); Modified: trunk/reactos/base/applications/mstsc/iso.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/is…
============================================================================== --- trunk/reactos/base/applications/mstsc/iso.c (original) +++ trunk/reactos/base/applications/mstsc/iso.c Thu Nov 8 15:47:25 2007 @@ -18,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" /* Send a self-contained ISO PDU */ static void Modified: trunk/reactos/base/applications/mstsc/licence.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/li…
============================================================================== --- trunk/reactos/base/applications/mstsc/licence.c (original) +++ trunk/reactos/base/applications/mstsc/licence.c Thu Nov 8 15:47:25 2007 @@ -18,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" //#include <openssl/rc4.h> void * @@ -33,8 +33,8 @@ ssl_mod_exp(char* out, int out_len, char* in, int in_len, char* mod, int mod_len, char* exp, int exp_len); -extern char g_username[64]; -extern char g_hostname[16]; +extern char g_username[]; +extern char g_hostname[]; static uint8 g_licence_key[16]; static uint8 g_licence_sign_key[16]; Modified: trunk/reactos/base/applications/mstsc/mcs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/mc…
============================================================================== --- trunk/reactos/base/applications/mstsc/mcs.c (original) +++ trunk/reactos/base/applications/mstsc/mcs.c Thu Nov 8 15:47:25 2007 @@ -18,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" uint16 g_mcs_userid; extern VCHANNEL g_channels[]; Modified: trunk/reactos/base/applications/mstsc/mppc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/mp…
============================================================================== --- trunk/reactos/base/applications/mstsc/mppc.c (original) +++ trunk/reactos/base/applications/mstsc/mppc.c Thu Nov 8 15:47:25 2007 @@ -18,10 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <stdio.h> -#include <string.h> - -#include "rdesktop.h" +#include "todo.h" /* mppc decompression */ /*
http://www.faqs.org/rfcs/rfc2118.html
*/ Modified: trunk/reactos/base/applications/mstsc/mstsc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ms…
============================================================================== --- trunk/reactos/base/applications/mstsc/mstsc.rbuild (original) +++ trunk/reactos/base/applications/mstsc/mstsc.rbuild Thu Nov 8 15:47:25 2007 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> -<module name="mstsc" type="win32gui" installbase="system32" installname="mstsc.exe" unicode="no"> +<module name="mstsc" type="win32gui" installbase="system32" installname="mstsc.exe" unicode="yes" allowwarnings="true"> <include base="mstsc">.</include> <define name="_WIN32_IE">0x600</define> <define name="_WIN32_WINNT">0x501</define> @@ -9,6 +9,9 @@ <library>gdi32</library> <library>comctl32</library> <library>ws2_32</library> + <library>advapi32</library> + <library>shell32</library> + <library>ole32</library> <compilationunit name="unit.c"> <file>bitmap.c</file> <file>bsops.c</file> @@ -23,6 +26,7 @@ <file>pstcache.c</file> <file>rdp5.c</file> <file>rdp.c</file> + <file>rdpfile.c</file> <file>secure.c</file> <file>ssl_calls.c</file> <file>tcp.c</file> Modified: trunk/reactos/base/applications/mstsc/orders.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/or…
============================================================================== --- trunk/reactos/base/applications/mstsc/orders.c (original) +++ trunk/reactos/base/applications/mstsc/orders.c Thu Nov 8 15:47:25 2007 @@ -18,8 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" -#include "orders.h" +#include "todo.h" + extern uint8 *g_next_packet; static RDP_ORDER_STATE g_order_state; Modified: trunk/reactos/base/applications/mstsc/orders.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/or…
============================================================================== --- trunk/reactos/base/applications/mstsc/orders.h (original) +++ trunk/reactos/base/applications/mstsc/orders.h Thu Nov 8 15:47:25 2007 @@ -18,6 +18,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __ORDERS_MSTSC_H +#define __ORDERS_MSTSC_H + #define RDP_ORDER_STANDARD 0x01 #define RDP_ORDER_SECONDARY 0x02 #define RDP_ORDER_BOUNDS 0x04 @@ -366,3 +369,5 @@ } RDP_COLCACHE_ORDER; + +#endif /* __ORDERS_MSTSC_H */ Modified: trunk/reactos/base/applications/mstsc/pstcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ps…
============================================================================== --- trunk/reactos/base/applications/mstsc/pstcache.c (original) +++ trunk/reactos/base/applications/mstsc/pstcache.c Thu Nov 8 15:47:25 2007 @@ -18,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" #define MAX_CELL_SIZE 0x1000 /* pixels */ Modified: trunk/reactos/base/applications/mstsc/rdesktop.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rd…
============================================================================== --- trunk/reactos/base/applications/mstsc/rdesktop.h (original) +++ trunk/reactos/base/applications/mstsc/rdesktop.h Thu Nov 8 15:47:25 2007 @@ -18,11 +18,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __RDESKTOP_MSTSC_H +#define __RDESKTOP_MSTSC_H + #include <stdlib.h> #include <stdio.h> #include <string.h> #ifdef _WIN32 -#include <winsock2.h> /* winsock2.h first */ +//#include <winsock2.h> /* winsock2.h first */ #include <windows.h> #include <time.h> #else /* WIN32 */ @@ -124,3 +127,5 @@ #ifndef MAKE_PROTO #include "proto.h" #endif + +#endif /* __RDESKTOP_MSTSC_H */ Modified: trunk/reactos/base/applications/mstsc/rdp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rd…
============================================================================== --- trunk/reactos/base/applications/mstsc/rdp.c (original) +++ trunk/reactos/base/applications/mstsc/rdp.c Thu Nov 8 15:47:25 2007 @@ -18,26 +18,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -//#include <time.h> -#ifndef _WIN32 -#include <errno.h> -#include <unistd.h> -#endif -#include "rdesktop.h" - -#ifdef HAVE_ICONV -#ifdef HAVE_ICONV_H -#include <iconv.h> -#endif - -#ifndef ICONV_CONST -#define ICONV_CONST "" -#endif -#endif +#include "todo.h" + extern uint16 g_mcs_userid; -extern char g_username[64]; -extern char g_codepage[16]; +extern char g_username[]; +extern char g_codepage[]; extern BOOL g_bitmap_compression; extern BOOL g_orders; extern BOOL g_encryption; Modified: trunk/reactos/base/applications/mstsc/rdp5.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rd…
============================================================================== --- trunk/reactos/base/applications/mstsc/rdp5.c (original) +++ trunk/reactos/base/applications/mstsc/rdp5.c Thu Nov 8 15:47:25 2007 @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" extern uint8 *g_next_packet; Modified: trunk/reactos/base/applications/mstsc/rdpfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rd…
============================================================================== --- trunk/reactos/base/applications/mstsc/rdpfile.c (original) +++ trunk/reactos/base/applications/mstsc/rdpfile.c Thu Nov 8 15:47:25 2007 @@ -1,8 +1,5 @@ -#include <windows.h> -#include <stdio.h> -#include <shlobj.h> -#include <todo.h> -#include "resource.h" + +#include "todo.h" #define NUM_SETTINGS 6 LPWSTR lpSettings[NUM_SETTINGS] = Modified: trunk/reactos/base/applications/mstsc/secure.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/se…
============================================================================== --- trunk/reactos/base/applications/mstsc/secure.c (original) +++ trunk/reactos/base/applications/mstsc/secure.c Thu Nov 8 15:47:25 2007 @@ -18,7 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" +#include "todo.h" //#include <openssl/rc4.h> //#include <openssl/md5.h> @@ -62,7 +62,7 @@ ssl_mod_exp(char* out, int out_len, char* in, int in_len, char* mod, int mod_len, char* exp, int exp_len); -extern char g_hostname[16]; +extern char g_hostname[]; extern int g_width; extern int g_height; extern unsigned int g_keylayout; Modified: trunk/reactos/base/applications/mstsc/ssl_calls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ss…
============================================================================== --- trunk/reactos/base/applications/mstsc/ssl_calls.c (original) +++ trunk/reactos/base/applications/mstsc/ssl_calls.c Thu Nov 8 15:47:25 2007 @@ -20,7 +20,7 @@ */ -#include "rdesktop.h" +#include "todo.h" #define APP_CC Modified: trunk/reactos/base/applications/mstsc/tcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/tc…
============================================================================== --- trunk/reactos/base/applications/mstsc/tcp.c (original) +++ trunk/reactos/base/applications/mstsc/tcp.c Thu Nov 8 15:47:25 2007 @@ -18,18 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef _WIN32 -#include <unistd.h> /* select read write close */ -#include <sys/socket.h> /* socket connect setsockopt */ -#include <sys/time.h> /* timeval */ -#include <netdb.h> /* gethostbyname */ -#include <netinet/in.h> /* sockaddr_in */ -#include <netinet/tcp.h> /* TCP_NODELAY */ -#include <arpa/inet.h> /* inet_addr */ -#include <errno.h> /* errno */ -#endif /* _WIN32 */ - -#include "rdesktop.h" + +#include "todo.h" #ifdef _WIN32 #define socklen_t int Modified: trunk/reactos/base/applications/mstsc/todo.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/to…
============================================================================== --- trunk/reactos/base/applications/mstsc/todo.h (original) +++ trunk/reactos/base/applications/mstsc/todo.h Thu Nov 8 15:47:25 2007 @@ -1,3 +1,19 @@ +#include <windows.h> +#include <commctrl.h> +#include <shlobj.h> +#include <stdio.h> +#include "uimain.h" +#include "rdesktop.h" +#include "bsops.h" +#include "orders.h" +#include "resource.h" + +//#include <stdio.h> + +#ifndef __TODO_MSTSC_H +#define __TODO_MSTSC_H + + #define MAXKEY 256 #define MAXVALUE 256 @@ -24,3 +40,6 @@ LPWSTR GetStringFromSettings(PRDPSETTINGS pSettings, LPWSTR lpValue); BOOL SetIntegerToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, INT Value); BOOL SetStringToSettings(PRDPSETTINGS pRdpSettings, LPWSTR lpKey, LPWSTR lpValue); + + +#endif /* __TODO_MSTSC_H */ Modified: trunk/reactos/base/applications/mstsc/uimain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ui…
============================================================================== --- trunk/reactos/base/applications/mstsc/uimain.c (original) +++ trunk/reactos/base/applications/mstsc/uimain.c Thu Nov 8 15:47:25 2007 @@ -18,8 +18,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "rdesktop.h" -#include "bsops.h" +#include "todo.h" char g_username[256] = ""; char g_hostname[256] = ""; @@ -97,9 +96,12 @@ mi_reset_clip(void); void mi_line(int x1, int y1, int x2, int y2, int colour); +void* mi_create_cursor(unsigned int x, unsigned int y, int width, int height, unsigned char * andmask, unsigned char * xormask); + + void mi_destroy_cursor(void * cursor); void Modified: trunk/reactos/base/applications/mstsc/uimain.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/ui…
============================================================================== --- trunk/reactos/base/applications/mstsc/uimain.h (original) +++ trunk/reactos/base/applications/mstsc/uimain.h Thu Nov 8 15:47:25 2007 @@ -17,6 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef __UIMAIN_MSTSC_H +#define __UIMAIN_MSTSC_H /* in uimain.c */ int @@ -74,3 +77,5 @@ #define UI_MAX(a, b) (((a) > (b)) ? (a) : (b)) #undef UI_MIN #define UI_MIN(a, b) (((a) < (b)) ? (a) : (b)) + +#endif /* __UIMAIN_MSTSC_H */ Modified: trunk/reactos/base/applications/mstsc/win32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/wi…
============================================================================== --- trunk/reactos/base/applications/mstsc/win32.c (original) +++ trunk/reactos/base/applications/mstsc/win32.c Thu Nov 8 15:47:25 2007 @@ -19,12 +19,8 @@ */ #include <winsock2.h> /* winsock2.h first */ -#include <windows.h> -#include <winuser.h> -#include <stdio.h> -#include "uimain.h" #include "todo.h" -#include "resource.h" + extern char g_username[]; extern char g_hostname[]; @@ -999,7 +995,7 @@ } else { - if (state == 1) /* -g */ + if (state == 1) /* -g widthxheight*/ { state = 0; if (strcmp(param1, "workarea") == 0) @@ -1022,12 +1018,12 @@ } g_width_height_set = 1; } - if (state == 2) /* -t */ + if (state == 2) /* -t port */ { state = 0; g_tcp_port_rdp = atol(param1); } - if (state == 3) /* -a */ + if (state == 3) /* -a bpp */ { state = 0; g_server_depth = atol(param1); @@ -1036,32 +1032,32 @@ mi_error("invalid server bpp\r\n"); } } - if (state == 5) /* -u */ + if (state == 5) /* -u username */ { state = 0; strcpy(g_username, param1); } - if (state == 6) /* -p */ + if (state == 6) /* -p password */ { state = 0; strcpy(g_password, param1); } - if (state == 7) /* -d */ + if (state == 7) /* -d domain */ { state = 0; strcpy(g_domain, param1); } - if (state == 8) /* -s */ + if (state == 8) /* -s shell */ { state = 0; strcpy(g_shell, param1); } - if (state == 9) /* -c */ + if (state == 9) /* -c workin directory*/ { state = 0; strcpy(g_directory, param1); } - if (state == 10) /* -n */ + if (state == 10) /* -n host name*/ { state = 0; strcpy(g_hostname, param1); @@ -1272,28 +1268,12 @@ return (state == 0); } -#ifdef WITH_DEBUG -/*****************************************************************************/ -int -main(int argc, char ** argv) -{ - WSADATA d; - - WSAStartup(MAKEWORD(2, 0), &d); - if (!mi_process_cl(argv[0])) - { - mi_show_params(); - WSACleanup(); - return 0; - } - return ui_main(); -} -#else /* WITH_DEBUG */ + /*****************************************************************************/ int WINAPI -WinMain(HINSTANCE hInstance, +wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, + LPWSTR lpCmdLine, int nCmdShow) { PRDPSETTINGS pRdpSettings; @@ -1310,6 +1290,18 @@ if (OpenRDPConnectDialog(hInstance, pRdpSettings)) { + strcpy(g_servername, "192.168.40.50"); + //g_port = 3389; + strcpy(g_username, "buildbot"); + strcpy(g_password, "P4ssw0rd"); + g_server_depth = 16; + g_width = 800; + g_height = 600; + g_screen_width = GetSystemMetrics(SM_CXSCREEN); + g_screen_height = GetSystemMetrics(SM_CYSCREEN); + g_xoff = GetSystemMetrics(SM_CXEDGE) * 2; + g_yoff = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYEDGE) * 2; + ui_main(); ret = 0; } @@ -1328,7 +1320,7 @@ return ret; } -#endif /* WITH_DEBUG */ + /*****************************************************************************/ void
17 years, 1 month
1
0
0
0
[dreimer] 30268: Added CCache to the Install Selection. Sorted the Section a bit more effective.
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 8 15:29:02 2007 New Revision: 30268 URL:
http://svn.reactos.org/svn/reactos?rev=30268&view=rev
Log: Added CCache to the Install Selection. Sorted the Section a bit more effective. Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt trunk/tools/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/ChangeLog…
============================================================================== --- trunk/tools/RosBE-Windows/Root/ChangeLog.txt (original) +++ trunk/tools/RosBE-Windows/Root/ChangeLog.txt Thu Nov 8 15:29:02 2007 @@ -3,6 +3,7 @@ - Updated: GCC 4.1.3 Build 20071015 with recent patches to get makex run under Vista. (Peter Ward, TODO: name of tamlin) - Updated: Binutils 2.18.50 Build 20071015. (Peter Ward) - Updated: NASM to 0.99.06 (Daniel Reimer) +- Updated: You can now select the components you want to install. (Daniel Reimer) - Updated RosBE Configuration Tool. (Pierre Schweitzer, Peter Ward, Daniel Reimer) - Added French translation. (Pierre Schweitzer) @@ -53,7 +54,7 @@ - Fix a warning in echoh.c. (Peter Ward) - Fix options.exe compile with RosBE 0.3.8.1 (Peter Ward) - Merged the NSIS files back together. (Peter Ward) -- Rewrote Scut in C. (Peter Ward) +- Rewrote Scut in C. (Peter Ward) - Heaviliy cleaning up the .cmd files. (Peter Ward, Daniel Reimer) - Remove typos. (Peter Ward, Daniel Reimer) @@ -70,7 +71,7 @@ - Added more Error Messages to prevent confusion and stupid mistakes. (Daniel Reimer) - Remove trailing Spaces. (Daniel Reimer) - Make helpfile entries dependant on the installed optional files. (Daniel Reimer) - - Added echo Messages which tell a sucessful process. (Daniel Reimer) + - Added echo Messages which inform you about a sucessful process. (Daniel Reimer) - Sorted and fixed parts of the help. (Daniel Reimer, Peter Ward) - Modify many "if" to "if /I" to ignore lower and upper case. (Daniel Reimer) - Modify ERROR messages in scut to abort the process when Name and Path are specified by Shell Commands, too. (Daniel Reimer) Modified: trunk/tools/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
============================================================================== --- trunk/tools/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE-Windows/RosBE.nsi Thu Nov 8 15:29:02 2007 @@ -98,7 +98,7 @@ ;; MUI end. -Section -BaseFiles SEC02 +Section -BaseFiles SEC01 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -124,13 +124,29 @@ File /r Root\Tools\tee.exe SectionEnd -Section -MinGWGCCNASM SEC01 - SetOutPath "$INSTDIR\4.1.3\" +Section -MinGWGCCNASM SEC02 + SetOutPath "$INSTDIR\4.1.3" SetOverwrite try File /r Components\4.1.3\*.* SectionEnd -Section /o "SVN Tools" SEC03 +Section /o "RosBE Configurator" SEC03 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\options.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\options.exe + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + SetOutPath $REACTOS_SOURCE_DIRECTORY + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Options.lnk" \ + "$INSTDIR\Tools\options.exe" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section /o "SVN Tools" SEC04 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -150,7 +166,24 @@ File /r Root\Tools\licenses\*.* SectionEnd -Section /o "relAddr2Line Tool" SEC04 +Section /o "Shortcut Tool" SEC05 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\scut.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\scut.exe +SectionEnd + +Section /o "CCache" SEC06 + SetShellVarContext current + SetOutPath "$INSTDIR\4.1.3\bin" + SetOverwrite try + File /r Root\Tools\ccache.exe +SectionEnd + +Section /o "relAddr2Line Tool" SEC07 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -162,34 +195,7 @@ File /r Root\Tools\chkslash.exe SectionEnd -Section /o "RosBE Configurator" SEC05 - SetShellVarContext current - SetOutPath "$INSTDIR" - SetOverwrite try - File /r Root\options.cmd - SetOutPath "$INSTDIR\Tools" - SetOverwrite try - File /r Root\Tools\options.exe - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" - SetOutPath $REACTOS_SOURCE_DIRECTORY - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Options.lnk" \ - "$INSTDIR\Tools\options.exe" - !insertmacro MUI_STARTMENU_WRITE_END - -SectionEnd - -Section /o "Shortcut Tool" SEC06 - SetShellVarContext current - SetOutPath "$INSTDIR" - SetOverwrite try - File /r Root\scut.cmd - SetOutPath "$INSTDIR\Tools" - SetOverwrite try - File /r Root\Tools\scut.exe -SectionEnd - -Section /o "Other Tools" SEC07 +Section /o "Other Tools" SEC08 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -198,7 +204,7 @@ File /r Root\Config.cmd SectionEnd -Section -StartMenuShortcuts SEC08 +Section -StartMenuShortcuts SEC09 SetShellVarContext current ;; @@ -216,7 +222,7 @@ !insertmacro MUI_STARTMENU_WRITE_END SectionEnd -Section /o "Desktop Shortcuts" SEC09 +Section /o "Desktop Shortcuts" SEC10 SetShellVarContext current ;; @@ -226,7 +232,7 @@ CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\terminal.ico" SectionEnd -Section /o "Quick Launch Shortcuts" SEC10 +Section /o "Quick Launch Shortcuts" SEC11 SetShellVarContext current ;; @@ -236,7 +242,7 @@ CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\terminal.ico" SectionEnd -Section -Post SEC11 +Section -Post SEC12 WriteUninstaller "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\RosBE.cmd" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
17 years, 1 month
1
0
0
0
[fireball] 30267: - Move ctype into strings. - Separate msvcrt-specific exception handling routine into prolog.s file. - Move bsearch to the search directory.
by fireball@svn.reactos.org
Author: fireball Date: Thu Nov 8 15:15:39 2007 New Revision: 30267 URL:
http://svn.reactos.org/svn/reactos?rev=30267&view=rev
Log: - Move ctype into strings. - Separate msvcrt-specific exception handling routine into prolog.s file. - Move bsearch to the search directory. Added: trunk/reactos/lib/sdk/crt/except/i386/prolog.s (with props) trunk/reactos/lib/sdk/crt/search/bsearch.c - copied unchanged from r30266, trunk/reactos/lib/sdk/crt/math/bsearch.c trunk/reactos/lib/sdk/crt/string/ctype.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/ctype/ctype.c Removed: trunk/reactos/lib/sdk/crt/ctype/ trunk/reactos/lib/sdk/crt/math/bsearch.c Modified: trunk/reactos/lib/sdk/crt/crt.rbuild trunk/reactos/lib/sdk/crt/except/i386/seh.s Modified: trunk/reactos/lib/sdk/crt/crt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.rbuild (original) +++ trunk/reactos/lib/sdk/crt/crt.rbuild Thu Nov 8 15:15:39 2007 @@ -23,9 +23,6 @@ <file>putch.c</file> <file>ungetch.c</file> </directory> - <directory name="ctype"> - <file>ctype.c</file> - </directory> <directory name="direct"> <file>chdir.c</file> <file>chdrive.c</file> @@ -47,6 +44,7 @@ <file>matherr.c</file> <if property="ARCH" value="i386"> <directory name="i386"> + <file>prolog.s</file> <file>seh.s</file> <file>unwind.c</file> </directory> @@ -413,6 +411,7 @@ <file>wcsrchr.c</file> </ifnot> <file>atof.c</file> + <file>ctype.c</file> <file>lasttok.c</file> <file>strcoll.c</file> <file>strdup.c</file> Added: trunk/reactos/lib/sdk/crt/except/i386/prolog.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/i386/pr…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/i386/prolog.s (added) +++ trunk/reactos/lib/sdk/crt/except/i386/prolog.s Thu Nov 8 15:15:39 2007 @@ -1,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS CRT + * FILE: lib/crt/misc/i386/prolog.s + * PURPOSE: SEH Support for the CRT + * PROGRAMMERS: Wine Development Team + */ + +/* INCLUDES ******************************************************************/ + +#include <ndk/asm.h> + +/* GLOBALS *******************************************************************/ + +.globl __EH_prolog + +// Copied from Wine. +__EH_prolog: + pushl $-1 + pushl %eax + pushl %fs:0 + movl %esp, %fs:0 + movl 12(%esp), %eax + movl %ebp, 12(%esp) + leal 12(%esp), %ebp + pushl %eax + ret Propchange: trunk/reactos/lib/sdk/crt/except/i386/prolog.s ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/lib/sdk/crt/except/i386/seh.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/except/i386/se…
============================================================================== --- trunk/reactos/lib/sdk/crt/except/i386/seh.s (original) +++ trunk/reactos/lib/sdk/crt/except/i386/seh.s Thu Nov 8 15:15:39 2007 @@ -56,7 +56,6 @@ .globl __local_unwind2 .globl __except_handler3 -.globl __EH_prolog // EAX = value to print _do_debug: @@ -366,15 +365,3 @@ // We should never get here ret - -// Copied from Wine. -__EH_prolog: - pushl $-1 - pushl %eax - pushl %fs:0 - movl %esp, %fs:0 - movl 12(%esp), %eax - movl %ebp, 12(%esp) - leal 12(%esp), %ebp - pushl %eax - ret Removed: trunk/reactos/lib/sdk/crt/math/bsearch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/math/bsearch.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/math/bsearch.c (original) +++ trunk/reactos/lib/sdk/crt/math/bsearch.c (removed) @@ -1,28 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> - -/* - * @implemented - */ -void * -bsearch(const void *key, const void *base0, size_t nelem, - size_t size, int (*cmp)(const void *ck, const void *ce)) -{ - char *base = (char *)base0; - int lim, cmpval; - void *p; - - for (lim = nelem; lim != 0; lim >>= 1) - { - p = base + (lim >> 1) * size; - cmpval = (*cmp)(key, p); - if (cmpval == 0) - return p; - if (cmpval > 0) - { /* key > p: move right */ - base = (char *)p + size; - lim--; - } /* else move left */ - } - return 0; -}
17 years, 1 month
1
0
0
0
[fireball] 30266: - Rearrange source files location, so that string/math/etc routines aren't spread throughout the CRT tree.
by fireball@svn.reactos.org
Author: fireball Date: Thu Nov 8 13:54:42 2007 New Revision: 30266 URL:
http://svn.reactos.org/svn/reactos?rev=30266&view=rev
Log: - Rearrange source files location, so that string/math/etc routines aren't spread throughout the CRT tree. Added: trunk/reactos/lib/sdk/crt/math/abs.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/abs.c trunk/reactos/lib/sdk/crt/math/bsearch.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/bsearch.c trunk/reactos/lib/sdk/crt/math/div.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/div.c trunk/reactos/lib/sdk/crt/math/labs.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/labs.c trunk/reactos/lib/sdk/crt/math/ldiv.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/ldiv.c trunk/reactos/lib/sdk/crt/math/rand.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/rand.c trunk/reactos/lib/sdk/crt/mem/ trunk/reactos/lib/sdk/crt/mem/i386/ trunk/reactos/lib/sdk/crt/mem/i386/memchr_asm.s - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s trunk/reactos/lib/sdk/crt/mem/i386/memmove_asm.s - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s trunk/reactos/lib/sdk/crt/mem/i386/memset_asm.s - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s trunk/reactos/lib/sdk/crt/mem/memchr.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memchr.c trunk/reactos/lib/sdk/crt/mem/memcmp.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memcmp.c trunk/reactos/lib/sdk/crt/mem/memcpy.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memcpy.c trunk/reactos/lib/sdk/crt/mem/memicmp.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memicmp.c trunk/reactos/lib/sdk/crt/mem/memmove.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memmove.c trunk/reactos/lib/sdk/crt/mem/memset.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memset.c trunk/reactos/lib/sdk/crt/string/atof.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atof.c trunk/reactos/lib/sdk/crt/string/atoi.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atoi.c trunk/reactos/lib/sdk/crt/string/atoi64.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atoi64.c trunk/reactos/lib/sdk/crt/string/atol.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atol.c trunk/reactos/lib/sdk/crt/string/itoa.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/itoa.c trunk/reactos/lib/sdk/crt/string/itow.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/itow.c trunk/reactos/lib/sdk/crt/string/splitp.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/splitp.c trunk/reactos/lib/sdk/crt/string/strtod.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtod.c trunk/reactos/lib/sdk/crt/string/strtol.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtol.c trunk/reactos/lib/sdk/crt/string/strtold.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtold.c trunk/reactos/lib/sdk/crt/string/strtoul.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtoul.c trunk/reactos/lib/sdk/crt/string/strtoull.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtoull.c trunk/reactos/lib/sdk/crt/string/wcstod.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstod.c trunk/reactos/lib/sdk/crt/string/wcstol.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstol.c trunk/reactos/lib/sdk/crt/string/wcstom.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstom.c trunk/reactos/lib/sdk/crt/string/wcstomb.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c trunk/reactos/lib/sdk/crt/string/wcstombs.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c trunk/reactos/lib/sdk/crt/string/wcstoul.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c trunk/reactos/lib/sdk/crt/string/wctomb.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wctomb.c trunk/reactos/lib/sdk/crt/string/witoa.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/witoa.c trunk/reactos/lib/sdk/crt/string/witow.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/witow.c trunk/reactos/lib/sdk/crt/string/wsplitp.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c trunk/reactos/lib/sdk/crt/string/wtoi.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtoi.c trunk/reactos/lib/sdk/crt/string/wtoi64.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c trunk/reactos/lib/sdk/crt/string/wtol.c - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtol.c Removed: trunk/reactos/lib/sdk/crt/stdlib/abs.c trunk/reactos/lib/sdk/crt/stdlib/atof.c trunk/reactos/lib/sdk/crt/stdlib/atoi.c trunk/reactos/lib/sdk/crt/stdlib/atoi64.c trunk/reactos/lib/sdk/crt/stdlib/atol.c trunk/reactos/lib/sdk/crt/stdlib/bsearch.c trunk/reactos/lib/sdk/crt/stdlib/div.c trunk/reactos/lib/sdk/crt/stdlib/itoa.c trunk/reactos/lib/sdk/crt/stdlib/itow.c trunk/reactos/lib/sdk/crt/stdlib/labs.c trunk/reactos/lib/sdk/crt/stdlib/ldiv.c trunk/reactos/lib/sdk/crt/stdlib/rand.c trunk/reactos/lib/sdk/crt/stdlib/splitp.c trunk/reactos/lib/sdk/crt/stdlib/strtod.c trunk/reactos/lib/sdk/crt/stdlib/strtol.c trunk/reactos/lib/sdk/crt/stdlib/strtold.c trunk/reactos/lib/sdk/crt/stdlib/strtoul.c trunk/reactos/lib/sdk/crt/stdlib/strtoull.c trunk/reactos/lib/sdk/crt/stdlib/wcstod.c trunk/reactos/lib/sdk/crt/stdlib/wcstol.c trunk/reactos/lib/sdk/crt/stdlib/wcstom.c trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c trunk/reactos/lib/sdk/crt/stdlib/wctomb.c trunk/reactos/lib/sdk/crt/stdlib/witoa.c trunk/reactos/lib/sdk/crt/stdlib/witow.c trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c trunk/reactos/lib/sdk/crt/stdlib/wtoi.c trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c trunk/reactos/lib/sdk/crt/stdlib/wtol.c trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s trunk/reactos/lib/sdk/crt/string/memchr.c trunk/reactos/lib/sdk/crt/string/memcmp.c trunk/reactos/lib/sdk/crt/string/memcpy.c trunk/reactos/lib/sdk/crt/string/memicmp.c trunk/reactos/lib/sdk/crt/string/memmove.c trunk/reactos/lib/sdk/crt/string/memset.c Modified: trunk/reactos/lib/sdk/crt/crt.rbuild Modified: trunk/reactos/lib/sdk/crt/crt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev…
============================================================================== --- trunk/reactos/lib/sdk/crt/crt.rbuild (original) +++ trunk/reactos/lib/sdk/crt/crt.rbuild Thu Nov 8 13:54:42 2007 @@ -120,13 +120,16 @@ <file>asin.c</file> <file>cabs.c</file> <file>cosh.c</file> + <file>div.c</file> <file>frexp.c</file> <file>huge_val.c</file> <file>hypot.c</file> <file>j0_y0.c</file> <file>j1_y1.c</file> <file>jn_yn.c</file> + <file>ldiv.c</file> <file>modf.c</file> + <file>rand.c</file> <file>s_modf.c</file> <file>sinh.c</file> <file>stubs.c</file> @@ -205,6 +208,26 @@ <file>mbstrlen.c</file> <file>mbsupr.c</file> </directory> + + <directory name="mem"> + <if property="ARCH" value="i386"> + <directory name="i386"> + <file>memchr_asm.s</file> + <file>memcpy_asm.s</file> + <file>memmove_asm.s</file> + <file>memset_asm.s</file> + </directory> + </if> + <ifnot property="ARCH" value="i386"> + <file>memchr.c</file> + <file>memcpy.c</file> + <file>memmove.c</file> + <file>memset.c</file> + </ifnot> + <file>memcmp.c</file> + <file>memicmp.c</file> + </directory> + <directory name="misc"> <file>amsg.c</file> <file>assert.c</file> @@ -321,8 +344,6 @@ <file>_exit.c</file> <file>abort.c</file> <file>atexit.c</file> - <file>atof.c</file> - <file>div.c</file> <file>ecvt.c</file> <file>ecvtbuf.c</file> <file>errno.c</file> @@ -331,35 +352,22 @@ <file>fullpath.c</file> <file>gcvt.c</file> <file>getenv.c</file> - <file>ldiv.c</file> <file>makepath.c</file> <file>malloc.c</file> <file>mbtowc.c</file> <file>obsol.c</file> <file>putenv.c</file> - <file>rand.c</file> <file>rot.c</file> <file>senv.c</file> - <file>strtod.c</file> - <file>strtoul.c</file> - <file>strtoull.c</file> <file>swab.c</file> - <file>wcstod.c</file> - <file>wcstombs.c</file> - <file>wctomb.c</file> <file>wfulpath.c</file> <file>wputenv.c</file> <file>wsenv.c</file> - <file>wsplitp.c</file> <file>wmakpath.c</file> </directory> <directory name="string"> <if property="ARCH" value="i386"> <directory name="i386"> - <file>memchr_asm.s</file> - <file>memcpy_asm.s</file> - <file>memmove_asm.s</file> - <file>memset_asm.s</file> <file>strcat_asm.s</file> <file>strchr_asm.s</file> <file>strcmp_asm.s</file> @@ -383,10 +391,6 @@ </directory> </if> <ifnot property="ARCH" value="i386"> - <file>memchr.c</file> - <file>memcpy.c</file> - <file>memmove.c</file> - <file>memset.c</file> <file>strcat.c</file> <file>strchr.c</file> <file>strcmp.c</file> @@ -408,9 +412,8 @@ <file>wcsnlen.c</file> <file>wcsrchr.c</file> </ifnot> + <file>atof.c</file> <file>lasttok.c</file> - <file>memcmp.c</file> - <file>memicmp.c</file> <file>strcoll.c</file> <file>strdup.c</file> <file>strerror.c</file> @@ -422,9 +425,16 @@ <file>strrev.c</file> <file>strset.c</file> <file>strstr.c</file> + <file>strtod.c</file> <file>strtok.c</file> + <file>strtoul.c</file> + <file>strtoull.c</file> <file>strupr.c</file> <file>strxfrm.c</file> + <file>wcstod.c</file> + <file>wcstombs.c</file> + <file>wctomb.c</file> + <file>wsplitp.c</file> </directory> <directory name="sys_stat"> <file>fstat.c</file> Removed: trunk/reactos/lib/sdk/crt/stdlib/abs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/abs.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/abs.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/abs.c (removed) @@ -1,11 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> - -/* - * @implemented - */ -int -abs(int j) -{ - return j<0 ? -j : j; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/atof.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atof.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/atof.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/atof.c (removed) @@ -1,11 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -double -atof(const char *ascii) -{ - return strtod(ascii, 0); -} Removed: trunk/reactos/lib/sdk/crt/stdlib/atoi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atoi.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/atoi.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/atoi.c (removed) @@ -1,11 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -int -_ttoi(const _TCHAR *str) -{ - return (int)_tcstol(str, 0, 10); -} Removed: trunk/reactos/lib/sdk/crt/stdlib/atoi64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atoi64.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/atoi64.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/atoi64.c (removed) @@ -1,42 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crt/?????? - * PURPOSE: Unknown - * PROGRAMER: Unknown - * UPDATE HISTORY: - * 25/11/05: Added license header - */ - -#include <precomp.h> - -/* - * @implemented - */ -__int64 -_atoi64(const char *nptr) -{ - char *s = (char *)nptr; - __int64 acc = 0; - int neg = 0; - - while(isspace((int)*s)) - s++; - if (*s == '-') - { - neg = 1; - s++; - } - else if (*s == '+') - s++; - - while (isdigit((int)*s)) - { - acc = 10 * acc + ((int)*s - '0'); - s++; - } - - if (neg) - acc *= -1; - return acc; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/atol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atol.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/atol.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/atol.c (removed) @@ -1,12 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> -#include <tchar.h> - -/* - * @implemented - */ -long -_ttol(const _TCHAR *str) -{ - return _tcstol(str, 0, 10); -} Removed: trunk/reactos/lib/sdk/crt/stdlib/bsearch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/bsearch…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/bsearch.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/bsearch.c (removed) @@ -1,28 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> - -/* - * @implemented - */ -void * -bsearch(const void *key, const void *base0, size_t nelem, - size_t size, int (*cmp)(const void *ck, const void *ce)) -{ - char *base = (char *)base0; - int lim, cmpval; - void *p; - - for (lim = nelem; lim != 0; lim >>= 1) - { - p = base + (lim >> 1) * size; - cmpval = (*cmp)(key, p); - if (cmpval == 0) - return p; - if (cmpval > 0) - { /* key > p: move right */ - base = (char *)p + size; - lim--; - } /* else move left */ - } - return 0; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/div.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/div.c?r…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/div.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/div.c (removed) @@ -1,27 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -div_t -div(int num, int denom) -{ - div_t r; - - if (num > 0 && denom < 0) { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/itoa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/itoa.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/itoa.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/itoa.c (removed) @@ -1,135 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itoa.c - * PURPOSE: converts a integer to ascii - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa by Ariadne - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include <precomp.h> - -/* - * @implemented - */ -char* _itoa(int value, char* string, int radix) -{ - char tmp[33]; - char* tp = tmp; - int i; - unsigned v; - int sign; - char* sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+sign+1); - sp = string; - - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -char* _ltoa(long value, char* string, int radix) -{ - char tmp[33]; - char* tp = tmp; - long i; - unsigned long v; - int sign; - char* sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned long)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+sign+1); - sp = string; - - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - * copy it from wine 0.9.0 with small modifcations do check for NULL - */ -char* ultoa(unsigned long value, char* string, int radix) -{ - char buffer[33]; - char *pos; - int digit; - - pos = &buffer[32]; - *pos = '\0'; - - if (string == NULL) - { - return NULL; - } - - do { - digit = value % radix; - value = value / radix; - if (digit < 10) { - *--pos = '0' + digit; - } else { - *--pos = 'a' + digit - 10; - } /* if */ - } while (value != 0L); - - memcpy(string, pos, &buffer[32] - pos + 1); - return string; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/itow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/itow.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/itow.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/itow.c (removed) @@ -1,96 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itow.c - * PURPOSE: converts a integer to wchar_t - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa by Ariadne - * 2000: derived from ./itoa.c by ea - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include <precomp.h> - -/* - * @implemented - * from wine cvs 2006-05-21 - */ -wchar_t* _itow(int value, wchar_t* string, int radix) -{ - return _ltow(value, string, radix); -} - -/* - * @implemented - * from wine cvs 2006-05-21 - */ -wchar_t* _ltow(long value, wchar_t* string, int radix) -{ - unsigned long val; - int negative; - WCHAR buffer[33]; - PWCHAR pos; - WCHAR digit; - - if (value < 0 && radix == 10) { - negative = 1; - val = -value; - } else { - negative = 0; - val = value; - } /* if */ - - pos = &buffer[32]; - *pos = '\0'; - - do { - digit = val % radix; - val = val / radix; - if (digit < 10) { - *--pos = '0' + digit; - } else { - *--pos = 'a' + digit - 10; - } /* if */ - } while (val != 0L); - - if (negative) { - *--pos = '-'; - } /* if */ - - if (str != NULL) { - memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); - } /* if */ - return string; -} - -/* - * @implemented - * from wine cvs 2006-05-21 - */ -wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) -{ - WCHAR buffer[33]; - PWCHAR pos; - WCHAR digit; - - pos = &buffer[32]; - *pos = '\0'; - - do { - digit = value % radix; - value = value / radix; - if (digit < 10) { - *--pos = '0' + digit; - } else { - *--pos = 'a' + digit - 10; - } /* if */ - } while (value != 0L); - - if (string != NULL) { - memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR)); - } /* if */ - return string; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/labs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/labs.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/labs.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/labs.c (removed) @@ -1,11 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -long -labs(long j) -{ - return j<0 ? -j : j; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/ldiv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/ldiv.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/ldiv.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/ldiv.c (removed) @@ -1,28 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -ldiv_t -ldiv(long num, long denom) -{ - ldiv_t r; - - if (num > 0 && denom < 0) - { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/rand.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/rand.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/rand.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/rand.c (removed) @@ -1,27 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -#include <internal/tls.h> - -/* - * @implemented - */ -int -rand(void) -{ - PTHREADDATA ThreadData = GetThreadData(); - - ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 2531011; - return (int)((ThreadData->tnext >> 16) & RAND_MAX); -} - -/* - * @implemented - */ -void -srand(unsigned int seed) -{ - PTHREADDATA ThreadData = GetThreadData(); - - ThreadData->tnext = (ULONGLONG)seed; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/splitp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/splitp.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/splitp.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/splitp.c (removed) @@ -1,68 +1,0 @@ -#include <precomp.h> - -/* - * @implemented - */ -void _tsplitpath(const _TCHAR* path, _TCHAR* drive, _TCHAR* dir, _TCHAR* fname, _TCHAR* ext) -{ - _TCHAR* tmp_drive = NULL; - _TCHAR* tmp_dir = NULL; - _TCHAR* tmp_ext = NULL; - - tmp_drive = (_TCHAR*)_tcschr(path,':'); - if (drive) - { - if (tmp_drive) - { - _tcsncpy(drive,tmp_drive-1,2); - *(drive+2) = 0; - } - else - { - *drive = 0; - } - } - if (!tmp_drive) - { - tmp_drive = (_TCHAR*)path - 1; - } - - tmp_dir = (_TCHAR*)_tcsrchr(path,'\\'); - if (dir) - { - if (tmp_dir) - { - _tcsncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); - *(dir+(tmp_dir-tmp_drive)) = 0; - } - else - { - *dir =0; - } - } - - /* If the dot is before the last dir separator, it's part - * of a directory name, not the start of the extension */ - if (!tmp_ext || tmp_ext < tmp_dir) - { - tmp_ext = (_TCHAR*)path+_tcslen(path); - } - if (ext) - { - _tcscpy(ext,tmp_ext); - } - - if (fname) - { - if (tmp_dir) - { - _tcsncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); - *(fname+(tmp_ext-tmp_dir-1)) = 0; - } - else - { - _tcsncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); - *(fname+(tmp_ext-path))=0; - } - } -} Removed: trunk/reactos/lib/sdk/crt/stdlib/strtod.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtod.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/strtod.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/strtod.c (removed) @@ -1,103 +1,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include <precomp.h> - -/* - * @implemented - */ -double -strtod(const char *s, char **sret) -{ - long double r; /* result */ - int e; /* exponent */ - long double d; /* scale */ - int sign; /* +- 1.0 */ - int esign; - int i; - int flags=0; - - r = 0.0; - sign = 1; - e = 0; - esign = 1; - - if (s == NULL) - return r; - - - while ((*s == ' ') || (*s == '\t')) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - d = 0.1L; - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r += d * (*s - '0'); - s++; - d *= 0.1L; - } - } - - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - if ((*s < '0') || (*s > '9')) - { - if (sret) - *sret = (char *)s; - return r; - } - - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - - if (esign < 0) - for (i = 1; i <= e; i++) - r *= 0.1L; - else - for (i = 1; i <= e; i++) - r *= 10.0; - - if (sret) - *sret = (char *)s; - return r * sign; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/strtol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtol.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/strtol.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/strtol.c (removed) @@ -1,90 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -long -strtol(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else - { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = neg ? LONG_MIN : LONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/strtold.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtold…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/strtold.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/strtold.c (removed) @@ -1,125 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> -#include <msvcrt/ctype.h> - -static double powten[] = -{ - 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, -#ifdef __GNUC__ - 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L -#else - 1e256L, 1e256L, 1e256L, 1e256L -#endif -}; - -long double -_strtold(const char *s, char **sret) -{ - double r; /* result */ - int e, ne; /* exponent */ - int sign; /* +- 1.0 */ - int esign; - int flags=0; - int l2powm1; - - r = 0.0L; - sign = 1; - e = ne = 0; - esign = 1; - - while(*s && isspace(*s)) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0L; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r *= 10.0L; - r += *s - '0'; - s++; - ne++; - } - } - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0.0L; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - if (esign < 0) - { - esign = -esign; - e = -e; - } - e = e - ne; - if (e < -4096) - { - /* possibly subnormal number, 10^e would overflow */ - r *= 1.0e-2048L; - e += 2048; - } - if (e < 0) - { - e = -e; - esign = -esign; - } - if (e >= 8192) - e = 8191; - if (e) - { - double d = 1.0L; - l2powm1 = 0; - while (e) - { - if (e & 1) - d *= powten[l2powm1]; - e >>= 1; - l2powm1++; - } - if (esign > 0) - r *= d; - else - r /= d; - } - if (sret) - *sret = (char *)s; - return r * sign; - - return 0; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/strtoul.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtoul…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/strtoul.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/strtoul.c (removed) @@ -1,74 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> -#include <ctype.h> - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - * - * @implemented - */ -unsigned long -strtoul(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/strtoull.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtoul…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/strtoull.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/strtoull.c (removed) @@ -1,76 +1,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -#if defined (_MSC_VER) -#define UINT64_MAX 0xffffffffffffffff -#endif - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -UINT64 -strtoull(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - UINT64 acc; - int c; - UINT64 cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = UINT64_MAX / base; - cutlim = (int)(UINT64_MAX % base); - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = UINT64_MAX; - __set_errno ( ERANGE ); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstod.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstod.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstod.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstod.c (removed) @@ -1,98 +1,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <stdlib.h> - - -/* - * @implemented - */ -double wcstod(const wchar_t *s, wchar_t **sret) -{ - long double r; /* result */ - int e; /* exponent */ - long double d; /* scale */ - int sign; /* +- 1.0 */ - int esign; - int i; - int flags=0; - - r = 0.0; - sign = 1; - e = 0; - esign = 1; - - while ((*s == L' ') || (*s == L'\t')) - s++; - - if (*s == L'+') - s++; - else if (*s == L'-') - { - sign = -1; - s++; - } - - while ((*s >= L'0') && (*s <= L'9')) - { - flags |= 1; - r *= 10.0; - r += *s - L'0'; - s++; - } - - if (*s == L'.') - { - d = 0.1L; - s++; - while ((*s >= L'0') && (*s <= L'9')) - { - flags |= 2; - r += d * (*s - L'0'); - s++; - d *= 0.1L; - } - } - - if (flags == 0) - { - if (sret) - *sret = (wchar_t *)s; - return 0; - } - - if ((*s == L'e') || (*s == L'E')) - { - s++; - if (*s == L'+') - s++; - else if (*s == L'-') - { - s++; - esign = -1; - } - if ((*s < L'0') || (*s > L'9')) - { - if (sret) - *sret = (wchar_t *)s; - return r; - } - - while ((*s >= L'0') && (*s <= L'9')) - { - e *= 10; - e += *s - L'0'; - s++; - } - } - - if (esign < 0) - for (i = 1; i <= e; i++) - r *= 0.1L; - else - for (i = 1; i <= e; i++) - r *= 10.0; - - if (sret) - *sret = (wchar_t *)s; - return r * sign; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstol.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstol.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstol.c (removed) @@ -1,45 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crt/?????? - * PURPOSE: Unknown - * PROGRAMER: Unknown - * UPDATE HISTORY: - * 25/11/05: Added license header - */ - -#include <precomp.h> - -/* - * @implemented - */ -long wcstol(const wchar_t *cp,wchar_t **endp,int base) -{ - long result = 0,value; - int sign = 1; - - if ( *cp == L'-' ) { - sign = -1; - cp++; - } - - if (!base) { - base = 10; - if (*cp == L'0') { - base = 8; - cp++; - if ((*cp == L'x') && iswxdigit(cp[1])) { - cp++; - base = 16; - } - } - } - while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) - ? towupper(*cp) : *cp)-L'A'+10) < base) { - result = result*base + value; - cp++; - } - if (endp) - *endp = (wchar_t *)cp; - return result * sign; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstom.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstom.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstom.c (removed) @@ -1,20 +1,0 @@ -#include <stdlib.h> - -/* - * @unimplemented - */ -size_t wcstombs (char* mbsDest, const wchar_t* wsConvert, size_t size) -{ - return 0; -} - -/* - * @unimplemented - */ -int wctomb (char* mbDest, wchar_t wc) -{ - return 0; -} - - - Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstomb…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c (removed) @@ -1,114 +1,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <precomp.h> -#include <wchar.h> - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - -static const wchar_t encoding_mask[] = -{ - (wchar_t)~0x7ff, (wchar_t)~0xffff, (wchar_t)~0x1fffff, (wchar_t)~0x3ffffff -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* The state is for this UTF8 encoding not used. */ -//static mbstate_t internal; - - -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t -__wcrtomb (char *s, wchar_t wc); - -/* - * Convert WCHAR into its multibyte character representation, - * putting this in S and returning its length. - * - * Attention: this function should NEVER be intentionally used. - * The interface is completely stupid. The state is shared between - * all conversion functions. You should use instead the restartable - * version `wcrtomb'. - * - * @implemented - */ -int -wctomb (char *s, wchar_t wchar) -{ - /* If S is NULL the function has to return null or not null - depending on the encoding having a state depending encoding or - not. This is nonsense because any multibyte encoding has a - state. The ISO C amendment 1 corrects this while introducing the - restartable functions. We simply say here all encodings have a - state. */ - if (s == NULL) - return 1; - - return __wcrtomb (s, wchar); -} - - -size_t -__wcrtomb (char *s, wchar_t wc) -{ - char fake[1]; - size_t written = 0; - - - - if (s == NULL) - { - s = fake; - wc = L'\0'; - } - - if (wc < 0x80) - { - /* It's a one byte sequence. */ - if (s != NULL) - *s = (char) wc; - return 1; - } - - for (written = 2; written < 6; ++written) - if ((wc & encoding_mask[written - 2]) == 0) - break; - - if (s != NULL) - { - size_t cnt = written; - s[0] = encoding_byte[cnt - 2]; - - --cnt; - do - { - s[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } - while (--cnt > 0); - s[0] |= wc; - } - - return written; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstomb…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c (removed) @@ -1,157 +1,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <precomp.h> -#include <wchar.h> - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - - -static const wchar_t encoding_mask[] = -{ - (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX) -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* We don't need the state really because we don't have shift states - to maintain between calls to this function. */ - -static mbstate_t mbstate_internal; - - -mbstate_t __no_r_state; /* Now defined in wcstombs.c. */ -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t -__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps); - -/* - * Convert the `wchar_t' string in PWCS to a multibyte character string - * in S, writing no more than N characters. Return the number of bytes - * written, or (size_t) -1 if an invalid `wchar_t' was found. - * - * Attention: this function should NEVER be intentionally used. - * The interface is completely stupid. The state is shared between - * all conversion functions. You should use instead the restartable - * version `wcsrtombs'. - * - * @implemented - */ -size_t -wcstombs (char *s, const wchar_t *pwcs, size_t n) -{ - mbstate_t save_shift = __no_r_state; - size_t written; - - written = __wcsrtombs (s, &pwcs, n, &__no_r_state); - - /* Restore the old shift state. */ - __no_r_state = save_shift; - - /* Return how many we wrote (or maybe an error). */ - return written; -} - -size_t -__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps) -{ - size_t written = 0; - const wchar_t *run = *src; - - if (ps == NULL) - ps = &mbstate_internal; - - if (dst == NULL) - /* The LEN parameter has to be ignored if we don't actually write - anything. */ - len = ~0; - - while (written < len) - { - wchar_t wc = *run++; - -#if 0 - if (wc < 0 || wc > WCHAR_MAX) - { - /* This is no correct ISO 10646 character. */ - __set_errno (EILSEQ); - return (size_t) -1; - } -#endif - - if (wc == L'\0') - { - /* Found the end. */ - if (dst != NULL) - *dst = '\0'; - *src = NULL; - return written; - } - else if (wc < 0x80) - { - /* It's an one byte sequence. */ - if (dst != NULL) - *dst++ = (char) wc; - ++written; - } - else - { - size_t step; - - for (step = 2; step < 6; ++step) - if ((wc & encoding_mask[step - 2]) == 0) - break; - - if (written + step >= len) - /* Too long. */ - break; - - if (dst != NULL) - { - size_t cnt = step; - - dst[0] = encoding_byte[cnt - 2]; - - --cnt; - do - { - dst[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } - while (--cnt > 0); - dst[0] |= wc; - - dst += step; - } - - written += step; - } - } - - /* Store position of first unprocessed word. */ - *src = run; - - return written; -} -//weak_alias (__wcsrtombs, wcsrtombs) Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstoul…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c (removed) @@ -1,100 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * Convert a unicode string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - * - * @implemented - */ -unsigned long -wcstoul(const wchar_t *nptr, wchar_t **endptr, int base) -{ - const wchar_t *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') - { - neg = 1; - c = *s++; - } - else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (wchar_t *)s - 1 : (wchar_t *)nptr; - return acc; -} - -#if 0 -unsigned long wcstoul(const wchar_t *cp,wchar_t **endp,int base) -{ - unsigned long result = 0,value; - - if (!base) { - base = 10; - if (*cp == L'0') { - base = 8; - cp++; - if ((*cp == L'x') && iswxdigit(cp[1])) { - cp++; - base = 16; - } - } - } - while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) - ? towupper(*cp) : *cp)-L'A'+10) < base) { - result = result*base + value; - cp++; - } - if (endp) - *endp = (wchar_t *)cp; - return result; -} -#endif Removed: trunk/reactos/lib/sdk/crt/stdlib/wctomb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wctomb.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wctomb.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wctomb.c (removed) @@ -1,145 +1,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <precomp.h> - -int -STDCALL -WideCharToMultiByte( - UINT CodePage, - DWORD dwFlags, - LPCWSTR lpWideCharStr, - int cchWideChar, - LPSTR lpMultiByteStr, - int cchMultiByte, - LPCSTR lpDefaultChar, - LPBOOL lpUsedDefaultChar); - - -/* - * @unimplemented - */ -int wctomb(char* dst, wchar_t ch) -{ -#if 0 - return WideCharToMultiByte(CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL); -#else - if (dst == NULL) { - return 1; - } else if (0 != (ch & 0xff00)) { - return -1; - } - *dst = ch; - return 1; -#endif -} - - -#if 0 - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - -static const wchar_t encoding_mask[] = -{ - /* This reflects the sources *nix origin where type wchar_t - was 32 bits wide. Since our type wchar_t is only 16 bits - wide all this module will need to be reviewed. - Simplest option may well be to forward this modules work - on to the kernel which already has support for this. - */ - ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff - //~0x0000-07ff, ~0x0000-ffff, ~0x001f-ffff, ~0x03ff-ffff -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* The state is for this UTF8 encoding not used. */ -//static mbstate_t internal; -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t __wcrtomb(char *s, wchar_t wc); - -/* Convert WCHAR into its multibyte character representation, - putting this in S and returning its length. - - Attention: this function should NEVER be intentionally used. - The interface is completely stupid. The state is shared between - all conversion functions. You should use instead the restartable - version `wcrtomb'. */ - -int wctomb(char *s, wchar_t wchar) -{ - /* If S is NULL the function has to return null or not null - depending on the encoding having a state depending encoding or - not. This is nonsense because any multibyte encoding has a - state. The ISO C amendment 1 corrects this while introducing the - restartable functions. We simply say here all encodings have a - state. */ - if (s == NULL) { - return 1; - } - return __wcrtomb(s, wchar); -} - -size_t __wcrtomb(char *s, wchar_t wc) -{ - char fake[1]; - size_t written = 0; - - if (s == NULL) { - s = fake; - wc = L'\0'; - } - /* Store the UTF8 representation of WC. */ - //if (wc < 0 || wc > 0x7fffffff) { - if (wc < 0 || wc > 0x7fff) { - /* This is no correct ISO 10646 character. */ - __set_errno (EILSEQ); - return (size_t) -1; - } - if (wc < 0x80) { - /* It's a one byte sequence. */ - if (s != NULL) { - *s = (char)wc; - } - return 1; - } - for (written = 2; written < 6; ++written) { - if ((wc & encoding_mask[written - 2]) == 0) { - break; - } - } - if (s != NULL) { - size_t cnt = written; - s[0] = encoding_byte[cnt - 2]; - --cnt; - do { - s[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } while (--cnt > 0); - s[0] |= wc; - } - return written; -} - -#endif Removed: trunk/reactos/lib/sdk/crt/stdlib/witoa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/witoa.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/witoa.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/witoa.c (removed) @@ -1,81 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itoa.c - * PURPOSE: converts a integer to ascii - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa by Ariadne - * 2006 : replace all api in this file to wine cvs 2006-05-21 - */ -/* */ -#include <precomp.h> - -/* - * @implemented - * copy _i64toa from wine cvs 2006 month 05 day 21 - */ -char* _i64toa(__int64 value, char* string, int radix) -{ - ULONGLONG val; - int negative; - char buffer[65]; - char *pos; - int digit; - - if (value < 0 && radix == 10) { - negative = 1; - val = -value; - } else { - negative = 0; - val = value; - } /* if */ - - pos = &buffer[64]; - *pos = '\0'; - - do { - digit = val % radix; - val = val / radix; - if (digit < 10) { - *--pos = '0' + digit; - } else { - *--pos = 'a' + digit - 10; - } /* if */ - } while (val != 0L); - - if (negative) { - *--pos = '-'; - } /* if */ - - memcpy(string, pos, &buffer[64] - pos + 1); - return string; -} - - -/* - * @implemented - */ -char* _ui64toa(unsigned __int64 value, char* string, int radix) -{ - char buffer[65]; - char *pos; - int digit; - - pos = &buffer[64]; - *pos = '\0'; - - do { - digit = value % radix; - value = value / radix; - if (digit < 10) { - *--pos = '0' + digit; - } else { - *--pos = 'a' + digit - 10; - } /* if */ - } while (value != 0L); - - memcpy(string, pos, &buffer[64] - pos + 1); - return string; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/witow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/witow.c…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/witow.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/witow.c (removed) @@ -1,93 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itow.c - * PURPOSE: converts a integer to wchar_t - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa by Ariadne - * 2000: derived from ./itoa.c by ea - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include <precomp.h> - -/* - * @implemented - */ -wchar_t* _i64tow(__int64 value, wchar_t* string, int radix) -{ - wchar_t tmp[65]; - wchar_t* tp = tmp; - int i; - unsigned v; - int sign; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } - - if (string == 0) - string = (wchar_t*)malloc(((tp-tmp)+sign+1)*sizeof(wchar_t)); - sp = string; - - if (sign) - *sp++ = L'-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -wchar_t* _ui64tow(unsigned __int64 value, wchar_t* string, int radix) -{ - wchar_t tmp[65]; - wchar_t* tp = tmp; - long i; - unsigned long v = value; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } - - if (string == 0) - string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wsplitp…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c (removed) @@ -1,7 +1,0 @@ - -#define _UNICODE -#define UNICODE - -#include <tchar.h> - -#include "splitp.c" Removed: trunk/reactos/lib/sdk/crt/stdlib/wtoi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtoi.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wtoi.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wtoi.c (removed) @@ -1,6 +1,0 @@ - -#define _UNICODE -#define UNICODE - -#include "atoi.c" - Removed: trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtoi64.…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c (removed) @@ -1,39 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crt/?????? - * PURPOSE: Unknown - * PROGRAMER: Unknown - * UPDATE HISTORY: - * 25/11/05: Added license header - */ - -#include <precomp.h> - -/* - * @implemented - */ -__int64 _wtoi64(const wchar_t* nptr) -{ - wchar_t* s = (wchar_t*)nptr; - __int64 acc = 0; - int neg = 0; - - while (iswspace((int)*s)) - s++; - if (*s == '-') { - neg = 1; - s++; - } - else if (*s == '+') - s++; - - while (iswdigit((int)*s)) { - acc = 10 * acc + ((int)*s - '0'); - s++; - } - - if (neg) - acc *= -1; - return acc; -} Removed: trunk/reactos/lib/sdk/crt/stdlib/wtol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtol.c?…
============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/wtol.c (original) +++ trunk/reactos/lib/sdk/crt/stdlib/wtol.c (removed) @@ -1,6 +1,0 @@ - -#define _UNICODE -#define UNICODE - -#include "atol.c" - Removed: trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/me…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s (original) +++ trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s (removed) @@ -1,31 +1,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: lib/string/i386/memchr.s - */ - -/* - * void* memchr(const void* s, int c, size_t n) - */ - -.globl _memchr - -_memchr: - push %ebp - mov %esp,%ebp - push %edi - mov 0x8(%ebp),%edi - mov 0xc(%ebp),%eax - mov 0x10(%ebp),%ecx - cld - repne scasb - je .L1 - mov $1,%edi -.L1: - mov %edi,%eax - dec %eax - pop %edi - leave - ret - Removed: trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/me…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s (original) +++ trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s (removed) @@ -1,48 +1,0 @@ -/* - * void *memcpy (void *to, const void *from, size_t count) - * - * Some optimization research can be found in media/doc/memcpy_optimize.txt - */ - -.globl _memcpy - -_memcpy: - push %ebp - mov %esp,%ebp - push %esi - push %edi - mov 0x8(%ebp),%edi - mov 0xc(%ebp),%esi - mov 0x10(%ebp),%ecx - cld - cmp $16,%ecx - jb .L1 - mov %ecx,%edx - test $3,%edi - je .L2 -/* - * Make the destination dword aligned - */ - mov %edi,%ecx - and $3,%ecx - sub $5,%ecx - not %ecx - sub %ecx,%edx - rep movsb - mov %edx,%ecx -.L2: - shr $2,%ecx - rep movsl - mov %edx,%ecx - and $3,%ecx -.L1: - test %ecx,%ecx - je .L3 - rep movsb -.L3: - pop %edi - pop %esi - mov 0x8(%ebp),%eax - leave - ret - Removed: trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/me…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s (original) +++ trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s (removed) @@ -1,116 +1,0 @@ -/* - * $Id$ - */ - -/* - * void *memmove (void *to, const void *from, size_t count) - */ - -.globl _memmove - -_memmove: - push %ebp - mov %esp,%ebp - - push %esi - push %edi - - mov 8(%ebp),%edi - mov 12(%ebp),%esi - mov 16(%ebp),%ecx - - cmp %esi,%edi - jbe .CopyUp - mov %ecx,%eax - add %esi,%eax - cmp %eax,%edi - jb .CopyDown - -.CopyUp: - cld - - cmp $16,%ecx - jb .L1 - mov %ecx,%edx - test $3,%edi - je .L2 -/* - * Make the destination dword aligned - */ - mov %edi,%ecx - and $3,%ecx - sub $5,%ecx - not %ecx - sub %ecx,%edx - rep movsb - mov %edx,%ecx -.L2: - shr $2,%ecx - rep movsl - mov %edx,%ecx - and $3,%ecx -.L1: - test %ecx,%ecx - je .L3 - rep movsb -.L3: - mov 8(%ebp),%eax - pop %edi - pop %esi - leave - ret - -.CopyDown: - std - - add %ecx,%edi - add %ecx,%esi - - cmp $16,%ecx - jb .L4 - mov %ecx,%edx - test $3,%edi - je .L5 - -/* - * Make the destination dword aligned - */ - mov %edi,%ecx - and $3,%ecx - sub %ecx,%edx - dec %esi - dec %edi - rep movsb - mov %edx,%ecx - - sub $3,%esi - sub $3,%edi -.L6: - shr $2,%ecx - rep movsl - mov %edx,%ecx - and $3,%ecx - je .L7 - add $3,%esi - add $3,%edi -.L8: - rep movsb -.L7: - cld - mov 8(%ebp),%eax - pop %edi - pop %esi - leave - ret -.L5: - sub $4,%edi - sub $4,%esi - jmp .L6 - -.L4: - test %ecx,%ecx - je .L7 - dec %esi - dec %edi - jmp .L8 - Removed: trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/me…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s (original) +++ trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s (removed) @@ -1,47 +1,0 @@ -/* - * $Id$ - */ - -/* - * void *memset (void *src, int val, size_t count) - */ - -.globl _memset - -_memset: - push %ebp - mov %esp,%ebp - push %edi - mov 0x8(%ebp),%edi - movzb 0xc(%ebp),%eax - mov 0x10(%ebp),%ecx - cld - cmp $16,%ecx - jb .L1 - mov $0x01010101,%edx - mul %edx - mov %ecx,%edx - test $3,%edi - je .L2 - mov %edi,%ecx - and $3,%ecx - sub $5,%ecx - not %ecx - sub %ecx,%edx - rep stosb - mov %edx,%ecx -.L2: - shr $2,%ecx - rep stosl - mov %edx,%ecx - and $3,%ecx -.L1: - test %ecx,%ecx - je .L3 - rep stosb -.L3: - pop %edi - mov 0x8(%ebp),%eax - leave - ret - Removed: trunk/reactos/lib/sdk/crt/string/memchr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memchr.…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memchr.c (original) +++ trunk/reactos/lib/sdk/crt/string/memchr.c (removed) @@ -1,18 +1,0 @@ -/* - * $Id$ - */ - -#include <string.h> - -void* memchr(const void *s, int c, size_t n) -{ - if (n) - { - const char *p = s; - do { - if (*p++ == c) - return (void *)(p-1); - } while (--n != 0); - } - return 0; -} Removed: trunk/reactos/lib/sdk/crt/string/memcmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memcmp.…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memcmp.c (original) +++ trunk/reactos/lib/sdk/crt/string/memcmp.c (removed) @@ -1,17 +1,0 @@ -/* - * $Id$ - */ - -#include <string.h> - -int memcmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) { - const unsigned char *p1 = s1, *p2 = s2; - do { - if (*p1++ != *p2++) - return (*--p1 - *--p2); - } while (--n != 0); - } - return 0; -} Removed: trunk/reactos/lib/sdk/crt/string/memcpy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memcpy.…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memcpy.c (original) +++ trunk/reactos/lib/sdk/crt/string/memcpy.c (removed) @@ -1,16 +1,0 @@ -/* - * $Id$ - */ - -#include <string.h> - -void* memcpy(void* to, const void* from, size_t count) -{ - register char *f = (char *)from; - register char *t = (char *)to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; - return to; -} Removed: trunk/reactos/lib/sdk/crt/string/memicmp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memicmp…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memicmp.c (original) +++ trunk/reactos/lib/sdk/crt/string/memicmp.c (removed) @@ -1,22 +1,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <precomp.h> - -/* - * @implemented - */ -int -_memicmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) - { - const unsigned char *p1 = s1, *p2 = s2; - - do { - if (toupper(*p1) != toupper(*p2)) - return (*p1 - *p2); - p1++; - p2++; - } while (--n != 0); - } - return 0; -} Removed: trunk/reactos/lib/sdk/crt/string/memmove.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memmove…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memmove.c (original) +++ trunk/reactos/lib/sdk/crt/string/memmove.c (removed) @@ -1,40 +1,0 @@ -/* - * $Id$ - */ - -#include <string.h> - - -void * memmove(void *dest,const void *src,size_t count) -{ - char *char_dest = (char *)dest; - char *char_src = (char *)src; - - if ((char_dest <= char_src) || (char_dest >= (char_src+count))) - { - /* non-overlapping buffers */ - while(count > 0) - { - *char_dest = *char_src; - char_dest++; - char_src++; - count--; - } - } - else - { - /* overlaping buffers */ - char_dest = (char *)dest + count - 1; - char_src = (char *)src + count - 1; - - while(count > 0) - { - *char_dest = *char_src; - char_dest--; - char_src--; - count--; - } - } - - return dest; -} Removed: trunk/reactos/lib/sdk/crt/string/memset.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memset.…
============================================================================== --- trunk/reactos/lib/sdk/crt/string/memset.c (original) +++ trunk/reactos/lib/sdk/crt/string/memset.c (removed) @@ -1,17 +1,0 @@ -/* - * $Id$ - */ - -#include <string.h> - -void* memset(void* src, int val, size_t count) -{ - char *char_src = (char *)src; - - while(count>0) { - *char_src = val; - char_src++; - count--; - } - return src; -}
17 years, 1 month
1
0
0
0
[dreimer] 30265: Fix the dead shortcut in Start menu when Config is not installed.
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 8 13:37:40 2007 New Revision: 30265 URL:
http://svn.reactos.org/svn/reactos?rev=30265&view=rev
Log: Fix the dead shortcut in Start menu when Config is not installed. Modified: trunk/tools/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
============================================================================== --- trunk/tools/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE-Windows/RosBE.nsi Thu Nov 8 13:37:40 2007 @@ -170,6 +170,13 @@ SetOutPath "$INSTDIR\Tools" SetOverwrite try File /r Root\Tools\options.exe + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + SetOutPath $REACTOS_SOURCE_DIRECTORY + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Options.lnk" \ + "$INSTDIR\Tools\options.exe" + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd Section /o "Shortcut Tool" SEC06 @@ -206,8 +213,6 @@ "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Readme.lnk" \ "$INSTDIR\readme.pdf" - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Options.lnk" \ - "$INSTDIR\Tools\options.exe" !insertmacro MUI_STARTMENU_WRITE_END SectionEnd
17 years, 1 month
1
0
0
0
[dreimer] 30264: Fix Icon and Uninstall Procedure. This should be the Final Commit for the Installer.
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 8 13:14:57 2007 New Revision: 30264 URL:
http://svn.reactos.org/svn/reactos?rev=30264&view=rev
Log: Fix Icon and Uninstall Procedure. This should be the Final Commit for the Installer. Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt trunk/tools/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE-Windows/Root/ChangeLog.txt URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/ChangeLog…
============================================================================== --- trunk/tools/RosBE-Windows/Root/ChangeLog.txt (original) +++ trunk/tools/RosBE-Windows/Root/ChangeLog.txt Thu Nov 8 13:14:57 2007 @@ -2,7 +2,7 @@ - Updated: GCC 4.1.3 Build 20071015 with recent patches to get makex run under Vista. (Peter Ward, TODO: name of tamlin) - Updated: Binutils 2.18.50 Build 20071015. (Peter Ward) -- Updated: NASM to 0.99.05 (Daniel Reimer) +- Updated: NASM to 0.99.06 (Daniel Reimer) - Updated RosBE Configuration Tool. (Pierre Schweitzer, Peter Ward, Daniel Reimer) - Added French translation. (Pierre Schweitzer) Modified: trunk/tools/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
============================================================================== --- trunk/tools/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE-Windows/RosBE.nsi Thu Nov 8 13:14:57 2007 @@ -200,7 +200,7 @@ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" SetOutPath $REACTOS_SOURCE_DIRECTORY - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\reactos.ico" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\terminal.ico" SetOutPath $INSTDIR CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall RosBE.lnk" \ "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" @@ -218,7 +218,7 @@ ;; Add our desktop shortcuts. ;; SetOutPath $REACTOS_SOURCE_DIRECTORY - CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\reactos.ico" + CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\terminal.ico" SectionEnd Section /o "Quick Launch Shortcuts" SEC10 @@ -228,7 +228,7 @@ ;; Add our quick launch shortcuts. ;; SetOutPath $REACTOS_SOURCE_DIRECTORY - CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\reactos.ico" + CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\terminal.ico" SectionEnd Section -Post SEC11 @@ -278,6 +278,7 @@ Delete /REBOOTOK "$INSTDIR\TimeDate.cmd" Delete /REBOOTOK "$INSTDIR\readme.pdf" Delete /REBOOTOK "$INSTDIR\reactos.ico" + Delete /REBOOTOK "$INSTDIR\terminal.ico" Delete /REBOOTOK "$INSTDIR\RosBE.mac" Delete /REBOOTOK "$INSTDIR\ChangeLog.txt" Delete /REBOOTOK "$INSTDIR\LICENSE.txt"
17 years, 1 month
1
0
0
0
[dreimer] 30263: Commit 2 of infinity. Getting closer to my final.
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 8 12:31:46 2007 New Revision: 30263 URL:
http://svn.reactos.org/svn/reactos?rev=30263&view=rev
Log: Commit 2 of infinity. Getting closer to my final. Modified: trunk/tools/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
============================================================================== --- trunk/tools/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE-Windows/RosBE.nsi Thu Nov 8 12:31:46 2007 @@ -98,13 +98,7 @@ ;; MUI end. -Section "MinGW, GCC v4.1.3 and NASM 0.99.05" SEC01 - SetOutPath "$INSTDIR\4.1.3\" - SetOverwrite try - File /r Components\4.1.3\*.* -SectionEnd - -Section "Base Files" SEC02 +Section -BaseFiles SEC02 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try @@ -130,11 +124,19 @@ File /r Root\Tools\tee.exe SectionEnd +Section -MinGWGCCNASM SEC01 + SetOutPath "$INSTDIR\4.1.3\" + SetOverwrite try + File /r Components\4.1.3\*.* +SectionEnd + Section /o "SVN Tools" SEC03 SetShellVarContext current - SetOutPath "$INSTDIR\Tools" - SetOverwrite try - File /r Root\Tools\sSVN.cmd + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\sSVN.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try File /r Root\Tools\svn.exe File /r Root\Tools\intl3_svn.dll File /r Root\Tools\libapr.dll @@ -148,7 +150,7 @@ File /r Root\Tools\licenses\*.* SectionEnd -Section /o "reladdr2line" SEC04 +Section /o "relAddr2Line Tool" SEC04 SetShellVarContext current SetOutPath "$INSTDIR" SetOverwrite try
17 years, 1 month
1
0
0
0
[dreimer] 30262: Commit 1 of 314293: Get the Installer ready for Version 1.0. First steps to let select the components to install. Add the new Icon for the CMD Window
by dreimer@svn.reactos.org
Author: dreimer Date: Thu Nov 8 12:08:56 2007 New Revision: 30262 URL:
http://svn.reactos.org/svn/reactos?rev=30262&view=rev
Log: Commit 1 of 314293: Get the Installer ready for Version 1.0. First steps to let select the components to install. Add the new Icon for the CMD Window Added: trunk/tools/RosBE-Windows/Icons/terminal.ico (with props) Modified: trunk/tools/RosBE-Windows/RosBE.nsi Added: trunk/tools/RosBE-Windows/Icons/terminal.ico URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Icons/terminal…
============================================================================== Binary file - no diff available. Propchange: trunk/tools/RosBE-Windows/Icons/terminal.ico ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: trunk/tools/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/RosBE.nsi?rev=…
============================================================================== --- trunk/tools/RosBE-Windows/RosBE.nsi (original) +++ trunk/tools/RosBE-Windows/RosBE.nsi Thu Nov 8 12:08:56 2007 @@ -56,6 +56,7 @@ !define MUI_WELCOMEPAGE_TITLE_3LINES !insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "Root\License.txt" !insertmacro MUI_PAGE_DIRECTORY ;; @@ -97,26 +98,98 @@ ;; MUI end. -Section "-MinGW, GCC v4.1.3 and NASM 0.99.05" SEC01 +Section "MinGW, GCC v4.1.3 and NASM 0.99.05" SEC01 SetOutPath "$INSTDIR\4.1.3\" SetOverwrite try File /r Components\4.1.3\*.* SectionEnd -Section "-Other miscellaneous files." SEC02 - SetOutPath "$INSTDIR" - SetOverwrite try - File /r Root\*.* +Section "Base Files" SEC02 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try File /r Icons\*.* -SectionEnd - -Section "-Files in Application Data." SEC03 - SetOutPath "$APPDATA\RosBE\" - SetOverwrite try - File /r Appdata\*.* -SectionEnd - -Section -StartMenuShortcuts SEC04 + File /r Root\readme.pdf + File /r Root\RosBE.mac + File /r Root\changelog.txt + File /r Root\LICENSE.txt + File /r Root\README.txt + File /r Root\Build.cmd + File /r Root\Clean.cmd + File /r Root\Help.cmd + File /r Root\RosBE.cmd + File /r Root\rosbe-gcc-env.cmd + File /r Root\TimeDate.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\buildtime.exe + File /r Root\Tools\chknewer.exe + File /r Root\Tools\cpucount.exe + File /r Root\Tools\flash.exe + File /r Root\Tools\getdate.exe + File /r Root\Tools\tee.exe +SectionEnd + +Section /o "SVN Tools" SEC03 + SetShellVarContext current + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\sSVN.cmd + File /r Root\Tools\svn.exe + File /r Root\Tools\intl3_svn.dll + File /r Root\Tools\libapr.dll + File /r Root\Tools\libeay32.dll + File /r Root\Tools\ssleay32.dll + File /r Root\Tools\libaprutil.dll + File /r Root\Tools\libapriconv.dll + File /r Root\Tools\libdb44.dll + SetOutPath "$INSTDIR\Tools\licenses" + SetOverwrite try + File /r Root\Tools\licenses\*.* +SectionEnd + +Section /o "reladdr2line" SEC04 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\reladdr2line.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\echoh.exe + File /r Root\Tools\raddr2line.exe + File /r Root\Tools\chkslash.exe +SectionEnd + +Section /o "RosBE Configurator" SEC05 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\options.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\options.exe +SectionEnd + +Section /o "Shortcut Tool" SEC06 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\scut.cmd + SetOutPath "$INSTDIR\Tools" + SetOverwrite try + File /r Root\Tools\scut.exe +SectionEnd + +Section /o "Other Tools" SEC07 + SetShellVarContext current + SetOutPath "$INSTDIR" + SetOverwrite try + File /r Root\chdefdir.cmd + File /r Root\chdefgcc.cmd + File /r Root\Config.cmd +SectionEnd + +Section -StartMenuShortcuts SEC08 SetShellVarContext current ;; @@ -136,7 +209,7 @@ !insertmacro MUI_STARTMENU_WRITE_END SectionEnd -Section /o "Desktop Shortcuts" SEC05 +Section /o "Desktop Shortcuts" SEC09 SetShellVarContext current ;; @@ -146,7 +219,7 @@ CreateShortCut "$DESKTOP\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\reactos.ico" SectionEnd -Section /o "Quick Launch Shortcuts" SEC06 +Section /o "Quick Launch Shortcuts" SEC10 SetShellVarContext current ;; @@ -156,7 +229,7 @@ CreateShortCut "$QUICKLAUNCH\ReactOS Build Environment.lnk" "$SYSDIR\cmd.exe" '/k "$INSTDIR\RosBE.cmd"' "$INSTDIR\reactos.ico" SectionEnd -Section -Post SEC07 +Section -Post SEC11 WriteUninstaller "$INSTDIR\Uninstall-${PRODUCT_VERSION}.exe" WriteRegStr HKCU "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\RosBE.cmd" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
17 years, 1 month
1
0
0
0
[jimtabor] 30261: Temp fix for the Window Handle issue.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Nov 8 11:04:58 2007 New Revision: 30261 URL:
http://svn.reactos.org/svn/reactos?rev=30261&view=rev
Log: Temp fix for the Window Handle issue. Modified: trunk/reactos/subsystems/win32/win32k/ntuser/object.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/object.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/object.c Thu Nov 8 11:04:58 2007 @@ -292,6 +292,9 @@ hdr->RefCount--; + // You can not have a zero here! + if (!hdr->destroyed && hdr->RefCount == 0) hdr->RefCount++; // BOUNCE!!!!! + if (hdr->RefCount == 0 && hdr->destroyed) { // DPRINT1("info: something destroyed bcaise of deref, in use=%i\n",usedHandles);
17 years, 1 month
1
0
0
0
[jimtabor] 30260: NtGdiGetChar/ABCWidth/sW now fully functional and tested good with AbiWord. Text looks very nice.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Nov 8 09:17:17 2007 New Revision: 30260 URL:
http://svn.reactos.org/svn/reactos?rev=30260&view=rev
Log: NtGdiGetChar/ABCWidth/sW now fully functional and tested good with AbiWord. Text looks very nice. Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c Thu Nov 8 09:17:17 2007 @@ -2143,7 +2143,8 @@ IN FLONG fl, OUT PVOID Buffer) { - LPABC SafeBuffer; + LPABC SafeBuff; + LPABCFLOAT SafeBuffF = NULL; PDC dc; PTEXTOBJ TextObj; PFONTGDI FontGDI; @@ -2151,24 +2152,32 @@ FT_CharMap charmap, found = NULL; UINT i, glyph_index, BufferSize; HFONT hFont = 0; - NTSTATUS Status; - LPABC abc = NULL; - LPABCFLOAT abcf = NULL; - - if (!fl) - { - abcf = (LPABCFLOAT) Buffer; - // Not supported yet! + NTSTATUS Status = STATUS_SUCCESS; + + if(pwch) + { + _SEH_TRY + { + ProbeForRead(pwch, + sizeof(PWSTR), + 1); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + if (!NT_SUCCESS(Status)) + { + SetLastWin32Error(Status); return FALSE; } - else - abc = (LPABC) Buffer; - - if (fl & GCABCW_INDICES) return FALSE; // Not supported yet! - BufferSize = Count * sizeof(ABC); - SafeBuffer = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT); - if (SafeBuffer == NULL) + BufferSize = Count * sizeof(ABC); // Same size! + SafeBuff = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT); + if (!fl) SafeBuffF = (LPABCFLOAT) SafeBuff; + if (SafeBuff == NULL) { SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); return FALSE; @@ -2177,7 +2186,7 @@ dc = DC_LockDc(hDC); if (dc == NULL) { - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2187,7 +2196,7 @@ if (TextObj == NULL) { - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2210,7 +2219,7 @@ if (!found) { DPRINT1("WARNING: Could not find desired charmap!\n"); - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2231,7 +2240,20 @@ { int adv, lsb, bbx, left, right; - glyph_index = FT_Get_Char_Index(face, i); + if (pwch) + { + if (fl & GCABCW_INDICES) + glyph_index = pwch[i - FirstChar]; + else + glyph_index = FT_Get_Char_Index(face, pwch[i - FirstChar]); + } + else + { + if (fl & GCABCW_INDICES) + glyph_index = i; + else + glyph_index = FT_Get_Char_Index(face, i); + } FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); left = (INT)face->glyph->metrics.horiBearingX & -64; @@ -2246,20 +2268,29 @@ /* DPRINT1("lsb %d and bbx %d\n", lsb, bbx ); */ - SafeBuffer[i - FirstChar].abcA = lsb; - SafeBuffer[i - FirstChar].abcB = bbx; - SafeBuffer[i - FirstChar].abcC = adv - lsb - bbx; + if (!fl) + { + SafeBuffF[i - FirstChar].abcfA = (FLOAT) lsb; + SafeBuffF[i - FirstChar].abcfB = (FLOAT) bbx; + SafeBuffF[i - FirstChar].abcfC = (FLOAT) (adv - lsb - bbx); + } + else + { + SafeBuff[i - FirstChar].abcA = lsb; + SafeBuff[i - FirstChar].abcB = bbx; + SafeBuff[i - FirstChar].abcC = adv - lsb - bbx; + } } IntUnLockFreeType; TEXTOBJ_UnlockText(TextObj); - Status = MmCopyToCaller(abc, SafeBuffer, BufferSize); + Status = MmCopyToCaller(Buffer, SafeBuff, BufferSize); if (! NT_SUCCESS(Status)) { SetLastNtError(Status); - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); return FALSE; } - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); DPRINT("NtGdiGetCharABCWidths Worked!\n"); return TRUE; } @@ -2277,7 +2308,9 @@ IN FLONG fl, OUT PVOID Buffer) { - LPINT SafeBuffer; + NTSTATUS Status = STATUS_SUCCESS; + LPINT SafeBuff; + PFLOAT SafeBuffF = NULL; PDC dc; PTEXTOBJ TextObj; PFONTGDI FontGDI; @@ -2285,22 +2318,31 @@ FT_CharMap charmap, found = NULL; UINT i, glyph_index, BufferSize; HFONT hFont = 0; - PFLOAT BufF = NULL; - LPINT Buf = NULL; - - if (fl == 0) - { - BufF = (PFLOAT) Buffer; + + if(pwc) + { + _SEH_TRY + { + ProbeForRead(pwc, + sizeof(PWSTR), + 1); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + if (!NT_SUCCESS(Status)) + { + SetLastWin32Error(Status); return FALSE; } - else - Buf = (LPINT) Buffer; - - if (fl & GCW_INDICES) return FALSE; - - BufferSize = Count * sizeof(INT); - SafeBuffer = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT); - if (SafeBuffer == NULL) + + BufferSize = Count * sizeof(INT); // Same size! + SafeBuff = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_GDITEXT); + if (!fl) SafeBuffF = (PFLOAT) SafeBuff; + if (SafeBuff == NULL) { SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); return FALSE; @@ -2309,7 +2351,7 @@ dc = DC_LockDc(hDC); if (dc == NULL) { - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2319,7 +2361,7 @@ if (TextObj == NULL) { - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2342,7 +2384,7 @@ if (!found) { DPRINT1("WARNING: Could not find desired charmap!\n"); - ExFreePool(SafeBuffer); + ExFreePool(SafeBuff); SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; } @@ -2362,14 +2404,30 @@ for (i = FirstChar; i < FirstChar+Count; i++) { - glyph_index = FT_Get_Char_Index(face, i); + if (pwc) + { + if (fl & GCW_INDICES) + glyph_index = pwc[i - FirstChar]; + else + glyph_index = FT_Get_Char_Index(face, pwc[i - FirstChar]); + } + else + { + if (fl & GCW_INDICES) + glyph_index = i; + else + glyph_index = FT_Get_Char_Index(face, i); + } FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT); - SafeBuffer[i - FirstChar] = (face->glyph->advance.x + 32) >> 6; + if (!fl) + SafeBuffF[i - FirstChar] = (FLOAT) ((face->glyph->advance.x + 32) >> 6); + else + SafeBuff[i - FirstChar] = (face->glyph->advance.x + 32) >> 6; } IntUnLockFreeType; TEXTOBJ_UnlockText(TextObj); - MmCopyToCaller(Buffer, SafeBuffer, BufferSize); - ExFreePool(SafeBuffer); + MmCopyToCaller(Buffer, SafeBuff, BufferSize); + ExFreePool(SafeBuff); return TRUE; }
17 years, 1 month
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
89
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Results per page:
10
25
50
100
200