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