Renamed _m_* functions

master
Yevgen Muntyan 2006-11-03 23:57:57 -06:00
parent 11df386d67
commit aaf3644b83
13 changed files with 217 additions and 221 deletions

View File

@ -293,16 +293,16 @@
</kdevdoctreeview>
<kdevfilecreate>
<filetypes>
<type icon="source" ext="g" name="GAP source" create="template" >
<type icon="source" ext="g" create="template" name="GAP source" >
<descr>A new empty GAP source file</descr>
</type>
<type icon="source_cpp" ext="cpp" name="C++ Source" create="template" >
<type icon="source_cpp" ext="cpp" create="template" name="C++ Source" >
<descr>A new empty C++ file.</descr>
</type>
<type icon="source_h" ext="h" name="C/C++ Header" create="template" >
<type icon="source_h" ext="h" create="template" name="C/C++ Header" >
<descr>A new empty header file for C/C++.</descr>
</type>
<type icon="source_c" ext="c" name="C Source" create="template" >
<type icon="source_c" ext="c" create="template" name="C Source" >
<descr>A new empty C file.</descr>
</type>
</filetypes>

View File

@ -647,7 +647,7 @@ moo_app_create_user_data_dir (MooApp *app)
if (g_file_test (dir, G_FILE_TEST_IS_DIR))
return dir;
if (!_moo_mkdir (dir, &error))
if (!_moo_create_dir (dir, &error))
{
g_warning ("%s: %s", G_STRLOC, error->message);
g_error_free (error);
@ -659,47 +659,6 @@ moo_app_create_user_data_dir (MooApp *app)
}
#if 0
void
moo_app_python_execute_file (G_GNUC_UNUSED GtkWindow *parent_window)
{
GtkWidget *parent;
const char *filename = NULL;
FILE *file;
g_return_if_fail (moo_python_running ());
parent = parent_window ? GTK_WIDGET (parent_window) : NULL;
if (!filename)
filename = moo_file_dialogp (parent,
MOO_DIALOG_FILE_OPEN_EXISTING,
"Choose Python Script to Execute",
"python_exec_file", NULL);
if (!filename)
return;
file = _m_fopen (filename, "r");
if (!file)
{
moo_error_dialog (parent, "Could not open file", NULL);
}
else
{
MooPyObject *res = moo_python_run_file (file, filename);
fclose (file);
if (res)
moo_Py_DECREF (res);
else
moo_PyErr_Print ();
}
}
#endif
static gboolean
moo_app_python_run_file (MooApp *app,
const char *filename)
@ -711,7 +670,7 @@ moo_app_python_run_file (MooApp *app,
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (moo_python_running (), FALSE);
file = _m_fopen (filename, "r");
file = _moo_fopen (filename, "r");
g_return_val_if_fail (file != NULL, FALSE);
res = moo_python_run_file (file, filename);
@ -1091,7 +1050,7 @@ moo_app_quit_real (MooApp *app)
if (app->priv->tmpdir)
{
GError *error = NULL;
_moo_rmdir (app->priv->tmpdir, TRUE, &error);
_moo_remove_dir (app->priv->tmpdir, TRUE, &error);
if (error)
{
@ -1568,7 +1527,7 @@ moo_app_tempnam (MooApp *app)
dirname = g_build_filename (g_get_tmp_dir (), basename, NULL);
g_free (basename);
if (_m_mkdir (dirname))
if (_moo_mkdir (dirname))
{
g_free (dirname);
dirname = NULL;

View File

@ -4,147 +4,147 @@ SUBDIRS = gtksourceview plugins language-specs
mooedit_toolsdir = $(MOO_DATA_DIR)
mooedit_tools_DATA = context.cfg menu.cfg filters.cfg
dummy_targets = \
moocommand-exe.o \
moocommand-exe-private.o \
dummy_targets = \
moocommand-exe.o \
moocommand-exe-private.o \
moolangmgr-private.o
CLEANFILES = $(dummy_targets)
moocommand-exe.o: moocommand-exe-unix.o ; echo stamp > $(@F)
moocommand-exe-private.o: moocommand-exe-unix.o ; echo stamp > $(@F)
moolangmgr-private.o: moolangmgr.o ; echo stamp > $(@F)
unix_sources = \
unix_sources = \
moocommand-exe-unix.c
completion = \
moocompletion.h \
completion = \
moocompletion.h \
moocompletion.c
mooedit_include_headers = \
moocmdview.h \
mooedit-enums.h \
mooedit-script.h \
mooedit.h \
mooeditconfig.h \
mooeditor.h \
mooeditprefs.h \
mooeditwindow.h \
mooindenter.h \
moolinemark.h \
moolineview.h \
moooutputfilter.h \
mooplugin-loader.h \
mooplugin-macro.h \
mooplugin.h \
mootextbuffer.h \
mootextiter.h \
mootextpopup.h \
mootextsearch.h \
mootextstyle.h \
mootextstylescheme.h \
mooedit_include_headers = \
moocmdview.h \
mooedit-enums.h \
mooedit-script.h \
mooedit.h \
mooeditconfig.h \
mooeditor.h \
mooeditprefs.h \
mooeditwindow.h \
mooindenter.h \
moolinemark.h \
moolineview.h \
moooutputfilter.h \
mooplugin-loader.h \
mooplugin-macro.h \
mooplugin.h \
mootextbuffer.h \
mootextiter.h \
mootextpopup.h \
mootextsearch.h \
mootextstyle.h \
mootextstylescheme.h \
mootextview.h
mooedit_noinst_headers = \
moocommand-exe.h \
moocommand-script.h \
moocommand-private.h \
moocommand-exe-private.h \
moocommand.h \
moocommanddisplay.h \
mooedit-private.h \
mooeditdialogs.h \
mooeditfileops.h \
mooeditfiltersettings.h \
mooeditprefs-glade.h \
mooeditprogress-glade.h \
mooeditsavemultiple-glade.h \
mooedittools-glade.h \
moofold.h \
mookeyfile.h \
moolang-private.h \
moolang.h \
moolangmgr-private.h \
moolangmgr.h \
moolinebuffer.h \
moooutputfiltersimple.h \
moopluginprefs-glade.h \
mooprint-glade.h \
mootext-private.h \
mootextbox.h \
mootextbtree.h \
mootextfind-glade.h \
mootextfind.h \
mootextgotoline-glade.h \
mootextsearch-private.h \
mootextview-private.h \
moousertools-prefs.h \
moousertools.h \
quicksearch-glade.h \
mooedit_noinst_headers = \
moocommand-exe.h \
moocommand-script.h \
moocommand-private.h \
moocommand-exe-private.h \
moocommand.h \
moocommanddisplay.h \
mooedit-private.h \
mooeditaction-factory.h \
mooeditaction.h \
mooeditdialogs.h \
mooeditfileops.h \
mooeditfiltersettings.h \
mooeditprefs-glade.h \
mooeditprogress-glade.h \
mooeditsavemultiple-glade.h \
mooedittools-glade.h \
moofold.h \
mookeyfile.h \
moolang-private.h \
moolang.h \
moolangmgr-private.h \
moolangmgr.h \
moolinebuffer.h \
moooutputfiltersimple.h \
moopluginprefs-glade.h \
mooprint-glade.h \
mootext-private.h \
mootextbox.h \
mootextbtree.h \
mootextfind-glade.h \
mootextfind.h \
mootextgotoline-glade.h \
mootextsearch-private.h \
mootextview-private.h \
moousertools-prefs.h \
moousertools.h \
quicksearch-glade.h \
statusbar-glade.h
mooedit_sources = \
$(mooedit_include_headers) \
$(mooedit_noinst_headers) \
$(moocommand_stuff) \
moocmdview.c \
moocommand-script.c \
moocommand.c \
moocommanddisplay.c \
mooedit-enums.c \
mooedit-script.c \
mooedit.c \
mooeditaction-factory.c \
mooeditaction-factory.h \
mooeditaction.c \
mooeditaction.h \
mooeditconfig.c \
mooeditdialogs.c \
mooeditfileops.c \
mooeditfiltersettings.c \
mooeditinput.c \
mooeditor.c \
mooeditprefs.c \
mooeditprefspage.c \
mooeditwindow.c \
moofold.c \
mooindenter.c \
mookeyfile.c \
moolang.c \
moolangmgr.c \
moolinebuffer.c \
moolinemark.c \
moolineview.c \
moooutputfilter.c \
moooutputfiltersimple.c \
mooplugin-loader.c \
mooplugin.c \
mootextbox.c \
mootextbtree.c \
mootextbuffer.c \
mootextfind.c \
mootextpopup.c \
mootextsearch.c \
mootextstylescheme.c \
mootextview.c \
moousertools-prefs.c \
mooedit_sources = \
$(mooedit_include_headers) \
$(mooedit_noinst_headers) \
$(moocommand_stuff) \
moocmdview.c \
moocommand-script.c \
moocommand.c \
moocommanddisplay.c \
mooedit-enums.c \
mooedit-script.c \
mooedit.c \
mooeditaction-factory.c \
mooeditaction.c \
mooeditconfig.c \
mooeditdialogs.c \
mooeditfileops.c \
mooeditfiltersettings.c \
mooeditinput.c \
mooeditor.c \
mooeditprefs.c \
mooeditprefspage.c \
mooeditwindow.c \
moofold.c \
mooindenter.c \
mookeyfile.c \
moolang.c \
moolangmgr.c \
moolinebuffer.c \
moolinemark.c \
moolineview.c \
moooutputfilter.c \
moooutputfiltersimple.c \
mooplugin-loader.c \
mooplugin.c \
mootextbox.c \
mootextbtree.c \
mootextbuffer.c \
mootextfind.c \
mootextpopup.c \
mootextsearch.c \
mootextstylescheme.c \
mootextview.c \
moousertools-prefs.c \
moousertools.c
mooedit_printing_sources = \
mootextprint.c \
mooedit_printing_sources = \
mootextprint.c \
mootextprint.h
BUILT_SOURCES = \
quicksearch-glade.h \
statusbar-glade.h \
mootextgotoline-glade.h \
mootextfind-glade.h \
moopluginprefs-glade.h \
mooprint-glade.h \
mooeditprefs-glade.h \
mooeditprogress-glade.h \
mooeditsavemultiple-glade.h \
mooedittools-glade.h \
mooedit-enums.c \
BUILT_SOURCES = \
quicksearch-glade.h \
statusbar-glade.h \
mootextgotoline-glade.h \
mootextfind-glade.h \
moopluginprefs-glade.h \
mooprint-glade.h \
mooeditprefs-glade.h \
mooeditprogress-glade.h \
mooeditsavemultiple-glade.h \
mooedittools-glade.h \
mooedit-enums.c \
mooedit-enums.h
mooedit_enums_headers = \

View File

@ -4,7 +4,7 @@
<style name="bracket-match" background="#FFFF99" bold="true"/>
<style name="bracket-mismatch" background="#FF0000" bold="true"/>
<style name="Others" foreground="#008000"/>
<style name="Others" foreground="#800000"/>
<style name="Others 2" bold="true"/>
<style name="Others 3" foreground="#008000"/>

View File

@ -448,7 +448,7 @@ get_lang_for_mime_type (MooLangMgr *mgr,
return found ? lang : NULL;
}
#else /* MOO_USE_XDGMIME */
MooLang *
static MooLang *
get_lang_for_mime_type (MooLangMgr *mgr,
const char *mime)
{

View File

@ -1029,7 +1029,7 @@ doc_move (MooFileSelector *filesel,
{
if (moo_edit_save_as (doc, filename, moo_edit_get_encoding (doc), NULL))
{
_m_unlink (old_filename);
_moo_unlink (old_filename);
select_file (filesel, filename, destdir);
}

View File

@ -450,7 +450,7 @@ create_folder (G_GNUC_UNUSED MooFileSystem *fs,
#ifndef __WIN32__
if (mkdir (path, S_IRWXU | S_IRWXG | S_IRWXO))
#else
if (_m_mkdir (path))
if (_moo_mkdir (path))
#endif
{
int saved_errno = errno;
@ -594,9 +594,9 @@ delete_file (G_GNUC_UNUSED MooFileSystem *fs,
isdir = g_file_test (path, G_FILE_TEST_IS_DIR);
if (isdir)
return _moo_rmdir (path, recursive, error);
return _moo_remove_dir (path, recursive, error);
if (_m_remove (path))
if (_moo_remove (path))
{
int err = errno;
char *path_utf8 = g_filename_to_utf8 (path, -1, NULL, NULL, NULL);
@ -637,7 +637,7 @@ move_file_unix (G_GNUC_UNUSED MooFileSystem *fs,
g_return_val_if_fail (g_path_is_absolute (new_path), FALSE);
/* XXX */
if (_m_rename (old_path, new_path))
if (_moo_rename (old_path, new_path))
{
int saved_errno = errno;
g_set_error (error, MOO_FILE_ERROR,

View File

@ -29,6 +29,43 @@
G_BEGIN_DECLS
#define egg_regex_error_quark _moo_egg_regex_error_quark
#define egg_regex_new _moo_egg_regex_new
#define egg_regex_optimize _moo_egg_regex_optimize
#define egg_regex_ref _moo_egg_regex_ref
#define egg_regex_unref _moo_egg_regex_unref
#define egg_regex_copy _moo_egg_regex_copy
#define egg_regex_get_pattern _moo_egg_regex_get_pattern
#define egg_regex_clear _moo_egg_regex_clear
#define egg_regex_match_simple _moo_egg_regex_match_simple
#define egg_regex_match _moo_egg_regex_match
#define egg_regex_match_full _moo_egg_regex_match_full
#define egg_regex_match_next _moo_egg_regex_match_next
#define egg_regex_match_next_full _moo_egg_regex_match_next_full
#define egg_regex_match_all _moo_egg_regex_match_all
#define egg_regex_match_all_full _moo_egg_regex_match_all_full
#define egg_regex_get_match_count _moo_egg_regex_get_match_count
#define egg_regex_is_partial_match _moo_egg_regex_is_partial_match
#define egg_regex_fetch _moo_egg_regex_fetch
#define egg_regex_fetch_pos _moo_egg_regex_fetch_pos
#define egg_regex_fetch_named _moo_egg_regex_fetch_named
#define egg_regex_fetch_named_pos _moo_egg_regex_fetch_named_pos
#define egg_regex_fetch_all _moo_egg_regex_fetch_all
#define egg_regex_get_string_number _moo_egg_regex_get_string_number
#define egg_regex_split_simple _moo_egg_regex_split_simple
#define egg_regex_split _moo_egg_regex_split
#define egg_regex_split_full _moo_egg_regex_split_full
#define egg_regex_split_next _moo_egg_regex_split_next
#define egg_regex_split_next_full _moo_egg_regex_split_next_full
#define egg_regex_replace _moo_egg_regex_replace
#define egg_regex_replace_literal _moo_egg_regex_replace_literal
#define egg_regex_replace_eval _moo_egg_regex_replace_eval
#define egg_regex_escape_string _moo_egg_regex_escape_string
#define egg_regex_escape _moo_egg_regex_escape
#define egg_regex_check_replacement _moo_egg_regex_check_replacement
#define egg_regex_eval_replacement _moo_egg_regex_eval_replacement
#define egg_regex_try_eval_replacement _moo_egg_regex_try_eval_replacement
typedef enum
{
EGG_REGEX_ERROR_COMPILE,

View File

@ -1059,7 +1059,7 @@ moo_prefs_save (const char *file,
if (empty)
{
if (g_file_test (file, G_FILE_TEST_EXISTS))
if (_m_unlink (file))
if (_moo_unlink (file))
g_critical ("%s: %s", G_STRLOC,
g_strerror (errno));
return TRUE;

View File

@ -150,7 +150,7 @@ rm_r (const char *path,
errno = 0;
if (_m_remove (file_path))
if (_moo_remove (file_path))
{
int err = errno;
@ -180,7 +180,7 @@ rm_r (const char *path,
{
errno = 0;
if (_m_remove (path) != 0)
if (_moo_remove (path) != 0)
{
int err = errno;
success = FALSE;
@ -197,9 +197,9 @@ rm_r (const char *path,
gboolean
_moo_rmdir (const char *path,
gboolean recursive,
GError **error)
_moo_remove_dir (const char *path,
gboolean recursive,
GError **error)
{
g_return_val_if_fail (path != NULL, FALSE);
@ -207,7 +207,7 @@ _moo_rmdir (const char *path,
{
errno = 0;
if (_m_rmdir (path) != 0)
if (_moo_rmdir (path) != 0)
{
int err = errno;
char *path_utf8 = g_filename_display_name (path);
@ -233,8 +233,8 @@ _moo_rmdir (const char *path,
gboolean
_moo_mkdir (const char *path,
GError **error)
_moo_create_dir (const char *path,
GError **error)
{
struct stat buf;
char *utf8_path;
@ -262,7 +262,7 @@ _moo_mkdir (const char *path,
{
errno = 0;
if (_m_mkdir (path) == -1)
if (_moo_mkdir (path) == -1)
{
int err_code = errno;
utf8_path = g_filename_display_name (path);
@ -295,16 +295,16 @@ _moo_mkdir (const char *path,
gboolean
_moo_rename (const char *path,
const char *new_path,
GError **error)
_moo_rename_file (const char *path,
const char *new_path,
GError **error)
{
g_return_val_if_fail (path != NULL, FALSE);
g_return_val_if_fail (new_path != NULL, FALSE);
errno = 0;
if (_m_rename (path, new_path) != 0)
if (_moo_rename (path, new_path) != 0)
{
int err_code = errno;
char *utf8_path = g_filename_display_name (path);
@ -426,7 +426,7 @@ _moo_normalize_file_path (const char *filename)
errno = 0;
if (_m_chdir (dirname) != 0)
if (_moo_chdir (dirname) != 0)
{
int err = errno;
g_warning ("%s: %s", G_STRLOC, g_strerror (err));
@ -439,7 +439,7 @@ _moo_normalize_file_path (const char *filename)
errno = 0;
if (_m_chdir (working_dir) != 0)
if (_moo_chdir (working_dir) != 0)
{
int err = errno;
g_warning ("%s: %s", G_STRLOC, g_strerror (err));
@ -513,7 +513,7 @@ G_STMT_START { \
int
_m_unlink (const char *path)
_moo_unlink (const char *path)
{
#ifdef __WIN32__
CCALL_1 (unlink, _wunlink, path);
@ -524,7 +524,7 @@ _m_unlink (const char *path)
int
_m_rmdir (const char *path)
_moo_rmdir (const char *path)
{
#ifdef __WIN32__
CCALL_1 (rmdir, _wrmdir, path);
@ -535,7 +535,7 @@ _m_rmdir (const char *path)
int
_m_chdir (const char *path)
_moo_chdir (const char *path)
{
#ifdef __WIN32__
CCALL_1 (_chdir, _wchdir, path);
@ -546,7 +546,7 @@ _m_chdir (const char *path)
int
_m_mkdir (const char *path)
_moo_mkdir (const char *path)
{
#ifdef __WIN32__
CCALL_1 (mkdir, _wmkdir, path);
@ -557,7 +557,7 @@ _m_mkdir (const char *path)
int
_m_remove (const char *path)
_moo_remove (const char *path)
{
#ifdef __WIN32__
gboolean use_wide_char_api;
@ -600,8 +600,8 @@ _m_remove (const char *path)
gpointer
_m_fopen (const char *path,
const char *mode)
_moo_fopen (const char *path,
const char *mode)
{
#ifdef __WIN32__
gboolean use_wide_char_api;
@ -650,8 +650,8 @@ _m_fopen (const char *path,
int
_m_rename (const char *old_name,
const char *new_name)
_moo_rename (const char *old_name,
const char *new_name)
{
#ifdef __WIN32__
gboolean use_wide_char_api;

View File

@ -50,12 +50,12 @@ gboolean _moo_save_file_utf8 (const char *name,
const char *text,
gssize len,
GError **error);
gboolean _moo_rmdir (const char *path,
gboolean _moo_remove_dir (const char *path,
gboolean recursive,
GError **error);
gboolean _moo_mkdir (const char *path,
gboolean _moo_create_dir (const char *path,
GError **error);
gboolean _moo_rename (const char *path,
gboolean _moo_rename_file (const char *path,
const char *new_path,
GError **error);
@ -68,15 +68,15 @@ char *_moo_normalize_file_path (const char *filename);
* C library and WinAPI functions wrappers analogous to glib/gstdio.h
*/
int _m_unlink (const char *path);
int _m_mkdir (const char *path); /* S_IRWXU on unix */
int _m_rmdir (const char *path);
int _m_remove (const char *path);
gpointer _m_fopen (const char *path,
int _moo_unlink (const char *path);
int _moo_mkdir (const char *path); /* S_IRWXU on unix */
int _moo_rmdir (const char *path);
int _moo_remove (const char *path);
gpointer _moo_fopen (const char *path,
const char *mode);
int _m_rename (const char *old_name,
int _moo_rename (const char *old_name,
const char *new_name);
int _m_chdir (const char *path);
int _moo_chdir (const char *path);
G_END_DECLS

View File

@ -1363,10 +1363,10 @@ moo_get_data_dirs (MooDataDirType type,
switch (type)
{
case MOO_DATA_SHARE:
d = g_win32_get_package_installation_subdirectory (NULL, NULL, "share/" MOO_PACKAGE_NAME);
d = g_win32_get_package_installation_subdirectory (NULL, NULL, "share\\" MOO_PACKAGE_NAME);
break;
case MOO_DATA_LIB:
d = g_win32_get_package_installation_subdirectory (NULL, NULL, "lib/" MOO_PACKAGE_NAME);
d = g_win32_get_package_installation_subdirectory (NULL, NULL, "lib\\" MOO_PACKAGE_NAME);
break;
}
@ -1472,9 +1472,9 @@ save_with_backup (const char *filename,
if (!_moo_save_file_utf8 (tmp_file, data, len, error))
goto out;
_moo_rename (filename, bak_file, &error_move);
_moo_rename_file (filename, bak_file, &error_move);
if (!_moo_rename (tmp_file, filename, error))
if (!_moo_rename_file (tmp_file, filename, error))
{
if (error_move)
{
@ -1545,7 +1545,7 @@ moo_save_user_data_file (const char *basename,
file = moo_get_user_data_file (basename);
g_return_val_if_fail (dir && file, FALSE);
if (!_moo_mkdir (dir, error))
if (!_moo_create_dir (dir, error))
goto out;
if (same_content (file, content, len))

View File

@ -86,7 +86,7 @@ static void moo_window_class_new_actionv (MooWindowClass *klass,
const char *first_prop_name,
va_list props);
GObject *moo_window_constructor (GType type,
static GObject *moo_window_constructor (GType type,
guint n_props,
GObjectConstructParam *props);
static void moo_window_dispose (GObject *object);
@ -273,7 +273,7 @@ moo_window_class_init (MooWindowClass *klass)
}
GObject *
static GObject *
moo_window_constructor (GType type,
guint n_props,
GObjectConstructParam *props)