summary refs log tree commit diff
path: root/archive.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--archive.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 7aa6028..6a3f612 100644
--- a/archive.c
+++ b/archive.c
@@ -31,6 +31,7 @@
 
 const char *baseURL = "";
 const char *baseTitle;
+const char *baseAddress;
 
 static uint32_t uidRead(const char *path) {
 	FILE *file = fopen(path, "r");
@@ -65,7 +66,7 @@ int main(int argc, char *argv[]) {
 	const char *algo = "REFERENCES";
 	const char *search = "ALL";
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "C:a:h:p:s:t:u:vw:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "C:a:h:m:p:s:t:u:vw:"));) {
 		switch (opt) {
 			break; case 'C': {
 				int error = chdir(optarg);
@@ -73,6 +74,7 @@ int main(int argc, char *argv[]) {
 			}
 			break; case 'a': algo = optarg;
 			break; case 'h': concatHead = optarg;
+			break; case 'm': baseAddress = optarg;
 			break; case 'p': port = optarg;
 			break; case 's': search = optarg;
 			break; case 't': baseTitle = optarg;
@@ -88,6 +90,7 @@ int main(int argc, char *argv[]) {
 	if (!host) errx(EX_USAGE, "host required");
 	if (!user) errx(EX_USAGE, "user required");
 	if (!baseTitle) baseTitle = mailbox;
+	if (!baseAddress) baseAddress = user;
 
 	char *pass = NULL;
 	if (passPath) {