opnsense-ports/comms/bforce-kst/files/patch-expression.y
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

29 lines
602 B
Text

--- bforce/expression.y.old Thu Aug 30 16:33:48 2001
+++ bforce/expression.y Thu Feb 6 23:38:32 2003
@@ -52,6 +52,7 @@
#include "logger.h"
#include "session.h"
#include "nodelist.h"
+#include "io.h"
static struct tm *now = NULL;
static int expr_result = 0;
@@ -205,6 +206,7 @@
{
$$ = expr_check_logic($1, OR, $3);
}
+ ;
%%
#include "expression_lex.c"
@@ -329,6 +331,10 @@
else if( state.modemport && state.modemport->name )
{
return strstr(state.modemport->name, str) ? 1 : 0;
+ }
+ else if( isatty(0) )
+ {
+ return strstr(ttyname(0), str) ? 1 : 0;
}
return -1;