From d25769da14c8d4b8befc214110650cd4e763e8d3 Mon Sep 17 00:00:00 2001 From: chatty Date: Fri, 17 Dec 1999 18:29:59 +0000 Subject: Added environment variable and changed default value for device in order to be compatible with the brand new man pages. --- src/irbox.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/irbox.c') diff --git a/src/irbox.c b/src/irbox.c index 355a932..476ae9a 100644 --- a/src/irbox.c +++ b/src/irbox.c @@ -29,12 +29,13 @@ #include "timer.h" #include "ivy.h" #include "ivychannel.h" +#include "ivyloop.h" #include "irdev.h" #include "irtable.h" -#ifndef DEFAULT_DEVICE -#define DEFAULT_DEVICE "/dev/ttyS1" +#ifndef DEFAULT_IRBOX_DEVICE +#define DEFAULT_IRBOX_DEVICE "/dev/ttyS0" #endif #ifndef DEFAULT_IRBOX_DIR @@ -97,7 +98,7 @@ int main (int argc, char *argv[]) { int c; - const char* dev = DEFAULT_DEVICE; + const char* dev = 0; const char* bus = 0; static char app_name_buf [1024]; struct sigaction act; @@ -124,6 +125,12 @@ main (int argc, char *argv[]) app_name = app_name_buf; } + /* device */ + if (!dev) + dev = getenv ("IRBOX_DEVICE"); + if (!dev) + dev = DEFAULT_IRBOX_DEVICE; + /* data directory */ if (!data_dir_name) data_dir_name = getenv ("IRBOX_DIR"); -- cgit v1.1