Mercurial > emacs
comparison src/w32.c @ 90979:988f1edc9674
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 803-805)
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-227
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 09 Jul 2007 08:00:55 +0000 |
parents | 3619e7770f2e f2e567726d3f |
children | f55f9811f5d7 |
comparison
equal
deleted
inserted
replaced
90978:f866074aedc4 | 90979:988f1edc9674 |
---|---|
111 extern Lisp_Object Vw32_get_true_file_attributes; | 111 extern Lisp_Object Vw32_get_true_file_attributes; |
112 extern int w32_num_mouse_buttons; | 112 extern int w32_num_mouse_buttons; |
113 | 113 |
114 | 114 |
115 /* | 115 /* |
116 Initialization states | 116 Initialization states |
117 */ | 117 */ |
118 static BOOL g_b_init_is_windows_9x; | 118 static BOOL g_b_init_is_windows_9x; |
119 static BOOL g_b_init_open_process_token; | 119 static BOOL g_b_init_open_process_token; |
120 static BOOL g_b_init_get_token_information; | 120 static BOOL g_b_init_get_token_information; |
121 static BOOL g_b_init_lookup_account_sid; | 121 static BOOL g_b_init_lookup_account_sid; |
1153 { | 1153 { |
1154 if (!getenv (env_vars[i].name)) | 1154 if (!getenv (env_vars[i].name)) |
1155 { | 1155 { |
1156 int dont_free = 0; | 1156 int dont_free = 0; |
1157 | 1157 |
1158 if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL) | 1158 if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL |
1159 /* Also ignore empty environment variables. */ | |
1160 || *lpval == 0) | |
1159 { | 1161 { |
1160 lpval = env_vars[i].def_value; | 1162 lpval = env_vars[i].def_value; |
1161 dwType = REG_EXPAND_SZ; | 1163 dwType = REG_EXPAND_SZ; |
1162 dont_free = 1; | 1164 dont_free = 1; |
1163 } | 1165 } |
2524 && (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING, | 2526 && (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING, |
2525 FILE_FLAG_BACKUP_SEMANTICS, NULL)) | 2527 FILE_FLAG_BACKUP_SEMANTICS, NULL)) |
2526 != INVALID_HANDLE_VALUE) | 2528 != INVALID_HANDLE_VALUE) |
2527 { | 2529 { |
2528 /* This is more accurate in terms of gettting the correct number | 2530 /* This is more accurate in terms of gettting the correct number |
2529 of links, but is quite slow (it is noticable when Emacs is | 2531 of links, but is quite slow (it is noticeable when Emacs is |
2530 making a list of file name completions). */ | 2532 making a list of file name completions). */ |
2531 BY_HANDLE_FILE_INFORMATION info; | 2533 BY_HANDLE_FILE_INFORMATION info; |
2532 | 2534 |
2533 if (GetFileInformationByHandle (fh, &info)) | 2535 if (GetFileInformationByHandle (fh, &info)) |
2534 { | 2536 { |
3009 WSAENOMORE , "No more operations allowed", /* not sure */ | 3011 WSAENOMORE , "No more operations allowed", /* not sure */ |
3010 WSAECANCELLED , "Operation cancelled", /* not sure */ | 3012 WSAECANCELLED , "Operation cancelled", /* not sure */ |
3011 WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider", | 3013 WSAEINVALIDPROCTABLE , "Invalid procedure table from service provider", |
3012 WSAEINVALIDPROVIDER , "Invalid service provider version number", | 3014 WSAEINVALIDPROVIDER , "Invalid service provider version number", |
3013 WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider", | 3015 WSAEPROVIDERFAILEDINIT , "Unable to initialize a service provider", |
3014 WSASYSCALLFAILURE , "System call failured", | 3016 WSASYSCALLFAILURE , "System call failure", |
3015 WSASERVICE_NOT_FOUND , "Service not found", /* not sure */ | 3017 WSASERVICE_NOT_FOUND , "Service not found", /* not sure */ |
3016 WSATYPE_NOT_FOUND , "Class type not found", | 3018 WSATYPE_NOT_FOUND , "Class type not found", |
3017 WSA_E_NO_MORE , "No more resources available", /* really not sure */ | 3019 WSA_E_NO_MORE , "No more resources available", /* really not sure */ |
3018 WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */ | 3020 WSA_E_CANCELLED , "Operation already cancelled", /* really not sure */ |
3019 WSAEREFUSED , "Operation refused", /* not sure */ | 3021 WSAEREFUSED , "Operation refused", /* not sure */ |
4208 GUI modes, since we had to fool windows into thinking emacs is a | 4210 GUI modes, since we had to fool windows into thinking emacs is a |
4209 console application to get console mode to work. */ | 4211 console application to get console mode to work. */ |
4210 SetConsoleCtrlHandler(shutdown_handler, TRUE); | 4212 SetConsoleCtrlHandler(shutdown_handler, TRUE); |
4211 } | 4213 } |
4212 | 4214 |
4213 /* end of nt.c */ | 4215 /* end of w32.c */ |
4214 | 4216 |
4215 /* arch-tag: 90442dd3-37be-482b-b272-ac752e3049f1 | 4217 /* arch-tag: 90442dd3-37be-482b-b272-ac752e3049f1 |
4216 (do not change this comment) */ | 4218 (do not change this comment) */ |