Niven, John D--, Writer to the Signet, Edinburgh