aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-06-21 11:13:28 -0700
committerElliott Hughes <enh@google.com>2017-06-30 10:19:14 -0700
commit28a3c4af57183ff4030869a8b81cfe87c77812c0 (patch)
treefee624b858274d79c0c88c01a987deedfdea9a1c /src
parentc06febc81bf00ad5be3216e060f8ef69dab9c14c (diff)
downloadlibgsm-28a3c4af57183ff4030869a8b81cfe87c77812c0.tar.gz
Update libgsm to patchlevel 16.
No real changes to the files we use. (Seems like contrary to README.version we were already past patchlevel 13). Also stop suppressing warnings about undefined behavior. Lying to ourselves doesn't seem useful. Bug: N/A Test: builds Change-Id: I9090720f6902e38a769405200700330951756b07
Diffstat (limited to 'src')
-rw-r--r--src/toast.c800
-rw-r--r--src/toast_alaw.c334
-rw-r--r--src/toast_audio.c113
-rw-r--r--src/toast_lin.c24
-rw-r--r--src/toast_ulaw.c621
5 files changed, 1892 insertions, 0 deletions
diff --git a/src/toast.c b/src/toast.c
new file mode 100644
index 0000000..9823642
--- /dev/null
+++ b/src/toast.c
@@ -0,0 +1,800 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast.c,v 1.8 1996/07/02 10:41:04 jutta Exp $ */
+
+#include "toast.h"
+
+/* toast -- lossy sound compression using the gsm library.
+ */
+
+char * progname;
+
+int f_decode = 0; /* decode rather than encode (-d) */
+int f_cat = 0; /* write to stdout; implies -p (-c) */
+int f_force = 0; /* don't ask about replacements (-f) */
+int f_precious = 0; /* avoid deletion of original (-p) */
+int f_fast = 0; /* use faster fpt algorithm (-F) */
+int f_verbose = 0; /* debugging (-V) */
+int f_ltp_cut = 0; /* LTP cut-off margin (-C) */
+
+struct stat instat; /* stat (inname) */
+
+FILE *in, *out;
+char *inname, *outname;
+
+/*
+ * The function (*output)() writes a frame of 160 samples given as
+ * 160 signed 16 bit values (gsm_signals) to <out>.
+ * The function (*input)() reads one such frame from <in>.
+ * The function (*init_output)() begins output (e.g. writes a header).,
+ * The function (*init_input)() begins input (e.g. skips a header).
+ *
+ * There are different versions of input, output, init_input and init_output
+ * for different formats understood by toast; which ones are used
+ * depends on the command line arguments and, in their absence, the
+ * filename; the fallback is #defined in toast.h
+ *
+ * The specific implementations of input, output, init_input and init_output
+ * for a format `foo' live in toast_foo.c.
+ */
+
+int (*output ) P((gsm_signal *)),
+ (*input ) P((gsm_signal *));
+int (*init_input) P((void)),
+ (*init_output) P((void));
+
+static int generic_init P0() { return 0; } /* NOP */
+
+struct fmtdesc {
+
+ char * name, * longname, * suffix;
+
+ int (* init_input ) P((void)),
+ (* init_output) P((void));
+
+ int (* input ) P((gsm_signal * )),
+ (* output) P((gsm_signal * ));
+
+} f_audio = {
+ "audio",
+ "8 kHz, 8 bit u-law encoding with Sun audio header", ".au",
+ audio_init_input,
+ audio_init_output,
+ ulaw_input,
+ ulaw_output
+}, f_ulaw = {
+ "u-law", "plain 8 kHz, 8 bit u-law encoding", ".u",
+ generic_init,
+ generic_init,
+ ulaw_input,
+ ulaw_output
+
+}, f_alaw = {
+ "A-law", "8 kHz, 8 bit A-law encoding", ".A",
+ generic_init,
+ generic_init,
+ alaw_input,
+ alaw_output
+
+}, f_linear = {
+ "linear",
+ "16 bit (13 significant) signed 8 kHz signal", ".l",
+ generic_init,
+ generic_init,
+ linear_input,
+ linear_output
+};
+
+struct fmtdesc * alldescs[] = {
+ &f_audio,
+ &f_alaw,
+ &f_ulaw,
+ &f_linear,
+ (struct fmtdesc *)NULL
+};
+
+#define DEFAULT_FORMAT f_ulaw /* default audio format, others */
+ /* are: f_alaw,f_audio,f_linear */
+struct fmtdesc * f_format = 0;
+
+/*
+ * basename + suffix of a pathname
+ */
+static char * endname P1((name), char * name)
+{
+ if (name) {
+ char * s = strrchr(name, '/');
+ if (s && s[1]) name = s + 1;
+ }
+ return name;
+
+}
+
+/*
+ * Try to figure out what we're supposed to do from the argv[0], if
+ * any, and set the parameters accordingly.
+ */
+static void parse_argv0 P1((av0), char * av0 )
+{
+ int l;
+
+ progname = av0 = endname(av0 ? av0 : "toast");
+
+ /* If the name starts with `un', we want to decode, not code.
+ * If the name ends in `cat', we want to write to stdout,
+ * and decode as well.
+ */
+
+ if (!strncmp(av0, "un", 2)) f_decode = 1;
+ if ( (l = strlen(av0)) >= 3 /* strlen("cat") */
+ && !strcmp( av0 + l - 3, "cat" )) f_cat = f_decode = 1;
+}
+
+
+/*
+ * Check whether the name (possibly generated by appending
+ * .gsm to something else) is short enough for this system.
+ */
+static int length_okay P1((name), char * name)
+{
+ long max_filename_length = 0;
+ char * end;
+
+ /* If our _pathname_ is too long, we'll usually not be
+ * able to open the file at all -- don't worry about that.
+ *
+ * But if the _filename_ is too long, there is danger of
+ * silent truncation on some systems, which results
+ * in the target replacing the source!
+ */
+
+ if (!name) return 0;
+ end = endname(name);
+
+#ifdef NAME_MAX
+ max_filename_length = NAME_MAX;
+#else
+#ifdef _PC_NAME_MAX
+#ifdef USE_PATHCONF
+ { char * s, tmp;
+
+ /* s = dirname(name)
+ */
+ if ((s = end) > name) {
+ if (s > name + 1) s--;
+ tmp = s;
+ *s = 0;
+ }
+
+ errno = 0;
+ max_filename_length = pathconf(s > name ? name : ".",
+ _PC_NAME_MAX);
+ if (max_filename_length == -1 && errno) {
+ perror( s > name ? name : "." );
+ fprintf(stderr,
+ "%s: cannot get dynamic filename length limit for %s.\n",
+ progname, s > name ? name : ".");
+ return 0;
+ }
+ if (s > name) *s = tmp;
+ }
+#endif /* USE_PATHCONF */
+#endif /* _PC_NAME_MAX */
+#endif /* !NAME_MAX */
+
+ if (max_filename_length > 0 && strlen(end) > max_filename_length) {
+ fprintf(stderr,
+ "%s: filename \"%s\" is too long (maximum is %ld)\n",
+ progname, endname(name), max_filename_length );
+ return 0;
+ }
+
+ return 1;
+}
+
+/*
+ * Return a pointer the suffix of a string, if any.
+ * A suffix alone has no suffix, an empty suffix can not be had.
+ */
+static char * suffix P2((name, suf), char *name, char * suf)
+{
+ size_t nlen = strlen(name);
+ size_t slen = strlen(suf);
+
+ if (!slen || nlen <= slen) return (char *)0;
+ name += nlen - slen;
+ return memcmp(name, suf, slen) ? (char *)0 : name;
+}
+
+
+static void catch_signals P1((fun), SIGHANDLER_T (*fun) ())
+{
+#ifdef SIGHUP
+ signal( SIGHUP, fun );
+#endif
+#ifdef SIGINT
+ signal( SIGINT, fun );
+#endif
+#ifdef SIGPIPE
+ signal( SIGPIPE, fun );
+#endif
+#ifdef SIGTERM
+ signal( SIGTERM, fun );
+#endif
+#ifdef SIGXFSZ
+ signal( SIGXFSZ, fun );
+#endif
+}
+
+static SIGHANDLER_T onintr P0()
+{
+ char * tmp = outname;
+
+#ifdef HAS_SYSV_SIGNALS
+ catch_signals( SIG_IGN );
+#endif
+
+ outname = (char *)0;
+ if (tmp) (void)unlink(tmp);
+
+ exit(1);
+}
+
+/*
+ * Allocate some memory and complain if it fails.
+ */
+static char * emalloc P1((len), size_t len)
+{
+ char * s;
+ if (!(s = malloc(len))) {
+ fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
+ progname, len);
+ onintr();
+ exit(1);
+ }
+ return s;
+}
+
+static char* normalname P3((name, want, cut), char *name, char *want,char *cut)
+{
+ size_t maxlen;
+ char * s, * p;
+
+ p = (char *)0;
+ if (!name) return p;
+
+ maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
+ p = strcpy(emalloc(maxlen), name);
+
+ if (s = suffix(p, cut)) strcpy(s, want);
+ else if (*want && !suffix(p, want)) strcat(p, want);
+
+ return p;
+}
+
+/*
+ * Generate a `plain' (non-encoded) name from a given name.
+ */
+static char * plainname P1((name), char *name)
+{
+ return normalname(name, "", SUFFIX_TOASTED );
+}
+
+/*
+ * Generate a `code' name from a given name.
+ */
+static char * codename P1((name), char *name)
+{
+ return normalname( name, SUFFIX_TOASTED, "" );
+}
+
+/*
+ * If we're supposed to ask (fileno (stderr) is a tty, and f_force not
+ * set), ask the user whether to overwrite a file or not.
+ */
+static int ok_to_replace P1(( name ), char * name)
+{
+ int reply, c;
+
+ if (f_force) return 1; /* YES, do replace */
+ if (!isatty(fileno(stderr))) return 0; /* NO, don't replace */
+
+ fprintf(stderr,
+ "%s already exists; do you wish to overwrite %s (y or n)? ",
+ name, name);
+ fflush(stderr);
+
+ for (c = reply = getchar(); c != '\n' && c != EOF; c = getchar()) ;
+ if (reply == 'y') return 1;
+
+ fprintf(stderr, "\tnot overwritten\n");
+ return 0;
+}
+
+static void update_mode P0()
+{
+ if (!instat.st_nlink) return; /* couldn't stat in */
+
+#ifdef HAS_FCHMOD
+ if (fchmod(fileno(out), instat.st_mode & 07777)) {
+ perror(outname);
+ fprintf(stderr, "%s: could not change file mode of \"%s\"\n",
+ progname, outname);
+ }
+#else
+#ifdef HAS_CHMOD
+ if (outname && chmod(outname, instat.st_mode & 07777)) {
+ perror(outname);
+ fprintf(stderr, "%s: could not change file mode of \"%s\"\n",
+ progname, outname);
+ }
+#endif /* HAS_CHMOD */
+#endif /* HAS_FCHMOD */
+}
+
+static void update_own P0()
+{
+ if (!instat.st_nlink) return; /* couldn't stat in */
+#ifdef HAS_FCHOWN
+ (void)fchown(fileno(out), instat.st_uid, instat.st_gid);
+#else
+#ifdef HAS_CHOWN
+ (void)chown(outname, instat.st_uid, instat.st_gid);
+#endif /* HAS_CHOWN */
+#endif /* HAS_FCHOWN */
+}
+
+static void update_times P0()
+{
+ if (!instat.st_nlink) return; /* couldn't stat in */
+
+#ifdef HAS_UTIMES
+ if (outname) {
+ struct timeval tv[2];
+
+ tv[0].tv_sec = instat.st_atime;
+ tv[1].tv_sec = instat.st_mtime;
+ tv[0].tv_usec = tv[1].tv_usec = 0;
+ (void) utimes(outname, tv);
+ }
+#else
+#ifdef HAS_UTIME
+
+ if (outname) {
+
+#ifdef HAS_UTIMBUF
+ struct utimbuf ut;
+
+ ut.actime = instat.st_atime;
+ ut.modtime = instat.st_mtime;
+
+# ifdef HAS_UTIMEUSEC
+ ut.acusec = instat.st_ausec;
+ ut.modusec = instat.st_musec;
+# endif /* HAS_UTIMEUSEC */
+
+ (void) utime(outname, &ut);
+
+#else /* UTIMBUF */
+
+ time_t ut[2];
+
+ ut[0] = instat.st_atime;
+ ut[1] = instat.st_mtime;
+
+ (void) utime(outname, ut);
+
+#endif /* UTIMBUF */
+ }
+#endif /* HAS_UTIME */
+#endif /* HAS_UTIMES */
+}
+
+
+static int okay_as_input P3((name,f,st), char* name, FILE* f, struct stat * st)
+{
+# ifdef HAS_FSTAT
+ if (fstat(fileno(f), st) < 0)
+# else
+ if (stat(name, st) < 0)
+# endif
+ {
+ perror(name);
+ fprintf(stderr, "%s: cannot stat \"%s\"\n", progname, name);
+ return 0;
+ }
+
+ if (!S_ISREG(st->st_mode)) {
+ fprintf(stderr,
+ "%s: \"%s\" is not a regular file -- unchanged.\n",
+ progname, name);
+ return 0;
+ }
+ if (st->st_nlink > 1 && !f_cat && !f_precious) {
+ fprintf(stderr,
+ "%s: \"%s\" has %s other link%s -- unchanged.\n",
+ progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
+ return 0;
+ }
+ return 1;
+}
+
+static void prepare_io P1(( desc), struct fmtdesc * desc)
+{
+ output = desc->output;
+ input = desc->input;
+
+ init_input = desc->init_input;
+ init_output = desc->init_output;
+}
+
+static struct fmtdesc * grok_format P1((name), char * name)
+{
+ char * c;
+ struct fmtdesc ** f;
+
+ if (name) {
+ c = plainname(name);
+
+ for (f = alldescs; *f; f++) {
+ if ( (*f)->suffix
+ && *(*f)->suffix
+ && suffix(c, (*f)->suffix)) {
+
+ free(c);
+ return *f;
+ }
+ }
+
+ free(c);
+ }
+ return (struct fmtdesc *)0;
+}
+
+static int open_input P2((name, st), char * name, struct stat * st)
+{
+ struct fmtdesc * f = f_format;
+
+ st->st_nlink = 0; /* indicates `undefined' value */
+ if (!name) {
+ inname = (char *)NULL;
+ in = stdin;
+#ifdef HAS__FSETMODE
+ _fsetmode(in, "b");
+#endif
+ }
+ else {
+ if (f_decode) inname = codename(name);
+ else {
+ if (!f_cat && suffix(name, SUFFIX_TOASTED)) {
+ fprintf(stderr,
+ "%s: %s already has \"%s\" suffix -- unchanged.\n",
+ progname, name, SUFFIX_TOASTED );
+ return 0;
+ }
+ inname = strcpy(emalloc(strlen(name)+1), name);
+ }
+ if (!(in = fopen(inname, READ))) {
+ perror(inname); /* not guaranteed to be valid here */
+ fprintf(stderr, "%s: cannot open \"%s\" for reading\n",
+ progname, inname);
+ return 0;
+ }
+ if (!okay_as_input(inname, in, st)) return 0;
+ if (!f) f = grok_format(inname);
+ }
+ prepare_io( f ? f : & DEFAULT_FORMAT );
+ return 1;
+}
+
+static int open_output P1((name), char *name)
+{
+ if (!name || f_cat) {
+ out = stdout;
+ outname = (char *)NULL;
+#ifdef HAS__FSETMODE
+ _fsetmode(out, "b");
+#endif
+ }
+ else {
+ int outfd = -1;
+ char * o;
+
+ o = (*(f_decode ? plainname : codename))(name);
+ if (!length_okay(o)) return 0;
+ if ((outfd = open(o, O_WRITE_EXCL, 0666)) >= 0)
+ out = fdopen(outfd, WRITE);
+ else if (errno != EEXIST) out = (FILE *)NULL;
+ else if (ok_to_replace(o)) out = fopen(o, WRITE);
+ else return 0;
+
+ if (!out) {
+ perror(o);
+ fprintf(stderr,
+ "%s: can't open \"%s\" for writing\n",
+ progname, o);
+ if (outfd >= 0) (void)close(outfd);
+ return 0;
+ }
+
+ outname = o;
+ }
+ return 1;
+}
+
+static int process_encode P0()
+{
+ gsm r;
+ gsm_signal s[ 160 ];
+ gsm_frame d;
+
+ int cc;
+
+ if (!(r = gsm_create())) {
+ perror(progname);
+ return -1;
+ }
+ (void)gsm_option(r, GSM_OPT_FAST, &f_fast);
+ (void)gsm_option(r, GSM_OPT_VERBOSE, &f_verbose);
+ (void)gsm_option(r, GSM_OPT_LTP_CUT, &f_ltp_cut);
+
+ while ((cc = (*input)(s)) > 0) {
+ if (cc < sizeof(s) / sizeof(*s))
+ memset((char *)(s+cc), 0, sizeof(s)-(cc * sizeof(*s)));
+ gsm_encode(r, s, d);
+ if (fwrite((char *)d, sizeof(d), 1, out) != 1) {
+ perror(outname ? outname : "stdout");
+ fprintf(stderr, "%s: error writing to %s\n",
+ progname, outname ? outname : "stdout");
+ gsm_destroy(r);
+ return -1;
+ }
+ }
+ if (cc < 0) {
+ perror(inname ? inname : "stdin");
+ fprintf(stderr, "%s: error reading from %s\n",
+ progname, inname ? inname : "stdin");
+ gsm_destroy(r);
+ return -1;
+ }
+ gsm_destroy(r);
+
+ return 0;
+}
+
+static int process_decode P0()
+{
+ gsm r;
+ gsm_frame s;
+ gsm_signal d[ 160 ];
+
+ int cc;
+
+ if (!(r = gsm_create())) { /* malloc failed */
+ perror(progname);
+ return -1;
+ }
+ (void)gsm_option(r, GSM_OPT_FAST, &f_fast);
+ (void)gsm_option(r, GSM_OPT_VERBOSE, &f_verbose);
+
+ while ((cc = fread(s, 1, sizeof(s), in)) > 0) {
+
+ if (cc != sizeof(s)) {
+ if (cc >= 0) fprintf(stderr,
+ "%s: incomplete frame (%d byte%s missing) from %s\n",
+ progname, sizeof(s) - cc,
+ "s" + (sizeof(s) - cc == 1),
+ inname ? inname : "stdin" );
+ gsm_destroy(r);
+ errno = 0;
+ return -1;
+ }
+ if (gsm_decode(r, s, d)) {
+ fprintf(stderr, "%s: bad frame in %s\n",
+ progname, inname ? inname : "stdin");
+ gsm_destroy(r);
+ errno = 0;
+ return -1;
+ }
+
+ if ((*output)(d) < 0) {
+ perror(outname);
+ fprintf(stderr, "%s: error writing to %s\n",
+ progname, outname);
+ gsm_destroy(r);
+ return -1;
+ }
+ }
+
+ if (cc < 0) {
+ perror(inname ? inname : "stdin" );
+ fprintf(stderr, "%s: error reading from %s\n", progname,
+ inname ? inname : "stdin");
+ gsm_destroy(r);
+ return -1;
+ }
+
+ gsm_destroy(r);
+ return 0;
+}
+
+static int process P1((name), char * name)
+{
+ int step = 0;
+
+ out = (FILE *)0;
+ in = (FILE *)0;
+
+ outname = (char *)0;
+ inname = (char *)0;
+
+ if (!open_input(name, &instat) || !open_output(name))
+ goto err;
+
+ if ((*(f_decode ? init_output : init_input))()) {
+ fprintf(stderr, "%s: error %s %s\n",
+ progname,
+ f_decode ? "writing header to" : "reading header from",
+ f_decode ? (outname ? outname : "stdout")
+ : (inname ? inname : "stdin"));
+ goto err;
+ }
+
+ if ((*(f_decode ? process_decode : process_encode))())
+ goto err;
+
+ if (fflush(out) < 0 || ferror(out)) {
+ perror(outname ? outname : "stdout");
+ fprintf(stderr, "%s: error writing \"%s\"\n", progname,
+ outname ? outname:"stdout");
+ goto err;
+ }
+
+ if (out != stdout) {
+
+ update_times();
+ update_mode ();
+ update_own ();
+
+ if (fclose(out) < 0) {
+ perror(outname);
+ fprintf(stderr, "%s: error writing \"%s\"\n",
+ progname, outname);
+ goto err;
+ }
+ if (outname != name) free(outname);
+ outname = (char *)0;
+ }
+ out = (FILE *)0;
+ if (in != stdin) {
+ (void)fclose(in), in = (FILE *)0;
+ if (!f_cat && !f_precious) {
+ if (unlink(inname) < 0) {
+ perror(inname);
+ fprintf(stderr,
+ "%s: source \"%s\" not deleted.\n",
+ progname, inname);
+ }
+ goto err;
+ }
+ if (inname != name) free(inname);
+ inname = (char *)0;
+ }
+ return 0;
+
+ /*
+ * Error handling and cleanup.
+ */
+err:
+ if (out && out != stdout) {
+ (void)fclose(out), out = (FILE *)0;
+ if (unlink(outname) < 0 && errno != ENOENT && errno != EINTR) {
+ perror(outname);
+ fprintf(stderr, "%s: could not unlink \"%s\"\n",
+ progname, outname);
+ }
+ }
+ if (in && in != stdin) (void)fclose(in), in = (FILE *)0;
+
+ if (inname && inname != name) free(inname);
+ if (outname && outname != name) free(outname);
+
+ return -1;
+}
+
+static void version P0()
+{
+ printf( "%s 1.0, version %s\n",
+ progname,
+ "$Id: toast.c,v 1.8 1996/07/02 10:41:04 jutta Exp $" );
+}
+
+static void help P0()
+{
+ printf("Usage: %s [-fcpdhvaulsFC] [files...]\n", progname);
+ printf("\n");
+
+ printf(" -f force Replace existing files without asking\n");
+ printf(" -c cat Write to stdout, do not remove source files\n");
+ printf(" -d decode Decode data (default is encode)\n");
+ printf(" -p precious Do not delete the source\n");
+ printf("\n");
+
+ printf(" -u u-law Force 8 kHz/8 bit u-law in/output format\n");
+ printf(" -s sun .au Force Sun .au u-law in/output format\n");
+ printf(" -a A-law Force 8 kHz/8 bit A-law in/output format\n");
+ printf(" -l linear Force 16 bit linear in/output format\n");
+ printf("\n");
+
+ printf(" -F fast Sacrifice conformance to performance\n");
+ printf(" -C cutoff Ignore most samples during LTP\n");
+ printf(" -v version Show version information\n");
+ printf(" -h help Print this text\n");
+ printf("\n");
+}
+
+
+static void set_format P1((f), struct fmtdesc * f)
+{
+ if (f_format && f_format != f) {
+ fprintf( stderr,
+ "%s: only one of -[uals] is possible (%s -h for help)\n",
+ progname, progname);
+ exit(1);
+ }
+
+ f_format = f;
+}
+
+int main P2((ac, av), int ac, char **av)
+{
+ int opt;
+ extern int optind;
+ extern char * optarg;
+
+ parse_argv0(*av);
+
+ while ((opt = getopt(ac, av, "fcdpvhuaslVFC:")) != EOF) switch (opt) {
+
+ case 'd': f_decode = 1; break;
+ case 'f': f_force = 1; break;
+ case 'c': f_cat = 1; break;
+ case 'p': f_precious = 1; break;
+ case 'F': f_fast = 1; break;
+ case 'C': f_ltp_cut = 100; break;
+#ifndef NDEBUG
+ case 'V': f_verbose = 1; break; /* undocumented */
+#endif
+
+ case 'u': set_format( &f_ulaw ); break;
+ case 'l': set_format( &f_linear ); break;
+ case 'a': set_format( &f_alaw ); break;
+ case 's': set_format( &f_audio ); break;
+
+ case 'v': version(); exit(0);
+ case 'h': help(); exit(0);
+
+ default:
+ usage:
+ fprintf(stderr,
+ "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
+ progname);
+ exit(1);
+ }
+
+ f_precious |= f_cat;
+
+ av += optind;
+ ac -= optind;
+
+ catch_signals(onintr);
+
+ if (ac <= 0) process( (char *)0 );
+ else while (ac--) process( *av++ );
+
+ exit(0);
+}
diff --git a/src/toast_alaw.c b/src/toast_alaw.c
new file mode 100644
index 0000000..7799342
--- /dev/null
+++ b/src/toast_alaw.c
@@ -0,0 +1,334 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/toast_alaw.c,v 1.2 1996/07/05 17:23:46 jutta Exp $ */
+
+#include "toast.h"
+
+/* toast_alaw.c -- manipulate A-law encoded sound.
+ */
+
+extern FILE * in, * out;
+
+#define A2S(x) (a2s[ (unsigned char )(x) ])
+#define S2A(x) (s2a[ ((unsigned short)(x)) >> 4 ])
+
+static unsigned short a2s[] = {
+
+ 60032, 60288, 59520, 59776, 61056, 61312, 60544, 60800,
+ 57984, 58240, 57472, 57728, 59008, 59264, 58496, 58752,
+ 62784, 62912, 62528, 62656, 63296, 63424, 63040, 63168,
+ 61760, 61888, 61504, 61632, 62272, 62400, 62016, 62144,
+ 43520, 44544, 41472, 42496, 47616, 48640, 45568, 46592,
+ 35328, 36352, 33280, 34304, 39424, 40448, 37376, 38400,
+ 54528, 55040, 53504, 54016, 56576, 57088, 55552, 56064,
+ 50432, 50944, 49408, 49920, 52480, 52992, 51456, 51968,
+ 65192, 65208, 65160, 65176, 65256, 65272, 65224, 65240,
+ 65064, 65080, 65032, 65048, 65128, 65144, 65096, 65112,
+ 65448, 65464, 65416, 65432, 65512, 65528, 65480, 65496,
+ 65320, 65336, 65288, 65304, 65384, 65400, 65352, 65368,
+ 64160, 64224, 64032, 64096, 64416, 64480, 64288, 64352,
+ 63648, 63712, 63520, 63584, 63904, 63968, 63776, 63840,
+ 64848, 64880, 64784, 64816, 64976, 65008, 64912, 64944,
+ 64592, 64624, 64528, 64560, 64720, 64752, 64656, 64688,
+ 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736,
+ 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784,
+ 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368,
+ 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392,
+ 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944,
+ 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136,
+ 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472,
+ 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568,
+ 344, 328, 376, 360, 280, 264, 312, 296,
+ 472, 456, 504, 488, 408, 392, 440, 424,
+ 88, 72, 120, 104, 24, 8, 56, 40,
+ 216, 200, 248, 232, 152, 136, 184, 168,
+ 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184,
+ 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696,
+ 688, 656, 752, 720, 560, 528, 624, 592,
+ 944, 912, 1008, 976, 816, 784, 880, 848
+
+};
+
+
+static unsigned char s2a[] = {
+
+ 213,212,215,214,209,208,211,210,221,220,223,222,217,216,219,218,
+ 197,196,199,198,193,192,195,194,205,204,207,206,201,200,203,202,
+ 245,245,244,244,247,247,246,246,241,241,240,240,243,243,242,242,
+ 253,253,252,252,255,255,254,254,249,249,248,248,251,251,250,250,
+ 229,229,229,229,228,228,228,228,231,231,231,231,230,230,230,230,
+ 225,225,225,225,224,224,224,224,227,227,227,227,226,226,226,226,
+ 237,237,237,237,236,236,236,236,239,239,239,239,238,238,238,238,
+ 233,233,233,233,232,232,232,232,235,235,235,235,234,234,234,234,
+ 149,149,149,149,149,149,149,149,148,148,148,148,148,148,148,148,
+ 151,151,151,151,151,151,151,151,150,150,150,150,150,150,150,150,
+ 145,145,145,145,145,145,145,145,144,144,144,144,144,144,144,144,
+ 147,147,147,147,147,147,147,147,146,146,146,146,146,146,146,146,
+ 157,157,157,157,157,157,157,157,156,156,156,156,156,156,156,156,
+ 159,159,159,159,159,159,159,159,158,158,158,158,158,158,158,158,
+ 153,153,153,153,153,153,153,153,152,152,152,152,152,152,152,152,
+ 155,155,155,155,155,155,155,155,154,154,154,154,154,154,154,154,
+ 133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,
+ 132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
+ 135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
+ 134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,
+ 129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
+ 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+ 131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
+ 130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
+ 141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
+ 140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
+ 143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
+ 142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
+ 137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
+ 136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+ 139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
+ 138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
+ 181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+ 181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+ 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+ 180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+ 183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
+ 183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
+ 182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+ 182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+ 177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+ 177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+ 176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+ 176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+ 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
+ 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
+ 178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+ 178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+ 189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
+ 189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
+ 188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
+ 188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
+ 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+ 191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+ 190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+ 190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+ 185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+ 185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+ 184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+ 184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+ 187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
+ 187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
+ 186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
+ 186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
+ 165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+ 165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+ 165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+ 165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+ 164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+ 164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+ 164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+ 164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+ 167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+ 167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+ 167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+ 167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+ 166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+ 166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+ 166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+ 166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+ 161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+ 161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+ 161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+ 161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+ 160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+ 163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+ 163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+ 163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+ 163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+ 162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+ 162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+ 162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+ 162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+ 173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+ 173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+ 173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+ 173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+ 172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+ 172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+ 172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+ 172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+ 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+ 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+ 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+ 175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+ 174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+ 174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+ 174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+ 174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+ 169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+ 169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+ 169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+ 169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+ 168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+ 168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+ 168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+ 168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+ 171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+ 171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+ 171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+ 171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+ 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+ 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+ 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+ 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+ 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
+ 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
+ 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
+ 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31,
+ 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
+ 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19,
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17,
+ 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+ 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21,
+ 106,106,106,106,107,107,107,107,104,104,104,104,105,105,105,105,
+ 110,110,110,110,111,111,111,111,108,108,108,108,109,109,109,109,
+ 98, 98, 98, 98, 99, 99, 99, 99, 96, 96, 96, 96, 97, 97, 97, 97,
+ 102,102,102,102,103,103,103,103,100,100,100,100,101,101,101,101,
+ 122,122,123,123,120,120,121,121,126,126,127,127,124,124,125,125,
+ 114,114,115,115,112,112,113,113,118,118,119,119,116,116,117,117,
+ 74, 75, 72, 73, 78, 79, 76, 77, 66, 67, 64, 65, 70, 71, 68, 69,
+ 90, 91, 88, 89, 94, 95, 92, 93, 82, 83, 80, 81, 86, 87, 84, 85
+};
+
+int alaw_input P1((buf), gsm_signal * buf)
+{
+ int i, c;
+
+ for (i = 0; i < 160 && (c = fgetc(in)) != EOF; i++) buf[i] = A2S( c );
+ if (c == EOF && ferror(in)) return -1;
+ return i;
+}
+
+int alaw_output P1((buf), gsm_signal * buf)
+{
+ int i;
+
+ for (i = 0; i < 160; i++, buf++)
+ if (fputc( S2A( *buf ), out) == EOF) return -1;
+ return 0;
+}
+
diff --git a/src/toast_audio.c b/src/toast_audio.c
new file mode 100644
index 0000000..f090f23
--- /dev/null
+++ b/src/toast_audio.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast_audio.c,v 1.6 1995/03/07 21:21:24 jutta Exp $ */
+
+#include "toast.h"
+
+/* toast_audio -- functions to manipulate SunOS audio files.
+ *
+ * This is reverse engineered from our present soundfiles
+ * and in no way portable, durable or aesthetically pleasing.
+ */
+
+extern FILE * in, * out;
+extern char * inname;
+extern char * progname;
+
+extern int (*output) P((gsm_signal *)),
+ (*input ) P((gsm_signal *));
+
+extern int alaw_input P((gsm_signal *)),
+ ulaw_input P((gsm_signal *)),
+ linear_input P((gsm_signal *));
+
+extern int ulaw_output P((gsm_signal *));
+
+static int put_u32 P2((f, u), FILE * f, unsigned long u)
+{
+ /* Write a 32-bit unsigned value msb first.
+ */
+ if ( putc( (char)((u>>24) & 0x0FF), f) == EOF
+ || putc( (char)((u>>16) & 0x0FF), f) == EOF
+ || putc( (char)((u>> 8) & 0x0FF), f) == EOF
+ || putc( (char)( u & 0x0FF), f) == EOF) return -1;
+
+ return 0;
+}
+
+static int get_u32 P2((f, up), FILE * f, unsigned long * up)
+{
+ /* Read a 32-bit unsigned value msb first.
+ */
+ int i;
+ unsigned long u;
+
+ if ( (i = getc(f)) == EOF
+ || ((u = (unsigned char)i), (i = getc(f)) == EOF)
+ || ((u = (u<<8)|(unsigned char)i), (i = getc(f)) == EOF)
+ || ((u = (u<<8)|(unsigned char)i), (i = getc(f)) == EOF)) return -1;
+ *up = (u<<8)|(unsigned char)i;
+ return 0;
+}
+
+int audio_init_input P0()
+{
+ unsigned long len, enc; /* unsigned 32 bits */
+
+ if ( fgetc(in) != '.'
+ || fgetc(in) != 's'
+ || fgetc(in) != 'n'
+ || fgetc(in) != 'd'
+ || get_u32( in, &len )
+ || get_u32( in, &enc ) /* skip this */
+ || get_u32( in, &enc )) {
+ fprintf(stderr,
+ "%s: bad (missing?) header in Sun audio file \"%s\";\n\
+ Try one of -u, -a, -l instead (%s -h for help).\n",
+ progname, inname ? inname : "stdin", progname);
+ return -1;
+ }
+
+ switch (enc) {
+ case 1: input = ulaw_input; break;
+ case 2: input = alaw_input; break;
+ case 3: input = linear_input; break;
+ default:
+ fprintf(stderr,
+"%s: warning: file format #%lu for %s not implemented, defaulting to u-law.\n",
+ progname, enc, inname);
+ input = ulaw_input;
+ break;
+ }
+
+ while (len > 4*4)
+ if (getc(in) == EOF) {
+ fprintf(stderr,
+ "%s: EOF in header of Sun audio file \"%s\";\n\
+ Try one of -u, -a, -l instead (%s -h for help).\n",
+ progname, inname ? inname : "stdin", progname);
+ return -1;
+ }
+ else len--;
+
+ return 0;
+}
+
+int audio_init_output P0()
+{
+ if ( fputs(".snd", out) == EOF
+ || put_u32(out, 32)
+ || put_u32(out, ~(unsigned long)0)
+ || put_u32(out, 1)
+ || put_u32(out, 8000)
+ || put_u32(out, 1)
+ || put_u32(out, 0)
+ || put_u32(out, 0)) return -1;
+
+ return 0;
+}
+
diff --git a/src/toast_lin.c b/src/toast_lin.c
new file mode 100644
index 0000000..7b5f845
--- /dev/null
+++ b/src/toast_lin.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast_lin.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+#include "toast.h"
+
+/* toast_linear.c -- read and write 16 bit linear sound in host byte order.
+ */
+
+extern FILE *in, *out;
+
+int linear_input (buf) gsm_signal * buf;
+{
+ return fread( (char *)buf, sizeof(*buf), 160, in );
+}
+
+int linear_output P1((buf), gsm_signal * buf)
+{
+ return -( fwrite( (char *)buf, sizeof(*buf), 160, out ) != 160 );
+}
diff --git a/src/toast_ulaw.c b/src/toast_ulaw.c
new file mode 100644
index 0000000..14ef2d0
--- /dev/null
+++ b/src/toast_ulaw.c
@@ -0,0 +1,621 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast_ulaw.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+#include "toast.h"
+
+/* toast_ulaw -- functions to manipulate u-law encoded sound.
+ */
+
+extern FILE *in, *out;
+
+#define U2S(x) (u2s[ (unsigned char)(x) ])
+#define S2U(x) (s2u[ ((unsigned short)(x)) >> 3 ])
+
+static unsigned short u2s[] = {
+ 33280, 34308, 35336, 36364, 37393, 38421, 39449, 40477,
+ 41505, 42534, 43562, 44590, 45618, 46647, 47675, 48703,
+ 49474, 49988, 50503, 51017, 51531, 52045, 52559, 53073,
+ 53587, 54101, 54616, 55130, 55644, 56158, 56672, 57186,
+ 57572, 57829, 58086, 58343, 58600, 58857, 59114, 59371,
+ 59628, 59885, 60142, 60399, 60656, 60913, 61171, 61428,
+ 61620, 61749, 61877, 62006, 62134, 62263, 62392, 62520,
+ 62649, 62777, 62906, 63034, 63163, 63291, 63420, 63548,
+ 63645, 63709, 63773, 63838, 63902, 63966, 64030, 64095,
+ 64159, 64223, 64287, 64352, 64416, 64480, 64544, 64609,
+ 64657, 64689, 64721, 64753, 64785, 64818, 64850, 64882,
+ 64914, 64946, 64978, 65010, 65042, 65075, 65107, 65139,
+ 65163, 65179, 65195, 65211, 65227, 65243, 65259, 65275,
+ 65291, 65308, 65324, 65340, 65356, 65372, 65388, 65404,
+ 65416, 65424, 65432, 65440, 65448, 65456, 65464, 65472,
+ 65480, 65488, 65496, 65504, 65512, 65520, 65528, 0,
+ 32256, 31228, 30200, 29172, 28143, 27115, 26087, 25059,
+ 24031, 23002, 21974, 20946, 19918, 18889, 17861, 16833,
+ 16062, 15548, 15033, 14519, 14005, 13491, 12977, 12463,
+ 11949, 11435, 10920, 10406, 9892, 9378, 8864, 8350,
+ 7964, 7707, 7450, 7193, 6936, 6679, 6422, 6165,
+ 5908, 5651, 5394, 5137, 4880, 4623, 4365, 4108,
+ 3916, 3787, 3659, 3530, 3402, 3273, 3144, 3016,
+ 2887, 2759, 2630, 2502, 2373, 2245, 2116, 1988,
+ 1891, 1827, 1763, 1698, 1634, 1570, 1506, 1441,
+ 1377, 1313, 1249, 1184, 1120, 1056, 992, 927,
+ 879, 847, 815, 783, 751, 718, 686, 654,
+ 622, 590, 558, 526, 494, 461, 429, 397,
+ 373, 357, 341, 325, 309, 293, 277, 261,
+ 245, 228, 212, 196, 180, 164, 148, 132,
+ 120, 112, 104, 96, 88, 80, 72, 64,
+ 56, 48, 40, 32, 24, 16, 8, 0
+};
+
+static unsigned char s2u[] = {
+0377,0376,0375,0374,0373,0372,0371,0370,0367,0366,0365,0364,0363,0362,0361,
+0360,0357,0357,0356,0356,0355,0355,0354,0354,0353,0353,0352,0352,0351,0351,
+0350,0350,0347,0347,0346,0346,0345,0345,0344,0344,0343,0343,0342,0342,0341,
+0341,0340,0340,0337,0337,0337,0337,0336,0336,0336,0336,0335,0335,0335,0335,
+0334,0334,0334,0334,0333,0333,0333,0333,0332,0332,0332,0332,0331,0331,0331,
+0331,0330,0330,0330,0330,0327,0327,0327,0327,0326,0326,0326,0326,0325,0325,
+0325,0325,0324,0324,0324,0324,0323,0323,0323,0323,0322,0322,0322,0322,0321,
+0321,0321,0321,0320,0320,0320,0320,0317,0317,0317,0317,0317,0317,0317,0317,
+0316,0316,0316,0316,0316,0316,0316,0316,0315,0315,0315,0315,0315,0315,0315,
+0315,0314,0314,0314,0314,0314,0314,0314,0314,0313,0313,0313,0313,0313,0313,
+0313,0313,0312,0312,0312,0312,0312,0312,0312,0312,0311,0311,0311,0311,0311,
+0311,0311,0311,0310,0310,0310,0310,0310,0310,0310,0310,0307,0307,0307,0307,
+0307,0307,0307,0307,0306,0306,0306,0306,0306,0306,0306,0306,0305,0305,0305,
+0305,0305,0305,0305,0305,0304,0304,0304,0304,0304,0304,0304,0304,0303,0303,
+0303,0303,0303,0303,0303,0303,0303,0302,0302,0302,0302,0302,0302,0302,0302,
+0301,0301,0301,0301,0301,0301,0301,0301,0300,0300,0300,0300,0300,0300,0300,
+0300,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,
+0277,0277,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,
+0276,0276,0276,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,
+0275,0275,0275,0275,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,
+0274,0274,0274,0274,0274,0273,0273,0273,0273,0273,0273,0273,0273,0273,0273,
+0273,0273,0273,0273,0273,0273,0272,0272,0272,0272,0272,0272,0272,0272,0272,
+0272,0272,0272,0272,0272,0272,0272,0271,0271,0271,0271,0271,0271,0271,0271,
+0271,0271,0271,0271,0271,0271,0271,0271,0270,0270,0270,0270,0270,0270,0270,
+0270,0270,0270,0270,0270,0270,0270,0270,0270,0267,0267,0267,0267,0267,0267,
+0267,0267,0267,0267,0267,0267,0267,0267,0267,0267,0266,0266,0266,0266,0266,
+0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0265,0265,0265,0265,
+0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0264,0264,0264,
+0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0263,0263,
+0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0262,
+0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,
+0262,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,
+0261,0261,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,
+0260,0260,0260,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,
+0060,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,
+0061,0061,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,
+0062,0062,0062,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,
+0063,0063,0063,0063,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,
+0064,0064,0064,0064,0064,0065,0065,0065,0065,0065,0065,0065,0065,0065,0065,
+0065,0065,0065,0065,0065,0065,0066,0066,0066,0066,0066,0066,0066,0066,0066,
+0066,0066,0066,0066,0066,0066,0066,0067,0067,0067,0067,0067,0067,0067,0067,
+0067,0067,0067,0067,0067,0067,0067,0067,0070,0070,0070,0070,0070,0070,0070,
+0070,0070,0070,0070,0070,0070,0070,0070,0070,0071,0071,0071,0071,0071,0071,
+0071,0071,0071,0071,0071,0071,0071,0071,0071,0071,0072,0072,0072,0072,0072,
+0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0073,0073,0073,0073,
+0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0074,0074,0074,
+0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0075,0075,
+0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,
+0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,
+0076,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,
+0077,0077,0100,0100,0100,0100,0100,0100,0100,0100,0101,0101,0101,0101,0101,
+0101,0101,0101,0102,0102,0102,0102,0102,0102,0102,0102,0103,0103,0103,0103,
+0103,0103,0103,0103,0104,0104,0104,0104,0104,0104,0104,0104,0105,0105,0105,
+0105,0105,0105,0105,0105,0106,0106,0106,0106,0106,0106,0106,0106,0107,0107,
+0107,0107,0107,0107,0107,0107,0110,0110,0110,0110,0110,0110,0110,0110,0111,
+0111,0111,0111,0111,0111,0111,0111,0112,0112,0112,0112,0112,0112,0112,0112,
+0113,0113,0113,0113,0113,0113,0113,0113,0114,0114,0114,0114,0114,0114,0114,
+0114,0115,0115,0115,0115,0115,0115,0115,0115,0116,0116,0116,0116,0116,0116,
+0116,0116,0117,0117,0117,0117,0117,0117,0117,0117,0120,0120,0120,0120,0121,
+0121,0121,0121,0122,0122,0122,0122,0123,0123,0123,0123,0124,0124,0124,0124,
+0125,0125,0125,0125,0126,0126,0126,0126,0127,0127,0127,0127,0130,0130,0130,
+0130,0131,0131,0131,0131,0132,0132,0132,0132,0133,0133,0133,0133,0134,0134,
+0134,0134,0135,0135,0135,0135,0136,0136,0136,0136,0137,0137,0137,0137,0140,
+0140,0141,0141,0142,0142,0143,0143,0144,0144,0145,0145,0146,0146,0147,0147,
+0150,0150,0150,0151,0151,0152,0152,0153,0153,0154,0154,0155,0155,0156,0156,
+0157,0157,0160,0161,0162,0163,0164,0165,0166,0167,0170,0171,0172,0173,0174,
+0175,0176
+};
+
+int ulaw_input P1((buf), gsm_signal * buf)
+{
+ int i, c;
+
+ for (i = 0; i < 160 && (c = fgetc(in)) != EOF; i++) buf[i] = U2S(c);
+ if (c == EOF && ferror(in)) return -1;
+ return i;
+}
+
+int ulaw_output P1((buf), gsm_signal * buf)
+{
+ int i;
+
+ for(i = 0; i < 160; i++, buf++)
+ if (fputc( (char)S2U( (unsigned short)*buf ), out) == EOF)
+ return -1;
+ return 0;
+}