diff options
| author | Juanma Barranquero | 2005-06-23 16:12:25 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-06-23 16:12:25 +0000 |
| commit | 25f45c8175736d1c42009ef95762441404566684 (patch) | |
| tree | 199f3a8be9724d35c1dd173e0d24945c73ff1674 /src | |
| parent | 6fa2b890d4f182a40fed28f9b99a7b82b33f516d (diff) | |
| download | emacs-25f45c8175736d1c42009ef95762441404566684.tar.gz emacs-25f45c8175736d1c42009ef95762441404566684.zip | |
(check_x_frame): Follow error conventions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfns.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/macfns.c b/src/macfns.c index b26baf3eaf7..da1afa13bd8 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -208,7 +208,7 @@ check_x_frame (frame) | |||
| 208 | CHECK_LIVE_FRAME (frame); | 208 | CHECK_LIVE_FRAME (frame); |
| 209 | f = XFRAME (frame); | 209 | f = XFRAME (frame); |
| 210 | if (! FRAME_MAC_P (f)) | 210 | if (! FRAME_MAC_P (f)) |
| 211 | error ("non-mac frame used"); | 211 | error ("Non-Mac frame used"); |
| 212 | return f; | 212 | return f; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| @@ -4241,7 +4241,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4241 | NavTypeListHandle fileTypes = NULL; | 4241 | NavTypeListHandle fileTypes = NULL; |
| 4242 | NavUserAction userAction; | 4242 | NavUserAction userAction; |
| 4243 | CFStringRef message=NULL, saveName = NULL; | 4243 | CFStringRef message=NULL, saveName = NULL; |
| 4244 | 4244 | ||
| 4245 | BLOCK_INPUT; | 4245 | BLOCK_INPUT; |
| 4246 | /* No need for a callback function because we are modal */ | 4246 | /* No need for a callback function because we are modal */ |
| 4247 | NavGetDefaultDialogCreationOptions(&options); | 4247 | NavGetDefaultDialogCreationOptions(&options); |
| @@ -4265,8 +4265,8 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4265 | if (!NILP (only_dir_p)) | 4265 | if (!NILP (only_dir_p)) |
| 4266 | status = NavCreateChooseFolderDialog(&options, mac_nav_event_callbackUPP, | 4266 | status = NavCreateChooseFolderDialog(&options, mac_nav_event_callbackUPP, |
| 4267 | NULL, NULL, &dialogRef); | 4267 | NULL, NULL, &dialogRef); |
| 4268 | else if (NILP (mustmatch)) | 4268 | else if (NILP (mustmatch)) |
| 4269 | { | 4269 | { |
| 4270 | /* This is a save dialog */ | 4270 | /* This is a save dialog */ |
| 4271 | options.optionFlags |= kNavDontConfirmReplacement; | 4271 | options.optionFlags |= kNavDontConfirmReplacement; |
| 4272 | options.actionButtonLabel = CFSTR ("Ok"); | 4272 | options.actionButtonLabel = CFSTR ("Ok"); |
| @@ -4283,7 +4283,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4283 | options.saveFileName = saveName; | 4283 | options.saveFileName = saveName; |
| 4284 | options.optionFlags |= kNavSelectDefaultLocation; | 4284 | options.optionFlags |= kNavSelectDefaultLocation; |
| 4285 | } | 4285 | } |
| 4286 | status = NavCreatePutFileDialog(&options, | 4286 | status = NavCreatePutFileDialog(&options, |
| 4287 | 'TEXT', kNavGenericSignature, | 4287 | 'TEXT', kNavGenericSignature, |
| 4288 | mac_nav_event_callbackUPP, NULL, | 4288 | mac_nav_event_callbackUPP, NULL, |
| 4289 | &dialogRef); | 4289 | &dialogRef); |
| @@ -4295,7 +4295,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4295 | mac_nav_event_callbackUPP, NULL, | 4295 | mac_nav_event_callbackUPP, NULL, |
| 4296 | NULL, NULL, &dialogRef); | 4296 | NULL, NULL, &dialogRef); |
| 4297 | } | 4297 | } |
| 4298 | 4298 | ||
| 4299 | /* Set the default location and continue*/ | 4299 | /* Set the default location and continue*/ |
| 4300 | if (status == noErr) | 4300 | if (status == noErr) |
| 4301 | { | 4301 | { |
| @@ -4307,7 +4307,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4307 | FSSpec defLoc; | 4307 | FSSpec defLoc; |
| 4308 | status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc); | 4308 | status = posix_pathname_to_fsspec (SDATA (ENCODE_FILE (dir)), &defLoc); |
| 4309 | #endif | 4309 | #endif |
| 4310 | if (status == noErr) | 4310 | if (status == noErr) |
| 4311 | { | 4311 | { |
| 4312 | #ifdef MAC_OSX | 4312 | #ifdef MAC_OSX |
| 4313 | AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed); | 4313 | AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed); |
| @@ -4359,7 +4359,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4359 | int len = strlen(filename); | 4359 | int len = strlen(filename); |
| 4360 | if (len && filename[len-1] != '/') | 4360 | if (len && filename[len-1] != '/') |
| 4361 | filename[len++] = '/'; | 4361 | filename[len++] = '/'; |
| 4362 | CFStringGetCString(reply.saveFileName, filename+len, | 4362 | CFStringGetCString(reply.saveFileName, filename+len, |
| 4363 | sizeof (filename) - len, | 4363 | sizeof (filename) - len, |
| 4364 | #if MAC_OSX | 4364 | #if MAC_OSX |
| 4365 | kCFStringEncodingUTF8 | 4365 | kCFStringEncodingUTF8 |
| @@ -4387,11 +4387,11 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4387 | } | 4387 | } |
| 4388 | 4388 | ||
| 4389 | UNGCPRO; | 4389 | UNGCPRO; |
| 4390 | 4390 | ||
| 4391 | /* Make "Cancel" equivalent to C-g. */ | 4391 | /* Make "Cancel" equivalent to C-g. */ |
| 4392 | if (NILP (file)) | 4392 | if (NILP (file)) |
| 4393 | Fsignal (Qquit, Qnil); | 4393 | Fsignal (Qquit, Qnil); |
| 4394 | 4394 | ||
| 4395 | return unbind_to (count, file); | 4395 | return unbind_to (count, file); |
| 4396 | } | 4396 | } |
| 4397 | 4397 | ||