comparison src/gpf3/inc/tok.h @ 2:c41a534f33c6

src/gpf3: preened GPF goo from TCS3.2
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:52:50 +0000
parents
children
comparison
equal deleted inserted replaced
1:864b8cc0cf63 2:c41a534f33c6
1 /*
2 +------------------------------------------------------------------------------
3 | File: tok.h
4 +------------------------------------------------------------------------------
5 | Copyright 2002 Texas Instruments Berlin, AG
6 | All rights reserved.
7 |
8 | This file is confidential and a trade secret of Texas
9 | Instruments Berlin, AG.
10 | The receipt of or possession of this file does not convey
11 | any rights to reproduce or disclose its contents or to
12 | manufacture, use, or sell anything it may describe, in
13 | whole, or in part, without the specific written consent of
14 | Texas Instruments Berlin, AG.
15 +------------------------------------------------------------------------------
16 | Purpose: Definitions for the configuration string functions.
17 +------------------------------------------------------------------------------
18 */
19
20
21 #ifndef __TOK_H__
22 #define __TOK_H__
23
24 /*==== CONSTANTS ==================================================*/
25
26 #define TOK_ERRBASE (-300)
27 #define TOK_OK (0)
28 #define TOK_EOCS (TOK_ERRBASE - 1)
29 #define TOK_NOT_FOUND (TOK_ERRBASE - 2)
30
31 /*==== TYPES ======================================================*/
32
33 typedef struct KW_DATA
34 {
35 const char * const keyword;
36 const SHORT code;
37 } KW_DATA;
38
39 typedef struct TOK_DCB
40 {
41 char * tokbuf;
42 char * nexttok;
43 char lastchar;
44 } TOK_DCB;
45
46 /*==== EXPORT =====================================================*/
47
48 void tok_init (char *);
49 SHORT tok_next (char **, char **);
50 SHORT tok_key (KW_DATA *, char *);
51
52 #endif
53