* src/nsterm.m, src/nsterm.h (ns_etc_directory): Fix type, empty return.
authorGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 21:14:12 +0000 (17:14 -0400)
committerGlenn Morris <rgm@gnu.org>
Mon, 9 Jul 2012 21:14:12 +0000 (17:14 -0400)
src/ChangeLog
src/nsterm.h
src/nsterm.m

index f0f0602..c491196 100644 (file)
@@ -1,3 +1,7 @@
+2012-07-09  Glenn Morris  <rgm@gnu.org>
+
+       * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
+
 2012-07-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        * process.c (wait_reading_process_output): 'waitchannels' was unset
index b2f03d0..969091e 100644 (file)
@@ -798,7 +798,7 @@ extern void x_free_frame_resources (struct frame *);
 #define NSAPP_DATA2_RUNASSCRIPT 10
 extern void ns_run_ascript (void);
 
-extern char *ns_etc_directory (void);
+extern const char *ns_etc_directory (void);
 extern void ns_init_paths (void);
 extern void syms_of_nsterm (void);
 extern void syms_of_nsfns (void);
index 4c4d3de..2b1b67c 100644 (file)
@@ -286,24 +286,24 @@ append2 (Lisp_Object list, Lisp_Object item)
 }
 
 
-char *
+const char *
 ns_etc_directory (void)
 {
 /* If running as a self-contained app bundle, return as a string the
    filename of the etc directory, if present; else nil.  */
 
-     NSBundle *bundle = [NSBundle mainBundle];
-     NSString *resourceDir = [bundle resourcePath];
-     NSString *resourcePath;
-     NSFileManager *fileManager = [NSFileManager defaultManager];
-     BOOL isDir;
-
-     resourcePath = [resourceDir stringByAppendingPathComponent: @"etc"];
-     if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir])
-     {
-          if (isDir) return [resourcePath UTF8String];
-     }
-     return nil;
+  NSBundle *bundle = [NSBundle mainBundle];
+  NSString *resourceDir = [bundle resourcePath];
+  NSString *resourcePath;
+  NSFileManager *fileManager = [NSFileManager defaultManager];
+  BOOL isDir;
+
+  resourcePath = [resourceDir stringByAppendingPathComponent: @"etc"];
+  if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir])
+    {
+      if (isDir) return [resourcePath UTF8String];
+    }
+  return NULL;
 }
 
 void