Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
remove oniggnu.h (GNU regex API).
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
kosako committed Feb 26, 2005
1 parent 2499da4 commit 41d96db
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 134 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sat Feb 26 16:58:20 2005 K.Kosako <sndgk393@ybb.ne.jp>

* parse.y, re.c, regex.h, LEGAL, ext/strscan/strscan.c:
remove oniggnu.h (GNU regex API).

Wed Feb 23 22:08:16 2005 Kazuo Saito <ksaito@uranus.dti.ne.jp>

* st.c, st.h: imported additional file changes on
Expand Down
3 changes: 1 addition & 2 deletions LEGAL
Expand Up @@ -5,7 +5,6 @@ All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.

oniggnu.h:
oniguruma.h:
regcomp.c:
regenc.[ch]:
Expand All @@ -21,9 +20,9 @@ utf8.c:

Oniguruma ---- (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>

http://www.geocities.jp/kosako3/oniguruma/
http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
http://www.geocities.jp/kosako3/oniguruma/

When this software is partly used or it is distributed with Ruby,
this of Ruby follows the license of Ruby.
Expand Down
8 changes: 4 additions & 4 deletions ext/strscan/strscan.c
Expand Up @@ -245,7 +245,7 @@ strscan_init_copy(vself, vorig)
self->str = orig->str;
self->prev = orig->prev;
self->curr = orig->curr;
re_copy_registers(&self->regs, &orig->regs);
onig_region_copy(&self->regs, &orig->regs);
}

return vself;
Expand Down Expand Up @@ -684,9 +684,9 @@ adjust_registers_to_matched(p)
struct strscanner *p;
{
if (p->regs.allocated == 0) {
p->regs.beg = ALLOC_N(int, RE_NREGS);
p->regs.end = ALLOC_N(int, RE_NREGS);
p->regs.allocated = RE_NREGS;
p->regs.beg = ALLOC_N(int, ONIG_NREGION);
p->regs.end = ALLOC_N(int, ONIG_NREGION);
p->regs.allocated = ONIG_NREGION;
}
p->regs.num_regs = 1;
p->regs.beg[0] = 0;
Expand Down
123 changes: 0 additions & 123 deletions oniggnu.h

This file was deleted.

6 changes: 3 additions & 3 deletions parse.y
Expand Up @@ -4772,13 +4772,13 @@ parser_regx_options(parser)
while (c = nextc(), ISALPHA(c)) {
switch (c) {
case 'i':
options |= RE_OPTION_IGNORECASE;
options |= ONIG_OPTION_IGNORECASE;
break;
case 'x':
options |= RE_OPTION_EXTENDED;
options |= ONIG_OPTION_EXTEND;
break;
case 'm':
options |= RE_OPTION_MULTILINE;
options |= ONIG_OPTION_MULTILINE;
break;
case 'o':
options |= RE_OPTION_ONCE;
Expand Down
5 changes: 5 additions & 0 deletions re.c
Expand Up @@ -13,6 +13,11 @@
#include "re.h"
#include <ctype.h>

#define MBCTYPE_ASCII 0
#define MBCTYPE_EUC 1
#define MBCTYPE_SJIS 2
#define MBCTYPE_UTF8 3

static VALUE rb_eRegexpError;

#define BEG(no) regs->beg[no]
Expand Down
15 changes: 13 additions & 2 deletions regex.h
Expand Up @@ -5,13 +5,24 @@
$Author$
$Date$
Copyright (C) 1993-2004 Yukihiro Matsumoto
Copyright (C) 1993-2005 Yukihiro Matsumoto
**********************************************************************/

#ifndef REGEX_H
#define REGEX_H

#include "oniggnu.h"
#include "oniguruma.h"

#ifndef ONIG_RUBY_M17N

ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding;

#undef ismbchar
#define ismbchar(c) (mbclen((c)) != 1)
#define mbclen(c) \
ONIGENC_MBC_ENC_LEN(OnigEncDefaultCharEncoding, (UChar* )(&c))

#endif /* ifndef ONIG_RUBY_M17N */

#endif /* !REGEX_H */

0 comments on commit 41d96db

Please sign in to comment.