forked from KolibriOS/kolibrios
update local build, preparation for app update
git-svn-id: svn://kolibrios.org@7495 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
897cb727bb
commit
01fb237b16
8
programs/other/table/build.bat
Normal file
8
programs/other/table/build.bat
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
|
||||||
|
|
||||||
|
@cl /c /O2 /nologo /GS- /GR- /fp:fast *.cpp
|
||||||
|
@link /nologo /manifest:no /entry:crtStartUp /subsystem:native /base:0 /fixed /align:16 /nodefaultlib hello.obj *.obj
|
||||||
|
@pe2kos hello.exe hello.kex
|
||||||
|
@del hello.exe
|
||||||
|
@del *.obj
|
||||||
|
pause
|
@ -235,13 +235,16 @@ void format( char *Str, int len, char* Format, ... )
|
|||||||
Str[j] = 0;
|
Str[j] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *memcpy(void *dst, const void *src, unsigned size)
|
void *memcpy2(void *dst, const void *src, unsigned size)
|
||||||
{
|
{
|
||||||
while (size--)
|
while (size--)
|
||||||
*((char*)dst+size) = *((char*)src+size);
|
*((char*)dst+size) = *((char*)src+size);
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int strcmp(const char *s1, const char *s2)
|
int strcmp(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -697,7 +697,7 @@ void draw_window()
|
|||||||
|
|
||||||
if (window_drawall==true){
|
if (window_drawall==true){
|
||||||
kos_WindowRedrawStatus(1);
|
kos_WindowRedrawStatus(1);
|
||||||
kos_DefineAndDrawWindow(10,40,WND_W,WND_H,0x33,0x40FFFFFF,0,0,(Dword)"Table v" TABLE_VERSION);
|
kos_DefineAndDrawWindow(10,40,WND_W,WND_H,0x73,0x40FFFFFF,0,0,(Dword)"Table v" TABLE_VERSION);
|
||||||
kos_WindowRedrawStatus(2);
|
kos_WindowRedrawStatus(2);
|
||||||
|
|
||||||
if (info.rawData[70]&0x04) return; //ничего не делать если окно схлопнуто в заголовок
|
if (info.rawData[70]&0x04) return; //ничего не делать если окно схлопнуто в заголовок
|
||||||
@ -726,15 +726,15 @@ void draw_window()
|
|||||||
file_box.left = 64;
|
file_box.left = 64;
|
||||||
file_box.top = y - 1;
|
file_box.top = y - 1;
|
||||||
file_box.width = 98;
|
file_box.width = 98;
|
||||||
//editbox_h = 18;
|
//editbox_h = 18;
|
||||||
|
|
||||||
// сохранить
|
// сохранить
|
||||||
kos_DefineButton(20 + 160, y - 5, 60, 20, SAVE_BUTTON, 0xd0d0d0);
|
kos_DefineButton(20 + 160, y - 5, 60, 20, SAVE_BUTTON, 0xd0d0d0);
|
||||||
kos_WriteTextToWindow(22 + 160 + (60 - strlen(sSave) * 6) / 2, y + 2, 0, 0x000000, (char*)sSave, strlen(sSave));
|
kos_WriteTextToWindow(22 + 160 + (60 - strlen(sSave) * 6) / 2, y + 2, 0x80, 0x000000, (char*)sSave, 0);
|
||||||
|
|
||||||
// загрузить
|
// загрузить
|
||||||
kos_DefineButton(90 + 160, y - 5, 60, 20, LOAD_BUTTON, 0xd0d0d0);
|
kos_DefineButton(90 + 160, y - 5, 60, 20, LOAD_BUTTON, 0xd0d0d0);
|
||||||
kos_WriteTextToWindow(92 + 160 + (60 - strlen(sLoad) * 6) / 2, y + 2, 0, 0x000000, (char*)sLoad, strlen(sLoad));
|
kos_WriteTextToWindow(92 + 160 + (60 - strlen(sLoad) * 6) / 2, y + 2, 0x80, 0x000000, (char*)sLoad, 0);
|
||||||
|
|
||||||
// создать. только эту кнопу воткнуть некуда о_О
|
// создать. только эту кнопу воткнуть некуда о_О
|
||||||
/*
|
/*
|
||||||
|
@ -1,139 +0,0 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="hello" - Package Owner=<4>
|
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
|
||||||
# ** DO NOT EDIT **
|
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
|
||||||
|
|
||||||
CFG=hello - Win32 Release
|
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
|
||||||
!MESSAGE use the Export Makefile command and run
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "hello.mak".
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE NMAKE /f "hello.mak" CFG="hello - Win32 Release"
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE Possible choices for configuration are:
|
|
||||||
!MESSAGE
|
|
||||||
!MESSAGE "hello - Win32 Release" (based on "Win32 (x86) Application")
|
|
||||||
!MESSAGE
|
|
||||||
|
|
||||||
# Begin Project
|
|
||||||
# PROP AllowPerConfigDependencies 0
|
|
||||||
# PROP Scc_ProjName ""
|
|
||||||
# PROP Scc_LocalPath ""
|
|
||||||
CPP=cl.exe
|
|
||||||
MTL=midl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
# PROP BASE Use_MFC 0
|
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
|
||||||
# PROP BASE Output_Dir "Release"
|
|
||||||
# PROP BASE Intermediate_Dir "Release"
|
|
||||||
# PROP BASE Target_Dir ""
|
|
||||||
# PROP Use_MFC 0
|
|
||||||
# PROP Use_Debug_Libraries 0
|
|
||||||
# PROP Output_Dir "Release"
|
|
||||||
# PROP Intermediate_Dir "Release"
|
|
||||||
# PROP Ignore_Export_Lib 0
|
|
||||||
# PROP Target_Dir ""
|
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
|
||||||
# ADD CPP /nologo /Zp1 /W3 /vd0 /O2 /YX /FD /c
|
|
||||||
# SUBTRACT CPP /X
|
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
|
||||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
|
||||||
# ADD RSC /l 0x419 /d "NDEBUG"
|
|
||||||
BSC32=bscmake.exe
|
|
||||||
# ADD BASE BSC32 /nologo
|
|
||||||
# ADD BSC32 /nologo
|
|
||||||
LINK32=link.exe
|
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
|
||||||
# ADD LINK32 /nologo /base:"0" /entry:"crtStartUp" /subsystem:windows /machine:I386 /nodefaultlib /align:16
|
|
||||||
# SUBTRACT LINK32 /pdb:none
|
|
||||||
# Begin Custom Build
|
|
||||||
InputPath=.\Release\hello.exe
|
|
||||||
SOURCE="$(InputPath)"
|
|
||||||
|
|
||||||
"hello.kex" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
|
||||||
pe2kos Release\hello.exe hello.kex
|
|
||||||
|
|
||||||
# End Custom Build
|
|
||||||
# Begin Target
|
|
||||||
|
|
||||||
# Name "hello - Win32 Release"
|
|
||||||
# Begin Group "Source Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\calc.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\func.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\hello.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\KosFile.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\kosSyst.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\math2.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\mcsmemm.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\parser.cpp
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
|
||||||
# Begin Group "Header Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\calc.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\func.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\KosFile.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\kosSyst.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\MCSMEMM.H
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\parser.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\use_library.h
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
|
||||||
# Begin Group "Resource Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
|
||||||
# End Group
|
|
||||||
# End Target
|
|
||||||
# End Project
|
|
@ -1,29 +0,0 @@
|
|||||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
|
||||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Project: "hello"=".\hello.dsp" - Package Owner=<4>
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<4>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
Global:
|
|
||||||
|
|
||||||
Package=<5>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
Package=<3>
|
|
||||||
{{{
|
|
||||||
}}}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
@ -94,7 +94,7 @@ Dword rtlRand( void )
|
|||||||
return RandomSeed;
|
return RandomSeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUTOBUILD
|
//#ifdef AUTOBUILD
|
||||||
// Well, not really related to auto-build, but some compilation issue
|
// Well, not really related to auto-build, but some compilation issue
|
||||||
void memcpy( void *dst, const void *src, size_t bytesCount )
|
void memcpy( void *dst, const void *src, size_t bytesCount )
|
||||||
{
|
{
|
||||||
@ -118,7 +118,7 @@ void memset( Byte *dst, Byte filler, Dword count )
|
|||||||
rep stosb
|
rep stosb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -122,17 +122,21 @@ char * __cdecl strcpy( char *target, const char *source );
|
|||||||
int __cdecl strlen( const char *line );
|
int __cdecl strlen( const char *line );
|
||||||
char * __cdecl strrchr( const char * string, int c );
|
char * __cdecl strrchr( const char * string, int c );
|
||||||
|
|
||||||
|
/*
|
||||||
#if _MSC_VER < 1400
|
#if _MSC_VER < 1400
|
||||||
extern "C" void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount );
|
extern "C" void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount );
|
||||||
extern "C" void memset( Byte *dst, Byte filler, Dword count );
|
extern "C" void memset( Byte *dst, Byte filler, Dword count );
|
||||||
//#pragma intrinsic(memcpy,memset)
|
//#pragma intrinsic(memcpy,memset)
|
||||||
#elif defined AUTOBUILD
|
#elif defined AUTOBUILD
|
||||||
|
*/
|
||||||
void memcpy( void *dst, const void *src, size_t bytesCount );
|
void memcpy( void *dst, const void *src, size_t bytesCount );
|
||||||
void memset( Byte *dst, Byte filler, Dword count );
|
void memset( Byte *dst, Byte filler, Dword count );
|
||||||
|
/*
|
||||||
#else
|
#else
|
||||||
void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount );
|
void * __cdecl memcpy( void *dst, const void *src, size_t bytesCount );
|
||||||
void memset( Byte *dst, Byte filler, Dword count );
|
void memset( Byte *dst, Byte filler, Dword count );
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
void sprintf( char *Str, char* Format, ... );
|
void sprintf( char *Str, char* Format, ... );
|
||||||
//
|
//
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
/* Rocket Forces
|
|
||||||
* Filename: mymath.h
|
|
||||||
* Version 0.1
|
|
||||||
* Copyright (c) Serial 2007
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" int _fltused = 0;
|
|
||||||
|
|
||||||
#define M_PI 3.14159265358979323846
|
|
||||||
|
|
||||||
inline double sin(double x)
|
|
||||||
{
|
|
||||||
__asm fld x
|
|
||||||
__asm fsin
|
|
||||||
}
|
|
||||||
|
|
||||||
inline double cos(double x)
|
|
||||||
{
|
|
||||||
__asm fld x
|
|
||||||
__asm fcos
|
|
||||||
}
|
|
||||||
|
|
||||||
inline double sqrt(double x)
|
|
||||||
{
|
|
||||||
__asm fld x
|
|
||||||
__asm fsqrt
|
|
||||||
}
|
|
||||||
|
|
||||||
inline double acos(double x)
|
|
||||||
{
|
|
||||||
__asm fld x
|
|
||||||
__asm fld st(0)
|
|
||||||
__asm fmul st,st(1)
|
|
||||||
__asm fld1
|
|
||||||
__asm fsubrp st(1),st(0)
|
|
||||||
__asm fsqrt
|
|
||||||
__asm fxch st(1)
|
|
||||||
__asm fpatan
|
|
||||||
}
|
|
||||||
|
|
||||||
inline double atan(double x)
|
|
||||||
{
|
|
||||||
double res = acos(1 / sqrt(1 + x * x));
|
|
||||||
if (x < 0)
|
|
||||||
{
|
|
||||||
res *= -1;
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int round_int(double x)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
static const float round_to_nearest = 0.5f;
|
|
||||||
__asm
|
|
||||||
{
|
|
||||||
fld x
|
|
||||||
fadd st, st(0)
|
|
||||||
fadd round_to_nearest
|
|
||||||
fistp i
|
|
||||||
sar i, 1
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int floor_int(double x)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
static const float round_toward_m_i = -0.5f;
|
|
||||||
__asm
|
|
||||||
{
|
|
||||||
fld x
|
|
||||||
fadd st, st (0)
|
|
||||||
fadd round_toward_m_i
|
|
||||||
fistp i
|
|
||||||
sar i, 1
|
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int ceil_int(double x)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
static const float round_toward_p_i = -0.5f;
|
|
||||||
__asm
|
|
||||||
{
|
|
||||||
fld x
|
|
||||||
fadd st, st (0)
|
|
||||||
fsubr round_toward_p_i
|
|
||||||
fistp i
|
|
||||||
sar i, 1
|
|
||||||
}
|
|
||||||
return (-i);
|
|
||||||
}
|
|
@ -318,6 +318,7 @@ double func_rand(double max)
|
|||||||
return q - max * func_floor(q / max); // äëÿ ìîäóëÿ
|
return q - max * func_floor(q / max); // äëÿ ìîäóëÿ
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
double func_case(double_list *p)
|
double func_case(double_list *p)
|
||||||
{
|
{
|
||||||
if (!p || !p->next)
|
if (!p || !p->next)
|
||||||
@ -368,6 +369,7 @@ double func_case(double_list *p)
|
|||||||
code = cur->code;
|
code = cur->code;
|
||||||
return cur->val;
|
return cur->val;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#define INF_ARGS -1
|
#define INF_ARGS -1
|
||||||
#define STR_ARG -2
|
#define STR_ARG -2
|
||||||
@ -389,7 +391,7 @@ typedef struct
|
|||||||
} func;
|
} func;
|
||||||
|
|
||||||
// the list of functions
|
// the list of functions
|
||||||
const int max_func = 29;
|
const int max_func = 28;
|
||||||
func functions[max_func] =
|
func functions[max_func] =
|
||||||
{
|
{
|
||||||
"", 1, NULL, // íå ïîìíþ, ñ êàêîé öåëüþ
|
"", 1, NULL, // íå ïîìíþ, ñ êàêîé öåëüþ
|
||||||
@ -418,7 +420,7 @@ func functions[max_func] =
|
|||||||
"or",2,&logic_or,
|
"or",2,&logic_or,
|
||||||
"xor",2,&logic_xor,
|
"xor",2,&logic_xor,
|
||||||
"rand",1,&func_rand,
|
"rand",1,&func_rand,
|
||||||
"case",INF_ARGS,&func_case,
|
//"case",INF_ARGS,&func_case,
|
||||||
"pi",0,&func_pi,
|
"pi",0,&func_pi,
|
||||||
"eps",0,&func_eps
|
"eps",0,&func_eps
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user