From a7c50d10d4bebabe862342d634afa70ffe699884 Mon Sep 17 00:00:00 2001 From: Eddy De Greef Date: Mon, 5 May 2003 16:25:56 +0000 Subject: [PATCH] Fixes for SF #732742: compiling errors (1 issue still pending). --- source/file.c | 4 ++-- source/interpret.c | 4 ++-- source/interpret.h | 4 ++-- source/macro.c | 12 +++++++----- source/tags.c | 14 +++----------- source/textDisp.c | 5 ++--- source/windowTitle.c | 4 ++-- 7 files changed, 20 insertions(+), 27 deletions(-) diff --git a/source/file.c b/source/file.c index 188ef66..d5a72ae 100644 --- a/source/file.c +++ b/source/file.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: file.c,v 1.64 2003/05/04 13:20:47 yooden Exp $"; +static const char CVSID[] = "$Id: file.c,v 1.65 2003/05/05 16:25:55 edg Exp $"; /******************************************************************************* * * * file.c -- Nirvana Editor file i/o * @@ -837,7 +837,7 @@ static int doSave(WindowInfo *window) /* add a terminating newline if the file doesn't already have one for Unix utilities which get confused otherwise */ if (BufGetCharacter(window->buffer, window->buffer->length - 1) != '\n' - && fileLen != 0 + && window->buffer->length != 0 && GetPrefAppendLF()) { BufInsert(window->buffer, window->buffer->length, "\n"); diff --git a/source/interpret.c b/source/interpret.c index b3fef85..063cc73 100644 --- a/source/interpret.c +++ b/source/interpret.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: interpret.c,v 1.32 2002/12/12 17:25:49 slobasso Exp $"; +static const char CVSID[] = "$Id: interpret.c,v 1.33 2003/05/05 16:25:55 edg Exp $"; /******************************************************************************* * * * interpret.c -- Nirvana Editor macro interpreter * @@ -698,7 +698,7 @@ Symbol *LookupSymbol(const char *name) /* ** install symbol name in symbol table */ -Symbol *InstallSymbol(const char *name, int type, DataValue value) +Symbol *InstallSymbol(const char *name, enum symTypes type, DataValue value) { Symbol *s; diff --git a/source/interpret.h b/source/interpret.h index 782d719..ee02755 100644 --- a/source/interpret.h +++ b/source/interpret.h @@ -1,4 +1,4 @@ -/* $Id: interpret.h,v 1.12 2002/12/12 17:25:52 slobasso Exp $ */ +/* $Id: interpret.h,v 1.13 2003/05/05 16:25:55 edg Exp $ */ #ifndef NEDIT_INTERPRET_H_INCLUDED #define NEDIT_INTERPRET_H_INCLUDED @@ -105,7 +105,7 @@ Symbol *InstallIteratorSymbol(); Symbol *LookupStringConstSymbol(const char *value); Symbol *InstallStringConstSymbol(const char *str); Symbol *LookupSymbol(const char *name); -Symbol *InstallSymbol(const char *name, int type, DataValue value); +Symbol *InstallSymbol(const char *name, enum symTypes type, DataValue value); Program *FinishCreatingProgram(void); void SwapCode(Inst *start, Inst *boundary, Inst *end); void StartLoopAddrList(void); diff --git a/source/macro.c b/source/macro.c index 401d194..292713d 100644 --- a/source/macro.c +++ b/source/macro.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: macro.c,v 1.67 2003/05/04 23:54:11 yooden Exp $"; +static const char CVSID[] = "$Id: macro.c,v 1.68 2003/05/05 16:25:56 edg Exp $"; /******************************************************************************* * * * macro.c -- Macro file processing, learn/replay, and built-in macro * @@ -1479,7 +1479,10 @@ static char *actionToString(Widget w, char *actionName, XEvent *event, { char chars[20], *charList[1], *outStr, *outPtr; KeySym keysym; - int i, nChars, nParams, length, nameLength, status; + int i, nChars, nParams, length, nameLength; +#ifndef NO_XMIM + int status; +#endif if (isIgnoredAction(actionName) || isRedundantAction(actionName) || isMouseAction(actionName)) @@ -4782,7 +4785,6 @@ static int getStyleMS(WindowInfo *window, DataValue *argList, int nArgs, char colorValue[20]; int r, g, b; - Pixel pixel; /* Validate number of arguments */ if (nArgs != 1) { @@ -4847,7 +4849,7 @@ static int getStyleMS(WindowInfo *window, DataValue *argList, int nArgs, } /* Prepare array element for color value */ - pixel = HighlightColorValueOfCode(window, styleCode, &r, &g, &b); + HighlightColorValueOfCode(window, styleCode, &r, &g, &b); sprintf(colorValue, "#%02x%02x%02x", r/256, g/256, b/256); DV.val.str = AllocStringCpy(colorValue); M_STR_ALLOC_ASSERT(DV); @@ -4863,7 +4865,7 @@ static int getStyleMS(WindowInfo *window, DataValue *argList, int nArgs, } /* Prepare array element for background color value */ - pixel = GetHighlightBGColorOfCode(window, styleCode,&r,&g,&b); + GetHighlightBGColorOfCode(window, styleCode,&r,&g,&b); sprintf(colorValue, "#%02x%02x%02x", r/256, g/256, b/256); DV.val.str = AllocStringCpy(colorValue); M_STR_ALLOC_ASSERT(DV); diff --git a/source/tags.c b/source/tags.c index e9be7aa..51f18f3 100644 --- a/source/tags.c +++ b/source/tags.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: tags.c,v 1.49 2003/04/07 22:51:41 yooden Exp $"; +static const char CVSID[] = "$Id: tags.c,v 1.50 2003/05/05 16:25:56 edg Exp $"; /******************************************************************************* * * * tags.c -- Nirvana editor tag file handling * @@ -1115,14 +1115,7 @@ static int findAllMatches(WindowInfo *window, const char *string) char temp[32+2*MAXPATHLEN+MAXLINE]; const char *fileToSearch, *searchString, *tagPath; char **dupTagsList; - int startPos, i, pathMatch=0,samePath=0, - langMode, nMatches=0; - tagFile *FileList; - - if (searchMode == TIP) - FileList = TipsFileList; - else /* TAG or TIP_FROM_TAG */ - FileList = TagsFileList; + int startPos, i, pathMatch=0, samePath=0, langMode, nMatches=0; /* verify that the string is reasonable as a tag */ if (*string == '\0' || strlen(string) > MAX_TAG_LEN) { @@ -1727,7 +1720,7 @@ static int nextTFBlock(FILE *fp, char *header, char **body, int *blkLine, const char *language_regex = "^\\s*\\* language \\*\\s*$"; const char *alias_regex = "^\\s*\\* alias \\*\\s*$"; char line[MAXLINE], *status; - int dummy1, found = 0; + int dummy1; int code; /* Skip blank lines and comments */ @@ -1862,7 +1855,6 @@ static int nextTFBlock(FILE *fp, char *header, char **body, int *blkLine, } /* Skip the rest of the block */ - found = 1; dummy1 = *currLine; while(fgets(line, MAXLINE, fp)) { ++(*currLine); diff --git a/source/textDisp.c b/source/textDisp.c index ed4fead..cecabbf 100644 --- a/source/textDisp.c +++ b/source/textDisp.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: textDisp.c,v 1.50 2003/05/02 18:18:47 edg Exp $"; +static const char CVSID[] = "$Id: textDisp.c,v 1.51 2003/05/05 16:25:56 edg Exp $"; /******************************************************************************* * * * textDisp.c - Display text from a text buffer * @@ -3216,7 +3216,7 @@ static void measureDeletedLines(textDisp *textD, int pos, int nDeleted) int nVisLines = textD->nVisibleLines; int *lineStarts = textD->lineStarts; int countFrom, lineStart; - int visLineNum = 0, nLines = 0, i; + int nLines = 0, i; /* ** Determine where to begin searching: either the previous newline, or ** if possible, limit to the start of the (original) previous displayed @@ -3228,7 +3228,6 @@ static void measureDeletedLines(textDisp *textD, int pos, int nDeleted) break; if (i > 0) { countFrom = lineStarts[i-1]; - visLineNum = i-1; } else countFrom = BufStartOfLine(buf, pos); } else diff --git a/source/windowTitle.c b/source/windowTitle.c index 962c775..ac99514 100644 --- a/source/windowTitle.c +++ b/source/windowTitle.c @@ -1,4 +1,4 @@ -static const char CVSID[] = "$Id: windowTitle.c,v 1.9 2002/09/26 12:37:40 ajhood Exp $"; +static const char CVSID[] = "$Id: windowTitle.c,v 1.10 2003/05/05 16:25:56 edg Exp $"; /******************************************************************************* * * * windowTitle.c -- Nirvana Editor window title customization * @@ -1113,6 +1113,7 @@ static void createEditTitleDialog(Widget parent, WindowInfo *window) XtAddCallback(etDialog.dirW, XmNvalueChangedCallback, toggleDirectoryCB, NULL); XmStringFree(s1); + XtVaGetValues(etDialog.fileW, XmNheight, &radioHeight, NULL); etDialog.mdirW = XtVaCreateManagedWidget("componentLab", xmLabelGadgetClass, selectBox, XmNheight, radioHeight, @@ -1356,7 +1357,6 @@ static void createEditTitleDialog(Widget parent, WindowInfo *window) XmNmnemonic, 'i', NULL); XtAddCallback(etDialog.oDirW, XmNvalueChangedCallback, formatChangedCB, NULL); XmStringFree(s1); - XtVaGetValues(etDialog.fileW, XmNheight, &radioHeight, NULL); /* Button box */ buttonForm = XtVaCreateManagedWidget("buttonForm", xmFormWidgetClass, -- 2.11.4.GIT