/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1992-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
*/
static const char usage[] =
"[-?\n@(#)$Id: uudecode (AT&T Research) 2002-03-24 $\n]"
"[+NAME?uudecode - decode a uuencoded binary file]"
"[+DESCRIPTION?\buudecode\b decodes the named input \afile\a"
" or the standard input if no file is specified, to the file"
" name encoded in \afile\a by \buuencode\b. If \adecode-file\a is"
" specified then the output is written there. \b-\b is equivalent"
" to the standard output.]"
"[c:local?Convert pathnames to file names in the local directory.]"
"[h!:header?The input file contains header and trailer sequences."
" The header for some encoding formats may contain file name and"
" access infomation.]"
"[l:list?List the encoding method names on the standard output.]"
"[o:output?Write the output data into \afile\a instead of the standard"
" output. \adecode-file\a if specified overrides \b--output\b.]:[file]"
"[t:text?The input file is a text file that requires \\n => \\r\\n translation"
" on encoding.]"
"[x:method?Specifies the encoding \amethod\a. Some encoding methods self"
" identify and for those \b--method\b is optional.]:[method]{\fmethods\f}"
"[m?Equivalent to \b--method=mime\b.]"
"[q?Equivalent to \b--method=quoted-printable\b.]"
"[u?Equivalent to \b--method=uuencode\b.]"
"\n"
"\n[ file [ decode-file ] ]\n"
"\n"
"[+SEE ALSO?\bmailx\b(1), \buuencode\b(1)]"
;
#include <ast.h>
#include <uu.h>
#include <error.h>
#include <option.h>
static int
{
switch (*s)
{
case 'm':
break;
}
return 0;
}
int
{
char* encoding;
char* ipath;
char* opath;
encoding = 0;
for (;;)
{
{
case 'm':
case 'q':
case 'u':
buf[1] = 0;
continue;
case 'c':
continue;
case 'h':
continue;
case 'l':
exit(0);
case 'o':
continue;
case 't':
continue;
case 'x':
{
exit(0);
}
continue;
case ':':
continue;
case '?':
continue;
}
break;
}
{
if (!ipath)
op = 0;
}
return error_info.errors != 0;
}