Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2024-12-08 21:36:54 +01:00
parent 651c0bf38b
commit 50bde4b5c3
2 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,7 @@ static int compare(const void *p1, const void *p2)
/* Fill in *avp with an array of names that match file, up to its length. /* Fill in *avp with an array of names that match file, up to its length.
* Ignore . and .. . */ * Ignore . and .. . */
static int FindMatches(char *dir, char *file, char ***avp) static int FindMatches(const char *dir, const char *file, char ***avp)
{ {
char **av; char **av;
char **word; char **word;
@ -128,7 +128,7 @@ static int FindMatches(char *dir, char *file, char ***avp)
/* Split a pathname into allocated directory and trailing filename parts. */ /* Split a pathname into allocated directory and trailing filename parts. */
static int SplitPath(const char *path, char **dirpart, char **filepart) static int SplitPath(const char *path, char **dirpart, char **filepart)
{ {
static char DOT[] = "."; static const char DOT[] = ".";
char *dpart; char *dpart;
char *fpart; char *fpart;
@ -287,7 +287,7 @@ char *rl_filename_completion_function(const char *text, int state)
/* Similar to el_find_word(), but used by GNU Readline API */ /* Similar to el_find_word(), but used by GNU Readline API */
static char *rl_find_token(size_t *len) static char *rl_find_token(size_t *len)
{ {
char *ptr; const char *ptr;
int pos; int pos;
for (pos = rl_point; pos < rl_end; pos++) { for (pos = rl_point; pos < rl_end; pos++) {

View File

@ -211,7 +211,7 @@ static void tty_show(unsigned char c)
} }
} }
static void tty_string(char *p) static void tty_string(const char *p)
{ {
int i = rl_point + prompt_len + 1; int i = rl_point + prompt_len + 1;
@ -1282,7 +1282,7 @@ static char *read_redirected(void)
int size = MEM_INC; int size = MEM_INC;
char *p; char *p;
char *line; char *line;
char *end; const char *end;
p = line = malloc(sizeof(char) * size); p = line = malloc(sizeof(char) * size);
if (!p) if (!p)