From d1cc9481c31ffc73d5d8c2d7a79c5bcfc9e7275c Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Tue, 10 Jun 2014 16:25:35 -0400 Subject: [PATCH] Small C build and script fixes. --- MasterPassword/C/build | 2 +- MasterPassword/C/mpw.bashrc | 4 ++-- MasterPassword/C/mpw.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MasterPassword/C/build b/MasterPassword/C/build index ad543433..7065cec5 100755 --- a/MasterPassword/C/build +++ b/MasterPassword/C/build @@ -1,4 +1,4 @@ -#!/usr/bin/env bash -e +#!/usr/bin/env bash # Run with -DDEBUG to enable trace-level output. [[ -e lib/scrypt/scryptenc.o ]] || { echo >&2 "Missing scrypt. First get and build the scrypt source in lib/scrypt from <$(.\n"; exit 1; } diff --git a/MasterPassword/C/mpw.bashrc b/MasterPassword/C/mpw.bashrc index 11543332..98edc18f 100644 --- a/MasterPassword/C/mpw.bashrc +++ b/MasterPassword/C/mpw.bashrc @@ -7,7 +7,7 @@ mpw() { elif hash xclip 2>/dev/null; then xclip else - cat + cat; echo 2>/dev/null return fi echo >&2 "Copied!" @@ -17,7 +17,7 @@ mpw() { :| _copy 2>/dev/null # Ask for the user's name and password if not yet known. - MP_USERNAME=${MP_USERNAME:-$(ask -s 'Your Full Name:')} + MP_USERNAME=${MP_USERNAME:-$(ask 'Your Full Name:')} # Start Master Password and copy the output. printf %s "$(MP_USERNAME=$MP_USERNAME command mpw "$@")" | _copy diff --git a/MasterPassword/C/mpw.c b/MasterPassword/C/mpw.c index 795153b8..d0ebbeee 100644 --- a/MasterPassword/C/mpw.c +++ b/MasterPassword/C/mpw.c @@ -1,3 +1,4 @@ +#define _WITH_GETLINE #include #include #include @@ -13,7 +14,7 @@ #include #include #include -#include +#include #include #include #include