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/XpmWrFFrData.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 vendor/x11iraf/xpm/XpmWrFFrData.c (limited to 'vendor/x11iraf/xpm/XpmWrFFrData.c') diff --git a/vendor/x11iraf/xpm/XpmWrFFrData.c b/vendor/x11iraf/xpm/XpmWrFFrData.c new file mode 100644 index 00000000..22ed71e9 --- /dev/null +++ b/vendor/x11iraf/xpm/XpmWrFFrData.c @@ -0,0 +1,36 @@ +/* Copyright 1990,91 GROUPE BULL -- See license conditions in file COPYRIGHT */ +/*****************************************************************************\ +* XpmWrFFrData.c: * +* * +* XPM library * +* Parse an Xpm array and write a file that corresponds to it. * +* * +* Developed by Dan Greening dgreen@cs.ucla.edu / dgreen@sti.com * +\*****************************************************************************/ + +#include "xpmP.h" + +int +XpmWriteFileFromData(filename, data) + char *filename; + char **data; +{ + XpmAttributes attributes; + XpmImage image; + int ErrorStatus; + + attributes.valuemask = XpmReturnExtensions; + + ErrorStatus = XpmCreateXpmImageFromData(data, &image, &attributes); + + if (ErrorStatus != XpmSuccess) + return (ErrorStatus); + + ErrorStatus = + XpmWriteFileFromXpmImage(filename, &image, &attributes, NULL); + + XpmFreeAttributes(&attributes); + XpmFreeXpmImage(&image); + + return (ErrorStatus); +} -- cgit