
Fatal errors should not be done with g_message(), but by setting the
returned GError appropriately. The main GError must therefore be passed
through functions.
Some non-fatal warnings may still be outputted with g_message() if we
want people to be aware of them (for instance if we managed to load some
data yet there might have been data loss or errors).
Finally when we are confident that we recovered from the format error,
it is still nice to output some error on standard error (not be totally
silent about it), but probably not need to bother people with popups.
See #5357.
Also clean up C++-style comments into C-style, to follow our coding
style.
Note: I only cleaned ddsread as a continuation of commit 81a3370e1d
. I
expect ddswrite to have similar issues, but I did not look at it.
34 lines
1.2 KiB
C
34 lines
1.2 KiB
C
/*
|
|
* DDS GIMP plugin
|
|
*
|
|
* Copyright (C) 2004-2012 Shawn Kirst <skirst@gmail.com>,
|
|
* with parts (C) 2003 Arne Reuter <homepage@arnereuter.de> where specified.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __DDSREAD_H__
|
|
#define __DDSREAD_H__
|
|
|
|
|
|
extern GimpPDBStatusType read_dds (GFile *file,
|
|
GimpImage **image,
|
|
gboolean interactive,
|
|
GimpProcedure *procedure,
|
|
GObject *config,
|
|
GError **error);
|
|
|
|
|
|
#endif /* __DDSREAD_H__ */
|