Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Be posixly correction with long options
Baptiste Daroussin committed 11 years ago
commit 20c3c382036df6386047626d9649b6022c131183
parent c14506c
29 files changed +30 -30
modified src/add.c
@@ -86,7 +86,7 @@ exec_add(int argc, char **argv)
		{ NULL,                  0,                      NULL,            0  }
	};

-
	while ((ch = getopt_long(argc, argv, "IAfqM", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+IAfqM", longopts, NULL)) != -1) {
		switch (ch) {
		case 'I':
			f |= PKG_ADD_NOSCRIPT;
modified src/annotate.c
@@ -246,7 +246,7 @@ exec_annotate(int argc, char **argv)
                pkg_object_bool(pkg_config_get("CASE_SENSITIVE_MATCH"))
                );

-
	while ((ch = getopt_long(argc, argv, "aACDgiMqSxy", longopts, NULL))
+
	while ((ch = getopt_long(argc, argv, "+aACDgiMqSxy", longopts, NULL))
	       != -1) {
		switch (ch) {
		case 'a':
modified src/audit.c
@@ -143,7 +143,7 @@ exec_audit(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "Ff:qr", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+Ff:qr", longopts, NULL)) != -1) {
		switch (ch) {
		case 'F':
			fetch = true;
modified src/autoremove.c
@@ -61,7 +61,7 @@ exec_autoremove(int argc, char **argv)
		{ NULL,		0,		NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "nqy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+nqy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'n':
			f |= PKG_FLAG_DRY_RUN;
modified src/backup.c
@@ -56,7 +56,7 @@ exec_backup(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "d:r:", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+d:r:", longopts, NULL)) != -1) {
		switch (ch) {
		case 'd':
			dump = true;
modified src/check.c
@@ -276,7 +276,7 @@ exec_check(int argc, char **argv)

	struct deps_head dh = STAILQ_HEAD_INITIALIZER(dh);

-
	while ((ch = getopt_long(argc, argv, "aBCdginrsvxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aBCdginrsvxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/clean.c
@@ -185,7 +185,7 @@ exec_clean(int argc, char **argv)
		{ NULL,		0,		NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "anqy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+anqy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			all = true;
modified src/convert.c
@@ -290,7 +290,7 @@ exec_convert(__unused int argc, __unused char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "d:nr", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+d:nr", longopts, NULL)) != -1) {
		switch (ch) {
		case 'd':
			pkg_add_dbdir = optarg;
modified src/create.c
@@ -216,7 +216,7 @@ exec_create(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "agxf:r:m:M:o:np:O", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+agxf:r:m:M:o:np:O", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/delete.c
@@ -75,7 +75,7 @@ exec_delete(int argc, char **argv)

	nbactions = nbdone = 0;

-
	while ((ch = getopt_long(argc, argv, "aCDfginqRxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aCDfginqRxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/fetch.c
@@ -78,7 +78,7 @@ exec_fetch(int argc, char **argv)
		{ NULL,			0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "aCdgiqr:Uuxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aCdgiqr:Uuxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/info.c
@@ -129,7 +129,7 @@ exec_info(int argc, char **argv)
	};

	/* TODO: exclusive opts ? */
-
	while ((ch = getopt_long(argc, argv, "aAbBCdDeEfF:giIkloOpqrRsx", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aAbBCdDeEfF:giIkloOpqrRsx", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/install.c
@@ -97,7 +97,7 @@ exec_install(int argc, char **argv)
		quiet = true;
	}

-
	while ((ch = getopt_long(argc, argv, "ACfFgiIlMnqr:RUxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+ACfFgiIlMnqr:RUxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'A':
			f |= PKG_FLAG_AUTOMATIC;
modified src/lock.c
@@ -146,7 +146,7 @@ exec_lock_unlock(int argc, char **argv, enum action action)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "aCgilqxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aCgilqxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/main.c
@@ -681,9 +681,9 @@ main(int argc, char **argv)
		err(EX_SOFTWARE, "setenv() failed");

#ifdef HAVE_LIBJAIL
-
	while ((ch = getopt_long(argc, argv, "dj:c:C:R:lNvo:", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+dj:c:C:R:lNvo:", longopts, NULL)) != -1) {
#else
-
	while ((ch = getopt_long(argc, argv, "dc:C:R:lNvo:", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+dc:C:R:lNvo:", longopts, NULL)) != -1) {
#endif
		switch (ch) {
		case 'd':
modified src/plugins.c
@@ -54,7 +54,7 @@ exec_plugins(int argc, char **argv)
		{ NULL,		0,		NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "l", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+l", longopts, NULL)) != -1) {
                switch (ch) {
		case 'l':
			list_only = true;
modified src/query.c
@@ -862,7 +862,7 @@ exec_query(int argc, char **argv)
		{ NULL,			0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "aCe:F:gix", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aCe:F:gix", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/register.c
@@ -131,7 +131,7 @@ exec_register(int argc, char **argv)
	if (pkg_new(&pkg, PKG_INSTALLED) != EPKG_OK)
		err(EX_OSERR, "malloc");

-
	while ((ch = getopt_long(argc, argv, "Adf:i:lM:m:Ot", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+Adf:i:lM:m:Ot", longopts, NULL)) != -1) {
		switch (ch) {
		case 'A':
		case 'd':
modified src/repo.c
@@ -85,7 +85,7 @@ exec_repo(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "lo:qm:L", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+lo:qm:L", longopts, NULL)) != -1) {
		switch (ch) {
		case 'l':
			filelist = true;
modified src/rquery.c
@@ -140,7 +140,7 @@ exec_rquery(int argc, char **argv)

	portsdir = pkg_object_string(pkg_config_get("PORTSDIR"));

-
	while ((ch = getopt_long(argc, argv, "aCgiIxe:r:U", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+aCgiIxe:r:U", longopts, NULL)) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
modified src/search.c
@@ -280,7 +280,7 @@ exec_search(int argc, char **argv)
		{ NULL,			0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "CcDdefgiL:opqQ:r:RS:sUx", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+CcDdefgiL:opqQ:r:RS:sUx", longopts, NULL)) != -1) {
		switch (ch) {
		case 'C':
			pkgdb_set_case_sensitivity(true);
modified src/set.c
@@ -78,7 +78,7 @@ exec_set(int argc, char **argv)
		{ NULL,			0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "A:aCgio:xy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+A:aCgio:xy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'A':
			sets |= AUTOMATIC;
modified src/shlib.c
@@ -154,7 +154,7 @@ exec_shlib(int argc, char **argv)
		{ NULL,		0,		NULL,	0 },
	};

-
	while ((ch = getopt_long(argc, argv, "PR", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+PR", longopts, NULL)) != -1) {
		switch (ch) {
		case 'P':
			provides_only = true;
modified src/stats.c
@@ -62,7 +62,7 @@ exec_stats(int argc, char **argv)
		{ NULL,		0,		NULL,	0   },
	};
	
-
	while ((ch = getopt_long(argc, argv, "blqr", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+blqr", longopts, NULL)) != -1) {
                switch (ch) {
		case 'b':
			show_bytes = true;
modified src/update.c
@@ -119,7 +119,7 @@ exec_update(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "fqr:", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+fqr:", longopts, NULL)) != -1) {
		switch (ch) {
		case 'f':
			force = true;
modified src/updating.c
@@ -91,7 +91,7 @@ exec_updating(int argc, char **argv)
		{ NULL,		0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "d:f:", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+d:f:", longopts, NULL)) != -1) {
		switch (ch) {
		case 'd':
			date = optarg;
modified src/upgrade.c
@@ -76,7 +76,7 @@ exec_upgrade(int argc, char **argv)

	nbactions = nbdone = 0;

-
	while ((ch = getopt_long(argc, argv, "CfFgiInqr:Uxy", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+CfFgiInqr:Uxy", longopts, NULL)) != -1) {
		switch (ch) {
		case 'C':
			pkgdb_set_case_sensitivity(true);
modified src/version.c
@@ -694,7 +694,7 @@ exec_version(int argc, char **argv)
		{ NULL,			0,			NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "Ce:g:hIiL:l:O:oPqRr:TtUvx:",
+
	while ((ch = getopt_long(argc, argv, "+Ce:g:hIiL:l:O:oPqRr:TtUvx:",
				 longopts, NULL)) != -1) {
		switch (ch) {
		case 'C':
modified src/which.c
@@ -74,7 +74,7 @@ exec_which(int argc, char **argv)
		{ NULL,			0,		NULL,	0   },
	};

-
	while ((ch = getopt_long(argc, argv, "gopq", longopts, NULL)) != -1) {
+
	while ((ch = getopt_long(argc, argv, "+gopq", longopts, NULL)) != -1) {
		switch (ch) {
		case 'g':
			glob = true;