Menu

#665 Support for OpenVMS IA64

release
open
nobody
5
2010-11-19
2010-11-19
zinser
No

Hello,

while building NEdit 5.5 on OpenVMS IA64 V8.3-1H1 with a recent C compiler,
I encountered the following problems:

cc/prefix=all/define=(USE_ACCESS)/include=[-.xlt] TEXTDRAG.C

if (modPos + nDeleted > *modRangeEnd) {
................................^
%CC-W-UNINIT1, The scalar variable "bufModRangeEnd", declared in "BlockDragSelec
tion", is fetched but not initialized. Detected when this routine was inlined a
t line number 247 in file PUBLIC$ROOT:[XTOOLS.XUTIL.NEDIT.SOURCE]TEXTDRAG.C;10.
And there may
be other such fetches of this variable that have not been reported in this compi
lation.
at line number 512 in file PUBLIC$ROOT:[XTOOLS.XUTIL.NEDIT.SOURCE]TEXTDRAG.C;10

*unmodRangeEnd += modPos + nDeleted - *modRangeEnd;
............^
%CC-W-UNINIT1, The scalar variable "tempModRangeEnd", declared in "BlockDragSele
ction", is fetched but not initialized. Detected when this routine was inlined
at line number 247 in file PUBLIC$ROOT:[XTOOLS.XUTIL.NEDIT.SOURCE]TEXTDRAG.C;10.
And there may
be other such fetches of this variable that have not been reported in this comp
ilation.
at line number 513 in file PUBLIC$ROOT:[XTOOLS.XUTIL.NEDIT.SOURCE]TEXTDRAG.C;10

---> Patch below adds explicit initialization to 0 for the two variables

link/exe=nedit.exe nedit.obj,selection.obj, file.obj, help.obj, menu.obj, prefe
rences.obj, regularExp.obj, search.obj, shift.obj, tags.obj, undo.obj, window.o
bj, userCmds.obj, macro.obj, text.obj, textSel.obj, textDisp.obj, textBuf.obj, t
extDrag.obj, server.obj, highlight.obj, highlightData.obj, interpret.obj, smartI
ndent.obj, parse.obj, regexconvert.obj, rbtree.obj, linkdate.obj, windowTitle.ob
j, server_common.obj, calltips.obj, rangeset.obj, NEDIT_OPTIONS_FILE/OPT, [-.m
icroline.xml]libxml/lib, [-.xlt]libXlt/lib, [-.util]vmsUtils/lib, libNUtil.olb/
lib
%ILINK-W-MULDEFLNKG, symbol MATH$RINT_T has subsequent linkage definition
module: DPML$SHR
file: SYS$COMMON:[SYSLIB]DPML$SHR.EXE;1
%ILINK-W-MULDEF, symbol MATH$RINT_T multiply defined
file: SYS$COMMON:[SYSLIB]DPML$SHR.EXE;1
%MMK-F-ERRUPD, error status %X1789A0C0 occurred when updating target NEDIT.EXE
Error building Nedit. Exiting...
%NONAME-E-NOMSG, Message number 00000002

---> rint is not available on the oldest VMS plattform (VAX), but on Alpha and
Itanium. Code in vmsUtils.c checked for !Alpha as VAX, which is incorrect once
Itanium is added to the mix. Change code to explicitly check for VAX as in
attached patch.

This is all on top of the changes reported in issue 1395689.

What are the chances of a new release of NEdit? It is still my favorite editor
on both OpenVMS and Linux :-)

Greetings, Martin

*** source/textDrag.c.orig 2010-11-19 16:33:59.135751152 -0600
--- source/textDrag.c 2010-11-19 16:34:31.915252871 -0600
***************
*** 179,185 ****
int nLines = tw->text.dragNLines;
int insLineNum, insLineStart, insRectStart, insRectEnd, insStart;
char *repText, *text, *insText;
! int modRangeStart = -1, tempModRangeEnd, bufModRangeEnd;
int referenceLine, referencePos, tempStart, tempEnd, origSelLen;
int insertInserted, insertDeleted, row, column;
int origSelLineStart, origSelLineEnd;
--- 179,185 ----
int nLines = tw->text.dragNLines;
int insLineNum, insLineStart, insRectStart, insRectEnd, insStart;
char *repText, *text, *insText;
! int modRangeStart = -1, tempModRangeEnd = 0, bufModRangeEnd = 0;
int referenceLine, referencePos, tempStart, tempEnd, origSelLen;
int insertInserted, insertDeleted, row, column;
int origSelLineStart, origSelLineEnd;
*** util/vmsUtils.c.orig 2010-11-19 16:29:45.302751109 -0600
--- util/vmsUtils.c 2010-11-19 16:31:09.975750355 -0600
***************
*** 158,164 ****
free(vmsString);
}

! #if !(defined __ALPHA && (defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE))
double rint(double dnum)
{
return floor(dnum + 0.5);
--- 158,164 ----
free(vmsString);
}

! #if (defined __VAX && !(defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE))
double rint(double dnum)
{
return floor(dnum + 0.5);

Discussion


Log in to post a comment.