openbsd-ports/comms/minicom/patches/patch-src_main_c
sthen bca631e6d6 update to minicom 2.5
- rolls in a huge bunch of wprintf patches, also fixes conflict with getline()
- note that the setuid support has been removed from the code
2012-03-19 22:17:43 +00:00

41 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_main_c,v 1.3 2012/03/19 22:17:43 sthen Exp $
--- src/main.c.orig Fri Jul 16 09:50:18 2010
+++ src/main.c Fri Mar 16 22:29:07 2012
@@ -23,6 +23,9 @@
#include <config.h>
#endif
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <termios.h>
#include "port.h"
#include "minicom.h"
#include "intl.h"
@@ -295,6 +298,17 @@ int open_term(int doinit, int show_win_on_error, int n
/* Set CLOCAL mode */
m_nohang(portfd);
+ /* maybe, just maybe, we're looking at a GPS */
+ do {
+ int nmeadisc = NMEADISC;
+ struct tstamps tstamps;
+
+ tstamps.ts_set = TIOCM_CAR;
+ tstamps.ts_clr = 0;
+ ioctl(portfd, TIOCSETD, &nmeadisc);
+ ioctl(portfd, TIOCSTSTAMP, &tstamps);
+ } while (0);
+
/* Set Hangup on Close if program crashes. (Hehe) */
m_hupcl(portfd, 1);
if (doinit > 0)
@@ -444,7 +458,7 @@ void time_status(void)
if (online < 0)
mc_wprintf(st, " %12.12s ", P_HASDCD[0] == 'Y' ? _("Offline") : _("OFFLINE"));
else
- mc_wprintf(st, " %s %02ld:%02ld", P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
+ mc_wprintf(st, " %s %02d:%02d", P_HASDCD[0] == 'Y' ? _("Online") : _("ONLINE"),
online / 3600, (online / 60) % 60);
ret_csr();