summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2017-02-10 23:40:54 +0000
committerReuben Thomas <rrt@sc3d.org>2017-02-11 08:13:12 +0000
commit3903fd9492d176c55e9539f797723a5cd6f29e2f (patch)
tree808285e9e878406d888701c59d3637a7006e2a9d
parent7e263df7319fb4ce59617600e6ced416c13dfa3e (diff)
downloadenchant-3903fd9492d176c55e9539f797723a5cd6f29e2f.tar.gz
Remove special hard-wired paths for macOS
If needed, these should be supplied in the prefix. (If more than one path is required, or some other mechanism, let’s fix that generally, rather than having OS-specific stuff hard-wired.)
-rw-r--r--src/Makefile.am2
-rw-r--r--src/enchant.c12
-rw-r--r--src/enchant_cocoa.h50
-rw-r--r--src/enchant_cocoa.m83
4 files changed, 0 insertions, 147 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 17cf8c2..deedb5b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,8 +23,6 @@ if WITH_APPLESPELL
AM_CPPFLAGS += @APPLESPELL_CFLAGS@
libenchant_la_LIBADD += @APPLESPELL_LIBS@
libenchant_la_LDFLAGS += @APPLESPELL_LDFLAGS@
-libenchant_la_SOURCES += enchant_cocoa.m enchant_cocoa.h
-libenchant_include_HEADERS += enchant_cocoa.h
endif
EXTRA_DIST=enchant.i
diff --git a/src/enchant.c b/src/enchant.c
index 1d3c622..b262bca 100644
--- a/src/enchant.c
+++ b/src/enchant.c
@@ -43,10 +43,6 @@
#include "pwl.h"
#ifdef XP_TARGET_COCOA
-#import "enchant_cocoa.h"
-#endif
-
-#ifdef XP_TARGET_COCOA
#define ENCHANT_USER_PATH_EXTENSION "Library", "Application Support", "Enchant"
#elif defined(_WIN32)
#define ENCHANT_USER_PATH_EXTENSION "enchant"
@@ -211,10 +207,6 @@ enchant_get_module_dirs (void)
char * module_dir = NULL;
char * prefix = NULL;
-#ifdef XP_TARGET_COCOA
- module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup ([[EnchantResourceProvider instance] moduleFolder]));
-#endif
-
{
GSList *user_dirs, *iter;
@@ -272,10 +264,6 @@ enchant_get_conf_dirs (void)
g_slist_free (user_conf_dirs);
-#ifdef XP_TARGET_COCOA
- conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup ([[EnchantResourceProvider instance] configFolder]));
-#endif
-
/* Dynamically locate library and search for files relative to it. */
prefix = enchant_get_prefix_dir();
if(prefix)
diff --git a/src/enchant_cocoa.h b/src/enchant_cocoa.h
deleted file mode 100644
index 1b86417..0000000
--- a/src/enchant_cocoa.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* enchant
- * Copyright (C) 2004 Francis James Franklin
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, Dom Lachowicz
- * gives permission to link the code of this program with
- * non-LGPL Spelling Provider libraries (eg: a MSFT Office
- * spell checker backend) and distribute linked combinations including
- * the two. You must obey the GNU Lesser General Public License in all
- * respects for all of the code used other than said providers. If you modify
- * this file, you may extend this exception to your version of the
- * file, but you are not obligated to do so. If you do not wish to
- * do so, delete this exception statement from your version.
- */
-
-#ifndef ENCHANT_COCOA_H
-#define ENCHANT_COCOA_H
-
-#import <Cocoa/Cocoa.h>
-
-@interface EnchantResourceProvider : NSObject
-{
- NSString * ModuleFolder;
- NSString * ConfigFolder;
-}
-+ (EnchantResourceProvider *)instance;
-
-- (id)init;
-- (void)dealloc;
-
-- (const char *)moduleFolder;
-- (const char *)configFolder;
-@end
-
-#endif /* ENCHANT_COCOA_H */
diff --git a/src/enchant_cocoa.m b/src/enchant_cocoa.m
deleted file mode 100644
index 31dba02..0000000
--- a/src/enchant_cocoa.m
+++ /dev/null
@@ -1,83 +0,0 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* enchant
- * Copyright (C) 2004 Francis James Franklin
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02110-1301, USA.
- *
- * In addition, as a special exception, Dom Lachowicz
- * gives permission to link the code of this program with
- * non-LGPL Spelling Provider libraries (eg: a MSFT Office
- * spell checker backend) and distribute linked combinations including
- * the two. You must obey the GNU Lesser General Public License in all
- * respects for all of the code used other than said providers. If you modify
- * this file, you may extend this exception to your version of the
- * file, but you are not obligated to do so. If you do not wish to
- * do so, delete this exception statement from your version.
- */
-
-#import "enchant_cocoa.h"
-
-static EnchantResourceProvider * s_instance = 0;
-
-@implementation EnchantResourceProvider
-
-+ (EnchantResourceProvider *)instance
-{
- if (!s_instance)
- {
- s_instance = [[EnchantResourceProvider alloc] init];
- }
- return s_instance;
-}
-
-- (id)init
-{
- if (self = [super init])
- {
- ModuleFolder = [[NSBundle bundleForClass:[self class]] resourcePath];
- [ModuleFolder retain];
-
- ConfigFolder = [[NSString alloc] initWithUTF8String:"/Library/Application Support/Enchant"];
- }
- return self;
-}
-
-- (void)dealloc
-{
- if (ModuleFolder)
- {
- [ModuleFolder release];
- ModuleFolder = 0;
- }
- if (ConfigFolder)
- {
- [ConfigFolder release];
- ConfigFolder = 0;
- }
- [super dealloc];
-}
-
-- (const char *)moduleFolder
-{
- return [ModuleFolder UTF8String];
-}
-
-- (const char *)configFolder
-{
- return [ConfigFolder UTF8String];
-}
-
-@end