From 44ac73bc402bb9d6aa22176743a55a78831e4cb99ea0e56fbcb55b107cb703ff Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 4 Apr 2007 19:52:56 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fvwm2?expand=0&rev=9 --- fvwm-2.5.21-string_compar.patch | 112 +++++++++++++++++++++++++------- fvwm2.changes | 5 ++ fvwm2.spec | 4 +- 3 files changed, 96 insertions(+), 25 deletions(-) diff --git a/fvwm-2.5.21-string_compar.patch b/fvwm-2.5.21-string_compar.patch index d7ef224..c5bb04e 100644 --- a/fvwm-2.5.21-string_compar.patch +++ b/fvwm-2.5.21-string_compar.patch @@ -5,103 +5,167 @@ unsigned long argument, data1 = 0, data2 = 0; - if (action == NULL || action == "\0") -+ if (action == NULL || (strcmp(action,"\0") == 0)) ++ if (action == NULL || action[0] == '\0') { return; } --- libs/Flocale.c +++ libs/Flocale.c -@@ -1080,7 +1080,7 @@ +@@ -1066,21 +1066,22 @@ + FftFontType *fftf = NULL; + FlocaleFont *flf = NULL; + char *fn, *hints = NULL; ++ char *fallback_font = FLOCALE_FFT_FALLBACK_FONT; + + hints = GetQuotedString(fontname, &fn, "/", NULL, NULL, NULL); + if (fn == NULL) + { +- fn = FLOCALE_FFT_FALLBACK_FONT; ++ fn = fallback_font; + } + else if (*fn == '\0') + { + free(fn); +- fn = FLOCALE_FFT_FALLBACK_FONT; ++ fn = fallback_font; + } fftf = FftGetFont(dpy, fn, module); if (fftf == NULL) { - if (fn != NULL && fn != FLOCALE_FFT_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *)FLOCALE_FFT_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1095,7 +1095,7 @@ +@@ -1095,7 +1096,7 @@ &flf->fftf, &flf->height, &flf->ascent, &flf->descent); FftGetFontWidths(flf, &flf->max_char_width); free(fftf); - if (fn != NULL && fn != FLOCALE_FFT_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_FFT_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1124,7 +1124,7 @@ +@@ -1115,16 +1116,17 @@ + char *ds; + XFontSetExtents *fset_extents; + char *fn, *hints = NULL, *fn_fixed = NULL; ++ char *fallback_font = FLOCALE_MB_FALLBACK_FONT; + + hints = GetQuotedString(fontname, &fn, "/", NULL, NULL, NULL); + if (*fn == '\0') + { + free(fn); +- fn = fn_fixed = FLOCALE_MB_FALLBACK_FONT; ++ fn = fn_fixed = fallback_font; } else if (!(fn_fixed = FlocaleFixNameForFontSet(dpy, fn, module))) { - if (fn != NULL && fn != FLOCALE_MB_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_MB_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1136,7 +1136,7 @@ +@@ -1136,7 +1138,7 @@ { free(fn_fixed); } - if (fn != NULL && fn != FLOCALE_MB_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_MB_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1185,7 +1185,7 @@ +@@ -1185,7 +1187,7 @@ { free(fn_fixed); } - if (fn != NULL && fn != FLOCALE_MB_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_MB_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1212,7 +1212,7 @@ - fn = FLOCALE_FALLBACK_FONT; +@@ -1201,6 +1203,7 @@ + FlocaleFont *flf; + char *str,*fn,*tmp; + char *hints = NULL; ++ char *fallback_font = FLOCALE_FALLBACK_FONT; + + hints = GetQuotedString(fontname, &tmp, "/", NULL, NULL, NULL); + str = GetQuotedString(tmp, &fn, ",", NULL, NULL, NULL); +@@ -1209,10 +1212,10 @@ + if (*fn == '\0') + { + free(fn); +- fn = FLOCALE_FALLBACK_FONT; ++ fn = fallback_font; } font = XLoadQueryFont(dpy, fn); - if (fn != NULL && fn != FLOCALE_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); fn = NULL; -@@ -1224,7 +1224,7 @@ +@@ -1224,7 +1227,7 @@ } if (font == NULL) { - if (fn != NULL && fn != FLOCALE_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1248,7 +1248,7 @@ +@@ -1248,7 +1251,7 @@ flf->max_char_width = font->max_bounds.width; if (flf->font->max_byte1 > 0) flf->flags.is_mb = True; - if (fn != NULL && fn != FLOCALE_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_FALLBACK_FONT) ++ if (fn != NULL && fn != fallback_font) { free(fn); } -@@ -1460,8 +1460,8 @@ +@@ -1382,6 +1385,8 @@ + int shadow_offset = 0; + int shadow_dir = MULTI_DIR_SE; + int i; ++ char *mb_fallback_font = FLOCALE_MB_FALLBACK_FONT; ++ char *fallback_font = FLOCALE_FALLBACK_FONT; + + /* removing quoting for modules */ + if (fontname && (t = strchr("\"'`", *fontname))) +@@ -1395,7 +1400,7 @@ + if (fontname == NULL || *fontname == 0) + { + ask_default = True; +- fontname = FLOCALE_MB_FALLBACK_FONT; ++ fontname = mb_fallback_font; + } + + while (flf) +@@ -1454,14 +1459,14 @@ + } + else + { +- fn = FLOCALE_MB_FALLBACK_FONT; ++ fn = mb_fallback_font; + } + while (!flf && (fn && *fn)) { flf = FlocaleGetFontOrFontSet( dpy, fn, encoding, fontname, module); - if (fn != NULL && fn != FLOCALE_MB_FALLBACK_FONT && - fn != FLOCALE_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_MB_FALLBACK_FONT && -+ fn != (char *) FLOCALE_FALLBACK_FONT) ++ if (fn != NULL && fn != mb_fallback_font && ++ fn != fallback_font) { free(fn); fn = NULL; -@@ -1471,8 +1471,8 @@ +@@ -1471,8 +1476,7 @@ str = GetQuotedString(str, &fn, ";", NULL, NULL, NULL); } } - if (fn != NULL && fn != FLOCALE_MB_FALLBACK_FONT && - fn != FLOCALE_FALLBACK_FONT) -+ if (fn != NULL && fn != (char *) FLOCALE_MB_FALLBACK_FONT && -+ fn != (char *) FLOCALE_FALLBACK_FONT) ++ if (fn != NULL && fn != mb_fallback_font && fn != fallback_font) { free(fn); } diff --git a/fvwm2.changes b/fvwm2.changes index cb6d714..3e34531 100644 --- a/fvwm2.changes +++ b/fvwm2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 4 21:17:21 CEST 2007 - schwab@suse.de + +- Fix last change. + ------------------------------------------------------------------- Wed Apr 4 16:48:44 CEST 2007 - lmichnovic@suse.cz diff --git a/fvwm2.spec b/fvwm2.spec index b9fb18c..6ec42e4 100644 --- a/fvwm2.spec +++ b/fvwm2.spec @@ -18,7 +18,7 @@ Provides: fvwmicns windowmanager xpmroot Obsoletes: fvwm xpmroot Autoreqprov: on Version: 2.5.21 -Release: 11 +Release: 12 Summary: Improved Version of FVWM Window Manager URL: http://www.fvwm.org Source0: fvwm-2.5.21.tar.bz2 @@ -166,6 +166,8 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Apr 04 2007 - schwab@suse.de +- Fix last change. * Wed Apr 04 2007 - lmichnovic@suse.cz - fixed gcc warnings: comparing a char* pointer with a string literal (string_compar.patch)