Made it more ggap-friendly
This commit is contained in:
parent
00b0265f74
commit
6c9d7005af
@ -10,6 +10,8 @@ echo "srcdir=" $srcdir
|
||||
|
||||
if test -d $rel_srcdir/m4 ; then
|
||||
aclocal_extra="-I m4"
|
||||
elif test -d $rel_srcdir/moo/m4 ; then
|
||||
aclocal_extra="-I moo/m4"
|
||||
fi
|
||||
|
||||
cd $srcdir
|
||||
|
@ -24,7 +24,7 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
MOO_SRC_PREFIX="moo"
|
||||
AC_SUBST(MOO_SRC_PREFIX)
|
||||
MOO_COMPONENTS([app,edit,term],[])
|
||||
MOO_AC_SET_DIRS(moo)
|
||||
MOO_AC_SET_DIRS
|
||||
MOO_AC_FLAGS(moo)
|
||||
|
||||
|
||||
|
@ -59,4 +59,9 @@ AC_DEFUN([MOO_COMPONENTS],[
|
||||
if test "x$MOO_OS_BSD" = "xyes"; then
|
||||
$build_mooterm && MOO_LIBS="-lutil $MOO_LIBS"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(project,
|
||||
AC_HELP_STRING(--enable-project, [enable project plugin (default = NO)]),
|
||||
[:],[enable_project=no])
|
||||
AM_CONDITIONAL(MOO_ENABLE_PROJECT, test "x$enable_project" = xyes)
|
||||
])
|
||||
|
@ -90,9 +90,9 @@ m4_undefine([_moo_WNAME])
|
||||
|
||||
if $_MOO_GCC; then
|
||||
if test "x$_moo_all_warnings" = "xyes"; then
|
||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_CFLAGS,[-fstrict-aliasing])
|
||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS,[-fstrict-aliasing])
|
||||
else
|
||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_CFLAGS,[-fno-strict-aliasing])
|
||||
_MOO_AC_CHECK_COMPILER_OPTIONS(MOO_DEBUG_CFLAGS,[-fno-strict-aliasing])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,15 +1,18 @@
|
||||
##############################################################################
|
||||
# MOO_AC_SET_DIRS(base)
|
||||
# MOO_AC_SET_DIRS
|
||||
#
|
||||
AC_DEFUN_ONCE([MOO_AC_SET_DIRS],[
|
||||
MOO_PACKAGE_NAME=$1
|
||||
AC_SUBST(MOO_PACKAGE_NAME)
|
||||
AC_DEFINE([MOO_PACKAGE_NAME], "$1", [package name])
|
||||
if test "x$MOO_PACKAGE_NAME" = x; then
|
||||
MOO_PACKAGE_NAME=moo
|
||||
fi
|
||||
|
||||
MOO_DATA_DIR="${datadir}/$1"
|
||||
AC_SUBST(MOO_PACKAGE_NAME)
|
||||
AC_DEFINE_UNQUOTED([MOO_PACKAGE_NAME], "$MOO_PACKAGE_NAME", [package name])
|
||||
|
||||
MOO_DATA_DIR="${datadir}/$MOO_PACKAGE_NAME"
|
||||
AC_SUBST(MOO_DATA_DIR)
|
||||
|
||||
MOO_LIB_DIR="${libdir}/$1"
|
||||
MOO_LIB_DIR="${libdir}/$MOO_PACKAGE_NAME"
|
||||
AC_SUBST(MOO_LIB_DIR)
|
||||
|
||||
mimedir="${datadir}/mime"
|
||||
@ -21,6 +24,6 @@ AC_DEFUN_ONCE([MOO_AC_SET_DIRS],[
|
||||
MOO_TEXT_LANG_FILES_DIR="${MOO_DATA_DIR}/language-specs"
|
||||
AC_SUBST(MOO_TEXT_LANG_FILES_DIR)
|
||||
|
||||
moo_includedir=${includedir}/$1
|
||||
moo_includedir=${includedir}/$MOO_PACKAGE_NAME
|
||||
AC_SUBST(moo_includedir)
|
||||
])
|
||||
|
@ -1,5 +1,5 @@
|
||||
##############################################################################
|
||||
# MOO_DEFINE_VERSIONS(pkg,major,minor,micro)
|
||||
# MOO_DEFINE_VERSIONS(pkg,version)
|
||||
#
|
||||
AC_DEFUN([MOO_DEFINE_VERSIONS],[
|
||||
_MOO_SPLIT_VERSION([m4_toupper($1)], [$2])
|
||||
|
4
moo.mprj
4
moo.mprj
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<medit-project version="1.0" type="C" name="moo">
|
||||
<active>optimized</active>
|
||||
<active>debug</active>
|
||||
<configurations>
|
||||
<debug>
|
||||
<build_dir>build/debug</build_dir>
|
||||
<configure>
|
||||
<args>--enable-debug=full --enable-all-warnings --enable-libmoo --with-mooterm --enable-libmoo-headers</args>
|
||||
<args>--enable-debug=full --enable-all-warnings --enable-libmoo --with-mooterm --enable-libmoo-headers --enable-project</args>
|
||||
<vars>
|
||||
<var name="CFLAGS">-g</var>
|
||||
</vars>
|
||||
|
@ -1,4 +1,9 @@
|
||||
SUBDIRS = pyproject
|
||||
DIST_SUBDIRS = pyproject
|
||||
SUBDIRS = .
|
||||
|
||||
if MOO_ENABLE_PROJECT
|
||||
SUBDIRS += pyproject
|
||||
endif
|
||||
|
||||
moopython_pluginsdir = ${MOO_PLUGINS_DIR}
|
||||
plugins_libdir = ${MOO_PLUGINS_DIR}/lib
|
||||
|
@ -54,7 +54,6 @@ mooutils_include_headers = \
|
||||
mooprefsdialog.h \
|
||||
mooprefsdialogpage.h \
|
||||
moopython.h \
|
||||
mooregex.h \
|
||||
moostock.h \
|
||||
moouixml.h \
|
||||
mooundo.h \
|
||||
@ -117,7 +116,6 @@ mooutils_sources = \
|
||||
mooprefsdialog.c \
|
||||
mooprefsdialogpage.c \
|
||||
moopython.c \
|
||||
mooregex.c \
|
||||
moospawn.h \
|
||||
moospawn.c \
|
||||
moostock.c \
|
||||
|
@ -1,64 +0,0 @@
|
||||
/*
|
||||
* mooregex.c
|
||||
*
|
||||
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See COPYING file that comes with this distribution.
|
||||
*/
|
||||
|
||||
#include "mooutils/mooregex.h"
|
||||
#include "mooutils/eggregex.h"
|
||||
|
||||
|
||||
MooRegex *
|
||||
moo_regex_new (const gchar *pattern,
|
||||
MooRegexCompileFlags compile_options,
|
||||
MooRegexMatchFlags match_options,
|
||||
GError **error)
|
||||
{
|
||||
EggRegex *regex;
|
||||
|
||||
regex = egg_regex_new (pattern, compile_options, match_options, error);
|
||||
|
||||
if (regex)
|
||||
egg_regex_optimize (regex, NULL);
|
||||
|
||||
return (MooRegex*) regex;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
moo_regex_free (MooRegex *regex)
|
||||
{
|
||||
egg_regex_free ((EggRegex*) regex);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
moo_regex_clear (MooRegex *regex)
|
||||
{
|
||||
egg_regex_clear ((EggRegex*) regex);
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
moo_regex_match (MooRegex *regex,
|
||||
const char *string,
|
||||
MooRegexMatchFlags match_options)
|
||||
{
|
||||
return egg_regex_match ((EggRegex*) regex, string, match_options);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
moo_regex_fetch (MooRegex *regex,
|
||||
int match_num,
|
||||
const char *string)
|
||||
{
|
||||
return egg_regex_fetch ((EggRegex*) regex, match_num, string);
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
/*
|
||||
* mooregex.h
|
||||
*
|
||||
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* See COPYING file that comes with this distribution.
|
||||
*/
|
||||
|
||||
#ifndef MOO_REGEX_H
|
||||
#define MOO_REGEX_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MOO_REGEX_CASELESS = 1 << 0,
|
||||
MOO_REGEX_MULTILINE = 1 << 1,
|
||||
MOO_REGEX_DOTALL = 1 << 2,
|
||||
MOO_REGEX_EXTENDED = 1 << 3,
|
||||
MOO_REGEX_ANCHORED = 1 << 4,
|
||||
MOO_REGEX_DOLLAR_ENDONLY = 1 << 5,
|
||||
MOO_REGEX_UNGREEDY = 1 << 9,
|
||||
MOO_REGEX_RAW = 1 << 11,
|
||||
MOO_REGEX_NO_AUTO_CAPTURE = 1 << 12,
|
||||
MOO_REGEX_DUPNAMES = 1 << 19,
|
||||
MOO_REGEX_NEWLINE_CR = 1 << 20,
|
||||
MOO_REGEX_NEWLINE_CRLF = 1 << 21 | MOO_REGEX_NEWLINE_CR
|
||||
} MooRegexCompileFlags;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MOO_REGEX_MATCH_ANCHORED = 1 << 4,
|
||||
MOO_REGEX_MATCH_NOTBOL = 1 << 7,
|
||||
MOO_REGEX_MATCH_NOTEOL = 1 << 8,
|
||||
MOO_REGEX_MATCH_NOTEMPTY = 1 << 10,
|
||||
MOO_REGEX_MATCH_PARTIAL = 1 << 15,
|
||||
MOO_REGEX_MATCH_NEWLINE_CR = 1 << 20,
|
||||
MOO_REGEX_MATCH_NEWLINE_LF = 1 << 21,
|
||||
MOO_REGEX_MATCH_NEWLINE_CRLF = MOO_REGEX_MATCH_NEWLINE_CR | MOO_REGEX_MATCH_NEWLINE_LF
|
||||
} MooRegexMatchFlags;
|
||||
|
||||
typedef struct _MooRegex MooRegex;
|
||||
|
||||
|
||||
MooRegex *moo_regex_new (const char *pattern,
|
||||
MooRegexCompileFlags compile_options,
|
||||
MooRegexMatchFlags match_options,
|
||||
GError **error);
|
||||
void moo_regex_free (MooRegex *regex);
|
||||
void moo_regex_clear (MooRegex *regex);
|
||||
gboolean moo_regex_match (MooRegex *regex,
|
||||
const char *string,
|
||||
MooRegexMatchFlags match_options);
|
||||
gchar *moo_regex_fetch (MooRegex *regex,
|
||||
int match_num,
|
||||
const char *string);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* MOO_REGEX_H */
|
@ -93,6 +93,11 @@ const char *_xdg_get_base_name (const char *file_name);
|
||||
int _xdg_mime_buffer_is_text (unsigned char *buffer,
|
||||
int len);
|
||||
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef free
|
||||
#undef strdup
|
||||
#undef calloc
|
||||
#define malloc g_try_malloc
|
||||
#define realloc g_try_realloc
|
||||
#define free g_free
|
||||
|
Loading…
x
Reference in New Issue
Block a user