Lines Matching +full:t +full:- +full:v

4  * SPDX-License-Identifier: Apache-2.0
59 return ((buffer_pos + cons->name_len) / cons->terminal_wid); in line_num_with_buffer_offset_get()
67 return (1 + ((buffer_pos + cons->name_len) % cons->terminal_wid)); in col_num_with_buffer_offset_get()
75 - col_num_with_buffer_offset_get(cons, offset1); in z_column_span_with_buffer_offsets_get()
83 - line_num_with_buffer_offset_get(cons, offset1); in z_row_span_with_buffer_offsets_get()
90 * +1 -> because home position is (1, 1) in z_shell_multiline_data_calc()
92 cons->cur_x = (buff_pos + cons->name_len) % cons->terminal_wid + 1; in z_shell_multiline_data_calc()
93 cons->cur_y = (buff_pos + cons->name_len) / cons->terminal_wid + 1; in z_shell_multiline_data_calc()
96 cons->cur_y_end = (buff_len + cons->name_len) / cons->terminal_wid + 1; in z_shell_multiline_data_calc()
97 cons->cur_x_end = (buff_len + cons->name_len) % cons->terminal_wid + 1; in z_shell_multiline_data_calc()
138 char t = *(cmd + 1); in make_argv() local
140 if (t == quote) { in make_argv()
147 if (t == '0') { in make_argv()
149 uint8_t v = 0U; in make_argv() local
152 t = *(cmd + i); in make_argv()
154 if (t >= '0' && t <= '7') { in make_argv()
155 v = (v << 3) | (t - '0'); in make_argv()
162 memmove(cmd, cmd + (i - 1), in make_argv()
163 z_shell_strlen(cmd) - (i - 2)); in make_argv()
164 *cmd++ = v; in make_argv()
169 if (t == 'x') { in make_argv()
171 uint8_t v = 0U; in make_argv() local
174 t = *(cmd + i); in make_argv()
176 if (t >= '0' && t <= '9') { in make_argv()
177 v = (v << 4) | (t - '0'); in make_argv()
178 } else if ((t >= 'a') && in make_argv()
179 (t <= 'f')) { in make_argv()
180 v = (v << 4) | (t - 'a' + 10); in make_argv()
181 } else if ((t >= 'A') && (t <= 'F')) { in make_argv()
182 v = (v << 4) | (t - 'A' + 10); in make_argv()
189 memmove(cmd, cmd + (i - 1), in make_argv()
190 z_shell_strlen(cmd) - (i - 2)); in make_argv()
191 *cmd++ = v; in make_argv()
248 if (*(pattern_addr - 1) == ' ') { in z_shell_pattern_remove()
250 pattern_addr--; /* set pointer to space */ in z_shell_pattern_remove()
254 shift = z_shell_strlen(pattern_addr) - pattern_len + 1; /* +1 for EOS */ in z_shell_pattern_remove()
255 *buff_len -= pattern_len; in z_shell_pattern_remove()
277 if (strcmp(syntax, cmd->entry->syntax) == 0) { in root_cmd_find()
278 return cmd->entry; in root_cmd_find()
294 shell_root_cmd_get(idx)->entry : NULL; in z_shell_cmd_get()
299 if (parent->subcmd) { in z_shell_cmd_get()
300 if (is_dynamic_cmd(parent->subcmd)) { in z_shell_cmd_get()
301 parent->subcmd->dynamic_get(idx, dloc); in z_shell_cmd_get()
302 if (dloc->syntax != NULL) { in z_shell_cmd_get()
308 if (is_section_cmd(parent->subcmd)) { in z_shell_cmd_get()
311 (const struct shell_static_entry *)parent->subcmd; in z_shell_cmd_get()
314 entry_list = parent->subcmd->entry; in z_shell_cmd_get()
358 if (strcmp(cmd_str, entry->syntax) == 0) { in z_shell_find_cmd()
398 (*match_arg)--; in z_shell_get_last_command()
413 return -EINVAL; in shell_set_root_cmd()
417 sh->ctx->selected_cmd = entry; in shell_set_root_cmd()
435 for (uint16_t i = 0; i < len - 1; i++) { in z_shell_spaces_trim()
447 len - j + 1); in z_shell_spaces_trim()
448 len -= shift; in z_shell_spaces_trim()
470 while (isspace((int) buff[*buff_len - 1U]) != 0) { in buffer_trim()
471 *buff_len -= 1U; in buffer_trim()
487 if (--i > 0) { in buffer_trim()
488 memmove(buff, buff + i, (*buff_len + 1U) - i); /* +1 for '\0' */ in buffer_trim()
489 *buff_len = *buff_len - i; in buffer_trim()
495 buffer_trim(sh->ctx->cmd_buff, &sh->ctx->cmd_buff_len); in z_shell_cmd_trim()
496 sh->ctx->cmd_buff_pos = sh->ctx->cmd_buff_len; in z_shell_cmd_trim()
510 && (dev->name != NULL) in shell_device_internal()
511 && (strlen(dev->name) != 0) in shell_device_internal()
513 || (strncmp(prefix, dev->name, in shell_device_internal()
558 *err = -ERANGE; in shell_strtol()
561 *err = -EINVAL; in shell_strtol()
573 if (*str == '-') { in shell_strtoul()
574 *err = -EINVAL; in shell_strtoul()
581 *err = -ERANGE; in shell_strtoul()
584 *err = -EINVAL; in shell_strtoul()
596 if (*str == '-') { in shell_strtoull()
597 *err = -EINVAL; in shell_strtoull()
604 *err = -ERANGE; in shell_strtoull()
607 *err = -EINVAL; in shell_strtoull()