we do not need percent_m.c
This commit is contained in:
parent
5bffc0a5e9
commit
698a54ea72
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 1996/11/26 16:48:09 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.2 1996/11/28 04:32:32 mrg Exp $
|
||||
|
||||
LIB= wrap
|
||||
|
||||
SRCS= hosts_access.c options.c shell_cmd.c rfc931.c eval.c hosts_ctl.c \
|
||||
refuse.c percent_x.c clean_exit.c fix_options.c socket.c \
|
||||
workarounds.c update.c misc.c diag.c percent_m.c
|
||||
workarounds.c update.c misc.c diag.c
|
||||
MAN= hosts_access.3 hosts_access.5 hosts_options.5
|
||||
|
||||
CFLAGS+= -DFACILITY=LOG_AUTHPRIV -DSEVERITY=LOG_INFO -DPARANOID
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# $NetBSD: libwrap2netbsd,v 1.1.1.1 1996/11/26 16:48:09 mrg Exp $
|
||||
# $NetBSD: libwrap2netbsd,v 1.2 1996/11/28 04:32:33 mrg Exp $
|
||||
#
|
||||
# Copyright (c) 1996 Matthew R. Green
|
||||
# All rights reserved.
|
||||
|
@ -50,7 +50,7 @@ echo copying tree from $r into $d
|
|||
cd $r
|
||||
src='hosts_access.c options.c shell_cmd.c rfc931.c eval.c hosts_ctl.c
|
||||
refuse.c percent_x.c clean_exit.c fix_options.c socket.c workarounds.c
|
||||
update.c misc.c diag.c percent_m.c'
|
||||
update.c misc.c diag.c'
|
||||
man='hosts_access.3 hosts_access.5 hosts_options.5'
|
||||
inc='tcpd.h mystdarg.h'
|
||||
misc='DISCLAIMER'
|
||||
|
@ -60,13 +60,13 @@ cd $d
|
|||
|
||||
echo creating Makefile
|
||||
cat > Makefile<<'__eof_makefile'
|
||||
# $NetBSD: libwrap2netbsd,v 1.1.1.1 1996/11/26 16:48:09 mrg Exp $
|
||||
# $NetBSD: libwrap2netbsd,v 1.2 1996/11/28 04:32:33 mrg Exp $
|
||||
|
||||
LIB= wrap
|
||||
|
||||
SRCS= hosts_access.c options.c shell_cmd.c rfc931.c eval.c hosts_ctl.c \
|
||||
refuse.c percent_x.c clean_exit.c fix_options.c socket.c \
|
||||
workarounds.c update.c misc.c diag.c percent_m.c
|
||||
workarounds.c update.c misc.c diag.c
|
||||
MAN= hosts_access.3 hosts_access.5 hosts_options.5
|
||||
|
||||
CFLAGS+= -DFACILITY=LOG_AUTHPRIV -DSEVERITY=LOG_INFO -DPARANOID
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Replace %m by system error message.
|
||||
*
|
||||
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#) percent_m.c 1.1 94/12/28 17:42:37";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
extern int errno;
|
||||
#ifndef SYS_ERRLIST_DEFINED
|
||||
extern char *sys_errlist[];
|
||||
extern int sys_nerr;
|
||||
#endif
|
||||
|
||||
#include "mystdarg.h"
|
||||
|
||||
char *percent_m(obuf, ibuf)
|
||||
char *obuf;
|
||||
char *ibuf;
|
||||
{
|
||||
char *bp = obuf;
|
||||
char *cp = ibuf;
|
||||
|
||||
while (*bp = *cp)
|
||||
if (*cp == '%' && cp[1] == 'm') {
|
||||
if (errno < sys_nerr && errno > 0) {
|
||||
strcpy(bp, sys_errlist[errno]);
|
||||
} else {
|
||||
sprintf(bp, "Unknown error %d", errno);
|
||||
}
|
||||
bp += strlen(bp);
|
||||
cp += 2;
|
||||
} else {
|
||||
bp++, cp++;
|
||||
}
|
||||
return (obuf);
|
||||
}
|
Loading…
Reference in New Issue