Change to the linux kernel coding style
[wmaker-crm.git] / wrlib / save.c
Commit [+]AuthorDateLineData
9af1c6c4 dan1998-10-21 14:43:47 +00001/* save.c - save image to file
6830b057 dan2004-10-12 21:28:27 +00002 *
4153e2fd dan2003-01-16 23:30:45 +00003 * Raster graphics library
6830b057 dan2004-10-12 21:28:27 +00004 *
4153e2fd dan2003-01-16 23:30:45 +00005 * Copyright (c) 1998-2003 Alfredo K. Kojima
9af1c6c4 dan1998-10-21 14:43:47 +00006 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
6830b057 dan2004-10-12 21:28:27 +000011 *
9af1c6c4 dan1998-10-21 14:43:47 +000012 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
6830b057 dan2004-10-12 21:28:27 +000016 *
9af1c6c4 dan1998-10-21 14:43:47 +000017 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22#include <config.h>
23
24#include <X11/Xlib.h>
25#include <stdlib.h>
26#include <stdio.h>
27#include <unistd.h>
28#include <fcntl.h>
29#include <sys/stat.h>
30#include <string.h>
31#include <time.h>
32
9af1c6c4 dan1998-10-21 14:43:47 +000033#include "wraster.h"
34
688a56e8 Carlos R. Mafra2009-08-20 00:59:40 +020035extern Bool RSaveXPM(RImage * image, char *filename);
9af1c6c4 dan1998-10-21 14:43:47 +000036
688a56e8 Carlos R. Mafra2009-08-20 00:59:40 +020037Bool RSaveImage(RImage * image, char *filename, char *format)
9af1c6c4 dan1998-10-21 14:43:47 +000038{
688a56e8
CM
Carlos R. Mafra2009-08-20 00:59:40 +020039 if (strcmp(format, "XPM") != 0) {
40 RErrorCode = RERR_BADFORMAT;
41 return False;
42 }
43 return RSaveXPM(image, filename);
9af1c6c4 dan1998-10-21 14:43:47 +000044}