diff --git a/main.cpp b/main.cpp index d312c5e3..7a09a0a5 100644 --- a/main.cpp +++ b/main.cpp @@ -6,6 +6,7 @@ #include "piethernet.h" #include "piintrospection.h" #include "pifile.h" +#include "piprocess.h" //struct MS { // //MS() {i = 0; f = 0.;} @@ -30,13 +31,31 @@ public: T dot(VC a) {T res = T(); for (uint i=0; i x(1.5), y(3.3); + //PIProcess proc; + PIProcess::execIndependent("D:/orders/libs_build_win/pip/utils/system_daemon/pisd.exe", PIStringList() << "-d" << "-n" << "peer"); + piMSleep(1000); + //proc.terminate(); + /*PIByteArray v = PIString("Mandfg;kjngel").toByteArray(); + PIByteArray b64 = convertToBase64(v); + piCout << PIString(v); + piCout << PIString(v.toBase64()); + piCout << PIString(b64); + piCout << PIString(PIByteArray::fromBase64(v.toBase64())); + piCout << PIString(convertFromBase64(b64));*/ + /*uint v = 0; + v |= (uchar(77) << 8); + piCout << PICoutManipulators::Dec << v; + piCout << PICoutManipulators::Hex << v;*/ + //piCout << PIString(PIByteArray::fromBase64(v.toBase64())); + return 0; + /*VC<30, double> x(1.5), y(3.3); double r = 0.0; PITimeMeasurer tm; for (int i=0; i<10000; i++) r = x.dot(y); - piCout << r << tm.elapsed_m(); + piCout << r << tm.elapsed_m();*/ //PIByteArray ba; /*PIKbdListener kbd; kbd.enableExitCapture(); diff --git a/src/code/picodeinfo.cpp b/src/code/picodeinfo.cpp index ada89b11..0bd3b992 100755 --- a/src/code/picodeinfo.cpp +++ b/src/code/picodeinfo.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives C++ code info structs - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/code/picodeinfo.h b/src/code/picodeinfo.h index 0ee3feac..dee2ccb2 100755 --- a/src/code/picodeinfo.h +++ b/src/code/picodeinfo.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives C++ code info structs - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/code/picodemodule.h b/src/code/picodemodule.h index f4f16171..3b053dbb 100644 --- a/src/code/picodemodule.h +++ b/src/code/picodemodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/code/picodeparser.cpp b/src/code/picodeparser.cpp index ea495394..41fa92c4 100755 --- a/src/code/picodeparser.cpp +++ b/src/code/picodeparser.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives C++ code parser - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/code/picodeparser.h b/src/code/picodeparser.h index 39d0157b..43dc8238 100755 --- a/src/code/picodeparser.h +++ b/src/code/picodeparser.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives C++ code parser - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piconsole.cpp b/src/console/piconsole.cpp index dc696e4a..2052f4d2 100644 --- a/src/console/piconsole.cpp +++ b/src/console/piconsole.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Console output/input - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piconsole.h b/src/console/piconsole.h index 19840e2d..de3df362 100644 --- a/src/console/piconsole.h +++ b/src/console/piconsole.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Console output/input - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piconsolemodule.h b/src/console/piconsolemodule.h index 9d49c61a..49705a6c 100644 --- a/src/console/piconsolemodule.h +++ b/src/console/piconsolemodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/pikbdlistener.cpp b/src/console/pikbdlistener.cpp index 3187b966..09bdbb2c 100644 --- a/src/console/pikbdlistener.cpp +++ b/src/console/pikbdlistener.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Keyboard grabber for console - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/pikbdlistener.h b/src/console/pikbdlistener.h index 51f376ba..c7dde541 100644 --- a/src/console/pikbdlistener.h +++ b/src/console/pikbdlistener.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Keyboard grabber for console - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreen.cpp b/src/console/piscreen.cpp index 1b92d86a..8f595ce6 100644 --- a/src/console/piscreen.cpp +++ b/src/console/piscreen.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Console output/input - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreen.h b/src/console/piscreen.h index 02ac6481..7cb092ae 100644 --- a/src/console/piscreen.h +++ b/src/console/piscreen.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Console output/input - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreendrawer.cpp b/src/console/piscreendrawer.cpp index 607c9d2a..8bcae4ac 100644 --- a/src/console/piscreendrawer.cpp +++ b/src/console/piscreendrawer.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Console output/input - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreendrawer.h b/src/console/piscreendrawer.h index a49a5849..94a710ec 100644 --- a/src/console/piscreendrawer.h +++ b/src/console/piscreendrawer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Drawer for PIScreen - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreentile.cpp b/src/console/piscreentile.cpp index 0070b233..bc103072 100644 --- a/src/console/piscreentile.cpp +++ b/src/console/piscreentile.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Basic PIScreen tile - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreentile.h b/src/console/piscreentile.h index f0b6a7b9..e7c879e6 100644 --- a/src/console/piscreentile.h +++ b/src/console/piscreentile.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Basic PIScreen tile - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreentiles.cpp b/src/console/piscreentiles.cpp index 725b23b7..cb64cefd 100644 --- a/src/console/piscreentiles.cpp +++ b/src/console/piscreentiles.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Various tiles for PIScreen - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreentiles.h b/src/console/piscreentiles.h index f0faeaf2..e13ac73d 100644 --- a/src/console/piscreentiles.h +++ b/src/console/piscreentiles.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Various tiles for PIScreen - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/console/piscreentypes.h b/src/console/piscreentypes.h index 77f6f18b..61884df6 100644 --- a/src/console/piscreentypes.h +++ b/src/console/piscreentypes.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Types for PIScreen - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/picontainers.cpp b/src/containers/picontainers.cpp index 9ba1029f..5566cda9 100755 --- a/src/containers/picontainers.cpp +++ b/src/containers/picontainers.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Generic containers - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/picontainers.h b/src/containers/picontainers.h index 6fe0d8a1..ee122b17 100755 --- a/src/containers/picontainers.h +++ b/src/containers/picontainers.h @@ -7,7 +7,7 @@ /* PIP - Platform Independent Primitives Generic containers - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/picontainersmodule.h b/src/containers/picontainersmodule.h index aa6ef7c6..46201035 100644 --- a/src/containers/picontainersmodule.h +++ b/src/containers/picontainersmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/pideque.h b/src/containers/pideque.h index bc629b17..6c33a184 100755 --- a/src/containers/pideque.h +++ b/src/containers/pideque.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Dynamic array of any type - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/pimap.h b/src/containers/pimap.h index 1b59f049..99c8f394 100644 --- a/src/containers/pimap.h +++ b/src/containers/pimap.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Dynamic array of any type - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/piqueue.h b/src/containers/piqueue.h index 9768a9ca..d345cbb6 100755 --- a/src/containers/piqueue.h +++ b/src/containers/piqueue.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Queue container - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/piset.h b/src/containers/piset.h index e677b279..ddb19120 100644 --- a/src/containers/piset.h +++ b/src/containers/piset.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Set container - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/pistack.h b/src/containers/pistack.h index e10398df..6afa5006 100755 --- a/src/containers/pistack.h +++ b/src/containers/pistack.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Stack container - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/containers/pivector.h b/src/containers/pivector.h index c12916d6..437990f8 100755 --- a/src/containers/pivector.h +++ b/src/containers/pivector.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Dynamic array of any type - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pibase.h b/src/core/pibase.h index 9cc524be..2082cd6b 100644 --- a/src/core/pibase.h +++ b/src/core/pibase.h @@ -7,7 +7,7 @@ /* PIP - Platform Independent Primitives Base types and functions - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pibitarray.h b/src/core/pibitarray.h index 2779b13d..86f540cc 100755 --- a/src/core/pibitarray.h +++ b/src/core/pibitarray.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Bit array - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pibytearray.cpp b/src/core/pibytearray.cpp index b6d39c39..6db2e50d 100755 --- a/src/core/pibytearray.cpp +++ b/src/core/pibytearray.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Byte array - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pibytearray.h b/src/core/pibytearray.h index 096075d5..d6ec7854 100755 --- a/src/core/pibytearray.h +++ b/src/core/pibytearray.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Byte array - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pichar.cpp b/src/core/pichar.cpp index 2fe563df..58c835ec 100644 --- a/src/core/pichar.cpp +++ b/src/core/pichar.cpp @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Unicode char - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pichar.h b/src/core/pichar.h index 1edf23ff..1d74e220 100755 --- a/src/core/pichar.h +++ b/src/core/pichar.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Unicode char - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pichunkstream.h b/src/core/pichunkstream.h index de7b1d6f..72ef16c9 100644 --- a/src/core/pichunkstream.h +++ b/src/core/pichunkstream.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Binary serializator - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picli.cpp b/src/core/picli.cpp index 23685bb1..d89d2f21 100755 --- a/src/core/picli.cpp +++ b/src/core/picli.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Command-Line Parser - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picli.h b/src/core/picli.h index 592dfa3a..fdc4872f 100755 --- a/src/core/picli.h +++ b/src/core/picli.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Command-Line Parser - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picollection.h b/src/core/picollection.h index eb34e34f..d1ea7910 100755 --- a/src/core/picollection.h +++ b/src/core/picollection.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Peer - named I/O ethernet node, forming self-organized peering network - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picoremodule.h b/src/core/picoremodule.h index 9205f8ae..ef0b8baa 100644 --- a/src/core/picoremodule.h +++ b/src/core/picoremodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picout.cpp b/src/core/picout.cpp index 1b89feb1..c047a18b 100644 --- a/src/core/picout.cpp +++ b/src/core/picout.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Universal output to console class - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/picout.h b/src/core/picout.h index 202f6cca..c7b7b563 100644 --- a/src/core/picout.h +++ b/src/core/picout.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Universal output to console class - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piflags.h b/src/core/piflags.h index a8661e6c..0ef33ba8 100644 --- a/src/core/piflags.h +++ b/src/core/piflags.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives General flags class - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piincludes.cpp b/src/core/piincludes.cpp index 6a5af22d..943a0e99 100755 --- a/src/core/piincludes.cpp +++ b/src/core/piincludes.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Global includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piincludes.h b/src/core/piincludes.h index 1eb9f7dc..5144fffe 100755 --- a/src/core/piincludes.h +++ b/src/core/piincludes.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Minimal PIP includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piinit.cpp b/src/core/piinit.cpp index 855903b9..f15485b3 100644 --- a/src/core/piinit.cpp +++ b/src/core/piinit.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Initialization - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piinit.h b/src/core/piinit.h index a8e9786f..b2a9fccf 100644 --- a/src/core/piinit.h +++ b/src/core/piinit.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Initialization - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piobject.cpp b/src/core/piobject.cpp index 6a4f9f7b..3521979f 100755 --- a/src/core/piobject.cpp +++ b/src/core/piobject.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/piobject.h b/src/core/piobject.h index 7407710d..9d6b1425 100755 --- a/src/core/piobject.h +++ b/src/core/piobject.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Object, base class of some PIP classes, provide EVENT -> EVENT_HANDLER mechanism - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pistatemachine.h b/src/core/pistatemachine.h index 86839251..7b1bf96c 100755 --- a/src/core/pistatemachine.h +++ b/src/core/pistatemachine.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives State machine - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pistring.cpp b/src/core/pistring.cpp index d673453b..36a23eee 100755 --- a/src/core/pistring.cpp +++ b/src/core/pistring.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives String - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pistring.h b/src/core/pistring.h index c16ad689..e19f6a32 100755 --- a/src/core/pistring.h +++ b/src/core/pistring.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives String - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pitime.cpp b/src/core/pitime.cpp index 7d96fef6..eeb94f49 100755 --- a/src/core/pitime.cpp +++ b/src/core/pitime.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Timer - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pitime.h b/src/core/pitime.h index 444a6ca7..6d80694c 100755 --- a/src/core/pitime.h +++ b/src/core/pitime.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Time structs - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pivariant.cpp b/src/core/pivariant.cpp index d7ca1476..0c5414e0 100755 --- a/src/core/pivariant.cpp +++ b/src/core/pivariant.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Variant type - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/core/pivariant.h b/src/core/pivariant.h index 1b8fd3fb..50800190 100755 --- a/src/core/pivariant.h +++ b/src/core/pivariant.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Variant type - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piconfig.cpp b/src/io/piconfig.cpp index 2b69ac9c..5aa64160 100755 --- a/src/io/piconfig.cpp +++ b/src/io/piconfig.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Config parser - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piconfig.h b/src/io/piconfig.h index 5507a404..30e3daab 100755 --- a/src/io/piconfig.h +++ b/src/io/piconfig.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Configuration parser and writer - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piconnection.cpp b/src/io/piconnection.cpp index 50a76a82..bf8487d3 100755 --- a/src/io/piconnection.cpp +++ b/src/io/piconnection.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Complex I/O point - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piconnection.h b/src/io/piconnection.h index 863ff648..d2c2e2d3 100755 --- a/src/io/piconnection.h +++ b/src/io/piconnection.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Complex I/O point - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pidiagnostics.cpp b/src/io/pidiagnostics.cpp index 8f57aa34..bdd3dac8 100755 --- a/src/io/pidiagnostics.cpp +++ b/src/io/pidiagnostics.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Speed and quality in/out diagnostics - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pidiagnostics.h b/src/io/pidiagnostics.h index 4afaf19f..e7ef773c 100755 --- a/src/io/pidiagnostics.h +++ b/src/io/pidiagnostics.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Speed and quality in/out diagnostics - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Bychkov Andrey wapmobil@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Bychkov Andrey wapmobil@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pidir.cpp b/src/io/pidir.cpp index df82f79a..aaafdb02 100755 --- a/src/io/pidir.cpp +++ b/src/io/pidir.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Directory - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pidir.h b/src/io/pidir.h index 3e54f9fb..9905e688 100755 --- a/src/io/pidir.h +++ b/src/io/pidir.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Directory - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piethernet.cpp b/src/io/piethernet.cpp index b1518c42..3b69256c 100755 --- a/src/io/piethernet.cpp +++ b/src/io/piethernet.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Ethernet, UDP/TCP Broadcast/Multicast - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piethernet.h b/src/io/piethernet.h index 1a69c535..0f4392ff 100755 --- a/src/io/piethernet.h +++ b/src/io/piethernet.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Ethernet, UDP/TCP Broadcast/Multicast - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pifile.cpp b/src/io/pifile.cpp index e1701ffc..db9a90a8 100755 --- a/src/io/pifile.cpp +++ b/src/io/pifile.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives File - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pifile.h b/src/io/pifile.h index 847f08e7..55648c9e 100755 --- a/src/io/pifile.h +++ b/src/io/pifile.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives File - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piiodevice.cpp b/src/io/piiodevice.cpp index 419a3eee..449f7ebe 100755 --- a/src/io/piiodevice.cpp +++ b/src/io/piiodevice.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Abstract input/output device - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piiodevice.h b/src/io/piiodevice.h index 8ebb8135..b518436d 100755 --- a/src/io/piiodevice.h +++ b/src/io/piiodevice.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Abstract input/output device - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piiomodule.h b/src/io/piiomodule.h index 7dc62a40..6c0cb47c 100644 --- a/src/io/piiomodule.h +++ b/src/io/piiomodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piiostring.cpp b/src/io/piiostring.cpp index 089438bc..daf994a8 100644 --- a/src/io/piiostring.cpp +++ b/src/io/piiostring.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PIIODevice wrapper around PIString - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piiostring.h b/src/io/piiostring.h index 6c4fce93..7110721a 100644 --- a/src/io/piiostring.h +++ b/src/io/piiostring.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIIODevice wrapper around PIString - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pimultiprotocol.cpp b/src/io/pimultiprotocol.cpp index 9fb9b7de..397a1b4d 100755 --- a/src/io/pimultiprotocol.cpp +++ b/src/io/pimultiprotocol.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Multiprotocol - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pimultiprotocol.h b/src/io/pimultiprotocol.h index 9576ba6d..e8dc9b72 100755 --- a/src/io/pimultiprotocol.h +++ b/src/io/pimultiprotocol.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Multiprotocol - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pipacketextractor.cpp b/src/io/pipacketextractor.cpp index 2078044e..e4af3329 100755 --- a/src/io/pipacketextractor.cpp +++ b/src/io/pipacketextractor.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Packets extractor - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pipacketextractor.h b/src/io/pipacketextractor.h index 52fb0d47..7f599672 100755 --- a/src/io/pipacketextractor.h +++ b/src/io/pipacketextractor.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Packets extractor - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pipeer.cpp b/src/io/pipeer.cpp index 8c81e002..b1896b24 100755 --- a/src/io/pipeer.cpp +++ b/src/io/pipeer.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Peer - named I/O ethernet node - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/pipeer.h b/src/io/pipeer.h index f4438537..725ef5d5 100755 --- a/src/io/pipeer.h +++ b/src/io/pipeer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Peer - named I/O ethernet node, forming self-organized peering network - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piprotocol.cpp b/src/io/piprotocol.cpp index df14acac..202e461f 100755 --- a/src/io/piprotocol.cpp +++ b/src/io/piprotocol.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Protocol, input/output channel (COM, UDP) - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Bychkov Andrey wapmobil@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Bychkov Andrey wapmobil@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piprotocol.h b/src/io/piprotocol.h index 4fa5b544..138fc672 100755 --- a/src/io/piprotocol.h +++ b/src/io/piprotocol.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Protocol, input/output channel (COM, UDP) - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Bychkov Andrey wapmobil@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Bychkov Andrey wapmobil@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piserial.cpp b/src/io/piserial.cpp index a5504c7f..64638ae0 100755 --- a/src/io/piserial.cpp +++ b/src/io/piserial.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives COM - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Bychkov Andrey wapmobil@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Bychkov Andrey wapmobil@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piserial.h b/src/io/piserial.h index c1252559..155e9a27 100755 --- a/src/io/piserial.h +++ b/src/io/piserial.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives COM - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Bychkov Andrey wapmobil@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Bychkov Andrey wapmobil@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/io/piusb.h b/src/io/piusb.h index 96cce3f1..4e7095be 100755 --- a/src/io/piusb.h +++ b/src/io/piusb.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives USB, based on libusb - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/picrc.h b/src/math/picrc.h index 92500508..99f9baf1 100755 --- a/src/math/picrc.h +++ b/src/math/picrc.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives CRC checksum calculator - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pievaluator.cpp b/src/math/pievaluator.cpp index aefa3059..c7ecd28f 100755 --- a/src/math/pievaluator.cpp +++ b/src/math/pievaluator.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Evaluator designed for stream computing - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pievaluator.h b/src/math/pievaluator.h index 7e5fe670..c96cd56f 100755 --- a/src/math/pievaluator.h +++ b/src/math/pievaluator.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Evaluator designed for stream calculations - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pifft.cpp b/src/math/pifft.cpp index 654e3f68..0c63ae33 100644 --- a/src/math/pifft.cpp +++ b/src/math/pifft.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Class for FFT, IFFT and Hilbert transformations - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pifft.h b/src/math/pifft.h index 7e161790..a0c05b0b 100644 --- a/src/math/pifft.h +++ b/src/math/pifft.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for FFT, IFFT and Hilbert transformations - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimath.h b/src/math/pimath.h index b1364152..c807ebea 100644 --- a/src/math/pimath.h +++ b/src/math/pimath.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Many mathematical functions and classes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathbase.cpp b/src/math/pimathbase.cpp index 2fbdb9e5..1cf8d97c 100644 --- a/src/math/pimathbase.cpp +++ b/src/math/pimathbase.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Basic mathematical functions and defines - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathbase.h b/src/math/pimathbase.h index 350055c3..2010b65d 100644 --- a/src/math/pimathbase.h +++ b/src/math/pimathbase.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Basic mathematical functions and defines - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathmatrix.h b/src/math/pimathmatrix.h index e2d63418..386f9224 100644 --- a/src/math/pimathmatrix.h +++ b/src/math/pimathmatrix.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIMathMatrix - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathmodule.h b/src/math/pimathmodule.h index 1598bd08..d8cdac00 100644 --- a/src/math/pimathmodule.h +++ b/src/math/pimathmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathsolver.cpp b/src/math/pimathsolver.cpp index fac1dccc..63b84654 100644 --- a/src/math/pimathsolver.cpp +++ b/src/math/pimathsolver.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PIMathSolver - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathsolver.h b/src/math/pimathsolver.h index 9eb8ffb3..ce4338de 100644 --- a/src/math/pimathsolver.h +++ b/src/math/pimathsolver.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIMathSolver - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pimathvector.h b/src/math/pimathvector.h index d4a56e53..d743e52a 100644 --- a/src/math/pimathvector.h +++ b/src/math/pimathvector.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives PIMathVector - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/math/pistatistic.h b/src/math/pistatistic.h index aebc294f..72418f7f 100644 --- a/src/math/pistatistic.h +++ b/src/math/pistatistic.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Class for calculacing math statistic in values array - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/pip.h b/src/pip.h index 07a158b8..5c16ce0b 100755 --- a/src/pip.h +++ b/src/pip.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives All includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com, Andrey Bychkov work.a.b@yandex.ru + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/piplatform.h b/src/piplatform.h index 763ab857..ee3f3ec2 100644 --- a/src/piplatform.h +++ b/src/piplatform.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Platform and compiler macros - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/picodec.cpp b/src/system/picodec.cpp index adb2a346..e64a150e 100755 --- a/src/system/picodec.cpp +++ b/src/system/picodec.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Text codings coder, based on "iconv" - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ PIByteArray PICodec::exec_iconv(const PIString & from, const PIString & to, cons tf.clear(); tf << str; tf.close(); - exec("/usr/bin/iconv", ("-f=" + from), ("-t=" + to), tf.path()); + exec("/usr/bin/iconv", PIStringList() << ("-f=" + from) << ("-t=" + to) << tf.path()); waitForFinish(); return readOutput(); } diff --git a/src/system/picodec.h b/src/system/picodec.h index 45dbfd90..74faad67 100755 --- a/src/system/picodec.h +++ b/src/system/picodec.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Text codings coder, based on "iconv" - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/piintrospection.cpp b/src/system/piintrospection.cpp index 3f745f3e..c3ba6655 100644 --- a/src/system/piintrospection.cpp +++ b/src/system/piintrospection.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Introspection module - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/piintrospection.h b/src/system/piintrospection.h index 3f472ade..50542f58 100644 --- a/src/system/piintrospection.h +++ b/src/system/piintrospection.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Introspection module - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/piintrospection_proxy.cpp b/src/system/piintrospection_proxy.cpp index 9296e0d9..e8650b68 100644 --- a/src/system/piintrospection_proxy.cpp +++ b/src/system/piintrospection_proxy.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Introspection module - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/piintrospection_proxy.h b/src/system/piintrospection_proxy.h index d7b839d4..0470a6f4 100644 --- a/src/system/piintrospection_proxy.h +++ b/src/system/piintrospection_proxy.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Introspection module - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pilibrary.cpp b/src/system/pilibrary.cpp index 33733100..93e99e68 100644 --- a/src/system/pilibrary.cpp +++ b/src/system/pilibrary.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Dynamic library - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pilibrary.h b/src/system/pilibrary.h index 27ced99b..7d6ba57f 100644 --- a/src/system/pilibrary.h +++ b/src/system/pilibrary.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Dynamic library - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pimonitor.cpp b/src/system/pimonitor.cpp index 8d6048d0..6876acfb 100755 --- a/src/system/pimonitor.cpp +++ b/src/system/pimonitor.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Counter of some PIP types - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pimonitor.h b/src/system/pimonitor.h index ea703a27..6873cb8a 100755 --- a/src/system/pimonitor.h +++ b/src/system/pimonitor.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Counter of some PIP types - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/piprocess.cpp b/src/system/piprocess.cpp index 080a5543..a04e253b 100755 --- a/src/system/piprocess.cpp +++ b/src/system/piprocess.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Process - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ #include "piprocess.h" #ifdef WINDOWS -//# include <.h> +# include #else # include # include @@ -60,62 +60,27 @@ void PIProcess::exec_() { } -void PIProcess::terminate() { -#ifdef WINDOWS - if (is_exec) if (!TerminateProcess(pi.hProcess, 0)) return; pi.dwProcessId = 0; -#else - if (is_exec) kill(pid, SIGKILL); pid = 0; -#endif -} - - -int PIProcess::pID() const { -#ifdef WINDOWS - return pi.dwProcessId; -#else - return pid; -#endif -} - - -int PIProcess::currentPID() { -#ifdef WINDOWS - return GetCurrentProcessId(); -#else - return getpid(); -#endif -} - - -PIStringList PIProcess::currentEnvironment() { - PIStringList l; - int i = 0; - while (environ[i] != 0) { - l << environ[i]; - ++i; - } - return l; -} - - -void PIProcess::run() { +void PIProcess::startProc(bool detached) { //cout << "run" << endl; PIString str; /// arguments convertion - as = 0; + int as = 0; #ifdef WINDOWS //args.pop_front(); piForeachC (PIString & i, args) - as += i.lengthAscii() + 1; + as += i.lengthAscii() + 3; char * a = new char[as]; memset(a, ' ', as - 1); as = 0; for (int i = 0; i < args.size_s(); ++i) { str = args[i]; - memcpy(&a[as], str.data(), str.lengthAscii()); - as += str.length() + 1; + a[as] = '"'; + memcpy(&a[as + 1], str.data(), str.lengthAscii()); + a[as + str.length() + 1] = '"'; + as += str.length() + 3; } a[as - 1] = 0; + //piCout << a; #else char * a[args.size_s() + 1]; for (int i = 0; i < args.size_s(); ++i) { @@ -157,10 +122,11 @@ void PIProcess::run() { str = args.front(); is_exec = true; - execStarted(str); + if (!detached) execStarted(str); #ifndef WINDOWS - pid = fork(); - if (pid == 0) { + int pid_ = fork(); + if (!detached) pid = pid_; + if (pid_ == 0) { #endif tf_in = tf_out = tf_err = 0; //cout << "exec " << tf_in << ", " << tf_out << ", " << tf_err << endl; @@ -179,13 +145,14 @@ void PIProcess::run() { 0, // Process handle not inheritable 0, // Thread handle not inheritable false, // Set handle inheritance to FALSE - 0, // No creation flags + detached ? DETACHED_PROCESS : 0, // Creation flags 0,//e, // Use environment wd.isEmpty() ? 0 : wd.data(), // Use working directory &si, // Pointer to STARTUPINFO structure &pi)) // Pointer to PROCESS_INFORMATION structure { - WaitForSingleObject(pi.hProcess, INFINITE); + if (!detached) WaitForSingleObject(pi.hProcess, INFINITE); + CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } else piCoutObj << "\"CreateProcess\" error, " << errorString(); @@ -197,15 +164,18 @@ void PIProcess::run() { } else { msleep(1); //cout << "wait" << endl; - wait(&exit_code); - /*if (tf_in != 0) fclose(tf_in); - if (tf_out != 0) fclose(tf_out); - if (tf_err != 0) fclose(tf_err);*/ - pid = 0; - //cout << "wait done" << endl; + if (!detached) { + wait(&exit_code); + /*if (tf_in != 0) fclose(tf_in); + if (tf_out != 0) fclose(tf_out); + if (tf_err != 0) fclose(tf_err);*/ + pid_ = 0; + if (!detached) pid = pid_; + //cout << "wait done" << endl; + } } #endif - execFinished(str, exit_code); + if (!detached) execFinished(str, exit_code); is_exec = false; for (int i = 0; i < env.size_s(); ++i) delete e[i]; @@ -216,7 +186,56 @@ void PIProcess::run() { for (int i = 0; i < args.size_s(); ++i) delete a[i]; #endif - //cout << "end " << tf_in << ", " << tf_out << ", " << tf_err << endl; +} + + +void PIProcess::terminate() { +#ifdef WINDOWS + if (is_exec) if (!TerminateProcess(pi.hProcess, 0)) return; pi.dwProcessId = 0; +#else + if (is_exec) kill(pid, SIGKILL); pid = 0; +#endif +} + + +void PIProcess::execIndependent(const PIString & program, const PIStringList & args_) { + PIProcess p; + p.args << program << args_; + p.startProc(true); +} + + +int PIProcess::pID() const { +#ifdef WINDOWS + return pi.dwProcessId; +#else + return pid; +#endif +} + + +int PIProcess::currentPID() { +#ifdef WINDOWS + return GetCurrentProcessId(); +#else + return getpid(); +#endif +} + + +PIStringList PIProcess::currentEnvironment() { + PIStringList l; + int i = 0; + while (environ[i] != 0) { + l << environ[i]; + ++i; + } + return l; +} + + +void PIProcess::run() { + startProc(false); } diff --git a/src/system/piprocess.h b/src/system/piprocess.h index 17fc49e5..a435e88f 100755 --- a/src/system/piprocess.h +++ b/src/system/piprocess.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Process - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -70,8 +70,6 @@ public: EVENT_HANDLER1(void, exec, const PIString & , program) {args.clear(); args << program; exec_();} EVENT_HANDLER2(void, exec, const PIString & , program, const PIString & , arg) {args.clear(); args << program << arg; exec_();} - EVENT_HANDLER3(void, exec, const PIString & , program, const PIString & , arg1, const PIString & , arg2) {args.clear(); args << program << arg1 << arg2; exec_();} - EVENT_HANDLER4(void, exec, const PIString & , program, const PIString & , arg1, const PIString & , arg2, const PIString & , arg3) {args.clear(); args << program << arg1 << arg2 << arg3; exec_();} EVENT_HANDLER2(void, exec, const PIString & , program, const PIStringList & , args_) {args << program << args_; exec_();} EVENT_HANDLER(void, terminate); EVENT_HANDLER(bool, waitForFinish) {return waitForFinish(60000);} @@ -80,12 +78,17 @@ public: EVENT1(execStarted, PIString, program) EVENT2(execFinished, PIString, program, int, exit_code) + static void execIndependent(const PIString & program) {execIndependent(program, PIStringList());} + static void execIndependent(const PIString & program, const PIString & arg) {execIndependent(program, PIStringList() << arg);} + static void execIndependent(const PIString & program, const PIStringList & args_); + static PIStringList currentEnvironment(); static int currentPID(); private: virtual void run(); void exec_(); + void startProc(bool detached); PIStringList args, env; PIString wd; @@ -99,7 +102,7 @@ private: pid_t pid; #endif FILE * tf_in, * tf_out, * tf_err; - int exit_code, sz, as; + int exit_code, sz; bool is_exec; }; diff --git a/src/system/pisignals.cpp b/src/system/pisignals.cpp index 75c872cf..f1e860b3 100755 --- a/src/system/pisignals.cpp +++ b/src/system/pisignals.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Signals - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisignals.h b/src/system/pisignals.h index b7f30c25..249cccae 100755 --- a/src/system/pisignals.h +++ b/src/system/pisignals.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Signals - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisysteminfo.cpp b/src/system/pisysteminfo.cpp index 1538cc10..7b50f1d6 100644 --- a/src/system/pisysteminfo.cpp +++ b/src/system/pisysteminfo.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives System information - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisysteminfo.h b/src/system/pisysteminfo.h index c8593d67..da3e0d6d 100644 --- a/src/system/pisysteminfo.h +++ b/src/system/pisysteminfo.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives System information - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisystemmodule.h b/src/system/pisystemmodule.h index 9c855521..e84a8753 100644 --- a/src/system/pisystemmodule.h +++ b/src/system/pisystemmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisystemmonitor.cpp b/src/system/pisystemmonitor.cpp index 1ab492b7..35e2ef85 100755 --- a/src/system/pisystemmonitor.cpp +++ b/src/system/pisystemmonitor.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Process resource monitor - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisystemmonitor.h b/src/system/pisystemmonitor.h index 5af4ceee..dc3e9a8c 100755 --- a/src/system/pisystemmonitor.h +++ b/src/system/pisystemmonitor.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Process resource monitor - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisystemtests.cpp b/src/system/pisystemtests.cpp index 40857542..c4ba2ca6 100755 --- a/src/system/pisystemtests.cpp +++ b/src/system/pisystemtests.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives System tests results (see system_test folder) - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/system/pisystemtests.h b/src/system/pisystemtests.h index 5088393b..442e9b5d 100755 --- a/src/system/pisystemtests.h +++ b/src/system/pisystemtests.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives System tests results (see system_test folder) - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pimutex.cpp b/src/thread/pimutex.cpp index e091abd2..f5903d63 100755 --- a/src/thread/pimutex.cpp +++ b/src/thread/pimutex.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Mutex - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pimutex.h b/src/thread/pimutex.h index d3b03c4d..60ac3796 100755 --- a/src/thread/pimutex.h +++ b/src/thread/pimutex.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Mutex - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pithread.cpp b/src/thread/pithread.cpp index 3a32e5e0..2355fcc2 100755 --- a/src/thread/pithread.cpp +++ b/src/thread/pithread.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Thread - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pithread.h b/src/thread/pithread.h index 3f05d858..c8c68f87 100755 --- a/src/thread/pithread.h +++ b/src/thread/pithread.h @@ -6,7 +6,7 @@ /* PIP - Platform Independent Primitives Thread - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pithreadmodule.h b/src/thread/pithreadmodule.h index d86919ee..f60abc98 100644 --- a/src/thread/pithreadmodule.h +++ b/src/thread/pithreadmodule.h @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Module includes - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pitimer.cpp b/src/thread/pitimer.cpp index 6225003a..192ac966 100755 --- a/src/thread/pitimer.cpp +++ b/src/thread/pitimer.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Timer - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/thread/pitimer.h b/src/thread/pitimer.h index 9adcc7d6..fdcf5e1b 100755 --- a/src/thread/pitimer.h +++ b/src/thread/pitimer.h @@ -4,7 +4,7 @@ /* PIP - Platform Independent Primitives Timer - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/utils/code_model_generator/main.cpp b/utils/code_model_generator/main.cpp index 93b5aa2e..7b1723b0 100755 --- a/utils/code_model_generator/main.cpp +++ b/utils/code_model_generator/main.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Code model generator - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/utils/remote_console/main.cpp b/utils/remote_console/main.cpp index 54a8881f..080a10a1 100755 --- a/utils/remote_console/main.cpp +++ b/utils/remote_console/main.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives Remote console viewer - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/utils/system_daemon/daemon.cpp b/utils/system_daemon/daemon.cpp index 729d9d69..9cbf5706 100644 --- a/utils/system_daemon/daemon.cpp +++ b/utils/system_daemon/daemon.cpp @@ -4,7 +4,7 @@ #include "picrypt.h" const char self_name[] = "__self__"; -extern PIScreen screen; +extern PIScreen * screen; //bool Daemon::inited__ = false; Daemon::Remote::Remote(const PIString & n): PIThread() { @@ -105,20 +105,20 @@ Daemon::TileFileProgress::TileFileProgress(): PIScreenTile() { addTile(prog_file); addTile(prog_all); addTile(buttons); - CONNECTU(&(::screen), tileEvent, this, tileEvent) + CONNECTU((::screen), tileEvent, this, tileEvent) } void Daemon::TileFileProgress::resizeEvent(int w, int h) { PIScreenTile::resizeEvent(w, h); - w = ::screen.windowWidth() / 1.4; + w = ::screen->windowWidth() / 1.4; minimumWidth = maximumWidth = w; } void Daemon::TileFileProgress::sizeHint(int & w, int & h) const { PIScreenTile::sizeHint(w, h); - w = ::screen.windowWidth() / 1.4; + w = ::screen->windowWidth() / 1.4; } @@ -163,7 +163,7 @@ void Daemon::TileFileProgress::show(PIFileTransfer * f) { ft = f; if (ft) { conn_name = ft->name(); - ::screen.setDialogTile(this); + ::screen->setDialogTile(this); label_file->content[0].first = "Preparing ..."; prog_file->value = prog_all->value = 0; buttons->cur = 0; @@ -177,7 +177,7 @@ void Daemon::TileFileProgress::show(PIFileTransfer * f) { void Daemon::TileFileProgress::close(bool ok) { buttons->content[0].first = "Pause"; ft = 0; - ::screen.setDialogTile(0); + ::screen->setDialogTile(0); if (!ok) { piCout << "Achtung! Alarm!! Error!!!"; showInfo("Error while files transfer..."); @@ -210,7 +210,7 @@ Daemon::Daemon(): inited__(false), PIPeer(pisd_prefix + PISystemInfo::instance() // setName("Daemon"); dtimer.setName("__S__Daemon_timer"); mode = offset = cur = height = 0; - CONNECTU(&screen, keyPressed, this, keyEvent) + CONNECTU(screen, keyPressed, this, keyEvent) CONNECTU(&dtimer, tickEvent, this, timerEvent) CONNECTU(&fm, tileKey, this, fmKeyEvent) CONNECTU(&fm, actionRequest, this, fmActionRequest) @@ -259,7 +259,7 @@ Daemon::Daemon(): inited__(false), PIPeer(pisd_prefix + PISystemInfo::instance() tile_root->addTile(tile_info); tile_root->addTile(tile_fm); - CONNECTU(&screen, tileEvent, this, tileEvent) + CONNECTU(screen, tileEvent, this, tileEvent) reinit(); inited__ = true; } @@ -317,7 +317,7 @@ void Daemon::showTile(PIScreenTile * t, const PIString & header) { void Daemon::fillInfoTile(const Daemon::HostInfo & hi) { - screen.lock(); + screen->lock(); tile_info->content.clear(); tile_info->content << TileSimple::Row("Exec command: " + hi.execCommand, CellFormat()); tile_info->content << TileSimple::Row(" Executed on " + hi.execDateTime.toString(), CellFormat()); @@ -327,7 +327,7 @@ void Daemon::fillInfoTile(const Daemon::HostInfo & hi) { tile_info->content << TileSimple::Row(" OS version: " + hi.OS_version, CellFormat()); tile_info->content << TileSimple::Row("Architecture: " + hi.architecture, CellFormat()); tile_info->content << TileSimple::Row(" CPU count: " + PIString::fromNumber(hi.processorsCount), CellFormat()); - screen.unlock(); + screen->unlock(); } @@ -360,7 +360,7 @@ void Daemon::tileEvent(PIScreenTile * t, TileEvent e) { void Daemon::keyEvent(PIKbdListener::KeyEvent key) { if (!tile_root->visible) return; - if (screen.dialogTile()) return; + if (screen->dialogTile()) return; switch (key.key) { case PIKbdListener::Esc: if (mode == 0) @@ -368,9 +368,9 @@ void Daemon::keyEvent(PIKbdListener::KeyEvent key) { else { if (mode > 1) { mode = 1; - screen.lock(); + screen->lock(); tile_info->content.clear(); - screen.unlock(); + screen->unlock(); showActionList(); } else disconnect(); @@ -472,12 +472,12 @@ void Daemon::fmActionRequest(bool remote_tile, FileManager::Action type, PIVaria void Daemon::timerEvent(void * _d, int delim) { - screen.lock(); + screen->lock(); list_daemons->content.clear(); availableDaemons(); piForeachC (PIString & i, available_daemons) list_daemons->content << TileList::Row(i, CellFormat()); - screen.unlock(); + screen->unlock(); if (delim == 5 && mode == 2) { if (conn_name.isEmpty()) return; PIByteArray ba; ba << int(RequestHostInfo); diff --git a/utils/system_daemon/main.cpp b/utils/system_daemon/main.cpp index 0720c873..e407efca 100755 --- a/utils/system_daemon/main.cpp +++ b/utils/system_daemon/main.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives PIp System Daemon - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include "picli.h" #include "pisystemmonitor.h" #include "pisysteminfo.h" +#include "piprocess.h" #include "file_manager.h" #include "daemon.h" #include "shared.h" @@ -30,28 +31,27 @@ public: }; _Init _pisd_init; -PIScreen screen(false); PISystemMonitor sys_mon; -Daemon daemon_; +PIScreen * screen = 0; //FileManager file_manager; class MainMenu: public PITimer { PIOBJECT_SUBCLASS(MainMenu, PITimer) public: - MainMenu() { + MainMenu(Daemon & d): daemon_(d) { cur_peer = -1; title = new TileSimple("title"); updateTitle(title); title->back_format.color_back = Yellow; title->size_policy = Fixed; - screen.rootTile()->addTile(title); + screen->rootTile()->addTile(title); PIScreenTile * center = new PIScreenTile("center"); center->back_format.color_back = Cyan; center->size_policy = Expanding; center->setMargins(2, 2, 1, 1); - screen.rootTile()->addTile(center); + screen->rootTile()->addTile(center); PIScreenTile * mt = tmenu = menuTile(); mt->show(); mt->name() = "main menu"; @@ -79,10 +79,10 @@ public: TilePICout * outt = new TilePICout(); outt->size_policy = PIScreenTypes::Expanding; - screen.rootTile()->addTile(outt); + screen->rootTile()->addTile(outt); - CONNECTU(&screen, tileEvent, this, tileEvent) - CONNECTU(&screen, keyPressed, this, keyEvent) + CONNECTU(screen, tileEvent, this, tileEvent) + CONNECTU(screen, keyPressed, this, keyEvent) CONNECTU(&daemon_.fm, menuRequest, this, menuRequest) CONNECTU(&daemon_, menuRequest, this, menuRequest) start(10); @@ -168,7 +168,7 @@ public: } void updatePeerInfo() { bool pm = daemon_.lockedPeers(); - screen.lock(); + screen->lock(); daemon_.lock(); peers_tl->content.clear(); addrs_tl->content.clear(); @@ -206,7 +206,7 @@ public: updatePeerDiag(peerdiagdata_tl, daemon_.diagnosticData()); updatePeerDiag(peerdiagservice_tl, daemon_.diagnosticService()); daemon_.unlock(); - screen.unlock(); + screen->unlock(); } void tick(void* data_, int delimiter) { updatePeerInfo(); @@ -249,11 +249,12 @@ public: PIKbdListener::exiting = true; return; } - if (screen.dialogTile()) return; + if (screen->dialogTile()) return; if (tpeer->visible || tinfo->visible || tpeerdiag->visible) if (e.key == PIKbdListener::Esc) menuRequest(); //piCout << "key" << e.key; } + Daemon & daemon_; PIScreenTile * tmenu, * tinfo, * tfm, * tdaemon, * tpeer, * tpeerdiag; TileList * peers_tl, * addrs_tl, * peermap_tl; TileSimple * title; @@ -264,15 +265,52 @@ public: }; + +void usage() { + piCout << PICoutManipulators::Bold << "PIP System Daemon"; + piCout << PICoutManipulators::Cyan << "Version" << PICoutManipulators::Bold << PIPVersion() << PICoutManipulators::NewLine; + piCout << PICoutManipulators::Green << PICoutManipulators::Bold << "Usage:" << PICoutManipulators::Default + << "\"pisd [-hdf] [-n ]\"" << PICoutManipulators::NewLine; + piCout << PICoutManipulators::Green << PICoutManipulators::Bold << "Details:"; + piCout << "-h --help " << PICoutManipulators::Green << "- display this message and exit"; + piCout << "-d --daemon " << PICoutManipulators::Green << "- start as daemon"; + piCout << "-f --force " << PICoutManipulators::Green << "- don`t check for another running instance"; + piCout << "-n --name " << PICoutManipulators::Green << "- set daemon name"; +} + + int main(int argc, char * argv[]) { //piDebug = false; PICLI cli(argc, argv); + cli.addArgument("help"); + cli.addArgument("daemon"); + cli.addArgument("force"); + cli.addArgument("name", true); + if (cli.hasArgument("help")) { + usage(); + return 0; + } + PIString name = cli.argumentValue("name"); + if (cli.hasArgument("daemon")) { + PIStringList args; + if (cli.hasArgument("force")) + args << "-f"; + if (!name.isEmpty()) + args << "-n" << name; + PIProcess::execIndependent(PISystemInfo::instance()->execCommand, args); + return 0; + } PIINTROSPECTION_START //cli.addArgument(""); + screen = new PIScreen(false); + Daemon daemon_; sys_mon.startOnSelf(); - screen.enableExitCapture(PIKbdListener::F10); - MainMenu menu; - screen.start(); - screen.waitForFinish(); + screen->enableExitCapture(PIKbdListener::F10); + if (!name.isEmpty()) + daemon_.changeName(pisd_prefix + name); + MainMenu menu(daemon_); + screen->start(); + screen->waitForFinish(); + delete screen; return 0; -}; +} diff --git a/utils/system_test/main.cpp b/utils/system_test/main.cpp index a448ff80..5ebb7860 100755 --- a/utils/system_test/main.cpp +++ b/utils/system_test/main.cpp @@ -1,7 +1,7 @@ /* PIP - Platform Independent Primitives System tests program - Copyright (C) 2016 Ivan Pelipenko peri4ko@gmail.com + Copyright (C) 2016 Ivan Pelipenko peri4ko@yandex.ru This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by