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

index 5909e4232b3c39f22841e28418dedc56602fb523..a86102a00ca40ef84f4bc58d70c1e5d5c57c2417 100644 (file)
@@ -418,6 +418,7 @@ noinst_HEADERS = \
     sbr/read_line.h \
     sbr/readconfig.h \
     sbr/remdir.h \
+    sbr/ruserpass.h \
     sbr/seq_add.h \
     sbr/seq_bits.h \
     sbr/seq_del.h \
index 9e4a98fa5db711e70133bb0940e94b5c1a4810bd..ee38ef16f9e01f33622eecffb3d67dc729c55fde 100644 (file)
@@ -67,22 +67,6 @@ int pidwait (pid_t, int);
 char *r1bindex(char *, int) PURE;
 int refile (char **, char *);
 
-/*
- * Read our credentials file and (optionally) ask the user for anything
- * missing.
- *
- * Arguments:
- *
- * host                - Hostname (to scan credentials file)
- * aname       - Pointer to filled-in username
- * apass       - Pointer to filled-in password
- * flags       - One or more of RUSERPASS_NO_PROMPT_USER,
- *                RUSERPASS_NO_PROMPT_PASSWORD
- */
-void ruserpass (const char *host, char **aname, char **apass, int flags);
-#define RUSERPASS_NO_PROMPT_USER       0x01
-#define RUSERPASS_NO_PROMPT_PASSWORD   0x02
-
 void scan_detect_mbox_style (FILE *);
 void scan_finished(void);
 
index bf2ab6035c7b0f4c6a0bf6ecbaa7e599986e5e4f..b7eda96a0073b6d137bf4605e8dc0b4e564cb7b3 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "ruserpass.h"
 #include "credentials.h"
 #include "context_find.h"
 #include "error.h"
index cbdab4b9af6582a20459a7dfb0cab300aca6543f..dc94d900877ffffe19eebde04b098ceb110766a3 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "h/mh.h"
+#include "ruserpass.h"
 #include "credentials.h"
 #include "error.h"
 #include "h/utils.h"
diff --git a/sbr/ruserpass.h b/sbr/ruserpass.h
new file mode 100644 (file)
index 0000000..b2da6b5
--- /dev/null
@@ -0,0 +1,38 @@
+/* ruserpass.h -- parse .netrc-format file.
+ *
+ * Portions of this code are
+ * Copyright (c) 1985 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Portions of this code are Copyright (c) 2017, by the authors of
+ * nmh.  See the COPYRIGHT file in the root directory of the nmh
+ * distribution for complete copyright information. */
+
+/*
+ * Read our credentials file and (optionally) ask the user for anything
+ * missing.
+ *
+ * Arguments:
+ *
+ * host                - Hostname (to scan credentials file)
+ * aname       - Pointer to filled-in username
+ * apass       - Pointer to filled-in password
+ * flags       - One or more of RUSERPASS_NO_PROMPT_USER,
+ *                RUSERPASS_NO_PROMPT_PASSWORD
+ */
+void ruserpass(const char *, char **, char **, int);
+
+#define RUSERPASS_NO_PROMPT_USER       0x01
+#define RUSERPASS_NO_PROMPT_PASSWORD   0x02
index 110ed4e750ab55412312c8eacb2e11db9fd6e408..7a8e88de1929a298f1f412326846f58578859174 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "h/mh.h"
+#include "sbr/ruserpass.h"
 #include "sbr/fmt_rfc2047.h"
 #include "sbr/uprf.h"
 #include "sbr/check_charset.h"