aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2006-04-12 08:08:30 +0000
committerYAMAMOTO Mitsuharu2006-04-12 08:08:30 +0000
commit961bf5901f777fb95d356e62cdfed3e24d330521 (patch)
tree8b7b14492de18c25f362a62c448b4d6436109552 /src
parent3e7f257019e1eac8f4d0281b3f8fa524ff708211 (diff)
downloademacs-961bf5901f777fb95d356e62cdfed3e24d330521.tar.gz
emacs-961bf5901f777fb95d356e62cdfed3e24d330521.zip
(get_flavor_type_from_symbol): Remove unused variable `val'.
(get_scrap_private_timestamp, x_get_foreign_selection) (copy_scrap_flavor_data): Add explicit braces to avoid ambiguous `else'. (Fmac_process_deferred_apple_events): Remove unused variables `keyword', `reply', `apple_event', `count', and `err'.
Diffstat (limited to 'src')
-rw-r--r--src/macselect.c74
1 files changed, 38 insertions, 36 deletions
diff --git a/src/macselect.c b/src/macselect.c
index 066892adce0..8312197181f 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -153,7 +153,6 @@ static ScrapFlavorType
153get_flavor_type_from_symbol (sym) 153get_flavor_type_from_symbol (sym)
154 Lisp_Object sym; 154 Lisp_Object sym;
155{ 155{
156 ScrapFlavorType val;
157 Lisp_Object str = Fget (sym, Qmac_ostype); 156 Lisp_Object str = Fget (sym, Qmac_ostype);
158 157
159 if (STRINGP (str) && SBYTES (str) == 4) 158 if (STRINGP (str) && SBYTES (str) == 4)
@@ -322,17 +321,19 @@ get_scrap_private_timestamp (scrap, timestamp)
322 321
323 err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags); 322 err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags);
324 if (err == noErr) 323 if (err == noErr)
325 if (!(flags & kScrapFlavorMaskSenderOnly)) 324 {
326 err = noTypeErr; 325 if (!(flags & kScrapFlavorMaskSenderOnly))
327 else 326 err = noTypeErr;
328 { 327 else
329 Size size = sizeof (*timestamp); 328 {
329 Size size = sizeof (*timestamp);
330 330
331 err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, 331 err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
332 &size, timestamp); 332 &size, timestamp);
333 if (err == noErr && size != sizeof (*timestamp)) 333 if (err == noErr && size != sizeof (*timestamp))
334 err = noTypeErr; 334 err = noTypeErr;
335 } 335 }
336 }
336#else /* !TARGET_API_MAC_CARBON */ 337#else /* !TARGET_API_MAC_CARBON */
337 Handle handle; 338 Handle handle;
338 SInt32 size, offset; 339 SInt32 size, offset;
@@ -683,18 +684,20 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp)
683 684
684 err = get_scrap_from_symbol (selection_symbol, 0, &scrap); 685 err = get_scrap_from_symbol (selection_symbol, 0, &scrap);
685 if (err == noErr && scrap) 686 if (err == noErr && scrap)
686 if (EQ (target_type, QTARGETS)) 687 {
687 { 688 if (EQ (target_type, QTARGETS))
688 result = get_scrap_target_type_list (scrap); 689 {
689 result = Fvconcat (1, &result); 690 result = get_scrap_target_type_list (scrap);
690 } 691 result = Fvconcat (1, &result);
691 else 692 }
692 { 693 else
693 result = get_scrap_string (scrap, target_type); 694 {
694 if (STRINGP (result)) 695 result = get_scrap_string (scrap, target_type);
695 Fput_text_property (make_number (0), make_number (SBYTES (result)), 696 if (STRINGP (result))
696 Qforeign_selection, target_type, result); 697 Fput_text_property (make_number (0), make_number (SBYTES (result)),
697 } 698 Qforeign_selection, target_type, result);
699 }
700 }
698 701
699 UNBLOCK_INPUT; 702 UNBLOCK_INPUT;
700 703
@@ -1009,7 +1012,7 @@ defer_apple_events (apple_event, reply)
1009 /* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes 1012 /* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes
1010 copies of the Apple event and the reply, but Mac OS 10.4 Xcode 1013 copies of the Apple event and the reply, but Mac OS 10.4 Xcode
1011 manual says it doesn't. Anyway we create copies of them and save 1014 manual says it doesn't. Anyway we create copies of them and save
1012 it in `deferred_apple_events'. */ 1015 them in `deferred_apple_events'. */
1013 if (err == noErr) 1016 if (err == noErr)
1014 { 1017 {
1015 if (deferred_apple_events.buf == NULL) 1018 if (deferred_apple_events.buf == NULL)
@@ -1123,11 +1126,8 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events,
1123 doc: /* Process Apple events that are deferred at the startup time. */) 1126 doc: /* Process Apple events that are deferred at the startup time. */)
1124 () 1127 ()
1125{ 1128{
1126 OSErr err;
1127 Lisp_Object result = Qnil; 1129 Lisp_Object result = Qnil;
1128 long i, count; 1130 long i;
1129 AppleEvent apple_event, reply;
1130 AEKeyword keyword;
1131 1131
1132 if (mac_ready_for_apple_events) 1132 if (mac_ready_for_apple_events)
1133 return Qnil; 1133 return Qnil;
@@ -1207,14 +1207,16 @@ copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type)
1207 break; 1207 break;
1208 } 1208 }
1209 if (err == noErr) 1209 if (err == noErr)
1210 if (buf == NULL) 1210 {
1211 err = memFullErr; 1211 if (buf == NULL)
1212 else 1212 err = memFullErr;
1213 { 1213 else
1214 err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone, 1214 {
1215 size, buf); 1215 err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
1216 xfree (buf); 1216 size, buf);
1217 } 1217 xfree (buf);
1218 }
1219 }
1218 1220
1219 return err; 1221 return err;
1220} 1222}