Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 7515 → Rev 7516

/data/common/File Managers/fNav/fnav.set
/data/common/File Managers/icons.ini
165,6 → 165,7
java=27
pas=27
fb2=29
csv=21
 
[icons32]
<dir>=45
219,3 → 220,4
rft=85
mobi=85
djvu=85
csv=28
/data/common/File Managers/kfar.ini
60,6 → 60,7
min=/kolibrios/emul/pokemini
nc=/kolibrios/utils/cnc_editor/cnc_editor
kf=/sys/KF_VIEW
csv=/sys/table
 
[Menu]
AsmMenu1=&Edit,/sys/TinyPad
/data/common/File Managers/kfm.ini
179,9 → 179,10
rtf /sys/rtfread
3ds /sys/3d/view3ds
asc /sys/3d/view3ds
lif /kolibrios/demos/life2
skn /sys/skincfg
kf /sys/KF_VIEW
csv /sys/table
lif /kolibrios/demos/life2
pdf /kolibrios/media/updf
avi /kolibrios/media/fplay_run
mpg /kolibrios/media/fplay_run
/data/common/settings/assoc.ini
139,6 → 139,8
 
rtf=/sys/rtfread
 
csv=/sys/table
 
grf=/sys/graph
 
com=$DosBox
176,4 → 178,3
 
vox=/kolibrios/3D/voxel_editor/VOXEL_EDITOR
 
 
/programs/cmm/txtread/txtread.c
126,6 → 126,7
{
InitDlls();
OpenDialog_init stdcall (#o_dialog);
if (param) strcpy(#openfile_path, #param);
LoadIniSettings();
EventSetColorScheme(curcol_scheme);
kfont.init(DEFAULT_FONT);
/programs/games/rforces/trunk/cmp.bat
4,4 → 4,5
@link /nologo /manifest:no /entry:crtStartUp /subsystem:native /base:0 /fixed /align:16 /nodefaultlib rforces.obj kosFile.obj kosSyst.obj mcsmemm.obj
@pe2kos rforces.exe rforces
@del rforces.exe
@del *.obj
pause
/programs/other/graph/kolibri.cpp
File deleted
/programs/other/graph/hello.cpp
1,6 → 1,5
#include "func.h"
#include "parser.h"
#include "kolibri.h"
#include "use_library.h"
 
const char header[] = "Graph";
/programs/other/graph/hello.dsp
76,10 → 76,6
# End Source File
# Begin Source File
 
SOURCE=.\kolibri.cpp
# End Source File
# Begin Source File
 
SOURCE=.\KosFile.cpp
# End Source File
# Begin Source File
112,10 → 108,6
# End Source File
# Begin Source File
 
SOURCE=.\kolibri.h
# End Source File
# Begin Source File
 
SOURCE=.\KosFile.h
# End Source File
# Begin Source File
/programs/other/table/build.bat
2,8 → 2,8
 
@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
@del *.kex
@pe2kos hello.exe hello.kex
@del table
@pe2kos hello.exe table
@del hello.exe
@del *.obj
pause
/programs/other/table/calc.cpp
588,6 → 588,31
return r;
}
 
char GetCsvSeparator(char *fname)
{
char buffer[512];
kosFileInfo fileInfo;
 
rtlDebugOutString("hi");
rtlDebugOutString(fname);
 
strcpy(fileInfo.fileURL, fname);
fileInfo.OffsetLow = 0;
fileInfo.OffsetHigh = 0;
fileInfo.dataCount = 512;
fileInfo.rwMode = 0;
fileInfo.bufferPtr = (Byte *)buffer;
if (kos_FileSystemAccess(&fileInfo) == 0) {
int separ_coma = chrnum(buffer, ',');
int separ_semicolon = chrnum(buffer, ';');
//kos_DebugValue(",", separ_coma);
//kos_DebugValue(";", separ_semicolon);
if (separ_semicolon>separ_coma) return ';';
}
return ',';
}
 
int LoadCSV(char *fname)
{
// clear the table
598,6 → 623,8
fileInfo.OffsetLow = 0;
fileInfo.OffsetHigh = 0;
 
char separator = GetCsvSeparator(fileInfo.fileURL);
 
char *line;
 
int col = 1, row = 1;
626,7 → 653,7
{
char c = line[i];
if (!c)
c = ';';
c = separator;
int yes_semicolon = 0;
 
switch (inPar)
638,7 → 665,7
}
else
{
if (c == ';')
if (c == separator)
yes_semicolon = 1;
}
break;
652,7 → 679,7
}
/*else
{
if (c == ';')
if (c == separator)
yes_semicolon = 1;
 
}*/
660,7 → 687,7
}
if (yes_semicolon)
{
// èòàê, line[i] = ';'
// èòàê, line[i] = separator
int tmp = line[start] == '"' ? 1 : 0;
int sz = i - start - tmp * 2;
if (sz > 0)
/programs/other/table/hello.cpp
6,8 → 6,13
#include "calc.h"
#include "use_library.h"
 
#define TABLE_VERSION "0.99"
#ifdef AUTOBUILD
extern char params[1024];
#endif
char params[1024];
 
#define TABLE_VERSION "0.99.1"
 
// strings
const char *sFileSign = "KolibriTable File\n";
const char sFilename[] = "Filename:";
1043,6 → 1048,22
}
}
 
void EventLoadFile()
{
stop_edit();
int r = LoadFile(fname);
char *result;
if (r > 0) {
calculate_values();
sel_moved = 0;
draw_grid();
result = (char*)msg_load;
}
else if (r == -1) result = (char*)er_file_not_found;
else if (r == -2) result = (char*)er_format;
kos_AppRun("/sys/@notify", result);
}
 
void process_button()
{
Dword button;
1063,18 → 1084,7
break;
 
case LOAD_BUTTON:
stop_edit();
int r = LoadFile(fname);
char *result;
if (r > 0) {
calculate_values();
sel_moved = 0;
draw_grid();
result = (char*)msg_load;
}
else if (r == -1) result = (char*)er_file_not_found;
else if (r == -2) result = (char*)er_format;
kos_AppRun("/sys/@notify", result);
EventLoadFile();
break;
}
if (button >= COL_HEAD_BUTTON && button < ROW_HEAD_BUTTON)
1102,6 → 1112,11
kos_InitHeap();
load_edit_box();
init();
if (params[0]) {
strcpy(fname, params);
file_box.size = file_box.pos = strlen(fname);
EventLoadFile();
}
kos_SetMaskForEvents(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER);
for (;;)
{
/programs/other/table/kosSyst.cpp
9,6 → 9,7
#ifdef AUTOBUILD
char kosExePath[1024];
char exeStack[16384];
extern char params[1024];
// must be alphabetically first in the image
#pragma data_seg(".1seg")
extern "C" struct
28,7 → 29,7
0, // filled by doexe2.asm
0, // filled by doexe2.asm
exeStack + sizeof(exeStack),
NULL,
params,
kosExePath
};
#pragma data_seg()
/programs/other/table/parser.cpp
928,3 → 928,15
return 0; // search command/function name
}
 
unsigned int chrnum(char* text, char symbol)
{
int num = 0;
int i = 0;
while(text[i])
{
if (text[i] == symbol) num++;
i++;
}
return num;
}
 
/programs/other/table/parser.h
57,6 → 57,8
bool strcmp(char *s1, char *s2);
bool strncmp(char *s1, char *s2, int n);
 
unsigned int chrnum(char* text, char symbol);
 
extern double epsilon;