Evil int stat!
This commit is contained in:
parent
7af240ce98
commit
1ea5901e90
2 changed files with 7 additions and 7 deletions
12
src/main.c
12
src/main.c
|
@ -44,9 +44,9 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
if(!sset) usage(argv[0]);
|
if(!sset) usage(argv[0]);
|
||||||
setser(argv[0]);
|
setser(argv[0]);
|
||||||
|
initscr();
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
initscr();
|
|
||||||
cbreak();
|
cbreak();
|
||||||
start_color();
|
start_color();
|
||||||
keypad(stdscr, TRUE);
|
keypad(stdscr, TRUE);
|
||||||
|
@ -94,11 +94,11 @@ void setser(char* ourname)
|
||||||
tr.c_cflag &= ~CSIZE;
|
tr.c_cflag &= ~CSIZE;
|
||||||
tr.c_cflag |= CS7;
|
tr.c_cflag |= CS7;
|
||||||
tcsetattr(fd, TCSANOW, &tr);
|
tcsetattr(fd, TCSANOW, &tr);
|
||||||
ioctl(fd, TIOCMGET, &stat);
|
ioctl(fd, TIOCMGET, &status);
|
||||||
stat &= ~TIOCM_RTS;
|
status &= ~TIOCM_RTS;
|
||||||
ioctl(fd, TIOCMSET, &stat);
|
ioctl(fd, TIOCMSET, &status);
|
||||||
ioctl(fd, TIOCMGET, &stat);
|
ioctl(fd, TIOCMGET, &status);
|
||||||
if(stat & TIOCM_RTS) {
|
if(status & TIOCM_RTS) {
|
||||||
fprintf(stderr, "RTS Not asserted! Aborting.\n");
|
fprintf(stderr, "RTS Not asserted! Aborting.\n");
|
||||||
close(fd);
|
close(fd);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
int fd, siz, stat, logging;
|
int fd, siz, status, logging;
|
||||||
FILE* logfil;
|
FILE* logfil;
|
||||||
struct tm tim;
|
struct tm tim;
|
||||||
sig_t* than(int s);
|
sig_t* than(int s);
|
||||||
|
|
Loading…
Reference in a new issue