comparison src/gpf2/inc/ind2str.h @ 1:864b8cc0cf63

src/gpf2: preened GPF goo from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:38:58 +0000
parents
children
comparison
equal deleted inserted replaced
0:945cf7f506b2 1:864b8cc0cf63
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : STR2IND
4 | Modul : ind2str.h
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This Module defines interface of the ind2str library. The
18 | main purpose of this library is the translation of an trace
19 | index to a complete trace string.
20 +-----------------------------------------------------------------------------
21 */
22
23 #ifndef IND2STR_H
24 #define IND2STR_H
25
26
27 /*==== CONSTANTS ==================================================*/
28 #define IND2STR_OK 0
29 #define IND2STR_FILE_NOT_FOUND -1
30 #define IND2STR_WRONGFILEFORMAT -2
31 #define IND2STR_INDEXOUTOFBOUNDS -3
32 #define IND2STR_PARAMCOUNTOUTOFBOUNDS -4
33 #define IND2STR_NOTINITIALISED -5
34 #define IND2STR_ACCESSVIOLATION -6
35 #define IND2STR_INTERNAL_ERROR -7
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41
42
43 /*-----------------------------------------------------------------------------
44 | Function : ind2str_Init()
45 +------------------------------------------------------------------------------
46 | Description : Initialises the library: opens the file containing the trace
47 | mapping table, build the internal representation , closes the
48 | the file after reading.
49 |
50 | Parameters : tableFile - the mapping table file name
51 |
52 | Return : success or failure
53 +------------------------------------------------------------------------------
54 */
55 signed char ind2str_Init(char * tableFile);
56
57
58 /*-----------------------------------------------------------------------------
59 | Function : ind2str_Exit()
60 +------------------------------------------------------------------------------
61 | Description : De-initialises the library: closes the file containing the
62 | trace mapping table, frees allocated memory.
63 |
64 | Parameters :
65 |
66 | Return :
67 +------------------------------------------------------------------------------
68 */
69 void ind2str_Exit(void);
70
71
72 /*-----------------------------------------------------------------------------
73 | Function : ind2str_Version()
74 +------------------------------------------------------------------------------
75 | Description : Returns the version (build date) of the table. The table must
76 | be initialized before.
77 |
78 | Parameters :
79 |
80 | Return : The version of the table or 0.
81 +------------------------------------------------------------------------------
82 */
83 unsigned long ind2str_Version(void);
84
85
86 /*-----------------------------------------------------------------------------
87 | Function : ind2str_VersionNoInit()
88 +------------------------------------------------------------------------------
89 | Description : Returns the version (build date) of the table. The table does
90 | not need to be initialized before.
91 |
92 | Parameters : fileName - the name of the file, that contains a table
93 |
94 | Return : The version of the table or 0.
95 +------------------------------------------------------------------------------
96 */
97 unsigned long ind2str_VersionNoInit(char * fileName);
98
99
100 /*-----------------------------------------------------------------------------
101 | Function : ind2str
102 +------------------------------------------------------------------------------
103 | Description : Transforms a trace index string into a trace string, according
104 | to the trace mapping table.
105 |
106 | Parameters : dst - destination string
107 |
108 | src - source string
109 |
110 |
111 | Return : The number of characters printed to the destination string.
112 |
113 +------------------------------------------------------------------------------
114 */
115 int ind2str(char * dst, char * src);
116
117
118 #ifdef __cplusplus
119 }
120 #endif
121
122
123 #endif /* IND2STR_H */
124