-
Notifications
You must be signed in to change notification settings - Fork 1
/
areascan.c
116 lines (95 loc) · 4 KB
/
areascan.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*---------------------------------------------------------------------------+
| Titel: AREASCAN.C |
+-----------------------------------------+---------------------------------+
| Erstellt von: Michael Hohner | Am: 21.06.1995 |
+-----------------------------------------+---------------------------------+
| System: OS/2 2.x/3.x |
+---------------------------------------------------------------------------+
| Beschreibung: |
| |
| Area-Scan von FleetStreet |
| |
| |
+---------------------------------------------------------------------------+
| Bemerkungen: |
+---------------------------------------------------------------------------*/
/*----------------------------- Header-Dateien ------------------------------*/
#pragma strings(readonly)
#define INCL_WIN
#define INCL_BASE
#include <os2.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <io.h>
#include <sys\stat.h>
#include <share.h>
#include "main.h"
#include "messages.h"
#include "structs.h"
#include "msgheader.h"
#include "areaman\areaman.h"
#include "handlemsg\handlemsg.h"
#include "dump\expt.h"
#include "areascan.h"
/*--------------------------------- Defines ---------------------------------*/
/*---------------------------------- Typen ----------------------------------*/
/*---------------------------- Globale Variablen ----------------------------*/
/*--------------------------- Funktionsprototypen ---------------------------*/
/*----------------------- interne Funktionsprototypen -----------------------*/
/*-----------------------------------------------------------------------------
| Funktionsname: ScanAreas
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Beschreibung: Thread-Funktion, scannt die Areas, die mit dem SCAN-Flag
| markiert sind.
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Parameter: scanlist: Anfang der Area-Liste
|
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Rckgabewerte: -
|
|- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Sonstiges:
|
+---------------------------------------------------------------------------*/
void _Optlink ScanAreas(void *scanlist)
{
AREADEFLIST *zeiger;
extern BOOL DoingAreaScan;
extern BOOL StopAreaScan;
extern HWND client;
extern MISCOPTIONS miscoptions;
extern char CurrentArea[LEN_AREATAG+1];
INSTALLEXPT("Areascan");
/* Flag setzen */
DoingAreaScan=TRUE;
StopAreaScan=FALSE;
zeiger=((PAREALIST)scanlist)->pFirstArea;
while (zeiger)
{
if (zeiger->flWork & WORK_SCAN)
{
if (stricmp(zeiger->areadata.areatag, CurrentArea) &&
!zeiger->bLocked)
{
extern DRIVEREMAP driveremap;
/* Meldung in Statuszeile */
WinPostMsg(client, SM_AREASCANNED, MPFROMP(zeiger->areadata.areatag), NULL);
if (!MSG_OpenArea(scanlist, zeiger->areadata.areatag, miscoptions.lastreadoffset, &driveremap))
MSG_CloseArea(scanlist, zeiger->areadata.areatag, FALSE, miscoptions.lastreadoffset, &driveremap);
}
zeiger->flWork &= ~WORK_SCAN;
}
zeiger=zeiger->next;
if (StopAreaScan)
break;
}
/* Ende-Meldung */
while (!WinPostMsg(client, SM_SCANENDED, NULL, NULL))
DosSleep(500);
/* Flag wegnehmen */
DoingAreaScan=FALSE;
DEINSTALLEXPT;
return;
}
/*-------------------------------- Modulende --------------------------------*/