<commit_before>#include "awd_types.h"
#include "block.h"
#include "util.h"

#include "platform.h"


AWDBlock::AWDBlock(AWD_block_type type) 
{
    this->type = type;
    
    // TODO: Allow setting flags
    this->flags = 0;
}


void
AWDBlock::prepare_write()
{
    // Does nothing by default. Can be optionally
    // overriden by sub-classes to take any actions
    // that need to happen before length is calculated
}

size_t
AWDBlock::write_block(int fd, awd_baddr addr)
{
    awd_uint8 ns_addr;
    awd_uint32 length;
    awd_uint32 length_be;
    awd_baddr block_addr_be;<commit_msg>Fixed issue with block address not being properly initialized to zero.<commit_after>#include "awd_types.h"
#include "block.h"
#include "util.h"

#include "platform.h"


AWDBlock::AWDBlock(AWD_block_type type) 
{
    this->type = type;
    
    // TODO: Allow setting flags
    this->flags = 0;
	this->addr = 0;
}


void
AWDBlock::prepare_write()
{
    // Does nothing by default. Can be optionally
    // overriden by sub-classes to take any actions
    // that need to happen before length is calculated
}

size_t
AWDBlock::write_block(int fd, awd_baddr addr)
{
    awd_uint8 ns_addr;
    awd_uint32 length;
    awd_uint32 length_be;
    awd_baddr block_addr_be;
{'fraction_non_alphanumeric': 0.09984025559105432, 'fraction_numerical': 0.010383386581469648, 'mean_word_length': 3.4275618374558303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4984065', 'n_tokens_mistral': 460, 'n_tokens_neox': 445, 'n_words': 121}