Mercurial > emacs
comparison src/w32proc.c @ 109160:f8660b83cdbf
Fix whitespace to follow coding guidelines.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 07 Jul 2010 11:45:28 +0200 |
parents | e27859da5624 |
children | 8cfee7d2955f |
comparison
equal
deleted
inserted
replaced
109159:3e9fdeb960d1 | 109160:f8660b83cdbf |
---|---|
44 #undef kill | 44 #undef kill |
45 | 45 |
46 #include <windows.h> | 46 #include <windows.h> |
47 #ifdef __GNUC__ | 47 #ifdef __GNUC__ |
48 /* This definition is missing from mingw32 headers. */ | 48 /* This definition is missing from mingw32 headers. */ |
49 extern BOOL WINAPI IsValidLocale(LCID, DWORD); | 49 extern BOOL WINAPI IsValidLocale (LCID, DWORD); |
50 #endif | 50 #endif |
51 | 51 |
52 #ifdef HAVE_LANGINFO_CODESET | 52 #ifdef HAVE_LANGINFO_CODESET |
53 #include <nl_types.h> | 53 #include <nl_types.h> |
54 #include <langinfo.h> | 54 #include <langinfo.h> |
128 va_end (args); | 128 va_end (args); |
129 OutputDebugString (buf); | 129 OutputDebugString (buf); |
130 } | 130 } |
131 #endif | 131 #endif |
132 | 132 |
133 typedef void (_CALLBACK_ *signal_handler)(int); | 133 typedef void (_CALLBACK_ *signal_handler) (int); |
134 | 134 |
135 /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ | 135 /* Signal handlers...SIG_DFL == 0 so this is initialized correctly. */ |
136 static signal_handler sig_handlers[NSIG]; | 136 static signal_handler sig_handlers[NSIG]; |
137 | 137 |
138 /* Fake signal implementation to record the SIGCHLD handler. */ | 138 /* Fake signal implementation to record the SIGCHLD handler. */ |
174 if (child_proc_count == MAX_CHILDREN) | 174 if (child_proc_count == MAX_CHILDREN) |
175 return NULL; | 175 return NULL; |
176 cp = &child_procs[child_proc_count++]; | 176 cp = &child_procs[child_proc_count++]; |
177 | 177 |
178 Initialise: | 178 Initialise: |
179 memset (cp, 0, sizeof(*cp)); | 179 memset (cp, 0, sizeof (*cp)); |
180 cp->fd = -1; | 180 cp->fd = -1; |
181 cp->pid = -1; | 181 cp->pid = -1; |
182 cp->procinfo.hProcess = NULL; | 182 cp->procinfo.hProcess = NULL; |
183 cp->status = STATUS_READ_ERROR; | 183 cp->status = STATUS_READ_ERROR; |
184 | 184 |
397 *pPid = cp->pid; | 397 *pPid = cp->pid; |
398 | 398 |
399 return TRUE; | 399 return TRUE; |
400 | 400 |
401 EH_Fail: | 401 EH_Fail: |
402 DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError());); | 402 DebPrint (("create_child.CreateProcess failed: %ld\n", GetLastError ());); |
403 return FALSE; | 403 return FALSE; |
404 } | 404 } |
405 | 405 |
406 /* create_child doesn't know what emacs' file handle will be for waiting | 406 /* create_child doesn't know what emacs' file handle will be for waiting |
407 on output from the child, so we need to make this additional call | 407 on output from the child, so we need to make this additional call |
2013 { | 2013 { |
2014 DWORD val = 0; | 2014 DWORD val = 0; |
2015 static char hex[] = "0123456789abcdefABCDEF"; | 2015 static char hex[] = "0123456789abcdefABCDEF"; |
2016 char * p; | 2016 char * p; |
2017 | 2017 |
2018 while (*s && (p = strchr(hex, *s)) != NULL) | 2018 while (*s && (p = strchr (hex, *s)) != NULL) |
2019 { | 2019 { |
2020 unsigned digit = p - hex; | 2020 unsigned digit = p - hex; |
2021 if (digit > 15) | 2021 if (digit > 15) |
2022 digit -= 6; | 2022 digit -= 6; |
2023 val = val * 16 + digit; | 2023 val = val * 16 + digit; |