aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-03 00:39:04 +0000
commitd3d057390c26ce35b54750705377c4d3ff4e42bd (patch)
treea04b5ab1a5d778cb8c4239d8cac88ef1a5ebba5d
parent9a2130e9dec6e913af3b75006c23feb0520d6814 (diff)
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--agi/eagi-sphinx-test.c15
-rw-r--r--agi/eagi-test.c8
-rw-r--r--apps/app_adsiprog.c4
-rw-r--r--apps/app_authenticate.c4
-rw-r--r--apps/app_chanspy.c8
-rw-r--r--apps/app_dial.c10
-rw-r--r--apps/app_festival.c27
-rw-r--r--apps/app_queue.c10
-rw-r--r--apps/app_sms.c4
-rw-r--r--apps/app_stack.c10
-rw-r--r--apps/app_voicemail.c4
-rw-r--r--channels/chan_dahdi.c18
-rw-r--r--channels/chan_h323.c2
-rw-r--r--channels/chan_iax2.c13
-rw-r--r--channels/chan_oss.c13
-rw-r--r--channels/chan_sip.c5
-rw-r--r--formats/format_gsm.c4
-rw-r--r--formats/format_ogg_vorbis.c16
-rw-r--r--formats/format_wav.c7
-rw-r--r--formats/format_wav_gsm.c4
-rw-r--r--funcs/func_odbc.c64
-rw-r--r--main/ast_expr2f.c2346
-rw-r--r--main/asterisk.c66
-rw-r--r--main/channel.c16
-rw-r--r--main/db1-ast/hash/hash_page.c10
-rw-r--r--main/file.c24
-rw-r--r--main/http.c20
-rw-r--r--main/logger.c4
-rw-r--r--main/manager.c4
-rw-r--r--main/utils.c7
-rw-r--r--pbx/pbx_config.c10
-rw-r--r--pbx/pbx_dundi.c9
-rw-r--r--pbx/pbx_lua.c4
-rw-r--r--res/ael/ael.flex8
-rw-r--r--res/ael/ael.tab.c326
-rw-r--r--res/ael/ael.y124
-rw-r--r--res/ael/ael_lex.c101
-rw-r--r--res/res_agi.c3
-rw-r--r--res/res_crypto.c10
-rw-r--r--res/res_jabber.c9
-rw-r--r--res/res_musiconhold.c20
-rw-r--r--res/res_phoneprov.c4
-rw-r--r--utils/astcanary.c4
-rw-r--r--utils/astman.c11
-rw-r--r--utils/frame.c262
-rw-r--r--utils/muted.c9
-rw-r--r--utils/stereorize.c8
-rw-r--r--utils/streamplayer.c7
48 files changed, 2913 insertions, 763 deletions
diff --git a/agi/eagi-sphinx-test.c b/agi/eagi-sphinx-test.c
index d2898763c..4d13db507 100644
--- a/agi/eagi-sphinx-test.c
+++ b/agi/eagi-sphinx-test.c
@@ -79,7 +79,9 @@ static int read_environment(void)
char *val;
/* Read environment */
for(;;) {
- fgets(buf, sizeof(buf), stdin);
+ if (!fgets(buf, sizeof(buf), stdin)) {
+ return -1;
+ }
if (feof(stdin))
return -1;
buf[strlen(buf) - 1] = '\0';
@@ -130,7 +132,9 @@ static char *wait_result(void)
return NULL;
}
if (FD_ISSET(STDIN_FILENO, &fds)) {
- fgets(astresp, sizeof(astresp), stdin);
+ if (!fgets(astresp, sizeof(astresp), stdin)) {
+ return NULL;
+ }
if (feof(stdin)) {
fprintf(stderr, "Got hungup on apparently\n");
return NULL;
@@ -141,9 +145,10 @@ static char *wait_result(void)
}
if (FD_ISSET(AUDIO_FILENO, &fds)) {
res = read(AUDIO_FILENO, audiobuf, sizeof(audiobuf));
- if (res > 0) {
- if (sphinx_sock > -1)
- write(sphinx_sock, audiobuf, res);
+ if ((res > 0) && (sphinx_sock > -1)) {
+ if (write(sphinx_sock, audiobuf, res) < 0) {
+ fprintf(stderr, "write() failed: %s\n", strerror(errno));
+ }
}
}
if ((sphinx_sock > -1) && FD_ISSET(sphinx_sock, &fds)) {
diff --git a/agi/eagi-test.c b/agi/eagi-test.c
index 704fd7b22..c40b85d1e 100644
--- a/agi/eagi-test.c
+++ b/agi/eagi-test.c
@@ -24,7 +24,9 @@ static int read_environment(void)
char *val;
/* Read environment */
for(;;) {
- fgets(buf, sizeof(buf), stdin);
+ if (!fgets(buf, sizeof(buf), stdin)) {
+ return -1;
+ }
if (feof(stdin))
return -1;
buf[strlen(buf) - 1] = '\0';
@@ -68,7 +70,9 @@ static char *wait_result(void)
return NULL;
}
if (FD_ISSET(STDIN_FILENO, &fds)) {
- fgets(astresp, sizeof(astresp), stdin);
+ if (!fgets(astresp, sizeof(astresp), stdin)) {
+ return NULL;
+ }
if (feof(stdin)) {
fprintf(stderr, "Got hungup on apparently\n");
return NULL;
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index 63be6bf06..0a22cae41 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -1369,7 +1369,9 @@ static struct adsi_script *compile_script(char *script)
/* Create "main" as first subroutine */
getsubbyname(scr, "main", NULL, 0);
while (!feof(f)) {
- fgets(buf, sizeof(buf), f);
+ if (!fgets(buf, sizeof(buf), f)) {
+ continue;
+ }
if (!feof(f)) {
lineno++;
/* Trim off trailing return */
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index 8e1919594..e746c6511 100644
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -151,7 +151,9 @@ static int auth_exec(struct ast_channel *chan, void *data)
if (feof(f))
break;
- fgets(buf, sizeof(buf), f);
+ if (!fgets(buf, sizeof(buf), f)) {
+ continue;
+ }
if (ast_strlen_zero(buf))
continue;
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 9d606ec7b..0a0972b41 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -34,6 +34,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <ctype.h>
+#include <errno.h>
#include "asterisk/paths.h" /* use ast_config_AST_MONITOR_DIR */
#include "asterisk/file.h"
@@ -212,8 +213,11 @@ static int spy_generate(struct ast_channel *chan, void *data, int len, int sampl
return -1;
}
- if (csth->fd)
- write(csth->fd, f->data, f->datalen);
+ if (csth->fd) {
+ if (write(csth->fd, f->data, f->datalen) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
ast_frfree(f);
diff --git a/apps/app_dial.c b/apps/app_dial.c
index fa98e4633..25776c0f4 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1762,10 +1762,16 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
gosub_argstart = strchr(opt_args[OPT_ARG_CALLEE_GOSUB], ',');
if (gosub_argstart) {
*gosub_argstart = 0;
- asprintf(&gosub_args, "%s,s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1);
+ if (asprintf(&gosub_args, "%s,s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
*gosub_argstart = ',';
} else {
- asprintf(&gosub_args, "%s,s,1", opt_args[OPT_ARG_CALLEE_GOSUB]);
+ if (asprintf(&gosub_args, "%s,s,1", opt_args[OPT_ARG_CALLEE_GOSUB]) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
}
if (gosub_args) {
diff --git a/apps/app_festival.c b/apps/app_festival.c
index e788291ed..4e1e47e8a 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -38,6 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <signal.h>
#include <fcntl.h>
#include <ctype.h>
+#include <errno.h>
#include "asterisk/file.h"
#include "asterisk/channel.h"
@@ -148,7 +149,11 @@ static int send_waveform_to_fd(char *waveform, int length, int fd)
*(waveform + x) = c;
}
#endif
- write(fd, waveform, length);
+
+ if (write(fd, waveform, length) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+
close(fd);
exit(0);
}
@@ -421,17 +426,25 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
writecache = 1;
strln = strlen(args.text);
ast_debug(1, "line length : %d\n", strln);
- write(fdesc, &strln, sizeof(strln));
- write(fdesc, args.text, strln);
+ if (write(fdesc,&strln,sizeof(int)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ if (write(fdesc,data,strln) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
seekpos = lseek(fdesc, 0, SEEK_CUR);
ast_debug(1, "Seek position : %d\n", seekpos);
}
} else {
- read(fdesc, &strln, sizeof(strln));
+ if (read(fdesc,&strln,sizeof(int)) != sizeof(int)) {
+ ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+ }
ast_debug(1, "Cache file exists, strln=%d, strlen=%d\n", strln, (int)strlen(args.text));
if (strlen(args.text) == strln) {
ast_debug(1, "Size OK\n");
- read(fdesc, &bigstring, strln);
+ if (read(fdesc,&bigstring,strln) != strln) {
+ ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+ }
bigstring[strln] = 0;
if (strcmp(bigstring, args.text) == 0) {
readcache = 1;
@@ -461,7 +474,9 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
if (writecache == 1) {
ast_debug(1, "Writing result to cache...\n");
while ((strln = read(fd, buffer, 16384)) != 0) {
- write(fdesc, buffer, strln);
+ if (write(fdesc,buffer,strln) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
}
close(fd);
close(fdesc);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 66c0bb614..7f7f0db4a 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3750,10 +3750,16 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
gosub_argstart = strchr(gosubexec, ',');
if (gosub_argstart) {
*gosub_argstart = 0;
- asprintf(&gosub_args, "%s,s,1(%s)", gosubexec, gosub_argstart + 1);
+ if (asprintf(&gosub_args, "%s,s,1(%s)", gosubexec, gosub_argstart + 1) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
*gosub_argstart = '|';
} else {
- asprintf(&gosub_args, "%s,s,1", gosubexec);
+ if (asprintf(&gosub_args, "%s,s,1", gosubexec) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
}
if (gosub_args) {
res = pbx_exec(qe->chan, app, gosub_args);
diff --git a/apps/app_sms.c b/apps/app_sms.c
index 3f5211f1d..a11244fc9 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -745,7 +745,9 @@ static void sms_log(sms_t * h, char status)
}
*p++ = '\n';
*p = 0;
- write(o, line, strlen(line));
+ if (write(o, line, strlen(line)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
close(o);
}
*h->oa = *h->da = h->udl = 0;
diff --git a/apps/app_stack.c b/apps/app_stack.c
index f452f8de2..e3b9a5280 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -426,9 +426,15 @@ static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **arg
* call a Gosub for the CALLEE channel in Dial or Queue.
*/
if (argc == 5) {
- asprintf(&gosub_args, "%s,%s,%d(%s)", argv[1], argv[2], priority + 1, argv[4]);
+ if (asprintf(&gosub_args, "%s,%s,%d(%s)", argv[1], argv[2], priority + 1, argv[4]) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
} else {
- asprintf(&gosub_args, "%s,%s,%d", argv[1], argv[2], priority + 1);
+ if (asprintf(&gosub_args, "%s,%s,%d", argv[1], argv[2], priority + 1) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ gosub_args = NULL;
+ }
}
if (gosub_args) {
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 5eff1c324..2af30be52 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4771,7 +4771,9 @@ static int has_voicemail(const char *mailbox, const char *folder)
f = fopen(fn2, "r");
if (f) {
while (!feof(f)) {
- fgets((char *)buf, sizeof(buf), f);
+ if (!fgets((char *)buf, sizeof(buf), f)) {
+ continue;
+ }
if (!feof(f)) {
char *stringp = NULL;
stringp = (char *)buf;
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 6c1e4f4d1..bf75d8371 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -10079,8 +10079,11 @@ static void dahdi_pri_message(struct pri *pri, char *s)
ast_mutex_lock(&pridebugfdlock);
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+ if (pridebugfd >= 0) {
+ if (write(pridebugfd, s, strlen(s)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
ast_mutex_unlock(&pridebugfdlock);
}
@@ -10115,8 +10118,11 @@ static void dahdi_pri_error(struct pri *pri, char *s)
ast_mutex_lock(&pridebugfdlock);
- if (pridebugfd >= 0)
- write(pridebugfd, s, strlen(s));
+ if (pridebugfd >= 0) {
+ if (write(pridebugfd, s, strlen(s)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
ast_mutex_unlock(&pridebugfdlock);
}
@@ -11417,7 +11423,9 @@ static char *complete_span_helper(const char *line, const char *word, int pos, i
for (which = span = 0; span < NUM_SPANS; span++) {
if (pris[span].pri && ++which > state) {
- asprintf(&ret, "%d", span + 1); /* user indexes start from 1 */
+ if (asprintf(&ret, "%d", span + 1) < 0) { /* user indexes start from 1 */
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ }
break;
}
}
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 1f0ca6d4d..26cf3a6b8 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -1251,7 +1251,7 @@ static struct oh323_alias *realtime_alias(const char *alias)
static int update_common_options(struct ast_variable *v, struct call_options *options)
{
- int tmp;
+ int tmp = 0;
char *val, *opt;
if (!strcasecmp(v->name, "allow")) {
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index aea0c5b7a..86fb35cf6 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6537,8 +6537,10 @@ static int complete_dpreply(struct chan_iax2_pvt *pvt, struct iax_ies *ies)
}
/* Wake up waiters */
for (x = 0; x < ARRAY_LEN(dp->waiters); x++) {
- if (dp->waiters[x] > -1)
- write(dp->waiters[x], "asdf", 4);
+ if (dp->waiters[x] > -1) {
+ if (write(dp->waiters[x], "asdf", 4) < 0) {
+ }
+ }
}
}
AST_LIST_TRAVERSE_SAFE_END;
@@ -11511,8 +11513,11 @@ static struct iax2_dpcache *find_cache(struct ast_channel *chan, const char *dat
systems without leaving it unavailable once the server comes back online */
dp->expiry.tv_sec = dp->orig.tv_sec + 60;
for (x = 0; x < ARRAY_LEN(dp->waiters); x++) {
- if (dp->waiters[x] > -1)
- write(dp->waiters[x], "asdf", 4);
+ if (dp->waiters[x] > -1) {
+ if (write(dp->waiters[x], "asdf", 4) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
}
}
}
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 796a8f4a0..f42170539 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -1375,10 +1375,15 @@ static struct chan_oss_pvt *store_config(struct ast_config *cfg, char *ctg)
if (o->mixer_cmd) {
char *cmd;
- asprintf(&cmd, "mixer %s", o->mixer_cmd);
- ast_log(LOG_WARNING, "running [%s]\n", cmd);
- system(cmd);
- ast_free(cmd);
+ if (asprintf(&cmd, "mixer %s", o->mixer_cmd) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ } else {
+ ast_log(LOG_WARNING, "running [%s]\n", cmd);
+ if (system(cmd) < 0) {
+ ast_log(LOG_WARNING, "system() failed: %s\n", strerror(errno));
+ }
+ ast_free(cmd);
+ }
}
if (o == &oss_default) /* we are done with the default */
return NULL;
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c3d9f7a8b..12e1e777d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -20741,8 +20741,9 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
if (!ast_strlen_zero(callback)) { /* build string from peer info */
char *reg_string;
- asprintf(&reg_string, "%s:%s@%s/%s", peer->username, peer->secret, peer->tohost, callback);
- if (reg_string) {
+ if (asprintf(&reg_string, "%s:%s@%s/%s", peer->username, peer->secret, peer->tohost, callback) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ } else if (reg_string) {
sip_register(reg_string, 0); /* XXX TODO: count in registry_count */
ast_free(reg_string);
}
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index d43844e64..d8a0813b6 100644
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -126,7 +126,9 @@ static int gsm_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
int i;
fseeko(fs->f, 0, SEEK_END);
for (i=0; i< (offset - max) / GSM_FRAME_SIZE; i++) {
- fwrite(gsm_silence, 1, GSM_FRAME_SIZE, fs->f);
+ if (!fwrite(gsm_silence, 1, GSM_FRAME_SIZE, fs->f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
}
}
return fseeko(fs->f, offset, SEEK_SET);
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index 669e96a7d..c2dc977b6 100644
--- a/formats/format_ogg_vorbis.c
+++ b/formats/format_ogg_vorbis.c
@@ -225,8 +225,12 @@ static int ogg_vorbis_rewrite(struct ast_filestream *s,
while (!tmp->eos) {
if (ogg_stream_flush(&tmp->os, &tmp->og) == 0)
break;
- fwrite(tmp->og.header, 1, tmp->og.header_len, s->f);
- fwrite(tmp->og.body, 1, tmp->og.body_len, s->f);
+ if (!fwrite(tmp->og.header, 1, tmp->og.header_len, s->f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
+ if (!fwrite(tmp->og.body, 1, tmp->og.body_len, s->f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
if (ogg_page_eos(&tmp->og))
tmp->eos = 1;
}
@@ -251,8 +255,12 @@ static void write_stream(struct vorbis_desc *s, FILE *f)
if (ogg_stream_pageout(&s->os, &s->og) == 0) {
break;
}
- fwrite(s->og.header, 1, s->og.header_len, f);
- fwrite(s->og.body, 1, s->og.body_len, f);
+ if (!fwrite(s->og.header, 1, s->og.header_len, f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
+ if (!fwrite(s->og.body, 1, s->og.body_len, f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
if (ogg_page_eos(&s->og)) {
s->eos = 1;
}
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 2a40dedbd..856c28c1d 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -329,8 +329,11 @@ static void wav_close(struct ast_filestream *s)
char zero = 0;
struct wav_desc *fs = (struct wav_desc *)s->_private;
/* Pad to even length */
- if (fs->bytes & 0x1)
- fwrite(&zero, 1, 1, s->f);
+ if (fs->bytes & 0x1) {
+ if (!fwrite(&zero, 1, 1, s->f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
+ }
}
static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index aa576195c..15c0381fe 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -496,7 +496,9 @@ static int wav_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
int i;
fseek(fs->f, 0, SEEK_END);
for (i=0; i< (offset - max) / MSGSM_FRAME_SIZE; i++) {
- fwrite(msgsm_silence, 1, MSGSM_FRAME_SIZE, fs->f);
+ if (!fwrite(msgsm_silence, 1, MSGSM_FRAME_SIZE, fs->f)) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
}
}
s->secondhalf = 0;
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 13701873f..c8e8760e6 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -592,6 +592,7 @@ static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_qu
{
const char *tmp;
int i;
+ int res;
if (!cfg || !catg) {
return EINVAL;
@@ -681,9 +682,13 @@ static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_qu
}
if ((tmp = ast_variable_retrieve(cfg, catg, "prefix")) && !ast_strlen_zero(tmp)) {
- asprintf((char **)&((*query)->acf->name), "%s_%s", tmp, catg);
+ if (asprintf((char **)&((*query)->acf->name), "%s_%s", tmp, catg) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ }
} else {
- asprintf((char **)&((*query)->acf->name), "ODBC_%s", catg);
+ if (asprintf((char **)&((*query)->acf->name), "ODBC_%s", catg) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ }
}
if (!((*query)->acf->name)) {
@@ -693,7 +698,10 @@ static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_qu
return ENOMEM;
}
- asprintf((char **)&((*query)->acf->syntax), "%s(<arg1>[...[,<argN>]])", (*query)->acf->name);
+ if (asprintf((char **)&((*query)->acf->syntax), "%s(<arg1>[...[,<argN>]])", (*query)->acf->name) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ (*query)->acf->syntax = NULL;
+ }
if (!((*query)->acf->syntax)) {
ast_free((char *)(*query)->acf->name);
@@ -704,29 +712,31 @@ static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_qu
}
(*query)->acf->synopsis = "Runs the referenced query with the specified arguments";
+
+ res = 0;
if (!ast_strlen_zero((*query)->sql_read) && !ast_strlen_zero((*query)->sql_write)) {
- asprintf((char **)&((*query)->acf->desc),
- "Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
- "${ARG2}, ... ${ARGn}. When setting the function, the values are provided\n"
- "either in whole as ${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
- "\nRead:\n%s\n\nWrite:\n%s\n",
- (*query)->sql_read,
- (*query)->sql_write);
+ res = asprintf((char **)&((*query)->acf->desc),
+ "Runs the following query, as defined in func_odbc.conf, performing\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "${ARG2}, ... ${ARGn}. When setting the function, the values are provided\n"
+ "either in whole as ${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
+ "\nRead:\n%s\n\nWrite:\n%s\n",
+ (*query)->sql_read,
+ (*query)->sql_write);
} else if (!ast_strlen_zero((*query)->sql_read)) {
- asprintf((char **)&((*query)->acf->desc),
- "Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
- "${ARG2}, ... ${ARGn}. This function may only be read, not set.\n\nSQL:\n%s\n",
- (*query)->sql_read);
+ res = asprintf((char **)&((*query)->acf->desc),
+ "Runs the following query, as defined in func_odbc.conf, performing\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "${ARG2}, ... ${ARGn}. This function may only be read, not set.\n\nSQL:\n%s\n",
+ (*query)->sql_read);
} else if (!ast_strlen_zero((*query)->sql_write)) {
- asprintf((char **)&((*query)->acf->desc),
- "Runs the following query, as defined in func_odbc.conf, performing\n"
- "substitution of the arguments into the query as specified by ${ARG1},\n"
- "${ARG2}, ... ${ARGn}. The values are provided either in whole as\n"
- "${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
- "This function may only be set.\nSQL:\n%s\n",
- (*query)->sql_write);
+ res = asprintf((char **)&((*query)->acf->desc),
+ "Runs the following query, as defined in func_odbc.conf, performing\n"
+ "substitution of the arguments into the query as specified by ${ARG1},\n"
+ "${ARG2}, ... ${ARGn}. The values are provided either in whole as\n"
+ "${VALUE} or parsed as ${VAL1}, ${VAL2}, ... ${VALn}.\n"
+ "This function may only be set.\nSQL:\n%s\n",
+ (*query)->sql_write);
} else {
ast_free((char *)(*query)->acf->syntax);
ast_free((char *)(*query)->acf->name);
@@ -736,7 +746,13 @@ static int init_acf_query(struct ast_config *cfg, char *catg, struct acf_odbc_qu
return EINVAL;
}
- if (! ((*query)->acf->desc)) {
+ if (res < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ (*query)->acf->desc = NULL;
+ }
+
+
+ if (!((*query)->acf->desc)) {
ast_free((char *)(*query)->acf->syntax);
ast_free((char *)(*query)->acf->name);
ast_free((*query)->acf);
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c
index 8046d6556..ce7f19288 100644
--- a/main/ast_expr2f.c
+++ b/main/ast_expr2f.c
@@ -11,7 +11,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -33,7 +33,7 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -56,7 +56,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -87,6 +86,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -96,11 +97,12 @@ typedef unsigned int flex_uint32_t;
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
@@ -136,8 +138,6 @@ typedef void* yyscan_t;
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r
-int ast_yylex_init (yyscan_t* scanner);
-
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
@@ -195,14 +195,9 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -341,6 +336,1810 @@ typedef unsigned char YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
+static yyconst flex_int16_t yy_nxt[][256] =
+ {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0
+ },
+
+ {
+ 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
+ 10, 8, 8, 9, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 9, 11, 12, 13, 14, 15, 16, 13,
+
+ 17, 18, 19, 20, 21, 22, 13, 23, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 25, 13,
+ 26, 27, 28, 29, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 8, 13, 8, 13, 13, 8, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 8, 30, 8, 8, 8, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13
+ },
+
+ {
+ 7, 8, 8, 8, 8, 8, 8, 8, 8, 9,
+ 10, 8, 8, 9, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 9, 11, 12, 13, 14, 15, 16, 13,
+ 17, 18, 19, 20, 21, 22, 13, 23, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 25, 13,
+ 26, 27, 28, 29, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 8, 13, 8, 13, 13, 8, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 8, 30, 8, 8, 8, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13
+ },
+
+ {
+ 7, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+
+ 31, 31, 31, 32, 31, 33, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31
+ },
+
+ {
+ 7, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 32, 31, 33, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31
+
+ },
+
+ {
+ 7, 34, 34, 34, 34, 34, 34, 34, 34, 35,
+ 35, 34, 34, 35, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 35, 35, 34, 34, 36, 35, 35, 34,
+ 35, 35, 35, 35, 34, 35, 34, 35, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 35, 34,
+ 35, 35, 35, 35, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 35, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34
+ },
+
+ {
+ 7, 34, 34, 34, 34, 34, 34, 34, 34, 35,
+ 35, 34, 34, 35, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 35, 35, 34, 34, 36, 35, 35, 34,
+
+ 35, 35, 35, 35, 34, 35, 34, 35, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 35, 34,
+ 35, 35, 35, 35, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 35, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34
+ },
+
+ {
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7, -7, -7, -7, -7,
+ -7, -7, -7, -7, -7, -7
+ },
+
+ {
+ 7, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8, -8, -8, -8, -8,
+ -8, -8, -8, -8, -8, -8
+ },
+
+ {
+ 7, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
+ -9, -9, -9, -9, -9, -9
+
+ },
+
+ {
+ 7, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
+ -10, -10, -10, -10, -10, -10
+ },
+
+ {
+ 7, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, 37, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+
+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
+ -11, -11, -11, -11, -11, -11
+ },
+
+ {
+ 7, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 39, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38
+ },
+
+ {
+ 7, -13, -13, -13, -13, -13, -13, -13, -13, -13,
+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
+
+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
+ -13, -13, -13, -13, -13, 40, 40, -13, -13, 40,
+ -13, -13, -13, -13, -13, -13, 40, -13, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, -13, 40,
+ -13, -13, -13, -13, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -13, 40, -13, 40, 40, -13, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, -13, -13, -13, -13, -13, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 7, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
+ -14, -14, -14, -14, -14, 40, 40, -14, -14, 40,
+ -14, -14, -14, -14, -14, -14, 40, -14, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, -14, 40,
+
+ -14, -14, -14, -14, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -14, 40, -14, 40, 40, -14, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 41, -14, -14, -14, -14, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+
+ },
+
+ {
+ 7, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
+ -15, -15, -15, -15, -15, -15
+ },
+
+ {
+ 7, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, 42, -16,
+
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+
+ -16, -16, -16, -16, -16, -16, -16, -16, -16, -16,
+ -16, -16, -16, -16, -16, -16
+ },
+
+ {
+ 7, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17,
+ -17, -17, -17, -17, -17, -17
+ },
+
+ {
+ 7, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18
+ },
+
+ {
+ 7, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
+ -19, -19, -19, -19, -19, -19
+
+ },
+
+ {
+ 7, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
+ -20, -20, -20, -20, -20, -20
+ },
+
+ {
+ 7, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+
+ -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
+ -21, -21, -21, -21, -21, -21
+ },
+
+ {
+ 7, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
+ -22, -22, -22, -22, -22, -22
+ },
+
+ {
+ 7, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23,
+ -23, -23, -23, -23, -23, -23
+ },
+
+ {
+ 7, -24, -24, -24, -24, -24, -24, -24, -24, -24,
+ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
+ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24,
+ -24, -24, -24, -24, -24, 40, 40, -24, -24, 40,
+ -24, -24, -24, -24, -24, -24, 43, -24, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, -24, 40,
+
+ -24, -24, -24, -24, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -24, 40, -24, 40, 40, -24, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, -24, -24, -24, -24, -24, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+
+ },
+
+ {
+ 7, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, 45, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25,
+ -25, -25, -25, -25, -25, -25
+ },
+
+ {
+ 7, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, 46, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+
+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ -26, -26, -26, -26, -26, -26
+ },
+
+ {
+ 7, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, 47, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, 48, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27,
+ -27, -27, -27, -27, -27, -27
+ },
+
+ {
+ 7, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, 49, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28, -28, -28, -28, -28,
+ -28, -28, -28, -28, -28, -28
+ },
+
+ {
+ 7, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
+ -29, -29, -29, -29, -29, -29
+
+ },
+
+ {
+ 7, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, 50, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30,
+ -30, -30, -30, -30, -30, -30
+ },
+
+ {
+ 7, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 52, 51, 53, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51
+ },
+
+ {
+ 7, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32, -32, -32, -32, -32,
+ -32, -32, -32, -32, -32, -32
+ },
+
+ {
+ 7, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33, -33, -33, -33, -33,
+ -33, -33, -33, -33, -33, -33
+ },
+
+ {
+ 7, 54, 54, 54, 54, 54, 54, 54, 54, -34,
+ -34, 54, 54, -34, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, -34, -34, 54, 54, -34, -34, -34, 54,
+ -34, -34, -34, -34, 54, -34, 54, -34, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, -34, 54,
+
+ -34, -34, -34, -34, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, -34, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54
+
+ },
+
+ {
+ 7, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35, -35, -35, -35, -35,
+ -35, -35, -35, -35, -35, -35
+ },
+
+ {
+ 7, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, 55, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+
+ -36, -36, -36, -36, -36, -36, -36, -36, -36, -36,
+ -36, -36, -36, -36, -36, -36
+ },
+
+ {
+ 7, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
+ -37, -37, -37, -37, -37, -37
+ },
+
+ {
+ 7, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 39, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 38, 38, 38, 38
+ },
+
+ {
+ 7, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
+ -39, -39, -39, -39, -39, -39
+
+ },
+
+ {
+ 7, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
+ -40, -40, -40, -40, -40, 40, 40, -40, -40, 40,
+ -40, -40, -40, -40, -40, -40, 40, -40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, -40, 40,
+ -40, -40, -40, -40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -40, 40, -40, 40, 40, -40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, -40, -40, -40, -40, -40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 7, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+
+ -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
+ -41, -41, -41, -41, -41, -41
+ },
+
+ {
+ 7, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
+ -42, -42, -42, -42, -42, -42
+ },
+
+ {
+ 7, -43, -43, -43, -43, -43, -43, -43, -43, -43,
+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
+
+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
+ -43, -43, -43, -43, -43, 40, 40, -43, -43, 40,
+ -43, -43, -43, -43, -43, -43, 40, -43, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, -43, 40,
+ -43, -43, -43, -43, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -43, 40, -43, 40, 40, -43, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, -43, -43, -43, -43, -43, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ {
+ 7, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
+ -44, -44, -44, -44, -44, 40, 40, -44, -44, 40,
+ -44, -44, -44, -44, -44, -44, 43, -44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, -44, 40,
+
+ -44, -44, -44, -44, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -44, 40, -44, 40, 40, -44, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, -44, -44, -44, -44, -44, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+
+ },
+
+ {
+ 7, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
+ -45, -45, -45, -45, -45, -45
+ },
+
+ {
+ 7, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+
+ -46, -46, -46, -46, -46, -46, -46, -46, -46, -46,
+ -46, -46, -46, -46, -46, -46
+ },
+
+ {
+ 7, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47, -47, -47, -47, -47,
+ -47, -47, -47, -47, -47, -47
+ },
+
+ {
+ 7, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
+ -48, -48, -48, -48, -48, -48
+ },
+
+ {
+ 7, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
+ -49, -49, -49, -49, -49, -49
+
+ },
+
+ {
+ 7, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50, -50, -50, -50, -50,
+ -50, -50, -50, -50, -50, -50
+ },
+
+ {
+ 7, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 52, 51, 53, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 51, 51, 51
+ },
+
+ {
+ 7, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52,
+ -52, -52, -52, -52, -52, -52
+ },
+
+ {
+ 7, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53,
+ -53, -53, -53, -53, -53, -53
+ },
+
+ {
+ 7, 54, 54, 54, 54, 54, 54, 54, 54, -54,
+ -54, 54, 54, -54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, -54, -54, 54, 54, -54, -54, -54, 54,
+ -54, -54, -54, -54, 54, -54, 54, -54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, -54, 54,
+
+ -54, -54, -54, -54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, -54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54
+
+ },
+
+ {
+ 7, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
+ -55, -55, -55, -55, -55, -55
+ },
+
+ {
+ 7, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
+ -56, -56, -56, -56, -56, 40, 40, -56, -56, 40,
+
+ -56, -56, -56, -56, -56, -56, 40, -56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, -56, 40,
+ -56, -56, -56, -56, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, -56, 40, -56, 40, 40, -56, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, -56, -56, -56, -56, -56, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40
+ },
+
+ } ;
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
@@ -367,113 +2166,24 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[58] =
+static yyconst flex_int16_t yy_accept[57] =
{ 0,
0, 0, 0, 0, 33, 33, 37, 36, 26, 28,
20, 36, 30, 30, 18, 2, 23, 24, 16, 13,
14, 15, 17, 29, 21, 9, 3, 8, 19, 1,
36, 32, 31, 33, 34, 34, 12, 0, 27, 30,
25, 5, 30, 29, 22, 11, 6, 7, 10, 4,
- 0, 32, 31, 33, 35, 29, 0
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 5, 6, 7, 8, 9, 6, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 18, 18,
- 18, 18, 18, 18, 18, 18, 18, 19, 6, 20,
- 21, 22, 23, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 1, 6, 1, 6, 6, 1, 6, 6, 6, 6,
-
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 24, 25, 26, 27, 1, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 28, 28
- } ;
-
-static yyconst flex_int32_t yy_meta[29] =
- { 0,
- 1, 2, 2, 2, 1, 3, 4, 2, 2, 2,
- 2, 2, 2, 1, 2, 3, 2, 3, 2, 2,
- 2, 2, 2, 1, 2, 1, 1, 3
- } ;
-
-static yyconst flex_int16_t yy_base[64] =
- { 0,
- 0, 0, 5, 6, 32, 60, 64, 110, 110, 110,
- 42, 57, 0, 33, 110, 46, 110, 110, 110, 110,
- 110, 110, 110, 18, 35, 32, 14, 31, 110, 26,
- 16, 110, 110, 0, 110, 25, 110, 42, 110, 0,
- 110, 110, 26, 0, 110, 110, 110, 110, 110, 110,
- 19, 110, 110, 0, 110, 0, 110, 88, 92, 96,
- 98, 102, 106
- } ;
-
-static yyconst flex_int16_t yy_def[64] =
- { 0,
- 57, 1, 58, 58, 59, 59, 57, 57, 57, 57,
- 57, 60, 61, 61, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 61, 57, 57, 57, 57, 57, 57,
- 62, 57, 57, 63, 57, 57, 57, 60, 57, 61,
- 57, 57, 61, 24, 57, 57, 57, 57, 57, 57,
- 62, 57, 57, 63, 57, 43, 0, 57, 57, 57,
- 57, 57, 57
- } ;
-
-static yyconst flex_int16_t yy_nxt[139] =
- { 0,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 13, 23, 24, 25, 26,
- 27, 28, 29, 8, 30, 8, 8, 13, 32, 32,
- 33, 33, 34, 43, 47, 44, 34, 34, 36, 52,
- 48, 53, 52, 56, 53, 34, 39, 34, 55, 34,
- 50, 49, 46, 45, 42, 34, 41, 34, 34, 34,
- 34, 39, 37, 57, 34, 34, 36, 57, 57, 57,
- 57, 57, 57, 34, 57, 34, 57, 34, 57, 57,
- 57, 57, 57, 34, 57, 34, 34, 34, 31, 31,
- 31, 31, 35, 35, 35, 35, 38, 38, 38, 38,
-
- 40, 40, 51, 51, 51, 51, 54, 57, 54, 7,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57
+ 0, 32, 31, 33, 35, 29
} ;
-static yyconst flex_int16_t yy_chk[139] =
+static yyconst yy_state_type yy_NUL_trans[57] =
{ 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 4,
- 3, 4, 5, 24, 27, 24, 5, 5, 5, 31,
- 27, 31, 51, 43, 51, 5, 38, 5, 36, 5,
- 30, 28, 26, 25, 16, 5, 14, 5, 5, 5,
- 6, 12, 11, 7, 6, 6, 6, 0, 0, 0,
- 0, 0, 0, 6, 0, 6, 0, 6, 0, 0,
- 0, 0, 0, 6, 0, 6, 6, 6, 58, 58,
- 58, 58, 59, 59, 59, 59, 60, 60, 60, 60,
-
- 61, 61, 62, 62, 62, 62, 63, 0, 63, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
- 57, 57, 57, 57, 57, 57, 57, 57
+ 8, 8, 31, 31, 34, 34, 0, 0, 0, 0,
+ 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 51, 0, 0, 54, 0, 0, 0, 38, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 51, 0, 0, 54, 0, 0
} ;
/* The intent behind this definition is that it'll catch
@@ -596,7 +2306,7 @@ int ast_yyget_column(yyscan_t yyscanner);
static int curlycount = 0;
static char *expr2_token_subst(const char *mess);
-#line 600 "ast_expr2f.c"
+#line 2308 "ast_expr2f.c"
#define INITIAL 0
#define var 1
@@ -660,6 +2370,10 @@ static int yy_init_globals (yyscan_t yyscanner );
# define yylloc yyg->yylloc_r
+int ast_yylex_init (yyscan_t* scanner);
+
+int ast_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
@@ -739,7 +2453,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -747,33 +2461,17 @@ static int input (yyscan_t yyscanner );
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ errno=0; \
+ while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
+ { \
+ if( errno != EINTR) \
{ \
- int c = '*'; \
- size_t n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
+ break; \
} \
- else \
- { \
errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }\
+ clearerr(yyin); \
+ }\
\
#endif
@@ -804,9 +2502,11 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int ast_yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+extern int ast_yylex \
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-#define YY_DECL int ast_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
+#define YY_DECL int ast_yylex \
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -833,10 +2533,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 127 "ast_expr2.fl"
+#line 125 "ast_expr2.fl"
-#line 840 "ast_expr2f.c"
+#line 2538 "ast_expr2f.c"
yylval = yylval_param;
@@ -888,26 +2588,18 @@ YY_DECL
yy_current_state = yyg->yy_start;
yy_match:
- do
+ while ( (yy_current_state = yy_nxt[yy_current_state][ YY_SC_TO_UI(*yy_cp) ]) > 0 )
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
yyg->yy_last_accepting_cpos = yy_cp;
}
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 58 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+
++yy_cp;
}
- while ( yy_current_state != 57 );
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
+
+ yy_current_state = -yy_current_state;
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -921,133 +2613,133 @@ do_action: /* This label is used only to access EOF actions. */
case 0: /* must back up */
/* undo the effects of YY_DO_BEFORE_ACTION */
*yy_cp = yyg->yy_hold_char;
- yy_cp = yyg->yy_last_accepting_cpos;
+ yy_cp = yyg->yy_last_accepting_cpos + 1;
yy_current_state = yyg->yy_last_accepting_state;
goto yy_find_action;
case 1:
YY_RULE_SETUP
-#line 129 "ast_expr2.fl"
+#line 127 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_OR;}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 130 "ast_expr2.fl"
+#line 128 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_AND;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 131 "ast_expr2.fl"
+#line 129 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_EQ;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 132 "ast_expr2.fl"
+#line 130 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_OR;}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 133 "ast_expr2.fl"
+#line 131 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_AND;}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 134 "ast_expr2.fl"
+#line 132 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_EQ;}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 135 "ast_expr2.fl"
+#line 133 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_EQTILDE;}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 136 "ast_expr2.fl"
+#line 134 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_GT;}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 137 "ast_expr2.fl"
+#line 135 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_LT;}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 138 "ast_expr2.fl"
+#line 136 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_GE;}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 139 "ast_expr2.fl"
+#line 137 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_LE;}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 140 "ast_expr2.fl"
+#line 138 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_NE;}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 141 "ast_expr2.fl"
+#line 139 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_PLUS;}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 142 "ast_expr2.fl"
+#line 140 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_COMMA;}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 143 "ast_expr2.fl"
+#line 141 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_MINUS;}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 144 "ast_expr2.fl"
+#line 142 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_MULT;}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 145 "ast_expr2.fl"
+#line 143 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_DIV;}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 146 "ast_expr2.fl"
+#line 144 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_MOD;}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 147 "ast_expr2.fl"
+#line 145 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_COND;}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 148 "ast_expr2.fl"
+#line 146 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_COMPL;}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 149 "ast_expr2.fl"
+#line 147 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_COLON;}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 150 "ast_expr2.fl"
+#line 148 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_COLONCOLON;}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 151 "ast_expr2.fl"
+#line 149 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_LP;}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 152 "ast_expr2.fl"
+#line 150 "ast_expr2.fl"
{ SET_COLUMNS; SET_STRING; return TOK_RP;}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 153 "ast_expr2.fl"
+#line 151 "ast_expr2.fl"
{
/* gather the contents of ${} expressions, with trailing stuff,
* into a single TOKEN.
@@ -1060,24 +2752,24 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 163 "ast_expr2.fl"
+#line 161 "ast_expr2.fl"
{}
YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
-#line 164 "ast_expr2.fl"
+#line 162 "ast_expr2.fl"
{SET_COLUMNS; SET_STRING; return TOKEN;}
YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
-#line 166 "ast_expr2.fl"
+#line 164 "ast_expr2.fl"
{/* what to do with eol */}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 167 "ast_expr2.fl"
+#line 165 "ast_expr2.fl"
{
SET_COLUMNS;
/* the original behavior of the expression parser was
@@ -1089,7 +2781,7 @@ YY_RULE_SETUP
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 176 "ast_expr2.fl"
+#line 174 "ast_expr2.fl"
{
SET_COLUMNS;
SET_STRING;
@@ -1099,7 +2791,7 @@ YY_RULE_SETUP
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
-#line 183 "ast_expr2.fl"
+#line 181 "ast_expr2.fl"
{
curlycount--;
if (curlycount < 0) {
@@ -1113,7 +2805,7 @@ YY_RULE_SETUP
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
-#line 193 "ast_expr2.fl"
+#line 191 "ast_expr2.fl"
{
curlycount++;
yymore();
@@ -1121,7 +2813,7 @@ YY_RULE_SETUP
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 199 "ast_expr2.fl"
+#line 197 "ast_expr2.fl"
{
BEGIN(0);
SET_COLUMNS;
@@ -1132,7 +2824,7 @@ YY_RULE_SETUP
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
-#line 206 "ast_expr2.fl"
+#line 204 "ast_expr2.fl"
{
char c = yytext[yyleng-1];
BEGIN(0);
@@ -1144,7 +2836,7 @@ YY_RULE_SETUP
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 215 "ast_expr2.fl"
+#line 213 "ast_expr2.fl"
{
curlycount = 0;
BEGIN(var);
@@ -1152,7 +2844,7 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(trail):
-#line 221 "ast_expr2.fl"
+#line 219 "ast_expr2.fl"
{
BEGIN(0);
SET_COLUMNS;
@@ -1163,10 +2855,10 @@ case YY_STATE_EOF(trail):
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 229 "ast_expr2.fl"
+#line 227 "ast_expr2.fl"
ECHO;
YY_BREAK
-#line 1170 "ast_expr2f.c"
+#line 2860 "ast_expr2f.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(var):
yyterminate();
@@ -1234,8 +2926,7 @@ case YY_STATE_EOF(var):
else
{
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
+ yy_cp = yyg->yy_c_buf_p;
goto yy_find_action;
}
}
@@ -1301,13 +2992,12 @@ case YY_STATE_EOF(var):
} /* end of scanning one token */
} /* end of ast_yylex */
-/*!
- * \brief yy_get_next_buffer - try to read in a new buffer
+/* yy_get_next_buffer - try to read in a new buffer
*
* Returns a code representing an action:
- * \retval EOB_ACT_LAST_MATCH -
- * \retval EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * \retval EOB_ACT_END_OF_FILE - end of file
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
*/
static int yy_get_next_buffer (yyscan_t yyscanner)
{
@@ -1401,7 +3091,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
+ yyg->yy_n_chars, (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -1425,6 +3115,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ast_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
@@ -1434,7 +3132,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
return ret_val;
}
-/*! \brief yy_get_previous_state - get the state just before the EOB char was reached */
+/* yy_get_previous_state - get the state just before the EOB char was reached */
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
@@ -1446,25 +3144,23 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ if ( *yy_cp )
+ {
+ yy_current_state = yy_nxt[yy_current_state][YY_SC_TO_UI(*yy_cp)];
+ }
+ else
+ yy_current_state = yy_NUL_trans[yy_current_state];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
yyg->yy_last_accepting_cpos = yy_cp;
}
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 58 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
return yy_current_state;
}
-/*! \brief yy_try_NUL_trans - try to make a transition on the NUL character.
+/* yy_try_NUL_trans - try to make a transition on the NUL character
*
* synopsis
* next_state = yy_try_NUL_trans( current_state );
@@ -1475,20 +3171,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
register char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yyg->yy_last_accepting_state = yy_current_state;
- yyg->yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ yy_current_state = yy_NUL_trans[yy_current_state];
+ yy_is_jam = (yy_current_state == 0);
+
+ if ( ! yy_is_jam )
{
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 58 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ if ( yy_accept[yy_current_state] )
+ {
+ yyg->yy_last_accepting_state = yy_current_state;
+ yyg->yy_last_accepting_cpos = yy_cp;
+ }
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 57);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1606,11 +3299,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
#endif /* ifndef YY_NO_INPUT */
-/*!
- * \brief Immediately switch to a different input stream.
- * \param input_file A readable stream.
- * \param yyscanner The scanner object.
- * \note This function does not reset the start condition to @c INITIAL .
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ * @param yyscanner The scanner object.
+ * @note This function does not reset the start condition to @c INITIAL .
*/
void ast_yyrestart (FILE * input_file , yyscan_t yyscanner)
{
@@ -1626,10 +3318,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
ast_yy_load_buffer_state(yyscanner );
}
-/*!
- * \brief Switch to a different input buffer.
- * \param new_buffer The new input buffer.
- * \param yyscanner The scanner object.
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ * @param yyscanner The scanner object.
*/
void ast_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
@@ -1672,12 +3363,11 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
yyg->yy_hold_char = *yyg->yy_c_buf_p;
}
-/*!
- * \brief Allocate and initialize an input buffer state.
- * \param file A readable stream.
- * \param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * \param yyscanner The scanner object.
- * \return the allocated buffer state.
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ * @param yyscanner The scanner object.
+ * @return the allocated buffer state.
*/
YY_BUFFER_STATE ast_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
@@ -1703,10 +3393,9 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
return b;
}
-/*!
- * \brief Destroy the buffer.
- * \param b a buffer created with ast_yy_create_buffer()
- * \param yyscanner The scanner object.
+/** Destroy the buffer.
+ * @param b a buffer created with ast_yy_create_buffer()
+ * @param yyscanner The scanner object.
*/
void ast_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
@@ -1728,9 +3417,8 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
extern int isatty (int );
#endif /* __cplusplus */
-/*!
- * \brief Initializes or reinitializes a buffer.
- * \note This function is sometimes called more than once on the same buffer,
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
* such as during a ast_yyrestart() or at EOF.
*/
static void ast_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
@@ -1758,10 +3446,9 @@ extern int isatty (int );
errno = oerrno;
}
-/*!
- * \brief Discard all buffered characters. On the next scan, YY_INPUT will be called.
- * \param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * \param yyscanner The scanner object.
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ * @param yyscanner The scanner object.
*/
void ast_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
@@ -1787,12 +3474,11 @@ extern int isatty (int );
ast_yy_load_buffer_state(yyscanner );
}
-/*!
- * \brief Pushes the new state onto the stack. The new state becomes
+/** Pushes the new state onto the stack. The new state becomes
* the current state. This function will allocate the stack
* if necessary.
- * \param new_buffer The new state.
- * \param yyscanner The scanner object.
+ * @param new_buffer The new state.
+ * @param yyscanner The scanner object.
*/
void ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
@@ -1821,10 +3507,9 @@ void ast_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_did_buffer_switch_on_eof = 1;
}
-/*!
- * \brief Removes and deletes the top of the stack, if present.
+/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- * \param yyscanner The scanner object.
+ * @param yyscanner The scanner object.
*/
void ast_yypop_buffer_state (yyscan_t yyscanner)
{
@@ -1861,7 +3546,9 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
yyg->yy_buffer_stack = (struct yy_buffer_state**)ast_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
-
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in ast_yyensure_buffer_stack()" );
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
@@ -1879,6 +3566,8 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in ast_yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -1886,12 +3575,11 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
}
}
-/*!
- * \brief Setup the input buffer state to scan directly from a user-specified character buffer.
- * \param base the character buffer
- * \param size the size in bytes of the character buffer
- * \param yyscanner The scanner object.
- * \return the newly allocated buffer state object.
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
@@ -1922,13 +3610,12 @@ YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
return b;
}
-/*!
- * \brief Setup the input buffer state to scan a string. The next call to ast_yylex() will
- * scan from a \e copy of \a str.
- * \param yystr a NUL-terminated string to scan
- * \param yyscanner The scanner object.
- * \return the newly allocated buffer state object.
- * \note If you want to scan bytes that may contain NUL values, then use
+/** Setup the input buffer state to scan a string. The next call to ast_yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
* ast_yy_scan_bytes() instead.
*/
YY_BUFFER_STATE ast_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
@@ -1937,13 +3624,12 @@ YY_BUFFER_STATE ast_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
return ast_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
-/*!
- * \brief Setup the input buffer state to scan the given bytes. The next call to ast_yylex() will
- * scan from a \e copy of \a bytes.
- * \param yybytes the byte buffer to scan
- * \param _yybytes_len the number of bytes in the buffer pointed to by \a bytes.
- * \param yyscanner The scanner object.
- * \return the newly allocated buffer state object.
+/** Setup the input buffer state to scan the given bytes. The next call to ast_yylex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yyscanner The scanner object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
@@ -2004,9 +3690,8 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
/* Accessor methods (get/set functions) to struct members. */
-/*!
- * \brief Get the user-defined data for this scanner.
- * \param yyscanner The scanner object.
+/** Get the user-defined data for this scanner.
+ * @param yyscanner The scanner object.
*/
YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner)
{
@@ -2014,9 +3699,8 @@ YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner)
return yyextra;
}
-/*!
- * \brief Get the current line number.
- * \param yyscanner The scanner object.
+/** Get the current line number.
+ * @param yyscanner The scanner object.
*/
int ast_yyget_lineno (yyscan_t yyscanner)
{
@@ -2028,9 +3712,8 @@ int ast_yyget_lineno (yyscan_t yyscanner)
return yylineno;
}
-/*!
- * \brief Get the current column number.
- * \param yyscanner The scanner object.
+/** Get the current column number.
+ * @param yyscanner The scanner object.
*/
int ast_yyget_column (yyscan_t yyscanner)
{
@@ -2042,9 +3725,8 @@ int ast_yyget_column (yyscan_t yyscanner)
return yycolumn;
}
-/*!
- * \brief Get the input stream.
- * \param yyscanner The scanner object.
+/** Get the input stream.
+ * @param yyscanner The scanner object.
*/
FILE *ast_yyget_in (yyscan_t yyscanner)
{
@@ -2052,9 +3734,8 @@ FILE *ast_yyget_in (yyscan_t yyscanner)
return yyin;
}
-/*!
- * \brief Get the output stream.
- * \param yyscanner The scanner object.
+/** Get the output stream.
+ * @param yyscanner The scanner object.
*/
FILE *ast_yyget_out (yyscan_t yyscanner)
{
@@ -2062,9 +3743,8 @@ FILE *ast_yyget_out (yyscan_t yyscanner)
return yyout;
}
-/*!
- * \brief Get the length of the current token.
- * \param yyscanner The scanner object.
+/** Get the length of the current token.
+ * @param yyscanner The scanner object.
*/
int ast_yyget_leng (yyscan_t yyscanner)
{
@@ -2072,9 +3752,8 @@ int ast_yyget_leng (yyscan_t yyscanner)
return yyleng;
}
-/*!
- * \brief Get the current token.
- * \param yyscanner The scanner object.
+/** Get the current token.
+ * @param yyscanner The scanner object.
*/
char *ast_yyget_text (yyscan_t yyscanner)
@@ -2083,10 +3762,9 @@ char *ast_yyget_text (yyscan_t yyscanner)
return yytext;
}
-/*!
- * \brief Set the user-defined data. This data is never touched by the scanner.
- * \param user_defined The data to be associated with this scanner.
- * \param yyscanner The scanner object.
+/** Set the user-defined data. This data is never touched by the scanner.
+ * @param user_defined The data to be associated with this scanner.
+ * @param yyscanner The scanner object.
*/
void ast_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
@@ -2094,10 +3772,9 @@ void ast_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
yyextra = user_defined ;
}
-/*!
- * \brief Set the current line number.
- * \param line_number
- * \param yyscanner The scanner object.
+/** Set the current line number.
+ * @param line_number
+ * @param yyscanner The scanner object.
*/
void ast_yyset_lineno (int line_number , yyscan_t yyscanner)
{
@@ -2110,10 +3787,9 @@ void ast_yyset_lineno (int line_number , yyscan_t yyscanner)
yylineno = line_number;
}
-/*!
- * \brief Set the current column.
- * \param column_no
- * \param yyscanner The scanner object.
+/** Set the current column.
+ * @param line_number
+ * @param yyscanner The scanner object.
*/
void ast_yyset_column (int column_no , yyscan_t yyscanner)
{
@@ -2126,12 +3802,11 @@ void ast_yyset_column (int column_no , yyscan_t yyscanner)
yycolumn = column_no;
}
-/*!
- * \brief Set the input stream. This does not discard the current
+/** Set the input stream. This does not discard the current
* input buffer.
- * \param in_str A readable stream.
- * \param yyscanner The scanner object.
- * \see ast_yy_switch_to_buffer
+ * @param in_str A readable stream.
+ * @param yyscanner The scanner object.
+ * @see ast_yy_switch_to_buffer
*/
void ast_yyset_in (FILE * in_str , yyscan_t yyscanner)
{
@@ -2185,10 +3860,9 @@ void ast_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
/* User-visible API */
-/*! \brief ast_yylex_init is special because it creates the scanner itself.
- *
- * It is the ONLY reentrant function that doesn't take the scanner as the last argument.
- * \note That's why we explicitly handle the declaration, instead of using our macros.
+/* ast_yylex_init is special because it creates the scanner itself, so it is
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
+ * That's why we explicitly handle the declaration, instead of using our macros.
*/
int ast_yylex_init(yyscan_t* ptr_yy_globals)
@@ -2212,6 +3886,42 @@ int ast_yylex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
+/* ast_yylex_init_extra has the same functionality as ast_yylex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to ast_yyalloc in
+ * the yyextra field.
+ */
+
+int ast_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+{
+ struct yyguts_t dummy_yyguts;
+
+ ast_yyset_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) ast_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ ast_yyset_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
+}
+
static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -2318,7 +4028,7 @@ void *ast_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 229 "ast_expr2.fl"
+#line 227 "ast_expr2.fl"
diff --git a/main/asterisk.c b/main/asterisk.c
index 97a3e6cbe..81c4c73b7 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -1204,8 +1204,11 @@ static void hup_handler(int num)
if (restartnow)
execvp(_argv[0], _argv);
sig_flags.need_reload = 1;
- if (sig_alert_pipe[1] != -1)
- write(sig_alert_pipe[1], &a, sizeof(a));
+ if (sig_alert_pipe[1] != -1) {
+ if (write(sig_alert_pipe[1], &a, sizeof(a)) < 0) {
+ fprintf(stderr, "hup_handler: write() failed: %s\n", strerror(errno));
+ }
+ }
signal(num, hup_handler);
}
@@ -1420,8 +1423,11 @@ static void __quit_handler(int num)
{
int a = 0;
sig_flags.need_quit = 1;
- if (sig_alert_pipe[1] != -1)
- write(sig_alert_pipe[1], &a, sizeof(a));
+ if (sig_alert_pipe[1] != -1) {
+ if (write(sig_alert_pipe[1], &a, sizeof(a)) < 0) {
+ fprintf(stderr, "hup_handler: write() failed: %s\n", strerror(errno));
+ }
+ }
/* There is no need to restore the signal handler here, since the app
* is going to exit */
}
@@ -1800,7 +1806,7 @@ static char *show_warranty(struct ast_cli_entry *e, int cmd, struct ast_cli_args
return NULL;
}
- ast_cli(a->fd, warranty_lines);
+ ast_cli(a->fd, "%s", warranty_lines);
return CLI_SUCCESS;
}
@@ -1837,7 +1843,7 @@ static char *show_license(struct ast_cli_entry *e, int cmd, struct ast_cli_args
return NULL;
}
- ast_cli(a->fd, license_lines);
+ ast_cli(a->fd, "%s", license_lines);
return CLI_SUCCESS;
}
@@ -1957,9 +1963,12 @@ static int ast_el_read_char(EditLine *el, char *cp)
}
/* Write over the CLI prompt */
- if (!ast_opt_exec && !lastpos)
- write(STDOUT_FILENO, "\r", 1);
- write(STDOUT_FILENO, buf, res);
+ if (!ast_opt_exec && !lastpos) {
+ if (write(STDOUT_FILENO, "\r", 1) < 0) {
+ }
+ }
+ if (write(STDOUT_FILENO, buf, res) < 0) {
+ }
if ((res < EL_BUF_SIZE - 1) && ((buf[res-1] == '\n') || (buf[res-2] == '\n'))) {
*cp = CC_REFRESH;
return(1);
@@ -2036,8 +2045,13 @@ static char *cli_prompt(EditLine *el)
if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
float avg1, avg2, avg3;
int actproc, totproc, npid, which;
- fscanf(LOADAVG, "%f %f %f %d/%d %d",
- &avg1, &avg2, &avg3, &actproc, &totproc, &npid);
+
+ if (fscanf(LOADAVG, "%f %f %f %d/%d %d",
+ &avg1, &avg2, &avg3, &actproc, &totproc, &npid) != 6) {
+ ast_log(LOG_WARNING, "parsing /proc/loadavg failed\n");
+ fclose(LOADAVG);
+ break;
+ }
if (sscanf(t, "%d", &which) == 1) {
switch (which) {
case 1:
@@ -2057,6 +2071,7 @@ static char *cli_prompt(EditLine *el)
break;
}
}
+ fclose(LOADAVG);
}
break;
#endif
@@ -2388,7 +2403,9 @@ static int ast_el_read_history(char *filename)
return ret;
while (!feof(f)) {
- fgets(buf, sizeof(buf), f);
+ if (!fgets(buf, sizeof(buf), f)) {
+ continue;
+ }
if (!strcmp(buf, "_HiStOrY_V2_\n"))
continue;
if (ast_all_zeros(buf))
@@ -2401,7 +2418,7 @@ static int ast_el_read_history(char *filename)
return ret;
}
-static void ast_remotecontrol(char * data)
+static void ast_remotecontrol(char *data)
{
char buf[80];
int res;
@@ -2416,9 +2433,15 @@ static void ast_remotecontrol(char * data)
char *ebuf;
int num = 0;
- read(ast_consock, buf, sizeof(buf));
- if (data)
- write(ast_consock, data, strlen(data) + 1);
+ if (read(ast_consock, buf, sizeof(buf)) < 0) {
+ ast_log(LOG_ERROR, "read() failed: %s\n", strerror(errno));
+ return;
+ }
+ if (data) {
+ if (write(ast_consock, data, strlen(data) + 1) < 0) {
+ ast_log(LOG_ERROR, "write() failed: %s\n", strerror(errno));
+ }
+ }
stringp = buf;
hostname = strsep(&stringp, "/");
cpid = strsep(&stringp, "/");
@@ -2476,7 +2499,9 @@ static void ast_remotecontrol(char * data)
/* Skip verbose lines */
if (*curline != 127) {
not_written = 0;
- write(STDOUT_FILENO, curline, nextline - curline);
+ if (write(STDOUT_FILENO, curline, nextline - curline) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
}
curline = nextline;
} while (!ast_strlen_zero(curline));
@@ -2792,7 +2817,8 @@ static void *monitor_sig_flags(void *unused)
sig_flags.need_quit = 0;
quit_handler(0, 0, 1, 0);
}
- read(sig_alert_pipe[0], &a, sizeof(a));
+ if (read(sig_alert_pipe[0], &a, sizeof(a)) != sizeof(a)) {
+ }
}
return NULL;
@@ -3218,7 +3244,9 @@ int main(int argc, char *argv[])
#if HAVE_WORKING_FORK
if (ast_opt_always_fork || !ast_opt_no_fork) {
#ifndef HAVE_SBIN_LAUNCHD
- daemon(1, 0);
+ if (daemon(1, 0) < 0) {
+ ast_log(LOG_ERROR, "daemon() failed: %s\n", strerror(errno));
+ }
ast_mainpid = getpid();
/* Blindly re-write pid file since we are forking */
unlink(ast_config_AST_PID);
diff --git a/main/channel.c b/main/channel.c
index fbd417012..548c6d8f9 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2282,8 +2282,11 @@ int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd)
break;
case AST_FRAME_VOICE:
/* Write audio if appropriate */
- if (audiofd > -1)
- write(audiofd, f->data, f->datalen);
+ if (audiofd > -1) {
+ if (write(audiofd, f->data, f->datalen) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
default:
/* Ignore */
break;
@@ -2433,7 +2436,9 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
goto done;
}
}
- read(chan->alertpipe[0], &blah, sizeof(blah));
+ if (read(chan->alertpipe[0], &blah, sizeof(blah)) < 0) {
+ ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+ }
}
#ifdef HAVE_DAHDI
@@ -3902,7 +3907,10 @@ int ast_do_masquerade(struct ast_channel *original)
AST_LIST_INSERT_TAIL(&original->readq, cur, frame_list);
if (original->alertpipe[1] > -1) {
int poke = 0;
- write(original->alertpipe[1], &poke, sizeof(poke));
+
+ if (write(original->alertpipe[1], &poke, sizeof(poke)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
}
}
}
diff --git a/main/db1-ast/hash/hash_page.c b/main/db1-ast/hash/hash_page.c
index 737b97d32..52571c552 100644
--- a/main/db1-ast/hash/hash_page.c
+++ b/main/db1-ast/hash/hash_page.c
@@ -712,7 +712,8 @@ overflow_page(hashp)
#define OVMSG "HASH: Out of overflow pages. Increase page size\n"
if (offset > SPLITMASK) {
if (++splitnum >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1);
+ if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) {
+ }
return (0);
}
hashp->OVFL_POINT = splitnum;
@@ -725,7 +726,8 @@ overflow_page(hashp)
if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) {
free_page++;
if (free_page >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1);
+ if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) {
+ }
return (0);
}
/*
@@ -749,8 +751,8 @@ overflow_page(hashp)
offset++;
if (offset > SPLITMASK) {
if (++splitnum >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG,
- sizeof(OVMSG) - 1);
+ if (write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1) < 0) {
+ }
return (0);
}
hashp->OVFL_POINT = splitnum;
diff --git a/main/file.c b/main/file.c
index e88279a6f..4468d2276 100644
--- a/main/file.c
+++ b/main/file.c
@@ -248,11 +248,18 @@ static char *build_filename(const char *filename, const char *ext)
if (!strcmp(ext, "wav49"))
ext = "WAV";
- if (filename[0] == '/')
- asprintf(&fn, "%s.%s", filename, ext);
- else
- asprintf(&fn, "%s/sounds/%s.%s",
- ast_config_AST_DATA_DIR, filename, ext);
+ if (filename[0] == '/') {
+ if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ fn = NULL;
+ }
+ } else {
+ if (asprintf(&fn, "%s/sounds/%s.%s",
+ ast_config_AST_DATA_DIR, filename, ext) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ fn = NULL;
+ }
+ }
return fn;
}
@@ -1183,8 +1190,11 @@ static int waitstream_core(struct ast_channel *c, const char *breakon,
break;
case AST_FRAME_VOICE:
/* Write audio if appropriate */
- if (audiofd > -1)
- write(audiofd, fr->data, fr->datalen);
+ if (audiofd > -1) {
+ if (write(audiofd, fr->data, fr->datalen) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
+ }
default:
/* Ignore all others */
break;
diff --git a/main/http.c b/main/http.c
index c561c634a..79cfe5459 100644
--- a/main/http.c
+++ b/main/http.c
@@ -214,7 +214,9 @@ static struct ast_str *static_callback(struct ast_tcptls_session_instance *ser,
ast_get_version(), buf, (int) st.st_size, mtype);
while ((len = read(fd, buf, sizeof(buf))) > 0)
- fwrite(buf, 1, len, ser->f);
+ if (fwrite(buf, 1, len, ser->f) != len) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
close(fd);
return NULL;
@@ -525,8 +527,12 @@ static struct ast_str *handle_post(struct ast_tcptls_session_instance *ser, char
for(res = sizeof(buf);content_len;content_len -= res) {
if (content_len < res)
res = content_len;
- fread(buf, 1, res, ser->f);
- fwrite(buf, 1, res, f);
+ if (fread(buf, 1, res, ser->f) != res) {
+ ast_log(LOG_WARNING, "fread() failed: %s\n", strerror(errno));
+ }
+ if (fwrite(buf, 1, res, f) != res) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
}
if (fseek(f, SEEK_SET, 0)) {
@@ -874,8 +880,12 @@ static void *httpd_helper_thread(void *data)
if (tmp) {
fprintf(ser->f, "Content-length: %d\r\n", contentlength);
/* first write the header, then the body */
- fwrite(out->str, 1, (tmp + 4 - out->str), ser->f);
- fwrite(tmp + 4, 1, contentlength, ser->f);
+ if (fwrite(out->str, 1, (tmp + 4 - out->str), ser->f) != tmp + 4 - out->str) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
+ if (fwrite(tmp + 4, 1, contentlength, ser->f) != contentlength ) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
}
}
ast_free(out);
diff --git a/main/logger.c b/main/logger.c
index 0a3d872ce..2001bc86b 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -527,7 +527,9 @@ static int rotate_file(const char *filename)
char buf[512];
pbx_builtin_setvar_helper(c, "filename", filename);
pbx_substitute_variables_helper(c, exec_after_rotate, buf, sizeof(buf));
- system(buf);
+ if (system(buf) < 0) {
+ ast_log(LOG_WARNING, "system() failed for '%s': %s\n", buf, strerror(errno));
+ }
ast_channel_free(c);
}
return res;
diff --git a/main/manager.c b/main/manager.c
index 3b72791db..a28fae594 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2028,7 +2028,9 @@ static int action_command(struct mansession *s, const struct message *m)
final_buf = ast_calloc(1, l + 1);
if (buf) {
lseek(fd, 0, SEEK_SET);
- read(fd, buf, l);
+ if (read(fd, buf, l) < 0) {
+ ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
+ }
buf[l] = '\0';
if (final_buf) {
term_strip(final_buf, buf, l);
diff --git a/main/utils.c b/main/utils.c
index d7250d960..f99ff8545 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -959,8 +959,11 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
a->start_routine = start_routine;
a->data = data;
start_routine = dummy_start;
- asprintf(&a->name, "%-20s started at [%5d] %s %s()",
- start_fn, line, file, caller);
+ if (asprintf(&a->name, "%-20s started at [%5d] %s %s()",
+ start_fn, line, file, caller) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ a->name = NULL;
+ }
data = a;
}
#endif /* !LOW_MEMORY */
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index b63fedd1e..dc4813639 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -491,10 +491,16 @@ static char *complete_dialplan_remove_extension(struct ast_cli_args *a)
if (++which > a->n) {
/* If there is an extension then return exten@context. */
if (ast_get_extension_matchcid(e) && (!strchr(a->word, '@') || strchr(a->word, '/'))) {
- asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c));
+ if (asprintf(&ret, "%s/%s@%s", ast_get_extension_name(e), ast_get_extension_cidmatch(e), ast_get_context_name(c)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ ret = NULL;
+ }
break;
} else if (!ast_get_extension_matchcid(e) && !strchr(a->word, '/')) {
- asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c));
+ if (asprintf(&ret, "%s@%s", ast_get_extension_name(e), ast_get_context_name(c)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
+ ret = NULL;
+ }
break;
}
}
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 474012776..cf214dc31 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3002,7 +3002,9 @@ static void destroy_trans(struct dundi_transaction *trans, int fromtimeout)
if (AST_LIST_EMPTY(&trans->parent->trans)) {
/* Wake up sleeper */
if (trans->parent->pfds[1] > -1) {
- write(trans->parent->pfds[1], "killa!", 6);
+ if (write(trans->parent->pfds[1], "killa!", 6) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ }
}
}
}
@@ -3769,7 +3771,10 @@ static int dundi_precache_internal(const char *context, const char *number, int
dr.expiration = dundi_cache_time;
dr.hmd = &hmd;
dr.pfds[0] = dr.pfds[1] = -1;
- pipe(dr.pfds);
+ if (pipe(dr.pfds) < 0) {
+ ast_log(LOG_WARNING, "pipe() failed: %s\n", strerror(errno));
+ return -1;
+ }
build_transactions(&dr, ttl, 0, &foundcache, &skipped, 0, 1, 1, NULL, avoids, NULL);
optimize_transactions(&dr, 0);
foundanswers = 0;
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index b715a3b5f..6a600a4ae 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -946,7 +946,9 @@ static char *lua_read_extensions_file(lua_State *L, long *size)
return NULL;
}
- fread(data, sizeof(char), *size, f);
+ if (fread(data, sizeof(char), *size, f) != *size) {
+ ast_log(LOG_WARNING, "fread() failed: %s\n", strerror(errno));
+ }
fclose(f);
if (luaL_loadbuffer(L, data, *size, "extensions.lua")
diff --git a/res/ael/ael.flex b/res/ael/ael.flex
index 21092e631..b2d64b5ca 100644
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
@@ -773,7 +773,9 @@ struct pval *ael2_parse(char *filename, int *errors)
my_file = strdup(filename);
stat(filename, &stats);
buffer = (char*)malloc(stats.st_size+2);
- fread(buffer, 1, stats.st_size, fin);
+ if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
+ ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
+ }
buffer[stats.st_size]=0;
fclose(fin);
@@ -841,7 +843,9 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
struct stat stats;
stat(fnamebuf2, &stats);
buffer = (char*)malloc(stats.st_size+1);
- fread(buffer, 1, stats.st_size, in1);
+ if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
+ ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
+ }
buffer[stats.st_size] = 0;
ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
fclose(in1);
diff --git a/res/ael/ael.tab.c b/res/ael/ael.tab.c
index f98e560ad..d8af39cee 100644
--- a/res/ael/ael.tab.c
+++ b/res/ael/ael.tab.c
@@ -648,16 +648,16 @@ static const yytype_uint16 yyrline[] =
238, 239, 240, 243, 243, 253, 253, 260, 261, 262,
263, 266, 267, 268, 271, 272, 273, 274, 275, 276,
277, 278, 279, 282, 287, 291, 299, 304, 309, 318,
- 319, 320, 326, 331, 335, 343, 343, 347, 350, 353,
- 364, 365, 372, 373, 377, 381, 387, 388, 393, 401,
- 402, 406, 412, 421, 424, 425, 426, 429, 432, 435,
- 436, 437, 435, 443, 447, 448, 449, 450, 453, 453,
- 486, 487, 488, 489, 493, 496, 497, 500, 501, 504,
- 507, 511, 515, 519, 525, 526, 530, 533, 539, 539,
- 544, 552, 552, 563, 570, 573, 574, 577, 578, 581,
- 584, 585, 588, 592, 596, 602, 603, 606, 607, 608,
- 614, 619, 624, 625, 626, 628, 631, 632, 639, 640,
- 641, 644, 647
+ 319, 320, 326, 336, 340, 348, 348, 352, 355, 358,
+ 369, 370, 382, 383, 392, 401, 412, 413, 423, 436,
+ 437, 446, 457, 466, 469, 470, 471, 474, 477, 480,
+ 481, 482, 480, 488, 492, 493, 494, 495, 498, 498,
+ 531, 532, 533, 534, 538, 541, 542, 545, 546, 549,
+ 552, 556, 560, 564, 570, 571, 575, 578, 584, 584,
+ 589, 597, 597, 608, 615, 618, 619, 622, 623, 626,
+ 629, 630, 633, 637, 641, 647, 648, 651, 652, 653,
+ 659, 664, 669, 670, 671, 682, 685, 686, 693, 694,
+ 695, 698, 701
};
#endif
@@ -2411,19 +2411,24 @@ yyreduce:
case 52:
#line 326 "ael.y"
{
- asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str));
- free((yyvsp[(1) - (5)].str));
- free((yyvsp[(3) - (5)].str));
- free((yyvsp[(5) - (5)].str)); ;}
+ if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (5)].str));
+ free((yyvsp[(3) - (5)].str));
+ free((yyvsp[(5) - (5)].str));
+ }
+ ;}
break;
case 53:
-#line 331 "ael.y"
+#line 336 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
break;
case 54:
-#line 335 "ael.y"
+#line 340 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)]));
(yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)]));
@@ -2432,31 +2437,31 @@ yyreduce:
break;
case 55:
-#line 343 "ael.y"
+#line 348 "ael.y"
{ reset_parencount(parseio->scanner); ;}
break;
case 56:
-#line 343 "ael.y"
+#line 348 "ael.y"
{ (yyval.str) = (yyvsp[(3) - (4)].str); ;}
break;
case 57:
-#line 347 "ael.y"
+#line 352 "ael.y"
{
(yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); ;}
break;
case 58:
-#line 350 "ael.y"
+#line 355 "ael.y"
{
(yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);;}
break;
case 59:
-#line 353 "ael.y"
+#line 358 "ael.y"
{
(yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);
@@ -2464,95 +2469,135 @@ yyreduce:
break;
case 60:
-#line 364 "ael.y"
+#line 369 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 61:
-#line 365 "ael.y"
+#line 370 "ael.y"
{
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));
- prev_word = (yyval.str);;}
+ if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (2)].str));
+ free((yyvsp[(2) - (2)].str));
+ prev_word = (yyval.str);
+ }
+ ;}
break;
case 62:
-#line 372 "ael.y"
+#line 382 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
break;
case 63:
-#line 373 "ael.y"
+#line 383 "ael.y"
{
- asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str)); ;}
+ if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (2)].str));
+ free((yyvsp[(2) - (2)].str));
+ }
+ ;}
break;
case 64:
-#line 377 "ael.y"
+#line 392 "ael.y"
{
- asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(3) - (3)].str)); ;}
+ if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (3)].str));
+ free((yyvsp[(3) - (3)].str));
+ }
+ ;}
break;
case 65:
-#line 381 "ael.y"
+#line 401 "ael.y"
{ /* there are often '&' in hints */
- asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(3) - (3)].str));;}
+ if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (3)].str));
+ free((yyvsp[(3) - (3)].str));
+ }
+ ;}
break;
case 66:
-#line 387 "ael.y"
+#line 412 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 67:
-#line 388 "ael.y"
+#line 413 "ael.y"
{
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));
- prev_word = (yyval.str);;}
+ if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (2)].str));
+ free((yyvsp[(2) - (2)].str));
+ prev_word = (yyval.str);
+ }
+ ;}
break;
case 68:
-#line 393 "ael.y"
+#line 423 "ael.y"
{
- asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(2) - (3)].str));
- free((yyvsp[(3) - (3)].str));
- prev_word=(yyval.str);;}
+ if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (3)].str));
+ free((yyvsp[(2) - (3)].str));
+ free((yyvsp[(3) - (3)].str));
+ prev_word=(yyval.str);
+ }
+ ;}
break;
case 69:
-#line 401 "ael.y"
+#line 436 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str);;}
break;
case 70:
-#line 402 "ael.y"
+#line 437 "ael.y"
{
- asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str));
- free((yyvsp[(1) - (2)].str));
- free((yyvsp[(2) - (2)].str));;}
+ if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (2)].str));
+ free((yyvsp[(2) - (2)].str));
+ }
+ ;}
break;
case 71:
-#line 406 "ael.y"
+#line 446 "ael.y"
{
- asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str));
- free((yyvsp[(1) - (3)].str));
- free((yyvsp[(3) - (3)].str));;}
+ if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.str) = NULL;
+ } else {
+ free((yyvsp[(1) - (3)].str));
+ free((yyvsp[(3) - (3)].str));
+ }
+ ;}
break;
case 72:
-#line 412 "ael.y"
+#line 457 "ael.y"
{
(yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
@@ -2560,60 +2605,60 @@ yyreduce:
break;
case 73:
-#line 421 "ael.y"
+#line 466 "ael.y"
{
(yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));;}
break;
case 74:
-#line 424 "ael.y"
+#line 469 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 75:
-#line 425 "ael.y"
+#line 470 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 76:
-#line 426 "ael.y"
+#line 471 "ael.y"
{
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
break;
case 77:
-#line 429 "ael.y"
+#line 474 "ael.y"
{
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;}
break;
case 78:
-#line 432 "ael.y"
+#line 477 "ael.y"
{
(yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); ;}
break;
case 79:
-#line 435 "ael.y"
+#line 480 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 80:
-#line 436 "ael.y"
+#line 481 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 81:
-#line 437 "ael.y"
+#line 482 "ael.y"
{reset_parencount(parseio->scanner);;}
break;
case 82:
-#line 437 "ael.y"
+#line 482 "ael.y"
{ /* XXX word_list maybe ? */
(yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)]));
(yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str);
@@ -2623,7 +2668,7 @@ yyreduce:
break;
case 83:
-#line 443 "ael.y"
+#line 488 "ael.y"
{
(yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (3)].str);
@@ -2631,34 +2676,34 @@ yyreduce:
break;
case 84:
-#line 447 "ael.y"
+#line 492 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (1)].pval); ;}
break;
case 85:
-#line 448 "ael.y"
+#line 493 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); ;}
break;
case 86:
-#line 449 "ael.y"
+#line 494 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
break;
case 87:
-#line 450 "ael.y"
+#line 495 "ael.y"
{
(yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);;}
break;
case 88:
-#line 453 "ael.y"
+#line 498 "ael.y"
{reset_semicount(parseio->scanner);;}
break;
case 89:
-#line 453 "ael.y"
+#line 498 "ael.y"
{
char *bufx;
int tot=0;
@@ -2695,22 +2740,22 @@ yyreduce:
break;
case 90:
-#line 486 "ael.y"
+#line 531 "ael.y"
{ (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 91:
-#line 487 "ael.y"
+#line 532 "ael.y"
{ (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 92:
-#line 488 "ael.y"
+#line 533 "ael.y"
{ (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;}
break;
case 93:
-#line 489 "ael.y"
+#line 534 "ael.y"
{
(yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)]));
(yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));
@@ -2718,41 +2763,41 @@ yyreduce:
break;
case 94:
-#line 493 "ael.y"
+#line 538 "ael.y"
{ (yyval.pval)=0; ;}
break;
case 95:
-#line 496 "ael.y"
+#line 541 "ael.y"
{ (yyval.pval) = (yyvsp[(2) - (2)].pval); ;}
break;
case 96:
-#line 497 "ael.y"
+#line 542 "ael.y"
{ (yyval.pval) = NULL ; ;}
break;
case 97:
-#line 500 "ael.y"
+#line 545 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 98:
-#line 501 "ael.y"
+#line 546 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
break;
case 99:
-#line 504 "ael.y"
+#line 549 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;}
break;
case 100:
-#line 507 "ael.y"
+#line 552 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
@@ -2760,7 +2805,7 @@ yyreduce:
break;
case 101:
-#line 511 "ael.y"
+#line 556 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
@@ -2768,7 +2813,7 @@ yyreduce:
break;
case 102:
-#line 515 "ael.y"
+#line 560 "ael.y"
{
(yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
@@ -2776,7 +2821,7 @@ yyreduce:
break;
case 103:
-#line 519 "ael.y"
+#line 564 "ael.y"
{
(yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)]));
(yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)]));
@@ -2784,24 +2829,24 @@ yyreduce:
break;
case 104:
-#line 525 "ael.y"
+#line 570 "ael.y"
{ (yyval.str) = strdup("1"); ;}
break;
case 105:
-#line 526 "ael.y"
+#line 571 "ael.y"
{ (yyval.str) = (yyvsp[(2) - (2)].str); ;}
break;
case 106:
-#line 530 "ael.y"
+#line 575 "ael.y"
{ /* ext[, pri] default 1 */
(yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)]));
(yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); ;}
break;
case 107:
-#line 533 "ael.y"
+#line 578 "ael.y"
{ /* context, ext, pri */
(yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)]));
(yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)]));
@@ -2809,12 +2854,12 @@ yyreduce:
break;
case 108:
-#line 539 "ael.y"
+#line 584 "ael.y"
{reset_argcount(parseio->scanner);;}
break;
case 109:
-#line 539 "ael.y"
+#line 584 "ael.y"
{
/* XXX original code had @2 but i think we need @5 */
(yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
@@ -2823,19 +2868,19 @@ yyreduce:
break;
case 110:
-#line 544 "ael.y"
+#line 589 "ael.y"
{
(yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); ;}
break;
case 111:
-#line 552 "ael.y"
+#line 597 "ael.y"
{reset_argcount(parseio->scanner);;}
break;
case 112:
-#line 552 "ael.y"
+#line 597 "ael.y"
{
if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) {
(yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)]));
@@ -2848,7 +2893,7 @@ yyreduce:
break;
case 113:
-#line 563 "ael.y"
+#line 608 "ael.y"
{
(yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)]));
if( (yyval.pval)->type == PV_GOTO )
@@ -2859,49 +2904,49 @@ yyreduce:
break;
case 114:
-#line 570 "ael.y"
+#line 615 "ael.y"
{ (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;}
break;
case 115:
-#line 573 "ael.y"
+#line 618 "ael.y"
{ (yyval.str) = (yyvsp[(1) - (1)].str) ;}
break;
case 116:
-#line 574 "ael.y"
+#line 619 "ael.y"
{ (yyval.str) = strdup(""); ;}
break;
case 117:
-#line 577 "ael.y"
+#line 622 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 118:
-#line 578 "ael.y"
+#line 623 "ael.y"
{
(yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/);
(yyval.pval)->u1.str = strdup(""); ;}
break;
case 119:
-#line 581 "ael.y"
+#line 626 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;}
break;
case 120:
-#line 584 "ael.y"
+#line 629 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 121:
-#line 585 "ael.y"
+#line 630 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 122:
-#line 588 "ael.y"
+#line 633 "ael.y"
{
(yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */
(yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
@@ -2909,7 +2954,7 @@ yyreduce:
break;
case 123:
-#line 592 "ael.y"
+#line 637 "ael.y"
{
(yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));
(yyval.pval)->u1.str = NULL;
@@ -2917,7 +2962,7 @@ yyreduce:
break;
case 124:
-#line 596 "ael.y"
+#line 641 "ael.y"
{
(yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */
(yyval.pval)->u1.str = (yyvsp[(2) - (4)].str);
@@ -2925,27 +2970,27 @@ yyreduce:
break;
case 125:
-#line 602 "ael.y"
+#line 647 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 126:
-#line 603 "ael.y"
+#line 648 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;}
break;
case 127:
-#line 606 "ael.y"
+#line 651 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 128:
-#line 607 "ael.y"
+#line 652 "ael.y"
{ (yyval.pval)=(yyvsp[(1) - (1)].pval);;}
break;
case 129:
-#line 608 "ael.y"
+#line 653 "ael.y"
{
(yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)]));
(yyval.pval)->u1.str = (yyvsp[(2) - (5)].str);
@@ -2953,47 +2998,56 @@ yyreduce:
break;
case 130:
-#line 614 "ael.y"
+#line 659 "ael.y"
{
(yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
break;
case 131:
-#line 619 "ael.y"
+#line 664 "ael.y"
{
(yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
break;
case 132:
-#line 624 "ael.y"
+#line 669 "ael.y"
{ (yyval.pval) = NULL; ;}
break;
case 133:
-#line 625 "ael.y"
+#line 670 "ael.y"
{ (yyval.pval) = linku1(nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])), (yyvsp[(3) - (3)].pval)); ;}
break;
case 134:
-#line 626 "ael.y"
- { char *x; asprintf(&x,"%s@%s", (yyvsp[(1) - (5)].str),(yyvsp[(3) - (5)].str)); free((yyvsp[(1) - (5)].str)); free((yyvsp[(3) - (5)].str));
- (yyval.pval) = linku1(nword(x, &(yylsp[(1) - (5)])), (yyvsp[(5) - (5)].pval));;}
+#line 671 "ael.y"
+ {
+ char *x;
+ if (asprintf(&x,"%s@%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str)) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ (yyval.pval) = NULL;
+ } else {
+ free((yyvsp[(1) - (5)].str));
+ free((yyvsp[(3) - (5)].str));
+ (yyval.pval) = linku1(nword(x, &(yylsp[(1) - (5)])), (yyvsp[(5) - (5)].pval));
+ }
+ ;}
break;
case 135:
-#line 628 "ael.y"
+#line 682 "ael.y"
{(yyval.pval)=(yyvsp[(2) - (2)].pval);;}
break;
case 136:
-#line 631 "ael.y"
+#line 685 "ael.y"
{ (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;}
break;
case 137:
-#line 632 "ael.y"
+#line 686 "ael.y"
{
(yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)]));
(yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval);
@@ -3001,36 +3055,36 @@ yyreduce:
break;
case 138:
-#line 639 "ael.y"
+#line 693 "ael.y"
{ (yyval.pval) = (yyvsp[(1) - (2)].pval); ;}
break;
case 139:
-#line 640 "ael.y"
+#line 694 "ael.y"
{ (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); ;}
break;
case 140:
-#line 641 "ael.y"
+#line 695 "ael.y"
{(yyval.pval)=(yyvsp[(1) - (2)].pval);;}
break;
case 141:
-#line 644 "ael.y"
+#line 698 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)]));
(yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;}
break;
case 142:
-#line 647 "ael.y"
+#line 701 "ael.y"
{
(yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));;}
break;
/* Line 1267 of yacc.c. */
-#line 3034 "ael.tab.c"
+#line 3088 "ael.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3250,7 +3304,7 @@ yyreturn:
}
-#line 652 "ael.y"
+#line 706 "ael.y"
static char *token_equivs1[] =
diff --git a/res/ael/ael.y b/res/ael/ael.y
index fbdcdcc46..c412e3cdf 100644
--- a/res/ael/ael.y
+++ b/res/ael/ael.y
@@ -324,10 +324,15 @@ statements : /* empty */ { $$ = NULL; }
* detect the '-' but only the ':' as separator
*/
timerange: word3_list COLON word3_list COLON word3_list {
- asprintf(&$$, "%s:%s:%s", $1, $3, $5);
- free($1);
- free($3);
- free($5); }
+ if (asprintf(&$$, "%s:%s:%s", $1, $3, $5) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($3);
+ free($5);
+ }
+ }
| word { $$ = $1; }
;
@@ -363,50 +368,90 @@ if_like_head : KW_IF test_expr {
word_list : word { $$ = $1;}
| word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);
- prev_word = $$;}
+ if (asprintf(&($$), "%s%s", $1, $2) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($2);
+ prev_word = $$;
+ }
+ }
;
hint_word : word { $$ = $1; }
| hint_word word {
- asprintf(&($$), "%s %s", $1, $2);
- free($1);
- free($2); }
+ if (asprintf(&($$), "%s %s", $1, $2) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($2);
+ }
+ }
| hint_word COLON word {
- asprintf(&($$), "%s:%s", $1, $3);
- free($1);
- free($3); }
+ if (asprintf(&($$), "%s:%s", $1, $3) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($3);
+ }
+ }
| hint_word AMPER word { /* there are often '&' in hints */
- asprintf(&($$), "%s&%s", $1, $3);
- free($1);
- free($3);}
-
+ if (asprintf(&($$), "%s&%s", $1, $3) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($3);
+ }
+ }
+ ;
word3_list : word { $$ = $1;}
| word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);
- prev_word = $$;}
+ if (asprintf(&($$), "%s%s", $1, $2) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($2);
+ prev_word = $$;
+ }
+ }
| word word word {
- asprintf(&($$), "%s%s%s", $1, $2, $3);
- free($1);
- free($2);
- free($3);
- prev_word=$$;}
+ if (asprintf(&($$), "%s%s%s", $1, $2, $3) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($2);
+ free($3);
+ prev_word=$$;
+ }
+ }
;
goto_word : word { $$ = $1;}
| word word {
- asprintf(&($$), "%s%s", $1, $2);
- free($1);
- free($2);}
+ if (asprintf(&($$), "%s%s", $1, $2) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($2);
+ }
+ }
| goto_word COLON word {
- asprintf(&($$), "%s:%s", $1, $3);
- free($1);
- free($3);}
+ if (asprintf(&($$), "%s:%s", $1, $3) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($3);
+ }
+ }
;
switch_statement : KW_SWITCH test_expr LC case_statements RC {
@@ -623,8 +668,17 @@ eswitches : KW_ESWITCHES LC switchlist RC {
switchlist : /* empty */ { $$ = NULL; }
| word SEMI switchlist { $$ = linku1(nword($1, &@1), $3); }
- | word AT word SEMI switchlist { char *x; asprintf(&x,"%s@%s", $1,$3); free($1); free($3);
- $$ = linku1(nword(x, &@1), $5);}
+ | word AT word SEMI switchlist {
+ char *x;
+ if (asprintf(&x,"%s@%s", $1, $3) < 0) {
+ ast_log(LOG_WARNING, "asprintf() failed\n");
+ $$ = NULL;
+ } else {
+ free($1);
+ free($3);
+ $$ = linku1(nword(x, &@1), $5);
+ }
+ }
| error switchlist {$$=$2;}
;
diff --git a/res/ael/ael_lex.c b/res/ael/ael_lex.c
index 08284fd14..b774450d5 100644
--- a/res/ael/ael_lex.c
+++ b/res/ael/ael_lex.c
@@ -9,7 +9,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 33
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -32,7 +32,7 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
@@ -55,7 +55,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -86,6 +85,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -95,11 +96,12 @@ typedef unsigned int flex_uint32_t;
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
@@ -135,8 +137,6 @@ typedef void* yyscan_t;
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r
-int ael_yylex_init (yyscan_t* scanner);
-
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
@@ -194,14 +194,9 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -950,7 +945,7 @@ static void pbcwhere(const char *text, int *line, int *col )
#define STORE_POS
#define STORE_LOC
#endif
-#line 953 "ael_lex.c"
+#line 948 "ael_lex.c"
#define INITIAL 0
#define paren 1
@@ -1019,6 +1014,10 @@ static int yy_init_globals (yyscan_t yyscanner );
# define yylloc yyg->yylloc_r
+int ael_yylex_init (yyscan_t* scanner);
+
+int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
+
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
@@ -1098,7 +1097,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1163,9 +1162,11 @@ static int input (yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int ael_yylex (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+extern int ael_yylex \
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-#define YY_DECL int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
+#define YY_DECL int ael_yylex \
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
/* Code executed at the beginning of each rule, after yytext and yyleng
@@ -1195,7 +1196,7 @@ YY_DECL
#line 208 "ael.flex"
-#line 1198 "ael_lex.c"
+#line 1199 "ael_lex.c"
yylval = yylval_param;
@@ -2000,7 +2001,7 @@ YY_RULE_SETUP
#line 622 "ael.flex"
ECHO;
YY_BREAK
-#line 2003 "ael_lex.c"
+#line 2004 "ael_lex.c"
case YY_END_OF_BUFFER:
{
@@ -2231,7 +2232,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- yyg->yy_n_chars, num_to_read );
+ yyg->yy_n_chars, (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@@ -2255,6 +2256,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
yyg->yy_n_chars += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
@@ -2683,7 +2692,9 @@ static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
-
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
@@ -2701,6 +2712,8 @@ static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
+ if ( ! yyg->yy_buffer_stack )
+ YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2745,7 +2758,7 @@ YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
/** Setup the input buffer state to scan a string. The next call to ael_yylex() will
* scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
+ * @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
@@ -3019,6 +3032,42 @@ int ael_yylex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
+/* ael_yylex_init_extra has the same functionality as ael_yylex_init, but follows the
+ * convention of taking the scanner as the last argument. Note however, that
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
+ * is the reason, too, why this function also must handle its own declaration).
+ * The user defined value in the first argument will be available to ael_yyalloc in
+ * the yyextra field.
+ */
+
+int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
+{
+ struct yyguts_t dummy_yyguts;
+
+ ael_yyset_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL){
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
+ if (*ptr_yy_globals == NULL){
+ errno = ENOMEM;
+ return 1;
+ }
+
+ /* By setting to 0xAA, we expose bugs in
+ yy_init_globals. Leave at 0x00 for releases. */
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
+
+ ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
+}
+
static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -3281,7 +3330,9 @@ struct pval *ael2_parse(char *filename, int *errors)
my_file = strdup(filename);
stat(filename, &stats);
buffer = (char*)malloc(stats.st_size+2);
- fread(buffer, 1, stats.st_size, fin);
+ if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
+ ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
+ }
buffer[stats.st_size]=0;
fclose(fin);
@@ -3349,7 +3400,9 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
struct stat stats;
stat(fnamebuf2, &stats);
buffer = (char*)malloc(stats.st_size+1);
- fread(buffer, 1, stats.st_size, in1);
+ if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
+ ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
+ }
buffer[stats.st_size] = 0;
ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
fclose(in1);
diff --git a/res/res_agi.c b/res/res_agi.c
index e970f1715..2df15c4d8 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2656,7 +2656,8 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi
/* If it's voice, write it to the audio pipe */
if ((agi->audio > -1) && (f->frametype == AST_FRAME_VOICE)) {
/* Write, ignoring errors */
- write(agi->audio, f->data, f->datalen);
+ if (write(agi->audio, f->data, f->datalen) < 0) {
+ }
}
ast_frfree(f);
}
diff --git a/res/res_crypto.c b/res/res_crypto.c
index f1a2234fd..e55abe891 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -106,7 +106,11 @@ static int pw_cb(char *buf, int size, int rwflag, void *userdata)
snprintf(prompt, sizeof(prompt), ">>>> passcode for %s key '%s': ",
key->ktype == AST_KEY_PRIVATE ? "PRIVATE" : "PUBLIC", key->name);
- write(key->outfd, prompt, strlen(prompt));
+ if (write(key->outfd, prompt, strlen(prompt)) < 0) {
+ ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+ key->infd = -2;
+ return -1;
+ }
memset(buf, 0, sizeof(buf));
tmp = ast_hide_password(key->infd);
memset(buf, 0, size);
@@ -177,7 +181,9 @@ static struct ast_key *try_load_key(const char *dir, const char *fname, int ifd,
while(!feof(f)) {
/* Calculate a "whatever" quality md5sum of the key */
char buf[256] = "";
- fgets(buf, sizeof(buf), f);
+ if (!fgets(buf, sizeof(buf), f)) {
+ continue;
+ }
if (!feof(f))
MD5Update(&md5, (unsigned char *) buf, strlen(buf));
}
diff --git a/res/res_jabber.c b/res/res_jabber.c
index ae24d7545..f2283b108 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -987,8 +987,7 @@ static int aji_act_hook(void *data, int type, iks *node)
sprintf(secret, "%s%s", pak->id, client->password);
ast_sha1_hash(shasum, secret);
handshake = NULL;
- asprintf(&handshake, "<handshake>%s</handshake>", shasum);
- if (handshake) {
+ if (asprintf(&handshake, "<handshake>%s</handshake>", shasum) >= 0) {
aji_send_raw(client, handshake);
ast_free(handshake);
handshake = NULL;
@@ -2755,8 +2754,7 @@ static int aji_create_client(char *label, struct ast_variable *var, int debug)
}
if (!strchr(client->user, '/') && !client->component) { /*client */
resource = NULL;
- asprintf(&resource, "%s/asterisk", client->user);
- if (resource) {
+ if (asprintf(&resource, "%s/asterisk", client->user) >= 0) {
client->jid = iks_id_new(client->stack, resource);
ast_free(resource);
}
@@ -2772,8 +2770,7 @@ static int aji_create_client(char *label, struct ast_variable *var, int debug)
}
if (!strchr(client->user, '/') && !client->component) { /*client */
resource = NULL;
- asprintf(&resource, "%s/asterisk", client->user);
- if (resource) {
+ if (asprintf(&resource, "%s/asterisk", client->user) >= 0) {
client->jid = iks_id_new(client->stack, resource);
ast_free(resource);
}
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index ebb6050ec..1a7bea5a2 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -524,7 +524,10 @@ static int spawn_mp3(struct mohclass *class)
}
}
/* Child */
- chdir(class->dir);
+ if (chdir(class->dir) < 0) {
+ ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
+ _exit(1);
+ }
if (ast_test_flag(class, MOH_CUSTOM)) {
execv(argv[0], argv);
} else {
@@ -936,8 +939,14 @@ static int moh_scan_files(struct mohclass *class) {
class->total_files = 0;
dirnamelen = strlen(class->dir) + 2;
- getcwd(path, sizeof(path));
- chdir(class->dir);
+ if (!getcwd(path, sizeof(path))) {
+ ast_log(LOG_WARNING, "getcwd() failed: %s\n", strerror(errno));
+ return -1;
+ }
+ if (chdir(class->dir) < 0) {
+ ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
+ return -1;
+ }
while ((files_dirent = readdir(files_DIR))) {
/* The file name must be at least long enough to have the file type extension */
if ((strlen(files_dirent->d_name) < 4))
@@ -974,7 +983,10 @@ static int moh_scan_files(struct mohclass *class) {
}
closedir(files_DIR);
- chdir(path);
+ if (chdir(path) < 0) {
+ ast_log(LOG_WARNING, "chdir() failed: %s\n", strerror(errno));
+ return -1;
+ }
if (ast_test_flag(class, MOH_SORTALPHA))
qsort(&class->filearray[0], class->total_files, sizeof(char *), moh_sort_compare);
return class->total_files;
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c
index f5d785643..ce7d10c71 100644
--- a/res/res_phoneprov.c
+++ b/res/res_phoneprov.c
@@ -368,7 +368,9 @@ static struct ast_str *phoneprov_callback(struct ast_tcptls_session_instance *se
ast_get_version(), buf, len, route->file->mime_type);
while ((len = read(fd, buf, sizeof(buf))) > 0)
- fwrite(buf, 1, len, ser->f);
+ if (fwrite(buf, 1, len, ser->f) != len) {
+ ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
+ }
close(fd);
route = unref_route(route);
diff --git a/utils/astcanary.c b/utils/astcanary.c
index a0a295ca3..495c1a604 100644
--- a/utils/astcanary.c
+++ b/utils/astcanary.c
@@ -82,7 +82,9 @@ int main(int argc, char *argv[])
if (utime(argv[1], NULL)) {
/* Recreate the file if it doesn't exist */
if ((fd = open(argv[1], O_RDWR | O_TRUNC | O_CREAT, 0777)) > -1) {
- write(fd, explanation, strlen(explanation));
+ if (write(fd, explanation, strlen(explanation)) < 0) {
+ exit(1);
+ }
close(fd);
} else {
exit(1);
diff --git a/utils/astman.c b/utils/astman.c
index 7e11d2565..9c659cd86 100644
--- a/utils/astman.c
+++ b/utils/astman.c
@@ -151,10 +151,14 @@ static void __attribute__((format (printf, 2, 3))) fdprintf(int fd, char *fmt, .
{
char stuff[4096];
va_list ap;
+ int res;
+
va_start(ap, fmt);
vsnprintf(stuff, sizeof(stuff), fmt, ap);
va_end(ap);
- write(fd, stuff, strlen(stuff));
+ if ((res = write(fd, stuff, strlen(stuff))) < 0) {
+ fprintf(stderr, "write() failed: %s\n", strerror(errno));
+ }
}
static char *get_header(struct message *m, char *var)
@@ -418,13 +422,16 @@ static int __attribute__((format (printf, 2, 3))) manager_action(char *action, c
struct ast_mansession *s;
char tmp[4096];
va_list ap;
+ int res;
s = &session;
fdprintf(s->fd, "Action: %s\r\n", action);
va_start(ap, fmt);
vsnprintf(tmp, sizeof(tmp), fmt, ap);
va_end(ap);
- write(s->fd, tmp, strlen(tmp));
+ if ((res = write(s->fd, tmp, strlen(tmp))) < 0) {
+ fprintf(stderr, "write() failed: %s\n", strerror(errno));
+ }
fdprintf(s->fd, "\r\n");
return 0;
}
diff --git a/utils/frame.c b/utils/frame.c
index 5aadb9687..c598f57cb 100644
--- a/utils/frame.c
+++ b/utils/frame.c
@@ -59,14 +59,14 @@ int getremainingfilelength( FILE *anyin, long *result)
{
long i;
- i = ftell (anyin);
+ i = ftell(anyin);
if (i == -1) return FALSE;
- if (fseek (anyin, 0, SEEK_END) == -1) return FALSE;
- *result = ftell (anyin);
+ if (fseek(anyin, 0, SEEK_END) == -1) return FALSE;
+ *result = ftell(anyin);
if (*result == -1) return FALSE;
(*result) -= i;
(*result) /= samplewidth;
- if (fseek (anyin, i, SEEK_SET) == -1) return FALSE;
+ if (fseek(anyin, i, SEEK_SET) == -1) return FALSE;
return TRUE;
}
@@ -81,31 +81,39 @@ void readpkheader( FILE *anyin)
for (i = 0; i < 11; i++)
{
- fread( &tempint, 4, 1, anyin);
- printf( "%d: %d, ", i, tempint);
+ if (!fread( &tempint, 4, 1, anyin)) {
+ return;
+ }
+ printf( "%d: %d, ", i, tempint);
}
printf( "\n");
- fread( blood, 1, 8, anyin);
+ if (!fread( blood, 1, 8, anyin)) {
+ return;
+ }
for (i = 0; i < 8; i++)
- printf( "%d ", blood[i]);
+ printf( "%d ", blood[i]);
printf( "\n");
for (i = 0; i < 8; i++)
- {
- for (x = 128; x > 0; x /= 2)
- printf((blood[i] & x) == 0? "0 ":"1 ");
- printf(i%4==3? "\n":"| ");
- }
+ {
+ for (x = 128; x > 0; x /= 2)
+ printf((blood[i] & x) == 0? "0 ":"1 ");
+ printf(i%4==3? "\n":"| ");
+ }
printf( "\n");
for (i = 0; i < 2; i++)
{
- fread( &tempint, 4, 1, anyin);
- printf( "%d: %d, ", i, tempint);
+ if (!fread( &tempint, 4, 1, anyin)) {
+ return;
+ }
+ printf( "%d: %d, ", i, tempint);
}
printf( "\n");
for (i = 0; i < 2; i++)
{
- fread( &tempushort, 2, 1, anyin);
- printf( "%d: %d, ", i, tempushort);
+ if (!fread( &tempushort, 2, 1, anyin)) {
+ return;
+ }
+ printf( "%d: %d, ", i, tempushort);
}
printf( "\n");
}
@@ -125,59 +133,81 @@ void readwavheader( FILE *anyin)
iswav = FALSE;
if (ftell(anyin) == -1) /* If we cannot seek this file */
- {
- nowav = TRUE; /* -> Pretend this is no wav-file */
- chat("File not seekable: not checking for WAV-header.\n");
- }
+ {
+ nowav = TRUE; /* -> Pretend this is no wav-file */
+ chat("File not seekable: not checking for WAV-header.\n");
+ }
else
- {
- /* Expect four bytes "RIFF" and four bytes filelength */
- fread (str, 1, 8, anyin); /* 0 */
- str[4] = '\0';
- if (strcmp(str, "RIFF") != 0) nowav = TRUE;
- /* Expect eight bytes "WAVEfmt " */
- fread (str, 1, 8, anyin); /* 8 */
- str[8] = '\0';
- if (strcmp(str, "WAVEfmt ") != 0) nowav = TRUE;
- /* Expect length of fmt data, which should be 16 */
- fread (&tempuint, 4, 1, anyin); /* 16 */
- if (tempuint != 16) nowav = TRUE;
- /* Expect format tag, which should be 1 for pcm */
- fread (&tempushort, 2, 1, anyin); /* 20 */
- if (tempushort != 1)
- nowav = TRUE;
- /* Expect number of channels */
- fread (&cn, 2, 1, anyin); /* 20 */
- if (cn != 1 && cn != 2) nowav = TRUE;
- /* Read samplefrequency */
- fread (&sf, 4, 1, anyin); /* 24 */
- /* Read bytes per second: Should be samplefreq * channels * 2 */
- fread (&tempuint, 4, 1, anyin); /* 28 */
- if (tempuint != sf * cn * 2) nowav = TRUE;
- /* read bytes per frame: Should be channels * 2 */
- fread (&tempushort, 2, 1, anyin); /* 32 */
- if (tempushort != cn * 2) nowav = TRUE;
- /* Read bits per sample: Should be 16 */
- fread (&tempushort, 2, 1, anyin); /* 34 */
- if (tempushort != 16) nowav = TRUE;
- fread (str, 4, 1, anyin); /* 36 */
- str[4] = '\0';
- if (strcmp(str, "data") != 0) nowav = TRUE;
- fread (&tempuint, 4, 1, anyin); /* 40 */
- if (nowav)
- {
- fseek (anyin, 0, SEEK_SET); /* Back to beginning of file */
- chat("File has no WAV header.\n");
- }
- else
- {
- samplefrequency = sf;
- channels = cn;
- chat ("Read WAV header: %d channels, samplefrequency %d.\n",
- channels, samplefrequency);
- iswav = TRUE;
- }
- }
+ {
+ /* Expect four bytes "RIFF" and four bytes filelength */
+ if (!fread(str, 1, 8, anyin)) { /* 0 */
+ return;
+ }
+ str[4] = '\0';
+ if (strcmp(str, "RIFF") != 0) nowav = TRUE;
+ /* Expect eight bytes "WAVEfmt " */
+ if (!fread(str, 1, 8, anyin)) { /* 8 */
+ return;
+ }
+ str[8] = '\0';
+ if (strcmp(str, "WAVEfmt ") != 0) nowav = TRUE;
+ /* Expect length of fmt data, which should be 16 */
+ if (!fread(&tempuint, 4, 1, anyin)) { /* 16 */
+ return;
+ }
+ if (tempuint != 16) nowav = TRUE;
+ /* Expect format tag, which should be 1 for pcm */
+ if (!fread(&tempushort, 2, 1, anyin)) { /* 20 */
+ return;
+ }
+ if (tempushort != 1)
+ nowav = TRUE;
+ /* Expect number of channels */
+ if (!fread(&cn, 2, 1, anyin)) { /* 20 */
+ return;
+ }
+ if (cn != 1 && cn != 2) nowav = TRUE;
+ /* Read samplefrequency */
+ if (!fread(&sf, 4, 1, anyin)) { /* 24 */
+ return;
+ }
+ /* Read bytes per second: Should be samplefreq * channels * 2 */
+ if (!fread(&tempuint, 4, 1, anyin)) { /* 28 */
+ return;
+ }
+ if (tempuint != sf * cn * 2) nowav = TRUE;
+ /* read bytes per frame: Should be channels * 2 */
+ if (!fread(&tempushort, 2, 1, anyin)) { /* 32 */
+ return;
+ }
+ if (tempushort != cn * 2) nowav = TRUE;
+ /* Read bits per sample: Should be 16 */
+ if (!fread(&tempushort, 2, 1, anyin)) { /* 34 */
+ return;
+ }
+ if (tempushort != 16) nowav = TRUE;
+ if (!fread(str, 4, 1, anyin)) { /* 36 */
+ return;
+ }
+ str[4] = '\0';
+ if (strcmp(str, "data") != 0) nowav = TRUE;
+ if (!fread(&tempuint, 4, 1, anyin)) { /* 40 */
+ return;
+ }
+ if (nowav)
+ {
+ fseek(anyin, 0, SEEK_SET); /* Back to beginning of file */
+ chat("File has no WAV header.\n");
+ }
+ else
+ {
+ samplefrequency = sf;
+ channels = cn;
+ chat("Read WAV header: %d channels, samplefrequency %d.\n",
+ channels, samplefrequency);
+ iswav = TRUE;
+ }
+ }
return;
}
@@ -192,36 +222,62 @@ void makewavheader( void)
unsigned short tempushort;
/* If fseek fails, don't create the header. */
- if (fseek (out, 0, SEEK_END) != -1)
- {
- filelength = ftell (out);
- chat ("filelength %d, ", filelength);
- fseek (out, 0, SEEK_SET);
- fwrite ("RIFF", 1, 4, out); /* 0 */
- tempuint = filelength - 8; fwrite (&tempuint, 4, 1, out); /* 4 */
- fwrite ("WAVEfmt ", 1, 8, out); /* 8 */
- /* length of fmt data 16 bytes */
- tempuint = 16;
- fwrite (&tempuint, 4, 1, out); /* 16 */
- /* Format tag: 1 for pcm */
- tempushort = 1;
- fwrite (&tempushort, 2, 1, out); /* 20 */
- chat ("%d channels\n", channels);
- fwrite (&channels, 2, 1, out);
- chat ("samplefrequency %d\n", samplefrequency);
- fwrite (&samplefrequency, 4, 1, out); /* 24 */
- /* Bytes per second */
- tempuint = channels * samplefrequency * 2;
- fwrite (&tempuint, 4, 1, out); /* 28 */
- /* Block align */
- tempushort = 2 * channels;
- fwrite (&tempushort, 2, 1, out); /* 32 */
- /* Bits per sample */
- tempushort = 16;
- fwrite (&tempushort, 2, 1, out); /* 34 */
- fwrite ("data", 4, 1, out); /* 36 */
- tempuint = filelength - 44; fwrite (&tempuint, 4, 1, out); /* 40 */
- }
+ if (fseek(out, 0, SEEK_END) != -1)
+ {
+ filelength = ftell(out);
+ chat("filelength %d, ", filelength);
+ fseek(out, 0, SEEK_SET);
+ if (!fwrite("RIFF", 1, 4, out)) { /* 0 */
+ return;
+ }
+ tempuint = filelength - 8;
+ if (!fwrite(&tempuint, 4, 1, out)) { /* 4 */
+ return;
+ }
+ if (!fwrite("WAVEfmt ", 1, 8, out)) { /* 8 */
+ return;
+ }
+ /* length of fmt data 16 bytes */
+ tempuint = 16;
+ if (!fwrite(&tempuint, 4, 1, out)) { /* 16 */
+ return;
+ }
+ /* Format tag: 1 for pcm */
+ tempushort = 1;
+ if (!fwrite(&tempushort, 2, 1, out)) { /* 20 */
+ return;
+ }
+ chat("%d channels\n", channels);
+ if (!fwrite(&channels, 2, 1, out)) {
+ return;
+ }
+ chat("samplefrequency %d\n", samplefrequency);
+ if (!fwrite(&samplefrequency, 4, 1, out)) { /* 24 */
+ return;
+ }
+ /* Bytes per second */
+ tempuint = channels * samplefrequency * 2;
+ if (!fwrite(&tempuint, 4, 1, out)) { /* 28 */
+ return;
+ }
+ /* Block align */
+ tempushort = 2 * channels;
+ if (!fwrite(&tempushort, 2, 1, out)) { /* 32 */
+ return;
+ }
+ /* Bits per sample */
+ tempushort = 16;
+ if (!fwrite(&tempushort, 2, 1, out)) { /* 34 */
+ return;
+ }
+ if (!fwrite("data", 4, 1, out)) { /* 36 */
+ return;
+ }
+ tempuint = filelength - 44;
+ if (!fwrite(&tempuint, 4, 1, out)) { /* 40 */
+ return;
+ }
+ }
return;
}
@@ -870,10 +926,10 @@ int myexit (int value)
case 0:
if (wavout)
makewavheader(); /* Writes a fully informed .WAV header */
- chat ("Success!\n");
+ chat("Success!\n");
break;
default:
- chat ("Failure.\n");
+ chat("Failure.\n");
break;
}
exit (value);
@@ -903,7 +959,9 @@ int workloop( FILE *theinfile, FILE *theoutfile,
/* Call the routine that does the work */
if (!work (buffer, nowlength)) /* On error, stop. */
return FALSE;
- fwrite(buffer, sizeof(short), nowlength, theoutfile);
+ if (!fwrite(buffer, sizeof(short), nowlength, theoutfile)) {
+ return FALSE;
+ }
if (ferror( theoutfile) != 0)
fatalperror("Error writing to output file");
}
diff --git a/utils/muted.c b/utils/muted.c
index af0ad229d..6a7569557 100644
--- a/utils/muted.c
+++ b/utils/muted.c
@@ -116,7 +116,9 @@ static int load_config(void)
return -1;
}
while(!feof(f)) {
- fgets(buf, sizeof(buf), f);
+ if (!fgets(buf, sizeof(buf), f)) {
+ continue;
+ }
if (!feof(f)) {
lineno++;
val = strchr(buf, '#');
@@ -684,7 +686,10 @@ int main(int argc, char *argv[])
}
if (needfork) {
#ifndef HAVE_SBIN_LAUNCHD
- daemon(0,0);
+ if (daemon(0,0) < 0) {
+ fprintf(stderr, "daemon() failed: %s\n", strerror(errno));
+ exit(1);
+ }
#else
fprintf(stderr, "Mac OS X detected. Use 'launchd -d muted -f' to launch.\n");
exit(1);
diff --git a/utils/stereorize.c b/utils/stereorize.c
index 7d72cbdbf..c8428320d 100644
--- a/utils/stereorize.c
+++ b/utils/stereorize.c
@@ -150,10 +150,10 @@ int main( int argcount, char *args[])
for (; i < maxk; i++)
stereosample[2 * i + 1] = 0;
- fwrite(stereosample, sizeof(*leftsample), 2 * maxk, out);
- if (ferror( out) != 0)
- fatalerror("Error writing to file '%s': %s\n",
- outfilename, strerror(errno));
+ if (!fwrite(stereosample, sizeof(*leftsample), 2 * maxk, out)) {
+ fatalerror("Error writing to file '%s': %s\n",
+ outfilename, strerror(errno));
+ }
}
/* That was an endless loop. This point is never reached. */
}
diff --git a/utils/streamplayer.c b/utils/streamplayer.c
index fb0d055a2..ebb12e54b 100644
--- a/utils/streamplayer.c
+++ b/utils/streamplayer.c
@@ -112,8 +112,11 @@ int main(int argc, char *argv[])
select(2, NULL, &wfds, NULL, &tv);
- if (FD_ISSET(1, &wfds))
- write(1, buf, res);
+ if (FD_ISSET(1, &wfds)) {
+ if (write(1, buf, res) < 1) {
+ break;
+ }
+ }
}
close(s);