Ignore:
Timestamp:
Jan 22, 2013, 4:23:22 PM (11 years ago)
Author:
meunier
Message:

Code formatting in all source files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/src/sc_pat_trace.cc

    r27 r52  
    3535 */
    3636
     37#include <ctime>
    3738
    3839#include "sc_trace.h"
     
    4142#include "internal.h" // notrace
    4243
    43 #include <ctime>
    4444#ifdef HAVE_CONFIG_H
    4545#include "config.h"
     
    4848#ifdef CONFIG_PAT_TRACE_FORMAT
    4949
    50 //-----------------------------------------
     50
    5151
    5252extern "C" {
     
    5454}
    5555
    56 //#include "malloc.h" // NO LONGER SUPPORTED
     56
    5757#include <cstdlib>
    5858#include <cstdio>
    5959
    60 //-----------------------------------------
    6160
    6261using namespace std;
     
    6463namespace sc_core {
    6564
    66 //*************************************************************************
    6765
    68 sc_trace_file*
    69 sc_create_pat_trace_file(const char * name)
    70 {
    71   if (notrace)
    72     return NULL;
    73         //création d'1 instance de la structure Sc_trace_file:
    74         sc_trace_file *traceFic=new sc_trace_file();
    75         traceFic->flag = PAT_FORMAT;   
    76        
    77         trace_file_list.push_back(traceFic);
    78        
    79         DEF_GENPAT((char *)name);
    80        
    81         return traceFic;
    82         //pointeur sur le sc_trace_file dontl'un des elts pointe sur le fichier.pat crée
    83        
     66sc_trace_file * sc_create_pat_trace_file(const char * name) {
     67    if (notrace) {
     68        return NULL;
     69    }
     70    //création d'1 instance de la structure Sc_trace_file:
     71    sc_trace_file * traceFic = new sc_trace_file();
     72    traceFic->flag = PAT_FORMAT;       
     73
     74    trace_file_list.push_back(traceFic);
     75
     76    DEF_GENPAT((char *) name);
     77
     78    return traceFic;
     79    //pointeur sur le sc_trace_file dontl'un des elts pointe sur le fichier.pat crée
    8480}
     81
    8582
    8683//*************************************************************************
    8784
    88 void
    89 sc_close_pat_trace_file( sc_trace_file* traceFic )
    90 {       
    91   if (notrace)
    92     return;
     85void sc_close_pat_trace_file(sc_trace_file * traceFic ) {       
     86    if (notrace) {
     87        return;
     88    }
    9389
    94   trace  (*traceFic,false);
     90    trace(*traceFic, false);
    9591
    96         SAV_GENPAT ();
    97        
    98         //libération de l'instance de la structure en mémoire:
    99         delete traceFic;
     92    SAV_GENPAT();
    10093
    101         vector<sc_trace_file*>::iterator i;
    102         for (i = trace_file_list.begin (); i != trace_file_list.end(); ++i)
    103                 if (*i == traceFic) {
    104                         trace_file_list.erase(i);
    105                         break;
    106                 }
     94    //libération de l'instance de la structure en mémoire:
     95    delete traceFic;
     96
     97    vector<sc_trace_file *>::iterator i;
     98    for (i = trace_file_list.begin (); i != trace_file_list.end(); ++i) {
     99        if (*i == traceFic) {
     100            trace_file_list.erase(i);
     101            break;
     102        }
     103    }
    107104}
    108105
     
    110107
    111108#endif
     109
     110/*
     111# Local Variables:
     112# tab-width: 4;
     113# c-basic-offset: 4;
     114# c-file-offsets:((innamespace . 0)(inline-open . 0));
     115# indent-tabs-mode: nil;
     116# End:
     117#
     118# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
     119*/
     120
Note: See TracChangeset for help on using the changeset viewer.