diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-13 16:55:35 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-13 16:55:35 +0000 |
commit | 1dde4e5c4b92d849bf1abf0a48135b2a0644f7e1 (patch) | |
tree | c99a472cce74148d499f42ada873454b0e32a42d /app-editors/nedit/files | |
parent | da6a52f691ef980bab92d003d5df8f463c623af8 (diff) |
gentoo resync : 13.03.2018
Diffstat (limited to 'app-editors/nedit/files')
-rw-r--r-- | app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch | 118 | ||||
-rw-r--r-- | app-editors/nedit/files/nedit-5.6-ldflags.patch | 4 |
2 files changed, 120 insertions, 2 deletions
diff --git a/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch b/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch new file mode 100644 index 000000000000..92b0778e2ab2 --- /dev/null +++ b/app-editors/nedit/files/nedit-5.6-fix-crash-with-noX.patch @@ -0,0 +1,118 @@ +diff -urN a/source/highlightData.c b/source/highlightData.c +--- a/source/highlightData.c 2018-03-13 08:42:40.930188154 +0100 ++++ b/source/highlightData.c 2018-03-13 08:44:59.651196431 +0100 +@@ -1280,7 +1280,7 @@ + XFontStruct *font; + + if (styleNo<0) +- return GetDefaultFontStruct(window->fontList); ++ return GetDefaultFontStruct(TheDisplay, window->fontList); + fontNum = HighlightStyles[styleNo]->font; + if (fontNum == BOLD_FONT) + font = window->boldFontStruct; +@@ -1289,10 +1289,10 @@ + else if (fontNum == BOLD_ITALIC_FONT) + font = window->boldItalicFontStruct; + else /* fontNum == PLAIN_FONT */ +- font = GetDefaultFontStruct(window->fontList); ++ font = GetDefaultFontStruct(TheDisplay, window->fontList); + + /* If font isn't loaded, silently substitute primary font */ +- return font == NULL ? GetDefaultFontStruct(window->fontList) : font; ++ return font == NULL ? GetDefaultFontStruct(TheDisplay, window->fontList) : font; + } + + int FontOfNamedStyleIsBold(char *styleName) +diff -urN a/source/text.c b/source/text.c +--- a/source/text.c 2018-03-13 08:42:40.931188154 +0100 ++++ b/source/text.c 2018-03-13 08:46:37.785202286 +0100 +@@ -778,9 +778,13 @@ + textBuffer *buf; + Pixel white, black; + int textLeft; +- int charWidth = fs->max_bounds.width; +- int marginWidth = new->text.marginWidth; +- int lineNumCols = new->text.lineNumCols; ++ int charWidth; ++ int marginWidth; ++ int lineNumCols; ++ ++ charWidth = fs->max_bounds.width; ++ marginWidth = new->text.marginWidth; ++ lineNumCols = new->text.lineNumCols; + + /* Set the initial window size based on the rows and columns resources */ + if (request->core.width == 0) +diff -urN a/source/window.c b/source/window.c +--- a/source/window.c 2018-03-13 08:42:40.937188155 +0100 ++++ b/source/window.c 2018-03-13 08:48:07.727207652 +0100 +@@ -1839,7 +1839,7 @@ + + /* Change the primary font in all the widgets */ + if (primaryChanged) { +- font = GetDefaultFontStruct(window->fontList); ++ font = GetDefaultFontStruct(TheDisplay, window->fontList); + XtVaSetValues(window->textArea, textNfont, font, NULL); + for (i=0; i<window->nPanes; i++) + XtVaSetValues(window->textPanes[i], textNfont, font, NULL); +@@ -1861,7 +1861,7 @@ + size appropriate for the new font, but only do so if there's only + _one_ document in the window, in order to avoid growing-window bug */ + if (NDocuments(window) == 1) { +- fontWidth = GetDefaultFontStruct(window->fontList)->max_bounds.width; ++ fontWidth = GetDefaultFontStruct(TheDisplay, window->fontList)->max_bounds.width; + fontHeight = textD->ascent + textD->descent; + newWindowWidth = (oldTextWidth*fontWidth) / oldFontWidth + borderWidth; + newWindowHeight = (oldTextHeight*fontHeight) / oldFontHeight + +@@ -2244,7 +2244,7 @@ + textNrows, rows, textNcolumns, cols, + textNlineNumCols, lineNumCols, + textNemulateTabs, emTabDist, +- textNfont, GetDefaultFontStruct(window->fontList), ++ textNfont, GetDefaultFontStruct(TheDisplay, window->fontList), + textNhScrollBar, hScrollBar, textNvScrollBar, vScrollBar, + textNreadOnly, IS_ANY_LOCKED(window->lockReasons), + textNwordDelimiters, delimiters, + +--- a/util/misc.c 2018-03-13 08:50:54.892217626 +0100 ++++ b/util/misc.c 2018-03-13 08:56:50.346238834 +0100 +@@ -1018,7 +1018,7 @@ + ** a Motif font list. Since Motif stores this, it saves us from storing + ** it or querying it from the X server. + */ +-XFontStruct *GetDefaultFontStruct(XmFontList font) ++XFontStruct *GetDefaultFontStruct(Display *d, XmFontList font) + { + XFontStruct *fs; + XmFontContext context; +@@ -1028,6 +1028,17 @@ + XmFontListGetNextFont(context, &charset, &fs); + XmFontListFreeFontContext(context); + XtFree(charset); ++ ++ /* FontList might be a render table with no only XFT fonts */ ++ if (fs == NULL) { ++ fs = XLoadQueryFont(d, "fixed"); ++ } ++ ++ if (fs == NULL) { ++ fprintf(stderr, "Unabled to load any fallback fonts.\n"); ++ exit(EXIT_FAILURE); ++ } ++ + return fs; + } + +diff -urN a/util/misc.h b/util/misc.h +--- a/util/misc.h 2018-03-13 08:50:54.890217626 +0100 ++++ b/util/misc.h 2018-03-13 08:55:52.790235400 +0100 +@@ -65,7 +65,7 @@ + void AccelLockBugPatch(Widget topWidget, Widget topMenuContainer); + void UpdateAccelLockPatch(Widget topWidget, Widget newButton); + char *GetXmStringText(XmString fromString); +-XFontStruct *GetDefaultFontStruct(XmFontList font); ++XFontStruct *GetDefaultFontStruct(Display *d, XmFontList font); + XmString* StringTable(int count, ...); + void FreeStringTable(XmString *table); + void SimulateButtonPress(Widget widget); + diff --git a/app-editors/nedit/files/nedit-5.6-ldflags.patch b/app-editors/nedit/files/nedit-5.6-ldflags.patch index 4532c6251894..a549b02490c0 100644 --- a/app-editors/nedit/files/nedit-5.6-ldflags.patch +++ b/app-editors/nedit/files/nedit-5.6-ldflags.patch @@ -1,5 +1,5 @@ ---- source/Makefile.common 2004-03-21 15:25:56.000000000 +0100 -+++ source/Makefile.common.new 2009-10-24 10:47:03.667835157 +0200 +--- a/source/Makefile.common 2004-03-21 15:25:56.000000000 +0100 ++++ b/source/Makefile.common 2009-10-24 10:47:03.667835157 +0200 @@ -21,12 +21,12 @@ # we only want natural rebuilds to regenerate the link date. nedit: $(OBJS) ../util/libNUtil.a $(XMLLIB) $(XLTLIB) |