+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
#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);
}
-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