File: 105-fix-obsolete-xmfontlistcreate-warning.dpatch

package info (click to toggle)
cernlib 20061220%2Bdfsg3-4.4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,872 kB
  • sloc: sh: 9,517; makefile: 187
file content (32 lines) | stat: -rwxr-xr-x 1,355 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/sh /usr/share/dpatch/dpatch-run
## 105-fix-obsolete-xmfontlistcreate-warning.dpatch by  <kmccarty@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix Lesstif warning about use of obsolete XmFontListCreate() function

@DPATCH@
diff -urNad cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c /tmp/dpep.kv7bf1/cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c
--- cernlib-2005.05.09~/src/packlib/kuip/code_motif/mkuip.c	1996-10-24 08:13:41.000000000 -0400
+++ cernlib-2005.05.09/src/packlib/kuip/code_motif/mkuip.c	2005-06-09 14:39:00.831812710 -0400
@@ -776,6 +776,7 @@
  ***********************************************************************/
 static void init_data ()
 {
+  /* This function edited not to use obsolete function XmFontListCreate() */
     int k;
 
     km_charset = XmSTRING_DEFAULT_CHARSET;
@@ -792,8 +793,11 @@
        if (help_font_struct == NULL)
            printf ("%s Warning: Font loaded for HELP (%s) is NULL \n",
                    main_prompt, srec.Help_font);
-       else
-           help_font = XmFontListCreate (help_font_struct,km_charset);
+       else {
+	   XmFontListEntry entry = XmFontListEntryCreate(
+	       km_charset, XmFONT_IS_FONT, (XtPointer)help_font_struct );
+           help_font = XmFontListAppendEntry( NULL, entry );
+       }
    }
 
    /*