Mercurial > hg > xemacs-beta
comparison src/win32.c @ 4834:b3ea9c582280
Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 12 Jan 2010 01:38:04 -0600 |
parents | 902d5bd9b75c |
children | 95c4ced5c07c |
comparison
equal
deleted
inserted
replaced
4833:4dd2389173fc | 4834:b3ea9c582280 |
---|---|
68 Ibyte * | 68 Ibyte * |
69 urlify_filename (Ibyte *filename) | 69 urlify_filename (Ibyte *filename) |
70 { | 70 { |
71 Ibyte *pseudo_url; | 71 Ibyte *pseudo_url; |
72 | 72 |
73 WIN32_TO_LOCAL_FILE_FORMAT (filename, filename); | 73 INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT (filename, filename); |
74 pseudo_url = xnew_array (Ibyte, 5 + qxestrlen (filename) + 1); | 74 pseudo_url = xnew_array (Ibyte, 5 + qxestrlen (filename) + 1); |
75 qxestrcpy_ascii (pseudo_url, "file:"); | 75 qxestrcpy_ascii (pseudo_url, "file:"); |
76 qxestrcat (pseudo_url, filename); | 76 qxestrcat (pseudo_url, filename); |
77 /* URL's only have /, no backslash */ | 77 /* URL's only have /, no backslash */ |
78 for (filename = pseudo_url; *filename; filename++) | 78 for (filename = pseudo_url; *filename; filename++) |
91 tstr_to_local_file_format (Extbyte *path) | 91 tstr_to_local_file_format (Extbyte *path) |
92 { | 92 { |
93 Ibyte *ttlff; | 93 Ibyte *ttlff; |
94 | 94 |
95 TSTR_TO_C_STRING (path, ttlff); | 95 TSTR_TO_C_STRING (path, ttlff); |
96 WIN32_TO_LOCAL_FILE_FORMAT (ttlff, ttlff); | 96 INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT (ttlff, ttlff); |
97 | 97 |
98 return build_intstring (ttlff); | 98 return build_intstring (ttlff); |
99 } | 99 } |
100 | 100 |
101 /* Normalize filename by converting all path separators to the specified | 101 /* Normalize filename by converting all path separators to the specified |
348 LISP_STRING_TO_TSTR (operation, opext); | 348 LISP_STRING_TO_TSTR (operation, opext); |
349 /* #### What about path names, which may be links? */ | 349 /* #### What about path names, which may be links? */ |
350 if (STRINGP (parameters)) | 350 if (STRINGP (parameters)) |
351 LISP_STRING_TO_TSTR (parameters, parmext); | 351 LISP_STRING_TO_TSTR (parameters, parmext); |
352 if (STRINGP (current_dir)) | 352 if (STRINGP (current_dir)) |
353 LOCAL_FILE_FORMAT_TO_TSTR (current_dir, path); | 353 LISP_LOCAL_FILE_FORMAT_TO_TSTR (current_dir, path); |
354 if (STRINGP (document)) | 354 if (STRINGP (document)) |
355 LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR (document, doc); | 355 LISP_LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR (document, doc); |
356 | 356 |
357 ret = (int) qxeShellExecute (NULL, opext, doc, parmext, path, | 357 ret = (int) qxeShellExecute (NULL, opext, doc, parmext, path, |
358 (INTP (show_flag) ? | 358 (INTP (show_flag) ? |
359 XINT (show_flag) : SW_SHOWDEFAULT)); | 359 XINT (show_flag) : SW_SHOWDEFAULT)); |
360 } | 360 } |
402 p = XSTRING_DATA (path); | 402 p = XSTRING_DATA (path); |
403 if (isalpha (p[0]) && (IS_DEVICE_SEP (p[1]))) | 403 if (isalpha (p[0]) && (IS_DEVICE_SEP (p[1]))) |
404 return path; | 404 return path; |
405 | 405 |
406 /* Use mule and cygwin-safe APIs top get at file data. */ | 406 /* Use mule and cygwin-safe APIs top get at file data. */ |
407 LOCAL_TO_WIN32_FILE_FORMAT (p, p); | 407 LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN (p, p); |
408 return build_intstring (p); | 408 return build_intstring (p); |
409 } | 409 } |
410 #endif | 410 #endif |
411 | 411 |
412 struct read_link_hash | 412 struct read_link_hash |