file
stringlengths 18
26
| data
stringlengths 2
1.05M
|
---|---|
the_stack_data/125739.c
|
#define TRUE 1
#define FALSE !TRUE
int main(void) {
int val = 0;
// Some comment
val = TRUE;
val = FALSE;
//printf("TRUE = %d and FALSE = %d", TRUE, FALSE);
return 0;
}
|
the_stack_data/162643739.c
|
/* Perform additional initialization for getopt functions in GNU libc.
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <[email protected]>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Attention: this file is *not* necessary when the GNU getopt functions
are used outside the GNU libc. Some additional functionality of the
getopt functions in GNU libc require this additional work. */
/*
(c) 1993 by Thomas Koenig ([email protected])
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one
Since the Linux kernel and libraries are constantly changing, this
manual page may be incorrect or out-of-date. The author(s) assume no
responsibility for errors or omissions, or for damages resulting from
the use of the information contained herein. The author(s) may not
have taken the same level of care in the production of this manual,
which is licensed free of charge, as they might when working
professionally.
Formatted or processed versions of this manual, if unaccompanied by
the source, must acknowledge the copyright and authors of this work.
License.
Modified Sat Jul 24 19:27:50 1993 by Rik Faith ([email protected])
Modified Mon Aug 30 22:02:34 1995 by Jim Van Zandt <[email protected]>
longindex is a pointer, has_arg can take 3 values, using consistent
names for optstring and longindex, \n in formats fixed. Documenting
opterr and getopt_long_only. Clarified explanations (borrowing heavily
from the source code).
Modified 8 May 1998 by Joseph S. Myers ([email protected])
=head1 NAME
I<getopt> - Parse command line options
=head1 SYNOPSIS
#include <unistd.h>
int getopt(int argc, char * const argv[],
const char *optstring);
extern char *optarg;
extern int optind, opterr, optopt;
#include <slack/getopt.h>
int getopt_long(int argc, char * const argv[],
const char *optstring, const struct option *longopts,
int *longindex);
int getopt_long_only(int argc, char * const argv[],
const char *optstring, const struct option *longopts,
int *longindex);
=head1 DESCRIPTION
The I<getopt()> function parses the command line arguments. Its arguments
C<argc> and C<argv> are the argument count and array as passed to the
I<main()> function on program invocation.
An element of C<argv> that starts with `-' (and is not exactly "-" or "--")
is an option element. The characters of this element
(aside from the initial `-') are option characters. If I<getopt()>
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
If I<getopt()> finds another option character, it returns that
character, updating the external variable C<optind> and a static
variable C<nextchar> so that the next call to I<getopt()> can
resume the scan with the following option character or
C<argv>-element.
If there are no more option characters, I<getopt()> returns
C<EOF>. Then C<optind> is the index in C<argv> of the first
C<argv>-element that is not an option.
C<optstring> is a string containing the legitimate option characters.
If such a character is followed by a colon, the option requires an argument,
so I<getopt> places a pointer to the following text in the same
C<argv>-element, or the text of the following C<argv>-element, in
C<optarg>. Two colons mean an option takes an optional arg; if there
is text in the current C<argv>-element, it is returned in C<optarg>,
otherwise C<optarg> is set to zero. This is a GNU extension. If
C<optstring> contains C<W> followed by a semicolon, then
C<-W foo> is treated as the long option C<--foo>.
(The C<-W> option is reserved by POSIX.2 for implementation extensions.)
This behaviour is a GNU extension, not available with libraries before
GNU libc 2.
By default, I<getopt()> permutes the contents of C<argv> as it
scans, so that eventually all the non-options are at the end. Two
other modes are also implemented. If the first character of
C<optstring> is `+' or the environment variable POSIXLY_CORRECT is
set, then option processing stops as soon as a non-option argument is
encountered. If the first character of C<optstring> is `-', then
each non-option C<argv>-element is handled as if it were the argument of
an option with character code 1. (This is used by programs that were
written to expect options and other C<argv>-elements in any order
and that care about the ordering of the two.)
The special argument `--' forces an end of option-scanning regardless
of the scanning mode.
If I<getopt()> does not recognize an option character, it prints an
error message to stderr, stores the character in C<optopt>, and
returns `?'. The calling program may prevent the error message by
setting C<opterr> to 0.
The I<getopt_long()> function works like I<getopt()>
except that it also accepts long options, started out by two dashes.
Long option names may be abbreviated if the abbreviation is
unique or is an exact match for some defined option. A long option
may take a parameter, of the form C<--arg=param> or C<--arg param>.
C<longopts> is a pointer to the first element of an array of
C<struct option> declared in C<getopt.h> as
struct option {
const char *name;
int has_arg;
int *flag;
int val;
};
The meanings of the different fields are:
=over 4
=item C<name>
is the name of the long option.
=item C<has_arg>
is:
C<no_argument> (or 0) if the option does not take an argument,
C<required_argument> (or 1) if the option requires an argument, or
C<optional_argument> (or 2) if the option takes an optional argument.
=item C<flag>
specifies how results are returned for a long option. If C<flag>
is C<NULL>, then I<getopt_long()> returns C<val>. (For example,
the calling program may set C<val> to the equivalent short
option character.) Otherwise, I<getopt_long()> returns 0, and
C<flag> points to a variable which is set to C<val> if the
option is found, but left unchanged if the option is not found.
=item C<val>
is the value to return, or to load into the variable pointed
to by C<flag>.
=back
The last element of the array has to be filled with zeroes.
If C<longindex> is not C<NULL>, it points to a variable which is
set to the index of the long option relative to C<longopts>.
I<getopt_long_only()> is like I<getopt_long()>, but `-' as well
as `--' can indicate a long option. If an option that starts with `-'
(not `--') doesn't match a long option, but does match a short option,
it is parsed as a short option instead.
=head1 RETURN VALUE
The I<getopt()> function returns the option character if the option was found
successfully, `:' if there was a missing parameter for one of the options,
`?' for an unknown option character, or C<EOF> for the end of the option list.
I<getopt_long()> and I<getopt_long_only()> also return the option
character when a short option is recognized. For a long option, they
return C<val> if C<flag> is C<NULL>, and 0 otherwise. Error and C<EOF>
returns are the same as for I<getopt()>, plus `?' for an ambiguous match
or an extraneous parameter.
=head1 ENVIRONMENT VARIABLES
=over 4
=item C<POSIXLY_CORRECT>
If this is set, then option processing stops as soon as a non-option
argument is encountered.
=item C<_>I<PID>C<_GNU_nonoption_argv_flags_>
This variable was used by I<bash> 2.0 to communicate to GNU libc which
arguments are the results of wildcard expansion and so should not be
considered as options. This behaviour was removed in I<bash> version 2.01,
but the support remains in GNU libc.
=back
=head1 EXAMPLE
The following example program, from the source code, illustrates the
use of I<getopt_long(3)> with most of its features.
#include <stdio.h>
#ifndef HAVE_GETOPT_LONG
#include <slack/getopt.h>
#else
#include <getopt.h>
#endif
int
main (argc, argv)
int argc;
char **argv;
{
int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
int option_index = 0;
static struct option long_options[] =
{
{"add", 1, 0, 0},
{"append", 0, 0, 0},
{"delete", 1, 0, 0},
{"verbose", 0, 0, 0},
{"create", 1, 0, 'c'},
{"file", 1, 0, 0},
{0, 0, 0, 0}
};
c = getopt_long (argc, argv, "abc:d:012",
long_options, &option_index);
if (c == -1)
break;
switch (c)
{
case 0:
printf ("option %s", long_options[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
break;
case '0':
case '1':
case '2':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case 'a':
printf ("option a\n");
break;
case 'b':
printf ("option b\n");
break;
case 'c':
printf ("option c with value `%s'\n", optarg);
break;
case 'd':
printf ("option d with value `%s'\n", optarg);
break;
case '?':
break;
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
printf ("\n");
}
exit (0);
}
=head1 BUGS
This manpage is confusing.
The POSIX.2 specification of I<getopt()> has a technical
error described in POSIX.2 Interpretation 150. The GNU
implementation (and probably all other implementations)
implements the correct behaviour rather than that speci-
fied.
=head1 CONFORMING TO
=over 4
=item I<getopt()>:
POSIX.2, provided the environment variable POSIXLY_CORRECT is set.
Otherwise, the elements of C<argv> aren't really const, because we
permute them. We pretend they're const in the prototype to be
compatible with other systems.
=back
=cut
*/
#include "getopt.h"
#include <string.h>
#include <sys/types.h>
#if 0
#include <stdio-common/_itoa.h>
#endif
pid_t getpid();
/* Variable to synchronize work. */
char *__getopt_nonoption_flags;
/* Lower-case digits. */
const char _itoa_lower_digits[]
= "0123456789abcdefghijklmnopqrstuvwxyz";
/* Upper-case digits. */
const char _itoa_upper_digits[]
= "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
/* Convert VALUE into ASCII in base BASE (2..36).
Write backwards starting the character just before BUFLIM.
Return the address of the first (left-to-right) character in the number.
Use upper case letters iff UPPER_CASE is nonzero. */
extern char *_itoa (unsigned long int value, char *buflim,
unsigned int base, int upper_case);
static char *
_itoa_word (unsigned long value, char *buflim,
unsigned int base, int upper_case)
{
extern const char _itoa_upper_digits[], _itoa_lower_digits[];
const char *digits = upper_case ? _itoa_upper_digits : _itoa_lower_digits;
char *bp = buflim;
switch (base)
{
#define SPECIAL(Base) \
case Base: \
do \
*--bp = digits[value % Base]; \
while ((value /= Base) != 0); \
break
SPECIAL (10);
SPECIAL (16);
SPECIAL (8);
default:
do
*--bp = digits[value % base];
while ((value /= base) != 0);
}
return bp;
}
/* Remove the environment variable "_<PID>_GNU_nonoption_argv_flags_" if
it is still available. If the getopt functions are also used in the
application it does not exist anymore since it was saved for the use
in getopt. */
void
__getopt_clean_environment (char **env)
{
/* Bash 2.0 puts a special variable in the environment for each
command it runs, specifying which ARGV elements are the results
of file name wildcard expansion and therefore should not be
considered as options. */
static const char envvar_tail[] = "_GNU_nonoption_argv_flags_=";
char var[100];
char *cp, **ep;
size_t len;
/* Construct the "_<PID>_GNU_nonoption_argv_flags_=" string. We must
not use `sprintf'. */
cp = memcpy (&var[sizeof (var) - sizeof (envvar_tail)], envvar_tail,
sizeof (envvar_tail));
cp = _itoa_word (getpid (), cp, 10, 0);
*--cp = '_';
len = (var + sizeof (var) - 1) - cp;
for (ep = env; *ep != NULL; ++ep)
if (!strncmp (*ep, cp, len))
{
/* Found it. Store this pointer and move later ones back. */
char **dp = ep;
__getopt_nonoption_flags = &(*ep)[len];
do
dp[0] = dp[1];
while (*dp++);
/* Continue the loop in case the name appears again. */
}
}
/* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to [email protected]
before changing it!
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
#ifndef _NO_PROTO
# define _NO_PROTO
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
# ifndef const
# define const
# endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
# include <gnu-versions.h>
# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
# define ELIDE_CODE
# endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
# include <stdlib.h>
# include <unistd.h>
#endif /* GNU C library. */
#ifdef VMS
# include <unixlib.h>
# if HAVE_STRING_H - 0
# include <string.h>
# endif
#endif
#ifndef _
/* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */
# ifdef HAVE_LIBINTL_H
# include <libintl.h>
# define _(msgid) gettext (msgid)
# else
# define _(msgid) (msgid)
# endif
#endif
/* This version of `getopt' appears to the caller like standard Unix `getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As `getopt' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
Setting the environment variable POSIXLY_CORRECT disables permutation.
Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
#include "getopt.h"
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* 1003.2 says this must be 1 before any call. */
int optind = 1;
/* Formerly, initialization of getopt depended on optind==0, which
causes problems with re-calling getopt as programs generally don't
know that. */
int __getopt_initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a NULL string, it means resume the scan
by advancing to the next ARGV-element. */
static char *nextchar;
/* Callers store zero here to inhibit the error message
for unrecognized options. */
int opterr = 1;
/* Set to an option character which was unrecognized.
This must be initialized on some systems to avoid linking in the
system's own getopt implementation. */
int optopt = '?';
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters.
PERMUTE is the default. We permute the contents of ARGV as we scan,
so that eventually all the non-options are at the end. This allows options
to be given in any order, even with programs that were not written to
expect this.
RETURN_IN_ORDER is an option available to programs that were written
to expect options and other ARGV-elements in any order and that care about
the ordering of the two. We describe each non-option ARGV-element
as if it were the argument of an option with character code 1.
Using `-' as the first character of the list of option characters
selects this mode of operation.
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
static enum
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} ordering;
/* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct;
#ifdef __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
in GCC. */
# include <string.h>
# define my_index strchr
#else
# if HAVE_STRING_H
# include <string.h>
# else
# include <strings.h>
# endif
/* Avoid depending on library functions or files
whose names are inconsistent. */
#ifndef getenv
extern char *getenv ();
#endif
static char *
my_index (str, chr)
const char *str;
int chr;
{
while (*str)
{
if (*str == chr)
return (char *) str;
str++;
}
return 0;
}
/* If using GCC, we can safely declare strlen this way.
If not using GCC, it is ok not to declare it. */
#ifdef __GNUC__
/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
That was relevant to code that was here before. */
# if (!defined __STDC__ || !__STDC__) && !defined strlen
/* gcc with -traditional declares the built-in strlen to return int,
and has done so at least since version 2.4.5. -- rms. */
extern int strlen (const char *);
# endif /* not __STDC__ */
#endif /* __GNUC__ */
#endif /* not __GNU_LIBRARY__ */
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
been skipped. `first_nonopt' is the index in ARGV of the first of them;
`last_nonopt' is the index after the last of them. */
static int first_nonopt;
static int last_nonopt;
#ifdef _LIBC
/* Bash 2.0 gives us an environment variable containing flags
indicating ARGV elements that should not be considered arguments. */
/* Defined in getopt_init.c */
extern char *__getopt_nonoption_flags;
static int nonoption_flags_max_len;
static int nonoption_flags_len;
static int original_argc;
static char *const *original_argv;
/* Make sure the environment variable bash 2.0 puts in the environment
is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */
static void
__attribute__ ((unused))
store_args_and_env (int argc, char *const *argv)
{
/* XXX This is no good solution. We should rather copy the args so
that we can compare them later. But we must not use malloc(3). */
original_argc = argc;
original_argv = argv;
}
# ifdef text_set_element
text_set_element (__libc_subinit, store_args_and_env);
# endif /* text_set_element */
# define SWAP_FLAGS(ch1, ch2) \
if (nonoption_flags_len > 0) \
{ \
char __tmp = __getopt_nonoption_flags[ch1]; \
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
__getopt_nonoption_flags[ch2] = __tmp; \
}
#else /* !_LIBC */
# define SWAP_FLAGS(ch1, ch2)
#endif /* _LIBC */
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
The other is elements [last_nonopt,optind), which contains all
the options processed since those non-options were skipped.
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
#if defined __STDC__ && __STDC__
static void exchange (char **);
#endif
static void
exchange (argv)
char **argv;
{
int bottom = first_nonopt;
int middle = last_nonopt;
int top = optind;
char *tem;
/* Exchange the shorter segment with the far end of the longer segment.
That puts the shorter segment into the right place.
It leaves the longer segment in the right place overall,
but it consists of two parts that need to be swapped next. */
#ifdef _LIBC
/* First make sure the handling of the `__getopt_nonoption_flags'
string can work normally. Our top argument must be in the range
of the string. */
if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
{
/* We must extend the array. The user plays games with us and
presents new arguments. */
char *new_str = malloc (top + 1);
if (new_str == NULL)
nonoption_flags_len = nonoption_flags_max_len = 0;
else
{
memset (__mempcpy (new_str, __getopt_nonoption_flags,
nonoption_flags_max_len),
'\0', top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str;
}
}
#endif
while (top > middle && middle > bottom)
{
if (top - middle > middle - bottom)
{
/* Bottom segment is the short one. */
int len = middle - bottom;
register int i;
/* Swap it with the top part of the top segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[top - (middle - bottom) + i];
argv[top - (middle - bottom) + i] = tem;
SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
}
/* Exclude the moved bottom segment from further swapping. */
top -= len;
}
else
{
/* Top segment is the short one. */
int len = top - middle;
register int i;
/* Swap it with the bottom part of the bottom segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[middle + i];
argv[middle + i] = tem;
SWAP_FLAGS (bottom + i, middle + i);
}
/* Exclude the moved top segment from further swapping. */
bottom += len;
}
}
/* Update records for the slots the non-options now occupy. */
first_nonopt += (optind - last_nonopt);
last_nonopt = optind;
}
/* Initialize the internal data when the first call is made. */
#if defined __STDC__ && __STDC__
static const char *_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
_getopt_initialize (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
first_nonopt = last_nonopt = optind;
nextchar = NULL;
posixly_correct = getenv ("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */
if (optstring[0] == '-')
{
ordering = RETURN_IN_ORDER;
++optstring;
}
else if (optstring[0] == '+')
{
ordering = REQUIRE_ORDER;
++optstring;
}
else if (posixly_correct != NULL)
ordering = REQUIRE_ORDER;
else
ordering = PERMUTE;
#ifdef _LIBC
if (posixly_correct == NULL
&& argc == original_argc && argv == original_argv)
{
if (nonoption_flags_max_len == 0)
{
if (__getopt_nonoption_flags == NULL
|| __getopt_nonoption_flags[0] == '\0')
nonoption_flags_max_len = -1;
else
{
const char *orig_str = __getopt_nonoption_flags;
int len = nonoption_flags_max_len = strlen (orig_str);
if (nonoption_flags_max_len < argc)
nonoption_flags_max_len = argc;
__getopt_nonoption_flags =
(char *) malloc (nonoption_flags_max_len);
if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1;
else
memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
'\0', nonoption_flags_max_len - len);
}
}
nonoption_flags_len = nonoption_flags_max_len;
}
else
nonoption_flags_len = 0;
#endif
return optstring;
}
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
If an element of ARGV starts with '-', and is not exactly "-" or "--",
then it is an option element. The characters of this element
(aside from the initial '-') are option characters. If `getopt'
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
If `getopt' finds another option character, it returns that character,
updating `optind' and `nextchar' so that the next call to `getopt' can
resume the scan with the following option character or ARGV-element.
If there are no more option characters, `getopt' returns -1.
Then `optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
OPTSTRING is a string containing the legitimate option characters.
If an option character is seen that is not listed in OPTSTRING,
return '?' after printing an error message. If you set `opterr' to
zero, the error message is suppressed but we still return '?'.
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
so the following text in the same ARGV-element, or the text of the following
ARGV-element, is returned in `optarg'. Two colons mean an option that
wants an optional arg; if there is text in the current ARGV-element,
it is returned in `optarg', otherwise `optarg' is set to zero.
If OPTSTRING starts with `-' or `+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
Long-named options begin with `--' instead of `-'.
Their names may be abbreviated as long as the abbreviation is unique
or is an exact match for some defined option. If they have an
argument, it follows the option name in the same ARGV-element, separated
from the option name by a `=', or else the in next ARGV-element.
When `getopt' finds a long-named option, it returns 0 if that option's
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
LONGIND returns the index in LONGOPT of the long-named option found.
It is only valid when a long-named option has been found by the most
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options. */
int
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
int argc;
char *const *argv;
const char *optstring;
const struct option *longopts;
int *longind;
int long_only;
{
optarg = NULL;
if (optind == 0 || !__getopt_initialized)
{
if (optind == 0)
optind = 1; /* Don't scan ARGV[0], the program name. */
optstring = _getopt_initialize (argc, argv, optstring);
__getopt_initialized = 1;
}
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
from the shell indicating it is not an option. The later information
is only used when the used in the GNU libc. */
#ifdef _LIBC
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
|| (optind < nonoption_flags_len \
&& __getopt_nonoption_flags[optind] == '1'))
#else
# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
#endif
if (nextchar == NULL || *nextchar == '\0')
{
/* Advance to the next ARGV-element. */
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
moved back by the user (who may also have changed the arguments). */
if (last_nonopt > optind)
last_nonopt = optind;
if (first_nonopt > optind)
first_nonopt = optind;
if (ordering == PERMUTE)
{
/* If we have just processed some options following some non-options,
exchange them so that the options come first. */
if (first_nonopt != last_nonopt && last_nonopt != optind)
exchange ((char **) argv);
else if (last_nonopt != optind)
first_nonopt = optind;
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
while (optind < argc && NONOPTION_P)
optind++;
last_nonopt = optind;
}
/* The special ARGV-element `--' means premature end of options.
Skip it like a NULL option,
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
if (optind != argc && !strcmp (argv[optind], "--"))
{
optind++;
if (first_nonopt != last_nonopt && last_nonopt != optind)
exchange ((char **) argv);
else if (first_nonopt == last_nonopt)
first_nonopt = optind;
last_nonopt = argc;
optind = argc;
}
/* If we have done all the ARGV-elements, stop the scan
and back over any non-options that we skipped and permuted. */
if (optind == argc)
{
/* Set the next-arg-index to point at the non-options
that we previously skipped, so the caller will digest them. */
if (first_nonopt != last_nonopt)
optind = first_nonopt;
return -1;
}
/* If we have come to a non-option and did not permute it,
either stop the scan or describe it to the caller and pass it by. */
if (NONOPTION_P)
{
if (ordering == REQUIRE_ORDER)
return -1;
optarg = argv[optind++];
return 1;
}
/* We have found another option-ARGV-element.
Skip the initial punctuation. */
nextchar = (argv[optind] + 1
+ (longopts != NULL && argv[optind][1] == '-'));
}
/* Decode the current option-ARGV-element. */
/* Check whether the ARGV-element is a long option.
If long_only and the ARGV-element has the form "-f", where f is
a valid short option, don't consider it an abbreviated form of
a long option that starts with f. Otherwise there would be no
way to give the -f short option.
On the other hand, if there's a long option "fubar" and
the ARGV-element is "-fu", do consider that an abbreviation of
the long option, just like "--fu", and not "-f" with arg "u".
This distinction seems to be the most useful approach. */
if (longopts != NULL
&& (argv[optind][1] == '-'
|| (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
{
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = -1;
int option_index;
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if ((unsigned int) (nameend - nextchar)
== (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
if (opterr)
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
argv[0], argv[optind]);
nextchar += strlen (nextchar);
optind++;
optopt = 0;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
optind++;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
optarg = nameend + 1;
else
{
if (opterr)
{
if (argv[optind - 1][1] == '-')
/* --option */
fprintf (stderr,
_("%s: option `--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
else
/* +option or -option */
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
}
nextchar += strlen (nextchar);
optopt = pfound->val;
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (optind < argc)
optarg = argv[optind++];
else
{
if (opterr)
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
}
}
nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
/* Can't find it as a long option. If this is not getopt_long_only,
or the option starts with '--' or is not a valid short
option, then it's an error.
Otherwise interpret it as a short option. */
if (!long_only || argv[optind][1] == '-'
|| my_index (optstring, *nextchar) == NULL)
{
if (opterr)
{
if (argv[optind][1] == '-')
/* --option */
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
argv[0], nextchar);
else
/* +option or -option */
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
argv[0], argv[optind][0], nextchar);
}
nextchar = (char *) "";
optind++;
optopt = 0;
return '?';
}
}
/* Look at and handle the next short option-character. */
{
char c = *nextchar++;
char *temp = my_index (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*nextchar == '\0')
++optind;
if (temp == NULL || c == ':')
{
if (opterr)
{
if (posixly_correct)
/* 1003.2 specifies the format of this message. */
fprintf (stderr, _("%s: illegal option -- %c\n"),
argv[0], c);
else
fprintf (stderr, _("%s: invalid option -- %c\n"),
argv[0], c);
}
optopt = c;
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
if (temp[0] == 'W' && temp[1] == ';')
{
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound = 0;
int option_index;
/* This is an option that requires an argument. */
if (*nextchar != '\0')
{
optarg = nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
optind++;
}
else if (optind == argc)
{
if (opterr)
{
/* 1003.2 specifies the format of this message. */
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
return c;
}
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
optarg = argv[optind++];
/* optarg is now the argument, see if it's in the
table of longopts. */
for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if ((unsigned int) (nameend - nextchar) == strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
if (opterr)
fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
argv[0], argv[optind]);
nextchar += strlen (nextchar);
optind++;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
optarg = nameend + 1;
else
{
if (opterr)
fprintf (stderr, _("\
%s: option `-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
nextchar += strlen (nextchar);
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (optind < argc)
optarg = argv[optind++];
else
{
if (opterr)
fprintf (stderr,
_("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
nextchar = NULL;
return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
if (temp[2] == ':')
{
/* This is an option that accepts an argument optionally. */
if (*nextchar != '\0')
{
optarg = nextchar;
optind++;
}
else
optarg = NULL;
nextchar = NULL;
}
else
{
/* This is an option that requires an argument. */
if (*nextchar != '\0')
{
optarg = nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
optind++;
}
else if (optind == argc)
{
if (opterr)
{
/* 1003.2 specifies the format of this message. */
fprintf (stderr,
_("%s: option requires an argument -- %c\n"),
argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
}
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
optarg = argv[optind++];
nextchar = NULL;
}
}
return c;
}
}
int
getopt (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0);
}
#endif /* Not ELIDE_CODE. */
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "getopt.h"
#if !defined __STDC__ || !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
#define const
#endif
#endif
#include <stdio.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#define GETOPT_INTERFACE_VERSION 2
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
#include <gnu-versions.h>
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
#define ELIDE_CODE
#endif
#endif
#ifndef ELIDE_CODE
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
#include <stdlib.h>
#endif
#ifndef NULL
#define NULL 0
#endif
int
getopt_long (argc, argv, options, long_options, opt_index)
int argc;
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
If an option that starts with '-' (not '--') doesn't match a long option,
but does match a short option, it is parsed as a short option
instead. */
int
getopt_long_only (argc, argv, options, long_options, opt_index)
int argc;
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
#endif /* Not ELIDE_CODE. */
#ifdef TEST
#include <stdlib.h>
#include <stdio.h>
int
main (argc, argv)
int argc;
char **argv;
{
int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
int option_index = 0;
static struct option long_options[] =
{
{"add", 1, 0, 0},
{"append", 0, 0, 0},
{"delete", 1, 0, 0},
{"verbose", 0, 0, 0},
{"create", 0, 0, 0},
{"file", 1, 0, 0},
{0, 0, 0, 0}
};
c = getopt_long (argc, argv, "abc:d:0123456789",
long_options, &option_index);
if (c == -1)
break;
switch (c)
{
case 0:
printf ("option %s", long_options[option_index].name);
if (optarg)
printf (" with arg %s", optarg);
printf ("\n");
break;
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case 'a':
printf ("option a\n");
break;
case 'b':
printf ("option b\n");
break;
case 'c':
printf ("option c with value `%s'\n", optarg);
break;
case 'd':
printf ("option d with value `%s'\n", optarg);
break;
case '?':
break;
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
printf ("\n");
}
exit (0);
}
#endif /* TEST */
/* vi:set ts=8 sw=2 sts=2: */
|
the_stack_data/90762227.c
|
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef ptrdiff_t sea_ptrdiff_t;
/* need size to be signed */
typedef ptrdiff_t sea_size_t;
extern int8_t * nd_int8_ptr (void);
extern int64_t nd_int64_t (void);
extern sea_size_t nd_sea_size_t (void);
static int8_t* sea_bad_ptr;
static bool sea_active;
static int8_t *sea_top_alloc;
extern void __VERIFIER_assume (int);
__attribute__((__noreturn__)) extern void __VERIFIER_error (void);
#define assume __VERIFIER_assume
#define assert(X) if(!(X)){__VERIFIER_error ();}
/* __attribute__((always_inline)) void assert (int v) { if (!v) __VERIFIER_error (); } */
__attribute__((used)) void sea_abc_assert_valid_ptr (int8_t *base, sea_ptrdiff_t offset);
__attribute__((used)) void sea_abc_assert_valid_offset (sea_ptrdiff_t offset, sea_size_t size);
__attribute__((used)) void sea_abc_log_ptr (int8_t *base, sea_ptrdiff_t offset);
__attribute__((used)) void sea_abc_log_load_ptr (int8_t *lhs, int8_t *ptr);
__attribute__((used)) void sea_abc_log_store_ptr (int8_t *value, int8_t *ptr);
__attribute__((used)) void sea_abc_alloc (int8_t *base, sea_size_t size);
__attribute__((used)) void sea_abc_init(void);
#ifdef __cplusplus
}
#endif
/*
* checks that base + offset is a valid pointer
* insert after every load/store when size is unknown
* base is a base pointer of some gep
* offset is the computed offset _Should be adjusted for used size if needed_
*/
void sea_abc_assert_valid_ptr (int8_t *base, sea_ptrdiff_t offset)
{
/* base is not tracked, or base + offset is below bad region */
assert (base > sea_bad_ptr || base + offset < sea_bad_ptr);
}
/**
* insert after every load/store when offset and size are known
* offset is the computed offset
* size is a constant size
*/
void sea_abc_assert_valid_offset (sea_ptrdiff_t offset, sea_size_t size)
{
assert (offset <= size);
/* TODO: do not know how to check for underflow */
}
/**
* insert after every p = gep(base, offset), if p is used indirectly
* base - the base argument to gep
* offset - the computed offset from gep + used_size
*/
void sea_abc_log_ptr (int8_t *base, sea_ptrdiff_t offset) {}
/**
* insert extra assumptions when a pointer is read from memory.
* lhs := mem[ptr], where lhs is a pointer
* ptr - pointer operand of the load
* lhs - lhs of the load
**/
void sea_abc_log_load_ptr (int8_t *lhs, int8_t *ptr /*unused*/) {}
/**
* insert extra assertions when a pointer is written into memory.
* mem[ptr] := value, where value is a pointer
* ptr - pointer operand of the store
* value - pointer value of the store
**/
void sea_abc_log_store_ptr (int8_t *value, int8_t *ptr /*unused*/) {}
/**
* insert after every allocation instruction
* base - pointer to allocated buffer
* size - the size of the allocated buffer
*/
void sea_abc_alloc (int8_t *base, sea_size_t size)
{
/* assume all pointers are strictly positive
(and trick LLVM into not reducing the assumption to nothing)
*/
int8_t *tmp = nd_int8_ptr ();
assume (((ptrdiff_t)tmp) > 0);
assume (tmp == base);
if (nd_sea_size_t ())
{
/* at some point, allocate a pointer below the bad region */
assume (!sea_active);
sea_active = true;
assume (base + size < sea_bad_ptr);
}
else
{
/* in the normal mode, allocate above the bad region */
assume (base > sea_top_alloc);
assume (/* optional */ sea_top_alloc > sea_bad_ptr);
sea_top_alloc += size;
}
}
void sea_abc_init(void)
{
/* pick a bad pointer. A bad pointer is an address that should never
be accessed */
sea_bad_ptr = nd_int8_ptr ();
int8_t *tmp = nd_int8_ptr ();
assume (((ptrdiff_t)tmp) > 0);
assume (tmp == sea_bad_ptr);
sea_active = false;
sea_top_alloc = nd_int8_ptr ();
assume (sea_top_alloc > sea_bad_ptr);
}
|
the_stack_data/705489.c
|
/* An example of using inline assembly macros in a program*/
#include <stdio.h>
#define GREATER(a, b, result) ({ \
asm("cmp %1, %2\n\t" \
"jge 0f\n\t" \
"movl %1, %0\n\t" \
"jmp 1f\n" \
"0:\n\t" \
"movl %2, %0\n" \
"1:" \
: "=r"(result) \
: "r"(a), "r"(b)); })
int main(int argc, char **argv)
{
int data1 = 10;
int data2 = 20;
int result;
GREATER(data1, data2, result);
printf("a=%d, b=%d, result=%d\n", data1, data2, result);
data1 = 30;
GREATER(data1, data2, result);
printf("a=%d, b=%d, result=%d\n", data1, data2, result);
return 0;
}
|
the_stack_data/83942.c
|
/* Find the minimum number of scaler multiplication for chain of matrix using
dynamic programming approach and find the time complexity also. Consider the given
set ofmatrices A1 , A2 , A3 ,A4 with p0 = 5 , p1 = 4 , p2 = 6, p3 = 2 , p4 = 7. */
#include<stdio.h>
#include<stdlib.h>
int p[100], mt[100][100], st[100][100];
void print_optimal(int i , int j){
if(i==j){
printf("A%d ", i);
}
else{
printf("(");
print_optimal(i, st[i][j]);
print_optimal(st[i][j] + 1, j);
printf(")");
}
}
int main(){
int i, j, k, m,n, l, q;
printf("Enter no. of elements in p: ", m);
scanf("%d",&m);
for(i=0;i<m;i++){
printf("Enter the value P %d ", i);
scanf("%d", &p[i]);
printf("\n");
}
n = m - 1;
for(i=1;i<=4;i++){
mt[i][i] = 0;
st[i][i] = 0;
}
for(l=2; l<=n;l++ ){
for(i=1;i<=(n-l+1);i++){
j = i+l-1;
mt[i][j] = 1000000;
for(k = i ; k<=(j-1); k++){
q = mt[i][k] + mt[k+1][j] + (p[i-1] * p[k] * p[j]);
if(q< mt[i][j]){
mt[i][j] = q;
st[i][j] = k;
}
}
}
}
printf("\n\n M Table \n\n");
for(i = 1; i<=4; i++){
for(j=1;j<=4;j++){
printf("%d ", mt[i][j]);
}
printf("\n");
}
printf("\n\n S Table \n\n");
for(i = 1; i<=4; i++){
for(j=1;j<=4;j++){
printf("%d ", st[i][j]);
}
printf("\n");
}
print_optimal(1 , n);
printf("\nHence minimum cost for multiplication will be = %d",
mt[1][n]);
}
/*OUTPUT
Enter no. of elements in p: 5
Enter the value P 0 - 5
Enter the value P 1 - 4
Enter the value P 2 - 6
Enter the value P 3 - 2
Enter the value P 4 - 7
M Table
0 120 88 158
0 0 48 104
0 0 0 84
0 0 0 0
S Table
0 1 1 3
0 0 2 3
0 0 0 3
0 0 0 0
((A1 (A2 A3)) A4)
Hence minimum cost for multiplication will be = 158
*/
|
the_stack_data/51701005.c
|
extern void foo();
int main()
{
foo();
return 0;
}
|
the_stack_data/73575591.c
|
/* solution to labs
display 1-10 in reverse order(seperate line)
21/10/2015
*/
#include <stdio.h>
main()
{
int num= 0;
int steps= 0;
while (num < 1)
{
printf("Enter a number \n");
scanf("%d", &num);
}
do
{
//check if even
if (num % 2 == 0)
{
num = num /2;
printf("\n Value of num is %d",num);
}//end if
else
{
num=(num*3)+1;
printf("\n Value of num is %d",num);
}
steps++;
}//end while
while(num !=1);
printf("\nThe final value i is %d. \nThe number of steps taken is %d",num, steps);
getchar();
getchar();
}//end main
|
the_stack_data/273452.c
|
//
#include <stdio.h>
int main(){
int a,b,c;
printf("Please enter 3 numbers separated by spaces > ");
scanf("%d%d%d",&a,&b,&c);
if(((a>b)&&(a<c))||((a<b)&&(a>c)))
printf("%d is the median\n",a);
else if(((b>a)&&(b<c))||((b<a)&&(b>c)))
printf("%d is the median\n",b);
else if (((c>a)&&(c<b))||((c<a)&&(c>b)))
printf("%d is the median\n",c);
return 0;
}
|
the_stack_data/15482.c
|
#ifdef USE_SPI
#include "Platform.h"
#include "Globals.h"
#define SPI_Mode_Master Bit(2)
#define SPI_CPHA_2Edge Bit(0)
#define SPI_NSS_Soft Bit(9)
#define SPI_BaudRatePrescaler_16 (3<<3)
#define SPI_CPOL_High Bit(1)
#define SPI_TXE Bit(1)
#define SPI_RXNE Bit(0)
#define SPI_BSY Bit(7)
#define SPI1CLK Bit(12) //APB2
#define SPI2CLK Bit(14) //APB1
#define SPI3CLK Bit(15) //APB1
//****************************************************************************
// MCU specific routines
//
void SPI_Init(SPI_TypeDef *SPI)
{
//MOSI & MISO on different pins as normal
//system clock 72MHz - div16=4.5MHz,
//clock is idle high
//with clock high, second edge is rising
//
//Normal to have SPI MSB transmitted first
switch ((uint32_t)SPI )
{
case (uint32_t)SPI1:
RCC->APB2RSTR |= SPI1CLK ; // Reset the peripheral
RCC->APB2RSTR &= ~SPI1CLK ;
RCC->APB2ENR |= SPI1CLK ; // Enable clock
break;
case (uint32_t)SPI2:
RCC->APB1RSTR |= SPI2CLK ; // Reset the peripheral
RCC->APB1RSTR &= ~SPI2CLK ;
RCC->APB1ENR |= SPI2CLK ; // Enable clock
break;
// case (uint32_t)SPI3: // Not available on BluePill
// RCC->APB1RSTR |= SPI2CLK ; // Reset the peripheral
// RCC->APB1RSTR &= ~SPI2CLK ;
// RCC->APB1ENR |= SPI2CLK ; // Enable clock
// break;
}
// SPI->CR1 = SPI_Direction_2Lines_FullDuplex | (1<<2) | SPI_CPOL_High |
// SPI_CPHA_2Edge | SPI_NSS_Hard |
// SPI_BaudRatePrescaler_32 | SPI_FirstBit_MSB;
SPI->CR1 = (4<<3) | 7;
SPI->CR2 = Bit(2);
SPI->CR1 |= Bit(6);
}
bool SPI_Busy(SPI_TypeDef *SPI)
{
bool res = false;
if( SPI->SR & SPI_BSY)
{
res = true;
}
return res;
}
uint8_t SPI_Read(SPI_TypeDef *SPI)
{
while(!(SPI->SR & SPI_RXNE))
{}
return SPI->DR;
}
void SPI_Write(SPI_TypeDef *SPI, uint8_t v)
{
while(!(SPI->SR & SPI_TXE))
{}
SPI->DR = v;
}
//****************************************************************************
// Select SPI address (drive chip select)
//
//****************************************************************************
void SPI_Select_Address(GPIO_TypeDef* port, uint16_t pin, bool state)
{
WriteIOBit(port, pin, state);
}
#endif //USE_SPI
|
the_stack_data/192330755.c
|
#include<stdio.h>
int main()
{
int i,count;
for(i=1;i<7;i++)
{
for(count=1;count<=i;count++)
{
printf("01");
}
printf("\n");
}
return 0;
}
|
the_stack_data/89201541.c
|
#include <string.h>
size_t strlen(const char *s)
{
const char *p = s;
while (*p) {
p++;
}
return p - s;
}
|
the_stack_data/2881.c
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* Copyright 2021 Melwyn Francis Carlo */
int main()
{
int count = 0;
int products_list[4][2];
for (int i = 10; i <= 50; i++)
{
for (int j = 10; j <= 99; j++)
{
if ((i >= j) || ((i % 10) == 0) || ((j % 10) == 0))
continue;
char temp_str_1[11] = { 0 };
sprintf(&temp_str_1[0], "%d", i);
char temp_str_2[11] = { 0 };
sprintf(&temp_str_2[0], "%d", j);
char temp_str_3[2] = { 0 };
char temp_str_4[2] = { 0 };
if ((temp_str_1[0] == temp_str_2[0])
&& (temp_str_1[1] != temp_str_2[1]))
{
temp_str_3[0] = temp_str_1[1];
temp_str_4[0] = temp_str_2[1];
}
else if ((temp_str_1[0] == temp_str_2[1])
&& (temp_str_1[1] != temp_str_2[0]))
{
temp_str_3[0] = temp_str_1[1];
temp_str_4[0] = temp_str_2[0];
}
else if ((temp_str_1[1] == temp_str_2[0])
&& (temp_str_1[0] != temp_str_2[1]))
{
temp_str_3[0] = temp_str_1[0];
temp_str_4[0] = temp_str_2[1];
}
else if ((temp_str_1[1] == temp_str_2[1])
&& (temp_str_1[0] != temp_str_2[0]))
{
temp_str_3[0] = temp_str_1[0];
temp_str_4[0] = temp_str_2[0];
}
if (temp_str_3[0] != 0)
{
float value_1 = (int)((float)i * 100000.0 / (float)j) / 100000.0;
float value_2 = (int)(atof(temp_str_3) * 100000.0 / atof(temp_str_4)) / 100000.0;
if (value_1 == value_2)
{
products_list[count][0] = i;
products_list[count][1] = j;
count++;
}
}
}
}
products_list[0][0] *= products_list[1][0] * products_list[2][0] * products_list[3][0];
products_list[0][1] *= products_list[1][1] * products_list[2][1] * products_list[3][1];
while ((products_list[0][0] != 1) && (products_list[0][1] != 1))
{
int i = 2;
int reduced = 0;
while (!reduced)
{
if (((products_list[0][0] % i) == 0) && ((products_list[0][1] % i) == 0))
{
products_list[0][0] /= i;
products_list[0][1] /= i;
reduced = 1;
}
else
{
i++;
}
}
}
printf("%d\n", products_list[0][1]);
return 0;
}
|
the_stack_data/34512437.c
|
/* Using a pipe to connect ls and wc */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
#define BUF_SIZE 10
void errExit(char * str) {
perror(str);
exit(EXIT_FAILURE);
}
int main(int argc, char * argv[]) {
int pfd[2]; // Pipe file descriptors
if (pipe(pfd) == -1) { // Create pipe
errExit("pipe");
}
switch (fork()) { // Fork child process for ls
case -1:
errExit("fork");
case 0: // First child: exec 'ls' to write to pipe
if (close(pfd[0]) == -1) { // Read end is unused for ls
errExit("close");
}
/* Duplicate stdout on write end of pipe; close duplicated descriptors */
// Make sure pfd[1] != STDOUT_FILENO right now
if (pfd[1] != STDOUT_FILENO) { // Defensive check
// if STDOUT_FILENO is open and dup2() failed to close it,
// the error will be silentltly ignored, so it's better
// to close STDOUT_FILENO explicitly
if (close(STDOUT_FILENO) == -1) {
errExit("close 1");
}
// Duplicates pfd[1] and binds to the standard output
if (dup2(pfd[1], STDOUT_FILENO) == -1) {
errExit("dup2 1");
}
// Close the superfluous descriptors
if (close(pfd[1]) == -1) {
errExit("close 2");
}
execlp("ls", "ls", (char *)NULL); // Writes to pipe
errExit("execlp ls"); // execlp won't return if succeeded
default: // Parent falls through to create next child
break;
}
}
switch (fork()) { // Fork child process for wc
case -1:
errExit("fork");
case 0: // Second child: exec 'wc' to read to pipe
if (close(pfd[1]) == -1) { // Write end is unused for wc
errExit("close");
}
/* Duplicate stdin on read end of pipe; close duplicated descriptors */
// Make sure pfd[0] != STDIN_FILENO right now
if (pfd[0] != STDIN_FILENO) { // Defensive check
// if STDIN_FILENO is open and dup2() failed to close it,
// the error will be silentltly ignored, so it's better
// to close STDIN_FILENO explicitly
if (close(STDIN_FILENO) == -1) {
errExit("close 3");
}
// Duplicates pfd[0] and binds to the standard input
if (dup2(pfd[0], STDIN_FILENO) == -1) {
errExit("dup2 3");
}
// Close the superfluous descriptors
if (close(pfd[0]) == -1) {
errExit("close 4");
}
execlp("wc", "wc", "-l", (char *)NULL); // Reads to pipe
errExit("execlp wc"); // execlp won't return if succeeded
default: // Parent falls through
break;
}
/* Parent closes unused file descriptors for pipe, and waits for children */
if (close(pfd[0]) == -1) {
errExit("close 5");
}
if (close(pfd[1]) == -1) {
errExit("close 6");
}
if (wait(NULL) == -1) {
errExit("wait 1");
}
if (wait(NULL) == -1) {
errExit("wait 2");
}
exit(EXIT_SUCCESS);
}
}
|
the_stack_data/756751.c
|
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//random
double randoom() {
double z=rand();
double w=z/RAND_MAX;
return w;
}
//main
int main() {
//input
int m, s, x, xnew, y, ynew, t, l, i, j, n, o;
double a, p1, p2, p12, q1, q2, q12, pq12, pq21, r, tt, ttt;
printf("m\n"); //size of m
scanf("%i", &m);
printf("s\n"); //size of s
scanf("%i", &s);
printf("o\n"); //size of o
scanf("%i", &o);
printf("p1\n"); //ins I
scanf("%lf", &p1);
printf("p2\n"); //ins II
scanf("%lf", &p2);
p2=(p1+p2);
printf("p12\n"); //ins I & II
scanf("%lf", &p12);
p12=(p2+p12);
printf("q1\n"); //del I
scanf("%lf", &q1);
q1=(p12+q1);
printf("q2\n"); //del II
scanf("%lf", &q2);
q2=(q1+q2);
printf("q12\n"); //del I & II
scanf("%lf", &q12);
q12=(q2+q12);
printf("pq12\n"); //ins I & del II
scanf("%lf", &pq12);
pq12=(q12+pq12);
printf("pq21\n"); //ins II & del I
scanf("%lf", &pq21);
pq21=(pq12+pq21);
r=1; //no op
ttt=0; //time
n=10000; //num iter
r=1000; //num go
//work
for (j=0; j<r; j++) {
srand(time(NULL)); //random, init
tt=0;
for (i=0; i<n; i++) {
x=0; //size I
y=0; //size II
t=0; //time iter
l=0; //lost
//phase 1
while (l!=1) {
//prob 1
a=randoom(); //random, call
if ((a>0) && (a<p1)) { //p1
x++;
}
if ((a>p1) && (a<p2)) { //p2
y++;
}
if ((a>p2) && (a<p12)) { //p12
x++;
y++;
}
if ((a>p12) && (a<q1)) { //q1
x--;
}
if ((a>q1) && (a<q2)) { //q2
y--;
}
if ((a>q2) && (a<q12)) { //q12
x--;
y--;
}
if ((a>q12) && (a<pq12)) { //pq12
x++;
y--;
}
if ((a>pq12) && (a<pq21)) { //pq21
x--;
y++;
}
if ((a>pq21) && (a<r)) { //r
x=x;
y=y;
}
//check 1
if ((x>s) && (y>(m-s))) { //lost I & II
l=1;
xnew=x;
ynew=y;
}
if ((x>s) && (y<=(m-s))) { //lost I
l=1;
xnew=s-o+1;
ynew=y+o;
}
if ((x<=s) && (y>(m-s))) { //lost II
l=1;
xnew=x+o;
ynew=(m-s)-o+1;
}
//change 1
if ((x<0) && (y<0)) { //no minus I & II
x=0;
y=0;
}
if ((x<0) && (y<=1)) { //no minus I
x=0;
y=y;
}
if ((x<=1) && (y<0)) { //no minus II
x=x;
y=0;
}
//work-stealing 1
if ((x<0) && (y>=2)) { //I steal one
x=1;
y=y-1;
}
else if ((x>=2) && (y<0)) { //II steal one
y=1;
x=x-1;
}
}
//phase 2
l=0; //lost
x=xnew; //new size I
y=ynew; //new size II
//check
if (x>s) {l=1;} //I can't redist
if (y>(m-s)) {l=1;} //II can't redist
while (l!=1) {
//prob 2
a=randoom(); //random, call
if ((a>0) && (a<p1)) { //p1
x++;
}
if ((a>p1) && (a<p2)) { //p2
y++;
}
if ((a>p2) && (a<p12)) { //p12
x++;
y++;
}
if ((a>p12) && (a<q1)) { //q1
x--;
}
if ((a>q1) && (a<q2)) { //q2
y--;
}
if ((a>q2) && (a<q12)) { //q12
x--;
y--;
}
if ((a>q12) && (a<pq12)) { //pq12
x++;
y--;
}
if ((a>pq12) && (a<pq21)) { //pq21
x--;
y++;
}
if ((a>pq21) && (a<r)) { //r
x=x;
y=y;
}
//check 2
if ((x>s) && (y>(m-s))) { //lost I & II
l=1;
}
if ((x>s) && (y<=(m-s))) { //lost I
l=1;
}
if ((x<=s) && (y>(m-s))) { //lost II
l=1;
}
//change 2
if ((x<0) && (y<0)) { //no minus I & II
x=0;
y=0;
}
if ((x<0) && (y<=1)) { //no minus I
x=0;
y=y;
}
if ((x<=1) && (y<0)) { //no minus II
x=x;
y=0;
}
//work-stealing 2
if ((x<0) && (y>=2)) { //I steal one
x=1;
y=y-1;
}
else if ((x>=2) && (y<0)) { //II steal one
y=1;
x=x-1;
}
//result
if (l==0) { //next
t++;
}
}
tt=tt+t; //time, sum iter
}
tt=tt/n;
ttt=ttt+tt; //time, sum go
}
ttt=ttt/r;
//output
printf("Total time: %lf\n", ttt);
}
|
the_stack_data/29826244.c
|
/*
this program can be found at: http://www.thegeekstuff.com/2012/05/c-mutex-examples/?refcom
*/
#include<stdio.h>
#include<string.h>
#include<pthread.h>
#include<stdlib.h>
#include<unistd.h>
pthread_t tid[2];
int counter;
pthread_mutex_t lock;
void* doSomeThing(void *arg)
{
pthread_mutex_lock(&lock); //lock the mutex other threads can not procees even if scheduled by the scheduler
unsigned long i = 0;
counter += 1;
printf("\n Job %d started\n", counter);
for(i=0; i<(0xFFFFFFFF);i++);
printf("\n Job %d finished\n", counter);
pthread_mutex_unlock(&lock); // unlock the mutex now other thread can proceed
return NULL;
}
int main(void)
{
int i = 0;
int err;
if (pthread_mutex_init(&lock, NULL) != 0) // declare the lock variable
{
printf("\n mutex init failed\n");
return 1;
}
while(i < 2)
{
err = pthread_create(&(tid[i]), NULL, &doSomeThing, NULL);
if (err != 0)
printf("\ncan't create thread :[%s]", strerror(err));
i++;
}
pthread_join(tid[0], NULL);
pthread_join(tid[1], NULL);
pthread_mutex_destroy(&lock); //remove the lock variable (like closing a file)
return 0;
}
|
the_stack_data/1711.c
|
#include <stdio.h>
int main()
{
int a, b, n;
char ch;
scanf("%d:%d %c", &a, &b, &ch);
ch = toupper(ch);
if (ch == 'P')
{
a+=12;}
n = a*60 + b;
printf("Closest departure time is ");
switch (n){
case 0 ... 411:
printf("8:00 a.m., arriving at 10:16 a.m.");
break;
case 412 ... 631:
printf("9:43 a.m., arriving at 11:52 a.m.");
break;
case 632 ... 723:
printf("11:19 a.m., arriving at 1:31 p.m.");
break;
case 724 ... 803:
printf("12:47 p.m., arriving at 3:00 p.m.");
break;
case 804 ... 892:
printf("2:00 p.m., arriving at 4:08 p.m.");
break;
case 893 ... 1040:
printf("3:45 p.m., arriving at 5:55 p.m.");
break;
case 1041 ... 1222:
printf("7:00 p.m., arriving at 9:20 p.m.");
break;
case 1223 ... 1972:
printf("9:45 p.m., arriving at 11:58 p.m.");
break;
default:
printf("8:00 a.m., arriving at 10:16 a.m.");
break;
}
return 0;
}
|
the_stack_data/125140446.c
|
// 把二进制数据转成一个c数组
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
typedef unsigned char u8;
typedef unsigned int u32;
void read_bin(char *file_name, u8 *buf, u8 size)
{
FILE *fp;
if(NULL == (fp=fopen(file_name, "rb")))
{
printf( "\nCan not open the file: %s \n", file_name);
exit(-1);
}
fread(buf, sizeof(u8), size, fp);
fclose(fp);
}
u32 get_file_length(char *file_name , char * mode)
{
u32 size = 0;
FILE *fp = fopen(file_name, mode);
if(NULL != fp)
{
fseek(fp, 0, SEEK_END);
size = ftell(fp);
fclose(fp);
}
return size;
}
void hex2array(char *out_file, u8 *buf, u32 size)
{
FILE *fp;
int i , k;
char pbuf[10] = {0};
char HEX_BIN_LENGTH[50];
char *array = "static const u8 hex_bin[HEX_BIN_LENGTH] = {\n";
if(NULL == (fp=fopen(out_file, "wa+")))
{
printf( "\nCan not open the file: %s \n", out_file);
exit(-1);
}
snprintf(HEX_BIN_LENGTH, 50, "\n\n#define HEX_BIN_LENGTH (%d)\n\n", size);
fwrite(HEX_BIN_LENGTH, strlen(HEX_BIN_LENGTH), 1, fp);
fwrite(array, strlen(array), 1, fp);
k = 0;
for(i = 0; i < size; i++)
{
k++;
sprintf(pbuf,"0x%02x", buf[i]);
fwrite(pbuf, strlen(pbuf), 1, fp);
if(16 != k)
fwrite(", ", strlen(", "), 1, fp);
else
fwrite(",", strlen(","), 1, fp);
if(16 == k)
{
k = 0;
fwrite("\n", strlen("\n"), 1, fp);
}
}
fseek(fp, 0, SEEK_END);
if(0 == k)
fwrite("};", strlen("};"), 1, fp);
else
fwrite("\n};", strlen("\n};"), 1, fp);
fclose(fp);
}
int main(int argc, char* argv[])
{
u8 *buf = NULL;
u32 size;
char *in_file_name = NULL;
char *out_file_name = NULL;
if(argc < 3)
{
printf("./hex2array in_bin_file out_file \n");
exit(-1);
}
in_file_name = argv[1];
out_file_name = argv[2];
size = get_file_length(in_file_name, "rb");
buf = (u8 *) malloc(size);
if(NULL == buf)
{
printf("mallc failed \n");
exit(-1);
}
read_bin(in_file_name, buf, size);
hex2array(out_file_name, buf, size);
printf("hex2array success: out -> %s\n", out_file_name);
free(buf);
buf = NULL;
exit(0);
}
|
the_stack_data/215768369.c
|
#include <stdio.h>
#include <stdlib.h>
const int RUN = 32;
int MIN(int a ,int b) {
return (a > b) ? b : a;
}
void insertionSort(int arr[], int left, int right)
{
for (int i = left + 1; i <= right; i++)
{
int temp = arr[i];
int j = i - 1;
while (arr[j] > temp && j >= left)
{
arr[j+1] = arr[j];
j--;
}
arr[j+1] = temp;
}
}
void merge(int arr[], int l, int m, int r)
{
int len1 = m - l + 1, len2 = r - m;
int left[len1], right[len2];
for (int i = 0; i < len1; i++)
left[i] = arr[l + i];
for (int i = 0; i < len2; i++)
right[i] = arr[m + 1 + i];
int i = 0;
int j = 0;
int k = l;
while (i < len1 && j < len2)
{
if (left[i] <= right[j])
{
arr[k] = left[i];
i++;
}
else
{
arr[k] = right[j];
j++;
}
k++;
}
while (i < len1)
{
arr[k] = left[i];
k++;
i++;
}
while (j < len2)
{
arr[k] = right[j];
k++;
j++;
}
}
void timSort(int arr[], int n)
{
for (int i = 0; i < n; i+=RUN)
insertionSort(arr, i, MIN((i+31), (n-1)));
for (int size = RUN; size < n; size = 2*size)
{
for (int left = 0; left < n; left += 2*size)
{
int mid = left + size - 1;
int right = MIN((left + 2*size - 1), (n-1));
merge(arr, left, mid, right);
}
}
}
void printArray(int arr[], int n)
{
for (int i = 0; i < n; i++)
printf("%d ", arr[i]);
printf("\n");
}
int main()
{
int arr[] = {5, 21, 7, 23, 19};
int n = sizeof(arr)/sizeof(arr[0]);
printf("Given Array is\n");
printArray(arr, n);
timSort(arr, n);
printf("After Sorting Array is\n");
printArray(arr, n);
return 0;
}
|
the_stack_data/59616.c
|
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
/*
* Name : <insert name here>
*
* Simple Wumpus game in 1D
*/
/* Add any #defines here */
/* Id's for thins in our Cave */
#define Empty 0
#define Wumpus 1
#define End 2
/* Number of rooms in our Cave */
#define CaveSize 20
#define ArraySize (CaveSize + 2)
/* Directions I can face */
#define Left 0
#define Right 1
/* Add any function prototypes here */
void CreateWorld(int cave[]);
int* GetEmpthRoom(int cave[]);
void DisplayWorld(int cave[], int* agent, int agentDIr);
int DifferenceByDirection(int dir);
bool DisplayStatus(int cave[], int* agent);
void OpenFire(int cave[], int* agent, int agentDIr);
int main()
{
int cave[ArraySize];
int *agentRoom;
int agentDirection;
/* Seed the random number generator */
srand(time(NULL));
CreateWorld(cave);
agentRoom = GetEmpthRoom(cave);
agentDirection = rand()%2;
char command[20];
int direction;
/* The game loop */
while(true){
if(DisplayStatus(cave, agentRoom))
break;
// DisplayWorld(cave, agentRoom, agentDirection);
/* Get the command */
printf("Command: ");
scanf("%20s", command);
if(strcmp(command, "quit") == 0)
break;
else if(strcmp(command, "move") == 0){
/* Move command */
/* What way do we need to go? */
direction = DifferenceByDirection(agentDirection);
if( *(agentRoom + direction) != End)
agentRoom += direction;
}else if(strcmp(command, "turn") == 0){
agentDirection = !agentDirection;
}else if(strcmp(command, "fire") == 0){
/* Fire command */
OpenFire(cave, agentRoom, agentDirection);
}
else
printf("I don't know what you are talking about\n");
}
}
void CreateWorld(int cave[]){
int i;
/* Initialize cave to empty */
for(i=0;i<ArraySize;i++){
cave[i]=Empty;
}
/* Set the ends */
cave[0] = End;
cave[ArraySize-1] = End;
int* room;
/* Get a random empty room and put the Wumpus in it*/
room = GetEmpthRoom(cave);
*room = Wumpus;
}
int* GetEmpthRoom(int cave[]){
int room;
do{
room = rand() % ArraySize;
}while(cave[room]!=Empty);
return &cave[room];
}
void DisplayWorld(int cave[], int* agent, int agentDIr){
int* room;
for(room = cave + 1; *room != End; room++){
if(room == agent){
switch (agentDIr)
{
case Left:
printf("<A ");
break;
case Right:
printf(" A> ");
}
continue;
}
switch(*room){
case Wumpus:
printf("-W- ");
break;
default:
printf(" . ");
break;
}
}
printf("\n");
}
int DifferenceByDirection(int dir){
if(dir == Left)
return -1;
else
return 1;
}
bool DisplayStatus(int cave[], int* agent){
if(*agent == Wumpus){
printf("You have been eaten by the Wumpus\n");
return true;
}
if(*(agent+1) == End || *(agent-1) == End){
printf("You have arrived at the end! You got win!");
return true;
}
if(*(agent-1) == Wumpus || *(agent+1) == Wumpus)
printf("I smell a Wumpus\n");
return false;
}
void OpenFire(int cave[], int* agent, int agentDIr){
int* room = agent;
int fireCounts = 3;
while((*room + 1 != End || *room - 1 != End) && fireCounts > 0){
fireCounts--;
if(agentDIr==Left)
{
room--;
}else{
room++;
}
// *room = Wumpus;
*room = Empty;
}
}
|
the_stack_data/221402.c
|
/*****************************************************************
**
** Do not modify this file, it is autogenerated by gen_selftest.pl.
** Your changes will be lost. You have been warned.
**
*****************************************************************/
/****************************************************************************
COPYRIGHT NOTICE:
The source code in this directory is provided free of
charge to anyone who wants it. It is in the public domain
and therefore may be used by anybody for any purpose. It
is provided "AS IS" with no warranty of any kind
whatsoever. For further details see the README files in
the wnlib parent directory.
****************************************************************************/
#include <stdio.h>
int wn_selftest_cpy(void)
{
printf("cpy selftest not implemented.\n");
return(0);
}
|
the_stack_data/122015558.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_itoa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: exam <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/26 11:35:43 by exam #+# #+# */
/* Updated: 2019/07/26 12:32:57 by exam ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
int count_len(int nbr)
{
int counter;
unsigned int u_nbr;
if (nbr == 0)
return (1);
counter = 0;
u_nbr = nbr;
if (nbr < 0)
{
counter++;
u_nbr = -nbr;
}
while (u_nbr > 0)
{
u_nbr /= 10;
counter++;
}
return (counter);
}
char *ft_itoa(int nbr)
{
char *str;
int len;
int is_negative;
unsigned int u_nbr;
len = count_len(nbr);
if ((str = (char*)malloc(sizeof(char) * (len + 1))) == NULL)
return (NULL);
str[len] = '\0';
is_negative = 0;
u_nbr = nbr;
if (nbr < 0)
{
is_negative = 1;
str[0] = '-';
u_nbr = -nbr;
}
len--;
while (len >= (is_negative ? 1 : 0))
{
str[len] = u_nbr % 10 + '0';
u_nbr /= 10;
len--;
}
return (str);
}
|
the_stack_data/60394.c
|
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)yyerror.c 8.1 (Berkeley) 6/4/93
*
* $DragonFly: src/lib/liby/yyerror.c,v 1.3 2008/09/30 16:57:06 swildner Exp $
*/
#include <stdio.h>
int
yyerror(char *msg)
{
(void)fprintf(stderr, "%s\n", msg);
return(0);
}
|
the_stack_data/126702037.c
|
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define LINESIZE 200
typedef struct{
char name[100];
char surname[100];
char gender[7];
char job[20];
int age;
}employees;
void get_member(employees*,int);
void employee_file(FILE*,int,employees*);
int main() {
employees* person;
int number_of_employee;
FILE* fp;
printf("Enter the number of employee: ");
scanf("%d",&number_of_employee);
person=(employees*)calloc(number_of_employee,sizeof(employees));
get_member(person,number_of_employee);
employee_file(fp,number_of_employee,person);
return 0;
}
void get_member(employees* person,int number_of_employee) {
for(int i=0; i<number_of_employee; i++) {
printf("Name of Employee %d: ",i+1);
scanf("%s",person[i].name);
printf("Surname of Employee %d: ",i+1);
scanf("%s",person[i].surname);
printf("Gender of Employee %d: ",i+1);
scanf("%s",person[i].gender);
printf("Job of Employee %d: ",i+1);
scanf("%s",person[i].job);
printf("Age of Employee %d: ",i+1);
scanf("%d",&person[i].age);
printf("\n");
}
}
void employee_file(FILE* fp,int number_of_employee, employees* person) {
int i;
char file_name[100];
char* strconcat;
for(i=0; i<number_of_employee; i++) {
strconcat= strcat(person[i].name,person[i].surname);
fp=fopen(strconcat,"w");
fprintf(fp,"Name:v%s\nSurname: %s\nGender: %s\nJob: %s\nAge: %d",person[i].name,person[i].surname,person[i].gender,person[i].job,person[i].age);
fclose(fp);
}
}
|
the_stack_data/242329939.c
|
// INFO: rcu detected stall in ext4_write_checks
// https://syzkaller.appspot.com/bug?id=87f91f41e09def756cc71d3c23f45bd93c93608c
// status:invalid
// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <dirent.h>
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
unsigned long long procid;
static void sleep_ms(uint64_t ms)
{
usleep(ms * 1000);
}
static uint64_t current_time_ms(void)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts))
exit(1);
return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000;
}
static void use_temporary_dir(void)
{
char tmpdir_template[] = "./syzkaller.XXXXXX";
char* tmpdir = mkdtemp(tmpdir_template);
if (!tmpdir)
exit(1);
if (chmod(tmpdir, 0777))
exit(1);
if (chdir(tmpdir))
exit(1);
}
static bool write_file(const char* file, const char* what, ...)
{
char buf[1024];
va_list args;
va_start(args, what);
vsnprintf(buf, sizeof(buf), what, args);
va_end(args);
buf[sizeof(buf) - 1] = 0;
int len = strlen(buf);
int fd = open(file, O_WRONLY | O_CLOEXEC);
if (fd == -1)
return false;
if (write(fd, buf, len) != len) {
int err = errno;
close(fd);
errno = err;
return false;
}
close(fd);
return true;
}
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
static void remove_dir(const char* dir)
{
DIR* dp;
struct dirent* ep;
int iter = 0;
retry:
while (umount2(dir, MNT_DETACH) == 0) {
}
dp = opendir(dir);
if (dp == NULL) {
if (errno == EMFILE) {
exit(1);
}
exit(1);
}
while ((ep = readdir(dp))) {
if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0)
continue;
char filename[FILENAME_MAX];
snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name);
while (umount2(filename, MNT_DETACH) == 0) {
}
struct stat st;
if (lstat(filename, &st))
exit(1);
if (S_ISDIR(st.st_mode)) {
remove_dir(filename);
continue;
}
int i;
for (i = 0;; i++) {
if (unlink(filename) == 0)
break;
if (errno == EPERM) {
int fd = open(filename, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno != EBUSY || i > 100)
exit(1);
if (umount2(filename, MNT_DETACH))
exit(1);
}
}
closedir(dp);
int i;
for (i = 0;; i++) {
if (rmdir(dir) == 0)
break;
if (i < 100) {
if (errno == EPERM) {
int fd = open(dir, O_RDONLY);
if (fd != -1) {
long flags = 0;
if (ioctl(fd, FS_IOC_SETFLAGS, &flags) == 0)
close(fd);
continue;
}
}
if (errno == EROFS) {
break;
}
if (errno == EBUSY) {
if (umount2(dir, MNT_DETACH))
exit(1);
continue;
}
if (errno == ENOTEMPTY) {
if (iter < 100) {
iter++;
goto retry;
}
}
}
exit(1);
}
}
static void kill_and_wait(int pid, int* status)
{
kill(-pid, SIGKILL);
kill(pid, SIGKILL);
int i;
for (i = 0; i < 100; i++) {
if (waitpid(-1, status, WNOHANG | __WALL) == pid)
return;
usleep(1000);
}
DIR* dir = opendir("/sys/fs/fuse/connections");
if (dir) {
for (;;) {
struct dirent* ent = readdir(dir);
if (!ent)
break;
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
continue;
char abort[300];
snprintf(abort, sizeof(abort), "/sys/fs/fuse/connections/%s/abort",
ent->d_name);
int fd = open(abort, O_WRONLY);
if (fd == -1) {
continue;
}
if (write(fd, abort, 1) < 0) {
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
static void setup_test()
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
static void loop(void)
{
int iter;
for (iter = 0;; iter++) {
char cwdbuf[32];
sprintf(cwdbuf, "./%d", iter);
if (mkdir(cwdbuf, 0777))
exit(1);
int pid = fork();
if (pid < 0)
exit(1);
if (pid == 0) {
if (chdir(cwdbuf))
exit(1);
setup_test();
execute_one();
exit(0);
}
int status = 0;
uint64_t start = current_time_ms();
for (;;) {
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
sleep_ms(1);
if (current_time_ms() - start < 5 * 1000)
continue;
kill_and_wait(pid, &status);
break;
}
remove_dir(cwdbuf);
}
}
#ifndef __NR_sched_setattr
#define __NR_sched_setattr 314
#endif
uint64_t r[1] = {0xffffffffffffffff};
void execute_one(void)
{
intptr_t res = 0;
*(uint32_t*)0x20000080 = 0;
*(uint32_t*)0x20000084 = 6;
*(uint64_t*)0x20000088 = 0;
*(uint32_t*)0x20000090 = 0;
*(uint32_t*)0x20000094 = 0;
*(uint64_t*)0x20000098 = 0x8000000009917;
*(uint64_t*)0x200000a0 = 0x400000000000fffd;
*(uint64_t*)0x200000a8 = 0;
syscall(__NR_sched_setattr, 0, 0x20000080, 0);
memcpy((void*)0x20000080, "./bus\000", 6);
res = syscall(__NR_open, 0x20000080, 0x1fe, 0);
if (res != -1)
r[0] = res;
memcpy((void*)0x20000240, "\x9c\x54\xe7\x77\x25\x32\x3b\xe4\x8b\x2b\x58\x05"
"\xa7\x26\xde\x15\x4f\x38\x34\xdf\x22\x00\x08\xfb"
"\x9b\x15\x98\x52",
28);
syscall(__NR_write, r[0], 0x20000240, 0x1c);
*(uint64_t*)0x20000000 = 0;
syscall(__NR_sendfile, r[0], r[0], 0x20000000, 0x8080fffffffe);
}
int main(void)
{
syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0);
for (procid = 0; procid < 6; procid++) {
if (fork() == 0) {
use_temporary_dir();
loop();
}
}
sleep(1000000);
return 0;
}
|
the_stack_data/748595.c
|
/* { dg-do compile } */
/* { dg-options "-Winline -O2" } */
extern void *alloca (__SIZE_TYPE__);
void big (void);
inline void *q (void)
{ /* { dg-warning "(function not inlinable|alloca)" } */
return alloca (10);
}
inline void *t (void)
{
return q (); /* { dg-warning "called from here" } */
}
|
the_stack_data/154831340.c
|
typedef unsigned int size_t;
typedef long __time_t;
struct buf_mem_st {
int length ;
char *data ;
int max ;
};
typedef struct buf_mem_st BUF_MEM;
typedef __time_t time_t;
struct stack_st {
int num ;
char **data ;
int sorted ;
int num_alloc ;
int (*comp)(char const * const * , char const * const * ) ;
};
typedef struct stack_st STACK;
struct bio_st;
struct crypto_ex_data_st {
STACK *sk ;
int dummy ;
};
typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
typedef struct bio_st BIO;
typedef void bio_info_cb(struct bio_st * , int , char const * , int , long ,
long );struct bio_method_st {
int type ;
char const *name ;
int (*bwrite)(BIO * , char const * , int ) ;
int (*bread)(BIO * , char * , int ) ;
int (*bputs)(BIO * , char const * ) ;
int (*bgets)(BIO * , char * , int ) ;
long (*ctrl)(BIO * , int , long , void * ) ;
int (*create)(BIO * ) ;
int (*destroy)(BIO * ) ;
long (*callback_ctrl)(BIO * , int , bio_info_cb * ) ;
};
typedef struct bio_method_st BIO_METHOD;
struct bio_st {
BIO_METHOD *method ;
long (*callback)(struct bio_st * , int , char const * , int , long , long ) ;
char *cb_arg ;
int init ;
int shutdown ;
int flags ;
int retry_reason ;
int num ;
void *ptr ;
struct bio_st *next_bio ;
struct bio_st *prev_bio ;
int references ;
unsigned long num_read ;
unsigned long num_write ;
CRYPTO_EX_DATA ex_data ;
};
struct bignum_st {
unsigned long *d ;
int top ;
int dmax ;
int neg ;
int flags ;
};
typedef struct bignum_st BIGNUM;
struct bignum_ctx {
int tos ;
BIGNUM bn[16] ;
int flags ;
int depth ;
int pos[12] ;
int too_many ;
};
typedef struct bignum_ctx BN_CTX;
struct bn_blinding_st {
int init ;
BIGNUM *A ;
BIGNUM *Ai ;
BIGNUM *mod ;
};
typedef struct bn_blinding_st BN_BLINDING;
struct bn_mont_ctx_st {
int ri ;
BIGNUM RR ;
BIGNUM N ;
BIGNUM Ni ;
unsigned long n0 ;
int flags ;
};
typedef struct bn_mont_ctx_st BN_MONT_CTX;
struct X509_algor_st;struct X509_algor_st;
struct asn1_object_st {
char const *sn ;
char const *ln ;
int nid ;
int length ;
unsigned char *data ;
int flags ;
};
typedef struct asn1_object_st ASN1_OBJECT;
struct asn1_string_st {
int length ;
int type ;
unsigned char *data ;
long flags ;
};
typedef struct asn1_string_st ASN1_STRING;
typedef struct asn1_string_st ASN1_INTEGER;
typedef struct asn1_string_st ASN1_ENUMERATED;
typedef struct asn1_string_st ASN1_BIT_STRING;
typedef struct asn1_string_st ASN1_OCTET_STRING;
typedef struct asn1_string_st ASN1_PRINTABLESTRING;
typedef struct asn1_string_st ASN1_T61STRING;
typedef struct asn1_string_st ASN1_IA5STRING;
typedef struct asn1_string_st ASN1_GENERALSTRING;
typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
typedef struct asn1_string_st ASN1_BMPSTRING;
typedef struct asn1_string_st ASN1_UTCTIME;
typedef struct asn1_string_st ASN1_TIME;
typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
typedef struct asn1_string_st ASN1_VISIBLESTRING;
typedef struct asn1_string_st ASN1_UTF8STRING;
typedef int ASN1_BOOLEAN;
union __anonunion_value_19 {
char *ptr ;
ASN1_BOOLEAN boolean ;
ASN1_STRING *asn1_string ;
ASN1_OBJECT *object ;
ASN1_INTEGER *integer ;
ASN1_ENUMERATED *enumerated ;
ASN1_BIT_STRING *bit_string ;
ASN1_OCTET_STRING *octet_string ;
ASN1_PRINTABLESTRING *printablestring ;
ASN1_T61STRING *t61string ;
ASN1_IA5STRING *ia5string ;
ASN1_GENERALSTRING *generalstring ;
ASN1_BMPSTRING *bmpstring ;
ASN1_UNIVERSALSTRING *universalstring ;
ASN1_UTCTIME *utctime ;
ASN1_GENERALIZEDTIME *generalizedtime ;
ASN1_VISIBLESTRING *visiblestring ;
ASN1_UTF8STRING *utf8string ;
ASN1_STRING *set ;
ASN1_STRING *sequence ;
};
struct asn1_type_st {
int type ;
union __anonunion_value_19 value ;
};
typedef struct asn1_type_st ASN1_TYPE;
struct MD5state_st {
unsigned int A ;
unsigned int B ;
unsigned int C ;
unsigned int D ;
unsigned int Nl ;
unsigned int Nh ;
unsigned int data[16] ;
int num ;
};
typedef struct MD5state_st MD5_CTX;
struct SHAstate_st {
unsigned int h0 ;
unsigned int h1 ;
unsigned int h2 ;
unsigned int h3 ;
unsigned int h4 ;
unsigned int Nl ;
unsigned int Nh ;
unsigned int data[16] ;
int num ;
};
typedef struct SHAstate_st SHA_CTX;
struct MD2state_st {
int num ;
unsigned char data[16] ;
unsigned int cksm[16] ;
unsigned int state[16] ;
};
typedef struct MD2state_st MD2_CTX;
struct MD4state_st {
unsigned int A ;
unsigned int B ;
unsigned int C ;
unsigned int D ;
unsigned int Nl ;
unsigned int Nh ;
unsigned int data[16] ;
int num ;
};
typedef struct MD4state_st MD4_CTX;
struct RIPEMD160state_st {
unsigned int A ;
unsigned int B ;
unsigned int C ;
unsigned int D ;
unsigned int E ;
unsigned int Nl ;
unsigned int Nh ;
unsigned int data[16] ;
int num ;
};
typedef struct RIPEMD160state_st RIPEMD160_CTX;
typedef unsigned char des_cblock[8];
union __anonunion_ks_20 {
des_cblock cblock ;
unsigned long deslong[2] ;
};
struct des_ks_struct {
union __anonunion_ks_20 ks ;
int weak_key ;
};
typedef struct des_ks_struct des_key_schedule[16];
struct rc4_key_st {
unsigned int x ;
unsigned int y ;
unsigned int data[256] ;
};
typedef struct rc4_key_st RC4_KEY;
struct rc2_key_st {
unsigned int data[64] ;
};
typedef struct rc2_key_st RC2_KEY;
struct rc5_key_st {
int rounds ;
unsigned long data[34] ;
};
typedef struct rc5_key_st RC5_32_KEY;
struct bf_key_st {
unsigned int P[18] ;
unsigned int S[1024] ;
};
typedef struct bf_key_st BF_KEY;
struct cast_key_st {
unsigned long data[32] ;
int short_key ;
};
typedef struct cast_key_st CAST_KEY;
struct idea_key_st {
unsigned int data[9][6] ;
};
typedef struct idea_key_st IDEA_KEY_SCHEDULE;
struct mdc2_ctx_st {
int num ;
unsigned char data[8] ;
des_cblock h ;
des_cblock hh ;
int pad_type ;
};
typedef struct mdc2_ctx_st MDC2_CTX;
struct rsa_st;typedef struct rsa_st RSA;
struct rsa_meth_st {
char const *name ;
int (*rsa_pub_enc)(int flen , unsigned char *from , unsigned char *to , RSA *rsa ,
int padding ) ;
int (*rsa_pub_dec)(int flen , unsigned char *from , unsigned char *to , RSA *rsa ,
int padding ) ;
int (*rsa_priv_enc)(int flen , unsigned char *from , unsigned char *to , RSA *rsa ,
int padding ) ;
int (*rsa_priv_dec)(int flen , unsigned char *from , unsigned char *to , RSA *rsa ,
int padding ) ;
int (*rsa_mod_exp)(BIGNUM *r0 , BIGNUM *I , RSA *rsa ) ;
int (*bn_mod_exp)(BIGNUM *r , BIGNUM *a , BIGNUM const *p , BIGNUM const *m ,
BN_CTX *ctx , BN_MONT_CTX *m_ctx ) ;
int (*init)(RSA *rsa ) ;
int (*finish)(RSA *rsa ) ;
int flags ;
char *app_data ;
int (*rsa_sign)(int type , unsigned char *m , unsigned int m_len , unsigned char *sigret ,
unsigned int *siglen , RSA *rsa ) ;
int (*rsa_verify)(int dtype , unsigned char *m , unsigned int m_len , unsigned char *sigbuf ,
unsigned int siglen , RSA *rsa ) ;
};
typedef struct rsa_meth_st RSA_METHOD;
struct rsa_st {
int pad ;
int version ;
RSA_METHOD *meth ;
BIGNUM *n ;
BIGNUM *e ;
BIGNUM *d ;
BIGNUM *p ;
BIGNUM *q ;
BIGNUM *dmp1 ;
BIGNUM *dmq1 ;
BIGNUM *iqmp ;
CRYPTO_EX_DATA ex_data ;
int references ;
int flags ;
BN_MONT_CTX *_method_mod_n ;
BN_MONT_CTX *_method_mod_p ;
BN_MONT_CTX *_method_mod_q ;
char *bignum_data ;
BN_BLINDING *blinding ;
};
struct dh_st;typedef struct dh_st DH;
struct dh_method {
char const *name ;
int (*generate_key)(DH *dh ) ;
int (*compute_key)(unsigned char *key , BIGNUM *pub_key , DH *dh ) ;
int (*bn_mod_exp)(DH *dh , BIGNUM *r , BIGNUM *a , BIGNUM const *p , BIGNUM const *m ,
BN_CTX *ctx , BN_MONT_CTX *m_ctx ) ;
int (*init)(DH *dh ) ;
int (*finish)(DH *dh ) ;
int flags ;
char *app_data ;
};
typedef struct dh_method DH_METHOD;
struct dh_st {
int pad ;
int version ;
BIGNUM *p ;
BIGNUM *g ;
int length ;
BIGNUM *pub_key ;
BIGNUM *priv_key ;
int flags ;
char *method_mont_p ;
BIGNUM *q ;
BIGNUM *j ;
unsigned char *seed ;
int seedlen ;
BIGNUM *counter ;
int references ;
CRYPTO_EX_DATA ex_data ;
DH_METHOD *meth ;
};
struct dsa_st;typedef struct dsa_st DSA;
struct DSA_SIG_st {
BIGNUM *r ;
BIGNUM *s ;
};
typedef struct DSA_SIG_st DSA_SIG;
struct dsa_method {
char const *name ;
DSA_SIG *(*dsa_do_sign)(unsigned char const *dgst , int dlen , DSA *dsa ) ;
int (*dsa_sign_setup)(DSA *dsa , BN_CTX *ctx_in , BIGNUM **kinvp , BIGNUM **rp ) ;
int (*dsa_do_verify)(unsigned char const *dgst , int dgst_len , DSA_SIG *sig ,
DSA *dsa ) ;
int (*dsa_mod_exp)(DSA *dsa , BIGNUM *rr , BIGNUM *a1 , BIGNUM *p1 , BIGNUM *a2 ,
BIGNUM *p2 , BIGNUM *m , BN_CTX *ctx , BN_MONT_CTX *in_mont ) ;
int (*bn_mod_exp)(DSA *dsa , BIGNUM *r , BIGNUM *a , BIGNUM const *p , BIGNUM const *m ,
BN_CTX *ctx , BN_MONT_CTX *m_ctx ) ;
int (*init)(DSA *dsa ) ;
int (*finish)(DSA *dsa ) ;
int flags ;
char *app_data ;
};
typedef struct dsa_method DSA_METHOD;
struct dsa_st {
int pad ;
int version ;
int write_params ;
BIGNUM *p ;
BIGNUM *q ;
BIGNUM *g ;
BIGNUM *pub_key ;
BIGNUM *priv_key ;
BIGNUM *kinv ;
BIGNUM *r ;
int flags ;
char *method_mont_p ;
int references ;
CRYPTO_EX_DATA ex_data ;
DSA_METHOD *meth ;
};
union __anonunion_pkey_21 {
char *ptr ;
struct rsa_st *rsa ;
struct dsa_st *dsa ;
struct dh_st *dh ;
};
struct evp_pkey_st {
int type ;
int save_type ;
int references ;
union __anonunion_pkey_21 pkey ;
int save_parameters ;
STACK *attributes ;
};
typedef struct evp_pkey_st EVP_PKEY;
struct env_md_st {
int type ;
int pkey_type ;
int md_size ;
void (*init)() ;
void (*update)() ;
void (*final)() ;
int (*sign)() ;
int (*verify)() ;
int required_pkey_type[5] ;
int block_size ;
int ctx_size ;
};
typedef struct env_md_st EVP_MD;
union __anonunion_md_22 {
unsigned char base[4] ;
MD2_CTX md2 ;
MD5_CTX md5 ;
MD4_CTX md4 ;
RIPEMD160_CTX ripemd160 ;
SHA_CTX sha ;
MDC2_CTX mdc2 ;
};
struct env_md_ctx_st {
EVP_MD const *digest ;
union __anonunion_md_22 md ;
};
typedef struct env_md_ctx_st EVP_MD_CTX;
struct evp_cipher_st;typedef struct evp_cipher_st EVP_CIPHER;
struct evp_cipher_ctx_st;typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
struct evp_cipher_st {
int nid ;
int block_size ;
int key_len ;
int iv_len ;
unsigned long flags ;
int (*init)(EVP_CIPHER_CTX *ctx , unsigned char const *key , unsigned char const *iv ,
int enc ) ;
int (*do_cipher)(EVP_CIPHER_CTX *ctx , unsigned char *out , unsigned char const *in ,
unsigned int inl ) ;
int (*cleanup)(EVP_CIPHER_CTX * ) ;
int ctx_size ;
int (*set_asn1_parameters)(EVP_CIPHER_CTX * , ASN1_TYPE * ) ;
int (*get_asn1_parameters)(EVP_CIPHER_CTX * , ASN1_TYPE * ) ;
int (*ctrl)(EVP_CIPHER_CTX * , int type , int arg , void *ptr ) ;
void *app_data ;
};
struct __anonstruct_rc4_24 {
unsigned char key[16] ;
RC4_KEY ks ;
};
struct __anonstruct_desx_cbc_25 {
des_key_schedule ks ;
des_cblock inw ;
des_cblock outw ;
};
struct __anonstruct_des_ede_26 {
des_key_schedule ks1 ;
des_key_schedule ks2 ;
des_key_schedule ks3 ;
};
struct __anonstruct_rc2_27 {
int key_bits ;
RC2_KEY ks ;
};
struct __anonstruct_rc5_28 {
int rounds ;
RC5_32_KEY ks ;
};
union __anonunion_c_23 {
struct __anonstruct_rc4_24 rc4 ;
des_key_schedule des_ks ;
struct __anonstruct_desx_cbc_25 desx_cbc ;
struct __anonstruct_des_ede_26 des_ede ;
IDEA_KEY_SCHEDULE idea_ks ;
struct __anonstruct_rc2_27 rc2 ;
struct __anonstruct_rc5_28 rc5 ;
BF_KEY bf_ks ;
CAST_KEY cast_ks ;
};
struct evp_cipher_ctx_st {
EVP_CIPHER const *cipher ;
int encrypt ;
int buf_len ;
unsigned char oiv[8] ;
unsigned char iv[8] ;
unsigned char buf[8] ;
int num ;
void *app_data ;
int key_len ;
union __anonunion_c_23 c ;
};
struct comp_method_st {
int type ;
char const *name ;
int (*init)() ;
void (*finish)() ;
int (*compress)() ;
int (*expand)() ;
long (*ctrl)() ;
long (*callback_ctrl)() ;
};
typedef struct comp_method_st COMP_METHOD;
struct comp_ctx_st {
COMP_METHOD *meth ;
unsigned long compress_in ;
unsigned long compress_out ;
unsigned long expand_in ;
unsigned long expand_out ;
CRYPTO_EX_DATA ex_data ;
};
typedef struct comp_ctx_st COMP_CTX;
struct X509_algor_st {
ASN1_OBJECT *algorithm ;
ASN1_TYPE *parameter ;
};
typedef struct X509_algor_st X509_ALGOR;
struct X509_val_st {
ASN1_TIME *notBefore ;
ASN1_TIME *notAfter ;
};
typedef struct X509_val_st X509_VAL;
struct X509_pubkey_st {
X509_ALGOR *algor ;
ASN1_BIT_STRING *public_key ;
EVP_PKEY *pkey ;
};
typedef struct X509_pubkey_st X509_PUBKEY;
struct X509_name_st {
STACK *entries ;
int modified ;
BUF_MEM *bytes ;
unsigned long hash ;
};
typedef struct X509_name_st X509_NAME;
struct x509_cinf_st {
ASN1_INTEGER *version ;
ASN1_INTEGER *serialNumber ;
X509_ALGOR *signature ;
X509_NAME *issuer ;
X509_VAL *validity ;
X509_NAME *subject ;
X509_PUBKEY *key ;
ASN1_BIT_STRING *issuerUID ;
ASN1_BIT_STRING *subjectUID ;
STACK *extensions ;
};
typedef struct x509_cinf_st X509_CINF;
struct x509_cert_aux_st {
STACK *trust ;
STACK *reject ;
ASN1_UTF8STRING *alias ;
ASN1_OCTET_STRING *keyid ;
STACK *other ;
};
typedef struct x509_cert_aux_st X509_CERT_AUX;
struct AUTHORITY_KEYID_st;struct x509_st {
X509_CINF *cert_info ;
X509_ALGOR *sig_alg ;
ASN1_BIT_STRING *signature ;
int valid ;
int references ;
char *name ;
CRYPTO_EX_DATA ex_data ;
long ex_pathlen ;
unsigned long ex_flags ;
unsigned long ex_kusage ;
unsigned long ex_xkusage ;
unsigned long ex_nscert ;
ASN1_OCTET_STRING *skid ;
struct AUTHORITY_KEYID_st *akid ;
unsigned char sha1_hash[20] ;
X509_CERT_AUX *aux ;
};
typedef struct x509_st X509;
struct lhash_node_st {
void *data ;
struct lhash_node_st *next ;
unsigned long hash ;
};
typedef struct lhash_node_st LHASH_NODE;
struct lhash_st {
LHASH_NODE **b ;
int (*comp)() ;
unsigned long (*hash)() ;
unsigned int num_nodes ;
unsigned int num_alloc_nodes ;
unsigned int p ;
unsigned int pmax ;
unsigned long up_load ;
unsigned long down_load ;
unsigned long num_items ;
unsigned long num_expands ;
unsigned long num_expand_reallocs ;
unsigned long num_contracts ;
unsigned long num_contract_reallocs ;
unsigned long num_hash_calls ;
unsigned long num_comp_calls ;
unsigned long num_insert ;
unsigned long num_replace ;
unsigned long num_delete ;
unsigned long num_no_delete ;
unsigned long num_retrieve ;
unsigned long num_retrieve_miss ;
unsigned long num_hash_comps ;
int error ;
};
struct x509_store_ctx_st;typedef struct x509_store_ctx_st X509_STORE_CTX;
struct x509_store_st {
int cache ;
STACK *objs ;
STACK *get_cert_methods ;
int (*verify)(X509_STORE_CTX *ctx ) ;
int (*verify_cb)(int ok , X509_STORE_CTX *ctx ) ;
CRYPTO_EX_DATA ex_data ;
int references ;
int depth ;
};
typedef struct x509_store_st X509_STORE;
struct x509_store_ctx_st {
X509_STORE *ctx ;
int current_method ;
X509 *cert ;
STACK *untrusted ;
int purpose ;
int trust ;
time_t check_time ;
unsigned long flags ;
void *other_ctx ;
int (*verify)(X509_STORE_CTX *ctx ) ;
int (*verify_cb)(int ok , X509_STORE_CTX *ctx ) ;
int (*get_issuer)(X509 **issuer , X509_STORE_CTX *ctx , X509 *x ) ;
int (*check_issued)(X509_STORE_CTX *ctx , X509 *x , X509 *issuer ) ;
int (*cleanup)(X509_STORE_CTX *ctx ) ;
int depth ;
int valid ;
int last_untrusted ;
STACK *chain ;
int error_depth ;
int error ;
X509 *current_cert ;
X509 *current_issuer ;
CRYPTO_EX_DATA ex_data ;
};
typedef int pem_password_cb(char *buf , int size , int rwflag , void *userdata );
struct ssl_st;
struct ssl_cipher_st {
int valid ;
char const *name ;
unsigned long id ;
unsigned long algorithms ;
unsigned long algo_strength ;
unsigned long algorithm2 ;
int strength_bits ;
int alg_bits ;
unsigned long mask ;
unsigned long mask_strength ;
};
typedef struct ssl_cipher_st SSL_CIPHER;
typedef struct ssl_st SSL;
struct ssl_ctx_st;typedef struct ssl_ctx_st SSL_CTX;
struct ssl3_enc_method;struct ssl_method_st {
int version ;
int (*ssl_new)(SSL *s ) ;
void (*ssl_clear)(SSL *s ) ;
void (*ssl_free)(SSL *s ) ;
int (*ssl_accept)(SSL *s ) ;
int (*ssl_connect)(SSL *s ) ;
int (*ssl_read)(SSL *s , void *buf , int len ) ;
int (*ssl_peek)(SSL *s , void *buf , int len ) ;
int (*ssl_write)(SSL *s , void const *buf , int len ) ;
int (*ssl_shutdown)(SSL *s ) ;
int (*ssl_renegotiate)(SSL *s ) ;
int (*ssl_renegotiate_check)(SSL *s ) ;
long (*ssl_ctrl)(SSL *s , int cmd , long larg , char *parg ) ;
long (*ssl_ctx_ctrl)(SSL_CTX *ctx , int cmd , long larg , char *parg ) ;
SSL_CIPHER *(*get_cipher_by_char)(unsigned char const *ptr ) ;
int (*put_cipher_by_char)(SSL_CIPHER const *cipher , unsigned char *ptr ) ;
int (*ssl_pending)(SSL *s ) ;
int (*num_ciphers)(void) ;
SSL_CIPHER *(*get_cipher)(unsigned int ncipher ) ;
struct ssl_method_st *(*get_ssl_method)(int version ) ;
long (*get_timeout)(void) ;
struct ssl3_enc_method *ssl3_enc ;
int (*ssl_version)() ;
long (*ssl_callback_ctrl)(SSL *s , int cb_id , void (*fp)() ) ;
long (*ssl_ctx_callback_ctrl)(SSL_CTX *s , int cb_id , void (*fp)() ) ;
};
typedef struct ssl_method_st SSL_METHOD;
struct sess_cert_st;struct ssl_session_st {
int ssl_version ;
unsigned int key_arg_length ;
unsigned char key_arg[8] ;
int master_key_length ;
unsigned char master_key[48] ;
unsigned int session_id_length ;
unsigned char session_id[32] ;
unsigned int sid_ctx_length ;
unsigned char sid_ctx[32] ;
int not_resumable ;
struct sess_cert_st *sess_cert ;
X509 *peer ;
long verify_result ;
int references ;
long timeout ;
long time ;
int compress_meth ;
SSL_CIPHER *cipher ;
unsigned long cipher_id ;
STACK *ciphers ;
CRYPTO_EX_DATA ex_data ;
struct ssl_session_st *prev ;
struct ssl_session_st *next ;
};
typedef struct ssl_session_st SSL_SESSION;
struct ssl_comp_st {
int id ;
char *name ;
COMP_METHOD *method ;
};
typedef struct ssl_comp_st SSL_COMP;
struct __anonstruct_stats_37 {
int sess_connect ;
int sess_connect_renegotiate ;
int sess_connect_good ;
int sess_accept ;
int sess_accept_renegotiate ;
int sess_accept_good ;
int sess_miss ;
int sess_timeout ;
int sess_cache_full ;
int sess_hit ;
int sess_cb_hit ;
};
struct cert_st;struct ssl_ctx_st {
SSL_METHOD *method ;
unsigned long options ;
unsigned long mode ;
STACK *cipher_list ;
STACK *cipher_list_by_id ;
struct x509_store_st *cert_store ;
struct lhash_st *sessions ;
unsigned long session_cache_size ;
struct ssl_session_st *session_cache_head ;
struct ssl_session_st *session_cache_tail ;
int session_cache_mode ;
long session_timeout ;
int (*new_session_cb)(struct ssl_st *ssl , SSL_SESSION *sess ) ;
void (*remove_session_cb)(struct ssl_ctx_st *ctx , SSL_SESSION *sess ) ;
SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl , unsigned char *data , int len ,
int *copy ) ;
struct __anonstruct_stats_37 stats ;
int references ;
void (*info_callback)() ;
int (*app_verify_callback)() ;
char *app_verify_arg ;
struct cert_st *cert ;
int read_ahead ;
int verify_mode ;
int verify_depth ;
unsigned int sid_ctx_length ;
unsigned char sid_ctx[32] ;
int (*default_verify_callback)(int ok , X509_STORE_CTX *ctx ) ;
int purpose ;
int trust ;
pem_password_cb *default_passwd_callback ;
void *default_passwd_callback_userdata ;
int (*client_cert_cb)() ;
STACK *client_CA ;
int quiet_shutdown ;
CRYPTO_EX_DATA ex_data ;
EVP_MD const *rsa_md5 ;
EVP_MD const *md5 ;
EVP_MD const *sha1 ;
STACK *extra_certs ;
STACK *comp_methods ;
};
struct ssl2_state_st;struct ssl3_state_st;struct ssl_st {
int version ;
int type ;
SSL_METHOD *method ;
BIO *rbio ;
BIO *wbio ;
BIO *bbio ;
int rwstate ;
int in_handshake ;
int (*handshake_func)() ;
int server ;
int new_session ;
int quiet_shutdown ;
int shutdown ;
int state ;
int rstate ;
BUF_MEM *init_buf ;
int init_num ;
int init_off ;
unsigned char *packet ;
unsigned int packet_length ;
struct ssl2_state_st *s2 ;
struct ssl3_state_st *s3 ;
int read_ahead ;
int hit ;
int purpose ;
int trust ;
STACK *cipher_list ;
STACK *cipher_list_by_id ;
EVP_CIPHER_CTX *enc_read_ctx ;
EVP_MD const *read_hash ;
COMP_CTX *expand ;
EVP_CIPHER_CTX *enc_write_ctx ;
EVP_MD const *write_hash ;
COMP_CTX *compress ;
struct cert_st *cert ;
unsigned int sid_ctx_length ;
unsigned char sid_ctx[32] ;
SSL_SESSION *session ;
int verify_mode ;
int verify_depth ;
int (*verify_callback)(int ok , X509_STORE_CTX *ctx ) ;
void (*info_callback)() ;
int error ;
int error_code ;
SSL_CTX *ctx ;
int debug ;
long verify_result ;
CRYPTO_EX_DATA ex_data ;
STACK *client_CA ;
int references ;
unsigned long options ;
unsigned long mode ;
int first_packet ;
int client_version ;
};
struct __anonstruct_tmp_38 {
unsigned int conn_id_length ;
unsigned int cert_type ;
unsigned int cert_length ;
unsigned int csl ;
unsigned int clear ;
unsigned int enc ;
unsigned char ccl[32] ;
unsigned int cipher_spec_length ;
unsigned int session_id_length ;
unsigned int clen ;
unsigned int rlen ;
};
struct ssl2_state_st {
int three_byte_header ;
int clear_text ;
int escape ;
int ssl2_rollback ;
unsigned int wnum ;
int wpend_tot ;
unsigned char const *wpend_buf ;
int wpend_off ;
int wpend_len ;
int wpend_ret ;
int rbuf_left ;
int rbuf_offs ;
unsigned char *rbuf ;
unsigned char *wbuf ;
unsigned char *write_ptr ;
unsigned int padding ;
unsigned int rlength ;
int ract_data_length ;
unsigned int wlength ;
int wact_data_length ;
unsigned char *ract_data ;
unsigned char *wact_data ;
unsigned char *mac_data ;
unsigned char *pad_data_UNUSED ;
unsigned char *read_key ;
unsigned char *write_key ;
unsigned int challenge_length ;
unsigned char challenge[32] ;
unsigned int conn_id_length ;
unsigned char conn_id[16] ;
unsigned int key_material_length ;
unsigned char key_material[48] ;
unsigned long read_sequence ;
unsigned long write_sequence ;
struct __anonstruct_tmp_38 tmp ;
};
struct ssl3_record_st {
int type ;
unsigned int length ;
unsigned int off ;
unsigned char *data ;
unsigned char *input ;
unsigned char *comp ;
};
typedef struct ssl3_record_st SSL3_RECORD;
struct ssl3_buffer_st {
unsigned char *buf ;
int offset ;
int left ;
};
typedef struct ssl3_buffer_st SSL3_BUFFER;
struct __anonstruct_tmp_39 {
unsigned char cert_verify_md[72] ;
unsigned char finish_md[72] ;
int finish_md_len ;
unsigned char peer_finish_md[72] ;
int peer_finish_md_len ;
unsigned long message_size ;
int message_type ;
SSL_CIPHER *new_cipher ;
DH *dh ;
int next_state ;
int reuse_message ;
int cert_req ;
int ctype_num ;
char ctype[7] ;
STACK *ca_names ;
int use_rsa_tmp ;
int key_block_length ;
unsigned char *key_block ;
EVP_CIPHER const *new_sym_enc ;
EVP_MD const *new_hash ;
SSL_COMP const *new_compression ;
int cert_request ;
};
struct ssl3_state_st {
long flags ;
int delay_buf_pop_ret ;
unsigned char read_sequence[8] ;
unsigned char read_mac_secret[36] ;
unsigned char write_sequence[8] ;
unsigned char write_mac_secret[36] ;
unsigned char server_random[32] ;
unsigned char client_random[32] ;
SSL3_BUFFER rbuf ;
SSL3_BUFFER wbuf ;
SSL3_RECORD rrec ;
SSL3_RECORD wrec ;
unsigned char alert_fragment[2] ;
unsigned int alert_fragment_len ;
unsigned char handshake_fragment[4] ;
unsigned int handshake_fragment_len ;
unsigned int wnum ;
int wpend_tot ;
int wpend_type ;
int wpend_ret ;
unsigned char const *wpend_buf ;
EVP_MD_CTX finish_dgst1 ;
EVP_MD_CTX finish_dgst2 ;
int change_cipher_spec ;
int warn_alert ;
int fatal_alert ;
int alert_dispatch ;
unsigned char send_alert[2] ;
int renegotiate ;
int total_renegotiations ;
int num_renegotiations ;
int in_read_app_data ;
struct __anonstruct_tmp_39 tmp ;
};
struct cert_pkey_st {
X509 *x509 ;
EVP_PKEY *privatekey ;
};
typedef struct cert_pkey_st CERT_PKEY;
struct cert_st {
CERT_PKEY *key ;
int valid ;
unsigned long mask ;
unsigned long export_mask ;
RSA *rsa_tmp ;
RSA *(*rsa_tmp_cb)(SSL *ssl , int is_export , int keysize ) ;
DH *dh_tmp ;
DH *(*dh_tmp_cb)(SSL *ssl , int is_export , int keysize ) ;
CERT_PKEY pkeys[5] ;
int references ;
};
struct sess_cert_st {
STACK *cert_chain ;
int peer_cert_type ;
CERT_PKEY *peer_key ;
CERT_PKEY peer_pkeys[5] ;
RSA *peer_rsa_tmp ;
DH *peer_dh_tmp ;
int references ;
};
typedef struct sess_cert_st SESS_CERT;
struct ssl3_enc_method {
int (*enc)(SSL * , int ) ;
int (*mac)(SSL * , unsigned char * , int ) ;
int (*setup_key_block)(SSL * ) ;
int (*generate_master_secret)(SSL * , unsigned char * , unsigned char * , int ) ;
int (*change_cipher_state)(SSL * , int ) ;
int (*final_finish_mac)(SSL * , EVP_MD_CTX * , EVP_MD_CTX * , char const * ,
int , unsigned char * ) ;
int finish_mac_length ;
int (*cert_verify_mac)(SSL * , EVP_MD_CTX * , unsigned char * ) ;
char const *client_finished_label ;
int client_finished_label_len ;
char const *server_finished_label ;
int server_finished_label_len ;
int (*alert_value)(int ) ;
};
extern BUF_MEM *BUF_MEM_new(void) ;
extern void BUF_MEM_free(BUF_MEM *a ) ;
extern int BUF_MEM_grow(BUF_MEM *str , int len ) ;
extern int RAND_bytes(unsigned char *buf , int num ) ;
extern int RAND_pseudo_bytes(unsigned char *buf , int num ) ;
extern void RAND_add(void const *buf , int num , double entropy ) ;
extern int sk_num(STACK const * ) ;
extern char *sk_value(STACK const * , int ) ;
extern STACK *sk_new(int (*cmp)(char const * const * , char const * const * ) ) ;
extern STACK *sk_new_null(void) ;
extern void sk_pop_free(STACK *st , void (*func)(void * ) ) ;
extern int sk_find(STACK *st , char *data ) ;
extern int sk_push(STACK *st , char *data ) ;
extern int CRYPTO_add_lock(int *pointer , int amount , int type , char const *file ,
int line ) ;
extern long BIO_ctrl(BIO *bp , int cmd , long larg , void *parg ) ;
extern BIO *BIO_push(BIO *b , BIO *append ) ;
extern time_t time(time_t *__timer ) ;
extern int BN_num_bits(BIGNUM const *a ) ;
extern BIGNUM *BN_bin2bn(unsigned char const *s , int len , BIGNUM *ret ) ;
extern int BN_bn2bin(BIGNUM const *a , unsigned char *to ) ;
extern char *ASN1_dup(int (*i2d)() , char *(*d2i)() , char *x ) ;
extern RSA *RSA_new(void) ;
extern int RSA_size(RSA * ) ;
extern int RSA_public_encrypt(int flen , unsigned char *from , unsigned char *to ,
RSA *rsa , int padding ) ;
extern void RSA_free(RSA *r ) ;
extern int RSA_sign(int type , unsigned char *m , unsigned int m_len , unsigned char *sigret ,
unsigned int *siglen , RSA *rsa ) ;
extern int RSA_verify(int type , unsigned char *m , unsigned int m_len , unsigned char *sigbuf ,
unsigned int siglen , RSA *rsa ) ;
extern DH *DH_new(void) ;
extern void DH_free(DH *dh ) ;
extern int DH_size(DH *dh ) ;
extern int DH_generate_key(DH *dh ) ;
extern int DH_compute_key(unsigned char *key , BIGNUM *pub_key , DH *dh ) ;
extern DH *d2i_DHparams(DH **a , unsigned char **pp , long length ) ;
extern int i2d_DHparams(DH *a , unsigned char **pp ) ;
extern int DSA_sign(int type , unsigned char const *dgst , int dlen , unsigned char *sig ,
unsigned int *siglen , DSA *dsa ) ;
extern void EVP_DigestInit(EVP_MD_CTX *ctx , EVP_MD const *type ) ;
extern void EVP_DigestUpdate(EVP_MD_CTX *ctx , void const *d , unsigned int cnt ) ;
extern void EVP_DigestFinal(EVP_MD_CTX *ctx , unsigned char *md , unsigned int *s ) ;
extern int EVP_VerifyFinal(EVP_MD_CTX *ctx , unsigned char *sigbuf , unsigned int siglen ,
EVP_PKEY *pkey ) ;
extern EVP_MD *EVP_dss1(void) ;
extern int EVP_PKEY_size(EVP_PKEY *pkey ) ;
extern void EVP_PKEY_free(EVP_PKEY *pkey ) ;
extern int EVP_PKEY_missing_parameters(EVP_PKEY *pkey ) ;
extern void *memcpy(void * __restrict __dest , void const * __restrict __src ,
size_t __n ) ;
extern void *memset(void *__s , int __c , size_t __n ) ;
extern int memcmp(void const *__s1 , void const *__s2 , size_t __n ) __attribute__((__pure__)) ;
extern int *__errno_location(void) __attribute__((__const__)) ;
extern void X509_NAME_free(X509_NAME *a ) ;
extern X509_NAME *d2i_X509_NAME(X509_NAME **a , unsigned char **pp , long length ) ;
extern void X509_free(X509 *a ) ;
extern X509 *d2i_X509(X509 **a , unsigned char **pp , long length ) ;
extern EVP_PKEY *X509_get_pubkey(X509 *x ) ;
extern int X509_certificate_type(X509 *x , EVP_PKEY *pubkey ) ;
extern int X509_NAME_cmp(X509_NAME const *a , X509_NAME const *b ) ;
extern void ERR_put_error(int lib , int func , int reason , char const *file , int line ) ;
extern void ERR_clear_error(void) ;
extern int SSL_clear(SSL *s ) ;
extern int SSL_use_PrivateKey(SSL *ssl , EVP_PKEY *pkey ) ;
extern int SSL_use_certificate(SSL *ssl , X509 *x ) ;
SSL_METHOD *SSLv3_client_method(void) ;
extern STACK *SSL_get_ciphers(SSL *s ) ;
extern int SSL_state(SSL *ssl ) ;
extern SSL_METHOD *sslv3_base_method(void) ;
extern SESS_CERT *ssl_sess_cert_new(void) ;
extern void ssl_sess_cert_free(SESS_CERT *sc ) ;
extern int ssl_get_new_session(SSL *s , int session ) ;
extern int ssl_cipher_list_to_bytes(SSL *s , STACK *sk , unsigned char *p ) ;
extern void ssl_update_cache(SSL *s , int mode ) ;
extern int ssl_verify_cert_chain(SSL *s , STACK *sk ) ;
extern int ssl_cert_type(X509 *x , EVP_PKEY *pkey ) ;
extern STACK *ssl_get_ciphers_by_id(SSL *s ) ;
extern int ssl_verify_alarm_type(long type ) ;
extern void ssl3_init_finished_mac(SSL *s ) ;
extern int ssl3_get_finished(SSL *s , int state_a , int state_b ) ;
extern int ssl3_send_change_cipher_spec(SSL *s , int state_a , int state_b ) ;
extern void ssl3_cleanup_key_block(SSL *s ) ;
extern int ssl3_do_write(SSL *s , int type ) ;
extern void ssl3_send_alert(SSL *s , int level , int desc ) ;
extern long ssl3_get_message(SSL *s , int st1 , int stn , int mt , long max , int *ok ) ;
extern int ssl3_send_finished(SSL *s , int a , int b , char const *sender , int slen ) ;
extern unsigned long ssl3_output_cert_chain(SSL *s , X509 *x ) ;
extern int ssl3_setup_buffers(SSL *s ) ;
int ssl3_connect(SSL *s ) ;
extern int ssl_init_wbio_buffer(SSL *s , int push ) ;
extern void ssl_free_wbio_buffer(SSL *s ) ;
extern SSL_COMP *ssl3_comp_find(STACK *sk , int n ) ;
static SSL_METHOD *ssl3_get_client_method(int ver ) ;
static int ssl3_client_hello(SSL *s ) ;
static int ssl3_get_server_hello(SSL *s ) ;
static int ssl3_get_certificate_request(SSL *s ) ;
static int ca_dn_cmp(X509_NAME const * const *a , X509_NAME const * const *b ) ;
static int ssl3_get_server_done(SSL *s ) ;
static int ssl3_send_client_verify(SSL *s ) ;
static int ssl3_send_client_certificate(SSL *s ) ;
static int ssl3_send_client_key_exchange(SSL *s ) ;
static int ssl3_get_key_exchange(SSL *s ) ;
static int ssl3_get_server_certificate(SSL *s ) ;
static int ssl3_check_cert_and_algorithm(SSL *s ) ;
static SSL_METHOD *ssl3_get_client_method(int ver )
{ SSL_METHOD *tmp ;
{
if (ver == 768) { tmp = SSLv3_client_method(); return (tmp);
} else {
return ((SSL_METHOD *)((void *)0));
}
}
}
SSL_METHOD *SSLv3_client_method(void) ;static int init = 1;
static SSL_METHOD SSLv3_client_data ;
SSL_METHOD *SSLv3_client_method(void)
{ char *tmp ;
{
if (init) {
init = 0;
tmp = (char *)sslv3_base_method(); memcpy((void * )((char *)(& SSLv3_client_data)), (void const * )tmp,
sizeof(SSL_METHOD ));
SSLv3_client_data.ssl_connect = & ssl3_connect;
SSLv3_client_data.get_ssl_method = & ssl3_get_client_method;
}
return (& SSLv3_client_data);
}
}
int main()
{
SSL *s;
s->state = (0x04|(0x1000|0x2000));
ssl3_connect(s);
return 0;
}
int ssl3_connect(SSL *s )
{
BUF_MEM *buf ;
unsigned long Time ;
unsigned long tmp ;
unsigned long l ;
long num1 ;
void (*cb)() ;
int ret ;
int new_state ;
int state ;
int skip ;
int *tmp___0 ;
int tmp___1 ;
int tmp___2 ;
int tmp___3 ;
int tmp___4 ;
int tmp___5 ;
int tmp___6 ;
int tmp___7 ;
int tmp___8 ;
long tmp___9 ;
int blastFlag;
int __BLAST_NONDET;
{
blastFlag = 0;
//tmp = (unsigned long )time((time_t *)((void *)0)); Time = tmp;
tmp = __BLAST_NONDET;
cb = (void (*)())((void *)0);
ret = -1;
skip = 0;
//RAND_add((void const *)(& Time), (int )sizeof(Time), (double )0);
//ERR_clear_error();
//tmp___0 = __errno_location();
(*tmp___0) = 0;
if ((unsigned long )s->info_callback != (unsigned long )((void *)0)) {
cb = s->info_callback;
} else {
if ((unsigned long )(s->ctx)->info_callback != (unsigned long )((void *)0)) {
cb = (s->ctx)->info_callback;
}
}
s->in_handshake ++;
//tmp___1 = SSL_state(s);
if (tmp___1 & 12288) {
//tmp___2 = SSL_state(s);
if (tmp___2 & 16384) {
//SSL_clear(s);
}
} else {
//SSL_clear(s);
}
while (1) {
state = s->state;
switch (s->state) {
case 12292:
s->new_session = 1;
s->state = 4096;
(s->ctx)->stats.sess_connect_renegotiate ++;
case 16384: ;
case 4096: ;
case 20480: ;
case 4099:
s->server = 0;
if ((unsigned long )cb != (unsigned long )((void *)0)) {
//((*cb))(s, 16, 1);
}
if ((s->version & 65280) != 768) {
//ERR_put_error(20, 132, 157, (char const *)"s3_clnt.c", 146);
ret = -1;
goto end;
}
s->type = 4096;
if ((unsigned long )s->init_buf == (unsigned long )((void *)0)) {
//buf = BUF_MEM_new();
buf = __BLAST_NONDET;
if ((unsigned long )buf == (unsigned long )((void *)0)) {
ret = -1;
goto end;
}
//tmp___3 = BUF_MEM_grow(buf, 16384);
if (! tmp___3) {
ret = -1;
goto end;
}
s->init_buf = buf;
}
//tmp___4 = ssl3_setup_buffers(s);
if (! tmp___4) {
ret = -1;
goto end;
}
//tmp___5 = ssl_init_wbio_buffer(s, 0);
if (! tmp___5) {
ret = -1;
goto end;
}
//ssl3_init_finished_mac(s);
s->state = 4368;
(s->ctx)->stats.sess_connect ++;
s->init_num = 0;
break;
case 4368: ;
case 4369:
s->shutdown = 0;
//ret = ssl3_client_hello(s);
ret = __BLAST_NONDET;
if(blastFlag == 0) blastFlag = 1;
if (ret <= 0) {
goto end;
}
s->state = 4384;
s->init_num = 0;
if ((unsigned long )s->bbio != (unsigned long )s->wbio) {
//s->wbio = BIO_push(s->bbio, s->wbio);
}
break;
case 4384: ;
case 4385:
//ret = ssl3_get_server_hello(s);
ret = __BLAST_NONDET;
if(blastFlag == 1) blastFlag = 2;
else if(blastFlag == 4) blastFlag = 5;
if (ret <= 0) {
goto end;
}
if (s->hit) {
s->state = 4560;
} else {
s->state = 4400;
}
s->init_num = 0;
break;
case 4400: ;
case 4401: ;
if (((s->s3)->tmp.new_cipher)->algorithms & 256UL) {
skip = 1;
} else {
//ret = ssl3_get_server_certificate(s);
ret = __BLAST_NONDET;
if(blastFlag == 2) blastFlag = 3;
if (ret <= 0) {
goto end;
}
}
s->state = 4416;
s->init_num = 0;
break;
case 4416: ;
case 4417:
//ret = ssl3_get_key_exchange(s);
ret = __BLAST_NONDET;
if(blastFlag == 3) blastFlag = 4;
if (ret <= 0) {
goto end;
}
s->state = 4432;
s->init_num = 0;
//tmp___6 = ssl3_check_cert_and_algorithm(s);
if (! tmp___6) {
ret = -1;
goto end;
}
break;
case 4432: ;
case 4433:
//ret = ssl3_get_certificate_request(s);
ret = __BLAST_NONDET;
if(blastFlag == 5) goto ERROR;
if (ret <= 0) {
goto end;
}
s->state = 4448;
s->init_num = 0;
break;
case 4448: ;
case 4449:
//ret = ssl3_get_server_done(s);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
if ((s->s3)->tmp.cert_req) {
s->state = 4464;
} else {
s->state = 4480;
}
s->init_num = 0;
break;
case 4464: ;
case 4465: ;
case 4466: ;
case 4467:
//ret = ssl3_send_client_certificate(s);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
s->state = 4480;
s->init_num = 0;
break;
case 4480: ;
case 4481:
//ret = ssl3_send_client_key_exchange(s);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
l = ((s->s3)->tmp.new_cipher)->algorithms;
if ((s->s3)->tmp.cert_req == 1) {
s->state = 4496;
} else {
s->state = 4512;
(s->s3)->change_cipher_spec = 0;
}
s->init_num = 0;
break;
case 4496: ;
case 4497:
//ret = ssl3_send_client_verify(s);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
s->state = 4512;
s->init_num = 0;
(s->s3)->change_cipher_spec = 0;
break;
case 4512: ;
case 4513:
//ret = ssl3_send_change_cipher_spec(s, 4512, 4513);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
s->state = 4528;
s->init_num = 0;
(s->session)->cipher = (s->s3)->tmp.new_cipher;
if ((unsigned long )(s->s3)->tmp.new_compression == (unsigned long )((void *)0)) {
(s->session)->compress_meth = 0;
} else {
(s->session)->compress_meth = ((s->s3)->tmp.new_compression)->id;
}
//tmp___7 = ((*(((s->method)->ssl3_enc)->setup_key_block)))(s);
if (! tmp___7) {
ret = -1;
goto end;
}
//tmp___8 = ((*(((s->method)->ssl3_enc)->change_cipher_state)))(s, 18);
if (! tmp___8) {
ret = -1;
goto end;
}
break;
case 4528: ;
case 4529:
//ret = ssl3_send_finished(s, 4528, 4529, ((s->method)->ssl3_enc)->client_finished_label,
ret = __BLAST_NONDET;
//((s->method)->ssl3_enc)->client_finished_label_len);
if (ret <= 0) {
goto end;
}
s->state = 4352;
(s->s3)->flags &= -5L;
if (s->hit) {
(s->s3)->tmp.next_state = 3;
if ((s->s3)->flags & 2L) {
s->state = 3;
(s->s3)->flags |= 4L;
(s->s3)->delay_buf_pop_ret = 0;
}
} else {
(s->s3)->tmp.next_state = 4560;
}
s->init_num = 0;
break;
case 4560: ;
case 4561:
//ret = ssl3_get_finished(s, 4560, 4561);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
if (s->hit) {
s->state = 4512;
} else {
s->state = 3;
}
s->init_num = 0;
break;
case 4352:
//num1 = BIO_ctrl(s->wbio, 3, 0L, (void *)0);
if (num1 > 0L) {
s->rwstate = 2;
//tmp___9 = BIO_ctrl(s->wbio, 11, 0L, (void *)0);
num1 = (long )((int )tmp___9);
if (num1 <= 0L) {
ret = -1;
goto end;
}
s->rwstate = 1;
}
s->state = (s->s3)->tmp.next_state;
break;
case 3:
//ssl3_cleanup_key_block(s);
if ((unsigned long )s->init_buf != (unsigned long )((void *)0)) {
//BUF_MEM_free(s->init_buf);
s->init_buf = (BUF_MEM *)((void *)0);
}
if (! ((s->s3)->flags & 4L)) {
//ssl_free_wbio_buffer(s);
}
s->init_num = 0;
s->new_session = 0;
//ssl_update_cache(s, 1);
if (s->hit) {
(s->ctx)->stats.sess_hit ++;
}
ret = 1;
s->handshake_func = (int (*)())(& ssl3_connect);
(s->ctx)->stats.sess_connect_good ++;
if ((unsigned long )cb != (unsigned long )((void *)0)) {
//((*cb))(s, 32, 1);
}
goto end;
default:
//ERR_put_error(20, 132, 255, (char const *)"s3_clnt.c", 418);
ret = -1;
goto end;
}
if (! (s->s3)->tmp.reuse_message) {
if (! skip) {
if (s->debug) {
//ret = (int )BIO_ctrl(s->wbio, 11, 0L, (void *)0);
ret = __BLAST_NONDET;
if (ret <= 0) {
goto end;
}
}
if ((unsigned long )cb != (unsigned long )((void *)0)) {
if (s->state != state) {
new_state = s->state;
s->state = state;
//((*cb))(s, 4097, 1);
s->state = new_state;
}
}
}
}
skip = 0;
}
end:
s->in_handshake --;
if ((unsigned long )cb != (unsigned long )((void *)0)) {
//((*cb))(s, 4098, ret);
}
return (ret);
ERROR: goto ERROR;
}
}
static int ssl3_client_hello(SSL *s )
{ unsigned char *buf ;
unsigned char *p ;
unsigned char *d ;
int i ;
int j ;
unsigned long Time ;
unsigned long l ;
SSL_COMP *comp ;
int tmp ;
unsigned char *tmp___0 ;
unsigned char *tmp___1 ;
unsigned char *tmp___2 ;
unsigned char *tmp___3 ;
unsigned char *tmp___4 ;
unsigned char *tmp___5 ;
unsigned char *tmp___6 ;
STACK *tmp___7 ;
unsigned char *tmp___8 ;
unsigned char *tmp___10 ;
unsigned char *tmp___11 ;
unsigned char *tmp___12 ;
int tmp___13 ;
{
buf = (unsigned char *)(s->init_buf)->data;
if (s->state == 4368) {
if ((unsigned long )s->session == (unsigned long )((void *)0)) {
goto _L;
} else {
if ((s->session)->ssl_version != s->version) {
goto _L;
} else {
if ((s->session)->not_resumable) {
_L:
tmp = ssl_get_new_session(s, 0); if (! tmp) {
goto err;
}
}
}
}
p = (s->s3)->client_random;
Time = (unsigned long )time((time_t *)((void *)0));
tmp___0 = p; p ++; (*tmp___0) = (unsigned char )((Time >> 24) & 255UL); tmp___1 = p; p ++; (*tmp___1) = (unsigned char )((Time >> 16) & 255UL); tmp___2 = p; p ++; (*tmp___2) = (unsigned char )((Time >> 8) & 255UL); tmp___3 = p; p ++; (*tmp___3) = (unsigned char )(Time & 255UL);
RAND_pseudo_bytes(p, (int )(32U - sizeof(Time)));
p = buf + 4; d = p;
tmp___4 = p; p ++; (*tmp___4) = (unsigned char )(s->version >> 8);
tmp___5 = p; p ++; (*tmp___5) = (unsigned char )(s->version & 255);
s->client_version = s->version;
memcpy((void * )p, (void const * )((s->s3)->client_random),
32U); p += 32;
if (s->new_session) { i = 0;
} else {
i = (int )(s->session)->session_id_length;
}
tmp___6 = p; p ++; (*tmp___6) = (unsigned char )i;
if (i != 0) {
memcpy((void * )p, (void const * )((s->session)->session_id),
(unsigned int )i); p += i;
}
tmp___7 = SSL_get_ciphers(s); i = ssl_cipher_list_to_bytes(s, tmp___7, p + 2);
if (i == 0) {
ERR_put_error(20, 131, 181, (char const *)"s3_clnt.c", 503);
goto err;
}
(*(p + 0)) = (unsigned char )((i >> 8) & 255); (*(p + 1)) = (unsigned char )(i & 255); p += 2;
p += i;
if ((unsigned long )(s->ctx)->comp_methods == (unsigned long )((void *)0)) { j = 0;
} else {
j = sk_num((STACK const *)(s->ctx)->comp_methods);
}
tmp___8 = p; p ++; (*tmp___8) = (unsigned char )(1 + j);
i = 0; while (i < j) {
comp = (SSL_COMP *)sk_value((STACK const *)(s->ctx)->comp_methods, i);
tmp___10 = p; p ++; (*tmp___10) = (unsigned char )comp->id;
i ++;
}
tmp___11 = p; p ++; (*tmp___11) = 0;
l = (unsigned long )(p - d);
d = buf;
tmp___12 = d; d ++; (*tmp___12) = 1;
(*(d + 0)) = (unsigned char )((l >> 16) & 255UL); (*(d + 1)) = (unsigned char )((l >> 8) & 255UL); (*(d + 2)) = (unsigned char )(l & 255UL); d += 3;
s->state = 4369;
s->init_num = p - buf;
s->init_off = 0;
}
tmp___13 = ssl3_do_write(s, 22); return (tmp___13);
err:
return (-1);
}
}static int ssl3_get_server_hello(SSL *s )
{ STACK *sk ;
SSL_CIPHER *c ;
unsigned char *p ;
unsigned char *d ;
int i ;
int al ;
int ok ;
unsigned int j ;
long n ;
SSL_COMP *comp ;
unsigned char *tmp ;
int tmp___0 ;
int tmp___1 ;
int tmp___2 ;
int tmp___3 ;
unsigned char *tmp___4 ;
{
n = ssl3_get_message(s, 4384, 4385, 2, 300L, & ok);
if (! ok) { return ((int )n);
} p = (unsigned char *)(s->init_buf)->data; d = p;
if ((int )(*(p + 0)) != s->version >> 8) {
ERR_put_error(20, 146, 266, (char const *)"s3_clnt.c", 561);
s->version = (s->version & 65280) | (int )(*(p + 1));
al = 70;
goto f_err;
} else {
if ((int )(*(p + 1)) != (s->version & 255)) {
ERR_put_error(20, 146, 266, (char const *)"s3_clnt.c", 561);
s->version = (s->version & 65280) | (int )(*(p + 1));
al = 70;
goto f_err;
}
} p += 2;
memcpy((void * )((s->s3)->server_random), (void const * )p,
32U); p += 32;
tmp = p; p ++; j = (unsigned int )(*tmp);
if (j != 0U) { if (j != 32U) {
if (j < 16U) {
al = 47;
ERR_put_error(20, 146, 222, (char const *)"s3_clnt.c", 582);
goto f_err;
}
}
} if (j != 0U) { if (j == (s->session)->session_id_length) { tmp___2 = memcmp((void const *)p, (void const *)((s->session)->session_id),
j);
if (tmp___2 == 0) {
if (s->sid_ctx_length != (s->session)->sid_ctx_length) {
al = 47;
ERR_put_error(20, 146, 272, (char const *)"s3_clnt.c", 593);
goto f_err;
} else {
tmp___0 = memcmp((void const *)((s->session)->sid_ctx), (void const *)(s->sid_ctx),
s->sid_ctx_length);
if (tmp___0) {
al = 47;
ERR_put_error(20, 146, 272, (char const *)"s3_clnt.c", 593);
goto f_err;
}
} s->hit = 1;
} else {
goto _L___0;
}
} else {
goto _L___0;
}
} else {
_L___0:
_L:
s->hit = 0;
if ((s->session)->session_id_length > 0U) {
tmp___1 = ssl_get_new_session(s, 0); if (! tmp___1) {
al = 80;
goto f_err;
}
}
(s->session)->session_id_length = j;
memcpy((void * )((s->session)->session_id), (void const * )p,
j);
} p += j;
c = ((*((s->method)->get_cipher_by_char)))((unsigned char const *)p);
if ((unsigned long )c == (unsigned long )((void *)0)) {
al = 47;
ERR_put_error(20, 146, 248, (char const *)"s3_clnt.c", 620);
goto f_err;
}
tmp___3 = ((*((s->method)->put_cipher_by_char)))((SSL_CIPHER const *)((void *)0),
(unsigned char *)((void *)0));
p += tmp___3;
sk = ssl_get_ciphers_by_id(s);
i = sk_find(sk, (char *)c);
if (i < 0) {
al = 47;
ERR_put_error(20, 146, 261, (char const *)"s3_clnt.c", 631);
goto f_err;
}
if (s->hit) { if ((unsigned long )(s->session)->cipher != (unsigned long )c) {
if (! (s->options & 8UL)) {
al = 47;
ERR_put_error(20, 146, 197, (char const *)"s3_clnt.c", 641);
goto f_err;
}
}
} (s->s3)->tmp.new_cipher = c;
tmp___4 = p; p ++; j = (unsigned int )(*tmp___4);
if (j == 0U) { comp = (SSL_COMP *)((void *)0);
} else {
comp = ssl3_comp_find((s->ctx)->comp_methods, (int )j);
}
if (j != 0U) { if ((unsigned long )comp == (unsigned long )((void *)0)) {
al = 47;
ERR_put_error(20, 146, 257, (char const *)"s3_clnt.c", 658);
goto f_err;
} else {
(s->s3)->tmp.new_compression = (SSL_COMP const *)comp;
}
} else {
(s->s3)->tmp.new_compression = (SSL_COMP const *)comp;
}
if ((unsigned long )p != (unsigned long )(d + n)) {
al = 50;
ERR_put_error(20, 146, 115, (char const *)"s3_clnt.c", 670);
goto err;
}
return (1);
f_err:
ssl3_send_alert(s, 2, al);
err:
return (-1);
}
}static int ssl3_get_server_certificate(SSL *s )
{ int al ;
int i ;
int ok ;
int ret ;
unsigned long n ;
unsigned long nc ;
unsigned long llen ;
unsigned long l ;
X509 *x ;
unsigned char *p ;
unsigned char *d ;
unsigned char *q ;
STACK *sk ;
SESS_CERT *sc ;
EVP_PKEY *pkey ;
int tmp ;
int tmp___1 ;
{
ret = -1;
x = (X509 *)((void *)0);
sk = (STACK *)((void *)0);
pkey = (EVP_PKEY *)((void *)0);
n = (unsigned long )ssl3_get_message(s, 4400, 4401, -1, 102400L, & ok);
if (! ok) { return ((int )n);
} if ((s->s3)->tmp.message_type == 12) {
(s->s3)->tmp.reuse_message = 1;
return (1);
}
if ((s->s3)->tmp.message_type != 11) {
al = 10;
ERR_put_error(20, 144, 114, (char const *)"s3_clnt.c", 713);
goto f_err;
}
p = (unsigned char *)(s->init_buf)->data; d = p;
sk = sk_new_null(); if ((unsigned long )sk == (unsigned long )((void *)0)) {
ERR_put_error(20, 144, 33, (char const *)"s3_clnt.c", 720);
goto err;
}
llen = (((unsigned long )(*(p + 0)) << 16) | ((unsigned long )(*(p + 1)) << 8)) |
(unsigned long )(*(p + 2));
p += 3;
if (llen + 3UL != n) {
al = 50;
ERR_put_error(20, 144, 159, (char const *)"s3_clnt.c", 728);
goto f_err;
}
nc = 0UL; while (nc < llen) {
l = (((unsigned long )(*(p + 0)) << 16) | ((unsigned long )(*(p + 1)) << 8)) |
(unsigned long )(*(p + 2));
p += 3;
if ((l + nc) + 3UL > llen) {
al = 50;
ERR_put_error(20, 144, 135, (char const *)"s3_clnt.c", 737);
goto f_err;
}
q = p;
x = d2i_X509((X509 **)((void *)0), & q, (long )l);
if ((unsigned long )x == (unsigned long )((void *)0)) {
al = 42;
ERR_put_error(20, 144, 13, (char const *)"s3_clnt.c", 746);
goto f_err;
}
if ((unsigned long )q != (unsigned long )(p + l)) {
al = 50;
ERR_put_error(20, 144, 135, (char const *)"s3_clnt.c", 752);
goto f_err;
}
tmp = sk_push(sk, (char *)x); if (! tmp) {
ERR_put_error(20, 144, 33, (char const *)"s3_clnt.c", 757);
goto err;
}
x = (X509 *)((void *)0);
nc += l + 3UL;
p = q;
}
i = ssl_verify_cert_chain(s, sk);
if (s->verify_mode != 0) { if (! i) {
al = ssl_verify_alarm_type(s->verify_result);
ERR_put_error(20, 144, 134, (char const *)"s3_clnt.c", 769);
goto f_err;
}
} ERR_clear_error();
sc = ssl_sess_cert_new();
if ((unsigned long )sc == (unsigned long )((void *)0)) {
goto err;
}
if ((s->session)->sess_cert) { ssl_sess_cert_free((s->session)->sess_cert);
} (s->session)->sess_cert = sc;
sc->cert_chain = sk;
x = (X509 *)sk_value((STACK const *)sk, 0);
sk = (STACK *)((void *)0);
pkey = X509_get_pubkey(x);
if ((unsigned long )pkey == (unsigned long )((void *)0)) {
x = (X509 *)((void *)0);
al = 2;
ERR_put_error(20, 144, 239, (char const *)"s3_clnt.c", 792);
goto f_err;
} else {
tmp___1 = EVP_PKEY_missing_parameters(pkey); if (tmp___1) {
x = (X509 *)((void *)0);
al = 2;
ERR_put_error(20, 144, 239, (char const *)"s3_clnt.c", 792);
goto f_err;
}
} i = ssl_cert_type(x, pkey);
if (i < 0) {
x = (X509 *)((void *)0);
al = 2;
ERR_put_error(20, 144, 247, (char const *)"s3_clnt.c", 801);
goto f_err;
}
sc->peer_cert_type = i;
CRYPTO_add_lock(& x->references, 1, 3, (char const *)"s3_clnt.c", 806);
if ((unsigned long )sc->peer_pkeys[i].x509 != (unsigned long )((void *)0)) { X509_free(sc->peer_pkeys[i].x509);
}
sc->peer_pkeys[i].x509 = x;
sc->peer_key = & sc->peer_pkeys[i];
if ((unsigned long )(s->session)->peer != (unsigned long )((void *)0)) { X509_free((s->session)->peer);
}
CRYPTO_add_lock(& x->references, 1, 3, (char const *)"s3_clnt.c", 816);
(s->session)->peer = x;
(s->session)->verify_result = s->verify_result;
x = (X509 *)((void *)0);
ret = 1;
if (0) {
f_err:
ssl3_send_alert(s, 2, al);
}
err:
EVP_PKEY_free(pkey);
X509_free(x);
sk_pop_free(sk, (void (*)(void * ))(& X509_free));
return (ret);
}
}static int ssl3_get_key_exchange(SSL *s )
{ unsigned char *q ;
unsigned char md_buf[72] ;
EVP_MD_CTX md_ctx ;
unsigned char *param ;
unsigned char *p ;
int al ;
int i ;
int j ;
int param_len ;
int ok ;
long n ;
long alg ;
EVP_PKEY *pkey ;
RSA *rsa ;
DH *dh ;
int num ;
EVP_MD const *tmp ;
EVP_MD const *tmp___0 ;
int tmp___1 ;
{
pkey = (EVP_PKEY *)((void *)0);
rsa = (RSA *)((void *)0);
dh = (DH *)((void *)0);
n = ssl3_get_message(s, 4416, 4417, -1, 102400L, & ok);
if (! ok) { return ((int )n);
} if ((s->s3)->tmp.message_type != 12) {
(s->s3)->tmp.reuse_message = 1;
return (1);
}
p = (unsigned char *)(s->init_buf)->data; param = p;
if ((unsigned long )(s->session)->sess_cert != (unsigned long )((void *)0)) {
if ((unsigned long )((s->session)->sess_cert)->peer_rsa_tmp != (unsigned long )((void *)0)) {
RSA_free(((s->session)->sess_cert)->peer_rsa_tmp);
((s->session)->sess_cert)->peer_rsa_tmp = (RSA *)((void *)0);
}
if (((s->session)->sess_cert)->peer_dh_tmp) {
DH_free(((s->session)->sess_cert)->peer_dh_tmp);
((s->session)->sess_cert)->peer_dh_tmp = (DH *)((void *)0);
}
} else {
(s->session)->sess_cert = ssl_sess_cert_new();
}
param_len = 0;
alg = (long )((s->s3)->tmp.new_cipher)->algorithms;
if (alg & 1L) {
rsa = RSA_new(); if ((unsigned long )rsa == (unsigned long )((void *)0)) {
ERR_put_error(20, 141, 33, (char const *)"s3_clnt.c", 905);
goto err;
}
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
param_len = i + 2;
if ((long )param_len > n) {
al = 50;
ERR_put_error(20, 141, 121, (char const *)"s3_clnt.c", 913);
goto f_err;
}
rsa->n = BN_bin2bn((unsigned char const *)p, i, rsa->n); if (! rsa->n) {
ERR_put_error(20, 141, 3, (char const *)"s3_clnt.c", 918);
goto err;
}
p += i;
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
param_len += i + 2;
if ((long )param_len > n) {
al = 50;
ERR_put_error(20, 141, 120, (char const *)"s3_clnt.c", 928);
goto f_err;
}
rsa->e = BN_bin2bn((unsigned char const *)p, i, rsa->e); if (! rsa->e) {
ERR_put_error(20, 141, 3, (char const *)"s3_clnt.c", 933);
goto err;
}
p += i;
n -= (long )param_len;
if (alg & 32L) { pkey = X509_get_pubkey(((s->session)->sess_cert)->peer_pkeys[0].x509);
} else {
ERR_put_error(20, 141, 157, (char const *)"s3_clnt.c", 944);
goto err;
}
((s->session)->sess_cert)->peer_rsa_tmp = rsa;
rsa = (RSA *)((void *)0);
} else {
if (alg & 16L) {
dh = DH_new(); if ((unsigned long )dh == (unsigned long )((void *)0)) {
ERR_put_error(20, 141, 5, (char const *)"s3_clnt.c", 959);
goto err;
}
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
param_len = i + 2;
if ((long )param_len > n) {
al = 50;
ERR_put_error(20, 141, 110, (char const *)"s3_clnt.c", 967);
goto f_err;
}
dh->p = BN_bin2bn((unsigned char const *)p, i, (BIGNUM *)((void *)0)); if (! dh->p) {
ERR_put_error(20, 141, 3, (char const *)"s3_clnt.c", 972);
goto err;
}
p += i;
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
param_len += i + 2;
if ((long )param_len > n) {
al = 50;
ERR_put_error(20, 141, 108, (char const *)"s3_clnt.c", 982);
goto f_err;
}
dh->g = BN_bin2bn((unsigned char const *)p, i, (BIGNUM *)((void *)0)); if (! dh->g) {
ERR_put_error(20, 141, 3, (char const *)"s3_clnt.c", 987);
goto err;
}
p += i;
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
param_len += i + 2;
if ((long )param_len > n) {
al = 50;
ERR_put_error(20, 141, 109, (char const *)"s3_clnt.c", 997);
goto f_err;
}
dh->pub_key = BN_bin2bn((unsigned char const *)p, i, (BIGNUM *)((void *)0)); if (! dh->pub_key) {
ERR_put_error(20, 141, 3, (char const *)"s3_clnt.c", 1002);
goto err;
}
p += i;
n -= (long )param_len;
if (alg & 32L) { pkey = X509_get_pubkey(((s->session)->sess_cert)->peer_pkeys[0].x509);
} else {
if (alg & 64L) { pkey = X509_get_pubkey(((s->session)->sess_cert)->peer_pkeys[2].x509);
}
} ((s->session)->sess_cert)->peer_dh_tmp = dh;
dh = (DH *)((void *)0);
} else {
if (alg & 2L) {
al = 47;
ERR_put_error(20, 141, 235, (char const *)"s3_clnt.c", 1027);
goto f_err;
} else {
if (alg & 4L) {
al = 47;
ERR_put_error(20, 141, 235, (char const *)"s3_clnt.c", 1027);
goto f_err;
}
}
}
}
if (alg & 128L) {
al = 40;
ERR_put_error(20, 141, 235, (char const *)"s3_clnt.c", 1034);
goto f_err;
}
if ((unsigned long )pkey != (unsigned long )((void *)0)) {
i = (int )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1))); p += 2;
n -= 2L;
j = EVP_PKEY_size(pkey);
if ((long )i != n) {
al = 50;
ERR_put_error(20, 141, 264, (char const *)"s3_clnt.c", 1053);
goto f_err;
} else {
if (n > (long )j) {
al = 50;
ERR_put_error(20, 141, 264, (char const *)"s3_clnt.c", 1053);
goto f_err;
} else {
if (n <= 0L) {
al = 50;
ERR_put_error(20, 141, 264, (char const *)"s3_clnt.c", 1053);
goto f_err;
}
}
}
if (pkey->type == 6) {
j = 0;
q = md_buf;
num = 2; while (num > 0) {
if (num == 2) { tmp = (s->ctx)->md5;
} else {
tmp = (s->ctx)->sha1;
}
EVP_DigestInit(& md_ctx, tmp);
EVP_DigestUpdate(& md_ctx, (void const *)(& (s->s3)->client_random[0]),
32U); EVP_DigestUpdate(& md_ctx, (void const *)(& (s->s3)->server_random[0]),
32U); EVP_DigestUpdate(& md_ctx, (void const *)param, (unsigned int )param_len);
EVP_DigestFinal(& md_ctx, q, (unsigned int *)(& i));
q += i;
j += i;
num --;
}
i = RSA_verify(114, md_buf, (unsigned int )j, p, (unsigned int )n, pkey->pkey.rsa);
if (i < 0) {
al = 51;
ERR_put_error(20, 141, 118, (char const *)"s3_clnt.c", 1080);
goto f_err;
}
if (i == 0) {
al = 51;
ERR_put_error(20, 141, 123, (char const *)"s3_clnt.c", 1087);
goto f_err;
}
} else {
if (pkey->type == 116) {
tmp___0 = (EVP_MD const *)EVP_dss1(); EVP_DigestInit(& md_ctx, tmp___0);
EVP_DigestUpdate(& md_ctx, (void const *)(& (s->s3)->client_random[0]),
32U); EVP_DigestUpdate(& md_ctx, (void const *)(& (s->s3)->server_random[0]),
32U); EVP_DigestUpdate(& md_ctx, (void const *)param, (unsigned int )param_len);
tmp___1 = EVP_VerifyFinal(& md_ctx, p, (unsigned int )((int )n), pkey); if (! tmp___1) {
al = 51;
ERR_put_error(20, 141, 123, (char const *)"s3_clnt.c", 1105);
goto f_err;
}
} else {
ERR_put_error(20, 141, 157, (char const *)"s3_clnt.c", 1112);
goto err;
}
}
} else {
if (! (alg & 256L)) {
ERR_put_error(20, 141, 157, (char const *)"s3_clnt.c", 1121);
goto err;
}
if (n != 0L) {
al = 50;
ERR_put_error(20, 141, 153, (char const *)"s3_clnt.c", 1127);
goto f_err;
}
}
EVP_PKEY_free(pkey);
return (1);
f_err:
ssl3_send_alert(s, 2, al);
err:
EVP_PKEY_free(pkey);
if ((unsigned long )rsa != (unsigned long )((void *)0)) { RSA_free(rsa);
}
if ((unsigned long )dh != (unsigned long )((void *)0)) { DH_free(dh);
}
return (-1);
}
}static int ssl3_get_certificate_request(SSL *s )
{ int ok ;
int ret ;
unsigned long n ;
unsigned long nc ;
unsigned long l ;
unsigned int llen ;
unsigned int ctype_num ;
unsigned int i ;
X509_NAME *xn ;
unsigned char *p ;
unsigned char *d ;
unsigned char *q ;
STACK *ca_sk ;
unsigned char *tmp ;
int tmp___0 ;
{
ret = 0;
xn = (X509_NAME *)((void *)0);
ca_sk = (STACK *)((void *)0);
n = (unsigned long )ssl3_get_message(s, 4432, 4433, -1, 102400L, & ok);
if (! ok) { return ((int )n);
} (s->s3)->tmp.cert_req = 0;
if ((s->s3)->tmp.message_type == 14) {
(s->s3)->tmp.reuse_message = 1;
return (1);
}
if ((s->s3)->tmp.message_type != 13) {
ssl3_send_alert(s, 2, 10);
ERR_put_error(20, 135, 262, (char const *)"s3_clnt.c", 1181);
goto err;
}
if (s->version > 768) {
l = ((s->s3)->tmp.new_cipher)->algorithms;
if (l & 256UL) {
ssl3_send_alert(s, 2, 10);
ERR_put_error(20, 135, 232, (char const *)"s3_clnt.c", 1192);
goto err;
}
}
p = (unsigned char *)(s->init_buf)->data; d = p;
ca_sk = sk_new((int (*)(char const * const * , char const * const * ))(& ca_dn_cmp)); if ((unsigned long )ca_sk == (unsigned long )((void *)0)) {
ERR_put_error(20, 135, 33, (char const *)"s3_clnt.c", 1201);
goto err;
}
tmp = p; p ++; ctype_num = (unsigned int )(*tmp);
if (ctype_num > 7U) { ctype_num = 7U;
}
i = 0U; while (i < ctype_num) { (s->s3)->tmp.ctype[i] = (char )(*(p + i)); i ++;
}
p += ctype_num;
llen = ((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p + 1)); p += 2;
if ((unsigned long )(((llen + ctype_num) + 2U) + 1U) != n) {
ssl3_send_alert(s, 2, 50);
ERR_put_error(20, 135, 159, (char const *)"s3_clnt.c", 1227);
goto err;
}
nc = 0UL; while (nc < (unsigned long )llen) {
l = (unsigned long )(((unsigned int )(*(p + 0)) << 8) | (unsigned int )(*(p +
1)));
p += 2;
if ((l + nc) + 2UL > (unsigned long )llen) {
if (s->options & 536870912UL) {
goto cont;
} ssl3_send_alert(s, 2, 50);
ERR_put_error(20, 135, 132, (char const *)"s3_clnt.c", 1239);
goto err;
}
q = p;
xn = d2i_X509_NAME((X509_NAME **)((void *)0), & q, (long )l); if ((unsigned long )xn == (unsigned long )((void *)0)) {
if (s->options & 536870912UL) {
goto cont;
} else {
ssl3_send_alert(s, 2, 50);
ERR_put_error(20, 135, 13, (char const *)"s3_clnt.c", 1253);
goto err;
}
}
if ((unsigned long )q != (unsigned long )(p + l)) {
ssl3_send_alert(s, 2, 50);
ERR_put_error(20, 135, 131, (char const *)"s3_clnt.c", 1261);
goto err;
}
tmp___0 = sk_push(ca_sk, (char *)xn); if (! tmp___0) {
ERR_put_error(20, 135, 33, (char const *)"s3_clnt.c", 1266);
goto err;
}
p += l;
nc += l + 2UL;
}
if (0) {
cont:
ERR_clear_error();
}
(s->s3)->tmp.cert_req = 1;
(s->s3)->tmp.ctype_num = (int )ctype_num;
if ((unsigned long )(s->s3)->tmp.ca_names != (unsigned long )((void *)0)) { sk_pop_free((s->s3)->tmp.ca_names, (void (*)(void * ))(& X509_NAME_free));
}
(s->s3)->tmp.ca_names = ca_sk;
ca_sk = (STACK *)((void *)0);
ret = 1;
err:
if ((unsigned long )ca_sk != (unsigned long )((void *)0)) { sk_pop_free(ca_sk, (void (*)(void * ))(& X509_NAME_free));
} return (ret);
}
}static int ca_dn_cmp(X509_NAME const * const *a , X509_NAME const * const *b )
{ int tmp ;
{
tmp = X509_NAME_cmp((X509_NAME const *)(*a), (X509_NAME const *)(*b)); return (tmp);
}
}static int ssl3_get_server_done(SSL *s )
{ int ok ;
int ret ;
long n ;
{
ret = 0;
n = ssl3_get_message(s, 4448, 4449, 14, 30L, & ok);
if (! ok) { return ((int )n);
} if (n > 0L) {
ssl3_send_alert(s, 2, 50);
ERR_put_error(20, 145, 159, (char const *)"s3_clnt.c", 1316);
}
ret = 1;
return (ret);
}
}static int ssl3_send_client_key_exchange(SSL *s )
{ unsigned char *p ;
unsigned char *d ;
int n ;
unsigned long l ;
unsigned char *q ;
EVP_PKEY *pkey ;
RSA *rsa ;
unsigned char tmp_buf[48] ;
int tmp ;
DH *dh_srvr ;
DH *dh_clnt ;
int tmp___1 ;
int tmp___2 ;
unsigned char *tmp___3 ;
int tmp___4 ;
{
pkey = (EVP_PKEY *)((void *)0);
if (s->state == 4480) {
d = (unsigned char *)(s->init_buf)->data;
p = d + 4;
l = ((s->s3)->tmp.new_cipher)->algorithms;
if (l & 1UL) {
if ((unsigned long )((s->session)->sess_cert)->peer_rsa_tmp != (unsigned long )((void *)0)) { rsa = ((s->session)->sess_cert)->peer_rsa_tmp;
} else {
pkey = X509_get_pubkey(((s->session)->sess_cert)->peer_pkeys[0].x509);
if ((unsigned long )pkey == (unsigned long )((void *)0)) {
ERR_put_error(20, 152, 157, (char const *)"s3_clnt.c", 1354);
goto err;
} else {
if (pkey->type != 6) {
ERR_put_error(20, 152, 157, (char const *)"s3_clnt.c", 1354);
goto err;
} else {
if ((unsigned long )pkey->pkey.rsa == (unsigned long )((void *)0)) {
ERR_put_error(20, 152, 157, (char const *)"s3_clnt.c", 1354);
goto err;
}
}
}
rsa = pkey->pkey.rsa;
EVP_PKEY_free(pkey);
}
tmp_buf[0] = (unsigned char )(s->client_version >> 8);
tmp_buf[1] = (unsigned char )(s->client_version & 255);
tmp = RAND_bytes(& tmp_buf[2], 46); if (tmp <= 0) {
goto err;
} (s->session)->master_key_length = 48;
q = p;
if (s->version > 768) { p += 2;
}
n = RSA_public_encrypt(48, tmp_buf, p, rsa, 1);
if (s->options & 134217728UL) { (*(p + 1)) = (unsigned char )((int )(*(p + 1)) + 1);
} if (s->options & 268435456UL) { tmp_buf[0] = 112;
} if (n <= 0) {
ERR_put_error(20, 152, 119, (char const *)"s3_clnt.c", 1380);
goto err;
}
if (s->version > 768) {
(*(q + 0)) = (unsigned char )((n >> 8) & 255); (*(q + 1)) = (unsigned char )(n & 255); q += 2;
n += 2;
}
(s->session)->master_key_length = ((*(((s->method)->ssl3_enc)->generate_master_secret)))(s,
(s->session)->master_key,
tmp_buf,
48);
memset((void *)(tmp_buf), 0, 48U);
} else {
if (l & 22UL) {
if ((unsigned long )((s->session)->sess_cert)->peer_dh_tmp != (unsigned long )((void *)0)) { dh_srvr = ((s->session)->sess_cert)->peer_dh_tmp;
} else {
ssl3_send_alert(s, 2, 40);
ERR_put_error(20, 152, 238, (char const *)"s3_clnt.c", 1410);
goto err;
}
dh_clnt = (DH *)ASN1_dup((int (*)())(& i2d_DHparams), (char *(*)())(& d2i_DHparams),
(char *)dh_srvr);
if ((unsigned long )dh_clnt == (unsigned long )((void *)0)) {
ERR_put_error(20, 152, 5, (char const *)"s3_clnt.c", 1417);
goto err;
}
tmp___1 = DH_generate_key(dh_clnt); if (! tmp___1) {
ERR_put_error(20, 152, 5, (char const *)"s3_clnt.c", 1422);
goto err;
}
n = DH_compute_key(p, dh_srvr->pub_key, dh_clnt);
if (n <= 0) {
ERR_put_error(20, 152, 5, (char const *)"s3_clnt.c", 1433);
goto err;
}
(s->session)->master_key_length = ((*(((s->method)->ssl3_enc)->generate_master_secret)))(s,
(s->session)->master_key,
p,
n); memset((void *)p, 0, (unsigned int )n);
tmp___2 = BN_num_bits((BIGNUM const *)dh_clnt->pub_key); n = (tmp___2 + 7) / 8;
(*(p + 0)) = (unsigned char )((n >> 8) & 255); (*(p + 1)) = (unsigned char )(n & 255); p += 2;
BN_bn2bin((BIGNUM const *)dh_clnt->pub_key, p);
n += 2;
DH_free(dh_clnt);
} else {
ssl3_send_alert(s, 2, 40);
ERR_put_error(20, 152, 157, (char const *)"s3_clnt.c", 1458);
goto err;
}
} tmp___3 = d; d ++; (*tmp___3) = 16;
(*(d + 0)) = (unsigned char )((n >> 16) & 255); (*(d + 1)) = (unsigned char )((n >> 8) & 255); (*(d + 2)) = (unsigned char )(n & 255); d += 3;
s->state = 4481;
s->init_num = n + 4;
s->init_off = 0;
}
tmp___4 = ssl3_do_write(s, 22); return (tmp___4);
err:
return (-1);
}
}static int ssl3_send_client_verify(SSL *s )
{ unsigned char *p ;
unsigned char *d ;
unsigned char data[36] ;
EVP_PKEY *pkey ;
unsigned int u ;
unsigned long n ;
int j ;
int tmp ;
int tmp___0 ;
unsigned char *tmp___1 ;
int tmp___2 ;
{
u = 0U;
if (s->state == 4496) {
d = (unsigned char *)(s->init_buf)->data;
p = d + 4;
pkey = ((s->cert)->key)->privatekey;
((*(((s->method)->ssl3_enc)->cert_verify_mac)))(s, & (s->s3)->finish_dgst2, & data[16]);
if (pkey->type == 6) {
((*(((s->method)->ssl3_enc)->cert_verify_mac)))(s, & (s->s3)->finish_dgst1,
data);
tmp = RSA_sign(114, data, 36U, p + 2, & u, pkey->pkey.rsa); if (tmp <= 0) {
ERR_put_error(20, 153, 4, (char const *)"s3_clnt.c", 1508);
goto err;
}
(*(p + 0)) = (unsigned char )((u >> 8) & 255U); (*(p + 1)) = (unsigned char )(u & 255U); p += 2;
n = (unsigned long )(u + 2U);
} else {
if (pkey->type == 116) {
tmp___0 = DSA_sign(pkey->save_type, (unsigned char const *)(& data[16]),
20, p + 2, (unsigned int *)(& j), pkey->pkey.dsa);
if (! tmp___0) {
ERR_put_error(20, 153, 10, (char const *)"s3_clnt.c", 1524);
goto err;
}
(*(p + 0)) = (unsigned char )((j >> 8) & 255); (*(p + 1)) = (unsigned char )(j & 255); p += 2;
n = (unsigned long )(j + 2);
} else {
ERR_put_error(20, 153, 157, (char const *)"s3_clnt.c", 1533);
goto err;
}
} tmp___1 = d; d ++; (*tmp___1) = 15;
(*(d + 0)) = (unsigned char )((n >> 16) & 255UL); (*(d + 1)) = (unsigned char )((n >> 8) & 255UL); (*(d + 2)) = (unsigned char )(n & 255UL); d += 3;
s->init_num = (int )n + 4;
s->init_off = 0;
}
tmp___2 = ssl3_do_write(s, 22); return (tmp___2);
err:
return (-1);
}
}static int ssl3_send_client_certificate(SSL *s )
{ X509 *x509 ;
EVP_PKEY *pkey ;
int i ;
unsigned long l ;
int tmp ;
int tmp___0 ;
X509 *tmp___1 ;
int tmp___2 ;
{
x509 = (X509 *)((void *)0);
pkey = (EVP_PKEY *)((void *)0);
if (s->state == 4464) {
if ((unsigned long )s->cert == (unsigned long )((void *)0)) {
s->state = 4465;
} else {
if ((unsigned long )((s->cert)->key)->x509 == (unsigned long )((void *)0)) {
s->state = 4465;
} else {
if ((unsigned long )((s->cert)->key)->privatekey == (unsigned long )((void *)0)) {
s->state = 4465;
} else {
s->state = 4466;
}
}
}
}
if (s->state == 4465) {
i = 0;
if ((unsigned long )(s->ctx)->client_cert_cb != (unsigned long )((void *)0)) { i = ((*((s->ctx)->client_cert_cb)))(s, & x509, & pkey);
}
if (i < 0) {
s->rwstate = 4;
return (-1);
}
s->rwstate = 1;
if (i == 1) { if ((unsigned long )pkey != (unsigned long )((void *)0)) { if ((unsigned long )x509 != (unsigned long )((void *)0)) {
s->state = 4465;
tmp = SSL_use_certificate(s, x509); if (tmp) { tmp___0 = SSL_use_PrivateKey(s, pkey); if (! tmp___0) {
i = 0;
}
} else {
i = 0;
}
} else {
goto _L___0;
}
} else {
goto _L___0;
}
} else {
_L___0:
_L:
if (i == 1) {
i = 0;
ERR_put_error(20, 151, 106, (char const *)"s3_clnt.c", 1589);
}
} if ((unsigned long )x509 != (unsigned long )((void *)0)) { X509_free(x509);
} if ((unsigned long )pkey != (unsigned long )((void *)0)) { EVP_PKEY_free(pkey);
} if (i == 0) {
if (s->version == 768) {
(s->s3)->tmp.cert_req = 0;
ssl3_send_alert(s, 1, 41);
return (1);
} else {
(s->s3)->tmp.cert_req = 2;
}
}
s->state = 4466;
}
if (s->state == 4466) {
s->state = 4467;
if ((s->s3)->tmp.cert_req == 2) { tmp___1 = (X509 *)((void *)0);
} else {
tmp___1 = ((s->cert)->key)->x509;
}
l = ssl3_output_cert_chain(s, tmp___1);
s->init_num = (int )l;
s->init_off = 0;
}
tmp___2 = ssl3_do_write(s, 22); return (tmp___2);
}
}static int ssl3_check_cert_and_algorithm(SSL *s )
{ int i ;
int idx ;
long algs ;
EVP_PKEY *pkey ;
SESS_CERT *sc ;
RSA *rsa ;
DH *dh ;
int tmp ;
int tmp___0 ;
int tmp___1 ;
int tmp___2 ;
{
pkey = (EVP_PKEY *)((void *)0);
sc = (s->session)->sess_cert;
if ((unsigned long )sc == (unsigned long )((void *)0)) {
ERR_put_error(20, 130, 157, (char const *)"s3_clnt.c", 1643);
goto err;
}
algs = (long )((s->s3)->tmp.new_cipher)->algorithms;
if (algs & 768L) { return (1);
}
rsa = ((s->session)->sess_cert)->peer_rsa_tmp;
dh = ((s->session)->sess_cert)->peer_dh_tmp;
idx = sc->peer_cert_type;
pkey = X509_get_pubkey(sc->peer_pkeys[idx].x509);
i = X509_certificate_type(sc->peer_pkeys[idx].x509, pkey);
EVP_PKEY_free(pkey);
if (algs & 32L) { if ((i & 17) == 17) {
goto _L;
} else { ERR_put_error(20, 130, 170, (char const *)"s3_clnt.c", 1671);
goto f_err;
}
} else {
_L:
if (algs & 64L) { if (! ((i & 18) == 18)) {
ERR_put_error(20, 130, 165, (char const *)"s3_clnt.c", 1677);
goto f_err;
}
}
}
if (algs & 1L) { if (! ((i & 33) == 33)) { if (! ((unsigned long )rsa != (unsigned long )((void *)0))) {
ERR_put_error(20, 130, 169, (char const *)"s3_clnt.c", 1685);
goto f_err;
}
}
}
if (algs & 16L) { if ((i & 68) == 68) {
goto _L___1;
} else {
if ((unsigned long )dh != (unsigned long )((void *)0)) {
goto _L___1;
} else {
ERR_put_error(20, 130, 163, (char const *)"s3_clnt.c", 1693);
goto f_err;
}
}
} else {
_L___1:
if (algs & 2L) { if ((i & 260) == 260) {
goto _L___0;
} else { ERR_put_error(20, 130, 164, (char const *)"s3_clnt.c", 1698);
goto f_err;
}
} else {
_L___0:
if (algs & 4L) { if (! ((i & 516) == 516)) {
ERR_put_error(20, 130, 162, (char const *)"s3_clnt.c", 1704);
goto f_err;
}
}
}
}
if (((s->s3)->tmp.new_cipher)->algo_strength & 2UL) { if (! ((i & 4096) == 4096)) {
if (algs & 1L) {
if ((unsigned long )rsa == (unsigned long )((void *)0)) {
ERR_put_error(20, 130, 167, (char const *)"s3_clnt.c", 1718);
goto f_err;
} else {
tmp = RSA_size(rsa); if (((s->s3)->tmp.new_cipher)->algo_strength & 4UL) { tmp___0 = 512;
} else {
tmp___0 = 1024;
}
if (tmp > tmp___0) {
ERR_put_error(20, 130, 167, (char const *)"s3_clnt.c", 1718);
goto f_err;
}
}
} else { if (algs & 22L) {
if ((unsigned long )dh == (unsigned long )((void *)0)) {
ERR_put_error(20, 130, 166, (char const *)"s3_clnt.c", 1730);
goto f_err;
} else {
tmp___1 = DH_size(dh); if (((s->s3)->tmp.new_cipher)->algo_strength & 4UL) { tmp___2 = 512;
} else {
tmp___2 = 1024;
}
if (tmp___1 > tmp___2) {
ERR_put_error(20, 130, 166, (char const *)"s3_clnt.c", 1730);
goto f_err;
}
}
} else {
ERR_put_error(20, 130, 250, (char const *)"s3_clnt.c", 1737);
goto f_err;
}
}
}
}
return (1);
f_err:
ssl3_send_alert(s, 2, 40);
err:
return (0);
}
}
|
the_stack_data/211081184.c
|
/* mbed Microcontroller Library
* Copyright (c) 2019 ARM Limited
* Copyright (c) 2019 STMicroelectronics
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if DEVICE_FLASH
#include "flash_api.h"
#include "flash_data.h"
#include "mbed_critical.h"
#include "mbed_assert.h"
#include "cmsis.h"
/* Family specific include for WB with HW semaphores */
#include "hw.h"
#include "hw_conf.h"
#if MBED_CONF_BLE_PRESENT
#include "shci.h"
#endif
/* Used in HCIDriver.cpp/stm32wb_start_ble() */
int BLE_inited = 0;
/**
* @brief Gets the page of a given address
* @param Addr: Address of the FLASH Memory
* @retval The page of a given address
*/
static uint32_t GetPage(uint32_t Addr)
{
return (Addr - FLASH_BASE) / FLASH_PAGE_SIZE;
}
/** Initialize the flash peripheral and the flash_t object
*
* @param obj The flash object
* @return 0 for success, -1 for error
*/
int32_t flash_init(flash_t *obj)
{
return 0;
}
/** Uninitialize the flash peripheral and the flash_t object
*
* @param obj The flash object
* @return 0 for success, -1 for error
*/
int32_t flash_free(flash_t *obj)
{
return 0;
}
/** Erase one sector starting at defined address
*
* The address should be at sector boundary. This function does not do any check for address alignments
* @param obj The flash object
* @param address The sector starting address
* @return 0 for success, -1 for error
*/
int32_t flash_erase_sector(flash_t *obj, uint32_t address)
{
uint32_t PageNumber = 0;
uint32_t PAGEError = 0;
FLASH_EraseInitTypeDef EraseInitStruct;
int32_t status = 0;
uint32_t cpu1_sem_status = 1;
uint32_t cpu2_sem_status = 1;
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
return -1;
}
/* Flash IP semaphore */
while (LL_HSEM_1StepLock(HSEM, CFG_HW_FLASH_SEMID));
/* Unlock the Flash to enable the flash control register access */
if (HAL_FLASH_Unlock() != HAL_OK) {
return -1;
}
#if MBED_CONF_BLE_PRESENT
if (BLE_inited) {
/*
* Notify the CPU2 that some flash erase activity may be executed
* On reception of this command, the CPU2 enables the BLE timing protection versus flash erase processing
* The Erase flash activity will be executed only when the BLE RF is idle for at least 25ms
* The CPU2 will prevent all flash activity (write or erase) in all cases when the BL RF Idle is shorter than 25ms.
*/
SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_ON);
}
#endif
do {
/* PESD bit mechanism used by M0+ to protect its timing */
while (LL_FLASH_IsActiveFlag_OperationSuspended());
core_util_critical_section_enter();
/* Trying to access the flash can stall BLE */
/* Use this semaphore to check M0+ activity */
cpu1_sem_status = LL_HSEM_GetStatus(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID);
if (cpu1_sem_status == 0) {
/* When flash processing is ongoing, the second CPU cannot access the flash anymore */
cpu2_sem_status = LL_HSEM_1StepLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID);
if (cpu2_sem_status == 0) {
/* Clear OPTVERR bit set on virgin samples */
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
/* Get the page number associated to the address */
PageNumber = GetPage(address);
EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES;
EraseInitStruct.Page = PageNumber;
EraseInitStruct.NbPages = 1;
if (HAL_FLASHEx_Erase(&EraseInitStruct, &PAGEError) != HAL_OK) {
status = -1;
}
LL_HSEM_ReleaseLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID, 0);
}
}
core_util_critical_section_exit();
} while ((cpu2_sem_status) || (cpu1_sem_status));
while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_CFGBSY));
#if MBED_CONF_BLE_PRESENT
if (BLE_inited) {
/**
* Notify the CPU2 there will be no request anymore to erase the flash
* On reception of this command, the CPU2 disables the BLE timing protection versus flash erase processing
*/
SHCI_C2_FLASH_EraseActivity(ERASE_ACTIVITY_OFF);
}
#endif
/* Lock the Flash to disable the flash control register access (recommended
to protect the FLASH memory against possible unwanted operation) */
HAL_FLASH_Lock();
/* Flash IP semaphore */
LL_HSEM_ReleaseLock(HSEM, CFG_HW_FLASH_SEMID, 0);
return status;
}
/** Program one page starting at defined address
*
* The page should be at page boundary, should not cross multiple sectors.
* This function does not do any check for address alignments or if size
* is aligned to a page size.
* @param obj The flash object
* @param address The sector starting address
* @param data The data buffer to be programmed
* @param size The number of bytes to program
* @return 0 for success, -1 for error
*/
int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data, uint32_t size)
{
uint32_t StartAddress = 0;
int32_t status = 0;
uint32_t cpu1_sem_status = 1;
uint32_t cpu2_sem_status = 1;
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
return -1;
}
if ((size % 8) != 0) {
return -1;
}
/* Flash IP semaphore */
while (LL_HSEM_1StepLock(HSEM, CFG_HW_FLASH_SEMID));
/* Unlock the Flash to enable the flash control register access */
if (HAL_FLASH_Unlock() != HAL_OK) {
return -1;
}
do {
/* PESD bit mechanism used by M0+ to protect its timing */
while (LL_FLASH_IsActiveFlag_OperationSuspended());
core_util_critical_section_enter();
/* Trying to access the flash can stall BLE */
/* Use this semaphore to check M0+ activity */
cpu1_sem_status = LL_HSEM_GetStatus(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU1_SEMID);
if (cpu1_sem_status == 0) {
/* When flash processing is ongoing, the second CPU cannot access the flash anymore */
cpu2_sem_status = LL_HSEM_1StepLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID);
if (cpu2_sem_status == 0) {
/* Program the user Flash area word by word */
StartAddress = address;
/* HW needs an aligned address to program flash, which data parameters doesn't ensure */
if ((uint32_t) data % 8 != 0) { // Data is not aligned, copy data in a temp buffer before programming it
volatile uint64_t data64;
while ((address < (StartAddress + size)) && (status == 0)) {
for (uint8_t i = 0; i < 8; i++) {
*(((uint8_t *) &data64) + i) = *(data + i);
}
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, data64) == HAL_OK) {
address = address + 8;
data = data + 8;
} else {
status = -1;
}
}
} else { // Data is aligned, so let's avoid any copy
while ((address < (StartAddress + size)) && (status == 0)) {
if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, *((uint64_t *) data)) == HAL_OK) {
address = address + 8;
data = data + 8;
} else {
status = -1;
}
}
}
LL_HSEM_ReleaseLock(HSEM, CFG_HW_BLOCK_FLASH_REQ_BY_CPU2_SEMID, 0);
}
}
core_util_critical_section_exit();
} while ((cpu2_sem_status) || (cpu1_sem_status));
while (__HAL_FLASH_GET_FLAG(FLASH_FLAG_CFGBSY));
/* Lock the Flash to disable the flash control register access (recommended
to protect the FLASH memory against possible unwanted operation) */
HAL_FLASH_Lock();
/* Flash IP semaphore */
LL_HSEM_ReleaseLock(HSEM, CFG_HW_FLASH_SEMID, 0);
return status;
}
/** Get sector size
*
* @param obj The flash object
* @param address The sector starting address
* @return The size of a sector
*/
uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
{
/* considering 1 sector = 1 page */
if ((address >= (FLASH_BASE + FLASH_SIZE)) || (address < FLASH_BASE)) {
return MBED_FLASH_INVALID_SIZE;
} else {
return FLASH_PAGE_SIZE;
}
}
/** Get page size
*
* @param obj The flash object
* @return Minimum programmable page size in bytes
*/
uint32_t flash_get_page_size(const flash_t *obj)
{
return 8;
}
/** Get start address for the flash region
*
* @param obj The flash object
* @return The start address for the flash region
*/
uint32_t flash_get_start_address(const flash_t *obj)
{
return FLASH_BASE;
}
/** Get the flash region size
*
* @param obj The flash object
* @return The flash region size
*/
uint32_t flash_get_size(const flash_t *obj)
{
return FLASH_SIZE;
}
uint8_t flash_get_erase_value(const flash_t *obj)
{
(void)obj;
return 0xFF;
}
#endif
|
the_stack_data/145452984.c
|
/*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <assert.h>
#include <dirent.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char** argv) {
DIR* dir = NULL;
struct dirent* entry;
int found = 0;
if (2 != argc) {
printf("Usage: sel_ldr test_dir.nexe directory/containing/test_dir.nexe\n");
return 1;
}
dir = opendir(argv[1]);
assert(NULL != dir);
for (; NULL != (entry = readdir(dir)); ) {
if (0 == strcmp("test_dir.nexe", entry->d_name)) {
found = 1;
}
}
assert(1 == found);
assert(0 == closedir(dir));
return 0;
}
|
the_stack_data/92327610.c
|
#include <stdio.h>
#include <stdlib.h>
struct node{
int data;
struct node *left;
struct node *right;
};
struct node* newNode (int data) {
struct node* node = (struct node*)malloc(sizeof(struct node));
node -> data = data;
node -> left = NULL;
node -> right = NULL;
return(node);
}
void printInOrder(struct node* node) {
if (node == NULL)
return;
printInOrder(node -> left);
printf("%d ", node -> data);
printInOrder(node -> right);
}
void printPreOrder(struct node* node) {
if(node == NULL)
return;
printf("%d ", node -> data);
printPreOrder(node -> left);
printPreOrder(node -> right);
}
void printPostOrder(struct node* node) {
if(node == NULL)
return;
printPostOrder(node -> left);
printPostOrder(node -> right);
printf("%d ", node -> data);
}
int main() {
/* code */
struct node *root = newNode(1);
root -> left = newNode(2);
root -> right = newNode(3);
root -> left -> left = newNode(4);
root -> left -> right = newNode(5);
printf("Preorder traversal is \n");
printPreOrder(root);
printf("\n");
printf("Post Order traversal is \n");
printPostOrder(root);
printf("\n");
printf("In order traversal is \n");
printInOrder(root);
printf("\n");
return 0;
}
|
the_stack_data/83809.c
|
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <error.h>
/*int pipe(int filedes[2]);无名管道,返回0成功,返回-1失败*/
/*fd[0]为读端,fd[1]为写端,从尾部写头部读*/
/*兄弟进程的无名管道*/
int main(void)
{
pid_t pid = -1;
int ret = -1;
int status = -1;
int fd[2] = {0};
char buf[128] = {0};
int i = 0;
//创建无名管道
ret = pipe(fd);
if(-1 == ret)
{
perror("pipe failed: ");
goto _OUT;
}
//创建子进程
for(i = 0; i < 2; i++)
{
pid = fork();
if(-1 == (ret=pid))
{
perror("fork failed: ");
goto _OUT;
} else if (pid == 0) {
break;
}
}
/*i=0则一个子进程写,i=1则另外一个子进程读*/
//子进程写操作
if(0 == pid)
{
printf("child: %d\n", getpid());
if(0 == i)
{
//先关闭读端,以免冲突
close(fd[0]);
//write pipe
memset(buf, 0, sizeof(buf));
ret = write(fd[1], "howaylee", sizeof("howaylee"));
printf("write finish\n");
if(-1 == ret)
{
perror("write failed: ");
goto _OUT;
}
}
//子进程写操作
if(1 == i)
{
//先关闭写端,以免冲突
close(fd[1]);
//read pipe
sleep(5);
ret = read(fd[0], buf, sizeof(buf));
printf("read finish\n");
if(-1 == ret)
{
perror("read failed: ");
goto _OUT;
}
printf("ret=%d buf = %s\n",ret, buf);
}
}
if (0 < pid)//父进程等待儿子并读
{
//wait child
wait(&status);
wait(&status);
}
_OUT:
close(fd[0]);
close(fd[1]);
return ret;
}
|
the_stack_data/45981.c
|
#ifdef STM32H7xx
#include "stm32h7xx_hal_otfdec.c"
#elif STM32L5xx
#include "stm32l5xx_hal_otfdec.c"
#endif
|
the_stack_data/1075290.c
|
/*
UCF 2011 (Fall) Local Programming Contest
Problem: coin
*/
#include <stdio.h>
#define TRUE 1
#define FALSE 0
/* ************************************************************ */
int main(void)
{
int data_set_count, k, coin_count, j;
int prev_amount, next_amount, good_denum;
FILE *in_fptr, *fopen();
in_fptr = stdin;
fscanf(in_fptr, "%d", &data_set_count);
for ( k = 1; k <= data_set_count; ++k )
{
fscanf(in_fptr, "%d", &coin_count);
fscanf(in_fptr, "%d", &prev_amount);
good_denum = TRUE;
for ( j = 2; j <= coin_count; ++j )
{
fscanf(in_fptr, "%d", &next_amount);
if ( next_amount < (2 * prev_amount) )
good_denum = FALSE;
prev_amount = next_amount;
}/* end for ( j ) */
if ( good_denum )
printf("0\n");
else
printf("1\n");
}/* end for ( k ) */
return(0);
}/* end main */
/* ************************************************************ */
|
the_stack_data/583618.c
|
/* Programacao de Computadores e ALgoritmos
* Trabalho 4
*
* Equipe:
*
* Paulo Henrique
* Rai Santos
* Jackson Kelvin
* Wilson Calisto
*/
//Autor:Jackson Kelvin de Souza
#include <stdio.h>
#include <stdlib.h>
void change (int *p, int *q)
{
int temp;
temp = *p; *p = *q; *q = temp;
}
/*-------------------------------------------------------------*/
void maker_matriz(int m,int n,int matriz[100][100])
{
int i, j;
printf("preencha a matriz com valores numericos: \n");
for(i = 0; i < m; i++)
{
for(j = 0;j < n; j++)
{
scanf("%d", &matriz[i][j]);
}
}
}
/*-------------------------------------------------------------*/
void troca(int i,int j,int m,int n,int matriz[100][100])
{
int b;
for(b = 0;b < n; b++)
{
change(&matriz[i][b],&matriz[j][b]);
}
}
/*-------------------------------------------------------------*/
void print(int m,int n,int matriz[100][100])
{
int l,c;
for (l = 0; l < m; ++l)
{
for (c = 0;c < n; ++c)
{
printf("\t%d ",matriz[l][c]);
}
printf("\n");
}
}
|
the_stack_data/831526.c
|
// Copyright (c) 2017, Intel Corporation.
#ifdef BUILD_MODULE_NET
// C includes
#include <errno.h>
// Zephyr includes
#include <sections.h>
#include <zephyr.h>
#include <net/net_context.h>
#include <net/net_core.h>
#include <net/net_if.h>
#include <net/net_pkt.h>
// ZJS includes
#include "zjs_buffer.h"
#include "zjs_callbacks.h"
#include "zjs_event.h"
#include "zjs_modules.h"
#include "zjs_net_config.h"
#include "zjs_util.h"
/**
* Net module
* @module net
* @namespace Net
*/
/**
* Address object
* @name AddressObject
* @typedef {Object} AddressObject
* @property {string} address - IP address
* @property {number} port - Port
* @property {string} family - IP address family
*/
/**
* Close event. Triggered when a server has closed
*
* @memberof Net.Server
* @event close
*/
/**
* Connection event. Triggered when the server has a new connection
*
* @memberof Net.Server
* @event connection
* @param {Socket} socket - New socket connection
*/
/**
* Error event. Triggered when there was an error on the server
*
* @memberof Net.Server
* @event error
*/
/**
* Listening event. Triggered when the sever has started listening
*
* @memberof Net.Server
* @event listening
*/
/**
* Close event. Triggered when the socket has closed
*
* @memberof Net.Socket
* @event close
*/
/**
* Connect event. Triggered when the socket has connected to a remote
*
* @memberof Net.Socket
* @event connect
*/
/**
* Data event. Triggered when there is data available on the socket
*
* @memberof Net.Socket
* @event data
*
* @param {Buffer} data
*/
/**
* Timeout event. Triggered when the socket has timed out
*
* @memberof Net.Socket
* @event timeout
*/
#define MAX_DBG_PRINT 64
static jerry_value_t zjs_net_prototype;
static jerry_value_t zjs_net_socket_prototype;
static jerry_value_t zjs_net_server_prototype;
typedef struct net_handle {
struct net_context *tcp_sock;
jerry_value_t server;
struct sockaddr local;
u16_t port;
u8_t listening;
} net_handle_t;
typedef struct sock_handle {
net_handle_t *handle;
struct net_context *tcp_sock;
struct sockaddr remote;
jerry_value_t socket;
jerry_value_t connect_listener;
void *rptr;
void *wptr;
struct sock_handle *next;
struct k_timer timer;
u32_t timeout;
u8_t bound;
u8_t paused;
u8_t *rbuf;
u8_t timer_started;
} sock_handle_t;
static sock_handle_t *opened_sockets = NULL;
// get the socket handle from the object or NULL
#define GET_SOCK_HANDLE(obj, var) \
sock_handle_t *var = (sock_handle_t *)zjs_event_get_user_handle(obj);
// get the socket handle or return a JS error
#define GET_SOCK_HANDLE_JS(obj, var) \
sock_handle_t *var = (sock_handle_t *)zjs_event_get_user_handle(obj); \
if (!var) { return zjs_error("no socket handle"); }
// get the net handle or return a JS error
#define GET_NET_HANDLE_JS(obj, var) \
net_handle_t *var = (net_handle_t *)zjs_event_get_user_handle(obj); \
if (!var) { return zjs_error("no socket handle"); }
#define CHECK(x) \
ret = (x); \
if (ret < 0) { \
ERR_PRINT("Error in " #x ": %d\n", ret); \
return zjs_error(#x); \
}
#define NET_DEFAULT_MAX_CONNECTIONS 5
#define NET_HOSTNAME_MAX 32
#define SOCK_READ_BUF_SIZE 128
static void socket_timeout_callback(struct k_timer *timer)
{
sock_handle_t *cur = opened_sockets;
while (cur) {
if (&cur->timer == timer) {
break;
}
}
if (cur) {
zjs_defer_emit_event(cur->socket, "timeout", NULL, 0, NULL, NULL);
k_timer_stop(&cur->timer);
// TODO: This may not be correct, but if we don't set it, then more
// timeouts will get added, potentially after the socket has been
// closed
cur->timeout = 0;
DBG_PRINT("socket timed out\n");
}
}
/*
* initialize, start, re-start or stop a socket timeout. 'time' is the timeout
* for the socket:
*
* time = 0 If a timeout has not been started this has no effect
* If a timeout has been started this will stop it
* time > 0 Will start a timeout for the socket
*/
static void start_socket_timeout(sock_handle_t *handle)
{
if (handle->timeout) {
if (!handle->timer_started) {
// time has not been started
k_timer_init(&handle->timer, socket_timeout_callback, NULL);
handle->timer_started = 1;
}
k_timer_start(&handle->timer, handle->timeout, handle->timeout);
DBG_PRINT("starting socket timeout: %u\n", handle->timeout);
} else if (handle->timer_started) {
DBG_PRINT("stoping socket timeout\n");
k_timer_stop(&handle->timer);
}
}
// a zjs_post_emit callback
static void close_server(void *handle, jerry_value_t argv[], u32_t argc)
{
sock_handle_t *h = (sock_handle_t *)handle;
if (h->handle) {
DBG_PRINT("closing server\n");
net_context_put(h->handle->tcp_sock);
zjs_free(h->handle);
}
}
static void post_closed(void *handle)
{
sock_handle_t *h = (sock_handle_t *)handle;
if (h) {
net_handle_t *net = h->handle;
if (ZJS_LIST_REMOVE(sock_handle_t, opened_sockets, h)) {
DBG_PRINT("Freeing socket %p: opened_sockets=%p\n", h, opened_sockets);
net_context_put(h->tcp_sock);
jerry_release_value(h->socket);
zjs_free(h->rbuf);
zjs_free(h);
}
if (net) {
if (net->listening == 0 && opened_sockets == NULL) {
// no more sockets open and not listening, close server
zjs_defer_emit_event(net->server, "close", NULL, 0, NULL,
close_server);
DBG_PRINT("server signaled to close\n");
}
}
}
}
// a zjs_post_emit callback
static void release_close(void *h, jerry_value_t argv[], u32_t argc)
{
post_closed(h);
if (argc) {
zjs_release_args(h, argv, argc);
}
}
// a zjs_pre_emit_callback
static void handle_wbuf_arg(void *h, jerry_value_t argv[], u32_t *argc,
const char *buffer, u32_t bytes)
{
sock_handle_t *handle = (sock_handle_t *)h;
// find length of unconsumed data in read buffer
u32_t len = handle->wptr - handle->rptr;
zjs_buffer_t *zbuf;
jerry_value_t data_buf = zjs_buffer_create(len, &zbuf);
if (!zbuf) {
// out of memory
DBG_PRINT("out of memory in handle_wbuf_arg\n");
return;
}
// copy data from read buffer
memcpy(zbuf->buffer, handle->rptr, len);
handle->rptr = handle->wptr = handle->rbuf;
argv[0] = data_buf;
*argc = 1;
}
enum {
ERROR_READ_SOCKET_CLOSED,
ERROR_WRITE_SOCKET,
ERROR_ACCEPT_SERVER,
ERROR_CONNECT_SOCKET,
};
static const char *error_messages[] = {
"socket has been closed",
"error writing to socket",
"error listening to accepted connection",
"failed to make connection",
};
typedef struct error_desc {
u32_t error_id;
jerry_value_t this;
jerry_value_t function_obj;
} error_desc_t;
static error_desc_t create_error_desc(u32_t error_id, jerry_value_t this,
jerry_value_t function_obj)
{
error_desc_t desc;
desc.error_id = error_id;
desc.this = this;
desc.function_obj = function_obj;
return desc;
}
// a zjs_pre_emit callback
static void handle_error_arg(void *unused, jerry_value_t argv[], u32_t *argc,
const char *buffer, u32_t bytes)
{
// requires: buffer contains a u32_t with an error constant
// effects: creates an error object with the corresponding text, clears
// the error flag, and sets this as the first arg; the error
// value must be released later (e.g. zjs_release_args)
if (bytes != sizeof(error_desc_t)) {
DBG_PRINT("invalid data in handle_error_arg");
return;
}
error_desc_t *desc = (error_desc_t *)buffer;
const char *message = error_messages[desc->error_id];
jerry_value_t error = zjs_error_context(message, desc->this,
desc->function_obj);
jerry_value_clear_error_flag(&error);
argv[0] = error;
*argc = 1;
}
static void tcp_received(struct net_context *context,
struct net_pkt *buf,
int status,
void *user_data)
{
sock_handle_t *handle = (sock_handle_t *)user_data;
if (status == 0 && buf == NULL) {
// socket close
DBG_PRINT("closing socket, context=%p, socket=%u\n", context,
handle->socket);
error_desc_t desc = create_error_desc(ERROR_READ_SOCKET_CLOSED, 0, 0);
zjs_defer_emit_event(handle->socket, "error", &desc, sizeof(desc),
handle_error_arg, zjs_release_args);
// note: we're not really releasing anything but release_close will
// just ignore the 0 args and this way we don't need a new function
zjs_defer_emit_event(handle->socket, "close", NULL, 0, NULL,
release_close);
net_pkt_unref(buf);
return;
}
if (handle && buf) {
start_socket_timeout(handle);
u32_t len = net_pkt_appdatalen(buf);
u8_t *data = net_pkt_appdata(buf);
if (len && data) {
DBG_PRINT("received data, context=%p, data=%p, len=%u\n", context,
data, len);
memcpy(handle->wptr, data, len);
handle->wptr += len;
// if not paused, call the callback to get JS the data
if (!handle->paused) {
zjs_defer_emit_event(handle->socket, "data", NULL, 0,
handle_wbuf_arg, zjs_release_args);
DBG_PRINT("data received on context %p: data=%p, len=%u\n",
context, data, len);
}
}
}
net_pkt_unref(buf);
}
static inline void pkt_sent(struct net_context *context, int status,
void *token, void *user_data)
{
if (!status) {
int sent = POINTER_TO_UINT(token);
DBG_PRINT("Sent %d bytes\n", sent);
if (sent) {
zjs_callback_id id = POINTER_TO_INT(user_data);
if (id != -1) {
zjs_signal_callback(id, NULL, 0);
}
}
}
}
/**
* Write data to a socket
*
* @name write
* @memberof Net.Socket
* @param {Buffer} buf - Buffer being written to the socket
* @param {function=} func - Callback called when write has completed
*/
static ZJS_DECL_FUNC(socket_write)
{
ZJS_VALIDATE_ARGS_OPTCOUNT(optcount, Z_OBJECT, Z_OPTIONAL Z_FUNCTION);
GET_SOCK_HANDLE_JS(this, handle);
start_socket_timeout(handle);
zjs_buffer_t *buf = zjs_buffer_find(argv[0]);
struct net_pkt *send_buf;
send_buf = net_pkt_get_tx(handle->tcp_sock, K_NO_WAIT);
if (!send_buf) {
ERR_PRINT("cannot acquire send_buf\n");
return jerry_create_boolean(false);
}
bool status = net_pkt_append(send_buf, buf->bufsize, buf->buffer,
K_NO_WAIT);
if (!status) {
net_pkt_unref(send_buf);
ERR_PRINT("cannot populate send_buf\n");
return jerry_create_boolean(false);
}
zjs_callback_id id = -1;
if (optcount) {
id = zjs_add_callback_once(argv[1], this, NULL, NULL);
}
int ret = net_context_send(send_buf, pkt_sent, K_NO_WAIT,
UINT_TO_POINTER(net_pkt_get_len(send_buf)),
INT_TO_POINTER((s32_t)id));
if (ret < 0) {
ERR_PRINT("Cannot send data to peer (%d)\n", ret);
net_pkt_unref(send_buf);
zjs_remove_callback(id);
// TODO: may need to check the specific error to determine action
DBG_PRINT("write failed, context=%p, socket=%u\n", handle->tcp_sock,
handle->socket);
error_desc_t desc = create_error_desc(ERROR_WRITE_SOCKET, this,
function_obj);
zjs_defer_emit_event(handle->socket, "error", &desc, sizeof(desc),
handle_error_arg, release_close);
return jerry_create_boolean(false);
}
return jerry_create_boolean(true);
}
/**
* Pause/throttle 'data' callback on the socket. Calling this will prevent
* the 'data' callback from getting called until Socket.resume() is called.
*
* @name pause
* @memberof Net.Socket
*/
static ZJS_DECL_FUNC(socket_pause)
{
GET_SOCK_HANDLE_JS(this, handle);
handle->paused = 1;
return ZJS_UNDEFINED;
}
/**
* Resume the 'data' callback. Calling this will un-pause the socket and
* allow the 'data' callback to resume being called.
*
* @name resume
* @memberof Net.Socket
*/
static ZJS_DECL_FUNC(socket_resume)
{
GET_SOCK_HANDLE_JS(this, handle);
handle->paused = 0;
return ZJS_UNDEFINED;
}
/**
* Retrieve address information from the socket
*
* @name address
* @memberof Net.Socket
* @return {AddressObject}
*/
static ZJS_DECL_FUNC(socket_address)
{
GET_SOCK_HANDLE_JS(this, handle);
jerry_value_t ret = jerry_create_object();
ZVAL port = zjs_get_property(this, "localPort");
ZVAL addr = zjs_get_property(this, "localAddress");
sa_family_t family = net_context_get_family(handle->tcp_sock);
zjs_set_property(ret, "port", port);
zjs_set_property(ret, "address", addr);
if (family == AF_INET6) {
zjs_obj_add_string(ret, "IPv6", "family");
} else {
zjs_obj_add_string(ret, "IPv4", "family");
}
return ret;
}
/**
* Set a timeout on a socket. The timeout expires when there has been no
* activity on the socket for the set number of milliseconds.
*
* @name setTimeout
* @memberof Net.Socket
* @param {number} time - The timeout in milliseconds
* @param {function=} callback - Callback function when the timeout expires.
* If supplied, this will be set as the listener
* for the 'timeout' event
* @return {Socket} socket
*/
static ZJS_DECL_FUNC(socket_set_timeout)
{
ZJS_VALIDATE_ARGS_OPTCOUNT(optcount, Z_NUMBER, Z_OPTIONAL Z_FUNCTION);
GET_SOCK_HANDLE_JS(this, handle);
u32_t time = (u32_t)jerry_get_number_value(argv[0]);
handle->timeout = time;
start_socket_timeout(handle);
if (optcount) {
zjs_add_event_listener(this, "timeout", argv[1]);
}
return jerry_acquire_value(this);
}
static ZJS_DECL_FUNC(socket_connect);
/*
* Create a new socket object with needed methods. If 'client' is true,
* a 'connect()' method will be added (client mode). The socket native handle
* is returned as an out parameter.
*/
static jerry_value_t create_socket(u8_t client, sock_handle_t **handle_out)
{
sock_handle_t *sock_handle = zjs_malloc(sizeof(sock_handle_t));
if (!sock_handle) {
return zjs_error_context("could not alloc socket handle", 0, 0);
}
memset(sock_handle, 0, sizeof(sock_handle_t));
sock_handle->rbuf = zjs_malloc(SOCK_READ_BUF_SIZE);
if (!sock_handle->rbuf) {
zjs_free(sock_handle);
return zjs_error_context("out of memory", 0, 0);
}
jerry_value_t socket = jerry_create_object();
if (client) {
// only a new client socket has connect method
zjs_obj_add_function(socket, socket_connect, "connect");
}
sock_handle->connect_listener = ZJS_UNDEFINED;
sock_handle->socket = socket;
sock_handle->rptr = sock_handle->wptr = sock_handle->rbuf;
zjs_make_emitter(socket, zjs_net_socket_prototype, sock_handle, NULL);
*handle_out = sock_handle;
return socket;
}
/*
* Add extra connection information to a socket object. This should be called
* once a new connection is accepted to the server.
*/
static void add_socket_connection(jerry_value_t socket,
net_handle_t *net,
struct net_context *new,
struct sockaddr *remote)
{
GET_SOCK_HANDLE(socket, handle);
if (!handle) {
ERR_PRINT("could not get socket handle\n");
return;
}
handle->remote = *remote;
handle->handle = net;
handle->tcp_sock = new;
sa_family_t family = net_context_get_family(new);
char remote_ip[64];
net_addr_ntop(family, (const void *)remote, remote_ip, 64);
zjs_obj_add_string(socket, remote_ip, "remoteAddress");
zjs_obj_add_number(socket, net->port, "remotePort");
char local_ip[64];
net_addr_ntop(family, (const void *)&net->local, local_ip, 64);
zjs_obj_add_string(socket, local_ip, "localAddress");
zjs_obj_add_number(socket, net->port, "localPort");
if (family == AF_INET6) {
zjs_obj_add_string(socket, "IPv6", "family");
zjs_obj_add_string(socket, "IPv6", "remoteFamily");
} else {
zjs_obj_add_string(socket, "IPv4", "family");
zjs_obj_add_string(socket, "IPv4", "remoteFamily");
}
}
static void tcp_accepted(struct net_context *context,
struct sockaddr *addr,
socklen_t addrlen,
int error,
void *user_data)
{
net_handle_t *handle = (net_handle_t *)user_data;
sock_handle_t *sock_handle = NULL;
DBG_PRINT("connection made, context %p error %d\n", context, error);
// FIXME: this shouldn't really be getting called here because it runs in
// a networking thread but is doing malloc and JerryScript calls
jerry_value_t sock = create_socket(false, &sock_handle);
if (!sock_handle) {
ERR_PRINT("could not allocate socket handle\n");
return;
}
add_socket_connection(sock, handle, context, addr);
// add new socket to list
sock_handle->next = opened_sockets;
opened_sockets = sock_handle;
int ret = net_context_recv(context, tcp_received, 0, sock_handle);
if (ret < 0) {
ERR_PRINT("Cannot receive TCP packet (family %d), ret=%d\n",
net_context_get_family(sock_handle->tcp_sock), ret);
// this seems to mean the remote exists but the connection was not made
error_desc_t desc = create_error_desc(ERROR_ACCEPT_SERVER, 0, 0);
zjs_defer_emit_event(sock_handle->handle->server, "error", &desc,
sizeof(desc), handle_error_arg, zjs_release_args);
jerry_release_value(sock);
return;
}
zjs_defer_emit_event(handle->server, "connection", &sock, sizeof(sock),
zjs_copy_arg, zjs_release_args);
}
/**
* Retrieve address information from the bound server socket
*
* @name address
* @memberof Net.Server
* @return {AddressObject}
*/
static ZJS_DECL_FUNC(server_address)
{
GET_NET_HANDLE_JS(this, handle);
jerry_value_t info = jerry_create_object();
zjs_obj_add_number(info, handle->port, "port");
sa_family_t family = net_context_get_family(handle->tcp_sock);
char ipstr[INET6_ADDRSTRLEN];
if (family == AF_INET6) {
zjs_obj_add_string(info, "IPv6", "family");
struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&handle->local;
net_addr_ntop(family, &addr6->sin6_addr, ipstr, INET6_ADDRSTRLEN);
zjs_obj_add_string(info, ipstr, "address");
} else {
zjs_obj_add_string(info, "IPv4", "family");
struct sockaddr_in *addr = (struct sockaddr_in *)&handle->local;
net_addr_ntop(family, &addr->sin_addr, ipstr, INET6_ADDRSTRLEN);
zjs_obj_add_string(info, ipstr, "address");
}
return info;
}
/**
* Signal the server to close. Any opened sockets will remain open, and the
* 'close' event will be called when these remaining sockets are closed.
*
* @name close
* @memberof Net.Server
* @param {function?} Callback function. Called when server is closed
*/
static ZJS_DECL_FUNC(server_close)
{
ZJS_VALIDATE_ARGS_OPTCOUNT(optcount, Z_OPTIONAL Z_FUNCTION);
GET_NET_HANDLE_JS(this, handle);
handle->listening = 0;
zjs_obj_add_boolean(this, false, "listening");
if (optcount) {
zjs_add_event_listener(handle->server, "close", argv[0]);
}
// If there are no connections the server can be closed
if (opened_sockets == NULL) {
// NOTE: could emit immediately but safer for call stack to defer
zjs_defer_emit_event(handle->server, "close", NULL, 0, NULL,
close_server);
DBG_PRINT("server signaled to close\n");
}
return ZJS_UNDEFINED;
}
/**
* Get the number of connections on this server
*
* @name getConnections
* @memberof Net.Server
* @param {function} Callback function. Called with the number of opened
* connections
*/
static ZJS_DECL_FUNC(server_get_connections)
{
ZJS_VALIDATE_ARGS(Z_FUNCTION);
GET_NET_HANDLE_JS(this, handle);
int count = 0;
sock_handle_t *cur = opened_sockets;
while (cur) {
if (cur->handle == handle) {
count++;
}
cur = cur->next;
}
ZVAL err = jerry_create_number(0);
ZVAL num = jerry_create_number(count);
jerry_value_t args[2] = { err, num };
zjs_callback_id id = zjs_add_callback_once(argv[0], this, NULL, NULL);
zjs_signal_callback(id, args, sizeof(args));
return ZJS_UNDEFINED;
}
/**
* Start listening for connections
*
* @name listen
* @memberof Net.Server
*
* @param {ListenOptions} options - Options for listening
* @param {function?} listener - Listener for 'listening' event
*/
static ZJS_DECL_FUNC(server_listen)
{
// options object, optional function
ZJS_VALIDATE_ARGS_OPTCOUNT(optcount, Z_OBJECT, Z_OPTIONAL Z_FUNCTION);
GET_NET_HANDLE_JS(this, handle);
int ret;
double port = 0;
double backlog = 0;
u32_t size = NET_HOSTNAME_MAX;
char hostname[size];
double family = 0;
zjs_obj_get_double(argv[0], "port", &port);
zjs_obj_get_double(argv[0], "backlog", &backlog);
zjs_obj_get_string(argv[0], "host", hostname, size);
zjs_obj_get_double(argv[0], "family", &family);
if (optcount) {
zjs_add_event_listener(this, "listening", argv[1]);
}
struct sockaddr addr;
memset(&addr, 0, sizeof(struct sockaddr));
// default to IPv4
if (family == 0 || family == 4) {
family = 4;
CHECK(net_context_get(AF_INET, SOCK_STREAM, IPPROTO_TCP,
&handle->tcp_sock))
struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;
addr4->sin_family = AF_INET;
addr4->sin_port = htons((int)port);
net_addr_pton(AF_INET, hostname, &addr4->sin_addr);
} else {
CHECK(net_context_get(AF_INET6, SOCK_STREAM, IPPROTO_TCP,
&handle->tcp_sock))
struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&addr;
addr6->sin6_family = AF_INET6;
addr6->sin6_port = htons((int)port);
net_addr_pton(AF_INET6, hostname, &addr6->sin6_addr);
}
CHECK(net_context_bind(handle->tcp_sock, &addr, sizeof(struct sockaddr)));
CHECK(net_context_listen(handle->tcp_sock, (int)backlog));
handle->listening = 1;
handle->port = (u16_t)port;
memcpy(&handle->local, zjs_net_config_get_ip(handle->tcp_sock),
sizeof(struct sockaddr));
handle->local = *zjs_net_config_get_ip(handle->tcp_sock);
zjs_obj_add_boolean(this, true, "listening");
// Here we defer just to keep the call stack short; this is unless we
// determine that the listeners should be called before this function
// returns. Note, since this is a JS API function we can be sure we're in
// the main thread and can call JerryScript functions as above. Normally
// when we're calling defer_emit we put off those kinds of calls until
// we're sure to be back in the main thread during the pre_emit callback
zjs_defer_emit_event(this, "listening", NULL, 0, NULL, NULL);
CHECK(net_context_accept(handle->tcp_sock, tcp_accepted, 0, handle));
DBG_PRINT("listening for connection to %s:%u\n", hostname, (u32_t)port);
return ZJS_UNDEFINED;
}
/**
* Create a TCP server
*
* @memberof Net
* @name Server
* @fires close
* @fires connection
* @fires error
* @fires listening
*
* @param {function?} listener - Connection listener
*
* @return {Server} server - Newly created server
*/
static ZJS_DECL_FUNC(net_create_server)
{
ZJS_VALIDATE_ARGS_OPTCOUNT(optcount, Z_OPTIONAL Z_FUNCTION);
jerry_value_t server = jerry_create_object();
zjs_obj_add_boolean(server, false, "listening");
zjs_obj_add_number(server, NET_DEFAULT_MAX_CONNECTIONS, "maxConnections");
net_handle_t *handle = zjs_malloc(sizeof(net_handle_t));
if (!handle) {
jerry_release_value(server);
return zjs_error("could not alloc server handle");
}
handle->server = server;
handle->listening = 0;
zjs_make_emitter(server, zjs_net_server_prototype, handle, NULL);
if (optcount) {
zjs_add_event_listener(server, "connection", argv[0]);
}
DBG_PRINT("creating server: context=%p\n", handle->tcp_sock);
return server;
}
// a zjs_pre_emit_callback
static void connect_callback(void *h, jerry_value_t argv[], u32_t *argc,
const char *buffer, u32_t bytes)
{
sock_handle_t *handle = (sock_handle_t *)h;
zjs_obj_add_boolean(handle->socket, false, "connecting");
zjs_add_event_listener(handle->socket, "connect",
handle->connect_listener);
}
static void tcp_connected(struct net_context *context, int status,
void *user_data)
{
if (status == 0) {
sock_handle_t *sock_handle = (sock_handle_t *)user_data;
if (sock_handle) {
int ret;
ret = net_context_recv(context, tcp_received, 0, sock_handle);
if (ret < 0) {
ERR_PRINT("Cannot receive TCP packets (%d)\n", ret);
}
// activity, restart timeout
start_socket_timeout(sock_handle);
// here we supply a pre callback to manipulate JerryScript objects
// from the main thread; but don't actually have args to pass
zjs_defer_emit_event(sock_handle->socket, "connect", NULL, 0,
connect_callback, NULL);
DBG_PRINT("connection success, context=%p, socket=%u\n", context,
sock_handle->socket);
}
} else {
DBG_PRINT("connect failed, status=%d\n", status);
}
}
/**
* Connect to a remote server
*
* @name connect
* @memberof Net.Socket
*
* @param {ConnectOptions} options
* @param {function?} listener - Connect listener callback
*/
static ZJS_DECL_FUNC(socket_connect)
{
ZJS_VALIDATE_ARGS(Z_OBJECT, Z_OPTIONAL Z_FUNCTION);
GET_SOCK_HANDLE_JS(this, handle);
int ret;
if (!handle->tcp_sock) {
CHECK(net_context_get(AF_INET6, SOCK_STREAM, IPPROTO_TCP,
&handle->tcp_sock));
}
if (!handle->tcp_sock) {
DBG_PRINT("connect failed\n");
error_desc_t desc = create_error_desc(ERROR_CONNECT_SOCKET, this,
function_obj);
zjs_defer_emit_event(this, "error", &desc, sizeof(desc),
handle_error_arg, zjs_release_args);
return ZJS_UNDEFINED;
}
if (argc > 1) {
jerry_release_value(handle->connect_listener);
handle->connect_listener = jerry_acquire_value(argv[1]);
}
double port = 0;
double localPort = 0;
double fam = 0;
char host[128];
char localAddress[128];
zjs_obj_get_double(argv[0], "port", &port);
zjs_obj_get_string(argv[0], "host", host, 128);
zjs_obj_get_double(argv[0], "localPort", &localPort);
zjs_obj_get_string(argv[0], "localAddress", localAddress, 128);
zjs_obj_get_double(argv[0], "family", &fam);
if (fam == 0) {
fam = 4;
}
// TODO: get: .hints, .lookup
DBG_PRINT("port=%u, host=%s, localPort=%u, localAddress=%s, socket=%u\n",
(u32_t)port, host, (u32_t)localPort, localAddress, this);
if (fam == 6) {
if (!handle->bound) {
struct sockaddr_in6 my_addr6 = { 0 };
my_addr6.sin6_family = AF_INET6;
my_addr6.sin6_port = htons((u32_t)localPort);
CHECK(net_addr_pton(AF_INET6, localAddress, &my_addr6.sin6_addr));
// bind to our local address
CHECK(net_context_bind(handle->tcp_sock,
(struct sockaddr *)&my_addr6,
sizeof(struct sockaddr_in6)));
handle->bound = 1;
}
struct sockaddr_in6 peer_addr6 = { 0 };
peer_addr6.sin6_family = AF_INET6;
peer_addr6.sin6_port = htons((u32_t)port);
CHECK(net_addr_pton(AF_INET6, host, &peer_addr6.sin6_addr));
// set socket.connecting property == true
zjs_obj_add_boolean(this, true, "connecting");
// connect to remote
if (net_context_connect(
handle->tcp_sock, (struct sockaddr *)&peer_addr6,
sizeof(peer_addr6), tcp_connected, 1, handle) < 0) {
DBG_PRINT("connect failed\n");
zjs_obj_add_boolean(this, false, "connecting");
error_desc_t desc = create_error_desc(ERROR_CONNECT_SOCKET, this,
function_obj);
zjs_defer_emit_event(this, "error", &desc, sizeof(desc),
handle_error_arg, zjs_release_args);
return ZJS_UNDEFINED;
}
} else {
if (!handle->bound) {
struct sockaddr_in my_addr4 = { 0 };
my_addr4.sin_family = AF_INET;
my_addr4.sin_port = htons((u32_t)localPort);
CHECK(net_addr_pton(AF_INET, localAddress, &my_addr4.sin_addr));
// bind to our local address
CHECK(net_context_bind(handle->tcp_sock,
(struct sockaddr *)&my_addr4,
sizeof(struct sockaddr_in)));
handle->bound = 1;
}
struct sockaddr_in peer_addr4 = { 0 };
peer_addr4.sin_family = AF_INET;
peer_addr4.sin_port = htons((u32_t)port);
CHECK(net_addr_pton(AF_INET, host, &peer_addr4.sin_addr));
// set socket.connecting property == true
zjs_obj_add_boolean(this, true, "connecting");
// connect to remote
if (net_context_connect(handle->tcp_sock,
(struct sockaddr *)&peer_addr4,
sizeof(peer_addr4), tcp_connected,
1, handle) < 0) {
DBG_PRINT("connect failed\n");
error_desc_t desc = create_error_desc(ERROR_CONNECT_SOCKET, this,
function_obj);
zjs_defer_emit_event(this, "error", &desc, sizeof(desc),
handle_error_arg, zjs_release_args);
return ZJS_UNDEFINED;
}
}
// add all the socket address information
zjs_obj_add_string(this, host, "remoteAddress");
zjs_obj_add_string(this, "IPv6", "remoteFamily");
zjs_obj_add_number(this, port, "remotePort");
zjs_obj_add_string(this, localAddress, "localAddress");
zjs_obj_add_number(this, localPort, "localPort");
sa_family_t family = net_context_get_family(handle->tcp_sock);
if (family == AF_INET6) {
zjs_obj_add_string(this, "IPv6", "family");
} else {
zjs_obj_add_string(this, "IPv4", "family");
}
return ZJS_UNDEFINED;
}
/**
* Create a new socket object
*
* @namespace Net.Socket
* @memberof Net
* @name Socket
* @fires close
* @fires connect
* @fires data
* @fires timeout
* @returns {Socket} New socket object created
*/
static ZJS_DECL_FUNC(net_socket)
{
sock_handle_t *sock_handle = NULL;
jerry_value_t socket = create_socket(true, &sock_handle);
if (!sock_handle) {
return zjs_error("could not alloc socket handle");
}
DBG_PRINT("socket created, context=%p, sock=%u\n", sock_handle->tcp_sock,
socket);
return socket;
}
/**
* Check if input is an IP address
*
* @name isIP
* @memberof Net
*
* @param {string} input - Input string
* @return {number} 0 for invalid strings, 4 for IPv4, 6 for IPv6
*/
static ZJS_DECL_FUNC(net_is_ip)
{
if (!jerry_value_is_string(argv[0]) || argc < 1) {
return jerry_create_number(0);
}
jerry_size_t size = 64;
char ip[size];
zjs_copy_jstring(argv[0], ip, &size);
if (!size) {
return jerry_create_number(0);
}
struct sockaddr_in6 tmp = { 0 };
// check if v6
if (net_addr_pton(AF_INET6, ip, &tmp.sin6_addr) < 0) {
// check if v4
struct sockaddr_in tmp1 = { 0 };
if (net_addr_pton(AF_INET, ip, &tmp1.sin_addr) < 0) {
return jerry_create_number(0);
} else {
return jerry_create_number(4);
}
} else {
return jerry_create_number(6);
}
}
/**
* Check if input is an IPv4 address
*
* @name isIPv4
* @memberof Net
*
* @param {string} input - Input string
* @return {boolean} true if input was IPv4
*/
static ZJS_DECL_FUNC(net_is_ip4)
{
ZVAL ret = net_is_ip(function_obj, this, argv, argc);
double v = jerry_get_number_value(ret);
if (v == 4) {
return jerry_create_boolean(true);
}
return jerry_create_boolean(false);
}
/**
* Check if input is an IPv6 address
*
* @name isIPv6
* @memberof Net
*
* @param {string} input - Input string
* @return {boolean} true if input was IPv4
*/
static ZJS_DECL_FUNC(net_is_ip6)
{
ZVAL ret = net_is_ip(function_obj, this, argv, argc);
double v = jerry_get_number_value(ret);
if (v == 6) {
return jerry_create_boolean(true);
}
return jerry_create_boolean(false);
}
static jerry_value_t net_obj;
jerry_value_t zjs_net_init()
{
zjs_net_config_default();
zjs_native_func_t net_array[] = {
{ net_create_server, "createServer" },
{ net_socket, "Socket" },
{ net_is_ip, "isIP" },
{ net_is_ip4, "isIPv4" },
{ net_is_ip6, "isIPv6" },
{ NULL, NULL }
};
zjs_native_func_t sock_array[] = {
{ socket_address, "address" },
{ socket_write, "write" },
{ socket_pause, "pause" },
{ socket_resume, "resume" },
{ socket_set_timeout, "setTimeout" },
{ NULL, NULL }
};
zjs_native_func_t server_array[] = {
{ server_address, "address" },
{ server_listen, "listen" },
{ server_close, "close" },
{ server_get_connections, "getConnections" },
{ NULL, NULL }
};
// Net object prototype
zjs_net_prototype = jerry_create_object();
zjs_obj_add_functions(zjs_net_prototype, net_array);
// Socket object prototype
zjs_net_socket_prototype = jerry_create_object();
zjs_obj_add_functions(zjs_net_socket_prototype, sock_array);
// Server object prototype
zjs_net_server_prototype = jerry_create_object();
zjs_obj_add_functions(zjs_net_server_prototype, server_array);
net_obj = jerry_create_object();
jerry_set_prototype(net_obj, zjs_net_prototype);
return jerry_acquire_value(net_obj);
}
void zjs_net_cleanup()
{
jerry_release_value(zjs_net_prototype);
jerry_release_value(zjs_net_socket_prototype);
jerry_release_value(zjs_net_server_prototype);
}
#endif // BUILD_MODULE_NET
|
the_stack_data/64199387.c
|
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isascii.c :+: :+: */
/* +:+ */
/* By: goosterl <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/10/28 15:01:14 by goosterl #+# #+# */
/* Updated: 2019/12/01 15:32:01 by goosterl ######## odam.nl */
/* */
/* ************************************************************************** */
int ft_isascii(int c)
{
return (c >= 0 && c <= 127);
}
|
the_stack_data/73574752.c
|
/************************
* ADDRESS DEFINITIONS
************************/
// System Control Legacy base address
#define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x400FE108))
// PortF(APB) base address: 0x40025000
#define GPIO_PORTF_DATA_R (*((volatile unsigned long *)0x400253FC))
#define GPIO_PORTF_DEN_R (*((volatile unsigned long *)0x4002551C))
#define GPIO_PORTF_DIR_R (*((volatile unsigned long *)0x40025400))
#define GPIO_PORTF_AMSEL_R (*((volatile unsigned long *)0x40025528))
#define GPIO_PORTF_AFSEL_R (*((volatile unsigned long *)0x40025420))
#define GPIO_PORTF_PCTL_R (*((volatile unsigned long *)0x4002552C))
#define GPIO_PORTF_PUR_R (*((volatile unsigned long *)0x40025510))
// PortF Interrupt Registers
#define NVIC_EN0_R (*((volatile unsigned long *)0xE000E100))
#define NVIC_PRI7_R (*((volatile unsigned long *)0xE000E41C))
#define GPIO_PORTF_IS_R (*((volatile unsigned long *)0x40025404))
#define GPIO_PORTF_IBE_R (*((volatile unsigned long *)0x40025408))
#define GPIO_PORTF_IEV_R (*((volatile unsigned long *)0x4002540C))
#define GPIO_PORTF_IM_R (*((volatile unsigned long *)0x40025410))
#define GPIO_PORTF_ICR_R (*((volatile unsigned long *)0x4002541C))
// PortF GPIO Lock
#define GPIO_PORTF_LOCK_R (*((volatile unsigned long *)0x40025520))
#define GPIO_PORTF_CR_R (*((volatile unsigned long *)0x40025524))
// Systick & NVIC Registers
#define NVIC_SYS_PRI3_R (*((volatile unsigned long *)0xE000ED20))
#define NVIC_ST_CTRL_R (*((volatile unsigned long *)0xE000E010))
#define NVIC_ST_RELOAD_R (*((volatile unsigned long *)0xE000E014))
#define NVIC_ST_CURRENT_R (*((volatile unsigned long *)0xE000E018))
// PortF Bit-specific Address
#define SW1 (*((volatile unsigned long *)0x40025040))
#define SW2 (*((volatile unsigned long *)0x40025004))
#define LED_B (*((volatile unsigned long *)0x40025010))
#define LED_R (*((volatile unsigned long *)0x40025008))
#define LED_G (*((volatile unsigned long *)0x40025020))
#define PF2 (*((volatile unsigned long *)0x40025010))
// Switch Definitions
#define ON 0xFF
#define OFF 0x00
void initPortF_in(void);
void initPortF_out(void);
void delay(unsigned int param);
void initNVIC(void);
void SysTick_Pulse(unsigned long param);
void EnableInterrupts(void);
void WaitForInterrupt(void);
// Parametric Settings (Global Variables)
unsigned long SysTickPeriod = 80000; //(1ms/62.5us) - 1ms period @ 16MHz clock
unsigned long H = 40000; // SysTickPeriod/2 - initial HIGH wave state
unsigned long L = 40000; // SysTickPeriod/2 - initial LOW wave state
unsigned long AdjParam = 10000; // PWM Adjustment Parameter (12.5% of SysTickPeriod)
/************************
* ISR HANDLERS
************************/
// Edge Trigger (Background Thread)
void GPIOPortF_Handler(void){
GPIO_PORTF_ICR_R = 0x11; //clear PF4 and PF0 flags
// Slow down
if(SW2 == 0){
if(H > (AdjParam*2)){ // <-- lower boundary limit
H -= AdjParam;
L += AdjParam;
}
}
// Speed up
if(SW1 == 0){
if(L > (AdjParam*2)){ // <-- upper boundary limit
H += AdjParam;
L -= AdjParam;
}
}
}
// Periodic Handler (Background Thread)
void SysTick_Handler(void){
/*
* This will toggle PF2 on and off
* at SysTickPeriod rate
*/
if(PF2 == OFF){
PF2 = ON;
NVIC_ST_RELOAD_R = L - 1;
}
else{
PF2 = OFF;
NVIC_ST_RELOAD_R = H - 1;
}
}
/************************
* MAIN ROUTINE
************************/
void main(void) {
// Initialization routine
SYSCTL_RCGC2_R |= 0x00000020; // (a) Activate PortF Clock
initPortF_in();
initPortF_out();
SysTick_Pulse(SysTickPeriod);
initNVIC();
EnableInterrupts();
// Program routine
while(1){
// Blink Red LED (Foreground Thread)
LED_G ^= ON;
delay(500);
//WaitForInterrupt(); //enter low power mode while doing nothing
}
}
/************************
* SUB ROUTINES
************************/
// SysTick Interrupt Routine (pg. 132)
void SysTick_Pulse(unsigned long param){
NVIC_ST_CTRL_R = 0;
NVIC_ST_RELOAD_R = param - 1;
NVIC_ST_CURRENT_R = 0;
NVIC_SYS_PRI3_R |= 0x50000000; // Interrupt Priority 2
NVIC_ST_CTRL_R |= 0x07;
}
// PortF Output Initialization
void initPortF_out(void){
// GPIO Digital Control // ************OUTPUT*************
GPIO_PORTF_DEN_R |= 0x0E; // (b) Make PF1,2,3 Digital Pins
GPIO_PORTF_DIR_R |= 0x0E; // Make PF1,2,3 OUTPUT Pins
// GPIO Alternate function control
GPIO_PORTF_AMSEL_R &= 0; // Disable Analog Mode
GPIO_PORTF_AFSEL_R &= ~0x0E; // Disable Alternate Function on PF1,2,3
GPIO_PORTF_PCTL_R &= ~0x0000FFF0; // Keep PF1,2,3 as GPIO
}
// PortF Input Initialization
void initPortF_in(void){
// UNLOCK PF0 // ************INPUT*************
GPIO_PORTF_LOCK_R = 0x4C4F434B; // Unlock PF0
GPIO_PORTF_CR_R |= 0x01; // Commit LOCK_R changes
// GPIO Digital Control
GPIO_PORTF_DEN_R |= 0x11; // (b) Make PF4 & PF0 Digital Pins
GPIO_PORTF_DIR_R &= ~0x11; // Make PF4 & PF0 INPUT Pins
GPIO_PORTF_PUR_R |= 0x11; // Set a PULL-UP resister internal for PF4 & PF1
// GPIO Alternate function control
GPIO_PORTF_AMSEL_R = 0; // Disable Analog Mode
GPIO_PORTF_AFSEL_R &= ~0x11; // Disable Alternate Function on PF
GPIO_PORTF_PCTL_R &= ~0x000F000F; // Keep PF4 & PF0 as GPIO
}
// Edge Triggered Interrupt (pg. 657)
void initNVIC(void){
/* EDGE TRIGGER NOTE:
* We Trigger on the falling
* edge because SW1 & SW2 are set
* to be a negative-logic switch
*/
// ************INTERRUPT*************
GPIO_PORTF_IS_R &= ~0x11; // (c) Edge-sensitive
GPIO_PORTF_IBE_R &= ~0x11; // Does not trigger on falling or rising
// GPIO_PORTF_IBE_R |= 0x11; // Does triggers on BOTH
GPIO_PORTF_IEV_R &= ~0x11; // Triggers on FALLING edge
// GPIO_PORTF_IEV_R |= 0x11; // Triggers on RISING edge
GPIO_PORTF_ICR_R |= 0x0F; // (d) CLEAR All Interrupt FLAGS
GPIO_PORTF_IM_R |= 0x11; // (e) Enable interrupt mask (allows designated pins for ISR)
//NVIC Configuration (pg. 132)
NVIC_PRI7_R |= 0x00A00000; // (f) Interrupt Priority to 5
NVIC_EN0_R |= 0X40000000; // (g) Enable Interrupt # 30 - PORTF
}
// Busy-wait delay (~1ms per param)
void delay(unsigned int param){ unsigned int i, j;
for(j = 0; j < param; j++){
for(i = 0; i < 800; i++){
// do nothing
}
}
}
|
the_stack_data/107952870.c
|
/*
NrrdIO: stand-alone code for basic nrrd functionality
Copyright (C) 2013, 2012, 2011, 2010, 2009 University of Chicago
Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann
Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
/*
This file is a modified version of the 'gzio.c' and 'zutil.h' source
files from the zlib 1.1.4 distribution.
zlib.h -- interface of the 'zlib' general purpose compression library
version 1.1.4, March 11th, 2002
Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
[email protected] [email protected]
The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
*/
#if TEEM_ZLIB
#include "NrrdIO.h"
#include "privateNrrd.h"
#ifdef _WIN32 /* Window 95 & Windows NT */
# define _NRRD_OS_CODE 0x0b
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC) || defined(__APPLE_CC__)
# define _NRRD_OS_CODE 0x07
#endif
#ifndef _NRRD_OS_CODE
# define _NRRD_OS_CODE 0x03 /* assume Unix */
#endif
/* default memLevel */
#if MAX_MEM_LEVEL >= 8
# define _NRRD_DEF_MEM_LEVEL 8
#else
# define _NRRD_DEF_MEM_LEVEL MAX_MEM_LEVEL
#endif
/* stream buffer size */
#define _NRRD_Z_BUFSIZE 16 * 1024
/* gzip flag byte */
#define _NRRD_ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
#define _NRRD_HEAD_CRC 0x02 /* bit 1 set: header CRC present */
#define _NRRD_EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
#define _NRRD_ORIG_NAME 0x08 /* bit 3 set: original file name present */
#define _NRRD_COMMENT 0x10 /* bit 4 set: file comment present */
#define _NRRD_RESERVED 0xE0 /* bits 5..7: reserved */
typedef struct _NrrdGzStream {
z_stream stream;
int z_err; /* error code for last stream operation */
int z_eof; /* set if end of input file */
FILE *file; /* .gz file */
Byte *inbuf; /* input buffer */
Byte *outbuf; /* output buffer */
uLong crc; /* crc32 of uncompressed data */
char *msg; /* error message */
int transparent; /* 1 if input file is not a .gz file */
char mode; /* 'w' or 'r' */
long startpos; /* start of compressed data in file (header skipped) */
} _NrrdGzStream;
static int _nrrdGzMagic[2] = {0x1f, 0x8b}; /* gzip magic header */
/* zlib error messages */
static const char *_nrrdGzErrMsg[10] = {
"need dictionary", /* Z_NEED_DICT 2 */
"stream end", /* Z_STREAM_END 1 */
"", /* Z_OK 0 */
"file error", /* Z_ERRNO (-1) */
"stream error", /* Z_STREAM_ERROR (-2) */
"data error", /* Z_DATA_ERROR (-3) */
"insufficient memory", /* Z_MEM_ERROR (-4) */
"buffer error", /* Z_BUF_ERROR (-5) */
"incompatible version",/* Z_VERSION_ERROR (-6) */
""};
#define _NRRD_GZ_ERR_MSG(err) _nrrdGzErrMsg[Z_NEED_DICT-(err)]
/* some forward declarations for things in this file */
static void _nrrdGzCheckHeader(_NrrdGzStream *s);
static int _nrrdGzDestroy(_NrrdGzStream *s);
static int _nrrdGzDoFlush(gzFile file, int flush);
static void _nrrdGzPutLong(FILE *file, uLong x);
static uLong _nrrdGzGetLong(_NrrdGzStream *s);
/*
** _nrrdGzOpen()
**
** Opens a gzip (.gz) file for reading or writing. The mode parameter
** is like in fopen ("rb" or "wb"). The file represented by the FILE* pointer
** should be open already with the same mode. The mode parameter can also be
** used to specify the compression level "[0-9]" and strategy "[f|h]".
**
** The compression level must be between 0 and 9: 1 gives best speed,
** 9 gives best compression, 0 gives no compression at all (the input data
** is simply copied a block at a time). The default level is 6.
**
** The strategy parameter is used to tune the compression algorithm. Use
** "f" for data produced by a filter (or predictor), or "h" to force Huffman
** encoding only (no string match). Filtered data consists mostly of small
** values with a somewhat random distribution. In this case, the compression
** algorithm is tuned to compress them better. The effect of "f" is to force
** more Huffman coding and less string matching; it is somewhat intermediate
** between the default and Huffman. The strategy parameter only affects the
** compression ratio but not the correctness of the compressed output even
** if it is not set appropriately.
**
** The complete syntax for the mode parameter is: "(r|w[a])[0-9][f|h]".
**
** Returns Z_NULL if the file could not be opened or if there was
** insufficient memory to allocate the (de)compression state; errno
** can be checked to distinguish the two cases (if errno is zero, the
** zlib error is Z_MEM_ERROR).
*/
gzFile
_nrrdGzOpen(FILE* fd, const char* mode) {
static const char me[]="_nrrdGzOpen";
int error;
int level = Z_DEFAULT_COMPRESSION; /* compression level */
int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
const char *p = mode;
_NrrdGzStream *s;
char fmode[AIR_STRLEN_MED]; /* copy of mode, without the compression level */
char *m = fmode;
if (!mode) {
biffAddf(NRRD, "%s: no file mode specified", me);
return Z_NULL;
}
/* allocate stream struct */
s = (_NrrdGzStream *)calloc(1, sizeof(_NrrdGzStream));
if (!s) {
biffAddf(NRRD, "%s: failed to allocate stream buffer", me);
return Z_NULL;
}
/* initialize stream struct */
s->stream.zalloc = (alloc_func)0;
s->stream.zfree = (free_func)0;
s->stream.opaque = (voidpf)0;
s->stream.next_in = s->inbuf = Z_NULL;
s->stream.next_out = s->outbuf = Z_NULL;
s->stream.avail_in = s->stream.avail_out = 0;
s->file = NULL;
s->z_err = Z_OK;
s->z_eof = 0;
s->crc = crc32(0L, Z_NULL, 0);
s->msg = NULL;
s->transparent = 0;
/* parse mode flag */
s->mode = '\0';
do {
if (*p == 'r') s->mode = 'r';
if (*p == 'w' || *p == 'a') s->mode = 'w';
if (*p >= '0' && *p <= '9') {
level = *p - '0';
} else if (*p == 'f') {
strategy = Z_FILTERED;
} else if (*p == 'h') {
strategy = Z_HUFFMAN_ONLY;
} else {
*m++ = *p; /* copy the mode */
}
} while (*p++ && m != fmode + sizeof(fmode));
if (s->mode == '\0') {
biffAddf(NRRD, "%s: invalid file mode", me);
return _nrrdGzDestroy(s), (gzFile)Z_NULL;
}
if (s->mode == 'w') {
error = deflateInit2(&(s->stream), level,
Z_DEFLATED, -MAX_WBITS, _NRRD_DEF_MEM_LEVEL,
strategy);
/* windowBits is passed < 0 to suppress zlib header */
s->stream.next_out = s->outbuf = (Byte*)calloc(1, _NRRD_Z_BUFSIZE);
if (error != Z_OK || s->outbuf == Z_NULL) {
biffAddf(NRRD, "%s: stream init failed", me);
return _nrrdGzDestroy(s), (gzFile)Z_NULL;
}
} else {
s->stream.next_in = s->inbuf = (Byte*)calloc(1, _NRRD_Z_BUFSIZE);
error = inflateInit2(&(s->stream), -MAX_WBITS);
/* windowBits is passed < 0 to tell that there is no zlib header.
* Note that in this case inflate *requires* an extra "dummy" byte
* after the compressed stream in order to complete decompression and
* return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
* present after the compressed stream.
*/
if (error != Z_OK || s->inbuf == Z_NULL) {
biffAddf(NRRD, "%s: stream init failed", me);
return _nrrdGzDestroy(s), (gzFile)Z_NULL;
}
}
s->stream.avail_out = _NRRD_Z_BUFSIZE;
errno = 0;
s->file = fd;
if (s->file == NULL) {
biffAddf(NRRD, "%s: null file pointer", me);
return _nrrdGzDestroy(s), (gzFile)Z_NULL;
}
if (s->mode == 'w') {
/* Write a very simple .gz header: */
fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", _nrrdGzMagic[0], _nrrdGzMagic[1],
Z_DEFLATED,
0 /*flags*/,
0,0,0,0 /*time*/,
0 /*xflags*/,
_NRRD_OS_CODE);
s->startpos = 10L;
/* We use 10L instead of ftell(s->file) to because ftell causes an
* fflush on some systems. This version of the library doesn't use
* startpos anyway in write mode, so this initialization is not
* necessary.
*/
} else {
_nrrdGzCheckHeader(s); /* skip the .gz header */
s->startpos = (ftell(s->file) - s->stream.avail_in);
}
return (gzFile)s;
}
/*
** _nrrdGzClose()
**
** Flushes all pending output if necessary, closes the compressed file
** and deallocates the (de)compression state.
*/
int
_nrrdGzClose (gzFile file) {
static const char me[]="_nrrdGzClose";
int error;
_NrrdGzStream *s = (_NrrdGzStream*)file;
if (s == NULL) {
biffAddf(NRRD, "%s: invalid stream", me);
return 1;
}
if (s->mode == 'w') {
error = _nrrdGzDoFlush(file, Z_FINISH);
if (error != Z_OK) {
biffAddf(NRRD, "%s: failed to flush pending data", me);
return _nrrdGzDestroy((_NrrdGzStream*)file);
}
_nrrdGzPutLong(s->file, s->crc);
_nrrdGzPutLong(s->file, s->stream.total_in);
}
return _nrrdGzDestroy((_NrrdGzStream*)file);
}
/*
** _nrrdGzRead()
**
** Reads the given number of uncompressed bytes from the compressed file.
** Returns the number of bytes actually read (0 for end of file).
*/
int
_nrrdGzRead(gzFile file, void* buf, unsigned int len, unsigned int* didread) {
static const char me[]="_nrrdGzRead";
_NrrdGzStream *s = (_NrrdGzStream*)file;
Bytef *start = (Bytef*)buf; /* starting point for crc computation */
Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */
if (s == NULL || s->mode != 'r') {
biffAddf(NRRD, "%s: invalid stream or file mode", me);
*didread = 0;
return 1;
}
if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) {
biffAddf(NRRD, "%s: data read error", me);
*didread = 0;
return 1;
}
if (s->z_err == Z_STREAM_END) {
*didread = 0;
return 0; /* EOF */
}
next_out = (Byte*)buf;
s->stream.next_out = (Bytef*)buf;
s->stream.avail_out = len;
while (s->stream.avail_out != 0) {
if (s->transparent) {
/* Copy first the lookahead bytes: */
uInt n = s->stream.avail_in;
if (n > s->stream.avail_out) n = s->stream.avail_out;
if (n > 0) {
memcpy(s->stream.next_out, s->stream.next_in, n);
next_out += n;
s->stream.next_out = next_out;
s->stream.next_in += n;
s->stream.avail_out -= n;
s->stream.avail_in -= n;
}
if (s->stream.avail_out > 0) {
s->stream.avail_out -= (uInt)fread(next_out, 1, s->stream.avail_out,
s->file);
}
len -= s->stream.avail_out;
s->stream.total_in += len;
s->stream.total_out += len;
if (len == 0) s->z_eof = 1;
*didread = len;
return 0;
}
if (s->stream.avail_in == 0 && !s->z_eof) {
errno = 0;
s->stream.avail_in = (uInt)fread(s->inbuf, 1, _NRRD_Z_BUFSIZE, s->file);
if (s->stream.avail_in == 0) {
s->z_eof = 1;
if (ferror(s->file)) {
s->z_err = Z_ERRNO;
break;
}
}
s->stream.next_in = s->inbuf;
}
s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
if (s->z_err == Z_STREAM_END) {
/* Check CRC and original size */
s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
start = s->stream.next_out;
if (_nrrdGzGetLong(s) != s->crc) {
s->z_err = Z_DATA_ERROR;
} else {
(void)_nrrdGzGetLong(s);
/* The uncompressed length returned by above getlong() may
* be different from s->stream.total_out) in case of
* concatenated .gz files. Check for such files:
*/
_nrrdGzCheckHeader(s);
if (s->z_err == Z_OK) {
uLong total_in = s->stream.total_in;
uLong total_out = s->stream.total_out;
inflateReset(&(s->stream));
s->stream.total_in = total_in;
s->stream.total_out = total_out;
s->crc = crc32(0L, Z_NULL, 0);
}
}
}
if (s->z_err != Z_OK || s->z_eof) break;
}
s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
*didread = len - s->stream.avail_out;
return 0;
}
/*
** _nrrdGzWrite()
**
** Writes the given number of uncompressed bytes into the compressed file.
** Returns the number of bytes actually written (0 in case of error).
*/
int
_nrrdGzWrite(gzFile file, const void* buf, unsigned int len,
unsigned int* written) {
static const char me[]="_nrrdGzWrite";
_NrrdGzStream *s = (_NrrdGzStream*)file;
void *nonconstbuf;
if (s == NULL || s->mode != 'w') {
biffAddf(NRRD, "%s: invalid stream or file mode", me);
*written = 0;
return 1;
}
/* If you google for "const correct zlib" or "zlib.h is not
const-correct" you'll find zlib mailing list discussions of how
zlib doesn't have all the consts that it should, and various code
examples of using multiple casts to hide the problem. Here's a
slow way that doesn't use mere casting to make the const go away */
memcpy(&nonconstbuf, &buf, sizeof(void*));
s->stream.next_in = (Bytef*)nonconstbuf;
s->stream.avail_in = len;
while (s->stream.avail_in != 0) {
if (s->stream.avail_out == 0) {
s->stream.next_out = s->outbuf;
if (fwrite(s->outbuf, 1, _NRRD_Z_BUFSIZE, s->file) != _NRRD_Z_BUFSIZE) {
s->z_err = Z_ERRNO;
biffAddf(NRRD, "%s: failed to write to file", me);
break;
}
s->stream.avail_out = _NRRD_Z_BUFSIZE;
}
s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
if (s->z_err != Z_OK) break;
}
s->crc = crc32(s->crc, (const Bytef *)buf, len);
*written = len - s->stream.avail_in;
return 0;
}
/*
** _nrrdGzGetByte()
**
** Reads a byte from a _NrrdGzStream. Updates next_in and avail_in.
** Returns EOF for end of file.
** IN assertion: the stream s has been sucessfully opened for reading.
*/
static int
_nrrdGzGetByte(_NrrdGzStream *s) {
static const char me[]="_nrrdGzGetByte";
if (s->z_eof) return EOF;
if (s->stream.avail_in == 0) {
errno = 0;
s->stream.avail_in = (uInt)fread(s->inbuf, 1, _NRRD_Z_BUFSIZE, s->file);
if (s->stream.avail_in == 0) {
s->z_eof = 1;
if (ferror(s->file)) {
biffAddf(NRRD, "%s: failed to read from file", me);
s->z_err = Z_ERRNO;
}
return EOF;
}
s->stream.next_in = s->inbuf;
}
s->stream.avail_in--;
return *(s->stream.next_in)++;
}
/*
******** _nrrdGzCheckHeader()
**
** Checks the gzip header of a _NrrdGzStream opened for reading. Sets
** the stream mode to transparent if the gzip magic header is not
** present; sets s->err to Z_DATA_ERROR if the magic header is present
** but the rest of the header is incorrect.
** IN assertion: the stream s has already been created sucessfully;
** s->stream.avail_in is zero for the first time, but may be non-zero
** for concatenated .gz files.
*/
static void
_nrrdGzCheckHeader(_NrrdGzStream *s) {
static const char me[]="_nrrdGzCheckHeader";
int method; /* method byte */
int flags; /* flags byte */
uInt len;
int c;
/* Check the gzip magic header */
for (len = 0; len < 2; len++) {
c = _nrrdGzGetByte(s);
if (c != _nrrdGzMagic[len]) {
if (len != 0) s->stream.avail_in++, s->stream.next_in--;
if (c != EOF) {
s->stream.avail_in++, s->stream.next_in--;
s->transparent = 1;
}
s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
return;
}
}
method = _nrrdGzGetByte(s);
flags = _nrrdGzGetByte(s);
if (method != Z_DEFLATED || (flags & _NRRD_RESERVED) != 0) {
biffAddf(NRRD, "%s: gzip compression method is not deflate", me);
s->z_err = Z_DATA_ERROR;
return;
}
/* Discard time, xflags and OS code: */
for (len = 0; len < 6; len++) (void)_nrrdGzGetByte(s);
if ((flags & _NRRD_EXTRA_FIELD) != 0) { /* skip the extra field */
len = (uInt)_nrrdGzGetByte(s);
len += ((uInt)_nrrdGzGetByte(s))<<8;
/* len is garbage if EOF but the loop below will quit anyway */
while (len-- != 0 && _nrrdGzGetByte(s) != EOF) ;
}
if ((flags & _NRRD_ORIG_NAME) != 0) { /* skip the original file name */
while ((c = _nrrdGzGetByte(s)) != 0 && c != EOF) ;
}
if ((flags & _NRRD_COMMENT) != 0) { /* skip the .gz file comment */
while ((c = _nrrdGzGetByte(s)) != 0 && c != EOF) ;
}
if ((flags & _NRRD_HEAD_CRC) != 0) { /* skip the header crc */
for (len = 0; len < 2; len++) (void)_nrrdGzGetByte(s);
}
s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
}
/*
** _nrrdGzDestroy()
**
** Cleans up then free the given _NrrdGzStream. Returns a zlib error code.
** Try freeing in the reverse order of allocations. FILE* s->file is not
** closed. Because we didn't allocate it, we shouldn't delete it.
*/
static int
_nrrdGzDestroy(_NrrdGzStream *s) {
static const char me[]="_nrrdGzDestroy";
int error = Z_OK;
if (s == NULL) {
biffAddf(NRRD, "%s: invalid stream", me);
return 1;
}
s->msg = (char *)airFree(s->msg);
if (s->stream.state != NULL) {
if (s->mode == 'w') {
error = deflateEnd(&(s->stream));
} else if (s->mode == 'r') {
error = inflateEnd(&(s->stream));
}
}
if (error != Z_OK) {
biffAddf(NRRD, "%s: %s", me, _NRRD_GZ_ERR_MSG(error));
}
if (s->z_err < 0) error = s->z_err;
if (error != Z_OK) {
biffAddf(NRRD, "%s: %s", me, _NRRD_GZ_ERR_MSG(error));
}
s->inbuf = (Byte *)airFree(s->inbuf);
s->outbuf = (Byte *)airFree(s->outbuf);
airFree(s); /* avoiding unused value warnings, no NULL set */
return error != Z_OK;
}
/*
** _nrrdGzDoFlush()
**
** Flushes all pending output into the compressed file. The parameter
** flush is the same as in the deflate() function.
*/
static int
_nrrdGzDoFlush(gzFile file, int flush) {
static const char me[]="_nrrdGzDoFlush";
uInt len;
int done = 0;
_NrrdGzStream *s = (_NrrdGzStream*)file;
if (s == NULL || s->mode != 'w') {
biffAddf(NRRD, "%s: invalid stream or file mode", me);
return Z_STREAM_ERROR;
}
s->stream.avail_in = 0; /* should be zero already anyway */
for (;;) {
len = _NRRD_Z_BUFSIZE - s->stream.avail_out;
if (len != 0) {
if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
s->z_err = Z_ERRNO;
return Z_ERRNO;
}
s->stream.next_out = s->outbuf;
s->stream.avail_out = _NRRD_Z_BUFSIZE;
}
if (done) break;
s->z_err = deflate(&(s->stream), flush);
/* Ignore the second of two consecutive flushes: */
if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
/* deflate has finished flushing only when it hasn't used up
* all the available space in the output buffer:
*/
done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
}
return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
}
/*
** _nrrdGzPutLong()
**
** Outputs a long in LSB order to the given file.
*/
static void
_nrrdGzPutLong(FILE* file, uLong x) {
int n;
for (n = 0; n < 4; n++) {
fputc((int)(x & 0xff), file);
x >>= 8;
}
}
/*
** _nrrdGzGetLong()
**
** Reads a long in LSB order from the given _NrrdGzStream.
** Sets z_err in case of error.
*/
static uLong
_nrrdGzGetLong(_NrrdGzStream *s) {
uLong x = (uLong)_nrrdGzGetByte(s);
int c;
x += ((uLong)_nrrdGzGetByte(s))<<8;
x += ((uLong)_nrrdGzGetByte(s))<<16;
c = _nrrdGzGetByte(s);
if (c == EOF) s->z_err = Z_DATA_ERROR;
x += ((uLong)c)<<24;
return x;
}
#endif /* TEEM_ZLIB */
/*
** random symbol to have in object file, even when Zlib not enabled
*/
int
_nrrdGzDummySymbol(void) {
return 42;
}
|
the_stack_data/102134.c
|
/*@ begin PerfTuning (
def build
{
arg build_command = 'gcc -O3 -fopenmp ';
arg libs = '-lm -lrt';
}
def performance_counter
{
arg repetitions = 35;
}
def performance_params
{
param T1_I[] = [1,16,32,64,128,256,512];
param T1_J[] = [1,16,32,64,128,256,512];
param T2_I[] = [1,64,128,256,512,1024,2048];
param T2_J[] = [1,64,128,256,512,1024,2048];
param U_I[] = range(1,31);
param U_J[] = range(1,31);
(T1_I if T1_I>1 else T2_I)*(T1_J if T1_J>1 else T2_J) <= 512*512));
}
def search
{
arg algorithm = 'Randomsearch';
arg total_runs = 10000;
}
let SIZE = 5000;
def input_params
{
param MSIZE = SIZE;
param NSIZE = SIZE;
param M = SIZE;
param N = SIZE;
}
def input_vars
{
decl static double a[M][N] = random;
decl static double y_1[N] = random;
decl static double y_2[M] = random;
decl static double x1[M] = 0;
decl static double x2[N] = 0;
}
) @*/
int i, j;
int ii, jj;
int iii, jjj;
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*@ begin Loop(
transform Composite(
tile = [('i',T1_I,'ii'),('j',T1_J,'jj'),(('ii','i'),T2_I,'iii'),(('jj','j'),T2_J,'jjj')],
unrolljam = (['i','j'],[U_I,U_J])
)
for (i=0;i<=N-1;i++)
for (j=0;j<=N-1;j++)
{
x1[i]=x1[i]+a[i][j]*y_1[j];
x2[j]=x2[j]+a[i][j]*y_2[i];
}
) @*/
/*@ end @*/
/*@ end @*/
|
the_stack_data/162643672.c
|
//Name : Kshitij Raj
//UFID : 13584965
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<fcntl.h>
#include<stdlib.h>
#include<ctype.h>
#include<sys/stat.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<pthread.h>
#include<unistd.h>
#include<sys/wait.h>
struct iteration
{
char iteration_name[10];
char iteration_date[10];
int x_count;
};
struct node
{
pthread_mutex_t lock;
pthread_cond_t empty,full;
char **buff;
int in,buf_out,buff_size,buffer_filled,value,valid_value,calender_count,counter,date_counter,time_count,count,flag;
};
int main(int argc, char*argv[])
{
struct node * nodeobj;
//Creating shared region using mmap
nodeobj = (struct node *) mmap(NULL, sizeof(struct node), PROT_READ | PROT_WRITE , MAP_SHARED | MAP_ANONYMOUS , -1 , 0);
nodeobj->buff_size = atoi(argv[1]);
nodeobj->in =0;
nodeobj->buf_out =-1;
nodeobj->value =0;
nodeobj->valid_value=0;
nodeobj->counter =0;
nodeobj->date_counter=0;
nodeobj->count=0;
nodeobj->flag=0;
nodeobj->time_count=0;
nodeobj->calender_count=0;
nodeobj->buffer_filled =0;
nodeobj->buff = (char **) malloc(sizeof(char*) * nodeobj->buff_size);
for(int i =0; i<nodeobj->buff_size; i++)
{
*(nodeobj->buff+i)= (char*)mmap(NULL, 50*sizeof(char), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
**(nodeobj->buff+i) = '\0';
}
pthread_mutexattr_t psharedm;
pthread_condattr_t psharedf;
//pthread_mutexattr_setpshared(&psharedm, PTHREAD_PROCESS_SHARED);
pthread_condattr_t psharede;
pthread_mutexattr_init(&psharedm);
pthread_mutexattr_setpshared(&psharedm, PTHREAD_PROCESS_SHARED);
pthread_mutex_init(&nodeobj->lock, &psharedm);
//pthread_mutex_init(&nodeobj->lock, &psharedf);
pthread_condattr_init(&psharedf);
pthread_condattr_init(&psharede);
//pthread_mutexattr_init(&psharedm);
//pthread_mutexattr_setpshared(&psharedm, PTHREAD_PROCESS_SHARED);
pthread_condattr_setpshared(&psharedf, PTHREAD_PROCESS_SHARED);
pthread_condattr_setpshared(&psharede, PTHREAD_PROCESS_SHARED);
pthread_cond_init(&nodeobj->empty, &psharedf);
pthread_cond_init(&nodeobj->full, &psharedf);
pid_t a,b;
a = fork(); //Creating the first child
if(a == -1)
{
printf("\nCannot create child process");
}
else if (a == 0)
{
int x =0;
char *line;
char buf[49];
FILE * fp , * fp1;
fp = fopen(argv[2], "r");
fp1 = fopen(argv[2], "r");
int value =0;
int handle, sign;
size_t len =0;
while((handle= getline(&line, &len, fp)) != -1)
{
nodeobj->counter += 1;
}
while((sign= getline(&line, &len, fp1)) != -1)
{
for(int q =0; q< 49; q++)
{
buf[q] = line[q];
}
nodeobj->value += 1;
nodeobj->flag=0; //email filter input format entry check below
if (((buf[9] == 'D') || (buf[9] == 'C') || (buf[9] == 'X')) && (buf[10] == ',') && (buf[21] == ',') && (buf[32] == ',') &&
(buf[38] == ',') && (buf[35] == ':') && (buf[24] == '/') && ( buf[27] == '/' ) && isdigit(buf[22]) && isdigit(buf[23])
&& isdigit(buf[25]) && isdigit (buf[26]) && isdigit(buf[28]) && isdigit(buf[29]) && isdigit(buf[30]) && isdigit(buf[31]) && isdigit(buf[33]) && isdigit(buf[34]) && isdigit(buf[36]) && isdigit(buf[37]) && (buf[0]=='S') && (buf[1]=='u') && (buf[2]=='b')
&& (buf[3]=='j') && (buf[4]=='e') && (buf[5]=='c') && (buf[6]=='t') && (buf[7]==':') && (buf[8]=' '))
{
nodeobj->valid_value++;
pthread_mutex_lock(&(nodeobj->lock));
while((nodeobj->buffer_filled) == (nodeobj->buff_size))
{
pthread_cond_wait(&(nodeobj->full),&(nodeobj->lock) );
}
for(int k =0; k<49; k++)
{
nodeobj->buff[nodeobj->in][k] = buf[k];
}
nodeobj->in = (nodeobj->in + 1) % (nodeobj->buff_size);
nodeobj->buffer_filled += 1;
if((nodeobj->buffer_filled) == 1)
{
pthread_cond_signal(&(nodeobj->empty));
}
pthread_mutex_unlock(&(nodeobj->lock));
}
}
nodeobj->flag=1;
}
else if ( a > 0)
{
//wait(NULL);
b = fork(); //Creating the second child
if (b == -1)
{
printf("Cannot create second child");
}
else if (b == 0)
{
struct iteration iteration_arr[nodeobj->counter];
int s=0;
char buf[49];
int k=0;
char **arr;
char **date_array;
int a;
int value=0;
for(int i =0; i<nodeobj->counter; i++)
{
date_array[i]=(char*)malloc(10*sizeof(char));
}
int dateflag=0, datecount=0,date_counter=0;
int flag=1;
int i,j,flag1,flag2;
int var1[2],var2[2],var3[2],var4[2],var5[2],var6[2],var7[2],var8[2];
char inp_buffer2[10],inp_buffer3[10],inp_buffer4[10];
char str[28],name[10],date[10],tag[27];
while(1)
{
pthread_mutex_lock(&(nodeobj->lock));
while((nodeobj->buffer_filled) == 0)
{
pthread_cond_wait(&(nodeobj->empty),&(nodeobj->lock) );
}
nodeobj->buf_out = (nodeobj->buf_out + 1) % (nodeobj->buff_size);
for(int k =0; k<49; k++)
{
buf[k]=nodeobj->buff[nodeobj->buf_out][k];
}
nodeobj->buffer_filled -= 1;
nodeobj->calender_count++;
if(buf[9] == 'C')
{
nodeobj->count=nodeobj->count+1;
if(nodeobj->count==1)
{
for(i=0;i<10;i++)
{
name[i]=buf[i+11];
}
for(i=0;i<10;i++)
date[i]=buf[i+22];
iteration_arr[nodeobj->count-1].x_count=0;
for(i=0;i<10;i++)
{
if(isalpha(buf[i+11])!=0)
iteration_arr[nodeobj->count-1].x_count++;
name[i]=buf[i+11];
}
for(i=0;i<iteration_arr[nodeobj->count-1].x_count;i++)
iteration_arr[nodeobj->count-1].iteration_name[i]=name[i];
for(i=0;i<10;i++)
iteration_arr[nodeobj->count-1].iteration_date[i]=date[i];
for(i=0;i<27;i++)
tag[i]=buf[i+22];
}
else
{
iteration_arr[nodeobj->count-1].x_count=0;
for(i=0;i<10;i++)
{
if(isalpha(buf[i+11])!=0)
iteration_arr[nodeobj->count-1].x_count++;
name[i]=buf[i+11];
}
for(i=0;i<10;i++)
date[i]=buf[i+22];
for(i=0;i<iteration_arr[nodeobj->count-1].x_count;i++)
iteration_arr[nodeobj->count-1].iteration_name[i]=name[i];
for(i=0;i<10;i++)
iteration_arr[nodeobj->count-1].iteration_date[i]=date[i];
for(i=0;i<2;i++) //MOnth Comparison
{
var1[i]=(int)(tag[i]-'0');
var2[i]=(int)(buf[i+22]-'0');
}
if((var1[0]==var2[0])&&(var1[1]==var2[1]))
flag=1;
else
{
if(var1[0]>var2[0])
flag=2;
else if(var1[0]==var2[0])
{
if(var1[1]>var2[1])
flag=2;
else
flag=3;
}
else
flag=3;
}
if(flag==1)
{
for(i=0;i<2;i++)
{
var3[i]=(int)(tag[i+3]-'0');
var4[i]=(int)(buf[i+25]-'0');
}
if((var3[0]==var4[0])&&(var3[1]==var4[1]))
flag1=1;
else
{
if(var3[0]>var4[0])
flag1=2;
else if(var3[0]==var4[0])
{
if(var3[1]>var4[1])
flag1=2;
else
flag1=3;
}
else
flag1=3;
}
if(flag1==1)
{
for(i=0;i<2;i++)
{
var5[i]=(int)(tag[i+11]-'0');
var6[i]=(int)(buf[i+33]-'0');
}
if((var5[0]==var6[0])&&(var5[1]==var6[1]))
{
for(i=0;i<2;i++)
{
var7[i]=(int)(tag[i+14]-'0');
var8[i]=(int)(buf[i+36]-'0');
}
if((var7[0]==var8[0])&&(var7[1]==var8[1]))
{
}
else
{
if(var7[0]>var8[0])
{
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
else if(var7[0]==var8[0])
{
if(var7[1]>var8[1])
{
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
}
}
}
else
{
if(var5[0]>var6[0])
{
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
else if(var5[0]==var6[0])
{
if(var5[1]>var6[1])
{
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
else
{}
}
else
{}
}
}
else
{
if(nodeobj->time_count==0)
{
for(i=0;i<27;i++)
printf("%c",tag[i]);
printf("\n");
}
nodeobj->time_count=0;
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
}
else
{
if(nodeobj->time_count==0)
{for(i=0;i<27;i++)
printf("%c",tag[i]);
printf("\n");
}
nodeobj->time_count=0;
for(i=0;i<27;i++)
{
tag[i]=buf[i+22];
}
}
}
}
else if(buf[9]=='D')
{
nodeobj->date_counter=nodeobj->date_counter+1;
if(nodeobj->count==1)
{
for(i=0;i<27;i++)
printf("%c",tag[i]);
printf("\n");
nodeobj->time_count=1;
for(i=0;i<10;i++) //Printing for Delete case event
inp_buffer4[i]=date[i];
inp_buffer4[10]=',';
inp_buffer4[11]='-';
inp_buffer4[12]='-';
inp_buffer4[13]=':';
inp_buffer4[14]='-';
inp_buffer4[15]='-';
inp_buffer4[16]=',';
inp_buffer4[17]='N';
inp_buffer4[18]='A';
for(i=0;i<8;i++)
inp_buffer4[i+19]=' ';
for(i=0;i<27;i++)
printf("%c",inp_buffer4[i]);
printf("\n");
}
else
{
for(i=0;i<nodeobj->count;i++)
{
for(j=0;j<10;j++)
{
if(buf[j+22]== iteration_arr[i].iteration_date[j])
dateflag=1;
else
{
dateflag=0;
break;
}
}
if(dateflag==1)
datecount++;
}
if(nodeobj->date_counter==datecount)
{
nodeobj->time_count=1;
datecount=0;
date_counter=0;
//row++;
for(i=0;i<10;i++)
inp_buffer4[i]=iteration_arr[nodeobj->count-1].iteration_date[i];
inp_buffer4[10]=',';
inp_buffer4[11]='-';
inp_buffer4[12]='-';
inp_buffer4[13]=':';
inp_buffer4[14]='-';
inp_buffer4[15]='-';
inp_buffer4[16]=',';
inp_buffer4[17]='N';
inp_buffer4[18]='A';
for(i=0;i<8;i++)
inp_buffer4[i+19]=' ';
for(i=0;i<27;i++)
printf("%c",inp_buffer4[i]);
printf("\n");
}
else
{
nodeobj->time_count=0;
}
datecount=0;
}
}
else if(buf[9]=='X')
{
nodeobj->time_count=1;
for(i=0;i<27;i++)
printf("%c",tag[i]);
printf("\n");
for(i=0;i<27;i++)
str[i]=buf[i+22];
str[27]='\n';
if(nodeobj->count==1)
{
for(i=0;i<27;i++)
printf("%c",str[i]);
printf("\n");
}
else
{
for(i=1;i<nodeobj->count;i++)
{
for(j=0;j<iteration_arr[i].x_count;j++)
{
if(buf[j+11]==iteration_arr[i].iteration_name[j])
flag2=1;
else
{
flag2=0;
break;
}
}
if(flag2==1)
{
for(i=0;i<27;i++)
printf("%c",str[i]);
printf("\n");
break;
}
}
}
}
if((nodeobj->buffer_filled) == ((nodeobj->buff_size) -1))
pthread_cond_signal(&(nodeobj->full));
pthread_mutex_unlock(&(nodeobj->lock));
if(nodeobj->calender_count==nodeobj->valid_value)
break;
}
if(nodeobj->time_count==0)
{
for(i=0;i<27;i++)
printf("%c",tag[i]);
printf("\n");
}
}
else if (b > 0)
{
wait(NULL);
wait(NULL);
}
}
/*if(nodeobj->time_count==0)
{
for(i=0;i<27;i++)
printf("%c",tag[i]);
wait(NULL);*/
return 0;
//wait(NULL);;
}
|
the_stack_data/92326598.c
|
// --------------- VARDROID PROJECT - PERT ----------------
/*
*
* Author: Andrea Bartolini
*
* Modified by : Pietro Mercati
* email : [email protected]
*
* If using this code for research purposes, include
* references to the following publications
*
* 1) P.Mercati, A. Bartolini, F. Paterna, T. Rosing and L. Benini; A Linux-governor based
* Dynamic Reliability Manager for android mobile devices. DATE 2014.
* 2) P.Mercati, A. Bartolini, F. Paterna, L. Benini and T. Rosing; An On-line Reliability
* Emulation Framework. EUC 2014
*
This file is part of DRM.
DRM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DRM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DRM. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <sched.h>
#include <unistd.h>
#include <string.h>
#include <sys/syscall.h>
#include <pthread.h>
#include <sys/wait.h> //for wait()
#include <errno.h> // for errno
#include <limits.h> // for INT_MAX
#include <stdlib.h> // for strtol
// Macros for ioctl
#define SELECT_BUBBLE 1
#define SELECT_BUBBLE_LENGTH 3
#define READ_JIFFIES 4
#define ODROIDXU3
//#define DEBUG
#ifdef ODROIDXU3
#define NUM_CORES 8
#define NUM_CORE_L 4
#define NUM_F_L 5
#define NUM_F_b 9
#endif
// kfc frequency table (LITTLE cluster)
int freq_L[] = {1400000,1300000,1200000,1100000,1000000};
// cpu frequency table (big cluster)
int freq_b[] = {2000000, 1900000, 1800000, 1700000, 1600000, 1500000, 1400000, 1300000, 1200000};
// /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
// ---------------- MAIN FUNCTION ----------------- //
int main(int argc, char ** argv){
char cmd[100];
int var;
char *p;
int freq_tmp;
int freq_diff;
int freq_max[NUM_CORES];
int i;
int j;
char str[10];
char i_str[5];
if (argc < 2){
printf("please provide the performance degradation due to variability in %\n");
exit(0);
}
var = strtol(argv[1],&p,10);
if (var < 0){
var = 0;
}
//for each core: assign a maximum frequency
for (i = 0 ; i < NUM_CORES ; i++ ){
if (i < NUM_CORE_L){
freq_tmp = freq_L[0] - 0.01*(freq_L[0]*var);
freq_max[i] = freq_L[NUM_F_L-1];
for(j = 0 ; j < NUM_F_L ; j++ ){
freq_diff = freq_L[j] - freq_tmp;
if (freq_diff <= 0){
freq_max[i] = freq_L[j];
break;
}
}
}else{
freq_tmp = freq_b[0] - 0.01*(freq_b[0]*var);
freq_max[i] = freq_b[NUM_F_b-1];
for(j = 0 ; j < NUM_F_b ; j++ ){
freq_diff = freq_b[j] - freq_tmp;
if (freq_diff <= 0){
freq_max[i] = freq_b[j];
break;
}
}
}
}
#ifdef DEBUG
for (i = 0 ; i < NUM_CORES ; i++ ){
printf("freq_max[%d] = %d, freq_tmp = %d, freq_diff = %d\n", i, freq_max[i], freq_tmp, freq_diff);
}
#endif
for (i = 0 ; i < NUM_CORES ; i++ ){
sprintf(str, "%d", freq_max[i]);
sprintf(i_str, "%d", i);
// compose the command
strcpy(cmd, "echo ");
strcat(cmd, str);
strcat(cmd, " > ");
strcat(cmd, "/sys/devices/system/cpu/cpu");
strcat(cmd, i_str);
strcat(cmd,"/cpufreq/scaling_max_freq");
#ifdef DEBUG
printf("CMD = %s\n", cmd);
#endif
// execute the command
system(cmd);
}
return 0;
}
|
the_stack_data/125672.c
|
/*
Fontname: -gnu-Unifont-Medium-R-Normal-Sans-16-160-75-75-c-80-iso10646-1
Copyright: Copyright (C) 2014 Roman Czyborra, Paul Hardy, Qianqian Fang, Andrew Miller, et al. Licensed under the GNU General Public License; either version 2, or (at your option) a later version, with the GNU Font Embedding Exception.
Glyphs: 2446/57086
BBX Build Mode: 0
*/
#ifdef U8G2_USE_LARGE_FONTS
const uint8_t u8g2_font_unifont_t_korean2[70703] U8G2_FONT_SECTION("u8g2_font_unifont_t_korean2") =
"\216\0\4\3\5\5\4\5\6\20\20\0\376\12\376\13\377\1\276\3x\5R \6\0\240G\1!\10A"
"\61D\341B\0\42\11\205(F!F\233\0#\16F%D%O.B\262\70\311\23\0$\24G%"
"D'\250\42$D$hl(D$EQ\14\0%\31G%DCF$\42ID\210DTXT"
"\204HDHD\22\31\11\0&\26G%De&IL\212 \241\210\20\231\10\241\210\30\221\221\0'"
"\7\201\60F\201\0(\16\203\355C%\42$\42$oBb\2)\17\203\351C!&$&$/B"
"\42B\0*\17\347dD'I\212lf\42\62I\23\3+\14\347dD',\315MX\32\0,\12"
"\202\254CA\42B\2\0-\7$(E\201\0.\7B,D\201\0/\16F%D+Q\252\240\250"
"\240TQ\0\60\20F%DE&$\42H\217\42BbD\0\61\14E)D%F$\42(\237\24"
"\62\20F%D\203\42H(*F&(U\224\1\63\22F%D\203\42H(*d,JH(\202"
"\2\0\64\23F%D)H&\42$ELDL\204QT\12\0\65\17F%D\341*UYT\224"
"P\4\5\0\66\20F%De$(*\252\42H\243\10\12\0\67\15F%D\301*QT\242\250L"
"\0\70\20F%D\203\42HQ\4E\220F\21\24\0\71\17F%D\203\42HQDUF!#\0"
":\10\342lD\201\214\0;\13\42\355C\201L\42B\2\0<\11%)D)&W\71=\11\246\244"
"D\301\36\306\0>\12%%D!*\67\71\2\77\20F%D\203\42H(*(UlT\10\0@"
"\26F%De$F$B\42b\42D\42D\42Dd\42\214\0A\17F%DE&$\213 \241"
"\203 \215\2B\16F%D\241\42H\221E\220F\26\0C\16F%D\203\42HU\216\204\42(\0"
"D\16F%D\201$&\42H\337D\220\0E\14F%D\341*UETV\6F\14F%D\341"
"*UET\256\0G\17F%D\203\42HU\22\42\65\22\23\1H\14F%D!H\243\203 \35"
"\5I\12E)D\241$(\77)J\17G%D\245(,ObBbbf\0K\25F%D!"
"H&\42$E\214\220PDLH\232\210\240\0L\11F%D!*\177eM\16F%D!Hh"
"\204dBG\32\5N\24F%D!hfF\42D\42D$B$BfQ\0O\14F%D\203"
"\42H\77\212\240\0P\15F%D\241\42H\221ET\256\0Q\32g\345C\203$(\42(\42(\42"
"(\42(\42(\42B\42BD\204N\0R\22F%D\241\42H\221EH\232\210\230\210 \241\0S"
"\16F%D\203\42H\231FB\21\24\0T\12G%D\341&,\177\3U\13F%D!H\177\24"
"A\1V\25G%D!JUDLHLHL\212\240\210\250\260\30\0W\16F%D!H\27Z"
"\214\220\14\11\5X\22F%D!H(\42$\33!\231\220,\202\204\2Y\21G%D!J*\42"
"&$&ETXn\0Z\13F%D\301*Q^E\31[\12\203\361C\201$\377d\0\134\16F"
"%D!*,UXTX\252\0]\12\203\345Ca$\377\204\0^\13fdFE&$\42(\0"
"_\7'\344C\341\0`\10c\250F!&\1a\17\6%D\203\42(*\302H\215\304D\0b\20"
"f%D!*\213\11\31!\215f$&\0c\15\6%D\203\42H*G\21\24\0d\16f%D"
"+\213\11\231!\335HL\4e\17\6%D\203\42H\350 *Q\4\5\0f\15e%DG$("
"IIP\236\0g\26f\245C+bB&\42&\42&d&\212\42H(\202\2\0h\15f%D"
"!*\213\11\31!=\12i\13e)D%(P(\237\24j\15\245\245C)\241P>\22\11\21\1"
"k\24f%D!*\233\210\220\24\61B\21\61!i\42\202\2l\12e)DC(\377\244\0m\26"
"\7%DaB\42$D$D$D$D$D$D$\1n\14\6%D!bBFH\217\2"
"o\14\6%D\203\42H\217\42(\0p\21F\245C!bBFH\243\31\211\211\250(\0q\16F"
"\245CcBfH\67\22\23Q\11r\15\6%D!bBFH*W\0s\15\6%D\203\42H"
"L\243\10\12\0t\14E%D%(IIP\256\4u\13\6%D!H\337HL\4v\16\6%"
"D!HQDH\336\10\211\0w\25\7%D!J$D$D$D$D$D$\205\12\0x"
"\22\6%D!H(\42$FH&$\42H(\0y\17F\245C!HG\21!*\242RP\0"
"z\12\6%D\301*(\257\14{\21\203\355Cc$&$\42$&$\42$F\0|\7\301\261C"
"\341\1}\22\203\351CA&$\42$&$\42$&d\2\0~\14g$FCF$DF\2\0"
"\177'\20\242\203!\42\277\207\220G \17\61B\21\63\22\21\24\25\22A\21\63\22\21\24\65Ba\217"
"@\36\201<D\376\0\0\0\0\134\255 \13\234\256\315\13B\260\254\14\35\262|\12\67\263\344\12-\266"
"\30\13Z\270d\13\17\272H\13\277\274\34\14&\275\370\14h\300\265\13]\302\17\13\235\304\20\13\354\305"
"\330\14H\307\24\14\210\310I\13o\312\24\13\270\314\304\14/\316\370\13X\321\61\12\370\323\71\13@\325"
"\204\14(\377\377\254\0\34\254\355\203\61\66\306$\60$\60$\60\204(&.&,(*\215Xl\32"
"\0\254\1\31\315\351\203\65\244*,*,*\331H\134\210`p<\314ApN\0\254\4\31\315\351\203"
"\65\244*,*,*\331H\134\210`p\242\340\214\17D\0\254\7\32\315\351\203\65\244*,*,*"
"\331H\134\210`p<\320Yp\342\23\0\254\10\36\315\351\203\65\244*,*,*\331H\134\210`p"
"<\314Ap\324AT\360A\10\0\254\11 \315\351\203\65\244*,*,*\331H\134\210`p<@"
"EYTHUHdHU\10\0\254\12#\315\351\203\65\244*,*,*\331H\134\210`p<@"
"EYDLHELHTLHE\11\0\254\20\36\315\351\203\65\244*,*,*\331H\134\210`"
"p<\320YTXTXT\330\11\0\254\21\36\315\351\203\65\244*,*,*\331H\134\210`p<"
"PTXT\330YT\330\11\0\254\22!\315\351\203\65\244*,*,*\331H\134\210`p<DL"
"PL\242\230\242\230,B*d\2\254\23\34\315\351\203\65\244*,*,*\331H\134\210`p<d"
"pR\211\70\241\10\0\254\24!\315\351\203\65\244*,*,*\331H\134\210`p<\134HdH`"
"D\272\230\210 \21\231\0\254\25\33\315\351\203\65\244*,*,*\331H\134\210`p<\22\263Ta"
"a\66\0\254\26\35\315\351\203\65\244*,*,*\331H\134\210`p<\320ip\250D\234P\10\0"
"\254\27\35\315\351\203\65\244*,*,*\331H\134\210`p<\134\344elD\240\214\10\0\254\31\33"
"\315\351\203\65\244*,*,*\331H\134\210`p<\320Y\360Y\360\11\0\254\32\36\315\351\203\65\244"
"*,*,*\331H\134\210`p<\202\3\261\230\300\230\260\3\21\0\254\33\35\315\351\203\65\244*,"
"*,*\331H\134\210`p<X\340\201X]T\134\21\0\254\34#\254\355\203\61$\60\344$UH"
"\252\220T!D\61!A\61!\61A!\251B\306B\2C\2C\2\254\35\35\313\351\203\61\302&\42"
"(&\42(&\42&h$*b,\42\60\42\374 \64\7\254 \313\351\203\61\302&\42(&\42"
"(&\42&h$*b,\42\60\42\60\42$\64\323\3\1\254$\42\313\351\203\61\302&\42(&\42"
"(&\42&h$*b,\42\60\42\374 \64\346 &\364 \0\254,#\313\351\203\61\302&\42("
"&\42(&\42&h$*b,\42\60\42\36\340(*(*(*\350\0\254-#\313\351\203\61\302"
"&\42(&\42(&\42&h$*b,\42\60\42\36 *(*\350(*\350\0\254/#\315\351"
"\203\61\42\244&\42,&\42,&\42*h(*\42D,\42\64\42\36\64\70\251D\234P\0\254\60"
")\315\351\203\61\42\244&\42,&\42,&\42*h(*\42D,\42\64\42\36.$\62$\60\42"
"]LD\220\210L\0\254\61!\313\351\203\61\302&\42(&\42(&\42&h$*b,\42\60\42"
"\36\270*QTT\5\0\254\70\34\254\355\203\61\66\306$\60$\60\204*$.&.\206&(*\215"
"Xl\32\0\254\71\31\315\351\203\65\244*,*,j&,(\256\60\70\36\346 \70'\0\254<\32"
"\315\351\203\65\244*,*,j&,(\256\60\70\36$\70\343\3\21\0\254@\36\315\351\203\65\244*"
",*,j&,(\256\60\70\36\346 \70\352 *\370 \4\0\254K\34\315\351\203\65\244*,*"
",j&,(\256\60\70\36\62\70\251D\234P\4\0\254M\33\315\351\203\65\244*,*,j&,"
"(\256\60\70\36\211Y\252\260\60\33\0\254T\42\254\355\203\61$\60\344$UH\252\20\252\220D\61!"
"A\61\64A!\251B\306B\2C\2C\2\254X\37\313\351\203\61\302&\42(&\42(f&(\42"
"$\252,\42\60\42\60\42$\64\323\3\1\254\134!\313\351\203\61\302&\42(&\42(f&(\42$"
"\252,\42\60\42\374 \64\346 &\364 \0\254p\25\254\355\203\67\366*\237\20\205\5\205\305\304\205\4"
"N\306&\254q\27\313\351\203\325*(*(*&h$n\60\64\36\364 \64\3\254t\30\313\351\203"
"\325*(*(*&h$n\60\64\36\60\64\351\301\0\254w\30\313\351\203\325*(*(*&h"
"$n\60\64\36\340(\64\351\1\254x\33\313\351\203\325*(*(*&h$n\60\64\374 \64\346"
" &\364 \0\254z\35\313\351\203\325*(*(*&h$n\60\64\266\242(\42\306\42F*\306"
"\242\0\254\200\34\313\351\203\325*(*(*&h$n\60\64\36\340(*(*(*\350\0\254\201"
"\34\313\351\203\325*(*(*&h$n\60\64\36 *(*\350(*\350\0\254\203\30\314\351\203"
"\65\242*\217\202f\342\42\4c\343\341bSJ\204\11\5\254\204!\315\351\203\65\244*,*,*\321"
"P\134\210`p<\134HdH`D\272\230\210 \21\231\0\254\205\33\313\351\203\325*(*(*&"
"h$n\60\64\36\326(,&,\310\2\0\254\206\33\313\351\203\325*(*(*&h$n\60\64"
"\36\340\60\64P\42J(\0\254\211\31\313\351\203\325*(*(*&h$n\60\64\36\340(\364("
"\364\0\254\212\34\313\351\203\325*(*(*&h$n\60\64\36\362@(&,&\350@\0\254\213"
"\33\313\351\203\325*(*(*&h$n\60\64\36$\354@\250*U\11\0\254\214&\254\355\203\63"
"\42\62\342&\42*&\42*&\42*b\42(EP\212\230\250\210\220\260\210\271\210\310\210\310\210\0\254"
"\220\37\313\351\203\61\302&\42(&\42(&\42&d\42$*b,\42\60\42:\64\323\3\1\254\224"
"#\313\351\203\61\302&\42(&\42(&\42&d\42$*b,\42\60\42\374 \64\346 &\364 "
"\0\254\234$\313\351\203\61\302&\42(&\42(&\42&d\42$*b,\42\60\42\36\340(*("
"*(*\350\0\254\235$\313\351\203\61\302&\42(&\42(&\42&d\42$*b,\42\60\42\36"
" *(*\350(*\350\0\254\237$\315\351\203\61\42\244&\42,&\42,&\42*d\42(*\42"
"D,\42\64\42\36\64\70\251D\234P\0\254\240*\315\351\203\61\42\244&\42,&\42,&\42*d"
"\42(*\42D,\42\64\42\36.$\62$\60\42]LD\220\210L\0\254\241\42\313\351\203\61\302&"
"\42(&\42(&\42&d\42$*b,\42\60\42\36\270*QTT\5\0\254\250\26\254\355\203\67"
"\366*'T\211\302\202bh\342B\2'c\23\254\251\27\313\351\203\325*(*(f&,$\252\60"
"\64\36\364 \64\3\254\252\34\313\351\203\325*(*(f&,$\252\60\64\36\256\242(*(*("
"*\0\254\254\27\313\351\203\325*(*(f&,$\252\60\64qh\322\203\1\254\257\30\313\351\203\325"
"*(*(f&,$\252\60\64\36\340(\64\351\1\254\260\33\313\351\203\325*(*(f&,$"
"\252\60\64\374 \64\346 &\364 \0\254\270\34\313\351\203\325*(*(f&,$\252\60\64\36\340"
"(*(*(*\350\0\254\271\34\313\351\203\325*(*(f&,$\252\60\64\36 *(*\350"
"(*\350\0\254\273\31\314\351\203\65\242*\67Ca\61Q\23\202\261\361p\261)%\302\204\2\254\274\42"
"\315\351\203\65\244*,*,f*,(jD\60\70\36.$\62$\60\42]LD\220\210L\0\254"
"\275\33\313\351\203\325*(*(f&,$\252\60\64\36\326(,&,\310\2\0\254\301\31\313\351\203"
"\325*(*(f&,$\252\60\64\36\340(\364(\364\0\254\304'\254\355\203\63\42\62\342&\42*"
"&\42*b\42*&\42(EP\310DLTDHX\304\134DdDdD\0\254\310!\313\351\203"
"\61\302&\42(&\42(b\42&(\42$fb,\42\60\42\60\42$\64\323\3\1\254\314#\313\351"
"\203\61\302&\42(&\42(b\42&(\42$fb,\42\60\42\374 \64\346 &\364 \0\254\325"
"$\313\351\203\61\302&\42(&\42(b\42&(\42$fb,\42\60\42\36 *(*\350(*"
"\350\0\254\327$\315\351\203\61\42\244&\42,&\42,b\42*(\42(f\42D,\42\64\42\36\64"
"\70\251D\234P\0\254\340\20M%\204\343`\70wAq\301\351\16\14\254\341\24\255\345\203\345@\70\303"
"\230\300\260\3{\200\3\341\234\0\254\344\25\255\345\203\345@\70\303\230\300\260\3{\350\340\304\7\42\0\254"
"\347\27\255\345\203\345@\70\303\230\300\260\3{\200\3\241\340\304\7\42\0\254\350\31\255\345\203\345@\70\303"
"\230\300\260\3{\200\3\341\240\3\241\340\3\21\0\254\352\35\255\345\203\345@\70\303\230\300\260\3\363\212\262"
"\210\230\220\212\230\220\250\230\220\212\12\0\254\354\33\255\345\203\345@\70\303\230\300\260\3\363\242\270\240\230\242"
"\230\270\210\220\12\231\0\254\357\33\255\345\203\345@\70\303\230\300\260\3\363\232\300\203\210\222\231\250\230\220\222"
"\21\0\254\360\33\255\345\203\345@\70\303\230\300\260\3{\200\3\241\270\240\270\240\270\240\3\21\0\254\361\33"
"\255\345\203\345@\70\303\230\300\260\3{\200\270\240\270\240\3\241\270\240\3\21\0\254\363\27\255\345\203\345@"
"\70\303\230\300\260\3{$\301\261\21\201\62A\0\254\365\27\255\345\203\345@\70\303\230\300\260\3{\4u"
"QaQqE\0\254\366\27\255\345\203\345@\70\303\230\300\260\3{\4\246\261\21\201\62\61\0\254\374\36"
"\256\345\203\65:\350 \42\66\42\66\42\66\202(&\42.*.*\346@\42:\33\0\254\375\34\316\345"
"\203\67\310&\62&\62f.&,$&,\311\301D<\324AtN\0\255\0\35\316\345\203\67\310&"
"\62&\62f.&,$&,\311\301D<Pt\326\7\42\0\255\4!\316\345\203\67\310&\62&\62"
"f.&,$&,\311\301D<\324At\330AX\364A\10\0\255\6%\316\345\203\67\310&\62&"
"\62f.&,$&,\311\301D<HE]DLLEL\252\230\230\212\22\0\255\14!\316\345\203"
"\67\310&\62&\62f.&,$&,\311\301D<\330]T\134T\134T\334\11\0\255\15!\316\345"
"\203\67\310&\62&\62f.&,$&,\311\301D<XT\134T\334]T\334\11\0\255\17\37\316"
"\345\203\67\310&\62&\62f.&,$&,\311\301D<ltZ\211@\241\10\0\255\21\35\316\345"
"\203\67\310&\62&\62f.&,$&,\311\301D<*\273\260\354l\0\255\30*\256\345\203\65$"
"\64$\342 \42$\60\42$\60\42$\60\202(&\42$(*$(*\344`\42$\64$\64$\64"
"$\0\255\34\36\314\345\203\63\42\304\42]D\272\210\271\210D!\21\211R\34H\244\7\210\315\366@\0"
"\255 !\314\345\203\63\42\304\42]D\272\210\271\210D!\21\211R\34H\244\207\70\210\15:\10\212="
"\10\255)\37\314\345\203\63\42\304\42]D\272\210\271\210D!\21\211R\34H\244\7\211\312\352*\325\1"
"\255,'\316\345\203\63\42\310\42eD\312\210\311\210d!\21\311\202\42B\16\42\322C\206\204\206DF"
"$\214\211\210\22\221\11\255- \314\345\203\63\42\304\42]D\272\210\271\210D!\21\211R\34H\244\7"
"\267\12\13\12\213\262\0\255\64\32\255\345\203\71\305AL`L`L`LPL\242\270\240\270\203\212\340"
"\14\255\65\33\314\345\203\67\304&.&.&.&($&(\354\200\42\36\342 \66\7\255\70\34\314"
"\345\203\67\304&.&.&.&($&(\354\200\42\36 \66\333\3\1\255< \314\345\203\67\304"
"&.&.&.&($&(\354\200\42\36\342 \66\350 (\366 \0\255D\33\314\345\203\67\304"
"&.&.&.&($&(\354\200\42\36\344*_\35\255E\35\314\345\203\67\304&.&.&"
".&($&(\354\200\42\36$*\253\253T\7\255G\37\315\345\203\67\306&\60&\60&\60&*"
"$&*,\342`\42\36\62\70\251D\234P\0\255I\37\314\345\203\67\304&.&.&.&($"
"&(\354\200\42\36\334*,(,\312\2\0\255P\25M%\204\343`\70W\61!Q\61\201\61\201\61"
"Q\7\6\255T\26\255\345\203\345@\70\263\220d!Q\7\366\320\301\211\17D\0\255X\32\255\345\203\345"
"@\70\263\220d!Q\7\366\0\7\302A\7B\301\7\42\0\255a\34\255\345\203\345@\70\263\220d!"
"Q\7\366\0qAqA\7BqA\7\42\0\255c\30\255\345\203\345@\70\263\220d!Q\7\366H"
"\202c#\2e\202\0\255l\17\213\351\203\341@\64\257\17\250B\263\2\255m\23\255\345\203\345@\70{"
"\200\3\263\340\300\3\341\234\0\255p\26\255\345\203\345@\70{\350\3\263\340\300\230\300\340\340\3\21\0\255"
"s\26\255\345\203\345@\70{\200\3\263\340\300\3\241\340\304\7\42\0\255t\30\255\345\203\345@\70{\200"
"\3\263\340\300\3\341\240\3\241\340\3\21\0\255u\32\255\345\203\345@\70{\200\3\263\340\270\212\262\250\220"
"\252\220\310\220\252\10\0\255v\35\255\345\203\345@\70{\200\3\263\340\270\212\262\210\230\220\212\230\220\250\230"
"\220\212\12\0\255{\33\255\345\203\345@\70{\200\3\263\340\270\232\300\203\210\222\231\250\230\220\222\21\0\255"
"|\32\255\345\203\345@\70{\200\3\263\340\300\3\241\270\240\270\240\270\240\3\21\0\255}\32\255\345\203\345"
"@\70{\200\3\263\340\300\270\240\270\240\3\241\270\240\3\21\0\255\177\27\255\345\203\345@\70{\200\3\263"
"\340x\320\340\330\210@\231 \0\255\201\27\255\345\203\345@\70{\200\3\263\340x\300\272\250\260\250\270\42"
"\0\255\202\27\255\345\203\345@\70{\200\3\263\340x@\323\330\210@\231\30\0\255\210\36\314\345\203\67\213"
"\3\211\310\210\310\210\310\210\310\210\330\3\212\240\260\240\220\242\260\240\260\0\255\211\31\354\345\203\67\205QX"
"PXPX\320\1ET\10Uz\350\203\330\14\255\214\32\354\345\203\67\205QXPXPXP\354\1"
"ET\10UNb\323\36\14\255\220\36\354\345\203\67\205QXPXPX\320\1ET\10Uz\210\203"
"\330\240\203\240\330\203\0\255\234%\356\345\203\67:\306(\60(\60(\60(\344`\42.\204.*\36\62"
"$\64$\62\42aLD\224\210L\0\255\235\35\354\345\203\67\205QXPXPX\320\1ET\10U"
"zp\253\260\240\260(\13\0\255\244(\316\345\203\67\42\66\42\66\42\342@\42eD\312\210\224\21)#"
"\322F\34P$\12\213\10\212\241\10\12\213\10\12\213\10\255\267'\355\345\203\63\42\64\42\304$\42.$"
"\42.$\42.$\42\342 \42U\4ETPD<dpR\211\70\241\0\255\300\36\314\345\203\67\213"
"\3\211\310\210\310\210\310\210\310\210\330\3\212\240\260\240\260\240\260\240\260\0\255\301\27\354\345\203\67\205QX"
"PXPX\320\1ET\366\210\16b\63\255\304\32\354\345\203\67\205QXPXPXP\354\1ET"
">\11\14\211\215=\30\255\310\34\354\345\203\67\205QXPXPX\320\1ET\366p\7\261A\7A"
"\261\7\1\255\320\30\354\345\203\67\205QXPXPX\320\1ET\366\200W\371\352\0\255\321\31\354\345"
"\203\67\205QXPXPX\320\1ET\366\200QY]\245:\255\323\36\355\345\203\67\70\304(.("
".(.(\342`\42,*,\36ApR\211\70\241\0\255\334\26\215\345\203\343@\70\357!\16\214b"
"\2c\2c\2c\202\0\255\340\31\255\345\203\345@\70{\350\3\243\230\300\230\260\210\230\260\340\340\3\21"
"\0\255\344\32\255\345\203\345@\70{\200\3\243\230\300\230\260\3\341\240\3\241\340\3\21\0\255\370\15\15\245"
"\204\343`\70\357\1\16\14\255\371\22\255\345\203\345@\70\367\0\7\366\0\7\302\71\1\255\374\23\255\345\203"
"\345@\70\367\0\7\366\320\301\211\17D\0\255\377\25\255\345\203\345@\70\367\0\7\366\0\7B\301\211\17"
"D\0\256\0\27\255\345\203\345@\70\367\0\7\366\0\7\302A\7B\301\7\42\0\256\1\30\255\345\203\345"
"@\70\367\0\7\346\25eQ!U!\221!U\21\0\256\10\31\255\345\203\345@\70\367\0\7\366\0\7"
"BqAqAqA\7\42\0\256\11\31\255\345\203\345@\70\367\0\7\366\0qAqA\7BqA"
"\7\42\0\256\13\25\255\345\203\345@\70\367\0\7\366H\202c#\2e\202\0\256\15\25\255\345\203\345@"
"\70\367\0\7\366\10\352\242\302\242\342\212\0\256\24\30\254\345\203\67\305AH`H`H`H`Hl"
"\354\1El\6\256\60\27\252\355\203\63\362&*&*&*&(\67Q!as\221\11\256\61\27\313"
"\351\203\325*(*(*&,$n\60\64\36\364 \64\3\256\64\27\313\351\203\325*(*(*&"
",$n\60\64qh\322\203\1\256\67\30\313\351\203\325*(*(*&,$n\60\64\36\340(\64"
"\351\1\256\70\33\313\351\203\325*(*(*&,$n\60\64\374 \64\346 &\364 \0\256:\35"
"\313\351\203\325*(*(*&,$n\60\64\266\242(\42\306\42F*\306\242\0\256@\34\313\351\203"
"\325*(*(*&,$n\60\64\36\340(*(*(*\350\0\256A\34\313\351\203\325*(*"
"(*&,$n\60\64\36 *(*\350(*\350\0\256C\30\314\351\203\65\242*\217\302b\342\42"
"\4c\343\341bSJ\204\11\5\256E\33\313\351\203\325*(*(*&,$n\60\64\36\326(,"
"&,\310\2\0\256F\33\313\351\203\325*(*(*&,$n\60\64\36\340\60\64P\42J(\0"
"\256J\34\313\351\203\325*(*(*&,$n\60\64\36\362@(&,&\350@\0\256L!\256"
"\345\203\65:\206b$,&$,&$,&\204$&UL\242\230\240\230Ta\251\323\0\256M\37"
"\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<\334AxN\0\256N$\317"
"\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<\242\212\302\250\300\250\300\250\20\0"
"\256P\37\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx\262\360\314\17D\0\256"
"T$\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<\334Ax\334A\134\370"
"A\10\0\256V)\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<PEa"
"DLPELPTLPE\11\0\256\134$\317\341\203\71\204\202&*(&*(&*(f$"
"(\211\214Tx<\340aT`T`T\340\11\0\256]$\317\341\203\71\204\202&*(&*(&"
"*(f$(\211\214Tx<`T`T\340aT\340\11\0\256_\42\317\341\203\71\204\202&*("
"&*(&*(f$(\211\214Tx<txb\211H\241\10\0\256`'\317\341\203\71\204\202&"
"*(&*(&*(f$(\211\214Tx<lHlHhD\312\230\210\60\21\231\0\256a\42"
"\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<B\303\260\270\260@\33\0\256"
"e!\317\341\203\71\204\202&*(&*(&*(f$(\211\214Tx<\340a\370a\370\11\0"
"\256h'\256\345\203\65$\64\244b$M\222\64I\322$!\211I\222&IDLP\210LTHL"
"XHhHhH\0\256i!\315\341\203\65\242\202\42MPD\232\240\210\64A\21#A!\21\63\62"
"\21\241\21\361\60\7\301\71\256l#\315\341\203\65\242\202\42MPD\232\240\210\64A\21#A!\21\63"
"\62\21\241\21\241\21A\301\31\37\10\256p&\315\341\203\65\242\202\42MPD\232\240\210\64A\21#A"
"!\21\63\62\21\241\21\361\60\7\301Q\7Q\301\7\1\256x&\315\341\203\65\242\202\42MPD\232\240"
"\210\64A\21#A!\21\63\62\21\241\21\361@gQaQaQa\7\256y&\315\341\203\65\242\202"
"\42MPD\232\240\210\64A\21#A!\21\63\62\21\241\21\361@QaQagQa\7\256{$"
"\317\341\203\65\42\204\202\42UPD\252\240\210TA\21CI\42Bdd\42\202#\342\301\63\226\210\24"
"\12\256|+\317\341\203\65\42\204\202\42UPD\252\240\210TA\21CI\42Bdd\42\202#\342a"
"CbCB#R\306D\204\211\310\4\256}%\315\341\203\65\242\202\42MPD\232\240\210\64A\21#"
"A!\21\63\62\21\241\21\361h\352\242\302\242\342*\0\256\204!\256\345\203\65:\206b$,&$,"
"&\204&ITL\252\230\30\212\230\240\230Ta\251\323\0\256\205\36\317\341\203\71\204\202&*(&*"
"(f&(&(Q\215Tx<\334AxN\0\256\214#\317\341\203\71\204\202&*(&*(f"
"&(&(Q\215Tx<\334Ax\334A\134\370A\10\0\256\274\37\256\345\203;\272b*&UL"
"\252\230$$\61a!\61a\21\61q\62\201\61\221\321\11\256\275\32\315\341\203\271\202&QL\242\230D"
"\21#AA\63R\301\361(\16\202\63\256\276\37\315\341\203\271\202&QL\242\230D\21#AA\63R"
"\301\361\320\25eQaQaQ\1\256\300\33\315\341\203\271\202&QL\242\230D\21#AA\63R\301"
"\361\340\301\211\17\6\256\304\37\315\341\203\271\202&QL\242\230D\21#AA\63R\301\361\60\7\301Q"
"\7Q\301\7\1\256\314\37\315\341\203\271\202&QL\242\230D\21#AA\63R\301\361@gQaQ"
"aQa\7\256\315\37\315\341\203\271\202&QL\242\230D\21#AA\63R\301\361@QaQag"
"Qa\7\256\317\35\316\341\203\71\202MP\232\240\64A)f\202R\310HE\307\303F\247\225\10\24\12"
"\256\320&\317\341\203\71\204\202&*(&*(&*(b(\23\31\251\360x\330\220\330\220\320\210\224"
"\61\21a\42\62\1\256\321\35\315\341\203\271\202&QL\242\230D\21#AA\63R\301\361H\314R\205"
"\205Y\0\256\330*\256\345\203\67\42\66\242b&\42&\213\230,bRL\204\304\4E\204\304\4E\244"
"\211\212\220\11\213\210\211\213\210\215\210\215\10\256\331!\315\341\203\65\242\202\42MPD\232\240\210\64A\23"
"!A!\21\63\62\21\241\21\361\60\7\301\71\256\334\42\315\341\203\65\242\202\42MPD\232\240\210\64A"
"\23!A!\21\63\62\21\241\21\361 \301\31\37\10\256\350&\315\341\203\65\242\202\42MPD\232\240\210"
"\64A\23!A!\21\63\62\21\241\21\361@gQaQaQa\7\256\353$\317\341\203\65\42\204\202"
"\42UPD\252\240\210TA\23AI\42Bdd\42\202#\342\301\63\226\210\24\12\256\355%\315\341\203"
"\65\242\202\42MPD\232\240\210\64A\23!A!\21\63\62\21\241\21\361h\352\242\302\242\342*\0\256"
"\364\37\256\345\203;\272b*&UL\22\232T!\61a!\61\61\24\61q\62\201\61\221\321\11\256\370"
"\34\315\341\203\271\202&QL\242\210\231\240\230\220\240\220\32\251\340\364\20\301\211\17\6\256\374 \315\341\203"
"\271\202&QL\242\210\231\240\230\220\240\220\32\251\340x\230\203\340\250\203\250\340\203\0\257\7\35\316\341\203"
"\71\202MP\232\240\24Ci\22\205L\310HE\307\303F\247\225\10\24\12\257\10'\317\341\203\71\204\202"
"&*(&*(b*(&(\311\210\214Tx<lHlHhD\312\230\210\60\21\231\0\257\15"
"\35\315\341\203\271\202&QL\242\210\231\240\230\220\240\220\32\251\340x\240\263\340\263\340\3\257\20*\256\345"
"\203\67\42\66\242b&\42&\213\230\24\23\61Y\204\304\4E\204\304\204L\244\211\212\220\11\213\210\211\213"
"\210\215\210\215\10\257,\25M%\204\243YTXTXTXT<Tp\262\3\3\257-\27\255\345\203"
"\243YTXTXT\134p\330\201=\300\201pN\0\257\60\30\255\345\203\243YTXTXT\134p"
"\330\201=tp\342\3\21\0\257\62\36\255\345\203\243YTXTXT\134p\330\201y\134P\320E\330"
"LTLH\311\10\0\257\64\34\255\345\203\243YTXTXT\134p\330\201=\300\201p\320\201P\360"
"\201\10\0\257<\36\255\345\203\243YTXTXT\134p\330\201=\300\201P\134P\134P\134\320\201\10"
"\0\257=\36\255\345\203\243YTXTXT\134p\330\201=@\134P\134\320\201P\134\320\201\10\0\257"
"\77\32\255\345\203\243YTXTXT\134p\330\201=\222\340\330\210@\231 \0\257A\32\255\345\203\243"
"YTXTXT\134p\330\201=\202\272\250\260\250\270\42\0\257B\32\255\345\203\243YTXTXT"
"\134p\330\201=\2\323\330\210@\231\30\0\257C\33\255\345\203\243YTXTXT\134p\330\201=T"
"\244ilD\240L\14\0\257H\42\316\345\203\65:\15\5EXPDXPDXP\4MPDt"
"\134T\134T\314\201Dt\32\0\257I\42\317\341\203\71\204\202&*(&*(f&(&*\42$"
"&.,\346`\42\36\356 <'\0\257P'\317\341\203\71\204\202&*(&*(f&(&*"
"\42$&.,\346`\42\36\356 <\356 .\374 \4\0\257\134*\317\341\203\71\204\202&*(&"
"*(f&(&*\42$&.,\346`\42\36\66$\66$\64\42eLD\230\210L\0\257]%"
"\317\341\203\71\204\202&*(&*(f&(&*\42$&.,\346`\42\36\241aX\134X\240"
"\15\0\257d.\316\345\203\65$\64$\64\244\202\42$&(\42$&(\42$&(\202&(\42$"
"\64$(*$(*\344`\42$\64$\64$\0\257e#\315\341\203\65\242\202\42MPD\232\240\210"
"\231\240\210\64\21!\21\251\202\42\42\16\42\322\303\34\4\347\0\257y%\315\341\203\65\242\202\42MPD"
"\232\240\210\231\240\210\64\21!\21\251\202\42\42\16\42\322#\61K\25\26f\1\257\200\37\314\345\203\67m"
"\5ILPHLPHLPHLPHlPXP\330\1El\2\257\204\35\315\341\203\271\202&"
"QL\242\230D\61)Bb\242\302\42\16&\342A\202\63>\20\257\210!\315\341\203\271\202&QL\242"
"\230D\61)Bb\242\302\42\16&\342a\16\202\243\16\242\202\17\2\257\220!\315\341\203\271\202&QL"
"\242\230D\61)Bb\242\302\42\16&\342\201\316\242\302\242\302\242\302\16\257\221!\315\341\203\271\202&Q"
"L\242\230D\61)Bb\242\302\42\16&\342\201\242\302\242\302\316\242\302\16\257\225\37\315\341\203\271\202&"
"QL\242\230D\61)Bb\242\302\42\16&\342\221\230\245\12\13\263\0\257\234\31M%\204\243YTX"
"TXTXT\232\300\230\300\230\300\230\240\3\3\257\270\20l\345\203\241\242*\177~@\26\233\25\0\257"
"\271\26\255\345\203\243YTXTXT\370\201Yp\340\201pN\0\257\274\32\255\345\203\243YTXT"
"XT<\360\201Yp`L`p\360\201\10\0\257\300\33\255\345\203\243YTXTXT\370\201Yp"
"\340\201p\320\201P\360\201\10\0\257\307\36\255\345\203\243YTXTXT\370\201Yp\134M\340AD"
"\311LTLH\311\10\0\257\310\35\255\345\203\243YTXTXT\370\201Yp\340\201P\134P\134P"
"\134\320\201\10\0\257\311\35\255\345\203\243YTXTXT\370\201Yp`\134P\134\320\201P\134\320\201"
"\10\0\257\313\32\255\345\203\243YTXTXT\370\201Yp<hplD\240L\20\0\257\315\32\255"
"\345\203\243YTXTXT\370\201Yp<`]TXT\134\21\0\257\316\32\255\345\203\243YTX"
"TXT\370\201Yp<\240ilD\240L\14\0\257\324 \314\345\203\67m\5ILPHLPH"
"LPHl\354\1EPXPHQXPX\0\257\334!\355\341\203\71\270\202&QL\242\230D\61"
"\21\7\23a!dQ\361\60\7\301Q\7Q\301\7\1\257\350)\357\341\203\71<\204\202&*(&*"
"(&*(&\346`\42\60\204\60*\36\66$\66$\64\42eLD\230\210L\0\257\351\37\355\341\203"
"\71\270\202&QL\242\230D\61\21\7\23a!dQ\361H\314R\205\205Y\0\257\360.\316\345\203\67"
"\42\66\42\66\242\202$\42&($\42&($\42&($\42\66\42\66\342\200\42QXDP\14E"
"PXDPXD\0\257\361$\355\341\203\65\42\64\242\202\42MPD\232\240\210\64A\21)\16\42R"
"EPD\5E\304\243\70\10\316\0\257\364,\355\341\203\65\42\64\242\202\42MPD\232\240\210\64A\21"
"I#\42\16\42R\5EDEPD\5E\304D\4E\304\4\7\37\14\257\370(\355\341\203\65\42\64"
"\242\202\42MPD\232\240\210\64A\21)\16\42REPD\5E\304\303\34\4G\35D\5\37\4\260"
"\0(\355\341\203\65\42\64\242\202\42MPD\232\240\210\64A\21)\16\42REPD\5E\304\3\235"
"E\205E\205E\205\35\260\1(\355\341\203\65\42\64\242\202\42MPD\232\240\210\64A\21)\16\42R"
"EPD\5E\304\3E\205E\205\235E\205\35\260\4-\357\341\203\65\42\70\42\204\202\42UPD\252"
"\240\210TA\21i\16\42\322EP\304\5E\304\303\206\304\206\204F\244\214\211\10\23\221\11\260\14 \314"
"\345\203\67m\5ILPHLPHLPHl\354\1EPXPXPXPX\0\260\20!\355"
"\341\203\71\270\202&QL\242\230D\61\301\21\7\23aQaQaQ\61\201\61\301\301\7\3\260\24 "
"\355\341\203\71\270\202&QL\242\230D\61\21\7\23aQa\361\220\7\301Q\7Q\301\7\1\260\34 "
"\355\341\203\71\270\202&QL\242\230D\61\21\7\23aQa\361\240gQaQaQa\7\260\35 "
"\355\341\203\71\270\202&QL\242\230D\61\21\7\23aQa\361\240QaQagQa\7\260(\35"
"m\345\203\241\242,*,*,*,*\36\340\300(&\60&\60&\60&\10\0\260D\23\15\245\204"
"\243YTXTXTXT<\360\201\1\260E\26\255\345\203\243YTXTXT<\360\201=\300\201"
"pN\0\260H\27\255\345\203\243YTXTXT<\360\201=tp\342\3\21\0\260J\35\255\345\203"
"\243YTXTXT<\360\201y\134P\320E\330LTLH\311\10\0\260L\33\255\345\203\243YT"
"XTXT<\360\201=\300\201p\320\201P\360\201\10\0\260N\37\255\345\203\243YTXTXT<"
"\360\201yEYDLHELHTLHE\5\0\260S\35\255\345\203\243YTXTXT<\360"
"\201yM\340AD\311LTLH\311\10\0\260T\35\255\345\203\243YTXTXT<\360\201=\300"
"\201P\134P\134P\134\320\201\10\0\260U\35\255\345\203\243YTXTXT<\360\201=@\134P\134"
"\320\201P\134\320\201\10\0\260W\31\255\345\203\243YTXTXT<\360\201=\222\340\330\210@\231 "
"\0\260Y\31\255\345\203\243YTXTXT<\360\201=\202\272\250\260\250\270\42\0\260]\33\255\345\203"
"\243YTXTXT<\360\201=\300\201P\360\201P\360\201\10\0\260|\32\254\345\203\67\266b&\377"
"ILPHLPDL\224LXL\134l\2\260}\32\315\341\203\271\202&QL\242\230D\61!A"
"A\63R\301\361(\16\202\63\260\200\33\315\341\203\271\202&QL\242\230D\61!AA\63R\301\351!"
"\202\23\37\14\260\204\37\315\341\203\271\202&QL\242\230D\61!AA\63R\301\361\60\7\301Q\7Q"
"\301\7\1\260\214\37\315\341\203\271\202&QL\242\230D\61!AA\63R\301\361@gQaQaQ"
"a\7\260\215\37\315\341\203\271\202&QL\242\230D\61!AA\63R\301\361@QaQagQa"
"\7\260\217\34\316\341\203\71\202MP\232\240\64Ai\22\245\220\221\212\216\207\215N+\21(\24\260\221\35"
"\315\341\203\271\202&QL\242\230D\61!AA\63R\301\361H\314R\205\205Y\0\260\230\31\256\345\203"
"\65:MdLdLdeLdLd\314AHt\66\0\260\231\27\316\345\203\67:IhH(i"
"Hh\210U<\324AtN\0\260\232\33\316\345\203\67:IhH(iHh\210U<\212vQq"
"QqQ!\0\260\234\30\316\345\203\67:IhH(iHh\210UtTt\326\7\42\0\260\237\30"
"\316\345\203\67:IhH(iHh\210U<\330]t\352\23\0\260\240\34\316\345\203\67:IhH"
"(iHh\210U<\324At\330AX\364A\10\0\260\241\36\316\345\203\67:IhH(iHh"
"\210U<HE]TLULdLU\10\0\260\242 \316\345\203\67:IhH(iHh\210U"
"<HE]DLLEL\252\230\230\212\22\0\260\250\34\316\345\203\67:IhH(iHh\210U"
"<\330]T\134T\134T\334\11\0\260\251\34\316\345\203\67:IhH(iHh\210U<XT\134"
"T\334]T\334\11\0\260\253\32\316\345\203\67:IhH(iHh\210U<ltZ\211@\241\10"
"\0\260\254\37\316\345\203\67:IhH(iHh\210U<dHhHdD\302\230\210(\21\231\0"
"\260\255\30\316\345\203\67:IhH(iHh\210U<*\273\260\354l\0\260\256\33\316\345\203\67:"
"IhH(iHh\210U<\330mt\254D\240P\10\0\260\257\33\316\345\203\67:IhH(i"
"Hh\210U<d\350ipD\244\214\10\0\260\261\31\316\345\203\67:IhH(iHh\210U<"
"\330]\364]\364\11\0\260\263\33\316\345\203\67:IhH(iHh\210U<`\344\201\134aT`"
"\21\0\260\264 \256\345\203\65$\64$\64D\62D\62D\262\62D\62D\62\344@$iHhHh"
"H\0\260\265\32\314\345\203\63\42\62\42\62B\60B\220\60B\60\342&\42\36\342 \66\7\260\270\34\314"
"\345\203\63\42\62\42\62B\60B\220\60B\60\342&\42\62\42&\66\333\3\1\260\274\37\314\345\203\63\42"
"\62\42\62B\60B\220\60B\60\342&\42\36\342 \66\350 (\366 \0\260\304\32\314\345\203\63\42\62"
"\42\62B\60B\220\60B\60\342&\42\36\344*_\35\260\305\34\314\345\203\63\42\62\42\62B\60B\220"
"\60B\60\342&\42\36$*\253\253T\7\260\307\42\316\345\203\63\42\66\42\66\42$\60\42$p$\60"
"\42$\60\42\304&\42\36\70:\255D\240P\0\260\310(\316\345\203\63\42\66\42\66\42$\60\42$p"
"$\60\42$\60\42\304&\42\36\62$\64$\62\42aLD\224\210L\0\260\311\34\314\345\203\63\42\62"
"\42\62B\60B\220\60B\60\342&\42\36AYTf\25\0\260\320\30\256\345\203\65:MdLde"
"LdLde\314AHt\66\0\260\321\26\316\345\203\67:I(iH(i\210U<\324AtN"
"\0\260\324\27\316\345\203\67:I(iH(i\210U<Pt\326\7\42\0\260\330\33\316\345\203\67:"
"I(iH(i\210U<\324At\330AX\364A\10\0\260\340\33\316\345\203\67:I(iH("
"i\210U<\330]T\134T\134T\334\11\0\260\345\27\316\345\203\67:I(iH(i\210U<*"
"\273\260\354l\0\261\10\20\256\345\203;\265\260\312b\305\7R\321\31\261\11\22\314\345\203\67\255\250 \251"
"\350U<\364Al\6\261\13\36\316\345\203\67:IhH\340HhHh\210U<\222\242\300\240\300\230"
"\210\270\10\231\0\261\14\22\314\345\203\67\255\250 \251\350U<l\266\7\3\261\20\27\314\345\203\67\255\250"
" \251\350U<\304Al\320AP\354A\0\261\22\32\314\345\203\67\255\250 \251\350UtEUDL"
"DELDTLD\3\261\23\31\314\345\203\67\255\250 \251\350UtELTDLD\213\250\230\210"
"\6\261\30\22\314\345\203\67\255\250 \251\350U<\310U\276:\261\31\24\314\345\203\67\255\250 \251\350U"
"<HTVW\251\16\261\33\32\315\345\203\67\70EhD\340DhDh\204U<dpR\211\70\241"
"\0\261\34 \316\345\203\67:IhH\340HhHh\210U<dHhHdD\302\230\210(\21\231"
"\0\261\35\26\314\345\203\67\255\250 \251\350U<\270UXPX\224\5\0\261#\27\314\345\203\67\255\250"
" \251\350U<P\334\201TYTX\11\0\261$\42\256\345\203\67\42\66\42\66B\64B\64BpB"
"\64B\64B\64\342@&\42\66\42\66\42\66\42\0\261%\33\314\345\203\63\42\62\42\62B\60BlB"
"\60B\60\342&\42\36\342 \66\7\261(\34\314\345\203\63\42\62\42\62B\60BlB\60B\60\342&"
"\42\36 \66\333\3\1\261, \314\345\203\63\42\62\42\62B\60BlB\60B\60\342&\42\36\342 "
"\66\350 (\366 \0\261\64\33\314\345\203\63\42\62\42\62B\60BlB\60B\60\342&\42\36\344*"
"_\35\261\65\35\314\345\203\63\42\62\42\62B\60BlB\60B\60\342&\42\36$*\253\253T\7\261"
"\67#\316\345\203\63\42\66\42\66\42$\60\42$l\42$\60\42$\60\42\304&\42\36\70:\255D\240"
"P\0\261\70)\316\345\203\63\42\66\42\66\42$\60\42$l\42$\60\42$\60\42\304&\42\36\62$"
"\64$\62\42aLD\224\210L\0\261\71\35\314\345\203\63\42\62\42\62B\60BlB\60B\60\342&"
"\42\36AYTf\25\0\261@\21\256\345\203;\265\260d\261\312\342\3\251\350\14\261A\22\314\345\203\67"
"\255 \251 \351U<\364Al\6\261D\23\314\345\203\67\255 \251 \351Ulxl\332\203\1\261H"
"\27\314\345\203\67\255 \251 \351U<\304Al\320AP\354A\0\261P\22\314\345\203\67\255 \251 "
"\351U<\310U\276:\261Q\24\314\345\203\67\255 \251 \351U<HTVW\251\16\261T \316\345"
"\203\67:I\340HhH\340Hh\210U<dHhHdD\302\230\210(\21\231\0\261U\26\314\345"
"\203\67\255 \251 \351U<\270UXPX\224\5\0\261X\23\314\345\203\67\255 \251 \351U<\310"
"m\324m\2\261\134\42\256\345\203\67\42\66\42\66B\64BpB\64B\64BpB\64\342@&\42\66"
"\42\66\42\66\42\0\261`\35\314\345\203\63\42\62\42\62BlB\60BlB\60\342&\42\62\42&\66"
"\333\3\1\261x\20\215%\204#\70\307\7\364h\202\223\35\30\261y\24\255\345\203%\70\361\201`p\330"
"\201=\300\201pN\0\261|\25\255\345\203%\70\361\201`p\330\201=tp\342\3\21\0\261\200\31\255"
"\345\203%\70\361\201`p\330\201=\300\201p\320\201P\360\201\10\0\261\202\35\255\345\203%\70\361\201`"
"p\330\201yEYDLHELHTLHE\5\0\261\210\33\255\345\203%\70\361\201`p\330\201"
"=\300\201P\134P\134P\134\320\201\10\0\261\211\33\255\345\203%\70\361\201`p\330\201=@\134P\134"
"\320\201P\134\320\201\10\0\261\213\27\255\345\203%\70\361\201`p\330\201=\222\340\330\210@\231 \0\261"
"\215\27\255\345\203%\70\361\201`p\330\201=\202\272\250\260\250\270\42\0\261\222\31\255\345\203%\70\361\201"
"`p\330\201=\364\201XL`L\330\201\10\0\261\223\30\255\345\203%\70\361\201`p\330\201=P\340"
"\201X]T\134\21\0\261\224\37\316\345\203\65:&\62&\62&\62&\62&\362\240$:.*.*"
"\346@\42:\15\0\261\230\34\316\345\203\67&\62&\62&r\42\62\346&,\311\301D<Pt\326\7"
"\42\0\261\234 \316\345\203\67&\62&\62&r\42\62\346&,\311\301D<\324At\330AX\364A"
"\10\0\261\250#\316\345\203\67&\62&\62&r\42\62\346&,\311\301D<dHhHdD\302\230"
"\210(\21\231\0\261\314\25\314\345\203\67VT\247\7\62\261AaAa\7\24\261\11\261\320\33\314\345\203"
"\67\42\62\42\62\42\62\42\62\342&(\354\200\42\36 \66\333\3\1\261\324\37\314\345\203\67\42\62\42\62"
"\42\62\42\62\342&(\354\200\42\36\342 \66\350 (\366 \0\261\334\32\314\345\203\67\42\62\42\62\42"
"\62\42\62\342&(\354\200\42\36\344*_\35\261\335\34\314\345\203\67\42\62\42\62\42\62\42\62\342&("
"\354\200\42\36$*\253\253T\7\261\337\36\315\345\203\67$\62$\62$\62$\62\344&*,\342`\42"
"\36\62\70\251D\234P\0\261\350\25\215%\204#\70\307\7\364\60\11c\2c\2c\202\16\14\261\351\26"
"\255\345\203%\70\361\201XL`L\320\201=\300\201pN\0\261\354\27\255\345\203%\70\361\201XL`"
"L\320\201=tp\342\3\21\0\261\360\33\255\345\203%\70\361\201XL`L\320\201=\300\201p\320\201"
"P\360\201\10\0\261\371\35\255\345\203%\70\361\201XL`L\320\201=@\134P\134\320\201P\134\320\201"
"\10\0\261\373\31\255\345\203%\70\361\201XL`L\320\201=\222\340\330\210@\231 \0\261\375\31\255\345"
"\203%\70\361\201XL`L\320\201=\202\272\250\260\250\270\42\0\262\4\21\253\351\203!\64\247\7\364p"
"\7T\241Y\1\262\5\24\255\345\203%\70\361\201<\300\201Yp\340\201pN\0\262\10\27\255\345\203%"
"\70\361\201<\364\201Yp`L`p\360\201\10\0\262\13\27\255\345\203%\70\361\201<\300\201Yp\340"
"\201Pp\342\3\21\0\262\14\31\255\345\203%\70\361\201<\300\201Yp\340\201p\320\201P\360\201\10\0"
"\262\24\33\255\345\203%\70\361\201<\300\201Yp\340\201P\134P\134P\134\320\201\10\0\262\25\33\255\345"
"\203%\70\361\201<\300\201Yp`\134P\134\320\201P\134\320\201\10\0\262\27\30\255\345\203%\70\361\201"
"<\300\201Yp<hplD\240L\20\0\262\31\30\255\345\203%\70\361\201<\300\201Yp<`]"
"TXT\134\21\0\262 \31\314\345\203\67VT\323\3\231\330\330\3\212\240\260\240\220\242\260\240\260\0\262"
"\64%\356\345\203\67&\62&\62&\62\346&:\344`\42.\204.*\36\62$\64$\62\42aLD"
"\224\210L\0\262<(\316\345\203\67\42\66B\64B\64B\64B\64\342@&\42\66\42\66\342\200\42Q"
"XDP\14EPXDPXD\0\262X\31\314\345\203\67VT\323\3\231\330\330\3\212\240\260\240\260"
"\240\260\240\260\0\262\134\33\354\345\203\67\42\62\42\62\42\62\342&\66\366\200\42*\237\4\206\304\306\36\14"
"\262`\35\354\345\203\67\42\62\42\62\42\62\342&\366\200\42*{\270\203\330\240\203\240\330\203\0\262h\30"
"\354\345\203\67\42\62\42\62\42\62\342&\366\200\42*{\300\253|u\262i\32\354\345\203\67\42\62\42\62"
"\42\62\342&\366\200\42*{\300\250\254\256R\35\262t\27\255\345\203#\70\307\7\364\300\7F\61\201\61"
"\201\61\201\61A\0\262u\26\255\345\203%\70\361\201<\300\201QL`L\330\201pN\0\262|\33\255"
"\345\203%\70\361\201<\300\201QL`L\330\201p\320\201P\360\201\10\0\262\204\35\255\345\203%\70\361"
"\201<\300\201QL`L\330\201P\134P\134P\134\320\201\10\0\262\205\35\255\345\203%\70\361\201<\300"
"\201QL`LX\134P\134\320\201P\134\320\201\10\0\262\211\32\255\345\203%\70\361\201<\300\201QL"
"`L<X]TXT\134\21\0\262\220\16M\245\204#\70\307\7\364H\17\14\262\221\23\255\345\203%"
"\70\361\201<\364\201=\300\201pN\0\262\224\24\255\345\203%\70\361\201<\364\201=tp\342\3\21\0"
"\262\230\30\255\345\203%\70\361\201<\364\201=\300\201p\320\201P\360\201\10\0\262\231\31\255\345\203%\70"
"\361\201<\364\201yEYTHUHdHU\4\0\262\232\34\255\345\203%\70\361\201<\364\201yE"
"YDLHELHTLHE\5\0\262\240\32\255\345\203%\70\361\201<\364\201=\300\201P\134P"
"\134P\134\320\201\10\0\262\241\32\255\345\203%\70\361\201<\364\201=@\134P\134\320\201P\134\320\201\10"
"\0\262\243\26\255\345\203%\70\361\201<\364\201=\222\340\330\210@\231 \0\262\245\26\255\345\203%\70\361"
"\201<\364\201=\202\272\250\260\250\270\42\0\262\246\26\255\345\203%\70\361\201<\364\201=\2\323\330\210@"
"\231\30\0\262\252\30\255\345\203%\70\361\201<\364\201=\364\201XL`L\330\201\10\0\262\254\22\314\345"
"\203\67VT\247\7\62\261\261\7\24\261\31\262\260\32\314\345\203\67\42\62\42\62\42\62\42\62\342&\366\200"
"\42\36 \66\333\3\1\262\264\36\314\345\203\67\42\62\42\62\42\62\42\62\342&\366\200\42\36\342 \66\350"
" (\366 \0\262\310\16\254\345\203\67\255\250\236\36\310\304f\262\311\20\314\345\203\67\255\250\246W\361\320"
"\7\261\31\262\314\21\314\345\203\67\255\250\246W\261\341\261i\17\6\262\320\25\314\345\203\67\255\250\246W\361"
"\20\7\261A\7A\261\7\1\262\322\30\314\345\203\67\255\250\246W\321\25U\21\61\21\25\61\21Q\61\21"
"\15\262\330\21\314\345\203\67\255\250\246W\361 W\371\352\0\262\331\22\314\345\203\67\255\250\246W\361 Q"
"Y]\245:\262\333\32\315\345\203\67\70EhDhDhDh\204U<dpR\211\70\241\0\262\335"
"\24\314\345\203\67\255\250\246W\361\340VaAaQ\26\0\262\342\25\314\345\203\67\255\250\246W\361\300\7"
"R\61q\61Q\7\2\262\344\32\256\345\203\65:\346 $&\62&\62&\262\62&\62\346 $:\67"
"\0\262\345\30\316\345\203\67:\304*$\64$\224\64\304*:\36\352 :'\0\262\346\34\316\345\203\67"
":\304*$\64$\224\64\304*:\36E\273\250\270\250\270\250\20\0\262\350\30\316\345\203\67:\304*$"
"\64$\224\64\304*:Ut\326\7\42\0\262\353\31\316\345\203\67:\304*$\64$\224\64\304*:\36"
"\354.:\365\11\0\262\354\35\316\345\203\67:\304*$\64$\224\64\304*:\36\352 :\354 ,\372"
" \4\0\262\355\37\316\345\203\67:\304*$\64$\224\64\304*:\36\244\242.*\246*&\62\246*"
"\4\0\262\356!\316\345\203\67:\304*$\64$\224\64\304*:\36\244\242.\42&\246\42&ULL"
"E\11\0\262\357\42\316\345\203\67:\304*$\64$\224\64\304*:\36\244\42&.\42&\246\242&*"
"&\246\242\4\0\262\363!\317\345\203\67<\306*&\64&t\42\64\306*<\36\252(\62\342\244f("
",&\246f\4\0\262\364\35\316\345\203\67:\304*$\64$\224\64\304*:\36\354.*.*.*"
"\356\4\0\262\365\35\316\345\203\67:\304*$\64$\224\64\304*:\36,*.*\356.*\356\4\0"
"\262\367\33\316\345\203\67:\304*$\64$\224\64\304*:\36\66:\255D\240P\4\0\262\370 \316\345"
"\203\67:\304*$\64$\224\64\304*:\36\62$\64$\62\42aLD\224\210L\0\262\371\31\316\345"
"\203\67:\304*$\64$\224\64\304*:\36\225]Xv\66\0\262\372\34\316\345\203\67:\304*$\64"
"$\224\64\304*:\36\354\66:V\42P(\4\0\262\373\34\316\345\203\67:\304*$\64$\224\64\304"
"*:\36\62\364\64\70\42RF\4\0\262\377\34\316\345\203\67:\304*$\64$\224\64\304*:\36\60"
"\362@\256\60*\260\10\0\263\0!\256\345\203\65$\64\344@$D\62D\62D\262\62D\62\344@$"
"iHhHhHhH\0\263\1\32\314\345\203\63\42\62\342&B\60B\220\60\342&\42\62\42\36\342"
" \66\7\263\4\34\314\345\203\63\42\62\342&B\60B\220\60\342&\42\62\42\62\42&\66\333\3\1\263"
"\10\37\314\345\203\63\42\62\342&B\60B\220\60\342&\42\62\42\36\342 \66\350 (\366 \0\263\20"
"\32\314\345\203\63\42\62\342&B\60B\220\60\342&\42\62\42\36\344*_\35\263\21\34\314\345\203\63\42"
"\62\342&B\60B\220\60\342&\42\62\42\36$*\253\253T\7\263\23\42\316\345\203\63\42\66\42\304&"
"\42$\60\42$p$\60\42\304&\42\66\42\36\70:\255D\240P\0\263\24(\316\345\203\63\42\66\42"
"\304&\42$\60\42$p$\60\42\304&\42\66\42\36\62$\64$\62\42aLD\224\210L\0\263\25"
"\34\314\345\203\63\42\62\342&B\60B\220\60\342&\42\62\42\36AYTf\25\0\263\34\31\256\345\203"
"\65:\346 $&\62&\262\62&\62&\362\240$:\67\0\263T\22\256\345\203;\372@JXe\261"
"\360\201Tt\16\263U\23\314\345\203\67\366JT\220\364*\66\36\372 \66\3\263V\23\314\345\203\67\366"
"JT\220\364*\66\36\264\242*\37\263X\23\314\345\203\67\366JT\220\364*\66\36\66\333\203\1\263["
"\24\314\345\203\67\366JT\220\364*\66\36\344*\66\355\1\263\134\30\314\345\203\67\366JT\220\364*\66"
"\36\342 \66\350 (\366 \0\263^\33\314\345\203\67\366JT\220\364*\66\272\242*\42&\242\42&"
"\42*&\242\1\263_\32\314\345\203\67\366JT\220\364*\66\272\42&*\42&\242ETLD\3\263"
"d\23\314\345\203\67\366JT\220\364*\66\36\344*_\35\263e\25\314\345\203\67\366JT\220\364*\66"
"\36$*\253\253T\7\263g\33\315\345\203\67\70\302*\42\64\42p\42\64\302*\70\36\62\70\251D\234"
"P\0\263i\27\314\345\203\67\366JT\220\364*\66\36\334*,(,\312\2\0\263k\27\314\345\203\67"
"\366JT\220\364*\66\36*\360\60\64\42NF\0\263n\30\314\345\203\67\366JT\220\364*\66\36\370"
"@*&.&\352@\0\263p#\256\345\203\67\42\66\342@&B\64B\64BpB\64B\64\342@"
"&\42\66\42\66\42\66\42\66\42\0\263q\33\314\345\203\63\42\62\342&B\60BlB\60\342&\42\62"
"\42\36\342 \66\7\263t\34\314\345\203\63\42\62\342&B\60BlB\60\342&\42\62\42\36 \66\333"
"\3\1\263x \314\345\203\63\42\62\342&B\60BlB\60\342&\42\62\42\36\342 \66\350 (\366"
" \0\263\200\33\314\345\203\63\42\62\342&B\60BlB\60\342&\42\62\42\36\344*_\35\263\201\35"
"\314\345\203\63\42\62\342&B\60BlB\60\342&\42\62\42\36$*\253\253T\7\263\203#\316\345\203"
"\63\42\66\42\304&\42$\60\42$l\42$\60\42\304&\42\66\42\36\70:\255D\240P\0\263\204)"
"\316\345\203\63\42\66\42\304&\42$\60\42$l\42$\60\42\304&\42\66\42\36\62$\64$\62\42a"
"LD\224\210L\0\263\205\35\314\345\203\63\42\62\342&B\60BlB\60\342&\42\62\42\36AYT"
"f\25\0\263\214\22\256\345\203;\372@JX\262X\345AUt\16\263\220\24\314\345\203\67\366J\220T"
"\360@*\66yl\332\203\1\263\224\31\314\345\203\67\366J\220T\360@*\66\36\342 \66\350 (\366"
" \0\263\240!\316\345\203\67:\304*$p$\64$p\304*:\36\62$\64$\62\42aLD\224"
"\210L\0\263\241\30\314\345\203\67\366J\220T\360@*\66\36\334*,(,\312\2\0\263\250#\256\345"
"\203\67\42\66\342@&B\64BpB\64B\64Bp\342@&\42\66\42\66\42\66\42\66\42\0\263\254"
"\35\314\345\203\63\42\62\342&BlB\60Bl\342&\42\62\42\62\42&\66\333\3\1\263\304\22\215%"
"\204\343\200$\70\343\3z\64\301\311\16\14\263\305\26\255\345\203\345@(\70\370@\60\70\354\300\36\340@"
"\70'\0\263\310\27\255\345\203\345@(\70\370@\60\70\354\300\36:\70\361\201\10\0\263\313\31\255\345\203"
"\345@(\70\370@\60\70\354\300\36\340@(\70\361\201\10\0\263\314\33\255\345\203\345@(\70\370@\60"
"\70\354\300\36\340@\70\350@(\370@\4\0\263\316\37\255\345\203\345@(\70\370@\60\70\354\300\274\242"
",\42&\244\42&$*&\244\242\2\0\263\320\35\255\345\203\345@(\70\370@\60\70\354\300\274(."
"(\246(&.\42\244B&\0\263\324\35\255\345\203\345@(\70\370@\60\70\354\300\36\340@(.("
".(.\350@\4\0\263\325\35\255\345\203\345@(\70\370@\60\70\354\300\36 .(.\350@(."
"\350@\4\0\263\327\31\255\345\203\345@(\70\370@\60\70\354\300\36IplD\240L\20\0\263\331\31"
"\255\345\203\345@(\70\370@\60\70\354\300\36A]TXT\134\21\0\263\333\32\255\345\203\345@(\70"
"\370@\60\70\354\300\36*\322\64\66\42P&\6\0\263\335\33\255\345\203\345@(\70\370@\60\70\354\300"
"\36\340@(\370@(\370@\4\0\263\340 \316\345\203\65:\346 $&\62&\62&\62\346 \204\64"
":.*.*\346@\42:\15\0\263\344\31\316\345\203\67\346&eL\344\304MXN\16&\342\201\242"
"\263>\20\1\263\350\35\316\345\203\67\346&eL\344\304MXN\16&\342\241\16\242\303\16\302\242\17B"
"\0\263\374'\316\345\203\65$\64\344@$D\62D\62D\62\344@\204\64$\64$(*$(*\344"
"`\42$\64$\64$\0\264\20(\316\345\203\63\42\346\42M\134DL\334\314E\262\240\210\260\240\210\220"
"\203\210\364\220!\241!\221\21\11c\42\242Dd\2\264\30\27\314\345\203\67\366@FT\351\201Ll\242"
"\260\240\260\3\212\330\4\264\34\33\314\345\203\67\342&\42\62\42\62\342&(,(\354\200\42\36 \66\333"
"\3\1\264 \37\314\345\203\67\342&\42\62\42\62\342&(,(\354\200\42\36\342 \66\350 (\366 "
"\0\264(\32\314\345\203\67\342&\42\62\42\62\342&(,(\354\200\42\36\344*_\35\264)\34\314\345"
"\203\67\342&\42\62\42\62\342&(,(\354\200\42\36$*\253\253T\7\264+\36\315\345\203\67\344&"
"$\62$\62\344&*,*,\342`\42\36\62\70\251D\234P\0\264\64\27\215%\204\343\200$\70\343"
"\3z\230\204\61\201\61\201\61A\7\6\264P\22\253\351\203\341\240\64\323\3z\270\3\252\320\254\0\264Q"
"\26\255\345\203\345@(\70\370@\36\340\300,\70\360@\70'\0\264T\31\255\345\203\345@(\70\370@"
"\36\372\300,\70\60&\60\70\370@\4\0\264X\33\255\345\203\345@(\70\370@\36\340\300,\70\360@"
"\70\350@(\370@\4\0\264`\35\255\345\203\345@(\70\370@\36\340\300,\70\360@(.(.("
".\350@\4\0\264a\35\255\345\203\345@(\70\370@\36\340\300,\70\60.(.\350@(.\350@"
"\4\0\264c\32\255\345\203\345@(\70\370@\36\340\300,\70\36\64\70\66\42P&\10\0\264e\32\255"
"\345\203\345@(\70\370@\36\340\300,\70\36\260.*,*\256\10\0\264l\33\314\345\203\67\366`D"
"T\351\301Hl\354\1EPXPHQXPX\0\264\200$\356\345\203\67\346&eLd\314Mt"
"\310\301D\134\10]T<dHhHdD\302\230\210(\21\231\0\264\210)\316\345\203\67\42\66\342`"
"$B\64B\64B\64\342`$\42\66\42\66\342\200\42QXDP\14EPXDPXD\0\264\235"
"\42\354\345\203\63\42\342\42\273\210t\21\21\27)#\16$\22EP\4\245\210\7\267\12\13\12\213\262\0"
"\264\244\33\314\345\203\67\366`DT\351\301Hl\354\1EPXPXPXPX\0\264\250\33\354\345"
"\203\67\342&\42\62\42\62\342&\66\366\200\42*\237\4\206\304\306\36\14\264\254\35\354\345\203\67\342&\42"
"\62\42\62\342&\366\200\42*{\270\203\330\240\203\240\330\203\0\264\265\32\354\345\203\67\342&\42\62\42\62"
"\342&\366\200\42*{\300\250\254\256R\35\264\267\36\355\345\203\67\344&$\62$\62\344&\70\342`\42"
",*,\36ApR\211\70\241\0\264\271\34\354\345\203\67\342&\42\62\42\62\342&\366\200\42*{T"
"VaAaQ\26\0\264\300\31\255\345\203\343\200$\70\343\3z\340\3\243\230\300\230\300\230\300\230 \0"
"\264\304\34\255\345\203\345@(\70\370@\36\372\300(&\60&,\42&,\70\370@\4\0\264\310\35\255"
"\345\203\345@(\70\370@\36\340\300(&\60&\354@\70\350@(\370@\4\0\264\320\37\255\345\203\345"
"@(\70\370@\36\340\300(&\60&\354@(.(.(.\350@\4\0\264\325\34\255\345\203\345@"
"(\70\370@\36\340\300(&\60&\36\254.*,*\256\10\0\264\334\20M\245\204\343\200$\70\343\3"
"z\244\7\6\264\335\25\255\345\203\345@(\70\370@\36\372\300\36\340@\70'\0\264\340\26\255\345\203\345"
"@(\70\370@\36\372\300\36:\70\361\201\10\0\264\343\30\255\345\203\345@(\70\370@\36\372\300\36\340"
"@(\70\361\201\10\0\264\344\32\255\345\203\345@(\70\370@\36\372\300\36\340@\70\350@(\370@\4"
"\0\264\346\36\255\345\203\345@(\70\370@\36\372\300\274\242,\42&\244\42&$*&\244\242\2\0\264"
"\354\34\255\345\203\345@(\70\370@\36\372\300\36\340@(.(.(.\350@\4\0\264\355\34\255\345"
"\203\345@(\70\370@\36\372\300\36 .(.\350@(.\350@\4\0\264\357\30\255\345\203\345@("
"\70\370@\36\372\300\36IplD\240L\20\0\264\361\30\255\345\203\345@(\70\370@\36\372\300\36A"
"]TXT\134\21\0\264\370\24\314\345\203\67\366@FT\351\201Ll\332\3\212\330\14\265\24\20\254\345"
"\203\67\366@FT\247\7\62\261\71\265\25\22\314\345\203\67\366JT\351Ul<\364Al\6\265\30\22"
"\314\345\203\67\366JT\351Ul\362\330\264\7\3\265\33\23\314\345\203\67\366JT\351Ul<\310Ul"
"\332\3\265\34\27\314\345\203\67\366JT\351Ul<\304Al\320AP\354A\0\265$\22\314\345\203\67"
"\366JT\351Ul<\310U\276:\265%\24\314\345\203\67\366JT\351Ul<HTVW\251\16\265"
"'\33\315\345\203\67\70\302*\42\64\42\64\42\64\302*\70\36\62\70\251D\234P\0\265(!\316\345\203"
"\67:\304*$\64$\64$\64\304*:\36\62$\64$\62\42aLD\224\210L\0\265)\26\314\345"
"\203\67\366JT\351Ul<\270UXPX\224\5\0\265*\26\314\345\203\67\366JT\351Ul<\310"
"el\244D\230P\0\265\60\33\256\345\203\65:\206\202\42&(MP\232\240\240\242\64Ai((\242"
"s\3\265\61\35\316\345\203\67:db($&,$&\214&,db(:\36\352 :'\0\265"
"\64\35\316\345\203\67:db($&,$&\214&,db(:Ut\326\7\42\0\265\70\42\316"
"\345\203\67:db($&,$&\214&,db(:\36\352 :\354 ,\372 \4\0\265@"
"\42\316\345\203\67:db($&,$&\214&,db(:\36\354.*.*.*\356\4\0"
"\265A\42\316\345\203\67:db($&,$&\214&,db(:\36,*.*\356.*\356"
"\4\0\265C \316\345\203\67:db($&,$&\214&,db(:\36\66:\255D\240P"
"\4\0\265D%\316\345\203\67:db($&,$&\214&,db(:\36\62$\64$\62\42"
"aLD\224\210L\0\265E\36\316\345\203\67:db($&,$&\214&,db(:\36\225"
"]Xv\66\0\265K!\316\345\203\67:db($&,$&\214&,db(:\36\60\362@"
"\256\60*\260\10\0\265L#\256\345\203\65$\64\244\202\42D(\211P\22\241\240\242$BI*(B"
"BCBCBCBC\2\265M\37\314\345\203\63\42\62\202b$B&(B&\210&(\202b$"
"\42\62\42\36\342 \66\7\265P!\314\345\203\63\42\62\202b$B&(B&\210&(\202b$\42"
"\62\42\62\42&\66\333\3\1\265T$\314\345\203\63\42\62\202b$B&(B&\210&(\202b$"
"\42\62\42\36\342 \66\350 (\366 \0\265\134\37\314\345\203\63\42\62\202b$B&(B&\210&"
"(\202b$\42\62\42\36\344*_\35\265]!\314\345\203\63\42\62\202b$B&(B&\210&("
"\202b$\42\62\42\36$*\253\253T\7\265_'\316\345\203\63\42\66\42db$\42$&(\42$"
"&h$&(\42db$\42\66\42\36\70:\255D\240P\0\265`-\316\345\203\63\42\66\42db"
"$\42$&(\42$&h$&(\42db$\42\66\42\36\62$\64$\62\42aLD\224\210L"
"\0\265a!\314\345\203\63\42\62\202b$B&(B&\210&(\202b$\42\62\42\36AYTf"
"\25\0\265\240\30\256\345\203;\272\202H(N(N(\250(N(\256\202(:\7\265\241\30\314\345\203"
"\67\226bH&L&\210&\214b(\66\36\372 \66\3\265\244\30\314\345\203\67\226bH&L&\210"
"&\214b(\66\36\66\333\203\1\265\250\35\314\345\203\67\226bH&L&\210&\214b(\66\36\342 "
"\66\350 (\366 \0\265\252 \314\345\203\67\226bH&L&\210&\214b(\66\272\242*\42&\242"
"\42&\42*&\242\1\265\253\37\314\345\203\67\226bH&L&\210&\214b(\66\272\42&*\42&"
"\242ETLD\3\265\260\30\314\345\203\67\226bH&L&\210&\214b(\66\36\344*_\35\265\261"
"\32\314\345\203\67\226bH&L&\210&\214b(\66\36$*\253\253T\7\265\263\36\315\345\203\67\70"
"bQDLXDL\320DLX\304\242\340x\310\340\244\22qB\1\265\264&\316\345\203\67:db"
"($&,$&h$&,db(:\36\62$\64$\62\42aLD\224\210L\0\265\265\34\314"
"\345\203\67\226bH&L&\210&\214b(\66\36\334*,(,\312\2\0\265\273\35\314\345\203\67\226"
"bH&L&\210&\214b(\66\36(\356@\252,*\254\4\0\265\274(\256\345\203\67\42\66\242\202"
"$B(*B(*B(fB(*B(*\242\202$\42\66\42\66\42\66\42\66\42\0\265\275 "
"\314\345\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36\342 \66\7\265\300!"
"\314\345\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36 \66\333\3\1\265\304"
"%\314\345\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36\342 \66\350 ("
"\366 \0\265\314 \314\345\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36\344"
"*_\35\265\315\42\314\345\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36$"
"*\253\253T\7\265\317(\316\345\203\63\42\66\42db$\42$&(\42$&d\42$&(\42d"
"b$\42\66\42\36\70:\255D\240P\0\265\320.\316\345\203\63\42\66\42db$\42$&(\42$"
"&d\42$&(\42db$\42\66\42\36\62$\64$\62\42aLD\224\210L\0\265\321\42\314\345"
"\203\63\42\62\202b$B&(B&dB&(\202b$\42\62\42\36AYTf\25\0\265\330\31"
"\256\345\203;\272\202H(N(\250(N(N(\350 \202(:\7\265\354&\316\345\203\67:db"
"($&h$&,$&hdb(:\36\62$\64$\62\42aLD\224\210L\0\266\20\27\215"
"%\204\243ITXTXTXTXE=\232\340d\7\6\266\21\27\255\345\203\205\202(]P\34\5"
"ap\330\201=\300\201pN\0\266\24\30\255\345\203\205\202(]P\34\5ap\330\201=tp\342\3"
"\21\0\266\30\34\255\345\203\205\202(]P\34\5ap\330\201=\300\201p\320\201P\360\201\10\0\266%"
"\32\255\345\203\205\202(]P\34\5ap\330\201=\202\272\250\260\250\270\42\0\266,\42\316\345\203\65:"
"\206\202\42&(MP\232\240\64AA\7\21\24\321qQqQ\61\7\22\321i\0\266\64\36\316\345\203"
"\67fb&\253\230T\23k\302rr\60\21\17u\20\35v\20\26}\20\2\266H)\316\345\203\65$"
"\64\244\202\42D(\211P\22\241$BA\7\21\24!\241!AQ!AQ!\7\23!\241!\241!"
"\1\266d\35\314\345\203\67\266\202D(J(J(J(\252\202$\66(,(\354\200\42\66\1\266h"
"\35\314\345\203\67bMDLTDLT\304\232\240\260\240\260\3\212x\200\330l\17\4\266\234\30\253\351"
"\203\241\302*(*(*(*\250\242\36\356\200*\64+\0\266\235\27\255\345\203\205\202(]P\34\5"
"=\300\201Yp\340\201pN\0\266\240\32\255\345\203\205\202(]P\34\5=\364\201Yp`L`p"
"\360\201\10\0\266\244\34\255\345\203\205\202(]P\34\5=\300\201Yp\340\201p\320\201P\360\201\10\0"
"\266\253\37\255\345\203\205\202(]P\34\5=\300\201Yp\134M\340AD\311LTLH\311\10\0\266"
"\254\36\255\345\203\205\202(]P\34\5=\300\201Yp\340\201P\134P\134P\134\320\201\10\0\266\261\33"
"\255\345\203\205\202(]P\34\5=\300\201Yp<`]TXT\134\21\0\266\324-\316\345\203\67\242"
"\202$B(*B(*B(*B(*\242\202$\42\66\42\66\342\200\42QXDP\14EPX"
"DPXD\0\266\360 \314\345\203\267\202D(J(J(J(\252\202$\66\366\200\42(,(,"
"(,(,\0\266\364\33\354\345\203\227bH&L&\214b(\66\366\200\42*\237\4\206\304\306\36\14"
"\266\370\35\354\345\203\227bH&L&\214b(\366\200\42*{\270\203\330\240\203\240\330\203\0\267\0\30"
"\354\345\203\227bH&L&\214b(\366\200\42*{\300\253|u\267\1\32\354\345\203\227bH&L"
"&\214b(\366\200\42*{\300\250\254\256R\35\267\5\34\354\345\203\227bH&L&\214b(\366\200"
"\42*{TVaAaQ\26\0\267(\25M\245\204\243ITXTXTXTXE=\322\3\3"
"\267)\26\255\345\203\205\202(]P\34\5=\364\201=\300\201pN\0\267,\27\255\345\203\205\202(]"
"P\34\5=\364\201=tp\342\3\21\0\267/\31\255\345\203\205\202(]P\34\5=\364\201=\300\201"
"Pp\342\3\21\0\267\60\33\255\345\203\205\202(]P\34\5=\364\201=\300\201p\320\201P\360\201\10"
"\0\267\70\35\255\345\203\205\202(]P\34\5=\364\201=\300\201P\134P\134P\134\320\201\10\0\267\71"
"\35\255\345\203\205\202(]P\34\5=\364\201=@\134P\134\320\201P\134\320\201\10\0\267;\31\255\345"
"\203\205\202(]P\34\5=\364\201=\222\340\330\210@\231 \0\267D\32\314\345\203\67\266\202D(J"
"(J(J(\252\202$\66\366\200\42\66\3\267H\33\314\345\203\67bMDLTDLT\304\232\330"
"\330\3\212x\200\330l\17\4\267L\37\314\345\203\67bMDLTDLT\304\232\330\330\3\212x\210"
"\203\330\240\203\240\330\203\0\267T\32\314\345\203\67bMDLTDLT\304\232\330\330\3\212x\220\253"
"|u\267U\34\314\345\203\67bMDLTDLT\304\232\330\330\3\212x\220\250\254\256R\35\267`"
"\30\254\345\203\67\266\202D(J(J(J(J(\252\202$\66\7\267d\30\314\345\203\67\226bH"
"&L&L&\214b(\66yl\332\203\1\267h\35\314\345\203\67\226bH&L&L&\214b("
"\66\36\342 \66\350 (\366 \0\267p\30\314\345\203\67\226bH&L&L&\214b(\66\36\344"
"*_\35\267q\32\314\345\203\67\226bH&L&L&\214b(\66\36$*\253\253T\7\267s\36"
"\315\345\203\67\70bQDLXDLXDLX\304\242\340x\310\340\244\22qB\1\267u\34\314\345"
"\203\67\226bH&L&L&\214b(\66\36\334*,(,\312\2\0\267|\32\255\351\203\63\70\346"
"$\62$\62$\346\244\60&\60&\60\346$\70\33\0\267}\30\315\351\203\65\70\304(.(\304\210\62"
"\304(\70\36\346 \70'\0\267\200\30\315\351\203\65\70\304(.(\304\210\62\304(\70Qp\306\7\42"
"\0\267\204\35\315\351\203\65\70\304(.(\304\210\62\304(\70\36\346 \70\352 *\370 \4\0\267\214"
"\35\315\351\203\65\70\304(.(\304\210\62\304(\70\36\350,*,*,*\354\4\0\267\215\35\315\351"
"\203\65\70\304(.(\304\210\62\304(\70\36(*,*\354,*\354\4\0\267\217\33\315\351\203\65\70"
"\304(.(\304\210\62\304(\70\36\62\70\251D\234P\4\0\267\220 \315\351\203\65\70\304(.(\304"
"\210\62\304(\70\36.$\62$\60\42]LD\220\210L\0\267\221\32\315\351\203\65\70\304(.(\304"
"\210\62\304(\70\36\211Y\252\260\60\33\0\267\222\34\315\351\203\65\70\304(.(\304\210\62\304(\70\36"
"\350\64\70T\42N(\4\0\267\226\35\315\351\203\65\70\304(.(\304\210\62\304(\70\36\301\201XL"
"`L\330\201\10\0\267\227\34\315\351\203\65\70\304(.(\304\210\62\304(\70\36,\360@\254.*\256"
"\10\0\267\230\42\255\351\203\63$\62\344 $YH\262\220\220\203\220\302\20\301\20\301\220\203\220\224!\221"
"!\221!\1\267\231\32\313\351\203\61\42\60\342$\42*$\342\204.\342$\42\60\42\374 \64\7\267\234"
"\35\313\351\203\61\42\60\342$\42*$\342\204.\342$\42\60\42\60\42$\64\323\3\1\267\240\37\313\351"
"\203\61\42\60\342$\42*$\342\204.\342$\42\60\42\374 \64\346 &\364 \0\267\250 \313\351\203"
"\61\42\60\342$\42*$\342\204.\342$\42\60\42\36\340(*(*(*\350\0\267\251 \313\351\203"
"\61\42\60\342$\42*$\342\204.\342$\42\60\42\36 *(*\350(*\350\0\267\253\42\315\351\203"
"\61\42\64\42\304$\42.$\42\304d$.\42\304$\42\64\42\36\64\70\251D\234P\0\267\254(\315"
"\351\203\61\42\64\42\304$\42.$\42\304d$.\42\304$\42\64\42\36.$\62$\60\42]LD"
"\220\210L\0\267\255\36\313\351\203\61\42\60\342$\42*$\342\204.\342$\42\60\42\36\270*QTT"
"\5\0\267\264\32\255\351\203\63\70\346$\62$\62\344\200$&\60&\260\60\346$\70\33\0\267\265\31\315"
"\351\203\65\70\304(.\350@($\362@(\70\36\346 \70'\0\267\270\32\315\351\203\65\70\304(."
"\350@($\362@(\70\36$\70\343\3\21\0\267\307\34\315\351\203\65\70\304(.\350@($\362@"
"(\70\36\62\70\251D\234P\4\0\267\311\33\315\351\203\65\70\304(.\350@($\362@(\70\36\211"
"Y\252\260\60\33\0\267\354\26\255\351\203\71\370 *,*,\352 \244V\355ATp\6\267\355\24\313"
"\351\203\65\364(*\350\204\362(\64\36\364 \64\3\267\360\25\313\351\203\65\364(*\350\204\362(\64\36"
"\60\64\351\301\0\267\364\30\313\351\203\65\364(*\350\204\362(\64\374 \64\346 &\364 \0\267\374\31"
"\313\351\203\65\364(*\350\204\362(\64\36\340(*(*(*\350\0\267\375\31\313\351\203\65\364(*"
"\350\204\362(\64\36 *(*\350(*\350\0\267\377\33\314\351\203\65\66\302(,(\302d\42\62\302"
"(\66\36.\66\245D\230P\0\270\0!\315\351\203\65\70\304(.(\304d$\62\304(\70\36.$"
"\62$\60\42]LD\220\210L\0\270\1\30\313\351\203\65\364(*\350\204\362(\64\36\326(,&,"
"\310\2\0\270\7\30\313\351\203\65\364(*\350\204\362(\64\36$\354@\250*U\11\0\270\10&\255\351"
"\203\65\42\64\342 &\42,&\42,&\342 bB\62B\62B\62\342 &\42\64\42\64\42\64\42"
"\0\270\11\33\313\351\203\61\42\60\342$\42*$\342`B.\342$\42\60\42\374 \64\7\270\14\34\313"
"\351\203\61\42\60\342$\42*$\342`B.\342$\42\60\42:\64\323\3\1\270\20 \313\351\203\61\42"
"\60\342$\42*$\342`B.\342$\42\60\42\374 \64\346 &\364 \0\270\30!\313\351\203\61\42"
"\60\342$\42*$\342`B.\342$\42\60\42\36\340(*(*(*\350\0\270\31!\313\351\203\61"
"\42\60\342$\42*$\342`B.\342$\42\60\42\36 *(*\350(*\350\0\270\33#\315\351\203"
"\61\42\64\42\304$\42.$\42\344@\42$.\42\304$\42\64\42\36\64\70\251D\234P\0\270\35\37"
"\313\351\203\61\42\60\342$\42*$\342`B.\342$\42\60\42\36\270*QTT\5\0\270$\27\255"
"\351\203\71\370 *,*,\344\200JV\260\366 *\70\3\270%\26\313\351\203\65\364(*\344@H"
"\356@(\64\36\364 \64\3\270(\26\313\351\203\65\364(*\344@H\356@(\64qh\322\203\1\270"
",\32\313\351\203\65\364(*\344@H\356@(\64\374 \64\346 &\364 \0\270\64\33\313\351\203\65"
"\364(*\344@H\356@(\64\36\340(*(*(*\350\0\270\65\33\313\351\203\65\364(*\344@"
"H\356@(\64\36 *(*\350(*\350\0\270\67\33\314\351\203\65\66\302(,d\302(\42n\302"
"(\66\36.\66\245D\230P\0\270\70!\315\351\203\65\70\304(.d\304($n\304(\70\36.$"
"\62$\60\42]LD\220\210L\0\270\71\32\313\351\203\65\364(*\344@H\356@(\64\36\326(,"
"&,\310\2\0\270@&\255\351\203\65\42\64\342 &\42,&\42,b\342 &B\62BnB\62"
"\342 &\42\64\42\64\42\64\42\0\270D\35\313\351\203\61\42\60\342$\42\212\342$Bj\342$\42\60"
"\42\60\42$\64\323\3\1\270Q \313\351\203\61\42\60\342$\42\212\342$Bj\342$\42\60\42\36 "
"*(*\350(*\350\0\270S\42\315\351\203\61\42\64\42\304$\42\216\42\304$\42$j\42\304$\42"
"\64\42\36\64\70\251D\234P\0\270\134\25\215%\204\345@\70\321\201Pp\360\201<Xp\262\3\3\270"
"]\30\315\345\203\345@\70\350@(\370@\60\70\354\300\36\340@\70'\0\270`\31\315\345\203\345@\70"
"\350@(\370@\60\70\354\300\36:\70\361\201\10\0\270d\35\315\345\203\345@\70\350@(\370@\60\70"
"\354\300\36\340@\70\350@(\370@\4\0\270l\37\315\345\203\345@\70\350@(\370@\60\70\354\300\36"
"\340@(.(.(.\350@\4\0\270m\37\315\345\203\345@\70\350@(\370@\60\70\354\300\36 "
".(.\350@(.\350@\4\0\270o\33\315\345\203\345@\70\350@(\370@\60\70\354\300\36Ip"
"lD\240L\20\0\270q\33\315\345\203\345@\70\350@(\370@\60\70\354\300\36A]TXT\134\21"
"\0\270x \316\345\203\65:\350$\64$\64$\350$(\220\42\60\350$.*.*\346@\42:\15"
"\0\270|\34\316\345\203\67\346&\62&\346f\42\62\346&,\311\301D<Pt\326\7\42\0\270\215\34"
"\316\345\203\67\346&\62&\346f\42\62\346&,\311\301D<*\273\260\354l\0\270\250'\316\345\203\63"
"\42\346\42eD\232\213\231\270\210\230\213dA\21!\7\21\351!CBC\42#\22\306DD\211\310\4"
"\270\260\35\314\345\203\67\305M\134L\134L\304MDdDd\304MPXP\330\1El\2\270\264\33"
"\314\345\203\67\342&.&\342&\42\62\342&(\354\200\42\36 \66\333\3\1\270\270\37\314\345\203\67\342"
"&.&\342&\42\62\342&(\354\200\42\36\342 \66\350 (\366 \0\270\300\32\314\345\203\67\342&"
".&\342&\42\62\342&(\354\200\42\36\344*_\35\270\301\34\314\345\203\67\342&.&\342&\42\62"
"\342&(\354\200\42\36$*\253\253T\7\270\303\36\315\345\203\67\344&\60&\344&$\62\344&*,"
"\342`\42\36\62\70\251D\234P\0\270\305\36\314\345\203\67\342&.&\342&\42\62\342&(\354\200\42"
"\36\334*,(,\312\2\0\270\314\32\215%\204\345@\70\321\201Pp\360\201XL`L`L`L"
"\320\201\1\270\320\33\315\345\203\345@\70\350@(\370@,&\60&\350\300\36:\70\361\201\10\0\270\324"
"\37\315\345\203\345@\70\350@(\370@,&\60&\350\300\36\340@\70\350@(\370@\4\0\270\335!"
"\315\345\203\345@\70\350@(\370@,&\60&\350\300\36 .(.\350@(.\350@\4\0\270\337"
"\35\315\345\203\345@\70\350@(\370@,&\60&\350\300\36IplD\240L\20\0\270\341\35\315\345"
"\203\345@\70\350@(\370@,&\60&\350\300\36A]TXT\134\21\0\270\350\25\253\351\203\343@"
"\64\311\201Hh\350\201\360\1UhV\0\270\351\30\315\345\203\345@\70\350@(\370@\36\340\300,\70"
"\360@\70'\0\270\354\33\315\345\203\345@\70\350@(\370@\36\372\300,\70\60&\60\70\370@\4\0"
"\270\360\35\315\345\203\345@\70\350@(\370@\36\340\300,\70\360@\70\350@(\370@\4\0\270\370\37"
"\315\345\203\345@\70\350@(\370@\36\340\300,\70\360@(.(.(.\350@\4\0\270\371\37\315"
"\345\203\345@\70\350@(\370@\36\340\300,\70\60.(.\350@(.\350@\4\0\270\373\34\315\345"
"\203\345@\70\350@(\370@\36\340\300,\70\36\64\70\66\42P&\10\0\270\375\34\315\345\203\345@\70"
"\350@(\370@\36\340\300,\70\36\260.*,*\256\10\0\271\4$\314\345\203\67\342 $\60$\60"
"$\342 $\42\62\42\62\342 $\366\200\42(,(\244(,(,\0\271\30)\356\345\203\341 &"
"\62&\344 &$\64\344 &:\344`\42.\204.*\36\62$\64$\62\42aLD\224\210L\0"
"\271 /\316\345\203\67\42\342 $\42\60$\42\60$\42\342 $\42eD\312\210\210\203\220\210\330\210"
"\3\212Da\21A\61\24Aa\21Aa\21\1\271<$\314\345\203\67\342 $\60$\60$\342 $"
"\42\62\42\62\342 $\366\200\42(,(,(,(,\0\271=\31\354\345\203\341 &.\346@F"
"\364@&\366\200\42*{D\7\261\31\271@\34\354\345\203\341 &.\346@F\364@&\66\366\200\42"
"*\237\4\206\304\306\36\14\271D\36\354\345\203\341 &.\346@F\364@&\366\200\42*{\270\203\330"
"\240\203\240\330\203\0\271L\31\354\345\203\341 &.\346@F\364@&\366\200\42*{\300\253|u\271"
"O\42\355\345\203\341 &\60&\342 &\42\64\342 &\70\342`\42,*,\36ApR\211\70\241"
"\0\271Q\35\354\345\203\341 &.\346@F\364@&\366\200\42*{TVaAaQ\26\0\271X"
"\34\255\345\203\345@\70\321\201Pp\360\201<\300\201QL`L`L`L\20\0\271Y\32\315\345\203"
"\345@\70\350@(\370@\36\340\300(&\60&\354@\70'\0\271\134\36\315\345\203\345@\70\350@("
"\370@\36\372\300(&\60&,\42&,\70\370@\4\0\271`\37\315\345\203\345@\70\350@(\370@"
"\36\340\300(&\60&\354@\70\350@(\370@\4\0\271h!\315\345\203\345@\70\350@(\370@\36"
"\340\300(&\60&\354@(.(.(.\350@\4\0\271i!\315\345\203\345@\70\350@(\370@"
"\36\340\300(&\60&,.(.\350@(.\350@\4\0\271k\36\315\345\203\345@\70\350@(\370"
"@\36\340\300(&\60&\36\60\70\66\42P&\10\0\271m\36\315\345\203\345@\70\350@(\370@\36"
"\340\300(&\60&\36\254.*,*\256\10\0\271t\23M\245\204\345@\70\321\201Pp\360\201<\364"
"\201\1\271u\27\315\345\203\345@\70\350@(\370@\36\372\300\36\340@\70'\0\271x\30\315\345\203\345"
"@\70\350@(\370@\36\372\300\36:\70\361\201\10\0\271|\34\315\345\203\345@\70\350@(\370@\36"
"\372\300\36\340@\70\350@(\370@\4\0\271\204\36\315\345\203\345@\70\350@(\370@\36\372\300\36\340"
"@(.(.(.\350@\4\0\271\205\36\315\345\203\345@\70\350@(\370@\36\372\300\36 .("
".\350@(.\350@\4\0\271\207\32\315\345\203\345@\70\350@(\370@\36\372\300\36IplD\240"
"L\20\0\271\211\32\315\345\203\345@\70\350@(\370@\36\372\300\36A]TXT\134\21\0\271\212\32"
"\315\345\203\345@\70\350@(\370@\36\372\300\36\201ilD\240L\14\0\271\215\34\315\345\203\345@\70"
"\350@(\370@\36\372\300\36\340@(\370@(\370@\4\0\271\216\34\315\345\203\345@\70\350@(\370"
"@\36\372\300\36\372@,&\60&\354@\4\0\271\254\26\253\351\203\65\364 &,&,\346 FR"
"\345ALh\6\271\255\24\313\351\203\65\364(*\350H\362(\64\36\364 \64\3\271\260\24\313\351\203\65"
"\364(*\350H\362(\64qh\322\203\1\271\264\30\313\351\203\65\364(*\350H\362(\64\374 \64\346"
" &\364 \0\271\274\31\313\351\203\65\364(*\350H\362(\64\36\340(*(*(*\350\0\271\275"
"\31\313\351\203\65\364(*\350H\362(\64\36 *(*\350(*\350\0\271\277\33\314\351\203\65\66\302"
"(,(\302(\42\62\302(\66\36.\66\245D\230P\0\271\301\30\313\351\203\65\364(*\350H\362("
"\64\36\326(,&,\310\2\0\271\310\42\256\345\203\65:\346 $&,$&,$&,\244,$"
"&,$&,$\346 $:\33\0\271\311\35\316\345\203\67\304*$(*$(*$(\212(*"
"\304*:\36\352 :'\0\271\314\35\316\345\203\67\304*$(*$(*$(\212(*\304*:"
"Ut\326\7\42\0\271\316%\317\345\203\67\306*&(*&(*&(j\42(*\306*<\36,"
".,\350&l*MP\311\10\0\271\317\36\316\345\203\67\304*$(*$(*$(\212(*\304"
"*:\36\354.:\365\11\0\271\320\42\316\345\203\67\304*$(*$(*$(\212(*\304*:"
"\36\352 :\354 ,\372 \4\0\271\321$\316\345\203\67\304*$(*$(*$(\212(*\304"
"*:\36\244\242.*\246*&\62\246*\4\0\271\322&\316\345\203\67\304*$(*$(*$("
"\212(*\304*:\36\244\242.\42&\246\42&ULLE\11\0\271\330\42\316\345\203\67\304*$("
"*$(*$(\212(*\304*:\36\354.*.*.*\356\4\0\271\331\42\316\345\203\67\304*"
"$(*$(*$(\212(*\304*:\36,*.*\356.*\356\4\0\271\333 \316\345\203\67"
"\304*$(*$(*$(\212(*\304*:\36\66:\255D\240P\4\0\271\335\36\316\345\203\67"
"\304*$(*$(*$(\212(*\304*:\36\225]Xv\66\0\271\336!\316\345\203\67\304*"
"$(*$(*$(\212(*\304*:\36\354\66:V\42P(\4\0\271\341\37\316\345\203\67\304"
"*$(*$(*$(\212(*\304*:\36\354.\372.\372\4\0\271\343!\316\345\203\67\304*"
"$(*$(*$(\212(*\304*:\36\60\362@\256\60*\260\10\0\271\344'\256\345\203\65$"
"\64\344@$D,$D,$D,\244,$D,$D,$\344@$iHhHhH\0\271"
"\345\36\314\345\203\63\342&B(&B(&B(\206(&\342&\42\62\42\36\342 \66\7\271\350 "
"\314\345\203\63\342&B(&B(&B(\206(&\342&\42\62\42\62\42&\66\333\3\1\271\354#"
"\314\345\203\63\342&B(&B(&B(\206(&\342&\42\62\42\36\342 \66\350 (\366 \0"
"\271\364\36\314\345\203\63\342&B(&B(&B(\206(&\342&\42\62\42\36\344*_\35\271\365"
" \314\345\203\63\342&B(&B(&B(\206(&\342&\42\62\42\36$*\253\253T\7\271\367"
"'\316\345\203\63\42\304&\42$(&\42$(&\42$(f$(&\42\304&\42\66\42\36\70:"
"\255D\240P\0\271\370-\316\345\203\63\42\304&\42$(&\42$(&\42$(f$(&\42\304"
"&\42\66\42\36\62$\64$\62\42aLD\224\210L\0\271\371 \314\345\203\63\342&B(&B("
"&B(\206(&\342&\42\62\42\36AYTf\25\0\271\372\42\314\345\203\63\342&B(&B("
"&B(\206(&\342&\42\62\42\36\344\62\66R\42L(\0\272\0!\256\345\203\65:\346 $&"
",$&,\244,$&,$&,\244,$\346 $:\33\0\272\1\35\316\345\203\67\304*$("
"*$(\212(*$(\352@*:\36\352 :'\0\272\10\42\316\345\203\67\304*$(*$("
"\212(*$(\352@*:\36\352 :\354 ,\372 \4\0\272\25\36\316\345\203\67\304*$(*"
"$(\212(*$(\352@*:\36\225]Xv\66\0\272\70\32\256\345\203;\372@J,J,J"
",\244,J,J,\352@*:\3\272\71\27\314\345\203\367J(J(J(\206(\352*\66\36\372"
" \66\3\272<\27\314\345\203\367J(J(J(\206(\352*\66\36\66\333\203\1\272@\34\314\345\203"
"\367J(J(J(\206(\352*\66\36\342 \66\350 (\366 \0\272B\37\314\345\203\367J(J"
"(J(\206(\352*\66\272\242*\42&\242\42&\42*&\242\1\272H\27\314\345\203\367J(J("
"J(\206(\352*\66\36\344*_\35\272I\31\314\345\203\367J(J(J(\206(\352*\66\36$"
"*\253\253T\7\272K \315\345\203\67\302*\42(*\42(*\42(f\42(*\302*\70\36\62\70"
"\251D\234P\0\272M\33\314\345\203\367J(J(J(\206(\352*\66\36\334*,(,\312\2\0"
"\272N\33\314\345\203\367J(J(J(\206(\352*\66\36\344\62\66R\42L(\0\272S\34\314\345"
"\203\367J(J(J(\206(\352*\66\36(\356@\252,*\254\4\0\272T)\256\345\203\67\42\66"
"\342@&B,&B,&B,bB,&B,&B,&\342@&\42\66\42\66\42\66\42\0"
"\272U\37\314\345\203\63\342&B(&B(&B(bB(&\342&\42\62\42\36\342 \66\7\272"
"X \314\345\203\63\342&B(&B(&B(bB(&\342&\42\62\42\36 \66\333\3\1\272"
"\134$\314\345\203\63\342&B(&B(&B(bB(&\342&\42\62\42\36\342 \66\350 ("
"\366 \0\272d\37\314\345\203\63\342&B(&B(&B(bB(&\342&\42\62\42\36\344*"
"_\35\272e!\314\345\203\63\342&B(&B(&B(bB(&\342&\42\62\42\36$*\253"
"\253T\7\272g(\316\345\203\63\42\304&\42$(&\42$(&\42$(b\42$(&\42\304&"
"\42\66\42\36\70:\255D\240P\0\272h.\316\345\203\63\42\304&\42$(&\42$(&\42$("
"b\42$(&\42\304&\42\66\42\36\62$\64$\62\42aLD\224\210L\0\272i!\314\345\203\63"
"\342&B(&B(&B(bB(&\342&\42\62\42\36AYTf\25\0\272p\32\256\345\203"
";\372@J,J,\244,J,J,\244,\352@*:\3\272q\30\314\345\203\367J(J(\206"
"(J(\346@*\66\36\372 \66\3\272t\30\314\345\203\367J(J(\206(J(\346@*\66y"
"l\332\203\1\272x\35\314\345\203\367J(J(\206(J(\346@*\66\36\342 \66\350 (\366 "
"\0\272\203 \315\345\203\67\302*\42(*\42(f\42(*\42(f\302*\70\36\62\70\251D\234P"
"\0\272\204&\316\345\203\67\304*$(*$(f$(*$(f\304*:\36\62$\64$\62\42"
"aLD\224\210L\0\272\205\34\314\345\203\367J(J(\206(J(\346@*\66\36\334*,(,"
"\312\2\0\272\207\34\314\345\203\367J(J(\206(J(\346@*\66\36*\360\60\64\42NF\0\272"
"\214)\256\345\203\67\42\66\342@&B,&B,bB,&B,&B,bB,&\342@&"
"\42\66\42\66\42\66\42\0\272\250\30\215%\204\343\200$\62$\62$\62$\62\344\200\36Mp\262\3\3"
"\272\251\32\315\345\203\345@(.(.(.\350@\60\70\354\300\36\340@\70'\0\272\253 \315\345\203"
"\345@(.(.(.\350@\60\70\354\300\36\232(.(.&\42,B&\0\272\254\33\315\345\203"
"\345@(.(.(.\350@\60\70\354\300\36:\70\361\201\10\0\272\260\37\315\345\203\345@(.("
".(.\350@\60\70\354\300\36\340@\70\350@(\370@\4\0\272\262#\315\345\203\345@(.(."
"(.\350@\60\70\354\300\274\242,\42&\244\42&$*&\244\242\2\0\272\270!\315\345\203\345@("
".(.(.\350@\60\70\354\300\36\340@(.(.(.\350@\4\0\272\271!\315\345\203\345@"
"(.(.(.\350@\60\70\354\300\36 .(.\350@(.\350@\4\0\272\273\35\315\345\203\345"
"@(.(.(.\350@\60\70\354\300\36IplD\240L\20\0\272\275\35\315\345\203\345@(."
"(.(.\350@\60\70\354\300\36A]TXT\134\21\0\272\304%\316\345\203\65:\350$(*$"
"(*$(*$(*\204\42*$\350$.*.*\346@\42:\15\0\272\310\35\316\345\203\67\346"
"&UL\252\230\211\250\230\230\233\260$\7\23\361@\321Y\37\210\0\272\330$\316\345\203\67\346&UL"
"\252\230\211\250\230\230\233\260$\7\23\361\220!\241!\221\21\11c\42\242Dd\2\272\331\35\316\345\203\67"
"\346&UL\252\230\211\250\230\230\233\260$\7\23\361\250\354\302\262\263\1\272\374\42\314\345\203\67\305MD"
"TLDTLDTLDTLDTL\304MPXP\330\1El\2\273\0\36\314\345\203\67\342"
"&\42*&\42*&\42*&\342&(\354\200\42\36 \66\333\3\1\273\4\42\314\345\203\67\342&\42"
"*&\42*&\42*&\342&(\354\200\42\36\342 \66\350 (\366 \0\273\15\37\314\345\203\67\342"
"&\42*&\42*&\42*&\342&(\354\200\42\36$*\253\253T\7\273\17!\315\345\203\67\344&"
"$*&$*&$*&\344&*,\342`\42\36\62\70\251D\234P\0\273\21!\314\345\203\67\342"
"&\42*&\42*&\42*&\342&(\354\200\42\36\334*,(,\312\2\0\273\30\35\215%\204\343"
"\200$\62$\62$\62$\62\344\200\36&aL`L`L\320\201\1\273\34\35\315\345\203\345@(."
"(.(.\350@,&\60&\350\300\36:\70\361\201\10\0\273 !\315\345\203\345@(.(.("
".\350@,&\60&\350\300\36\340@\70\350@(\370@\4\0\273)#\315\345\203\345@(.(."
"(.\350@,&\60&\350\300\36 .(.\350@(.\350@\4\0\273+\37\315\345\203\345@("
".(.(.\350@,&\60&\350\300\36IplD\240L\20\0\273\64\21\253\351\203\341\240R\227"
"\7\265\7T\241Y\1\273\65\32\315\345\203\345@(.(.(.\350@\36\340\300,\70\360@\70'"
"\0\273\66 \315\345\203\345@(.(.(.\350@\36\340\300,\70\36\252\242,*,*,*\2"
"\0\273\70\35\315\345\203\345@(.(.(.\350@\36\372\300,\70\60&\60\70\370@\4\0\273;"
"\35\315\345\203\345@(.(.(.\350@\36\340\300,\70\360@(\70\361\201\10\0\273<\37\315\345"
"\203\345@(.(.(.\350@\36\340\300,\70\360@\70\350@(\370@\4\0\273=!\315\345\203"
"\345@(.(.(.\350@\36\340\300,\70\256\242,*\244*$\62\244*\2\0\273>$\315\345"
"\203\345@(.(.(.\350@\36\340\300,\70\256\242,\42&\244\42&$*&\244\242\2\0\273"
"D!\315\345\203\345@(.(.(.\350@\36\340\300,\70\360@(.(.(.\350@\4\0"
"\273E!\315\345\203\345@(.(.(.\350@\36\340\300,\70\60.(.\350@(.\350@\4"
"\0\273G\36\315\345\203\345@(.(.(.\350@\36\340\300,\70\36\64\70\66\42P&\10\0\273"
"I\36\315\345\203\345@(.(.(.\350@\36\340\300,\70\36\260.*,*\256\10\0\273M\37"
"\315\345\203\345@(.(.(.\350@\36\340\300,\70\360@(\370@(\370@\4\0\273O\35\315"
"\345\203\345@(.(.(.\350@\36\340\300,\70\341\201X]T\134\21\0\273P(\314\345\203\67"
"\342 $\42,$\42,$\42,$\42,$\42,$\342 $\366\200\42(,(\244(,(,"
"\0\273T\35\354\345\203\67\342&\42*&\42*&\342&\66\366\200\42*\204*'\261i\17\6\273X"
"!\354\345\203\67\342&\42*&\42*&\342&\366\200\42*\204*=\304Al\320AP\354A\0\273"
"a\36\354\345\203\67\342&\42*&\42*&\342&\366\200\42*\204*=HTVW\251\16\273c!"
"\355\345\203\67\344&$*&$*&\344&\70\342`\42,\204,*\36\62\70\251D\234P\0\273l"
"\60\316\345\203\67\42\342 $\42YHD\262\220\210d!\21\311B\42\222\205DD\34\204D\304F\34"
"P$\12\213\10\212\241\10\12\213\10\12\213\10\273\210(\314\345\203\67\342 $\42,$\42,$\42,"
"$\42,$\42,$\342 $\366\200\42(,(,(,(,\0\273\214\35\354\345\203\67\342&\42"
"*&\42*&\342&\66\366\200\42*\237\4\206\304\306\36\14\273\220\37\354\345\203\67\342&\42*&\42"
"*&\342&\366\200\42*{\270\203\330\240\203\240\330\203\0\273\244 \255\345\203\343\200$\62$\62$\62"
"$\62$\62\344\200\374\300(&\60&\60&\60&\10\0\273\250 \315\345\203\345@(.(.(."
"\350@\36\372\300(&\60&,\42&,\70\370@\4\0\273\254!\315\345\203\345@(.(.(."
"\350@\36\340\300(&\60&\354@\70\350@(\370@\4\0\273\264#\315\345\203\345@(.(.("
".\350@\36\340\300(&\60&\354@(.(.(.\350@\4\0\273\267 \315\345\203\345@(."
"(.(.\350@\36\340\300(&\60&\36\60\70\66\42P&\10\0\273\300\26M\245\204\343\200$\62"
"$\62$\62$\62\344\200\36\351\201\1\273\304\32\315\345\203\345@(.(.(.\350@\36\372\300\36"
":\70\361\201\10\0\273\310\36\315\345\203\345@(.(.(.\350@\36\372\300\36\340@\70\350@("
"\370@\4\0\273\320 \315\345\203\345@(.(.(.\350@\36\372\300\36\340@(.(.(."
"\350@\4\0\273\323\34\315\345\203\345@(.(.(.\350@\36\372\300\36IplD\240L\20\0"
"\273\370\32\254\345\203\67\366@F,F,F,F,F,F,\346@&\66\3\273\371\27\314\345\203"
"\367J(J(J(J(\352*\66\36\372 \66\3\273\374\27\314\345\203\367J(J(J(J("
"\352*\66yl\332\203\1\273\377\30\314\345\203\367J(J(J(J(\352*\66\36\344*\66\355\1"
"\274\0\34\314\345\203\367J(J(J(J(\352*\66\36\342 \66\350 (\366 \0\274\2\37\314"
"\345\203\367J(J(J(J(\352*\66\272\242*\42&\242\42&\42*&\242\1\274\10\27\314\345"
"\203\367J(J(J(J(\352*\66\36\344*_\35\274\11\31\314\345\203\367J(J(J(J"
"(\352*\66\36$*\253\253T\7\274\13 \315\345\203\67\302*\42(*\42(*\42(*\42(*"
"\302*\70\36\62\70\251D\234P\0\274\14&\316\345\203\67\304*$(*$(*$(*$(*"
"\304*:\36\62$\64$\62\42aLD\224\210L\0\274\15\33\314\345\203\367J(J(J(J("
"\352*\66\36\334*,(,\312\2\0\274\17\33\314\345\203\367J(J(J(J(\352*\66\36*"
"\360\60\64\42NF\0\274\21\31\314\345\203\367J(J(J(J(\352*\66\36\344*\366*\366\0"
"\274\24 \255\351\203\63\70&*$&*$&*$\346\244*$&*$&*$\346$\70\33\0"
"\274\25\33\316\345\203\67:$(*$(*\304\212(*\304*:\36\352 :'\0\274\26\37\316\345"
"\203\67:$(*$(*\304\212(*\304*:\36E\273\250\270\250\270\250\20\0\274\27!\316\345\203"
"\67:$(*$(*\304\212(*\304*:\36IQ`P`LD\134\204L\0\274\30\33\316\345"
"\203\67:$(*$(*\304\212(*\304*:Ut\326\7\42\0\274\33\34\316\345\203\67:$("
"*$(*\304\212(*\304*:\36\354.:\365\11\0\274\34 \316\345\203\67:$(*$(*"
"\304\212(*\304*:\36\352 :\354 ,\372 \4\0\274\35\42\316\345\203\67:$(*$(*"
"\304\212(*\304*:\36\244\242.*\246*&\62\246*\4\0\274\36$\316\345\203\67:$(*$"
"(*\304\212(*\304*:\36\244\242.\42&\246\42&ULLE\11\0\274\37%\316\345\203\67:"
"$(*$(*\304\212(*\304*:\36\244\42&.\42&\246\242&*&\246\242\4\0\274$ "
"\316\345\203\67:$(*$(*\304\212(*\304*:\36\354.*.*.*\356\4\0\274% "
"\316\345\203\67:$(*$(*\304\212(*\304*:\36,*.*\356.*\356\4\0\274'\36"
"\316\345\203\67:$(*$(*\304\212(*\304*:\36\66:\255D\240P\4\0\274)\34\316\345"
"\203\67:$(*$(*\304\212(*\304*:\36\225]Xv\66\0\274-\35\316\345\203\67:$"
"(*$(*\304\212(*\304*:\36\354.\372.\372\4\0\274\60'\255\351\203\63$\62D*$"
"D*$D*$\344 \244*$D*$D*$\344 $eHdHdH\0\274\61\35\314\345"
"\203\63\42\62B(&B(&\342\206(&\342&\42\62\42\36\342 \66\7\274\64\37\314\345\203\63\42"
"\62B(&B(&\342\206(&\342&\42\62\42\62\42&\66\333\3\1\274\70\42\314\345\203\63\42\62"
"B(&B(&\342\206(&\342&\42\62\42\36\342 \66\350 (\366 \0\274@\35\314\345\203\63"
"\42\62B(&B(&\342\206(&\342&\42\62\42\36\344*_\35\274A\37\314\345\203\63\42\62B"
"(&B(&\342\206(&\342&\42\62\42\36$*\253\253T\7\274C%\316\345\203\63\42\66\42$"
"(&\42$(&\42\304f$(&\42\304&\42\66\42\36\70:\255D\240P\0\274D+\316\345\203"
"\63\42\66\42$(&\42$(&\42\304f$(&\42\304&\42\66\42\36\62$\64$\62\42aL"
"D\224\210L\0\274E\37\314\345\203\63\42\62B(&B(&\342\206(&\342&\42\62\42\36AY"
"Tf\25\0\274I\37\314\345\203\63\42\62B(&B(&\342\206(&\342&\42\62\42\36\344*\366"
"*\366\0\274L \255\351\203\63\70&*$&*$&*\344\200$&*$&*\244*$\346$"
"\70\33\0\274M\34\316\345\203\67:$(*$(\352@*$(\352@*:\36\352 :'\0\274"
"P\35\316\345\203\67:$(*$(\352@*$(\352@*:\36(:\353\3\21\0\274]!\316"
"\345\203\67:$(*$(\352@*$(\352@*:\36,*.*\356.*\356\4\0\274\204\32"
"\255\351\203\71X*J*J*\352 \244*J*J*\352 *\70\3\274\205\26\314\345\203\67V("
"J(\352\206(\352*\66\36\372 \66\3\274\210\26\314\345\203\67V(J(\352\206(\352*\66\36\66"
"\333\203\1\274\213\27\314\345\203\67V(J(\352\206(\352*\66\36\344*\66\355\1\274\214\33\314\345\203"
"\67V(J(\352\206(\352*\66\36\342 \66\350 (\366 \0\274\216\36\314\345\203\67V(J("
"\352\206(\352*\66\272\242*\42&\242\42&\42*&\242\1\274\224\26\314\345\203\67V(J(\352\206"
"(\352*\66\36\344*_\35\274\225\30\314\345\203\67V(J(\352\206(\352*\66\36$*\253\253T"
"\7\274\227\36\315\345\203\67\70\42(*\42(*\302f\42(*\302*\70\36\62\70\251D\234P\0\274"
"\231\32\314\345\203\67V(J(\352\206(\352*\66\36\334*,(,\312\2\0\274\232\32\314\345\203\67"
"V(J(\352\206(\352*\66\36\344\62\66R\42L(\0\274\240)\255\351\203\65\42\64B*&B"
"*&B*&\342 bB*&B*&B*&\342 &\42\64\42\64\42\64\42\0\274\241\36\314"
"\345\203\63\42\62B(&B(&\342bB(&\342&\42\62\42\36\342 \66\7\274\244\37\314\345\203"
"\63\42\62B(&B(&\342bB(&\342&\42\62\42\36 \66\333\3\1\274\247\37\314\345\203\63"
"\42\62B(&B(&\342bB(&\342&\42\62\42\36\344*\66\355\1\274\250#\314\345\203\63\42"
"\62B(&B(&\342bB(&\342&\42\62\42\36\342 \66\350 (\366 \0\274\260\36\314\345"
"\203\63\42\62B(&B(&\342bB(&\342&\42\62\42\36\344*_\35\274\261 \314\345\203\63"
"\42\62B(&B(&\342bB(&\342&\42\62\42\36$*\253\253T\7\274\263&\316\345\203\63"
"\42\66\42$(&\42$(&\42\304b\42$(&\42\304&\42\66\42\36\70:\255D\240P\0\274"
"\264,\316\345\203\63\42\66\42$(&\42$(&\42\304b\42$(&\42\304&\42\66\42\36\62$"
"\64$\62\42aLD\224\210L\0\274\265 \314\345\203\63\42\62B(&B(&\342bB(&\342"
"&\42\62\42\36AYTf\25\0\274\274\32\255\351\203\71X*J*J*\344\200J*J*\244*"
"\352 *\70\3\274\275\30\314\345\203\67V(J(\346@J(\346@*\66\36\372 \66\3\274\300\30"
"\314\345\203\67V(J(\346@J(\346@*\66yl\332\203\1\274\304\35\314\345\203\67V(J("
"\346@J(\346@*\66\36\342 \66\350 (\366 \0\274\315\32\314\345\203\67V(J(\346@J"
"(\346@*\66\36$*\253\253T\7\274\317\36\315\345\203\67\70\42(*\42(f\302*\42(f\302"
"*\70\36\62\70\251D\234P\0\274\320$\316\345\203\67:$(*$(f\304*$(f\304*:"
"\36\62$\64$\62\42aLD\224\210L\0\274\321\34\314\345\203\67V(J(\346@J(\346@*"
"\66\36\334*,(,\312\2\0\274\325\32\314\345\203\67V(J(\346@J(\346@*\66\36\344*"
"\366*\366\0\274\330)\255\351\203\65\42\64B*&B*&B*b\342 &B*&B*bB"
"*&\342 &\42\64\42\64\42\64\42\0\274\334 \314\345\203\63\42\62B(&B(b\342&B("
"b\342&\42\62\42\62\42&\66\333\3\1\274\364\32\215%\204%.(.(.\350@(.(.\350"
"@\36,\70\331\201\1\274\365\32\315\345\203%.(.\350@(.\350@\60\70\354\300\36\340@\70'"
"\0\274\366\37\315\345\203%.(.\350@(.\350@\60\70\354\300\36\270\242,*,*,*\2\0"
"\274\370\33\315\345\203%.(.\350@(.\350@\60\70\354\300\36:\70\361\201\10\0\274\374\37\315\345"
"\203%.(.\350@(.\350@\60\70\354\300\36\340@\70\350@(\370@\4\0\275\4!\315\345\203"
"%.(.\350@(.\350@\60\70\354\300\36\340@(.(.(.\350@\4\0\275\5!\315\345"
"\203%.(.\350@(.\350@\60\70\354\300\36 .(.\350@(.\350@\4\0\275\7\35\315"
"\345\203%.(.\350@(.\350@\60\70\354\300\36IplD\240L\20\0\275\11\35\315\345\203%"
".(.\350@(.\350@\60\70\354\300\36A]TXT\134\21\0\275\20%\316\345\203\65:(*"
"$(*$(*$\350$(*\204\42*$\350$.*.*\346@\42:\15\0\275\24\36\316\345"
"\203\67&*&UL\314\315DTL\314MX\222\203\211x\240\350\254\17D\0\275$%\316\345\203\67"
"&*&UL\314\315DTL\314MX\222\203\211x\310\220\320\220\310\210\204\61\21Q\42\62\1\275,"
"+\316\345\203\65$\64$\42*$ETH\212\250\220\24')\242B(\242BR\234$\212\12\11\212"
"\12\71\230\10\11\15\11\15\11\275@)\316\345\203\63\42&*\42MTD\232\213\231\250\210\64\27\311\202"
"\42B\16\42\322C\206\204\206DF$\214\211\210\22\221\11\275H\42\314\345\203\67ETLDTLD"
"TL\304MDTLDTL\304MPXP\330\1El\2\275I\35\314\345\203\67\42*&\42*"
"&\342&\42*&\342&(\354\200\42\36\342 \66\7\275L\36\314\345\203\67\42*&\42*&\342&"
"\42*&\342&(\354\200\42\36 \66\333\3\1\275P\42\314\345\203\67\42*&\42*&\342&\42*"
"&\342&(\354\200\42\36\342 \66\350 (\366 \0\275X\35\314\345\203\67\42*&\42*&\342&"
"\42*&\342&(\354\200\42\36\344*_\35\275Y\37\314\345\203\67\42*&\42*&\342&\42*&"
"\342&(\354\200\42\36$*\253\253T\7\275d\37\215%\204%.(.(.\350@(.(.\350"
"@,&\60&\60&\60&\350\300\0\275h\35\315\345\203%.(.\350@(.\350@,&\60&"
"\350\300\36:\70\361\201\10\0\275\200\32\253\351\203#.$.$.\344@$.$.\344@\370\200*"
"\64+\0\275\201\32\315\345\203%.(.\350@(.\350@\36\340\300,\70\360@\70'\0\275\204\35"
"\315\345\203%.(.\350@(.\350@\36\372\300,\70\60&\60\70\370@\4\0\275\207\35\315\345\203"
"%.(.\350@(.\350@\36\340\300,\70\360@(\70\361\201\10\0\275\210\37\315\345\203%.("
".\350@(.\350@\36\340\300,\70\360@\70\350@(\370@\4\0\275\211!\315\345\203%.(."
"\350@(.\350@\36\340\300,\70\256\242,*\244*$\62\244*\2\0\275\212$\315\345\203%.("
".\350@(.\350@\36\340\300,\70\256\242,\42&\244\42&$*&\244\242\2\0\275\220!\315\345"
"\203%.(.\350@(.\350@\36\340\300,\70\360@(.(.(.\350@\4\0\275\221!\315"
"\345\203%.(.\350@(.\350@\36\340\300,\70\60.(.\350@(.\350@\4\0\275\223\36"
"\315\345\203%.(.\350@(.\350@\36\340\300,\70\36\64\70\66\42P&\10\0\275\225\36\315\345"
"\203%.(.\350@(.\350@\36\340\300,\70\36\260.*,*\256\10\0\275\231\37\315\345\203%"
".(.\350@(.\350@\36\340\300,\70\360@(\370@(\370@\4\0\275\232 \315\345\203%."
"(.\350@(.\350@\36\340\300,\70\36\354@,&\60&\354@\4\0\275\234&\314\345\203\67\42"
"*&\42*&\42*&\342&\42*&\42*&\342&\366\200\42(,(\244(,(,\0\275\244"
"#\354\345\203#*&\42*&\342&\42*&\342&\366\200\42*\204*=\304Al\320AP\354A"
"\0\275\260'\356\345\203#*&UL\314M\252\230\230\233\350\220\203\211\270\20\272\250x\310\220\320\220\310"
"\210\204\61\21Q\42\62\1\275\270.\316\345\203\67\42ULD\252\230\210T\61\21\21\67\21\251b\42R"
"\305DD\334D\304F\34P$\12\213\10\212\241\10\12\213\10\12\213\10\275\324&\314\345\203\67\42*&"
"\42*&\42*&\342&\42*&\42*&\342&\366\200\42(,(,(,(,\0\275\325\34\354"
"\345\203#*&\42*&\342&\42*&\342&\366\200\42*{D\7\261\31\275\330\37\354\345\203#*"
"&\42*&\342&\42*&\342&\66\366\200\42*\237\4\206\304\306\36\14\275\334!\354\345\203#*&"
"\42*&\342&\42*&\342&\366\200\42*{\270\203\330\240\203\240\330\203\0\275\351 \354\345\203#*"
"&\42*&\342&\42*&\342&\366\200\42*{TVaAaQ\26\0\275\360!\255\345\203%."
"(.(.\350@(.(.\350@\36\340\300(&\60&\60&\60&\10\0\275\364 \315\345\203%"
".(.\350@(.\350@\36\372\300(&\60&,\42&,\70\370@\4\0\275\370!\315\345\203%"
".(.\350@(.\350@\36\340\300(&\60&\354@\70\350@(\370@\4\0\276\0#\315\345\203"
"%.(.\350@(.\350@\36\340\300(&\60&\354@(.(.(.\350@\4\0\276\3 "
"\315\345\203%.(.\350@(.\350@\36\340\300(&\60&\36\60\70\66\42P&\10\0\276\5 "
"\315\345\203%.(.\350@(.\350@\36\340\300(&\60&\36\254.*,*\256\10\0\276\14\30"
"M\245\204%.(.(.\350@(.(.\350@\36\372\300\0\276\15\31\315\345\203%.(.\350"
"@(.\350@\36\372\300\36\340@\70'\0\276\20\32\315\345\203%.(.\350@(.\350@\36\372"
"\300\36:\70\361\201\10\0\276\24\36\315\345\203%.(.\350@(.\350@\36\372\300\36\340@\70\350"
"@(\370@\4\0\276\34 \315\345\203%.(.\350@(.\350@\36\372\300\36\340@(.(."
"(.\350@\4\0\276\35 \315\345\203%.(.\350@(.\350@\36\372\300\36 .(.\350@"
"(.\350@\4\0\276\37\34\315\345\203%.(.\350@(.\350@\36\372\300\36IplD\240L"
"\20\0\276D\32\253\351\203\65T*F*F*\346 F*F*F*\346 &\64\3\276E\26\314"
"\345\203\67V(J(\352J(\352*\66\36\372 \66\3\276H\26\314\345\203\67V(J(\352J("
"\352*\66yl\332\203\1\276L\33\314\345\203\67V(J(\352J(\352*\66\36\342 \66\350 ("
"\366 \0\276N\36\314\345\203\67V(J(\352J(\352*\66\272\242*\42&\242\42&\42*&\242"
"\1\276T\26\314\345\203\67V(J(\352J(\352*\66\36\344*_\35\276U\30\314\345\203\67V("
"J(\352J(\352*\66\36$*\253\253T\7\276W\36\315\345\203\67\70\42(*\42(*\302*\42"
"(*\302*\70\36\62\70\251D\234P\0\276Y\32\314\345\203\67V(J(\352J(\352*\66\36\334"
"*,(,\312\2\0\276Z\32\314\345\203\67V(J(\352J(\352*\66\36\344\62\66R\42L("
"\0\276[\32\314\345\203\67V(J(\352J(\352*\66\36*\360\60\64\42NF\0\276`\31\255\351"
"\203\63\70&$\233\220lB\262\71)\311&$\233\223\340\334\0\276a\33\316\345\203\67$\243\220\214B"
"\62\12\71\42I\24r\24\35\17u\20\235\23\0\276d\33\316\345\203\67$\243\220\214B\62\12\71\42I"
"\24r\24\235*:\353\3\21\0\276h\37\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24\35\17"
"u\20\35v\20\26}\20\2\276j$\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24\35\17R"
"Q\27\21\23S\21\223*&\246\242\4\0\276p\37\316\345\203\67$\243\220\214B\62\12\71\42I\24r"
"\24\35\17v\27\25\27\25\27\25w\2\276q\37\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24"
"\35\17\26\25\27\25w\27\25w\2\276s\36\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24\35"
"\17\33\235V\42P(\2\0\276t#\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24\35\17\31"
"\22\32\22\31\221\60&\42JD&\0\276u\34\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24"
"\35\217\312.,;\33\0\276{\36\316\345\203\67$\243\220\214B\62\12\71\42I\24r\24\35\17\30y"
" W\30\25X\4\276|\42\255\351\203\63$\62D$\23\221LD\62\71\10)\311D$\223\203\220\224"
"!\221!\221!\221!\1\276}\35\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42"
"\36\342 \66\7\276\200\37\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42\62\42&"
"\66\333\3\1\276\204\42\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42\36\342 \66"
"\350 (\366 \0\276\214\35\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42\36\344"
"*_\35\276\215\37\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42\36$*\253\253"
"T\7\276\217 \316\345\203\63\42$\27!\271\10\311E\310\311H.BN\42b#\342\201\243\323J\4"
"\12\5\276\220&\316\345\203\63\42$\27!\271\10\311E\310\311H.BN\42b#\342!CBC\42"
"#\22\306DD\211\310\4\276\221\37\314\345\203\63B$\13\221,D\262\70\10!\311\342 $\42\62\42"
"\36AYTf\25\0\276\230\34\255\351\203\63\70&$\233\220lB\222\34\220\304\204d\23\222\344\200$"
"\70\67\0\276\231\33\316\345\203\67$\243\220\214B\62:\30\12\311\350`(:\36\352 :'\0\276\250"
" \316\345\203\67$\243\220\214B\62:\30\12\311\350`(:\36\354.*.*.*\356\4\0\276\320"
"\31\255\351\203\71X$\225H*\221T\7!%\251DR\35D\5\347\0\276\321\31\314\345\203W$\221"
"H\42\221D\7!$\211\16\202b\343\241\17b\63\276\324\31\314\345\203W$\221H\42\221D\7!$"
"\211\16\202b\343a\263=\30\276\327\32\314\345\203W$\221H\42\221D\7!$\211\16\202b\343A\256"
"b\323\36\276\330\36\314\345\203W$\221H\42\221D\7!$\211\16\202b\343!\16b\203\16\202b\17"
"\2\276\340\32\314\345\203W$\221H\42\221D\7!$\211\16\202b\343A\256\362\325\1\276\343 \315\345"
"\203\67\42$QDH\242\210\220D\21'\23!\211\42\216\202\343!\203\223J\304\11\5\276\344#\316\345"
"\203\67$\243\220\214B\62\12\71\31\311(\344(:\36\62$\64$\62\42aLD\224\210L\0\276\345"
"\35\314\345\203W$\221H\42\221D\7!$\211\16\202b\343\301\255\302\202\302\242,\0\276\354(\255\351"
"\203\65\42\64B$M\204H\232\10\221\64\21\7\21\23\42i\42D\322D\34\304D\204F\204F\204F"
"\204F\4\277\1\37\314\345\203\63B$\13\221,D\262\70\240\20\311\342 $\42\62\42\36AYTf"
"\25\0\277\10\31\255\351\203\71X$\225H*\221$\7T\42\251D\222\34P\5\347\0\277\11\31\314\345"
"\203W$\221H\42\221$\7C\42I\16\206b\343\241\17b\63\277\30\32\314\345\203W$\221H\42\221"
"$\7C\42I\16\206b\343A\256\362\325\1\277\31\33\314\345\203W$\221H\42\221$\7C\42I\16"
"\206b\343A\242\262\272Ju\277\33 \315\345\203\67\42$QDH\242\210\220$\23G\21!I&\216"
"\202\343!\203\223J\304\11\5\277\34#\316\345\203\67$\243\220\214B\62\31\71\12\311d\344(:\36\62"
"$\64$\62\42aLD\224\210L\0\277\35\35\314\345\203W$\221H\42\221$\7C\42I\16\206b"
"\343\301\255\302\202\302\242,\0\277@\32\215%\204#(IP\222\240$\7$AI\202\222\34\320C\5"
"';\60\277A\32\315\345\203#(IP\222\3\222\240$\7t\301a\7\366\0\7\302\71\1\277D\33"
"\315\345\203#(IP\222\3\222\240$\7t\301a\7\366\320\301\211\17D\0\277H\37\315\345\203#("
"IP\222\3\222\240$\7t\301a\7\366\0\7\302A\7B\301\7\42\0\277P!\315\345\203#(I"
"P\222\3\222\240$\7t\301a\7\366\0\7BqAqAqA\7\42\0\277Q!\315\345\203#("
"IP\222\3\222\240$\7t\301a\7\366\0qAqA\7BqA\7\42\0\277U\35\315\345\203#"
"(IP\222\3\222\240$\7t\301a\7\366\10\352\242\302\242\342\212\0\277\224\36\314\345\203\67V&\211"
"L\22\231$\7#\62Id\222\34\214\4\205\5\205\35P\304&\277\260\37\215%\204#(IP\222\240"
"$\7$AI\202\222\34P\305\4\306\4\306\4\306\4\35\30\277\305\37\315\345\203#(IP\222\3\222"
"\240$\7T\61\201\61A\7\366\10\352\242\302\242\342\212\0\277\314\31\253\351\203!(H(H(\350\300"
"(H(\350\240\366\200*\64+\0\277\315\31\315\345\203#(IP\222\3\222\240$\7\344\7f\301\201"
"\7\302\71\1\277\320\35\315\345\203#(IP\222\3\222\240$\7\364\300\7f\301\201\61\201\301\301\7\42"
"\0\277\324\36\315\345\203#(IP\222\3\222\240$\7\344\7f\301\201\7\302A\7B\301\7\42\0\277"
"\334 \315\345\203#(IP\222\3\222\240$\7\344\7f\301\201\7BqAqAqA\7\42\0\277"
"\337\35\315\345\203#(IP\222\3\222\240$\7\344\7f\301\361\240\301\261\21\201\62A\0\277\341\35\315"
"\345\203#(IP\222\3\222\240$\7\344\7f\301\361\200uQaQqE\0\300< \255\345\203#"
"(IP\222\240$\7$AI\202\222\34\220\37\30\305\4\306\4\306\4\306\4\1\300Q\37\315\345\203#"
"(IP\222\3\222\240$\7\344\7F\61\201\61\361`uQaQqE\0\300X\30M\245\204#("
"IP\222\240$\7$AI\202\222\34\320\3\37\30\300\134\32\315\345\203#(IP\222\3\222\240$\7"
"\364\300\7\366\320\301\211\17D\0\300`\36\315\345\203#(IP\222\3\222\240$\7\364\300\7\366\0\7"
"\302A\7B\301\7\42\0\300h \315\345\203#(IP\222\3\222\240$\7\364\300\7\366\0\7Bq"
"AqAqA\7\42\0\300i \315\345\203#(IP\222\3\222\240$\7\364\300\7\366\0qAq"
"A\7BqA\7\42\0\300\220\31\253\351\203\65T$\215H\32\221\64\7\61\42iD\322\34\304\204\346"
"\0\300\221\31\314\345\203W$\221H\42\221D\7A\42\211\16\202b\343\241\17b\63\300\224\31\314\345\203"
"W$\221H\42\221D\7A\42\211\16\202b\223\307\246=\30\300\230\36\314\345\203W$\221H\42\221D"
"\7A\42\211\16\202b\343!\16b\203\16\202b\17\2\300\240\32\314\345\203W$\221H\42\221D\7A"
"\42\211\16\202b\343A\256\362\325\1\300\241\33\314\345\203W$\221H\42\221D\7A\42\211\16\202b\343"
"A\242\262\272Ju\300\243 \315\345\203\67\42$QDH\242\210\220D\21G\21!\211\42\216\202\343!"
"\203\223J\304\11\5\300\245\35\314\345\203W$\221H\42\221D\7A\42\211\16\202b\343\301\255\302\202\302"
"\242,\0\300\254\33\256\345\203\65:\60(\60(.*.\212&\42(*&\215THtn\0\300\255"
"\27\316\345\203\67:,Wb#\251B\204R\307C\35D\347\4\0\300\257\34\316\345\203\67:,Wb"
"#\251B\204R\307#)\12\14\12\214\211\210\213\220\11\300\260\27\316\345\203\67:,Wb#\251B\204"
"R\247\212\316\372@\4\0\300\263\27\316\345\203\67:,Wb#\251B\204R\307\203\335E\247>\1\300"
"\264\33\316\345\203\67:,Wb#\251B\204R\307C\35D\207\35\204E\37\204\0\300\265\35\316\345\203"
"\67:,Wb#\251B\204R\307\203T\324E\305T\305D\306T\205\0\300\266\37\316\345\203\67:,"
"Wb#\251B\204R\307\203T\324E\304\304T\304\244\212\211\251(\1\300\274\33\316\345\203\67:,W"
"b#\251B\204R\307\203\335E\305E\305E\305\235\0\300\275\33\316\345\203\67:,Wb#\251B\204"
"R\307\203E\305E\305\335E\305\235\0\300\277\31\316\345\203\67:,Wb#\251B\204R\307\303F\247"
"\225\10\24\212\0\300\300\36\316\345\203\67:,Wb#\251B\204R\307C\206\204\206DF$\214\211\210"
"\22\221\11\300\301\30\316\345\203\67:,Wb#\251B\204R\307\243\262\13\313\316\6\0\300\305\30\316\345"
"\203\67:,Wb#\251B\204R\307\203\335E\337E\237\0\300\310&\256\345\203\65$\64$*($"
"*($(*$(\212&\42($M\222\251\220\244!\241!\241!\241!\1\300\311\35\314\345\203\63"
"\42\62\42(EP\212\30\241\221\64\21C!\21\221\21\361\20\7\261\71\300\314\37\314\345\203\63\42\62\42"
"(EP\212\30\241\221\64\21C!\21\221\21\221\21\61\261\331\36\10\300\320\42\314\345\203\63\42\62\42("
"EP\212\30\241\221\64\21C!\21\221\21\361\20\7\261A\7A\261\7\1\300\330\36\314\345\203\63\42\62"
"\42(EP\212\30\241\221\64\21C!\21\221\21\361 W\371\352\0\300\331\37\314\345\203\63\42\62\42("
"EP\212\30\241\221\64\21C!\21\221\21\361 QY]\245:\300\333$\316\345\203\63\42\66\42,("
"\42,(\42Jh($&\42D($\42\66\42\36\70:\255D\240P\0\300\334*\316\345\203\63\42"
"\66\42,(\42,(\42Jh($&\42D($\42\66\42\36\62$\64$\62\42aLD\224\210"
"L\0\300\335\37\314\345\203\63\42\62\42(EP\212\30\241\221\64\21C!\21\221\21\361\10\312\242\62\253"
"\0\300\344\33\256\345\203\65:\60(\60(.\212(*,\42(*&\306*$:\67\0\300\345\27\316"
"\345\203\67:,\263\31\261\240\220\250\242\324\361P\7\321\71\1\300\350\30\316\345\203\67:,\263\31\261\240"
"\220\250\242\324\361@\321Y\37\210\0\300\354\34\316\345\203\67:,\263\31\261\240\220\250\242\324\361P\7\321"
"a\7a\321\7!\0\300\364\34\316\345\203\67:,\263\31\261\240\220\250\242\324\361`wQqQqQ"
"q'\0\300\365\34\316\345\203\67:,\263\31\261\240\220\250\242\324\361`QqQqwQq'\0\300"
"\367\32\316\345\203\67:,\263\31\261\240\220\250\242\324\361\260\321i%\2\205\42\0\300\371\30\316\345\203\67"
":,\263\31\261\240\220\250\242\324\361\250\354\302\262\263\1\301\0&\256\345\203\65$\64$*($*("
"$(\212(*$&\42($M\214UH\322\220\320\220\320\220\320\220\0\301\4\37\314\345\203\63\42\62"
"\42(EP\320\214PDH\232\242\220\210\310\210\310\210\230\330l\17\4\301\10\42\314\345\203\63\42\62\42"
"(EP\320\214PDH\232\242\220\210\310\210x\210\203\330\240\203\240\330\203\0\301\20\35\314\345\203\63\42"
"\62\42(EP\320\214PDH\232\242\220\210\310\210x\220\253|u\301\25\37\314\345\203\63\42\62\42("
"EP\320\214PDH\232\242\220\210\310\210x\4eQ\231U\0\301\34\30\256\345\203;U\134T\134P"
"`P\24MD\134HL\330T\352\34\301\35\26\314\345\203\67QXPX\214\320H\252\241\264\361\320\7"
"\261\31\301\36\27\314\345\203\67QXPX\214\320H\252\241\264\361\240\25U\371\0\301\37\35\316\345\203\67"
":,WBC!Q!B\251\343\221\24\5\6\5\306D\304E\310\4\301 \26\314\345\203\67QXP"
"X\214\320H\252\241\264\361\260\331\36\14\301#\27\314\345\203\67QXPX\214\320H\252\241\264\361 W"
"\261i\17\301$\33\314\345\203\67QXPX\214\320H\252\241\264\361\20\7\261A\7A\261\7\1\301&"
"\36\314\345\203\67QXPX\214\320H\252\241\264\321\25U\21\61\21\25\61\21Q\61\21\15\301'\35\314"
"\345\203\67QXPX\214\320H\252\241\264\321\25\61Q\21\61\21-\242b\42\32\301,\27\314\345\203\67"
"QXPX\214\320H\252\241\264\361 W\371\352\0\301-\30\314\345\203\67QXPX\214\320H\252\241"
"\264\361 QY]\245:\301/\34\315\345\203\67\70*,*,Hh&$*B(q<dpR"
"\211\70\241\0\301\60\37\316\345\203\67:,WBC!Q!B\251\343!CBC\42#\22\306DD"
"\211\310\4\301\61\32\314\345\203\67QXPX\214\320H\252\241\264\361\340VaAaQ\26\0\301\66\33"
"\314\345\203\67QXPX\214\320H\252\241\264\361\300\7R\61q\61Q\7\2\301\70(\256\345\203\67\42"
"\66\42*ET\212\240\260\210\240\240\211\230\210\250\210\220\230\240\210\251\230\210\330\210\330\210\330\210\330\210\0"
"\301\71\36\314\345\203\63\42\62\42(EP\212\30\221\211\220\64\21C!\21\221\21\361\20\7\261\71\301<"
"\37\314\345\203\63\42\62\42(EP\212\30\221\211\220\64\21C!\21\221\21\361\0\261\331\36\10\301@#"
"\314\345\203\63\42\62\42(EP\212\30\221\211\220\64\21C!\21\221\21\361\20\7\261A\7A\261\7\1"
"\301H\37\314\345\203\63\42\62\42(EP\212\30\221\211\220\64\21C!\21\221\21\361 W\371\352\0\301"
"I \314\345\203\63\42\62\42(EP\212\30\221\211\220\64\21C!\21\221\21\361 QY]\245:\301"
"K%\316\345\203\63\42\66\42,(\42,(\42Jd\42($&\42D($\42\66\42\36\70:\255"
"D\240P\0\301L+\316\345\203\63\42\66\42,(\42,(\42Jd\42($&\42D($\42\66"
"\42\36\62$\64$\62\42aLD\224\210L\0\301M \314\345\203\63\42\62\42(EP\212\30\221\211"
"\220\64\21C!\21\221\21\361\10\312\242\62\253\0\301T\30\256\345\203;U\134T\134P\24Q`LD"
"\134HL\214U\352\34\301U\26\314\345\203\67QXP\320\214XH\232\242\264\361\320\7\261\31\301X\26"
"\314\345\203\67QXP\320\214XH\232\242\264\311c\323\36\14\301\134\33\314\345\203\67QXP\320\214X"
"H\232\242\264\361\20\7\261A\7A\261\7\1\301d\27\314\345\203\67QXP\320\214XH\232\242\264\361"
" W\371\352\0\301e\30\314\345\203\67QXP\320\214XH\232\242\264\361 QY]\245:\301g\34"
"\315\345\203\67\70*,*hH,&$fB(q<dpR\211\70\241\0\301h \316\345\203\67"
":,\243)\261\240\220\230\21\241\324\361\220!\241!\221\21\11c\42\242Dd\2\301i\32\314\345\203\67"
"QXP\320\214XH\232\242\264\361\340VaAaQ\26\0\301p(\256\345\203\67\42\66\42*ET"
"\212\240\240\211\240\260\210\230\210\250\210\220\230\220\211\251\230\210\330\210\330\210\330\210\330\210\0\301t \314\345"
"\203\63\42\62\42(EP\310D\214PDH\212E!\21\221\21\221\21\61\261\331\36\10\301x#\314\345"
"\203\63\42\62\42(EP\310D\214PDH\212E!\21\221\21\361\20\7\261A\7A\261\7\1\301\205"
" \314\345\203\63\42\62\42(EP\310D\214PDH\212E!\21\221\21\361\10\312\242\62\253\0\301\214"
"\26\215%\204/\70\66\70\66\42\62&L*\36.\70\331\201\1\301\215\27\315\345\203/\70V\64$N"
"(\62\70\354\300\36\340@\70'\0\301\216\34\315\345\203/\70V\64$N(\62\70\354\300\36\270\242,"
"*,*,*\2\0\301\220\30\315\345\203/\70V\64$N(\62\70\354\300\36:\70\361\201\10\0\301"
"\224\34\315\345\203/\70V\64$N(\62\70\354\300\36\340@\70\350@(\370@\4\0\301\226 \315\345"
"\203/\70V\64$N(\62\70\354\300\274\242,\42&\244\42&$*&\244\242\2\0\301\234\36\315\345"
"\203/\70V\64$N(\62\70\354\300\36\340@(.(.(.\350@\4\0\301\235\36\315\345\203/"
"\70V\64$N(\62\70\354\300\36 .(.\350@(.\350@\4\0\301\237\32\315\345\203/\70V"
"\64$N(\62\70\354\300\36IplD\240L\20\0\301\241\32\315\345\203/\70V\64$N(\62\70"
"\354\300\36A]TXT\134\21\0\301\245\34\315\345\203/\70V\64$N(\62\70\354\300\36\340@("
"\370@(\370@\4\0\301\250\42\316\345\203\65:\60(\60(.*.*,\42\210$&\215TH\134"
"T\134T\314\201Dt\32\0\301\251\33\316\345\203+]T\230T\222\240\11\241\230\260\234\34L\304C\35"
"D\347\4\0\301\254\33\316\345\203+]T\230T\222\240\11\241\230\260\234\34L\304\3Eg} \2\301"
"\260\37\316\345\203+]T\230T\222\240\11\241\230\260\234\34L\304C\35D\207\35\204E\37\204\0\301\275"
"\34\316\345\203+]T\230T\222\240\11\241\230\260\234\34L\304\243\262\13\313\316\6\0\301\304,\316\345\203"
"\65$\64$*($*($(*$(*$&\42\210$&\311TH\242\250\220\240\250\220\203\211"
"\220\320\220\320\220\0\301\310!\314\345\203+&\42*&\42H&\42&$dB(\42Q\212\240\24\7"
"\22\351\1b\263=\20\301\314%\314\345\203+&\42*&\42H&\42&$dB(\42Q\212\240\24"
"\7\22\351!\16b\203\16\202b\17\2\301\324!\314\345\203+&\42*&\42H&\42&$dB("
"\42Q\212\240\24\7\22\351A\256\362\325\1\301\327&\315\345\203+&\42,&\42J&\42($dD"
"(\42UPDTPD\304ADz\310\340\244\22qB\1\301\330,\316\345\203+&\42.&\42L"
"&\42*$dF(\42YPDXPD\310ADz\310\220\320\220\310\210\204\61\21Q\42\62\1\301"
"\340\34\314\345\203\67U\216\302\202\302b\42\242Bb\202\246b\202\302\202\302\16(b\23\301\344\33\314\345"
"\203+GR\61!A\21B\61AaAa\7\24\361\0\261\331\36\10\301\350\37\314\345\203+GR\61"
"!A\21B\61AaAa\7\24\361\20\7\261A\7A\261\7\1\301\360\33\314\345\203+GR\61!"
"A\21B\61AaAa\7\24\361 W\371\352\0\301\361\34\314\345\203+GR\61!A\21B\61A"
"aAa\7\24\361 QY]\245:\301\363 \315\345\203+YT\224TPHP\210PLTXT"
"X\304\301D<dpR\211\70\241\0\301\374\33\215%\204/\70\66\70\66\42\62&L*.&\60&"
"\60&\60&\350\300\0\301\375\31\315\345\203/\70V\64$N(.&\60&\350\300\36\340@\70'\0"
"\302\0\32\315\345\203/\70V\64$N(.&\60&\350\300\36:\70\361\201\10\0\302\4\36\315\345\203"
"/\70V\64$N(.&\60&\350\300\36\340@\70\350@(\370@\4\0\302\14 \315\345\203/\70"
"V\64$N(.&\60&\350\300\36\340@(.(.(.\350@\4\0\302\15 \315\345\203/\70"
"V\64$N(.&\60&\350\300\36 .(.\350@(.\350@\4\0\302\17\34\315\345\203/\70"
"V\64$N(.&\60&\350\300\36IplD\240L\20\0\302\21\34\315\345\203/\70V\64$N"
"(.&\60&\350\300\36A]TXT\134\21\0\302\30\26\253\351\203-\64\62\64\62\42.&H*"
"\372\200*\64+\0\302\31\27\315\345\203/\70V\64$N(\36\342\300,\70\360@\70'\0\302\34\32"
"\315\345\203/\70V\64$N(\36\374\300,\70\60&\60\70\370@\4\0\302\37\32\315\345\203/\70V"
"\64$N(\36\342\300,\70\360@(\70\361\201\10\0\302 \34\315\345\203/\70V\64$N(\36\342"
"\300,\70\360@\70\350@(\370@\4\0\302(\36\315\345\203/\70V\64$N(\36\342\300,\70\360"
"@(.(.(.\350@\4\0\302)\36\315\345\203/\70V\64$N(\36\342\300,\70\60.("
".\350@(.\350@\4\0\302+\33\315\345\203/\70V\64$N(\36\342\300,\70\36\64\70\66\42"
"P&\10\0\302-\33\315\345\203/\70V\64$N(\36\342\300,\70\36\260.*,*\256\10\0\302"
"/\33\315\345\203/\70V\64$N(\36\342\300,\70:\322\64\66\42P&\6\0\302\61\34\315\345\203"
"/\70V\64$N(\36\342\300,\70\360@(\370@(\370@\4\0\302\62\35\315\345\203/\70V\64"
"$N(\36\342\300,\70\36\354@,&\60&\354@\4\0\302\64 \314\345\203\67*GaAa\61"
"\21Q!\61AS\61\261\7\24AaA!EaAa\1\302H&\356\345\203+]T\230T\222\240"
"\30\241\230\350\220\203\211\270\20\272\250x\310\220\320\220\310\210\204\61\21Q\42\62\1\302P.\316\345\203\67"
"\42*ET\212\240\260\210\240\260\210\230\210\250\210\220\230\240\210\251\230\210\330\210\3\212Da\21A\61\24"
"Aa\21Aa\21\1\302Q#\354\345\203+&\42*&\42H&\42&$E\204PD\312\210\3\211"
"D\21\24A)\342\241\17b\63\302T+\354\345\203+&\42*&\42H&\42&$E\204PD\312"
"\210\310\210\3\211D)\202\42(\202R\204D\4E\204\304\306\36\14\302X(\354\345\203+&\42*&"
"\42H&\42&$E\204PD\312\210\3\211D\21\24A)\342!\16b\203\16\202b\17\2\302`$"
"\354\345\203+&\42*&\42H&\42&$E\204PD\312\210\3\211D\21\24A)\342A\256\362\325"
"\1\302e'\354\345\203+&\42*&\42H&\42&$E\204PD\312\210\3\211D\21\24A)\342"
"\301\255\302\202\302\242,\0\302l \314\345\203\67*GaAa\61\21Q!\61AS\61\261\7\24A"
"aAaAaAa\1\302m\31\354\345\203+GR\61!A\21B\61\261\7\24Q\331#:\210\315"
"\0\302p\34\354\345\203+GR\61!A\21B\61\261\261\7\24Q\371$\60$\66\366`\0\302t\35"
"\354\345\203+GR\61!A\21B\61\261\7\24Q\331\303\35\304\6\35\4\305\36\4\302|\31\354\345\203"
"+GR\61!A\21B\61\261\7\24Q\331\3^\345\253\3\302}\33\354\345\203+GR\61!A\21"
"B\61\261\7\24Q\331\3Feu\225\352\0\302\177 \355\345\203+YT\224TPHP\210PLp"
"\304\301DXTX<\202\340\244\22qB\1\302\201\34\354\345\203+GR\61!A\21B\61\261\7\24"
"Q\331\243\262\12\13\12\213\262\0\302\210\35\255\345\203/\70\66\70\66\42\62&L*\36\342\300(&\60"
"&\60&\60&\10\0\302\211\31\315\345\203/\70V\64$N(\36\342\300(&\60&\354@\70'\0"
"\302\220\36\315\345\203/\70V\64$N(\36\342\300(&\60&\354@\70\350@(\370@\4\0\302\230"
" \315\345\203/\70V\64$N(\36\342\300(&\60&\354@(.(.(.\350@\4\0\302\233"
"\35\315\345\203/\70V\64$N(\36\342\300(&\60&\36\60\70\66\42P&\10\0\302\235\35\315\345"
"\203/\70V\64$N(\36\342\300(&\60&\36\254.*,*\256\10\0\302\244\24M\245\204/\70"
"\66\70\66\42\62&L*\36\374\300\0\302\245\26\315\345\203/\70V\64$N(\36\374\300\36\340@\70"
"'\0\302\250\27\315\345\203/\70V\64$N(\36\374\300\36:\70\361\201\10\0\302\254\33\315\345\203/"
"\70V\64$N(\36\374\300\36\340@\70\350@(\370@\4\0\302\255\34\315\345\203/\70V\64$N"
"(\36\374\300\274\242,*\244*$\62\244*\2\0\302\264\35\315\345\203/\70V\64$N(\36\374\300"
"\36\340@(.(.(.\350@\4\0\302\265\35\315\345\203/\70V\64$N(\36\374\300\36 ."
"(.\350@(.\350@\4\0\302\267\31\315\345\203/\70V\64$N(\36\374\300\36IplD\240"
"L\20\0\302\271\31\315\345\203/\70V\64$N(\36\374\300\36A]TXT\134\21\0\302\334\26\254"
"\345\203\67U\216\302\202\302b\42\242Bb\202\246bbs\302\335\26\314\345\203\67QXPX\214XH"
"\252\241\264\361\320\7\261\31\302\340\26\314\345\203\67QXPX\214XH\252\241\264\311c\323\36\14\302\343"
"\27\314\345\203\67QXPX\214XH\252\241\264\361 W\261i\17\302\344\33\314\345\203\67QXPX"
"\214XH\252\241\264\361\20\7\261A\7A\261\7\1\302\353\37\316\345\203\67:,WbA!Q!B"
"\251\343A\212\2#.jf\302bBjF\0\302\354\27\314\345\203\67QXPX\214XH\252\241\264"
"\361 W\371\352\0\302\355\30\314\345\203\67QXPX\214XH\252\241\264\361 QY]\245:\302\357"
"\34\315\345\203\67\70*,*,H,&$*B(q<dpR\211\70\241\0\302\361\32\314\345\203"
"\67QXPX\214XH\252\241\264\361\340VaAaQ\26\0\302\366\33\314\345\203\67QXPX\214"
"XH\252\241\264\361\300\7R\61q\61Q\7\2\302\370\42\257\341\203\67<.&$.&$.&$"
"L$\206&\42MTLDH\214\210LDxn\0\302\371\34\316\345\203\67:($*($*F"
"\42l\42\253\220\214\242\343\241\16\242s\2\302\373\42\316\345\203\67:($*($*F\42l\42\253"
"\220\214\242\343\221\24\5\6\5\306D\304E\310\4\302\374\34\316\345\203\67:($*($*F\42l"
"\42\253\220\214\242SEg} \2\303\0!\316\345\203\67:($*($*F\42l\42\253\220\214"
"\242\343\241\16\242\303\16\302\242\17B\0\303\10!\316\345\203\67:($*($*F\42l\42\253\220"
"\214\242\343\301\356\242\342\242\342\242\342N\0\303\11!\316\345\203\67:($*($*F\42l\42\253"
"\220\214\242\343\301\242\342\242\342\356\242\342N\0\303\14$\316\345\203\67:($*($*F\42l\42"
"\253\220\214\242\343!CBC\42#\22\306DD\211\310\4\303\15\35\316\345\203\67:($*($*"
"F\42l\42\253\220\214\242\343Q\331\205eg\3\303\23 \316\345\203\67:($*($*F\42l"
"\42\253\220\214\242\343\1#\17\344\12\243\2\213\0\303\24+\257\341\203\67$\66$(&$QLH\242"
"\230\220\64\42\61\64\21iB\322D\204\204\214\310D\204\304\206\304\206\304\206\304\206\4\303\25 \314\345\203"
"\63\42\62\42$MDH\232\210\10\211\240\211l\42D\262\210\214\210\207\70\210\315\1\303\30\42\314\345\203"
"\63\42\62\42$MDH\232\210\10\211\240\211l\42D\262\210\214\210\214\210\211\315\366@\0\303\34$\314"
"\345\203\63\42\62\42$MDH\232\210\10\211\240\211l\42D\262\210\214\210\207\70\210\15:\10\212=\10"
"\303$ \314\345\203\63\42\62\42$MDH\232\210\10\211\240\211l\42D\262\210\214\210\7\271\312W\7"
"\303%\42\314\345\203\63\42\62\42$MDH\232\210\10\211\240\211l\42D\262\210\214\210\7\211\312\352*"
"\325\1\303(+\316\345\203\63\42\66\42($&\42($&\42F\42h&\42MDH.b#\342"
"!CBC\42#\22\306DD\211\310\4\303)\42\314\345\203\63\42\62\42$MDH\232\210\10\211\240"
"\211l\42D\262\210\214\210GP\26\225Y\5\0\303E\36\316\345\203\67:($*($jB\42,"
"&\42\25I\242\350xTva\331\331\0\303h\37\257\341\203=QLTPLTPLT\214H\14"
"MD\262\220\230\210\250\21\231\240\360\34\303i\31\314\345\203\67I\252\220T\21\22A\23Y\211$\212\215"
"\207>\210\315\0\303l\31\314\345\203\67I\252\220T\21\22A\23Y\211$\212\215\207\315\366`\0\303p"
"\35\314\345\203\67I\252\220T\21\22A\23Y\211$\212\215\207\70\210\15:\10\212=\10\303r \314\345"
"\203\67I\252\220T\21\22A\23Y\211$\212\215\256\250\212\210\211\250\210\211\210\212\211h\303x\31\314\345"
"\203\67I\252\220T\21\22A\23Y\211$\212\215\7\271\312W\7\303y\33\314\345\203\67I\252\220T\21"
"\22A\23Y\211$\212\215\7\211\312\352*\325\1\303|%\316\345\203\67:($*($*F\42h"
"&\42UHF\321\361\220!\241!\221\21\11c\42\242Dd\2\303}\34\314\345\203\67I\252\220T\21"
"\22A\23Y\211$\212\215\7\267\12\13\12\213\262\0\303\204-\257\341\203\71\42\70\42(&EPL\212"
"\240\230\24\61\42!\23\61\21\211\42Bb\42b\42FdB\42\202#\202#\202#\202#\2\303\210!"
"\314\345\203\63\42\62\42$MDH\232\210\10\211\220\211\334D\210d\21\31\21\17\20\233\355\201\0\303\214"
"$\314\345\203\63\42\62\42$MDH\232\210\10\211\220\211\334D\210d\21\31\21\17q\20\33t\20\24"
"{\20\303\300\42\314\345\203\63\42\62\42$MDH\212\211\10\211\240\210\134L\210d\21\31\21\31\21\23"
"\233\355\201\0\303\330\33m%\204+&\60&\60&N$\60\42]LD\220\210L`p\262\3\3\303"
"\331\31\255\345\203+&\60&.&.\42\253\230\204a\7\366\0\7\302\71\1\303\334\32\255\345\203+&"
"\60&.&.\42\253\230\204a\7\366\320\301\211\17D\0\303\337\34\255\345\203+&\60&.&.\42"
"\253\230\204a\7\366\0\7B\301\211\17D\0\303\340\36\255\345\203+&\60&.&.\42\253\230\204a"
"\7\366\0\7\302A\7B\301\7\42\0\303\342\42\255\345\203+&\60&.&.\42\253\230\204a\7\346"
"\25e\21\61!\25\61!Q\61!\25\25\0\303\350 \255\345\203+&\60&.&.\42\253\230\204a"
"\7\366\0\7BqAqAqA\7\42\0\303\351 \255\345\203+&\60&.&.\42\253\230\204a"
"\7\366\0qAqA\7BqA\7\42\0\303\355\34\255\345\203+&\60&.&.\42\253\230\204a"
"\7\366\10\352\242\302\242\342\212\0\303\364)\317\341\203\67<.&$.&$.&$L$&,\42"
"\15ILDH\214\210LD`T`T\320\201Dx\32\0\303\365\34\316\345\203'\253\230D\61A\61"
"\21\331\320$\11\313\311\301D<\324AtN\0\303\370\35\316\345\203'\253\230D\61A\61\21\331\320$"
"\11\313\311\301D<Pt\326\7\42\0\304\10$\316\345\203'\253\230D\61A\61\21\331\320$\11\313\311"
"\301D<dHhHdD\302\230\210(\21\231\0\304\20\60\317\341\203\67$\66$(&$QLH"
"\242\230\220\64\42\61!\61\21iHb\42BBFd\42B\242\222D%\211\70\220\10\211\15\211\15\11"
"\304$-\316\345\203'E\252\230\210D\61!\21\61\21Y\214\304\304H\204\5E\204\5E\204\34D\244"
"\207\14\11\15\211\214H\30\23\21%\42\23\304,#\315\341\203\71QL\242\230D\61iD\202b\42\22"
"\205\304D\304\214\310\204D\205E\205E\34L\4'\304\60\33\314\345\203'\237\304\4E\344F&IP"
"XP\330\1E<@l\266\7\2\304\64\37\314\345\203'\237\304\4E\344F&IPXP\330\1E"
"<\304Al\320AP\354A\0\304<\32\314\345\203'\237\304\4E\344F&IPXP\330\1E<"
"\310U\276:\304=\34\314\345\203'\237\304\4E\344F&IPXP\330\1E<HTVW\251\16"
"\304H\37m%\204+&\60&\60&N$\60\42]LD\220\304D\262\230\300\230\300\230\240\3\3\304"
"d\33\253\351\203)&,&,&J$,\42ULD\210\232\340\3\252\320\254\0\304e\31\255\345\203"
"+&\60&.&.\42\253\230$\7f\301\201\7\302\71\1\304h\35\255\345\203+&\60&.&."
"\42\253\230\364\0\7f\301\201\61\201\301\301\7\42\0\304l\36\255\345\203+&\60&.&.\42\253\230"
"$\7f\301\201\7\302A\7B\301\7\42\0\304t \255\345\203+&\60&.&.\42\253\230$\7"
"f\301\201\7BqAqAqA\7\42\0\304u \255\345\203+&\60&.&.\42\253\230$\7"
"f\301\201qAqA\7BqA\7\42\0\304y\35\255\345\203+&\60&.&.\42\253\230$\7"
"f\301\361\200uQaQqE\0\304\200'\315\341\203\71(&QL\242\230\64\42A\61\21\211Bb"
"\42bFdB\202#\16&\242\302\242B\252\302\242\302\2\304\224)\356\345\203\67*&UL\242\230\240"
"\230\210lBb\222\204\34L\304\205\320E\305C\206\204\206DF$\214\211\210\22\221\11\304\234\64\317\341"
"\203\71\42(&EPL\212\240\230\24\61\42A\21\61\21\211\42Bb\42b\42FdB\42\202#\42"
"\16&R\205ED\305PD\205ED\205E\4\304\270'\315\341\203\71(&QL\242\230\64\42A\61"
"\21\211Bb\42bFdB\202#\16&\242\302\242\302\242\302\242\302\2\304\274\33\354\345\203\67&\237\304"
"\4E\344F&I\354\1ET>\11\14\211\215=\30\304\351\37\255\345\203+&\60&.&.\42\253"
"\230$\7F\61\201\61\361`uQaQqE\0\304\360\32-\245\204+&\60&\60&N$\60\42"
"]LD\220\210L<\300\201\1\304\361\31\255\345\203+&\60&.&.\42\253\230\364\0\7\366\0\7"
"\302\71\1\304\364\32\255\345\203+&\60&.&.\42\253\230\364\0\7\366\320\301\211\17D\0\304\370\36"
"\255\345\203+&\60&.&.\42\253\230\364\0\7\366\0\7\302A\7B\301\7\42\0\304\372\42\255\345"
"\203+&\60&.&.\42\253\230\364\0\7\346\25e\21\61!\25\61!Q\61!\25\25\0\304\377 "
"\255\345\203+&\60&.&.\42\253\230\364\0\7\346\65\201\7\21%\63Q\61!%#\0\305\0 "
"\255\345\203+&\60&.&.\42\253\230\364\0\7\366\0\7BqAqAqA\7\42\0\305\1 "
"\255\345\203+&\60&.&.\42\253\230\364\0\7\366\0qAqA\7BqA\7\42\0\305\14 "
"\315\341\203\71QL\242\230D\61iD\202b\42\22\205\304D\304\214\310\204\4G\34L\4g\305\20\31"
"\314\345\203'\237\304\4E\344F&Il\354\1E<@l\266\7\2\305\24\35\314\345\203'\237\304\4"
"E\344F&Il\354\1E<\304Al\320AP\354A\0\305\34\30\314\345\203'\237\304\4E\344F"
"&Il\354\1E<\310U\276:\305(\35\255\341\203\71QL\242\230D\61iD\202b\42\22\205\304"
"D\304\214\310\204\4\347\0\305)\31\314\345\203\67I\252\220T\21\22a\21Y\211$\212\215\207>\210\315"
"\0\305,\31\314\345\203\67I\252\220T\21\22a\21Y\211$\212M\36\233\366`\0\305\60\35\314\345\203"
"\67I\252\220T\21\22a\21Y\211$\212\215\207\70\210\15:\10\212=\10\305\70\31\314\345\203\67I\252"
"\220T\21\22a\21Y\211$\212\215\7\271\312W\7\305\71\33\314\345\203\67I\252\220T\21\22a\21Y"
"\211$\212\215\7\211\312\352*\325\1\305; \315\345\203\67\70&$*&$*D\42,$\42UD"
"H\242\340x\310\340\244\22qB\1\305=\34\314\345\203\67I\252\220T\21\22a\21Y\211$\212\215\7"
"\267\12\13\12\213\262\0\305D\31\256\345\203\65:\212(\233d!\61a!e!Ai\242\210\242s\3"
"\305E\32\315\351\203\65\206*$(IP\222\240 \242\64T\301\361\60\7\301\71\1\305H\32\315\351\203"
"\65\206*$(IP\222\240 \242\64T\301\211\202\63>\20\1\305I \315\351\203\65\206*$(I"
"P\222\240 \242\64T\301\361\340A\65qAaB\24\42\22\0\305J#\316\351\203\65\210*&(M"
"P\232\240\240\211\240DT\321\361@qQA'aCQ\61\61%#\0\305L\37\315\351\203\65\206*"
"$(IP\222\240 \242\64T\301\361\60\7\301Q\7Q\301\7!\0\305M!\315\351\203\65\206*$"
"(IP\222\240 \242\64T\301\361\0\25eQ!U!\221!U!\0\305N$\315\351\203\65\206*"
"$(IP\222\240 \242\64T\301\361\0\25e\21\61!\25\61!Q\61!\25%\0\305S#\316\351"
"\203\65\210*&(MP\232\240\240\211\240DT\321\361\60E\201\21\27\65\63a\61!\65#\0\305T"
"\37\315\351\203\65\206*$(IP\222\240 \242\64T\301\361@gQaQaQa'\0\305U\37"
"\315\351\203\65\206*$(IP\222\240 \242\64T\301\361@QaQagQa'\0\305W\35\315"
"\351\203\65\206*$(IP\222\240 \242\64T\301\361\220\301I%\342\204\42\0\305X\42\315\351\203\65"
"\206*$(IP\222\240 \242\64T\301\361p!\221!\201\21\351b\42\202Dd\2\305Y\34\315\351"
"\203\65\206*$(IP\222\240 \242\64T\301\361H\314R\205\205\331\0\305]\34\315\351\203\65\206*"
"$(IP\222\240 \242\64T\301\361@g\301g\301'\0\305^\37\315\351\203\65\206*$(IP"
"\222\240 \242\64T\301\361\10\16\304b\2c\302\16D\0\305`(\256\345\203\65$\64$\204($\42"
"(&D,$D,\244,$EPLH\10QHhHhHhHhH\0\305a\37\313\351\203"
"\61\42\202&B($B($B(\204($\42\202&\42\60\42\374 \64\7\305d\42\313\351\203\61"
"\42\202&B($B($B(\204($\42\202&\42\60\42\60\42$\64\323\3\1\305h$\313\351"
"\203\61\42\202&B($B($B(\204($\42\202&\42\60\42\374 \64\346 &\364 \0\305"
"p%\313\351\203\61\42\202&B($B($B(\204($\42\202&\42\60\42\36\340(*(*"
"(*\350\0\305q%\313\351\203\61\42\202&B($B($B(\204($\42\202&\42\60\42\36"
" *(*\350(*\350\0\305s'\315\351\203\61\42\206&\42$($\42$($\42$(d$"
"($\42\206&\42\64\42\36\64\70\251D\234P\0\305t-\315\351\203\61\42\206&\42$($\42$"
"($\42$(d$($\42\206&\42\64\42\36.$\62$\60\42]LD\220\210L\0\305u#"
"\313\351\203\61\42\202&B($B($B(\204($\42\202&\42\60\42\36\270*QTT\5\0"
"\305|\31\256\345\203\65:\212(\233d!e!\61a!AiH\210\242s\3\305}\33\315\351\203\65"
"\206*$(IP\20Q\222\240\240\11\252\340x\230\203\340\234\0\305\200\34\315\351\203\65\206*$(I"
"P\20Q\222\240\240\11\252\340x\220\340\214\17D\0\305\204 \315\351\203\65\206*$(IP\20Q\222"
"\240\240\11\252\340x\230\203\340\250\203\250\340\203\20\0\305\207%\315\351\203\65\206*$(IP\20Q\222"
"\240\240\11\252\340x\200\212\230\260\210\230\220\212\222\250\230\220\212\22\0\305\214 \315\351\203\65\206*$("
"IP\20Q\222\240\240\11\252\340x\240\263\250\260\250\260\250\260\23\0\305\215 \315\351\203\65\206*$("
"IP\20Q\222\240\240\11\252\340x\240\250\260\250\260\263\250\260\23\0\305\217\36\315\351\203\65\206*$("
"IP\20Q\222\240\240\11\252\340x\310\340\244\22qB\21\0\305\221\35\315\351\203\65\206*$(IP"
"\20Q\222\240\240\11\252\340x$f\251\302\302l\0\305\225\35\315\351\203\65\206*$(IP\20Q\222"
"\240\240\11\252\340x\240\263\340\263\340\23\0\305\227\37\315\351\203\65\206*$(IP\20Q\222\240\240\11"
"\252\340x\260\300\3\261\272\250\270\42\0\305\230'\256\345\203\65$\64$\204($\42(&D,\244,"
"$D,$EP\14\11QHhHhHhHhH\0\305\234!\313\351\203\61\42\202&B($"
"B(\204($B(d\202&\42\60\42\60\42$\64\323\3\1\305\240#\313\351\203\61\42\202&B("
"$B(\204($B(d\202&\42\60\42\374 \64\346 &\364 \0\305\251$\313\351\203\61\42\202"
"&B($B(\204($B(d\202&\42\60\42\36 *(*\350(*\350\0\305\264\31\256\345"
"\203;\11]DP\230X\224XHYTDPX\10]t\16\305\265\30\313\351\203\65\202J(H("
"H(\204(\5Uh<\350Ah\6\305\270\31\313\351\203\65\202J(H(H(\204(\5Uh<"
"`h\322\203\1\305\271 \314\351\203\65\204*\42(EP\212\240\220\211\240$T\261\361\240Q\25\201!"
"q\42\25\42\2\305\273\31\313\351\203\65\202J(H(H(\204(\5Uh<\300Qh\322\3\305\274"
"\34\313\351\203\65\202J(H(H(\204(\5Uh\370Ah\314AL\350A\0\305\275\33\313\351\203"
"\65\202J(H(H(\204(\5UhlEQ\224\225\244U\0\305\276\36\313\351\203\65\202J(H"
"(H(\204(\5UhlEQD\214E\214T\214E\1\305\304\35\313\351\203\65\202J(H(H"
"(\204(\5Uh<\300QTPTPT\320\1\305\305\35\313\351\203\65\202J(H(H(\204("
"\5Uh<@TPT\320QT\320\1\305\306$\315\351\203\65\206*$(IP\222\240\220\221\240\64"
"T\301\361\0AI\202\222\30\205\4\305DDX\310\4\305\307\35\314\351\203\65\204*\42(EP\212\240"
"\220\211\240$T\261\361p\261)%\302\204\2\305\310#\315\351\203\65\206*$(IP\222\240\220\221\240"
"\64T\301\361p!\221!\201\21\351b\42\202Dd\2\305\311\34\313\351\203\65\202J(H(H(\204"
"(\5Uh<\254QXLX\220\5\0\305\312\34\313\351\203\65\202J(H(H(\204(\5Uh"
"<\300ah\240D\224P\0\305\314\31\313\351\203\65\202J(H(H(\204(\5Uh<\300i\320"
"i\2\305\316\35\313\351\203\65\202J(H(H(\204(\5Uh<\344\201PLXL\320\201\0\305"
"\320&\256\345\203\67\42\66\42\204*\42Q\12\261\230\10\261\210\11\261\230\210D)B\250\42b#b#"
"b#b#\2\305\321\37\313\351\203\61\42\202&B($B($B\210B($\42\202&\42\60\42"
"\374 \64\7\305\324 \313\351\203\61\42\202&B($B($B\210B($\42\202&\42\60\42:"
"\64\323\3\1\305\330$\313\351\203\61\42\202&B($B($B\210B($\42\202&\42\60\42\374"
" \64\346 &\364 \0\305\340%\313\351\203\61\42\202&B($B($B\210B($\42\202&"
"\42\60\42\36\340(*(*(*\350\0\305\341%\313\351\203\61\42\202&B($B($B\210B"
"($\42\202&\42\60\42\36 *(*\350(*\350\0\305\343'\315\351\203\61\42\206&\42$($"
"\42$($\42$\210\42$($\42\206&\42\64\42\36\64\70\251D\234P\0\305\345#\313\351\203\61"
"\42\202&B($B($B\210B($\42\202&\42\60\42\36\270*QTT\5\0\305\354\31\256"
"\345\203;\11]DP\230XHY\224XTDP\14\11]t\16\305\355\31\313\351\203\65\202J(H"
"(\204(H(d\202*\64\36\364 \64\3\305\356\36\313\351\203\65\202J(H(\204(H(d\202"
"*\64\36\256\242(*(*(*\0\305\360\31\313\351\203\65\202J(H(\204(H(d\202*\64"
"qh\322\203\1\305\364\35\313\351\203\65\202J(H(\204(H(d\202*\64\374 \64\346 &\364"
" \0\305\366\37\313\351\203\65\202J(H(\204(H(d\202*\64\266\242(\42\306\42F*\306\242"
"\0\305\367\37\313\351\203\65\202J(H(\204(H(d\202*\64\266\42&(\42\306\302*\306\242\0"
"\305\374\36\313\351\203\65\202J(H(\204(H(d\202*\64\36\340(*(*(*\350\0\305\375"
"\36\313\351\203\65\202J(H(\204(H(d\202*\64\36 *(*\350(*\350\0\305\376%\315"
"\351\203\65\206*$(IP\310HP\222\240\220\31\252\340x\200\240$AI\214B\202b\42\42,d"
"\2\305\377\36\314\351\203\65\204*\42(EP\310DP\212\240\220\21\252\330x\270\330\224\22aB\1\306"
"\0$\315\351\203\65\206*$(IP\310HP\222\240\220\31\252\340x\270\220\310\220\300\210t\61\21A"
"\42\62\1\306\1\35\313\351\203\65\202J(H(\204(H(d\202*\64\36\326(,&,\310\2\0"
"\306\5\33\313\351\203\65\202J(H(\204(H(d\202*\64\36\340(\364(\364\0\306\6\36\313\351"
"\203\65\202J(H(\204(H(d\202*\64\36\362@(&,&\350@\0\306\7\35\313\351\203\65"
"\202J(H(\204(H(d\202*\64\36$\354@\250*U\11\0\306\10'\256\345\203\67\42\66\42"
"\204*\42Q\12\261\210\11\261\230\10\261\230\210D!\23!T\21\261\21\261\21\261\21\261\21\1\306\14!"
"\313\351\203\61\42\202&B($B\210B($B\210\42\202&\42\60\42\60\42$\64\323\3\1\306\20"
"#\313\351\203\61\42\202&B($B\210B($B\210\42\202&\42\60\42\374 \64\346 &\364 "
"\0\306\30$\313\351\203\61\42\202&B($B\210B($B\210\42\202&\42\60\42\36\340(*("
"*(*\350\0\306\31$\313\351\203\61\42\202&B($B\210B($B\210\42\202&\42\60\42\36"
" *(*\350(*\350\0\306\33&\315\351\203\61\42\206&\42$($\42$\210\42$($\42$"
"\210\42\206&\42\64\42\36\64\70\251D\234P\0\306\34,\315\351\203\61\42\206&\42$($\42$\210"
"\42$($\42$\210\42\206&\42\64\42\36.$\62$\60\42]LD\220\210L\0\306$\26\255%"
"\204\251.*]P\134P\134T\272zd\301\311\16\14\306%\30\315\345\203\251.*,*,*\256\64"
"\70\354\300\36\340@\70'\0\306(\31\315\345\203\251.*,*,*\256\64\70\354\300\36:\70\361\201"
"\10\0\306,\35\315\345\203\251.*,*,*\256\64\70\354\300\36\340@\70\350@(\370@\4\0\306"
"-\36\315\345\203\251.*,*,*\256\64\70\354\300\274\242,*\244*$\62\244*\2\0\306.!"
"\315\345\203\251.*,*,*\256\64\70\354\300\274\242,\42&\244\42&$*&\244\242\2\0\306\60"
"\37\315\345\203\251.*,*,*\256\64\70\354\300\274(.(\246(&.\42\244B&\0\306\63\37"
"\315\345\203\251.*,*,*\256\64\70\354\300\274&\360 \242d&*&\244d\4\0\306\64\37\315"
"\345\203\251.*,*,*\256\64\70\354\300\36\340@(.(.(.\350@\4\0\306\65\37\315\345"
"\203\251.*,*,*\256\64\70\354\300\36 .(.\350@(.\350@\4\0\306\67\33\315\345\203"
"\251.*,*,*\256\64\70\354\300\36IplD\240L\20\0\306\71\33\315\345\203\251.*,*"
",*\256\64\70\354\300\36A]TXT\134\21\0\306;\34\315\345\203\251.*,*,*\256\64\70"
"\354\300\36*\322\64\66\42P&\6\0\306@%\316\345\203\65:\252&(*$&.\42&.\42&"
".\202\42*$\252&.*.*\346@\42:\15\0\306A\35\316\345\203\67\250(&*&U\314D"
"TLPQX\222\203\211x\250\203\350\234\0\306D\36\316\345\203\67\250(&*&U\314DTLP"
"QX\222\203\211x\240\350\254\17D\0\306H\42\316\345\203\67\250(&*&U\314DTLPQX"
"\222\203\211x\250\203\350\260\203\260\350\203\20\0\306P\42\316\345\203\67\250(&*&U\314DTLP"
"QX\222\203\211x\260\273\250\270\250\270\250\270\23\0\306Q\42\316\345\203\67\250(&*&U\314DT"
"LPQX\222\203\211x\260\250\270\250\270\273\250\270\23\0\306S \316\345\203\67\250(&*&U\314"
"DTLPQX\222\203\211x\330\350\264\22\201B\21\0\306T%\316\345\203\67\250(&*&U\314"
"DTLPQX\222\203\211x\310\220\320\220\310\210\204\61\21Q\42\62\1\306U\36\316\345\203\67\250("
"&*&U\314DTLPQX\222\203\211xTva\331\331\0\306\134-\316\345\203\65$\64$\244"
"&$\42*$D.\42D.\42D.\202\42*$IMHPTHPT\310\301DHhHh"
"H\0\306]\37\314\345\203\63\42\244$\42UDV\21\23Q\21IJ\42\202R\34H\244\207\70\210\315"
"\1\306` \314\345\203\63\42\244$\42UDV\21\23Q\21IJ\42\202R\34H\244\7\210\315\366@"
"\0\306l\37\314\345\203\63\42\244$\42UDV\21\23Q\21IJ\42\202R\34H\244\7\271\312W\7"
"\306o%\315\345\203\63\42\246$\42$*\42IT\304HTD\232\222\210\250\240\210\210\203\210\364\220\301"
"I%\342\204\2\306q\42\314\345\203\63\42\244$\42UDV\21\23Q\21IJ\42\202R\34H\244\7"
"\267\12\13\12\213\262\0\306x\36\314\345\203\67IQDT\214\134\210\134\210\134HDTLHQ\262\240"
"\260\3\212\330\4\306y\34\314\345\203\67\244(\42*&\42*&\42*&\244(\331\1E<\304Al"
"\16\306|\35\314\345\203\67\244(\42*&\42*&\42*&\244(\331\1E<@l\266\7\2\306\200"
"!\314\345\203\67\244(\42*&\42*&\42*&\244(\331\1E<\304Al\320AP\354A\0\306"
"\210\34\314\345\203\67\244(\42*&\42*&\42*&\244(\331\1E<\310U\276:\306\211\36\314\345"
"\203\67\244(\42*&\42*&\42*&\244(\331\1E<HTVW\251\16\306\213!\315\345\203\67"
"\246($*&$*&$*&\246(*,\342`\42\36\62\70\251D\234P\0\306\215 \314\345\203"
"\67\244(\42*&\42*&\42*&\244(\331\1E<\270UXPX\224\5\0\306\224\34\255%\204"
"\251.*]P\134P\134T\272z\260\230\300\230\300\230\300\230\240\3\3\306\225\32\315\345\203\251.*,"
"*,*\256\60&\60&\350\300\36\340@\70'\0\306\230\33\315\345\203\251.*,*,*\256\60&"
"\60&\350\300\36:\70\361\201\10\0\306\234\37\315\345\203\251.*,*,*\256\60&\60&\350\300\36"
"\340@\70\350@(\370@\4\0\306\244!\315\345\203\251.*,*,*\256\60&\60&\350\300\36\340"
"@(.(.(.\350@\4\0\306\245!\315\345\203\251.*,*,*\256\60&\60&\350\300\36"
" .(.\350@(.\350@\4\0\306\247\35\315\345\203\251.*,*,*\256\60&\60&\350\300"
"\36IplD\240L\20\0\306\251\35\315\345\203\251.*,*,*\256\60&\60&\350\300\36A]"
"TXT\134\21\0\306\260\27\253\351\203\247*M\134H\134H\134LTT\371\1UhV\0\306\261\30"
"\315\345\203\251.*,*,*\256\36\344\300,\70\360@\70'\0\306\264\33\315\345\203\251.*,*"
",*\256\36\301\201Yp`L`p\360\201\10\0\306\270\35\315\345\203\251.*,*,*\256\36\344"
"\300,\70\360@\70\350@(\370@\4\0\306\271\37\315\345\203\251.*,*,*\256\36\344\300,\70"
"\256\242,*\244*$\62\244*\2\0\306\272\42\315\345\203\251.*,*,*\256\36\344\300,\70\256"
"\242,\42&\244\42&$*&\244\242\2\0\306\300\37\315\345\203\251.*,*,*\256\36\344\300,"
"\70\360@(.(.(.\350@\4\0\306\301\37\315\345\203\251.*,*,*\256\36\344\300,\70"
"\60.(.\350@(.\350@\4\0\306\303\34\315\345\203\251.*,*,*\256\36\344\300,\70\36"
"\64\70\66\42P&\10\0\306\305\34\315\345\203\251.*,*,*\256\36\344\300,\70\36\260.*,"
"*\256\10\0\306\314#\314\345\203\67\244(\42*F.D.D.$\42*&\244(\366\200\42(,"
"(\244(,(,\0\306\315\36\354\345\203\245(\42*&\42*&\42*&\244(\366\200\42*\204*"
"=\364Al\6\306\320\37\354\345\203\245(\42*&\42*&\42*&\244(\66\366\200\42*\204*'"
"\261i\17\6\306\324#\354\345\203\245(\42*&\42*&\42*&\244(\366\200\42*\204*=\304A"
"l\320AP\354A\0\306\334\36\354\345\203\245(\42*&\42*&\42*&\244(\366\200\42*\204*"
"=\310U\276:\306\335 \354\345\203\245(\42*&\42*&\42*&\244(\366\200\42*\204*=H"
"TVW\251\16\306\340'\356\345\203\245(&*&UL\252\230\240\242\350\220\203\211\270\20\272\250x\310"
"\220\320\220\310\210\204\61\21Q\42\62\1\306\341\42\354\345\203\245(\42*&\42*&\42*&\244(\366"
"\200\42*\204*=\270UXPX\224\5\0\306\350.\316\345\203\67\42\244(\42UL\204\134H\204\134"
"H\204\134HD\252\230\210\220\242\210\330\210\3\212Da\21A\61\24Aa\21Aa\21\1\306\351!\354"
"\345\203\245$\42UDV\21YE$)\211\210\214\70\220H\24A\21\224\42\36\372 \66\3\306\354)"
"\354\345\203\245$\42UDV\21YE$)\211\210\214\210\214\70\220H\224\42(\202\42(EHDP"
"DHl\354\301\0\306\360&\354\345\203\245$\42UDV\21YE$)\211\210\214\70\220H\24A\21"
"\224\42\36\342 \66\350 (\366 \0\306\370!\354\345\203\245$\42UDV\21YE$)\211\210\214"
"\70\220H\24A\21\224\42\36\344*_\35\306\371#\354\345\203\245$\42UDV\21YE$)\211\210"
"\214\70\220H\24A\21\224\42\36$*\253\253T\7\306\375%\354\345\203\245$\42UDV\21YE$"
")\211\210\214\70\220H\24A\21\224\42\36\334*,(,\312\2\0\307\4#\314\345\203\67\244(\42*"
"F.D.D.$\42*&\244(\366\200\42(,(,(,(,\0\307\5\34\354\345\203\245("
"\42*&\42*&\42*&\244(\366\200\42*{D\7\261\31\307\10\37\354\345\203\245(\42*&\42"
"*&\42*&\244(\66\366\200\42*\237\4\206\304\306\36\14\307\14!\354\345\203\245(\42*&\42*"
"&\42*&\244(\366\200\42*{\270\203\330\240\203\240\330\203\0\307\24\34\354\345\203\245(\42*&\42"
"*&\42*&\244(\366\200\42*{\300\253|u\307\25\36\354\345\203\245(\42*&\42*&\42*"
"&\244(\366\200\42*{\300\250\254\256R\35\307\27\42\355\345\203\245($*&$*&$*&\246"
"(\70\342`\42,*,\36ApR\211\70\241\0\307\31 \354\345\203\245(\42*&\42*&\42*"
"&\244(\366\200\42*{TVaAaQ\26\0\307 \35\255\345\203\251.*]P\134P\134T\272"
"z\220\3\243\230\300\230\300\230\300\230 \0\307!\32\315\345\203\251.*,*,*\256\36\344\300(&"
"\60&\354@\70'\0\307$\36\315\345\203\251.*,*,*\256\36\301\201QL`LXDLX"
"p\360\201\10\0\307(\37\315\345\203\251.*,*,*\256\36\344\300(&\60&\354@\70\350@("
"\370@\4\0\307\60!\315\345\203\251.*,*,*\256\36\344\300(&\60&\354@(.(.("
".\350@\4\0\307\61!\315\345\203\251.*,*,*\256\36\344\300(&\60&,.(.\350@"
"(.\350@\4\0\307\63\36\315\345\203\251.*,*,*\256\36\344\300(&\60&\36\60\70\66\42"
"P&\10\0\307\65\36\315\345\203\251.*,*,*\256\36\344\300(&\60&\36\254.*,*\256"
"\10\0\307\67\36\315\345\203\251.*,*,*\256\36\344\300(&\60&\66\322\64\66\42P&\6\0"
"\307<\24m\245\204\251.*]P\134P\134T\272z\324\7\6\307=\27\315\345\203\251.*,*,"
"*\256\36\301\201=\300\201pN\0\307@\30\315\345\203\251.*,*,*\256\36\301\201=tp\342"
"\3\21\0\307D\34\315\345\203\251.*,*,*\256\36\301\201=\300\201p\320\201P\360\201\10\0\307"
"J\34\315\345\203\251.*,*,*\256\36\301\201y\205UH\222\222\314BB*\14\307L\36\315\345"
"\203\251.*,*,*\256\36\301\201=\300\201P\134P\134P\134\320\201\10\0\307M\36\315\345\203\251"
".*,*,*\256\36\301\201=@\134P\134\320\201P\134\320\201\10\0\307O\32\315\345\203\251.*"
",*,*\256\36\301\201=\222\340\330\210@\231 \0\307Q\32\315\345\203\251.*,*,*\256\36"
"\301\201=\202\272\250\260\250\270\42\0\307R\32\315\345\203\251.*,*,*\256\36\301\201=\2\323\330"
"\210@\231\30\0\307S\33\315\345\203\251.*,*,*\256\36\301\201=T\244ilD\240L\14\0"
"\307T\32\315\345\203\251.*,*,*\256\36\301\201=\300\201p\320\201p\22\0\307U\34\315\345\203"
"\251.*,*,*\256\36\301\201=\300\201P\360\201P\360\201\10\0\307V\34\315\345\203\251.*,"
"*,*\256\36\301\201=\364\201XL`L\330\201\10\0\307W\33\315\345\203\251.*,*,*\256"
"\36\301\201=P\340\201X]T\134\21\0\307X\34\314\345\203\67IQDT\214\134\210\134\210\134HD"
"TLHQ\354\1El\6\307\134\35\314\345\203\67\244(\42*&\42*&\42*&\244(\366\200\42"
"\36 \66\333\3\1\307`!\314\345\203\67\244(\42*&\42*&\42*&\244(\366\200\42\36\342 "
"\66\350 (\366 \0\307h\34\314\345\203\67\244(\42*&\42*&\42*&\244(\366\200\42\36\344"
"*_\35\307k \315\345\203\67\246($*&$*&$*&\246(\70\342`\42\36\62\70\251D"
"\234P\0\307t\30\254\345\203\67\11UDP\220X\214X\214XLDP\22\252\330\34\307u\30\313\351"
"\203\65\202J(H(H(H(\5Uh<\350Ah\6\307x\30\313\351\203\65\202J(H(H"
"(H(\5Uh\342\320\244\7\3\307|\34\313\351\203\65\202J(H(H(H(\5Uh\370A"
"h\314AL\350A\0\307}\33\313\351\203\65\202J(H(H(H(\5UhlEQ\224\225\244"
"U\0\307~\36\313\351\203\65\202J(H(H(H(\5UhlEQD\214E\214T\214E\1"
"\307\203\42\315\351\203\65\206*$(IP\222\240$Ai\250\202\343\1\212\342\42\16jF\302b\42j"
"F\0\307\204\35\313\351\203\65\202J(H(H(H(\5Uh<\300QTPTPT\320\1\307"
"\205\35\313\351\203\65\202J(H(H(H(\5Uh<@TPT\320QT\320\1\307\207\34\314"
"\351\203\65\204*\42(EP\212\240\24AI\250b\343\341bSJ\204\11\5\307\210\42\315\351\203\65\206"
"*$(IP\222\240$Ai\250\202\343\341B\42C\2#\322\305D\4\211\310\4\307\211\34\313\351\203"
"\65\202J(H(H(H(\5Uh<\254QXLX\220\5\0\307\212\34\313\351\203\65\202J("
"H(H(H(\5Uh<\300ah\240D\224P\0\307\216\35\313\351\203\65\202J(H(H("
"H(\5Uh<\344\201PLXL\320\201\0\307\220\33\255\351\203\63\70\346$\60&\60&.\210F"
"(*$&F($\70\67\0\307\221\30\316\345\203\67:\304*,\263\21\211\250\20\241\324\361P\7\321"
"\71\1\307\224\30\316\345\203\67:\304*,\263\21\211\250\20\241\324\251\242\263>\20\1\307\226!\317\345\203"
"\67<\306*.,.lF\42*F(y<X\134X\320M\330T\232\240\222\21\0\307\227\31\316\345"
"\203\67:\304*,\263\21\211\250\20\241\324\361`w\321\251O\0\307\230\35\316\345\203\67:\304*,\263"
"\21\211\250\20\241\324\361P\7\321a\7a\321\7!\0\307\232!\316\345\203\67:\304*,\263\21\211\250"
"\20\241\324\361 \25u\21\61\61\25\61\251bb*J\0\307\240\35\316\345\203\67:\304*,\263\21\211"
"\250\20\241\324\361`wQqQqQq'\0\307\241\35\316\345\203\67:\304*,\263\21\211\250\20\241"
"\324\361`QqQqwQq'\0\307\243\33\316\345\203\67:\304*,\263\21\211\250\20\241\324\361\260"
"\321i%\2\205\42\0\307\244 \316\345\203\67:\304*,\263\21\211\250\20\241\324\361\220!\241!\221\21"
"\11c\42\242Dd\2\307\245\31\316\345\203\67:\304*,\263\21\211\250\20\241\324\361\250\354\302\262\263\1"
"\307\246\34\316\345\203\67:\304*,\263\21\211\250\20\241\324\361`\267\321\261\22\201B!\0\307\254$\255"
"\351\203\63$\62\344 $ULHTLHP\20\215PH\66!C!)C\42C\42C\42C\2"
"\307\255\36\314\345\203\63\42\62\342&\42(EP\320\210DL\304PHDdD<\304Al\16\307\260"
" \314\345\203\63\42\62\342&\42(EP\320\210DL\304PHDdDdDLl\266\7\2\307\264"
"#\314\345\203\63\42\62\342&\42(EP\320\210DL\304PHDdD<\304Al\320AP\354A"
"\0\307\274\36\314\345\203\63\42\62\342&\42(EP\320\210DL\304PHDdD<\310U\276:\307"
"\275 \314\345\203\63\42\62\342&\42(EP\320\210DL\304PHDdD<HTVW\251\16\307"
"\277$\316\345\203\63\42\66\42\304&\42,(\42,hH\42&\42D($\42\66\42\36\70:\255D"
"\240P\0\307\300*\316\345\203\63\42\66\42\304&\42,(\42,hH\42&\42D($\42\66\42\36"
"\62$\64$\62\42aLD\224\210L\0\307\301 \314\345\203\63\42\62\342&\42(EP\320\210DL"
"\304PHDdD<\202\262\250\314*\0\307\310\31\255\351\203\63\70\346$\60&\60\206(\231PTH"
"\214QHpn\0\307\311\31\316\345\203\67:\304*,l(,H\42\252(u<\324AtN\0\307"
"\314\32\316\345\203\67:\304*,l(,H\42\252(u<Pt\326\7\42\0\307\316!\317\345\203\67"
"<\306*.l*,J\42jB(y<X\134X\320M\330T\232\240\222\21\0\307\320\36\316\345\203"
"\67:\304*,l(,H\42\252(u<\324At\330AX\364A\10\0\307\330\36\316\345\203\67:"
"\304*,l(,H\42\252(u<\330]T\134T\134T\334\11\0\307\335\32\316\345\203\67:\304*"
",l(,H\42\252(u<*\273\260\354l\0\307\344\42\255\351\203\63$\62\344 $ULHT"
"\14Q\222\30\241\220l\214BR\206D\206D\206D\206\4\307\350\37\314\345\203\63\42\62\342&\42(h"
"(E\210DLQHDdDdDLl\266\7\2\307\354\42\314\345\203\63\42\62\342&\42(h("
"E\210DLQHDdD<\304Al\320AP\354A\0\310\0\27\255\351\203\71\370 *YTX"
"P\20\215\134H\262\241\250\340\34\310\1\27\314\345\203\67\366*(,(hD\42j(m<\364Al"
"\6\310\4\27\314\345\203\67\366*(,(hD\42j(m<l\266\7\3\310\10\34\314\345\203\67\366"
"*(,(hD\42j(m<\304Al\320AP\354A\0\310\12\37\314\345\203\67\366*(,("
"hD\42j(mtEUDLDELDTLD\3\310\20\27\314\345\203\67\366*(,(h"
"D\42j(m<\310U\276:\310\21\31\314\345\203\67\366*(,(hD\42j(m<HTV"
"W\251\16\310\23\33\315\345\203\67\70\302*YT\320\214DT\204P\342x\310\340\244\22qB\1\310\25"
"\33\314\345\203\67\366*(,(hD\42j(m<\270UXPX\224\5\0\310\26\33\314\345\203\67"
"\366*(,(hD\42j(m<\310el\244D\230P\0\310\34(\255\351\203\65\42\64\342 &"
"\42*(\42*(\42(f\42F*\42$Q\304PLDhDhDhDhD\0\310\35\37\314"
"\345\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<\304Al\16\310 \314\345"
"\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<@l\266\7\2\310$$\314\345"
"\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<\304Al\320AP\354A\0\310"
",\37\314\345\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<\310U\276:\310-"
"!\314\345\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<HTVW\251\16\310"
"/%\316\345\203\63\42\66\42\304&\42,(\42,d\42H\42&\42D($\42\66\42\36\70:\255"
"D\240P\0\310\61!\314\345\203\63\42\62\342&\42(EP\310D\210DL\304PHDdD<\202"
"\262\250\314*\0\310\70\27\255\351\203\71\370 *YT\14Q\134\214\134H\32\243\250\340\34\310<\27\314"
"\345\203\67\366*(h(,D\42\246(m\362\330\264\7\3\310@\34\314\345\203\67\366*(h(,"
"D\42\246(m<\304Al\320AP\354A\0\310H\27\314\345\203\67\366*(h(,D\42\246("
"m<\310U\276:\310I\31\314\345\203\67\366*(h(,D\42\246(m<HTVW\251\16\310"
"L!\316\345\203\67:\304*,h,\221D\314\210P\352x\310\220\320\220\310\210\204\61\21Q\42\62\1"
"\310M\33\314\345\203\67\366*(h(,D\42\246(m<\270UXPX\224\5\0\310T(\255\351"
"\203\65\42\64\342 &\42*(\42*d\42(*\42F*\42$\311\304PLDhDhDhD"
"hD\0\310p\25\215%\204\347\66\70\66V\64$N(\36.\70\331\201\1\310q\27\315\345\203\307\66"
"T\42N(\36.\70\354\300\36\340@\70'\0\310t\30\315\345\203\307\66T\42N(\36.\70\354\300"
"\36:\70\361\201\10\0\310x\34\315\345\203\307\66T\42N(\36.\70\354\300\36\340@\70\350@(\370"
"@\4\0\310z \315\345\203\307\66T\42N(\36.\70\354\300\274\242,\42&\244\42&$*&\244"
"\242\2\0\310\200\36\315\345\203\307\66T\42N(\36.\70\354\300\36\340@(.(.(.\350@\4"
"\0\310\201\36\315\345\203\307\66T\42N(\36.\70\354\300\36 .(.\350@(.\350@\4\0\310"
"\203\32\315\345\203\307\66T\42N(\36.\70\354\300\36IplD\240L\20\0\310\205\32\315\345\203\307"
"\66T\42N(\36.\70\354\300\36A]TXT\134\21\0\310\206\32\315\345\203\307\66T\42N(\36"
".\70\354\300\36\201ilD\240L\14\0\310\207\33\315\345\203\307\66T\42N(\36.\70\354\300\36*"
"\322\64\66\42P&\6\0\310\213\33\315\345\203\307\66T\42N(\36.\70\354\300\36(\360@\254.*"
"\256\10\0\310\214\42\316\345\203\65:\350$\62&\62&\60(N\210&$&H($.*.*\346"
"@\42:\15\0\310\215\33\316\345\203\67\306(.*J\42hB(&,'\7\23\361P\7\321\71\1"
"\310\224 \316\345\203\67\306(.*J\42hB(&,'\7\23\361P\7\321a\7a\321\7!\0"
"\310\235 \316\345\203\67\306(.*J\42hB(&,'\7\23\361`QqQqwQq'\0"
"\310\237\36\316\345\203\67\306(.*J\42hB(&,'\7\23\361\260\321i%\2\205\42\0\310\241"
"\34\316\345\203\67\306(.*J\42hB(&,'\7\23\361\250\354\302\262\263\1\310\250,\316\345\203"
"\65$\64$\342$YLHXLHTPH\220\20MHLH\204PH\242\250\220\240\250\220\203\211"
"\220\320\220\320\220\0\310\274+\316\345\203\63\42\306$\42.&\42J\42dF(\42YPDXPD"
"\310ADz\310\220\320\220\310\210\204\61\21Q\42\62\1\310\275#\314\345\203\63\42\302$\42*&\42F"
"\42dB(\42Q\212\240\24\7\22\351\301\255\302\202\302\242,\0\310\304\36\314\345\203\67\305MXPX"
"PT\42\251\230\220\240\10\241\230\240\260\240\260\3\212\330\4\310\310\34\314\345\203\67\302(*\215DP\204"
"PLPXP\330\1E<@l\266\7\2\310\314 \314\345\203\67\302(*\215DP\204PLPX"
"P\330\1E<\304Al\320AP\354A\0\310\324\33\314\345\203\67\302(*\215DP\204PLPX"
"P\330\1E<\310U\276:\310\325\35\314\345\203\67\302(*\215DP\204PLPXP\330\1E<"
"HTVW\251\16\310\327 \315\345\203\67\304(,*H\42(D(&*,*,\342`\42\36\62"
"\70\251D\234P\0\310\331\37\314\345\203\67\302(*\215DP\204PLPXP\330\1E<\270UX"
"PX\224\5\0\310\340\32\215%\204\347\66\70\66V\64$N(.&\60&\60&\60&\350\300\0\310"
"\341\31\315\345\203\307\66T\42N(\36*&\60&\350\300\36\340@\70'\0\310\344\32\315\345\203\307\66"
"T\42N(\36*&\60&\350\300\36:\70\361\201\10\0\310\365\34\315\345\203\307\66T\42N(\36*"
"&\60&\350\300\36A]TXT\134\21\0\310\374\25\253\351\203\345\62\64\62R\60$J(\372\200*"
"\64+\0\310\375\27\315\345\203\307\66\70T\42N(\36\342\300,\70\360@\70'\0\311\0\32\315\345\203"
"\307\66\70T\42N(\36\374\300,\70\60&\60\70\370@\4\0\311\4\34\315\345\203\307\66\70T\42N"
"(\36\342\300,\70\360@\70\350@(\370@\4\0\311\5\36\315\345\203\307\66\70T\42N(\36\342\300"
",\70\256\242,*\244*$\62\244*\2\0\311\6!\315\345\203\307\66\70T\42N(\36\342\300,\70"
"\256\242,\42&\244\42&$*&\244\242\2\0\311\14\36\315\345\203\307\66\70T\42N(\36\342\300,"
"\70\360@(.(.(.\350@\4\0\311\15\36\315\345\203\307\66\70T\42N(\36\342\300,\70\60"
".(.\350@(.\350@\4\0\311\17\33\315\345\203\307\66\70T\42N(\36\342\300,\70\36\64\70"
"\66\42P&\10\0\311\21\33\315\345\203\307\66\70T\42N(\36\342\300,\70\36\260.*,*\256\10"
"\0\311\30\42\314\345\203\67\342&,(,(*\221TLHP\204PL\354\1EPXPHQX"
"PX\0\311,(\356\345\203\303(.*.*J\42(F(&:\344`\42.\204.*\36\62$"
"\64$\62\42aLD\224\210L\0\311\64/\316\345\203\67\42\342&\42,(\42,(\42*E\220T"
"DLHPD\204PLDl\304\1E\242\260\210\240\30\212\240\260\210\240\260\210\0\311P\42\314\345\203"
"\67\342&,(,(*\221TLHP\204PL\354\1EPXPXPXPX\0\311Q\31\354"
"\345\203\303(*\67\22A\21B\61\261\7\24Q\331#:\210\315\0\311T\34\354\345\203\303(*\67\22"
"A\21B\61\261\261\7\24Q\371$\60$\66\366`\0\311X\35\354\345\203\303(*\67\22A\21B\61"
"\261\7\24Q\331\303\35\304\6\35\4\305\36\4\311`\31\354\345\203\303(*\67\22A\21B\61\261\7\24"
"Q\331\3^\345\253\3\311a\33\354\345\203\303(*\67\22A\21B\61\261\7\24Q\331\3Feu\225"
"\352\0\311c!\355\345\203\303(,*,*H\42(D(&\70\342`\42,*,\36ApR\211"
"\70\241\0\311l\34\255\345\203\347\66\70\66V\64$N(\36\342\300(&\60&\60&\60&\10\0\311"
"p\35\315\345\203\307\66\70T\42N(\36\374\300(&\60&,\42&,\70\370@\4\0\311t\36\315"
"\345\203\307\66\70T\42N(\36\342\300(&\60&\354@\70\350@(\370@\4\0\311| \315\345\203"
"\307\66\70T\42N(\36\342\300(&\60&\354@(.(.(.\350@\4\0\311\210\23M\245\204"
"\347\66\70\66V\64$N(\36\374\300\0\311\211\25\315\345\203\307\66T\42N(\36\361\201=\300\201p"
"N\0\311\214\26\315\345\203\307\66T\42N(\36\361\201=tp\342\3\21\0\311\220\32\315\345\203\307\66"
"T\42N(\36\361\201=\300\201p\320\201P\360\201\10\0\311\230\34\315\345\203\307\66T\42N(\36\361"
"\201=\300\201P\134P\134P\134\320\201\10\0\311\231\34\315\345\203\307\66T\42N(\36\361\201=@\134"
"P\134\320\201P\134\320\201\10\0\311\233\30\315\345\203\307\66T\42N(\36\361\201=\222\340\330\210@\231"
" \0\311\235\30\315\345\203\307\66T\42N(\36\361\201=\202\272\250\260\250\270\42\0\311\300\27\253\351\203"
"\65\364 &*(*(U\214TH\242\241\230\320\34\311\301\27\314\345\203\67\366*(,(,D\42"
"j(m<\364Al\6\311\304\27\314\345\203\67\366*(,(,D\42j(m\362\330\264\7\3\311"
"\307\30\314\345\203\67\366*(,(,D\42j(m<\310Ul\332\3\311\310\34\314\345\203\67\366*"
"(,(,D\42j(m<\304Al\320AP\354A\0\311\312\37\314\345\203\67\366*(,(,"
"D\42j(mtEUDLDELDTLD\3\311\320\27\314\345\203\67\366*(,(,D"
"\42j(m<\310U\276:\311\321\31\314\345\203\67\366*(,(,D\42j(m<HTVW"
"\251\16\311\323\33\315\345\203\67\70\302*YTX\214DT\204P\342x\310\340\244\22qB\1\311\325\33"
"\314\345\203\67\366*(,(,D\42j(m<\270UXPX\224\5\0\311\326\33\314\345\203\67\366"
"*(,(,D\42j(m<\310el\244D\230P\0\311\331\31\314\345\203\67\366*(,(,"
"D\42j(m<\310U\354U\354\1\311\332\34\314\345\203\67\366*(,(,D\42j(m<\360"
"\201TL\134L\324\201\0\311\334\42\257\341\203\67<\210b$.&$.&$L$\206&\42MT"
"LDH\214\210LDxn\0\311\335\34\317\341\203\71<fb(MTPL\324D\216Bb\62\217"
"\207;\10\317\11\0\311\340\34\317\341\203\71<fb(MTPL\324D\216Bb\62O\26\236\371\201"
"\10\0\311\342$\320\341\203\71\36 hb(*&*M\324HDF\61\271\7\210\7\214Kt\24\66"
"\26\25\23U\62\2\311\344 \317\341\203\71<fb(MTPL\324D\216Bb\62\217\207;\10\217"
";\210\13\77\10\1\311\347%\317\341\203\71<fb(MTPL\324D\216Bb\62\217\7\252\210\11"
"\214\210\11\252(\212\212\11\252(\1\311\354 \317\341\203\71<fb(MTPL\324D\216Bb\62"
"\217\7<\214\12\214\12\214\12<\1\311\355 \317\341\203\71<fb(MTPL\324D\216Bb\62"
"\217\7\214\12\214\12<\214\12<\1\311\357\36\317\341\203\71<fb(MTPL\324D\216Bb\62"
"\217\207\16O,\21)\24\1\311\360#\317\341\203\71<fb(MTPL\324D\216Bb\62\217\207"
"\15\211\15\11\215H\31\23\21&\42\23\311\361\36\317\341\203\71<fb(MTPL\324D\216Bb"
"\62\217Gh\30\26\27\26h\3\311\370+\257\341\203\67$\66$\202b$QLH\242\230\220\64\42\61"
"\64\21iB\322D\204\204\214\310D\204\304\206\304\206\304\206\304\206\4\311\371 \315\341\203\65\42\64\42b"
"IDHL\212\220\230\230\211\234D\310\244H\32\21\17s\20\234\3\311\374\42\315\341\203\65\42\64\42b"
"IDHL\212\220\230\230\211\234D\310\244H\32\21\32\21\24\234\361\201\0\312\0$\315\341\203\65\42\64"
"\42bIDHL\212\220\230\230\211\234D\310\244H\32\21\17s\20\34u\20\25|\20\312\10$\315\341"
"\203\65\42\64\42bIDHL\212\220\230\230\211\234D\310\244H\32\21\17t\26\25\26\25\26\25v\312"
"\11$\315\341\203\65\42\64\42bIDHL\212\220\230\230\211\234D\310\244H\32\21\17\24\25\26\25v"
"\26\25v\312\13$\317\341\203\65\42\70\42fb$\42(&EPL\314LD&\21!\61)\22G"
"\304\203g,\21)\24\312\14+\317\341\203\65\42\70\42fb$\42(&EPL\314LD&\21!"
"\61)\22G\304\303\206\304\206\204F\244\214\211\10\23\221\11\312\15$\315\341\203\65\42\64\42bIDH"
"L\212\220\230\230\211\234D\310\244H\32\21\217\246.*,*\256\2\0\312\24!\257\341\203\67<\210b"
"$.&$.&\204F$&,\42MTLD\210\211LDxn\0\312\30\34\317\341\203\71<f"
"b(M\324HLTLDF\64\231\307\203\205g~ \2\312)\36\317\341\203\71<fb(M\324"
"HLTLDF\64\231\307#\64\14\213\13\13\264\1\312L\37\257\341\203=\5\305TPLTPL"
"T\214H\14MD\262\220\230\210\250\21\231\240\360\34\312M\31\315\341\203\71\305\242\220\230\250\220\230\230\211"
"\34\311d\34\217\342 \70\3\312P\32\315\341\203\71\305\242\220\230\250\220\230\230\211\34\311d\34\17\36\234"
"\370`\0\312T\35\315\341\203\71\305\242\220\230\250\220\230\230\211\34\311d\34\17s\20\34u\20\25|\20"
"\312\134\35\315\341\203\71\305\242\220\230\250\220\230\230\211\34\311d\34\17t\26\25\26\25\26\25v\312]\35"
"\315\341\203\71\305\242\220\230\250\220\230\230\211\34\311d\34\17\24\25\26\25v\26\25v\312_\35\316\341\203"
"\71:db(&UL\232\221\210\214\42b\262\216\207\215N+\21(\24\312`$\317\341\203\71<f"
"b(MTPL\314LDF!\61\231\307\303\206\304\206\204F\244\214\211\10\23\221\11\312a\34\315\341"
"\203\71\305\242\220\230\250\220\230\230\211\34\311d\34\217\304,UX\230\5\0\312h.\257\341\203\71\42\70"
"\42\202b&\42(&EPL\212\30\221\220\211\230\210D\21!\61\21\61\21#\62!\21\301\21\301\21"
"\301\21\301\21\1\312}$\315\341\203\65\42\64\42bIDHL\212\220\230\210\211<\211\220I\221\64\42"
"\36M]TXT\134\5\0\312\204\37\257\341\203=\5\305TPLTPL\10\215HXLD\262\220"
"\230\210\20\23\231\240\360\34\312\230$\317\341\203\71<fb(M\314PLTLD&#\61\231\307\303"
"\206\304\206\204F\244\214\211\10\23\221\11\312\274\33m%\204\205b\60&\60&N$\60\42]LD\220"
"\210L`p\262\3\3\312\275\31\315\345\203\203]L\134L\134DV\61)\203\303\16\354\1\16\204s\2"
"\312\300\32\315\345\203\203]L\134L\134DV\61)\203\303\16\354\241\203\23\37\210\0\312\304\36\315\345\203"
"\203]L\134L\134DV\61)\203\303\16\354\1\16\204\203\16\204\202\17D\0\312\314 \315\345\203\203]"
"L\134L\134DV\61)\203\303\16\354\1\16\204\342\202\342\202\342\202\16D\0\312\315 \315\345\203\203]"
"L\134L\134DV\61)\203\303\16\354\1\342\202\342\202\16\204\342\202\16D\0\312\317\34\315\345\203\203]"
"L\134L\134DV\61)\203\303\16\354\221\4\307F\4\312\4\1\312\321\34\315\345\203\203]L\134L\134"
"DV\61)\203\303\16\354\21\324E\205E\305\25\1\312\323\35\315\345\203\203]L\134L\134DV\61)"
"\203\303\16\354\241\42Mc#\2eb\0\312\330)\317\341\203\67<\210b$.&$.&$L$"
"&,\42\15ILDH\214\210LD`T`T\320\201Dx\32\0\312\331\36\316\345\203\201\202$*"
"&QLPLD\66\64I\302rr\60\21\17u\20\235\23\0\312\340\42\316\345\203\201\202$*&Q"
"LPLD\66\64I\302rr\60\21\17u\20\35v\20\26}\20\2\312\354&\316\345\203\201\202$*"
"&QLPLD\66\64I\302rr\60\21\17\31\22\32\22\31\221\60&\42JD&\0\312\364\60\317"
"\341\203\67$\66$\202b$QLH\242\230\220\64\42\61!\61\21iHb\42BBFd\42B\242"
"\222D%\211\70\220\10\211\15\211\15\11\313\10.\316\345\203\201\242\42*&\42QLHDLD\26#"
"\61\61\22aA\21aA\21!\7\21\351!CBC\42#\22\306DD\211\310\4\313\20$\315\341\203"
"\71\5\305LPL\242\230\64\42A\61\21\211Bb\42bFdB\242\302\242\302\42\16&\202\23\313\24"
"\36\314\345\203\201\202$&\223\230\240\210\334\310$\11\12\13\12;\240\210\7\210\315\366@\0\313\30!\314"
"\345\203\201\202$&\223\230\240\210\334\310$\11\12\13\12;\240\210\207\70\210\15:\10\212=\10\313 \35"
"\314\345\203\201\202$&\223\230\240\210\334\310$\11\12\13\12;\240\210\7\271\312W\7\313!\37\314\345\203"
"\201\202$&\223\230\240\210\334\310$\11\12\13\12;\240\210\7\211\312\352*\325\1\313A\36\315\345\203\203"
"]L\134L\134DV\61\351b\2c\202\16\354\21\324E\205E\305\25\1\313H\33\253\351\203\203b,"
"&,&J$,\42ULD\210\232\340\3\252\320\254\0\313I\31\315\345\203\203]L\134L\134DV"
"\61\351!\16\314\202\3\17\204s\2\313L\34\315\345\203\203]L\134L\134DV\61\351\301\17\314\202\3"
"c\2\203\203\17D\0\313P\36\315\345\203\203]L\134L\134DV\61\351!\16\314\202\3\17\204\203\16"
"\204\202\17D\0\313X \315\345\203\203]L\134L\134DV\61\351!\16\314\202\3\17\204\342\202\342\202"
"\342\202\16D\0\313Y \315\345\203\203]L\134L\134DV\61\351!\16\314\202\3\343\202\342\202\16\204"
"\342\202\16D\0\313]\35\315\345\203\203]L\134L\134DV\61\351!\16\314\202\343\1\353\242\302\242\342"
"\212\0\313d(\315\341\203\71\202b&(&QL\32\221\240\230\210D!\61\21\61#\62!\301\21\7"
"\23QaQ!UaQa\1\313x*\356\345\203\201\202$*&QLPLD\66!\61I\242C"
"\16&\342B\350\242\342!CBC\42#\22\306DD\211\310\4\313y \354\345\203\201\202$&\223\230"
"\240\210\334\310$\211=\240\210\12\241J\17n\25\26\24\26e\1\313\234(\315\341\203\71\202b&(&"
"QL\32\221\240\230\210D!\61\21\61#\62!\301\21\7\23QaQaQaQa\1\313\270#\255"
"\345\203\205b\60&\60&N$\60\42]LD\220\210L<\300\201QL`L`L`L\20\0\313"
"\324\32-\245\204\205b\60&\60&N$\60\42]LD\220\210L<\300\201\1\313\344\37\315\345\203\203"
"]L\134L\134DV\61\351\301\17\354\1\16\204\342\202\342\202\342\202\16D\0\313\347\33\315\345\203\203]"
"L\134L\134DV\61\351\301\17\354\221\4\307F\4\312\4\1\313\351\33\315\345\203\203]L\134L\134D"
"V\61\351\301\17\354\21\324E\205E\305\25\1\314\14\35\255\341\203\71\5\305LPL\242\230\64\42A\61"
"\21\211Bb\42bFdB\202s\314\15\31\315\341\203\71\305\242\220\230\250\220\230\250\210\34\311d\34\217"
"\342 \70\3\314\20\32\315\341\203\71\305\242\220\230\250\220\230\250\210\34\311d\234\36\42\70\361\301\0\314\24"
"\35\315\341\203\71\305\242\220\230\250\220\230\250\210\34\311d\34\17s\20\34u\20\25|\20\314\34\35\315\341"
"\203\71\305\242\220\230\250\220\230\250\210\34\311d\34\17t\26\25\26\25\26\25v\314\35\35\315\341\203\71\305"
"\242\220\230\250\220\230\250\210\34\311d\34\17\24\25\26\25v\26\25v\314!\34\315\341\203\71\305\242\220\230"
"\250\220\230\250\210\34\311d\34\217\304,UX\230\5\0\314\42\34\315\341\203\71\305\242\220\230\250\220\230\250"
"\210\34\311d\34\17t\32\34*\21'\24\314'\35\315\341\203\71\305\242\220\230\250\220\230\250\210\34\311d"
"\34\17\26x V\27\25W\2\314(\34\255\351\203\63,*,*\346$\60&.\210F(*$&"
"F($\70\67\0\314)\32\316\345\203\67:*.\304*\335HDX\210LTt<\324AtN\0"
"\314,\32\316\345\203\67:*.\304*\335HDX\210LTt\252\350\254\17D\0\314.\42\317\345\203"
"\67<,.\306*,n&\42,F&*<\36,.,\350&l*MP\311\10\0\314\60\37\316"
"\345\203\67:*.\304*\335HDX\210LTt<\324At\330AX\364A\10\0\314\70\37\316\345"
"\203\67:*.\304*\335HDX\210LTt<\330]T\134T\134T\334\11\0\314\71\37\316\345\203"
"\67:*.\304*\335HDX\210LTt<XT\134T\334]T\334\11\0\314;\35\316\345\203\67"
":*.\304*\335HDX\210LTt<ltZ\211@\241\10\0\314<\42\316\345\203\67:*."
"\304*\335HDX\210LTt<dHhHdD\302\230\210(\21\231\0\314=\33\316\345\203\67:"
"*.\304*\335HDX\210LTt<*\273\260\354l\0\314>\36\316\345\203\67:*.\304*\335"
"HDX\210LTt<\330mt\254D\240P\10\0\314D%\255\351\203\63$&*$&*\344 "
"$ULHP\20\215PH\66!C!)C\42C\42C\42C\2\314E\36\314\345\203\63\42\62\42"
"&*\342&\42&j$\42(b&EdD<\304Al\16\314H \314\345\203\63\42\62\42&*"
"\342&\42&j$\42(b&EdDdDLl\266\7\2\314L#\314\345\203\63\42\62\42&*"
"\342&\42&j$\42(b&EdD<\304Al\320AP\354A\0\314T\36\314\345\203\63\42\62"
"\42&*\342&\42&j$\42(b&EdD<\310U\276:\314U \314\345\203\63\42\62\42&"
"*\342&\42&j$\42(b&EdD<HTVW\251\16\314W\42\316\345\203\63\42\66\42*"
"E\210MDT\324PDPD\210L\212\330\210x\340\350\264\22\201B\1\314X(\316\345\203\63\42\66"
"\42*E\210MDT\324PDPD\210L\212\330\210x\310\220\320\220\310\210\204\61\21Q\42\62\1\314"
"Y \314\345\203\63\42\62\42&*\342&\42&j$\42(b&EdD<\202\262\250\314*\0\314"
"`\32\255\351\203\63,*,*\346$\60\206(\231PTH\214QHpn\0\314d\33\316\345\203\67"
":*.\304j&.(\42\254&*:\36(:\353\3\21\0\314f\42\317\345\203\67<,.\306j"
"(.*\42lB&*<\36,.,\350&l*MP\311\10\0\314h\37\316\345\203\67:*."
"\304j&.(\42\254&*:\36\352 :\354 ,\372 \4\0\314p\37\316\345\203\67:*.\304"
"j&.(\42\254&*:\36\354.*.*.*\356\4\0\314u\33\316\345\203\67:*.\304j"
"&.(\42\254&*:\36\225]Xv\66\0\314\230\30\255\351\203\71&\60&\360 *YP\20\215"
"\134H\262\241\250\340\34\314\231\27\314\345\203\67M\334UL\324HD\330LTl<\364Al\6\314\234"
"\27\314\345\203\67M\334UL\324HD\330LTl<l\266\7\3\314\240\34\314\345\203\67M\334UL"
"\324HD\330LTl<\304Al\320AP\354A\0\314\250\27\314\345\203\67M\334UL\324HD\330"
"LTl<\310U\276:\314\251\31\314\345\203\67M\334UL\324HD\330LTl<HTVW\251"
"\16\314\253\35\315\345\203\67\70(.\302*(j&\42,B&*\70\36\62\70\251D\234P\0\314\254"
"\42\316\345\203\67:*.\304*\325PDX\210LTt<dHhHdD\302\230\210(\21\231\0"
"\314\255\33\314\345\203\67M\334UL\324HD\330LTl<\270UXPX\224\5\0\314\264)\255\351"
"\203\65\42&,\42&,\342 &\42*(\42(f\42F*\42$Q\304PLDhDhDh"
"DhD\0\314\265\37\314\345\203\63\42\62\42&*\342&\42&f\42$\42(b&EdD<\304"
"Al\16\314\270 \314\345\203\63\42\62\42&*\342&\42&f\42$\42(b&EdD<@l"
"\266\7\2\314\274$\314\345\203\63\42\62\42&*\342&\42&f\42$\42(b&EdD<\304A"
"l\320AP\354A\0\314\304\37\314\345\203\63\42\62\42&*\342&\42&f\42$\42(b&Ed"
"D<\310U\276:\314\305!\314\345\203\63\42\62\42&*\342&\42&f\42$\42(b&EdD"
"<HTVW\251\16\314\307#\316\345\203\63\42\66\42*E\210MDT\314DPDPD\210L\212"
"\330\210x\340\350\264\22\201B\1\314\311!\314\345\203\63\42\62\42&*\342&\42&f\42$\42(b"
"&EdD<\202\262\250\314*\0\314\320\30\255\351\203\71&\60&\360 *\15Q\134\214\134H\32\243"
"\250\340\34\314\324\27\314\345\203\67M\334\315L\134HDPMTl\362\330\264\7\3\314\344#\316\345\203"
"\67:*.\304f*.(\42hD&*:\36\62$\64$\62\42aLD\224\210L\0\314\354)"
"\255\351\203\65\42&,\42&,\342 &\42*d\42(*\42F*\42$\311\304PLDhDh"
"DhDhD\0\314\360!\314\345\203\63\42\62\42&*\342b\42&*\42$\42db&EdD"
"dDLl\266\7\2\315\1!\314\345\203\63\42\62\42&*\342b\42&*\42$\42db&Ed"
"D<\202\262\250\314*\0\315\10\25\255%\204-\70\362\66\255hH\234P<\134p\262\3\3\315\11\27"
"\315\345\203-\322\64\66\42P&\64\70\354\300\36\340@\70'\0\315\14\30\315\345\203-\322\64\66\42P"
"&\64\70\354\300\36:\70\361\201\10\0\315\20\34\315\345\203-\322\64\66\42P&\64\70\354\300\36\340@"
"\70\350@(\370@\4\0\315\30\36\315\345\203-\322\64\66\42P&\64\70\354\300\36\340@(.(."
"(.\350@\4\0\315\31\36\315\345\203-\322\64\66\42P&\64\70\354\300\36 .(.\350@(."
"\350@\4\0\315\33\32\315\345\203-\322\64\66\42P&\64\70\354\300\36IplD\240L\20\0\315\35"
"\32\315\345\203-\322\64\66\42P&\64\70\354\300\36A]TXT\134\21\0\315$#\316\345\203\65."
"*.*\350$\62&\60(N\210&$&H($.*.*\346@\42:\15\0\315(\33\316\345"
"\203+\221M\134TXD\320\210L\262\234\34L\304\3Eg} \2\315,\37\316\345\203+\221M\134"
"TXD\320\210L\262\234\34L\304C\35D\207\35\204E\37\204\0\315\71\34\316\345\203+\221M\134T"
"XD\320\210L\262\234\34L\304\243\262\13\313\316\6\0\315\134 \314\345\203\67(,(,\342&,("
"*\221TLHP\204PLPXP\330\1El\2\315`\33\314\345\203+\211MT\242\210\240\20\231"
"DaAa\7\24\361\0\261\331\36\10\315d\37\314\345\203+\211MT\242\210\240\20\231DaAa\7"
"\24\361\20\7\261A\7A\261\7\1\315l\33\314\345\203+\211MT\242\210\240\20\231DaAa\7\24"
"\361 W\371\352\0\315m\34\314\345\203+\211MT\242\210\240\20\231DaAa\7\24\361 QY]"
"\245:\315o\36\315\345\203+\215MXT\212\240\30\231TaQa\21\7\23\361\220\301I%\342\204\2"
"\315q\36\314\345\203+\211MT\242\210\240\20\231DaAa\7\24\361\340VaAaQ\26\0\315x"
"\32\255%\204-\70\362\66\255hH\234P\134L`L`L`L\320\201\1\315\210 \315\345\203-\322"
"\64\66\42P&\60&\60&\350\300\36\340@(.(.(.\350@\4\0\315\224\25\313\351\203-\64"
"\356\62\245`H\224P\360\1UhV\0\315\225\27\315\345\203-\322\64\66\42P&\36\344\300,\70\360"
"@\70'\0\315\230\32\315\345\203-\322\64\66\42P&\36\301\201Yp`L`p\360\201\10\0\315\234"
"\34\315\345\203-\322\64\66\42P&\36\344\300,\70\360@\70\350@(\370@\4\0\315\244\36\315\345\203"
"-\322\64\66\42P&\36\344\300,\70\360@(.(.(.\350@\4\0\315\245\36\315\345\203-\322"
"\64\66\42P&\36\344\300,\70\60.(.\350@(.\350@\4\0\315\247\33\315\345\203-\322\64\66"
"\42P&\36\344\300,\70\36\64\70\66\42P&\10\0\315\251\33\315\345\203-\322\64\66\42P&\36\344"
"\300,\70\36\260.*,*\256\10\0\315\260#\314\345\203),(,\342&,(*\221TLHP"
"\204PL\354\1EPXPHQXPX\0\315\304'\356\345\203),\306(,UDT\214LP"
"t\310\301D\134\10]T<dHhHdD\302\230\210(\21\231\0\315\314\60\316\345\203),\42("
",\42\342&\42,(\42*E\220TDLHPD\204PLDl\304\1E\242\260\210\240\30\212\240"
"\260\210\240\260\210\0\315\320+\354\345\203)E\204IDP\212\230\210\230\210\10\231\220\210\310\210\310\210\3"
"\211D)\202\42(\202R\204D\4E\204\304\306\36\14\315\350#\314\345\203),(,\342&,(*"
"\221TLHP\204PL\354\1EPXPXPXPX\0\315\354\35\354\345\203),\302(YL"
"DT\204LPl\354\1ET>\11\14\211\215=\30\315\360\37\354\345\203),\302(YLDT\204"
"LP\354\1ET\366p\7\261A\7A\261\7\1\315\370\33\354\345\203),\302(YLDT\204L"
"P\354\1ET\366\200W\371\352\0\315\371\34\354\345\203),\302(YLDT\204LP\354\1ET"
"\366\200QY]\245:\315\373!\355\345\203),\304(*,(\42*D&(\70\342`\42,*,"
"\36ApR\211\70\241\0\315\375\36\354\345\203),\302(YLDT\204LP\354\1ET\366\250\254"
"\302\202\302\242,\0\316\4\34\315\345\203/\70\362\66\255hH\234P<\300\201QL`L`L`L"
"\20\0\316\10\35\315\345\203-\322\64\66\42P&\36\301\201QL`LXDLXp\360\201\10\0\316"
"\14\36\315\345\203-\322\64\66\42P&\36\344\300(&\60&\354@\70\350@(\370@\4\0\316\24 "
"\315\345\203-\322\64\66\42P&\36\344\300(&\60&\354@(.(.(.\350@\4\0\316\31\35"
"\315\345\203-\322\64\66\42P&\36\344\300(&\60&\36\254.*,*\256\10\0\316 \23m\245\204"
"-\70\362\66\255hH\234P<\370\201\1\316!\26\315\345\203-\322\64\66\42P&\36\301\201=\300\201"
"pN\0\316$\27\315\345\203-\322\64\66\42P&\36\301\201=tp\342\3\21\0\316(\33\315\345\203"
"-\322\64\66\42P&\36\301\201=\300\201p\320\201P\360\201\10\0\316\60\35\315\345\203-\322\64\66\42"
"P&\36\301\201=\300\201P\134P\134P\134\320\201\10\0\316\61\35\315\345\203-\322\64\66\42P&\36"
"\301\201=@\134P\134\320\201P\134\320\201\10\0\316\63\31\315\345\203-\322\64\66\42P&\36\301\201="
"\222\340\330\210@\231 \0\316\65\31\315\345\203-\322\64\66\42P&\36\301\201=\202\272\250\260\250\270\42"
"\0\316X\30\253\351\203\65&,&\354 &*(U\214TH\242\241\230\320\34\316Y\27\314\345\203\67"
"M\334UL\134HD\330LTl<\364Al\6\316\134\27\314\345\203\67M\334UL\134HD\330L"
"Tl\362\330\264\7\3\316_\30\314\345\203\67M\334UL\134HD\330LTl<\310Ul\332\3\316"
"`\34\314\345\203\67M\334UL\134HD\330LTl<\304Al\320AP\354A\0\316a\34\314\345"
"\203\67M\334UL\134HD\330LTltEU\212\252\210\310\210\252\0\316h\27\314\345\203\67M\334"
"UL\134HD\330LTl<\310U\276:\316i\31\314\345\203\67M\334UL\134HD\330LTl"
"<HTVW\251\16\316k\35\315\345\203\67\70(.\302*(.&\42,B&*\70\36\62\70\251"
"D\234P\0\316m\33\314\345\203\67M\334UL\134HD\330LTl<\270UXPX\224\5\0\316"
"t\34\254\355\203\61\66\306$\60$\60$\60\344@&.&,(*\215Xl\32\0\316u\33\316\345"
"\203\67\304*.*.*\304j(,H.D\62\36\352 :'\0\316x\34\316\345\203\67\304*."
"*.*\304j(,H.D\62:*:\353\3\21\0\316| \316\345\203\67\304*.*.*\304"
"j(,H.D\62\36\352 :\354 ,\372 \4\0\316\204 \316\345\203\67\304*.*.*\304"
"j(,H.D\62\36\354.*.*.*\356\4\0\316\205 \316\345\203\67\304*.*.*\304"
"j(,H.D\62\36,*.*\356.*\356\4\0\316\207\36\316\345\203\67\304*.*.*\304"
"j(,H.D\62\36\66:\255D\240P\4\0\316\211\34\316\345\203\67\304*.*.*\304j("
",H.D\62\36\225]Xv\66\0\316\220#\254\355\203\61$\60\344$UH\252\220T!\7\62!"
"A\61!\61A!\251B\306B\2C\2C\2\316\221\35\314\345\203\63\342&\42*&\42*&\342f"
"(E\210T\304\134D<\304Al\16\316\224\37\314\345\203\63\342&\42*&\42*&\342f(E\210"
"T\304\134DdDLl\266\7\2\316\230\42\314\345\203\63\342&\42*&\42*&\342f(E\210T"
"\304\134D<\304Al\320AP\354A\0\316\240\35\314\345\203\63\342&\42*&\42*&\342f(E"
"\210T\304\134D<\310U\276:\316\241\37\314\345\203\63\342&\42*&\42*&\342f(E\210T\304"
"\134D<HTVW\251\16\316\243$\316\345\203\63\42\304&\42.&\42.&\42\304f,(\42H"
"*\42D.\42\36\70:\255D\240P\0\316\244*\316\345\203\63\42\304&\42.&\42.&\42\304f"
",(\42H*\42D.\42\36\62$\64$\62\42aLD\224\210L\0\316\245\37\314\345\203\63\342&"
"\42*&\42*&\342f(E\210T\304\134D<\202\262\250\314*\0\316\254\34\254\355\203\61\66\306$"
"\60$\60\204*$\246&.\206&(*\215Xl\32\0\316\255\33\316\345\203\67\304*.*.\352@"
"*,lD.D\62\36\352 :'\0\316\301\34\316\345\203\67\304*.*.\352@*,lD."
"D\62\36\225]Xv\66\0\316\344\25\254\355\203\67\366*\237\34\210\5\205\305\304\205\4N\306&\316\345"
"\24\314\345\203\367*W\67Ca!r\223\361\320\7\261\31\316\350\24\314\345\203\367*W\67Ca!r"
"\223\361\260\331\36\14\316\353\25\314\345\203\367*W\67Ca!r\223\361 W\261i\17\316\354\31\314\345"
"\203\367*W\67Ca!r\223\361\20\7\261A\7A\261\7\1\316\364\25\314\345\203\367*W\67Ca"
"!r\223\361 W\371\352\0\316\365\26\314\345\203\367*W\67Ca!r\223\361 QY]\245:\316"
"\367\35\315\345\203\67\302*,*,*\302f*,F.B\62\36\62\70\251D\234P\0\316\370\42\316"
"\345\203\67\304*.*.*\304f,\221\134\210d<dHhHdD\302\230\210(\21\231\0\316\371"
"\30\314\345\203\367*W\67Ca!r\223\361\340VaAaQ\26\0\317\0&\254\355\203\63\42\62\342"
"&\42*&\42*&\42*b\302(\42(ELTDHX\304\134DdDdD\0\317\1\36\314"
"\345\203\63\342&\42*&\42*&\342b\42(E\210T\304\134D<\304Al\16\317\4\37\314\345\203"
"\63\342&\42*&\42*&\342b\42(E\210T\304\134D<@l\266\7\2\317\10#\314\345\203\63"
"\342&\42*&\42*&\342b\42(E\210T\304\134D<\304Al\320AP\354A\0\317\20\36\314"
"\345\203\63\342&\42*&\42*&\342b\42(E\210T\304\134D<\310U\276:\317\21 \314\345\203"
"\63\342&\42*&\42*&\342b\42(E\210T\304\134D<HTVW\251\16\317\23%\316\345\203"
"\63\42\304&\42.&\42.&\42\304b\42,(\42H*\42D.\42\36\70:\255D\240P\0\317"
"\25 \314\345\203\63\342&\42*&\42*&\342b\42(E\210T\304\134D<\202\262\250\314*\0\317"
"\34\26\254\355\203\67\366*'TQfA\61\64q!\201\223\261\11\317 \26\314\345\203\367*\67\7R"
"AA#r\223\261\341\261i\17\6\317$\32\314\345\203\367*\67\7RAA#r\223\361\20\7\261A"
"\7A\261\7\1\317,\26\314\345\203\367*\67\7RAA#r\223\361 W\371\352\0\317-\27\314\345"
"\203\367*\67\7RAA#r\223\361 QY]\245:\317/\34\315\345\203\67\302*,*,f\302"
"*\321\214\134\204d<dpR\211\70\241\0\317\60#\316\345\203\67\304*.*.f\304*,hH"
".D\62\36\62$\64$\62\42aLD\224\210L\0\317\61\31\314\345\203\367*\67\7RAA#r"
"\223\361\340VaAaQ\26\0\317\70'\254\355\203\63\42\62\342&\42*&\42*b\42*&\302("
"\42(d\42&*\42$,b.\42\62\42\62\42\0\317T\25M%\204\343\200\70\311\1qXTX"
"TXp\334\201\1\317U\27\255\345\203\345@\70\350@\70\60&\60\354\300\36\340@\70'\0\317X\30"
"\255\345\203\345@\70\350@\70\60&\60\354\300\36:\70\361\201\10\0\317\134\34\255\345\203\345@\70\350@"
"\70\60&\60\354\300\36\340@\70\350@(\370@\4\0\317d\36\255\345\203\345@\70\350@\70\60&\60"
"\354\300\36\340@(.(.(.\350@\4\0\317e\36\255\345\203\345@\70\350@\70\60&\60\354\300"
"\36 .(.\350@(.\350@\4\0\317g\32\255\345\203\345@\70\350@\70\60&\60\354\300\36I"
"plD\240L\20\0\317i\32\255\345\203\345@\70\350@\70\60&\60\354\300\36A]TXT\134\21"
"\0\317p \256\345\203\65:\350 \42\66\42\66\42\350 \202(&\42.&\42.*\346@\42:\33"
"\0\317q\34\316\345\203\67\346&\62&\346f.&,$&,\311\301D<\324AtN\0\317t\35"
"\316\345\203\67\346&\62&\346f.&,$&,\311\301D<Pt\326\7\42\0\317x!\316\345\203"
"\67\346&\62&\346f.&,$&,\311\301D<\324At\330AX\364A\10\0\317\200!\316\345"
"\203\67\346&\62&\346f.&,$&,\311\301D<\330]T\134T\134T\334\11\0\317\205\35\316"
"\345\203\67\346&\62&\346f.&,$&,\311\301D<*\273\260\354l\0\317\214,\256\345\203\65"
"$\64$\342 \42$\60\42$\60\42$\342 \202(&\42$(&\42$(*\344`\42$\64$"
"\64$\64$\0\317\241 \314\345\203\63\42\342\42]D\212\213\271\210D!\21\211R\34H\244\7\267\12"
"\13\12\213\262\0\317\250\33\255\345\203\71\305AL`L`L\304ALPL\242\230Dq\7\25\301\31"
"\317\260 \314\345\203\67\342&.&\342&.&($&(\354\200\42\36\342 \66\350 (\366 \0"
"\317\304\27M%\204\343\200\70\311\1qPL\242\230D\61\201\61Q\7\6\317\340\22\213\351\203\341\200\64"
"\364\240\64\355\1UhV\0\317\341\25\255\345\203\345@\70\350@\70\311\201Yp\340\201pN\0\317\344"
"\31\255\345\203\345@\70\350@\70=\300\201Yp`L`p\360\201\10\0\317\350\32\255\345\203\345@\70"
"\350@\70\311\201Yp\340\201p\320\201P\360\201\10\0\317\360\34\255\345\203\345@\70\350@\70\311\201Y"
"p\340\201P\134P\134P\134\320\201\10\0\317\361\34\255\345\203\345@\70\350@\70\311\201Yp`\134P"
"\134\320\201P\134\320\201\10\0\317\363\31\255\345\203\345@\70\350@\70\311\201Yp<hplD\240L"
"\20\0\317\365\31\255\345\203\345@\70\350@\70\311\201Yp<`]TXT\134\21\0\317\374!\314\345"
"\203\67\305AH`H`H\304AH`H`H\354\1EPXPHQXPX\0\320\0\34\354"
"\345\203\67\342&.&\342&.&.&\366\200\42*\204*'\261i\17\6\320\4 \354\345\203\67\342"
"&.&\342&.&.\346\200\42*\204*=\304Al\320AP\354A\0\320\21\37\354\345\203\67\342"
"&.&\342&.&.\346\200\42*\204*=\270UXPX\224\5\0\320\30/\316\345\203\67\42\66"
"\42\342 $\42\60$\42\60$\42\342 $\42\60$\42\60$\42\66\342\200\42QXDP\14EP"
"XDPXD\0\320-#\354\345\203\63\42\342\42]D\212\213t\21\351\42\42\16$\22EP\4\245"
"\210\7\267\12\13\12\213\262\0\320\64!\314\345\203\67\305AH`H`H\304AH`H`H\354\1"
"EPXPXPXPX\0\320\65\31\354\345\203\67\342&.&\342&.&.\346\200\42*{D"
"\7\261\31\320\70\34\354\345\203\67\342&.&\342&.&.&\366\200\42*\237\4\206\304\306\36\14\320"
"<\36\354\345\203\67\342&.&\342&.&.\346\200\42*{\270\203\330\240\203\240\330\203\0\320D\31"
"\354\345\203\67\342&.&\342&.&.\346\200\42*{\300\253|u\320E\33\354\345\203\67\342&."
"&\342&.&.\346\200\42*{\300\250\254\256R\35\320G\37\355\345\203\67\344&\60&\344&\60&"
"\60&\342`\42,*,\36ApR\211\70\241\0\320I\35\354\345\203\67\342&.&\342&.&."
"\346\200\42*{TVaAaQ\26\0\320P\30\215\345\203\343\200\70\311\1q\362\3\243\230\300\230\300"
"\230\300\230 \0\320T\34\255\345\203\345@\70\350@\70=\300\201QL`LXDLXp\360\201\10"
"\0\320X\34\255\345\203\345@\70\350@\70\311\201QL`L\330\201p\320\201P\360\201\10\0\320`\36"
"\255\345\203\345@\70\350@\70\311\201QL`L\330\201P\134P\134P\134\320\201\10\0\320l\17\15\245"
"\204\343\200\70\311\1q\26\7\6\320m\25\255\345\203\345@\70\350@\70=\300\201=\300\201pN\0\320"
"p\26\255\345\203\345@\70\350@\70=\300\201=tp\342\3\21\0\320t\32\255\345\203\345@\70\350@"
"\70=\300\201=\300\201p\320\201P\360\201\10\0\320|\34\255\345\203\345@\70\350@\70=\300\201=\300"
"\201P\134P\134P\134\320\201\10\0\320}\34\255\345\203\345@\70\350@\70=\300\201=@\134P\134\320"
"\201P\134\320\201\10\0\320\201\30\255\345\203\345@\70\350@\70=\300\201=\202\272\250\260\250\270\42\0\320"
"\244\27\252\355\203\63\362&*&*&*\306(\233\250\220\260\271\310\4\320\245\24\314\345\203\367*WW"
"Aa!r\223\361\320\7\261\31\320\250\25\314\345\203\367*WWAa!r\223\261\341\261i\17\6\320"
"\254\31\314\345\203\367*WWAa!r\223\361\20\7\261A\7A\261\7\1\320\264\25\314\345\203\367*"
"WWAa!r\223\361 W\371\352\0\320\265\26\314\345\203\367*WWAa!r\223\361 QY"
"]\245:\320\267\34\315\345\203\67\302*,*,*\302*Y\214\134\204d<dpR\211\70\241\0\320"
"\271\30\314\345\203\367*WWAa!r\223\361\340VaAaQ\26\0\320\300\30\255\351\203\63\70\346"
"$&\60&\60\346\244\60&\60\346$\70\67\0\320\301\30\316\345\203\67:\304*$\64\304\212\64\304*"
":\36\352 :'\0\320\304\30\316\345\203\67:\304*$\64\304\212\64\304*:Ut\326\7\42\0\320"
"\310\35\316\345\203\67:\304*$\64\304\212\64\304*:\36\352 :\354 ,\372 \4\0\320\311\37\316"
"\345\203\67:\304*$\64\304\212\64\304*:\36\244\242.*\246*&\62\246*\4\0\320\320\35\316\345"
"\203\67:\304*$\64\304\212\64\304*:\36\354.*.*.*\356\4\0\320\321\35\316\345\203\67:"
"\304*$\64\304\212\64\304*:\36,*.*\356.*\356\4\0\320\323\33\316\345\203\67:\304*$"
"\64\304\212\64\304*:\36\66:\255D\240P\4\0\320\324 \316\345\203\67:\304*$\64\304\212\64\304"
"*:\36\62$\64$\62\42aLD\224\210L\0\320\325\31\316\345\203\67:\304*$\64\304\212\64\304"
"*:\36\225]Xv\66\0\320\334\42\255\351\203\63$\62\344 $D\60D\60\344 \244\60D\60\344"
" $eHdHdHdH\0\320\335\32\314\345\203\63\42\62\342&B\60\342\206\60\342&\42\62\42"
"\36\342 \66\7\320\340\34\314\345\203\63\42\62\342&B\60\342\206\60\342&\42\62\42\62\42&\66\333\3"
"\1\320\344\37\314\345\203\63\42\62\342&B\60\342\206\60\342&\42\62\42\36\342 \66\350 (\366 \0"
"\320\354\32\314\345\203\63\42\62\342&B\60\342\206\60\342&\42\62\42\36\344*_\35\320\355\34\314\345\203"
"\63\42\62\342&B\60\342\206\60\342&\42\62\42\36$*\253\253T\7\320\357\42\316\345\203\63\42\66\42"
"\304&\42$\60\42\304f$\60\42\304&\42\66\42\36\70:\255D\240P\0\320\360(\316\345\203\63\42"
"\66\42\304&\42$\60\42\304f$\60\42\304&\42\66\42\36\62$\64$\62\42aLD\224\210L\0"
"\320\361\34\314\345\203\63\42\62\342&B\60\342\206\60\342&\42\62\42\36AYTf\25\0\320\370\31\255"
"\351\203\63\70\346$&\60&\360\200$&\60&\360\200$\70\67\0\321\15\32\316\345\203\67:\304*$"
"\364@*$\364@*:\36\225]Xv\66\0\321\60\24\255\351\203\71\370 JV\366 \244V\366 "
"*\70\7\321\61\23\314\345\203\67\366J\364\206\364*\66\36\372 \66\3\321\64\23\314\345\203\67\366J\364"
"\206\364*\66\36\66\333\203\1\321\70\30\314\345\203\67\366J\364\206\364*\66\36\342 \66\350 (\366 "
"\0\321:\33\314\345\203\67\366J\364\206\364*\66\272\242*\42&\242\42&\42*&\242\1\321@\23\314"
"\345\203\67\366J\364\206\364*\66\36\344*_\35\321A\25\314\345\203\67\366J\364\206\364*\66\36$*"
"\253\253T\7\321C\33\315\345\203\67\70\302*\42\64\302f\42\64\302*\70\36\62\70\251D\234P\0\321"
"D!\316\345\203\67:\304*$\64\304f$\64\304*:\36\62$\64$\62\42aLD\224\210L\0"
"\321E\27\314\345\203\67\366J\364\206\364*\66\36\334*,(,\312\2\0\321L$\255\351\203\65\42\64"
"\342 &B\62B\62\342 bB\62B\62\342 &\42\64\42\64\42\64\42\64\42\0\321M\33\314\345"
"\203\63\42\62\342&B\60\342bB\60\342&\42\62\42\36\342 \66\7\321P\34\314\345\203\63\42\62\342"
"&B\60\342bB\60\342&\42\62\42\36 \66\333\3\1\321T \314\345\203\63\42\62\342&B\60\342"
"bB\60\342&\42\62\42\36\342 \66\350 (\366 \0\321\134\33\314\345\203\63\42\62\342&B\60\342"
"bB\60\342&\42\62\42\36\344*_\35\321]\35\314\345\203\63\42\62\342&B\60\342bB\60\342&"
"\42\62\42\36$*\253\253T\7\321_#\316\345\203\63\42\66\42\304&\42$\60\42\304b\42$\60\42"
"\304&\42\66\42\36\70:\255D\240P\0\321a\35\314\345\203\63\42\62\342&B\60\342bB\60\342&"
"\42\62\42\36AYTf\25\0\321h\24\255\351\203\71\370 JV\360\200JV\360\200*\70\7\321l"
"\25\314\345\203\67\366J\360@J\360@*\66yl\332\203\1\321|!\316\345\203\67:\304*$p\304"
"*$p\304*:\36\62$\64$\62\42aLD\224\210L\0\321\204$\255\351\203\65\42\64\342 &"
"B\62Bn\342 &B\62Bn\342 &\42\64\42\64\42\64\42\64\42\0\321\210\35\314\345\203\63\42"
"\62\342&Bl\342&Bl\342&\42\62\42\62\42&\66\333\3\1\321\240\26\255%\204\343\200$\70\370"
"\200$\70\370\200\36Mp\262\3\3\321\241\30\315\345\203\345@(\370@(\370@\60\70\354\300\36\340@"
"\70'\0\321\244\31\315\345\203\345@(\370@(\370@\60\70\354\300\36:\70\361\201\10\0\321\250\35\315"
"\345\203\345@(\370@(\370@\60\70\354\300\36\340@\70\350@(\370@\4\0\321\260\37\315\345\203\345"
"@(\370@(\370@\60\70\354\300\36\340@(.(.(.\350@\4\0\321\261\37\315\345\203\345@"
"(\370@(\370@\60\70\354\300\36 .(.\350@(.\350@\4\0\321\263\33\315\345\203\345@("
"\370@(\370@\60\70\354\300\36IplD\240L\20\0\321\265\33\315\345\203\345@(\370@(\370@"
"\60\70\354\300\36A]TXT\134\21\0\321\272\35\315\345\203\345@(\370@(\370@\60\70\354\300\36"
"\372@,&\60&\354@\4\0\321\274#\316\345\203\65\350 \42(\60(\60\350 \42(\60(\220\342"
" \42:.*.*\346@\42:\15\0\321\300\33\316\345\203\67\344($\64\344\210\64\344(,\311\301"
"D<Pt\326\7\42\0\321\330/\316\345\203\65$\342 \42$\42\60$\42\60$\342 \42$\42\60"
"$\42\220\342 \42$\64$(*$(*\344`\42$\64$\64$\0\321\364!\314\345\203\67\342 "
"$\42\62\42\62\342 $\42\62\42\62\342 $\66(,(\354\200\42\66\1\321\370\30\314\345\203\367 "
"H\364 H\364 (\331\1E<@l\266\7\2\322\7\36\315\345\203\67\342(\42\64\342(\42\64\342"
"(*,\342`\42\36\62\70\251D\234P\0\322\11\33\314\345\203\367 H\364 H\364 (\331\1E"
"<\270UXPX\224\5\0\322\20\33\255%\204\343\200$\70\370\200$\70\370\200\36&aL`L`"
"L\320\201\1\322,\24\253\351\203\341\240\64\364\240\64\364\200\366\200*\64+\0\322-\30\315\345\203\345@"
"(\370@(\370@\36\340\300,\70\360@\70'\0\322\60\33\315\345\203\345@(\370@(\370@\36\372"
"\300,\70\60&\60\70\370@\4\0\322\64\35\315\345\203\345@(\370@(\370@\36\340\300,\70\360@"
"\70\350@(\370@\4\0\322<\37\315\345\203\345@(\370@(\370@\36\340\300,\70\360@(.("
".(.\350@\4\0\322=\37\315\345\203\345@(\370@(\370@\36\340\300,\70\60.(.\350@"
"(.\350@\4\0\322\77\34\315\345\203\345@(\370@(\370@\36\340\300,\70\36\64\70\66\42P&"
"\10\0\322A\34\315\345\203\345@(\370@(\370@\36\340\300,\70\36\260.*,*\256\10\0\322H"
"$\314\345\203\67\342 $\42\62\42\62\342 $\42\62\42\62\342 $\366\200\42(,(\244(,("
",\0\322\134)\356\345\203\341 &$\64\344 &$\64\344 &:\344`\42.\204.*\36\62$"
"\64$\62\42aLD\224\210L\0\322d-\316\345\203\67\42\342 $\42eD\312\210\210\203\220\210\224"
"\21)#\42\16B\42b#\16(\22\205E\4\305P\4\205E\4\205E\4\322\200$\314\345\203\67\342"
" $\42\62\42\62\342 $\42\62\42\62\342 $\366\200\42(,(,(,(,\0\322\201\30\354"
"\345\203\341 F\364@F\364@&\366\200\42*{D\7\261\31\322\204\33\354\345\203\341 F\364@F"
"\364@&\66\366\200\42*\237\4\206\304\306\36\14\322\210\35\354\345\203\341 F\364@F\364@&\366\200"
"\42*{\270\203\330\240\203\240\330\203\0\322\220\30\354\345\203\341 F\364@F\364@&\366\200\42*{"
"\300\253|u\322\221\32\354\345\203\341 F\364@F\364@&\366\200\42*{\300\250\254\256R\35\322\225"
"\34\354\345\203\341 F\364@F\364@&\366\200\42*{TVaAaQ\26\0\322\234\34\255\345\203"
"\343\200$\70\370\200$\70\370\200\374\300(&\60&\60&\60&\10\0\322\240\36\315\345\203\345@(\370"
"@(\370@\36\372\300(&\60&,\42&,\70\370@\4\0\322\244\37\315\345\203\345@(\370@("
"\370@\36\340\300(&\60&\354@\70\350@(\370@\4\0\322\254!\315\345\203\345@(\370@(\370"
"@\36\340\300(&\60&\354@(.(.(.\350@\4\0\322\261\36\315\345\203\345@(\370@("
"\370@\36\340\300(&\60&\36\254.*,*\256\10\0\322\270\24m\245\204\343\200$\70\370\200$\70"
"\370\200\36\351\201\1\322\271\27\315\345\203\345@(\370@(\370@\36\372\300\36\340@\70'\0\322\274\30"
"\315\345\203\345@(\370@(\370@\36\372\300\36:\70\361\201\10\0\322\277\32\315\345\203\345@(\370@"
"(\370@\36\372\300\36\340@(\70\361\201\10\0\322\300\34\315\345\203\345@(\370@(\370@\36\372\300"
"\36\340@\70\350@(\370@\4\0\322\302 \315\345\203\345@(\370@(\370@\36\372\300\274\242,\42"
"&\244\42&$*&\244\242\2\0\322\310\36\315\345\203\345@(\370@(\370@\36\372\300\36\340@("
".(.(.\350@\4\0\322\311\36\315\345\203\345@(\370@(\370@\36\372\300\36 .(.\350"
"@(.\350@\4\0\322\313\32\315\345\203\345@(\370@(\370@\36\372\300\36IplD\240L\20"
"\0\322\324\36\314\345\203\67\342 $\42\62\42\62\342 $\42\62\42\62\342 $\66\366\200\42\66\3\322"
"\330\30\314\345\203\367 H\364 H\364 (\366\200\42\36 \66\333\3\1\322\334\34\314\345\203\367 H"
"\364 H\364 (\366\200\42\36\342 \66\350 (\366 \0\322\344\27\314\345\203\367 H\364 H\364"
" (\366\200\42\36\344*_\35\322\345\31\314\345\203\367 H\364 H\364 (\366\200\42\36$*\253"
"\253T\7\322\360\24\253\351\203\65\364 FR\362 FR\362 &\64\7\322\361\23\314\345\203\67\366J"
"\364J\364*\66\36\372 \66\3\322\364\23\314\345\203\67\366J\364J\364*\66yl\332\203\1\322\370\30"
"\314\345\203\67\366J\364J\364*\66\36\342 \66\350 (\366 \0\323\0\23\314\345\203\67\366J\364J"
"\364*\66\36\344*_\35\323\1\25\314\345\203\67\366J\364J\364*\66\36$*\253\253T\7\323\3\33"
"\315\345\203\67\70\302*\42\64\302*\42\64\302*\70\36\62\70\251D\234P\0\323\5\27\314\345\203\67\366"
"J\364J\364*\66\36\334*,(,\312\2\0\323\14\34\256\345\203\65:\346@\42*&UL\252\230"
"\30\222\230T\61i\16$\242s\3\323\15\35\316\345\203\67:\344 &($*($j$U\310A"
"Lt<\324AtN\0\323\16!\316\345\203\67:\344 &($*($j$U\310ALt<"
"\212vQqQqQ!\0\323\20\35\316\345\203\67:\344 &($*($j$U\310ALt"
"\252\350\254\17D\0\323\24\42\316\345\203\67:\344 &($*($j$U\310ALt<\324A"
"t\330AX\364A\10\0\323\26&\316\345\203\67:\344 &($*($j$U\310ALt<"
"HE]DLLEL\252\230\230\212\22\0\323\34\42\316\345\203\67:\344 &($*($j$"
"U\310ALt<\330]T\134T\134T\334\11\0\323\35\42\316\345\203\67:\344 &($*($"
"j$U\310ALt<XT\134T\334]T\334\11\0\323\37 \316\345\203\67:\344 &($*"
"($j$U\310ALt<ltZ\211@\241\10\0\323 %\316\345\203\67:\344 &($*"
"($j$U\310ALt<dHhHdD\302\230\210(\21\231\0\323!\36\316\345\203\67:\344"
" &($*($j$U\310ALt<*\273\260\354l\0\323%\37\316\345\203\67:\344 &"
"($*($j$U\310ALt<\330]\364]\364\11\0\323(%\256\345\203\65$\64\344`\42"
"$M\222\64I\322\304\220\304$I\223\344`\42$\64$\64$\64$\64$\0\323)\36\314\345\203\63"
"\42\62\342@\42I\232\210\220\64#i\42\16$RF\304C\34\304\346\0\323,\37\314\345\203\63\42\62"
"\342@\42I\232\210\220\64#i\42\16$RFDF\304\304f{ \323\60\42\314\345\203\63\42\62\342"
"@\42I\232\210\220\64#i\42\16$RF\304C\34\304\6\35\4\305\36\4\323\70\36\314\345\203\63\42"
"\62\342@\42I\232\210\220\64#i\42\16$RF\304\203\134\345\253\3\323\71 \314\345\203\63\42\62\342"
"@\42I\232\210\220\64#i\42\16$RF\304\203Deu\225\352\0\323;%\316\345\203\63\42\66\42"
"\344 \42QHLDPH\314PHLD\310AD\332\210x\340\350\264\22\201B\1\323<+\316\345"
"\203\63\42\66\42\344 \42QHLDPH\314PHLD\310AD\332\210x\310\220\320\220\310\210\204"
"\61\21Q\42\62\1\323= \314\345\203\63\42\62\342@\42I\232\210\220\64#i\42\16$RF\304#"
"(\213\312\254\2\0\323D\34\256\345\203\65:\346@\42*&UL\14IL\252\230T\61\61\7\26\321"
"\271\1\323E\34\316\345\203\67:\344 &($j$UPH\324\1Mt<\324AtN\0\323|"
"\35\256\345\203;\372`($&,$&,$&\206$&,$&\354`(:\7\323}\30\314\345"
"\203\67\366@&$UH\232\221T\7\62\261\361\320\7\261\31\323\200\30\314\345\203\67\366@&$UH"
"\232\221T\7\62\261\361\260\331\36\14\323\204\35\314\345\203\67\366@&$UH\232\221T\7\62\261\361\20"
"\7\261A\7A\261\7\1\323\214\31\314\345\203\67\366@&$UH\232\221T\7\62\261\361 W\371\352"
"\0\323\215\32\314\345\203\67\366@&$UH\232\221T\7\62\261\361 QY]\245:\323\217\37\315\345"
"\203\67\70\342 &ITLH\314LHT\304ALp<dpR\211\70\241\0\323\220&\316\345\203"
"\67:\344 &($*($f($*\344 &:\36\62$\64$\62\42aLD\224\210L\0"
"\323\221\34\314\345\203\67\366@&$UH\232\221T\7\62\261\361\340VaAaQ\26\0\323\230-\256"
"\345\203\67\42\66\342`$\42$&(\42$&(\42$&d\42$&(\42$&(\342`$\42"
"\66\42\66\42\66\42\66\42\0\323\231\37\314\345\203\63\42\62\342@\42I\232\210\220\24\23!i\42\16$"
"RF\304C\34\304\346\0\323\234\37\314\345\203\63\42\62\342@\42I\232\210\220\24\23!i\42\16$R"
"F\304\3\304f{ \323\240#\314\345\203\63\42\62\342@\42I\232\210\220\24\23!i\42\16$RF"
"\304C\34\304\6\35\4\305\36\4\323\250\37\314\345\203\63\42\62\342@\42I\232\210\220\24\23!i\42\16"
"$RF\304\203\134\345\253\3\323\251!\314\345\203\63\42\62\342@\42I\232\210\220\24\23!i\42\16$"
"RF\304\203Deu\225\352\0\323\253&\316\345\203\63\42\66\42\344 \42QHLDPH\304DP"
"HLD\310AD\332\210x\340\350\264\22\201B\1\323\255!\314\345\203\63\42\62\342@\42I\232\210\220"
"\24\23!i\42\16$RF\304#(\213\312\254\2\0\323\264\35\256\345\203;\372`($&,$&"
"\206$&,$&,$&\346\300(:\7\323\270\30\314\345\203\67\366@&$\315H\252\220\64\7\64"
"\261\311c\323\36\14\323\274\35\314\345\203\67\366@&$\315H\252\220\64\7\64\261\361\20\7\261A\7A"
"\261\7\1\323\304\31\314\345\203\67\366@&$\315H\252\220\64\7\64\261\361 W\371\352\0\323\305\32\314"
"\345\203\67\366@&$\315H\252\220\64\7\64\261\361 QY]\245:\323\310&\316\345\203\67:\344 "
"&($f($*($f\344 &:\36\62$\64$\62\42aLD\224\210L\0\323\311\34\314"
"\345\203\67\366@&$\315H\252\220\64\7\64\261\361\340VaAaQ\26\0\323\320-\256\345\203\67\42"
"\66\342`$\42$&(\42$&d\42$&(\42$&(\42$&d\342`$\42\66\42\66\42"
"\66\42\66\42\0\323\330#\314\345\203\63\42\62\342@\42I\212\211\220\64\21!)&\16$RF\304C"
"\34\304\6\35\4\305\36\4\323\341!\314\345\203\63\42\62\342@\42I\212\211\220\64\21!)&\16$R"
"F\304\203Deu\225\352\0\323\343&\316\345\203\63\42\66\42\344 \42QH\304DPHLDPH"
"\304D\310AD\332\210x\340\350\264\22\201B\1\323\354\30\215%\204\343\200(*,*,*,*\350"
"\200\36Mp\262\3\3\323\355\32\315\345\203\345@,&\60&\60&\354@\60\70\354\300\36\340@\70'"
"\0\323\360\33\315\345\203\345@,&\60&\60&\354@\60\70\354\300\36:\70\361\201\10\0\323\364\37\315"
"\345\203\345@,&\60&\60&\354@\60\70\354\300\36\340@\70\350@(\370@\4\0\323\374!\315\345"
"\203\345@,&\60&\60&\354@\60\70\354\300\36\340@(.(.(.\350@\4\0\323\375!\315"
"\345\203\345@,&\60&\60&\354@\60\70\354\300\36 .(.\350@(.\350@\4\0\323\377\35"
"\315\345\203\345@,&\60&\60&\354@\60\70\354\300\36IplD\240L\20\0\324\1\35\315\345\203"
"\345@,&\60&\60&\354@\60\70\354\300\36A]TXT\134\21\0\324\10!\316\345\203\65:\315"
"\201DTL\252\230T\61\61$\61i\16$\342\242\342\242b\16$\242\323\0\324\35\33\316\345\203\67\346"
"&(&(M\320\304MXN\16&\342Q\331\205eg\3\324@\37\314\345\203\67\355\301H\232\240\220"
"\230\240\220\230\240\220\230\240\203\221\240\260\240\260\3\212\330\4\324D\35\314\345\203\67\342&$&($&"
"(\342&(,(\354\200\42\36 \66\333\3\1\324\134\35\215%\204\343\200(*,*,*,*\350"
"\200\36&aL`L`L\320\201\1\324`\35\315\345\203\345@,&\60&\60&\354@,&\60&"
"\350\300\36:\70\361\201\10\0\324d!\315\345\203\345@,&\60&\60&\354@,&\60&\350\300\36"
"\340@\70\350@(\370@\4\0\324m#\315\345\203\345@,&\60&\60&\354@,&\60&\350\300"
"\36 .(.\350@(.\350@\4\0\324o\37\315\345\203\345@,&\60&\60&\354@,&\60"
"&\350\300\36IplD\240L\20\0\324x\31\253\351\203\341\200$*(*(*(*\344\200\36\356"
"\200*\64+\0\324y\32\315\345\203\345@,&\60&\60&\354@\36\340\300,\70\360@\70'\0\324"
"|\35\315\345\203\345@,&\60&\60&\354@\36\372\300,\70\60&\60\70\370@\4\0\324\177\35\315"
"\345\203\345@,&\60&\60&\354@\36\340\300,\70\360@(\70\361\201\10\0\324\200\37\315\345\203\345"
"@,&\60&\60&\354@\36\340\300,\70\360@\70\350@(\370@\4\0\324\202$\315\345\203\345@"
",&\60&\60&\354@\36\340\300,\70\256\242,\42&\244\42&$*&\244\242\2\0\324\210!\315"
"\345\203\345@,&\60&\60&\354@\36\340\300,\70\360@(.(.(.\350@\4\0\324\211!"
"\315\345\203\345@,&\60&\60&\354@\36\340\300,\70\60.(.\350@(.\350@\4\0\324\213"
"\36\315\345\203\345@,&\60&\60&\354@\36\340\300,\70\36\64\70\66\42P&\10\0\324\215\36\315"
"\345\203\345@,&\60&\60&\354@\36\340\300,\70\36\260.*,*\256\10\0\324\224#\314\345\203"
"\67\366`$MPHLPHLPHL\320\301H\354\1EPXPHQXPX\0\324\251 "
"\354\345\203\67\342&$&($&(\342&\366\200\42*\204*=\270UXPX\224\5\0\324\314#"
"\314\345\203\67\366`$MPHLPHLPHL\320\301H\354\1EPXPXPXPX\0"
"\324\320\35\354\345\203\67\342&$&($&(\342&\66\366\200\42*\237\4\206\304\306\36\14\324\324\37"
"\354\345\203\67\342&$&($&(\342&\366\200\42*{\270\203\330\240\203\240\330\203\0\324\334\32\354"
"\345\203\67\342&$&($&(\342&\366\200\42*{\300\253|u\324\337\35\355\345\203\67\344&\243"
"\230D!\67\301\21\7\23aQa\361\10\202\223J\304\11\5\324\350\37\255\345\203\343\200(*,*,"
"*,*\350\200\36\370\300(&\60&\60&\60&\10\0\324\354 \315\345\203\345@,&\60&\60&"
"\354@\36\372\300(&\60&,\42&,\70\370@\4\0\324\360!\315\345\203\345@,&\60&\60&"
"\354@\36\340\300(&\60&\354@\70\350@(\370@\4\0\324\370#\315\345\203\345@,&\60&\60"
"&\354@\36\340\300(&\60&\354@(.(.(.\350@\4\0\324\373 \315\345\203\345@,&"
"\60&\60&\354@\36\340\300(&\60&\36\60\70\66\42P&\10\0\324\375 \315\345\203\345@,&"
"\60&\60&\354@\36\340\300(&\60&\36\254.*,*\256\10\0\325\4\26M\245\204\343\200(*"
",*,*,*\350\200\36\351\201\1\325\10\32\315\345\203\345@,&\60&\60&\354@\36\372\300\36"
":\70\361\201\10\0\325\14\36\315\345\203\345@,&\60&\60&\354@\36\372\300\36\340@\70\350@("
"\370@\4\0\325\24 \315\345\203\345@,&\60&\60&\354@\36\372\300\36\340@(.(.(."
"\350@\4\0\325\25 \315\345\203\345@,&\60&\60&\354@\36\372\300\36 .(.\350@(."
"\350@\4\0\325\27\34\315\345\203\345@,&\60&\60&\354@\36\372\300\36IplD\240L\20\0"
"\325<\34\254\345\203\67\366`$MPHLPHLPHLPHL\320\301Hl\16\325=\30\314"
"\345\203\67\366@&$UH\252\220T\7\62\261\361\320\7\261\31\325@\30\314\345\203\67\366@&$U"
"H\252\220T\7\62\261\311c\323\36\14\325D\35\314\345\203\67\366@&$UH\252\220T\7\62\261\361"
"\20\7\261A\7A\261\7\1\325L\31\314\345\203\67\366@&$UH\252\220T\7\62\261\361 W\371"
"\352\0\325M\32\314\345\203\67\366@&$UH\252\220T\7\62\261\361 QY]\245:\325O\37\315"
"\345\203\67\70\342 &ITLHTLHT\304ALp<dpR\211\70\241\0\325Q\34\314\345"
"\203\67\366@&$UH\252\220T\7\62\261\361\340VaAaQ\26\0\325X\35\255\351\203'*,"
"*\346$j(MV!U!\61Q!A\61\251\206\202\263\1\325Y\34\316\345\203'.\344(h,"
"&UL\252\211\230\250\240\261\350x\250\203\350\234\0\325\134\34\316\345\203'.\344(h,&UL\252"
"\211\230\250\240\261\350T\321Y\37\210\0\325`!\316\345\203'.\344(h,&UL\252\211\230\250\240"
"\261\350x\250\203\350\260\203\260\350\203\20\0\325e#\316\345\203'.\344(h,&UL\252\211\230\250"
"\240\261\350x\220\212\272\210\270\212\232\250\270\212\22\0\325h!\316\345\203'.\344(h,&UL\252"
"\211\230\250\240\261\350x\260\273\250\270\250\270\250\270\23\0\325i!\316\345\203'.\344(h,&UL"
"\252\211\230\250\240\261\350x\260\250\270\250\270\273\250\270\23\0\325k\37\316\345\203'.\344(h,&U"
"L\252\211\230\250\240\261\350x\330\350\264\22\201B\21\0\325m\35\316\345\203'.\344(h,&UL"
"\252\211\230\250\240\261\350xTva\331\331\0\325t(\255\351\203'*$&*\344 $\311PHD"
"L\22\251\220\252\220\20\251\220\24\61IB\206B\42C\42C\42C\2\325u \314\345\203'*\342 "
"$\42d(\42M\212\64\61\23\61)B\206\42\42#\342!\16bs\325x\42\314\345\203'*\342 "
"$\42d(\42M\212\64\61\23\61)B\206\42\42#\42#bb\263=\20\325|%\314\345\203'*"
"\342 $\42d(\42M\212\64\61\23\61)B\206\42\42#\342!\16b\203\16\202b\17\2\325\204!"
"\314\345\203'*\342 $\42d(\42M\212\64\61\23\61)B\206\42\42#\342A\256\362\325\1\325\205"
"\42\314\345\203'*\342 $\42d(\42M\212\64\61\23\61)B\206\42\42#\342A\242\262\272Ju"
"\325\207\42\316\345\203'*\42\344$\42h(\42&\213\230\64\63Y\4\15E\304F\304\3G\247\225\10"
"\24\12\325\210(\316\345\203'*\42\344$\42h(\42&\213\230\64\63Y\4\15E\304F\304C\206\204"
"\206DF$\214\211\210\22\221\11\325\211\42\314\345\203'*\342 $\42d(\42M\212\64\61\23\61)"
"B\206\42\42#\342\21\224EeV\1\325\220\37\255\351\203'*,*\346$j(MLUHLT"
"HLT\10EL\252\241\340l\0\325\245\35\316\345\203'.\344(h,&\325DLTL\252\221\261"
"\350xTva\331\331\0\325\310\35\255\351\203'\60&\360 *d.\42&L*\244*J*EL"
"X\310\134p\6\325\311\35\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36\372 "
"\66\3\325\314\35\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36\66\333\203\1\325"
"\320\42\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36\342 \66\350 (\366 "
"\0\325\322%\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\272\242*\42&\242\42"
"&\42*&\242\1\325\330\35\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36\344"
"*_\35\325\331\37\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36$*\253\253"
"T\7\325\333 \315\345\203'.\342(f,$&*$&f$&*f,\70\36\62\70\251D\234"
"P\0\325\335!\314\345\203'\356 (d,\42&*\42&f\42&*d,\66\36\334*,(,"
"\312\2\0\325\344+\255\351\203',\42&,\342 &\42d*\42MP\204T\304\204TL\204TL"
"D\232\240\210\220\251\210\320\210\320\210\320\210\0\325\345!\314\345\203'*\342 $\42d(\42M\212\64"
"\21\23iR\204\14EDF\304C\34\304\346\0\325\350!\314\345\203'*\342 $\42d(\42M\212"
"\64\21\23iR\204\14EDF\304\3\304f{ \325\354%\314\345\203'*\342 $\42d(\42M"
"\212\64\21\23iR\204\14EDF\304C\34\304\6\35\4\305\36\4\325\364!\314\345\203'*\342 $"
"\42d(\42M\212\64\21\23iR\204\14EDF\304\203\134\345\253\3\325\365#\314\345\203'*\342 "
"$\42d(\42M\212\64\21\23iR\204\14EDF\304\203Deu\225\352\0\325\367#\316\345\203'"
"*\42\344$\42h(\42&\213\230\24\23\61Y\4\15E\304F\304\3G\247\225\10\24\12\325\371#\314"
"\345\203'*\342 $\42d(\42M\212\64\21\23iR\204\14EDF\304#(\213\312\254\2\0\326"
"\0\36\255\351\203'\60&\360 *d.\42&\246*J*J*\204\42&,d.\70\3\326\1\35"
"\314\345\203'\356 (d,\42&f\42&*\42&fd,\66\36\372 \66\3\326\4\35\314\345\203"
"'\356 (d,\42&f\42&*\42&fd,\66yl\332\203\1\326\10\42\314\345\203'\356 "
"(d,\42&f\42&*\42&fd,\66\36\342 \66\350 (\366 \0\326\20\35\314\345\203'"
"\356 (d,\42&f\42&*\42&fd,\66\36\344*_\35\326\21\37\314\345\203'\356 ("
"d,\42&f\42&*\42&fd,\66\36$*\253\253T\7\326\23\37\315\345\203'.\342(f"
",$&f$&*$&fYp<dpR\211\70\241\0\326\24#\316\345\203'.\344(h,"
"&\315L\252\230\64Cc\321\361\220!\241!\221\21\11c\42\242Dd\2\326\25!\314\345\203'\356 "
"(d,\42&f\42&*\42&fd,\66\36\334*,(,\312\2\0\326\34+\255\351\203',"
"\42&,\342 &\42d*\42M\310\204TL\204TL\204T\304D\232\240\210\220\251\210\320\210\320\210"
"\320\210\0\326 #\314\345\203'*\342 $\42d(\42M\304D\232\24i\42&B\206\42\42#\42"
"#bb\263=\20\326$&\314\345\203'*\342 $\42d(\42M\304D\232\24i\42&B\206\42"
"\42#\342!\16b\203\16\202b\17\2\326-#\314\345\203'*\342 $\42d(\42M\304D\232\24"
"i\42&B\206\42\42#\342A\242\262\272Ju\326\70\26\255%\204-\70\362\36\252.*,*\256\36"
"\60\70\331\201\1\326\71\30\355\345\203-\362\256.*,*\256\64\70\354\300\36\340@\70'\0\326<\31"
"\355\345\203-\362\256.*,*\256\64\70\354\300\36:\70\361\201\10\0\326@\35\355\345\203-\362\256."
"*,*\256\64\70\354\300\36\340@\70\350@(\370@\4\0\326E\36\355\345\203-\362\256.*,*"
"\256\64\70\354\300\274\242,\42\254\242$*\254\242\2\0\326H\37\355\345\203-\362\256.*,*\256\64"
"\70\354\300\36\340@(.(.(.\350@\4\0\326I\37\355\345\203-\362\256.*,*\256\64\70"
"\354\300\36 .(.\350@(.\350@\4\0\326K\33\355\345\203-\362\256.*,*\256\64\70\354"
"\300\36IplD\240L\20\0\326M\33\355\345\203-\362\256.*,*\256\64\70\354\300\36A]T"
"XT\134\21\0\326Q\35\355\345\203-\362\256.*,*\256\64\70\354\300\36\340@(\370@(\370@"
"\4\0\326T\42\316\345\203\65.*.*\350$:\252&(*\204\42*$\252&.*.*\346@"
"\42:\15\0\326U\36\316\345\203),\346&j*(&h$&(j*,\311\301D<\324At"
"N\0\326X\37\316\345\203),\346&j*(&h$&(j*,\311\301D<Pt\326\7\42"
"\0\326\134#\316\345\203),\346&j*(&h$&(j*,\311\301D<\324At\330AX"
"\364A\10\0\326g!\316\345\203),\346&j*(&h$&(j*,\311\301D<ltZ"
"\211@\241\10\0\326i\37\316\345\203),\346&j*(&h$&(j*,\311\301D<*\273"
"\260\354l\0\326p,\316\345\203\65$(*$(*$\342$iHHMHDT\10ETH\222"
"\232\220\240\250\220\240\250\220\203\211\220\320\220\320\220\0\326q \314\345\203)E\304E\232\231\210\220\230\220"
"\221\230\220\210\230\231\210\240\24\7\22\351!\16bs\326t!\314\345\203)E\304E\232\231\210\220\230\220"
"\221\230\220\210\230\231\210\240\24\7\22\351\1b\263=\20\326\203#\315\345\203)E\310E\242\231\210\230$"
"\63I\42\202f\42\242\202\42\42\16\42\322C\6'\225\210\23\12\326\205$\314\345\203)E\304E\232\231"
"\210\220\230\220\221\230\220\210\230\231\210\240\24\7\22\351\301\255\302\202\302\242,\0\326\214\37\314\345\203\67("
",(,\342&\66\244(\42*&\42*&\244(YP\330\1El\2\326\215\35\314\345\203),\342"
"&f*$&($&(f*(\354\200\42\36\342 \66\7\326\220\36\314\345\203),\342&f*"
"$&($&(f*(\354\200\42\36 \66\333\3\1\326\224\42\314\345\203),\342&f*$&"
"($&(f*(\354\200\42\36\342 \66\350 (\366 \0\326\235\37\314\345\203),\342&f*"
"$&($&(f*(\354\200\42\36$*\253\253T\7\326\237\36\315\345\203),\344&h*&"
"QL\242\240\251d\21\7\23\361\220\301I%\342\204\2\326\241!\314\345\203),\342&f*$&("
"$&(f*(\354\200\42\36\334*,(,\312\2\0\326\250\33\255%\204-\70\362\36\252.*,"
"*\256\60&\60&\60&\60&\350\300\0\326\254\33\355\345\203-\362\256.*,*\256\60&\60&\350"
"\300\36:\70\361\201\10\0\326\260\37\355\345\203-\362\256.*,*\256\60&\60&\350\300\36\340@\70"
"\350@(\370@\4\0\326\271!\355\345\203-\362\256.*,*\256\60&\60&\350\300\36 .(."
"\350@(.\350@\4\0\326\273\35\355\345\203-\362\256.*,*\256\60&\60&\350\300\36Ipl"
"D\240L\20\0\326\304\25\313\351\203+\64\356\36\242*QTT\371\1UhV\0\326\305\30\355\345\203"
"-\362\256.*,*\256\36\344\300,\70\360@\70'\0\326\310\33\355\345\203-\362\256.*,*\256"
"\36\301\201Yp`L`p\360\201\10\0\326\314\35\355\345\203-\362\256.*,*\256\36\344\300,\70"
"\360@\70\350@(\370@\4\0\326\321\37\355\345\203-\362\256.*,*\256\36\344\300,\70\256\242,"
"\42\254\242$*\254\242\2\0\326\324\37\355\345\203-\362\256.*,*\256\36\344\300,\70\360@(."
"(.(.\350@\4\0\326\327\34\355\345\203-\362\256.*,*\256\36\344\300,\70\36\64\70\66\42"
"P&\10\0\326\331\34\355\345\203-\362\256.*,*\256\36\344\300,\70\36\260.*,*\256\10\0"
"\326\340#\314\345\203),(,\342&\66\244(\42*&\42*&\244(\366\200\42(,(\244(,"
"(,\0\326\344\35\354\345\203),\342&f*$&(f*\66\366\200\42*\204*'\261i\17\6"
"\326\350!\354\345\203),\342&f*$&(f*\366\200\42*\204*=\304Al\320AP\354A"
"\0\326\360\34\354\345\203),\342&f*$&(f*\366\200\42*\204*=\310U\276:\326\365 "
"\354\345\203),\342&f*$&(f*\366\200\42*\204*=\270UXPX\224\5\0\326\374."
"\316\345\203),\42(,\42\342&\42\66\42\244(\42ULD\252\230\210\220\242\210\330\210\3\212Da"
"\21A\61\24Aa\21Aa\21\1\326\375\42\354\345\203)E\304E\232\231\210\220\230\220\210\230\231\210\310"
"\210\3\211D\21\24A)\342\241\17b\63\327\0*\354\345\203)E\304E\232\231\210\220\230\220\210\230\231"
"\210\310\210\310\210\3\211D)\202\42(\202R\204D\4E\204\304\306\36\14\327\4'\354\345\203)E\304"
"E\232\231\210\220\230\220\210\230\231\210\310\210\3\211D\21\24A)\342!\16b\203\16\202b\17\2\327\21"
"&\354\345\203)E\304E\232\231\210\220\230\220\210\230\231\210\310\210\3\211D\21\24A)\342\301\255\302\202"
"\302\242,\0\327\30#\314\345\203),(,\342&\66\244(\42*&\42*&\244(\366\200\42(,"
"(,(,(,\0\327\31\32\354\345\203),\342&f*$&(f*\366\200\42*{D\7\261"
"\31\327\34\35\354\345\203),\342&f*$&(f*\66\366\200\42*\237\4\206\304\306\36\14\327 "
"\37\354\345\203),\342&f*$&(f*\366\200\42*{\270\203\330\240\203\240\330\203\0\327(\32"
"\354\345\203),\342&f*$&(f*\366\200\42*{\300\253|u\327)\34\354\345\203),\342"
"&f*$&(f*\366\200\42*{\300\250\254\256R\35\327+\37\355\345\203),\344&h*&"
"Q\320Tp\304\301DXTX<\202\340\244\22qB\1\327-\36\354\345\203),\342&f*$&"
"(f*\366\200\42*{TVaAaQ\26\0\327\64\35\315\345\203-\70\362\36\252.*,*\256"
"\36\344\300(&\60&\60&\60&\10\0\327\65\32\355\345\203-\362\256.*,*\256\36\344\300(&"
"\60&\354@\70'\0\327\70\36\355\345\203-\362\256.*,*\256\36\301\201QL`LXDLX"
"p\360\201\10\0\327<\37\355\345\203-\362\256.*,*\256\36\344\300(&\60&\354@\70\350@("
"\370@\4\0\327D!\355\345\203-\362\256.*,*\256\36\344\300(&\60&\354@(.(.("
".\350@\4\0\327G\36\355\345\203-\362\256.*,*\256\36\344\300(&\60&\36\60\70\66\42P"
"&\10\0\327I\36\355\345\203-\362\256.*,*\256\36\344\300(&\60&\36\254.*,*\256\10"
"\0\327P\24m\245\204-\70\362\36\252.*,*\256\36\301\201\1\327Q\27\355\345\203-\362\256.*"
",*\256\36\301\201=\300\201pN\0\327T\30\355\345\203-\362\256.*,*\256\36\301\201=tp"
"\342\3\21\0\327V\36\355\345\203-\362\256.*,*\256\36\301\201y\134P\320E\330LTLH\311"
"\10\0\327W\32\355\345\203-\362\256.*,*\256\36\301\201=\300\201Pp\342\3\21\0\327X\34\355"
"\345\203-\362\256.*,*\256\36\301\201=\300\201p\320\201P\360\201\10\0\327Y\35\355\345\203-\362"
"\256.*,*\256\36\301\201yEYTHUHdHU\4\0\327`\36\355\345\203-\362\256.*"
",*\256\36\301\201=\300\201P\134P\134P\134\320\201\10\0\327a\36\355\345\203-\362\256.*,*"
"\256\36\301\201=@\134P\134\320\201P\134\320\201\10\0\327c\32\355\345\203-\362\256.*,*\256\36"
"\301\201=\222\340\330\210@\231 \0\327e\32\355\345\203-\362\256.*,*\256\36\301\201=\202\272\250"
"\260\250\270\42\0\327i\34\355\345\203-\362\256.*,*\256\36\301\201=\300\201P\360\201P\360\201\10"
"\0\327l\35\314\345\203\67(,(,\342&\66\244(\42*&\42*&\244(\366\200\42\66\3\327p"
"\35\314\345\203),\342&f*$&($&(f*\366\200\42\36 \66\333\3\1\327t!\314\345"
"\203),\342&f*$&($&(f*\366\200\42\36\342 \66\350 (\366 \0\327|\34\314"
"\345\203),\342&f*$&($&(f*\366\200\42\36\344*_\35\327}\36\314\345\203),"
"\342&f*$&($&(f*\366\200\42\36$*\253\253T\7\327\201 \314\345\203),\342&"
"f*$&($&(f*\366\200\42\36\334*,(,\312\2\0\327\210\36\253\351\203',&\354"
" &d*\42&H*F*F*&\42&(d*\64\3\327\211\35\314\345\203'\356 (d,"
"\42&*\42&*\42&*d,\66\36\372 \66\3\327\214\35\314\345\203'\356 (d,\42&*"
"\42&*\42&*d,\66yl\332\203\1\327\220\42\314\345\203'\356 (d,\42&*\42&*"
"\42&*d,\66\36\342 \66\350 (\366 \0\327\230\35\314\345\203'\356 (d,\42&*\42"
"&*\42&*d,\66\36\344*_\35\327\231\37\314\345\203'\356 (d,\42&*\42&*\42"
"&*d,\66\36$*\253\253T\7\327\233 \315\345\203'.\342(f,$&*$&*$&"
"*f,\70\36\62\70\251D\234P\0\327\235!\314\345\203'\356 (d,\42&*\42&*\42&"
"*d,\66\36\334*,(,\312\2\0\0";
#endif /* U8G2_USE_LARGE_FONTS */
|
the_stack_data/37638312.c
|
#include<stdio.h>
int main (void)
{
int number,count = 0,multiply=1,scrape,result = 0;
printf("Enter a number: "); //Taking input from the user
scanf("%d",&number);
int dummy = number; //Using a temporary variable to perform calculations on the given input
while (dummy != 0) //Loop to count the lenght of the input
{
count++;
dummy /=10;
}
int cnt = count; //Using a temporary variables to perform calculations on the given input
int dummy2 = number;
while (dummy2 != 0)
{
scrape = dummy2%10; //Taking out the end digit
while (cnt != 0) //Loop to multipy the digits w.r.t to the lenght of the input
{
multiply *= scrape;
cnt--;
}
result += multiply; //Reseting the values of the variables
dummy2 /= 10;
multiply=1;
cnt = count;
}
if (result==number) //Checking the value and printing the result
printf("It's an amstrong number");
else
printf("It's not an amstrong number");
return 0;
}
|
the_stack_data/14641.c
|
#ifdef STM32F4xx
#include "stm32f4xx_ll_dma2d.c"
#endif
#ifdef STM32F7xx
#include "stm32f7xx_ll_dma2d.c"
#endif
#ifdef STM32H7xx
#include "stm32h7xx_ll_dma2d.c"
#endif
#ifdef STM32L4xx
#include "stm32l4xx_ll_dma2d.c"
#endif
|
the_stack_data/192331596.c
|
//False positive 2
struct s {
int data[2];
};
int memmodel_clang2(struct s buf)
{
int i = 3;
int *q;
struct s* p;
if (buf.data[1] == 1) {
q = &i;
}
p = &buf;
// if (buf.data[1] == 1) // if use this form, Clang is fine
if (buf.data[1] == 1)
p->data[0] = *q; // not null pointer deref (false positive for Clang)
return p->data[0];
}
|
the_stack_data/33107.c
|
/*
* sem título.c
*
* Copyright 2016 Lab-Biblio5 <lab-biblio5@labbiblio5>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
*/
#include <stdio.h>
#include <stdio.h>
int main(){
int x;
const char *mes[] = {"","January","February","March","April","May","June","July","August","September","October","November","December"};
scanf("%d",&x);
printf("%s\n",mes[x]);
return 0;
}
|
the_stack_data/89200782.c
|
#include <stdio.h>
void main() {
printf("Hello, world(1)\n");
fputs("Hello, world(2)\n",stdout);
}
|
the_stack_data/135728.c
|
/*
* Copyright (C) 2005-2020 Rahmat M. Samik-Ibrahim
* http://rahmatm.samik-ibrahim.vlsm.org/
* This program is free script/software. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* REV11 Tue Mar 24 16:26:39 WIB 2020
* REV10 Tue Apr 2 12:16:34 WIB 2019
* REV06 Wed Aug 29 16:11:46 WIB 2018
* REV05 Wed Nov 1 13:34:33 WIB 2017
* REV00 Mon Oct 24 10:43:00 WIB 2016
* START 2005
*/
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
/*************************************************** main ** */
void main(void) {
pid_t val1, val2, val3;
val3 = val2 = val1 = 1000;
printf("PID==[%5.5d] ==== ======= ==== =======\n", getpid());
// ONE FORK() //
fflush(NULL);
val1 = fork();
wait(NULL);
printf("VAL1=[%5.5d] VAL2=[%5.5d] VAL3=[%5.5d]\n", val1, val2, val3);
}
/*
# INFO: System call "fork()"
# INFO: Compare
# INFO: "06a-fork.c" [no fork()],
# INFO: "06b-fork.c" [one fork()],
# INFO: "06c-fork.c" [two fork()s],
# INFO: "06d-fork.c" [three fork()s],
*/
|
the_stack_data/1043704.c
|
// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-UNKNOWN %s
// I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-DARWIN %s
// I686-DARWIN: target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
// RUN: %clang_cc1 -triple i686-unknown-win32 -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-WIN32 %s
// I686-WIN32: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
// RUN: %clang_cc1 -triple i686-unknown-cygwin -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=I686-CYGWIN %s
// I686-CYGWIN: target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=X86_64 %s
// X86_64: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
// RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=XCORE %s
// XCORE: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32"
// RUN: %clang_cc1 -triple sparc-sun-solaris -emit-llvm -o - %s | \
// RUN: FileCheck %s --check-prefix=SPARC-V8
// SPARC-V8: target datalayout = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"
// RUN: %clang_cc1 -triple sparcv9-sun-solaris -emit-llvm -o - %s | \
// RUN: FileCheck %s --check-prefix=SPARC-V9
// SPARC-V9: target datalayout = "E-m:e-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple mipsel-linux-gnu -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MIPS-32EL
// MIPS-32EL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
// RUN: %clang_cc1 -triple mips-linux-gnu -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MIPS-32EB
// MIPS-32EB: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MIPS-64EL
// MIPS-64EL: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm -target-abi n32 \
// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
// MIPS-64EL-N32: target datalayout = "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MIPS-64EB
// MIPS-64EB: target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s -target-abi n32 \
// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
// MIPS-64EB-N32: target datalayout = "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple powerpc64-lv2 -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PS3
// PS3: target datalayout = "E-m:e-p:32:32-i64:64-n32:64"
// RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=I686-NACL
// I686-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32-S128"
// RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=X86_64-NACL
// X86_64-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32:64-S128"
// RUN: %clang_cc1 -triple arm-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=ARM-NACL
// ARM-NACL: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S128"
// RUN: %clang_cc1 -triple mipsel-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MIPS-NACL
// MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
// RUN: %clang_cc1 -triple le32-nacl -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=LE32-NACL
// LE32-NACL: target datalayout = "e-p:32:32-i64:64"
// RUN: %clang_cc1 -triple wasm32-unknown-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=WEBASSEMBLY32
// WEBASSEMBLY32: target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple wasm64-unknown-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=WEBASSEMBLY64
// WEBASSEMBLY64: target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple lanai-unknown-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=LANAI
// LANAI: target datalayout = "E-m:e-p:32:32-i64:64-a:0:32-n32-S64"
// RUN: %clang_cc1 -triple powerpc-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC
// PPC: target datalayout = "E-m:e-p:32:32-i64:64-n32"
// RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC64-FREEBSD
// PPC64-FREEBSD: target datalayout = "E-m:e-i64:64-n32:64"
// RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC64-LINUX
// PPC64-LINUX: target datalayout = "E-m:e-i64:64-n32:64"
// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
// PPC64LE-LINUX: target datalayout = "e-m:e-i64:64-n32:64"
// RUN: %clang_cc1 -triple powerpc-darwin -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC32-DARWIN
// PPC32-DARWIN: target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
// RUN: %clang_cc1 -triple powerpc64-darwin -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC64-DARWIN
// PPC64-DARWIN: target datalayout = "E-m:o-i64:64-n32:64"
// RUN: %clang_cc1 -triple nvptx-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=NVPTX
// NVPTX: target datalayout = "e-p:32:32-i64:64-v16:16-v32:32-n16:32:64"
// RUN: %clang_cc1 -triple nvptx64-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=NVPTX64
// NVPTX64: target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
// RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=R600
// R600: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
// RUN: | FileCheck %s -check-prefix=R600D
// R600D: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// RUN: %clang_cc1 -triple amdgcn-unknown -target-cpu hawaii -o - -emit-llvm %s \
// RUN: | FileCheck %s -check-prefix=R600SI
// R600SI: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// Test default -target-cpu
// RUN: %clang_cc1 -triple amdgcn-unknown -o - -emit-llvm %s \
// RUN: | FileCheck %s -check-prefix=R600SIDefault
// R600SIDefault: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
// RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=AARCH64
// AARCH64: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
// RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=THUMB
// THUMB: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
// RUN: %clang_cc1 -triple arm-unknown-gnueabi -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=ARM
// ARM: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
// RUN: %clang_cc1 -triple thumb-unknown -o - -emit-llvm -target-abi apcs-gnu \
// RUN: %s | FileCheck %s -check-prefix=THUMB-GNU
// THUMB-GNU: target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
// RUN: %clang_cc1 -triple arm-unknown -o - -emit-llvm -target-abi apcs-gnu \
// RUN: %s | FileCheck %s -check-prefix=ARM-GNU
// ARM-GNU: target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
// RUN: %clang_cc1 -triple hexagon-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=HEXAGON
// HEXAGON: target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
// RUN: %clang_cc1 -triple s390x-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=SYSTEMZ
// SYSTEMZ: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
// RUN: %clang_cc1 -triple s390x-unknown -target-cpu z13 -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=SYSTEMZ-VECTOR
// SYSTEMZ-VECTOR: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
// RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=MSP430
// MSP430: target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16"
// RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=TCE
// TCE: target datalayout = "E-p:32:32-i8:8:32-i16:16:32-i64:32-f64:32-v64:32-v128:32-a:0:32-n32"
// RUN: %clang_cc1 -triple spir-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=SPIR
// SPIR: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
// RUN: %clang_cc1 -triple spir64-unknown -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=SPIR64
// SPIR64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
// RUN: %clang_cc1 -triple bpfel -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=BPFEL
// BPFEL: target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128"
// RUN: %clang_cc1 -triple bpfeb -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=BPFEB
// BPFEB: target datalayout = "E-m:e-p:64:64-i64:64-n32:64-S128"
|
the_stack_data/1064042.c
|
/******************************************************************************
*
* Copyright (C) 2009 - 2014 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* Use of the Software is limited solely to applications:
* (a) running on a Xilinx device, or
* (b) that interact with a Xilinx device through a bus or interconnect.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in
* this Software without prior written authorization from Xilinx.
*
******************************************************************************/
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
int _isatty(int fd);
}
#endif
/*
* isatty -- returns 1 if connected to a terminal device,
* returns 0 if not. Since we're hooked up to a
* serial port, we'll say yes _AND return a 1.
*/
int isatty(int fd)
{
(void)fd;
return (1);
}
int _isatty(int fd)
{
(void)fd;
return (1);
}
|
the_stack_data/75138298.c
|
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
struct Address {
char street[40];
int building, appartment;
};
struct Answer {
char name[20], surname[20];
struct Address address;
char sex;
int age;
};
struct Answer createAnswer(void) {
struct Answer new_answer;
struct Address new_address;
printf("Input name, surname, street, building number, appartment number, sex(M or F), age:\n");
scanf("%s %s %s %i %i %c %i", &new_answer.name, &new_answer.surname, &new_address.street,
&new_address.building, &new_address.appartment, &new_answer.sex, &new_answer.age);
new_answer.address = new_address;
return new_answer;
}
void printSexNumbers(char street[40], int building, struct Answer* quizz, int quizz_length) {
int men = 0, women = 0;
for(int i = 0; i < quizz_length; i++) {
if(strcmp(quizz[i].address.street, street) == 0 && quizz[i].address.building == building) {
quizz[i].sex == 'M' ? men++ : women++;
}
}
printf("Living at %i %s:\nMen: %i Women: %i\n", building, street, men, women);
};
void printAdultMenAtStreet(char street[40], struct Answer* quizz, int quizz_length) {
int adult_men_count = 0;
for(int i = 0; i < quizz_length; i++) {
if(strcmp(quizz[i].address.street, street) == 0 && quizz[i].sex == 'M' && quizz[i].age <= 60 && quizz[i].age >= 18) {
adult_men_count++;
}
}
printf("Number of adult men living on %s street: %i\n", street, adult_men_count);
};
int main(void) {
int answers_no;
printf("Input number of answers to the questionnaire: ");
scanf("%i", &answers_no);
struct Answer* quizz = malloc(answers_no * sizeof(struct Answer));
for(int i = 0; i < answers_no; i++) {
quizz[i] = createAnswer();
}
printf("Input street and building number: ");
char street[40];
int no;
scanf("%s %i", &street, &no);
printSexNumbers(street, no, quizz, answers_no);
printf("Input street name: ");
scanf("%s", &street);
printAdultMenAtStreet(street, quizz, answers_no);
return 0;
}
|
the_stack_data/733056.c
|
/* Exercise 5.11 */
#include <stdio.h>
int main(void)
{
int areaCode;
printf("Please enter an area code: ");
scanf("%d", &areaCode);
switch (areaCode) {
case 229: printf("Albany\n"); break;
case 404: case 470: case 678: case 770: printf("Atlanta\n"); break;
case 478: printf("Macon\n"); break;
case 706: case 762: printf("Columbus\n"); break;
case 912: printf("Savannah\n"); break;
default: printf("Area code not recognized\n"); break;
}
return 0;
}
|
the_stack_data/200142477.c
|
/*
** EPITECH PROJECT, 2020
** my_strcpy
** File description:
** task01
*/
char *my_strcpy(char *dest, char const *src)
{
int i;
for (i = 0; src[i] != '\0'; i++)
{
dest[i] = src[i];
}
dest[i] = '\0';
return (dest);
}
|
the_stack_data/45449747.c
|
/* Libottery by Nick Mathewson.
This software has been dedicated to the public domain under the CC0
public domain dedication.
To the extent possible under law, the person who associated CC0 with
libottery has waived all copyright and related or neighboring rights
to libottery.
You should have received a copy of the CC0 legalcode along with this
work in doc/cc0.txt. If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
*/
/**
* @file fake_egd.c
*
* A broken EGD implementation that works just well enough to respond to
* the "nonblocking request" request type and return (NON-RANDOM!)
* prefixes of bits of "O Fortuna".
*/
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
static const unsigned char o_fortuna[] =
"Sors immanis et inanis rota tu volubilis status malus vana salus "
"semper dissolubilis obumbrata et velata michi quoque niteris nunc "
"per ludum dorsum nudum fero tui sceleris Sors salutis et virtutis "
"michi nunc contraria est affectus et defectus semper in angaria";
int bug_truncate_output = 0;
int bug_short_output = 0;
int bug_no_output = 0;
int bug_close_after_read = 0;
int bug_close_before_read = 0;
static int
reply(int fd)
{
unsigned char len;
unsigned char buf[257];
int n;
if (bug_close_before_read)
return 0;
if (read(fd, buf, 2) != 2)
return -1;
if (bug_close_after_read)
return 0;
if (buf[0] != 1)
return -2;
len = buf[1];
if (bug_short_output)
len /= 2;
if (bug_no_output)
len = 0;
buf[0] = len;
memcpy(buf+1, o_fortuna, len);
n = (int)len + 1;
if (bug_truncate_output)
n /= 2;
if (write(fd, buf, n) != n)
return -3;
return 1;
}
struct bug_table_ent {
const char *name;
int *flag;
} bug_table[] = {
{ "--truncate-output", &bug_truncate_output },
{ "--short-output", &bug_short_output },
{ "--no-output", &bug_no_output },
{ "--close-after-read", &bug_close_after_read },
{ "--close-before-read", &bug_close_before_read },
{ NULL, NULL }
};
static int
option(const char *opt)
{
int i;
for (i = 0; bug_table[i].name; ++i) {
if (!strcmp(opt, bug_table[i].name)) {
*bug_table[i].flag = 1;
return 0;
}
}
return -1;
}
static int
getport(const char *opt, int *num)
{
char *endp;
long p = strtol(opt, &endp, 10);
if (p < 0 || p > 65535 || *endp)
return -1;
*num = (int)p;
return 0;
}
int
main(int argc, char **argv)
{
int i;
int n_addrs = 0;
int port = 0;
socklen_t socklen;
int family;
int listener;
int fd;
const char *path = NULL;
struct sockaddr_in sin;
struct sockaddr_un sun;
struct sockaddr *sa;
for (i = 1; i < argc; ++i) {
if (argv[i][0] == '-') {
if (option(argv[i]) < 0) {
printf("Unrecognized option %s\n", argv[i]);
return 1;
}
continue;
}
if (getport(argv[i], &port) == 0) {
++n_addrs;
} else {
path = argv[i];
++n_addrs;
}
}
if (n_addrs > 1) {
printf("Too many arguments\n");
return 1;
}
if (path) {
memset(&sun, 0, sizeof(sun));
family = AF_UNIX;
socklen = sizeof(sun);
sun.sun_family = AF_UNIX;
if (strlen(path)+1 > sizeof(sun.sun_path))
return 1;
memcpy(sun.sun_path, path, strlen(path)+1);
sa = (void *)&sun;
} else {
memset(&sin, 0, sizeof(sin));
family = AF_INET;
socklen = sizeof(sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(0x7f000001);
sin.sin_port = htons(port);
sa = (void*)&sin;
}
listener = socket(family, SOCK_STREAM, 0);
if (listener < 0) {
perror("socket");
return 1;
}
if (bind(listener, sa, socklen) < 0) {
perror("bind");
return 1;
}
if (path == 0) {
socklen = sizeof(sin);
if (getsockname(listener, (struct sockaddr*)&sin, &socklen) < 0) {
perror("getsockname");
} else {
printf("PORT:%d\n", ntohs(sin.sin_port));
}
}
if (listen(listener, 16) < 0) {
perror("listen");
return 1;
}
fd = accept(listener, sa, &socklen);
if (fd < 0) {
perror("accept");
return 1;
}
(void) reply(fd);
close(fd);
close(listener);
return 0;
}
|
the_stack_data/93953.c
|
// -*-Mode: C++;-*- // technically C99
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research and development of
// HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
// --------------------------------------------------------------------------
//
// Copyright ((c)) 2002-2020, Rice University
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of Rice University (RICE) nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// This software is provided by RICE and contributors "as is" and any
// express or implied warranties, including, but not limited to, the
// implied warranties of merchantability and fitness for a particular
// purpose are disclaimed. In no event shall RICE or contributors be
// liable for any direct, indirect, incidental, special, exemplary, or
// consequential damages (including, but not limited to, procurement of
// substitute goods or services; loss of use, data, or profits; or
// business interruption) however caused and on any theory of liability,
// whether in contract, strict liability, or tort (including negligence
// or otherwise) arising in any way out of the use of this software, even
// if advised of the possibility of such damage.
//
// ******************************************************* EndRiceCopyright *
/* provided to figure out where libcsprof's .text section ends */
void
hpcrun_last_func()
{
}
|
the_stack_data/75139110.c
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnequ.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmartin <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/11/23 13:55:10 by mmartin #+# #+# */
/* Updated: 2013/11/28 12:09:22 by mmartin ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
int ft_strnequ(char const *s1, char const *s2, size_t n)
{
int i;
i = 0;
if (s1 == NULL && s2 == NULL)
return (1);
if ((s1 == NULL && s2 != NULL) || (s2 == NULL && s1 != NULL))
return (0);
while (n > 0)
{
if (s1[i] != s2[i])
return (0);
else if ((s1[i] == '\0' && s2[i] == '\0'))
return (1);
i++;
n--;
}
if (s1[i - 1] == s2[i - 1])
return (1);
else
return (0);
}
|
the_stack_data/132954399.c
|
/*
* =====================================================================================
*
* Filename: m.c
*
* Description:
*
* Version: 1.0
* Created: 11/03/2020 01:18:48 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
#include <stdio.h>
int foo(int a, int b) {
int c;
c = a + b;
return c;
}
int main(void) {;
int c;
c = foo(1, 2);
printf("%i", c);
return 0;
}
|
the_stack_data/37637304.c
|
/*
Centro Federal de Educação Tecnológica de Minas Gerais - Campus XI
Laboratório de Algoritmos e Lógica de Programação
Aluno: Heitor Gonçalves Leite
Aula: 09/09
Exercício: 10
*/
#include <stdio.h>
int main() {
float custo, venda;
printf("Insira o custo de produção: ");
scanf("%f", &custo);
// calcula e imprimi o preço de venda (100 + 28 + 45)% do custo de produção
venda = (float)(100 + 28 + 45)/100 * custo;
printf("O preço de venda é %.2f\n", venda);
return 0;
}
|
the_stack_data/11074812.c
|
/*
* "Optimize" a list of dependencies as spit out by gcc -MD
* for the kernel build
* ===========================================================================
*
* Author Kai Germaschewski
* Copyright 2002 by Kai Germaschewski <[email protected]>
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*
* Introduction:
*
* gcc produces a very nice and correct list of dependencies which
* tells make when to remake a file.
*
* To use this list as-is however has the drawback that virtually
* every file in the kernel includes autoconf.h.
*
* If the user re-runs make *config, autoconf.h will be
* regenerated. make notices that and will rebuild every file which
* includes autoconf.h, i.e. basically all files. This is extremely
* annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
*
* So we play the same trick that "mkdep" played before. We replace
* the dependency on autoconf.h by a dependency on every config
* option which is mentioned in any of the listed prequisites.
*
* kconfig populates a tree in include/config/ with an empty file
* for each config symbol and when the configuration is updated
* the files representing changed config options are touched
* which then let make pick up the changes and the files that use
* the config symbols are rebuilt.
*
* So if the user changes his CONFIG_HIS_DRIVER option, only the objects
* which depend on "include/linux/config/his/driver.h" will be rebuilt,
* so most likely only his driver ;-)
*
* The idea above dates, by the way, back to Michael E Chastain, AFAIK.
*
* So to get dependencies right, there are two issues:
* o if any of the files the compiler read changed, we need to rebuild
* o if the command line given to the compile the file changed, we
* better rebuild as well.
*
* The former is handled by using the -MD output, the later by saving
* the command line used to compile the old object and comparing it
* to the one we would now use.
*
* Again, also this idea is pretty old and has been discussed on
* kbuild-devel a long time ago. I don't have a sensibly working
* internet connection right now, so I rather don't mention names
* without double checking.
*
* This code here has been based partially based on mkdep.c, which
* says the following about its history:
*
* Copyright abandoned, Michael Chastain, <mailto:[email protected]>.
* This is a C version of syncdep.pl by Werner Almesberger.
*
*
* It is invoked as
*
* fixdep <depfile> <target> <cmdline>
*
* and will read the dependency file <depfile>
*
* The transformed dependency snipped is written to stdout.
*
* It first generates a line
*
* cmd_<target> = <cmdline>
*
* and then basically copies the .<target>.d file to stdout, in the
* process filtering out the dependency on autoconf.h and adding
* dependencies on include/config/my/option.h for every
* CONFIG_MY_OPTION encountered in any of the prequisites.
*
* It will also filter out all the dependencies on *.ver. We need
* to make sure that the generated version checksum are globally up
* to date before even starting the recursive build, so it's too late
* at this point anyway.
*
* The algorithm to grep for "CONFIG_..." is bit unusual, but should
* be fast ;-) We don't even try to really parse the header files, but
* merely grep, i.e. if CONFIG_FOO is mentioned in a comment, it will
* be picked up as well. It's not a problem with respect to
* correctness, since that can only give too many dependencies, thus
* we cannot miss a rebuild. Since people tend to not mention totally
* unrelated CONFIG_ options all over the place, it's not an
* efficiency problem either.
*
* (Note: it'd be easy to port over the complete mkdep state machine,
* but I don't think the added complexity is worth it)
*/
/*
* Note 2: if somebody writes HELLO_CONFIG_BOOM in a file, it will depend onto
* CONFIG_BOOM. This could seem a bug (not too hard to fix), but please do not
* fix it! Some UserModeLinux files (look at arch/um/) call CONFIG_BOOM as
* UML_CONFIG_BOOM, to avoid conflicts with /usr/include/linux/autoconf.h,
* through arch/um/include/uml-config.h; this fixdep "bug" makes sure that
* those files will have correct dependencies.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <ctype.h>
#include <arpa/inet.h>
#define INT_CONF ntohl(0x434f4e46)
#define INT_ONFI ntohl(0x4f4e4649)
#define INT_NFIG ntohl(0x4e464947)
#define INT_FIG_ ntohl(0x4649475f)
char *target;
char *depfile;
char *cmdline;
static void usage(void)
{
fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
exit(1);
}
/*
* Print out the commandline prefixed with cmd_<target filename> :=
*/
static void print_cmdline(void)
{
printf("cmd_%s := %s\n\n", target, cmdline);
}
struct item {
struct item *next;
unsigned int len;
unsigned int hash;
char name[0];
};
#define HASHSZ 256
static struct item *hashtab[HASHSZ];
static unsigned int strhash(const char *str, unsigned int sz)
{
/* fnv32 hash */
unsigned int i, hash = 2166136261U;
for (i = 0; i < sz; i++)
hash = (hash ^ str[i]) * 0x01000193;
return hash;
}
/*
* Lookup a value in the configuration string.
*/
static int is_defined_config(const char *name, int len, unsigned int hash)
{
struct item *aux;
for (aux = hashtab[hash % HASHSZ]; aux; aux = aux->next) {
if (aux->hash == hash && aux->len == len &&
memcmp(aux->name, name, len) == 0)
return 1;
}
return 0;
}
/*
* Add a new value to the configuration string.
*/
static void define_config(const char *name, int len, unsigned int hash)
{
struct item *aux = malloc(sizeof(*aux) + len);
if (!aux) {
perror("fixdep:malloc");
exit(1);
}
memcpy(aux->name, name, len);
aux->len = len;
aux->hash = hash;
aux->next = hashtab[hash % HASHSZ];
hashtab[hash % HASHSZ] = aux;
}
/*
* Record the use of a CONFIG_* word.
*/
static void use_config(const char *m, int slen)
{
unsigned int hash = strhash(m, slen);
int c, i;
if (is_defined_config(m, slen, hash))
return;
define_config(m, slen, hash);
printf(" $(wildcard include/config/");
for (i = 0; i < slen; i++) {
c = m[i];
if (c == '_')
c = '/';
else
c = tolower(c);
putchar(c);
}
printf(".h) \\\n");
}
static void parse_config_file(const char *map, size_t len)
{
const int *end = (const int *) (map + len);
/* start at +1, so that p can never be < map */
const int *m = (const int *) map + 1;
const char *p, *q;
for (; m < end; m++) {
if (*m == INT_CONF) { p = (char *) m ; goto conf; }
if (*m == INT_ONFI) { p = (char *) m-1; goto conf; }
if (*m == INT_NFIG) { p = (char *) m-2; goto conf; }
if (*m == INT_FIG_) { p = (char *) m-3; goto conf; }
continue;
conf:
if (p > map + len - 7)
continue;
if (memcmp(p, "CONFIG_", 7))
continue;
p += 7;
for (q = p; q < map + len; q++) {
if (!(isalnum(*q) || *q == '_'))
goto found;
}
continue;
found:
if (!memcmp(q - 7, "_MODULE", 7))
q -= 7;
if (q - p < 0)
continue;
use_config(p, q - p);
}
}
/* test is s ends in sub */
static int strrcmp(char *s, char *sub)
{
int slen = strlen(s);
int sublen = strlen(sub);
if (sublen > slen)
return 1;
return memcmp(s + slen - sublen, sub, sublen);
}
static void do_config_file(const char *filename)
{
struct stat st;
int fd;
void *map;
fd = open(filename, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "fixdep: error opening config file: ");
perror(filename);
exit(2);
}
fstat(fd, &st);
if (st.st_size == 0) {
close(fd);
return;
}
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if ((long) map == -1) {
perror("fixdep: mmap");
close(fd);
return;
}
parse_config_file(map, st.st_size);
munmap(map, st.st_size);
close(fd);
}
/*
* Important: The below generated source_foo.o and deps_foo.o variable
* assignments are parsed not only by make, but also by the rather simple
* parser in scripts/mod/sumversion.c.
*/
static void parse_dep_file(void *map, size_t len)
{
char *m = map;
char *end = m + len;
char *p;
char s[PATH_MAX];
int is_target;
int saw_any_target = 0;
int is_first_dep = 0;
while (m < end) {
/* Skip any "white space" */
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))
m++;
/* Find next "white space" */
p = m;
while (p < end && *p != ' ' && *p != '\\' && *p != '\n')
p++;
/* Is the token we found a target name? */
is_target = (*(p-1) == ':');
/* Don't write any target names into the dependency file */
if (is_target) {
/* The /next/ file is the first dependency */
is_first_dep = 1;
} else {
/* Save this token/filename */
memcpy(s, m, p-m);
s[p - m] = 0;
/* Ignore certain dependencies */
if (strrcmp(s, "include/generated/autoconf.h") &&
strrcmp(s, "arch/um/include/uml-config.h") &&
strrcmp(s, "include/linux/kconfig.h") &&
strrcmp(s, ".ver")) {
/*
* Do not list the source file as dependency,
* so that kbuild is not confused if a .c file
* is rewritten into .S or vice versa. Storing
* it in source_* is needed for modpost to
* compute srcversions.
*/
if (is_first_dep) {
/*
* If processing the concatenation of
* multiple dependency files, only
* process the first target name, which
* will be the original source name,
* and ignore any other target names,
* which will be intermediate temporary
* files.
*/
if (!saw_any_target) {
saw_any_target = 1;
printf("source_%s := %s\n\n",
target, s);
printf("deps_%s := \\\n",
target);
}
is_first_dep = 0;
} else
printf(" %s \\\n", s);
do_config_file(s);
}
}
/*
* Start searching for next token immediately after the first
* "whitespace" character that follows this token.
*/
m = p + 1;
}
if (!saw_any_target) {
fprintf(stderr, "fixdep: parse error; no targets found\n");
exit(1);
}
printf("\n%s: $(deps_%s)\n\n", target, target);
printf("$(deps_%s):\n", target);
}
static void print_deps(void)
{
struct stat st;
int fd;
void *map;
fd = open(depfile, O_RDONLY);
if (fd < 0) {
fprintf(stderr, "fixdep: error opening depfile: ");
perror(depfile);
exit(2);
}
if (fstat(fd, &st) < 0) {
fprintf(stderr, "fixdep: error fstat'ing depfile: ");
perror(depfile);
exit(2);
}
if (st.st_size == 0) {
fprintf(stderr,"fixdep: %s is empty\n",depfile);
close(fd);
return;
}
map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if ((long) map == -1) {
perror("fixdep: mmap");
close(fd);
return;
}
parse_dep_file(map, st.st_size);
munmap(map, st.st_size);
close(fd);
}
static void traps(void)
{
static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
int *p = (int *)test;
if (*p != INT_CONF) {
fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianness? %#x\n",
*p);
exit(2);
}
}
int main(int argc, char *argv[])
{
traps();
if (argc != 4)
usage();
depfile = argv[1];
target = argv[2];
cmdline = argv[3];
print_cmdline();
print_deps();
return 0;
}
|
the_stack_data/225142898.c
|
/*
Unlinks the shared memory segment
*/
#include <sys/mman.h> /* shared memory and mmap() */
#include <unistd.h> /* for getopt() */
#include <errno.h> /* errno and perror */
#include <fcntl.h> /* O_flags */
#include <stdio.h>
#include <stdlib.h>
#define n 15
char tracker_name[20], semaph_name[20], slab_name[20];
int main () {
for(int i = 0;i < n;i++){
sprintf(tracker_name,"/tracker%d",i);
shm_unlink(tracker_name);
tracker_name[0] = '\n';
sprintf(slab_name,"/slabs%d",i);
shm_unlink(slab_name);
slab_name[0] = '\n';
sprintf(semaph_name,"/semaph%d",i);
shm_unlink(semaph_name);
semaph_name[0] = '\n';
}
}
|
the_stack_data/182953661.c
|
/* $XConsortium: CloseHook.c,v 1.9 94/04/17 20:15:51 rws Exp $ */
/* $XFree86: xc/lib/Xmu/CloseHook.c,v 3.0 1996/06/10 10:59:19 dawes Exp $ */
/*
Copyright (c) 1989 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
*/
/*
* CloseDisplayHook package - provide callback on XCloseDisplay
*
* *
* Author: Jim Fulton, MIT X Consortium
*
*
* Public Entry Points
*
* CloseHook XmuAddCloseDisplayHook (dpy, func, arg)
* Display *dpy;
* XmuCloseHookProc func;
* XPointer arg;
*
* Bool XmuRemoveCloseDisplayHook (dpy, hook, func, arg)
* Display *dpy;
* CloseHook hook;
* XmuCloseHookProc func;
* XPointer arg;
*
* Bool XmuLookupCloseDisplayHook (dpy, hook, func, arg)
* Display *dpy;
* CloseHook hook;
* XmuCloseHookProc func;
* XPointer arg;
*
*/
#include <stdio.h> /* for NULL */
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xmu/CloseHook.h>
#ifdef X_NOT_STDC_ENV
extern char *malloc(); /* should be void * */
#else
#include <stdlib.h>
#endif
/*
* Private data
*
* This is a list of display entries, each of which contains a list of callback
* records.
*/
typedef struct _CallbackRec {
struct _CallbackRec *next; /* next link in chain */
XmuCloseHookProc func; /* function to call */
XPointer arg; /* argument to pass with function */
} CallbackRec;
typedef struct _DisplayEntry {
struct _DisplayEntry *next; /* next link in chain */
Display *dpy; /* the display this represents */
int extension; /* from XAddExtension */
struct _CallbackRec *start, *end; /* linked list of callbacks */
struct _CallbackRec *calling; /* currently being called back */
} DisplayEntry;
static DisplayEntry *elist = NULL;
static Bool _MakeExtension();
static DisplayEntry *_FindDisplayEntry();
/*
*****************************************************************************
* Public Entry Points *
*****************************************************************************
*/
/*
* Add - add a callback for the given display. When the display is closed,
* the given function will be called as:
*
* (*func) (dpy, arg)
*
* This function is declared to return an int even though the value is ignored
* because some compilers have problems with functions returning void.
*
* This routine returns NULL if it was unable to add the callback, otherwise
* it returns an untyped pointer that can be used with Remove or Lookup, but
* not dereferenced.
*/
CloseHook XmuAddCloseDisplayHook (dpy, func, arg)
Display *dpy;
XmuCloseHookProc func; /* function to call on close display */
XPointer arg; /* arg to pass */
{
DisplayEntry *de;
CallbackRec *cb;
/* allocate ahead of time so that we can fail atomically */
cb = (CallbackRec *) malloc (sizeof (CallbackRec));
if (!cb) return ((XPointer) NULL);
de = _FindDisplayEntry (dpy, NULL);
if (!de) {
if ((de = (DisplayEntry *) malloc (sizeof (DisplayEntry))) == NULL ||
!_MakeExtension (dpy, &de->extension)) {
free ((char *) cb);
if (de) free ((char *) de);
return ((CloseHook) NULL);
}
de->dpy = dpy;
de->start = de->end = NULL;
de->calling = NULL;
de->next = elist;
elist = de;
}
/* add to end of list of callback recordss */
cb->func = func;
cb->arg = arg;
cb->next = NULL;
if (de->end) {
de->end->next = cb;
} else {
de->start = cb;
}
de->end = cb;
return ((CloseHook) cb);
}
/*
* Remove - get rid of a callback. If handle is non-null, use that to compare
* entries. Otherwise, remove first instance of the function/argument pair.
*/
Bool XmuRemoveCloseDisplayHook (dpy, handle, func, arg)
Display *dpy;
CloseHook handle; /* value from XmuAddCloseDisplayHook */
XmuCloseHookProc func; /* function to call on close display */
XPointer arg; /* arg to pass */
{
DisplayEntry *de = _FindDisplayEntry (dpy, NULL);
register CallbackRec *h, *prev;
if (!de) return False;
/* look for handle or function/argument pair */
for (h = de->start, prev = NULL; h; h = h->next) {
if (handle) {
if (h == (CallbackRec *) handle) break;
} else {
if (h->func == func && h->arg == arg) break;
}
prev = h;
}
if (!h) return False;
/* remove from list, watch head and tail */
if (de->start == h) {
de->start = h->next;
} else {
prev->next = h->next;
}
if (de->end == h) de->end = prev;
if (de->calling != h) free ((char *) h);
return True;
}
/*
* Lookup - see whether or not a handle has been installed. If handle is
* non-NULL, look for an entry that matches it; otherwise look for an entry
* with the same function/argument pair.
*/
Bool XmuLookupCloseDisplayHook (dpy, handle, func, arg)
Display *dpy;
CloseHook handle; /* value from XmuAddCloseDisplayHook */
XmuCloseHookProc func; /* function to call on close display */
XPointer arg; /* arg to pass */
{
DisplayEntry *de = _FindDisplayEntry (dpy, NULL);
register CallbackRec *h;
if (!de) return False;
for (h = de->start; h; h = h->next) {
if (handle) {
if (h == (CallbackRec *) handle) break;
} else {
if (h->func == func && h->arg == arg) break;
}
}
return (h ? True : False);
}
/*
*****************************************************************************
* internal routines *
*****************************************************************************
*/
/*
* Find the specified display on the linked list of displays. Also return
* the preceeding link so that the display can be unlinked without having
* back pointers.
*/
static DisplayEntry *_FindDisplayEntry (dpy, prevp)
register Display *dpy;
DisplayEntry **prevp;
{
register DisplayEntry *d, *prev;
for (d = elist, prev = NULL; d; d = d->next) {
if (d->dpy == dpy) {
if (prevp) *prevp = prev;
return d;
}
prev = d;
}
return NULL;
}
/*
* _DoCallbacks - process all of the callbacks for this display and free
* the associated callback data (callback records and display entries).
*/
/* ARGSUSED */
static int _DoCallbacks (dpy, codes)
Display *dpy;
XExtCodes *codes;
{
register CallbackRec *h;
DisplayEntry *prev;
DisplayEntry *de = _FindDisplayEntry (dpy, &prev);
if (!de) return 0;
/* walk the list doing the callbacks and freeing callback record */
for (h = de->start; h;) {
register CallbackRec *nexth = h->next;
de->calling = h; /* let remove know we'll free it */
(*(h->func)) (dpy, h->arg);
de->calling = NULL;
free ((char *) h);
h = nexth;
}
/* unlink this display from chain */
if (elist == de) {
elist = de->next;
} else {
prev->next = de->next;
}
free ((char *) de);
return 1;
}
/*
* _MakeExtension - create an extension for this display; done once per display
*/
static Bool _MakeExtension (dpy, extensionp)
Display *dpy;
int *extensionp;
{
XExtCodes *codes;
codes = XAddExtension (dpy);
if (!codes) return False;
(void) XESetCloseDisplay (dpy, codes->extension, _DoCallbacks);
*extensionp = codes->extension;
return True;
}
|
the_stack_data/937545.c
|
/*
code for computing nth catalan number
*/
#include<stdio.h>
long int factorial(int x) //long int for more than 10 factorial
{
int i;
long int fac; //fac stores x factorial
fac=x;
for(i=1;i<x;i++) //loop to calculate x factorial
{
fac=fac*(x-i);
}
return fac; //returning x factorial
}
int main()
{
long int f1,f2,f3; //long int for more than 10 factorial
int n;
float C; //C is catalan number for n;
scanf("%d",&n);
f1=factorial(2*n);
f2=factorial(n+1);
f3=factorial(n);
C=f1/(f2*f3); //formula for catalan number for n
printf("%0.2f",C);
return 0;
}
|
the_stack_data/181392751.c
|
// RUN: rm -fr %t.promo.prof
// RUN: rm -fr %t.nopromo.prof
// RUN: %clang_pgogen=%t.promo.prof/ -o %t.promo.gen -O2 %s
// RUN: %clang_pgogen=%t.promo.prof/ -o %t.promo.gen.ll -emit-llvm -S -O2 -Xclang -no-opaque-pointers %s
// RUN: cat %t.promo.gen.ll | FileCheck --check-prefix=PROMO %s
// RUN: %run %t.promo.gen
// RUN: llvm-profdata merge -o %t.promo.profdata %t.promo.prof/
// RUN: llvm-profdata show --counts --all-functions %t.promo.profdata > %t.promo.dump
// RUN: %clang_pgogen=%t.nopromo.prof/ -mllvm -do-counter-promotion=false -mllvm -simplifycfg-sink-common=false -o %t.nopromo.gen -O2 %s
// RUN: %clang_pgogen=%t.nopromo.prof/ -mllvm -do-counter-promotion=false -mllvm -simplifycfg-sink-common=false -o %t.nopromo.gen.ll -emit-llvm -S -O2 -Xclang -no-opaque-pointers %s
// RUN: cat %t.nopromo.gen.ll | FileCheck --check-prefix=NOPROMO %s
// RUN: %run %t.nopromo.gen
// RUN: llvm-profdata merge -o %t.nopromo.profdata %t.nopromo.prof/
// RUN: llvm-profdata show --counts --all-functions %t.nopromo.profdata > %t.nopromo.dump
// RUN: diff %t.promo.profdata %t.nopromo.profdata
int g;
__attribute__((noinline)) void bar(int i) { g += i; }
__attribute__((noinline)) void foo(int n, int N) {
// PROMO-LABEL: @foo
// PROMO: load{{.*}}@__profc_foo{{.*}} 3){{.*}}
// PROMO-NEXT: add
// PROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 3){{.*}}
// PROMO: load{{.*}}@__profc_foo{{.*}} 0){{.*}}
// PROMO-NEXT: add
// PROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 0){{.*}}
// PROMO-NEXT: load{{.*}}@__profc_foo{{.*}} 1){{.*}}
// PROMO-NEXT: add
// PROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 1){{.*}}
// PROMO: load{{.*}}@__profc_foo{{.*}} 2){{.*}}
// PROMO-NEXT: add
// PROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 2){{.*}}
//
// NOPROMO-LABEL: @foo
// NOPROMO: load{{.*}}@__profc_foo{{.*}} 0){{.*}}
// NOPROMO-NEXT: add
// NOPROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 0){{.*}}
// NOPROMO: load{{.*}}@__profc_foo{{.*}} 1){{.*}}
// NOPROMO-NEXT: add
// NOPROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 1){{.*}}
// NOPROMO: load{{.*}}@__profc_foo{{.*}} 2){{.*}}
// NOPROMO-NEXT: add
// NOPROMO-NEXT: store{{.*}}@__profc_foo{{.*}} 2){{.*}}
int i;
for (i = 0; i < N; i++) {
if (i < n + 1)
bar(1);
else if (i < n - 1)
bar(2);
else
bar(3);
}
}
int main() {
foo(10, 20);
return 0;
}
|
the_stack_data/92328606.c
|
// Compile with:
//
//
// To specify the number of bodies in the world, the program optionally accepts
// an integer as its first command line argument.
#include <time.h>
#include <sys/times.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <unistd.h>
#include "omp.h"
#define WIDTH 1024
#define HEIGHT 768
// default number of bodies
#define DEF_NUM_BODIES 200
// gravitational constant
#define GRAV 10.0
// initial velocities are scaled by this value
#define V_SCALAR 20.0
// initial masses are scaled by this value
#define M_SCALAR 5.0
// radius scalar
#define R_SCALAR 3
// coefficient of restitution determines the elasticity of a collision: C_REST = [0,1]
// if C_REST = 0 -> perfectly inelastic (particles stick together)
// if C_REST = 1 -> perfectly elastic (no loss of speed)
#define C_REST 0.5
// set the iteration times
#define iteration_times 100
// Must set 0 if run on Pi
#define NOT_RUN_ON_PI 1
// World Buffer
#define ORIGINAL_WORLD 0
#define BACK_WORLD 1
struct body {
double x, y; // position
double m; // mass
};
struct speed{
double vx,vy;
};
struct world {
struct body *bodies;
int num_bodies;
};
clock_t total_time = 0;
//total_time.sec = 0;
//total_time.usec = 0;
struct world* world_num2;
struct speed* speed;
double * radius;
int BLOCK_NUM=8;
struct world* copy_world(struct world* origin){
int num_bodies=origin->num_bodies;
struct world *world2 = malloc(sizeof(struct world));
world2->num_bodies = num_bodies;
world2->bodies = malloc(sizeof(struct body) * num_bodies);
int i = 0;
while(i<num_bodies){
world2->bodies[i].x = origin->bodies[i].x;
world2->bodies[i].y = origin->bodies[i].y;
world2->bodies[i].m = origin->bodies[i].m;
i++;
}
return world2;
}
/* This function initializes each particle's mass, velocity and position */
struct world *create_world(int num_bodies) {
struct world *world = malloc(sizeof(struct world));
speed =malloc(sizeof(struct speed)*num_bodies);
radius=malloc(sizeof(double)*num_bodies);
world->num_bodies = num_bodies;
world->bodies = malloc(sizeof(struct body) * num_bodies);
int i = 0;
double x;
double y;
double rc;
int min_dim = (WIDTH < HEIGHT) ? WIDTH : HEIGHT;
while (i < num_bodies) {
x = drand48() * WIDTH;
y = drand48() * HEIGHT;
rc = sqrt((WIDTH / 2 - x) * (WIDTH / 2 - x) + (y - HEIGHT / 2) * (y - HEIGHT / 2));
if (rc <= min_dim / 2) {
world->bodies[i].x = x;
world->bodies[i].y = y;
speed[i].vx = V_SCALAR * (y - HEIGHT / 2) / rc;
speed[i].vy = V_SCALAR * (WIDTH / 2 - x) / rc;
world->bodies[i].m = (1 / (0.025 + drand48())) * M_SCALAR;
radius[i] = sqrt(world->bodies[i].m / M_PI) * R_SCALAR;
i++;
}
}
return world;
}
// set the foreground color given RGB values between 0..255.
void set_color(Display *disp, GC gc, int r, int g, int b) {
unsigned long int p;
if (r < 0) r = 0; else if (r > 255) r = 255;
if (g < 0) g = 0; else if (g > 255) g = 255;
if (b < 0) b = 0; else if (b > 255) b = 255;
p = (r << 16) | (g << 8) | (b);
XSetForeground(disp, gc, p);
}
/* This function updates the screen with the new positions of each particle */
void draw_world(Display *disp, Pixmap back_buf, GC gc, struct world *world) {
int i;
double x, y, r, r2;
// we turn off aliasing for faster draws
set_color(disp, gc, 255, 255, 255);
XFillRectangle(disp, back_buf, gc, 0, 0, WIDTH, HEIGHT);
for (i = 0; i < world->num_bodies; i++) {
r = radius[i];
x = world->bodies[i].x - r;
y = world->bodies[i].y - r;
r2 = r + r;
// draw body
set_color(disp, gc, 255 * 7 / 10, 255 * 7 / 10, 255 * 7 / 10);
XFillArc(disp, back_buf, gc, x, y, r2, r2, 0, 360 * 64);
set_color(disp, gc, 0, 0, 0);
XDrawArc(disp, back_buf, gc, x, y, r2, r2, 0, 360 * 64);
}
}
void collision_step(struct world *world) {
int a, b;
double r, x, y, vx, vy;
// Impose screen boundaries by reversing direction if body is off screen
for (a = 0; a < world->num_bodies; a++) {
r = radius[a];
x = world->bodies[a].x;
y = world->bodies[a].y;
vx = speed[a].vx;
vy = speed[a].vy;
if (x - r < 0) { // left edge
if (vx < 0) { speed[a].vx = -C_REST * vx; }
world->bodies[a].x = r;
} else if (x + r > WIDTH) { // right edge
if (vx > 0) { speed[a].vx = -C_REST * vx; }
world->bodies[a].x = WIDTH - r;
}
if (y - r < 0) { // bottom edge
if (vy < 0) { speed[a].vy = -C_REST * vy; }
world->bodies[a].y = r;
} else if (y + r > HEIGHT) { // top edge
if (vy > 0) { speed[a].vy = -C_REST * vy; }
world->bodies[a].y = HEIGHT - r;
}
}
}
void position_step(struct world *world, double time_res,int iteration) {
/* The forces array stores the x and y components of the total force acting
* on each body. The forces are index like this:
* F on body i in the x dir = F_x[i]
* F on body i in the y dir = F_y[i] */
double *force_x = (double *) malloc(sizeof(double) * world->num_bodies);
double *force_y = (double *) malloc(sizeof(double) * world->num_bodies);
// initialize all forces to zero
force_x = memset(force_x, 0, sizeof(double) * world->num_bodies);
force_y = memset(force_y, 0, sizeof(double) * world->num_bodies);
/* Compute the net force on each body */
#pragma omp parallel num_threads(8)
{
int BLOCK_SIZE = world->num_bodies / BLOCK_NUM;
int my_rank = omp_get_thread_num();
int num_of_threads = omp_get_num_threads();
int thread_size = world->num_bodies / num_of_threads;
for (int k = 0; k < BLOCK_NUM; ++k) {
for (int i = my_rank * thread_size; i < (my_rank + 1) * thread_size; i++) {
double d, d_cubed, diff_x, diff_y;
for (int j = BLOCK_SIZE * k; j < BLOCK_SIZE * (k + 1); j++) {
if (i == j) {
continue;
}
// Compute the x and y distances and total distance d between
// bodies i and j
// Compute the x and y distances and total distance d between
// bodies i and j
if (iteration % 2 == 0) {
diff_x = world->bodies[j].x - world->bodies[i].x;
diff_y = world->bodies[j].y - world->bodies[i].y;
} else {
diff_x = world_num2->bodies[j].x - world_num2->bodies[i].x;
diff_y = world_num2->bodies[j].y - world_num2->bodies[i].y;
}
d = sqrt((diff_x * diff_x) + (diff_y * diff_y));
if (d < 25) {
d = 25;
}
d_cubed = d * d * d;
// Add force due to j to total force on i
force_x[i] += GRAV * (world->bodies[i].m * world->bodies[j].m
/ d_cubed) * diff_x;
force_y[i] += GRAV * (world->bodies[i].m * world->bodies[j].m
/ d_cubed) * diff_y;
}
if (k == BLOCK_NUM - 1) {
speed[i].vx += force_x[i] * time_res / world->bodies[i].m;
speed[i].vy += force_y[i] * time_res / world->bodies[i].m;
if (iteration % 2 == 0) {
// Update positions
world_num2->bodies[i].x = world->bodies[i].x + speed[i].vx * time_res;
world_num2->bodies[i].y = world->bodies[i].y + speed[i].vy * time_res;
} else {
world->bodies[i].x = world_num2->bodies[i].x + speed[i].vx * time_res;
world->bodies[i].y = world_num2->bodies[i].y + speed[i].vy * time_res;
}
}
}
}
}
}
void step_world(struct world *world, double time_res,int iteration) {
struct tms ttt;
clock_t start, end;
start = times(&ttt);
position_step(world, time_res,iteration);
end = times(&ttt);
total_time += end - start;
collision_step(world);
}
/* Main method runs initialize() and update() */
int main(int argc, char **argv) {
//total_time.tv_sec = 0;
//total_time.tv_usec = 0;
/* get num bodies from the command line */
int num_bodies, threads;
num_bodies = DEF_NUM_BODIES;
threads = 1;
if (argc == 2) {
num_bodies = atoi(argv[1]);
};
int BLOCK_NUM_LIST[7] = {2,4,8,10,16,32,40};
FILE *fstream = fopen("outdata", "a+");
fprintf(fstream, "Universe has %d bodies\n", num_bodies);
for (int i = 0; i < 7; ++i) {
BLOCK_NUM = BLOCK_NUM_LIST[i];
printf("Universe has %d bodies. %d Threads\n", num_bodies, threads);
/* set up the universe */
time_t cur_time;
time(&cur_time);
srand48((long) cur_time); // seed the RNG used in create_world
struct world *world = create_world(num_bodies);
world_num2=copy_world(world);
/* set up graphics using Xlib */
#if NOT_RUN_ON_PI
Display *disp = XOpenDisplay(NULL);
int scr = DefaultScreen(disp);
Window win = XCreateSimpleWindow(
disp,
RootWindow(disp, scr),
0, 0,
WIDTH, HEIGHT,
0,
BlackPixel(disp, scr), WhitePixel(disp, scr));
XStoreName(disp, win, "N-Body Simulator");
Pixmap back_buf = XCreatePixmap(disp, RootWindow(disp, scr),
WIDTH, HEIGHT, DefaultDepth(disp, scr));
GC gc = XCreateGC(disp, back_buf, 0, 0);
// Make sure we're only looking for messages about closing the window
Atom del_window = XInternAtom(disp, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(disp, win, &del_window, 1);
XSelectInput(disp, win, StructureNotifyMask);
XMapWindow(disp, win);
XEvent event;
// wait until window is mapped
while (1) {
XNextEvent(disp, &event);
if (event.type == MapNotify) {
break;
}
}
#endif
struct timespec delay = {0, 1000000000 / 60}; // for 60 FPS
struct timespec remaining;
double delta_t = 0.1;
int ii;
total_time = 0;
for (ii = 0; ii < iteration_times; ii++) {
// check if the window has been closed
#if NOT_RUN_ON_PI
if (XCheckTypedEvent(disp, ClientMessage, &event)) {
break;
}
// we first draw to the back buffer then copy it to the front (`win`)
draw_world(disp, back_buf, gc, world);
XCopyArea(disp, back_buf, win, gc, 0, 0, WIDTH, HEIGHT, 0, 0);
#endif
step_world(world, delta_t,ii);
//if you want to watch the process in 60 FPS
//nanosleep(&delay, &remaining);
}
// printf("Total Time = %f\n", (double)total_time.tv_sec + (double)total_time.tv_usec/1000000);
fprintf(fstream, "%d %lfs\n", threads, (double) total_time / (sysconf(_SC_CLK_TCK)));
#if NOT_RUN_ON_PI
XFreeGC(disp, gc);
XFreePixmap(disp, back_buf);
XDestroyWindow(disp, win);
XCloseDisplay(disp);
#endif
}
fclose(fstream);
return 0;
}
|
the_stack_data/198581792.c
|
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char a[] = "365.25 7.0", *end;
float value = strtof(a, &end);
float value2 = strof(end, NULL);
printf("Value = %f:%f\n", value, value2);
return 0;
}
|
the_stack_data/93889002.c
|
#include<stdio.h>
int main()
{
int a[]={1,2,3,4,5,5,7,7},i,j;
int n=sizeof(a)/sizeof(int);
for(i=0;i<=n-1;i++)
for(j=i+1;j<n;j++)
if(a[i]==a[j])
printf("%d,",a[i]);
return;
}
|
the_stack_data/440928.c
|
// RUN: %clang %s -o %t && %run %t 2>&1
// There's no interceptor for strcasestr on Windows
// XFAIL: win32
#define _GNU_SOURCE
#include <assert.h>
#include <string.h>
int main(int argc, char **argv) {
char *r = 0;
char s1[] = "aB";
char s2[] = "b";
r = strcasestr(s1, s2);
assert(r == s1 + 1);
return 0;
}
|
the_stack_data/11076541.c
|
// Nested Recursion
#include <stdio.h>
int fun(int n)
{
if(n > 100)
return n - 10;
return fun(fun(n + 11)); // Nested recursion are those that make two (or more?) nested calls.
// The outer function call only occurs when the inner function call returns.
}
int main()
{
int r;
r = fun(95); // -> fun(106) -> fun(96) -> fun(107) -> fun(97) ->
// fun(108) -> fun(98) -> fun(109) -> fun(99) -> fun(110) -> fun(100) ->
// fun(111) -> fun(101) -> 91
printf("%d\n", r); // Prints 91.
return 0;
}
|
the_stack_data/22013784.c
|
#include <stdio.h>
#include <stdlib.h>
struct lista {
int valor;
struct lista* prox;
};
typedef struct lista Lista;
Lista* instancia_lista(){
return NULL;
}
Lista* insere_lista(Lista* l,int v){
Lista* n = (Lista*) malloc(sizeof(Lista));
n->valor = v;
n->prox = l;
return n;
}
void listaImprime (Lista* l){
Lista* a;
for (a = l; a != NULL; a = a->prox) {
printf("%d ", a->valor);
}
}
int inverteLista(Lista* l){
Lista* n = instancia_lista();
Lista* a;
for (a = l; a != NULL; a = a->prox) {
n=insere_lista(n,a->valor);
}
a = l;
while (a != NULL) {
Lista* s= a->prox;
free(a);
a = s;
}
return n;
}
int main(int argc, char const *argv[]) {
Lista* l;
int i;
l = instancia_lista();
for (i = 0; i < 5; i++) {
l = insere_lista(l,i+1);
}
listaImprime(l);
l = inverteLista(l);
listaImprime(l);
return 0;
}
|
the_stack_data/327461.c
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#define TYPE "/status"
void print(const char * name, pid_t pid, const char * type){
printf("\n %s \n", name);
char order[64] = "cat /proc/";
char PID[8];
sprintf(PID, "%d", pid);
strcat(order, PID);
strcat(order, type);
system(order);
}
int main(){
pid_t pid = getpid();
print("分配内存前", pid, TYPE);
char* p = NULL;
int i = 128;
while(NULL != (p = (char *)malloc(i*1024*1024))) {
printf("%d\n", i);
i = i + 64;
free(p);
}
print("分配内存后", pid, TYPE);
return 0;
}
|
the_stack_data/140175.c
|
/* Generated by CIL v. 1.7.0 */
/* print_CIL_Input is false */
struct _IO_FILE;
struct timeval;
extern void signal(int sig , void *func ) ;
extern float strtof(char const *str , char const *endptr ) ;
typedef struct _IO_FILE FILE;
extern int atoi(char const *s ) ;
extern double strtod(char const *str , char const *endptr ) ;
extern int fclose(void *stream ) ;
extern void *fopen(char const *filename , char const *mode ) ;
extern void abort() ;
extern void exit(int status ) ;
extern int raise(int sig ) ;
extern int fprintf(struct _IO_FILE *stream , char const *format , ...) ;
extern int strcmp(char const *a , char const *b ) ;
extern int rand() ;
extern unsigned long strtoul(char const *str , char const *endptr , int base ) ;
void RandomFunc(unsigned int input[1] , unsigned int output[1] ) ;
extern int strncmp(char const *s1 , char const *s2 , unsigned long maxlen ) ;
extern int gettimeofday(struct timeval *tv , void *tz , ...) ;
extern int printf(char const *format , ...) ;
int main(int argc , char *argv[] ) ;
void megaInit(void) ;
extern unsigned long strlen(char const *s ) ;
extern long strtol(char const *str , char const *endptr , int base ) ;
extern unsigned long strnlen(char const *s , unsigned long maxlen ) ;
extern void *memcpy(void *s1 , void const *s2 , unsigned long size ) ;
struct timeval {
long tv_sec ;
long tv_usec ;
};
extern void *malloc(unsigned long size ) ;
extern int scanf(char const *format , ...) ;
void RandomFunc(unsigned int input[1] , unsigned int output[1] )
{
unsigned int state[1] ;
char copy14 ;
{
state[0UL] = (input[0UL] + 51238316UL) + 274866410U;
if ((state[0UL] >> 4U) & 1U) {
if (! ((state[0UL] >> 3U) & 1U)) {
state[0UL] += state[0UL];
}
} else
if ((state[0UL] >> 1U) & 1U) {
state[0UL] += state[0UL];
copy14 = *((char *)(& state[0UL]) + 3);
*((char *)(& state[0UL]) + 3) = *((char *)(& state[0UL]) + 1);
*((char *)(& state[0UL]) + 1) = copy14;
} else {
state[0UL] += state[0UL];
}
output[0UL] = (state[0UL] + 150995464UL) + 1363914780U;
}
}
int main(int argc , char *argv[] )
{
unsigned int input[1] ;
unsigned int output[1] ;
int randomFuns_i5 ;
unsigned int randomFuns_value6 ;
int randomFuns_main_i7 ;
{
megaInit();
if (argc != 2) {
printf("Call this program with %i arguments\n", 1);
exit(-1);
} else {
}
randomFuns_i5 = 0;
while (randomFuns_i5 < 1) {
randomFuns_value6 = (unsigned int )strtoul(argv[randomFuns_i5 + 1], 0, 10);
input[randomFuns_i5] = randomFuns_value6;
randomFuns_i5 ++;
}
RandomFunc(input, output);
if (output[0] == 4242424242U) {
printf("You win!\n");
} else {
}
randomFuns_main_i7 = 0;
while (randomFuns_main_i7 < 1) {
printf("%u\n", output[randomFuns_main_i7]);
randomFuns_main_i7 ++;
}
}
}
void megaInit(void)
{
{
}
}
|
the_stack_data/71146.c
|
/* Noddy test program.
*
* This file is available under the Revised BSD open source license. To get
* the full license text, see the README file.
*
* $Id$
* $HeadURL$
* $LastChangedDate: 2007-04-30 22:41:42 +0000 (Mon, 30 Apr 2007) $
*/
#include <stdio.h>
int main(int argc, const char* argv[])
{
printf("Hello, world!\n");
return 0;
}
|
the_stack_data/56600.c
|
/**
******************************************************************************
* @file stm32f1xx_ll_adc.c
* @author MCD Application Team
* @version V1.1.1
* @date 12-May-2017
* @brief ADC LL module driver
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
#if defined(USE_FULL_LL_DRIVER)
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_ll_adc.h"
#include "stm32f1xx_ll_bus.h"
#ifdef USE_FULL_ASSERT
#include "stm32_assert.h"
#else
#define assert_param(expr) ((void)0U)
#endif
/** @addtogroup STM32F1xx_LL_Driver
* @{
*/
#if defined (ADC1) || defined (ADC2) || defined (ADC3)
/** @addtogroup ADC_LL ADC
* @{
*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/** @addtogroup ADC_LL_Private_Macros
* @{
*/
/* Check of parameters for configuration of ADC hierarchical scope: */
/* common to several ADC instances. */
/* Check of parameters for configuration of ADC hierarchical scope: */
/* ADC instance. */
#define IS_LL_ADC_DATA_ALIGN(__DATA_ALIGN__) \
( ((__DATA_ALIGN__) == LL_ADC_DATA_ALIGN_RIGHT) \
|| ((__DATA_ALIGN__) == LL_ADC_DATA_ALIGN_LEFT) \
)
#define IS_LL_ADC_SCAN_SELECTION(__SCAN_SELECTION__) \
( ((__SCAN_SELECTION__) == LL_ADC_SEQ_SCAN_DISABLE) \
|| ((__SCAN_SELECTION__) == LL_ADC_SEQ_SCAN_ENABLE) \
)
#define IS_LL_ADC_SEQ_SCAN_MODE(__SEQ_SCAN_MODE__) \
( ((__SCAN_MODE__) == LL_ADC_SEQ_SCAN_DISABLE) \
|| ((__SCAN_MODE__) == LL_ADC_SEQ_SCAN_ENABLE) \
)
/* Check of parameters for configuration of ADC hierarchical scope: */
/* ADC group regular */
#if defined(ADC3)
#define IS_LL_ADC_REG_TRIG_SOURCE(__ADC_INSTANCE__, __REG_TRIG_SOURCE__) \
((((__ADC_INSTANCE__) == ADC1) || ((__ADC_INSTANCE__) == ADC2)) \
? ( ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_SOFTWARE) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM2_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM3_TRGO) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM4_CH4) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_EXTI_LINE11) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM8_TRGO) \
) \
: \
( ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_SOFTWARE) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM3_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM2_CH3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM8_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM8_TRGO_ADC3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM5_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM5_CH3) \
) \
)
#else
#if defined (STM32F101xE) || defined (STM32F105xC) || defined (STM32F107xC)
#define IS_LL_ADC_REG_TRIG_SOURCE(__REG_TRIG_SOURCE__) \
( ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_SOFTWARE) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM2_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM3_TRGO) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM4_CH4) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_EXTI_LINE11) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM8_TRGO) \
)
#else
#define IS_LL_ADC_REG_TRIG_SOURCE(__REG_TRIG_SOURCE__) \
( ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_SOFTWARE) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH3) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH1) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM1_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM2_CH2) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM3_TRGO) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_TIM4_CH4) \
|| ((__REG_TRIG_SOURCE__) == LL_ADC_REG_TRIG_EXT_EXTI_LINE11) \
)
#endif
#endif
#define IS_LL_ADC_REG_CONTINUOUS_MODE(__REG_CONTINUOUS_MODE__) \
( ((__REG_CONTINUOUS_MODE__) == LL_ADC_REG_CONV_SINGLE) \
|| ((__REG_CONTINUOUS_MODE__) == LL_ADC_REG_CONV_CONTINUOUS) \
)
#define IS_LL_ADC_REG_DMA_TRANSFER(__REG_DMA_TRANSFER__) \
( ((__REG_DMA_TRANSFER__) == LL_ADC_REG_DMA_TRANSFER_NONE) \
|| ((__REG_DMA_TRANSFER__) == LL_ADC_REG_DMA_TRANSFER_UNLIMITED) \
)
#define IS_LL_ADC_REG_SEQ_SCAN_LENGTH(__REG_SEQ_SCAN_LENGTH__) \
( ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_DISABLE) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_2RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_3RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_4RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_5RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_6RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_7RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_8RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_9RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_10RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_11RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_12RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_13RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_14RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_15RANKS) \
|| ((__REG_SEQ_SCAN_LENGTH__) == LL_ADC_REG_SEQ_SCAN_ENABLE_16RANKS) \
)
#define IS_LL_ADC_REG_SEQ_SCAN_DISCONT_MODE(__REG_SEQ_DISCONT_MODE__) \
( ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_DISABLE) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_1RANK) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_2RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_3RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_4RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_5RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_6RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_7RANKS) \
|| ((__REG_SEQ_DISCONT_MODE__) == LL_ADC_REG_SEQ_DISCONT_8RANKS) \
)
/* Check of parameters for configuration of ADC hierarchical scope: */
/* ADC group injected */
#if defined(ADC3)
#define IS_LL_ADC_INJ_TRIG_SOURCE(__ADC_INSTANCE__, __INJ_TRIG_SOURCE__) \
((((__ADC_INSTANCE__) == ADC1) || ((__ADC_INSTANCE__) == ADC2)) \
? ( ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_SOFTWARE) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_CH1) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM3_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM4_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_EXTI_LINE15) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM8_CH4) \
) \
: \
( ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_SOFTWARE) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM4_CH3) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM8_CH2) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM8_CH4_ADC3) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM5_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM5_CH4) \
) \
)
#else
#if defined (STM32F101xE) || defined (STM32F105xC) || defined (STM32F107xC)
#define IS_LL_ADC_INJ_TRIG_SOURCE(__INJ_TRIG_SOURCE__) \
( ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_SOFTWARE) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_CH1) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM3_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM4_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_EXTI_LINE15) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM8_CH4) \
)
#else
#define IS_LL_ADC_INJ_TRIG_SOURCE(__INJ_TRIG_SOURCE__) \
( ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_SOFTWARE) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM1_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM2_CH1) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM3_CH4) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_TIM4_TRGO) \
|| ((__INJ_TRIG_SOURCE__) == LL_ADC_INJ_TRIG_EXT_EXTI_LINE15) \
)
#endif
#endif
#define IS_LL_ADC_INJ_TRIG_AUTO(__INJ_TRIG_AUTO__) \
( ((__INJ_TRIG_AUTO__) == LL_ADC_INJ_TRIG_INDEPENDENT) \
|| ((__INJ_TRIG_AUTO__) == LL_ADC_INJ_TRIG_FROM_GRP_REGULAR) \
)
#define IS_LL_ADC_INJ_SEQ_SCAN_LENGTH(__INJ_SEQ_SCAN_LENGTH__) \
( ((__INJ_SEQ_SCAN_LENGTH__) == LL_ADC_INJ_SEQ_SCAN_DISABLE) \
|| ((__INJ_SEQ_SCAN_LENGTH__) == LL_ADC_INJ_SEQ_SCAN_ENABLE_2RANKS) \
|| ((__INJ_SEQ_SCAN_LENGTH__) == LL_ADC_INJ_SEQ_SCAN_ENABLE_3RANKS) \
|| ((__INJ_SEQ_SCAN_LENGTH__) == LL_ADC_INJ_SEQ_SCAN_ENABLE_4RANKS) \
)
#define IS_LL_ADC_INJ_SEQ_SCAN_DISCONT_MODE(__INJ_SEQ_DISCONT_MODE__) \
( ((__INJ_SEQ_DISCONT_MODE__) == LL_ADC_INJ_SEQ_DISCONT_DISABLE) \
|| ((__INJ_SEQ_DISCONT_MODE__) == LL_ADC_INJ_SEQ_DISCONT_1RANK) \
)
#if defined(ADC_MULTIMODE_SUPPORT)
/* Check of parameters for configuration of ADC hierarchical scope: */
/* multimode. */
#define IS_LL_ADC_MULTI_MODE(__MULTI_MODE__) \
( ((__MULTI_MODE__) == LL_ADC_MULTI_INDEPENDENT) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_SIMULT) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_INTERL_FAST) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_INTERL_SLOW) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_INJ_SIMULT) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_INJ_ALTERN) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_SIM_INJ_SIM) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_SIM_INJ_ALT) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_INTFAST_INJ_SIM) \
|| ((__MULTI_MODE__) == LL_ADC_MULTI_DUAL_REG_INTSLOW_INJ_SIM) \
)
#define IS_LL_ADC_MULTI_MASTER_SLAVE(__MULTI_MASTER_SLAVE__) \
( ((__MULTI_MASTER_SLAVE__) == LL_ADC_MULTI_MASTER) \
|| ((__MULTI_MASTER_SLAVE__) == LL_ADC_MULTI_SLAVE) \
|| ((__MULTI_MASTER_SLAVE__) == LL_ADC_MULTI_MASTER_SLAVE) \
)
#endif /* ADC_MULTIMODE_SUPPORT */
/**
* @}
*/
/* Private function prototypes -----------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
/** @addtogroup ADC_LL_Exported_Functions
* @{
*/
/** @addtogroup ADC_LL_EF_Init
* @{
*/
/**
* @brief De-initialize registers of all ADC instances belonging to
* the same ADC common instance to their default reset values.
* @param ADCxy_COMMON ADC common instance
* (can be set directly from CMSIS definition or by using helper macro @ref __LL_ADC_COMMON_INSTANCE() )
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC common registers are de-initialized
* - ERROR: not applicable
*/
ErrorStatus LL_ADC_CommonDeInit(ADC_Common_TypeDef *ADCxy_COMMON)
{
/* Check the parameters */
assert_param(IS_ADC_COMMON_INSTANCE(ADCxy_COMMON));
/* Force reset of ADC clock (core clock) */
LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_ADC1);
/* Release reset of ADC clock (core clock) */
LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_ADC1);
return SUCCESS;
}
/**
* @brief Initialize some features of ADC common parameters
* (all ADC instances belonging to the same ADC common instance)
* and multimode (for devices with several ADC instances available).
* @note The setting of ADC common parameters is conditioned to
* ADC instances state:
* All ADC instances belonging to the same ADC common instance
* must be disabled.
* @param ADCxy_COMMON ADC common instance
* (can be set directly from CMSIS definition or by using helper macro @ref __LL_ADC_COMMON_INSTANCE() )
* @param ADC_CommonInitStruct Pointer to a @ref LL_ADC_CommonInitTypeDef structure
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC common registers are initialized
* - ERROR: ADC common registers are not initialized
*/
ErrorStatus LL_ADC_CommonInit(ADC_Common_TypeDef *ADCxy_COMMON, LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_ADC_COMMON_INSTANCE(ADCxy_COMMON));
#if defined(ADC_MULTIMODE_SUPPORT)
assert_param(IS_LL_ADC_MULTI_MODE(ADC_CommonInitStruct->Multimode));
#endif /* ADC_MULTIMODE_SUPPORT */
/* Note: Hardware constraint (refer to description of functions */
/* "LL_ADC_SetCommonXXX()" and "LL_ADC_SetMultiXXX()"): */
/* On this STM32 serie, setting of these features is conditioned to */
/* ADC state: */
/* All ADC instances of the ADC common group must be disabled. */
if(__LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(ADCxy_COMMON) == 0U)
{
/* Configuration of ADC hierarchical scope: */
/* - common to several ADC */
/* (all ADC instances belonging to the same ADC common instance) */
/* - multimode (if several ADC instances available on the */
/* selected device) */
/* - Set ADC multimode configuration */
/* - Set ADC multimode DMA transfer */
/* - Set ADC multimode: delay between 2 sampling phases */
#if defined(ADC_MULTIMODE_SUPPORT)
if(ADC_CommonInitStruct->Multimode != LL_ADC_MULTI_INDEPENDENT)
{
MODIFY_REG(ADCxy_COMMON->CR1,
ADC_CR1_DUALMOD,
ADC_CommonInitStruct->Multimode
);
}
else
{
MODIFY_REG(ADCxy_COMMON->CR1,
ADC_CR1_DUALMOD,
LL_ADC_MULTI_INDEPENDENT
);
}
#endif
}
else
{
/* Initialization error: One or several ADC instances belonging to */
/* the same ADC common instance are not disabled. */
status = ERROR;
}
return status;
}
/**
* @brief Set each @ref LL_ADC_CommonInitTypeDef field to default value.
* @param ADC_CommonInitStruct Pointer to a @ref LL_ADC_CommonInitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_ADC_CommonStructInit(LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
{
/* Set ADC_CommonInitStruct fields to default values */
/* Set fields of ADC common */
/* (all ADC instances belonging to the same ADC common instance) */
#if defined(ADC_MULTIMODE_SUPPORT)
/* Set fields of ADC multimode */
ADC_CommonInitStruct->Multimode = LL_ADC_MULTI_INDEPENDENT;
#endif /* ADC_MULTIMODE_SUPPORT */
}
/**
* @brief De-initialize registers of the selected ADC instance
* to their default reset values.
* @note To reset all ADC instances quickly (perform a hard reset),
* use function @ref LL_ADC_CommonDeInit().
* @param ADCx ADC instance
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC registers are de-initialized
* - ERROR: ADC registers are not de-initialized
*/
ErrorStatus LL_ADC_DeInit(ADC_TypeDef *ADCx)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_ADC_ALL_INSTANCE(ADCx));
/* Disable ADC instance if not already disabled. */
if(LL_ADC_IsEnabled(ADCx) == 1U)
{
/* Set ADC group regular trigger source to SW start to ensure to not */
/* have an external trigger event occurring during the conversion stop */
/* ADC disable process. */
LL_ADC_REG_SetTriggerSource(ADCx, LL_ADC_REG_TRIG_SOFTWARE);
/* Set ADC group injected trigger source to SW start to ensure to not */
/* have an external trigger event occurring during the conversion stop */
/* ADC disable process. */
LL_ADC_INJ_SetTriggerSource(ADCx, LL_ADC_INJ_TRIG_SOFTWARE);
/* Disable the ADC instance */
LL_ADC_Disable(ADCx);
}
/* Check whether ADC state is compliant with expected state */
/* (hardware requirements of bits state to reset registers below) */
if(READ_BIT(ADCx->CR2, ADC_CR2_ADON) == 0U)
{
/* ========== Reset ADC registers ========== */
/* Reset register SR */
CLEAR_BIT(ADCx->SR,
( LL_ADC_FLAG_STRT
| LL_ADC_FLAG_JSTRT
| LL_ADC_FLAG_EOS
| LL_ADC_FLAG_JEOS
| LL_ADC_FLAG_AWD1 )
);
/* Reset register CR1 */
#if defined (STM32F103x6) || defined (STM32F103xB) || defined (STM32F105xC) || defined (STM32F107xC) || defined (STM32F103xE) || defined (STM32F103xG)
CLEAR_BIT(ADCx->CR1,
( ADC_CR1_AWDEN | ADC_CR1_JAWDEN | ADC_CR1_DUALMOD
| ADC_CR1_DISCNUM | ADC_CR1_JDISCEN | ADC_CR1_DISCEN
| ADC_CR1_JAUTO | ADC_CR1_AWDSGL | ADC_CR1_SCAN
| ADC_CR1_JEOCIE | ADC_CR1_AWDIE | ADC_CR1_EOCIE
| ADC_CR1_AWDCH )
);
#else
CLEAR_BIT(ADCx->CR1,
( ADC_CR1_AWDEN | ADC_CR1_JAWDEN | ADC_CR1_DISCNUM
| ADC_CR1_JDISCEN | ADC_CR1_DISCEN | ADC_CR1_JAUTO
| ADC_CR1_AWDSGL | ADC_CR1_SCAN | ADC_CR1_JEOCIE
| ADC_CR1_AWDIE | ADC_CR1_EOCIE | ADC_CR1_AWDCH )
);
#endif
/* Reset register CR2 */
CLEAR_BIT(ADCx->CR2,
( ADC_CR2_TSVREFE
| ADC_CR2_SWSTART | ADC_CR2_EXTTRIG | ADC_CR2_EXTSEL
| ADC_CR2_JSWSTART | ADC_CR2_JEXTTRIG | ADC_CR2_JEXTSEL
| ADC_CR2_ALIGN | ADC_CR2_DMA
| ADC_CR2_RSTCAL | ADC_CR2_CAL
| ADC_CR2_CONT | ADC_CR2_ADON )
);
/* Reset register SMPR1 */
CLEAR_BIT(ADCx->SMPR1,
( ADC_SMPR1_SMP17 | ADC_SMPR1_SMP16
| ADC_SMPR1_SMP15 | ADC_SMPR1_SMP14 | ADC_SMPR1_SMP13
| ADC_SMPR1_SMP12 | ADC_SMPR1_SMP11 | ADC_SMPR1_SMP10)
);
/* Reset register SMPR2 */
CLEAR_BIT(ADCx->SMPR2,
( ADC_SMPR2_SMP9
| ADC_SMPR2_SMP8 | ADC_SMPR2_SMP7 | ADC_SMPR2_SMP6
| ADC_SMPR2_SMP5 | ADC_SMPR2_SMP4 | ADC_SMPR2_SMP3
| ADC_SMPR2_SMP2 | ADC_SMPR2_SMP1 | ADC_SMPR2_SMP0)
);
/* Reset register JOFR1 */
CLEAR_BIT(ADCx->JOFR1, ADC_JOFR1_JOFFSET1);
/* Reset register JOFR2 */
CLEAR_BIT(ADCx->JOFR2, ADC_JOFR2_JOFFSET2);
/* Reset register JOFR3 */
CLEAR_BIT(ADCx->JOFR3, ADC_JOFR3_JOFFSET3);
/* Reset register JOFR4 */
CLEAR_BIT(ADCx->JOFR4, ADC_JOFR4_JOFFSET4);
/* Reset register HTR */
SET_BIT(ADCx->HTR, ADC_HTR_HT);
/* Reset register LTR */
CLEAR_BIT(ADCx->LTR, ADC_LTR_LT);
/* Reset register SQR1 */
CLEAR_BIT(ADCx->SQR1,
( ADC_SQR1_L
| ADC_SQR1_SQ16
| ADC_SQR1_SQ15 | ADC_SQR1_SQ14 | ADC_SQR1_SQ13)
);
/* Reset register SQR2 */
CLEAR_BIT(ADCx->SQR2,
( ADC_SQR2_SQ12 | ADC_SQR2_SQ11 | ADC_SQR2_SQ10
| ADC_SQR2_SQ9 | ADC_SQR2_SQ8 | ADC_SQR2_SQ7)
);
/* Reset register JSQR */
CLEAR_BIT(ADCx->JSQR,
( ADC_JSQR_JL
| ADC_JSQR_JSQ4 | ADC_JSQR_JSQ3
| ADC_JSQR_JSQ2 | ADC_JSQR_JSQ1 )
);
/* Reset register DR */
/* bits in access mode read only, no direct reset applicable */
/* Reset registers JDR1, JDR2, JDR3, JDR4 */
/* bits in access mode read only, no direct reset applicable */
}
return status;
}
/**
* @brief Initialize some features of ADC instance.
* @note These parameters have an impact on ADC scope: ADC instance.
* Affects both group regular and group injected (availability
* of ADC group injected depends on STM32 families).
* Refer to corresponding unitary functions into
* @ref ADC_LL_EF_Configuration_ADC_Instance .
* @note The setting of these parameters by function @ref LL_ADC_Init()
* is conditioned to ADC state:
* ADC instance must be disabled.
* This condition is applied to all ADC features, for efficiency
* and compatibility over all STM32 families. However, the different
* features can be set under different ADC state conditions
* (setting possible with ADC enabled without conversion on going,
* ADC enabled with conversion on going, ...)
* Each feature can be updated afterwards with a unitary function
* and potentially with ADC in a different state than disabled,
* refer to description of each function for setting
* conditioned to ADC state.
* @note After using this function, some other features must be configured
* using LL unitary functions.
* The minimum configuration remaining to be done is:
* - Set ADC group regular or group injected sequencer:
* map channel on the selected sequencer rank.
* Refer to function @ref LL_ADC_REG_SetSequencerRanks().
* - Set ADC channel sampling time
* Refer to function LL_ADC_SetChannelSamplingTime();
* @param ADCx ADC instance
* @param ADC_InitStruct Pointer to a @ref LL_ADC_REG_InitTypeDef structure
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC registers are initialized
* - ERROR: ADC registers are not initialized
*/
ErrorStatus LL_ADC_Init(ADC_TypeDef *ADCx, LL_ADC_InitTypeDef *ADC_InitStruct)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_ADC_ALL_INSTANCE(ADCx));
assert_param(IS_LL_ADC_DATA_ALIGN(ADC_InitStruct->DataAlignment));
assert_param(IS_LL_ADC_SCAN_SELECTION(ADC_InitStruct->SequencersScanMode));
/* Note: Hardware constraint (refer to description of this function): */
/* ADC instance must be disabled. */
if(LL_ADC_IsEnabled(ADCx) == 0U)
{
/* Configuration of ADC hierarchical scope: */
/* - ADC instance */
/* - Set ADC conversion data alignment */
MODIFY_REG(ADCx->CR1,
ADC_CR1_SCAN
,
ADC_InitStruct->SequencersScanMode
);
MODIFY_REG(ADCx->CR2,
ADC_CR2_ALIGN
,
ADC_InitStruct->DataAlignment
);
}
else
{
/* Initialization error: ADC instance is not disabled. */
status = ERROR;
}
return status;
}
/**
* @brief Set each @ref LL_ADC_InitTypeDef field to default value.
* @param ADC_InitStruct Pointer to a @ref LL_ADC_InitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_ADC_StructInit(LL_ADC_InitTypeDef *ADC_InitStruct)
{
/* Set ADC_InitStruct fields to default values */
/* Set fields of ADC instance */
ADC_InitStruct->DataAlignment = LL_ADC_DATA_ALIGN_RIGHT;
/* Enable scan mode to have a generic behavior with ADC of other */
/* STM32 families, without this setting available: */
/* ADC group regular sequencer and ADC group injected sequencer depend */
/* only of their own configuration. */
ADC_InitStruct->SequencersScanMode = LL_ADC_SEQ_SCAN_ENABLE;
}
/**
* @brief Initialize some features of ADC group regular.
* @note These parameters have an impact on ADC scope: ADC group regular.
* Refer to corresponding unitary functions into
* @ref ADC_LL_EF_Configuration_ADC_Group_Regular
* (functions with prefix "REG").
* @note The setting of these parameters by function @ref LL_ADC_Init()
* is conditioned to ADC state:
* ADC instance must be disabled.
* This condition is applied to all ADC features, for efficiency
* and compatibility over all STM32 families. However, the different
* features can be set under different ADC state conditions
* (setting possible with ADC enabled without conversion on going,
* ADC enabled with conversion on going, ...)
* Each feature can be updated afterwards with a unitary function
* and potentially with ADC in a different state than disabled,
* refer to description of each function for setting
* conditioned to ADC state.
* @note After using this function, other features must be configured
* using LL unitary functions.
* The minimum configuration remaining to be done is:
* - Set ADC group regular or group injected sequencer:
* map channel on the selected sequencer rank.
* Refer to function @ref LL_ADC_REG_SetSequencerRanks().
* - Set ADC channel sampling time
* Refer to function LL_ADC_SetChannelSamplingTime();
* @param ADCx ADC instance
* @param ADC_REG_InitStruct Pointer to a @ref LL_ADC_REG_InitTypeDef structure
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC registers are initialized
* - ERROR: ADC registers are not initialized
*/
ErrorStatus LL_ADC_REG_Init(ADC_TypeDef *ADCx, LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_ADC_ALL_INSTANCE(ADCx));
#if defined(ADC3)
assert_param(IS_LL_ADC_REG_TRIG_SOURCE(ADCx, ADC_REG_InitStruct->TriggerSource));
#else
assert_param(IS_LL_ADC_REG_TRIG_SOURCE(ADC_REG_InitStruct->TriggerSource));
#endif
assert_param(IS_LL_ADC_REG_SEQ_SCAN_LENGTH(ADC_REG_InitStruct->SequencerLength));
if(ADC_REG_InitStruct->SequencerLength != LL_ADC_REG_SEQ_SCAN_DISABLE)
{
assert_param(IS_LL_ADC_REG_SEQ_SCAN_DISCONT_MODE(ADC_REG_InitStruct->SequencerDiscont));
}
assert_param(IS_LL_ADC_REG_CONTINUOUS_MODE(ADC_REG_InitStruct->ContinuousMode));
assert_param(IS_LL_ADC_REG_DMA_TRANSFER(ADC_REG_InitStruct->DMATransfer));
/* Note: Hardware constraint (refer to description of this function): */
/* ADC instance must be disabled. */
if(LL_ADC_IsEnabled(ADCx) == 0U)
{
/* Configuration of ADC hierarchical scope: */
/* - ADC group regular */
/* - Set ADC group regular trigger source */
/* - Set ADC group regular sequencer length */
/* - Set ADC group regular sequencer discontinuous mode */
/* - Set ADC group regular continuous mode */
/* - Set ADC group regular conversion data transfer: no transfer or */
/* transfer by DMA, and DMA requests mode */
/* Note: On this STM32 serie, ADC trigger edge is set when starting */
/* ADC conversion. */
/* Refer to function @ref LL_ADC_REG_StartConversionExtTrig(). */
if(ADC_REG_InitStruct->SequencerLength != LL_ADC_REG_SEQ_SCAN_DISABLE)
{
MODIFY_REG(ADCx->CR1,
ADC_CR1_DISCEN
| ADC_CR1_DISCNUM
,
ADC_REG_InitStruct->SequencerLength
| ADC_REG_InitStruct->SequencerDiscont
);
}
else
{
MODIFY_REG(ADCx->CR1,
ADC_CR1_DISCEN
| ADC_CR1_DISCNUM
,
ADC_REG_InitStruct->SequencerLength
| LL_ADC_REG_SEQ_DISCONT_DISABLE
);
}
MODIFY_REG(ADCx->CR2,
ADC_CR2_EXTSEL
| ADC_CR2_CONT
| ADC_CR2_DMA
,
ADC_REG_InitStruct->TriggerSource
| ADC_REG_InitStruct->ContinuousMode
| ADC_REG_InitStruct->DMATransfer
);
/* Set ADC group regular sequencer length and scan direction */
/* Note: Hardware constraint (refer to description of this function): */
/* Note: If ADC instance feature scan mode is disabled */
/* (refer to ADC instance initialization structure */
/* parameter @ref SequencersScanMode */
/* or function @ref LL_ADC_SetSequencersScanMode() ), */
/* this parameter is discarded. */
LL_ADC_REG_SetSequencerLength(ADCx, ADC_REG_InitStruct->SequencerLength);
}
else
{
/* Initialization error: ADC instance is not disabled. */
status = ERROR;
}
return status;
}
/**
* @brief Set each @ref LL_ADC_REG_InitTypeDef field to default value.
* @param ADC_REG_InitStruct Pointer to a @ref LL_ADC_REG_InitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_ADC_REG_StructInit(LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct)
{
/* Set ADC_REG_InitStruct fields to default values */
/* Set fields of ADC group regular */
/* Note: On this STM32 serie, ADC trigger edge is set when starting */
/* ADC conversion. */
/* Refer to function @ref LL_ADC_REG_StartConversionExtTrig(). */
ADC_REG_InitStruct->TriggerSource = LL_ADC_REG_TRIG_SOFTWARE;
ADC_REG_InitStruct->SequencerLength = LL_ADC_REG_SEQ_SCAN_DISABLE;
ADC_REG_InitStruct->SequencerDiscont = LL_ADC_REG_SEQ_DISCONT_DISABLE;
ADC_REG_InitStruct->ContinuousMode = LL_ADC_REG_CONV_SINGLE;
ADC_REG_InitStruct->DMATransfer = LL_ADC_REG_DMA_TRANSFER_NONE;
}
/**
* @brief Initialize some features of ADC group injected.
* @note These parameters have an impact on ADC scope: ADC group injected.
* Refer to corresponding unitary functions into
* @ref ADC_LL_EF_Configuration_ADC_Group_Regular
* (functions with prefix "INJ").
* @note The setting of these parameters by function @ref LL_ADC_Init()
* is conditioned to ADC state:
* ADC instance must be disabled.
* This condition is applied to all ADC features, for efficiency
* and compatibility over all STM32 families. However, the different
* features can be set under different ADC state conditions
* (setting possible with ADC enabled without conversion on going,
* ADC enabled with conversion on going, ...)
* Each feature can be updated afterwards with a unitary function
* and potentially with ADC in a different state than disabled,
* refer to description of each function for setting
* conditioned to ADC state.
* @note After using this function, other features must be configured
* using LL unitary functions.
* The minimum configuration remaining to be done is:
* - Set ADC group injected sequencer:
* map channel on the selected sequencer rank.
* Refer to function @ref LL_ADC_INJ_SetSequencerRanks().
* - Set ADC channel sampling time
* Refer to function LL_ADC_SetChannelSamplingTime();
* @param ADCx ADC instance
* @param ADC_INJ_InitStruct Pointer to a @ref LL_ADC_INJ_InitTypeDef structure
* @retval An ErrorStatus enumeration value:
* - SUCCESS: ADC registers are initialized
* - ERROR: ADC registers are not initialized
*/
ErrorStatus LL_ADC_INJ_Init(ADC_TypeDef *ADCx, LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct)
{
ErrorStatus status = SUCCESS;
/* Check the parameters */
assert_param(IS_ADC_ALL_INSTANCE(ADCx));
#if defined(ADC3)
assert_param(IS_LL_ADC_INJ_TRIG_SOURCE(ADCx, ADC_INJ_InitStruct->TriggerSource));
#else
assert_param(IS_LL_ADC_INJ_TRIG_SOURCE(ADC_INJ_InitStruct->TriggerSource));
#endif
assert_param(IS_LL_ADC_INJ_SEQ_SCAN_LENGTH(ADC_INJ_InitStruct->SequencerLength));
if(ADC_INJ_InitStruct->SequencerLength != LL_ADC_INJ_SEQ_SCAN_DISABLE)
{
assert_param(IS_LL_ADC_INJ_SEQ_SCAN_DISCONT_MODE(ADC_INJ_InitStruct->SequencerDiscont));
}
assert_param(IS_LL_ADC_INJ_TRIG_AUTO(ADC_INJ_InitStruct->TrigAuto));
/* Note: Hardware constraint (refer to description of this function): */
/* ADC instance must be disabled. */
if(LL_ADC_IsEnabled(ADCx) == 0U)
{
/* Configuration of ADC hierarchical scope: */
/* - ADC group injected */
/* - Set ADC group injected trigger source */
/* - Set ADC group injected sequencer length */
/* - Set ADC group injected sequencer discontinuous mode */
/* - Set ADC group injected conversion trigger: independent or */
/* from ADC group regular */
/* Note: On this STM32 serie, ADC trigger edge is set when starting */
/* ADC conversion. */
/* Refer to function @ref LL_ADC_INJ_StartConversionExtTrig(). */
if(ADC_INJ_InitStruct->SequencerLength != LL_ADC_REG_SEQ_SCAN_DISABLE)
{
MODIFY_REG(ADCx->CR1,
ADC_CR1_JDISCEN
| ADC_CR1_JAUTO
,
ADC_INJ_InitStruct->SequencerDiscont
| ADC_INJ_InitStruct->TrigAuto
);
}
else
{
MODIFY_REG(ADCx->CR1,
ADC_CR1_JDISCEN
| ADC_CR1_JAUTO
,
LL_ADC_REG_SEQ_DISCONT_DISABLE
| ADC_INJ_InitStruct->TrigAuto
);
}
MODIFY_REG(ADCx->CR2,
ADC_CR2_JEXTSEL
,
ADC_INJ_InitStruct->TriggerSource
);
/* Note: Hardware constraint (refer to description of this function): */
/* Note: If ADC instance feature scan mode is disabled */
/* (refer to ADC instance initialization structure */
/* parameter @ref SequencersScanMode */
/* or function @ref LL_ADC_SetSequencersScanMode() ), */
/* this parameter is discarded. */
LL_ADC_INJ_SetSequencerLength(ADCx, ADC_INJ_InitStruct->SequencerLength);
}
else
{
/* Initialization error: ADC instance is not disabled. */
status = ERROR;
}
return status;
}
/**
* @brief Set each @ref LL_ADC_INJ_InitTypeDef field to default value.
* @param ADC_INJ_InitStruct Pointer to a @ref LL_ADC_INJ_InitTypeDef structure
* whose fields will be set to default values.
* @retval None
*/
void LL_ADC_INJ_StructInit(LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct)
{
/* Set ADC_INJ_InitStruct fields to default values */
/* Set fields of ADC group injected */
ADC_INJ_InitStruct->TriggerSource = LL_ADC_INJ_TRIG_SOFTWARE;
ADC_INJ_InitStruct->SequencerLength = LL_ADC_INJ_SEQ_SCAN_DISABLE;
ADC_INJ_InitStruct->SequencerDiscont = LL_ADC_INJ_SEQ_DISCONT_DISABLE;
ADC_INJ_InitStruct->TrigAuto = LL_ADC_INJ_TRIG_INDEPENDENT;
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#endif /* ADC1 || ADC2 || ADC3 */
/**
* @}
*/
#endif /* USE_FULL_LL_DRIVER */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
the_stack_data/377829.c
|
#include <stdio.h>
#include <stdlib.h>
void func(int *x)
{
printf("func sizeof(x): %zu\n", sizeof(x));
printf("address offset: %zd\n", (char *)(x + 1) - (char *)x);
}
int main(int argc, char *argv[])
{
int a[] = { 1, 2, 3 };
int *x = a;
printf("sizeof(x): %zu\n", sizeof(x));
printf("address offset: %zd\n", (char *)(x + 1) - (char *)x);
func(x);
return EXIT_SUCCESS;
}
|
the_stack_data/90788.c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/crypto.h>
void error(const char *fmt, ...);
int main() {
size_t BUFFER_SIZE = 32;
char *buffer = OPENSSL_zalloc(BUFFER_SIZE);
char data[BUFFER_SIZE];
strcpy(data, "MY-COOL-DATA");
for (size_t i = 0; i < BUFFER_SIZE; ++i) {
buffer[i] = data[i];
}
// clear buffers and then free
OPENSSL_cleanse(buffer, BUFFER_SIZE);
OPENSSL_cleanse(data, BUFFER_SIZE);
printf("buffer: %s", buffer);
printf("data: %s", buffer);
OPENSSL_free(buffer);
return 0;
}
|
the_stack_data/206393646.c
|
/**
* Chapter: 7
* Exercise: 7-03 - Revise mainprintf to handle more of the other facilities of printf.
**/
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
#define FORMAT_LEN 50
void minprintf(char *, ...);
int main() {
int a = 10;
double b = 20;
char *text = "some text here";
minprintf("integer: %i\n", a);
minprintf("double: %f\n", b);
minprintf("double with precision: %.2f\n", b);
minprintf("string: %s\n", text);
minprintf("hexadecimal: %x\n", a);
return 0;
}
void minprintf(char *fmt, ...){
char *p, *sval, format[FORMAT_LEN];
int ival, i;
double dval;
unsigned uval;
va_list ap; /* points to each unnamed arg in turn */
va_start(ap, fmt); /* make ap point to 1st unnamed arg */
for(p = fmt; *p; p++){
if(*p != '%'){
putchar(*p);
continue;
}
i = 0;
format[i++] = '%';
while (*(p+1) && !isalpha(*(p+1))){
format[i++] = *++p;
}
format[i++] = *(p+1);
format[i] = '\0';
switch (*++p){
case 'i':
case 'd':
ival = va_arg(ap, int);
printf(format, ival);
break;
case 'x':
case 'X':
case 'u':
case 'o':
uval = va_arg(ap, unsigned);
printf(format, uval);
break;
case 'f':
dval = va_arg(ap, double);
printf(format, dval);
break;
case 's':
for(sval = va_arg(ap, char *); *sval; sval++){
putchar(*sval);
}
break;
default:
putchar(*p);
break;
}
}
va_end(ap); /* clean up when done */
}
|
the_stack_data/91400.c
|
/*
* Copyright (c) 2011 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Sanity test for AddressSanitizer. */
int main(void) {
volatile char a[1] = {0};
volatile int idx = 1;
return a[idx];
}
|
the_stack_data/1107726.c
|
#include <stdio.h>
#include <string.h>
void reverse(char s[]);
int main(int argc, char** argv) {
char s[] = ".esrever rof tset elpmis a si sihT";
char t[] = "KO";
printf("Reversing '%s': ", s);
reverse(s);
printf("%s\n", s);
printf("Reversing '%s': ", t);
reverse(t);
printf("%s\n", t);
return 0;
}
void reverse(char s[]) {
char c1, c2;
int len = strlen(s);
if (len < 2)
return;
c1 = s[0];
c2 = s[len - 1];
s[len - 1] = '\0';
reverse(s + 1);
s[0] = c2;
s[len - 1] = c1;
}
|
the_stack_data/437226.c
|
//======================================================================
//
// metr, 64x64@4,
// + palette 32 entries, not compressed
// + 64 tiles not compressed
// Total size: 64 + 2048 = 2112
//
// Time-stamp: 2005-12-24, 17:36:57
// Exported by Cearn's Usenti v1.7.1
// (comments, kudos, flames to "[email protected]")
//
//======================================================================
const unsigned int metrPal[64]=
{
0x001F4210,0x008C0000,0x04B629DA,0x0000004D,0x031C0218,0x00005F5D,0x01800100,0x00000240,
0x46314210,0x4E734A52,0x56B55294,0x5EF75AD6,0x67396318,0x6F7B6B5A,0x77BD739C,0x7FFF7BDE,
0x2D6B01A0,0x259F00BC,0x0CEC1EA4,0x029A014F,0x00743BE0,0x29DD0108,0x11B13BEC,0x421057DF,
0x01A00000,0x1EA400BC,0x014F57DF,0x3DEF029A,0x00740108,0x0CEC3BE0,0x3BEC259F,0x37FF0192,
0x007D02BF,0x01B23BFF,
};
const unsigned int metrTiles[512]=
{
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0xCCC00000,0xDDCC0000,0xEEDDC000,0x00ECDC00,0x006EEDC0,0x66000EDC,
0xCCCCC000,0xDDDDDCCC,0xEEEEEDDD,0x45600EEE,0x45600000,0x56000000,0x60000000,0x00000005,
0x000CCCCC,0xCCCDDDDD,0xDDDEEEEE,0xEEE54000,0x00066400,0x00000644,0x00000065,0x00000006,
0x00000000,0x00000000,0x000000CC,0x0000CCDD,0x000CDDEE,0x00CDCE00,0x0CDEE000,0xCDE00000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0xC0000000,0xDC000000,0xCDC00000,0xEDDC0000,0x0ECC0000,0x0ECDC000,0x60EDC000,0x00ECDC00,
0x000000ED,0x0000000E,0x0000000E,0x00000000,0x00000000,0x00000000,0x66000006,0x00650560,
0x00006006,0x00060660,0x00650056,0x05000006,0x50500006,0x00000056,0x00000060,0x00000060,
0x00000060,0x00000600,0x00000600,0x00005600,0x00006000,0x00006000,0x00006500,0x00000600,
0xDE000000,0xE0000000,0xE0000000,0x00000000,0x60000000,0x56000000,0x45600000,0x00060000,
0x0000000C,0x000000CD,0x00000CDC,0x0000CDDE,0x0000CDE0,0x000CDCE5,0x000CDE54,0x00CDCE44,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x000EDC00,0x066EDC00,0x6500EDC0,0x0000EDC0,0x0000EDC0,0x0000EDC0,0x60000EDC,0x66000EDC,
0x00066600,0x00000000,0x00000050,0x00000006,0x00000065,0x00000060,0x00000506,0x66600600,
0x60000600,0x56606000,0x45560000,0x34456000,0x44445600,0x34345600,0x43445600,0x34445666,
0x00006666,0x00665555,0x06554344,0x65444434,0x54444343,0x54343444,0x53434443,0x54443434,
0x66066000,0x00600600,0x00000600,0x00006000,0x00006006,0x00006006,0x00060006,0x00006606,
0x00CDE556,0x00CDE660,0x0CDE6000,0x0CDE0000,0x0CDE0000,0x0CDE0000,0xCDE00000,0xCDE00000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x06000EDC,0x06000EDC,0x06600EDC,0x06560EDC,0x65560EDC,0x65460EDC,0x64560EDC,0x66600EDC,
0x55566600,0x44455600,0x34445600,0x43344560,0x33444460,0x44433460,0x34344560,0x34445600,
0x43456655,0x44565553,0x55565444,0x66654344,0x64654434,0x64654343,0x66655444,0x46665544,
0x66666544,0x55555665,0x43435556,0x43444455,0x34343445,0x43434344,0x44344445,0x44434556,
0x00000666,0x00006655,0x06065534,0x60655444,0x00654343,0x00654434,0x00655443,0x06065554,
0xCDE60000,0xCDE56000,0xCDE45600,0xCDE56060,0xCDE60006,0xCDE00000,0xCDE00000,0xCDE00000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x06000EDC,0x06000EDC,0x6000EDC0,0x5000ED00,0x00EEDC60,0xEEDDC600,0xDCC66000,0x66550880,
0x43555600,0x55566650,0x66600060,0x0EEE0056,0xEDDDEE00,0xDC6CDDEE,0x66556CCD,0x58885556,
0x64665554,0x06066655,0x00000666,0x00000000,0x0000000D,0x00000DDE,0xDDDDDEEC,0xEEEEDDC6,
0x55555660,0x66666000,0x00000650,0x00000060,0xD0060606,0xEDD05005,0xCEEDDDDD,0x6CDDEEEE,
0x60006655,0x60000066,0x66000000,0x0600EEE0,0x55EEDDDE,0xEEDD66CD,0xDCC65566,0x65558885,
0xCDE00000,0xCDE00000,0x0CDE0006,0x00DE0065,0x06CDEE54,0x006CDDEE,0x00066CCD,0x08805566,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x80000000,0x80000000,0x88000000,0x98000000,0x98000000,0x98000000,0x80000000,
0x55088988,0x80999A98,0x0888AAA9,0x000889A9,0x000088AA,0x0000089A,0x0000089A,0x00000089,
0x00000885,0x80000000,0x98000000,0x99800000,0x89800000,0xA8000000,0x80000000,0x00000000,
0x55CC6655,0x66555008,0x50000889,0x00000000,0x00000000,0x00000000,0x0000000A,0x00000000,
0x5566CC55,0x80055566,0x98800005,0x00000000,0x00000000,0x00000000,0xA0000000,0x00000000,
0x58800000,0x00000008,0x00000089,0x00000899,0x00000898,0x0000008A,0x00000008,0x00000000,
0x88988055,0x89A99908,0x9AAA8880,0x9A988000,0xAA880000,0xA9800000,0xA9800000,0x98000000,
0x00000000,0x00000008,0x00000008,0x00000088,0x00000089,0x00000089,0x00000089,0x00000008,
0x80000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000089,0x000000A8,0x00000A80,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x98000000,0x8A000000,0x08A00000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000008,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
};
//======================================================================
//
// metr_box, 64x64@4,
// + 64 tiles not compressed
// Total size: 2048 = 2048
//
// Time-stamp: 2005-12-24, 17:37:08
// Exported by Cearn's Usenti v1.7.1
// (comments, kudos, flames to "[email protected]")
//
//======================================================================
const unsigned int metr_boxTiles[512]=
{
0x11111111,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x11111111,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0xCCC00000,0xDDCC0000,0xEEDDC000,0x00ECDC00,0x006EEDC0,0x66000EDC,
0xCCCCC000,0xDDDDDCCC,0xEEEEEDDD,0x45600EEE,0x45600000,0x56000000,0x60000000,0x00000005,
0x000CCCCC,0xCCCDDDDD,0xDDDEEEEE,0xEEE54000,0x00066400,0x00000644,0x00000065,0x00000006,
0x00000000,0x00000000,0x000000CC,0x0000CCDD,0x000CDDEE,0x00CDCE00,0x0CDEE000,0xCDE00000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0xC0000000,0xDC000000,0xCDC00000,0xEDDC0000,0x0ECC0000,0x0ECDC000,0x60EDC000,0x00ECDC00,
0x000000ED,0x0000000E,0x0000000E,0x00000000,0x00000000,0x00000000,0x66000006,0x00650560,
0x00006006,0x00060660,0x00650056,0x05000006,0x50500006,0x00000056,0x00000060,0x00000060,
0x00000060,0x00000600,0x00000600,0x00005600,0x00006000,0x00006000,0x00006500,0x00000600,
0xDE000000,0xE0000000,0xE0000000,0x00000000,0x60000000,0x56000000,0x45600000,0x00060000,
0x0000000C,0x000000CD,0x00000CDC,0x0000CDDE,0x0000CDE0,0x000CDCE5,0x000CDE54,0x00CDCE44,
0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0x000EDC00,0x066EDC00,0x6500EDC0,0x0000EDC0,0x0000EDC0,0x0000EDC0,0x60000EDC,0x66000EDC,
0x00066600,0x00000000,0x00000050,0x00000006,0x00000065,0x00000060,0x00000506,0x66600600,
0x60000600,0x56606000,0x45560000,0x34456000,0x44445600,0x34345600,0x43445600,0x34445666,
0x00006666,0x00665555,0x06554344,0x65444434,0x54444343,0x54343444,0x53434443,0x54443434,
0x66066000,0x00600600,0x00000600,0x00006000,0x00006006,0x00006006,0x00060006,0x00006606,
0x00CDE556,0x00CDE660,0x0CDE6000,0x0CDE0000,0x0CDE0000,0x0CDE0000,0xCDE00000,0xCDE00000,
0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0x06000EDC,0x06000EDC,0x06600EDC,0x06560EDC,0x65560EDC,0x65460EDC,0x64560EDC,0x66600EDC,
0x55566600,0x44455600,0x34445600,0x43344560,0x33444460,0x44433460,0x34344560,0x34445600,
0x43456655,0x44565553,0x55565444,0x66654344,0x64654434,0x64654343,0x66655444,0x46665544,
0x66666544,0x55555665,0x43435556,0x43444455,0x34343445,0x43434344,0x44344445,0x44434556,
0x00000666,0x00006655,0x06065534,0x60655444,0x00654343,0x00654434,0x00655443,0x06065554,
0xCDE60000,0xCDE56000,0xCDE45600,0xCDE56060,0xCDE60006,0xCDE00000,0xCDE00000,0xCDE00000,
0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,
0x06000EDC,0x06000EDC,0x6000EDC0,0x5000ED00,0x00EEDC60,0xEEDDC600,0xDCC66000,0x66550880,
0x43555600,0x55566650,0x66600060,0x0EEE0056,0xEDDDEE00,0xDC6CDDEE,0x66556CCD,0x58885556,
0x64665554,0x06066655,0x00000666,0x00000000,0x0000000D,0x00000DDE,0xDDDDDEEC,0xEEEEDDC6,
0x55555660,0x66666000,0x00000650,0x00000060,0xD0060606,0xEDD05005,0xCEEDDDDD,0x6CDDEEEE,
0x60006655,0x60000066,0x66000000,0x0600EEE0,0x55EEDDDE,0xEEDD66CD,0xDCC65566,0x65558885,
0xCDE00000,0xCDE00000,0x0CDE0006,0x00DE0065,0x06CDEE54,0x006CDDEE,0x00066CCD,0x08805566,
0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,
0x00000001,0x80000001,0x80000001,0x88000001,0x98000001,0x98000001,0x98000001,0x80000001,
0x55088988,0x80999A98,0x0888AAA9,0x000889A9,0x000088AA,0x0000089A,0x0000089A,0x00000089,
0x00000885,0x80000000,0x98000000,0x99800000,0x89800000,0xA8000000,0x80000000,0x00000000,
0x55CC6655,0x66555008,0x50000889,0x00000000,0x00000000,0x00000000,0x0000000A,0x00000000,
0x5566CC55,0x80055566,0x98800005,0x00000000,0x00000000,0x00000000,0xA0000000,0x00000000,
0x58800000,0x00000008,0x00000089,0x00000899,0x00000898,0x0000008A,0x00000008,0x00000000,
0x88988055,0x89A99908,0x9AAA8880,0x9A988000,0xAA880000,0xA9800000,0xA9800000,0x98000000,
0x10000000,0x10000008,0x10000008,0x10000088,0x10000089,0x10000089,0x10000089,0x10000008,
0x80000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x00000001,0x11111111,
0x00000089,0x000000A8,0x00000A80,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x98000000,0x8A000000,0x08A00000,0x00000000,0x00000000,0x00000000,0x00000000,0x11111111,
0x10000008,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x10000000,0x11111111,
};
|
the_stack_data/677074.c
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch;
printf("Please enter a Number between 0 and 127 :");
scanf("%d", &ch);
printf("\nThe number you enterd (%d) correspondes to the ASCII symbole %c\n\n", ch, ch);
getchar();
getchar();
return 0;
}
|
the_stack_data/57588.c
|
unsigned char LaunchImage_iPhone_Landscape_json[] = {
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x73, 0x22, 0x20, 0x3a, 0x20, 0x5b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74,
0x22, 0x20, 0x3a, 0x20, 0x22, 0x66, 0x75, 0x6c, 0x6c, 0x2d, 0x73, 0x63,
0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x64, 0x69, 0x6f,
0x6d, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x69, 0x70, 0x68, 0x6f, 0x6e, 0x65,
0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x32, 0x36, 0x38, 0x38, 0x68, 0x22, 0x2c, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x3a,
0x20, 0x22, 0x69, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x2d, 0x4c, 0x61, 0x6e,
0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2d, 0x32, 0x36, 0x38, 0x38, 0x68,
0x40, 0x33, 0x78, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x2c, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6d,
0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x2d, 0x73, 0x79, 0x73, 0x74, 0x65,
0x6d, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x3a,
0x20, 0x22, 0x31, 0x32, 0x2e, 0x30, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6f, 0x72,
0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x3a,
0x20, 0x22, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22,
0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x20, 0x3a, 0x20,
0x22, 0x33, 0x78, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x70, 0x65, 0x63,
0x74, 0x65, 0x64, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22, 0x3a, 0x20,
0x22, 0x32, 0x36, 0x38, 0x38, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x70,
0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
0x22, 0x3a, 0x20, 0x22, 0x31, 0x32, 0x34, 0x32, 0x22, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65,
0x6e, 0x74, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x66, 0x75, 0x6c, 0x6c, 0x2d,
0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x64,
0x69, 0x6f, 0x6d, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x69, 0x70, 0x68, 0x6f,
0x6e, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70,
0x65, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x31, 0x37, 0x39, 0x32, 0x68, 0x22,
0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x69, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x2d, 0x4c,
0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2d, 0x31, 0x37, 0x39,
0x32, 0x68, 0x40, 0x32, 0x78, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x2c, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x2d, 0x73, 0x79, 0x73,
0x74, 0x65, 0x6d, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x31, 0x32, 0x2e, 0x30, 0x22, 0x2c, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70,
0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x20,
0x3a, 0x20, 0x22, 0x32, 0x78, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x70,
0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22,
0x3a, 0x20, 0x22, 0x31, 0x37, 0x39, 0x32, 0x22, 0x2c, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65,
0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x38, 0x32, 0x38, 0x22, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x74, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x66, 0x75, 0x6c, 0x6c,
0x2d, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69,
0x64, 0x69, 0x6f, 0x6d, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x69, 0x70, 0x68,
0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x62, 0x74, 0x79,
0x70, 0x65, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x32, 0x34, 0x33, 0x36, 0x68,
0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x20, 0x3a, 0x20, 0x22, 0x69, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x2d,
0x4c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2d, 0x32, 0x34,
0x33, 0x36, 0x68, 0x40, 0x33, 0x78, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x2c,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x2d, 0x73, 0x79,
0x73, 0x74, 0x65, 0x6d, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x22, 0x20, 0x3a, 0x20, 0x22, 0x31, 0x31, 0x2e, 0x30, 0x22, 0x2c, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x22, 0x20, 0x3a, 0x20, 0x22, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61,
0x70, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x33, 0x78, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78,
0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68,
0x22, 0x3a, 0x20, 0x22, 0x32, 0x34, 0x33, 0x36, 0x22, 0x2c, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x68, 0x65, 0x69,
0x67, 0x68, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x31, 0x32, 0x35, 0x22,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x2c, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x66, 0x75,
0x6c, 0x6c, 0x2d, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x2c, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x69, 0x64, 0x69, 0x6f, 0x6d, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x69,
0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x75, 0x62,
0x74, 0x79, 0x70, 0x65, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x37, 0x33, 0x36,
0x68, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d,
0x65, 0x22, 0x20, 0x3a, 0x20, 0x22, 0x69, 0x50, 0x68, 0x6f, 0x6e, 0x65,
0x2d, 0x4c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70, 0x65, 0x2d, 0x37,
0x33, 0x36, 0x68, 0x40, 0x33, 0x78, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x2c,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x2d, 0x73, 0x79,
0x73, 0x74, 0x65, 0x6d, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x22, 0x20, 0x3a, 0x20, 0x22, 0x38, 0x2e, 0x30, 0x22, 0x2c, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x20, 0x3a, 0x20, 0x22, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x63, 0x61, 0x70,
0x65, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x20,
0x3a, 0x20, 0x22, 0x33, 0x78, 0x22, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65, 0x78, 0x70,
0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x22,
0x3a, 0x20, 0x22, 0x32, 0x32, 0x30, 0x38, 0x22, 0x2c, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x65,
0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2d, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x32, 0x34, 0x32, 0x22, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x5d, 0x0a, 0x7d, 0x0a
};
unsigned int LaunchImage_iPhone_Landscape_json_len = 1518;
|
the_stack_data/990723.c
|
#include <event2/event.h>
#include <event2/event_struct.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <stdbool.h>
#define SIGPRI 0
#define TERMPRI 1
static struct event_base *base;
static bool run=true;
static int loops=0;
static bool again=false;
static struct event ev2, ev3;
static void
die(const char *msg)
{
fprintf(stderr, "%s\n", msg);
fflush(stderr);
exit(1);
}
static void
cbfunc2(evutil_socket_t fd, short what, void *arg)
{
fprintf(stderr, "CAUGHT EVENT 2\n");
fflush(stderr);
#if 0
event_base_loopbreak(base);
#endif
run = false;
}
static void
cbfunc1(evutil_socket_t fd, short what, void *arg)
{
if (again) {
fprintf(stderr, "CYCLING BACK THRU EVENT 1\n");
return;
}
fprintf(stderr, "CAUGHT EVENT 1\n");
fflush(stderr);
again = true;
if (event_assign(&ev2, base, -1, EV_WRITE, cbfunc1, NULL) < 0)
die("event_assign_2");
if (event_priority_set(&ev2, 4) < 0)
die("event_priority_set2");
event_active(&ev2, EV_WRITE, 1);
fprintf(stderr, "CB1: FIRST EVENT DEFINED\n");
fflush(stderr);
if (event_assign(&ev3, base, -1, EV_WRITE, cbfunc2, NULL) < 0)
die("event_assign_3");
if (event_priority_set(&ev3, 0) < 0)
die("event_priority_set3");
event_active(&ev3, EV_WRITE, 1);
fprintf(stderr, "CB2: SECOND EVENT DEFINED\n");
fflush(stderr);
}
int
main(int argc, char **argv)
{
struct event ev1;
event_enable_debug_mode();
fprintf(stderr, "Libevent %s\n", event_get_version());
fflush(stderr);
if (!(base = event_base_new()))
die("event_base_new");
if (event_base_priority_init(base, 8) < 0)
die("event_base_priority_init");
if (event_assign(&ev1, base, -1, EV_WRITE, cbfunc1, NULL) < 0)
die("event_assign_1");
if (event_priority_set(&ev1, 4) < 0)
die("event_priority_set");
event_active(&ev1, EV_WRITE, 1);
fprintf(stderr, "FIRST EVENT DEFINED\n");
fflush(stderr);
/* event_dispatch(base); */
while (run) {
event_base_loop(base, EVLOOP_ONCE);
}
fprintf(stderr, "EXITED LOOP - FREEING BASE\n");
fflush(stderr);
event_base_free(base);
return 0;
}
|
the_stack_data/9511507.c
|
#include <stdio.h>
int main()
{
struct students
{
unsigned long reg_no ;
float mk1,mk2,mk3 ;
} ; // end of structure specification
struct students svar ; // decl. of structure variable
float pc ;
svar.reg_no=909 ; svar.mk1=89.0 ; svar.mk2=99.0 ; svar.mk3=100.0 ;
pc=(svar.mk1+svar.mk2+svar.mk3)/300 * 100 ;
printf("Percentage = %.2f",pc);
}
|
the_stack_data/231392916.c
|
#include <stdio.h>
#include <string.h>
char name[100001][101];
void Qsort(int *arr, int *subarr, int start, int end)
{
int pivot = arr[start];
int left = start+1;
int right = end;
int tmp;
char tmparr[101];
while(left <= right)
{
while(arr[left] <= pivot) left++;
while(arr[right] > pivot) right--;
if(left <= right)
{
tmp = arr[left];
arr[left] = arr[right];
arr[right] = tmp;
tmp = subarr[left];
subarr[left] = subarr[right];
subarr[right] = tmp;
strcpy(tmparr, name[left]);
strcpy(name[left], name[right]);
strcpy(name[right], tmparr);
}
}
if(start < end)
{
tmp = arr[start];
arr[start] = arr[right];
arr[right] = tmp;
tmp = subarr[start];
subarr[start] = subarr[right];
subarr[right] = tmp;
strcpy(tmparr, name[start]);
strcpy(name[start], name[right]);
strcpy(name[right], tmparr);
Qsort(arr, subarr, start, right-1);
Qsort(arr, subarr, right+1, end);
}
return;
}
int main(void)
{
int N;
scanf("%d", &N);
int age[100001];
int ch[100001];
int i;
for(i=0;i<N;i++)
{
scanf("%d %s", &age[i], name[i]);
ch[i] = i;
}
Qsort(age, ch, 0, N-1);
int num = 0;
for(i=0;i<N;i++)
{
if(age[i] == age[i+1]) num++;
else
{
Qsort(ch, age, i-num, i);
num = 0;
}
}
for(i=0;i<N;i++)
printf("%d %s\n", age[i], name[i]);
return 0;
}
|
the_stack_data/150139699.c
|
#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
int main(int argc, char** argv[]) {
int pp[2];
if (pipe(pp) == -1) {
}
return EXIT_SUCCESS;
}
|
the_stack_data/57949013.c
|
#include "stdio.h"
int main(int argc, char const *argv[])
{
unsigned int limit = 4000000;
unsigned int num1 = 2;
unsigned int num2 = 3;
unsigned int sum = 2;
unsigned int nextFeb = 0;
while (nextFeb < limit)
{
nextFeb = num1 + num2;
if (nextFeb % 2 == 0)
{
sum +=nextFeb;
}
num1 = num2;
num2 = nextFeb;
}
printf("sum = %u", sum);
return 0;
}
|
the_stack_data/165766650.c
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
typedef struct drawing drawing, *Pdrawing;
struct drawing
{
int width;
int height;
char *matrice;
};
typedef struct rectangle rectangle, *Prectangle;
struct rectangle
{
char type;
float x;
float y;
float width;
float height;
char color;
};
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i])
i++;
return (i);
}
int get_info(FILE *file, drawing *drawing)
{
char *tmp;
int i;
char background;
if (fscanf(file, "%d %d %c\n", &drawing->width, &drawing->height, &background) == 3)
{
if ((((drawing->width < 1) || (300 < drawing->width)) || (drawing->height < 1)) || (300 < drawing->height))
return (1);
tmp = (char *)malloc(drawing->width * drawing->height);
drawing->matrice = tmp;
if (!drawing->matrice)
return (1);
i = 0;
while (i < drawing->width * drawing->height)
drawing->matrice[i++] = background;
return (0);
}
return (1);
}
int is_in_rectangle(float x, float y, rectangle *rectangle)
{
if ((((x < rectangle->x) || (rectangle->x + rectangle->width < x)) || (y < rectangle->y)) || (rectangle->y + rectangle->height < y))
return (0);
if (((x - rectangle->x < 1.00000000) || ((rectangle->x + rectangle->width) - x < 1.00000000)) ||
((y - rectangle->y < 1.00000000 || ((rectangle->y + rectangle->height) - y < 1.00000000))))
return (2); // Border
return (1); // Inside
}
void execute_one(rectangle *rect, drawing *drawing, int x, int y)
{
int is_in;
is_in = is_in_rectangle((float)x, (float)y, rect);
if ((is_in == 2) || ((is_in == 1 && (rect->type == 'R'))))
drawing->matrice[x + y * drawing->width] = rect->color;
return;
}
int apply_op(rectangle *rect, drawing *drawing)
{
int j;
int i;
if (((rect->width <= 0.00000000) || (rect->height <= 0.00000000)) || ((rect->type != 'R' && (rect->type != 'r'))))
return (1);
i = 0;
while (i < drawing->width)
{
j = 0;
while (j < drawing->height)
execute_one(rect, drawing, i, j++);
i++;
}
return (0);
}
void print_info(drawing *zone)
{
int i;
i = 0;
while (i < zone->height)
printf("%.*s\n", zone->width, zone->matrice + i++ * zone->width);
}
int execute(FILE *file)
{
int scan_ret;
rectangle rect;
drawing drawing;
if (!get_info(file, &drawing))
{
scan_ret = fscanf(file, "%c %f %f %f %f %c\n", &rect.type, &rect.x, &rect.y, &rect.width, &rect.height, &rect.color);
while (scan_ret == 6)
{
if (apply_op(&rect, &drawing))
return (1);
scan_ret = fscanf(file, "%c %f %f %f %f %c\n", &rect.type, &rect.x, &rect.y, &rect.width, &rect.height, &rect.color);
}
if (scan_ret == -1)
{
print_info(&drawing);
return (0);
}
}
return (1);
}
int main(int argc, char **argv)
{
int i;
FILE *file;
if (argc == 2)
{
file = fopen(argv[1], "r");
if (file && !execute(file))
return 0;
i = ft_strlen("Error: Operation file corrupted\n");
write(1, "Error: Operation file corrupted\n", i);
}
else
{
i = ft_strlen("Error: argument\n");
write(1, "Error: argument\n", i);
}
return (1);
}
|
the_stack_data/70449514.c
|
int sillyfunction2() {
return 1337;
}
|
the_stack_data/68886673.c
|
/*
* patch-cmdline.c - patch the kernel command line on rb532
*
* Copyright (C) 2006 Felix Fietkau <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <string.h>
#define SEARCH_SPACE (16 * 1024)
#define CMDLINE_MAX 512
int main(int argc, char **argv)
{
int fd, found = 0, len, ret = -1;
char *ptr, *p;
if (argc != 3) {
fprintf(stderr, "Usage: %s <file> <cmdline>\n", argv[0]);
goto err1;
}
len = strlen(argv[2]);
if (len + 9 > CMDLINE_MAX) {
fprintf(stderr, "Command line string too long\n");
goto err1;
}
if (((fd = open(argv[1], O_RDWR)) < 0) ||
(ptr = (char *) mmap(0, SEARCH_SPACE + CMDLINE_MAX, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == (void *) (-1)) {
fprintf(stderr, "Could not open kernel image");
goto err2;
}
for (p = ptr; p < (ptr + SEARCH_SPACE); p += 4) {
if (memcmp(p, "CMDLINE:", 8) == 0) {
found = 1;
p += 8;
break;
}
}
if (!found) {
fprintf(stderr, "Command line marker not found!\n");
goto err3;
}
memset(p, 0, CMDLINE_MAX - 8);
strcpy(p, argv[2]);
msync(p, CMDLINE_MAX, MS_SYNC|MS_INVALIDATE);
ret = 0;
err3:
munmap((void *) ptr, len);
err2:
if (fd > 0)
close(fd);
err1:
return ret;
}
|
the_stack_data/72013124.c
|
/*
* =====================================================================================
*
* Filename: pthread1.c
*
* Description: A Simple program of showing What pthread is
*
* Version: 1.0
* Created: 06/07/2016
*
* Author: Quectel
*
* =====================================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
void* thrd_func1(void* arg);
void* thrd_func2(void* arg);
int main(void)
{
pthread_t tid1;
pthread_t tid2;
void* tret;
printf("OpenLinux: thread example \n");
printf("Main process: PID: %d, TID: %lu\n\n", getpid(), pthread_self());
// Create thread 1
if (pthread_create(&tid1, NULL, thrd_func1, NULL) != 0)
{
printf("Create thread 1 error!\n");
exit(1);
}
printf("Create thread 1, TID: %lu\n", tid1);
// Create thread 2
if (pthread_create(&tid2, NULL, thrd_func2, NULL) != 0)
{
printf("Create thread 2 error!\n");
exit(1);
}
printf("Create thread 2, TID: %lu\n", tid2);
// Wait for the end of thread 1, and put the return value in "tret"
if (pthread_join(tid1, &tret) != 0)
{
printf("Join thread 1 error!\n");
exit(1);
}
printf("Thread 1 exit code: %d\n", *((int *)tret));
// Wait for the end of thread 2, and put the return value in "tret"
if (pthread_join(tid2, &tret) != 0)
{
printf("Join thread 2 error!\n");
exit(1);
}
printf("Thread 2 exit code: %d\n", *((int *)tret));
return 0;
}
void* thrd_func1(void *arg)
{
printf("\nThread 1 returning!\n");
printf("PID: %u, TID: %lu\n", getpid(), pthread_self());
return ((void *)1); // Exit the thread
}
void* thrd_func2(void *arg)
{
printf("\nThread 2 exiting!\n");
printf("PID: %u, TID: %lu\n", getpid(), pthread_self());
pthread_exit((void *)2); // Explicitly exit the thread, and return (void *)2
}
|
the_stack_data/97011878.c
|
// Decompiled Web Assembly generated by wasmdec
// Preamble:
#include <stdint.h>
#include <math.h>
typedef float float32_t;
typedef double float64_t;
// No WASM imports.
// WASM functions:
/*
Function '$0'
Local variables: 0
Parameters: 2
Immediate block expressions: 1
*/
int32_t fn_0(int32_t local_0, int32_t local_1) {
return local_0 + local_1;
}
/*
Function '$1'
Local variables: 0
Parameters: 0
Immediate block expressions: 1
*/
int32_t fn_1() {
return 1;
}
|
the_stack_data/159514816.c
|
/**
implement merge sort
Time complexity: O(nlogn)
Proof: Tree
T(n) = D(n) + 2T(n/2) + C(n) = O(1) + 2T(n/2) + O(n)
^Divide ^Combine(Merge)
T(n) <= 2(T/2) + cn
Base: For n <= 2, T(n) <= c
-----------------------------------------------------------------------------------------------------------
T(n) = | cn = | cn = | cn ---->cn --- |
| | | | |
| T(n/2) T(n/2) | cn/2 cn/2 | cn/2 cn/2 ---->cn | |
| | | | |
| | T(n/4) T(n/4) T(n/4) T(n/4) | cn/4 cn/4 cn/4 cn/4 ---->cn | |
| | | . | log(n) |
| | | . ---->cn | |
| | | . | |
| | | T(2) ... T(2) ---->cn --- |
-----------------------------------------------------------------------------------------------------------
--->T(n) <= cn logn = O(nlogn)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// O(n)
void merge(char* str, int startidx, int middleidx, int endidx) {
int leftidx = startidx, rightidx = middleidx + 1;
int idx = 0;
char arr[endidx - startidx + 1];
while (leftidx <= middleidx || rightidx <= endidx) {
if (leftidx <= middleidx && rightidx <= endidx) {
if (str[leftidx] <= str[rightidx]) {
arr[idx++] = str[leftidx++];
} else {
arr[idx++] = str[rightidx++];
}
} else if (leftidx <= middleidx) {
arr[idx++] = str[leftidx++];
} else if (rightidx <= endidx) {
arr[idx++] = str[rightidx++];
}
}
for (int i = 0; i < endidx - startidx + 1; i++) {
str[i + startidx] = arr[i];
}
}
// T(n)
void merge_sort(char *str, int startidx, int endidx) {
// D(n)
if (startidx < endidx) {
int middleidx = (startidx + endidx) / 2;
// 2T(n/2)
merge_sort(str, startidx, middleidx);
merge_sort(str, middleidx + 1, endidx);
// O(n)
merge(str, startidx, middleidx, endidx);
}
}
int main() {
char *str = strdup("ThisIsTestCodeForMergeSortAlgorithm");
merge_sort(str, 0, strlen(str) - 1);
printf("%s\n", str);
free(str);
}
|
the_stack_data/887592.c
|
#include <stdio.h>
#include <stdlib.h>
void main()
{
printf ("Hello Word");
return 0;
}
|
the_stack_data/4070.c
|
/*
* Copyright 2008-2019, Marvell International Ltd.
* All Rights Reserved.
*
* Derived from:
* http://www.kernel.org/pub/linux/libs/klibc/
*/
/*
* atof.c
*
* The atof() function
*/
#include <stddef.h>
#include <stdint.h>
#include <ctype.h>
#include <inttypes.h>
#include <string.h>
static inline int digitval(int ch)
{
if (ch >= '0' && ch <= '9') {
return ch - '0';
} else if (ch >= 'A' && ch <= 'Z') {
return ch - 'A' + 10;
} else if (ch >= 'a' && ch <= 'z') {
return ch - 'a' + 10;
} else {
return -1;
}
}
double strntof(const char *nptr, char **endptr, int base, size_t n)
{
int minus = 0;
double v = 0.0, m = 0.0, divisor = 1.0;
int d;
while (n && isspace((unsigned char)*nptr)) {
nptr++;
n--;
}
/* Single optional + or - */
if (n) {
char c = *nptr;
if (c == '-' || c == '+') {
minus = (c == '-');
nptr++;
n--;
}
}
if (base == 0) {
if (n >= 2 && nptr[0] == '0' &&
(nptr[1] == 'x' || nptr[1] == 'X')) {
n -= 2;
nptr += 2;
base = 16;
} else if (n >= 1 && nptr[0] == '0') {
n--;
nptr++;
base = 8;
} else {
base = 10;
}
} else if (base == 16) {
if (n >= 2 && nptr[0] == '0' &&
(nptr[1] == 'x' || nptr[1] == 'X')) {
n -= 2;
nptr += 2;
}
}
while (n && (d = digitval(*nptr)) >= 0 && d < base) {
v = v * base + d;
n--;
nptr++;
}
if (*nptr == '.') {
n--;
nptr++;
while (n && (d = digitval(*nptr)) >= 0 && d < base) {
m = m * base + d;
n--;
nptr++;
divisor *= 10.0;
}
}
if (endptr)
*endptr = (char *)nptr;
v = v + (m / divisor);
return minus ? -v : v;
}
double atof(const char *nptr)
{
return strntof(nptr, NULL, 0, strlen(nptr));
}
|
the_stack_data/36666.c
|
/**
* file: main.c
*
* Zweck: Beinhaltet die Methoden und Funktionen um eine Wetter-Webabfrage zu starten und die Temperatur Werte in eine Datei zu loggen
*
* date: 2017-06-01
* progtimeest.: 120 min
* progtimereal: 120 min
* author: Michael Bieringer
* email: [email protected]
*
* Salzburg University of Applied Sciences
* Information Technology & Systems Management
* SWE2 2017 Uebung 5.1
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdbool.h>
#include <unistd.h>
#define MAX_CSV_LINE_LEN 1024
#define delimiter ";"
// Pruefung, ob eine Datei existiert return true, sonst return false
bool fileExists(char * fname)
{
if( access( fname, F_OK ) != -1 )
{
return true;
} else
{
return false;
}
}
// gibt das aktuelle Datum + Uhrzeit zurueck
char * getCurrentDateTime(void)
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char * output = malloc(sizeof(char) * 18);
if (NULL == output)
{
return NULL;
}
sprintf(output, "[%02d.%02d.%04d %02d:%02d:%02d]",timeinfo->tm_mday, timeinfo->tm_mon + 1, timeinfo->tm_year + 1900, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
return output;
}
/*
Wurde eine Webseite mit Wetter-Daten im CSV Format mittels wget auf das lokale Dateisystem heruntergeladen
liest diese Funktion die Datei ein, sucht nach einem Ort und gibt die Temperatur zurueck
Parameter:
filename: der Dateiname zu der Datei mit den Wetter-Daten
Ort: der Ort, nach dem in der Datei gesucht werden soll
Temp (Ref): Hier wird die Temperatur zurueck gegeben, wenn sie gefunden wurde
Rueckgabewert:
EXIT_FAILURE (stdlib) bei einem Fehler
EXIT_SUCCESS (stdlib) wenn Erfolgreich
*/
int DatenEinlesen(const char * filename, const char * Ort, double * Temp)
{
printf("Suche nach %s\n", Ort);
FILE *fp;
fp = fopen(filename, "r");
if (NULL == fp)
{
printf("Fehler: File konnte nicht geoeffnet werden!\n");
return EXIT_FAILURE;
}
char buffer[MAX_CSV_LINE_LEN];
int posTempC = 0;
char *ptr;
while(fgets(buffer, MAX_CSV_LINE_LEN, fp) != NULL)
{
if (0 == posTempC)
{
ptr = strtok(buffer, delimiter);
//Suche nach der Spalte mit dem Temperatur Wert
while(ptr != NULL)
{
posTempC++;
if (strstr(ptr, "T") != 0 && strstr(ptr, "C") != 0)
break;
// naechsten Abschnitt erstellen
ptr = strtok(NULL, delimiter);
}
}
if (strstr(buffer, Ort) != 0)
{
int pos = 0;
// initialisieren und ersten Abschnitt erstellen
ptr = strtok(buffer, delimiter);
while(ptr != NULL)
{
pos++;
if (posTempC == pos)
{
// Komma durch Punkt ersetzten atof kann nur mit Punkt umgehen
int posKomma;
for (posKomma=0;posKomma<strlen(ptr);posKomma++)
{
if (',' == ptr[posKomma])
ptr[posKomma] = '.';
}
*Temp = atof(ptr);
break;
}
// naechsten Abschnitt erstellen
ptr = strtok(NULL, delimiter);
}
}
}
fclose(fp);
return EXIT_SUCCESS;
}
/*
Schreibt das aktuelle Datum+Uhrzeit, den Ort und die Tempertur in eine Logdatei
Parameter:
- Logdatei, in die geschrieben werden soll
- Ort: Standort zu der Temperatur
- temp: Temperatur-Messwert
Rueckgabewert:
EXIT_FAILURE (stdlib) bei einem Fehler
EXIT_SUCCESS (stdlib) wenn Erfolgreich
*/
int schreibeLog(const char * pfad, const char * Ort, double temp)
{
FILE * fp = fopen(pfad, "a");
if (NULL == fp)
{
return EXIT_FAILURE;
}
char * currTime = getCurrentDateTime();
if (NULL == currTime)
{
fprintf(fp, "<ERROR>\t%s\t%lf\n", Ort, temp);
} else
{
fprintf(fp, "%s\t%s\t%lf\n", currTime, Ort, temp);
}
fclose(fp);
return EXIT_SUCCESS;
}
/*
Laedt eine Webseite auf in ein Verzeichnis herunter
Parameter:
- outFile: die Ausgabedatei
- URL: der Weblink zu der Webressource, welche heruntergeladen werden soll
*/
void downloadURL(char * outFile, char * URL)
{
char cmdLine[1024] = "wget --output-document=";
strcat(cmdLine, outFile);
strcat(cmdLine, " ");
strcat(cmdLine, URL);
system(cmdLine);
printf("%s\n", cmdLine );
}
int main()
{
// Werte ggf. anpassen!
char * tmpFileName = "./temperaturen.csv";
char * outLogFileName = "./tawes1h.log";
char * URL = "http://www.zamg.ac.at/ogd";
double temp;
char * ort = "Salzburg";
printf("DataLogger\n");
// Wetter-Daten im CSV Format herunterladen
downloadURL(tmpFileName, URL);
if (DatenEinlesen(tmpFileName, ort, &temp) < 0)
{
return EXIT_FAILURE;
}
if (schreibeLog(outLogFileName, ort, temp) < 0)
{
return EXIT_FAILURE;
}
//printf("Temperatur: %lf Grad Celsius\n", temp);
return EXIT_SUCCESS;
}
|
the_stack_data/119491.c
|
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } }
#define N 25
int main( ) {
int aa[N];
int a = 0;
int b = 0;
int c = 0;
int bb[N];
int cc[N];
while( a < N ) {
if( aa[ a ] >= 0 ) {
bb[ b ] = aa[ a ];
b = b + 1;
}
a = a + 1;
}
a = 0;
while( a < N ) {
if( aa[ a ] >= 0 ) {
cc[ c ] = aa[ a ];
c = c + 1;
}
a = a + 1;
}
int x;
for ( x = 0 ; x < b ; x++ ) {
__VERIFIER_assert( bb[ x ] >= 0 );
}
for ( x = 0 ; x < c ; x++ ) {
__VERIFIER_assert( cc[ x ] < 0 );
}
return 0;
}
|
the_stack_data/11120.c
|
/* Copyright (c) 2016 by Lain.js authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <stdio.h>
extern int lainjs_entry(int argc, char** argv);
int main(int argc, char** argv) {
// Start Lain.JS
return lainjs_entry(argc, argv);
}
|
the_stack_data/1187206.c
|
/*
@@@@ PROGRAM NAME: knkcch17e12.c
@@@@ FLAGS: -std=c99
@@@@ PROGRAM STATEMENT:
Write the following function:
struct node *find_last(struct node *list, int n);
The list parameter points to a linked list. The function should return a pointer
to the last node that contains n; it should return NULL if n doesn't appear in
the list. Assume that the node structure is the one defined in Section 17.5.
*/
#include <stdio.h>
//---------------------------------------------------------------------------
struct node
{
int value;
struct node *next;
};
//---------------------------------------------------------------------------
struct node *find_last(struct node *list, int n);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//------------------------START OF MAIN()--------------------------------------
int main(void)
{
printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
printf("File: %s, C Version: %d, Date: %s, Time: %s\n\n", __FILE__, __STDC_VERSION__, __DATE__, __TIME__);
printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
return 0;
}
//-------------------------END OF MAIN()---------------------------------------
struct node *find_last(struct node *list, int n)
{
struct node *last = NULL;
while(list)
{
if(list->value == n)
last = list;
list = list->next;
}
return last;
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
/*
OUTPUT:
@@@@ Trial1:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
File: knkcch17e12.c, C Version: 199901, Date: Mar 16 2021, Time: 21:46:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@@@ Trial2:
@@@@ Trial3:
@@@@ Trial4:
@@@@ Trial5:
@@@@ Trial6:
@@@@ Trial7:
@@@@ Trial8:
@@@@ Trial9:
*/
//---------------------------------------------------------------------------
|
the_stack_data/242331247.c
|
/* stbi-1.33 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c
when you control the images you're loading
no warranty implied; use at your own risk
QUICK NOTES:
Primarily of interest to game developers and other people who can
avoid problematic images and only need the trivial interface
JPEG baseline (no JPEG progressive)
PNG 8-bit only
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
PSD (composited view only, no extra channels)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
- decode from memory or through FILE (define STBI_NO_STDIO to remove code)
- decode from arbitrary I/O callbacks
- overridable dequantizing-IDCT, YCbCr-to-RGB conversion (define STBI_SIMD)
Latest revisions:
1.33 (2011-07-14) minor fixes suggested by Dave Moore
1.32 (2011-07-13) info support for all filetypes (SpartanJ)
1.31 (2011-06-19) a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11) added ability to load files via io callbacks (Ben Wenger)
1.29 (2010-08-16) various warning fixes from Aurelien Pocheville
1.28 (2010-08-01) fix bug in GIF palette transparency (SpartanJ)
1.27 (2010-08-01) cast-to-uint8 to fix warnings (Laurent Gomila)
allow trailing 0s at end of image data (Laurent Gomila)
1.26 (2010-07-24) fix bug in file buffering for PNG reported by SpartanJ
See end of file for full revision history.
TODO:
stbi_info support for BMP,PSD,HDR,PIC
============================ Contributors =========================
Image formats Optimizations & bugfixes
Sean Barrett (jpeg, png, bmp) Fabian "ryg" Giesen
Nicolas Schulz (hdr, psd)
Jonathan Dummer (tga) Bug fixes & warning fixes
Jean-Marc Lienher (gif) Marc LeBlanc
Tom Seddon (pic) Christpher Lloyd
Thatcher Ulrich (psd) Dave Moore
Won Chun
the Horde3D community
Extensions, features Janez Zemva
Jetro Lauha (stbi_info) Jonathan Blow
James "moose2000" Brown (iPhone PNG) Laurent Gomila
Ben "Disch" Wenger (io callbacks) Aruelien Pocheville
Martin "SpartanJ" Golini Ryamond Barbiero
David Woo
If your name should be here but isn't, let Sean know.
*/
#ifndef STBI_INCLUDE_STB_IMAGE_H
#define STBI_INCLUDE_STB_IMAGE_H
// To get a header file for this, either cut and paste the header,
// or create stb_image.h, #define STBI_HEADER_FILE_ONLY, and
// then include stb_image.c from it.
//// begin header file ////////////////////////////////////////////////////
//
// Limitations:
// - no jpeg progressive support
// - non-HDR formats support 8-bit samples only (jpeg, png)
// - no delayed line count (jpeg) -- IJG doesn't support either
// - no 1-bit BMP
// - GIF always returns *comp=4
//
// Basic usage (see HDR discussion below):
// int x,y,n;
// unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
// // ... process data if not NULL ...
// // ... x = width, y = height, n = # 8-bit components per pixel ...
// // ... replace '0' with '1'..'4' to force that many components per pixel
// // ... but 'n' will always be the number that it would have been if you said 0
// stbi_image_free(data)
//
// Standard parameters:
// int *x -- outputs image width in pixels
// int *y -- outputs image height in pixels
// int *comp -- outputs # of image components in image file
// int req_comp -- if non-zero, # of image components requested in result
//
// The return value from an image loader is an 'unsigned char *' which points
// to the pixel data. The pixel data consists of *y scanlines of *x pixels,
// with each pixel consisting of N interleaved 8-bit components; the first
// pixel pointed to is top-left-most in the image. There is no padding between
// image scanlines or between pixels, regardless of format. The number of
// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
// If req_comp is non-zero, *comp has the number of components that _would_
// have been output otherwise. E.g. if you set req_comp to 4, you will always
// get RGBA output, but you can check *comp to easily see if it's opaque.
//
// An output image with N components has the following components interleaved
// in this order in each pixel:
//
// N=#comp components
// 1 grey
// 2 grey, alpha
// 3 red, green, blue
// 4 red, green, blue, alpha
//
// If image loading fails for any reason, the return value will be NULL,
// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
// can be queried for an extremely brief, end-user unfriendly explanation
// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
// more user-friendly ones.
//
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
//
// ===========================================================================
//
// iPhone PNG support:
//
// By default we convert iphone-formatted PNGs back to RGB; nominally they
// would silently load as BGR, except the existing code should have just
// failed on such iPhone PNGs. But you can disable this conversion by
// by calling stbi_convert_iphone_png_to_rgb(0), in which case
// you will always just get the native iphone "format" through.
//
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
// pixel to remove any premultiplied alpha *only* if the image file explicitly
// says there's premultiplied data (currently only happens in iPhone images,
// and only if iPhone convert-to-rgb processing is on).
//
// ===========================================================================
//
// HDR image support (disable by defining STBI_NO_HDR)
//
// stb_image now supports loading HDR images in general, and currently
// the Radiance .HDR file format, although the support is provided
// generically. You can still load any file through the existing interface;
// if you attempt to load an HDR file, it will be automatically remapped to
// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
// both of these constants can be reconfigured through this interface:
//
// stbi_hdr_to_ldr_gamma(2.2f);
// stbi_hdr_to_ldr_scale(1.0f);
//
// (note, do not use _inverse_ constants; stbi_image will invert them
// appropriately).
//
// Additionally, there is a new, parallel interface for loading files as
// (linear) floats to preserve the full dynamic range:
//
// float *data = stbi_loadf(filename, &x, &y, &n, 0);
//
// If you load LDR images through this interface, those images will
// be promoted to floating point values, run through the inverse of
// constants corresponding to the above:
//
// stbi_ldr_to_hdr_scale(1.0f);
// stbi_ldr_to_hdr_gamma(2.2f);
//
// Finally, given a filename (or an open file or memory block--see header
// file for details) containing image data, you can query for the "most
// appropriate" interface to use (that is, whether the image is HDR or
// not), using:
//
// stbi_is_hdr(char *filename);
//
// ===========================================================================
//
// I/O callbacks
//
// I/O callbacks allow you to read from arbitrary sources, like packaged
// files or some other source. Data read from callbacks are processed
// through a small internal buffer (currently 128 bytes) to try to reduce
// overhead.
//
// The three functions you must define are "read" (reads some bytes of data),
// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end).
#ifndef STBI_NO_STDIO
#if defined(_MSC_VER) && _MSC_VER >= 0x1400
#define _CRT_SECURE_NO_WARNINGS // suppress bogus warnings about fopen()
#endif
#include <stdio.h>
#endif
#define STBI_VERSION 1
enum
{
STBI_default = 0, // only used for req_comp
STBI_grey = 1,
STBI_grey_alpha = 2,
STBI_rgb = 3,
STBI_rgb_alpha = 4
};
typedef unsigned char stbi_uc;
#ifdef __cplusplus
extern "C" {
#endif
//////////////////////////////////////////////////////////////////////////////
//
// PRIMARY API - works on images of any type
//
//
// load image by filename, open file, or memory buffer
//
extern stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_STDIO
extern stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp);
extern stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
// for stbi_load_from_file, file pointer is left pointing immediately after image
#endif
typedef struct
{
int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read
void (*skip) (void *user,unsigned n); // skip the next 'n' bytes
int (*eof) (void *user); // returns nonzero if we are at end of file/data
} stbi_io_callbacks;
extern stbi_uc *stbi_load_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_HDR
extern float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
#ifndef STBI_NO_STDIO
extern float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp);
extern float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp);
#endif
extern float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp);
extern void stbi_hdr_to_ldr_gamma(float gamma);
extern void stbi_hdr_to_ldr_scale(float scale);
extern void stbi_ldr_to_hdr_gamma(float gamma);
extern void stbi_ldr_to_hdr_scale(float scale);
#endif // STBI_NO_HDR
// stbi_is_hdr is always defined
extern int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
extern int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len);
#ifndef STBI_NO_STDIO
extern int stbi_is_hdr (char const *filename);
extern int stbi_is_hdr_from_file(FILE *f);
#endif // STBI_NO_STDIO
// get a VERY brief reason for failure
// NOT THREADSAFE
extern const char *stbi_failure_reason (void);
// free the loaded image -- this is just free()
extern void stbi_image_free (void *retval_from_stbi_load);
// get image dimensions & components without fully decoding
extern int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp);
extern int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp);
#ifndef STBI_NO_STDIO
extern int stbi_info (char const *filename, int *x, int *y, int *comp);
extern int stbi_info_from_file (FILE *f, int *x, int *y, int *comp);
#endif
// for image formats that explicitly notate that they have premultiplied alpha,
// we just return the colors as stored in the file. set this flag to force
// unpremultiplication. results are undefined if the unpremultiply overflow.
extern void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply);
// indicate whether we should process iphone images back to canonical format,
// or just pass them through "as-is"
extern void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert);
// ZLIB client - used by PNG, available for other purposes
extern char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen);
extern char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen);
extern int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
extern char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen);
extern int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen);
// define faster low-level operations (typically SIMD support)
#ifdef STBI_SIMD
typedef void (*stbi_idct_8x8)(stbi_uc *out, int out_stride, short data[64], unsigned short *dequantize);
// compute an integer IDCT on "input"
// input[x] = data[x] * dequantize[x]
// write results to 'out': 64 samples, each run of 8 spaced by 'out_stride'
// CLAMP results to 0..255
typedef void (*stbi_YCbCr_to_RGB_run)(stbi_uc *output, stbi_uc const *y, stbi_uc const *cb, stbi_uc const *cr, int count, int step);
// compute a conversion from YCbCr to RGB
// 'count' pixels
// write pixels to 'output'; each pixel is 'step' bytes (either 3 or 4; if 4, write '255' as 4th), order R,G,B
// y: Y input channel
// cb: Cb input channel; scale/biased to be 0..255
// cr: Cr input channel; scale/biased to be 0..255
extern void stbi_install_idct(stbi_idct_8x8 func);
extern void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func);
#endif // STBI_SIMD
#ifdef __cplusplus
}
#endif
//
//
//// end header file /////////////////////////////////////////////////////
#endif // STBI_INCLUDE_STB_IMAGE_H
#ifndef STBI_HEADER_FILE_ONLY
#ifndef STBI_NO_HDR
#include <math.h> // ldexp
#include <string.h> // strcmp, strtok
#endif
#ifndef STBI_NO_STDIO
#include <stdio.h>
#endif
#include <stdlib.h>
#include <memory.h>
#include <assert.h>
#include <stdarg.h>
#ifndef _MSC_VER
#ifdef __cplusplus
#define stbi_inline inline
#else
#define stbi_inline
#endif
#else
#define stbi_inline __forceinline
#endif
// implementation:
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef signed short int16;
typedef unsigned int uint32;
typedef signed int int32;
typedef unsigned int uint;
// should produce compiler error if size is wrong
typedef unsigned char validate_uint32[sizeof(uint32)==4 ? 1 : -1];
#if defined(STBI_NO_STDIO) && !defined(STBI_NO_WRITE)
#define STBI_NO_WRITE
#endif
#define STBI_NOTUSED(v) (void)sizeof(v)
#ifdef _MSC_VER
#define STBI_HAS_LROTL
#endif
#ifdef STBI_HAS_LROTL
#define stbi_lrot(x,y) _lrotl(x,y)
#else
#define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y))))
#endif
///////////////////////////////////////////////
//
// stbi struct and start_xxx functions
// stbi structure is our basic context used by all images, so it
// contains all the IO context, plus some basic image information
typedef struct
{
uint32 img_x, img_y;
int img_n, img_out_n;
stbi_io_callbacks io;
void *io_user_data;
int read_from_callbacks;
int buflen;
uint8 buffer_start[128];
uint8 *img_buffer, *img_buffer_end;
uint8 *img_buffer_original;
} stbi;
static void refill_buffer(stbi *s);
// initialize a memory-decode context
static void start_mem(stbi *s, uint8 const *buffer, int len)
{
s->io.read = NULL;
s->read_from_callbacks = 0;
s->img_buffer = s->img_buffer_original = (uint8 *) buffer;
s->img_buffer_end = (uint8 *) buffer+len;
}
// initialize a callback-based context
static void start_callbacks(stbi *s, stbi_io_callbacks *c, void *user)
{
s->io = *c;
s->io_user_data = user;
s->buflen = sizeof(s->buffer_start);
s->read_from_callbacks = 1;
s->img_buffer_original = s->buffer_start;
refill_buffer(s);
}
#ifndef STBI_NO_STDIO
static int stdio_read(void *user, char *data, int size)
{
return (int) fread(data,1,size,(FILE*) user);
}
static void stdio_skip(void *user, unsigned n)
{
fseek((FILE*) user, n, SEEK_CUR);
}
static int stdio_eof(void *user)
{
return feof((FILE*) user);
}
static stbi_io_callbacks stbi_stdio_callbacks =
{
stdio_read,
stdio_skip,
stdio_eof,
};
static void start_file(stbi *s, FILE *f)
{
start_callbacks(s, &stbi_stdio_callbacks, (void *) f);
}
//static void stop_file(stbi *s) { }
#endif // !STBI_NO_STDIO
static void stbi_rewind(stbi *s)
{
// conceptually rewind SHOULD rewind to the beginning of the stream,
// but we just rewind to the beginning of the initial buffer, because
// we only use it after doing 'test', which only ever looks at at most 92 bytes
s->img_buffer = s->img_buffer_original;
}
static int stbi_jpeg_test(stbi *s);
static stbi_uc *stbi_jpeg_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_jpeg_info(stbi *s, int *x, int *y, int *comp);
static int stbi_png_test(stbi *s);
static stbi_uc *stbi_png_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_png_info(stbi *s, int *x, int *y, int *comp);
static int stbi_bmp_test(stbi *s);
static stbi_uc *stbi_bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_tga_test(stbi *s);
static stbi_uc *stbi_tga_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_tga_info(stbi *s, int *x, int *y, int *comp);
static int stbi_psd_test(stbi *s);
static stbi_uc *stbi_psd_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_hdr_test(stbi *s);
static float *stbi_hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_pic_test(stbi *s);
static stbi_uc *stbi_pic_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_gif_test(stbi *s);
static stbi_uc *stbi_gif_load(stbi *s, int *x, int *y, int *comp, int req_comp);
static int stbi_gif_info(stbi *s, int *x, int *y, int *comp);
// this is not threadsafe
static const char *failure_reason;
const char *stbi_failure_reason(void)
{
return failure_reason;
}
static int e(const char *str)
{
failure_reason = str;
return 0;
}
// e - error
// epf - error returning pointer to float
// epuc - error returning pointer to unsigned char
#ifdef STBI_NO_FAILURE_STRINGS
#define e(x,y) 0
#elif defined(STBI_FAILURE_USERMSG)
#define e(x,y) e(y)
#else
#define e(x,y) e(x)
#endif
#define epf(x,y) ((float *) (e(x,y)?NULL:NULL))
#define epuc(x,y) ((unsigned char *) (e(x,y)?NULL:NULL))
void stbi_image_free(void *retval_from_stbi_load)
{
free(retval_from_stbi_load);
}
#ifndef STBI_NO_HDR
static float *ldr_to_hdr(stbi_uc *data, int x, int y, int comp);
static stbi_uc *hdr_to_ldr(float *data, int x, int y, int comp);
#endif
static unsigned char *stbi_load_main(stbi *s, int *x, int *y, int *comp, int req_comp)
{
if (stbi_jpeg_test(s)) return stbi_jpeg_load(s,x,y,comp,req_comp);
if (stbi_png_test(s)) return stbi_png_load(s,x,y,comp,req_comp);
if (stbi_bmp_test(s)) return stbi_bmp_load(s,x,y,comp,req_comp);
if (stbi_gif_test(s)) return stbi_gif_load(s,x,y,comp,req_comp);
if (stbi_psd_test(s)) return stbi_psd_load(s,x,y,comp,req_comp);
if (stbi_pic_test(s)) return stbi_pic_load(s,x,y,comp,req_comp);
#ifndef STBI_NO_HDR
if (stbi_hdr_test(s)) {
float *hdr = stbi_hdr_load(s, x,y,comp,req_comp);
return hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
}
#endif
// test tga last because it's a crappy test!
if (stbi_tga_test(s))
return stbi_tga_load(s,x,y,comp,req_comp);
return epuc("unknown image type", "Image not of any known type, or corrupt");
}
#ifndef STBI_NO_STDIO
unsigned char *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = fopen(filename, "rb");
unsigned char *result;
if (!f) return epuc("can't fopen", "Unable to open file");
result = stbi_load_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
}
unsigned char *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_file(&s,f);
return stbi_load_main(&s,x,y,comp,req_comp);
}
#endif //!STBI_NO_STDIO
unsigned char *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_load_main(&s,x,y,comp,req_comp);
}
unsigned char *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_load_main(&s,x,y,comp,req_comp);
}
#ifndef STBI_NO_HDR
float *stbi_loadf_main(stbi *s, int *x, int *y, int *comp, int req_comp)
{
unsigned char *data;
#ifndef STBI_NO_HDR
if (stbi_hdr_test(s))
return stbi_hdr_load(s,x,y,comp,req_comp);
#endif
data = stbi_load_main(s, x, y, comp, req_comp);
if (data)
return ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
return epf("unknown image type", "Image not of any known type, or corrupt");
}
float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
#ifndef STBI_NO_STDIO
float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = fopen(filename, "rb");
float *result;
if (!f) return epf("can't fopen", "Unable to open file");
result = stbi_loadf_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
}
float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp)
{
stbi s;
start_file(&s,f);
return stbi_loadf_main(&s,x,y,comp,req_comp);
}
#endif // !STBI_NO_STDIO
#endif // !STBI_NO_HDR
// these is-hdr-or-not is defined independent of whether STBI_NO_HDR is
// defined, for API simplicity; if STBI_NO_HDR is defined, it always
// reports false!
int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len)
{
#ifndef STBI_NO_HDR
stbi s;
start_mem(&s,buffer,len);
return stbi_hdr_test(&s);
#else
STBI_NOTUSED(buffer);
STBI_NOTUSED(len);
return 0;
#endif
}
#ifndef STBI_NO_STDIO
extern int stbi_is_hdr (char const *filename)
{
FILE *f = fopen(filename, "rb");
int result=0;
if (f) {
result = stbi_is_hdr_from_file(f);
fclose(f);
}
return result;
}
extern int stbi_is_hdr_from_file(FILE *f)
{
#ifndef STBI_NO_HDR
stbi s;
start_file(&s,f);
return stbi_hdr_test(&s);
#else
return 0;
#endif
}
#endif // !STBI_NO_STDIO
extern int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)
{
#ifndef STBI_NO_HDR
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi_hdr_test(&s);
#else
return 0;
#endif
}
#ifndef STBI_NO_HDR
static float h2l_gamma_i=1.0f/2.2f, h2l_scale_i=1.0f;
static float l2h_gamma=2.2f, l2h_scale=1.0f;
void stbi_hdr_to_ldr_gamma(float gamma) { h2l_gamma_i = 1/gamma; }
void stbi_hdr_to_ldr_scale(float scale) { h2l_scale_i = 1/scale; }
void stbi_ldr_to_hdr_gamma(float gamma) { l2h_gamma = gamma; }
void stbi_ldr_to_hdr_scale(float scale) { l2h_scale = scale; }
#endif
//////////////////////////////////////////////////////////////////////////////
//
// Common code used by all image loaders
//
enum
{
SCAN_load=0,
SCAN_type,
SCAN_header
};
static void refill_buffer(stbi *s)
{
int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen);
if (n == 0) {
// at end of file, treat same as if from memory
s->read_from_callbacks = 0;
s->img_buffer = s->img_buffer_end-1;
*s->img_buffer = 0;
} else {
s->img_buffer = s->buffer_start;
s->img_buffer_end = s->buffer_start + n;
}
}
stbi_inline static int get8(stbi *s)
{
if (s->img_buffer < s->img_buffer_end)
return *s->img_buffer++;
if (s->read_from_callbacks) {
refill_buffer(s);
return *s->img_buffer++;
}
return 0;
}
stbi_inline static int at_eof(stbi *s)
{
if (s->io.read) {
if (!(s->io.eof)(s->io_user_data)) return 0;
// if feof() is true, check if buffer = end
// special case: we've only got the special 0 character at the end
if (s->read_from_callbacks == 0) return 1;
}
return s->img_buffer >= s->img_buffer_end;
}
stbi_inline static uint8 get8u(stbi *s)
{
return (uint8) get8(s);
}
static void skip(stbi *s, int n)
{
if (s->io.read) {
int blen = s->img_buffer_end - s->img_buffer;
if (blen < n) {
s->img_buffer = s->img_buffer_end;
(s->io.skip)(s->io_user_data, n - blen);
return;
}
}
s->img_buffer += n;
}
static int getn(stbi *s, stbi_uc *buffer, int n)
{
if (s->io.read) {
int blen = s->img_buffer_end - s->img_buffer;
if (blen < n) {
int res, count;
memcpy(buffer, s->img_buffer, blen);
count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
res = (count == (n-blen));
s->img_buffer = s->img_buffer_end;
return res;
}
}
if (s->img_buffer+n <= s->img_buffer_end) {
memcpy(buffer, s->img_buffer, n);
s->img_buffer += n;
return 1;
} else
return 0;
}
static int get16(stbi *s)
{
int z = get8(s);
return (z << 8) + get8(s);
}
static uint32 get32(stbi *s)
{
uint32 z = get16(s);
return (z << 16) + get16(s);
}
static int get16le(stbi *s)
{
int z = get8(s);
return z + (get8(s) << 8);
}
static uint32 get32le(stbi *s)
{
uint32 z = get16le(s);
return z + (get16le(s) << 16);
}
//////////////////////////////////////////////////////////////////////////////
//
// generic converter from built-in img_n to req_comp
// individual types do this automatically as much as possible (e.g. jpeg
// does all cases internally since it needs to colorspace convert anyway,
// and it never has alpha, so very few cases ). png can automatically
// interleave an alpha=255 channel, but falls back to this for other cases
//
// assume data buffer is malloced, so malloc a new one and free that one
// only failure mode is malloc failing
static uint8 compute_y(int r, int g, int b)
{
return (uint8) (((r*77) + (g*150) + (29*b)) >> 8);
}
static unsigned char *convert_format(unsigned char *data, int img_n, int req_comp, uint x, uint y)
{
int i,j;
unsigned char *good;
if (req_comp == img_n) return data;
assert(req_comp >= 1 && req_comp <= 4);
good = (unsigned char *) malloc(req_comp * x * y);
if (good == NULL) {
free(data);
return epuc("outofmem", "Out of memory");
}
for (j=0; j < (int) y; ++j) {
unsigned char *src = data + j * x * img_n ;
unsigned char *dest = good + j * x * req_comp;
#define COMBO(a,b) ((a)*8+(b))
#define CASE(a,b) case COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
// convert source image with img_n components to one with req_comp components;
// avoid switch per pixel, so use switch per scanline and massive macros
switch (COMBO(img_n, req_comp)) {
CASE(1,2) dest[0]=src[0], dest[1]=255; break;
CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break;
CASE(2,1) dest[0]=src[0]; break;
CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;
CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break;
CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break;
CASE(3,1) dest[0]=compute_y(src[0],src[1],src[2]); break;
CASE(3,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = 255; break;
CASE(4,1) dest[0]=compute_y(src[0],src[1],src[2]); break;
CASE(4,2) dest[0]=compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break;
CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break;
default: assert(0);
}
#undef CASE
}
free(data);
return good;
}
#ifndef STBI_NO_HDR
static float *ldr_to_hdr(stbi_uc *data, int x, int y, int comp)
{
int i,k,n;
float *output = (float *) malloc(x * y * comp * sizeof(float));
if (output == NULL) { free(data); return epf("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
output[i*comp + k] = (float) pow(data[i*comp+k]/255.0f, l2h_gamma) * l2h_scale;
}
if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f;
}
free(data);
return output;
}
#define float2int(x) ((int) (x))
static stbi_uc *hdr_to_ldr(float *data, int x, int y, int comp)
{
int i,k,n;
stbi_uc *output = (stbi_uc *) malloc(x * y * comp);
if (output == NULL) { free(data); return epuc("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
float z = (float) pow(data[i*comp+k]*h2l_scale_i, h2l_gamma_i) * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (uint8) float2int(z);
}
if (k < comp) {
float z = data[i*comp+k] * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (uint8) float2int(z);
}
}
free(data);
return output;
}
#endif
//////////////////////////////////////////////////////////////////////////////
//
// "baseline" JPEG/JFIF decoder (not actually fully baseline implementation)
//
// simple implementation
// - channel subsampling of at most 2 in each dimension
// - doesn't support delayed output of y-dimension
// - simple interface (only one output format: 8-bit interleaved RGB)
// - doesn't try to recover corrupt jpegs
// - doesn't allow partial loading, loading multiple at once
// - still fast on x86 (copying globals into locals doesn't help x86)
// - allocates lots of intermediate memory (full size of all components)
// - non-interleaved case requires this anyway
// - allows good upsampling (see next)
// high-quality
// - upsampled channels are bilinearly interpolated, even across blocks
// - quality integer IDCT derived from IJG's 'slow'
// performance
// - fast huffman; reasonable integer IDCT
// - uses a lot of intermediate memory, could cache poorly
// - load http://nothings.org/remote/anemones.jpg 3 times on 2.8Ghz P4
// stb_jpeg: 1.34 seconds (MSVC6, default release build)
// stb_jpeg: 1.06 seconds (MSVC6, processor = Pentium Pro)
// IJL11.dll: 1.08 seconds (compiled by intel)
// IJG 1998: 0.98 seconds (MSVC6, makefile provided by IJG)
// IJG 1998: 0.95 seconds (MSVC6, makefile + proc=PPro)
// huffman decoding acceleration
#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache
typedef struct
{
uint8 fast[1 << FAST_BITS];
// weirdly, repacking this into AoS is a 10% speed loss, instead of a win
uint16 code[256];
uint8 values[256];
uint8 size[257];
unsigned int maxcode[18];
int delta[17]; // old 'firstsymbol' - old 'firstcode'
} huffman;
typedef struct
{
#ifdef STBI_SIMD
unsigned short dequant2[4][64];
#endif
stbi *s;
huffman huff_dc[4];
huffman huff_ac[4];
uint8 dequant[4][64];
// sizes for components, interleaved MCUs
int img_h_max, img_v_max;
int img_mcu_x, img_mcu_y;
int img_mcu_w, img_mcu_h;
// definition of jpeg image component
struct
{
int id;
int h,v;
int tq;
int hd,ha;
int dc_pred;
int x,y,w2,h2;
uint8 *data;
void *raw_data;
uint8 *linebuf;
} img_comp[4];
uint32 code_buffer; // jpeg entropy-coded buffer
int code_bits; // number of valid bits
unsigned char marker; // marker seen while filling entropy buffer
int nomore; // flag if we saw a marker so must stop
int scan_n, order[4];
int restart_interval, todo;
} jpeg;
static int build_huffman(huffman *h, int *count)
{
int i,j,k=0,code;
// build size list for each symbol (from JPEG spec)
for (i=0; i < 16; ++i)
for (j=0; j < count[i]; ++j)
h->size[k++] = (uint8) (i+1);
h->size[k] = 0;
// compute actual symbols (from jpeg spec)
code = 0;
k = 0;
for(j=1; j <= 16; ++j) {
// compute delta to add to code to compute symbol id
h->delta[j] = k - code;
if (h->size[k] == j) {
while (h->size[k] == j)
h->code[k++] = (uint16) (code++);
if (code-1 >= (1 << j)) return e("bad code lengths","Corrupt JPEG");
}
// compute largest code + 1 for this size, preshifted as needed later
h->maxcode[j] = code << (16-j);
code <<= 1;
}
h->maxcode[j] = 0xffffffff;
// build non-spec acceleration table; 255 is flag for not-accelerated
memset(h->fast, 255, 1 << FAST_BITS);
for (i=0; i < k; ++i) {
int s = h->size[i];
if (s <= FAST_BITS) {
int c = h->code[i] << (FAST_BITS-s);
int m = 1 << (FAST_BITS-s);
for (j=0; j < m; ++j) {
h->fast[c+j] = (uint8) i;
}
}
}
return 1;
}
static void grow_buffer_unsafe(jpeg *j)
{
do {
int b = j->nomore ? 0 : get8(j->s);
if (b == 0xff) {
int c = get8(j->s);
if (c != 0) {
j->marker = (unsigned char) c;
j->nomore = 1;
return;
}
}
j->code_buffer |= b << (24 - j->code_bits);
j->code_bits += 8;
} while (j->code_bits <= 24);
}
// (1 << n) - 1
static uint32 bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535};
// decode a jpeg huffman value from the bitstream
stbi_inline static int decode(jpeg *j, huffman *h)
{
unsigned int temp;
int c,k;
if (j->code_bits < 16) grow_buffer_unsafe(j);
// look at the top FAST_BITS and determine what symbol ID it is,
// if the code is <= FAST_BITS
c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
k = h->fast[c];
if (k < 255) {
int s = h->size[k];
if (s > j->code_bits)
return -1;
j->code_buffer <<= s;
j->code_bits -= s;
return h->values[k];
}
// naive test is to shift the code_buffer down so k bits are
// valid, then test against maxcode. To speed this up, we've
// preshifted maxcode left so that it has (16-k) 0s at the
// end; in other words, regardless of the number of bits, it
// wants to be compared against something shifted to have 16;
// that way we don't need to shift inside the loop.
temp = j->code_buffer >> 16;
for (k=FAST_BITS+1 ; ; ++k)
if (temp < h->maxcode[k])
break;
if (k == 17) {
// error! code not found
j->code_bits -= 16;
return -1;
}
if (k > j->code_bits)
return -1;
// convert the huffman code to the symbol id
c = ((j->code_buffer >> (32 - k)) & bmask[k]) + h->delta[k];
assert((((j->code_buffer) >> (32 - h->size[c])) & bmask[h->size[c]]) == h->code[c]);
// convert the id to a symbol
j->code_bits -= k;
j->code_buffer <<= k;
return h->values[c];
}
// combined JPEG 'receive' and JPEG 'extend', since baseline
// always extends everything it receives.
stbi_inline static int extend_receive(jpeg *j, int n)
{
unsigned int m = 1 << (n-1);
unsigned int k;
if (j->code_bits < n) grow_buffer_unsafe(j);
#if 1
k = stbi_lrot(j->code_buffer, n);
j->code_buffer = k & ~bmask[n];
k &= bmask[n];
j->code_bits -= n;
#else
k = (j->code_buffer >> (32 - n)) & bmask[n];
j->code_bits -= n;
j->code_buffer <<= n;
#endif
// the following test is probably a random branch that won't
// predict well. I tried to table accelerate it but failed.
// maybe it's compiling as a conditional move?
if (k < m)
return (-1 << n) + k + 1;
else
return k;
}
// given a value that's at position X in the zigzag stream,
// where does it appear in the 8x8 matrix coded as row-major?
static uint8 dezigzag[64+15] =
{
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63,
// let corrupt input sample past end
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63
};
// decode one 64-entry block--
static int decode_block(jpeg *j, short data[64], huffman *hdc, huffman *hac, int b)
{
int diff,dc,k;
int t = decode(j, hdc);
if (t < 0) return e("bad huffman code","Corrupt JPEG");
// 0 all the ac values now so we can do it 32-bits at a time
memset(data,0,64*sizeof(data[0]));
diff = t ? extend_receive(j, t) : 0;
dc = j->img_comp[b].dc_pred + diff;
j->img_comp[b].dc_pred = dc;
data[0] = (short) dc;
// decode AC components, see JPEG spec
k = 1;
do {
int r,s;
int rs = decode(j, hac);
if (rs < 0) return e("bad huffman code","Corrupt JPEG");
s = rs & 15;
r = rs >> 4;
if (s == 0) {
if (rs != 0xf0) break; // end block
k += 16;
} else {
k += r;
// decode into unzigzag'd location
data[dezigzag[k++]] = (short) extend_receive(j,s);
}
} while (k < 64);
return 1;
}
// take a -128..127 value and clamp it and convert to 0..255
stbi_inline static uint8 clamp(int x)
{
// trick to use a single test to catch both cases
if ((unsigned int) x > 255) {
if (x < 0) return 0;
if (x > 255) return 255;
}
return (uint8) x;
}
#define f2f(x) (int) (((x) * 4096 + 0.5))
#define fsh(x) ((x) << 12)
// derived from jidctint -- DCT_ISLOW
#define IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \
int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \
p2 = s2; \
p3 = s6; \
p1 = (p2+p3) * f2f(0.5411961f); \
t2 = p1 + p3*f2f(-1.847759065f); \
t3 = p1 + p2*f2f( 0.765366865f); \
p2 = s0; \
p3 = s4; \
t0 = fsh(p2+p3); \
t1 = fsh(p2-p3); \
x0 = t0+t3; \
x3 = t0-t3; \
x1 = t1+t2; \
x2 = t1-t2; \
t0 = s7; \
t1 = s5; \
t2 = s3; \
t3 = s1; \
p3 = t0+t2; \
p4 = t1+t3; \
p1 = t0+t3; \
p2 = t1+t2; \
p5 = (p3+p4)*f2f( 1.175875602f); \
t0 = t0*f2f( 0.298631336f); \
t1 = t1*f2f( 2.053119869f); \
t2 = t2*f2f( 3.072711026f); \
t3 = t3*f2f( 1.501321110f); \
p1 = p5 + p1*f2f(-0.899976223f); \
p2 = p5 + p2*f2f(-2.562915447f); \
p3 = p3*f2f(-1.961570560f); \
p4 = p4*f2f(-0.390180644f); \
t3 += p1+p4; \
t2 += p2+p3; \
t1 += p2+p4; \
t0 += p1+p3;
#ifdef STBI_SIMD
typedef unsigned short stbi_dequantize_t;
#else
typedef uint8 stbi_dequantize_t;
#endif
// .344 seconds on 3*anemones.jpg
static void idct_block(uint8 *out, int out_stride, short data[64], stbi_dequantize_t *dequantize)
{
int i,val[64],*v=val;
stbi_dequantize_t *dq = dequantize;
uint8 *o;
short *d = data;
// columns
for (i=0; i < 8; ++i,++d,++dq, ++v) {
// if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing
if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0
&& d[40]==0 && d[48]==0 && d[56]==0) {
// no shortcut 0 seconds
// (1|2|3|4|5|6|7)==0 0 seconds
// all separate -0.047 seconds
// 1 && 2|3 && 4|5 && 6|7: -0.047 seconds
int dcterm = d[0] * dq[0] << 2;
v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm;
} else {
IDCT_1D(d[ 0]*dq[ 0],d[ 8]*dq[ 8],d[16]*dq[16],d[24]*dq[24],
d[32]*dq[32],d[40]*dq[40],d[48]*dq[48],d[56]*dq[56])
// constants scaled things up by 1<<12; let's bring them back
// down, but keep 2 extra bits of precision
x0 += 512; x1 += 512; x2 += 512; x3 += 512;
v[ 0] = (x0+t3) >> 10;
v[56] = (x0-t3) >> 10;
v[ 8] = (x1+t2) >> 10;
v[48] = (x1-t2) >> 10;
v[16] = (x2+t1) >> 10;
v[40] = (x2-t1) >> 10;
v[24] = (x3+t0) >> 10;
v[32] = (x3-t0) >> 10;
}
}
for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) {
// no fast case since the first 1D IDCT spread components out
IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7])
// constants scaled things up by 1<<12, plus we had 1<<2 from first
// loop, plus horizontal and vertical each scale by sqrt(8) so together
// we've got an extra 1<<3, so 1<<17 total we need to remove.
// so we want to round that, which means adding 0.5 * 1<<17,
// aka 65536. Also, we'll end up with -128 to 127 that we want
// to encode as 0..255 by adding 128, so we'll add that before the shift
x0 += 65536 + (128<<17);
x1 += 65536 + (128<<17);
x2 += 65536 + (128<<17);
x3 += 65536 + (128<<17);
// tried computing the shifts into temps, or'ing the temps to see
// if any were out of range, but that was slower
o[0] = clamp((x0+t3) >> 17);
o[7] = clamp((x0-t3) >> 17);
o[1] = clamp((x1+t2) >> 17);
o[6] = clamp((x1-t2) >> 17);
o[2] = clamp((x2+t1) >> 17);
o[5] = clamp((x2-t1) >> 17);
o[3] = clamp((x3+t0) >> 17);
o[4] = clamp((x3-t0) >> 17);
}
}
#ifdef STBI_SIMD
static stbi_idct_8x8 stbi_idct_installed = idct_block;
void stbi_install_idct(stbi_idct_8x8 func)
{
stbi_idct_installed = func;
}
#endif
#define MARKER_none 0xff
// if there's a pending marker from the entropy stream, return that
// otherwise, fetch from the stream and get a marker. if there's no
// marker, return 0xff, which is never a valid marker value
static uint8 get_marker(jpeg *j)
{
uint8 x;
if (j->marker != MARKER_none) { x = j->marker; j->marker = MARKER_none; return x; }
x = get8u(j->s);
if (x != 0xff) return MARKER_none;
while (x == 0xff)
x = get8u(j->s);
return x;
}
// in each scan, we'll have scan_n components, and the order
// of the components is specified by order[]
#define RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7)
// after a restart interval, reset the entropy decoder and
// the dc prediction
static void reset(jpeg *j)
{
j->code_bits = 0;
j->code_buffer = 0;
j->nomore = 0;
j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = 0;
j->marker = MARKER_none;
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
// since we don't even allow 1<<30 pixels
}
static int parse_entropy_coded_data(jpeg *z)
{
reset(z);
if (z->scan_n == 1) {
int i,j;
#ifdef STBI_SIMD
__declspec(align(16))
#endif
short data[64];
int n = z->order[0];
// non-interleaved data, we just need to process one block at a time,
// in trivial scanline order
// number of blocks to do just depends on how many actual "pixels" this
// component has, independent of interleaved MCU blocking and such
int w = (z->img_comp[n].x+7) >> 3;
int h = (z->img_comp[n].y+7) >> 3;
for (j=0; j < h; ++j) {
for (i=0; i < w; ++i) {
if (!decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
#ifdef STBI_SIMD
stbi_idct_installed(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
#else
idct_block(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
#endif
// every data block is an MCU, so countdown the restart interval
if (--z->todo <= 0) {
if (z->code_bits < 24) grow_buffer_unsafe(z);
// if it's NOT a restart, then just bail, so we get corrupt data
// rather than no data
if (!RESTART(z->marker)) return 1;
reset(z);
}
}
}
} else { // interleaved!
int i,j,k,x,y;
short data[64];
for (j=0; j < z->img_mcu_y; ++j) {
for (i=0; i < z->img_mcu_x; ++i) {
// scan an interleaved mcu... process scan_n components in order
for (k=0; k < z->scan_n; ++k) {
int n = z->order[k];
// scan out an mcu's worth of this component; that's just determined
// by the basic H and V specified for the component
for (y=0; y < z->img_comp[n].v; ++y) {
for (x=0; x < z->img_comp[n].h; ++x) {
int x2 = (i*z->img_comp[n].h + x)*8;
int y2 = (j*z->img_comp[n].v + y)*8;
if (!decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
#ifdef STBI_SIMD
stbi_idct_installed(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
#else
idct_block(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
#endif
}
}
}
// after all interleaved components, that's an interleaved MCU,
// so now count down the restart interval
if (--z->todo <= 0) {
if (z->code_bits < 24) grow_buffer_unsafe(z);
// if it's NOT a restart, then just bail, so we get corrupt data
// rather than no data
if (!RESTART(z->marker)) return 1;
reset(z);
}
}
}
}
return 1;
}
static int process_marker(jpeg *z, int m)
{
int L;
switch (m) {
case MARKER_none: // no marker found
return e("expected marker","Corrupt JPEG");
case 0xC2: // SOF - progressive
return e("progressive jpeg","JPEG format not supported (progressive)");
case 0xDD: // DRI - specify restart interval
if (get16(z->s) != 4) return e("bad DRI len","Corrupt JPEG");
z->restart_interval = get16(z->s);
return 1;
case 0xDB: // DQT - define quantization table
L = get16(z->s)-2;
while (L > 0) {
int q = get8(z->s);
int p = q >> 4;
int t = q & 15,i;
if (p != 0) return e("bad DQT type","Corrupt JPEG");
if (t > 3) return e("bad DQT table","Corrupt JPEG");
for (i=0; i < 64; ++i)
z->dequant[t][dezigzag[i]] = get8u(z->s);
#ifdef STBI_SIMD
for (i=0; i < 64; ++i)
z->dequant2[t][i] = z->dequant[t][i];
#endif
L -= 65;
}
return L==0;
case 0xC4: // DHT - define huffman table
L = get16(z->s)-2;
while (L > 0) {
uint8 *v;
int sizes[16],i,m=0;
int q = get8(z->s);
int tc = q >> 4;
int th = q & 15;
if (tc > 1 || th > 3) return e("bad DHT header","Corrupt JPEG");
for (i=0; i < 16; ++i) {
sizes[i] = get8(z->s);
m += sizes[i];
}
L -= 17;
if (tc == 0) {
if (!build_huffman(z->huff_dc+th, sizes)) return 0;
v = z->huff_dc[th].values;
} else {
if (!build_huffman(z->huff_ac+th, sizes)) return 0;
v = z->huff_ac[th].values;
}
for (i=0; i < m; ++i)
v[i] = get8u(z->s);
L -= m;
}
return L==0;
}
// check for comment block or APP blocks
if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
skip(z->s, get16(z->s)-2);
return 1;
}
return 0;
}
// after we see SOS
static int process_scan_header(jpeg *z)
{
int i;
int Ls = get16(z->s);
z->scan_n = get8(z->s);
if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return e("bad SOS component count","Corrupt JPEG");
if (Ls != 6+2*z->scan_n) return e("bad SOS len","Corrupt JPEG");
for (i=0; i < z->scan_n; ++i) {
int id = get8(z->s), which;
int q = get8(z->s);
for (which = 0; which < z->s->img_n; ++which)
if (z->img_comp[which].id == id)
break;
if (which == z->s->img_n) return 0;
z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return e("bad DC huff","Corrupt JPEG");
z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return e("bad AC huff","Corrupt JPEG");
z->order[i] = which;
}
if (get8(z->s) != 0) return e("bad SOS","Corrupt JPEG");
get8(z->s); // should be 63, but might be 0
if (get8(z->s) != 0) return e("bad SOS","Corrupt JPEG");
return 1;
}
static int process_frame_header(jpeg *z, int scan)
{
stbi *s = z->s;
int Lf,p,i,q, h_max=1,v_max=1,c;
Lf = get16(s); if (Lf < 11) return e("bad SOF len","Corrupt JPEG"); // JPEG
p = get8(s); if (p != 8) return e("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline
s->img_y = get16(s); if (s->img_y == 0) return e("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG
s->img_x = get16(s); if (s->img_x == 0) return e("0 width","Corrupt JPEG"); // JPEG requires
c = get8(s);
if (c != 3 && c != 1) return e("bad component count","Corrupt JPEG"); // JFIF requires
s->img_n = c;
for (i=0; i < c; ++i) {
z->img_comp[i].data = NULL;
z->img_comp[i].linebuf = NULL;
}
if (Lf != 8+3*s->img_n) return e("bad SOF len","Corrupt JPEG");
for (i=0; i < s->img_n; ++i) {
z->img_comp[i].id = get8(s);
if (z->img_comp[i].id != i+1) // JFIF requires
if (z->img_comp[i].id != i) // some version of jpegtran outputs non-JFIF-compliant files!
return e("bad component ID","Corrupt JPEG");
q = get8(s);
z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return e("bad H","Corrupt JPEG");
z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return e("bad V","Corrupt JPEG");
z->img_comp[i].tq = get8(s); if (z->img_comp[i].tq > 3) return e("bad TQ","Corrupt JPEG");
}
if (scan != SCAN_load) return 1;
if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
for (i=0; i < s->img_n; ++i) {
if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;
if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;
}
// compute interleaved mcu info
z->img_h_max = h_max;
z->img_v_max = v_max;
z->img_mcu_w = h_max * 8;
z->img_mcu_h = v_max * 8;
z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h;
for (i=0; i < s->img_n; ++i) {
// number of effective pixels (e.g. for non-interleaved MCU)
z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max;
// to simplify generation, we'll allocate enough memory to decode
// the bogus oversized data from using interleaved MCUs and their
// big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
// discard the extra data until colorspace conversion
z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;
z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;
z->img_comp[i].raw_data = malloc(z->img_comp[i].w2 * z->img_comp[i].h2+15);
if (z->img_comp[i].raw_data == NULL) {
for(--i; i >= 0; --i) {
free(z->img_comp[i].raw_data);
z->img_comp[i].data = NULL;
}
return e("outofmem", "Out of memory");
}
// align blocks for installable-idct using mmx/sse
z->img_comp[i].data = (uint8*) (((size_t) z->img_comp[i].raw_data + 15) & ~15);
z->img_comp[i].linebuf = NULL;
}
return 1;
}
// use comparisons since in some cases we handle more than one case (e.g. SOF)
#define DNL(x) ((x) == 0xdc)
#define SOI(x) ((x) == 0xd8)
#define EOI(x) ((x) == 0xd9)
#define SOF(x) ((x) == 0xc0 || (x) == 0xc1)
#define SOS(x) ((x) == 0xda)
static int decode_jpeg_header(jpeg *z, int scan)
{
int m;
z->marker = MARKER_none; // initialize cached marker to empty
m = get_marker(z);
if (!SOI(m)) return e("no SOI","Corrupt JPEG");
if (scan == SCAN_type) return 1;
m = get_marker(z);
while (!SOF(m)) {
if (!process_marker(z,m)) return 0;
m = get_marker(z);
while (m == MARKER_none) {
// some files have extra padding after their blocks, so ok, we'll scan
if (at_eof(z->s)) return e("no SOF", "Corrupt JPEG");
m = get_marker(z);
}
}
if (!process_frame_header(z, scan)) return 0;
return 1;
}
static int decode_jpeg_image(jpeg *j)
{
int m;
j->restart_interval = 0;
if (!decode_jpeg_header(j, SCAN_load)) return 0;
m = get_marker(j);
while (!EOI(m)) {
if (SOS(m)) {
if (!process_scan_header(j)) return 0;
if (!parse_entropy_coded_data(j)) return 0;
if (j->marker == MARKER_none ) {
// handle 0s at the end of image data from IP Kamera 9060
while (!at_eof(j->s)) {
int x = get8(j->s);
if (x == 255) {
j->marker = get8u(j->s);
break;
} else if (x != 0) {
return 0;
}
}
// if we reach eof without hitting a marker, get_marker() below will fail and we'll eventually return 0
}
} else {
if (!process_marker(j, m)) return 0;
}
m = get_marker(j);
}
return 1;
}
// static jfif-centered resampling (across block boundaries)
typedef uint8 *(*resample_row_func)(uint8 *out, uint8 *in0, uint8 *in1,
int w, int hs);
#define div4(x) ((uint8) ((x) >> 2))
static uint8 *resample_row_1(uint8 *out, uint8 *in_near, uint8 *in_far, int w, int hs)
{
STBI_NOTUSED(out);
STBI_NOTUSED(in_far);
STBI_NOTUSED(w);
STBI_NOTUSED(hs);
return in_near;
}
static uint8* resample_row_v_2(uint8 *out, uint8 *in_near, uint8 *in_far, int w, int hs)
{
// need to generate two samples vertically for every one in input
int i;
STBI_NOTUSED(hs);
for (i=0; i < w; ++i)
out[i] = div4(3*in_near[i] + in_far[i] + 2);
return out;
}
static uint8* resample_row_h_2(uint8 *out, uint8 *in_near, uint8 *in_far, int w, int hs)
{
// need to generate two samples horizontally for every one in input
int i;
uint8 *input = in_near;
if (w == 1) {
// if only one sample, can't do any interpolation
out[0] = out[1] = input[0];
return out;
}
out[0] = input[0];
out[1] = div4(input[0]*3 + input[1] + 2);
for (i=1; i < w-1; ++i) {
int n = 3*input[i]+2;
out[i*2+0] = div4(n+input[i-1]);
out[i*2+1] = div4(n+input[i+1]);
}
out[i*2+0] = div4(input[w-2]*3 + input[w-1] + 2);
out[i*2+1] = input[w-1];
STBI_NOTUSED(in_far);
STBI_NOTUSED(hs);
return out;
}
#define div16(x) ((uint8) ((x) >> 4))
static uint8 *resample_row_hv_2(uint8 *out, uint8 *in_near, uint8 *in_far, int w, int hs)
{
// need to generate 2x2 samples for every one in input
int i,t0,t1;
if (w == 1) {
out[0] = out[1] = div4(3*in_near[0] + in_far[0] + 2);
return out;
}
t1 = 3*in_near[0] + in_far[0];
out[0] = div4(t1+2);
for (i=1; i < w; ++i) {
t0 = t1;
t1 = 3*in_near[i]+in_far[i];
out[i*2-1] = div16(3*t0 + t1 + 8);
out[i*2 ] = div16(3*t1 + t0 + 8);
}
out[w*2-1] = div4(t1+2);
STBI_NOTUSED(hs);
return out;
}
static uint8 *resample_row_generic(uint8 *out, uint8 *in_near, uint8 * in_far, int w, int hs)
{
// resample with nearest-neighbor
int i,j;
for (i=0; i < w; ++i)
for (j=0; j < hs; ++j)
out[i*hs+j] = in_near[i];
return out;
}
#define float2fixed(x) ((int) ((x) * 65536 + 0.5))
// 0.38 seconds on 3*anemones.jpg (0.25 with processor = Pro)
// VC6 without processor=Pro is generating multiple LEAs per multiply!
static void YCbCr_to_RGB_row(uint8 *out, const uint8 *y, const uint8 *pcb, const uint8 *pcr, int count, int step)
{
int i;
for (i=0; i < count; ++i) {
int y_fixed = (y[i] << 16) + 32768; // rounding
int r,g,b;
int cr = pcr[i] - 128;
int cb = pcb[i] - 128;
r = y_fixed + cr*float2fixed(1.40200f);
g = y_fixed - cr*float2fixed(0.71414f) - cb*float2fixed(0.34414f);
b = y_fixed + cb*float2fixed(1.77200f);
r >>= 16;
g >>= 16;
b >>= 16;
if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
out[0] = (uint8)r;
out[1] = (uint8)g;
out[2] = (uint8)b;
out[3] = 255;
out += step;
}
}
#ifdef STBI_SIMD
static stbi_YCbCr_to_RGB_run stbi_YCbCr_installed = YCbCr_to_RGB_row;
void stbi_install_YCbCr_to_RGB(stbi_YCbCr_to_RGB_run func)
{
stbi_YCbCr_installed = func;
}
#endif
// clean up the temporary component buffers
static void cleanup_jpeg(jpeg *j)
{
int i;
for (i=0; i < j->s->img_n; ++i) {
if (j->img_comp[i].data) {
free(j->img_comp[i].raw_data);
j->img_comp[i].data = NULL;
}
if (j->img_comp[i].linebuf) {
free(j->img_comp[i].linebuf);
j->img_comp[i].linebuf = NULL;
}
}
}
typedef struct
{
resample_row_func resample;
uint8 *line0,*line1;
int hs,vs; // expansion factor in each axis
int w_lores; // horizontal pixels pre-expansion
int ystep; // how far through vertical expansion we are
int ypos; // which pre-expansion row we're on
} stbi_resample;
static uint8 *load_jpeg_image(jpeg *z, int *out_x, int *out_y, int *comp, int req_comp)
{
int n, decode_n;
// validate req_comp
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
z->s->img_n = 0;
// load a jpeg image from whichever source
if (!decode_jpeg_image(z)) { cleanup_jpeg(z); return NULL; }
// determine actual number of components to generate
n = req_comp ? req_comp : z->s->img_n;
if (z->s->img_n == 3 && n < 3)
decode_n = 1;
else
decode_n = z->s->img_n;
// resample and color-convert
{
int k;
uint i,j;
uint8 *output;
uint8 *coutput[4];
stbi_resample res_comp[4];
for (k=0; k < decode_n; ++k) {
stbi_resample *r = &res_comp[k];
// allocate line buffer big enough for upsampling off the edges
// with upsample factor of 4
z->img_comp[k].linebuf = (uint8 *) malloc(z->s->img_x + 3);
if (!z->img_comp[k].linebuf) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
r->hs = z->img_h_max / z->img_comp[k].h;
r->vs = z->img_v_max / z->img_comp[k].v;
r->ystep = r->vs >> 1;
r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
r->ypos = 0;
r->line0 = r->line1 = z->img_comp[k].data;
if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
else if (r->hs == 1 && r->vs == 2) r->resample = resample_row_v_2;
else if (r->hs == 2 && r->vs == 1) r->resample = resample_row_h_2;
else if (r->hs == 2 && r->vs == 2) r->resample = resample_row_hv_2;
else r->resample = resample_row_generic;
}
// can't error after this so, this is safe
output = (uint8 *) malloc(n * z->s->img_x * z->s->img_y + 1);
if (!output) { cleanup_jpeg(z); return epuc("outofmem", "Out of memory"); }
// now go ahead and resample
for (j=0; j < z->s->img_y; ++j) {
uint8 *out = output + n * z->s->img_x * j;
for (k=0; k < decode_n; ++k) {
stbi_resample *r = &res_comp[k];
int y_bot = r->ystep >= (r->vs >> 1);
coutput[k] = r->resample(z->img_comp[k].linebuf,
y_bot ? r->line1 : r->line0,
y_bot ? r->line0 : r->line1,
r->w_lores, r->hs);
if (++r->ystep >= r->vs) {
r->ystep = 0;
r->line0 = r->line1;
if (++r->ypos < z->img_comp[k].y)
r->line1 += z->img_comp[k].w2;
}
}
if (n >= 3) {
uint8 *y = coutput[0];
if (z->s->img_n == 3) {
#ifdef STBI_SIMD
stbi_YCbCr_installed(out, y, coutput[1], coutput[2], z->s.img_x, n);
#else
YCbCr_to_RGB_row(out, y, coutput[1], coutput[2], z->s->img_x, n);
#endif
} else
for (i=0; i < z->s->img_x; ++i) {
out[0] = out[1] = out[2] = y[i];
out[3] = 255; // not used if n==3
out += n;
}
} else {
uint8 *y = coutput[0];
if (n == 1)
for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
else
for (i=0; i < z->s->img_x; ++i) *out++ = y[i], *out++ = 255;
}
}
cleanup_jpeg(z);
*out_x = z->s->img_x;
*out_y = z->s->img_y;
if (comp) *comp = z->s->img_n; // report original components, not output
return output;
}
}
static unsigned char *stbi_jpeg_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
jpeg j;
j.s = s;
return load_jpeg_image(&j, x,y,comp,req_comp);
}
static int stbi_jpeg_test(stbi *s)
{
int r;
jpeg j;
j.s = s;
r = decode_jpeg_header(&j, SCAN_type);
stbi_rewind(s);
return r;
}
static int stbi_jpeg_info_raw(jpeg *j, int *x, int *y, int *comp)
{
if (!decode_jpeg_header(j, SCAN_header)) {
stbi_rewind( j->s );
return 0;
}
if (x) *x = j->s->img_x;
if (y) *y = j->s->img_y;
if (comp) *comp = j->s->img_n;
return 1;
}
static int stbi_jpeg_info(stbi *s, int *x, int *y, int *comp)
{
jpeg j;
j.s = s;
return stbi_jpeg_info_raw(&j, x, y, comp);
}
// public domain zlib decode v0.2 Sean Barrett 2006-11-18
// simple implementation
// - all input must be provided in an upfront buffer
// - all output is written to a single output buffer (can malloc/realloc)
// performance
// - fast huffman
// fast-way is faster to check than jpeg huffman, but slow way is slower
#define ZFAST_BITS 9 // accelerate all cases in default tables
#define ZFAST_MASK ((1 << ZFAST_BITS) - 1)
// zlib-style huffman encoding
// (jpegs packs from left, zlib from right, so can't share code)
typedef struct
{
uint16 fast[1 << ZFAST_BITS];
uint16 firstcode[16];
int maxcode[17];
uint16 firstsymbol[16];
uint8 size[288];
uint16 value[288];
} zhuffman;
stbi_inline static int bitreverse16(int n)
{
n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
return n;
}
stbi_inline static int bit_reverse(int v, int bits)
{
assert(bits <= 16);
// to bit reverse n bits, reverse 16 and shift
// e.g. 11 bits, bit reverse and shift away 5
return bitreverse16(v) >> (16-bits);
}
static int zbuild_huffman(zhuffman *z, uint8 *sizelist, int num)
{
int i,k=0;
int code, next_code[16], sizes[17];
// DEFLATE spec for generating codes
memset(sizes, 0, sizeof(sizes));
memset(z->fast, 255, sizeof(z->fast));
for (i=0; i < num; ++i)
++sizes[sizelist[i]];
sizes[0] = 0;
for (i=1; i < 16; ++i)
assert(sizes[i] <= (1 << i));
code = 0;
for (i=1; i < 16; ++i) {
next_code[i] = code;
z->firstcode[i] = (uint16) code;
z->firstsymbol[i] = (uint16) k;
code = (code + sizes[i]);
if (sizes[i])
if (code-1 >= (1 << i)) return e("bad codelengths","Corrupt JPEG");
z->maxcode[i] = code << (16-i); // preshift for inner loop
code <<= 1;
k += sizes[i];
}
z->maxcode[16] = 0x10000; // sentinel
for (i=0; i < num; ++i) {
int s = sizelist[i];
if (s) {
int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s];
z->size[c] = (uint8)s;
z->value[c] = (uint16)i;
if (s <= ZFAST_BITS) {
int k = bit_reverse(next_code[s],s);
while (k < (1 << ZFAST_BITS)) {
z->fast[k] = (uint16) c;
k += (1 << s);
}
}
++next_code[s];
}
}
return 1;
}
// zlib-from-memory implementation for PNG reading
// because PNG allows splitting the zlib stream arbitrarily,
// and it's annoying structurally to have PNG call ZLIB call PNG,
// we require PNG read all the IDATs and combine them into a single
// memory buffer
typedef struct
{
uint8 *zbuffer, *zbuffer_end;
int num_bits;
uint32 code_buffer;
char *zout;
char *zout_start;
char *zout_end;
int z_expandable;
zhuffman z_length, z_distance;
} zbuf;
stbi_inline static int zget8(zbuf *z)
{
if (z->zbuffer >= z->zbuffer_end) return 0;
return *z->zbuffer++;
}
static void fill_bits(zbuf *z)
{
do {
assert(z->code_buffer < (1U << z->num_bits));
z->code_buffer |= zget8(z) << z->num_bits;
z->num_bits += 8;
} while (z->num_bits <= 24);
}
stbi_inline static unsigned int zreceive(zbuf *z, int n)
{
unsigned int k;
if (z->num_bits < n) fill_bits(z);
k = z->code_buffer & ((1 << n) - 1);
z->code_buffer >>= n;
z->num_bits -= n;
return k;
}
stbi_inline static int zhuffman_decode(zbuf *a, zhuffman *z)
{
int b,s,k;
if (a->num_bits < 16) fill_bits(a);
b = z->fast[a->code_buffer & ZFAST_MASK];
if (b < 0xffff) {
s = z->size[b];
a->code_buffer >>= s;
a->num_bits -= s;
return z->value[b];
}
// not resolved by fast table, so compute it the slow way
// use jpeg approach, which requires MSbits at top
k = bit_reverse(a->code_buffer, 16);
for (s=ZFAST_BITS+1; ; ++s)
if (k < z->maxcode[s])
break;
if (s == 16) return -1; // invalid code!
// code size is s, so:
b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s];
assert(z->size[b] == s);
a->code_buffer >>= s;
a->num_bits -= s;
return z->value[b];
}
static int expand(zbuf *z, int n) // need to make room for n bytes
{
char *q;
int cur, limit;
if (!z->z_expandable) return e("output buffer limit","Corrupt PNG");
cur = (int) (z->zout - z->zout_start);
limit = (int) (z->zout_end - z->zout_start);
while (cur + n > limit)
limit *= 2;
q = (char *) realloc(z->zout_start, limit);
if (q == NULL) return e("outofmem", "Out of memory");
z->zout_start = q;
z->zout = q + cur;
z->zout_end = q + limit;
return 1;
}
static int length_base[31] = {
3,4,5,6,7,8,9,10,11,13,
15,17,19,23,27,31,35,43,51,59,
67,83,99,115,131,163,195,227,258,0,0 };
static int length_extra[31]=
{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 };
static int dist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,
257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0};
static int dist_extra[32] =
{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
static int parse_huffman_block(zbuf *a)
{
for(;;) {
int z = zhuffman_decode(a, &a->z_length);
if (z < 256) {
if (z < 0) return e("bad huffman code","Corrupt PNG"); // error in huffman codes
if (a->zout >= a->zout_end) if (!expand(a, 1)) return 0;
*a->zout++ = (char) z;
} else {
uint8 *p;
int len,dist;
if (z == 256) return 1;
z -= 257;
len = length_base[z];
if (length_extra[z]) len += zreceive(a, length_extra[z]);
z = zhuffman_decode(a, &a->z_distance);
if (z < 0) return e("bad huffman code","Corrupt PNG");
dist = dist_base[z];
if (dist_extra[z]) dist += zreceive(a, dist_extra[z]);
if (a->zout - a->zout_start < dist) return e("bad dist","Corrupt PNG");
if (a->zout + len > a->zout_end) if (!expand(a, len)) return 0;
p = (uint8 *) (a->zout - dist);
while (len--)
*a->zout++ = *p++;
}
}
}
static int compute_huffman_codes(zbuf *a)
{
static uint8 length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 };
zhuffman z_codelength;
uint8 lencodes[286+32+137];//padding for maximum single op
uint8 codelength_sizes[19];
int i,n;
int hlit = zreceive(a,5) + 257;
int hdist = zreceive(a,5) + 1;
int hclen = zreceive(a,4) + 4;
memset(codelength_sizes, 0, sizeof(codelength_sizes));
for (i=0; i < hclen; ++i) {
int s = zreceive(a,3);
codelength_sizes[length_dezigzag[i]] = (uint8) s;
}
if (!zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0;
n = 0;
while (n < hlit + hdist) {
int c = zhuffman_decode(a, &z_codelength);
assert(c >= 0 && c < 19);
if (c < 16)
lencodes[n++] = (uint8) c;
else if (c == 16) {
c = zreceive(a,2)+3;
memset(lencodes+n, lencodes[n-1], c);
n += c;
} else if (c == 17) {
c = zreceive(a,3)+3;
memset(lencodes+n, 0, c);
n += c;
} else {
assert(c == 18);
c = zreceive(a,7)+11;
memset(lencodes+n, 0, c);
n += c;
}
}
if (n != hlit+hdist) return e("bad codelengths","Corrupt PNG");
if (!zbuild_huffman(&a->z_length, lencodes, hlit)) return 0;
if (!zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0;
return 1;
}
static int parse_uncompressed_block(zbuf *a)
{
uint8 header[4];
int len,nlen,k;
if (a->num_bits & 7)
zreceive(a, a->num_bits & 7); // discard
// drain the bit-packed data into header
k = 0;
while (a->num_bits > 0) {
header[k++] = (uint8) (a->code_buffer & 255); // wtf this warns?
a->code_buffer >>= 8;
a->num_bits -= 8;
}
assert(a->num_bits == 0);
// now fill header the normal way
while (k < 4)
header[k++] = (uint8) zget8(a);
len = header[1] * 256 + header[0];
nlen = header[3] * 256 + header[2];
if (nlen != (len ^ 0xffff)) return e("zlib corrupt","Corrupt PNG");
if (a->zbuffer + len > a->zbuffer_end) return e("read past buffer","Corrupt PNG");
if (a->zout + len > a->zout_end)
if (!expand(a, len)) return 0;
memcpy(a->zout, a->zbuffer, len);
a->zbuffer += len;
a->zout += len;
return 1;
}
static int parse_zlib_header(zbuf *a)
{
int cmf = zget8(a);
int cm = cmf & 15;
/* int cinfo = cmf >> 4; */
int flg = zget8(a);
if ((cmf*256+flg) % 31 != 0) return e("bad zlib header","Corrupt PNG"); // zlib spec
if (flg & 32) return e("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png
if (cm != 8) return e("bad compression","Corrupt PNG"); // DEFLATE required for png
// window = 1 << (8 + cinfo)... but who cares, we fully buffer output
return 1;
}
// @TODO: should statically initialize these for optimal thread safety
static uint8 default_length[288], default_distance[32];
static void init_defaults(void)
{
int i; // use <= to match clearly with spec
for (i=0; i <= 143; ++i) default_length[i] = 8;
for ( ; i <= 255; ++i) default_length[i] = 9;
for ( ; i <= 279; ++i) default_length[i] = 7;
for ( ; i <= 287; ++i) default_length[i] = 8;
for (i=0; i <= 31; ++i) default_distance[i] = 5;
}
int stbi_png_partial; // a quick hack to only allow decoding some of a PNG... I should implement real streaming support instead
static int parse_zlib(zbuf *a, int parse_header)
{
int final, type;
if (parse_header)
if (!parse_zlib_header(a)) return 0;
a->num_bits = 0;
a->code_buffer = 0;
do {
final = zreceive(a,1);
type = zreceive(a,2);
if (type == 0) {
if (!parse_uncompressed_block(a)) return 0;
} else if (type == 3) {
return 0;
} else {
if (type == 1) {
// use fixed code lengths
if (!default_distance[31]) init_defaults();
if (!zbuild_huffman(&a->z_length , default_length , 288)) return 0;
if (!zbuild_huffman(&a->z_distance, default_distance, 32)) return 0;
} else {
if (!compute_huffman_codes(a)) return 0;
}
if (!parse_huffman_block(a)) return 0;
}
if (stbi_png_partial && a->zout - a->zout_start > 65536)
break;
} while (!final);
return 1;
}
static int do_zlib(zbuf *a, char *obuf, int olen, int exp, int parse_header)
{
a->zout_start = obuf;
a->zout = obuf;
a->zout_end = obuf + olen;
a->z_expandable = exp;
return parse_zlib(a, parse_header);
}
char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen)
{
zbuf a;
char *p = (char *) malloc(initial_size);
if (p == NULL) return NULL;
a.zbuffer = (uint8 *) buffer;
a.zbuffer_end = (uint8 *) buffer + len;
if (do_zlib(&a, p, initial_size, 1, 1)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen)
{
return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen);
}
char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header)
{
zbuf a;
char *p = (char *) malloc(initial_size);
if (p == NULL) return NULL;
a.zbuffer = (uint8 *) buffer;
a.zbuffer_end = (uint8 *) buffer + len;
if (do_zlib(&a, p, initial_size, 1, parse_header)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen)
{
zbuf a;
a.zbuffer = (uint8 *) ibuffer;
a.zbuffer_end = (uint8 *) ibuffer + ilen;
if (do_zlib(&a, obuffer, olen, 0, 1))
return (int) (a.zout - a.zout_start);
else
return -1;
}
char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)
{
zbuf a;
char *p = (char *) malloc(16384);
if (p == NULL) return NULL;
a.zbuffer = (uint8 *) buffer;
a.zbuffer_end = (uint8 *) buffer+len;
if (do_zlib(&a, p, 16384, 1, 0)) {
if (outlen) *outlen = (int) (a.zout - a.zout_start);
return a.zout_start;
} else {
free(a.zout_start);
return NULL;
}
}
int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)
{
zbuf a;
a.zbuffer = (uint8 *) ibuffer;
a.zbuffer_end = (uint8 *) ibuffer + ilen;
if (do_zlib(&a, obuffer, olen, 0, 0))
return (int) (a.zout - a.zout_start);
else
return -1;
}
// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18
// simple implementation
// - only 8-bit samples
// - no CRC checking
// - allocates lots of intermediate memory
// - avoids problem of streaming data between subsystems
// - avoids explicit window management
// performance
// - uses stb_zlib, a PD zlib implementation with fast huffman decoding
typedef struct
{
uint32 length;
uint32 type;
} chunk;
#define PNG_TYPE(a,b,c,d) (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
static chunk get_chunk_header(stbi *s)
{
chunk c;
c.length = get32(s);
c.type = get32(s);
return c;
}
static int check_png_header(stbi *s)
{
static uint8 png_sig[8] = { 137,80,78,71,13,10,26,10 };
int i;
for (i=0; i < 8; ++i)
if (get8u(s) != png_sig[i]) return e("bad png sig","Not a PNG");
return 1;
}
typedef struct
{
stbi *s;
uint8 *idata, *expanded, *out;
} png;
enum {
F_none=0, F_sub=1, F_up=2, F_avg=3, F_paeth=4,
F_avg_first, F_paeth_first
};
static uint8 first_row_filter[5] =
{
F_none, F_sub, F_none, F_avg_first, F_paeth_first
};
static int paeth(int a, int b, int c)
{
int p = a + b - c;
int pa = abs(p-a);
int pb = abs(p-b);
int pc = abs(p-c);
if (pa <= pb && pa <= pc) return a;
if (pb <= pc) return b;
return c;
}
// create the png data from post-deflated data
static int create_png_image_raw(png *a, uint8 *raw, uint32 raw_len, int out_n, uint32 x, uint32 y)
{
stbi *s = a->s;
uint32 i,j,stride = x*out_n;
int k;
int img_n = s->img_n; // copy it into a local for later
assert(out_n == s->img_n || out_n == s->img_n+1);
if (stbi_png_partial) y = 1;
a->out = (uint8 *) malloc(x * y * out_n);
if (!a->out) return e("outofmem", "Out of memory");
if (!stbi_png_partial) {
if (s->img_x == x && s->img_y == y) {
if (raw_len != (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG");
} else { // interlaced:
if (raw_len < (img_n * x + 1) * y) return e("not enough pixels","Corrupt PNG");
}
}
for (j=0; j < y; ++j) {
uint8 *cur = a->out + stride*j;
uint8 *prior = cur - stride;
int filter = *raw++;
if (filter > 4) return e("invalid filter","Corrupt PNG");
// if first row, use special filter that doesn't sample previous row
if (j == 0) filter = first_row_filter[filter];
// handle first pixel explicitly
for (k=0; k < img_n; ++k) {
switch (filter) {
case F_none : cur[k] = raw[k]; break;
case F_sub : cur[k] = raw[k]; break;
case F_up : cur[k] = raw[k] + prior[k]; break;
case F_avg : cur[k] = raw[k] + (prior[k]>>1); break;
case F_paeth : cur[k] = (uint8) (raw[k] + paeth(0,prior[k],0)); break;
case F_avg_first : cur[k] = raw[k]; break;
case F_paeth_first: cur[k] = raw[k]; break;
}
}
if (img_n != out_n) cur[img_n] = 255;
raw += img_n;
cur += out_n;
prior += out_n;
// this is a little gross, so that we don't switch per-pixel or per-component
if (img_n == out_n) {
#define CASE(f) \
case f: \
for (i=x-1; i >= 1; --i, raw+=img_n,cur+=img_n,prior+=img_n) \
for (k=0; k < img_n; ++k)
switch (filter) {
CASE(F_none) cur[k] = raw[k]; break;
CASE(F_sub) cur[k] = raw[k] + cur[k-img_n]; break;
CASE(F_up) cur[k] = raw[k] + prior[k]; break;
CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-img_n])>>1); break;
CASE(F_paeth) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],prior[k],prior[k-img_n])); break;
CASE(F_avg_first) cur[k] = raw[k] + (cur[k-img_n] >> 1); break;
CASE(F_paeth_first) cur[k] = (uint8) (raw[k] + paeth(cur[k-img_n],0,0)); break;
}
#undef CASE
} else {
assert(img_n+1 == out_n);
#define CASE(f) \
case f: \
for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \
for (k=0; k < img_n; ++k)
switch (filter) {
CASE(F_none) cur[k] = raw[k]; break;
CASE(F_sub) cur[k] = raw[k] + cur[k-out_n]; break;
CASE(F_up) cur[k] = raw[k] + prior[k]; break;
CASE(F_avg) cur[k] = raw[k] + ((prior[k] + cur[k-out_n])>>1); break;
CASE(F_paeth) cur[k] = (uint8) (raw[k] + paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;
CASE(F_avg_first) cur[k] = raw[k] + (cur[k-out_n] >> 1); break;
CASE(F_paeth_first) cur[k] = (uint8) (raw[k] + paeth(cur[k-out_n],0,0)); break;
}
#undef CASE
}
}
return 1;
}
static int create_png_image(png *a, uint8 *raw, uint32 raw_len, int out_n, int interlaced)
{
uint8 *final;
int p;
int save;
if (!interlaced)
return create_png_image_raw(a, raw, raw_len, out_n, a->s->img_x, a->s->img_y);
save = stbi_png_partial;
stbi_png_partial = 0;
// de-interlacing
final = (uint8 *) malloc(a->s->img_x * a->s->img_y * out_n);
for (p=0; p < 7; ++p) {
int xorig[] = { 0,4,0,2,0,1,0 };
int yorig[] = { 0,0,4,0,2,0,1 };
int xspc[] = { 8,8,4,4,2,2,1 };
int yspc[] = { 8,8,8,4,4,2,2 };
int i,j,x,y;
// pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1
x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p];
y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p];
if (x && y) {
if (!create_png_image_raw(a, raw, raw_len, out_n, x, y)) {
free(final);
return 0;
}
for (j=0; j < y; ++j)
for (i=0; i < x; ++i)
memcpy(final + (j*yspc[p]+yorig[p])*a->s->img_x*out_n + (i*xspc[p]+xorig[p])*out_n,
a->out + (j*x+i)*out_n, out_n);
free(a->out);
raw += (x*out_n+1)*y;
raw_len -= (x*out_n+1)*y;
}
}
a->out = final;
stbi_png_partial = save;
return 1;
}
static int compute_transparency(png *z, uint8 tc[3], int out_n)
{
stbi *s = z->s;
uint32 i, pixel_count = s->img_x * s->img_y;
uint8 *p = z->out;
// compute color-based transparency, assuming we've
// already got 255 as the alpha value in the output
assert(out_n == 2 || out_n == 4);
if (out_n == 2) {
for (i=0; i < pixel_count; ++i) {
p[1] = (p[0] == tc[0] ? 0 : 255);
p += 2;
}
} else {
for (i=0; i < pixel_count; ++i) {
if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2])
p[3] = 0;
p += 4;
}
}
return 1;
}
static int expand_palette(png *a, uint8 *palette, int len, int pal_img_n)
{
uint32 i, pixel_count = a->s->img_x * a->s->img_y;
uint8 *p, *temp_out, *orig = a->out;
p = (uint8 *) malloc(pixel_count * pal_img_n);
if (p == NULL) return e("outofmem", "Out of memory");
// between here and free(out) below, exitting would leak
temp_out = p;
if (pal_img_n == 3) {
for (i=0; i < pixel_count; ++i) {
int n = orig[i]*4;
p[0] = palette[n ];
p[1] = palette[n+1];
p[2] = palette[n+2];
p += 3;
}
} else {
for (i=0; i < pixel_count; ++i) {
int n = orig[i]*4;
p[0] = palette[n ];
p[1] = palette[n+1];
p[2] = palette[n+2];
p[3] = palette[n+3];
p += 4;
}
}
free(a->out);
a->out = temp_out;
STBI_NOTUSED(len);
return 1;
}
static int stbi_unpremultiply_on_load = 0;
static int stbi_de_iphone_flag = 0;
void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply)
{
stbi_unpremultiply_on_load = flag_true_if_should_unpremultiply;
}
void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert)
{
stbi_de_iphone_flag = flag_true_if_should_convert;
}
static void stbi_de_iphone(png *z)
{
stbi *s = z->s;
uint32 i, pixel_count = s->img_x * s->img_y;
uint8 *p = z->out;
if (s->img_out_n == 3) { // convert bgr to rgb
for (i=0; i < pixel_count; ++i) {
uint8 t = p[0];
p[0] = p[2];
p[2] = t;
p += 3;
}
} else {
assert(s->img_out_n == 4);
if (stbi_unpremultiply_on_load) {
// convert bgr to rgb and unpremultiply
for (i=0; i < pixel_count; ++i) {
uint8 a = p[3];
uint8 t = p[0];
if (a) {
p[0] = p[2] * 255 / a;
p[1] = p[1] * 255 / a;
p[2] = t * 255 / a;
} else {
p[0] = p[2];
p[2] = t;
}
p += 4;
}
} else {
// convert bgr to rgb
for (i=0; i < pixel_count; ++i) {
uint8 t = p[0];
p[0] = p[2];
p[2] = t;
p += 4;
}
}
}
}
static int parse_png_file(png *z, int scan, int req_comp)
{
uint8 palette[1024], pal_img_n=0;
uint8 has_trans=0, tc[3];
uint32 ioff=0, idata_limit=0, i, pal_len=0;
int first=1,k,interlace=0, iphone=0;
stbi *s = z->s;
z->expanded = NULL;
z->idata = NULL;
z->out = NULL;
if (!check_png_header(s)) return 0;
if (scan == SCAN_type) return 1;
for (;;) {
chunk c = get_chunk_header(s);
switch (c.type) {
case PNG_TYPE('C','g','B','I'):
iphone = stbi_de_iphone_flag;
skip(s, c.length);
break;
case PNG_TYPE('I','H','D','R'): {
int depth,color,comp,filter;
if (!first) return e("multiple IHDR","Corrupt PNG");
first = 0;
if (c.length != 13) return e("bad IHDR len","Corrupt PNG");
s->img_x = get32(s); if (s->img_x > (1 << 24)) return e("too large","Very large image (corrupt?)");
s->img_y = get32(s); if (s->img_y > (1 << 24)) return e("too large","Very large image (corrupt?)");
depth = get8(s); if (depth != 8) return e("8bit only","PNG not supported: 8-bit only");
color = get8(s); if (color > 6) return e("bad ctype","Corrupt PNG");
if (color == 3) pal_img_n = 3; else if (color & 1) return e("bad ctype","Corrupt PNG");
comp = get8(s); if (comp) return e("bad comp method","Corrupt PNG");
filter= get8(s); if (filter) return e("bad filter method","Corrupt PNG");
interlace = get8(s); if (interlace>1) return e("bad interlace method","Corrupt PNG");
if (!s->img_x || !s->img_y) return e("0-pixel image","Corrupt PNG");
if (!pal_img_n) {
s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
if ((1 << 30) / s->img_x / s->img_n < s->img_y) return e("too large", "Image too large to decode");
if (scan == SCAN_header) return 1;
} else {
// if paletted, then pal_n is our final components, and
// img_n is # components to decompress/filter.
s->img_n = 1;
if ((1 << 30) / s->img_x / 4 < s->img_y) return e("too large","Corrupt PNG");
// if SCAN_header, have to scan to see if we have a tRNS
}
break;
}
case PNG_TYPE('P','L','T','E'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (c.length > 256*3) return e("invalid PLTE","Corrupt PNG");
pal_len = c.length / 3;
if (pal_len * 3 != c.length) return e("invalid PLTE","Corrupt PNG");
for (i=0; i < pal_len; ++i) {
palette[i*4+0] = get8u(s);
palette[i*4+1] = get8u(s);
palette[i*4+2] = get8u(s);
palette[i*4+3] = 255;
}
break;
}
case PNG_TYPE('t','R','N','S'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (z->idata) return e("tRNS after IDAT","Corrupt PNG");
if (pal_img_n) {
if (scan == SCAN_header) { s->img_n = 4; return 1; }
if (pal_len == 0) return e("tRNS before PLTE","Corrupt PNG");
if (c.length > pal_len) return e("bad tRNS len","Corrupt PNG");
pal_img_n = 4;
for (i=0; i < c.length; ++i)
palette[i*4+3] = get8u(s);
} else {
if (!(s->img_n & 1)) return e("tRNS with alpha","Corrupt PNG");
if (c.length != (uint32) s->img_n*2) return e("bad tRNS len","Corrupt PNG");
has_trans = 1;
for (k=0; k < s->img_n; ++k)
tc[k] = (uint8) get16(s); // non 8-bit images will be larger
}
break;
}
case PNG_TYPE('I','D','A','T'): {
if (first) return e("first not IHDR", "Corrupt PNG");
if (pal_img_n && !pal_len) return e("no PLTE","Corrupt PNG");
if (scan == SCAN_header) { s->img_n = pal_img_n; return 1; }
if (ioff + c.length > idata_limit) {
uint8 *p;
if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
while (ioff + c.length > idata_limit)
idata_limit *= 2;
p = (uint8 *) realloc(z->idata, idata_limit); if (p == NULL) return e("outofmem", "Out of memory");
z->idata = p;
}
if (!getn(s, z->idata+ioff,c.length)) return e("outofdata","Corrupt PNG");
ioff += c.length;
break;
}
case PNG_TYPE('I','E','N','D'): {
uint32 raw_len;
if (first) return e("first not IHDR", "Corrupt PNG");
if (scan != SCAN_load) return 1;
if (z->idata == NULL) return e("no IDAT","Corrupt PNG");
z->expanded = (uint8 *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, 16384, (int *) &raw_len, !iphone);
if (z->expanded == NULL) return 0; // zlib should set error
free(z->idata); z->idata = NULL;
if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)
s->img_out_n = s->img_n+1;
else
s->img_out_n = s->img_n;
if (!create_png_image(z, z->expanded, raw_len, s->img_out_n, interlace)) return 0;
if (has_trans)
if (!compute_transparency(z, tc, s->img_out_n)) return 0;
if (iphone && s->img_out_n > 2)
stbi_de_iphone(z);
if (pal_img_n) {
// pal_img_n == 3 or 4
s->img_n = pal_img_n; // record the actual colors we had
s->img_out_n = pal_img_n;
if (req_comp >= 3) s->img_out_n = req_comp;
if (!expand_palette(z, palette, pal_len, s->img_out_n))
return 0;
}
free(z->expanded); z->expanded = NULL;
return 1;
}
default:
// if critical, fail
if (first) return e("first not IHDR", "Corrupt PNG");
if ((c.type & (1 << 29)) == 0) {
#ifndef STBI_NO_FAILURE_STRINGS
// not threadsafe
static char invalid_chunk[] = "XXXX chunk not known";
invalid_chunk[0] = (uint8) (c.type >> 24);
invalid_chunk[1] = (uint8) (c.type >> 16);
invalid_chunk[2] = (uint8) (c.type >> 8);
invalid_chunk[3] = (uint8) (c.type >> 0);
#endif
return e(invalid_chunk, "PNG not supported: unknown chunk type");
}
skip(s, c.length);
break;
}
// end of chunk, read and skip CRC
get32(s);
}
}
static unsigned char *do_png(png *p, int *x, int *y, int *n, int req_comp)
{
unsigned char *result=NULL;
if (req_comp < 0 || req_comp > 4) return epuc("bad req_comp", "Internal error");
if (parse_png_file(p, SCAN_load, req_comp)) {
result = p->out;
p->out = NULL;
if (req_comp && req_comp != p->s->img_out_n) {
result = convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y);
p->s->img_out_n = req_comp;
if (result == NULL) return result;
}
*x = p->s->img_x;
*y = p->s->img_y;
if (n) *n = p->s->img_n;
}
free(p->out); p->out = NULL;
free(p->expanded); p->expanded = NULL;
free(p->idata); p->idata = NULL;
return result;
}
static unsigned char *stbi_png_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
png p;
p.s = s;
return do_png(&p, x,y,comp,req_comp);
}
static int stbi_png_test(stbi *s)
{
int r;
r = check_png_header(s);
stbi_rewind(s);
return r;
}
static int stbi_png_info_raw(png *p, int *x, int *y, int *comp)
{
if (!parse_png_file(p, SCAN_header, 0)) {
stbi_rewind( p->s );
return 0;
}
if (x) *x = p->s->img_x;
if (y) *y = p->s->img_y;
if (comp) *comp = p->s->img_n;
return 1;
}
static int stbi_png_info(stbi *s, int *x, int *y, int *comp)
{
png p;
p.s = s;
return stbi_png_info_raw(&p, x, y, comp);
}
// Microsoft/Windows BMP image
static int bmp_test(stbi *s)
{
int sz;
if (get8(s) != 'B') return 0;
if (get8(s) != 'M') return 0;
get32le(s); // discard filesize
get16le(s); // discard reserved
get16le(s); // discard reserved
get32le(s); // discard data offset
sz = get32le(s);
if (sz == 12 || sz == 40 || sz == 56 || sz == 108) return 1;
return 0;
}
static int stbi_bmp_test(stbi *s)
{
int r = bmp_test(s);
stbi_rewind(s);
return r;
}
// returns 0..31 for the highest set bit
static int high_bit(unsigned int z)
{
int n=0;
if (z == 0) return -1;
if (z >= 0x10000) n += 16, z >>= 16;
if (z >= 0x00100) n += 8, z >>= 8;
if (z >= 0x00010) n += 4, z >>= 4;
if (z >= 0x00004) n += 2, z >>= 2;
if (z >= 0x00002) n += 1, z >>= 1;
return n;
}
static int bitcount(unsigned int a)
{
a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2
a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4
a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
a = (a + (a >> 8)); // max 16 per 8 bits
a = (a + (a >> 16)); // max 32 per 8 bits
return a & 0xff;
}
static int shiftsigned(int v, int shift, int bits)
{
int result;
int z=0;
if (shift < 0) v <<= -shift;
else v >>= shift;
result = v;
z = bits;
while (z < 8) {
result += v >> z;
z += bits;
}
return result;
}
static stbi_uc *bmp_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
uint8 *out;
unsigned int mr=0,mg=0,mb=0,ma=0, fake_a=0;
stbi_uc pal[256][4];
int psize=0,i,j,compress=0,width;
int bpp, flip_vertically, pad, target, offset, hsz;
if (get8(s) != 'B' || get8(s) != 'M') return epuc("not BMP", "Corrupt BMP");
get32le(s); // discard filesize
get16le(s); // discard reserved
get16le(s); // discard reserved
offset = get32le(s);
hsz = get32le(s);
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108) return epuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = get16le(s);
s->img_y = get16le(s);
} else {
s->img_x = get32le(s);
s->img_y = get32le(s);
}
if (get16le(s) != 1) return epuc("bad BMP", "bad BMP");
bpp = get16le(s);
if (bpp == 1) return epuc("monochrome", "BMP type not supported: 1-bit");
flip_vertically = ((int) s->img_y) > 0;
s->img_y = abs((int) s->img_y);
if (hsz == 12) {
if (bpp < 24)
psize = (offset - 14 - 24) / 3;
} else {
compress = get32le(s);
if (compress == 1 || compress == 2) return epuc("BMP RLE", "BMP type not supported: RLE");
get32le(s); // discard sizeof
get32le(s); // discard hres
get32le(s); // discard vres
get32le(s); // discard colorsused
get32le(s); // discard max important
if (hsz == 40 || hsz == 56) {
if (hsz == 56) {
get32le(s);
get32le(s);
get32le(s);
get32le(s);
}
if (bpp == 16 || bpp == 32) {
mr = mg = mb = 0;
if (compress == 0) {
if (bpp == 32) {
mr = 0xffu << 16;
mg = 0xffu << 8;
mb = 0xffu << 0;
ma = 0xffu << 24;
fake_a = 1; // @TODO: check for cases like alpha value is all 0 and switch it to 255
} else {
mr = 31u << 10;
mg = 31u << 5;
mb = 31u << 0;
}
} else if (compress == 3) {
mr = get32le(s);
mg = get32le(s);
mb = get32le(s);
// not documented, but generated by photoshop and handled by mspaint
if (mr == mg && mg == mb) {
// ?!?!?
return epuc("bad BMP", "bad BMP");
}
} else
return epuc("bad BMP", "bad BMP");
}
} else {
assert(hsz == 108);
mr = get32le(s);
mg = get32le(s);
mb = get32le(s);
ma = get32le(s);
get32le(s); // discard color space
for (i=0; i < 12; ++i)
get32le(s); // discard color space parameters
}
if (bpp < 16)
psize = (offset - 14 - hsz) >> 2;
}
s->img_n = ma ? 4 : 3;
if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
target = req_comp;
else
target = s->img_n; // if they want monochrome, we'll post-convert
out = (stbi_uc *) malloc(target * s->img_x * s->img_y);
if (!out) return epuc("outofmem", "Out of memory");
if (bpp < 16) {
int z=0;
if (psize == 0 || psize > 256) { free(out); return epuc("invalid", "Corrupt BMP"); }
for (i=0; i < psize; ++i) {
pal[i][2] = get8u(s);
pal[i][1] = get8u(s);
pal[i][0] = get8u(s);
if (hsz != 12) get8(s);
pal[i][3] = 255;
}
skip(s, offset - 14 - hsz - psize * (hsz == 12 ? 3 : 4));
if (bpp == 4) width = (s->img_x + 1) >> 1;
else if (bpp == 8) width = s->img_x;
else { free(out); return epuc("bad bpp", "Corrupt BMP"); }
pad = (-width)&3;
for (j=0; j < (int) s->img_y; ++j) {
for (i=0; i < (int) s->img_x; i += 2) {
int v=get8(s),v2=0;
if (bpp == 4) {
v2 = v & 15;
v >>= 4;
}
out[z++] = pal[v][0];
out[z++] = pal[v][1];
out[z++] = pal[v][2];
if (target == 4) out[z++] = 255;
if (i+1 == (int) s->img_x) break;
v = (bpp == 8) ? get8(s) : v2;
out[z++] = pal[v][0];
out[z++] = pal[v][1];
out[z++] = pal[v][2];
if (target == 4) out[z++] = 255;
}
skip(s, pad);
}
} else {
int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;
int z = 0;
int easy=0;
skip(s, offset - 14 - hsz);
if (bpp == 24) width = 3 * s->img_x;
else if (bpp == 16) width = 2*s->img_x;
else /* bpp = 32 and pad = 0 */ width=0;
pad = (-width) & 3;
if (bpp == 24) {
easy = 1;
} else if (bpp == 32) {
if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
easy = 2;
}
if (!easy) {
if (!mr || !mg || !mb) { free(out); return epuc("bad masks", "Corrupt BMP"); }
// right shift amt to put high bit in position #7
rshift = high_bit(mr)-7; rcount = bitcount(mr);
gshift = high_bit(mg)-7; gcount = bitcount(mr);
bshift = high_bit(mb)-7; bcount = bitcount(mr);
ashift = high_bit(ma)-7; acount = bitcount(mr);
}
for (j=0; j < (int) s->img_y; ++j) {
if (easy) {
for (i=0; i < (int) s->img_x; ++i) {
int a;
out[z+2] = get8u(s);
out[z+1] = get8u(s);
out[z+0] = get8u(s);
z += 3;
a = (easy == 2 ? get8(s) : 255);
if (target == 4) out[z++] = (uint8) a;
}
} else {
for (i=0; i < (int) s->img_x; ++i) {
uint32 v = (bpp == 16 ? get16le(s) : get32le(s));
int a;
out[z++] = (uint8) shiftsigned(v & mr, rshift, rcount);
out[z++] = (uint8) shiftsigned(v & mg, gshift, gcount);
out[z++] = (uint8) shiftsigned(v & mb, bshift, bcount);
a = (ma ? shiftsigned(v & ma, ashift, acount) : 255);
if (target == 4) out[z++] = (uint8) a;
}
}
skip(s, pad);
}
}
if (flip_vertically) {
stbi_uc t;
for (j=0; j < (int) s->img_y>>1; ++j) {
stbi_uc *p1 = out + j *s->img_x*target;
stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
for (i=0; i < (int) s->img_x*target; ++i) {
t = p1[i], p1[i] = p2[i], p2[i] = t;
}
}
}
if (req_comp && req_comp != target) {
out = convert_format(out, target, req_comp, s->img_x, s->img_y);
if (out == NULL) return out; // convert_format frees input on failure
}
*x = s->img_x;
*y = s->img_y;
if (comp) *comp = s->img_n;
return out;
}
static stbi_uc *stbi_bmp_load(stbi *s,int *x, int *y, int *comp, int req_comp)
{
return bmp_load(s, x,y,comp,req_comp);
}
// Targa Truevision - TGA
// by Jonathan Dummer
static int tga_info(stbi *s, int *x, int *y, int *comp)
{
int tga_w, tga_h, tga_comp;
int sz;
get8u(s); // discard Offset
sz = get8u(s); // color type
if( sz > 1 ) {
stbi_rewind(s);
return 0; // only RGB or indexed allowed
}
sz = get8u(s); // image type
// only RGB or grey allowed, +/- RLE
if ((sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11)) return 0;
skip(s,9);
tga_w = get16le(s);
if( tga_w < 1 ) {
stbi_rewind(s);
return 0; // test width
}
tga_h = get16le(s);
if( tga_h < 1 ) {
stbi_rewind(s);
return 0; // test height
}
sz = get8(s); // bits per pixel
// only RGB or RGBA or grey allowed
if ((sz != 8) && (sz != 16) && (sz != 24) && (sz != 32)) {
stbi_rewind(s);
return 0;
}
tga_comp = sz;
if (x) *x = tga_w;
if (y) *y = tga_h;
if (comp) *comp = tga_comp / 8;
return 1; // seems to have passed everything
}
int stbi_tga_info(stbi *s, int *x, int *y, int *comp)
{
return tga_info(s, x, y, comp);
}
static int tga_test(stbi *s)
{
int sz;
get8u(s); // discard Offset
sz = get8u(s); // color type
if ( sz > 1 ) return 0; // only RGB or indexed allowed
sz = get8u(s); // image type
if ( (sz != 1) && (sz != 2) && (sz != 3) && (sz != 9) && (sz != 10) && (sz != 11) ) return 0; // only RGB or grey allowed, +/- RLE
get16(s); // discard palette start
get16(s); // discard palette length
get8(s); // discard bits per palette color entry
get16(s); // discard x origin
get16(s); // discard y origin
if ( get16(s) < 1 ) return 0; // test width
if ( get16(s) < 1 ) return 0; // test height
sz = get8(s); // bits per pixel
if ( (sz != 8) && (sz != 16) && (sz != 24) && (sz != 32) ) return 0; // only RGB or RGBA or grey allowed
return 1; // seems to have passed everything
}
static int stbi_tga_test(stbi *s)
{
int res = tga_test(s);
stbi_rewind(s);
return res;
}
static stbi_uc *tga_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
// read in the TGA header stuff
int tga_offset = get8u(s);
int tga_indexed = get8u(s);
int tga_image_type = get8u(s);
int tga_is_RLE = 0;
int tga_palette_start = get16le(s);
int tga_palette_len = get16le(s);
int tga_palette_bits = get8u(s);
int tga_x_origin = get16le(s);
int tga_y_origin = get16le(s);
int tga_width = get16le(s);
int tga_height = get16le(s);
int tga_bits_per_pixel = get8u(s);
int tga_inverted = get8u(s);
// image data
unsigned char *tga_data;
unsigned char *tga_palette = NULL;
int i, j;
unsigned char raw_data[4];
unsigned char trans_data[4];
int RLE_count = 0;
int RLE_repeating = 0;
int read_next_pixel = 1;
// do a tiny bit of precessing
if ( tga_image_type >= 8 )
{
tga_image_type -= 8;
tga_is_RLE = 1;
}
/* int tga_alpha_bits = tga_inverted & 15; */
tga_inverted = 1 - ((tga_inverted >> 5) & 1);
// error check
if ( //(tga_indexed) ||
(tga_width < 1) || (tga_height < 1) ||
(tga_image_type < 1) || (tga_image_type > 3) ||
((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16) &&
(tga_bits_per_pixel != 24) && (tga_bits_per_pixel != 32))
)
{
return NULL; // we don't report this as a bad TGA because we don't even know if it's TGA
}
// If I'm paletted, then I'll use the number of bits from the palette
if ( tga_indexed )
{
tga_bits_per_pixel = tga_palette_bits;
}
// tga info
*x = tga_width;
*y = tga_height;
if ( (req_comp < 1) || (req_comp > 4) )
{
// just use whatever the file was
req_comp = tga_bits_per_pixel / 8;
*comp = req_comp;
} else
{
// force a new number of components
*comp = tga_bits_per_pixel/8;
}
tga_data = (unsigned char*)malloc( tga_width * tga_height * req_comp );
if (!tga_data) return epuc("outofmem", "Out of memory");
// skip to the data's starting position (offset usually = 0)
skip(s, tga_offset );
// do I need to load a palette?
if ( tga_indexed )
{
// any data to skip? (offset usually = 0)
skip(s, tga_palette_start );
// load the palette
tga_palette = (unsigned char*)malloc( tga_palette_len * tga_palette_bits / 8 );
if (!tga_palette) return epuc("outofmem", "Out of memory");
if (!getn(s, tga_palette, tga_palette_len * tga_palette_bits / 8 )) {
free(tga_data);
free(tga_palette);
return epuc("bad palette", "Corrupt TGA");
}
}
// load the data
trans_data[0] = trans_data[1] = trans_data[2] = trans_data[3] = 0;
for (i=0; i < tga_width * tga_height; ++i)
{
// if I'm in RLE mode, do I need to get a RLE chunk?
if ( tga_is_RLE )
{
if ( RLE_count == 0 )
{
// yep, get the next byte as a RLE command
int RLE_cmd = get8u(s);
RLE_count = 1 + (RLE_cmd & 127);
RLE_repeating = RLE_cmd >> 7;
read_next_pixel = 1;
} else if ( !RLE_repeating )
{
read_next_pixel = 1;
}
} else
{
read_next_pixel = 1;
}
// OK, if I need to read a pixel, do it now
if ( read_next_pixel )
{
// load however much data we did have
if ( tga_indexed )
{
// read in 1 byte, then perform the lookup
int pal_idx = get8u(s);
if ( pal_idx >= tga_palette_len )
{
// invalid index
pal_idx = 0;
}
pal_idx *= tga_bits_per_pixel / 8;
for (j = 0; j*8 < tga_bits_per_pixel; ++j)
{
raw_data[j] = tga_palette[pal_idx+j];
}
} else
{
// read in the data raw
for (j = 0; j*8 < tga_bits_per_pixel; ++j)
{
raw_data[j] = get8u(s);
}
}
// convert raw to the intermediate format
switch (tga_bits_per_pixel)
{
case 8:
// Luminous => RGBA
trans_data[0] = raw_data[0];
trans_data[1] = raw_data[0];
trans_data[2] = raw_data[0];
trans_data[3] = 255;
break;
case 16:
// Luminous,Alpha => RGBA
trans_data[0] = raw_data[0];
trans_data[1] = raw_data[0];
trans_data[2] = raw_data[0];
trans_data[3] = raw_data[1];
break;
case 24:
// BGR => RGBA
trans_data[0] = raw_data[2];
trans_data[1] = raw_data[1];
trans_data[2] = raw_data[0];
trans_data[3] = 255;
break;
case 32:
// BGRA => RGBA
trans_data[0] = raw_data[2];
trans_data[1] = raw_data[1];
trans_data[2] = raw_data[0];
trans_data[3] = raw_data[3];
break;
}
// clear the reading flag for the next pixel
read_next_pixel = 0;
} // end of reading a pixel
// convert to final format
switch (req_comp)
{
case 1:
// RGBA => Luminance
tga_data[i*req_comp+0] = compute_y(trans_data[0],trans_data[1],trans_data[2]);
break;
case 2:
// RGBA => Luminance,Alpha
tga_data[i*req_comp+0] = compute_y(trans_data[0],trans_data[1],trans_data[2]);
tga_data[i*req_comp+1] = trans_data[3];
break;
case 3:
// RGBA => RGB
tga_data[i*req_comp+0] = trans_data[0];
tga_data[i*req_comp+1] = trans_data[1];
tga_data[i*req_comp+2] = trans_data[2];
break;
case 4:
// RGBA => RGBA
tga_data[i*req_comp+0] = trans_data[0];
tga_data[i*req_comp+1] = trans_data[1];
tga_data[i*req_comp+2] = trans_data[2];
tga_data[i*req_comp+3] = trans_data[3];
break;
}
// in case we're in RLE mode, keep counting down
--RLE_count;
}
// do I need to invert the image?
if ( tga_inverted )
{
for (j = 0; j*2 < tga_height; ++j)
{
int index1 = j * tga_width * req_comp;
int index2 = (tga_height - 1 - j) * tga_width * req_comp;
for (i = tga_width * req_comp; i > 0; --i)
{
unsigned char temp = tga_data[index1];
tga_data[index1] = tga_data[index2];
tga_data[index2] = temp;
++index1;
++index2;
}
}
}
// clear my palette, if I had one
if ( tga_palette != NULL )
{
free( tga_palette );
}
// the things I do to get rid of an error message, and yet keep
// Microsoft's C compilers happy... [8^(
tga_palette_start = tga_palette_len = tga_palette_bits =
tga_x_origin = tga_y_origin = 0;
// OK, done
return tga_data;
}
static stbi_uc *stbi_tga_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return tga_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB
static int psd_test(stbi *s)
{
if (get32(s) != 0x38425053) return 0; // "8BPS"
else return 1;
}
static int stbi_psd_test(stbi *s)
{
int r = psd_test(s);
stbi_rewind(s);
return r;
}
static stbi_uc *psd_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
int pixelCount;
int channelCount, compression;
int channel, i, count, len;
int w,h;
uint8 *out;
// Check identifier
if (get32(s) != 0x38425053) // "8BPS"
return epuc("not PSD", "Corrupt PSD image");
// Check file type version.
if (get16(s) != 1)
return epuc("wrong version", "Unsupported version of PSD image");
// Skip 6 reserved bytes.
skip(s, 6 );
// Read the number of channels (R, G, B, A, etc).
channelCount = get16(s);
if (channelCount < 0 || channelCount > 16)
return epuc("wrong channel count", "Unsupported number of channels in PSD image");
// Read the rows and columns of the image.
h = get32(s);
w = get32(s);
// Make sure the depth is 8 bits.
if (get16(s) != 8)
return epuc("unsupported bit depth", "PSD bit depth is not 8 bit");
// Make sure the color mode is RGB.
// Valid options are:
// 0: Bitmap
// 1: Grayscale
// 2: Indexed color
// 3: RGB color
// 4: CMYK color
// 7: Multichannel
// 8: Duotone
// 9: Lab color
if (get16(s) != 3)
return epuc("wrong color format", "PSD is not in RGB color format");
// Skip the Mode Data. (It's the palette for indexed color; other info for other modes.)
skip(s,get32(s) );
// Skip the image resources. (resolution, pen tool paths, etc)
skip(s, get32(s) );
// Skip the reserved data.
skip(s, get32(s) );
// Find out if the data is compressed.
// Known values:
// 0: no compression
// 1: RLE compressed
compression = get16(s);
if (compression > 1)
return epuc("bad compression", "PSD has an unknown compression format");
// Create the destination image.
out = (stbi_uc *) malloc(4 * w*h);
if (!out) return epuc("outofmem", "Out of memory");
pixelCount = w*h;
// Initialize the data to zero.
//memset( out, 0, pixelCount * 4 );
// Finally, the image data.
if (compression) {
// RLE as used by .PSD and .TIFF
// Loop until you get the number of unpacked bytes you are expecting:
// Read the next source byte into n.
// If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.
// Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.
// Else if n is 128, noop.
// Endloop
// The RLE-compressed data is preceeded by a 2-byte data count for each row in the data,
// which we're going to just skip.
skip(s, h * channelCount * 2 );
// Read the RLE data by channel.
for (channel = 0; channel < 4; channel++) {
uint8 *p;
p = out+channel;
if (channel >= channelCount) {
// Fill this channel with default data.
for (i = 0; i < pixelCount; i++) *p = (channel == 3 ? 255 : 0), p += 4;
} else {
// Read the RLE data.
count = 0;
while (count < pixelCount) {
len = get8(s);
if (len == 128) {
// No-op.
} else if (len < 128) {
// Copy next len+1 bytes literally.
len++;
count += len;
while (len) {
*p = get8u(s);
p += 4;
len--;
}
} else if (len > 128) {
uint8 val;
// Next -len+1 bytes in the dest are replicated from next source byte.
// (Interpret len as a negative 8-bit int.)
len ^= 0x0FF;
len += 2;
val = get8u(s);
count += len;
while (len) {
*p = val;
p += 4;
len--;
}
}
}
}
}
} else {
// We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...)
// where each channel consists of an 8-bit value for each pixel in the image.
// Read the data by channel.
for (channel = 0; channel < 4; channel++) {
uint8 *p;
p = out + channel;
if (channel > channelCount) {
// Fill this channel with default data.
for (i = 0; i < pixelCount; i++) *p = channel == 3 ? 255 : 0, p += 4;
} else {
// Read the data.
for (i = 0; i < pixelCount; i++)
*p = get8u(s), p += 4;
}
}
}
if (req_comp && req_comp != 4) {
out = convert_format(out, 4, req_comp, w, h);
if (out == NULL) return out; // convert_format frees input on failure
}
if (comp) *comp = channelCount;
*y = h;
*x = w;
return out;
}
static stbi_uc *stbi_psd_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return psd_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// Softimage PIC loader
// by Tom Seddon
//
// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format
// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/
static int pic_is4(stbi *s,const char *str)
{
int i;
for (i=0; i<4; ++i)
if (get8(s) != (stbi_uc)str[i])
return 0;
return 1;
}
static int pic_test(stbi *s)
{
int i;
if (!pic_is4(s,"\x53\x80\xF6\x34"))
return 0;
for(i=0;i<84;++i)
get8(s);
if (!pic_is4(s,"PICT"))
return 0;
return 1;
}
typedef struct
{
stbi_uc size,type,channel;
} pic_packet_t;
static stbi_uc *pic_readval(stbi *s, int channel, stbi_uc *dest)
{
int mask=0x80, i;
for (i=0; i<4; ++i, mask>>=1) {
if (channel & mask) {
if (at_eof(s)) return epuc("bad file","PIC file too short");
dest[i]=get8u(s);
}
}
return dest;
}
static void pic_copyval(int channel,stbi_uc *dest,const stbi_uc *src)
{
int mask=0x80,i;
for (i=0;i<4; ++i, mask>>=1)
if (channel&mask)
dest[i]=src[i];
}
static stbi_uc *pic_load2(stbi *s,int width,int height,int *comp, stbi_uc *result)
{
int act_comp=0,num_packets=0,y,chained;
pic_packet_t packets[10];
// this will (should...) cater for even some bizarre stuff like having data
// for the same channel in multiple packets.
do {
pic_packet_t *packet;
if (num_packets==sizeof(packets)/sizeof(packets[0]))
return epuc("bad format","too many packets");
packet = &packets[num_packets++];
chained = get8(s);
packet->size = get8u(s);
packet->type = get8u(s);
packet->channel = get8u(s);
act_comp |= packet->channel;
if (at_eof(s)) return epuc("bad file","file too short (reading packets)");
if (packet->size != 8) return epuc("bad format","packet isn't 8bpp");
} while (chained);
*comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel?
for(y=0; y<height; ++y) {
int packet_idx;
for(packet_idx=0; packet_idx < num_packets; ++packet_idx) {
pic_packet_t *packet = &packets[packet_idx];
stbi_uc *dest = result+y*width*4;
switch (packet->type) {
default:
return epuc("bad format","packet has bad compression type");
case 0: {//uncompressed
int x;
for(x=0;x<width;++x, dest+=4)
if (!pic_readval(s,packet->channel,dest))
return 0;
break;
}
case 1://Pure RLE
{
int left=width, i;
while (left>0) {
stbi_uc count,value[4];
count=get8u(s);
if (at_eof(s)) return epuc("bad file","file too short (pure read count)");
if (count > left)
count = (uint8) left;
if (!pic_readval(s,packet->channel,value)) return 0;
for(i=0; i<count; ++i,dest+=4)
pic_copyval(packet->channel,dest,value);
left -= count;
}
}
break;
case 2: {//Mixed RLE
int left=width;
while (left>0) {
int count = get8(s), i;
if (at_eof(s)) return epuc("bad file","file too short (mixed read count)");
if (count >= 128) { // Repeated
stbi_uc value[4];
int i;
if (count==128)
count = get16(s);
else
count -= 127;
if (count > left)
return epuc("bad file","scanline overrun");
if (!pic_readval(s,packet->channel,value))
return 0;
for(i=0;i<count;++i, dest += 4)
pic_copyval(packet->channel,dest,value);
} else { // Raw
++count;
if (count>left) return epuc("bad file","scanline overrun");
for(i=0;i<count;++i, dest+=4)
if (!pic_readval(s,packet->channel,dest))
return 0;
}
left-=count;
}
break;
}
}
}
}
return result;
}
static stbi_uc *pic_load(stbi *s,int *px,int *py,int *comp,int req_comp)
{
stbi_uc *result;
int i, x,y;
for (i=0; i<92; ++i)
get8(s);
x = get16(s);
y = get16(s);
if (at_eof(s)) return epuc("bad file","file too short (pic header)");
if ((1 << 28) / x < y) return epuc("too large", "Image too large to decode");
get32(s); //skip `ratio'
get16(s); //skip `fields'
get16(s); //skip `pad'
// intermediate buffer is RGBA
result = (stbi_uc *) malloc(x*y*4);
memset(result, 0xff, x*y*4);
if (!pic_load2(s,x,y,comp, result)) {
free(result);
result=0;
}
*px = x;
*py = y;
if (req_comp == 0) req_comp = *comp;
result=convert_format(result,4,req_comp,x,y);
return result;
}
static int stbi_pic_test(stbi *s)
{
int r = pic_test(s);
stbi_rewind(s);
return r;
}
static stbi_uc *stbi_pic_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return pic_load(s,x,y,comp,req_comp);
}
// *************************************************************************************************
// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb
typedef struct stbi_gif_lzw_struct {
int16 prefix;
uint8 first;
uint8 suffix;
} stbi_gif_lzw;
typedef struct stbi_gif_struct
{
int w,h;
stbi_uc *out; // output buffer (always 4 components)
int flags, bgindex, ratio, transparent, eflags;
uint8 pal[256][4];
uint8 lpal[256][4];
stbi_gif_lzw codes[4096];
uint8 *color_table;
int parse, step;
int lflags;
int start_x, start_y;
int max_x, max_y;
int cur_x, cur_y;
int line_size;
} stbi_gif;
static int gif_test(stbi *s)
{
int sz;
if (get8(s) != 'G' || get8(s) != 'I' || get8(s) != 'F' || get8(s) != '8') return 0;
sz = get8(s);
if (sz != '9' && sz != '7') return 0;
if (get8(s) != 'a') return 0;
return 1;
}
static int stbi_gif_test(stbi *s)
{
int r = gif_test(s);
stbi_rewind(s);
return r;
}
static void stbi_gif_parse_colortable(stbi *s, uint8 pal[256][4], int num_entries, int transp)
{
int i;
for (i=0; i < num_entries; ++i) {
pal[i][2] = get8u(s);
pal[i][1] = get8u(s);
pal[i][0] = get8u(s);
pal[i][3] = transp ? 0 : 255;
}
}
static int stbi_gif_header(stbi *s, stbi_gif *g, int *comp, int is_info)
{
uint8 version;
if (get8(s) != 'G' || get8(s) != 'I' || get8(s) != 'F' || get8(s) != '8')
return e("not GIF", "Corrupt GIF");
version = get8u(s);
if (version != '7' && version != '9') return e("not GIF", "Corrupt GIF");
if (get8(s) != 'a') return e("not GIF", "Corrupt GIF");
failure_reason = "";
g->w = get16le(s);
g->h = get16le(s);
g->flags = get8(s);
g->bgindex = get8(s);
g->ratio = get8(s);
g->transparent = -1;
if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
if (is_info) return 1;
if (g->flags & 0x80)
stbi_gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
return 1;
}
static int stbi_gif_info_raw(stbi *s, int *x, int *y, int *comp)
{
stbi_gif g;
if (!stbi_gif_header(s, &g, comp, 1)) {
stbi_rewind( s );
return 0;
}
if (x) *x = g.w;
if (y) *y = g.h;
return 1;
}
static void stbi_out_gif_code(stbi_gif *g, uint16 code)
{
uint8 *p, *c;
// recurse to decode the prefixes, since the linked-list is backwards,
// and working backwards through an interleaved image would be nasty
if (g->codes[code].prefix >= 0)
stbi_out_gif_code(g, g->codes[code].prefix);
if (g->cur_y >= g->max_y) return;
p = &g->out[g->cur_x + g->cur_y];
c = &g->color_table[g->codes[code].suffix * 4];
if (c[3] >= 128) {
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
g->cur_x += 4;
if (g->cur_x >= g->max_x) {
g->cur_x = g->start_x;
g->cur_y += g->step;
while (g->cur_y >= g->max_y && g->parse > 0) {
g->step = (1 << g->parse) * g->line_size;
g->cur_y = g->start_y + (g->step >> 1);
--g->parse;
}
}
}
static uint8 *stbi_process_gif_raster(stbi *s, stbi_gif *g)
{
uint8 lzw_cs;
int32 len, code;
uint32 first;
int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
stbi_gif_lzw *p;
lzw_cs = get8u(s);
clear = 1 << lzw_cs;
first = 1;
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
bits = 0;
valid_bits = 0;
for (code = 0; code < clear; code++) {
g->codes[code].prefix = -1;
g->codes[code].first = (uint8) code;
g->codes[code].suffix = (uint8) code;
}
// support no starting clear code
avail = clear+2;
oldcode = -1;
len = 0;
for(;;) {
if (valid_bits < codesize) {
if (len == 0) {
len = get8(s); // start new block
if (len == 0)
return g->out;
}
--len;
bits |= (int32) get8(s) << valid_bits;
valid_bits += 8;
} else {
int32 code = bits & codemask;
bits >>= codesize;
valid_bits -= codesize;
// @OPTIMIZE: is there some way we can accelerate the non-clear path?
if (code == clear) { // clear code
codesize = lzw_cs + 1;
codemask = (1 << codesize) - 1;
avail = clear + 2;
oldcode = -1;
first = 0;
} else if (code == clear + 1) { // end of stream code
skip(s, len);
while ((len = get8(s)) > 0)
skip(s,len);
return g->out;
} else if (code <= avail) {
if (first) return epuc("no clear code", "Corrupt GIF");
if (oldcode >= 0) {
p = &g->codes[avail++];
if (avail > 4096) return epuc("too many codes", "Corrupt GIF");
p->prefix = (int16) oldcode;
p->first = g->codes[oldcode].first;
p->suffix = (code == avail) ? p->first : g->codes[code].first;
} else if (code == avail)
return epuc("illegal code in raster", "Corrupt GIF");
stbi_out_gif_code(g, (uint16) code);
if ((avail & codemask) == 0 && avail <= 0x0FFF) {
codesize++;
codemask = (1 << codesize) - 1;
}
oldcode = code;
} else {
return epuc("illegal code in raster", "Corrupt GIF");
}
}
}
}
static void stbi_fill_gif_background(stbi_gif *g)
{
int i;
uint8 *c = g->pal[g->bgindex];
// @OPTIMIZE: write a dword at a time
for (i = 0; i < g->w * g->h * 4; i += 4) {
uint8 *p = &g->out[i];
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
}
// this function is designed to support animated gifs, although stb_image doesn't support it
static uint8 *stbi_gif_load_next(stbi *s, stbi_gif *g, int *comp, int req_comp)
{
int i;
uint8 *old_out = 0;
if (g->out == 0) {
if (!stbi_gif_header(s, g, comp,0)) return 0; // failure_reason set by stbi_gif_header
g->out = (uint8 *) malloc(4 * g->w * g->h);
if (g->out == 0) return epuc("outofmem", "Out of memory");
stbi_fill_gif_background(g);
} else {
// animated-gif-only path
if (((g->eflags & 0x1C) >> 2) == 3) {
old_out = g->out;
g->out = (uint8 *) malloc(4 * g->w * g->h);
if (g->out == 0) return epuc("outofmem", "Out of memory");
memcpy(g->out, old_out, g->w*g->h*4);
}
}
for (;;) {
switch (get8(s)) {
case 0x2C: /* Image Descriptor */
{
int32 x, y, w, h;
uint8 *o;
x = get16le(s);
y = get16le(s);
w = get16le(s);
h = get16le(s);
if (((x + w) > (g->w)) || ((y + h) > (g->h)))
return epuc("bad Image Descriptor", "Corrupt GIF");
g->line_size = g->w * 4;
g->start_x = x * 4;
g->start_y = y * g->line_size;
g->max_x = g->start_x + w * 4;
g->max_y = g->start_y + h * g->line_size;
g->cur_x = g->start_x;
g->cur_y = g->start_y;
g->lflags = get8(s);
if (g->lflags & 0x40) {
g->step = 8 * g->line_size; // first interlaced spacing
g->parse = 3;
} else {
g->step = g->line_size;
g->parse = 0;
}
if (g->lflags & 0x80) {
stbi_gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1);
g->color_table = (uint8 *) g->lpal;
} else if (g->flags & 0x80) {
for (i=0; i < 256; ++i) // @OPTIMIZE: reset only the previous transparent
g->pal[i][3] = 255;
if (g->transparent >= 0 && (g->eflags & 0x01))
g->pal[g->transparent][3] = 0;
g->color_table = (uint8 *) g->pal;
} else
return epuc("missing color table", "Corrupt GIF");
o = stbi_process_gif_raster(s, g);
if (o == NULL) return NULL;
if (req_comp && req_comp != 4)
o = convert_format(o, 4, req_comp, g->w, g->h);
return o;
}
case 0x21: // Comment Extension.
{
int len;
if (get8(s) == 0xF9) { // Graphic Control Extension.
len = get8(s);
if (len == 4) {
g->eflags = get8(s);
get16le(s); // delay
g->transparent = get8(s);
} else {
skip(s, len);
break;
}
}
while ((len = get8(s)) != 0)
skip(s, len);
break;
}
case 0x3B: // gif stream termination code
return (uint8 *) 1;
default:
return epuc("unknown code", "Corrupt GIF");
}
}
}
static stbi_uc *stbi_gif_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
uint8 *u = 0;
stbi_gif g={0};
u = stbi_gif_load_next(s, &g, comp, req_comp);
if (u == (void *) 1) u = 0; // end of animated gif marker
if (u) {
*x = g.w;
*y = g.h;
}
return u;
}
static int stbi_gif_info(stbi *s, int *x, int *y, int *comp)
{
return stbi_gif_info_raw(s,x,y,comp);
}
// *************************************************************************************************
// Radiance RGBE HDR loader
// originally by Nicolas Schulz
#ifndef STBI_NO_HDR
static int hdr_test(stbi *s)
{
const char *signature = "#?RADIANCE\n";
int i;
for (i=0; signature[i]; ++i)
if (get8(s) != signature[i])
return 0;
return 1;
}
static int stbi_hdr_test(stbi* s)
{
int r = hdr_test(s);
stbi_rewind(s);
return r;
}
#define HDR_BUFLEN 1024
static char *hdr_gettoken(stbi *z, char *buffer)
{
int len=0;
char c = '\0';
c = (char) get8(z);
while (!at_eof(z) && c != '\n') {
buffer[len++] = c;
if (len == HDR_BUFLEN-1) {
// flush to end of line
while (!at_eof(z) && get8(z) != '\n')
;
break;
}
c = (char) get8(z);
}
buffer[len] = 0;
return buffer;
}
static void hdr_convert(float *output, stbi_uc *input, int req_comp)
{
if ( input[3] != 0 ) {
float f1;
// Exponent
f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8));
if (req_comp <= 2)
output[0] = (input[0] + input[1] + input[2]) * f1 / 3;
else {
output[0] = input[0] * f1;
output[1] = input[1] * f1;
output[2] = input[2] * f1;
}
if (req_comp == 2) output[1] = 1;
if (req_comp == 4) output[3] = 1;
} else {
switch (req_comp) {
case 4: output[3] = 1; /* fallthrough */
case 3: output[0] = output[1] = output[2] = 0;
break;
case 2: output[1] = 1; /* fallthrough */
case 1: output[0] = 0;
break;
}
}
}
static float *hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
char buffer[HDR_BUFLEN];
char *token;
int valid = 0;
int width, height;
stbi_uc *scanline;
float *hdr_data;
int len;
unsigned char count, value;
int i, j, k, c1,c2, z;
// Check identifier
if (strcmp(hdr_gettoken(s,buffer), "#?RADIANCE") != 0)
return epf("not HDR", "Corrupt HDR image");
// Parse header
for(;;) {
token = hdr_gettoken(s,buffer);
if (token[0] == 0) break;
if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
}
if (!valid) return epf("unsupported format", "Unsupported HDR format");
// Parse width and height
// can't use sscanf() if we're not using stdio!
token = hdr_gettoken(s,buffer);
if (strncmp(token, "-Y ", 3)) return epf("unsupported data layout", "Unsupported HDR format");
token += 3;
height = strtol(token, &token, 10);
while (*token == ' ') ++token;
if (strncmp(token, "+X ", 3)) return epf("unsupported data layout", "Unsupported HDR format");
token += 3;
width = strtol(token, NULL, 10);
*x = width;
*y = height;
*comp = 3;
if (req_comp == 0) req_comp = 3;
// Read data
hdr_data = (float *) malloc(height * width * req_comp * sizeof(float));
// Load image data
// image data is stored as some number of sca
if ( width < 8 || width >= 32768) {
// Read flat data
for (j=0; j < height; ++j) {
for (i=0; i < width; ++i) {
stbi_uc rgbe[4];
main_decode_loop:
getn(s, rgbe, 4);
hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
}
}
} else {
// Read RLE-encoded data
scanline = NULL;
for (j = 0; j < height; ++j) {
c1 = get8(s);
c2 = get8(s);
len = get8(s);
if (c1 != 2 || c2 != 2 || (len & 0x80)) {
// not run-length encoded, so we have to actually use THIS data as a decoded
// pixel (note this can't be a valid pixel--one of RGB must be >= 128)
uint8 rgbe[4];
rgbe[0] = (uint8) c1;
rgbe[1] = (uint8) c2;
rgbe[2] = (uint8) len;
rgbe[3] = (uint8) get8u(s);
hdr_convert(hdr_data, rgbe, req_comp);
i = 1;
j = 0;
free(scanline);
goto main_decode_loop; // yes, this makes no sense
}
len <<= 8;
len |= get8(s);
if (len != width) { free(hdr_data); free(scanline); return epf("invalid decoded scanline length", "corrupt HDR"); }
if (scanline == NULL) scanline = (stbi_uc *) malloc(width * 4);
for (k = 0; k < 4; ++k) {
i = 0;
while (i < width) {
count = get8u(s);
if (count > 128) {
// Run
value = get8u(s);
count -= 128;
for (z = 0; z < count; ++z)
scanline[i++ * 4 + k] = value;
} else {
// Dump
for (z = 0; z < count; ++z)
scanline[i++ * 4 + k] = get8u(s);
}
}
}
for (i=0; i < width; ++i)
hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp);
}
free(scanline);
}
return hdr_data;
}
static float *stbi_hdr_load(stbi *s, int *x, int *y, int *comp, int req_comp)
{
return hdr_load(s,x,y,comp,req_comp);
}
static int stbi_hdr_info(stbi *s, int *x, int *y, int *comp)
{
char buffer[HDR_BUFLEN];
char *token;
int valid = 0;
if (strcmp(hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
stbi_rewind( s );
return 0;
}
for(;;) {
token = hdr_gettoken(s,buffer);
if (token[0] == 0) break;
if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1;
}
if (!valid) {
stbi_rewind( s );
return 0;
}
token = hdr_gettoken(s,buffer);
if (strncmp(token, "-Y ", 3)) {
stbi_rewind( s );
return 0;
}
token += 3;
*y = strtol(token, &token, 10);
while (*token == ' ') ++token;
if (strncmp(token, "+X ", 3)) {
stbi_rewind( s );
return 0;
}
token += 3;
*x = strtol(token, NULL, 10);
*comp = 3;
return 1;
}
#endif // STBI_NO_HDR
static int stbi_bmp_info(stbi *s, int *x, int *y, int *comp)
{
int hsz;
if (get8(s) != 'B' || get8(s) != 'M') {
stbi_rewind( s );
return 0;
}
skip(s,12);
hsz = get32le(s);
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108) {
stbi_rewind( s );
return 0;
}
if (hsz == 12) {
*x = get16le(s);
*y = get16le(s);
} else {
*x = get32le(s);
*y = get32le(s);
}
if (get16le(s) != 1) {
stbi_rewind( s );
return 0;
}
*comp = get16le(s) / 8;
return 1;
}
static int stbi_psd_info(stbi *s, int *x, int *y, int *comp)
{
int channelCount;
if (get32(s) != 0x38425053) {
stbi_rewind( s );
return 0;
}
if (get16(s) != 1) {
stbi_rewind( s );
return 0;
}
skip(s, 6);
channelCount = get16(s);
if (channelCount < 0 || channelCount > 16) {
stbi_rewind( s );
return 0;
}
*y = get32(s);
*x = get32(s);
if (get16(s) != 8) {
stbi_rewind( s );
return 0;
}
if (get16(s) != 3) {
stbi_rewind( s );
return 0;
}
*comp = 4;
return 1;
}
static int stbi_pic_info(stbi *s, int *x, int *y, int *comp)
{
int act_comp=0,num_packets=0,chained;
pic_packet_t packets[10];
skip(s, 92);
*x = get16(s);
*y = get16(s);
if (at_eof(s)) return 0;
if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
stbi_rewind( s );
return 0;
}
skip(s, 8);
do {
pic_packet_t *packet;
if (num_packets==sizeof(packets)/sizeof(packets[0]))
return 0;
packet = &packets[num_packets++];
chained = get8(s);
packet->size = get8u(s);
packet->type = get8u(s);
packet->channel = get8u(s);
act_comp |= packet->channel;
if (at_eof(s)) {
stbi_rewind( s );
return 0;
}
if (packet->size != 8) {
stbi_rewind( s );
return 0;
}
} while (chained);
*comp = (act_comp & 0x10 ? 4 : 3);
return 1;
}
static int stbi_info_main(stbi *s, int *x, int *y, int *comp)
{
if (stbi_jpeg_info(s, x, y, comp))
return 1;
if (stbi_png_info(s, x, y, comp))
return 1;
if (stbi_gif_info(s, x, y, comp))
return 1;
if (stbi_bmp_info(s, x, y, comp))
return 1;
if (stbi_psd_info(s, x, y, comp))
return 1;
if (stbi_pic_info(s, x, y, comp))
return 1;
#ifndef STBI_NO_HDR
if (stbi_hdr_info(s, x, y, comp))
return 1;
#endif
// test tga last because it's a crappy test!
if (stbi_tga_info(s, x, y, comp))
return 1;
return e("unknown image type", "Image not of any known type, or corrupt");
}
#ifndef STBI_NO_STDIO
int stbi_info(char const *filename, int *x, int *y, int *comp)
{
FILE *f = fopen(filename, "rb");
int result;
if (!f) return e("can't fopen", "Unable to open file");
result = stbi_info_from_file(f, x, y, comp);
fclose(f);
return result;
}
int stbi_info_from_file(FILE *f, int *x, int *y, int *comp)
{
int r;
stbi s;
long pos = ftell(f);
start_file(&s, f);
r = stbi_info_main(&s,x,y,comp);
fseek(f,pos,SEEK_SET);
return r;
}
#endif // !STBI_NO_STDIO
int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp)
{
stbi s;
start_mem(&s,buffer,len);
return stbi_info_main(&s,x,y,comp);
}
int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp)
{
stbi s;
start_callbacks(&s, (stbi_io_callbacks *) c, user);
return stbi_info_main(&s,x,y,comp);
}
#endif // STBI_HEADER_FILE_ONLY
/*
revision history:
1.33 (2011-07-14)
make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements
1.32 (2011-07-13)
support for "info" function for all supported filetypes (SpartanJ)
1.31 (2011-06-20)
a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11)
added ability to load files via callbacks to accomidate custom input streams (Ben Wenger)
removed deprecated format-specific test/load functions
removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway
error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha)
fix inefficiency in decoding 32-bit BMP (David Woo)
1.29 (2010-08-16)
various warning fixes from Aurelien Pocheville
1.28 (2010-08-01)
fix bug in GIF palette transparency (SpartanJ)
1.27 (2010-08-01)
cast-to-uint8 to fix warnings
1.26 (2010-07-24)
fix bug in file buffering for PNG reported by SpartanJ
1.25 (2010-07-17)
refix trans_data warning (Won Chun)
1.24 (2010-07-12)
perf improvements reading from files on platforms with lock-heavy fgetc()
minor perf improvements for jpeg
deprecated type-specific functions so we'll get feedback if they're needed
attempt to fix trans_data warning (Won Chun)
1.23 fixed bug in iPhone support
1.22 (2010-07-10)
removed image *writing* support
stbi_info support from Jetro Lauha
GIF support from Jean-Marc Lienher
iPhone PNG-extensions from James Brown
warning-fixes from Nicolas Schulz and Janez Zemva (i.e. Janez (U+017D)emva)
1.21 fix use of 'uint8' in header (reported by jon blow)
1.20 added support for Softimage PIC, by Tom Seddon
1.19 bug in interlaced PNG corruption check (found by ryg)
1.18 2008-08-02
fix a threading bug (local mutable static)
1.17 support interlaced PNG
1.16 major bugfix - convert_format converted one too many pixels
1.15 initialize some fields for thread safety
1.14 fix threadsafe conversion bug
header-file-only version (#define STBI_HEADER_FILE_ONLY before including)
1.13 threadsafe
1.12 const qualifiers in the API
1.11 Support installable IDCT, colorspace conversion routines
1.10 Fixes for 64-bit (don't use "unsigned long")
optimized upsampling by Fabian "ryg" Giesen
1.09 Fix format-conversion for PSD code (bad global variables!)
1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz
1.07 attempt to fix C++ warning/errors again
1.06 attempt to fix C++ warning/errors again
1.05 fix TGA loading to return correct *comp and use good luminance calc
1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free
1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR
1.02 support for (subset of) HDR files, float interface for preferred access to them
1.01 fix bug: possible bug in handling right-side up bmps... not sure
fix bug: the stbi_bmp_load() and stbi_tga_load() functions didn't work at all
1.00 interface to zlib that skips zlib header
0.99 correct handling of alpha in palette
0.98 TGA loader by lonesock; dynamically add loaders (untested)
0.97 jpeg errors on too large a file; also catch another malloc failure
0.96 fix detection of invalid v value - particleman@mollyrocket forum
0.95 during header scan, seek to markers in case of padding
0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same
0.93 handle jpegtran output; verbose errors
0.92 read 4,8,16,24,32-bit BMP files of several formats
0.91 output 24-bit Windows 3.0 BMP files
0.90 fix a few more warnings; bump version number to approach 1.0
0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd
0.60 fix compiling as c++
0.59 fix warnings: merge Dave Moore's -Wall fixes
0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian
0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available
0.56 fix bug: zlib uncompressed mode len vs. nlen
0.55 fix bug: restart_interval not initialized to 0
0.54 allow NULL for 'int *comp'
0.53 fix bug in png 3->4; speedup png decoding
0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments
0.51 obey req_comp requests, 1-component jpegs return as 1-component,
on 'test' only check type, not whether we support this variant
0.50 first released version
*/
|
the_stack_data/140765464.c
|
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
int binarySearch(int* a, int n, int k) {
int lo = 0;
int hi = n-1;
int m;
while(lo <= hi) {
m = (lo + hi) / 2;
#ifdef PREFETCH
__builtin_prefetch (&a[(m+1+hi)/2], 0, 1);
__builtin_prefetch (&a[(lo+m-1)/2], 0, 1);
#endif
if(a[m] < k) lo = m + 1;
else if(a[m] == k) return m;
else if(a[m] > k) hi = m - 1;
}
return -1;
}
int main() {
int n = 1024*1024*512, *a = malloc(n*sizeof(int)), i, res;
for (i = 0; i < n; i++) a[i] = i;
int nl = 1024*1024*8;
srand(time(NULL));
int *lookups = malloc(nl * sizeof(int));
for (i=0;i<nl;i++){
lookups[i] = rand() % n;
}
for (i = 0; i<nl; i++) res = binarySearch(a, n, lookups[i]);
free(a);
free(lookups);
return 0;
}
|
the_stack_data/536877.c
|
#include <stdio.h>
/* print Fahrenheit-Celsius table */
int main()
{
int fahr;
for (fahr = 0; fahr <= 300; fahr = fahr + 20)
printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32));
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.