mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2024-09-19 17:41:01 +02:00
Exit programs automatically by System unit
This commit is contained in:
parent
7add2ddf38
commit
b366037e72
@ -52,7 +52,7 @@ begin
|
||||
BLACK_BUTTON:
|
||||
SetWindowCaption('Black');
|
||||
1:
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
end.
|
||||
|
@ -50,5 +50,4 @@ begin
|
||||
until KBHit;
|
||||
|
||||
ConsoleExit(1);
|
||||
TerminateThread;
|
||||
end.
|
||||
|
@ -90,6 +90,6 @@ begin
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -148,6 +148,6 @@ begin
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -43,6 +43,6 @@ begin
|
||||
end;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -32,5 +32,4 @@ begin
|
||||
printf('CurrentDirectory is "%s"'#10, Buffer);
|
||||
|
||||
ConsoleExit(0);
|
||||
TerminateThread;
|
||||
end.
|
||||
|
@ -53,6 +53,6 @@ begin
|
||||
end;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -57,7 +57,7 @@ begin
|
||||
end;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
NO_EVENT:
|
||||
UpdateInfo;
|
||||
end;
|
||||
|
@ -28,6 +28,6 @@ begin
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -24,5 +24,4 @@ begin
|
||||
WriteN(Buffer, FileSize);
|
||||
|
||||
ConsoleExit(0);
|
||||
TerminateThread;
|
||||
end.
|
||||
|
@ -65,5 +65,4 @@ begin
|
||||
end;
|
||||
|
||||
ConsoleExit(0);
|
||||
TerminateThread;
|
||||
end.
|
||||
|
@ -90,6 +90,6 @@ begin
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -130,7 +130,7 @@ begin
|
||||
WAIT_BUTTON:
|
||||
SetCursor(hWaitCursor);
|
||||
1:
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
end.
|
||||
|
@ -46,6 +46,6 @@ begin
|
||||
GetKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -79,6 +79,6 @@ begin
|
||||
OnKey;
|
||||
BUTTON_EVENT:
|
||||
if GetButton.ID = 1 then
|
||||
TerminateThread;
|
||||
Break;
|
||||
end;
|
||||
end.
|
||||
|
@ -7,8 +7,6 @@ unit SysInit;
|
||||
interface
|
||||
|
||||
procedure _InitExe;
|
||||
procedure _Halt0;
|
||||
procedure _InitLib(Context: PInitContext);
|
||||
|
||||
var
|
||||
ModuleIsLib: Boolean;
|
||||
@ -20,16 +18,8 @@ const
|
||||
|
||||
implementation
|
||||
|
||||
procedure _InitLib(context: pinitcontext);
|
||||
asm
|
||||
end;
|
||||
|
||||
procedure _InitExe;
|
||||
asm
|
||||
end;
|
||||
|
||||
procedure _Halt0;
|
||||
asm
|
||||
end;
|
||||
|
||||
end.
|
||||
end.
|
||||
|
@ -29,6 +29,7 @@ type
|
||||
DLLInitState: byte;
|
||||
end;
|
||||
|
||||
procedure _Halt0;
|
||||
procedure _HandleFinally;
|
||||
|
||||
implementation
|
||||
@ -36,6 +37,13 @@ implementation
|
||||
uses
|
||||
SysInit;
|
||||
|
||||
procedure _Halt0;
|
||||
asm
|
||||
XOR EAX, EAX
|
||||
DEC EAX
|
||||
INT $40
|
||||
end;
|
||||
|
||||
procedure _HandleFinally;
|
||||
asm
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user