OpenCores
URL https://opencores.org/ocsvn/pavr/pavr/trunk

Subversion Repositories pavr

[/] [pavr/] [trunk/] [tools/] [common/] [tagScan.h] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 doru
// <File Header>
2
// </File Header>
3
 
4
// <File Info>
5
// </File Info>
6
 
7
// <File Body>
8
// Maximum length of tag scanning error messages.
9
#define TAG_SCAN_MSG_MAX_LEN 100
10
// Tag scanning error codes.
11
#define TAG_SCAN_OK                0
12
#define TAG_SCAN_TAG_NOT_FOUND     1
13
#define TAG_SCAN_MULTIPLE_TAG      2
14
#define TAG_SCAN_END_BEFORE_BEGIN  3
15
#define TAG_SCAN_FILE_NOT_FOUND    4
16
#define TAG_SCAN_MALLOC_ERR        5
17
#define TAG_SCAN_FILE_IO_ERR       6
18
#define TAG_SCAN_UNKNOWN_ERR      -1
19
 
20
// Configure the tag scan utility through these defines.
21
#define ALLOW_MULTIPLE_MATCH 0   // !!! This feature is not yet implemented.
22
 
23
 
24
 
25
typedef struct {
26
   int errCode;
27
   char *errMsg;
28
   char *readText;
29
}  scanTag_t;
30
 
31
 
32
 
33
// scanTag_t public methods
34
void  scanTag_t_construct      (scanTag_t *stag);
35
void  scanTag_t_destruct       (scanTag_t *stag);
36
char *scanTag_t_getStatus      (scanTag_t *stag);
37
void  scanTag_t_readTaggedText (char *tagBegin, char *tagEnd,                char *fName, scanTag_t *stag);
38
void  scanTag_t_writeTaggedText(char *tagBegin, char *tagEnd, char *newText, char *fName, scanTag_t *stag);
39
// </File Body>
40
 
41
 
42
// !!! To modify scan tag methods so that no FILE type is involved, but only char*
43
// !!! introduce new const parameters
44
//    - multiple_hit_mode: TAG_GET_ALL_MATCHES or TAG_GET_ONE_MATCH. TAG_GET_ONE_MATCH will return error if multiple matches.
45
//    - case_mode: TAG_CASE_SENSITIVE or TAG_CASE_INSENSITIVE

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.