FreeBSD Bugzilla – Attachment 7891 Details for
Bug 16840
MFC: Matthew D. Fuller's teach pkg_info to deal with full pathnames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.38 KB, created by
jack
on 2000-02-20 20:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
jack
Created:
2000-02-20 20:50:01 UTC
Size:
1.38 KB
patch
obsolete
>--- main.c.orig Sun Aug 29 11:45:23 1999 >+++ main.c Sun Feb 20 15:25:02 2000 >@@ -28,7 +28,7 @@ > #include "lib.h" > #include "info.h" > >-static char Options[] = "acdDe:fikrRpLqImvhl:"; >+static char Options[] = "acdDe:fhiIkl:LmpqrRt:v"; > > int Flags = 0; > Boolean AllInstalled = FALSE; >@@ -44,6 +44,7 @@ > { > int ch; > char **pkgs, **start; >+ char *pkgs_split; > > pkgs = start = argv; > if (argc == 1) { >@@ -143,9 +144,26 @@ > Flags = SHOW_COMMENT | SHOW_DESC | SHOW_REQBY; > > /* Get all the remaining package names, if any */ >- while (*argv) >- *pkgs++ = *argv++; >- >+ while (*argv) { >+ if( (pkgs_split = rindex(*argv, (int) '/')) != NULL ) { >+ while( !isalpha(*(pkgs_split+1)) ) { >+ *pkgs_split = '\0'; >+ if ( (pkgs_split = rindex(*argv, (int) '/')) == NULL) >+ pkgs_split = *argv; >+ } >+ if(pkgs_split != NULL) { >+ if (*pkgs_split == '/') >+ pkgs_split++; >+ *pkgs = pkgs_split; >+ pkgs++; >+ } >+ } >+ else { >+ *pkgs = *argv; >+ pkgs++; >+ } >+ argv++; >+ } > /* If no packages, yelp */ > if (pkgs == start && !AllInstalled && !CheckPkg) > warnx("missing package name(s)"), usage(); >@@ -158,7 +176,7 @@ > { > fprintf(stderr, "%s\n%s\n%s\n", > "usage: pkg_info [-cdDikrRpLqImv] [-e package] [-l prefix]", >- " pkg-name [pkg-name ...]", >+ " [-t template] pkg-name [pkg-name ...]", > " pkg_info -a [flags]"); > exit(1); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16840
: 7891 |
7892