Eolite: increase paste thread stack size
Textreader: fix images gui.h: add WriteTextLines() function git-svn-id: svn://kolibrios.org@5962 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
eec4f0d59c
commit
b340790ba4
@ -6,7 +6,7 @@ cls
|
||||
c-- Eolite.c
|
||||
rem @kpack Eolite.com
|
||||
@rename Eolite.com Eolite
|
||||
kpack eolite
|
||||
|
||||
@del warning.txt
|
||||
@del lang.h--
|
||||
@pause
|
@ -46,8 +46,8 @@ void Copy(dword pcth, char cut)
|
||||
|
||||
|
||||
void Paste() {
|
||||
copy_stak = malloc(20000);
|
||||
CreateThread(#PasteThread,copy_stak+20000-4);
|
||||
copy_stak = malloc(64000);
|
||||
CreateThread(#PasteThread,copy_stak+64000-4);
|
||||
}
|
||||
|
||||
void PasteThread()
|
||||
|
@ -10,9 +10,10 @@ void DirFileCount(dword way)
|
||||
cur_file = malloc(4096);
|
||||
// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
|
||||
GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
|
||||
filename = dirbuf+72;
|
||||
for (i=0; i<fcount; i++)
|
||||
{
|
||||
filename = i*304+dirbuf+72;
|
||||
filename += 304;
|
||||
sprintf(cur_file,"%s/%s",way,filename);
|
||||
|
||||
if (TestBit(ESDWORD[filename-40], 4) )
|
||||
|
@ -7,9 +7,7 @@
|
||||
?define PR_T_NAME "ˆ¬ï:"
|
||||
?define PR_T_DEST "<EFBFBD> ᯮ«®¦¥¨¥:"
|
||||
?define PR_T_SIZE "<EFBFBD> §¬¥à:"
|
||||
?define SET_3 "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:"
|
||||
?define SET_4 "<EFBFBD><EFBFBD>謔:"
|
||||
?define SET_5 "<EFBFBD>Кキキ:"
|
||||
?define CREATED_OPENED_MODIFIED "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n<EFBFBD><EFBFBD>謔:\n<EFBFBD>Кキキ:"
|
||||
?define SET_6 "” ©«®¢: "
|
||||
?define SET_7 " <20> ¯®ª: "
|
||||
?define PR_T_CONTAINS "‘®¤¥à¦¨â: "
|
||||
@ -27,9 +25,7 @@
|
||||
?define PR_T_NAME "Name:"
|
||||
?define PR_T_DEST "Destination:"
|
||||
?define PR_T_SIZE "Size:"
|
||||
?define SET_3 "Created:"
|
||||
?define SET_4 "Opened:"
|
||||
?define SET_5 "Modified:"
|
||||
?define CREATED_OPENED_MODIFIED "Created:\nOpened:\nModified:"
|
||||
?define SET_6 "Files: "
|
||||
?define SET_7 " Folders: "
|
||||
?define PR_T_CONTAINS "Contains: "
|
||||
@ -359,9 +355,7 @@ void DrawPropertiesWindow()
|
||||
WriteText(100, 80, 0x80, 0x000000, #folder_info);
|
||||
element_size = size_dir;
|
||||
}
|
||||
WriteText(10, 95, 0x80, 0x000000, SET_3);
|
||||
WriteText(10, 110, 0x80, 0x000000, SET_4);
|
||||
WriteText(10, 125, 0x80, 0x000000, SET_5);
|
||||
WriteTextLines(10, 95, 0x80, 0x000000, CREATED_OPENED_MODIFIED, 15);
|
||||
DrawDate(100, 95, 0, #file_info_general.datecreate);
|
||||
DrawDate(100, 110, 0, #file_info_general.datelastaccess);
|
||||
DrawDate(100, 125, 0, #file_info_general.datelastedit);
|
||||
|
@ -189,4 +189,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
:void WriteTextLines(dword x,y,byte fontType, dword color, text_pointer, line_h)
|
||||
{
|
||||
dword next_word_pointer = strchr(text_pointer, '\n');
|
||||
if (next_word_pointer) WriteTextLines(dword x, y+line_h, byte fontType, dword color, next_word_pointer+2, line_h);
|
||||
ESBYTE[next_word_pointer] = NULL;
|
||||
WriteText(dword x, y, byte fontType, dword color, text_pointer);
|
||||
ESBYTE[next_word_pointer] = '\n';
|
||||
}
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#define MEMSIZE 4096*20
|
||||
#define MEMSIZE 4096*25
|
||||
|
||||
#include "../lib/font.h"
|
||||
#include "../lib/io.h"
|
||||
@ -25,6 +25,18 @@
|
||||
#define DEFAULT_EDITOR "/sys/tinypad"
|
||||
|
||||
#define INTRO_TEXT "This is a plain text reader.\nTry to open some text file."
|
||||
#define VERSION "Text Reader v1.02"
|
||||
#define ABOUT "Idea: Leency, punk_joker
|
||||
Code: Leency, Veliant, KolibriOS Team
|
||||
|
||||
Hotkeys:
|
||||
Ctrl+O - open file
|
||||
Ctrl+Up - bigger font
|
||||
Ctrl+Down - smaller font
|
||||
Ctrl+Tab - select charset
|
||||
Ctrl+E - edit current document
|
||||
|
||||
Press any key..."
|
||||
|
||||
char default_dir[] = "/rd/1";
|
||||
od_filter filter2 = {0,0};
|
||||
@ -42,7 +54,7 @@ dword line_offset;
|
||||
#define DWORD 4;
|
||||
|
||||
enum {
|
||||
OPEN_FILE = 10,
|
||||
OPEN_FILE,
|
||||
MAGNIFY_MINUS,
|
||||
MAGNIFY_PLUS,
|
||||
CHANGE_ENCODING,
|
||||
@ -380,28 +392,9 @@ void OpenFile(dword f_path)
|
||||
list.ClearList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *about[] = {
|
||||
"Text Reader v1.01",
|
||||
"Idea: Leency, punk_joker",
|
||||
"Code: Leency, Veliant, KolibriOS Team",
|
||||
" ",
|
||||
"Hotkeys:",
|
||||
"Ctrl+O - open file",
|
||||
"Ctrl+Up - bigger font",
|
||||
"Ctrl+Down - smaller font",
|
||||
"Ctrl+Tab - select charset",
|
||||
"Ctrl+E - edit current document",
|
||||
" ",
|
||||
"Press any key...",
|
||||
0
|
||||
};
|
||||
|
||||
ShowAbout() {
|
||||
int i;
|
||||
help_opened = true;
|
||||
DrawBar(list.x, list.y, list.w, list.h, 0xFFFfff);
|
||||
WriteText(list.x + 10, list.y + 10, 10000001b, 0x555555, about[0]);
|
||||
for (i=1; about[i]; i++) WriteText(list.x + 10, i+1*20 + list.y, 10110000b, 0, about[i]);
|
||||
WriteText(list.x + 10, list.y + 10, 10000001b, 0x555555, VERSION);
|
||||
WriteTextLines(list.x + 10, list.y+40, 10110000b, 0, ABOUT, 20);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user