]> diplodocus.org Git - nmh/commitdiff
getpass.c: Move interface to own file.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 11 Nov 2017 23:53:00 +0000 (23:53 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 12 Nov 2017 12:25:33 +0000 (12:25 +0000)
Makefile.am
h/prototypes.h
sbr/getpass.c
sbr/getpass.h [new file with mode: 0644]
sbr/ruserpass.c

index 96fcaf5..eeb9998 100644 (file)
@@ -397,6 +397,7 @@ noinst_HEADERS = \
     sbr/getcpy.h \
     sbr/geteditor.h \
     sbr/getfolder.h \
     sbr/getcpy.h \
     sbr/geteditor.h \
     sbr/getfolder.h \
+    sbr/getpass.h \
     sbr/lock_file.h \
     sbr/m_atoi.h \
     sbr/m_backup.h \
     sbr/lock_file.h \
     sbr/m_atoi.h \
     sbr/m_backup.h \
index adfa940..b706b42 100644 (file)
@@ -62,7 +62,6 @@ char *m_name (int);
 void m_unknown(m_getfld_state_t *, FILE *);
 void m_unknown2(m_getfld_state_t *);
 
 void m_unknown(m_getfld_state_t *, FILE *);
 void m_unknown2(m_getfld_state_t *);
 
-char *nmh_getpass(const char *);
 int pidwait (pid_t, int);
 
 void scan_detect_mbox_style (FILE *);
 int pidwait (pid_t, int);
 
 void scan_detect_mbox_style (FILE *);
index 99c03e0..66f02da 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "getpass.h"
 #include <termios.h>
 
 /* We don't use MAX_PASS here because the maximum password length on a remote
 #include <termios.h>
 
 /* We don't use MAX_PASS here because the maximum password length on a remote
diff --git a/sbr/getpass.h b/sbr/getpass.h
new file mode 100644 (file)
index 0000000..ab4ffae
--- /dev/null
@@ -0,0 +1,34 @@
+/* getpass.h -- read a password without echo.
+ *
+ * Portions of this code are Copyright (c) 1988, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE. */
+
+char *nmh_getpass(const char *);
index dc94d90..55694c8 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "h/mh.h"
  */
 
 #include "h/mh.h"
+#include "getpass.h"
 #include "ruserpass.h"
 #include "credentials.h"
 #include "error.h"
 #include "ruserpass.h"
 #include "credentials.h"
 #include "error.h"