Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7516 → Rev 7517

/programs/other/table/calc.cpp
353,28 → 353,6
calculate_values();
}
 
const char *csv_name = ".csv";
 
int str_is_csv(char *str)
{
int i, j = 0;
 
for (i = 0; i < strlen(str); i++)
{
if (str[i] == csv_name[j])
{
j++;
if (j == strlen(csv_name))
return 1;
}
else
{
j = 0;
}
}
return 0;
}
 
int Kos_FileWrite(kosFileInfo &fileInfo, char *line, int mode = 3) // åñëè mode = 2 - ïåðåçàïèñàòü ôàéë
{
int res = 0;
441,7 → 419,7
}
buffer[buf_len++] = '\"';
}
buffer[buf_len++] = ';';
buffer[buf_len++] = ',';
}
rtlDebugOutString(buffer);
// î÷åðåäíàÿ ñòðîêà òåïåðü â áóôåðå
450,8 → 428,16
return 0;
}
return 1;
}
 
int str_is_csv(char *str)
{
int str_len = strlen(str);
if (str_len >= 5) {
if ( strnicmp(str + str_len - 4, ".CSV", 4) == 0) return 1;
}
return 0;
}
 
#define BUF_FOR_ALL 5000
int SaveFile(char *fname)
/programs/other/table/func.cpp
40,6 → 40,29
return res;
}
 
int toupper(int c)
{
if ( (c >= 97) && (c <= 122) ) return c-32 ;
if ( (c >= 160) && (c <= 175) ) return c-32 ;
if ( (c >= 224) && (c <= 239) ) return c-80 ;
if ( (c == 241) || (c == 243) || (c == 245) || (c == 247) ) return c-1;
return c;
}
 
int strnicmp(const char* string1, const char* string2, unsigned count)
{
int pc = 0;
while (1)
{
if (toupper(*string1)<toupper(*string2)) return -1;
if (toupper(*string1)>toupper(*string2)) return 1;
if (*string1=='\0' || pc == count) return 0;
string1++;
string2++;
pc++;
}
}
 
/*int abs(int n)
{
return (n<0)?-n:n;
/programs/other/table/func.h
54,6 → 54,8
void kos_DrawRegion(Word x, Word y,Word width, Word height, Dword color1, Word invert);
void kos_DrawCutTextSmall(Word x, Word y, int areaWidth, Dword textColour, char *textPtr);
int atoi(const char* string);
int toupper(int c);
int strnicmp(const char* string1, const char* string2, unsigned count);
void kos_GetScrollInfo(int &vert, int &hor);
 
 
/programs/other/table/hello.cpp
11,7 → 11,7
#endif
char params[1024];
 
#define TABLE_VERSION "0.99.1"
#define TABLE_VERSION "0.99.1a"
 
// strings
const char *sFileSign = "KolibriTable File\n";