mirror of
https://github.com/reactos/reactos.git
synced 2024-07-04 03:34:16 +00:00
Fix compiler errors. Patch by Herve Poussineau. Fixes bug 478
svn path=/trunk/; revision=13267
This commit is contained in:
parent
dcee180336
commit
c0441b0e5f
|
@ -78,7 +78,7 @@ void stime_arg2 __P((char *, int, time_t *));
|
||||||
void stime_file __P((char *, time_t *));
|
void stime_file __P((char *, time_t *));
|
||||||
void usage __P((void));
|
void usage __P((void));
|
||||||
|
|
||||||
void
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
@ -194,7 +194,7 @@ main(int argc, char *argv[])
|
||||||
if (rw(*argv, &sb, fflag))
|
if (rw(*argv, &sb, fflag))
|
||||||
rval = 1; DbgPrint("[%s]", "[23]");
|
rval = 1; DbgPrint("[%s]", "[23]");
|
||||||
}
|
}
|
||||||
exit(rval); DbgPrint("[%s]", "[23]");
|
return rval; DbgPrint("[%s]", "[23]");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;
|
#define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2;
|
||||||
|
|
|
@ -23,7 +23,7 @@ typedef double f8byte_t;
|
||||||
typedef long uid_t; // SunOS 5.5
|
typedef long uid_t; // SunOS 5.5
|
||||||
|
|
||||||
#define __P(x) x
|
#define __P(x) x
|
||||||
#define __STDC__ 1
|
//#define __STDC__ 1
|
||||||
|
|
||||||
/* utmp.h */
|
/* utmp.h */
|
||||||
#define UT_LINESIZE 8
|
#define UT_LINESIZE 8
|
||||||
|
|
|
@ -515,7 +515,7 @@ static void KeyTyped(DFWINDOW wnd, int c)
|
||||||
currchar = DfCurrChar;
|
currchar = DfCurrChar;
|
||||||
}
|
}
|
||||||
/* ---- test typing at end of text ---- */
|
/* ---- test typing at end of text ---- */
|
||||||
if (currchar == wnd->text+wnd->MaxTextLength) {
|
if (currchar == (char*)(wnd->text+wnd->MaxTextLength)) {
|
||||||
/* ---- typing at the end of maximum buffer ---- */
|
/* ---- typing at the end of maximum buffer ---- */
|
||||||
DfBeep();
|
DfBeep();
|
||||||
return;
|
return;
|
||||||
|
@ -571,14 +571,14 @@ static void KeyTyped(DFWINDOW wnd, int c)
|
||||||
/* ---------- test end of window --------- */
|
/* ---------- test end of window --------- */
|
||||||
if (DfWndCol == DfClientWidth(wnd)-1) {
|
if (DfWndCol == DfClientWidth(wnd)-1) {
|
||||||
if (!DfIsMultiLine(wnd)) {
|
if (!DfIsMultiLine(wnd)) {
|
||||||
if (!(currchar == wnd->text+wnd->MaxTextLength-2))
|
if (!(currchar == (char*)(wnd->text+wnd->MaxTextLength-2)))
|
||||||
DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0);
|
DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *cp = currchar;
|
char *cp = currchar;
|
||||||
while (*cp != ' ' && cp != DfTextLine(wnd, wnd->CurrLine))
|
while (*cp != ' ' && cp != (char*)DfTextLine(wnd, wnd->CurrLine))
|
||||||
--cp;
|
--cp;
|
||||||
if (cp == DfTextLine(wnd, wnd->CurrLine) ||
|
if (cp == (char*)DfTextLine(wnd, wnd->CurrLine) ||
|
||||||
!wnd->WordWrapMode)
|
!wnd->WordWrapMode)
|
||||||
DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0);
|
DfSendMessage(wnd, DFM_HORIZSCROLL, TRUE, 0);
|
||||||
else {
|
else {
|
||||||
|
@ -807,7 +807,7 @@ static void ParagraphCmd(DFWINDOW wnd)
|
||||||
if (*bel == '\n')
|
if (*bel == '\n')
|
||||||
--bel;
|
--bel;
|
||||||
/* --- change all newlines in block to spaces --- */
|
/* --- change all newlines in block to spaces --- */
|
||||||
while (DfCurrChar < bel) {
|
while ((char*)DfCurrChar < bel) {
|
||||||
if (*DfCurrChar == '\n') {
|
if (*DfCurrChar == '\n') {
|
||||||
*DfCurrChar = ' ';
|
*DfCurrChar = ' ';
|
||||||
wnd->CurrLine++;
|
wnd->CurrLine++;
|
||||||
|
@ -818,7 +818,7 @@ static void ParagraphCmd(DFWINDOW wnd)
|
||||||
}
|
}
|
||||||
/* ---- insert newlines at new margin boundaries ---- */
|
/* ---- insert newlines at new margin boundaries ---- */
|
||||||
bb = bbl;
|
bb = bbl;
|
||||||
while (bbl < bel) {
|
while ((char*)bbl < (char*)bel) {
|
||||||
bbl++;
|
bbl++;
|
||||||
if ((int)(bbl - bb) == DfClientWidth(wnd)-1) {
|
if ((int)(bbl - bb) == DfClientWidth(wnd)-1) {
|
||||||
while (*bbl != ' ' && bbl > bb)
|
while (*bbl != ' ' && bbl > bb)
|
||||||
|
|
|
@ -42,7 +42,7 @@ SliderTextProc (DFWINDOW wnd,DFMESSAGE msg,DF_PARAM p1,DF_PARAM p2)
|
||||||
case DFM_PAINT:
|
case DFM_PAINT:
|
||||||
Percent = (int)p2;
|
Percent = (int)p2;
|
||||||
InsertPercent(DfGetText(wnd) ?
|
InsertPercent(DfGetText(wnd) ?
|
||||||
DfGetText(wnd) : SliderBoxDB.ctl[1].itext);
|
(char*)DfGetText(wnd) : SliderBoxDB.ctl[1].itext);
|
||||||
GenericProc(wnd, DFM_PAINT, 0, 0);
|
GenericProc(wnd, DFM_PAINT, 0, 0);
|
||||||
if (Percent >= 100)
|
if (Percent >= 100)
|
||||||
DfSendMessage(DfGetParent(wnd),DFM_COMMAND,DF_ID_CANCEL,0);
|
DfSendMessage(DfGetParent(wnd),DFM_COMMAND,DF_ID_CANCEL,0);
|
||||||
|
|
|
@ -57,7 +57,7 @@ int WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmd
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
wc.hInstance = hInst;
|
wc.hInstance = hInst;
|
||||||
wc.hIcon = LoadIcon( hInst, appname );
|
wc.hIcon = LoadIcon( hInst, appname );
|
||||||
wc.hCursor = LoadCursor( NULL_HANDLE, IDI_APPLICATION );
|
wc.hCursor = LoadCursor( NULL_HANDLE, (LPCTSTR)IDI_APPLICATION );
|
||||||
wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH );
|
wc.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH );
|
||||||
wc.lpszMenuName = "MENU_WINEMINE";
|
wc.lpszMenuName = "MENU_WINEMINE";
|
||||||
wc.lpszClassName = appname;
|
wc.lpszClassName = appname;
|
||||||
|
|
|
@ -377,7 +377,7 @@ static void do_chmod (mode_t sf)
|
||||||
static void apply_mask (mode_t sf)
|
static void apply_mask (mode_t sf)
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
mode_t sf_stat;
|
int sf_stat;
|
||||||
|
|
||||||
need_update = end_chmod = 1;
|
need_update = end_chmod = 1;
|
||||||
do_chmod (sf);
|
do_chmod (sf);
|
||||||
|
@ -387,7 +387,7 @@ static void apply_mask (mode_t sf)
|
||||||
if ((sf_stat = pc_stat_file (fname)) < 0)
|
if ((sf_stat = pc_stat_file (fname)) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
c_stat = sf_stat;
|
c_stat = (mode_t) sf_stat;
|
||||||
do_chmod (c_stat);
|
do_chmod (c_stat);
|
||||||
} while (cpanel->marked);
|
} while (cpanel->marked);
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ void chmod_cmd (void)
|
||||||
char buffer [10];
|
char buffer [10];
|
||||||
char *fname;
|
char *fname;
|
||||||
int i;
|
int i;
|
||||||
mode_t sf_stat;
|
int sf_stat;
|
||||||
|
|
||||||
do { /* do while any files remaining */
|
do { /* do while any files remaining */
|
||||||
init_chmod ();
|
init_chmod ();
|
||||||
|
@ -409,7 +409,7 @@ void chmod_cmd (void)
|
||||||
if ((sf_stat = pc_stat_file (fname)) < 0) /* get status of file */
|
if ((sf_stat = pc_stat_file (fname)) < 0) /* get status of file */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
c_stat = sf_stat;
|
c_stat = (mode_t) sf_stat;
|
||||||
mode_change = 0; /* clear changes flag */
|
mode_change = 0; /* clear changes flag */
|
||||||
|
|
||||||
/* set check buttons */
|
/* set check buttons */
|
||||||
|
|
|
@ -629,7 +629,7 @@ int mc_doublepopen (int inhandle, int inlen, pid_t *the_pid, char *command, ...)
|
||||||
}
|
}
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
// Spawn process
|
// Spawn process
|
||||||
pid = spawnvp(P_NOWAIT,command, args);// argv[1], (const char* const*)&argv[1]);
|
pid = spawnvp(P_NOWAIT,command, (const char* const*)args);// argv[1], (const char* const*)&argv[1]);
|
||||||
if(!pid)
|
if(!pid)
|
||||||
exit (1);
|
exit (1);
|
||||||
// Duplicate copy of original stdin back into stdin
|
// Duplicate copy of original stdin back into stdin
|
||||||
|
|
|
@ -248,7 +248,7 @@ static void restore_screen (void)
|
||||||
void SLtt_write_string (char *str)
|
void SLtt_write_string (char *str)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
int bytes;
|
unsigned long bytes;
|
||||||
|
|
||||||
(void) WriteConsole(hStdout, str, strlen(str), &bytes, NULL);
|
(void) WriteConsole(hStdout, str, strlen(str), &bytes, NULL);
|
||||||
#else
|
#else
|
||||||
|
@ -1017,7 +1017,7 @@ static void write_attributes (unsigned short *src, int count)
|
||||||
register unsigned char *p = Line_Buffer;
|
register unsigned char *p = Line_Buffer;
|
||||||
register unsigned short pair;
|
register unsigned short pair;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
register unsigned char * org_src = src;
|
register unsigned char * org_src = (unsigned char*)src;
|
||||||
COORD coord;
|
COORD coord;
|
||||||
long bytes;
|
long bytes;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1062,7 +1062,7 @@ static void write_attributes (unsigned short *src, int count)
|
||||||
/* write color attributes */
|
/* write color attributes */
|
||||||
p = Line_Buffer;
|
p = Line_Buffer;
|
||||||
n = count;
|
n = count;
|
||||||
src = org_src; /* restart the src pointer */
|
src = (unsigned short*)org_src; /* restart the src pointer */
|
||||||
|
|
||||||
/* write into attributes only */
|
/* write into attributes only */
|
||||||
while (n-- > 0)
|
while (n-- > 0)
|
||||||
|
@ -1073,7 +1073,7 @@ static void write_attributes (unsigned short *src, int count)
|
||||||
*(p++) = 0; /* what's this for? */
|
*(p++) = 0; /* what's this for? */
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteConsoleOutputAttribute(hStdout, Line_Buffer, count, coord, &bytes);
|
WriteConsoleOutputAttribute(hStdout, (WORD*)Line_Buffer, count, coord, &bytes);
|
||||||
# else /* __os2__ */
|
# else /* __os2__ */
|
||||||
/* ScreenUpdateLine (void *virtual_screen_line, int row); */
|
/* ScreenUpdateLine (void *virtual_screen_line, int row); */
|
||||||
p = Line_Buffer;
|
p = Line_Buffer;
|
||||||
|
|
|
@ -122,7 +122,7 @@ static
|
||||||
|
|
||||||
int do_reget;
|
int do_reget;
|
||||||
|
|
||||||
/* rcsid [] = "$Id: file.c,v 1.2 2003/06/27 21:10:35 gvg Exp $" */
|
/* rcsid [] = "$Id$" */
|
||||||
int verbose = 1;
|
int verbose = 1;
|
||||||
|
|
||||||
/* Recursive operation on subdirectories */
|
/* Recursive operation on subdirectories */
|
||||||
|
@ -211,7 +211,7 @@ static char *dest_mask = NULL;
|
||||||
|
|
||||||
/* To symlinks the difference between `follow Links' checked and not
|
/* To symlinks the difference between `follow Links' checked and not
|
||||||
checked is the stat call used (mc_stat resp. mc_lstat) */
|
checked is the stat call used (mc_stat resp. mc_lstat) */
|
||||||
int (*xstat)(char *, struct stat *) = mc_lstat;
|
int (*xstat)(const char *, struct stat *) = mc_lstat;
|
||||||
|
|
||||||
static int op_follow_links = 0;
|
static int op_follow_links = 0;
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ void do_file_mark (WPanel *panel, int index, int val);
|
||||||
int file_compute_color (int attr, file_entry *fe);
|
int file_compute_color (int attr, file_entry *fe);
|
||||||
int file_entry_color (file_entry *fe);
|
int file_entry_color (file_entry *fe);
|
||||||
void do_file_mark_range (WPanel *panel, int r1, int r2);
|
void do_file_mark_range (WPanel *panel, int r1, int r2);
|
||||||
int do_enter (WPanel *panel);
|
void do_enter (WPanel *panel);
|
||||||
|
|
||||||
/* NOTE: Have to be ifdefed for HAVE_X */
|
/* NOTE: Have to be ifdefed for HAVE_X */
|
||||||
void x_panel_select_item (WPanel *panel, int index, int val);
|
void x_panel_select_item (WPanel *panel, int index, int val);
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
#include "x.h"
|
#include "x.h"
|
||||||
|
|
||||||
/* "$Id: screen.c,v 1.1 2001/12/30 09:55:21 sedwards Exp $" */
|
/* "$Id$" */
|
||||||
#define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
|
#define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
|
||||||
|
|
||||||
/* If true, show the mini-info on the panel */
|
/* If true, show the mini-info on the panel */
|
||||||
|
@ -2020,13 +2020,13 @@ start_search (WPanel *panel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
do_enter (WPanel *panel)
|
do_enter (WPanel *panel)
|
||||||
{
|
{
|
||||||
if (S_ISDIR (selection (panel)->buf.st_mode)
|
if (S_ISDIR (selection (panel)->buf.st_mode)
|
||||||
|| link_isdir (selection (panel))){
|
|| link_isdir (selection (panel))){
|
||||||
do_cd (selection (panel)->fname, cd_exact);
|
do_cd (selection (panel)->fname, cd_exact);
|
||||||
return 1;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (is_exe (selection (panel)->buf.st_mode) &&
|
if (is_exe (selection (panel)->buf.st_mode) &&
|
||||||
if_link_is_exe (selection (panel))) {
|
if_link_is_exe (selection (panel))) {
|
||||||
|
@ -2053,15 +2053,9 @@ do_enter (WPanel *panel)
|
||||||
free (tmp2);
|
free (tmp2);
|
||||||
}
|
}
|
||||||
#endif /* USE_VFS */
|
#endif /* USE_VFS */
|
||||||
return 1;
|
return;
|
||||||
} else {
|
} else {
|
||||||
char *p;
|
regex_command (selection (panel)->fname, "Open", NULL, 0);
|
||||||
|
|
||||||
p = regex_command (selection (panel)->fname, "Open", NULL, 0);
|
|
||||||
if (p && (strcmp (p, "Success") == 0))
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: niclist.c,v 1.3 2004/01/12 22:45:53 sedwards Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS packet driver interface list utility
|
* PROJECT: ReactOS packet driver interface list utility
|
||||||
|
@ -53,7 +53,7 @@ int main(int argc, char **argv)
|
||||||
HINSTANCE hPacket = LoadLibrary("PACKET.DLL");
|
HINSTANCE hPacket = LoadLibrary("PACKET.DLL");
|
||||||
if (hPacket) {
|
if (hPacket) {
|
||||||
PacketGetAdapterNames = (BOOLEAN (*)(PTSTR, PULONG))GetProcAddress(hPacket, "PacketGetAdapterNames");
|
PacketGetAdapterNames = (BOOLEAN (*)(PTSTR, PULONG))GetProcAddress(hPacket, "PacketGetAdapterNames");
|
||||||
PacketGetVersion = (BOOLEAN (*)(PTSTR, PULONG))GetProcAddress(hPacket, "PacketGetVersion");
|
PacketGetVersion = (PCHAR (*)(VOID))GetProcAddress(hPacket, "PacketGetVersion");
|
||||||
} else {
|
} else {
|
||||||
printf("Could not load WinPCap driver! for more information goto:\n");
|
printf("Could not load WinPCap driver! for more information goto:\n");
|
||||||
printf ("http://netgroup-serv.polito.it/winpcap\n");
|
printf ("http://netgroup-serv.polito.it/winpcap\n");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//======================================================================
|
//======================================================================
|
||||||
//
|
//
|
||||||
// $Id: format.c,v 1.3 2003/01/14 18:51:12 guido Exp $
|
// $Id$
|
||||||
//
|
//
|
||||||
// Formatx
|
// Formatx
|
||||||
//
|
//
|
||||||
|
@ -334,7 +334,7 @@ wmain( int argc, WCHAR *argv[] )
|
||||||
{
|
{
|
||||||
int badArg;
|
int badArg;
|
||||||
|
|
||||||
DWORD media;
|
DWORD media = 0;
|
||||||
DWORD driveType;
|
DWORD driveType;
|
||||||
|
|
||||||
WCHAR fileSystem [1024];
|
WCHAR fileSystem [1024];
|
||||||
|
|
|
@ -40,7 +40,7 @@ ExecuteKill(char * lpPid)
|
||||||
DWORD dwProcessId;
|
DWORD dwProcessId;
|
||||||
|
|
||||||
dwProcessId = (DWORD) atol(lpPid);
|
dwProcessId = (DWORD) atol(lpPid);
|
||||||
fprintf( stderr, "Killing PID %d...\n",dwProcessId);
|
fprintf( stderr, "Killing PID %ld...\n",dwProcessId);
|
||||||
hProcess = OpenProcess(
|
hProcess = OpenProcess(
|
||||||
PROCESS_TERMINATE,
|
PROCESS_TERMINATE,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
@ -48,7 +48,7 @@ ExecuteKill(char * lpPid)
|
||||||
);
|
);
|
||||||
if (NULL == hProcess)
|
if (NULL == hProcess)
|
||||||
{
|
{
|
||||||
fprintf( stderr, "Could not open the process with PID = %d\n", dwProcessId);
|
fprintf( stderr, "Could not open the process with PID = %ld\n", dwProcessId);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (FALSE == TerminateProcess(
|
if (FALSE == TerminateProcess(
|
||||||
|
@ -56,7 +56,7 @@ ExecuteKill(char * lpPid)
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
fprintf( stderr, "Could not terminate the process with PID = %d\n", dwProcessId);
|
fprintf( stderr, "Could not terminate the process with PID = %ld\n", dwProcessId);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CloseHandle(hProcess);
|
CloseHandle(hProcess);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// $Id: pedump.c,v 1.1 2001/01/13 18:19:23 ea Exp $
|
// $Id$
|
||||||
//
|
//
|
||||||
// This program was written by Sang Cho, assistant professor at
|
// This program was written by Sang Cho, assistant professor at
|
||||||
// the department of
|
// the department of
|
||||||
|
@ -48,6 +48,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#ifndef bcopy
|
#ifndef bcopy
|
||||||
#define bcopy(s,d,z) memcpy((d),(s),(z))
|
#define bcopy(s,d,z) memcpy((d),(s),(z))
|
||||||
|
@ -1060,7 +1061,7 @@ GetActualAddress (
|
||||||
int nSections = NumOfSections (lpFile);
|
int nSections = NumOfSections (lpFile);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (dwRVA == NULL)
|
if (dwRVA == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (dwRVA & 0x80000000)
|
if (dwRVA & 0x80000000)
|
||||||
{
|
{
|
||||||
|
@ -1954,7 +1955,7 @@ TranslateFunctionName (
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
int i, j, n;
|
int i, /*j,*/ n;
|
||||||
char c, cc;
|
char c, cc;
|
||||||
|
|
||||||
static char buff[512]; // result of translation
|
static char buff[512]; // result of translation
|
||||||
|
@ -2375,7 +2376,7 @@ GetExportFunctionNames (
|
||||||
|
|
||||||
char buff[256]; // enough for any string ??
|
char buff[256]; // enough for any string ??
|
||||||
|
|
||||||
char *psz; //===============================
|
char *psz = NULL; //===============================
|
||||||
|
|
||||||
DWORD *pdwAddress;
|
DWORD *pdwAddress;
|
||||||
DWORD *pdw1;
|
DWORD *pdw1;
|
||||||
|
@ -2737,8 +2738,8 @@ MenuScan (
|
||||||
int *len,
|
int *len,
|
||||||
WORD ** pMenu)
|
WORD ** pMenu)
|
||||||
{
|
{
|
||||||
int num = 0;
|
//int num = 0;
|
||||||
int ndetails;
|
//int ndetails;
|
||||||
WORD *pwd;
|
WORD *pwd;
|
||||||
WORD flag, flag1;
|
WORD flag, flag1;
|
||||||
WORD id, ispopup;
|
WORD id, ispopup;
|
||||||
|
@ -2805,12 +2806,12 @@ MenuFill (
|
||||||
char **psz,
|
char **psz,
|
||||||
WORD ** pMenu)
|
WORD ** pMenu)
|
||||||
{
|
{
|
||||||
int num = 0;
|
//int num = 0;
|
||||||
int ndetails;
|
//int ndetails;
|
||||||
char *ptr, *pTemp;
|
char *ptr/*, *pTemp*/;
|
||||||
WORD *pwd;
|
WORD *pwd;
|
||||||
WORD flag, flag1;
|
WORD flag, flag1;
|
||||||
WORD id, ispopup;
|
WORD id/*, ispopup*/;
|
||||||
|
|
||||||
ptr = *psz;
|
ptr = *psz;
|
||||||
pwd = *pMenu;
|
pwd = *pMenu;
|
||||||
|
@ -2927,19 +2928,20 @@ GetContentsOfMenu (
|
||||||
//PIMAGE_SECTION_HEADER psh = (PIMAGE_SECTION_HEADER)
|
//PIMAGE_SECTION_HEADER psh = (PIMAGE_SECTION_HEADER)
|
||||||
//ImageDirectorySection (lpFile, IMAGE_DIRECTORY_ENTRY_RESOURCE);
|
//ImageDirectorySection (lpFile, IMAGE_DIRECTORY_ENTRY_RESOURCE);
|
||||||
PIMAGE_MENU_HEADER pMenuHeader;
|
PIMAGE_MENU_HEADER pMenuHeader;
|
||||||
PIMAGE_POPUP_MENU_ITEM pPopup;
|
//PIMAGE_POPUP_MENU_ITEM pPopup;
|
||||||
PIMAGE_NORMAL_MENU_ITEM pNormal;
|
WORD* pPopup;
|
||||||
|
//PIMAGE_NORMAL_MENU_ITEM pNormal;
|
||||||
char buff[32];
|
char buff[32];
|
||||||
int nCnt = 0, i, j;
|
int /*nCnt = 0,*/ i, j;
|
||||||
int num = 0;
|
//int num = 0;
|
||||||
int size;
|
int size;
|
||||||
int sLength, nMenus;
|
int sLength, nMenus;
|
||||||
WORD flag;
|
WORD flag;
|
||||||
WORD *pwd;
|
WORD *pwd;
|
||||||
DWORD prdeName;
|
//DWORD prdeName;
|
||||||
//DWORD dwBase; obsolete
|
//DWORD dwBase; obsolete
|
||||||
char *pMem, *pTemp;
|
char *pMem/*, *pTemp*/;
|
||||||
BOOL isStrange = FALSE;
|
//BOOL isStrange = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/* get root directory of resource tree */
|
/* get root directory of resource tree */
|
||||||
|
@ -3020,7 +3022,7 @@ GetContentsOfMenu (
|
||||||
// normal case
|
// normal case
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPopup = (PIMAGE_POPUP_MENU_ITEM)
|
pPopup = (WORD*)
|
||||||
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -3063,7 +3065,7 @@ GetContentsOfMenu (
|
||||||
// normal case
|
// normal case
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPopup = (PIMAGE_POPUP_MENU_ITEM)
|
pPopup = (WORD*)
|
||||||
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -3127,7 +3129,7 @@ GetContentsOfMenu (
|
||||||
// normal case
|
// normal case
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPopup = (PIMAGE_POPUP_MENU_ITEM)
|
pPopup = (WORD*)
|
||||||
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -3174,7 +3176,7 @@ GetContentsOfMenu (
|
||||||
// normal case
|
// normal case
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPopup = (PIMAGE_POPUP_MENU_ITEM)
|
pPopup = (WORD*)
|
||||||
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
((DWORD) pMenuHeader + sizeof (IMAGE_MENU_HEADER));
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -3200,10 +3202,10 @@ PrintStrangeMenu (
|
||||||
char **psz)
|
char **psz)
|
||||||
{
|
{
|
||||||
|
|
||||||
int i, j, k, l;
|
//int i, j, k, l;
|
||||||
int num;
|
int num;
|
||||||
WORD flag1, flag2;
|
//WORD flag1, flag2;
|
||||||
char buff[128];
|
//char buff[128];
|
||||||
char *ptr, *pmax;
|
char *ptr, *pmax;
|
||||||
|
|
||||||
//return dumpMenu (psz, size);
|
//return dumpMenu (psz, size);
|
||||||
|
@ -3395,17 +3397,17 @@ GetContentsOfDialog (
|
||||||
PIMAGE_RESOURCE_DIR_STRING_U pDialogName;
|
PIMAGE_RESOURCE_DIR_STRING_U pDialogName;
|
||||||
PIMAGE_RESOURCE_DATA_ENTRY prData;
|
PIMAGE_RESOURCE_DATA_ENTRY prData;
|
||||||
PIMAGE_DIALOG_HEADER pDialogHeader;
|
PIMAGE_DIALOG_HEADER pDialogHeader;
|
||||||
PIMAGE_CONTROL_DATA pControlData;
|
//PIMAGE_CONTROL_DATA pControlData;
|
||||||
char buff[32];
|
char buff[32];
|
||||||
int nCnt = 0, i, j;
|
int /*nCnt = 0,*/ i, j;
|
||||||
int num = 0;
|
//int num = 0;
|
||||||
int size;
|
int size;
|
||||||
int sLength, nDialogs;
|
int sLength, nDialogs;
|
||||||
WORD flag;
|
//WORD flag;
|
||||||
WORD *pwd;
|
WORD *pwd;
|
||||||
DWORD prdeName;
|
//DWORD prdeName;
|
||||||
char *pMem, *pTemp;
|
char *pMem/*, *pTemp*/;
|
||||||
BOOL isStrange = FALSE;
|
//BOOL isStrange = FALSE;
|
||||||
|
|
||||||
|
|
||||||
/* get root directory of resource tree */
|
/* get root directory of resource tree */
|
||||||
|
@ -3580,7 +3582,7 @@ GetContentsOfDialog (
|
||||||
// October 14, 1997
|
// October 14, 1997
|
||||||
//
|
//
|
||||||
/* print contents of dialog */
|
/* print contents of dialog */
|
||||||
int WINAPI
|
void WINAPI
|
||||||
PrintNameOrOrdinal (
|
PrintNameOrOrdinal (
|
||||||
char **psz)
|
char **psz)
|
||||||
{
|
{
|
||||||
|
@ -3613,15 +3615,15 @@ PrintNameOrOrdinal (
|
||||||
// October 14, 1997
|
// October 14, 1997
|
||||||
//
|
//
|
||||||
/* print contents of dialog */
|
/* print contents of dialog */
|
||||||
int WINAPI
|
void WINAPI
|
||||||
PrintDialog (
|
PrintDialog (
|
||||||
char **psz)
|
char **psz)
|
||||||
{
|
{
|
||||||
int i, j, k, l, n, c;
|
int i/*, j, k, l, n, c*/;
|
||||||
int num, size;
|
int num, size;
|
||||||
DWORD flag;
|
DWORD flag;
|
||||||
WORD class;
|
WORD class;
|
||||||
char buff[32];
|
//char buff[32];
|
||||||
char *ptr, *pmax;
|
char *ptr, *pmax;
|
||||||
BOOL isStrange = FALSE;
|
BOOL isStrange = FALSE;
|
||||||
|
|
||||||
|
@ -3924,9 +3926,9 @@ main (
|
||||||
PIMAGE_FILE_HEADER pfh;
|
PIMAGE_FILE_HEADER pfh;
|
||||||
PIMAGE_OPTIONAL_HEADER poh;
|
PIMAGE_OPTIONAL_HEADER poh;
|
||||||
PIMAGE_SECTION_HEADER psh;
|
PIMAGE_SECTION_HEADER psh;
|
||||||
IMAGE_SECTION_HEADER idsh;
|
//IMAGE_SECTION_HEADER idsh;
|
||||||
IMAGE_SECTION_HEADER shdr[MAXSECTIONNUMBER];
|
IMAGE_SECTION_HEADER shdr[MAXSECTIONNUMBER];
|
||||||
PIMAGE_IMPORT_MODULE_DIRECTORY pid;
|
//PIMAGE_IMPORT_MODULE_DIRECTORY pid;
|
||||||
|
|
||||||
int nSections; // number of sections
|
int nSections; // number of sections
|
||||||
|
|
||||||
|
@ -3945,10 +3947,10 @@ main (
|
||||||
int imageBase;
|
int imageBase;
|
||||||
int entryPoint;
|
int entryPoint;
|
||||||
|
|
||||||
int i, j, k, n;
|
int i, j, /*k,*/ n;
|
||||||
int mnsize;
|
//int mnsize;
|
||||||
int nCnt;
|
//int nCnt;
|
||||||
int nSize;
|
//int nSize;
|
||||||
int fsize;
|
int fsize;
|
||||||
char *pnstr;
|
char *pnstr;
|
||||||
char *pst;
|
char *pst;
|
||||||
|
|
|
@ -18,7 +18,7 @@ void help(void)
|
||||||
puts("Usage: cat [file]");
|
puts("Usage: cat [file]");
|
||||||
}
|
}
|
||||||
|
|
||||||
main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
FILE *srcf;
|
FILE *srcf;
|
||||||
char *keys[]={"--help","/help"};
|
char *keys[]={"--help","/help"};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: tlist.c,v 1.6 2003/08/03 18:06:02 ea Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* ReactOS Project
|
* ReactOS Project
|
||||||
* TList
|
* TList
|
||||||
|
@ -123,7 +123,7 @@ ProcessHasDescendants (
|
||||||
++ Count;
|
++ Count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(PBYTE) pInfo += pInfo->NextEntryDelta;
|
pInfo = (PSYSTEM_PROCESSES)((PBYTE)pInfo + pInfo->NextEntryDelta);
|
||||||
|
|
||||||
} while (0 != pInfo->NextEntryDelta);
|
} while (0 != pInfo->NextEntryDelta);
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ PrintProcessAndDescendants (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(PBYTE) pInfo += pInfo->NextEntryDelta;
|
pInfo = (PSYSTEM_PROCESSES)((PBYTE)pInfo + pInfo->NextEntryDelta);
|
||||||
|
|
||||||
} while (0 != pInfo->NextEntryDelta);
|
} while (0 != pInfo->NextEntryDelta);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: win32err.c,v 1.1 1999/05/16 07:27:35 ea Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* win32err.c
|
* win32err.c
|
||||||
*
|
*
|
||||||
|
@ -47,14 +47,14 @@ PrintWin32Error(
|
||||||
DWORD ErrorCode
|
DWORD ErrorCode
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
LPVOID lpMsgBuf;
|
PVOID lpMsgBuf;
|
||||||
|
|
||||||
FormatMessageW(
|
FormatMessageW(
|
||||||
(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM),
|
(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM),
|
||||||
NULL,
|
NULL,
|
||||||
ErrorCode,
|
ErrorCode,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
(PWCHAR) & lpMsgBuf,
|
(LPWSTR)& lpMsgBuf,
|
||||||
0,
|
0,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
|
@ -320,7 +320,7 @@ void AddFileInfoValue(HWND hDlg, void* pVersionData, struct LANGANDCODEPAGE lpTr
|
||||||
wsprintf(SubBlock, TEXT("\\StringFileInfo\\%04x%04x\\%s"),
|
wsprintf(SubBlock, TEXT("\\StringFileInfo\\%04x%04x\\%s"),
|
||||||
lpTranslate.wLanguage, lpTranslate.wCodePage, info_str);
|
lpTranslate.wLanguage, lpTranslate.wCodePage, info_str);
|
||||||
// Retrieve file description for language and code page "i".
|
// Retrieve file description for language and code page "i".
|
||||||
if (VerQueryValue(pVersionData, SubBlock, &pVal, &nValLen)) {
|
if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) {
|
||||||
ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, info_str);
|
ListBox_InsertItemData(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_TYPES), i, info_str);
|
||||||
// ListBox_InsertItemData(pane->hwnd, idx, entry);
|
// ListBox_InsertItemData(pane->hwnd, idx, entry);
|
||||||
SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, (LPARAM)pVal);
|
SendMessage(GetDlgItem(hDlg, IDC_LIST_PROP_VERSION_VALUES), WM_SETTEXT, 0, (LPARAM)pVal);
|
||||||
|
@ -375,7 +375,7 @@ void CheckForFileInfo(HWND hDlg, TCHAR* strFilename)
|
||||||
UINT nValLen;
|
UINT nValLen;
|
||||||
// LPTSTR SubBlock = _T("\\");
|
// LPTSTR SubBlock = _T("\\");
|
||||||
_tcscpy(SubBlock, TEXT("\\"));
|
_tcscpy(SubBlock, TEXT("\\"));
|
||||||
if (VerQueryValue(pVersionData, SubBlock, &pVal, &nValLen)) {
|
if (VerQueryValue(pVersionData, SubBlock, (PVOID)&pVal, &nValLen)) {
|
||||||
if (nValLen == sizeof(VS_FIXEDFILEINFO)) {
|
if (nValLen == sizeof(VS_FIXEDFILEINFO)) {
|
||||||
ShowFixedFileInfo(hDlg, (VS_FIXEDFILEINFO*)pVal);
|
ShowFixedFileInfo(hDlg, (VS_FIXEDFILEINFO*)pVal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,11 +36,6 @@ void UpdateStatus(HWND hWnd, Entry* pEntry);
|
||||||
|
|
||||||
BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv);
|
BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv);
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#define NMTVDISPINFO TV_DISPINFO
|
|
||||||
#define NMTVDISPINFO TV_DISPINFO
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void OnGetDispInfo(NMTVDISPINFO* ptvdi);
|
void OnGetDispInfo(NMTVDISPINFO* ptvdi);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue