Skip to content

Commit

Permalink
Ref #145, Change onigmo to oniguruma
Browse files Browse the repository at this point in the history
- remove onigmo (vendor/onig)
- add oniguruma subtree oniguruma with some build patches

    Squashed 'vendor/oniguruma/oniguruma/' content from commit 5eaee9f5

    git-subtree-dir: vendor/oniguruma/oniguruma
    git-subtree-split: b68e7f7e036eede1e929b7c9ae5995af76339593
  • Loading branch information
gamecreature committed Dec 28, 2024
1 parent 460028e commit 377095b
Show file tree
Hide file tree
Showing 282 changed files with 111,254 additions and 132,025 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ edbee-test/edbee-lib/qslog/
build/

.idea/
*.old/
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.1...3.20)

PROJECT(edbee)

OPTION(BUILD_WITH_QT5 "Whether to build with Qt5 or Qt6." ON)
OPTION(BUILD_WITH_QT5 "Whether to build with Qt5 or Qt6." OFF)

ADD_SUBDIRECTORY(edbee-lib)
ADD_SUBDIRECTORY(edbee-test)
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,23 @@ Known Issues and Missing Features
* Optimalisations for better render support and background calculate/paint-ahead functionality
* I really want to build in scripting support, for extending the editor with plugins.
Dependencies
------------
The following dependencies have been added.
(via git subtree, to embed the code and not add the complexity of a submodule to the end user)
Oniguruma has been added
```sh
git subtree add --prefix vendor/oniguruma/oniguruma https://github.com/kkos/oniguruma master --squash
```

To update oniguruma

```sh
git subtree pull --prefix vendor/oniguruma/oniguruma https://github.com/kkos/oniguruma master --squash
```

Contributing
------------
Expand Down
2 changes: 1 addition & 1 deletion edbee-lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ SET(HEADERS
edbee/views/texttheme.h
)

add_subdirectory(../vendor/onig/ onig)
add_subdirectory(../vendor/oniguruma/ oniguruma)

if(BUILD_WITH_QT5)
find_package(Qt5 REQUIRED COMPONENTS Core UiTools Widgets)
Expand Down
3 changes: 2 additions & 1 deletion edbee-lib/edbee-lib.pri
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ HEADERS += \

## Extra dependencies
##====================
include($$PWD/../vendor/onig/onig.pri)

include($$PWD/../vendor/oniguruma/oniguruma.pri)

## Files that can usefully listed inside Qt IDE (Qt Creator, as "Other files")
##============================================================================
Expand Down
13 changes: 10 additions & 3 deletions edbee-lib/edbee/util/regexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif

#define ONIG_EXTERN extern
#include "onigmo.h"
#include "oniguruma.h"

#ifdef _MSC_VER
#pragma warning( pop )
Expand Down Expand Up @@ -89,14 +89,21 @@ class OnigRegExpEngine : public RegExpEngine
{
const QChar* patternChars = pattern.constData();

const OnigSyntaxType* onigSyntax = &OnigSyntaxRuby; // ONIG_SYNTAX_DEFAULT
OnigSyntaxType* onigSyntax = &OnigSyntaxRuby; // ONIG_SYNTAX_DEFAULT
if( syntax == RegExp::SyntaxFixedString ) { onigSyntax = &OnigSyntaxASIS; }


OnigOptionType onigOptions = ONIG_OPTION_NONE|ONIG_OPTION_CAPTURE_GROUP;
if( !caseSensitive ) { onigOptions = onigOptions | ONIG_OPTION_IGNORECASE;}

int result = onig_new(&reg_, (OnigUChar*)patternChars, (OnigUChar*)(patternChars + pattern.length()), onigOptions, ONIG_ENCODING_UTF16_LE, onigSyntax, &einfo_);
int result = onig_new(
&reg_,
(OnigUChar*)patternChars,
(OnigUChar*)(patternChars + pattern.length()),
onigOptions,
ONIG_ENCODING_UTF16_LE,
onigSyntax,
&einfo_);
valid_ = result == ONIG_NORMAL;
fillError( result );
}
Expand Down
42 changes: 0 additions & 42 deletions vendor/onig/.editorconfig

This file was deleted.

75 changes: 0 additions & 75 deletions vendor/onig/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions vendor/onig/.travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/onig/AUTHORS

This file was deleted.

86 changes: 0 additions & 86 deletions vendor/onig/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 377095b

Please sign in to comment.