Print newline after error and info messages (perforce change 9750)

This commit is contained in:
Dag-Erling Smørgrav 2002-04-15 06:32:54 +00:00
parent f116fd5df6
commit 69665ef57f

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#9 $
* $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#10 $
*/
#include <sys/types.h>
@ -160,9 +160,15 @@ openpam_ttyconv(int n,
break;
case PAM_ERROR_MSG:
fputs(msg[i]->msg, stderr);
if (strlen(msg[i]->msg) > 0 &&
msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n')
fputc('\n', stderr);
break;
case PAM_TEXT_INFO:
fputs(msg[i]->msg, stdout);
if (strlen(msg[i]->msg) > 0 &&
msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n')
fputc('\n', stdout);
break;
default:
goto fail;