Fix pkg_info(1) and pkg_delete(1) to handle properly packages which

names start with a digit.

PR:		bin/76858
Submitted by:	Matthew D. Fuller <fullermd@over-yonder dot net>
MFC after:	3 days
This commit is contained in:
Kirill Ponomarev 2005-10-10 08:38:21 +00:00
parent 8272da3106
commit b3f2825399
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151188
2 changed files with 2 additions and 2 deletions

View file

@ -121,7 +121,7 @@ main(int argc, char **argv)
* package name. Otherwise we've come across a trailing '/' and
* need to continue our quest.
*/
if (isalpha(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
if (isalnum(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
strpbrk(pkgs_split, "*?[]") != NULL)) {
*argv = pkgs_split;
break;

View file

@ -240,7 +240,7 @@ main(int argc, char **argv)
* we've come across a trailing '/' and need to continue our
* quest.
*/
if (isalpha(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
if (isalnum(*pkgs_split) || ((MatchType == MATCH_GLOB) && \
strpbrk(pkgs_split, "*?[]") != NULL)) {
*argv = pkgs_split;
break;