Lines Matching full:cp
191 * @cp: Cursor position, pointer the character in buffer where the cursor
207 static void kdb_position_cursor(char *prompt, char *buffer, char *cp) in kdb_position_cursor() argument
210 if (cp > buffer) in kdb_position_cursor()
211 kdb_printf("%.*s", (int)(cp - buffer), buffer); in kdb_position_cursor()
237 char *cp = buffer; in kdb_read() local
257 cp += len; in kdb_read()
259 cp--; in kdb_read()
262 lastchar = cp; in kdb_read()
263 *cp = '\0'; in kdb_read()
271 if (cp > buffer) { in kdb_read()
272 memmove(cp-1, cp, lastchar - cp + 1); in kdb_read()
274 cp--; in kdb_read()
275 kdb_printf("\b%s ", cp); in kdb_read()
276 kdb_position_cursor(kdb_prompt_str, buffer, cp); in kdb_read()
290 if (cp < lastchar) { in kdb_read()
291 memmove(cp, cp+1, lastchar - cp); in kdb_read()
293 kdb_printf("%s ", cp); in kdb_read()
294 kdb_position_cursor(kdb_prompt_str, buffer, cp); in kdb_read()
298 if (cp > buffer) { in kdb_read()
299 cp = buffer; in kdb_read()
300 kdb_position_cursor(kdb_prompt_str, buffer, cp); in kdb_read()
304 if (cp < lastchar) { in kdb_read()
305 kdb_printf("%s", cp); in kdb_read()
306 cp = lastchar; in kdb_read()
310 if (cp > buffer) { in kdb_read()
312 --cp; in kdb_read()
324 if (cp < lastchar) { in kdb_read()
325 kdb_printf("%c", *cp); in kdb_read()
326 ++cp; in kdb_read()
333 tmp = *cp; in kdb_read()
334 *cp = '\0'; in kdb_read()
338 *cp = tmp; in kdb_read()
367 if (cp != lastchar) in kdb_read()
368 kdb_position_cursor(kdb_prompt_str, buffer, cp); in kdb_read()
377 memmove(cp+len_tmp, cp, (lastchar-cp) + 1); in kdb_read()
378 memcpy(cp, tmpbuffer+len, len_tmp); in kdb_read()
379 kdb_printf("%s", cp); in kdb_read()
380 cp += len_tmp; in kdb_read()
382 if (cp != lastchar) in kdb_read()
384 buffer, cp); in kdb_read()
391 if (cp < lastchar) { in kdb_read()
392 memmove(cp+1, cp, lastchar - cp + 1); in kdb_read()
394 *cp = key; in kdb_read()
395 kdb_printf("%s", cp); in kdb_read()
396 ++cp; in kdb_read()
397 kdb_position_cursor(kdb_prompt_str, buffer, cp); in kdb_read()
400 *cp++ = key; in kdb_read()
533 char firstchar, *cp; in kdb_search_string() local
551 cp = searched; in kdb_search_string()
552 while ((cp = strchr(cp, firstchar))) { in kdb_search_string()
553 if (!strncmp(cp, searchfor, len2)) in kdb_search_string()
555 cp++; in kdb_search_string()
564 const char *cp; in kdb_msg_write() local
571 cp = msg; in kdb_msg_write()
575 dbg_io_ops->write_char(*cp); in kdb_msg_write()
576 cp++; in kdb_msg_write()
624 char *cp, *cp2, *cphold = NULL, replaced_byte = ' '; in vkdb_printf() local
671 cp = strchr(kdb_buffer, '\n'); in vkdb_printf()
672 if (!cp) { in vkdb_printf()
716 cp++; /* to byte after the newline */ in vkdb_printf()
717 replaced_byte = *cp; /* remember what/where it was */ in vkdb_printf()
718 cphold = cp; in vkdb_printf()
719 *cp = '\0'; /* end the string for our search */ in vkdb_printf()
762 cp = (char *) printk_skip_headers(kdb_buffer); in vkdb_printf()
764 gdbstub_msg_write(cp, retlen - (cp - kdb_buffer)); in vkdb_printf()
766 kdb_msg_write(cp, retlen - (cp - kdb_buffer)); in vkdb_printf()