Changeset 925a21e in mainline for uspace/app/bdsh/tok.h
- Timestamp:
- 2011-09-24T14:20:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/tok.h
r867e2555 r925a21e 30 30 #define TOK_H 31 31 32 typedef enum { 33 TOKTYPE_TEXT, 34 TOKTYPE_PIPE, 35 TOKTYPE_SPACE 36 } token_type_t; 37 38 typedef struct { 39 char *text; 40 size_t byte_start; 41 size_t char_start; 42 size_t byte_length; 43 size_t char_length; 44 token_type_t type; 45 } token_t; 46 32 47 typedef struct { 33 48 char *in; 34 49 size_t in_offset; 50 size_t last_in_offset; 51 size_t in_char_offset; 52 size_t last_in_char_offset; 35 53 36 54 char *outbuf; … … 39 57 size_t outbuf_last_start; 40 58 41 char **outtok; 59 token_t *outtok; 60 token_type_t current_type; 42 61 size_t outtok_offset; 43 62 size_t outtok_size; 44 63 } tokenizer_t; 45 64 46 extern int tok_init(tokenizer_t *, char *, char **, size_t);65 extern int tok_init(tokenizer_t *, char *, token_t *, size_t); 47 66 extern void tok_fini(tokenizer_t *); 48 extern int tok_tokenize(tokenizer_t * );67 extern int tok_tokenize(tokenizer_t *, size_t *); 49 68 50 69 #endif
Note:
See TracChangeset
for help on using the changeset viewer.