diff options
author | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-04-04 01:58:40 +0100 |
---|---|---|
committer | Ian Jackson <ian@chiark.chu.cam.ac.uk> | 1996-04-04 01:58:40 +0100 |
commit | 1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5 (patch) | |
tree | c0ee53eba4e71f4c246ee9e45fbd90e931bbd1f9 /lib/parsedump.h | |
download | dpkg-1b80fb16c22db72457d7a456ffbf1f70a8dfc0a5.tar.gz |
dpkg (1.1.4); priority=MEDIUM
* Allow overwriting of conflicting packages being removed. (Bug#2614.)
* a.out control file says Pre-Depends: libc4 | libc. (Bug#2640.)
* ELF control file and libc dependencies changed to use finalised scheme.
* ELF control file and libc dependencies for i386 only. (Bug#2617.)
* Guidelines say use only released libraries and compilers.
* Install wishlist as /usr/doc/dpkg/WISHLIST.
* Remove spurious entries for Guidelines in info dir file.
* dpkg-deb --build checks permissions on control (DEBIAN) directory.
* Spaces in control file fields not copied by dpkg-split. (Bug#2633.)
* Spaces in split file part control data ignore. (Bug#2633.)
* Portability fixes, including patch from Richard Kettlewell.
* Fixed minor configure.in bug causing mangled GCC -W options.
-- Ian Jackson <ian@chiark.chu.cam.ac.uk> Thu, 4 Apr 1996 01:58:40 +0100
Diffstat (limited to 'lib/parsedump.h')
-rw-r--r-- | lib/parsedump.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/lib/parsedump.h b/lib/parsedump.h new file mode 100644 index 000000000..ced6ec787 --- /dev/null +++ b/lib/parsedump.h @@ -0,0 +1,73 @@ +/* + * libdpkg - Debian packaging suite library routines + * parse.c - declarations for in-core database reading/writing + * + * Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk> + * + * This is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2, + * or (at your option) any later version. + * + * This is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with dpkg; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef DPKG_PARSEDUMP_H +#define DPKG_PARSEDUMP_H + +struct fieldinfo; + +struct nickname { + const char *nick; + const char *canon; +}; + +extern const struct fieldinfo fieldinfos[]; +extern const struct nickname nicknames[]; +extern const int nfields; /* = elements in fieldinfos, including the sentinels */ + +#define PKGIFPOFF(f) ((char*)(&(((struct pkginfoperfile *)0x1000)->f)) - \ + (char*)(struct pkginfoperfile *)0x1000) +#define PKGPFIELD(pifp,of,type) (*(type*)((char*)(pifp)+(of))) + +#define FILEFOFF(f) ((char*)(&(((struct filedetails *)0x1000)->f)) - \ + (char*)(struct filedetails *)0x1000) +#define FILEFFIELD(filedetail,of,type) (*(type*)((char*)(filedetail)+(of))) + +typedef void freadfunction(struct pkginfo *pigp, struct pkginfoperfile *pifp, + enum parsedbflags flags, + const char *filename, int lno, FILE *warnto, int *warncount, + const char *value, const struct fieldinfo *fip); +freadfunction f_name, f_charfield, f_priority, f_section, f_status, f_filecharf; +freadfunction f_boolean, f_dependency, f_conffiles, f_configversion; + +typedef void fwritefunction(struct varbuf*, const struct pkginfo*, + const struct pkginfoperfile*, const struct fieldinfo*); +fwritefunction w_name, w_charfield, w_priority, w_section, w_status, w_configversion; +fwritefunction w_version, w_null, w_booleandefno, w_dependency, w_conffiles, w_filecharf; + +struct fieldinfo { + const char *name; + freadfunction *rcall; + fwritefunction *wcall; + int integer; +}; + +void parseerr(FILE *file, const char *filename, int lno, FILE *warnto, int *warncount, + const struct pkginfo *pigp, int warnonly, + const char *fmt, ...) PRINTFFORMAT(8,9); +void parsemustfield(FILE *file, const char *filename, int lno, + FILE *warnto, int *warncount, + const struct pkginfo *pigp, int warnonly, + char **value, const char *what); + +#define MSDOS_EOF_CHAR '\032' /* ^Z */ + +#endif /* DPKG_PARSEDUMP_H */ |