Changeset 52 for sources/src/sc_pat_trace.cc
- Timestamp:
- Jan 22, 2013, 4:23:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/src/sc_pat_trace.cc
r27 r52 35 35 */ 36 36 37 #include <ctime> 37 38 38 39 #include "sc_trace.h" … … 41 42 #include "internal.h" // notrace 42 43 43 #include <ctime>44 44 #ifdef HAVE_CONFIG_H 45 45 #include "config.h" … … 48 48 #ifdef CONFIG_PAT_TRACE_FORMAT 49 49 50 //----------------------------------------- 50 51 51 52 52 extern "C" { … … 54 54 } 55 55 56 //#include "malloc.h" // NO LONGER SUPPORTED 56 57 57 #include <cstdlib> 58 58 #include <cstdio> 59 59 60 //-----------------------------------------61 60 62 61 using namespace std; … … 64 63 namespace sc_core { 65 64 66 //*************************************************************************67 65 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 66 sc_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 84 80 } 81 85 82 86 83 //************************************************************************* 87 84 88 void 89 sc_close_pat_trace_file( sc_trace_file* traceFic ) 90 { 91 if (notrace) 92 return; 85 void sc_close_pat_trace_file(sc_trace_file * traceFic ) { 86 if (notrace) { 87 return; 88 } 93 89 94 trace (*traceFic,false);90 trace(*traceFic, false); 95 91 96 SAV_GENPAT (); 97 98 //libération de l'instance de la structure en mémoire: 99 delete traceFic; 92 SAV_GENPAT(); 100 93 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 } 107 104 } 108 105 … … 110 107 111 108 #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.