<commit_before>/*
    Copyright contributors as noted in the AUTHORS file.
                
    This file is part of PLATANOS.

    PLATANOS is free software; you can redistribute it and/or modify it under
    the terms of the GNU Affero General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
            
    PLATANOS 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 Affero General Public License for more details.
        
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#include "interval.h"


int
cmp_interval_t (struct interval_t *first, interval_t * second)
{

    return cmp_hkey_t (&(first->end), &(second->end));

}


void
interval_init (interval_t ** interval, struct _hkey_t *start,
               struct _hkey_t *end)
{
    *interval = malloc (sizeof (interval_t));
    if (start) {
        memcpy (&((*interval)->start), start, sizeof (struct _hkey_t));
    }
    if (end) {
        memcpy (&((*interval)->end), end, sizeof (struct _hkey_t));
    }

}

void
interval_minit (interval_t ** interval, zmsg_t * msg)
{

    *interval = malloc (sizeof (interval_t));

    zframe_t *frame = zmsg_first (msg);
    frame = zmsg_next (msg);
    frame = zmsg_next (msg);
    memcpy (&((*interval)->start), zframe_data (frame), zframe_size (frame));
    frame = zmsg_next (msg);
    memcpy (&((*interval)->end), zframe_data (frame), zframe_size (frame));


}
<commit_msg>interval_minit was expecting the previous serialization<commit_after>/*
    Copyright contributors as noted in the AUTHORS file.
                
    This file is part of PLATANOS.

    PLATANOS is free software; you can redistribute it and/or modify it under
    the terms of the GNU Affero General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
            
    PLATANOS 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 Affero General Public License for more details.
        
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#include "interval.h"


int
cmp_interval_t (struct interval_t *first, interval_t * second)
{

    return cmp_hkey_t (&(first->end), &(second->end));

}


void
interval_init (interval_t ** interval, struct _hkey_t *start,
               struct _hkey_t *end)
{
    *interval = malloc (sizeof (interval_t));
    if (start) {
        memcpy (&((*interval)->start), start, sizeof (struct _hkey_t));
    }
    if (end) {
        memcpy (&((*interval)->end), end, sizeof (struct _hkey_t));
    }

}

void
interval_minit (interval_t ** interval, zmsg_t * msg)
{

    *interval = malloc (sizeof (interval_t));

    zframe_t *frame = zmsg_first (msg);
    memcpy (&((*interval)->start), zframe_data (frame), zframe_size (frame));
    frame = zmsg_next (msg);
    memcpy (&((*interval)->end), zframe_data (frame), zframe_size (frame));


}

{'fraction_non_alphanumeric': 0.10181392627267408, 'fraction_numerical': 0.0005851375073142189, 'mean_word_length': 3.079952267303103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '590004', 'n_tokens_mistral': 1024, 'n_tokens_neox': 1003, 'n_words': 385}