app size decrease

git-svn-id: svn://kolibrios.org@7774 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-11 15:48:27 +00:00
parent 2289d86d71
commit 1ef8d92a9e
15 changed files with 68 additions and 78 deletions

View File

@ -5,7 +5,7 @@
#include "../lib/kolibri.h" #include "../lib/kolibri.h"
#endif #endif
:dword mem_init() inline dword mem_init()
{ {
$push ebx $push ebx
$mov eax, 68 $mov eax, 68
@ -13,7 +13,6 @@
$int 0x40 $int 0x40
$pop ebx $pop ebx
return EAX;
} }
:dword malloc(dword size) :dword malloc(dword size)
@ -98,31 +97,27 @@ L2:
} }
} }
inline fastcall dword memopen(ECX, EDX, ESI)
{
$push ebx
$mov eax, 68
$mov ebx, 22
// ecx = area name, 31 symbols max
// edx = area size for SHM_CREATE SHM_OPEN_ALWAYS
// esi = flags, see the list below:
#define SHM_OPEN 0x00 #define SHM_OPEN 0x00
#define SHM_OPEN_ALWAYS 0x04 #define SHM_OPEN_ALWAYS 0x04
#define SHM_CREATE 0x08 #define SHM_CREATE 0x08
#define SHM_READ 0x00 #define SHM_READ 0x00
#define SHM_WRITE 0x01 #define SHM_WRITE 0x01
inline fastcall dword memopen(ECX, EDX, ESI)
{
$mov eax, 68
$mov ebx, 22
// ecx = area name, 31 symbols max
// edx = area size for SHM_CREATE SHM_OPEN_ALWAYS
// esi = flags, see the list below:
$int 0x40 $int 0x40
$pop ebx
// eax, edx - please check system documentation // eax, edx - please check system documentation
} }
inline fastcall dword memclose(ECX) inline fastcall dword memclose(ECX)
{ {
$push ebx
$mov eax, 68 $mov eax, 68
$mov ebx, 23 $mov ebx, 23
$int 0x40 $int 0x40
$pop ebx
// eax destroyed // eax destroyed
} }

View File

@ -20,6 +20,8 @@ int max_hotkey_len;
int selected = 0; int selected = 0;
char shared_name[] = "LMENU";
dword cur_param = #param; dword cur_param = #param;
int GetNextParam() int GetNextParam()
{ {
@ -33,9 +35,8 @@ int GetNextParam()
void GetWindowPosition() void GetWindowPosition()
{ {
int position; int position, rez;
shared_mem = GetNextParam(); shared_mem = memopen(#shared_name, 4, SHM_WRITE);
debugval("shared_mem", ESDWORD[shared_mem]);
win_x = GetNextParam(); win_x = GetNextParam();
win_y = GetNextParam(); win_y = GetNextParam();
selected = GetNextParam(); selected = GetNextParam();
@ -169,12 +170,12 @@ void draw_list()
void click() void click()
{ {
ESDWORD[shared_mem] = menu1.cur_y + 1; ESBYTE[shared_mem] = byte menu1.cur_y + 1;
ExitProcess(); ExitProcess();
} }
void exit() void exit()
{ {
ESDWORD[shared_mem] = 0; ESBYTE[shared_mem] = 0;
ExitProcess(); ExitProcess();
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -1 +0,0 @@
<01><01><01><01><01><01><01><01><01><01><01><01><01><01><01><12>;<15>C<12>;<15>C<15>C<15>C)<29>W<15>C)<29>W)<29>W)<29>W)<29>W<01><01><12>9<12>;<15>C<12>;<01><01><01><01><15>C<15>C)<29>W)<29>W<01><01><12>;<12>9<12>;<12>;<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><12>;)<29>W<15>C)<29>W<01><01><12>9<12>;<15>C<12>9<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><12>;<15>C<15>C<15>C<01><01><12>9<01><01><01><01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><01><01><01><15>C<01><01><12>9<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><12>;<01><01><12>;<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><15>C<01><01><12>9<01><01><01><01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><01><01><01><15>C<01><01><12>9<12>;<12>;<12>;<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><15>C<12>;<12>;<15>C<01><01><12>9<12>;<12>;<12>;<01><12><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><01><15>C<12>;<15>C<12>;<01><01><12>;<12>9<12>;<12>;<01><01><01><01><12>;<12>9<12>;<15>C<01><01><10>4<12>9<0F>2<12>9<12>9<12>;<12>9<12>9<12>9<12>;<12>9<12>;<01><01><01><01><01><01><01><01><01><01><01><01><01><01><01>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>@ <09>K<12>@ <09>K<12>K<12>K<12>g7<67>K<12>g7<67>g7<67>g7<67>g7<67>)<06>)<06>> <09>@ <09>K<12>@ <09>@ <09>@ <09>K<12>@ <09>K<12>K<12>g7<67>g7<67>)<06>)<06>@ <09>> <09>@ <09>@ <09>@ <09>K<12>@ <09>@ <09>K<12>g7<67>K<12>g7<67>)<06>)<06>> <09>@ <09>K<12>> <09>@ <09>@ <09>@ <09>K<12>@ <09>@ <09>@ <09>K<12>)<06>)<06>> <09>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>K<12>)<06>)<06>> <09>2<08><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<08>@ <09>)<06>)<06>@ <09>2<08><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<08>K<12>)<06>)<06>> <09>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>2<08>K<12>)<06>)<06>> <09>@ <09>@ <09>@ <09>> <09>@ <09>@ <09>> <09>K<12>@ <09>@ <09>K<12>)<06>)<06>> <09>@ <09>@ <09>@ <09>@ <09>@ <09>@ <09>@ <09>K<12>@ <09>K<12>@ <09>)<06>)<06>@ <09>> <09>@ <09>@ <09>@ <09>> <09>@ <09>@ <09>@ <09>> <09>@ <09>K<12>)<06>)<06>9<08>> <09>8<08>> <09>> <09>@ <09>> <09>> <09>> <09>@ <09>> <09>@ <09>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06>)<06><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>lggWPPWPPWPPWPPWPPWPPWPPWPPWPPWPPWPPlgg<67><67><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPPWPPWPPWPPWPPWPPWPPWPPWPPWPPWPPWPPWPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD>WPP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

View File

@ -0,0 +1 @@
<04><04><04><04><04><04><04><04><04><04><04><04><04><04><04> <14><<1B>I<14><<1B>I<14><<1B>I<14><<1B>I<14><<1B>I<1B>I<1B>I<04><04> <14><<14><<1B>I<14><<04><04><04><04><1B>I<14><<1B>I<1B>I<04><04> <14><<14><<14><<14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><14><<1B>I<14><<1B>I<04><04> <14><<14><<1B>I<14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><14><<14><<1B>I<14><<04><04> <14><<04><04><04><04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><04><04><04><1B>I<04><04> <14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><14><<04><04> <14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><1B>I<04><04> <14><<04><04><04><04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><04><04><04><1B>I<04><04> <14><<14><<14><<14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><1B>I<14><<14><<1B>I<04><04> <14><<14><<14><<14><<04><14><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><04><1B>I<14><<1B>I<14><<04><04> <14><<14><<14><<14><<04><04><04><04><14><<14><<14><<1B>I<04><04> <10>4<14><<10>4<14><<14><<14><<14><<14><<14><<14><<14><<14><<04><04> <04> <04> <04> <04> <04> <04> <04> <04> <04> <04> <04> <04> <04> ,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>D <0C>S<1D>D <0C>S<1D>S<1D>S<1D>S<1D>S<1D>S<1D>S<1D>S<1D>S<1D>,<04>,<04>< <0C>D <0C>S<1D>D <0C>D <0C>S<1D>D <0C>S<1D>D <0C>S<1D>S<1D>S<1D>,<04>,<04>D <0C>< <0C>D <0C>D <0C>D <0C>D <0C>S<1D>D <0C>S<1D>D <0C>S<1D>S<1D>,<04>,<04>< <0C>D <0C>S<1D>< <0C>D <0C>D <0C>D <0C>S<1D>D <0C>S<1D>D <0C>S<1D>,<04>,<04>< <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>S<1D>,<04>,<04>< <0C>4 <0C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4 <0C>D <0C>,<04>,<04>D <0C>4 <0C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4 <0C>S<1D>,<04>,<04>< <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>4 <0C>S<1D>,<04>,<04>< <0C>D <0C>D <0C>D <0C>< <0C>D <0C>D <0C>< <0C>S<1D>D <0C>D <0C>S<1D>,<04>,<04>9 <0C>D <0C>D <0C>D <0C>D <0C>D <0C>D <0C>D <0C>S<1D>D <0C>S<1D>D <0C>,<04>,<04>D <0C>9 <0C>D <0C>9 <0C>D <0C>9 <0C>D <0C>9 <0C>D <0C>< <0C>D <0C>S<1D>,<04>,<04>9 <0C>< <0C>9 <0C>< <0C>9 <0C>D <0C>9 <0C>< <0C>9 <0C>D <0C>< <0C>D <0C>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>,<04>

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

View File

@ -0,0 +1 @@
lddTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTlddTTT蒿蕈<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>蒿腟TTTTTエャャ蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿莇ャャTTTTTTエャャ蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿莇ャャTTTTTTエャャ蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿蒿莇ャャTTTTTTエャャエャャエャャエャャエャャエャャエャャエャャエャャエャャエャャエャャエャャTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD><EFBFBD>TTT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>TT<EFBFBD><EFBFBD>

View File

@ -37,13 +37,6 @@ char Console_Work()
switch (param[0]) switch (param[0])
{ {
case '?':
case 'h':
debugln("tmpdisk command line parameters:");
debugln("a[number]s[size in MB] - add RAM disk");
debugln("d[number] - delete RAM disk");
ExitProcess();
break;
case 'd': //Delete disk case 'd': //Delete disk
del_disk.DiskId = param[1]-'0'; del_disk.DiskId = param[1]-'0';
ioctl.handle = driver_handle; ioctl.handle = driver_handle;
@ -57,12 +50,9 @@ char Console_Work()
break; break;
case 'a': //Add disk case 'a': //Add disk
disk_size= strchr(#param, 's'); disk_size= strchr(#param, 's');
if (!disk_size) if (!disk_size) {
{
add_disk.DiskSize = GetFreeRAM() / 5 * 2; add_disk.DiskSize = GetFreeRAM() / 5 * 2;
} } else {
else
{
add_disk.DiskSize = atoi(disk_size+1)*2048; add_disk.DiskSize = atoi(disk_size+1)*2048;
} }
add_disk.DiskId = param[1]-'0'; add_disk.DiskId = param[1]-'0';
@ -76,8 +66,10 @@ char Console_Work()
debugln(#size_t); debugln(#size_t);
break; break;
default: default:
debugln("unknown command line parameters"); debugln("\ntmpdisk: unknown command line parameters!");
debugln("use 'h' or '?' for help"); debugln("valid parameters are:");
debugln("a[number]s[size in MB] - add RAM disk");
debugln("d[number] - delete RAM disk");
ExitProcess(); ExitProcess();
} }

View File

@ -11,12 +11,12 @@
?define INTRO_TEXT_1 "‡¤¥áì ¡ã¤¥â ®â®¡à ¦ âìáï ᯨ᮪" ?define INTRO_TEXT_1 "‡¤¥áì ¡ã¤¥â ®â®¡à ¦ âìáï ᯨ᮪"
?define INTRO_TEXT_2 "¢¨àâã «ì­ëå ¤¨áª®¢ ¢ á¨á⥬¥." ?define INTRO_TEXT_2 "¢¨àâã «ì­ëå ¤¨áª®¢ ¢ á¨á⥬¥."
?define INTRO_TEXT_3 "<EFBFBD>®¯à®¡ã©â¥ ¤®¡ ¢¨âì ®¤¨­..." ?define INTRO_TEXT_3 "<EFBFBD>®¯à®¡ã©â¥ ¤®¡ ¢¨âì ®¤¨­..."
?define SIZE_TEXT "<EFBFBD> §¬¥à:" ?define SIZE_TEXT "<EFBFBD> §¬¥à ­®¢®£® ¤¨áª  ¢ Œ<>:"
?define NOTIFY_TEXT_NO_DISK "'„«ï ­ ç «  ¤®¡ ¢ì⥠å®âï ¡ë ®¤¨­ ¤¨áª' -W" ?define NOTIFY_TEXT_NO_DISK "'„«ï ­ ç «  ¤®¡ ¢ì⥠å®âï ¡ë ®¤¨­ ¤¨áª' -W"
?define NOTIFY_SYSTEM_DISK0 "'„¨áª á ­®¬¥à®¬ 0 ï¥âáï á¨á⥬­ë¬ ¨ 㤠«ïâì ¥£® ­¥ ४®¬¥­¤ã¥âáï. ?define NOTIFY_SYSTEM_DISK0 "'„¨áª á ­®¬¥à®¬ 0 ï¥âáï á¨á⥬­ë¬ ¨ 㤠«ïâì ¥£® ­¥ ४®¬¥­¤ã¥âáï.
á«ãç ¥, ¥á«¨ ¢ë â®ç­® §­ ¥â¥, çâ® ¤¥« ¥â¥, 㤠«¨âì ¥£® ¬®¦­® á § ¦ â®© ª« ¢¨è¥© SHIFT.' -W" á«ãç ¥, ¥á«¨ ¢ë â®ç­® §­ ¥â¥, çâ® ¤¥« ¥â¥, 㤠«¨âì ¥£® ¬®¦­® á § ¦ â®© ª« ¢¨è¥© SHIFT.' -W"
?define NOTIFY_TEXT_DISK_LIMIT "'„®á⨣­ã⠯।¥« ª®«¨ç¥á⢠ ¢¨àâã «ì­ëå ¤¨áª®¢' -W" ?define NOTIFY_TEXT_DISK_LIMIT "'„®á⨣­ã⠯।¥« ª®«¨ç¥á⢠ ¢¨àâã «ì­ëå ¤¨áª®¢' -W"
?define FREE_RAM_TEXT "<EFBFBD> §¬¥à ᢮¡®¤­®© ®¯¥à â¨¢­®© ¯ ¬ïâ¨: " ?define FREE_RAM_TEXT "<EFBFBD> §¬¥à ᢮¡®¤­®© ®¯¥à â¨¢­®© ¯ ¬ïâ¨: %i Mb"
#else #else
?define T_ADD_DISK " Add disk [Ins]" ?define T_ADD_DISK " Add disk [Ins]"
@ -24,12 +24,12 @@
?define INTRO_TEXT_1 " There will be list of mounted" ?define INTRO_TEXT_1 " There will be list of mounted"
?define INTRO_TEXT_2 " virtual disks." ?define INTRO_TEXT_2 " virtual disks."
?define INTRO_TEXT_3 " Try to add one..." ?define INTRO_TEXT_3 " Try to add one..."
?define SIZE_TEXT "Size:" ?define SIZE_TEXT "New Disk size in MB:"
?define NOTIFY_TEXT_NO_DISK "'You need to have at least one disk' -W" ?define NOTIFY_TEXT_NO_DISK "'You need to have at least one disk' -W"
?define NOTIFY_SYSTEM_DISK0 "'Disc number 0 is a system disk. It is not recommended to delete it. ?define NOTIFY_SYSTEM_DISK0 "'Disc number 0 is a system disk. It is not recommended to delete it.
In case when you know what you are doing you can delete it with the SHIFT key pressed.' -W" In case when you know what you are doing you can delete it with the SHIFT key pressed.' -W"
?define NOTIFY_TEXT_DISK_LIMIT "'Reached the limit of the number of virtual disks' -W" ?define NOTIFY_TEXT_DISK_LIMIT "'Reached the limit of the number of virtual disks' -W"
?define FREE_RAM_TEXT "Free RAM size: " ?define FREE_RAM_TEXT "Free RAM size: %i MB"
#endif #endif
struct path_string { unsigned char Item[10]; }; struct path_string { unsigned char Item[10]; };
@ -41,7 +41,8 @@ char selected;
proc_info Form; proc_info Form;
unsigned char icons[] = FROM "icons.raw"; unsigned char icons_btn[] = FROM "img/btn.raw";
unsigned char disk_icon[] = FROM "img/disk.raw";
#define TOPPANELH 68 #define TOPPANELH 68
#define BOTPANELH 26 #define BOTPANELH 26
@ -56,7 +57,7 @@ void Main_Window()
load_dll(boxlib, #box_lib_init,0); load_dll(boxlib, #box_lib_init,0);
GetNewSizeDisk(); GetNewSizeDisk();
edit_disk_size.left = strlen(SIZE_TEXT)*9 + 10; edit_disk_size.left = strlen(SIZE_TEXT)*8 + 13;
SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER); SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
loop() loop()
{ {
@ -141,19 +142,19 @@ void Main_Window()
break; break;
case evReDraw: case evReDraw:
system.color.get(); system.color.get();
DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.68",0); DefineAndDrawWindow(170,150,405,290,0x74,system.color.work,"Virtual Disk Manager 0.69",0);
GetProcessInfo(#Form, SelfInfo); GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break; if (Form.status_window>2) break;
DrawBar(0,0, Form.cwidth,TOPPANELH, system.color.work); DrawBar(0,0, Form.cwidth,TOPPANELH, system.color.work);
DrawBar(0,TOPPANELH, Form.cwidth,1, system.color.work_graph); DrawBar(0,TOPPANELH, Form.cwidth,1, system.color.work_graph);
WriteText(6, 9, 0x90, system.color.work_text, SIZE_TEXT); WriteText(6, 9, 0x90, system.color.work_text, SIZE_TEXT);
WriteText(edit_disk_size.left + edit_disk_size.width + 12, 9, 0x90, system.color.work_text, "MB."); DrawRectangle(edit_disk_size.left-1, edit_disk_size.top-1, edit_disk_size.width+2, 23,system.color.work_graph);
DrawEditBox(#edit_disk_size); edit_box_draw stdcall (#edit_disk_size);
x = 6 + DrawStandartCaptButton(6, 36, 10, T_ADD_DISK); x = 6 + DrawStandartCaptButton(6, 36, 10, T_ADD_DISK);
DrawStandartCaptButton(x, 36, 11, T_DELETE_DISK); DrawStandartCaptButton(x, 36, 11, T_DELETE_DISK);
_PutImage(6+6, 42, 14,14, #icons); _PutImage(6+6, 42, 14,14, #icons_btn);
_PutImage(x+6, 42, 14,14, 1*14*14*3+#icons); _PutImage(x+6, 42, 14,14, 14*14*3+#icons_btn);
GetDisks(); GetDisks();
DrawTmpDisks(); DrawTmpDisks();
} }
@ -211,7 +212,7 @@ dword GetDiskSize(dword disk_n)
{ {
BDVK bdvk; BDVK bdvk;
char tmp_path[8]; char tmp_path[8];
strcpy(#tmp_path, "/tmp0/1"); strcpy(#tmp_path, "/tmp#/1");
tmp_path[4] = disk_n + '0'; tmp_path[4] = disk_n + '0';
GetFileInfo(#tmp_path, #bdvk); GetFileInfo(#tmp_path, #bdvk);
return bdvk.sizelo; return bdvk.sizelo;
@ -226,13 +227,12 @@ void DrawTmpDisks()
#define SELECTION_INACTIVE 0x757489; #define SELECTION_INACTIVE 0x757489;
dword selection_color; dword selection_color;
char free_ram_text[60]; char free_ram_text[60];
byte i, real_id; byte i;
int FreeRAM=GetFreeRAM()/1024;
DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF); DrawBar(0,TOPPANELH+1, Form.cwidth,Form.cheight-TOPPANELH-BOTPANELH-2, 0xFFFFFF);
DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph); DrawBar(0,Form.cheight-BOTPANELH-1, Form.cwidth,1, system.color.work_graph);
DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work); DrawBar(0,Form.cheight-BOTPANELH, Form.cwidth,BOTPANELH, system.color.work);
sprintf(#free_ram_text, "%s%i MB", FREE_RAM_TEXT, FreeRAM); sprintf(#free_ram_text, FREE_RAM_TEXT, GetFreeRAM()/1024);
WriteText(10, Form.cheight-20, 0x90, system.color.work_text, #free_ram_text); WriteText(10, Form.cheight-20, 0x90, system.color.work_text, #free_ram_text);
if (disk_num==0) if (disk_num==0)
{ {
@ -242,14 +242,15 @@ void DrawTmpDisks()
return; return;
}; };
if (selected>=disk_num) selected=disk_num-1; //restore selected if (selected>=disk_num) selected=disk_num-1; //restore selected
for (i=0; i<10; i++) DeleteButton(20+i); for (i=0; i<10; i++)
for (i=0; i<disk_num; i++)
{ {
DeleteButton(20+i);
if (i>=disk_num) continue;
DefineButton(disk_pos_x[i], disk_pos_y[i], 80, 40, 20+i, 0xFFFfff); DefineButton(disk_pos_x[i], disk_pos_y[i], 80, 40, 20+i, 0xFFFfff);
WriteText(disk_pos_x[i]+26,disk_pos_y[i]+6, 10110000b, 0x222222, #disk_list[i].Item); WriteText(disk_pos_x[i]+29,disk_pos_y[i]+6, 0x90, 0x222222, #disk_list[i].Item);
real_id = disk_list[i].Item[3] - '0'; WriteText(disk_pos_x[i]+30,disk_pos_y[i]+24, 0x80, 0x555555,
WriteText(disk_pos_x[i]+27,disk_pos_y[i]+24, 0x80, 0x555555, ConvertSize(GetDiskSize(real_id))); ConvertSize(GetDiskSize(disk_list[i].Item[3] - '0')));
_PutImage(disk_pos_x[i]+6,disk_pos_y[i]+6, 14,14, 2*14*14*3+#icons); _PutImage(disk_pos_x[i]+9,disk_pos_y[i]+10, 15,9, #disk_icon);
if (selected==i) { if (selected==i) {
if ( edit_disk_size.flags & ed_focus) if ( edit_disk_size.flags & ed_focus)
selection_color = SELECTION_INACTIVE; selection_color = SELECTION_INACTIVE;

View File

@ -55,7 +55,7 @@ void main()
driver_handle = LoadDriver("tmpdisk"); driver_handle = LoadDriver("tmpdisk");
if (driver_handle==0) if (driver_handle==0)
{ {
notify("'TmpDisk\nError: /rd1/1/drivers/tmpdisk.obj driver loading failed\nvirtual disk wouldn't be added' -tE"); notify("'TmpDisk\nError: /rd/1/drivers/tmpdisk.obj driver loading failed\nVirtual disk wouldn't be added' -tE");
ExitProcess(); ExitProcess();
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because one or more lines are too long

View File

@ -182,7 +182,7 @@ struc mls [sstring]
; strings ; strings
macro sz name,[data] { ; from MFAR [mike.dld] macro sz name,[data] { ; [mike.dld]
common common
if used name if used name
name db data name db data
@ -199,7 +199,7 @@ macro szZ name,[data] { ; same as sz, but for zero terminated string [dunka
} }
sz0 fix szZ sz0 fix szZ
macro lsz name,[lng,data] { ; from MFAR [mike.dld] macro lsz name,[lng,data] { ; [mike.dld]
common common
if used name if used name
label name label name
@ -212,7 +212,7 @@ macro lsz name,[lng,data] { ; from MFAR [mike.dld]
end if end if
} }
macro szc name,elsz,[data] { ; from MFAR [mike.dld] macro szc name,elsz,[data] { ; [mike.dld]
common common
local s,m local s,m
m = 0 m = 0
@ -234,7 +234,7 @@ macro szc name,elsz,[data] { ; from MFAR [mike.dld]
end if end if
} }
macro lszc name,elsz,[lng,data] { ; from MFAR [mike.dld] macro lszc name,elsz,[lng,data] { ; [mike.dld]
common common
local s,m,c local s,m,c
m = 0 m = 0
@ -292,7 +292,7 @@ include 'config.inc'
;__CPU_type equ p5 ;__CPU_type equ p5
SYSENTER_VAR equ 0 SYSENTER_VAR equ 0
macro mcall a,b,c,d,e,f,g { ; mike.dld, updated by Ghost for Fast System Calls macro mcall a,b,c,d,e,f,g { ; [mike.dld], [Ghost]
local ..ret_point local ..ret_point
__mov eax,a __mov eax,a
__mov ebx,b __mov ebx,b

View File

@ -675,7 +675,7 @@ ret
;; ;; ;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;---- begin ---- „ ­­ë¥ ¤«ï ƒ<E282AC>ŽƒŽ ®ª­  -------------------------- ;---- begin ---- „ ­­ë¥ ¤«ï ƒ<E282AC>ŽƒŽ ®ª­  --------------------------
caption db '<27>¥à¨®¤¨ç¥áª ï á¨á⥬  „.ˆ.Œ¥­¤¥«¥¥¢  by [navanax] & [Johnny_B]',0 caption db '<27>¥à¨®¤¨ç¥áª ï á¨á⥬  „.ˆ.Œ¥­¤¥«¥¥¢  by navanax & Johnny_B',0
density db '<27>«®â­®áâì',0 density db '<27>«®â­®áâì',0
Atomic_massa db '€â®¬­ ï ¬ áá ',0 Atomic_massa db '€â®¬­ ï ¬ áá ',0
name db '<27> §¢ ­¨¥',0 name db '<27> §¢ ­¨¥',0
@ -818,13 +818,13 @@ db 'Siborgovium '
db 'Boronium ' db 'Boronium '
db 'Hassium ' db 'Hassium '
db 'Meithnerium ' db 'Meithnerium '
db 'Darmstadium ' ;110 db 'Darmstadtium' ;110
db 'Roentgenium ' db 'Roentgenium '
db 'Ununbium ' db 'Copernicium '
db 'Ununtrium ' db 'Nihonium '
db 'Ununquadium ' db 'Flerovium '
db 'Ununpentium ' db 'Moscovium '
db 'Ununhexium ' ;116 db 'Livermorium ' ;116
;--------------------------------- ;---------------------------------
@ -913,11 +913,11 @@ db 'Hs '
db 'Mt ' db 'Mt '
db 'Ds ' db 'Ds '
db 'Rg ' db 'Rg '
db 'Uub' db 'Cn '
db 'Uut' db 'Nh '
db 'Uuq' db 'Fi '
db 'Uup' db 'Mc '
db 'Uuh' db 'Lv '
db 'Ce ' db 'Ce '
db 'Pr ' db 'Pr '
db 'Nd ' db 'Nd '
@ -1544,13 +1544,13 @@ strtbl Rus_nazv, \
"<EFBFBD>®à¨©", \ "<EFBFBD>®à¨©", \
"ƒ áᨩ", \ "ƒ áᨩ", \
"Œ¥©â­¥à¨©", \ "Œ¥©â­¥à¨©", \
"? à¬áâ ¤¨©?", \ " à¬è⠤⨩", \ ;110
"<EFBFBD>¥­â£¥­¨©", \ "<EFBFBD>¥­â£¥­¨©", \
"­¥â ­ §¢ ­¨ï", \ "Š®¯¥à­¨æ¨©", \
"­¥â ­ §¢ ­¨ï", \ ;110 "<EFBFBD>¨å®­¨©", \
"­¥â ­ §¢ ­¨ï", \ "«¥à®¢¨©", \
"­¥â ­ §¢ ­¨ï", \ "Œ®áª®¢¨©", \
"­¥â ­ §¢ ­¨ï" ;116 "¨¢¥à¬®à¨©" ;116
;<3B>¥à¢®®âªà뢠⥫¨ ; 116 í«¥¬¥­â®¢ ;<3B>¥à¢®®âªà뢠⥫¨ ; 116 í«¥¬¥­â®¢