head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.44 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.42 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.40 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.38 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.36 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.34 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.32 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.30 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.28 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.26 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.24 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.22 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.20 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.18 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.16 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.14 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.12 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.10 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.8 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.6 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.4 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.2 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.3.0.18 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.16 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.14 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.12 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.10 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.6 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH001:1.3 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2005.02.05.00.45.49; author wiz; state dead; branches; next 1.3; 1.3 date 2001.02.28.15.44.16; author wiz; state Exp; branches; next 1.2; 1.2 date 2000.09.09.02.53.10; author wiz; state Exp; branches; next 1.1; 1.1 date 2000.08.13.22.03.07; author wiz; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.08.13.22.03.07; author wiz; state Exp; branches; next ; desc @@ 1.4 log @Update to 1.3.3: 2005-03-04 Heikki Orsila * version 1.3.3 - lots of changes. see previous changelog entries. 2005-03-04 Heikki Orsila - configure script now ignore unknown arguments (but gives a warning) - configure allows setting mandir and compiler. Examples: --mandir=/usr/man --compiler=/opt/experimental/gcc-4/bin/gcc - fixed wording in man file (Thomas Klausner) - -b option: print only basenames of the given files when creating an sfv. 2005-03-03 Heikki Orsila - fixed O_LARGEFILE for macosx - Thomas Klausner submitted partial sfv checking patch by Dieter Baron. Now cksfv -f foo.sfv [FILE1 FILE2 ...] checks only given FILES. - Thomas Klausner submitted patch by Tobias Nygren to avoid calculating CRC twice per file (read once, compute twice). 2005-02-03 Heikki Orsila * version 1.3.2 - solaris printf workaround. use %lu tu print filesizes. works best on 64-bit architectures (with compilers assuming sizeof(long) == sizeof(size_t)). GNU/Linux support %zu which is the appropriate modifier for this case, but can't have it everywhere. - doesn't print directory infos into catalogues when creating sfvs - see other modifications since 1.3.1 (many of them) 2005-01-26 Heikki Orsila - fixed output (displayed only 32-bit file sizes, and months wrong) OLD: ; 100663296 14:54.37 2005-00-25 zeros NEW: ; 4395630592 14:54.37 2005-01-25 zeros - lots of code cleanups - solaris fixes 2005-01-25 Heikki Orsila * no new version - Added and edited man page from Debian distribution - Fixed Makefile issues for -jx - Added a simple configure script for more consistent compilation - Removed b0rken rpm creation from Makefile - Removed spam messages (when creating and verifying checksums) - Added test cases (make tests) - added fake and lousy stdint.h generation (OS that don't have it should be upgraded) 2005-01-24 Heikki Orsila * no new version - I decided to start maintaining the program since Bryan Call is unreachable. 2004-05-25 Heikki Orsila * version 1.3.1 - Fixed 64-bit issues. Went into Gentoo portage. @ text @$NetBSD: patch-ad,v 1.3 2001/02/28 15:44:16 wiz Exp $ --- README.orig Fri Dec 29 01:34:33 2000 +++ README Wed Feb 28 15:22:27 2001 @@@@ -55,6 +55,16 @@@@ ------------------------------------------------------------ Everything OK +If you do not want to check all files liste in an .sfv file, name the +files you want checked on the command line: + + $ cksfv -f new_files.sfv -i COPYING ChangeLog + --( Verifying file: new_files.sfv )------------------------- + COPYING: OK + ChangeLog: OK + ------------------------------------------------------------ + Everything OK + Now for creating your own .sfv files. You can run the following command. $ cksfv * > mine.sfv @ 1.3 log @Update to 1.2, provided by Dieter Baron. Changes: new sfv were not zero padded; handle ' ' and '_' the same in insensitive matching. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @fix coredump on empty lines, warn if files given on commandline are not in checksum file @ text @d3 8 a10 36 --- src/readsfv.c.orig Mon May 22 23:57:05 2000 +++ src/readsfv.c Sat Sep 9 04:43:44 2000 @@@@ -33,12 +33,13 @@@@ extern int verbose; -int readsfv(char *fn, char *dir, int nocase) +int readsfv(char *fn, char *dir, int nocase, int argc, char **argv) { FILE *fd; DIR *dirp = NULL; char buf[512], *end, filename[512], crc[9], path[256]; int file, rval = 0; + int i, check; unsigned long len, val, sfvcrc; struct dirent *dirinfo; @@@@ -67,17 +68,35 @@@@ } while(fgets(buf, 512, fd)) { - if (buf[0] != ';') { /* comment in the sfv file ignore */ + if (buf[0] != ';' && buf[0] != '\n') { /* comment or empty line, ignore */ /* build filename and crc from the sfv file */ end = strrchr(buf, ' '); - if (end == NULL) { + if (end == NULL || end-buf > 512-10) { fprintf(stderr, "cksfv: %s: incorrect sfv file format\n", fn); + continue; } *end = '\0'; *(end+9) = '\0'; strncpy(crc, ++end, 9); strncpy(filename, buf, 512); - sfvcrc = strtoul(crc, '\0', 16); + sfvcrc = strtoul(crc, NULL, 16); d12 6 a17 25 + if (argc) { + check = 0; + for (i=0; i