From 964d4df605f2c4a73658200e73a609f9b7928b9b321c3ce231ad3efee88193d4 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 22 Oct 2008 16:18:14 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libzio?expand=0&rev=13 --- libzio-0.9.dif | 118 ++++++++++++++++++++++++++++++++++++++++++++++++- libzio.changes | 5 +++ libzio.spec | 6 ++- 3 files changed, 126 insertions(+), 3 deletions(-) diff --git a/libzio-0.9.dif b/libzio-0.9.dif index 651d48a..066aea2 100644 --- a/libzio-0.9.dif +++ b/libzio-0.9.dif @@ -1,5 +1,121 @@ +--- fzopen.3.in ++++ fzopen.3.in 2008-10-16 14:48:34.823680248 +0200 +@@ -1,6 +1,8 @@ ++'\" t -*- coding: UTF-8 -*- + .\" + .\" Copyright 2004 Werner Fink, 2004 SuSE LINUX AG, Germany. + .\" Copyright 2006 Werner Fink, 2006 SuSE Products GmbH, Germany. ++.\" Copyright 2008 Werner Fink, 2008 SuSE Products GmbH, Germany. + .\" + .\" This program is free software; you can redistribute it and/or modify + .\" it under the terms of the GNU General Public License as published by +@@ -100,12 +102,75 @@ only supports the suffixes + .IR .z " and ".gz + for gzipped files and + .I .bz2 +-for bzip2ed files. ++for bzip2ed files. All supported formats can be found in ++the following table: ++.IP ++.TS H ++allbox; ++c l l l l l ++rb l l l l l. ++ fread fwrite fseek suffix library ++gzip yes yes yes .gz -lz ++ bzip2 yes yes no .bz2 -lbz2 ++LZW yes no no .Z builtin ++lzma yes no yes .lzma -llzmadec ++.TE ++.PP + .PP + On reading first the appropriate suffixes are checked + if not provided. If no file is found the magic + byte sequence at the beginning of the file is checked + to detect a gzip or bzip2 file. ++.PP ++.\" ++.SH CONFIGURATION ++With the help of ++.BR autoconf (1) ++and a few lines in the common file ++.B configure.in ++found in many source packages a programmer or maintainer ++can extend the automatic configuration to find the ++appropriate libraries together with the libzio: ++.PP ++.IP ++.nf ++AC_CHECK_HEADER(zlib.h,[ ++ for lib in z gz; do ++ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib"; break]) ++ done]) ++AC_CHECK_HEADER(bzlib.h,[ ++ for lib in bz2 bzip2; do ++ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib"; break]) ++ done]) ++AC_CHECK_HEADER(lzmadec.h,[ ++ AC_CHECK_LIB(lzmadec, lzmadec_read, [LIBS="$LIBS -l$lib"]) ++ ]) ++AC_CHECK_HEADER(zio.h,[ ++ AC_CHECK_LIB(zio, fzopen, [LIBS="$LIBS -lzio" ++ AC_DEFINE(HAVE_ZIO)]) ++ ]) ++.fi ++.PP ++combined with two lines in the common file ++.B config.h.in ++like ++.PP ++.RS 1c ++.nf ++/* Define to 1 if you have libzio for opening compressed files */ ++#undef HAVE_ZIO ++.fi ++.RE ++.PP ++it is easy to use the ++.BR cpp (1) ++macro ++.I HAVE_ZIO ++for the usage of ++.B fzopen ++instead of ++.BR fopen (3). ++.PP + .\" + .SH RETURN VALUES + Upon successful completion +@@ -215,7 +280,7 @@ functions of the e.g. + .\" + .BR /usr/include/zio.h + .SH SEE ALSO +-.BR fopen (8), ++.BR fopen (3), + .br + .BR gzip (1), + .br +@@ -229,7 +294,8 @@ functions of the e.g. + .br + .BR /usr/include/lzmadec.h . + .PP +-Further informations about Programming Custom Streams ++Further informations about ++.B Programming Custom Streams + can be found by using the command + .IP + .B info libc 'Custom streams' +@@ -243,5 +309,8 @@ does not exist (yet). + .br + 2006 Werner Fink, + 2006 SuSE Products GmbH, Germany. ++.br ++2008 Werner Fink, ++2008 SuSE Products GmbH, Germany. + .SH AUTHOR + Werner Fink --- zio.c -+++ zio.c 2008-09-24 17:50:42.634160726 +0200 ++++ zio.c 2008-09-24 17:50:43.000000000 +0200 @@ -189,7 +189,7 @@ FILE * fzopen(const char * path, const c what = 'Z'; else if (strcmp(path + len - 4, ".bz2" ) == 0) diff --git a/libzio.changes b/libzio.changes index eed149e..a3ce51f 100644 --- a/libzio.changes +++ b/libzio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 16 14:39:11 CEST 2008 - werner@suse.de + +- Better documentation + ------------------------------------------------------------------- Wed Sep 24 17:51:53 CEST 2008 - werner@suse.de diff --git a/libzio.spec b/libzio.spec index c6628a4..b3abebe 100644 --- a/libzio.spec +++ b/libzio.spec @@ -30,7 +30,7 @@ License: GPL v2 or later Group: System/Libraries AutoReqProv: on Version: 0.9 -Release: 2 +Release: 3 Summary: A Library for Accessing Compressed Text Files BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: libzio-%{version}.tar.bz2 @@ -65,7 +65,7 @@ Authors: %prep %setup -q -#%patch +%patch %build make @@ -107,6 +107,8 @@ make DESTDIR=$RPM_BUILD_ROOT install libdir=%{_libdir} mandir=%{_mandir} /usr/include/zio.h %changelog +* Thu Oct 16 2008 werner@suse.de +- Better documentation * Wed Sep 24 2008 werner@suse.de - Be able to detect -lzma suffix * Wed Sep 24 2008 werner@suse.de