2 * dpkg-split - splitting and joining of multipart *.deb archives
3 * dpkg-split.h - external definitions for this program
5 * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk>
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 typedef void dofunction(const char *const *argv
);
25 dofunction do_split DPKG_ATTR_NORET
;
26 dofunction do_join
, do_info
, do_auto
, do_queue
, do_discard
;
30 const char *fmtversion
;
34 unsigned long orglength
;
35 unsigned int thispartn
, maxpartn
;
36 unsigned long maxpartlen
;
37 unsigned long thispartoffset
;
39 size_t headerlen
; /* size of header in part file */
44 struct partqueue
*nextinqueue
;
46 /* only fields filename, md5sum, maxpartlen, thispartn, maxpartn
47 * are valid; the rest are null. If the file is not named correctly
48 * to be a part file md5sum is null too and the numbers are zero.
52 extern dofunction
*action
;
53 extern const struct cmdinfo
*cipaction
;
54 extern long maxpartsize
;
55 extern const char *depotdir
, *outputfile
;
56 extern struct partqueue
*queue
;
57 extern int npquiet
, msdos
;
59 void rerr(const char *fn
) DPKG_ATTR_NORET
;
60 void rerreof(FILE *f
, const char *fn
) DPKG_ATTR_NORET
;
61 void print_info(const struct partinfo
*pi
);
62 struct partinfo
*read_info(FILE *partfile
, const char *fn
, struct partinfo
*ir
);
65 void reassemble(struct partinfo
**partlist
, const char *outputfile
);
66 void mustgetpartinfo(const char *filename
, struct partinfo
*ri
);
67 void addtopartlist(struct partinfo
**, struct partinfo
*, struct partinfo
*refi
);
69 #define SPLITVERSION "2.1"
71 #define PARTSDIR "parts/"
73 #define PARTMAGIC "!<arch>\ndebian-split "
74 #define HEADERALLOWANCE 1024
76 #define SPLITPARTDEFMAX (450 * 1024)
78 #endif /* DPKG_SPLIT_H */