Skip to content
Snippets Groups Projects
Commit 52be93cb authored by Niels Kristian Bech Jensen's avatar Niels Kristian Bech Jensen Committed by Alexandre Julliard
Browse files

Fixed some compiler errors and warnings.

parent c1a700c4
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,7 @@ VOID LANGUAGE_Init(VOID)
CHAR szBuffer[MAX_PATHNAME_LEN];
#ifdef WINELIB
Globals.lpszLanguage = Languages[Options.language].name;
Globals.lpszLanguage = (LPSTR)Languages[Options.language].name;
#endif
if (Globals.lpszLanguage == "En") {
......
......@@ -28,7 +28,7 @@ typedef struct
HMENU hPopupMenu1;
LPCSTR lpszIniFile;
LPCSTR lpszIcoFile;
LPCSTR lpszLanguage;
LPSTR lpszLanguage;
UINT wStringTableOffset;
BOOL bAnalog;
......
......@@ -65,8 +65,6 @@ static OPENFILENAME ofn;
static HWND findDialogBox = 0;
static UINT findMessageId = 0;
static int findDialogBoxInit = 0;
static int findDialogStructInit = 0;
static FINDREPLACE frS;
static char fromstring[1024], tostring[1024];
......@@ -390,9 +388,9 @@ void mw_PrintSetup(HWND hWnd)
// Escape(tmp.hDC, NEWFRAME, 0, NULL, NULL);
// Escape(tmp.hDC, ENDDOC, 0, NULL, NULL);
// DeleteDC(tmp.hDC);
if (pd.hDevMode != NULL)
if (pd.hDevMode != 0)
GlobalFree(pd.hDevMode);
if (pd.hDevNames != NULL)
if (pd.hDevNames != 0)
GlobalFree(pd.hDevNames);
pd.hDevMode = 0;
......
......@@ -47,7 +47,7 @@ int AlertIDS(UINT ids_message, UINT ids_caption, WORD type) {
return (MessageBox(Globals.hMainWnd, szMessage, szCaption, type));
}
void AlertFileNotFound(LPCSTR szFileName) {
void AlertFileNotFound(LPSTR szFileName) {
int nResult;
CHAR szMessage[MAX_STRING_LEN];
......@@ -65,7 +65,7 @@ void AlertFileNotFound(LPCSTR szFileName) {
}
int AlertFileNotSaved(LPCSTR szFileName) {
int AlertFileNotSaved(LPSTR szFileName) {
int nResult;
CHAR szMessage[MAX_STRING_LEN];
......@@ -373,14 +373,14 @@ VOID DIALOG_FilePrint(VOID)
*/
/* Let commdlg manage copy settings */
printer.nCopies = PD_USEDEVMODECOPIES;
printer.nCopies = (WORD)PD_USEDEVMODECOPIES;
if (PrintDlg(&printer)) {
/* initialize DOCINFO */
di.cbSize = sizeof(DOCINFO);
lstrcpy(di.lpszDocName, szDocumentName);
lstrcpy(di.lpszOutput, szOutput);
lstrcpy((LPSTR)di.lpszDocName, szDocumentName);
lstrcpy((LPSTR)di.lpszOutput, szOutput);
hContext = printer.hDC;
assert(hContext!=0);
......@@ -627,7 +627,7 @@ VOID DIALOG_PageSetup(VOID)
WNDPROC lpfnDlg;
lpfnDlg = MakeProcInstance(DIALOG_PAGESETUP_DlgProc, Globals.hInstance);
DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, lpfnDlg);
DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx, Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
}
......
......@@ -17,6 +17,9 @@
#include "dialog.h"
#include "language.h"
extern BOOL DoCloseFile(void);
extern void DoOpenFile(LPCSTR szFileName);
NOTEPAD_GLOBALS Globals;
/***********************************************************************
......
......@@ -32,7 +32,7 @@
}
for (i=0; i<nSPLen; i++) {
delta[szSP[i]] = (nSPLen - rightmostpos(szSP[i], szSP, nSPLen));
delta[(int)szSP[i]] = (nSPLen - rightmostpos(szSP[i], szSP, nSPLen));
}
}
......@@ -41,13 +41,13 @@
int j = nSPLen;
do {
if (szBuf[i] = szSP[j]) {
if ((szBuf[i] = szSP[j])) {
i--; j--;
} else {
if ((nSPLen-j+1) > delta[szBuf[i]]) {
if ((nSPLen-j+1) > delta[(int)szBuf[i]]) {
i+= (nSPLen-j+1);
} else {
i+= delta[szBuf[i]];
i+= delta[(int)szBuf[i]];
}
}
} while (j>0 && i<=nBufLen);
......
......@@ -35,7 +35,7 @@ INT DIALOG_New(INT nDefault)
New.nDefault = nDefault;
ret = DialogBox(Globals.hInstance, STRING_NEW_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
return ret;
}
......@@ -97,7 +97,7 @@ HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszFromGroupName,
ret = DialogBox(Globals.hInstance,
bMove ? STRING_MOVE_Xx : STRING_COPY_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
return((ret == IDOK) ? CopyMove.hToGroup : 0);
......@@ -186,7 +186,7 @@ BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszGrpFile, INT nSize)
GroupAttributes.lpszGrpFile = lpszGrpFile;
ret = DialogBox(Globals.hInstance, STRING_GROUP_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
return(ret == IDOK);
}
......@@ -269,7 +269,7 @@ BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
lstrcpyn(ProgramAttributes.lpszTmpIconFile, lpszIconFile, MAX_PATHNAME_LEN);
ret = DialogBox(Globals.hInstance, STRING_PROGRAM_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
return(ret == IDOK);
......@@ -391,7 +391,7 @@ VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile,
Symbol.lpnIconIndex = lpnIconIndex;
DialogBox(Globals.hInstance, STRING_SYMBOL_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
}
......@@ -476,7 +476,7 @@ VOID DIALOG_Execute()
{
WNDPROC lpfnDlg = MakeProcInstance(DIALOG_EXECUTE_DlgProc, Globals.hInstance);
DialogBox(Globals.hInstance, STRING_EXECUTE_Xx,
Globals.hMainWnd, lpfnDlg);
Globals.hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
}
......
......@@ -5,7 +5,9 @@
*/
#include <stdio.h>
#include <string.h>
#include "windows.h"
#include "windowsx.h"
#include "progman.h"
/***********************************************************************
......
......@@ -5,7 +5,9 @@
*/
#include <stdio.h>
#include <string.h>
#include "windows.h"
#include "windowsx.h"
#include "license.h"
#include "progman.h"
......@@ -15,6 +17,8 @@
GLOBALS Globals;
VOID WINAPI WriteOutProfiles16(void);
static VOID MAIN_CreateGroups(void);
static VOID MAIN_MenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam);
static ATOM MAIN_RegisterMainWinClass(void);
......
......@@ -4,7 +4,9 @@
* Copyright 1996 Ulrich Schmid
*/
#include <string.h>
#include "windows.h"
#include "windowsx.h"
#include "progman.h"
/***********************************************************************
......
#include <windows.h>
#include "globals.h"
#include "resource.h"
/* global variables */
......
#include <windows.h>
#include "resource.h"
/*
#include <windowsx.h>
......@@ -183,7 +184,7 @@ HMETAFILE GetPlaceableMetaFile( HWND hwnd, LPCSTR szFileName )
_llseek(fh, sizeof(APMFILEHEADER), 0);
if (!_lread(fh, lpData, (UINT)(mfHeader.mtSize * 2L)))
{
GlobalFree(lpData);
GlobalFree((HGLOBAL)lpData);
_lclose(fh);
return 0;
}
......
......@@ -5,7 +5,9 @@
*/
#include <stdio.h>
#include <string.h>
#include "windows.h"
#include "windowsx.h"
#include "winhelp.h"
static void Report(LPCSTR str)
......
......@@ -482,7 +482,7 @@ VOID MACRO_Print(VOID)
printer.hPrintTemplate = 0;
printer.hSetupTemplate = 0;
if (PrintDlg16(&printer)) {
if (PrintDlg16((LPPRINTDLG16)&printer)) {
fprintf(stderr, "Print()\n");
};
}
......
......@@ -177,7 +177,7 @@ VOID MACRO_ExecuteMacro(LPCSTR macro)
if (!lstrcmpi(macro, "MacroTest"))
{
WNDPROC lpfnDlg = MakeProcInstance(MACRO_TestDialogProc, Globals.hInstance);
DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, lpfnDlg);
DialogBox(Globals.hInstance, STRING_DIALOG_TEST, Globals.active_win->hMainWnd, (DLGPROC)lpfnDlg);
FreeProcInstance(lpfnDlg);
macro = szTestMacro;
}
......
......@@ -5,7 +5,9 @@
*/
#include <stdio.h>
#include <string.h>
#include "windows.h"
#include "windowsx.h"
#include "winhelp.h"
#ifdef WINELIB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment