Commit 1a4db3e7 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Cleaned up the code so it would be easier to parse with the new C

parser.
parent 11f03599
......@@ -316,10 +316,10 @@ typedef struct
((a)->fStyle & RBBS_NOVERT)))
/* The following defines adjust the right or left end of a rectangle */
#define READJ(b,i) {if(infoPtr->dwStyle & CCS_VERT) b->rcBand.bottom+=(i); \
else b->rcBand.right += (i);}
#define LEADJ(b,i) {if(infoPtr->dwStyle & CCS_VERT) b->rcBand.top+=(i); \
else b->rcBand.left += (i);}
#define READJ(b,i) do { if(infoPtr->dwStyle & CCS_VERT) b->rcBand.bottom+=(i); \
else b->rcBand.right += (i); } while(0)
#define LEADJ(b,i) do { if(infoPtr->dwStyle & CCS_VERT) b->rcBand.top+=(i); \
else b->rcBand.left += (i); } while(0)
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)GetWindowLongA (hwnd, 0))
......@@ -2440,7 +2440,7 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, POINTS *ptsmove)
band = &infoPtr->bands[i];
if (HIDDENBAND(band)) continue;
if (i == ihitBand) {
LEADJ(band, movement)
LEADJ(band, movement);
}
else
movement = REBAR_Shrink (infoPtr, band, movement, i);
......@@ -2463,7 +2463,7 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, POINTS *ptsmove)
if (HIDDENBAND(band)) continue;
if (first) {
first = FALSE;
READJ(band, movement)
READJ(band, movement);
}
else
movement = REBAR_Shrink (infoPtr, band, movement, i);
......
......@@ -88,22 +88,22 @@ static FT_Version_t FT_Version;
static void *ft_handle = NULL;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL;
MAKE_FUNCPTR(FT_Cos)
MAKE_FUNCPTR(FT_Done_Face)
MAKE_FUNCPTR(FT_Get_Char_Index)
MAKE_FUNCPTR(FT_Get_Sfnt_Table)
MAKE_FUNCPTR(FT_Init_FreeType)
MAKE_FUNCPTR(FT_Load_Glyph)
MAKE_FUNCPTR(FT_MulFix)
MAKE_FUNCPTR(FT_New_Face)
MAKE_FUNCPTR(FT_Outline_Get_Bitmap)
MAKE_FUNCPTR(FT_Outline_Transform)
MAKE_FUNCPTR(FT_Outline_Translate)
MAKE_FUNCPTR(FT_Select_Charmap)
MAKE_FUNCPTR(FT_Set_Pixel_Sizes)
MAKE_FUNCPTR(FT_Sin)
MAKE_FUNCPTR(FT_Vector_Rotate)
#define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL
MAKE_FUNCPTR(FT_Cos);
MAKE_FUNCPTR(FT_Done_Face);
MAKE_FUNCPTR(FT_Get_Char_Index);
MAKE_FUNCPTR(FT_Get_Sfnt_Table);
MAKE_FUNCPTR(FT_Init_FreeType);
MAKE_FUNCPTR(FT_Load_Glyph);
MAKE_FUNCPTR(FT_MulFix);
MAKE_FUNCPTR(FT_New_Face);
MAKE_FUNCPTR(FT_Outline_Get_Bitmap);
MAKE_FUNCPTR(FT_Outline_Transform);
MAKE_FUNCPTR(FT_Outline_Translate);
MAKE_FUNCPTR(FT_Select_Charmap);
MAKE_FUNCPTR(FT_Set_Pixel_Sizes);
MAKE_FUNCPTR(FT_Sin);
MAKE_FUNCPTR(FT_Vector_Rotate);
#undef MAKE_FUNCPTR
static void (*pFT_Library_Version)(FT_Library,FT_Int*,FT_Int*,FT_Int*);
......
......@@ -143,10 +143,10 @@ static void test_GetSetEnvironmentVariableW(void)
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value));
todo_wine
{
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
};
todo_wine {
ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer");
};
ok(ret_size == lstrlenW(value) + 1, "should return length with terminating 0");
lstrcpyW(buf, fooW);
......@@ -176,10 +176,10 @@ todo_wine
lstrcpyW(buf, fooW);
ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1);
ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, "should not find variable");
todo_wine
{
ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string");
};
todo_wine {
ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string");
};
}
START_TEST(environ)
......
......@@ -1426,7 +1426,7 @@ RTFStyle *RTFGetStyle ();
char *_RTFAlloc ();
char *RTFStrSave ();
void RTFFree ();
int RTFCharToHex ();
int RTFCharToHex (char);
int RTFHexToChar ();
void RTFSetMsgProc ();
void RTFSetPanicProc ();
......
static char *stdCharName[] =
{
"nothing",
"space",
"exclam",
......@@ -350,3 +352,5 @@
"dotmath",
"mathequal",
"mathtilde",
(char *) NULL
};
......@@ -662,10 +662,11 @@ typedef struct IUnknown IUnknown, *LPUNKNOWN;
typedef struct ICOM_VTABLE(IUnknown) ICOM_VTABLE(IUnknown);
struct IUnknown {
ICOM_VFIELD(IUnknown);
}
#if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
} __attribute__ ((com_interface));
__attribute__ ((com_interface));
#else
};
;
#endif /* ICOM_US_COM_INTERFACE_ATTRIBUTE */
struct ICOM_VTABLE(IUnknown) {
......@@ -682,10 +683,11 @@ struct IUnknown {
ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
ICOM_METHOD (ULONG,AddRef)
ICOM_METHOD (ULONG,Release)
}
#if defined(ICOM_USE_COM_INTERFACE_ATTRIBUTE)
} __attribute__ ((com_interface));
__attribute__ ((com_interface));
#else
};
;
#endif /* ICOM_US_COM_INTERFACE_ATTRIBUTE */
#undef ICOM_INTERFACE
......
......@@ -295,55 +295,55 @@ typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
* "Prototypes" section in winsock.h.
*/
#if WS_API_TYPEDEFS
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,u_int,const char*,int,int,char*,int));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,u_int,const char*,char*,int));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,u_int,const char*,char*,int));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,u_int,int,char*,int));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,u_int,const char*,const char*,char*,int));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,u_int,int,const char*,char*,int));
typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,u_int,long));
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,u_int,const char*,int,int,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,u_int,const char*,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,u_int,const char*,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,u_int,int,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,u_int,const char*,const char*,char*,int);
typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,u_int,int,const char*,char*,int);
typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,u_int,long);
typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE));
typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void));
typedef int (WINAPI *LPFN_WSACLEANUP)(void));
typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void));
typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void));
typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC));
typedef void (WINAPI *LPFN_WSASETLASTERROR)(int));
typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA));
typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void));
typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*));
typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int));
typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET));
typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int));
typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int));
typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*));
typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int));
typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*));
typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*));
typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int));
typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
typedef int (WINAPI *LPFN_WSACLEANUP)(void);
typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
#ifdef WS_DEFINE_SELECT
typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
#endif
typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*));
typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*));
typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*));
typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*));
typedef u_long (WINAPI *LPFN_HTONL)(u_long));
typedef u_short (WINAPI *LPFN_HTONS)(u_short));
typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
typedef u_long (WINAPI *LPFN_HTONL)(u_long);
typedef u_short (WINAPI *LPFN_HTONS)(u_short);
typedef unsigned long (WINAPI *LPFN_INET_ADDR)(const char*);
typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr));
typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,long,u_long*));
typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int));
typedef u_long (WINAPI *LPFN_NTOHL)(u_long));
typedef u_short (WINAPI *LPFN_NTOHS)(u_short));
typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int));
typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*));
typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int));
typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int));
typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int));
typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int));
typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int));
typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr);
typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,long,u_long*);
typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
typedef u_long (WINAPI *LPFN_NTOHL)(u_long);
typedef u_short (WINAPI *LPFN_NTOHS)(u_short);
typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
#endif /* WS_API_TYPEDEFS */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment