* indirect blocks.
*/
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int clear_bad_block_proc(ext2_filsys fs, blk_t *block_nr,
e2_blkcnt_t blockcnt,
};
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int xlate_func(ext2_filsys fs, blk_t *blocknr, e2_blkcnt_t blockcnt,
blk_t ref_block EXT2FS_ATTR((unused)),
return 0;
#else
#ifdef __GNUC__
- #warning BLKFLSBUF not defined
+# warning BLKFLSBUF not defined
#endif /* __GNUC__ */
#endif
#ifdef FDFLUSH
ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */
#else
#ifdef __GNUC__
- #warning FDFLUSH not defined
+# warning FDFLUSH not defined
#endif /* __GNUC__ */
#endif
}
};
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int get_pathname_proc(struct ext2_dir_entry *dirent,
int offset EXT2FS_ATTR((unused)),
* characters.
*/
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
char *mtpt, int mtlen)
* entry filetype.
*/
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name,
ext2_ino_t ino, int flags)
};
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int lookup_proc(struct ext2_dir_entry *dirent,
int offset EXT2FS_ATTR((unused)),
* Helper function for ext2fs_read_bb_inode()
*/
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int mark_bad_block(ext2_filsys fs, blk_t *block_nr,
e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
};
#ifdef __TURBOC__
- #pragma argsused
+# pragma argsused
#endif
static int unlink_proc(struct ext2_dir_entry *dirent,
int offset EXT2FS_ATTR((unused)),
#endif
#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif /* ATTRIBUTE_UNUSED */
#ifndef ATTRIBUTE_NORETURN
-#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
#endif /* ATTRIBUTE_NORETURN */
#ifndef ATTRIBUTE_PACKED
-#define ATTRIBUTE_PACKED __attribute__ ((__packed__))
+# define ATTRIBUTE_PACKED __attribute__ ((__packed__))
#endif /* ATTRIBUTE_PACKED */
#ifndef ATTRIBUTE_ALIGNED
-#define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
+# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
#endif /* ATTRIBUTE_ALIGNED */
/* -fwhole-program makes all symbols local. The attribute externally_visible
forces a symbol global. */
#ifndef ATTRIBUTE_EXTERNALLY_VISIBLE
# if __GNUC_PREREQ (4,1)
-# define ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((__externally_visible__))
+# define ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((__externally_visible__))
# else
-# define ATTRIBUTE_EXTERNALLY_VISIBLE
+# define ATTRIBUTE_EXTERNALLY_VISIBLE
# endif /* GNUC >= 4.1 */
#endif /* ATTRIBUTE_EXTERNALLY_VISIBLE */
/* ---- Endian Detection ------------------------------------ */
#ifndef __APPLE__
- #include <byteswap.h>
- #include <endian.h>
+# include <byteswap.h>
+# include <endian.h>
#endif
#ifdef __BIG_ENDIAN__
- #define BB_BIG_ENDIAN 1
- #define BB_LITTLE_ENDIAN 0
+# define BB_BIG_ENDIAN 1
+# define BB_LITTLE_ENDIAN 0
#elif __BYTE_ORDER == __BIG_ENDIAN
- #define BB_BIG_ENDIAN 1
- #define BB_LITTLE_ENDIAN 0
+# define BB_BIG_ENDIAN 1
+# define BB_LITTLE_ENDIAN 0
#else
- #define BB_BIG_ENDIAN 0
- #define BB_LITTLE_ENDIAN 1
+# define BB_BIG_ENDIAN 0
+# define BB_LITTLE_ENDIAN 1
#endif
/* ---- Networking ------------------------------------------ */
#ifndef __APPLE__
-#include <arpa/inet.h>
+# include <arpa/inet.h>
#else
-#include <netinet/in.h>
+# include <netinet/in.h>
#endif
/* ---- miscellaneous --------------------------------------- */
void *sha1_end(void *resbuf, sha1_ctx_t *ctx)
{
/* SHA1 Final padding and digest calculation */
- #if BB_BIG_ENDIAN
- static uint32_t mask[4] = { 0x00000000, 0xff000000, 0xffff0000, 0xffffff00 };
- static uint32_t bits[4] = { 0x80000000, 0x00800000, 0x00008000, 0x00000080 };
- #else
- static uint32_t mask[4] = { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
- static uint32_t bits[4] = { 0x00000080, 0x00008000, 0x00800000, 0x80000000 };
- #endif /* __BYTE_ORDER */
+#if BB_BIG_ENDIAN
+ static uint32_t mask[4] = { 0x00000000, 0xff000000, 0xffff0000, 0xffffff00 };
+ static uint32_t bits[4] = { 0x80000000, 0x00800000, 0x00008000, 0x00000080 };
+#else
+ static uint32_t mask[4] = { 0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
+ static uint32_t bits[4] = { 0x00000080, 0x00008000, 0x00800000, 0x80000000 };
+#endif /* __BYTE_ORDER */
uint8_t *hval = resbuf;
uint32_t i, cnt = (uint32_t) (ctx->count[0] & SHA1_MASK);