/*
 *
 * Copyright (C) 1993 Swedish University Network (SUNET)
 *
 *
 * This program is developed by UDAC, Uppsala University by commission
 * of the Swedish University Network (SUNET). 
 * 
 * This program 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 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITTNESS 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 this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *
 *                                          Martin.Wendel@udac.uu.se
 *
 *                                          Martin Wendel
 *                                          UDAC	
 *                                          Box 174
 *                                          S-751 04 Uppsala
 *                                          Sweden
 */





#ifdef __STDC__
void * xalloc __P((int));
#else
char * xalloc __P((int));
#endif

/* Functions to convert input format */
int fromquotedp __P((MessageStruct *, BufStruct *));
int frombase64 __P((MessageStruct *, BufStruct *));
int frombinhex __P((MessageStruct *, BufStruct *));
int fromuuencode __P((MessageStruct *, BufStruct *));
int toquotedp __P((MessageStruct *, BufStruct *));
int tobase64 __P((MessageStruct *, BufStruct *));
int tocharset __P((MessageStruct *, BufStruct *));
int to7bit __P((MessageStruct *, BufStruct *));
int tobinhex __P((MessageStruct *, BufStruct *));
int touuencode __P((MessageStruct *, BufStruct *));
int textcheck __P((MessageStruct *, BufStruct *));
int get_binhex_namelen __P((MessageStruct *, BufStruct *));
int get_binhex_name __P((MessageStruct *, BufStruct *));
int get_binhex_type __P((MessageStruct *, BufStruct *));
int get_binhex_auth __P((MessageStruct *, BufStruct *));
int get_binhex_flag __P((MessageStruct *, BufStruct *));
int get_binhex_dlen __P((MessageStruct *, BufStruct *));
int get_binhex_rlen __P((MessageStruct *, BufStruct *));
int get_binhex_hcrc __P((MessageStruct *, BufStruct *));
int get_binhex_datafork __P((MessageStruct *, BufStruct *));
int get_binhex_dcrc __P((MessageStruct *, BufStruct *));
int get_binhex_resourcefork __P((MessageStruct *, BufStruct *));
int get_binhex_rcrc __P((MessageStruct *, BufStruct *));
int get_applefile_type __P((MessageStruct *, BufStruct *));
int nullfunc __P((MessageStruct *, BufStruct *));

/* Functions to bind with Tcl commands */
int Mk_ToCharset __P((ClientData , Tcl_Interp *, int, char **));
int Mk_SetFromCharset __P((ClientData , Tcl_Interp *, int, char **));
int Mk_SetFromEsc __P((ClientData , Tcl_Interp *, int, char **));
int Mk_To7Bit __P((ClientData, Tcl_Interp *, int, char **));
int Mk_Debug __P((ClientData, Tcl_Interp *, int, char **));
int Mk_Getheader __P((ClientData , Tcl_Interp *, int, char **));
int Mk_Tcl __P(());
int Mk_NextMessNode __P((ClientData, Tcl_Interp *, int, char **));
int Mk_InsertMessNode __P((ClientData, Tcl_Interp *, int, char **));
int Mk_TopMessNode __P((ClientData, Tcl_Interp *, int, char **));
int Mk_ListHeaders __P((ClientData, Tcl_Interp *, int, char **));
int Mk_AddHeader __P((ClientData, Tcl_Interp *, int, char **));
int Mk_AddSpecHeader __P((ClientData, Tcl_Interp *, int, char **));
int Mk_RmHeader __P((ClientData, Tcl_Interp *, int, char **));
int Mk_RmSpecHeader __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetEncoding __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetEncoding __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetSubType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetSubType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_Encoding __P((ClientData, Tcl_Interp *, int, char **));
int Mk_Decoding __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetCheck __P((ClientData, Tcl_Interp *, int, char **));
int Mk_AddBoundary __P((ClientData, Tcl_Interp *, int, char **));
int Mk_AddEndBoundary __P((ClientData, Tcl_Interp *, int, char **));
int Mk_MakeBoundary __P((ClientData, Tcl_Interp *, int, char **));
int Mk_PutEndBoundary __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetFilename __P((ClientData, Tcl_Interp *, int, char **));
int Mk_JoinExtension __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetBinHexType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetBinHexAuth __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetFilename __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetBinHexType __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetBinHexAuth __P((ClientData, Tcl_Interp *, int, char **));
int Mk_IsSet __P((ClientData, Tcl_Interp *, int, char **));
int Mk_IsRoot __P((ClientData, Tcl_Interp *, int, char **));
int Mk_IsMulti __P((ClientData, Tcl_Interp *, int, char **));
int Mk_DoSubHeaders __P((ClientData, Tcl_Interp *, int, char **));
int Mk_DoTunnel __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetHighChars __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetExtension  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetExtension  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_HasBody  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_KillBody  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_SetMainType  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_GetMainType  __P((ClientData, Tcl_Interp *, int, char **));
int Mk_KnowFromCharset  __P((ClientData, Tcl_Interp *, int, char **));


