<commit_before>/** @file cc_handlers.c
 *  Functions for parsing DAAP content code data.
 *
 *  Copyright (C) 2006 XMMS2 Team
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#define _GNU_SOURCE
#include <string.h>

#include <stdlib.h>

#include <glib.h>
#include <glib/gprintf.h>

#include "cc_handlers.h"
#include "daap_conn.h"

#include "xmms/xmms_log.h"

#define DMAP_BYTES_REMAINING ((gint) (data_end - current_data))

static void
endian_swap_int16 (gint16 *i)
{
#if G_LITTLE_ENDIAN
	gint16 tmp;
	tmp = (gint16) (((*i >>  8) & 0x00FF) |
	                ((*i <<  8) & 0xFF00));
	*i = tmp;
#endif
}

static void
endian_swap_int32 (gint32 *i)
{
#if G_LITTLE_ENDIAN
	gint32 tmp;
	tmp = (gint32) (((*i >> 24) & 0x000000FF) |
	                ((*i >>  8) & 0x0000FF00) |
	                ((*i <<  8) & 0x00FF0000) |
	                ((*i << 24) & 0xFF000000));
	*i = tmp;
#endif
}

static void
endian_swap_int64 (gint64 *i)
{
#if G_LITTLE_ENDIAN
	gint64 tmp;
	tmp = (gint64) (                 ((*i >> 40) & 0x00000000000000FF) |<commit_msg>OTHER: Really commit the fix for big endian machines<commit_after>/** @file cc_handlers.c
 *  Functions for parsing DAAP content code data.
 *
 *  Copyright (C) 2006 XMMS2 Team
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#define _GNU_SOURCE
#include <string.h>

#include <stdlib.h>

#include <glib.h>
#include <glib/gprintf.h>

#include "cc_handlers.h"
#include "daap_conn.h"

#include "xmms/xmms_log.h"

#define DMAP_BYTES_REMAINING ((gint) (data_end - current_data))

static void
endian_swap_int16 (gint16 *i)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
	gint16 tmp;
	tmp = (gint16) (((*i >>  8) & 0x00FF) |
	                ((*i <<  8) & 0xFF00));
	*i = tmp;
#endif
}

static void
endian_swap_int32 (gint32 *i)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
	gint32 tmp;
	tmp = (gint32) (((*i >> 24) & 0x000000FF) |
	                ((*i >>  8) & 0x0000FF00) |
	                ((*i <<  8) & 0x00FF0000) |
	                ((*i << 24) & 0xFF000000));
	*i = tmp;
#endif
}

static void
endian_swap_int64 (gint64 *i)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
	gint64 tmp;
	tmp = (gint64) (                 ((*i >> 40) & 0x00000000000000FF) |
{'fraction_non_alphanumeric': 0.11891717692555591, 'fraction_numerical': 0.0573638414437641, 'mean_word_length': 3.144192256341789, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7462653', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1134, 'n_words': 361}