aboutsummaryrefslogtreecommitdiff
path: root/vendor/x11iraf/xpm/XpmCrDataFrP.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vendor/x11iraf/xpm/XpmCrDataFrP.c
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vendor/x11iraf/xpm/XpmCrDataFrP.c')
-rw-r--r--vendor/x11iraf/xpm/XpmCrDataFrP.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/vendor/x11iraf/xpm/XpmCrDataFrP.c b/vendor/x11iraf/xpm/XpmCrDataFrP.c
new file mode 100644
index 00000000..5d6024eb
--- /dev/null
+++ b/vendor/x11iraf/xpm/XpmCrDataFrP.c
@@ -0,0 +1,47 @@
+/* Copyright 1990-93 GROUPE BULL -- See license conditions in file COPYRIGHT */
+/*****************************************************************************\
+* XpmCrDataFP.c: *
+* *
+* XPM library *
+* Scan a pixmap and possibly its mask and create an XPM array *
+* *
+* Developed by Arnaud Le Hors *
+\*****************************************************************************/
+
+#include "xpmP.h"
+#ifdef VMS
+#include "sys$library:string.h"
+#else
+#if defined(SYSV) || defined(SVR4)
+#include <string.h>
+#else
+#include <strings.h>
+#endif
+#endif
+
+int
+XpmCreateDataFromPixmap(display, data_return, pixmap, shapemask, attributes)
+ Display *display;
+ char ***data_return;
+ Pixmap pixmap;
+ Pixmap shapemask;
+ XpmAttributes *attributes;
+{
+ int ErrorStatus;
+ XpmImage image;
+
+ /*
+ * get the XpmImage
+ */
+ ErrorStatus = XpmCreateXpmImageFromPixmap(display, pixmap, shapemask,
+ &image, attributes);
+ if (ErrorStatus == XpmSuccess) {
+ /*
+ * create data from the XpmImage
+ */
+ ErrorStatus =
+ XpmCreateDataFromXpmImage(data_return, &image, attributes);
+ XpmFreeXpmImage(&image);
+ }
+ return (ErrorStatus);
+}