3 # make_zip_errrors.sh: create zip_errors.mdoc from zip.h
4 # Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner
6 # This file is part of libzip, a library to manipulate ZIP archives.
7 # The authors can be contacted at <libzip@nih.at>
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # 2. Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in
16 # the documentation and/or other materials provided with the
18 # 3. The names of the authors may not be used to endorse or promote
19 # products derived from this software without specific prior
22 # THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
23 # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
26 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
28 # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
30 # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
31 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
32 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 echo "Usage: $0 in_file out_file" >&2
38 echo " e.g. $0 zip.h zip_err_str.c" >&2
44 echo "$0: error: output file = input file" >&2
48 date=`LC_TIME=en_US date '+%B %e, %Y' | sed 's/ / /'`
50 cat <<EOF >> "$2.$$" || exit 1
51 .\" zip_errors.mdoc -- list of all libzip error codes
52 .\" Copyright (C) 1999-2013 Dieter Baron and Thomas Klausner
54 .\" This file is part of libzip, a library to manipulate ZIP archives.
55 .\" The authors can be contacted at <libzip@nih.at>
57 .\" Redistribution and use in source and binary forms, with or without
58 .\" modification, are permitted provided that the following conditions
60 .\" 1. Redistributions of source code must retain the above copyright
61 .\" notice, this list of conditions and the following disclaimer.
62 .\" 2. Redistributions in binary form must reproduce the above copyright
63 .\" notice, this list of conditions and the following disclaimer in
64 .\" the documentation and/or other materials provided with the
66 .\" 3. The names of the authors may not be used to endorse or promote
67 .\" products derived from this software without specific prior
68 .\" written permission.
70 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS \`\`AS IS'' AND ANY EXPRESS
71 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
72 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
73 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
74 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
75 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
76 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
77 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
78 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
79 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
80 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
82 .\" This file was generated automatically by $0
83 .\" from $1; make changes there.
90 .Nd list of all libzip error codes
96 The following error codes are used by libzip:
97 .Bl -tag -width XZIPXERXCOMPNOTSUPPXX
100 sed -n 's/^#define \(ZIP_ER_[A-Z_0-9]*\).*\/\* \(.\) \([^*]*\) \*\//.It Bq Er \1@\3./p' "$1" \
105 cat <<EOF >> "$2.$$" || exit 1
109 .An Dieter Baron Aq Mt dillo@nih.at
111 .An Thomas Klausner Aq Mt tk@giga.or.at
114 mv "$2.$$" "$2" || exit 1