Daniel Rahn 2008-12-24 08:52:18 +00:00 committed by Git OBS Bridge
parent e65460a0b0
commit 7f465bb044
4 changed files with 284 additions and 109 deletions

View File

@ -1,108 +1,141 @@
--- source/menu.c
+++ source/menu.c 2008/11/01 10:12:04
@@ -1,4 +1,4 @@
-static const char CVSID[] = "$Id: menu.c,v 1.115 2004/09/15 22:50:57 n8gray Exp $";
+static const char CVSID[] = "$Id: menu.c,v 1.1 2008/11/01 10:11:21 drahn Exp drahn $";
/*******************************************************************************
* *
* menu.c -- Nirvana Editor menus *
@@ -1242,7 +1242,7 @@
Widget menuItem =
createMenuItem( parent, name, label, mnemonic, callback, cbArg, mode );
- XtVaSetValues( menuItem, XmNuserData, topic, 0 );
+ XtVaSetValues( menuItem, XmNuserData, topic, NULL );
return menuItem;
}
--- nedit-5.5-null-pointers.patch.orig
+++ nedit-5.5-null-pointers.patch
@@ -0,0 +1,108 @@
+--- source/menu.c
++++ source/menu.c 2008/11/01 10:12:04
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: menu.c,v 1.115 2004/09/15 22:50:57 n8gray Exp $";
++static const char CVSID[] = "$Id: menu.c,v 1.1 2008/11/01 10:11:21 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * menu.c -- Nirvana Editor menus *
+@@ -1242,7 +1242,7 @@
+ Widget menuItem =
+ createMenuItem( parent, name, label, mnemonic, callback, cbArg, mode );
+
+- XtVaSetValues( menuItem, XmNuserData, topic, 0 );
++ XtVaSetValues( menuItem, XmNuserData, topic, NULL );
+ return menuItem;
+ }
+
+@@ -1254,7 +1254,7 @@
+
+ HidePointerOnKeyedEvent(WidgetToWindow(MENU_WIDGET(menuItem))->lastFocus,
+ ((XmAnyCallbackStruct *)callData)->event);
+- XtVaGetValues( menuItem, XmNuserData, &topic, 0 );
++ XtVaGetValues( menuItem, XmNuserData, &topic, NULL );
+
+ Help(topic);
+ }
+--- source/search.c
++++ source/search.c 2008/11/01 10:13:15
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: search.c,v 1.71 2004/08/01 10:06:11 yooden Exp $";
++static const char CVSID[] = "$Id: search.c,v 1.1 2008/11/01 10:12:55 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * search.c -- Nirvana Editor search and replace functions *
+@@ -1042,7 +1042,7 @@
+ XtAddCallback(replaceBtn, XmNactivateCallback, (XtCallbackProc)replaceCB, window);
+ XmStringFree(st1);
+ XtManageChild(replaceBtn);
+- XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, 0);
++ XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, NULL);
+ defaultBtnOffset = shadowThickness + 4;
+
+ argcnt = 0;
+--- source/text.c
++++ source/text.c 2008/11/01 10:14:36
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: text.c,v 1.48 2004/07/28 18:02:03 n8gray Exp $";
++static const char CVSID[] = "$Id: text.c,v 1.1 2008/11/01 10:13:38 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * text.c - Display text from a text buffer *
+@@ -3126,7 +3126,7 @@
+ cancelDrag(w);
+ if (hasKey("scrollbar", args, nArgs)) {
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(textD->horizOffset + textD->width, sliderMax - sliderSize);
+ if (textD->horizOffset == horizOffset) {
+ ringIfNecessary(silent, w);
+@@ -3218,7 +3218,7 @@
+ if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
+ return;
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(max(0, textD->horizOffset - nPixels), sliderMax - sliderSize);
+ if (textD->horizOffset != horizOffset) {
+ TextDSetScroll(textD, textD->topLineNum, horizOffset);
+@@ -3235,7 +3235,7 @@
+ if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
+ return;
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(max(0, textD->horizOffset + nPixels), sliderMax - sliderSize);
+ if (textD->horizOffset != horizOffset) {
+ TextDSetScroll(textD, textD->topLineNum, horizOffset);
+--- source/window.c
++++ source/window.c 2008/11/01 10:15:20
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: window.c,v 1.174 2004/09/15 22:50:58 n8gray Exp $";
++static const char CVSID[] = "$Id: window.c,v 1.1 2008/11/01 10:14:41 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * window.c -- Nirvana Editor window creation/deletion *
+@@ -1157,7 +1157,7 @@
+ if (window->backlightChars)
+ {
+ XtVaSetValues(text, textNbacklightCharTypes,
+- window->backlightCharTypes, 0);
++ window->backlightCharTypes, NULL);
+ }
+ XtManageChild(text);
+ window->textPanes[window->nPanes++] = text;
+@@ -3016,10 +3016,10 @@
+ window->backlightCharTypes = NULL;
+
+ XtVaSetValues(window->textArea,
+- textNbacklightCharTypes, window->backlightCharTypes, 0);
++ textNbacklightCharTypes, window->backlightCharTypes, NULL);
+ for (i=0; i<window->nPanes; i++)
+ XtVaSetValues(window->textPanes[i],
+- textNbacklightCharTypes, window->backlightCharTypes, 0);
++ textNbacklightCharTypes, window->backlightCharTypes, NULL);
+ if (is_applied != do_apply)
+ SetToggleButtonState(window, window->backlightCharsItem, do_apply, False);
+ }
--- nedit.changes.orig
+++ nedit.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Sat Nov 01 10:37:32 CET 2008 - drahn@suse.de
+
+- fix NULL pointers
+
+-------------------------------------------------------------------
Fri Jun 29 14:44:56 CEST 2007 - drahn@suse.de
@@ -1254,7 +1254,7 @@
HidePointerOnKeyedEvent(WidgetToWindow(MENU_WIDGET(menuItem))->lastFocus,
((XmAnyCallbackStruct *)callData)->event);
- XtVaGetValues( menuItem, XmNuserData, &topic, 0 );
+ XtVaGetValues( menuItem, XmNuserData, &topic, NULL );
Help(topic);
}
--- source/search.c
+++ source/search.c 2008/11/01 10:13:15
@@ -1,4 +1,4 @@
-static const char CVSID[] = "$Id: search.c,v 1.71 2004/08/01 10:06:11 yooden Exp $";
+static const char CVSID[] = "$Id: search.c,v 1.1 2008/11/01 10:12:55 drahn Exp drahn $";
/*******************************************************************************
* *
* search.c -- Nirvana Editor search and replace functions *
@@ -1042,7 +1042,7 @@
XtAddCallback(replaceBtn, XmNactivateCallback, (XtCallbackProc)replaceCB, window);
XmStringFree(st1);
XtManageChild(replaceBtn);
- XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, 0);
+ XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, NULL);
defaultBtnOffset = shadowThickness + 4;
argcnt = 0;
--- source/text.c
+++ source/text.c 2008/11/01 10:14:36
@@ -1,4 +1,4 @@
-static const char CVSID[] = "$Id: text.c,v 1.48 2004/07/28 18:02:03 n8gray Exp $";
+static const char CVSID[] = "$Id: text.c,v 1.1 2008/11/01 10:13:38 drahn Exp drahn $";
/*******************************************************************************
* *
* text.c - Display text from a text buffer *
@@ -3126,7 +3126,7 @@
cancelDrag(w);
if (hasKey("scrollbar", args, nArgs)) {
XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
- XmNsliderSize, &sliderSize, 0);
+ XmNsliderSize, &sliderSize, NULL);
horizOffset = min(textD->horizOffset + textD->width, sliderMax - sliderSize);
if (textD->horizOffset == horizOffset) {
ringIfNecessary(silent, w);
@@ -3218,7 +3218,7 @@
if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
return;
XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
- XmNsliderSize, &sliderSize, 0);
+ XmNsliderSize, &sliderSize, NULL);
horizOffset = min(max(0, textD->horizOffset - nPixels), sliderMax - sliderSize);
if (textD->horizOffset != horizOffset) {
TextDSetScroll(textD, textD->topLineNum, horizOffset);
@@ -3235,7 +3235,7 @@
if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
return;
XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
- XmNsliderSize, &sliderSize, 0);
+ XmNsliderSize, &sliderSize, NULL);
horizOffset = min(max(0, textD->horizOffset + nPixels), sliderMax - sliderSize);
if (textD->horizOffset != horizOffset) {
TextDSetScroll(textD, textD->topLineNum, horizOffset);
--- source/window.c
+++ source/window.c 2008/11/01 10:15:20
@@ -1,4 +1,4 @@
-static const char CVSID[] = "$Id: window.c,v 1.174 2004/09/15 22:50:58 n8gray Exp $";
+static const char CVSID[] = "$Id: window.c,v 1.1 2008/11/01 10:14:41 drahn Exp drahn $";
/*******************************************************************************
* *
* window.c -- Nirvana Editor window creation/deletion *
@@ -1157,7 +1157,7 @@
if (window->backlightChars)
{
XtVaSetValues(text, textNbacklightCharTypes,
- window->backlightCharTypes, 0);
+ window->backlightCharTypes, NULL);
}
XtManageChild(text);
window->textPanes[window->nPanes++] = text;
@@ -3016,10 +3016,10 @@
window->backlightCharTypes = NULL;
- initial BS version
--- nedit.spec.orig
+++ nedit.spec
@@ -17,6 +17,7 @@ Patch2: nedit-5.4-security.patch
Patch3: nedit-5.5-utf8.patch
Patch4: nedit-5.5-varfix.patch
Patch5: nedit-5.5-nc-manfix.patch
+Patch6: nedit-5.5-null-pointers.patch
%description
NEdit is a GUI style plain text editor for workstations with the X Window System
@@ -31,6 +32,7 @@ and a lot other nice features (and exten
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p0
cp %{S:1} $RPM_BUILD_DIR/%{name}-%{version}/
cp %{S:2} $RPM_BUILD_DIR/%{name}-%{version}/
XtVaSetValues(window->textArea,
- textNbacklightCharTypes, window->backlightCharTypes, 0);
+ textNbacklightCharTypes, window->backlightCharTypes, NULL);
for (i=0; i<window->nPanes; i++)
XtVaSetValues(window->textPanes[i],
- textNbacklightCharTypes, window->backlightCharTypes, 0);
+ textNbacklightCharTypes, window->backlightCharTypes, NULL);
if (is_applied != do_apply)
SetToggleButtonState(window, window->backlightCharsItem, do_apply, False);
}

View File

@ -1,7 +1,8 @@
-------------------------------------------------------------------
Sat Nov 01 10:37:32 CET 2008 - drahn@suse.de
Wed Dec 24 09:50:00 CEST 2008 - drahn@suse.de
- fix NULL pointers
- sync with editors project
- fix NULL pointers
-------------------------------------------------------------------
Fri Jun 29 14:44:56 CEST 2007 - drahn@suse.de

View File

@ -17,7 +17,7 @@ Patch2: nedit-5.4-security.patch
Patch3: nedit-5.5-utf8.patch
Patch4: nedit-5.5-varfix.patch
Patch5: nedit-5.5-nc-manfix.patch
Patch6: nedit-5.5-null-pointers.patch
Patch6: nedit-5.5-null-pointers.patch
%description
NEdit is a GUI style plain text editor for workstations with the X Window System

141
project.diff Normal file
View File

@ -0,0 +1,141 @@
--- nedit-5.5-null-pointers.patch.orig
+++ nedit-5.5-null-pointers.patch
@@ -0,0 +1,108 @@
+--- source/menu.c
++++ source/menu.c 2008/11/01 10:12:04
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: menu.c,v 1.115 2004/09/15 22:50:57 n8gray Exp $";
++static const char CVSID[] = "$Id: menu.c,v 1.1 2008/11/01 10:11:21 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * menu.c -- Nirvana Editor menus *
+@@ -1242,7 +1242,7 @@
+ Widget menuItem =
+ createMenuItem( parent, name, label, mnemonic, callback, cbArg, mode );
+
+- XtVaSetValues( menuItem, XmNuserData, topic, 0 );
++ XtVaSetValues( menuItem, XmNuserData, topic, NULL );
+ return menuItem;
+ }
+
+@@ -1254,7 +1254,7 @@
+
+ HidePointerOnKeyedEvent(WidgetToWindow(MENU_WIDGET(menuItem))->lastFocus,
+ ((XmAnyCallbackStruct *)callData)->event);
+- XtVaGetValues( menuItem, XmNuserData, &topic, 0 );
++ XtVaGetValues( menuItem, XmNuserData, &topic, NULL );
+
+ Help(topic);
+ }
+--- source/search.c
++++ source/search.c 2008/11/01 10:13:15
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: search.c,v 1.71 2004/08/01 10:06:11 yooden Exp $";
++static const char CVSID[] = "$Id: search.c,v 1.1 2008/11/01 10:12:55 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * search.c -- Nirvana Editor search and replace functions *
+@@ -1042,7 +1042,7 @@
+ XtAddCallback(replaceBtn, XmNactivateCallback, (XtCallbackProc)replaceCB, window);
+ XmStringFree(st1);
+ XtManageChild(replaceBtn);
+- XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, 0);
++ XtVaGetValues(replaceBtn, XmNshadowThickness, &shadowThickness, NULL);
+ defaultBtnOffset = shadowThickness + 4;
+
+ argcnt = 0;
+--- source/text.c
++++ source/text.c 2008/11/01 10:14:36
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: text.c,v 1.48 2004/07/28 18:02:03 n8gray Exp $";
++static const char CVSID[] = "$Id: text.c,v 1.1 2008/11/01 10:13:38 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * text.c - Display text from a text buffer *
+@@ -3126,7 +3126,7 @@
+ cancelDrag(w);
+ if (hasKey("scrollbar", args, nArgs)) {
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(textD->horizOffset + textD->width, sliderMax - sliderSize);
+ if (textD->horizOffset == horizOffset) {
+ ringIfNecessary(silent, w);
+@@ -3218,7 +3218,7 @@
+ if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
+ return;
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(max(0, textD->horizOffset - nPixels), sliderMax - sliderSize);
+ if (textD->horizOffset != horizOffset) {
+ TextDSetScroll(textD, textD->topLineNum, horizOffset);
+@@ -3235,7 +3235,7 @@
+ if (*nArgs == 0 || sscanf(args[0], "%d", &nPixels) != 1)
+ return;
+ XtVaGetValues(textD->hScrollBar, XmNmaximum, &sliderMax,
+- XmNsliderSize, &sliderSize, 0);
++ XmNsliderSize, &sliderSize, NULL);
+ horizOffset = min(max(0, textD->horizOffset + nPixels), sliderMax - sliderSize);
+ if (textD->horizOffset != horizOffset) {
+ TextDSetScroll(textD, textD->topLineNum, horizOffset);
+--- source/window.c
++++ source/window.c 2008/11/01 10:15:20
+@@ -1,4 +1,4 @@
+-static const char CVSID[] = "$Id: window.c,v 1.174 2004/09/15 22:50:58 n8gray Exp $";
++static const char CVSID[] = "$Id: window.c,v 1.1 2008/11/01 10:14:41 drahn Exp drahn $";
+ /*******************************************************************************
+ * *
+ * window.c -- Nirvana Editor window creation/deletion *
+@@ -1157,7 +1157,7 @@
+ if (window->backlightChars)
+ {
+ XtVaSetValues(text, textNbacklightCharTypes,
+- window->backlightCharTypes, 0);
++ window->backlightCharTypes, NULL);
+ }
+ XtManageChild(text);
+ window->textPanes[window->nPanes++] = text;
+@@ -3016,10 +3016,10 @@
+ window->backlightCharTypes = NULL;
+
+ XtVaSetValues(window->textArea,
+- textNbacklightCharTypes, window->backlightCharTypes, 0);
++ textNbacklightCharTypes, window->backlightCharTypes, NULL);
+ for (i=0; i<window->nPanes; i++)
+ XtVaSetValues(window->textPanes[i],
+- textNbacklightCharTypes, window->backlightCharTypes, 0);
++ textNbacklightCharTypes, window->backlightCharTypes, NULL);
+ if (is_applied != do_apply)
+ SetToggleButtonState(window, window->backlightCharsItem, do_apply, False);
+ }
--- nedit.changes.orig
+++ nedit.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Sat Nov 01 10:37:32 CET 2008 - drahn@suse.de
+
+- fix NULL pointers
+
+-------------------------------------------------------------------
Fri Jun 29 14:44:56 CEST 2007 - drahn@suse.de
- initial BS version
--- nedit.spec.orig
+++ nedit.spec
@@ -17,6 +17,7 @@ Patch2: nedit-5.4-security.patch
Patch3: nedit-5.5-utf8.patch
Patch4: nedit-5.5-varfix.patch
Patch5: nedit-5.5-nc-manfix.patch
+Patch6: nedit-5.5-null-pointers.patch
%description
NEdit is a GUI style plain text editor for workstations with the X Window System
@@ -31,6 +32,7 @@ and a lot other nice features (and exten
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p0
cp %{S:1} $RPM_BUILD_DIR/%{name}-%{version}/
cp %{S:2} $RPM_BUILD_DIR/%{name}-%{version}/