home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
uupc.lzh
/
uupc
/
l_host.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-16
|
1KB
|
83 lines
/*
* host.c
*
* Amiga front-end for the mailer-type packages. #define MAIN to
* be the routine you want to call when this code is run. This
* module allows you to use longjmp( &dcpexit ) to return to main()
* and it sets up the environment and such for you.
*
* $Id: l_host.c,v 1.2 90/01/16 10:26:18 crash Exp Locker: crash $
*/
#include <stdio.h>
#include "l_host.h"
#ifndef _U
# include <ctype.h>
#endif
#include <setjmp.h>
#ifndef EACCES
# include <errno.h>
#endif
static char *curdir;
char *getcwd();
int chdir();
int debuglevel; /* debugging level */
jmp_buf dcpexit;
main( argc, argv )
int argc;
char *argv[];
{
int ret = 0;
/* Amiga specific prolog */
loadenv();
curdir = getcwd( NULL, 0 );
#ifdef CWDSPOOL
chdir( spooldir );
#endif
/* setup longjmp for error exit's */
if ( setjmp( dcpexit ) == 0 )
ret = MAIN( argc, argv );
/* Amiga specific epilog */
exitenv();
chdir( curdir );
exit( ret );
}
/* canonical name conversio routines
*
* inportpath canonical -> host
* exportpath host -> canonical
*
* host your local pathname format
* canonical unix style
*/
importpath( host, canon )
register char *host;
char *canon;
{
strcpy( host, canon );
if ( *host == '/' )
*host = ':';
}
exportpath( canon, host )
char *host;
register char *canon;
{
strcpy( canon, host );
if ( *canon == ':' )
*canon = '/';
}