dtcm: Resolve CID 87562
[oweals/cde.git] / cde / programs / dtcm / dtcm / graphics.c
index 2e4cf8ae886792bb2a187d91eff6ef12d44b6fcc..409dcb69f7e2c272f95acaafd25fd1fa21acc6a1 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /*******************************************************************************
 **
 **  graphics.c
@@ -32,7 +54,9 @@ static  char sccsid[] = "@(#)graphics.c 1.23 94/11/29 Copyr 1994 Sun Microsystem
 #include <EUSCompat.h>
 #include <stdio.h>
 #include <sys/stat.h>
+#if !defined(CSRG_BASED)
 #include <sys/sysmacros.h>
+#endif
 #include <sys/param.h> /* MAXPATHLEN defined here */
 #ifdef SVR4
 #include <sys/utsname.h> /* SYS_NMLN */
@@ -605,7 +629,7 @@ gr_create_stipple(new_XContext *xc, unsigned char *data, int datawidth, int data
         if ((*stipple = XCreateBitmapFromData(xc->display,
                 xc->xid,
         /*      RootWindow(xc->display, DefaultScreen(xc->display)),  */
-                (char *)data, datawidth, dataheight)) == NULL) {
+                (char *)data, datawidth, dataheight)) == 0) {
                         ok = False;
                 }
         else {