CFLAGS = -O2 -g -pedantic -Wall -DVERSION=\"$(VERSION)\"
LINK = $(LD) $(LDFLAGS) -o $@ $^
-INST =
+INST =
prefix = /usr/local
bindir = $(prefix)/bin
sbindir = $(prefix)/sbin
# routine, although the interface is rather different, since it
# takes advantage of some of Perl's object-oriented features.
#
-#
+#
# How options parsing appears to users
#
# A command line consists of a number of `words' (which may
# permute Force permuting of the argument list
# inorder Read options in order
# posix Force use of POSIX option semantics
-# quiet Don't report errors when they happen
+# quiet Don't report errors when they happen
sub new
{
($opt,$self->{this})=(substr($self->{this},0,1),substr($self->{this},1));
$prefix=($self->{flags}{_neg} ? '+' : '-');
-
+
if ($self->{short} =~ /\Q$opt/ &&
(!$self->{flags}{_neg} || substr($',0,1) eq '+'))
{
return ('?',$self->err("option `$prefix$opt' requires an argument"))
unless defined($arg);
}
- }
+ }
$opt.='+' if $self->{flags}{_neg};
return ($opt,$arg);
.SH DESCRIPTION
The
.B buf
-program writes standard input to a temporary file. It then runs
+program writes standard input to a temporary file. It then runs
.VS
.IR "command arguments " ... " stdinfile"
.VE
ego = r_sub(r'^.*[/\\]', '', argv[0])
def die(msg, prefix = True):
- if prefix: msg ='%s: %s' % (ego, msg)
+ if prefix: msg ='%s: %s' % (ego, msg)
print >>stderr, msg
exit(1)
else:
for a in args:
if a == '-':
- yield stdin
+ yield stdin
else:
- yield open(a, 'r')
+ yield open(a, 'r')
if len(argv) < 2:
die('usage: %s CDB [INPUT ...]' % ego, False)
ego = r_sub(r'^.*[/\\]', '', argv[0])
def die(msg, prefix = True):
- if prefix: msg ='%s: %s' % (ego, msg)
+ if prefix: msg ='%s: %s' % (ego, msg)
print >>stderr, msg
exit(1)
else:
for a in args:
if a == '-':
- yield stdin
+ yield stdin
else:
- yield open(a, 'r')
+ yield open(a, 'r')
if len(argv) < 2:
die('usage: %s CDB [INPUT ...]' % ego, False)
.I line
causes an entry to be inserted into the BDB, whose key is
.I line
-with leading and trailing spaces stripped, and whose value is empty.
+with leading and trailing spaces stripped, and whose value is empty.
.PP
The CDB file is written to
.IB cdb .new
ego = r_sub(r'^.*[/\\]', '', argv[0])
def die(msg, prefix = True):
- if prefix: msg ='%s: %s' % (ego, msg)
+ if prefix: msg ='%s: %s' % (ego, msg)
print >>stderr, msg
exit(1)
else:
for a in args:
if a == '-':
- yield stdin
+ yield stdin
else:
- yield open(a, 'r')
+ yield open(a, 'r')
if len(argv) < 2:
die('usage: %s CDB [INPUT ...]' % ego, False)
.B .qmail
file)
.br
-.B |check-sender
+.B |check-sender
.BI < cdb
.SH DESCRIPTION
If the domain part of the email address in the
* Fix splitconf documentation to be right.
* Fix gorp to produce base32 (ugh!) and safe64 output.
- -- Mark Wooding <mdw@nsict.org> Sat, 5 Feb 2005 10:39:52 +0000
+ -- Mark Wooding <mdw@nsict.org> Sat, 5 Feb 2005 10:39:52 +0000
nsict-utils (1.1.0) experimental; urgency=low
-- Mark Wooding <mdw@nsict.org> Tue, 18 Nov 2003 18:47:21 +0000
nsict-utils (1.0) experimental; urgency=low
-
+
* Debianization!
-
+
-- Mark Wooding <mdw@nsict.org> Tue, 18 Nov 2003 13:48:03 +0000
done <debian/inst
mkdir -p debian/nsict-utils
-binary-indep:
+binary-indep:
dh_testdir -i
dh_testroot -i
dh_compress -i
d=`pwd`; cd ..; dpkg-source -i -b $$d/=inst=/=deb=/*
rm -rf =inst=
-.PHONY: binary binary-arch binary-indep clean install source
+.PHONY: binary binary-arch binary-indep clean install source
.IR format ,
which may be
.B base64
-(standard Base64 encoding, as described in RFC2045; this is the default),
+(standard Base64 encoding, as described in RFC2045; this is the default),
.B file64
(Base64 encoding, with
.RB ` % '
}
if (fix) fix(d.buf, d.len);
DPUTC(&d, '\n');
- DWRITE(&d, stdout);
+ DWRITE(&d, stdout);
}
static void do_base64(void *ctx, char *p, size_t sz, dstr *d)
}
static void format_base64(size_t n, unsigned line)
{ do_format_base64(n, line, 0); }
-
+
static void do_base32(void *ctx, char *p, size_t sz, dstr *d)
{ base32_encode(ctx, p, sz, d); }
static void format_base32(size_t n, unsigned line)
and redirecting standard output to
.IR file \c
.BR .new .
-If all these programs are successful, then each
+If all these programs are successful, then each
.I file
is copied to
.IB file .old
.IR file ;
the
.IB file .old
-files are then deleted. If something went wrong, the
+files are then deleted. If something went wrong, the
.IB file .new
files are all deleted and the original
.IR file s
* (c) 2003 Mark Wooding
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of the Toys utilties collection.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* Toys 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 Toys; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* (c) 1999 Mark Wooding
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Pause.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later ersion.
- *
+ *
* Pause 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 Pause; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
case 'h': t *= 60;
case 'm': t *= 60;
case 's': if (q[1] != 0)
- default: t = 0;
+ default: t = 0;
case 0: break;
}
if (t <= 0)
* (c) 2003 Mark Wooding
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program 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 this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
# --- Move the old file out of the way ---
-
+
!-e $file or rename("${file}", "${file}-") or do {
unlink "${file}.lock";
unlink "${file}.edit";
$#f = 3;
$a = { data => [ @f ],
members => { hashify(split /,/, $f[3]) },
- name => $f[0], gid => $f[2] };
+ name => $f[0], gid => $f[2] };
$gbynam{$a->{name}} = $gbygid{$a->{gid}} = $a;
}
$gr->close;
# --- Check that the group's administrators exist ---
if ($sg->{data}[2] ne "" && !$suyb) {
- my @admins =
+ my @admins =
my $admin;
foreach $admin (split(/,/, $sg->{data}[2])) {
exists $ubynam{$admin} or
.BR stamp .
.TP
.BI "\-f, \-\-format=" format
-Use
+Use
.I format
-as the
+as the
.BR strftime (3)
format string for the datestamps. Note that if the datestamp is meant
to be separated from the rest of the line by anything, then that
}
return ((f & F_BOGUS) ? EXIT_FAILURE : 0);
-}
+}
owner, group and permissions (as set by the current euid, egid and umask
settings).
.PP
-It doesn't leave file extensions on the decompressed files.
+It doesn't leave file extensions on the decompressed files.
.SH AUTHOR
Mark Wooding <mdw@distorted.org.uk>