History log of /netbsd-current/usr.bin/vndcompress/vndcompress.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 29-Jul-2017 riastradh

Clarify compile-time and run-time arithmetic safety assertions.

This is an experiment with a handful of macros for writing the
checks, most of which are compile-time:

MUL_OK(t, a, b) Does a*b avoid overflow in type t?
ADD_OK(t, a, b) Does a + b avoid overflow in type t?
TOOMANY(t, x, b, m) Are there more than m b-element blocks in x in type t?
(I.e., does ceiling(x/b) > m?)

Addenda that might make sense but are not needed here:

MUL(t, a, b, &p) Set p = a*b and return 0, or return ERANGE if overflow.
ADD(t, a, b, &s) Set s = a+b and return 0, or return ERANGE if overflow.

Example:

uint32_t a = ..., b = ..., y = ..., z = ..., x, w;

/* input validation */
error = MUL(size_t, a, b, &x);
if (error)
fail;
if (TOOMANY(uint32_t, x, BLKSIZ, MAX_NBLK))
fail;
y = HOWMANY(x, BLKSIZ);
if (z > Z_MAX)
fail;
...
/* internal computation */
__CTASSERT(MUL_OK(uint32_t, Z_MAX, MAX_NBLK));
w = z*y;

Obvious shortcomings:

1. Nothing checks your ctassert matches your subsequent arithmetic.
(Maybe we could have BOUNDED_MUL(t, x, xmax, y, ymax) with a
ctassert inside.)

2. Nothing flows the bounds needed by the arithmetic you use back
into candidate definitions of X_MAX/Y_MAX.

But at least the reviewer's job is only to make sure that (a) the
MUL_OK matches the *, and (b) the bounds in the assertion match the
bounds on the inputs -- in particular, the reviewer need not derive
the bounds from the context, only confirm they are supported by the
paths to it.

This is not meant to be a general-purpose proof assistant, or even a
special-purpose one like gfverif <http://gfverif.cryptojedi.org/>.
Rather, it is an experiment in adding a modicum of compile-time
verification with a simple C API change.

This also is not intended to serve as trapping arithmetic on
overflow. The goal here is to enable writing the program with
explicit checks on input and compile-time annotations on computation
to gain confident that overflow won't happen in the computation.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.28 17-Apr-2017 riastradh

Omit needless XXX comment.


# 1.27 16-Apr-2017 riastradh

Justify the last unjustified assertion here.

Sprinkle a few more assertions to help along the way.

(Actually, it was justified; I just hadn't made explicit the relation
to the value of fdpos that all two callers specify.)


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.26 10-Jan-2017 christos

branches: 1.26.2;
need <sys/stat.h>


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.25 18-Nov-2014 riastradh

branches: 1.25.2;
Fix vndcompress restart failure fallback when input is a pipe.

Defer seeking the *input* image, or winding it forward, until we are
certain we all ready in the cloop2 output, because when the input
image is a pipe, we don't get a chance to seek back to the beginning
and start from the top instead of restarting.

If restart does fail, don't try to seek the input image back to the
beginning unless we had already tried to seek or wind it forward.

Add some automatic tests for this and related cases.

XXX pullup to netbsd-7, netbsd-6


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.24 25-Jan-2014 riastradh

branches: 1.24.4;
Fix some more integer overflow/truncation issues.

Arithmetic in C is hard. Let's go shopping!


# 1.23 24-Jan-2014 christos

CID 1164169: integer overflow


# 1.22 22-Jan-2014 riastradh

Change vndcompress to use a default window size of 512.

For vnduncompress on nonseekable input, the window size is as large
as it needs to be by default, as before. Not clear that this is the
right choice -- by default vnduncompress on nonseekable input will
just use unbounded memory unsolicited.


# 1.21 22-Jan-2014 riastradh

Rename block size option from `-s' to `-b'.

Makes more sense and makes it consistent with other utilities such as
pax and pigz. This vndcompress has never gone out in a release, so
changing the name of the option shouldn't cause too many problems...


# 1.20 22-Jan-2014 riastradh

Window size is now an option; remove XXX comment to the contrary.


# 1.19 22-Jan-2014 riastradh

Add option -w to vnd(un)compress to specify the window size.


# 1.18 22-Jan-2014 riastradh

Implement machinery for fixed-size windows into the offset table.


# 1.17 22-Jan-2014 riastradh

Write offsets in hexadecimal, not decimal.


# 1.16 22-Jan-2014 riastradh

Move block_signals/restore_sigmask to utils.c


# 1.15 22-Jan-2014 riastradh

Abstract handling of the cloop2 offset table.

Preparation for converting it to use a fixed-size window.


# 1.14 22-Jan-2014 riastradh

Move vndcompress utilities to utils.c.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.13 06-May-2013 riastradh

Make partial read/write error messages more consistent in vndcompress.


# 1.12 04-May-2013 riastradh

Add __printflike to vsnprintf_ss.


# 1.11 04-May-2013 riz

'unsigned long' prints with %lu, not %zu.


# 1.10 04-May-2013 riastradh

Fix sign-compare in compress_blocks.

Not sure why my builds didn't reveal this one -- they revealed
several others during development.


# 1.9 04-May-2013 joerg

__printflike for vwarnx_ss, __dead for err_ss and errx_ss.


# 1.8 03-May-2013 riastradh

Rewrite vndcompress to support SIGINFO and restart after interrupt.

Make it generally more robust in the process.

No objection (or comment) on tech-userlevel.

ok christos


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 06-Sep-2011 joerg

branches: 1.7.2; 1.7.4; 1.7.8;
Use static and __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.6 14-Apr-2009 lukem

Fix another sign-compare issue


# 1.5 14-Apr-2009 lukem

fix sign-compare issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.4 18-Feb-2008 dyoung

branches: 1.4.12;
Take a small step toward making vndcompress into a host tool:
remove #include <arpa/inet.h> and use bswap32() instead of ntohl().


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base chap-midi-nbase chap-midi-base
# 1.3 27-Jul-2005 he

branches: 1.3.2; 1.3.14;
The return type from getopt(3) is int, not char. Besides, char is
not guaranteed to be signed, so comparison with -1 will cause a
warning (turned error) for some of our ports (e.g. our arm ports).
Fix this by making the 'ch' variable an int instead of a char.


# 1.2 25-Jul-2005 wiz

Sync usage with man page.


# 1.1 25-Jul-2005 hubertf

branches: 1.1.1;
Initial revision


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.28 17-Apr-2017 riastradh

Omit needless XXX comment.


# 1.27 16-Apr-2017 riastradh

Justify the last unjustified assertion here.

Sprinkle a few more assertions to help along the way.

(Actually, it was justified; I just hadn't made explicit the relation
to the value of fdpos that all two callers specify.)


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base
# 1.26 10-Jan-2017 christos

branches: 1.26.2;
need <sys/stat.h>


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.25 18-Nov-2014 riastradh

branches: 1.25.2;
Fix vndcompress restart failure fallback when input is a pipe.

Defer seeking the *input* image, or winding it forward, until we are
certain we all ready in the cloop2 output, because when the input
image is a pipe, we don't get a chance to seek back to the beginning
and start from the top instead of restarting.

If restart does fail, don't try to seek the input image back to the
beginning unless we had already tried to seek or wind it forward.

Add some automatic tests for this and related cases.

XXX pullup to netbsd-7, netbsd-6


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.24 25-Jan-2014 riastradh

branches: 1.24.4;
Fix some more integer overflow/truncation issues.

Arithmetic in C is hard. Let's go shopping!


# 1.23 24-Jan-2014 christos

CID 1164169: integer overflow


# 1.22 22-Jan-2014 riastradh

Change vndcompress to use a default window size of 512.

For vnduncompress on nonseekable input, the window size is as large
as it needs to be by default, as before. Not clear that this is the
right choice -- by default vnduncompress on nonseekable input will
just use unbounded memory unsolicited.


# 1.21 22-Jan-2014 riastradh

Rename block size option from `-s' to `-b'.

Makes more sense and makes it consistent with other utilities such as
pax and pigz. This vndcompress has never gone out in a release, so
changing the name of the option shouldn't cause too many problems...


# 1.20 22-Jan-2014 riastradh

Window size is now an option; remove XXX comment to the contrary.


# 1.19 22-Jan-2014 riastradh

Add option -w to vnd(un)compress to specify the window size.


# 1.18 22-Jan-2014 riastradh

Implement machinery for fixed-size windows into the offset table.


# 1.17 22-Jan-2014 riastradh

Write offsets in hexadecimal, not decimal.


# 1.16 22-Jan-2014 riastradh

Move block_signals/restore_sigmask to utils.c


# 1.15 22-Jan-2014 riastradh

Abstract handling of the cloop2 offset table.

Preparation for converting it to use a fixed-size window.


# 1.14 22-Jan-2014 riastradh

Move vndcompress utilities to utils.c.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.13 06-May-2013 riastradh

Make partial read/write error messages more consistent in vndcompress.


# 1.12 04-May-2013 riastradh

Add __printflike to vsnprintf_ss.


# 1.11 04-May-2013 riz

'unsigned long' prints with %lu, not %zu.


# 1.10 04-May-2013 riastradh

Fix sign-compare in compress_blocks.

Not sure why my builds didn't reveal this one -- they revealed
several others during development.


# 1.9 04-May-2013 joerg

__printflike for vwarnx_ss, __dead for err_ss and errx_ss.


# 1.8 03-May-2013 riastradh

Rewrite vndcompress to support SIGINFO and restart after interrupt.

Make it generally more robust in the process.

No objection (or comment) on tech-userlevel.

ok christos


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 06-Sep-2011 joerg

branches: 1.7.2; 1.7.4; 1.7.8;
Use static and __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.6 14-Apr-2009 lukem

Fix another sign-compare issue


# 1.5 14-Apr-2009 lukem

fix sign-compare issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.4 18-Feb-2008 dyoung

branches: 1.4.12;
Take a small step toward making vndcompress into a host tool:
remove #include <arpa/inet.h> and use bswap32() instead of ntohl().


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base chap-midi-nbase chap-midi-base
# 1.3 27-Jul-2005 he

branches: 1.3.2; 1.3.14;
The return type from getopt(3) is int, not char. Besides, char is
not guaranteed to be signed, so comparison with -1 will cause a
warning (turned error) for some of our ports (e.g. our arm ports).
Fix this by making the 'ch' variable an int instead of a char.


# 1.2 25-Jul-2005 wiz

Sync usage with man page.


# 1.1 25-Jul-2005 hubertf

branches: 1.1.1;
Initial revision


# 1.26 10-Jan-2017 christos

need <sys/stat.h>


Revision tags: pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.25 18-Nov-2014 riastradh

Fix vndcompress restart failure fallback when input is a pipe.

Defer seeking the *input* image, or winding it forward, until we are
certain we all ready in the cloop2 output, because when the input
image is a pipe, we don't get a chance to seek back to the beginning
and start from the top instead of restarting.

If restart does fail, don't try to seek the input image back to the
beginning unless we had already tried to seek or wind it forward.

Add some automatic tests for this and related cases.

XXX pullup to netbsd-7, netbsd-6


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.24 25-Jan-2014 riastradh

branches: 1.24.4;
Fix some more integer overflow/truncation issues.

Arithmetic in C is hard. Let's go shopping!


# 1.23 24-Jan-2014 christos

CID 1164169: integer overflow


# 1.22 22-Jan-2014 riastradh

Change vndcompress to use a default window size of 512.

For vnduncompress on nonseekable input, the window size is as large
as it needs to be by default, as before. Not clear that this is the
right choice -- by default vnduncompress on nonseekable input will
just use unbounded memory unsolicited.


# 1.21 22-Jan-2014 riastradh

Rename block size option from `-s' to `-b'.

Makes more sense and makes it consistent with other utilities such as
pax and pigz. This vndcompress has never gone out in a release, so
changing the name of the option shouldn't cause too many problems...


# 1.20 22-Jan-2014 riastradh

Window size is now an option; remove XXX comment to the contrary.


# 1.19 22-Jan-2014 riastradh

Add option -w to vnd(un)compress to specify the window size.


# 1.18 22-Jan-2014 riastradh

Implement machinery for fixed-size windows into the offset table.


# 1.17 22-Jan-2014 riastradh

Write offsets in hexadecimal, not decimal.


# 1.16 22-Jan-2014 riastradh

Move block_signals/restore_sigmask to utils.c


# 1.15 22-Jan-2014 riastradh

Abstract handling of the cloop2 offset table.

Preparation for converting it to use a fixed-size window.


# 1.14 22-Jan-2014 riastradh

Move vndcompress utilities to utils.c.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.13 06-May-2013 riastradh

Make partial read/write error messages more consistent in vndcompress.


# 1.12 04-May-2013 riastradh

Add __printflike to vsnprintf_ss.


# 1.11 04-May-2013 riz

'unsigned long' prints with %lu, not %zu.


# 1.10 04-May-2013 riastradh

Fix sign-compare in compress_blocks.

Not sure why my builds didn't reveal this one -- they revealed
several others during development.


# 1.9 04-May-2013 joerg

__printflike for vwarnx_ss, __dead for err_ss and errx_ss.


# 1.8 03-May-2013 riastradh

Rewrite vndcompress to support SIGINFO and restart after interrupt.

Make it generally more robust in the process.

No objection (or comment) on tech-userlevel.

ok christos


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.7 06-Sep-2011 joerg

branches: 1.7.2; 1.7.4; 1.7.8;
Use static and __dead


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.6 14-Apr-2009 lukem

Fix another sign-compare issue


# 1.5 14-Apr-2009 lukem

fix sign-compare issues


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.4 18-Feb-2008 dyoung

branches: 1.4.12;
Take a small step toward making vndcompress into a host tool:
remove #include <arpa/inet.h> and use bswap32() instead of ntohl().


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base chap-midi-nbase chap-midi-base
# 1.3 27-Jul-2005 he

branches: 1.3.2; 1.3.14;
The return type from getopt(3) is int, not char. Besides, char is
not guaranteed to be signed, so comparison with -1 will cause a
warning (turned error) for some of our ports (e.g. our arm ports).
Fix this by making the 'ch' variable an int instead of a char.


# 1.2 25-Jul-2005 wiz

Sync usage with man page.


# 1.1 25-Jul-2005 hubertf

branches: 1.1.1;
Initial revision