diff --git a/programs/develop/ktcc/trunk/bin/kos32-tcc b/programs/develop/ktcc/trunk/bin/kos32-tcc new file mode 100755 index 0000000000..99992cac87 Binary files /dev/null and b/programs/develop/ktcc/trunk/bin/kos32-tcc differ diff --git a/programs/develop/ktcc/trunk/source/Makefile.linux32 b/programs/develop/ktcc/trunk/source/Makefile.linux32 new file mode 100644 index 0000000000..2891beaab8 --- /dev/null +++ b/programs/develop/ktcc/trunk/source/Makefile.linux32 @@ -0,0 +1,13 @@ +CC=gcc +NAME=kos32-tcc + +SRC=libtcc.c tcc.c +CFLAGS= -DTCC_TARGET_MEOS_LINUX +LFLAGS= -m32 -static + +all: + $(CC) $(CFLAGS) $(LFLAGS) $(SRC) -o $(NAME) +install: + cp $(NAME) ../bin +clean: + rm -f $(NAME) diff --git a/programs/develop/ktcc/trunk/source/libtcc.c b/programs/develop/ktcc/trunk/source/libtcc.c index e94ab67136..5bcc08ae20 100644 --- a/programs/develop/ktcc/trunk/source/libtcc.c +++ b/programs/develop/ktcc/trunk/source/libtcc.c @@ -140,7 +140,7 @@ BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) } #endif #else // _WIN32 -#ifdef TCC_TARGET_MEOS +#if defined TCC_TARGET_MEOS && ! TCC_TARGET_MEOS_LINUX /* on Kolibri host, we suppose the lib and includes are at the location of 'tcc' /lib, /include */ static void tcc_set_lib_path_kos(TCCState *s) { @@ -1092,7 +1092,7 @@ LIBTCCAPI TCCState *tcc_new(void) #ifdef _WIN32 tcc_set_lib_path_w32(s); #else -#ifdef TCC_TARGET_MEOS +#if defined TCC_TARGET_MEOS && ! TCC_TARGET_MEOS_LINUX tcc_set_lib_path_kos(s); #else tcc_set_lib_path(s, CONFIG_TCCDIR); diff --git a/programs/other/TinyHashView/Makefile b/programs/other/TinyHashView/Makefile new file mode 100755 index 0000000000..e283f19138 --- /dev/null +++ b/programs/other/TinyHashView/Makefile @@ -0,0 +1,18 @@ +KTCC_DIR=../../develop/ktcc/trunk + +NAME=thashview + +KTCC=$(KTCC_DIR)/bin/kos32-tcc +KPACK=kpack + +SRC=thashview.c algorithms/*.c +CFLAGS=-nostdinc -I $(KTCC_DIR)/libc/include +LFLAGS=-nostdlib -L $(KTCC_DIR)/bin/lib $(KTCC_DIR)/bin/lib/start.o +LIBS = -lck + +all: + $(KTCC) $(CFLAGS) $(LFLAGS) $(SRC) $(LIBS) -o $(NAME) + $(KPACK) $(NAME) + +clean: + rm $(NAME) diff --git a/programs/other/TinyHashView/build_kex_kossdk.bat b/programs/other/TinyHashView/build_kex_kossdk.bat deleted file mode 100644 index a80ceeb923..0000000000 --- a/programs/other/TinyHashView/build_kex_kossdk.bat +++ /dev/null @@ -1,9 +0,0 @@ -kos32-gcc -c -fomit-frame-pointer -ID:\KOSSDK\newlib/libc/include algorithms\md5.c -o algorithms\md5.o -Wall -Wextra -kos32-gcc -c -fomit-frame-pointer -ID:\KOSSDK\newlib/libc/include algorithms\sha1.c -o algorithms\sha1.o -Wall -Wextra -kos32-gcc -c -fomit-frame-pointer -ID:\KOSSDK\newlib/libc/include algorithms\sha256.c -o algorithms\sha256.o -Wall -Wextra -kos32-gcc -c -fomit-frame-pointer -ID:\KOSSDK\newlib/libc/include thashview.c -o thashview.o -Wall -Wextra - -kos32-ld thashview.o algorithms\md5.o algorithms\sha1.o algorithms\sha256.o -o thashview -call_shared -nostdlib --subsystem native -T D:\KOSSDK\newlib/app-dynamic.lds --image-base 0 -L "D:\KOSSDK\kos32-msys-5.4.0\win32\lib" -lgcc -lapp -lc.dll -kos32-objcopy thashview -O binary -@pause - diff --git a/programs/other/TinyHashView/installer/ASSOC.INI b/programs/other/TinyHashView/installer/ASSOC.INI deleted file mode 100644 index 3116bdcf2e..0000000000 --- a/programs/other/TinyHashView/installer/ASSOC.INI +++ /dev/null @@ -1,196 +0,0 @@ -[THashView] -exec=/sys/thashview -icon=124 -next=$Quark - -[Quark] -exec=/sys/QUARK -icon=85 -next=$TinyPad - -[TinyPad] -exec=/sys/tinypad -icon=9 -next=$TextEditor - -[TextEditor] -exec=/sys/develop/t_edit -icon=58 -next=$WebView - -[Run] -exec=/sys/run -icon=55 - -[FB2Read] -exec=/sys/fb2read -icon=44 - -[WebView] -exec=/sys/network/webview -icon=31 -next=$TinyPad - -[zSea] -exec=/kolibrios/media/zsea/zsea -icon=46 -next=$KIV - -[KIV] -exec=/sys/media/kiv -icon=70 -next=$Animage - -[Animage] -exec=/sys/media/animage -icon=15 - -[Pixie] -exec=/sys/media/pixie -icon=65 -next=$AC97snd - -[DosBox] -exec=/kolibrios/emul/dosbox/dosbox -icon=11 - -[FPlay] -exec=/kolibrios/media/fplay_run -icon=40 - -[AC97snd] -exec=/sys/media/ac97snd -icon=64 - -[HexEditor] -exec=/sys/develop/heed -icon=22 - -[KPack] -exec=/sys/kpack -icon=99 - -[Unz] -exec=/sys/unz -icon=89 - -[IconEdit] -exec=/sys/media/iconedit -icon=98 - -[Assoc] -/=/sys/file managers/eolite - -kf=/sys/KF_VIEW - -txt=$Quark -log=$Quark -c=$Quark -h=$Quark -cpp=$Quark - -asm=$TinyPad -inc=$TinyPad -mac=$TinyPad -inf=$TinyPad -conf=$TinyPad - -ini=$TextEditor - -fb2=$FB2Read - -htm=$WebView -html=$WebView -mht=$WebView -docx=$WebView -url=$WebView - -avi=$FPlay -mkv=$FPlay -wmv=$FPlay -vob=$FPlay -flv=$FPlay -mp4=$FPlay -mpg=$FPlay -mpeg=$FPlay -mov=$FPlay -webm=$FPlay -3gp=$FPlay -divx=$FPlay - -png=$KIV -jpg=$KIV -jpeg=$KIV -bmp=$KIV - -gif=$KIV -ico=$KIV -cur=$KIV -pcx=$KIV -pbm=$KIV -pgm=$KIV -pnm=$KIV -tga=$KIV -tif=$KIV -tiff=$KIV -wbmp=$KIV -xbm=$KIV -xcf=$KIV -z80=$KIV - -mp3=$Pixie -wav=$Pixie -xm=$Pixie -m3u=$AC97snd - -lap=/sys/media/listplay -asf=/sys/media/listplay - -mid=/sys/media/midamp -midi=/sys/media/midamp - -rtf=/sys/rtfread - -csv=/sys/table - -grf=/sys/graph - -com=$DosBox -;bat=$DosBox -;exe=$DosBox - -obj=/sys/develop/cObj - -raw=$HeEd - -shell=/sys/shell -sh=/sys/shell - -3ds=/sys/3d/view3ds -asc=/sys/3d/view3ds - -skn=/sys/skincfg -dtp=/sys/skincfg -lif=/kolibrios/demos/life2 -kla=/sys/games/klavisha -pdf=/kolibrios/media/updf - -smc=/kolibrios/emul/zsnes -mcr=/kolibrios/emul/psx4all -nes=/kolibrios/emul/fceu/fceu -sna=/kolibrios/emul/e80/e80 -gb=/kolibrios/emul/gameboy -gbc=/kolibrios/emul/gameboy -min=/kolibrios/emul/pokemini -nc=/kolibrios/utils/cnc_editor/cnc_editor - -zip=$Unz -7z=$Unz - -img=/sys/unimg - -bas=/kolibrios/develop/TinyBasic/TinyBasic - -vox=/kolibrios/3D/voxel_editor/VOXEL_EDITOR - -mgb=/sys/mgb diff --git a/programs/other/TinyHashView/installer/SETUP.SH b/programs/other/TinyHashView/installer/SETUP.SH deleted file mode 100644 index 51280a91fd..0000000000 --- a/programs/other/TinyHashView/installer/SETUP.SH +++ /dev/null @@ -1,6 +0,0 @@ -#SHS -echo Starting installation ... -cp thashview /rd/1/thashview -cp icons32.png /rd/1/icons32.png -cp ASSOC.INI /rd/1/Settings/ASSOC.ini -echo Completed! diff --git a/programs/other/TinyHashView/installer/icons32.png b/programs/other/TinyHashView/installer/icons32.png deleted file mode 100644 index ecbcac1323..0000000000 Binary files a/programs/other/TinyHashView/installer/icons32.png and /dev/null differ diff --git a/programs/other/TinyHashView/makefile b/programs/other/TinyHashView/makefile deleted file mode 100755 index ff1198667d..0000000000 --- a/programs/other/TinyHashView/makefile +++ /dev/null @@ -1,13 +0,0 @@ -all: - kos32-gcc -c -fomit-frame-pointer -I/usr/local/kos32/sdk/sources/newlib/libc/include ./algorithms/md5.c -o ./algorithms/md5.o -Wall -Wextra - kos32-gcc -c -fomit-frame-pointer -I/usr/local/kos32/sdk/sources/newlib/libc/include ./algorithms/sha1.c -o ./algorithms/sha1.o -Wall -Wextra - kos32-gcc -c -fomit-frame-pointer -I/usr/local/kos32/sdk/sources/newlib/libc/include ./algorithms/sha256.c -o ./algorithms/sha256.o -Wall -Wextra - kos32-gcc -c -fomit-frame-pointer -I/usr/local/kos32/sdk/sources/newlib/libc/include thashview.c -o thashview.o -Wall -Wextra - kos32-ld -call_shared -nostdlib --subsystem native --image-base 0 -T /usr/local/kos32/sdk/sources/newlib/app-dynamic.lds -Map=thashview.map -L /usr/local/kos32/lib/ -L /usr/local/kos32/sdk/lib/ -o thashview ./algorithms/md5.o ./algorithms/sha1.o ./algorithms/sha256.o thashview.o -lgcc -lc.dll - kos32-strip thashview -o thashview - kos32-objcopy thashview -O binary -clean: - rm -f *.o - rm -f algorithms/*.o - - diff --git a/programs/other/TinyHashView/thashview.c b/programs/other/TinyHashView/thashview.c index f26c17c0ff..09ba1421cc 100644 --- a/programs/other/TinyHashView/thashview.c +++ b/programs/other/TinyHashView/thashview.c @@ -13,7 +13,7 @@ #define FALSE 0; #define MAX_HASH_LEN 65 // Максимальная длина строки #define WINDOW_W 665 -#define VERSION "%s - thashview 2.2" +#define VERSION "%s - thashview 2.3" typedef unsigned char bool; struct kolibri_system_colors sys_color_table; @@ -169,7 +169,7 @@ void redraw_window() // pos_t win_pos = get_mouse_pos(0); //Получаем позицию курсора мыши. sprintf(title,VERSION, filename); // Устанавливаем заголовок окна begin_draw(); //Начинаем рисование интерфейса ) - sys_create_window(win_pos.x, win_pos.y, WINDOW_W, 150, title, GREY, 0x14); // Создаём окно. + sys_create_window(win_pos.x, win_pos.y, WINDOW_W, 150, title, sys_color_table.work_area, 0x14); // Создаём окно. draw_bar(10, 121, 525,20, WHITE); // Создаём прямоугольник для поля ввода draw_text_sys(edit_box_buff,15, 125, 0, 0x90000000| edit_box_text_color); // Выводим текст из буффера ввода @@ -206,17 +206,21 @@ void redraw_window() // void paste_to_edit_buffer() // Вставить из буффера обмена { - char *temp_buff; - temp_buff=kol_clip_get(kol_clip_num()-1); - memset(edit_box_buff,0,MAX_HASH_LEN); - if(((int)*(temp_buff)>0) && ((int)*(temp_buff+4)==0) && ((int)*(temp_buff+8)==1)) + char *temp_buff=NULL; + if(kol_clip_num()>0) { - strncpy(edit_box_buff,temp_buff+12, MAX_HASH_LEN-1); - str_pos=strlen(edit_box_buff); - notify_show("'Pasted from clipboard!' -I"); - edit_box_text_color=BLACK; + temp_buff=kol_clip_get(kol_clip_num()-1); + memset(edit_box_buff,0,MAX_HASH_LEN); + if(((int)*(temp_buff)>0) && ((int)*(temp_buff+4)==0) && ((int)*(temp_buff+8)==1)) + { + strncpy(edit_box_buff,temp_buff+12, MAX_HASH_LEN-1); + str_pos=strlen(edit_box_buff); + notify_show("'Pasted from clipboard!' -I"); + edit_box_text_color=BLACK; + user_free(temp_buff); + + } } - user_free(temp_buff); } @@ -296,8 +300,7 @@ bool hash_compare() // void edit_box(oskey_t key) //Функция реализующая строку ввода { - edit_box_text_color=BLACK; - + edit_box_text_color=sys_color_table.frame_area; if(key.code==CTRL_V) // Если нажато Ctrl+V то вставить из буфера обмена { paste_to_edit_buffer();