Lines Matching defs:string

45 #include <string.h>
64 * Handle the different sources of terminal control string and size
398 char *prompt; /* The current prompt string */
399 int prompt_len; /* The length of the prompt string */
401 int prompt_style; /* How the prompt string is displayed */
456 const char *left; /* The string that moves the cursor 1 character */
458 const char *right; /* The string that moves the cursor 1 character */
460 const char *up; /* The string that moves the cursor 1 character */
462 const char *down; /* The string that moves the cursor 1 character */
464 const char *home; /* The string that moves the cursor home */
466 const char *clear_eol; /* The string that clears from the cursor to */
468 const char *clear_eod; /* The string that clears from the cursor to */
470 const char *u_arrow; /* The string returned by the up-arrow key */
471 const char *d_arrow; /* The string returned by the down-arrow key */
472 const char *l_arrow; /* The string returned by the left-arrow key */
473 const char *r_arrow; /* The string returned by the right-arrow key */
474 const char *sound_bell; /* The string needed to ring the terminal bell */
491 const char *left_n; /* The parameter string that moves the cursor */
493 const char *right_n; /* The parameter string that moves the cursor */
542 * Set the size of the string segments used to store terminal capability
671 * Define a tab to be a string of 8 spaces.
785 * Lookup terminal control string and size information.
800 * Output a binary string directly to the terminal.
803 const char *string, int n);
822 const char *string);
825 * Output a character or string to the terminal after converting tabs
830 static int gl_print_string(GetLine *gl, const char *string, char pad);
845 * Insert/append a string to the line buffer and terminal at the current
856 * Record a string in the input-line buffer.
861 * Make way to insert a string in the input-line buffer.
915 * How many characters are needed to write a number as an octal string?
935 static int gl_displayed_string_width(GetLine *gl, const char *string, int nc,
949 * Read a tecla configuration string.
961 static GLC_GETC_FN(glc_buff_getc); /* Read from a string */
1096 * Replace a malloc'd string (or NULL), with another malloc'd copy of
1097 * a string (or NULL).
1099 static int gl_record_string(char **sptr, const char *string);
1905 * Allocate a string-segment memory allocator for use in storing terminal
3007 * redraw the terminal string to the end of the line, then
3059 * Insert/append a string to the line buffer and terminal at the current
3064 * s char * The string to be added.
3071 int buff_slen; /* The length of the string being added to line[] */
3072 int term_slen; /* The length of the string being written to the terminal */
3081 * How long is the string to be added?
3086 * Check that we can accomodate the string in the buffer.
3099 * Copy the string into the buffer.
3105 * the terminal cursor to the end of the displayed input string.
3658 * a termninal capability string from the terminfo database and make
3663 * name const char * The name of the terminfo string to look up.
3678 * a termninal capability string from the termcap database and make
3684 * of the string in gl->capmem.
3688 * name const char * The name of the terminfo string to look up.
3692 * capability string. On output *bufptr is
3693 * incremented over the stored string.
3820 * Work out the length of given string of characters on the terminal.
3824 * string char * The string to be measured.
3826 * to measure the whole string.
3834 static int gl_displayed_string_width(GetLine *gl, const char *string, int nc,
3843 nc = strlen(string);
3845 * Add up the length of the displayed string.
3848 slen += gl_displayed_char_width(gl, string[i], term_curpos + slen);
3853 * Write a string verbatim to the current terminal or output stream.
3863 * string const char * The string to be written (this need not be
3866 * prefix of string[], or -1 to request that
3874 const char *string, int n)
3890 * If no length has been provided, measure the length of the string.
3893 n = strlen(string);
3895 * Write the string.
3897 if(write_fn(gl, string + ndone, n-ndone) != n)
3912 * string char * The control sequence to be sent.
3917 static int gl_print_control_sequence(GetLine *gl, int nline, const char *string)
3927 tputs((char *)string, nline, gl_tputs_putchar);
3930 waserr = gl_print_raw_string(gl, 1, string, -1);
4075 char string[TAB_WIDTH + 4]; /* A work area for composing compound strings */
4088 * Compose the tab string.
4091 string[i] = ' ';
4093 string[0] = '^';
4094 string[1] = CTRL_TO_CHAR(c);
4097 snprintf(string, sizeof(string), "\\%o", (int)(unsigned char)c);
4098 nchar = strlen(string);
4100 string[0] = c;
4104 * Terminate the string.
4106 string[nchar] = '\0';
4108 * Write the string to the terminal.
4110 if(gl_print_raw_string(gl, 1, string, -1))
4139 * Write a string to the terminal after expanding tabs and control
4144 * string char * The string to be output.
4160 static int gl_print_string(GetLine *gl, const char *string, char pad)
4162 const char *cptr; /* A pointer into string[] */
4163 for(cptr=string; *cptr; cptr++) {
4876 char from[3]; /* The original string of 2 characters */
4877 char swap[3]; /* The swapped string of two characters */
5068 * Insert the string count times.
5111 * Insert the string count times.
5352 * prefix to the string that precedes the cursor. In vi command mode
5353 * include the character that is under the cursor in the string. If
5414 * prefix to the string that precedes the cursor. In vi command mode
5415 * include the character that is under the cursor in the string. If
5623 * Get the length of the string that is to be expanded.
5736 * Get the length of the string that is to be expanded.
5937 * Make a copy of the terminal type string.
5941 * Delete any old terminal type string.
5948 * Make a copy of the new terminal-type string, if any.
5980 * Lookup the terminal control string and size information.
6315 * Read GetLine configuration information from a string. The contents of
6316 * the string are the same as those described in the gl_get_line(3)
6402 * '\0', and recording the thus terminated string as an argument.
6541 * Convert the line number into a string.
6545 * Have the string printed on the terminal.
6589 * Get the length of the pathname string.
7632 * Copy the specified segment and terminate the string.
7655 * Copy the specified segment and terminate the string.
7857 * Record the length of the stored string.
8374 * app_string const char * Either NULL, or a string containing one
8434 * Start by parsing the configuration string, if provided.
8464 * Replace a malloc'd string (or NULL), with another malloc'd copy of
8465 * a string (or NULL).
8470 * on output, if string!=NULL a malloc'd copy
8471 * of this string will be assigned to *sptr.
8472 * string const char * The string to be copied, or NULL to simply
8473 * discard any existing string.
8478 static int gl_record_string(char **sptr, const char *string)
8481 * If the original string is the same string, don't do anything.
8483 if(*sptr == string || (*sptr && string && strcmp(*sptr, string)==0))
8486 * Discard any existing cached string.
8493 * Allocate memory for a copy of the specified string.
8495 if(string) {
8496 size_t ssz = strlen(string) + 1;
8501 * Copy the string.
8503 strlcpy(*sptr, string, ssz);
8527 * string, the idea being that the file can
8612 * comment const char * This must be the same string that was
9256 * fmt const char * A format string. This containing characters to be
9966 * Get the length of the new prompt string.
9970 * If needed, allocate a new buffer for the prompt string.
10015 * Add up the length of the displayed string, while filtering out
10495 const char *s; /* The string being printed */
10582 * s const char * The string to be written.
11250 * Display a left-justified string over multiple terminal lines,
11252 * indentation and an optional prefix string can be specified to be
11257 * string can be used to force a newline at any point and that you
11259 * at the end of the last string that you write. Note that when a new
11262 * because a newline character was found in the string, only the
11269 * prefix const char * An optional prefix string to write after the
11273 * suffix const char * An optional suffix string to draw at the end
11291 * string const char * The string to be written.
11296 * final word in the string. Successful return
11305 int def_width, int start, const char *string)
11312 if(!gl || !string) {
11327 start, string);
11870 * How many characters are needed to write a number as an octal string?
11991 * that are in gl->line, and terminate the string.
12001 * Copy a given string into the input buffer, overwriting the current
12006 * s const char * The string to be recorded.
12008 * string.
12010 * the first character of the string.
12029 * Was the string truncated?
12035 * Make room in the input buffer for a string to be inserted. This
12056 * towards the end of the string.
12069 * where the removed sub-string started in the input buffer.
12086 * Truncate the string in the input line buffer after a given number of
12108 * compute the length of this string, and ancillary information.
12122 * Just in case the string wasn't correctly terminated, do so here.
12414 * An empty action string requests that the key-sequence be unbound.
12416 * string, so convert an empty string to a NULL action pointer.