Article View: net.sources.bugs
Article #953Bug in AGEF
From: merlin
Date: Tue, 03 Mar 1987 14:28
Date: Tue, 03 Mar 1987 14:28
75 lines
2257 bytes
2257 bytes
Sorry, folks, but I was writing AGEF late one night. It
appears that I changed a defined function name, and didn't
remember to make the change throughout the sources. My apologies,
and thanks to Karl Nyberg (karl@grebyn.COM) for pointing this out.
I should also have pointed out that this program depends on
the Berkeley directory routines. I'm not sure if AT&T has similar
routines on their Unix. I don't have an AT&T Unix available, so I
won't make any guarantees about AGEF's behaviour in that realm.
Here's the patch:
*** agef.c.v0 Mon Mar 2 11:49:32 1987
--- agef.c Tue Mar 3 09:15:27 1987
***************
*** 28,33
reflect the accumulated totals for all files in the directory.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/dir.h>
--- 28,35 -----
reflect the accumulated totals for all files in the directory.
*/
+ #define PATCHLEVEL 1
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/dir.h>
***************
*** 141,147
for (i = 0; i < TOTAL; i++) {
if (age <= ages[i]) {
inodes[i]++;
! blocks[i] += roundup(stb.st_size, 1024);
break;
};
};
--- 143,149 -----
for (i = 0; i < TOTAL; i++) {
if (age <= ages[i]) {
inodes[i]++;
! blocks[i] += ceiling(stb.st_size, 1024);
break;
};
};
***************
*** 146,152
};
};
inodes[TOTAL]++;
! blocks[TOTAL] += roundup(stb.st_size, 1024);
};
}
--- 148,154 -----
};
};
inodes[TOTAL]++;
! blocks[TOTAL] += ceiling(stb.st_size, 1024);
};
}
--
David S. Hayes, The Merlin of Avalon
PhoneNet: (202) 694-6900
ARPA: merlin%hqda-ai.uucp@brl.arpa
UUCP: ...!seismo!sundc!hqda-ai!merlin
Technical Details
Message-ID:
<313@hqda-ai.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!sundc!hqda-ai!merlinShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!sundc!hqda-ai!merlin From: merlin@hqda-ai.UUCP Newsgroups: net.sources.bugs Subject: Bug in AGEF Message-ID: <313@hqda-ai.UUCP> Date: Tue, 3-Mar-87 09:28:20 EST Article-I.D.: hqda-ai.313 Posted: Tue Mar 3 09:28:20 1987 Date-Received: Thu, 5-Mar-87 20:00:52 EST Organization: Army AI Center, Pentagon Lines: 75 Keywords: agef