summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-15 09:12:46 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-12-15 09:12:46 +0100
commit2183181a37a0d2748ec5249802431d7634dee3bb (patch)
tree898265b12ecb88c220745e02aa74f3f8af2a2443
parentf73bfdc31b21e34ba1bd6338e01be3af6c3cb89e (diff)
parentcce716909e5236f1aa2971a4db45a007c7efe416 (diff)
Merge tag 'upstream/6.1.3'
Upstream version 6.1.3
-rw-r--r--CMakeLists.txt2
-rw-r--r--HISTORY4
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--dist.info2
-rw-r--r--index.html3
-rw-r--r--index_ja.html3
-rw-r--r--src/.gitignore1
-rw-r--r--src/mktable.c42
-rw-r--r--src/oniguruma.h2
-rw-r--r--src/st.c19
11 files changed, 61 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac8ba7f..7876b79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.8)
project(oniguruma C)
set(PACKAGE onig)
-set(PACKAGE_VERSION "6.1.2")
+set(PACKAGE_VERSION "6.1.3")
set(USE_COMBINATION_EXPLOSION_CHECK 0)
set(USE_CRNL_AS_LINE_TERMINATOR 0)
diff --git a/HISTORY b/HISTORY
index c59fe4b..d32713e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,9 @@
History
+2016/12/11: Version 6.1.3
+
+2016/12/11: fix: Syntax error: redirection unexpected (expecting word) #35
+
2016/11/07: Version 6.1.2
2016/10/25: allow word bound, word begin and word end in look-behind.
diff --git a/Makefile.am b/Makefile.am
index 086b23c..b044f93 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,7 @@ do_subst = sed \
-e 's,[@]includedir[@],$(includedir),g'
oniguruma.pc: $(srcdir)/oniguruma.pc.in Makefile
- $(do_subst) < $(<) > $(@)
+ $(do_subst) < $(srcdir)/oniguruma.pc.in > $(@)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = oniguruma.pc
diff --git a/configure.ac b/configure.ac
index beeaf5a..fbc6489 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(onig, 6.1.2)
+AC_INIT(onig, 6.1.3)
AC_CONFIG_MACRO_DIR([m4])
diff --git a/dist.info b/dist.info
index 8e8d1aa..0a3f4d6 100644
--- a/dist.info
+++ b/dist.info
@@ -1,7 +1,7 @@
--- This file is part of LuaDist project
name = "onig"
-version = "6.1.2"
+version = "6.1.3"
desc = "Oniguruma is a regular expressions library."
author = "K.Kosako"
diff --git a/index.html b/index.html
index cf9177c..f6e2f24 100644
--- a/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
<h1>Oniguruma</h1> (<a href="index_ja.html">Japanese</a>)
<p>
-(c) K.Kosako, updated at: 2016/11/07
+(c) K.Kosako, updated at: 2016/12/11
</p>
<dl>
@@ -16,6 +16,7 @@
<dt><b>What's new</b>
</font>
<ul>
+<li>2016/12/11: Version 6.1.3 released.</li>
<li>2016/11/07: Version 6.1.2 released.</li>
<li>2016/09/02: Version 6.1.1 released.</li>
<li>2016/08/29: Version 6.1.0 released.</li>
diff --git a/index_ja.html b/index_ja.html
index e11e0f5..0929eec 100644
--- a/index_ja.html
+++ b/index_ja.html
@@ -8,7 +8,7 @@
<h1>鬼車</h1>
<p>
-(c) K.Kosako, 最終更新: 2016/11/07
+(c) K.Kosako, 最終更新: 2016/12/11
</p>
<dl>
@@ -16,6 +16,7 @@
<dt><b>更新情報</b>
</font>
<ul>
+<li>2016/12/11: Version 6.1.3 リリース</li>
<li>2016/11/07: Version 6.1.2 リリース</li>
<li>2016/09/02: Version 6.1.1 リリース</li>
<li>2016/08/29: Version 6.1.0 リリース</li>
diff --git a/src/.gitignore b/src/.gitignore
index e9781fc..50ae793 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -12,3 +12,4 @@ UNICODE_PROPERTIES
*.txt
.libs/
.deps/
+/mktable
diff --git a/src/mktable.c b/src/mktable.c
index 285216e..a9cac2c 100644
--- a/src/mktable.c
+++ b/src/mktable.c
@@ -2,7 +2,7 @@
mktable.c
**********************************************************************/
/*-
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2016 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,10 @@
#include <stdio.h>
#include <locale.h>
+#ifndef __USE_ISOC99
#define __USE_ISOC99
+#endif
+
#include <ctype.h>
#include "regenc.h"
@@ -1108,11 +1111,13 @@ static int exec(FILE* fp, ENC_INFO* einfo)
#define NCOL 8
int c, val, enc;
+ int r;
enc = einfo->num;
- fprintf(fp, "static const unsigned short Enc%s_CtypeTable[256] = {\n",
- einfo->name);
+ r = fprintf(fp, "static const unsigned short Enc%s_CtypeTable[256] = {\n",
+ einfo->name);
+ if (r < 0) return -1;
for (c = 0; c < 256; c++) {
val = 0;
@@ -1131,20 +1136,33 @@ static int exec(FILE* fp, ENC_INFO* einfo)
if (IsWord (enc, c)) val |= BIT_CTYPE_WORD;
if (IsAscii (enc, c)) val |= BIT_CTYPE_ASCII;
- if (c % NCOL == 0) fputs(" ", fp);
- fprintf(fp, "0x%04x", val);
- if (c != 255) fputs(",", fp);
+ if (c % NCOL == 0) {
+ r = fputs(" ", fp);
+ if (r < 0) return -1;
+ }
+ r = fprintf(fp, "0x%04x", val);
+ if (r < 0) return -1;
+
+ if (c != 255) {
+ r = fputs(",", fp);
+ if (r < 0) return -1;
+ }
if (c != 0 && c % NCOL == (NCOL-1))
- fputs("\n", fp);
+ r = fputs("\n", fp);
else
- fputs(" ", fp);
+ r = fputs(" ", fp);
+
+ if (r < 0) return -1;
}
- fprintf(fp, "};\n");
+ r = fprintf(fp, "};\n");
+ if (r < 0) return -1;
+
return 0;
}
extern int main(int argc ARG_UNUSED, char* argv[] ARG_UNUSED)
{
+ int r;
int i;
FILE* fp = stdout;
@@ -1155,7 +1173,11 @@ extern int main(int argc ARG_UNUSED, char* argv[] ARG_UNUSED)
/* setlocale(LC_ALL, "fr_FR.iso88591"); */
for (i = 0; i < (int )(sizeof(Info)/sizeof(ENC_INFO)); i++) {
- exec(fp, &Info[i]);
+ r = exec(fp, &Info[i]);
+ if (r < 0) {
+ fprintf(stderr, "FAIL exec(): %d\n", r);
+ return -1;
+ }
}
return 0;
diff --git a/src/oniguruma.h b/src/oniguruma.h
index 6090165..090b809 100644
--- a/src/oniguruma.h
+++ b/src/oniguruma.h
@@ -36,7 +36,7 @@ extern "C" {
#define ONIGURUMA
#define ONIGURUMA_VERSION_MAJOR 6
#define ONIGURUMA_VERSION_MINOR 1
-#define ONIGURUMA_VERSION_TEENY 2
+#define ONIGURUMA_VERSION_TEENY 3
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
diff --git a/src/st.c b/src/st.c
index 022880a..d4fe867 100644
--- a/src/st.c
+++ b/src/st.c
@@ -130,11 +130,13 @@ static int collision = 0;
static int init_st = 0;
static void
-stat_col()
+stat_col(void)
{
- FILE *f = fopen("/tmp/col", "w");
- fprintf(f, "collision: %d\n", collision);
- fclose(f);
+ FILE *f = fopen("/tmp/col", "w");
+ if (f == 0) return ;
+
+ (void) fprintf(f, "collision: %d\n", collision);
+ (void) fclose(f);
}
#endif
@@ -155,10 +157,16 @@ st_init_table_with_size(type, size)
size = new_size(size); /* round up to prime number */
tbl = alloc(st_table);
+ if (tbl == 0) return 0;
+
tbl->type = type;
tbl->num_entries = 0;
tbl->num_bins = size;
tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));
+ if (tbl->bins == 0) {
+ free(tbl);
+ return 0;
+ }
return tbl;
}
@@ -320,6 +328,9 @@ rehash(table)
new_num_bins = new_size(old_num_bins+1);
new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
+ if (new_bins == 0) {
+ return ;
+ }
for(i = 0; i < old_num_bins; i++) {
ptr = table->bins[i];