--- cpipe-3.0.1.orig/cmdline.c +++ cpipe-3.0.1/cmdline.c @@ -3,7 +3,7 @@ (http://wsd.iitb.fhg.de/~kir/clighome/) The command line parser `clig': - (C) 1995---2001 Harald Kirsch (kirschh@lionbioscience.com) + (C) 1995-2004 Harald Kirsch (clig@geggus.net) *****/ #include @@ -39,6 +39,10 @@ /* speedP = */ 0, /* speed = */ (double)0, /* speedC = */ 0, + /***** -p: optional prefix to each printed line */ + /* prefixP = */ 0, + /* prefix = */ (char*)0, + /* prefixC = */ 0, /***** uninterpreted rest of command line */ /* argc = */ 0, /* argv = */ (char**)0 @@ -253,7 +257,7 @@ for a bit more values than cmax. *****/ alloced = cmin + 4; - *values = calloc((size_t)alloced, sizeof(long)); + *values = (long int *)calloc((size_t)alloced, sizeof(long)); if( ! *values ) { outMem: fprintf(stderr, @@ -265,7 +269,7 @@ for(used=0; (cmax==-1 || usedprefixP ) { + char *buf = malloc(strlen(cmd->prefix)+2); + sprintf(buf, "%s ", cmd->prefix); + cmd->prefix = buf; + } + else { + cmd->prefix = ""; + } + buf = malloc(cmd->bsize); if( !buf ) { fprintf(stderr, @@ -259,7 +268,8 @@ if( cmd->vtP ) { fprintf(stderr, - "thru: %7.3fms at %7sB/s (%7sB/s avg) %7sB\n", + "%sthru: %7.3fms at %7sB/s (%7sB/s avg) %7sB\n", + cmd->prefix, 1e3*dt, scale((double)count/dt, txt1), scale(TotalBytes/dtAll, txt2), --- cpipe-3.0.1.orig/debian/changelog +++ cpipe-3.0.1/debian/changelog @@ -0,0 +1,44 @@ +cpipe (3.0.1-2) unstable; urgency=low + + * Full migration to dh (closes: #931152) + * Fix linker command line to work with gold (closes: #611333) + * Added more details to description (closes: #493598) + * Optional printing of a prefix word (closes: #407559) + + -- Eduard Bloch Tue, 09 Jul 2019 23:31:24 +0200 + +cpipe (3.0.1-1) unstable; urgency=low + + * New upstream release + * Overall package update (policy, makefile fixes) + * Dropped the clig Build-Dependency, stopped updating the parser source + * simple format string warning fix for amd64 + + -- Eduard Bloch Sun, 05 Aug 2007 18:59:40 +0200 + +cpipe (3.0.0-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix build failure with make 3.81+. Thanks to Matt Kraai for the patch. + Closes: #355075. + + -- Matej Vela Fri, 10 Mar 2006 14:32:38 +0100 + +cpipe (3.0.0-2) unstable; urgency=low + + * Added missing -lm to the linker call, closes: #172038 + + -- Eduard Bloch Sat, 7 Dec 2002 01:51:58 +0100 + +cpipe (3.0.0-1) unstable; urgency=low + + * New upstream release + + -- Eduard Bloch Tue, 3 Dec 2002 22:22:01 +0100 + +cpipe (2.0.0-1) unstable; urgency=low + + * Initial Release. + + -- Eduard Bloch Sun, 7 Jul 2002 22:19:22 +0200 + --- cpipe-3.0.1.orig/debian/compat +++ cpipe-3.0.1/debian/compat @@ -0,0 +1 @@ +10 --- cpipe-3.0.1.orig/debian/control +++ cpipe-3.0.1/debian/control @@ -0,0 +1,18 @@ +Source: cpipe +Section: utils +Priority: optional +Maintainer: Eduard Bloch +Build-Depends: debhelper (>= 10) +Standards-Version: 4.3.0 + +Package: cpipe +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: data pipe forwarding utility for performance monitoring + Cpipe copies its standard input to its standard output while measuring the + time it takes to read an input buffer and write an output buffer. Statistics + of average throughput and the total amount of bytes copied are printed to the + standard error output. + . + Cpipe can also be used as alternative to the buffer utility for simple + usecases. --- cpipe-3.0.1.orig/debian/copyright +++ cpipe-3.0.1/debian/copyright @@ -0,0 +1,11 @@ +This package was debianized by Eduard Bloch on +Sun, 7 Jul 2002 22:19:22 +0200. + +It was downloaded from http://cpipe.berlios.de + +Upstream Author: Harald Kirsch (kirschh@lionbioscience.com) + +Copyright: + +It may be redistributed under the terms of the GNU GPL, Version 2 +found on Debian systems in the file /usr/share/common-licenses/GPL . --- cpipe-3.0.1.orig/debian/dirs +++ cpipe-3.0.1/debian/dirs @@ -0,0 +1 @@ +usr/bin --- cpipe-3.0.1.orig/debian/docs +++ cpipe-3.0.1/debian/docs @@ -0,0 +1 @@ +README --- cpipe-3.0.1.orig/debian/rules +++ cpipe-3.0.1/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +#LDFLAGS += --as-needed +#CFLAGS += -Wl,--as-needed + +%: + dh $@ + +override_dh_auto_install: + $(MAKE) install BINDIR=$(CURDIR)/debian/cpipe/usr/bin MANDIR=$(CURDIR)/debian/cpipe/usr/share/man/man1 + --- cpipe-3.0.1.orig/debian/source/format +++ cpipe-3.0.1/debian/source/format @@ -0,0 +1 @@ +1.0 --- cpipe-3.0.1.orig/makefile +++ cpipe-3.0.1/makefile @@ -15,29 +15,18 @@ MANDIR=$(prefix)/man/man1 ## Your favorite compiler flags. -CFLAGS = -O2 -W -Wall -pedantic +#CFLAGS ?= -O2 -W -Wall -pedantic ######################################################################## cpipe: cpipe.o cmdline.o - $(CC) -lm -o $@ cpipe.o cmdline.o + $(CC) $(LDFLAGS) -o $@ cpipe.o cmdline.o -lm cpipe.o: cpipe.c cmdline.h cmdline.o: cmdline.c cmdline.h - -cmdline.c cmdline.h cpipe.1: cmdline.cli - @ (echo "clig cmdline.cli"; clig cmdline.cli) || {\ - echo "*****"; \ - echo "Get clig at http://wsd.iitb.fhg.de/~kir/clighome"; \ - echo "or use cmdline.c, cmdline.h and cpipe.1 as they come"; \ - echo "in the distribution by touching them."; \ - echo "*****"; \ - exit 1; \ - } - clean: - rm cmdline.o cpipe.o cpipe + -rm cmdline.o cpipe.o cpipe install: cpipe cpipe.1