#! /usr/bin/perl -w

#*** Copyright 2002-2004 The Netsem Team
#
#    * Steve Bishop
#    * Michael Compton
#    * Matthew Fairbairn
#    * Michael Norrish
#    * Andrei Serjantov
#    * Peter Sewell
#    * Michael Smith
#    * Keith Wansbrough
#
#All rights reserved.
#
#This file is distributed under the terms of the GNU Lesser General
#Public License, with the special exception on linking described in
#file NEW-LICENSE.
#
#***

print("  switch(errno) {\n");
while(<>) {
  if(/#define\s+([A-Z0-9_]+)\s+/) {
    print "    case $1:\n      sprintf(str, \"$1\");\n      break;\n"
  }
}
print("  }");
