From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- vendor/x11iraf/xpm/XpmWrFFrP.c | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 vendor/x11iraf/xpm/XpmWrFFrP.c (limited to 'vendor/x11iraf/xpm/XpmWrFFrP.c') diff --git a/vendor/x11iraf/xpm/XpmWrFFrP.c b/vendor/x11iraf/xpm/XpmWrFFrP.c new file mode 100644 index 00000000..16c6ec49 --- /dev/null +++ b/vendor/x11iraf/xpm/XpmWrFFrP.c @@ -0,0 +1,47 @@ +/* Copyright 1990-93 GROUPE BULL -- See license conditions in file COPYRIGHT */ +/*****************************************************************************\ +* XpmWrFFrP.c: * +* * +* XPM library * +* Write a pixmap and possibly its mask to an XPM file * +* * +* Developed by Arnaud Le Hors * +\*****************************************************************************/ + +#include "xpmP.h" +#ifdef VMS +#include "sys$library:string.h" +#else +#if defined(SYSV) || defined(SVR4) +#include +#else +#include +#endif +#endif + +int +XpmWriteFileFromPixmap(display, filename, pixmap, shapemask, attributes) + Display *display; + char *filename; + Pixmap pixmap; + Pixmap shapemask; + XpmAttributes *attributes; +{ + int ErrorStatus; + XpmImage image; + + /* + * get the XpmImage + */ + ErrorStatus = XpmCreateXpmImageFromPixmap(display, pixmap, shapemask, + &image, attributes); + if (ErrorStatus == XpmSuccess) { + /* + * write it out + */ + ErrorStatus = + XpmWriteFileFromXpmImage(filename, &image, attributes, NULL); + XpmFreeXpmImage(&image); + } + return (ErrorStatus); +} -- cgit