summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-26 08:29:05 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-26 08:29:05 -0600
commit7c946bfafe961c1dda51d19b5c29a5600ef1e5ec (patch)
tree608ff1bdeafce3223747418560cb39e045a5683f /pith
parent9306e227fc7b1b096d4a58f8c06da66603a50a6a (diff)
downloadalpine-7c946bfafe961c1dda51d19b5c29a5600ef1e5ec.tar.xz
* Fix compilation error in arg.c when pwdcertdir was being freed, even
though a password file might have not been defined. * Work on reducing the number of warnings in OSX.
Diffstat (limited to 'pith')
-rw-r--r--pith/osdep/mimedisp.c14
-rw-r--r--pith/pine.hlp2
2 files changed, 15 insertions, 1 deletions
diff --git a/pith/osdep/mimedisp.c b/pith/osdep/mimedisp.c
index 2ee99293..7917a716 100644
--- a/pith/osdep/mimedisp.c
+++ b/pith/osdep/mimedisp.c
@@ -412,12 +412,21 @@ osx_build_mime_type_cmd(mime_type, cmd, cmdlen, sp_hndlp)
CFStringRef str_ref = NULL, ret_str_ref = NULL;
CFURLRef url_ref = NULL;
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+ if(&LSCopyDefaultApplicationURLForContentType == NULL)
+ return 0;
+#else
if(&LSCopyApplicationForMIMEType == NULL)
return 0;
+#endif
if((str_ref = CFStringCreateWithCString(NULL, mime_type,
kCFStringEncodingASCII)) == NULL)
return 0;
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+ if(LSCopyDefaultApplicationURLForContentType(str_ref, kLSRolesAll, &url_ref)
+#else
if(LSCopyApplicationForMIMEType(str_ref, kLSRolesAll, &url_ref)
+#endif
!= kLSApplicationNotFoundErr){
if((ret_str_ref = CFURLGetString(url_ref)) == NULL)
return 0;
@@ -454,8 +463,13 @@ osx_build_mime_ext_cmd(mime_ext, cmd, cmdlen, sp_hndlp)
? mime_ext+1 : mime_ext,
kCFStringEncodingASCII)) == NULL)
return 0;
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER
+ if(LSCopyDefaultApplicationURLForContentType(str_ref,
+ kLSRolesAll, &url_ref)
+#else
if(LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator,
str_ref, kLSRolesAll, NULL, &url_ref)
+#endif
!= kLSApplicationNotFoundErr){
if((ret_str_ref = CFURLGetString(url_ref)) == NULL)
return 0;
diff --git a/pith/pine.hlp b/pith/pine.hlp
index b568f2c4..6ce90a71 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 82 2015-07-24 22:13:48
+Alpine Commit 83 2015-07-26 08:29:01
============= h_news =================
<HTML>
<HEAD>