/* mailutil.h
   Copyright (C) 1995-1996 Eberhard Mattes

This file is part of GNU Emacs.

GNU Emacs 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, or (at your option)
any later version.

GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#define EX_OK           0
#define EX_USAGE        64
#define EX_NOUSER       67
#define EX_OSERR        71
#define EX_CANTCREAT    73
#define EX_IOERR        74
#define EX_TEMPFAIL     75

#define EX_NOMEM        100
#define EX_EOF          101
#define EX_MAILHOST     102
#define EX_POPERR       103


#define RL_CTRLZ_EOF    0x01


struct snode
{
  struct snode *next;
  char *str;
};

struct slist
{
  struct snode *first;
  struct snode **add;
};


void out_of_mem (void);
void *xmalloc (size_t size);
void slist_init (struct slist *list);
void slist_add (struct slist *list, const char *str);
int read_line (FILE *f, int flags, char **result);
