From 371472d9fb6a936149b105a6563a0550d35bdf1a Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Mon, 1 Dec 2003 17:11:15 +0000 Subject: Initial import of upstream branch Initial import of upstream branch git-archimport-id: srivasta@debian.org--2003-primary/dist--upstream--3.70--base-0 --- lib/errnolist.a | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/errnolist.a (limited to 'lib/errnolist.a') diff --git a/lib/errnolist.a b/lib/errnolist.a new file mode 100644 index 0000000..a548a11 --- /dev/null +++ b/lib/errnolist.a @@ -0,0 +1,52 @@ +# $Id: errnolist.a,v 3.0 1993/08/18 12:04:35 ram Exp $ +# +# Copyright (c) 1991-1993, Raphael Manfredi +# +# You may redistribute only under the terms of the Artistic Licence, +# as specified in the README file that comes with the distribution. +# You may reuse parts of this distribution only within the terms of +# that same Artistic Licence; a copy of which may be found at the root +# of the source tree for dist 3.0. +# +# Original Author: Harlan Stenn +# +# $Log: errnolist.a,v $ +# Revision 3.0 1993/08/18 12:04:35 ram +# Baseline for dist 3.0 netwide release. +# +# +# This is a simple-minded awk script to generate an initialization for +# sys_errnolist on systems that don't have it. +# This file now depends only on sys/errno.h error numbers under maxerr being +# in order. It will complain and die if not. NOTE: It will still produce +# a compilable output file, even with errors, so you must check the output. + + +BEGIN { + format = "\t\"%s\",\n" + printf("/*\n** This is a generated file. Do NOT edit it unless you really have to...\n*/\n\n") + printf("char *sys_errnolist[] = {\n") + maxerr = 89 + } + +$1=="#define" { + if(count > maxerr || substr($2,1,1) != "E") + next # we're not interested + if($3 < count) { # this is bad + printf("Fatal error: %s out of order at %s\n",\ + FILENAME, $2)>"/dev/tty" + exit 1 + } + # fill in the blanks + while($3 > count) { + dummy=sprintf("EDUMMY%d",count) + printf(format,dummy) + count++ + } + printf(format,$2) + count++ + } + +END { + printf("\t0\n};\n") + } -- cgit v1.2.3