1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
From: Rob Browning <osiris@cs.utexas.edu>
To: Dirk Eddelbuettel <edd@rosebud.sps.queensu.ca>
Subject: Re: Debian specific patch for afio...
Date: 25 Apr 1997 17:47:15 -0500
Status: O
Content-Length: 1820
Lines: 57
Dirk Eddelbuettel <edd@rosebud.sps.queensu.ca> writes:
> That's okay. I simple change patchlevel.h as well. I already do something
> along those lines for the efax package.
>
> So send the patch along ...
OK, here it is. If you know anything about afio's source, and have
time, please take a look at it yourself to make sure I didn't miss
anything. I guess later something should be added to the --help info
and the man page about the option.
diff -ru afio-2.4.2.orig/afio.c afio-2.4.2/afio.c
--- afio-2.4.2.orig/afio.c Sun Jan 21 13:39:15 1996
+++ afio-2.4.2/afio.c Wed Apr 23 11:45:19 1997
@@ -112,6 +112,7 @@
STATIC short vflag; /* Verbose */
STATIC short xflag; /* Retain file ownership */
STATIC short zflag; /* Print final statistics */
+ STATIC short nullflag; /* null instead of \n for path separators */
STATIC short hidequit; /* show the quit option? */
STATIC short abspaths; /* allow absolute path names? */
STATIC uint arbsize = BLOCK; /* Archive block size */
@@ -175,7 +176,7 @@
/* ignore SIGPIPE to deal with gzip -d exiting prematurely */
VOID signal (SIGPIPE, SIG_IGN);
while (c = options (ac, av,
- "aioprtIOVCb:c:de:fghjklmns:uvxXy:Y:zFKZL:R:qAE:G:M:w:W:T:SBD:P:Q:U")
+ "0aioprtIOVCb:c:de:fghjklmns:uvxXy:Y:zFKZL:R:qAE:G:M:w:W:T:SBD:P:Q:U")
)
{
switch (c)
@@ -382,6 +383,9 @@
case 'U': /* compress All files */
forceZflag=1;
break;
+ case '0':
+ nullflag=1;
+ break;
default:
usage ();
@@ -1454,12 +1458,13 @@
reg char *buf;
{
reg int c;
+ char terminator = nullflag ? '\0' : '\n';
for (;;)
{
if ((c = getc (stream)) == EOF)
return (-1);
- if (c == '\n')
+ if (c == terminator)
break;
*buf++ = c;
}
|