Changeset b7fd2a0 in mainline for uspace/app/bdsh/tok.c
- Timestamp:
- 2018-01-13T03:10:29Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/tok.c
r36f0738 rb7fd2a0 38 38 static wchar_t tok_get_char(tokenizer_t *); 39 39 static wchar_t tok_look_char(tokenizer_t *); 40 static int tok_push_char(tokenizer_t *, wchar_t);41 static int tok_push_token(tokenizer_t *);40 static errno_t tok_push_char(tokenizer_t *, wchar_t); 41 static errno_t tok_push_token(tokenizer_t *); 42 42 static bool tok_pending_chars(tokenizer_t *); 43 static int tok_finish_string(tokenizer_t *);43 static errno_t tok_finish_string(tokenizer_t *); 44 44 static void tok_start_token(tokenizer_t *, token_type_t); 45 45 … … 51 51 * @param max_tokens number of elements of the out_tokens array 52 52 */ 53 int tok_init(tokenizer_t *tok, char *input, token_t *out_tokens,53 errno_t tok_init(tokenizer_t *tok, char *input, token_t *out_tokens, 54 54 size_t max_tokens) 55 55 { … … 89 89 90 90 /** Tokenize the input string into the tokens */ 91 int tok_tokenize(tokenizer_t *tok, size_t *tokens_length)92 { 93 int rc;91 errno_t tok_tokenize(tokenizer_t *tok, size_t *tokens_length) 92 { 93 errno_t rc; 94 94 wchar_t next_char; 95 95 … … 178 178 179 179 /** Finish tokenizing an opened string */ 180 int tok_finish_string(tokenizer_t *tok)181 { 182 int rc;180 errno_t tok_finish_string(tokenizer_t *tok) 181 { 182 errno_t rc; 183 183 wchar_t next_char; 184 184 … … 233 233 234 234 /** Append a char to the end of the current token */ 235 int tok_push_char(tokenizer_t *tok, wchar_t ch)235 errno_t tok_push_char(tokenizer_t *tok, wchar_t ch) 236 236 { 237 237 return chr_encode(ch, tok->outbuf, &tok->outbuf_offset, tok->outbuf_size); … … 244 244 245 245 /** Push the current token to the output array */ 246 int tok_push_token(tokenizer_t *tok)246 errno_t tok_push_token(tokenizer_t *tok) 247 247 { 248 248 if (tok->outtok_offset >= tok->outtok_size) {
Note:
See TracChangeset
for help on using the changeset viewer.