Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More Cleanup #13

Merged
merged 3 commits into from
Jun 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More Cleanup
  • Loading branch information
M-griffin committed Jun 10, 2017
commit 81c1f26db8dff94f8344c9dbb7d5b20ce9ee8f6a
1 change: 1 addition & 0 deletions linux/enthral/enthral.project
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<File Name="../../src/jamlib/memmessage.h"/>
<File Name="../../src/jamlib/structrw.h"/>
</VirtualDirectory>
<File Name="../../src/jam.h"/>
</VirtualDirectory>
<Settings Type="Executable">
<GlobalSettings>
Expand Down
11 changes: 0 additions & 11 deletions src/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ wchar_t CP437TABLE[] = {
L'\u207F', L'\u00B2', L'\u25A0', L'\u00A0'
};


static int conin = 0;
static int conout = 0;
static int conon = 0;
Expand All @@ -113,7 +112,6 @@ static struct sockaddr_un sock;
*/
static void create_internode_socket()
{

char socket_name[4096] = {0};
if ((sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) {
fprintf(stderr,"%s ***cannot create communication socket, check permissions!",ENTHRALTMP);
Expand All @@ -135,7 +133,6 @@ static void create_internode_socket()
*/
void clear_nodes()
{

char buff[512] = {0};

finalize_console();
Expand All @@ -152,18 +149,15 @@ void clear_nodes()
// Clear Terminal file from Telnetd
snprintf(buff, sizeof(buff), "%s", CLIENT_TERM);
remove(buff);

}


/**
* Initalize And Create Node Sockets
*/
int init_nodes()
{
serhandle = open(ttyname(0), O_RDWR);

// Create communication fifos for Snoop
create_internode_socket();
if (init_console() == -1) {
fprintf(stderr,"%s ***communication socket(s) failed to init, check permissions!",ENTHRALTMP);
Expand All @@ -177,7 +171,6 @@ int init_nodes()
*/
int set_blocking_mode(int fd, int mode)
{

int fl;
if ((fl = fcntl(fd, F_GETFL)) == -1)
return -1;
Expand All @@ -190,7 +183,6 @@ int set_blocking_mode(int fd, int mode)
*/
ssize_t safe_read(int fd, void *buf, size_t buflen)
{

char *p;
ssize_t bread, n;

Expand All @@ -215,7 +207,6 @@ ssize_t safe_read(int fd, void *buf, size_t buflen)
*/
ssize_t safe_write(int fd, const void *buf, size_t buflen)
{

char *p;
ssize_t bwrite, n;

Expand Down Expand Up @@ -368,7 +359,6 @@ int console_getc(void)
}
}


/**
* Used for printing multibyte (UTF-8) Characters
* To Console / STDOUT
Expand All @@ -391,7 +381,6 @@ void print_wide(const std::wstring& wstr)
}
}


/**
* Main Translation loop from cp437 to Wide Unicode.
*
Expand Down
6 changes: 0 additions & 6 deletions src/data_areas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ int data_area::data_lockSet(int onoff)
}
}


void data_area::chkparse(std::string &temp)
{
std::string temp1;
Expand Down Expand Up @@ -147,7 +146,6 @@ int data_area::da_read(char *FileName)
return TRUE;
}


void data_area::rec_parse(std::string cfgdata, int idx)
{
char sText[200] = {0};
Expand Down Expand Up @@ -299,7 +297,6 @@ int data_area::rec_cnt(char *MenuName)
return cnt;
}


int data_area::rec_read(char *FileName, int idx)
{
std::string path = DAPATH;
Expand Down Expand Up @@ -421,7 +418,6 @@ void data_area::data_area_clear()
inArray = 0;
}


// Processing for Menu's with Lightbars & Hotkeys.
void data_area::process_data_area()
{
Expand Down Expand Up @@ -1245,7 +1241,6 @@ void data_area::read_file_records()
return;
}


void data_area::truncate_da_buffer()
{
std::string path = DAPATH;
Expand Down Expand Up @@ -1274,7 +1269,6 @@ void data_area::truncate_da_buffer()
data_lockSet(FALSE);
}


void data_area::save_da_buffer()
{
std::string path = DAPATH;
Expand Down
4 changes: 0 additions & 4 deletions src/dtfunc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# include <string>
# include <sstream>


using namespace std;

char *getLastCallDays(std::time_t lastcall)
Expand Down Expand Up @@ -90,7 +89,6 @@ char *getLastCallDays(std::time_t lastcall)
return (char *)"error";
}


char *getAge(std::time_t sec)
{
std::time_t theTime, birthTime;
Expand Down Expand Up @@ -120,7 +118,6 @@ char *getAge(std::time_t sec)
return (char *)s.c_str();
}


int isBday(std::time_t sec)
{
std::time_t tmp1;
Expand Down Expand Up @@ -178,7 +175,6 @@ int isBday(std::time_t sec)
return FALSE;
}


int VerifyBday(char *date)
{
int i = 0, t = 0, mm, dd, yy;
Expand Down
7 changes: 0 additions & 7 deletions src/enthral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
# include <cstdio>
# include <csignal>
# include <cerrno>

# include <cstring>
# include <cstdlib>

Expand All @@ -38,7 +37,6 @@
# include <termios.h>
# include <sys/stat.h>


using namespace std;

char BBSPATH[PATH_MAX] = {0};
Expand Down Expand Up @@ -72,8 +70,6 @@ int TERM_HEIGHT = 25;
int TERM_WIDTH = 80;
int MAX_NODES = 5;



// Ansi Terminal Detected.
int isANSI = FALSE;

Expand Down Expand Up @@ -185,7 +181,6 @@ int main(int argc, char *argv[])
(void) signal (SIGINT, killazombie);
(void) signal (SIGILL, killazombie);
(void) signal (SIGKILL, killazombie);

(void) signal (SIGABRT, killazombie);
(void) signal (SIGQUIT, killazombie);

Expand All @@ -196,7 +191,6 @@ int main(int argc, char *argv[])
(void) signal (SIGTTOU, SIG_IGN);
(void) signal (SIGCHLD, SIG_IGN);


ConsoleIO _io;
users _usr;

Expand Down Expand Up @@ -276,7 +270,6 @@ int main(int argc, char *argv[])
// Open and Read Config file
parseconfig();


// Get Users incomming IP Address
// Unless being kicked off locally.
if (argc >= 3) {
Expand Down
3 changes: 0 additions & 3 deletions src/history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ int history::daily_lockSet(int onoff)
*/
int history::daily_write(History *hist)
{

time_t t;
tm *tm;
char datestr[81]= {0};
Expand Down Expand Up @@ -165,7 +164,6 @@ int history::hist_lockSet(int onoff)
*/
int history::hist_write(History *hist)
{

std::string path = DATAPATH;
path += "history.dat";
int x = 0;
Expand All @@ -191,7 +189,6 @@ int history::hist_write(History *hist)
*/
int history::hist_read(History *hist)
{

std::string path = DATAPATH;
path += "history.dat";
int x = 0;
Expand Down
Loading