Mercurial > hg > xemacs-beta
comparison src/objects-msw.c @ 361:7347b34c275b r21-1-10
Import from CVS: tag r21-1-10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:58:40 +0200 |
parents | 8e84bee8ddd0 |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
360:0f00b38cfccb | 361:7347b34c275b |
---|---|
1495 int ret; | 1495 int ret; |
1496 struct gcpro gcpro1, gcpro2; | 1496 struct gcpro gcpro1, gcpro2; |
1497 | 1497 |
1498 CHECK_STRING (document); | 1498 CHECK_STRING (document); |
1499 | 1499 |
1500 /* Just get the filename if we were given it. */ | |
1501 document = Ffile_name_nondirectory (document); | |
1502 | |
1503 if (NILP (current_dir)) | 1500 if (NILP (current_dir)) |
1504 current_dir = current_buffer->directory; | 1501 current_dir = current_buffer->directory; |
1505 | 1502 |
1506 GCPRO2 (current_dir, document); | 1503 GCPRO2 (current_dir, document); |
1507 | 1504 |
1517 } | 1514 } |
1518 | 1515 |
1519 if (STRINGP (document)) | 1516 if (STRINGP (document)) |
1520 { | 1517 { |
1521 GET_C_STRING_FILENAME_DATA_ALLOCA (document, f); | 1518 GET_C_STRING_FILENAME_DATA_ALLOCA (document, f); |
1519 #ifdef __CYGWIN32__ | |
1520 CYGWIN_WIN32_PATH (f, doc); | |
1521 #else | |
1522 doc = f; | 1522 doc = f; |
1523 #endif | |
1523 } | 1524 } |
1524 | 1525 |
1525 UNGCPRO; | 1526 UNGCPRO; |
1526 | 1527 |
1527 ret = (int) ShellExecute (NULL, | 1528 ret = (int) ShellExecute (NULL, |
1535 XINT (show_flag) : SW_SHOWDEFAULT)); | 1536 XINT (show_flag) : SW_SHOWDEFAULT)); |
1536 | 1537 |
1537 if (ret > 32) | 1538 if (ret > 32) |
1538 return Qt; | 1539 return Qt; |
1539 | 1540 |
1540 if (ret == ERROR_FILE_NOT_FOUND || ret == SE_ERR_FNF) | 1541 if (ret == ERROR_FILE_NOT_FOUND) |
1541 signal_simple_error ("file not found", document); | 1542 signal_simple_error ("file not found", document); |
1542 else if (ret == ERROR_PATH_NOT_FOUND || ret == SE_ERR_PNF) | 1543 else if (ret == ERROR_PATH_NOT_FOUND) |
1543 signal_simple_error ("path not found", current_dir); | 1544 signal_simple_error ("path not found", current_dir); |
1544 else if (ret == ERROR_BAD_FORMAT) | 1545 else if (ret == ERROR_BAD_FORMAT) |
1545 signal_simple_error ("bad executable format", document); | 1546 signal_simple_error ("bad executable format", document); |
1546 else | 1547 else |
1547 error ("internal error"); | 1548 error ("internal error"); |