Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 7994 → Rev 7993

/programs/system/notify3/build.bat
File deleted
\ No newline at end of file
/programs/develop/backy/Backy_ru
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/programs/develop/backy/Backy_lang.h
File deleted
/programs/develop/backy/Backy_lib.h
File deleted
/programs/develop/backy/Backy_ru.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/programs/develop/backy/Backy
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/develop/backy/Backy.c
1,22 → 1,21
 
/*
* Author: JohnXenox aka Aleksandr Igorevich.
*
* Programme name: Backy
* Description: The programme for backing up a file.
*
* Backy.c
* Author: JohnXenox aka Aleksandr Igorevich.
*
* Works from command line, only!
*/
 
#define CREATION_DATE "2020.05.27"
#define CREATION_DATE "2020.05.17"
 
#include <conio.h>
//#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#include "Backy_lang.h"
#include "Backy_lib.h"
#include "Backy-lib.h"
 
int date = 0;
int time = 0;
42,15 → 41,11
 
char flag = 0;
 
char state;
 
 
int main(int argc, char** argv)
{
if (con_init_console_dll()) return 1; // init fail.
 
con_set_title("Backy");
 
// ============================================================ //
// preprocessing arguments from the command line. ============= //
//
65,7 → 60,7
 
 
// ============================================================ //
// process the command line arguments. ======================== //
// preprocess the command line arguments. ===================== //
 
if (argc > 1)
{
93,7 → 88,7
}
}
 
// if input path is found, then copy it into the array "path_in".
// if inut path is found, then copy it into the array "path_in".
if (*argv[i] == '/')
{
flag = 2;
151,47 → 146,29
}
else
{
con_set_title("Useful info!");
//con_init_console_dll_param(-1, 23, -1, 23, "Backy");
if (con_init_console_dll()) return 1; // init fail
 
#if defined (lang_en)
printf("Useful info!");
 
con_printf("\n Name: Backy");
con_printf("\n Date: %s", CREATION_DATE);
con_printf("\n Description: The programme for backing up a file.\n");
printf("\n Name: Backy");
printf("\n Date: %s", CREATION_DATE);
printf("\n Description: The programme for backing up a file.\n");
 
con_printf("\n Author: JohnXenox\n");
printf("\n Author: JohnXenox\n");
 
con_printf("\n Usage: backy <path1> <-o path2>\n");
con_printf(" path1 - path to a file to be backuped.\n");
con_printf(" -o path2 - path to the output directory without the name of a file.\n\n");
printf("\n Usage: backy <path1> <-o path2>\n");
printf(" path1 - path to a file to be backuped.\n");
printf(" -o path2 - path to the output directory without the name of a file.\n\n");
 
con_printf(" Examples:\n");
con_printf(" backy test.c\n");
con_printf(" backy test.c -o /tmp0/1/\n");
con_printf(" backy /hd0/1/test.c\n");
con_printf(" backy /hd0/1/test.c -o /tmp0/1/\n");
printf(" Examples:\n");
printf(" backy test.c\n");
printf(" backy test.c -o /tmp0/1/\n");
printf(" backy /hd0/1/test.c\n");
printf(" backy /hd0/1/test.c -o /tmp0/1/\n");
 
#elif defined (lang_ru)
 
con_printf("\n ˆ¬ï: Backy");
con_printf("\n „ â : %s", CREATION_DATE);
con_printf("\n Ž¯¨á ­¨¥: à®£à ¬¬  ¤«ï ᮧ¤ ­¨ï १¥à¢­®© ª®¯¨¨ ä ©« .\n");
 
con_printf("\n €¢â®à: JohnXenox\n");
 
con_printf("\n ˆá¯®«ì§®¢ ­¨¥: backy <path1> <-o path2>\n");
con_printf(" path1 - ¯ãâì ª ä ©«ã, ª®â®àë© ­ ¤® ᪮¯¨à®¢ âì.\n");
con_printf(" -o path2 - ¯ãâì ª ¤¨à¥ªâ®à¨¨, ¢ ª®â®àãî ¡ã¤¥â ᪮¯¨à®¢ ­  १¥à¢­ ï ª®¯¨ï ä ©« .\n\n");
 
con_printf(" à¨¬¥àë:\n");
con_printf(" backy test.c\n");
con_printf(" backy test.c -o /tmp0/1/\n");
con_printf(" backy /hd0/1/test.c\n");
con_printf(" backy /hd0/1/test.c -o /tmp0/1/\n");
 
#endif
 
return 0;
exit(0);
return 1;
}
 
//printf("Path_in: %s\n", path_in);
316,28 → 293,29
// ============================================================ //
// adding the name of the input file to the output path. ====== //
 
// searching the end of the path string.
int i = 0;
int y = 0;
 
// searching for a zero terminator in the input path.
// searching for zero terminator in the input path.
while (path_in[i] != 0)
{
i++;
}
 
// searching for a slash in the input path.
// searching for slash in the input path.
while (path_in[i] != '/')
{
i--;
}
 
// searching for a zero terminator in the output path.
// searching for zero terminator in the output path.
while (path_out[y] != 0)
{
y++;
}
 
// searching for a slash in the output path.
// searching for slash in the output path.
if (path_out[y - 1] == '/')
{
y--;
351,7 → 329,7
 
i = 0;
 
// searching for a zero terminator in the output path.
// searching for zero terminator in the output path.
while (path_out[i] != 0)
{
i++;
365,7 → 343,7
 
i += strlen(full_date);
 
// adding the extension to a path.
// adding the extension to path.
strncpy(&path_out[i], ext, 4);
 
//printf("Path_in: %s\n", path_in);
373,21 → 351,9
 
data = openFile(&length, path_in);
 
if(data == 0)
{
#if defined (lang_en)
saveFile(length, data, 0, path_out);
 
con_printf("\nThe file isn't found!\n");
 
#elif defined (lang_ru)
 
con_printf("\n” ©« ­¥ ­ ©¤¥­!\n");
 
#endif
 
return 13;
return 0;
}
 
return checkStateOnSave(saveFile(length, data, 0, path_out));
}
 
/programs/develop/backy/Backy.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/programs/develop/backy/History.txt
1,13 → 1,9
History:
 
Backy 2020.05.27
Added warnings about errors.
Added translation on Russian language.
 
Backy 2020.05.17
Code optimization.
 
Backy 2020.05.07
Backy 2020.05.05
Changed an output file name.
 
Backy 2020.04.27
/programs/develop/backy/Readme-en.txt
1,4 → 1,4
Backy (release date 2020.05.27)
Backy (release date 2020.05.17)
 
Backy is a programme for backing up a file.
 
/programs/develop/backy/Readme-ru.txt
1,4 → 1,4
Backy (дата выпуска 2020.05.27)
Backy (дата выпуска 2020.05.17)
 
Backy - это программа для создания резервной копии файла.
 
/data/Tupfile.lua
27,6 → 27,7
{"UNIMG", PROGS .. "/fs/unimg/unimg"},
{"VMODE", "common/vmode"},
{"3D/HOUSE.3DS", "common/3d/house.3ds"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy"},
{"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"},
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
73,7 → 74,6
-- For russian build, add russian-only files.
if build_type == "rus" then tup.append_table(img_files, {
{"EXAMPLE.ASM", PROGS .. "/develop/examples/example/trunk/rus/example.asm"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy_ru"},
{"GAMES/BASEKURS.KLA", build_type .. "/games/basekurs.kla"},
{"GAMES/PADENIE", build_type .. "/games/padenie"},
{"File Managers/KFAR.INI", build_type .. "/File Managers/kfar.ini"},
84,7 → 84,6
{"SETTINGS/SYSPANEL.INI", "rus/settings/syspanel.ini"},
}) elseif build_type == "eng" then tup.append_table(img_files, {
{"EXAMPLE.ASM", PROGS .. "/develop/examples/example/trunk/example.asm"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"File Managers/KFM_KEYS.TXT", PROGS .. "/fs/kfm/trunk/docs/english/kfm_keys.txt"},
{"SETTINGS/.shell", PROGS .. "/system/shell/bin/eng/.shell"},
93,7 → 92,6
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) elseif build_type == "sp" then tup.append_table(img_files, {
{"EXAMPLE.ASM", PROGS .. "/develop/examples/example/trunk/example.asm"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"File Managers/KFM_KEYS.TXT", PROGS .. "/fs/kfm/trunk/docs/english/kfm_keys.txt"},
{"SETTINGS/.shell", PROGS .. "/system/shell/bin/eng/.shell"},
102,7 → 100,6
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) elseif build_type == "it" then tup.append_table(img_files, {
{"EXAMPLE.ASM", PROGS .. "/develop/examples/example/trunk/example.asm"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"File Managers/KFM_KEYS.TXT", PROGS .. "/fs/kfm/trunk/docs/english/kfm_keys.txt"},
{"SETTINGS/.shell", PROGS .. "/system/shell/bin/eng/.shell"},
111,7 → 108,6
{"SETTINGS/SYSPANEL.INI", "common/settings/syspanel.ini"},
}) else tup.append_table(img_files, {
{"EXAMPLE.ASM", PROGS .. "/develop/examples/example/trunk/example.asm"},
{"DEVELOP/BACKY", PROGS .. "/develop/backy/Backy"},
{"File Managers/KFM_KEYS.TXT", PROGS .. "/fs/kfm/trunk/docs/english/kfm_keys.txt"},
{"File Managers/KFAR.INI", "common/File Managers/kfar.ini"},
{"SETTINGS/.shell", PROGS .. "/system/shell/bin/eng/.shell"},