Update of /cvsroot/boost/boost/tools/jam/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3787/tools/jam/src
Modified Files:
execnt.c
Log Message:
Fix out of order function definitions.
Index: execnt.c
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/execnt.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- execnt.c 6 Jun 2006 23:58:07 -0000 1.25
+++ execnt.c 7 Jun 2006 02:16:58 -0000 1.26
@@ -897,67 +897,6 @@
return result;
}
-int is_parent_child(DWORD parent, DWORD child)
-{
- HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
-
- if (parent == child)
- return 1;
-
- process_snapshot_h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
- if (INVALID_HANDLE_VALUE != process_snapshot_h)
- {
- BOOL ok = TRUE;
- PROCESSENTRY32 pinfo;
- pinfo.dwSize = sizeof(PROCESSENTRY32);
- for (
- ok = Process32First(process_snapshot_h, &pinfo);
- ok == TRUE;
- ok = Process32Next(process_snapshot_h, &pinfo) )
- {
- if (pinfo.th32ProcessID == child && pinfo.th32ParentProcessID)
- return is_parent_child(parent, pinfo.th32ParentProcessID);
- }
-
- CloseHandle(process_snapshot_h);
- }
-
- return 0;
-}
-
-int related(HANDLE h, DWORD p)
-{
- return is_parent_child(get_process_id(h), p);
-}
-
-BOOL CALLBACK window_enum(HWND hwnd, LPARAM lParam)
-{
- char buf[10] = {0};
- HANDLE h = *((HANDLE*) (lParam));
- DWORD pid = 0;
-
- if (!GetClassNameA(hwnd, buf, 10))
- return TRUE; // failed to read class name
-
- if (strcmp(buf, "#32770"))
- return TRUE; // not a dialog
-
- GetWindowThreadProcessId(hwnd, &pid);
- if (related(h, pid))
- {
- PostMessage(hwnd, WM_QUIT, 0, 0);
- // just one window at a time
- return FALSE;
- }
-
- return TRUE;
-}
-
-void close_alert(HANDLE process)
-{
- EnumWindows(&window_enum, (LPARAM) &process);
-}
-
static double
running_time(HANDLE process)
{
@@ -1059,6 +998,67 @@
TerminateProcess(process,-2);
}
+int is_parent_child(DWORD parent, DWORD child)
+{
+ HANDLE process_snapshot_h = INVALID_HANDLE_VALUE;
+
+ if (parent == child)
+ return 1;
+
+ process_snapshot_h = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
+ if (INVALID_HANDLE_VALUE != process_snapshot_h)
+ {
+ BOOL ok = TRUE;
+ PROCESSENTRY32 pinfo;
+ pinfo.dwSize = sizeof(PROCESSENTRY32);
+ for (
+ ok = Process32First(process_snapshot_h, &pinfo);
+ ok == TRUE;
+ ok = Process32Next(process_snapshot_h, &pinfo) )
+ {
+ if (pinfo.th32ProcessID == child && pinfo.th32ParentProcessID)
+ return is_parent_child(parent, pinfo.th32ParentProcessID);
+ }
+
+ CloseHandle(process_snapshot_h);
+ }
+
+ return 0;
+}
+
+int related(HANDLE h, DWORD p)
+{
+ return is_parent_child(get_process_id(h), p);
+}
+
+BOOL CALLBACK window_enum(HWND hwnd, LPARAM lParam)
+{
+ char buf[10] = {0};
+ HANDLE h = *((HANDLE*) (lParam));
+ DWORD pid = 0;
+
+ if (!GetClassNameA(hwnd, buf, 10))
+ return TRUE; // failed to read class name
+
+ if (strcmp(buf, "#32770"))
+ return TRUE; // not a dialog
+
+ GetWindowThreadProcessId(hwnd, &pid);
+ if (related(h, pid))
+ {
+ PostMessage(hwnd, WM_QUIT, 0, 0);
+ // just one window at a time
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+void close_alert(HANDLE process)
+{
+ EnumWindows(&window_enum, (LPARAM) &process);
+}
+
static int
my_wait( int *status )
{
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs