|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T k
Length: 1097 (0x449)
Types: TextFile
Names: »kitlists.c«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦97f3ac3f8⟧ »EurOpenD3/news/rn.tar.Z«
└─⟦df9cf1b54⟧
└─⟦this⟧ »kitlists.c«
/* $Header: kitlists.c,v 4.3 85/05/01 11:42:08 lwall Exp $
*
* $Log: kitlists.c,v $
* Revision 4.3 85/05/01 11:42:08 lwall
* Baseline for release with 4.3bsd.
*
*/
#include <stdio.h>
#define MAXKIT 100
#define MAXKITSIZE 63000
#define KITOVERHEAD 700
#define FILEOVERHEAD 80
long tot[MAXKIT];
FILE *outfp[MAXKIT]; /* of course, not this many file descriptors */
main(argc,argv)
int argc;
char **argv;
{
FILE *inp, *popen();
char buf[1024], filnam[128];
char *index();
register char *s;
register int i, newtot;
sprintf(buf,"\
ls -l `awk '{print $1}' <%s'` | awk '{print $8 \" \" $4}' | sort +1nr\
", argc > 1 ? argv[1] : "MANIFEST.new");
inp = popen(buf,"r");
while (fgets(buf,1024,inp) != Nullch) {
s = index(buf,' ');
*s++ = '\0';
for (i=1;
(newtot = tot[i] + atol(s) + FILEOVERHEAD) > MAXKITSIZE-KITOVERHEAD;
i++)
;
if (!tot[i]) {
sprintf(filnam,"kit%d.list",i);
outfp[i] = fopen(filnam,"w");
}
tot[i] = newtot;
printf("Adding %s to kit %d giving %d bytes\n",buf,i,newtot);
fprintf(outfp[i],"%s\n",buf);
}
}