From: tb Date: Thu, 7 Dec 2017 01:54:33 +0000 (+0000) Subject: Drop the unused second argument from set_prompt(). It used to be used for X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=311eb4a59b5d52ead9001ec9408f38ab525c224f;p=openbsd Drop the unused second argument from set_prompt(). It used to be used for early special casing of ! and !! in the PS1 expansion. This was removed from set_prompt() as part of the implementaion of the character count toggles \[ and \] back in 2004. ok jca --- diff --git a/bin/ksh/c_sh.c b/bin/ksh/c_sh.c index 6c54839cdcc..155b1c5ff33 100644 --- a/bin/ksh/c_sh.c +++ b/bin/ksh/c_sh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_sh.c,v 1.60 2017/07/22 09:37:21 anton Exp $ */ +/* $OpenBSD: c_sh.c,v 1.61 2017/12/07 01:54:33 tb Exp $ */ /* * built-in Bourne commands @@ -361,7 +361,7 @@ c_read(char **wp) /* set prompt in case this is * called from .profile or $ENV */ - set_prompt(PS2, NULL); + set_prompt(PS2); pprompt(prompt, 0); } } else if (c != EOF) diff --git a/bin/ksh/lex.c b/bin/ksh/lex.c index 724b81fa484..db32396fb92 100644 --- a/bin/ksh/lex.c +++ b/bin/ksh/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.71 2017/07/04 11:46:15 anton Exp $ */ +/* $OpenBSD: lex.c,v 1.72 2017/12/07 01:54:33 tb Exp $ */ /* * lexical analysis and source input @@ -1165,7 +1165,7 @@ getsc_line(Source *s) #endif /* HISTORY */ } if (interactive) - set_prompt(PS2, NULL); + set_prompt(PS2); } static char * @@ -1180,7 +1180,7 @@ special_prompt_expand(char *str) } void -set_prompt(int to, Source *s) +set_prompt(int to) { char *ps1; Area *saved_atemp; diff --git a/bin/ksh/lex.h b/bin/ksh/lex.h index 0b006d0d433..7235d0b7a61 100644 --- a/bin/ksh/lex.h +++ b/bin/ksh/lex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.h,v 1.16 2015/10/10 07:35:16 nicm Exp $ */ +/* $OpenBSD: lex.h,v 1.17 2017/12/07 01:54:33 tb Exp $ */ /* * Source input, lexer and parser @@ -118,5 +118,5 @@ int yylex(int); void yyerror(const char *, ...) __attribute__((__noreturn__, __format__ (printf, 1, 2))); Source * pushs(int, Area *); -void set_prompt(int, Source *); +void set_prompt(int); void pprompt(const char *, int); diff --git a/bin/ksh/main.c b/bin/ksh/main.c index 8ec59259991..eef7e3041ae 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.83 2017/08/11 23:10:55 guenther Exp $ */ +/* $OpenBSD: main.c,v 1.84 2017/12/07 01:54:33 tb Exp $ */ /* * startup, main loop, environments and error handling @@ -609,7 +609,7 @@ shell(Source *volatile s, volatile int toplevel) got_sigwinch = 1; j_notify(); mcheck(); - set_prompt(PS1, s); + set_prompt(PS1); } t = compile(s);