+Mon Oct 25 06:50:17 EDT 1999 Ben Collins <bcollins.debian.org>
+
+ * main/processarc.c: fixes calculation of package filename display (the
+ ".../foo.deb" one) where it was showing the full path if the basename
+ was longer than 30 chars. Now shows just the basename if it can't
+ squeez the full path to < 30 chars (even if the basename is > than 30
+ chars)
+
Sun Oct 24 20:46:44 EDT 1999 Ben Collins <bcollins.debian.org>
* scripts/dpkg-source.pl: we want to 'delete' the POSIXLY_CORRECT env
struct pkginfo *pkg, *otherpkg, *divpkg;
struct conflict *conflictor, *cflict;
char *cidir, *cidirrest, *p;
- char pfilenamebuf[35], conffilenamebuf[MAXCONFFILENAME];
+ char *pfilenamebuf, conffilenamebuf[MAXCONFFILENAME];
const char *pfilename, *newinfofilename;
struct fileinlist *newconff, **newconffileslastp;
struct fileinlist *cfile;
cleanup_pkg_failed= cleanup_conflictor_failed= 0;
admindirlen= strlen(admindir);
- pfilename= filename;
- while (strlen(pfilename) > sizeof(pfilenamebuf)-5) {
+ for (pfilename= filename ; pfilename && strlen(pfilename) > 30 &&
+ strchr(pfilename,'/') != NULL ; pfilename++ )
pfilename= strchr(pfilename,'/');
- if (!pfilename) break;
- pfilename++;
- }
if (pfilename && pfilename != filename) {
+ pfilenamebuf= (char *)nfmalloc(strlen(pfilename)+5);
strcpy(pfilenamebuf,".../");
strcat(pfilenamebuf,pfilename);
pfilename= pfilenamebuf;