X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=a6d3d7e5d072e1d41b96465e303b60258b156445;hb=87e22fcdf5fe0824932f2d259bd8969ea7d88092;hp=0f47dfaf6d921c27dd982c8c1ea45de45c1d7baf;hpb=f1fc80b6ccba754689bae3b56f54bd8089f9c1a4;p=selector.git diff --git a/selector.cc b/selector.cc index 0f47dfa..a6d3d7e 100644 --- a/selector.cc +++ b/selector.cc @@ -70,9 +70,9 @@ void inject_into_tty_buffer(char *string) { memset(&newtio, 0, sizeof(newtio)); // Set input mode (non-canonical, *no echo*,...) tcsetattr(STDIN_FILENO, TCSANOW, &newtio); - char control_q = '\021'; + const char control_q = '\021'; // Put the selected string in the tty input buffer - for(char *k = string; *k; k++) { + for(const char *k = string; *k; k++) { if(add_control_qs) { // Add ^Q to quote control characters ioctl(STDIN_FILENO, TIOCSTI, &control_q);