<commit_before><commit_msg>move endian macros here<commit_after>/* $Id$ */

#ifndef _PFL_NET_H_
#define _PFL_NET_H_

#define p_ntoh_u16(v) ntoh16(v)
#define p_ntoh_u32(v) ntoh32(v)

#define p_hton_u16(v) hton16(v)
#define p_hton_u32(v) hton32(v)

#define p_ntoh_s16(v) ntoh16(v)
#define p_ntoh_s32(v) ntoh32(v)

#define p_hton_s16(v) hton16(v)
#define p_hton_s32(v) hton32(v)

#if __BYTE_ORDER == __LITTLE_ENDIAN
# define p_ntoh_u64(v)		((((v) & UINT64_C(0x00000000000000ff)) << 56) |	\
				 (((v) & UINT64_C(0x000000000000ff00)) << 40) |	\
				 (((v) & UINT64_C(0x0000000000ff0000)) << 24) |	\
				 (((v) & UINT64_C(0x00000000ff000000)) <<  8) |	\
				 (((v) & UINT64_C(0x000000ff00000000)) >>  8) |	\
				 (((v) & UINT64_C(0x0000ff0000000000)) >> 24) |	\
				 (((v) & UINT64_C(0x00ff000000000000)) >> 40) |	\
				 (((v) & UINT64_C(0xff00000000000000)) >> 56))
# define p_hton_u64(v) p_ntoh_u64(v)

# define p_ntoh_s64(v) ERROR
# define p_hton_s64(v) ERROR
#else
# define p_ntoh_u64(v) (v)
# define p_hton_u64(v) (v)

# define p_ntoh_s64(v) (v)
# define p_hton_s64(v) (v)
#endif

#endif /* _PFL_NET_H_ */
{'fraction_non_alphanumeric': 0.18280542986425338, 'fraction_numerical': 0.18099547511312217, 'mean_word_length': 4.9144385026737964, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '510792', 'n_tokens_mistral': 722, 'n_tokens_neox': 554, 'n_words': 87}