<commit_before>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * This file is part of the libone project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <iostream>
#include <iomanip>
#include "libone_utils.h"

namespace libone {

  void Revision::list_parse(librevenge::RVNGInputStream *input, FileChunkReference ref) {
    FileNodeList list(ref.get_location(), ref.get_size());
    FileNode node;
//    ObjectGroup group;
    long old = input->tell();
    ExtendedGUID temp;
    Object object;
    input->seek(ref.get_location(), librevenge::RVNG_SEEK_SET);
    cout << "trying to revision at " << input->tell() << "\n";

    while (!list.is_end()) {
    node = list.get_next_node(input);
//      std::cout << node.to_string ();
        switch(node.get_FileNodeID()) {
          case FileNode::RevisionManifestListStartFND:
            cout << "RevisionManifestListStartFND\n";
            temp.parse(input);
            skip(input, 4);
            break;
          case FileNode::RevisionManifestStart4FND:
            cout << "RevisionManifestStart4FND\n";
            skip(input, 8);
            role = readU32(input, false);
            skip(input, 2);
            break;
          case FileNode::RevisionManifestStart7FND:
            cout << "RevisionManifestStart7FND NOT 6\n";
          case FileNode::RevisionManifestStart6FND:
            cout << "RevisionManifestStart6FND\n";
            guid.parse(input);
            dependent.parse(input);
            role = readU32(input, false);
            odcsDefault = readU16(input, false);<commit_msg>break<commit_after>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * This file is part of the libone project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#include <iostream>
#include <iomanip>
#include "libone_utils.h"

namespace libone {

  void Revision::list_parse(librevenge::RVNGInputStream *input, FileChunkReference ref) {
    FileNodeList list(ref.get_location(), ref.get_size());
    FileNode node;
//    ObjectGroup group;
    long old = input->tell();
    ExtendedGUID temp;
    Object object;
    input->seek(ref.get_location(), librevenge::RVNG_SEEK_SET);
    cout << "trying to revision at " << input->tell() << "\n";

    while (!list.is_end()) {
    node = list.get_next_node(input);
//      std::cout << node.to_string ();
        switch(node.get_FileNodeID()) {
          case FileNode::RevisionManifestListStartFND:
            cout << "RevisionManifestListStartFND\n";
            temp.parse(input);
            skip(input, 4);
            break;
          case FileNode::RevisionManifestStart4FND:
            cout << "RevisionManifestStart4FND\n";
            skip(input, 8);
            role = readU32(input, false);
            skip(input, 2);
            break;
          case FileNode::RevisionManifestStart7FND:
            cout << "RevisionManifestStart7FND NOT 6\n";
            break;
          case FileNode::RevisionManifestStart6FND:
            cout << "RevisionManifestStart6FND\n";
            guid.parse(input);
            dependent.parse(input);
            role = readU32(input, false);
            odcsDefault = readU16(input, false);
{'fraction_non_alphanumeric': 0.12729325430426192, 'fraction_numerical': 0.012418854078464579, 'mean_word_length': 2.536926147704591, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 13, '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': '5860519', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1072, 'n_words': 264}