-/*
- * $Id: megatron.c,v 1.13 2009-10-14 02:24:04 didg Exp $
- */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/uio.h>
-#ifdef HAVE_FCNTL_H
#include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
#include <time.h>
#include <ctype.h>
#include <stdio.h>
}
}
-static int from_read(int un, int fork, char *buf, int len)
+static ssize_t from_read(int un, int fork, char *buf, size_t len)
{
switch ( un ) {
case MEGATRON :
}
}
-static int to_write(int to, int fork, int bufc)
+static ssize_t to_write(int to, int fork, size_t bufc)
{
switch ( to ) {
case MEGATRON :
{
struct stat st;
struct FHeader fh;
- int bufc;
+ ssize_t bufc;
int fork;
- unsigned int forkred;
+ size_t forkred;
/*
* If the source file is not stdin, make sure it exists and
*newname = '\0';
for ( c = 1 ; c < argc ; ++c ) {
+ if ( strcmp( argv [ c ], "--version" ) == 0 ) {
+ printf("%s (Netatalk %s megatron)\n", argv[0], VERSION);
+ return( -1 );
+ }
+ if ( strcmp( argv [ c ], "-v" ) == 0 ) {
+ printf("%s (Netatalk %s megatron)\n", argv[0], VERSION);
+ return( -1 );
+ }
if ( strcmp( argv [ c ], "--header" ) == 0 ) {
flags |= OPTION_HEADERONLY;
continue;
}
return( rv );
}
-