1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

indented and formatted the VMS-specific code more in the same style as

other curl code
This commit is contained in:
Daniel Stenberg 2004-01-13 16:13:32 +00:00
parent 9e80356dd5
commit f1da9e508e

View File

@ -1,5 +1,4 @@
/* ============================================================================ /* ============================================================================
* Copyright (C) 1998 - 2002, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* Redistribution and use are freely permitted provided that: * Redistribution and use are freely permitted provided that:
* *
@ -30,8 +29,6 @@
* *
* Author(s): * Author(s):
* Angus Mackay <amackay@gus.ml.org> * Angus Mackay <amackay@gus.ml.org>
*
* Contributor(s):
* Daniel Stenberg <daniel@haxx.se> * Daniel Stenberg <daniel@haxx.se>
*/ */
@ -55,10 +52,16 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
$DESCRIPTOR(ttdesc, "TT"); $DESCRIPTOR(ttdesc, "TT");
buffer[0]='\0'; buffer[0]='\0';
if ((sts = sys$assign(&ttdesc, &chan,0,0)) & 1) { sts = sys$assign(&ttdesc, &chan,0,0);
if (((sts = sys$qiow(0, chan, IO$_READPROMPT | IO$M_NOECHO, &iosb, 0, 0, buffer, buflen, 0, 0, prompt, strlen(prompt))) & 1) && (iosb.iosb$w_status&1)) { if (sts & 1) {
sts = sys$qiow(0, chan,
IO$_READPROMPT | IO$M_NOECHO,
&iosb, 0, 0, buffer, buflen, 0, 0,
prompt, strlen(prompt));
if((sts & 1) && (iosb.iosb$w_status&1))
buffer[iosb.iosb$w_bcnt] = '\0'; buffer[iosb.iosb$w_bcnt] = '\0';
}
sts = sys$dassgn(chan); sts = sys$dassgn(chan);
} }
return buffer; /* we always return success */ return buffer; /* we always return success */