Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2afd42cb authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Apply patch from Sam

parent 00658482
Branches
Tags upstream/1.2+svn+git1.2afd42c
No related merge requests found
/* /*
** This file is part of the ViTE project. ** This file is part of the ViTE project.
** **
** This software is governed by the CeCILL-A license under French law ** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can ** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the ** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info". ** URL: "http://www.cecill.info".
** **
** As a counterpart to the access to the source code and rights to copy, ** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided ** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of ** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited ** the economic rights, and the successive licensors have only limited
** liability. ** liability.
** **
** In this respect, the user's attention is drawn to the risks associated ** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the ** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software, ** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also ** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced ** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore ** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards ** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their ** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and ** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security. ** operate it in the same conditions as regards security.
** **
** The fact that you are presently reading this means that you have had ** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms. ** knowledge of the CeCILL-A license and that you accept its terms.
** **
** **
** ViTE developers are (for version 0.* to 1.0): ** ViTE developers are (for version 0.* to 1.0):
** **
** - COULOMB Kevin ** - COULOMB Kevin
** - FAVERGE Mathieu ** - FAVERGE Mathieu
** - JAZEIX Johnny ** - JAZEIX Johnny
** - LAGRASSE Olivier ** - LAGRASSE Olivier
** - MARCOUEILLE Jule ** - MARCOUEILLE Jule
** - NOISETTE Pascal ** - NOISETTE Pascal
** - REDONDY Arthur ** - REDONDY Arthur
** - VUCHENER Clément ** - VUCHENER Clément
** **
*/ */
/** /**
* \file PajeFileManager.hpp * \file PajeFileManager.hpp
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#include <string.h> #include <string.h>
#define _PAJE_NBMAXTKS 16 #define _PAJE_NBMAXTKS 32
/** /**
* \struct PajeLine * \struct PajeLine
......
/* /*
** This file is part of the ViTE project. ** This file is part of the ViTE project.
** **
** This software is governed by the CeCILL-A license under French law ** This software is governed by the CeCILL-A license under French law
** and abiding by the rules of distribution of free software. You can ** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the ** use, modify and/or redistribute the software under the terms of the
** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following ** CeCILL-A license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info". ** URL: "http://www.cecill.info".
** **
** As a counterpart to the access to the source code and rights to copy, ** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided ** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of ** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited ** the economic rights, and the successive licensors have only limited
** liability. ** liability.
** **
** In this respect, the user's attention is drawn to the risks associated ** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the ** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software, ** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also ** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced ** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore ** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards ** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their ** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and ** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security. ** operate it in the same conditions as regards security.
** **
** The fact that you are presently reading this means that you have had ** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-A license and that you accept its terms. ** knowledge of the CeCILL-A license and that you accept its terms.
** **
** **
** ViTE developers are (for version 0.* to 1.0): ** ViTE developers are (for version 0.* to 1.0):
** **
** - COULOMB Kevin ** - COULOMB Kevin
** - FAVERGE Mathieu ** - FAVERGE Mathieu
** - JAZEIX Johnny ** - JAZEIX Johnny
** - LAGRASSE Olivier ** - LAGRASSE Olivier
** - MARCOUEILLE Jule ** - MARCOUEILLE Jule
** - NOISETTE Pascal ** - NOISETTE Pascal
** - REDONDY Arthur ** - REDONDY Arthur
** - VUCHENER Clément ** - VUCHENER Clément
** **
*/ */
/** /**
* \file mt_PajeFileManager.hpp * \file mt_PajeFileManager.hpp
* Visual Trace Explorer * Visual Trace Explorer
* *
* Release Date: January, 2nd 2010 * Release Date: January, 2nd 2010
* ViTE is a software to vivisualize execution trace provided by * ViTE is a software to vivisualize execution trace provided by
...@@ -57,24 +57,24 @@ ...@@ -57,24 +57,24 @@
* @author Jule Marcoueille * @author Jule Marcoueille
* @author Pascal Noisette * @author Pascal Noisette
* @author Arthur Redondy * @author Arthur Redondy
* @author Clément Vuchener * @author Clément Vuchener
* @date 2010-01-02 * @date 2010-01-02
* *
**/ **/
#ifndef FILE_HPP #ifndef FILE_HPP
#define FILE_HPP #define FILE_HPP
#include <string.h> #include <string.h>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#else #else
#include <unistd.h> #include <unistd.h>
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#define _PAJE_NBMAXTKS 16 #define _PAJE_NBMAXTKS 32
#include <cstring> #include <cstring>
#include <string> #include <string>
...@@ -83,31 +83,31 @@ ...@@ -83,31 +83,31 @@
#include <QMetaType> #include <QMetaType>
using namespace std; using namespace std;
/** /**
* \struct PajeLine * \struct PajeLine
* *
* Brief structure to store informations read * Brief structure to store informations read
* on each line * on each line
* *
* \param _id Line number * \param _id Line number
* \param _nbtks Number of tokens found on the line * \param _nbtks Number of tokens found on the line
* \param _tokens Pointers on the found tokens * \param _tokens Pointers on the found tokens
* *
*/ */
typedef struct PajeLine { typedef struct PajeLine {
int _id; int _id;
int _nbtks; int _nbtks;
char **_tokens; char **_tokens;
} PajeLine_t; } PajeLine_t;
//Q_DECLARE_METATYPE(PajeLine); //Q_DECLARE_METATYPE(PajeLine);
/** /**
* \class mt_PajeFileManager * \class mt_PajeFileManager
* *
* File manager to read files using Paje syntax. * File manager to read files using Paje syntax.
* Each line is read one after one and stored in * Each line is read one after one and stored in
* the PajeLine structure associated to the class. * the PajeLine structure associated to the class.
* *
* \sa Parser * \sa Parser
* \sa ParserPaje * \sa ParserPaje
* \sa ParserVite * \sa ParserVite
...@@ -116,7 +116,7 @@ class mt_PajeFileManager : public std::ifstream { ...@@ -116,7 +116,7 @@ class mt_PajeFileManager : public std::ifstream {
private: private:
std::string _filename; std::string _filename;
unsigned long long _filesize; unsigned long long _filesize;
int _total_filesize; int _total_filesize;
int _nbchunks; int _nbchunks;
int _current_chunk; int _current_chunk;
...@@ -130,36 +130,36 @@ private: ...@@ -130,36 +130,36 @@ private:
char* _old_line; char* _old_line;
#ifdef WIN32 #ifdef WIN32
HANDLE _fd; HANDLE _fd;
HANDLE _fm; HANDLE _fm;
#else #else
FILE* _fd; FILE* _fd;
#endif #endif
unsigned long long _pageSize; unsigned long long _pageSize;
unsigned long long _offset; unsigned long long _offset;
unsigned long long _global_offset; unsigned long long _global_offset;
mt_PajeFileManager(const mt_PajeFileManager &); mt_PajeFileManager(const mt_PajeFileManager &);
public: public:
/*! /*!
* \brief Constructor for the file * \brief Constructor for the file
*/ */
mt_PajeFileManager(); mt_PajeFileManager();
/*! /*!
* \brief Constructor for the file * \brief Constructor for the file
* \param filename : a filename * \param filename : a filename
*/ */
mt_PajeFileManager(const char * filename); mt_PajeFileManager(const char * filename);
/*! /*!
* \brief Destructor * \brief Destructor
* Destroy the file * Destroy the file
*/ */
~mt_PajeFileManager(); ~mt_PajeFileManager();
/*! /*!
* \fn open(const char * filename, ios_base::openmode mode) * \fn open(const char * filename, ios_base::openmode mode)
* \brief Open the file * \brief Open the file
...@@ -174,19 +174,19 @@ public: ...@@ -174,19 +174,19 @@ public:
*/ */
void close(); void close();
/*! /*!
* \fn eof() * \fn eof()
* \brief check the end of file * \brief check the end of file
*/ */
bool eof(); bool eof();
/*! /*!
* \fn eoc() * \fn eoc()
* \brief check the end of the opened chunk of file * \brief check the end of the opened chunk of file
*/ */
bool eoc(); bool eoc();
/*! /*!
* \fn close_old_chunk() * \fn close_old_chunk()
* \brief release the previous chunk of file * \brief release the previous chunk of file
*/ */
...@@ -203,7 +203,7 @@ public: ...@@ -203,7 +203,7 @@ public:
* \return The size already loaded * \return The size already loaded
*/ */
int get_size_loaded(); int get_size_loaded();
/*! /*!
* \fn get_percent_loaded() * \fn get_percent_loaded()
* \return The percent of the file loaded (between 0 and 1). * \return The percent of the file loaded (between 0 and 1).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment