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)
{
unsigned char *txt;
char *txt;
txt = DfCalloc(1, strlen(ct->itext)+10);
if (ct->setting == DF_OFF) {
txt[0] = DF_CHANGECOLOR;

View file

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

View file

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

View file

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

View file

@ -10,7 +10,7 @@
/* ----------- popdown menu selection structure
one for each selection on a popdown menu --------- */
struct DfPopDown {
unsigned char *SelectionTitle; /* title of the selection */
char *SelectionTitle; /* title of the selection */
int ActionId; /* the command executed */
int Accelerator; /* the accelerator key */
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)
{
int wd;
unsigned char sep[80], *cp = sep;
unsigned char sel[80];
char sep[80], *cp = sep;
char sel[80];
struct DfPopDown *ActivePopDown;
struct DfPopDown *pd1;
@ -371,10 +371,9 @@ static int SelectionWidth(struct DfPopDown *pd)
}
/* ----- copy a menu command to a display buffer ---- */
int DfCopyCommand(unsigned char *dest, unsigned char *src,
int skipcolor, int bg)
int DfCopyCommand(char *dest, char *src, int skipcolor, int bg)
{
unsigned char *d = dest;
char *d = dest;
while (*src && *src != '\n') {
if (*src == DF_SHORTCUTCHAR) {
src++;

View file

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

View file

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

View file

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