diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
commit | 34546ecb9b586f34e04f6e133a247ffe1f50046e (patch) | |
tree | 55c0c6c76c55bfe99a9f3c7dec416604a1c6dbd9 /converter/other/fiasco/lib/macros.h | |
parent | d484f36f7c690d0a88476127afd9bdf90233699d (diff) | |
download | netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.gz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.xz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.zip |
Release 1.04.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4700 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/fiasco/lib/macros.h')
-rw-r--r-- | converter/other/fiasco/lib/macros.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/converter/other/fiasco/lib/macros.h b/converter/other/fiasco/lib/macros.h index 2f404a74..aafea45b 100644 --- a/converter/other/fiasco/lib/macros.h +++ b/converter/other/fiasco/lib/macros.h @@ -1,8 +1,8 @@ /* * macros.h * - * Written by: Ullrich Hafner - * + * Written by: Ullrich Hafner + * * This file is part of FIASCO (Fractal Image And Sequence COdec) * Copyright (C) 1994-2000 Ullrich Hafner */ @@ -20,34 +20,34 @@ #include <string.h> /******************************************************************************* - System configuration section - + System configuration section + *******************************************************************************/ #ifndef SEEK_CUR -# define SEEK_CUR 1 +# define SEEK_CUR 1 #endif /* not SEEK_CUR */ /***************************************************************************** - Various macros - + Various macros + *****************************************************************************/ -#define square(x) ((x) * (x)) -#define first_band(color) ((unsigned) ((color) ? Y : GRAY)) +#define square(x) ((x) * (x)) +#define first_band(color) ((unsigned) ((color) ? Y : GRAY)) #define last_band(color) ((unsigned) ((color) ? Cr : GRAY)) -#define width_of_level(l) ((unsigned) (1 << ((l) >> 1))) -#define height_of_level(l) ((unsigned) (1 << (((l) + 1) >> 1))) -#define size_of_level(l) ((unsigned) (1 << (l))) -#define address_of_level(l) ((unsigned) (size_of_level (l) - 1)) -#define size_of_tree(l) ((unsigned) (address_of_level ((l) + 1))) -#define is_odd(n) (abs (n) % 2) -#define _(x) (x) +#define width_of_level(l) ((unsigned) (1 << ((l) >> 1))) +#define height_of_level(l) ((unsigned) (1 << (((l) + 1) >> 1))) +#define size_of_level(l) ((unsigned) (1 << (l))) +#define address_of_level(l) ((unsigned) (size_of_level (l) - 1)) +#define size_of_tree(l) ((unsigned) (address_of_level ((l) + 1))) +#define is_odd(n) (abs (n) % 2) +#define _(x) (x) -#define MAXSTRLEN 1024 -#define MAXSTRLEN_SCANF "%1024s" +#define MAXSTRLEN 1024 +#define MAXSTRLEN_SCANF "%1024s" typedef enum color {GRAY = 0, Y = 0, Cb = 1, Cr = 2} color_e; |