summaryrefslogtreecommitdiffstats
path: root/kernel/kls_xcf/xcf2pnm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kls_xcf/xcf2pnm')
-rw-r--r--kernel/kls_xcf/xcf2pnm/CMakeLists.txt14
-rw-r--r--kernel/kls_xcf/xcf2pnm/io-unix.c4
-rw-r--r--kernel/kls_xcf/xcf2pnm/options.i4
-rw-r--r--kernel/kls_xcf/xcf2pnm/pixels.c4
-rw-r--r--kernel/kls_xcf/xcf2pnm/utils.c4
-rw-r--r--kernel/kls_xcf/xcf2pnm/xcf-general.c12
-rw-r--r--kernel/kls_xcf/xcf2pnm/xcf2pnm.c4
-rw-r--r--kernel/kls_xcf/xcf2pnm/xcf2pnm.oi4
-rw-r--r--kernel/kls_xcf/xcf2pnm/xcftools.h4
9 files changed, 49 insertions, 5 deletions
diff --git a/kernel/kls_xcf/xcf2pnm/CMakeLists.txt b/kernel/kls_xcf/xcf2pnm/CMakeLists.txt
new file mode 100644
index 0000000..5edc991
--- /dev/null
+++ b/kernel/kls_xcf/xcf2pnm/CMakeLists.txt
@@ -0,0 +1,14 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/kernel/include
+ ${CMAKE_BINARY_DIR}
+)
+
+
+##### executable
+
+file( GLOB _bin_c_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c )
+tde_add_executable( ksquirrel-libs-xcf2pnm
+ SOURCES ${_bin_c_files}
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/kernel/kls_xcf/xcf2pnm/io-unix.c b/kernel/kls_xcf/xcf2pnm/io-unix.c
index 38dc4e4..2367779 100644
--- a/kernel/kls_xcf/xcf2pnm/io-unix.c
+++ b/kernel/kls_xcf/xcf2pnm/io-unix.c
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xcftools.h"
#include <string.h>
#include <sys/types.h>
diff --git a/kernel/kls_xcf/xcf2pnm/options.i b/kernel/kls_xcf/xcf2pnm/options.i
index f891767..418d01e 100644
--- a/kernel/kls_xcf/xcf2pnm/options.i
+++ b/kernel/kls_xcf/xcf2pnm/options.i
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
OPTIONGROUP(1i,General options);
OPTION('h',--help,show this message,
diff --git a/kernel/kls_xcf/xcf2pnm/pixels.c b/kernel/kls_xcf/xcf2pnm/pixels.c
index 65891f9..562f1be 100644
--- a/kernel/kls_xcf/xcf2pnm/pixels.c
+++ b/kernel/kls_xcf/xcf2pnm/pixels.c
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#define DEBUG
#include "xcftools.h"
#include "pixels.h"
diff --git a/kernel/kls_xcf/xcf2pnm/utils.c b/kernel/kls_xcf/xcf2pnm/utils.c
index bde0782..5875a4e 100644
--- a/kernel/kls_xcf/xcf2pnm/utils.c
+++ b/kernel/kls_xcf/xcf2pnm/utils.c
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xcftools.h"
#include <string.h>
#include <stdarg.h>
diff --git a/kernel/kls_xcf/xcf2pnm/xcf-general.c b/kernel/kls_xcf/xcf2pnm/xcf-general.c
index 9231134..fadba37 100644
--- a/kernel/kls_xcf/xcf2pnm/xcf-general.c
+++ b/kernel/kls_xcf/xcf2pnm/xcf-general.c
@@ -16,13 +16,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xcftools.h"
#include <string.h>
#include <errno.h>
#ifdef HAVE_ICONV
# include <iconv.h>
-#elif !defined(ICONV_CONST)
-# define ICONV_CONST const
#endif
uint8_t *xcf_file = 0 ;
@@ -91,13 +93,13 @@ xcfString(uint32_t ptr,uint32_t *after)
{
uint32_t length ;
unsigned i ;
- ICONV_CONST char *utf8master ;
+ const char *utf8master ;
xcfCheckspace(ptr,4,"(string length)");
length = xcfL(ptr) ;
ptr += 4 ;
xcfCheckspace(ptr,length,"(string)");
- utf8master = (ICONV_CONST char*)(xcf_file+ptr) ;
+ utf8master = (const char*)(xcf_file+ptr) ;
if( after ) *after = ptr + length ;
if( length == 0 || utf8master[length-1] != 0 )
FatalBadXCF("String at %" PRIX32 " not zero-terminated",ptr-4);
@@ -130,7 +132,7 @@ xcfString(uint32_t ptr,uint32_t *after)
else
while(1) {
char *buffer = xcfmalloc(targetsize) ;
- ICONV_CONST char *inbuf = utf8master ;
+ const char *inbuf = utf8master ;
char *outbuf = buffer ;
size_t incount = length ;
size_t outcount = targetsize ;
diff --git a/kernel/kls_xcf/xcf2pnm/xcf2pnm.c b/kernel/kls_xcf/xcf2pnm/xcf2pnm.c
index 06baf8d..70437e2 100644
--- a/kernel/kls_xcf/xcf2pnm/xcf2pnm.c
+++ b/kernel/kls_xcf/xcf2pnm/xcf2pnm.c
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xcftools.h"
#include "flatten.h"
#include <stdlib.h>
diff --git a/kernel/kls_xcf/xcf2pnm/xcf2pnm.oi b/kernel/kls_xcf/xcf2pnm/xcf2pnm.oi
index 382bd96..f02c4b8 100644
--- a/kernel/kls_xcf/xcf2pnm/xcf2pnm.oi
+++ b/kernel/kls_xcf/xcf2pnm/xcf2pnm.oi
@@ -4,6 +4,10 @@
#define XCF2FOO
#define OPTIONGROUP(a,b)
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef HAVE_GETOPT_LONG
static const struct option longopts[] = {
{ "help", 0, 0, 'h'},
diff --git a/kernel/kls_xcf/xcf2pnm/xcftools.h b/kernel/kls_xcf/xcf2pnm/xcftools.h
index d3efbab..4091648 100644
--- a/kernel/kls_xcf/xcf2pnm/xcftools.h
+++ b/kernel/kls_xcf/xcf2pnm/xcftools.h
@@ -19,6 +19,10 @@
#ifndef XCFTOOLS_H
#define XCFTOOLS_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "enums.h"
#include <stddef.h>
#include <stdio.h>