aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-07-09 17:14:12 -0400
committerGlenn Morris2012-07-09 17:14:12 -0400
commit7c4e8ec014e532c3864a7e2494d71a663d96b295 (patch)
tree7eb625953f5494b776be58e1837cac6225fdd65b /src
parenta0bee46f5ab47acd95dee9e022792ff0db3ff336 (diff)
downloademacs-7c4e8ec014e532c3864a7e2494d71a663d96b295.tar.gz
emacs-7c4e8ec014e532c3864a7e2494d71a663d96b295.zip
* src/nsterm.m, src/nsterm.h (ns_etc_directory): Fix type, empty return.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/nsterm.h2
-rw-r--r--src/nsterm.m26
3 files changed, 18 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f0f060268c4..c4911968e0d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-07-09 Glenn Morris <rgm@gnu.org>
2
3 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
4
12012-07-09 Paul Eggert <eggert@cs.ucla.edu> 52012-07-09 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 * process.c (wait_reading_process_output): 'waitchannels' was unset 7 * process.c (wait_reading_process_output): 'waitchannels' was unset
diff --git a/src/nsterm.h b/src/nsterm.h
index b2f03d08f2c..969091e334c 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -798,7 +798,7 @@ extern void x_free_frame_resources (struct frame *);
798#define NSAPP_DATA2_RUNASSCRIPT 10 798#define NSAPP_DATA2_RUNASSCRIPT 10
799extern void ns_run_ascript (void); 799extern void ns_run_ascript (void);
800 800
801extern char *ns_etc_directory (void); 801extern const char *ns_etc_directory (void);
802extern void ns_init_paths (void); 802extern void ns_init_paths (void);
803extern void syms_of_nsterm (void); 803extern void syms_of_nsterm (void);
804extern void syms_of_nsfns (void); 804extern void syms_of_nsfns (void);
diff --git a/src/nsterm.m b/src/nsterm.m
index 4c4d3de78ff..2b1b67c8b58 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -286,24 +286,24 @@ append2 (Lisp_Object list, Lisp_Object item)
286} 286}
287 287
288 288
289char * 289const char *
290ns_etc_directory (void) 290ns_etc_directory (void)
291{ 291{
292/* If running as a self-contained app bundle, return as a string the 292/* If running as a self-contained app bundle, return as a string the
293 filename of the etc directory, if present; else nil. */ 293 filename of the etc directory, if present; else nil. */
294 294
295 NSBundle *bundle = [NSBundle mainBundle]; 295 NSBundle *bundle = [NSBundle mainBundle];
296 NSString *resourceDir = [bundle resourcePath]; 296 NSString *resourceDir = [bundle resourcePath];
297 NSString *resourcePath; 297 NSString *resourcePath;
298 NSFileManager *fileManager = [NSFileManager defaultManager]; 298 NSFileManager *fileManager = [NSFileManager defaultManager];
299 BOOL isDir; 299 BOOL isDir;
300 300
301 resourcePath = [resourceDir stringByAppendingPathComponent: @"etc"]; 301 resourcePath = [resourceDir stringByAppendingPathComponent: @"etc"];
302 if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir]) 302 if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir])
303 { 303 {
304 if (isDir) return [resourcePath UTF8String]; 304 if (isDir) return [resourcePath UTF8String];
305 } 305 }
306 return nil; 306 return NULL;
307} 307}
308 308
309void 309void