Mercurial > vim
comparison src/eval.c @ 15868:7fad90423bd2 v8.1.0941
patch 8.1.0941: macros for MS-Windows are inconsistent
commit https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 17 17:44:42 2019 +0100
patch 8.1.0941: macros for MS-Windows are inconsistent
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes #3932)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Feb 2019 17:45:08 +0100 |
parents | 05d836c8f1c4 |
children | fec4416adb80 |
comparison
equal
deleted
inserted
replaced
15867:4a3823e692d3 | 15868:7fad90423bd2 |
---|---|
7458 : job->jv_status >= JOB_ENDED ? "dead" | 7458 : job->jv_status >= JOB_ENDED ? "dead" |
7459 : "run"; | 7459 : "run"; |
7460 # ifdef UNIX | 7460 # ifdef UNIX |
7461 vim_snprintf((char *)buf, NUMBUFLEN, | 7461 vim_snprintf((char *)buf, NUMBUFLEN, |
7462 "process %ld %s", (long)job->jv_pid, status); | 7462 "process %ld %s", (long)job->jv_pid, status); |
7463 # elif defined(WIN32) | 7463 # elif defined(MSWIN) |
7464 vim_snprintf((char *)buf, NUMBUFLEN, | 7464 vim_snprintf((char *)buf, NUMBUFLEN, |
7465 "process %ld %s", | 7465 "process %ld %s", |
7466 (long)job->jv_proc_info.dwProcessId, | 7466 (long)job->jv_proc_info.dwProcessId, |
7467 status); | 7467 status); |
7468 # else | 7468 # else |
9954 #endif /* FEAT_EVAL */ | 9954 #endif /* FEAT_EVAL */ |
9955 | 9955 |
9956 | 9956 |
9957 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO) | 9957 #if defined(FEAT_MODIFY_FNAME) || defined(FEAT_EVAL) || defined(PROTO) |
9958 | 9958 |
9959 #ifdef WIN3264 | 9959 #ifdef MSWIN |
9960 /* | 9960 /* |
9961 * Functions for ":8" filename modifier: get 8.3 version of a filename. | 9961 * Functions for ":8" filename modifier: get 8.3 version of a filename. |
9962 */ | 9962 */ |
9963 | 9963 |
9964 /* | 9964 /* |
10189 *bufp = pbuf; | 10189 *bufp = pbuf; |
10190 *fnamep = p; | 10190 *fnamep = p; |
10191 | 10191 |
10192 return OK; | 10192 return OK; |
10193 } | 10193 } |
10194 #endif /* WIN3264 */ | 10194 #endif // MSWIN |
10195 | 10195 |
10196 /* | 10196 /* |
10197 * Adjust a filename, according to a string of modifiers. | 10197 * Adjust a filename, according to a string of modifiers. |
10198 * *fnamep must be NUL terminated when called. When returning, the length is | 10198 * *fnamep must be NUL terminated when called. When returning, the length is |
10199 * determined by *fnamelen. | 10199 * determined by *fnamelen. |
10213 char_u *tail; | 10213 char_u *tail; |
10214 char_u *s, *p, *pbuf; | 10214 char_u *s, *p, *pbuf; |
10215 char_u dirname[MAXPATHL]; | 10215 char_u dirname[MAXPATHL]; |
10216 int c; | 10216 int c; |
10217 int has_fullname = 0; | 10217 int has_fullname = 0; |
10218 #ifdef WIN3264 | 10218 #ifdef MSWIN |
10219 char_u *fname_start = *fnamep; | 10219 char_u *fname_start = *fnamep; |
10220 int has_shortname = 0; | 10220 int has_shortname = 0; |
10221 #endif | 10221 #endif |
10222 | 10222 |
10223 repeat: | 10223 repeat: |
10268 *bufp = *fnamep; | 10268 *bufp = *fnamep; |
10269 if (*fnamep == NULL) | 10269 if (*fnamep == NULL) |
10270 return -1; | 10270 return -1; |
10271 } | 10271 } |
10272 | 10272 |
10273 #ifdef WIN3264 | 10273 #ifdef MSWIN |
10274 # if _WIN32_WINNT >= 0x0500 | 10274 # if _WIN32_WINNT >= 0x0500 |
10275 if (vim_strchr(*fnamep, '~') != NULL) | 10275 if (vim_strchr(*fnamep, '~') != NULL) |
10276 { | 10276 { |
10277 /* Expand 8.3 filename to full path. Needed to make sure the same | 10277 /* Expand 8.3 filename to full path. Needed to make sure the same |
10278 * file does not have two different names. | 10278 * file does not have two different names. |
10311 && ((c = src[*usedlen + 1]) == '.' || c == '~' || c == '8')) | 10311 && ((c = src[*usedlen + 1]) == '.' || c == '~' || c == '8')) |
10312 { | 10312 { |
10313 *usedlen += 2; | 10313 *usedlen += 2; |
10314 if (c == '8') | 10314 if (c == '8') |
10315 { | 10315 { |
10316 #ifdef WIN3264 | 10316 #ifdef MSWIN |
10317 has_shortname = 1; /* Postpone this. */ | 10317 has_shortname = 1; /* Postpone this. */ |
10318 #endif | 10318 #endif |
10319 continue; | 10319 continue; |
10320 } | 10320 } |
10321 pbuf = NULL; | 10321 pbuf = NULL; |
10404 | 10404 |
10405 /* ":8" - shortname */ | 10405 /* ":8" - shortname */ |
10406 if (src[*usedlen] == ':' && src[*usedlen + 1] == '8') | 10406 if (src[*usedlen] == ':' && src[*usedlen + 1] == '8') |
10407 { | 10407 { |
10408 *usedlen += 2; | 10408 *usedlen += 2; |
10409 #ifdef WIN3264 | 10409 #ifdef MSWIN |
10410 has_shortname = 1; | 10410 has_shortname = 1; |
10411 #endif | 10411 #endif |
10412 } | 10412 } |
10413 | 10413 |
10414 #ifdef WIN3264 | 10414 #ifdef MSWIN |
10415 /* | 10415 /* |
10416 * Handle ":8" after we have done 'heads' and before we do 'tails'. | 10416 * Handle ":8" after we have done 'heads' and before we do 'tails'. |
10417 */ | 10417 */ |
10418 if (has_shortname) | 10418 if (has_shortname) |
10419 { | 10419 { |
10453 return -1; | 10453 return -1; |
10454 } | 10454 } |
10455 *fnamelen = l; | 10455 *fnamelen = l; |
10456 } | 10456 } |
10457 } | 10457 } |
10458 #endif /* WIN3264 */ | 10458 #endif // MSWIN |
10459 | 10459 |
10460 /* ":t" - tail, just the basename */ | 10460 /* ":t" - tail, just the basename */ |
10461 if (src[*usedlen] == ':' && src[*usedlen + 1] == 't') | 10461 if (src[*usedlen] == ':' && src[*usedlen + 1] == 't') |
10462 { | 10462 { |
10463 *usedlen += 2; | 10463 *usedlen += 2; |