aboutsummaryrefslogtreecommitdiff
path: root/comport/comport.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-12-29 05:41:10 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-12-29 05:41:10 +0000
commit8fe1c3925c3bd6e798cb3c8ac674804086b78e6d (patch)
tree2d3a94acd186df35f8f1415217184e0c0e894b61 /comport/comport.c
parentf44fcefa9bd76fa6c7c031197540d1a85fd6ad5d (diff)
made devicename kludge more readable
svn path=/trunk/externals/iem/comport/; revision=7098
Diffstat (limited to 'comport/comport.c')
-rw-r--r--comport/comport.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/comport/comport.c b/comport/comport.c
index c5fa729..e326912 100644
--- a/comport/comport.c
+++ b/comport/comport.c
@@ -92,6 +92,7 @@ typedef struct comport
#define TXBUFOVERRUN -5
#define COMPORT_MAX 99
+#define USE_DEVICENAME 9999 /* use the device name instead of the number */
#ifdef _WIN32
/* we don't use the table for windos cos we can set the number directly. */
@@ -762,8 +763,8 @@ static int open_serial(unsigned int com_num, t_comport *x)
float *baud = &(x->baud);
glob_t glob_buffer;
- /* if com_num == 9999, use device name directly, else try port # */
- if(com_num != 9999)
+ /* if com_num == USE_DEVICENAME, use device name directly, else try port # */
+ if(com_num != USE_DEVICENAME)
{
if(com_num >= COMPORT_MAX)
{
@@ -1269,7 +1270,7 @@ static void comport_open(t_comport *x, t_floatarg f)
static void comport_devicename(t_comport *x, t_symbol *s)
{
x->serial_device = s;
- x->comhandle = open_serial(9999,x);
+ x->comhandle = open_serial(USE_DEVICENAME,x);
clock_delay(x->x_clock, x->x_deltime);
}