[FFmpeg-devel] [PATCH] tablegen: implement and use WRITE_ARRAY macros
Reimar Döffinger
Reimar.Doeffinger
Sun Jun 27 12:23:25 CEST 2010
On Sun, Jun 27, 2010 at 12:20:17PM +0200, Diego Elio 'Flameeyes' Petten? wrote:
> @@ -72,4 +73,23 @@ void write_float_2d_array (const void *, int, int);
> /** Write a standard file header */
> void write_fileheader(void);
>
> +#define WRITE_ARRAY(prefix, type, name) \
> + do { \
> + const size_t array_size = FF_ARRAY_ELEMS(name); \
> + printf(prefix" "#type" "#name"[%zu] = {\n", \
> + array_size); \
> + write_##type##_array(name, array_size); \
> + printf("};\n"); \
> + } while(0)
> +
> +#define WRITE_2D_ARRAY(prefix, type, name) \
> + do { \
> + const size_t array_size1 = FF_ARRAY_ELEMS(name); \
> + const size_t array_size2 = FF_ARRAY_ELEMS(name[0]); \
> + printf(prefix" "#type" "#name"[%zu][%zu] = {\n", \
> + array_size1, array_size2 ); \
> + write_##type##_2d_array(name, array_size1, array_size2); \
> + printf("};\n"); \
> + } while(0)
Find by me in principle, but the indentation and the traling \
are messed up because there's tabs and you won't be able to commit
with those tabs in there anyway...
>From Diego Sun Jun 27 12:44:00 2010
From: Diego (Diego)
Date: Sun, 27 Jun 2010 12:44:00 +0200
Subject: [FFmpeg-devel] [PATCH] tablegen: implement and use WRITE_ARRAY
macros
In-Reply-To: <20100627102325.GA2092 at 1und1.de>
References: <1277630555.11106.55.camel at yamato>
<1277634017-9157-1-git-send-email-flameeyes at gmail.com>
<20100627102325.GA2092 at 1und1.de>
Message-ID: <1277635440.11106.57.camel at yamato>
Il giorno dom, 27/06/2010 alle 12.23 +0200, Reimar D?ffinger ha scritto:
>
> Find by me in principle, but the indentation and the traling \
> are messed up because there's tabs and you won't be able to commit
> with those tabs in there anyway...
Stupid emacs... no problem to fix that.. okay to commit fixed that?
--
Diego Elio Petten? ? ?Flameeyes?
http://blog.flameeyes.eu/
If you found a .asc file in this mail and know not what it is,
it's a GnuPG digital signature: http://www.gnupg.org/
More information about the ffmpeg-devel
mailing list