Quellcode durchsuchen

* Remove #include <stdint.h> etc. from "common.h". Instead, make sure that

<cucul.h> will provide the C99 types, even if libcaca has been installed.
  * Rename what's left of "common.h" to "stubs.h".
  * Remove all references to erroneous <inttypes.h> from source files.
tags/v0.99.beta14
Sam Hocevar sam vor 16 Jahren
Ursprung
Commit
99b5396e8e
89 geänderte Dateien mit 129 neuen und 170 gelöschten Zeilen
  1. +1
    -1
      Makefile.am
  2. +2
    -2
      build-dos
  3. +1
    -1
      build-kernel
  4. +1
    -1
      build-win32
  5. +2
    -1
      caca/Makefile.am
  6. +0
    -1
      caca/caca.c
  7. +0
    -1
      caca/caca0.c
  8. +1
    -3
      caca/caca_internals.h
  9. +0
    -1
      caca/driver_conio.c
  10. +0
    -1
      caca/driver_gl.c
  11. +0
    -1
      caca/driver_ncurses.c
  12. +0
    -1
      caca/driver_raw.c
  13. +0
    -1
      caca/driver_slang.c
  14. +0
    -1
      caca/driver_vga.c
  15. +0
    -1
      caca/driver_win32.c
  16. +0
    -1
      caca/driver_x11.c
  17. +0
    -1
      caca/event.c
  18. +0
    -1
      caca/graphics.c
  19. +0
    -1
      caca/time.c
  20. +15
    -1
      configure.ac
  21. +1
    -0
      cucul/.gitignore
  22. +5
    -4
      cucul/Makefile.am
  23. +0
    -1
      cucul/attr.c
  24. +0
    -1
      cucul/box.c
  25. +0
    -1
      cucul/canvas.c
  26. +0
    -1
      cucul/charset.c
  27. +0
    -1
      cucul/conic.c
  28. +0
    -1
      cucul/cucul.c
  29. +2
    -0
      cucul/cucul.h
  30. +1
    -3
      cucul/cucul_internals.h
  31. +51
    -0
      cucul/cucul_types.h.in
  32. +0
    -1
      cucul/dither.c
  33. +0
    -1
      cucul/export.c
  34. +0
    -1
      cucul/figfont.c
  35. +0
    -1
      cucul/file.c
  36. +0
    -1
      cucul/font.c
  37. +0
    -1
      cucul/frame.c
  38. +0
    -1
      cucul/import.c
  39. +0
    -1
      cucul/legacy.c
  40. +0
    -1
      cucul/line.c
  41. +0
    -1
      cucul/transform.c
  42. +0
    -1
      cucul/triangle.c
  43. +2
    -1
      cxx/Makefile.am
  44. +2
    -1
      examples/Makefile.am
  45. +1
    -1
      examples/blit.c
  46. +0
    -1
      examples/colors.c
  47. +0
    -1
      examples/cucul.c
  48. +3
    -1
      examples/demo.c
  49. +0
    -1
      examples/dithering.c
  50. +0
    -1
      examples/driver.c
  51. +1
    -1
      examples/event.c
  52. +0
    -4
      examples/export.c
  53. +0
    -1
      examples/figfont.c
  54. +0
    -5
      examples/font.c
  55. +0
    -4
      examples/font2tga.c
  56. +2
    -5
      examples/frames.c
  57. +0
    -4
      examples/fullwidth.c
  58. +0
    -4
      examples/gamma.c
  59. +0
    -4
      examples/hsv.c
  60. +0
    -6
      examples/import.c
  61. +0
    -4
      examples/input.c
  62. +0
    -1
      examples/spritedit.c
  63. +1
    -1
      examples/swallow.c
  64. +2
    -4
      examples/text.c
  65. +1
    -4
      examples/transform.c
  66. +0
    -4
      examples/truecolor.c
  67. +0
    -4
      examples/unicode.c
  68. +2
    -1
      kernel/kernel.c
  69. +1
    -1
      msvc/Makefile.am
  70. +0
    -1
      msvc/common.h
  71. +2
    -0
      msvc/cucul_types.h
  72. +3
    -2
      ruby/Makefile.am
  73. +2
    -1
      src/Makefile.am
  74. +1
    -1
      src/aafire.c
  75. +0
    -1
      src/cacademo.c
  76. +0
    -1
      src/cacadraw.c
  77. +0
    -1
      src/cacaplay.c
  78. +0
    -1
      src/cacaserver.c
  79. +1
    -1
      src/cacaview.c
  80. +1
    -1
      src/common-image.c
  81. +1
    -1
      src/img2txt.c
  82. +2
    -7
      src/mygetopt.c
  83. +4
    -15
      stubs.h
  84. +1
    -1
      tests/Makefile.am
  85. +0
    -5
      tests/simple.c
  86. +2
    -1
      tools/Makefile.am
  87. +6
    -7
      tools/makefont.c
  88. +0
    -1
      tools/optipal.c
  89. +2
    -4
      tools/sortchars.c

+ 1
- 1
Makefile.am Datei anzeigen

@@ -3,7 +3,7 @@
SUBDIRS = kernel cucul caca src examples tests tools csharp cxx python ruby doc
DIST_SUBDIRS = $(SUBDIRS) msvc

EXTRA_DIST = NOTES COPYING.GPL COPYING.LGPL bootstrap build-dos build-kernel build-win32 caca-config.in common.h libcaca.spec
EXTRA_DIST = NOTES COPYING.GPL COPYING.LGPL bootstrap build-dos build-kernel build-win32 caca-config.in stubs.h libcaca.spec
AUTOMAKE_OPTIONS = dist-bzip2

bin_SCRIPTS = caca-config


+ 2
- 2
build-dos Datei anzeigen

@@ -18,7 +18,7 @@ mkdir "${BUILDDIR}"

cd "${BUILDDIR}"
# Build for DOS
"${SRCDIR}/configure" --host=i386-pc-msdosdjgpp --prefix=/ --bindir=/ --libdir=/ --disable-imlib2 --disable-doc
"${SRCDIR}/configure" --host=i386-pc-msdosdjgpp --prefix=/ --bindir=/ --libdir=/ --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx
make pkglibdir=/lib pkgdatadir=/data
# Install into our private directory
make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib pkgdatadir=/
@@ -28,7 +28,7 @@ rm -Rf "${BUILDDIR}"
i386-pc-msdosdjgpp-strip "${INSTALLDIR}/"*.exe

mkdir "${INSTALLDIR}/doc"
for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS TODO; do
for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
sed -e 's/$/^M/' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
done



+ 1
- 1
build-kernel Datei anzeigen

@@ -6,7 +6,7 @@
set -x
set -e

CFLAGS="-fno-builtin -O2 -I. -I.. -Wall"
CFLAGS="-fno-builtin -O2 -I. -I.. -I../cucul/ -Wall"
CPPFLAGS="-D__KERNEL__ -nostdinc -include kernel/kernel.h"
LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"



+ 1
- 1
build-win32 Datei anzeigen

@@ -34,7 +34,7 @@ rmdir "${INSTALLDIR}/bin"
rmdir "${INSTALLDIR}/lib"

mkdir "${INSTALLDIR}/doc"
for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS TODO; do
for f in COPYING COPYING.LGPL COPYING.GPL README AUTHORS NEWS NOTES THANKS; do
sed -e 's/$/ /' < "${SRCDIR}/${f}" > "${INSTALLDIR}/doc/${f}.txt"
done
rm -Rf "${INSTALLDIR}/share"


+ 2
- 1
caca/Makefile.am Datei anzeigen

@@ -3,7 +3,8 @@
EXTRA_DIST = caca.pc.in
DISTCLEANFILES = caca.pc

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -DPLUGINDIR=\"$(plugindir)\"
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
-DPLUGINDIR=\"$(plugindir)\"

pkgconfig_DATA = caca.pc
pkgconfigdir = $(libdir)/pkgconfig


+ 0
- 1
caca/caca.c Datei anzeigen

@@ -19,7 +19,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
caca/caca0.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 1
- 3
caca/caca_internals.h Datei anzeigen

@@ -15,9 +15,7 @@
#ifndef __CACA_INTERNALS_H__
#define __CACA_INTERNALS_H__

#if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
# include <inttypes.h>
#endif
#include "stubs.h"

typedef struct caca_timer caca_timer_t;
typedef struct caca_privevent caca_privevent_t;


+ 0
- 1
caca/driver_conio.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_CONIO)



+ 0
- 1
caca/driver_gl.c Datei anzeigen

@@ -19,7 +19,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_GL)



+ 0
- 1
caca/driver_ncurses.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if defined USE_NCURSES



+ 0
- 1
caca/driver_raw.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)



+ 0
- 1
caca/driver_slang.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_SLANG)



+ 0
- 1
caca/driver_vga.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_VGA)



+ 0
- 1
caca/driver_win32.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_WIN32)



+ 0
- 1
caca/driver_x11.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if defined(USE_X11)



+ 0
- 1
caca/event.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
caca/graphics.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
caca/time.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 15
- 1
configure.ac Datei anzeigen

@@ -87,7 +87,7 @@ AC_ARG_ENABLE(doc,
AC_ARG_ENABLE(zzuf,
[ --enable-zzuf use zzuf for fuzzing tests (autodetected)])

AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h inttypes.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h termios.h)
AC_CHECK_HEADERS(stdio.h stdarg.h signal.h sys/ioctl.h sys/time.h endian.h unistd.h arpa/inet.h netinet/in.h winsock2.h errno.h locale.h getopt.h dlfcn.h termios.h)
AC_CHECK_FUNCS(signal ioctl snprintf vsnprintf getenv putenv strcasecmp htons)
AC_CHECK_FUNCS(usleep gettimeofday)

@@ -323,6 +323,19 @@ AC_SUBST(CACA_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(GL_LIBS)

# How to get the C99 types. See cucul/cucul_types.h.in for details about
# the CUCUL_TYPES variable
if test "${ac_cv_my_have_vga}" = "yes"; then
CUCUL_TYPES=0
else
AC_CHECK_HEADERS(stdint.h,
[CUCUL_TYPES=1],
[AC_CHECK_HEADERS(inttypes.h,
[CUCUL_TYPES=2],
[CUCUL_TYPES=0])])
fi
AC_SUBST(CUCUL_TYPES)

# Optimizations
CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
@@ -462,6 +475,7 @@ AC_CONFIG_FILES([
msvc/Makefile
])
AC_CONFIG_FILES([
cucul/cucul_types.h
cucul/cucul.pc
caca/caca.pc
csharp/cucul-sharp.dll.config


+ 1
- 0
cucul/.gitignore Datei anzeigen

@@ -0,0 +1 @@
cucul_types.h

+ 5
- 4
cucul/Makefile.am Datei anzeigen

@@ -1,18 +1,19 @@
# $Id$

EXTRA_DIST = cucul.pc.in mono9.data monobold12.data
DISTCLEANFILES = cucul.pc
EXTRA_DIST = cucul_types.h.in cucul.pc.in mono9.data monobold12.data
DISTCLEANFILES = cucul_types.h cucul.pc

pkgconfig_DATA = cucul.pc
pkgconfigdir = $(libdir)/pkgconfig

include_HEADERS = cucul.h
include_HEADERS = cucul.h cucul_types.h

lib_LTLIBRARIES = libcucul.la

libcucul_la_SOURCES = \
cucul.c \
cucul.h \
cucul_types.h \
cucul_internals.h \
legacy.c \
canvas.c \
@@ -35,7 +36,7 @@ libcucul_la_DEPENDENCIES = \
mono9.data \
monobold12.data \
$(NULL)
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul
libcucul_la_LDFLAGS = -no-undefined -version-number @LT_VERSION@
libcucul_la_LIBADD = $(ZLIB_LIBS)


+ 0
- 1
cucul/attr.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#include "cucul.h"
#include "cucul_internals.h"


+ 0
- 1
cucul/box.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
cucul/canvas.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h> /* BUFSIZ */


+ 0
- 1
cucul/charset.c Datei anzeigen

@@ -19,7 +19,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <string.h>


+ 0
- 1
cucul/conic.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
cucul/cucul.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 2
- 0
cucul/cucul.h Datei anzeigen

@@ -24,6 +24,8 @@
#ifndef __CUCUL_H__
#define __CUCUL_H__

#include <cucul_types.h>

#undef __extern
#if defined(_WIN32) && defined(__LIBCUCUL__)
# define __extern extern __declspec(dllexport)


+ 1
- 3
cucul/cucul_internals.h Datei anzeigen

@@ -15,9 +15,7 @@
#ifndef __CUCUL_INTERNALS_H__
#define __CUCUL_INTERNALS_H__

#if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
# include <inttypes.h>
#endif
#include "stubs.h"

typedef struct cucul_figfont cucul_figfont_t;



+ 51
- 0
cucul/cucul_types.h.in Datei anzeigen

@@ -0,0 +1,51 @@
/*
* libcucul Canvas for ultrafast compositing of Unicode letters
* libcaca Colour ASCII-Art library
* Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
* All Rights Reserved
*
* $Id$
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Do What The Fuck You Want To
* Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/

/*
* This file contains definitions for the C99 integer types.
*/

#ifndef __CUCUL_TYPES_H__
#define __CUCUL_TYPES_H__

#ifndef CUCUL_TYPES
# define CUCUL_TYPES @CUCUL_TYPES@
#endif

/* mode 1: standard <inttypes.h> header is present, just include it */
#if CUCUL_TYPES == 1
# include <inttypes.h>

/* mode 2: standard <stdint.h> header is present, just include it */
#elif CUCUL_TYPES == 2
# include <stdint.h>

/* fallback: nothing is available, we assume the platform is 32-bit and
* sizeof(long) == sizeof(void *) */
#else
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed long int int32_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long int uint32_t;

typedef long int intptr_t;
typedef unsigned long int uintptr_t;

#endif

#endif /* __CUCUL_TYPES_H__ */


+ 0
- 1
cucul/dither.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_ENDIAN_H)


+ 0
- 1
cucul/export.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
cucul/figfont.c Datei anzeigen

@@ -21,7 +21,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
cucul/file.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined __KERNEL__
# include <stdio.h>


+ 0
- 1
cucul/font.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_ENDIAN_H)


+ 0
- 1
cucul/frame.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
cucul/import.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined __KERNEL__
# include <stdio.h>


+ 0
- 1
cucul/legacy.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
cucul/line.c Datei anzeigen

@@ -18,7 +18,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
cucul/transform.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 0
- 1
cucul/triangle.c Datei anzeigen

@@ -17,7 +17,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdlib.h>


+ 2
- 1
cxx/Makefile.am Datei anzeigen

@@ -1,6 +1,7 @@
# $Id: Makefile.am 552 2006-04-13 16:10:16Z jylam $

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
-I$(top_srcdir)/caca

if USE_CXX
include_HEADERS = cucul++.h caca++.h


+ 2
- 1
examples/Makefile.am Datei anzeigen

@@ -1,6 +1,7 @@
# $Id$

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\"
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
-I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\"

noinst_PROGRAMS = blit colors cucul demo demo0 dithering driver event export figfont font font2tga frames fullwidth gamma hsv input spritedit swallow text transform truecolor unicode import



+ 1
- 1
examples/blit.c Datei anzeigen

@@ -13,7 +13,7 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# include <stdio.h>
# include <string.h>


+ 0
- 1
examples/colors.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
examples/cucul.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 3
- 1
examples/demo.c Datei anzeigen

@@ -13,12 +13,14 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# include <math.h>
# include <string.h>
# include <stdio.h>
#endif

#include "cucul.h"
#include "caca.h"

static void display_menu(void);


+ 0
- 1
examples/dithering.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
examples/driver.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <string.h>


+ 1
- 1
examples/event.c Datei anzeigen

@@ -13,7 +13,7 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# include <stdio.h>
# include <string.h>


+ 0
- 4
examples/export.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <stdlib.h>
# include <string.h>


+ 0
- 1
examples/figfont.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 5
examples/font.c Datei anzeigen

@@ -13,13 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif

# if defined(HAVE_ENDIAN_H)
# include <endian.h>
# endif


+ 0
- 4
examples/font2tga.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <stdlib.h>
#endif


+ 2
- 5
examples/frames.c Datei anzeigen

@@ -13,14 +13,11 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif

#if !defined(__KERNEL__)
# include <stdio.h>
#endif

#include "cucul.h"
#include "caca.h"



+ 0
- 4
examples/fullwidth.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
#endif



+ 0
- 4
examples/gamma.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <math.h>
#endif


+ 0
- 4
examples/hsv.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
#endif



+ 0
- 6
examples/import.c Datei anzeigen

@@ -13,18 +13,12 @@
*/

#include "config.h"
#include "common.h"


#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <stdlib.h>
#endif


#include "cucul.h"
#include "caca.h"



+ 0
- 4
examples/input.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <string.h>
# include <stdio.h>
#endif


+ 0
- 1
examples/spritedit.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 1
- 1
examples/swallow.c Datei anzeigen

@@ -13,7 +13,7 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# include <stdio.h>
# include <string.h>


+ 2
- 4
examples/text.c Datei anzeigen

@@ -13,15 +13,13 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
#endif

#include "cucul.h"

#define STRING \


+ 1
- 4
examples/transform.c Datei anzeigen

@@ -13,11 +13,8 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <string.h>
#endif


+ 0
- 4
examples/truecolor.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
#endif



+ 0
- 4
examples/unicode.c Datei anzeigen

@@ -13,12 +13,8 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
#endif



+ 2
- 1
kernel/kernel.c Datei anzeigen

@@ -20,7 +20,8 @@
*/

#include "config.h"
#include "common.h"

#include "cucul_types.h"

#ifdef __KERNEL__



+ 1
- 1
msvc/Makefile.am Datei anzeigen

@@ -4,7 +4,7 @@ NULL =

EXTRA_DIST = libcaca.sln \
config.h \
common.h \
cucul_types.h \
libcucul.vcproj \
libcaca.vcproj \
cacafire.vcproj \


+ 0
- 1
msvc/common.h Datei anzeigen

@@ -1 +0,0 @@
#include "../common.h"

+ 2
- 0
msvc/cucul_types.h Datei anzeigen

@@ -0,0 +1,2 @@
#define CUCUL_TYPES 0
#include "../cucul/cucul_types.h.in"

+ 3
- 2
ruby/Makefile.am Datei anzeigen

@@ -11,7 +11,7 @@ endif

CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes

cucul_la_CPPFLAGS = -I$(top_srcdir)/cucul $(RUBY_CFLAGS)
cucul_la_CPPFLAGS = -I$(top_srcdir)/cucul -I../cucul $(RUBY_CFLAGS)
cucul_la_SOURCES = cucul.c \
common.h \
cucul-canvas.c \
@@ -24,7 +24,8 @@ cucul_la_SOURCES = cucul.c \
cucul_la_LDFLAGS = -module -avoid-version -shared $(RUBY_LIBS)
cucul_la_LIBADD = ../cucul/libcucul.la

caca_la_CPPFLAGS = -I$(top_srcdir)/caca -I$(top_srcdir)/cucul $(RUBY_CFLAGS)
caca_la_CPPFLAGS = -I$(top_srcdir)/caca -I$(top_srcdir)/cucul -I../cucul \
$(RUBY_CFLAGS)
caca_la_SOURCES = caca.c \
common.h \
caca-display.c \


+ 2
- 1
src/Makefile.am Datei anzeigen

@@ -3,7 +3,8 @@
pkgdata_DATA = caca.txt

EXTRA_DIST = caca.txt
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca -DLIBCACA=1 -DX_DISPLAY_MISSING=1
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
-I$(top_srcdir)/caca -DLIBCACA=1 -DX_DISPLAY_MISSING=1

bin_PROGRAMS = cacademo cacafire cacaplay cacaview img2txt $(fcntl_programs)
noinst_PROGRAMS = cacadraw


+ 1
- 1
src/aafire.c Datei anzeigen

@@ -24,12 +24,12 @@

#ifdef LIBCACA
#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
#endif
#include "cucul.h"
#include "caca.h"
#else
#include <stdio.h>


+ 0
- 1
src/cacademo.c Datei anzeigen

@@ -15,7 +15,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
src/cacadraw.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
src/cacaplay.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 0
- 1
src/cacaserver.c Datei anzeigen

@@ -14,7 +14,6 @@
*/

#include "config.h"
#include "common.h"

#include <stdio.h>
#include <string.h>


+ 1
- 1
src/cacaview.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>
@@ -27,6 +26,7 @@

#include "cucul.h"
#include "caca.h"

#include "common-image.h"

/* Local macros */


+ 1
- 1
src/common-image.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>
@@ -30,6 +29,7 @@
#endif

#include "cucul.h"

#include "common-image.h"

#if !defined(USE_IMLIB2)


+ 1
- 1
src/img2txt.c Datei anzeigen

@@ -14,7 +14,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>
@@ -35,6 +34,7 @@
#endif

#include "cucul.h"

#include "common-image.h"

#define IMG2TXTVERSION "0.1"


+ 2
- 7
src/mygetopt.c Datei anzeigen

@@ -17,17 +17,12 @@
*/

#include "config.h"
#include "common.h"

#if defined HAVE_STDINT_H
# include <stdint.h>
#elif defined HAVE_INTTYPES_H
# include <inttypes.h>
#endif

#include <stdio.h>
#include <string.h>

#include "cucul_types.h"

#include "mygetopt.h"

int myoptind = 1;


common.h → stubs.h Datei anzeigen

@@ -17,21 +17,8 @@
* function prototypes that are sometimes missing.
*/

/* C99 types */
#if defined HAVE_INTTYPES_H && !defined __KERNEL__
# include <inttypes.h>
#else
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed long int int32_t;

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long int uint32_t;

typedef long int intptr_t;
typedef unsigned long int uintptr_t;
#endif
#ifndef __STUBS_H__
#define __STUBS_H__

/* errno handling */
#if defined HAVE_ERRNO_H && !defined __KERNEL__
@@ -107,3 +94,5 @@ static inline uint32_t hton32(uint32_t x)
}
#endif

#endif /* __STUBS_H__ */


+ 1
- 1
tests/Makefile.am Datei anzeigen

@@ -1,6 +1,6 @@
# $Id$

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul

TESTS = simple



+ 0
- 5
tests/simple.c Datei anzeigen

@@ -13,13 +13,8 @@
*/

#include "config.h"
#include "common.h"


#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <stdlib.h>
#endif


+ 2
- 1
tools/Makefile.am Datei anzeigen

@@ -1,6 +1,7 @@
# $Id$

AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\"
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/cucul -I../cucul \
-I$(top_srcdir)/caca -DDATADIR=\"$(pkgdatadir)\"

noinst_PROGRAMS = optipal sortchars $(pango_programs)



+ 6
- 7
tools/makefont.c Datei anzeigen

@@ -16,23 +16,22 @@
*/

#include "config.h"
#include "common.h"

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#if defined(HAVE_ARPA_INET_H)
#if defined HAVE_ARPA_INET_H
# include <arpa/inet.h>
#elif defined(HAVE_NETINET_IN_H)
#elif defined HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif

#include "cucul.h"

#include <pango/pango.h>
#include <pango/pangoft2.h>

#include "cucul.h"

/* Split our big strings into chunks of 480 characters, because it is
* the multiple of 32 directly below 509, which is the maximum allowed
* string size in C89. */
@@ -437,13 +436,13 @@ static int printf_unicode(struct glyph *g)

static int printf_u32(char const *fmt, uint32_t i)
{
uint32_t ni = hton32(i);
uint32_t ni = htonl(i);
return printf_hex(fmt, (uint8_t *)&ni, 4);
}

static int printf_u16(char const *fmt, uint16_t i)
{
uint16_t ni = hton16(i);
uint16_t ni = htons(i);
return printf_hex(fmt, (uint8_t *)&ni, 2);
}



+ 0
- 1
tools/optipal.c Datei anzeigen

@@ -13,7 +13,6 @@
*/

#include "config.h"
#include "common.h"

#if !defined(__KERNEL__)
# include <stdio.h>


+ 2
- 4
tools/sortchars.c Datei anzeigen

@@ -13,15 +13,13 @@
*/

#include "config.h"
#include "common.h"
#if !defined(__KERNEL__)
# if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
# endif
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
#endif

#include "cucul.h"

#define GLYPHS 0x7f


Laden…
Abbrechen
Speichern