fixed warnings

svn path=/trunk/; revision=15218
This commit is contained in:
Thomas Bluemel 2005-05-11 16:50:39 +00:00
parent 58d25e229d
commit abef9ffacb
30 changed files with 118 additions and 107 deletions

View file

@ -18,7 +18,7 @@ void PaintMsg(DFWINDOW wnd, DF_CTLWINDOW *ct, DFRECT *rc)
} }
if (ct->itext != NULL) if (ct->itext != NULL)
{ {
unsigned char *txt; char *txt;
txt = DfCalloc(1, strlen(ct->itext)+10); txt = DfCalloc(1, strlen(ct->itext)+10);
if (ct->setting == DF_OFF) { if (ct->setting == DF_OFF) {
txt[0] = DF_CHANGECOLOR; txt[0] = DF_CHANGECOLOR;

View file

@ -101,7 +101,7 @@ typedef struct DfWindow
/* ----------------- text box fields ------------------ */ /* ----------------- text box fields ------------------ */
int wlines; /* number of lines of text */ int wlines; /* number of lines of text */
int wtop; /* text line that is on the top display */ int wtop; /* text line that is on the top display */
unsigned char *text; /* window text */ char *text; /* window text */
unsigned int textlen; /* text length */ unsigned int textlen; /* text length */
int wleft; /* left position in window viewport */ int wleft; /* left position in window viewport */
int textwidth; /* width of longest line in textbox */ int textwidth; /* width of longest line in textbox */
@ -124,7 +124,7 @@ typedef struct DfWindow
int CurrLine; /* Current line */ int CurrLine; /* Current line */
int WndRow; /* Current window row */ int WndRow; /* Current window row */
BOOL TextChanged; /* TRUE if text has changed */ BOOL TextChanged; /* TRUE if text has changed */
unsigned char *DeletedText; /* for undo */ char *DeletedText; /* for undo */
unsigned DeletedLength; /* Length of deleted field */ unsigned DeletedLength; /* Length of deleted field */
BOOL InsertMode; /* TRUE or FALSE for text insert */ BOOL InsertMode; /* TRUE or FALSE for text insert */
BOOL WordWrapMode; /* TRUE or FALSE for word wrap */ BOOL WordWrapMode; /* TRUE or FALSE for word wrap */
@ -250,40 +250,40 @@ extern BOOL DfClipString;
/* --------- space between menubar labels --------- */ /* --------- space between menubar labels --------- */
#define DF_MSPACE 2 #define DF_MSPACE 2
/* --------------- border characters ------------- */ /* --------------- border characters ------------- */
#define DF_FOCUS_NW (unsigned char) '\xc9' #define DF_FOCUS_NW '\xc9'
#define DF_FOCUS_NE (unsigned char) '\xbb' #define DF_FOCUS_NE '\xbb'
#define DF_FOCUS_SE (unsigned char) '\xbc' #define DF_FOCUS_SE '\xbc'
#define DF_FOCUS_SW (unsigned char) '\xc8' #define DF_FOCUS_SW '\xc8'
#define DF_FOCUS_SIDE (unsigned char) '\xba' #define DF_FOCUS_SIDE '\xba'
#define DF_FOCUS_LINE (unsigned char) '\xcd' #define DF_FOCUS_LINE '\xcd'
#define DF_NW (unsigned char) '\xda' #define DF_NW '\xda'
#define DF_NE (unsigned char) '\xbf' #define DF_NE '\xbf'
#define DF_SE (unsigned char) '\xd9' #define DF_SE '\xd9'
#define DF_SW (unsigned char) '\xc0' #define DF_SW '\xc0'
#define DF_SIDE (unsigned char) '\xb3' #define DF_SIDE '\xb3'
#define DF_LINE (unsigned char) '\xc4' #define DF_LINE '\xc4'
#define DF_LEDGE (unsigned char) '\xc3' #define DF_LEDGE '\xc3'
#define DF_REDGE (unsigned char) '\xb4' #define DF_REDGE '\xb4'
/* ------------- scroll bar characters ------------ */ /* ------------- scroll bar characters ------------ */
#define DF_UPSCROLLBOX (unsigned char) '\x1e' #define DF_UPSCROLLBOX '\x1e'
#define DF_DOWNSCROLLBOX (unsigned char) '\x1f' #define DF_DOWNSCROLLBOX '\x1f'
#define DF_LEFTSCROLLBOX (unsigned char) '\x11' #define DF_LEFTSCROLLBOX '\x11'
#define DF_RIGHTSCROLLBOX (unsigned char) '\x10' #define DF_RIGHTSCROLLBOX '\x10'
#define DF_SCROLLBARCHAR (unsigned char) 176 #define DF_SCROLLBARCHAR '\xb0'
#define DF_SCROLLBOXCHAR (unsigned char) 178 #define DF_SCROLLBOXCHAR '\xb2'
/* ------------------ menu characters --------------------- */ /* ------------------ menu characters --------------------- */
#define DF_CHECKMARK (unsigned char) '\x04' //(DF_SCREENHEIGHT==25?251:4) #define DF_CHECKMARK '\x04' //(DF_SCREENHEIGHT==25?251:4)
#define DF_CASCADEPOINTER (unsigned char) '\x10' #define DF_CASCADEPOINTER '\x10'
/* ----------------- title bar characters ----------------- */ /* ----------------- title bar characters ----------------- */
#define DF_CONTROLBOXCHAR (unsigned char) '\xf0' #define DF_CONTROLBOXCHAR '\xf0'
#define DF_MAXPOINTER 24 /* maximize token */ #define DF_MAXPOINTER '\x18' /* maximize token */
#define DF_MINPOINTER 25 /* minimize token */ #define DF_MINPOINTER '\x19' /* minimize token */
#define DF_RESTOREPOINTER 18 /* restore token */ #define DF_RESTOREPOINTER '\x12' /* restore token */
/* --------------- text control characters ---------------- */ /* --------------- text control characters ---------------- */
#define DF_APPLCHAR (unsigned char) 176 /* fills application window */ #define DF_APPLCHAR '\xb0' /* fills application window */
#define DF_SHORTCUTCHAR '~' /* prefix: shortcut key display */ #define DF_SHORTCUTCHAR '~' /* prefix: shortcut key display */
#define DF_CHANGECOLOR (unsigned char) 174 /* prefix to change colors */ #define DF_CHANGECOLOR '\xae' /* prefix to change colors */
#define DF_RESETCOLOR (unsigned char) 175 /* reset colors to default */ #define DF_RESETCOLOR '\xaf' /* reset colors to default */
#define DF_LISTSELECTOR 4 /* selected list box entry */ #define DF_LISTSELECTOR 4 /* selected list box entry */
/* --------- message prototypes ----------- */ /* --------- message prototypes ----------- */
@ -376,7 +376,7 @@ void DfCopyToClipboard(DFWINDOW);
BOOL DfPasteText(DFWINDOW, char *, unsigned); BOOL DfPasteText(DFWINDOW, char *, unsigned);
void DfClearClipboard(void); void DfClearClipboard(void);
/* --------- menu prototypes ---------- */ /* --------- menu prototypes ---------- */
int DfCopyCommand(unsigned char *, unsigned char *, int, int); int DfCopyCommand(char *, char *, int, int);
void DfPrepFileMenu(void *, struct DfMenu *); void DfPrepFileMenu(void *, struct DfMenu *);
void DfPrepEditMenu(void *, struct DfMenu *); void DfPrepEditMenu(void *, struct DfMenu *);
void DfPrepSearchMenu(void *, struct DfMenu *); void DfPrepSearchMenu(void *, struct DfMenu *);

View file

@ -430,7 +430,7 @@ void DfGetItemText(DFWINDOW wnd, enum DfCommands cmd,
char *text, int len) char *text, int len)
{ {
DF_CTLWINDOW *ct = DfFindCommand(wnd->extension, cmd, DF_EDITBOX); DF_CTLWINDOW *ct = DfFindCommand(wnd->extension, cmd, DF_EDITBOX);
unsigned char *cp; char *cp;
if (ct == NULL) if (ct == NULL)
ct = DfFindCommand(wnd->extension, cmd, DF_COMBOBOX); ct = DfFindCommand(wnd->extension, cmd, DF_COMBOBOX);

View file

@ -393,7 +393,7 @@ static void PrintPad(DFWINDOW wnd)
{ {
long percent; long percent;
BOOL KeepPrinting = TRUE; BOOL KeepPrinting = TRUE;
unsigned char *text = DfGetText(wnd); char *text = DfGetText(wnd);
unsigned oldpct = 100, cct = 0, len = strlen(text); unsigned oldpct = 100, cct = 0, len = strlen(text);
DFWINDOW swnd = DfSliderBox(20, DfGetTitle(wnd), "Printing"); DFWINDOW swnd = DfSliderBox(20, DfGetTitle(wnd), "Printing");
/* ------- print the notepad text --------- */ /* ------- print the notepad text --------- */

View file

@ -326,7 +326,7 @@ static void ReadHelp(DFWINDOW wnd)
cwnd->wndproc = HelpTextProc; cwnd->wndproc = HelpTextProc;
/* ----- read the help text ------- */ /* ----- read the help text ------- */
while (TRUE) { while (TRUE) {
unsigned char *cp = hline, *cp1; char *cp = hline, *cp1;
int colorct = 0; int colorct = 0;
if (DfGetHelpLine(hline) == NULL) if (DfGetHelpLine(hline) == NULL)
break; break;

View file

@ -10,7 +10,7 @@
/* ----------- popdown menu selection structure /* ----------- popdown menu selection structure
one for each selection on a popdown menu --------- */ one for each selection on a popdown menu --------- */
struct DfPopDown { struct DfPopDown {
unsigned char *SelectionTitle; /* title of the selection */ char *SelectionTitle; /* title of the selection */
int ActionId; /* the command executed */ int ActionId; /* the command executed */
int Accelerator; /* the accelerator key */ int Accelerator; /* the accelerator key */
int Attrib; /* DF_INACTIVE | DF_CHECKED | DF_TOGGLE | DF_CASCADED*/ int Attrib; /* DF_INACTIVE | DF_CHECKED | DF_TOGGLE | DF_CASCADED*/

View file

@ -83,8 +83,8 @@ static BOOL ButtonReleasedMsg(DFWINDOW wnd, DF_PARAM p1, DF_PARAM p2)
static void PaintMsg(DFWINDOW wnd) static void PaintMsg(DFWINDOW wnd)
{ {
int wd; int wd;
unsigned char sep[80], *cp = sep; char sep[80], *cp = sep;
unsigned char sel[80]; char sel[80];
struct DfPopDown *ActivePopDown; struct DfPopDown *ActivePopDown;
struct DfPopDown *pd1; struct DfPopDown *pd1;
@ -371,10 +371,9 @@ static int SelectionWidth(struct DfPopDown *pd)
} }
/* ----- copy a menu command to a display buffer ---- */ /* ----- copy a menu command to a display buffer ---- */
int DfCopyCommand(unsigned char *dest, unsigned char *src, int DfCopyCommand(char *dest, char *src, int skipcolor, int bg)
int skipcolor, int bg)
{ {
unsigned char *d = dest; char *d = dest;
while (*src && *src != '\n') { while (*src && *src != '\n') {
if (*src == DF_SHORTCUTCHAR) { if (*src == DF_SHORTCUTCHAR) {
src++; src++;

View file

@ -621,9 +621,9 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
{ {
int len = 0; int len = 0;
int dif = 0; int dif = 0;
unsigned char line[200]; char line[200];
DFRECT rc; DFRECT rc;
unsigned char *lp, *svlp; char *lp, *svlp;
int lnlen; int lnlen;
int i; int i;
BOOL trunc = FALSE; BOOL trunc = FALSE;
@ -707,7 +707,7 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
for (i = 0; i < wnd->wleft+3; i++) { for (i = 0; i < wnd->wleft+3; i++) {
if (*(lp+i) == '\0') if (*(lp+i) == '\0')
break; break;
if (*(unsigned char *)(lp + i) == DF_RESETCOLOR) if (*(lp + i) == DF_RESETCOLOR)
break; break;
} }
if (*(lp+i) && i < wnd->wleft+3) { if (*(lp+i) && i < wnd->wleft+3) {
@ -721,7 +721,7 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
for (i = 0; i < wnd->wleft; i++) { for (i = 0; i < wnd->wleft; i++) {
if (*(lp+i) == '\0') if (*(lp+i) == '\0')
break; break;
if (*(unsigned char *)(lp + i) == DF_CHANGECOLOR) { if (*(lp + i) == DF_CHANGECOLOR) {
*(lp+wnd->wleft+2) = *(lp+i+2); *(lp+wnd->wleft+2) = *(lp+i+2);
*(lp+wnd->wleft+1) = *(lp+i+1); *(lp+wnd->wleft+1) = *(lp+i+1);
*(lp+wnd->wleft) = *(lp+i); *(lp+wnd->wleft) = *(lp+i);
@ -741,9 +741,9 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
char *initlp = lp; char *initlp = lp;
/* --- point to end of clipped line --- */ /* --- point to end of clipped line --- */
while (ct) { while (ct) {
if (*(unsigned char *)lp == DF_CHANGECOLOR) if (*lp == DF_CHANGECOLOR)
lp += 3; lp += 3;
else if (*(unsigned char *)lp == DF_RESETCOLOR) else if (*lp == DF_RESETCOLOR)
lp++; lp++;
else else
lp++, --ct; lp++, --ct;
@ -751,13 +751,12 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
if (DfRectLeft(rc)) { if (DfRectLeft(rc)) {
char *lpp = lp; char *lpp = lp;
while (*lpp) { while (*lpp) {
if (*(unsigned char*)lpp==DF_CHANGECOLOR) if (*lpp==DF_CHANGECOLOR)
break; break;
if (*(unsigned char*)lpp==DF_RESETCOLOR) { if (*lpp==DF_RESETCOLOR) {
lpp = lp; lpp = lp;
while (lpp >= initlp) { while (lpp >= initlp) {
if (*(unsigned char *)lpp == if (*lpp == DF_CHANGECOLOR) {
DF_CHANGECOLOR) {
lp -= 3; lp -= 3;
memmove(lp,lpp,3); memmove(lp,lpp,3);
break; break;
@ -790,7 +789,7 @@ void DfWriteTextLine(DFWINDOW wnd, DFRECT *rcc, int y, BOOL reverse)
cp += 2; cp += 2;
*cp++ = DfBackground | 0x80; *cp++ = DfBackground | 0x80;
} }
if (*(unsigned char *)line == DF_CHANGECOLOR) if (*line == DF_CHANGECOLOR)
dif = 3; dif = 3;
} }
else else

View file

@ -186,7 +186,7 @@ void DfWPuts(DFWINDOW wnd, void *s, int x, int y)
WORD attr[200]; WORD attr[200];
char *cp = ln; char *cp = ln;
WORD *ap = attr; WORD *ap = attr;
unsigned char *str = s; char *str = s;
int fg = DfForeground; int fg = DfForeground;
int bg = DfBackground; int bg = DfBackground;
int len; int len;

View file

@ -94,7 +94,7 @@ void DfInsertTitle(DFWINDOW wnd, char *ttl)
strcpy(wnd->title, ttl); strcpy(wnd->title, ttl);
} }
static unsigned char line[300]; static char line[300];
/* ------ write a line to video window client area ------ */ /* ------ write a line to video window client area ------ */
void DfWriteLine(DFWINDOW wnd, char *str, int x, int y, BOOL pad) void DfWriteLine(DFWINDOW wnd, char *str, int x, int y, BOOL pad)

View file

@ -22,7 +22,7 @@ void PaintRect(HDC hdc, RECT *rect, COLORREF col);
void LoadCardBitmapsFromLibrary(HINSTANCE hCardDll, int *pwidth, int *pheight) void LoadCardBitmapsFromLibrary(HINSTANCE hCardDll, int *pwidth, int *pheight)
{ {
HBITMAP hBitmap; HBITMAP hBitmap;
HDC hdcCard; HDC hdcCard = NULL;
HANDLE hOld; HANDLE hOld;
int i, xpos; int i, xpos;
int width, height; int width, height;
@ -41,16 +41,16 @@ void LoadCardBitmapsFromLibrary(HINSTANCE hCardDll, int *pwidth, int *pheight)
width = bmp.bmWidth; width = bmp.bmWidth;
height = bmp.bmHeight; height = bmp.bmHeight;
if(i == 0) //if first time through, create BIG bitmap.. if(i == 0) //if first time through, create BIG bitmap..
{ {
HDC hdc = GetDC(0); HDC hdc = GetDC(0);
__hdcCardBitmaps = CreateCompatibleDC(hdc); __hdcCardBitmaps = CreateCompatibleDC(hdc);
__hbmCardBitmaps = CreateCompatibleBitmap(hdc, width * NUMCARDBITMAPS, height); __hbmCardBitmaps = CreateCompatibleBitmap(hdc, width * NUMCARDBITMAPS, height);
SelectObject(__hdcCardBitmaps, __hbmCardBitmaps); SelectObject(__hdcCardBitmaps, __hbmCardBitmaps);
hdcCard = CreateCompatibleDC(0); hdcCard = CreateCompatibleDC(0);
ReleaseDC(0, hdc); ReleaseDC(0, hdc);
} }

View file

@ -13,7 +13,7 @@ class CardButton
// Constructor is PRIVATE - only a // Constructor is PRIVATE - only a
// CardWindow can create buttons! // CardWindow can create buttons!
// //
CardButton(CardWindow &parent, int id, TCHAR *szText, UINT style, bool visible, CardButton(CardWindow &parent, int id, TCHAR *szText, UINT style, bool visible,
int x, int y, int width, int height); int x, int y, int width, int height);
~CardButton(); ~CardButton();

View file

@ -72,6 +72,7 @@ void CardLib_SetZoomSpeed(int);
class CardRegion; class CardRegion;
class CardButton; class CardButton;
class CardStack; class CardStack;
class CardWindow;
typedef bool (CARDLIBPROC *pCanDragProc) (CardRegion &stackobj, int iNumDragging); typedef bool (CARDLIBPROC *pCanDragProc) (CardRegion &stackobj, int iNumDragging);
typedef bool (CARDLIBPROC *pCanDropProc) (CardRegion &stackobj, const CardStack &cards); typedef bool (CARDLIBPROC *pCanDropProc) (CardRegion &stackobj, const CardStack &cards);

View file

@ -354,7 +354,7 @@ void edit_init_menu_emacs (void);
void edit_init_menu_normal (void); void edit_init_menu_normal (void);
void edit_done_menu (void); void edit_done_menu (void);
int edit_raw_key_query (char *heading, char *query, int cancel); int edit_raw_key_query (char *heading, char *query, int cancel);
char *strcasechr (const unsigned char *s, int c); char *strcasechr (const char *s, int c);
int edit (const char *_file, int line); int edit (const char *_file, int line);
int edit_translate_key (WEdit * edit, unsigned int x_keycode, long x_key, int x_state, int *cmd, int *ch); int edit_translate_key (WEdit * edit, unsigned int x_keycode, long x_key, int x_state, int *cmd, int *ch);

View file

@ -62,12 +62,12 @@ static inline int my_lower_case (int c)
return tolower(c); return tolower(c);
} }
char *strcasechr (const unsigned char *s, int c) char *strcasechr (const char *s, int c)
{ {
for (; my_lower_case ((int) *s) != my_lower_case (c); ++s) for (; my_lower_case ((int) *s) != my_lower_case (c); ++s)
if (*s == '\0') if (*s == '\0')
return 0; return 0;
return (char *) s; return (char *)s;
} }

View file

@ -19,6 +19,8 @@
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../src/tty.h" #include "../src/tty.h"
#include "../src/mad.h" #include "../src/mad.h"
#include "../src/color.h" #include "../src/color.h"

View file

@ -1019,7 +1019,7 @@ static void write_attributes (unsigned short *src, int count)
#ifdef WIN32 #ifdef WIN32
register unsigned char * org_src = (unsigned char*)src; register unsigned char * org_src = (unsigned char*)src;
COORD coord; COORD coord;
long bytes; DWORD bytes;
#endif #endif
#if !defined (USE_ASM) #if !defined (USE_ASM)
# if defined (HAS_LINEAR_SCREEN) # if defined (HAS_LINEAR_SCREEN)
@ -1057,7 +1057,7 @@ static void write_attributes (unsigned short *src, int count)
p = Line_Buffer; p = Line_Buffer;
coord.X = Cursor_Col; coord.X = Cursor_Col;
coord.Y = Cursor_Row; coord.Y = Cursor_Row;
WriteConsoleOutputCharacter(hStdout, p, count, coord, &bytes); WriteConsoleOutputCharacter(hStdout, (char*)p, count, coord, &bytes);
/* write color attributes */ /* write color attributes */
p = Line_Buffer; p = Line_Buffer;
@ -1162,7 +1162,7 @@ void narrow_width (void)
void SLtt_cls (void) void SLtt_cls (void)
{ {
#ifdef WIN32 #ifdef WIN32
long bytes; DWORD bytes;
COORD coord; COORD coord;
char ch; char ch;
#endif #endif
@ -1224,7 +1224,7 @@ void SLtt_putchar (char ch)
#if !defined (GO32_VIDEO) && !defined (EMX_VIDEO) #if !defined (GO32_VIDEO) && !defined (EMX_VIDEO)
unsigned short p, *pp; unsigned short p, *pp;
# if defined(WIN32) # if defined(WIN32)
long bytes; DWORD bytes;
# endif # endif
#endif #endif

View file

@ -48,7 +48,7 @@ int SLang_init_tty (int abort_char, int no_flow_control, int opost)
{ {
SMALL_RECT windowRect; SMALL_RECT windowRect;
COORD newPosition; COORD newPosition;
long flags; DWORD flags;
#ifndef SLANG_SAVES_CONSOLE #ifndef SLANG_SAVES_CONSOLE
/* first off, create a new console so the old one can be restored on exit */ /* first off, create a new console so the old one can be restored on exit */
@ -132,7 +132,7 @@ int SLsys_input_pending (int tsecs)
{ {
INPUT_RECORD record; INPUT_RECORD record;
long one = 1; long one = 1;
long bytesRead; DWORD bytesRead;
while (1) while (1)
{ {
@ -195,7 +195,8 @@ int SLsys_input_pending (int tsecs)
unsigned int SLsys_getkey (void) unsigned int SLsys_getkey (void)
{ {
unsigned int scan, ch, shift; unsigned int scan, ch, shift;
long key, bytesRead; long key;
DWORD bytesRead;
INPUT_RECORD record; INPUT_RECORD record;
while (1) { while (1) {

View file

@ -2381,7 +2381,7 @@ panel_operate (void *source_panel, int operation, char *thedefault)
else else
dest_dir = panel->cwd; dest_dir = panel->cwd;
rx.buffer = (char *) xmalloc (MC_MAXPATHLEN, "mask copying"); rx.buffer = (unsigned char *) xmalloc (MC_MAXPATHLEN, "mask copying");
rx.allocated = MC_MAXPATHLEN; rx.allocated = MC_MAXPATHLEN;
rx.translate = 0; rx.translate = 0;
dest = file_mask_dialog (operation, cmd_buf, dest_dir, only_one, &do_bg); dest = file_mask_dialog (operation, cmd_buf, dest_dir, only_one, &do_bg);

View file

@ -43,6 +43,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <malloc.h> #include <malloc.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include "mad.h" #include "mad.h"
#include "color.h" #include "color.h"
#include "util.h" #include "util.h"

View file

@ -94,9 +94,9 @@ static void menubar_paint_idx (WMenu *menubar, int idx, int color)
widget_move (&menubar->widget, y, x + 1); widget_move (&menubar->widget, y, x + 1);
hline (slow_terminal ? ' ' : ACS_HLINE, menubar->max_entry_len); hline (slow_terminal ? ' ' : ACS_HLINE, menubar->max_entry_len);
} else { } else {
unsigned char *text = menu->entries [idx].text; char *text = menu->entries [idx].text;
addch((unsigned char)menu->entries [idx].first_letter); addch(menu->entries [idx].first_letter);
for (text = menu->entries [idx].text; *text; text++) for (text = menu->entries [idx].text; *text; text++)
{ {
if (*text == '&') if (*text == '&')

View file

@ -4229,7 +4229,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Compare that many; failure if mismatch, else move /* Compare that many; failure if mismatch, else move
past them. */ past them. */
if (translate if (translate
? bcmp_translate (d, d2, mcnt, translate) ? bcmp_translate ((unsigned char*)d, (unsigned char*)d2, mcnt, translate)
: bcmp (d, d2, mcnt)) : bcmp (d, d2, mcnt))
goto fail; goto fail;
d += mcnt, d2 += mcnt; d += mcnt, d2 += mcnt;

View file

@ -186,7 +186,7 @@ view_done (WView *view)
set_monitor (view, off); set_monitor (view, off);
#ifndef HAVE_MMAP #ifndef HAVE_MMAP
/* alex: release core, used to replace mmap */ /* alex: release core, used to replace mmap */
if (!view->growing_buffer && view->data != (unsigned char*)0) if (!view->growing_buffer && view->data != NULL)
{ {
free(view->data); free(view->data);
view->data = NULL; view->data = NULL;
@ -547,12 +547,12 @@ static char *load_view_file (WView *view, char *filename)
** For those OS that dont provide mmap call. Try to load all the file ** For those OS that dont provide mmap call. Try to load all the file
** into memory (alex@bcs.zaporizhzhe.ua) ** into memory (alex@bcs.zaporizhzhe.ua)
*/ */
view->data = (unsigned char*) xmalloc (view->s.st_size, "load_view_file"); view->data = (char*) xmalloc (view->s.st_size, "load_view_file");
if (view->data == (unsigned char*) 0 if (view->data == NULL
|| mc_lseek(view->file,0,0) != 0 || mc_lseek(view->file,0,0) != 0
|| mc_read(view->file, view->data, view->s.st_size) != view->s.st_size || mc_read(view->file, view->data, view->s.st_size) != view->s.st_size
) { ) {
if (view->data != (unsigned char*)0) if (view->data != NULL)
free(view->data); free(view->data);
close_view_file (view); close_view_file (view);
return init_growing_view (view, 0, filename); return init_growing_view (view, 0, filename);

View file

@ -4,7 +4,7 @@
#ifdef WANT_WIDGETS #ifdef WANT_WIDGETS
/* The growing buffers data types */ /* The growing buffers data types */
typedef struct { typedef struct {
unsigned char *data; char *data;
int present; /* Unused, for DOS port maybe */ int present; /* Unused, for DOS port maybe */
} block_ptr_t; } block_ptr_t;
@ -22,7 +22,7 @@ typedef struct {
int view_active; int view_active;
int have_frame; int have_frame;
unsigned char *data; /* Memory area for the file to be viewed */ char *data; /* Memory area for the file to be viewed */
/* File information */ /* File information */
int file; /* File descriptor (for mmap and munmap) */ int file; /* File descriptor (for mmap and munmap) */

View file

@ -371,7 +371,7 @@ radio_callback (Dlg_head *h, WRadio *r, int Msg, int Par)
case WIDGET_FOCUS: case WIDGET_FOCUS:
case WIDGET_DRAW: case WIDGET_DRAW:
for (i = 0; i < r->count; i++){ for (i = 0; i < r->count; i++){
register unsigned char* cp; register char* cp;
attrset ((i==r->pos && Msg==WIDGET_FOCUS) ? FOCUSC :NORMALC); attrset ((i==r->pos && Msg==WIDGET_FOCUS) ? FOCUSC :NORMALC);
widget_move (&r->widget, i, 0); widget_move (&r->widget, i, 0);

View file

@ -12,6 +12,27 @@
#include "main.h" #include "main.h"
// This is the struct where the toolbar is defined
const TBBUTTON Buttons [] =
{
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP},
{0, 1, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON}, // No Action
{1, 2, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON}, // Install
{2, 3, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON}, // Install from source
{3, 4, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON}, // Update
{4, 5, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON}, // Unistall
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP},
{5, 6, TBSTATE_ENABLED, TBSTYLE_BUTTON}, // DoIt (tm)
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP},
{6, 7, TBSTATE_ENABLED, TBSTYLE_BUTTON}, // Help
{7, 8, TBSTATE_ENABLED, TBSTYLE_BUTTON}, // Options
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP},
};
// Application's Entry Point // Application's Entry Point
int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)

View file

@ -41,22 +41,5 @@ int Ask (const WCHAR* message);
#define TBSTYLE_FLAT 2048 #define TBSTYLE_FLAT 2048
// This is the struct where the toolbar is defined // This is the struct where the toolbar is defined
TBBUTTON Buttons [] = extern const TBBUTTON Buttons [];
{
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
{0, 1, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // No Action
{1, 2, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install
{2, 3, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install from source
{3, 4, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Update
{4, 5, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Unistall
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
{5, 6, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // DoIt (tm)
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
{6, 7, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Help
{7, 8, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Options
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
};

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.15 2004/12/27 20:09:57 gvg Exp $ # $Id$
# #
# ReactOS System Utilities # ReactOS System Utilities
# #
@ -25,7 +25,7 @@
PATH_TO_TOP=.. PATH_TO_TOP=..
PATH_TO_CVSROOT=../$(PATH_TO_TOP) PATH_TO_CVSROOT=../$(PATH_TO_TOP)
BASE_CFLAGS = -I$(PATH_TO_CVSROOT)/reactos/include -D_M_IX86 BASE_CFLAGS = -I$(PATH_TO_CVSROOT)/reactos/include -D_M_IX86 -Wno-strict-aliasing
ROS_DIR=$(PATH_TO_CVSROOT)/reactos ROS_DIR=$(PATH_TO_CVSROOT)/reactos

View file

@ -1149,7 +1149,7 @@ GetSectionNames (
/* count the number of chars used in the section names */ /* count the number of chars used in the section names */
for (i = 0; i < nSections; i++) for (i = 0; i < nSections; i++)
nCnt += strlen (psh[i].Name) + 1; nCnt += strlen ((char *)psh[i].Name) + 1;
/* allocate space for all section names from heap */ /* allocate space for all section names from heap */
ps = *pszSections = (char *) calloc (nCnt, 1); ps = *pszSections = (char *) calloc (nCnt, 1);
@ -1157,8 +1157,8 @@ GetSectionNames (
for (i = 0; i < nSections; i++) for (i = 0; i < nSections; i++)
{ {
strcpy (ps, psh[i].Name); strcpy (ps, (char *)psh[i].Name);
ps += strlen (psh[i].Name) + 1; ps += strlen ((char *)psh[i].Name) + 1;
} }
return nCnt; return nCnt;
@ -1184,7 +1184,7 @@ GetSectionHdrByName (
/* find the section by name */ /* find the section by name */
for (i = 0; i < nSections; i++) for (i = 0; i < nSections; i++)
{ {
if (!strcmp (psh->Name, szSection)) if (!strcmp ((char *)psh->Name, szSection))
{ {
/* copy data to header */ /* copy data to header */
bcopy ((LPVOID) psh, (LPVOID) sh, sizeof (IMAGE_SECTION_HEADER)); bcopy ((LPVOID) psh, (LPVOID) sh, sizeof (IMAGE_SECTION_HEADER));
@ -3847,7 +3847,7 @@ RetrieveModuleName (
if (pdd->Type == IMAGE_DEBUG_TYPE_MISC) if (pdd->Type == IMAGE_DEBUG_TYPE_MISC)
{ {
pdm = (PIMAGE_DEBUG_MISC) ((DWORD) pdd->PointerToRawData + (DWORD) lpFile); pdm = (PIMAGE_DEBUG_MISC) ((DWORD) pdd->PointerToRawData + (DWORD) lpFile);
*pszModule = (char *) calloc ((nCnt = (strlen (pdm->Data))) + 1, 1); *pszModule = (char *) calloc ((nCnt = (strlen ((char *)pdm->Data))) + 1, 1);
// may need some unicode business here...above // may need some unicode business here...above
bcopy (pdm->Data, *pszModule, nCnt); bcopy (pdm->Data, *pszModule, nCnt);

View file

@ -1,8 +1,12 @@
#include <windows.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
printf("Hello world\n"); WCHAR str[255];
wsprintfW(str, L"%04X", 0xab34);
printf("%S\n", str);
return(0); return(0);
} }