[mw-devel] [Git][arthur/mw][master] Exit with error if -who or -what arguments used

Tom Lake tswsl1989 at sucs.org
Tue Jan 26 12:33:51 GMT 2016


Tom Lake pushed to branch master at Justin Mitchell / mw


Commits:
faf39683 by Thomas Lake at 2016-01-26T11:41:43+00:00
Exit with error if -who or -what arguments used

Closes #16

TODO: Reimplement -who and -what in a server/client friendly manner

- - - - -


1 changed file:

- src/client/main.c


Changes:

=====================================
src/client/main.c
=====================================
--- a/src/client/main.c
+++ b/src/client/main.c
@@ -336,6 +336,7 @@ int main(int argc, char **argv)
 	int view_help = 0;
 	int inet_mode = 0;
 	int view_since = 0;
+	int old_options = 0;
 	int inarg_num = -1;
 	int foldername_num = -1;
 	int folderuser_num = -1;
@@ -381,6 +382,8 @@ int main(int argc, char **argv)
 		if (match_arg_str(argv[al], "new")) view_new = 1;
 		if (match_arg_str(argv[al], "i")) inet_mode = 1;
 		if (match_arg_str(argv[al], "since")) view_since = 1;
+		if (match_arg_str(argv[al], "who")) old_options = 1;
+		if (match_arg_str(argv[al], "what")) old_options = 1;
 
 		/* help listing arguments */
 		if (match_arg_str(argv[al], "h")) view_help = 1;
@@ -439,6 +442,11 @@ int main(int argc, char **argv)
 		}
 	}
 
+	if (old_options) {
+		printf(_("The -who and -what options are no longer supported\n"));
+		exit(1);
+	}
+
 	if (view_help)
 	{
 		printf(_("\nMilliways accepts the optional arguments of:\n\n"));



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/faf39683c0eae53cfc7434829069373218fa85ab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160126/a257619f/attachment.html>


More information about the mw-devel mailing list