9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] aux/zerotrunc
@ 2003-06-26  8:18 Fco.J.Ballesteros, nemo
  2003-06-26 17:53 ` Sape Mullender
  0 siblings, 1 reply; 2+ messages in thread
From: Fco.J.Ballesteros, nemo @ 2003-06-26  8:18 UTC (permalink / raw)
  To: 9fans

Is aux/zerotrunc missing? I tried fossil/conf
and it calls aux/zerotrunc. But I couldnt find such program.

thanks




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] aux/zerotrunc
  2003-06-26  8:18 [9fans] aux/zerotrunc Fco.J.Ballesteros, nemo
@ 2003-06-26 17:53 ` Sape Mullender
  0 siblings, 0 replies; 2+ messages in thread
From: Sape Mullender @ 2003-06-26 17:53 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

> Is aux/zerotrunc missing? I tried fossil/conf
> and it calls aux/zerotrunc. But I couldnt find such program.

[-- Attachment #2: zerotrunc.c --]
[-- Type: text/plain, Size: 321 bytes --]

/*
 * cat standard input until you get a zero byte
 */

#include <u.h>
#include <libc.h>
#include <bio.h>

void
main(void)
{
	int c;
	Biobuf bin, bout;

	Binit(&bin, 0, OREAD);
	Binit(&bout, 1, OWRITE);
	while((c = Bgetc(&bin)) != Beof && c != 0){
		Bputc(&bout, c);
	}
	Bflush(&bout);
	exits(0);
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-26 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26  8:18 [9fans] aux/zerotrunc Fco.J.Ballesteros, nemo
2003-06-26 17:53 ` Sape Mullender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).