Skip to content

Commit

Permalink
Tidied source.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Sikora committed Dec 3, 2021
1 parent a37ace9 commit 6ed23b5
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/satterm_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// -----------------------------------------------------------------------------------------------------

#include <iostream> // std::cout, std::cerr, std::endl.
#include <fstream> // std::ifstream.
#include <stdexcept> // std::out_of_range.
#include <string> // std::string, std::to_string.
#include <map> // std::map.
Expand Down
1 change: 0 additions & 1 deletion src/satterm_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <stdio.h> // perror().
#include <fcntl.h> // open() and O_RDONLY, O_WRONLY, etc.
#include <unistd.h> // write(), read(), close(), unlink().
#include <sys/stat.h> // mkfifo().
#include <errno.h> // errno.

#include "satterm_port.h"
Expand Down
10 changes: 0 additions & 10 deletions src/satterm_port_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@
// For a copy, see <https://opensource.org/licenses/MIT>.
// -----------------------------------------------------------------------------------------------------

#include <iostream> // std::cout, std::cerr, std::endl;
#include <string> // std::string, std::to_string.
#include <map> // std::map.
#include <vector> // std::vector.
#include <ctime> // time().

#include <signal.h> // SIGPIPE, SIG_IGN.
#include <stdio.h> // perror().
#include <fcntl.h> // open() and O_RDONLY, O_WRONLY, etc.
#include <unistd.h> // write(), read(), close(), unlink().
#include <sys/stat.h> // mkfifo().

#include "satterm_port.h"

Expand Down
7 changes: 0 additions & 7 deletions src/satterm_port_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@

#include <iostream> // std::cout, std::cerr, std::endl;
#include <string> // std::string, std::to_string.
#include <map> // std::map.
#include <vector> // std::vector.
#include <ctime> // time().

#include <signal.h> // SIGPIPE, SIG_IGN.
#include <stdio.h> // perror().
#include <fcntl.h> // open() and O_RDONLY, O_WRONLY, etc.
#include <unistd.h> // write(), read(), close(), unlink().
#include <sys/stat.h> // mkfifo().

#include "satterm_port.h"
Expand All @@ -43,7 +38,6 @@ Port_Server::Port_Server(std::string const& working_path, std::string const& ide
Port_Server::~Port_Server() {
Close();
if (m_fifos.in.created) {
// Unlink.
std::string fifo_path = m_working_path + m_fifos.in.identifier;
int status = unlink(fifo_path.c_str());
if ((status < 0) && m_display_messages) {
Expand All @@ -52,7 +46,6 @@ Port_Server::~Port_Server() {
}
}
if (m_fifos.out.created) {
// Unlink.
std::string fifo_path = m_working_path + m_fifos.out.identifier;
int status = unlink(fifo_path.c_str());
if ((status < 0) && m_display_messages) {
Expand Down
3 changes: 2 additions & 1 deletion src/satterm_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@

#include <errno.h> // errno.
#include <unistd.h> // fork(), execl(), getcwd().
#include <stdio.h> // perror(), FILENAME_MAX.

#include "satellite_terminal.h"

SatTerm_Server::SatTerm_Server(std::string const& identifier, std::string const& path_to_client_binary, bool display_messages,
std::vector<std::string> port_identifiers, std::string const& stop_message,
std::vector<std::string> port_identifiers, std::string const& stop_message,
std::string const& path_to_terminal_emulator_paths, char end_char, std::string const& stop_port_identifier,
unsigned long timeout_seconds) {

Expand Down
1 change: 1 addition & 0 deletions src/satterm_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct fifo_pair {
struct error_descriptor {
int err_no;
std::string err_detail;

error_descriptor& operator=(error_descriptor const& rhs) {
err_no = rhs.err_no;
err_detail = rhs.err_detail;
Expand Down

0 comments on commit 6ed23b5

Please sign in to comment.