Changeset 5a6cc679 in mainline for uspace/app/bdsh/tok.c


Ignore:
Timestamp:
2018-01-31T02:21:24Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/tok.c

    r132ab5d1 r5a6cc679  
    3838static wchar_t tok_get_char(tokenizer_t *);
    3939static 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 *);
     40static errno_t tok_push_char(tokenizer_t *, wchar_t);
     41static errno_t tok_push_token(tokenizer_t *);
    4242static bool tok_pending_chars(tokenizer_t *);
    43 static int tok_finish_string(tokenizer_t *);
     43static errno_t tok_finish_string(tokenizer_t *);
    4444static void tok_start_token(tokenizer_t *, token_type_t);
    4545
     
    5151 * @param max_tokens number of elements of the out_tokens array
    5252 */
    53 int tok_init(tokenizer_t *tok, char *input, token_t *out_tokens,
     53errno_t tok_init(tokenizer_t *tok, char *input, token_t *out_tokens,
    5454    size_t max_tokens)
    5555{       
     
    8989
    9090/** Tokenize the input string into the tokens */
    91 int tok_tokenize(tokenizer_t *tok, size_t *tokens_length)
    92 {
    93         int rc;
     91errno_t tok_tokenize(tokenizer_t *tok, size_t *tokens_length)
     92{
     93        errno_t rc;
    9494        wchar_t next_char;
    9595       
     
    178178
    179179/** Finish tokenizing an opened string */
    180 int tok_finish_string(tokenizer_t *tok)
    181 {
    182         int rc;
     180errno_t tok_finish_string(tokenizer_t *tok)
     181{
     182        errno_t rc;
    183183        wchar_t next_char;
    184184       
     
    233233
    234234/** Append a char to the end of the current token */
    235 int tok_push_char(tokenizer_t *tok, wchar_t ch)
     235errno_t tok_push_char(tokenizer_t *tok, wchar_t ch)
    236236{
    237237        return chr_encode(ch, tok->outbuf, &tok->outbuf_offset, tok->outbuf_size);
     
    244244
    245245/** Push the current token to the output array */
    246 int tok_push_token(tokenizer_t *tok)
     246errno_t tok_push_token(tokenizer_t *tok)
    247247{
    248248        if (tok->outtok_offset >= tok->outtok_size) {
Note: See TracChangeset for help on using the changeset viewer.