/*
** paterr.c for  in 
** 
** Made by 
** Login   <vianney@epita.fr>
** 
** Started on  Wed Sep  1 06:40:19 1999 
** Last update Thu Oct 28 20:19:16 1999 
*/
#include "paterr.h"

char		*err_pat_list[] = 
{
  "Error 0",					/* 0 */
  "Bad address",
  "Bad format",
  "Bad header",
  "Bad length",
  "Bad match",					/* 5 */
  "Bad string-zero",
  "Bad ASCII vector",
  "Can't handle",
  "Channel is in use",
  "Netmask contains holes",			/* 10 */
  "Invalid argument",
  "Malformed",	
  "Need more arguments",
  "Not implemented",
  "No choice",					/* 15 */
  "No entry",	
  "Open error",	
  "Read error",	
  "Too big",					
  "Truncated pattern",				/* 20 */
  "Unresolvable",
  "Zero length or exact match",
  "No such field",	
  "Write error",
  "Syscall error",				/* 25 */	
  "Loop, e.g zero length offset",
  "Not enough room",			
  "Bad family",				
  "No method name",
  "No method off",				/* 30 */
  "No method sub",
  "No method sum",
  "No method get field",
  "No method set field",
  "No method get fields",			/* 35 */
  "No method get tmpl",
  "No method has opt",
  "No method adapt len",
  "No method get field pat",
  "No method extract",				/* 40 */
  "No method insert",
  "No method get choices",
  "Exact match",
  "Null data",
  "Option doesn't match",			/* 45 */
  "Protocol error in pktio stuff",
  "Break",		
  "Truncated field",
  "Truncated file",
};

t_status	err_pat_init(VOID_DECL)
{
  t_status	status;
  int		i;

  assert(err_id);
  i = 0;
  while (i < ARRAY_COUNT(err_pat_list))
    {
      if ((status = id_add(err_id,
			   (VOID_PTR)(ERR_PAT_START + i),
			   err_pat_list[i])) != 0)
	return (status);
      i++;
    }
  return (0);
}	
