summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-05 00:57:34 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-17 17:04:02 +0200
commit6cf35378bfd0784f032b2599582cdbe410296c59 (patch)
tree583acbc1a3e4b9bf18496218085ac6840a081492
parent642427867846d62e46540b274676037827d7be80 (diff)
Nuke trailing whitespace.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--COPYING2
-rw-r--r--ChangeLog2
-rw-r--r--INSTALL4
-rw-r--r--Makefile.am6
-rw-r--r--ax25.36
-rw-r--r--axconfig.c14
-rw-r--r--axutils.c38
-rw-r--r--glibc.patch26
-rw-r--r--libax25.spec.in2
-rw-r--r--netax25/ax25io.h2
-rw-r--r--netax25/axconfig.h2
-rw-r--r--netax25/axlib.h4
-rw-r--r--netax25/daemon.h6
-rw-r--r--netax25/mheard.h4
-rw-r--r--netax25/nrconfig.h2
-rw-r--r--netax25/procutils.h4
-rw-r--r--netax25/rsconfig.h2
-rw-r--r--netax25/ttyutils.h4
-rw-r--r--nrconfig.c18
-rw-r--r--procutils.c12
-rw-r--r--rsconfig.c16
-rw-r--r--ttyutils.c14
22 files changed, 95 insertions, 95 deletions
diff --git a/COPYING b/COPYING
index 2bb5b6e..338a4d6 100644
--- a/COPYING
+++ b/COPYING
@@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
diff --git a/ChangeLog b/ChangeLog
index 339680f..403afeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,7 +19,7 @@ libax25 0.0.12
-- Ralf Baechle DL5RB <ralf@linux-mips.org> Sat, 6 Jun 2009 17:00:00 +0100
-libax25 0.0.11
+libax25 0.0.11
* libax25io handles nonblocking io correctly. (PE1RXQ)
THIS BREAKS PRACTICLY EVERY APP USING THIS LIBRARY, FIX THEM!!!
diff --git a/INSTALL b/INSTALL
index 40c5d00..502d24a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -13,9 +13,9 @@ To build it you type:
If you want to put the files in the "normal" places, type:
./configure --exec_prefix=/usr --sysconfdir=/etc --localstatedir=/var
- make
+ make
make install
-
+
That will put the binaries in /usr/{s}bin and the config files in
/etc/ax25
diff --git a/Makefile.am b/Makefile.am
index 36993da..dcdcc83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ libax25includedir = $(includedir)
libax25ioincludedir = $(includedir)
INCLUDES = -DAX25_SYSCONFDIR=\""$(sysconfdir)/ax25/"\" \
- -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\"
+ -DAX25_LOCALSTATEDIR=\""$(localstatedir)/ax25/"\"
if !AX25_H
USE_LIBAX25_AX25_H = netax25/ax25.h
@@ -52,10 +52,10 @@ libax25_la_SOURCES = \
netax25/ttyutils.h \
$(USE_LIBAX25_AX25_H) \
$(USE_LIBAX25_ROSE_H)
-
+
libax25io_la_SOURCES = \
ax25io.c \
- netax25/ax25io.h
+ netax25/ax25io.h
dist_man_MANS = ax25.3 rose.3 axports.5 rsports.5 nrports.5
diff --git a/ax25.3 b/ax25.3
index 795adf8..06a2af9 100644
--- a/ax25.3
+++ b/ax25.3
@@ -18,7 +18,7 @@
.BI "int ax25_cmp(ax25_address *" ax1 ", ax25_address *" ax2 ");"
.PP
.BI "int ax25_validate(char *" axp ");"
-.PP
+.PP
.BI "char *ax25_config_file(const char *filename);"
.fi
@@ -31,7 +31,7 @@ that is in the format
.RI [[ V | VIA ] callsign "...]"
and stores it in
.I fsap
-in network format.
+in network format.
.PP
.BR ax25_aton_entry ()
takes the ASCII string of a callsign
@@ -39,7 +39,7 @@ takes the ASCII string of a callsign
and stores it in network format in
.I axp.
.PP
-The
+The
.BR ax25_aton_arglist ()
takes a NULL terminated array of strings
.I cp
diff --git a/axconfig.c b/axconfig.c
index e3505d3..8f23039 100644
--- a/axconfig.c
+++ b/axconfig.c
@@ -74,21 +74,21 @@ static AX_Port *ax25_port_ptr(char *name)
char *ax25_config_get_next(char *name)
{
AX_Port *p;
-
+
if (ax25_ports == NULL)
return NULL;
-
+
if (name == NULL)
return ax25_ports->Name;
-
+
if ((p = ax25_port_ptr(name)) == NULL)
return NULL;
-
+
p = p->Next;
if (p == NULL)
return NULL;
-
+
return p->Name;
}
@@ -134,7 +134,7 @@ char *ax25_config_get_port(ax25_address *callsign)
if (ax25_cmp(callsign, &null_ax25_address) == 0)
return "*";
-
+
while (p != NULL) {
if (p->Call != NULL) {
ax25_aton_entry(p->Call, (char *)&addr);
@@ -314,7 +314,7 @@ int ax25_config_load_ports(void)
while (isspace(*s & 0xff)) ++s;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, s, IFNAMSIZ-1);
+ strncpy(ifr.ifr_name, s, IFNAMSIZ-1);
ifr.ifr_name[IFNAMSIZ-1] = 0;
if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
diff --git a/axutils.c b/axutils.c
index 0759c7e..e13b216 100644
--- a/axutils.c
+++ b/axutils.c
@@ -16,7 +16,7 @@ ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}};
/*
* Library routine for callsign conversion.
*/
-
+
int ax25_aton_entry(const char *name, char *buf)
{
int ct = 0;
@@ -66,12 +66,12 @@ int ax25_aton(const char *call, struct full_sockaddr_ax25 *sax)
char *addrp;
int n = 0;
char *tmp = strdup(call);
-
+
if (tmp == NULL)
return -1;
-
+
bp = tmp;
-
+
addrp = sax->fsa_ax25.sax25_call.ax25_call;
do {
@@ -86,19 +86,19 @@ int ax25_aton(const char *call, struct full_sockaddr_ax25 *sax)
if (*np != '\0')
*np++ = '\0';
-
+
/* Check for the optional 'via' syntax */
if (n == 1 && (strcasecmp(bp, "V") == 0 || strcasecmp(bp, "VIA") == 0)) {
bp = np;
continue;
}
-
+
/* Process the token */
if (ax25_aton_entry(bp, addrp) == -1) {
free(tmp);
return -1;
}
-
+
/* Move along */
bp = np;
n++;
@@ -114,7 +114,7 @@ int ax25_aton(const char *call, struct full_sockaddr_ax25 *sax)
/* Tidy up */
sax->fsa_ax25.sax25_ndigis = n - 1;
- sax->fsa_ax25.sax25_family = AF_AX25;
+ sax->fsa_ax25.sax25_family = AF_AX25;
return sizeof(struct full_sockaddr_ax25);
}
@@ -132,15 +132,15 @@ int ax25_aton_arglist(const char *call[], struct full_sockaddr_ax25 *sax)
/* Fetch one callsign token */
if ((bp = call[argp++]) == NULL)
break;
-
+
/* Check for the optional 'via' syntax */
if (n == 1 && (strcasecmp(bp, "V") == 0 || strcasecmp(bp, "VIA") == 0))
continue;
-
+
/* Process the token */
if (ax25_aton_entry(bp, addrp) == -1)
return -1;
-
+
n++;
if (n == 1)
@@ -152,7 +152,7 @@ int ax25_aton_arglist(const char *call[], struct full_sockaddr_ax25 *sax)
/* Tidy up */
sax->fsa_ax25.sax25_ndigis = n - 1;
- sax->fsa_ax25.sax25_family = AF_AX25;
+ sax->fsa_ax25.sax25_family = AF_AX25;
return sizeof(struct full_sockaddr_ax25);
}
@@ -160,7 +160,7 @@ int ax25_aton_arglist(const char *call[], struct full_sockaddr_ax25 *sax)
/*
* Library routine for Rose address conversion.
*/
-
+
int rose_aton(const char *addr, char *buf)
{
int i, n;
@@ -198,7 +198,7 @@ char *ax25_ntoa(const ax25_address *a)
if (c != ' ')
*s++ = c;
}
-
+
/* Convention is: -0 suffixes are NOT printed */
if (a->ax25_call[6] & 0x1E) {
*s++ = '-';
@@ -270,7 +270,7 @@ int rose_cmp(const rose_address *a, const rose_address *b)
for (i = 0; i < 5; i++)
if (a->rose_addr[i] != b->rose_addr[i])
return 1;
-
+
return 0;
}
@@ -302,10 +302,10 @@ char *strupr(char *s)
if (s == NULL)
return NULL;
-
+
for (p = s; *p != '\0'; p++)
*p = toupper(*p);
-
+
return s;
}
@@ -318,9 +318,9 @@ char *strlwr(char *s)
if (s == NULL)
return NULL;
-
+
for (p = s; *p != '\0'; p++)
*p = tolower(*p);
-
+
return s;
}
diff --git a/glibc.patch b/glibc.patch
index e20a2ef..6260fb3 100644
--- a/glibc.patch
+++ b/glibc.patch
@@ -6,7 +6,7 @@
#define AX25_IPMAXQUEUE 11
+#define AX25_IAMDIGI 12
#define AX25_KILL 99
-
+
/* AX.25 socket ioctls: */
@@ -48,6 +49,9 @@
#define SIOCAX25SETPARMS (SIOCPROTOPRIVATE+6)
@@ -15,7 +15,7 @@
+#define SIOCAX25GETINFO (SIOCPROTOPRIVATE+9)
+#define SIOCAX25ADDFWD (SIOCPROTOPRIVATE+10)
+#define SIOCAX25DELFWD (SIOCPROTOPRIVATE+11)
-
+
/* unknown: */
#define AX25_NOUID_DEFAULT 0
@@ -101,6 +105,25 @@
@@ -26,7 +26,7 @@
+ ax25_address digi_addr[AX25_MAX_DIGIS];
+ };
+
-+struct ax25_info_struct
++struct ax25_info_struct
+ {
+ unsigned int n2, n2count;
+ unsigned int t1, t1timer;
@@ -37,12 +37,12 @@
+ unsigned int rcv_q, snd_q;
+ };
+
-+struct ax25_fwd_struct
++struct ax25_fwd_struct
+ {
+ ax25_address port_from;
+ ax25_address port_to;
};
-
+
/* AX.25 route structure: */
--- netrom/netrom.h.orig Fri Apr 30 14:17:53 1999
+++ netrom/netrom.h Fri Apr 30 14:19:52 1999
@@ -51,9 +51,9 @@
#define NETROM_N2 3
#define NETROM_PACLEN 5
+#define NETROM_T4 6
-
+
#define NETROM_KILL 99
-
+
@@ -45,6 +46,8 @@
char mnemonic[7];
ax25_address neighbour;
@@ -61,7 +61,7 @@
+ unsigned int ndigis;
+ ax25_address digipeaters[AX25_MAX_DIGIS];
};
-
+
/* NetRom socket ioctls: */
--- netrose/rose.h.orig Fri Apr 30 14:20:41 1999
+++ netrose/rose.h Fri Apr 30 14:24:55 1999
@@ -70,14 +70,14 @@
#define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4)
#define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5)
+#define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6)
-
+
#define ROSE_DTE_ORIGINATED 0x00
#define ROSE_NUMBER_BUSY 0x01
@@ -73,6 +74,15 @@
ax25_address srose_digi;
};
-
-+struct full_sockaddr_rose
+
++struct full_sockaddr_rose
+{
+ sa_family_t srose_family;
+ rose_address srose_addr;
@@ -95,7 +95,7 @@
unsigned char diagnostic;
+};
+
-+struct rose_facilities_struct
++struct rose_facilities_struct
+{
+ rose_address source_addr, dest_addr;
+ ax25_address source_call, dest_call;
@@ -106,5 +106,5 @@
+ rose_address fail_addr;
+ ax25_address fail_call;
};
-
+
#endif /* netrose/rose.h */
diff --git a/libax25.spec.in b/libax25.spec.in
index 1381018..f7abf94 100644
--- a/libax25.spec.in
+++ b/libax25.spec.in
@@ -13,7 +13,7 @@ BuildRequires: zlib-devel
%description
libax25 is a library for ham radio applications that use the AX.25, NETROM
or ROSE protocols. Included are routines to do ax25 address parsing, common
-ax25 application config file parsing, etc.
+ax25 application config file parsing, etc.
%package devel
diff --git a/netax25/ax25io.h b/netax25/ax25io.h
index b699bcd..5d143b1 100644
--- a/netax25/ax25io.h
+++ b/netax25/ax25io.h
@@ -1,6 +1,6 @@
/* AX25IO - Library for io manuipulation for AX.25 programs
* Copyright (C) 1998 Tomi Manninen
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/netax25/axconfig.h b/netax25/axconfig.h
index 116f985..956de5e 100644
--- a/netax25/axconfig.h
+++ b/netax25/axconfig.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/netax25/axlib.h b/netax25/axlib.h
index 1164059..61078d8 100644
--- a/netax25/axlib.h
+++ b/netax25/axlib.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -21,7 +21,7 @@
* Callsign conversion functions, converts callsigns into network bit
* shifted format and vica versa.
*/
-
+
#ifndef _AXLIB_H
#define _AXLIB_H
diff --git a/netax25/daemon.h b/netax25/daemon.h
index cd9c220..ff00886 100644
--- a/netax25/daemon.h
+++ b/netax25/daemon.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -20,7 +20,7 @@
/*
* Function to convert a running process into a "proper" daemon.
*/
-
+
#ifndef _DAEMON_H
#define _DAEMON_H
@@ -38,7 +38,7 @@ extern "C" {
/*
* The argument is whether to ignore the death of child processes. The function
- * return non-zero if all was OK, else zero if there was a problem.
+ * return non-zero if all was OK, else zero if there was a problem.
*/
extern int daemon_start(int);
diff --git a/netax25/mheard.h b/netax25/mheard.h
index 7e7875f..0e979a8 100644
--- a/netax25/mheard.h
+++ b/netax25/mheard.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -50,7 +50,7 @@ struct mheard_struct {
#define MHEARD_TYPE_UI 10
#define MHEARD_TYPE_UNKNOWN 11
unsigned int type;
-
+
#define MHEARD_MODE_TEXT 0x0001
#define MHEARD_MODE_ARP 0x0002
#define MHEARD_MODE_IP_DG 0x0004
diff --git a/netax25/nrconfig.h b/netax25/nrconfig.h
index ffe7668..5b7953b 100644
--- a/netax25/nrconfig.h
+++ b/netax25/nrconfig.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/netax25/procutils.h b/netax25/procutils.h
index 25b31e8..c3726ee 100644
--- a/netax25/procutils.h
+++ b/netax25/procutils.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -160,7 +160,7 @@ extern void free_proc_ax25_route(struct proc_ax25_route *rp);
extern struct proc_nr *read_proc_nr(void);
extern void free_proc_nr(struct proc_nr *);
-
+
extern struct proc_nr_neigh *read_proc_nr_neigh(void);
extern void free_proc_nr_neigh(struct proc_nr_neigh *np);
diff --git a/netax25/rsconfig.h b/netax25/rsconfig.h
index cff212c..f388bfd 100644
--- a/netax25/rsconfig.h
+++ b/netax25/rsconfig.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
diff --git a/netax25/ttyutils.h b/netax25/ttyutils.h
index d16996a..172de9a 100644
--- a/netax25/ttyutils.h
+++ b/netax25/ttyutils.h
@@ -1,7 +1,7 @@
/* LIBAX25 - Library for AX.25 programs
* Copyright (C) 1997-1999 Jonathan Naylor, Tomi Manninen, Jean-Paul Roubelat
* and Alan Cox.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -21,7 +21,7 @@
/*
* Generic serial port handling functions.
*/
-
+
#ifndef _TTYUTILS_H
#define _TTYUTILS_H
diff --git a/nrconfig.c b/nrconfig.c
index 894ae41..71c1449 100644
--- a/nrconfig.c
+++ b/nrconfig.c
@@ -72,21 +72,21 @@ static NR_Port *nr_port_ptr(char *name)
char *nr_config_get_next(char *name)
{
NR_Port *p;
-
+
if (nr_ports == NULL)
return NULL;
-
+
if (name == NULL)
return nr_ports->Name;
-
+
if ((p = nr_port_ptr(name)) == NULL)
return NULL;
-
+
p = p->Next;
if (p == NULL)
return NULL;
-
+
return p->Name;
}
@@ -132,7 +132,7 @@ char *nr_config_get_port(ax25_address *callsign)
while (p != NULL) {
if (p->Call != NULL) {
ax25_aton_entry(p->Call, (char *)&addr);
-
+
if (ax25_cmp(callsign, &addr) == 0)
return p->Name;
@@ -179,7 +179,7 @@ static int nr_config_init_port(int fd, int lineno, char *line, const char **ifca
char *name, *call, *alias, *paclen, *desc;
const char *dev = NULL;
int found = 0;
-
+
name = strtok(line, " \t");
call = strtok(NULL, " \t");
alias = strtok(NULL, " \t");
@@ -255,7 +255,7 @@ static int nr_config_init_port(int fd, int lineno, char *line, const char **ifca
nr_port_tail = p;
p->Next = NULL;
-
+
return TRUE;
}
@@ -293,7 +293,7 @@ int nr_config_load_ports(void)
while (isspace(*s & 0xff)) ++s;
memset(&ifr, 0, sizeof(ifr));
- strncpy(ifr.ifr_name, s, IFNAMSIZ-1);
+ strncpy(ifr.ifr_name, s, IFNAMSIZ-1);
ifr.ifr_name[IFNAMSIZ-1] = 0;
if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
diff --git a/procutils.c b/procutils.c
index 8eec81f..dc396e5 100644
--- a/procutils.c
+++ b/procutils.c
@@ -45,7 +45,7 @@ static char *safe_strncpy(char *dest, char *src, int n)
/*
* Our version of strtok(). This one does not touch the original string,
* reports the identity of the delimitting character and does not
- * retain any state info.
+ * retain any state info.
*/
static char *token(char **ptr, const char *delim)
{
@@ -381,7 +381,7 @@ struct proc_nr_nodes *read_proc_nr_nodes(void)
safe_strncpy(new->alias, cp, 6);
new->w = 1; /* local node w */
new->qual1 = 255; /* obviously, local node quality should be set to maximum value */
- new->obs1 = 6; /* persist */
+ new->obs1 = 6; /* persist */
/*
* n == 0 indicates a local node.
@@ -426,7 +426,7 @@ struct proc_rs *read_proc_rs(void)
errno = 0;
if ((fp = fopen(PROC_RS_FILE, "r")) == NULL)
return NULL;
- while (fgets(buffer, 256, fp) != NULL)
+ while (fgets(buffer, 256, fp) != NULL)
{
if (!i++) continue;
if ((p = calloc(1, sizeof(struct proc_rs))) == NULL)
@@ -478,7 +478,7 @@ struct proc_rs_neigh *read_proc_rs_neigh(void)
errno = 0;
if ((fp = fopen(PROC_RS_NEIGH_FILE, "r")) == NULL)
return NULL;
- while (fgets(buffer, 256, fp) != NULL)
+ while (fgets(buffer, 256, fp) != NULL)
{
if (!i++) continue;
if ((p = calloc(1, sizeof(struct proc_rs_neigh))) == NULL)
@@ -521,7 +521,7 @@ struct proc_rs_nodes *read_proc_rs_nodes(void)
errno = 0;
if ((fp = fopen(PROC_RS_NODES_FILE, "r")) == NULL)
return NULL;
- while (fgets(buffer, 256, fp) != NULL)
+ while (fgets(buffer, 256, fp) != NULL)
{
if (!i++) continue;
if ((p = calloc(1, sizeof(struct proc_rs_nodes))) == NULL)
@@ -561,7 +561,7 @@ struct proc_rs_route *read_proc_rs_routes(void)
errno = 0;
if ((fp = fopen(PROC_RS_ROUTES_FILE, "r")) == NULL)
return NULL;
- while (fgets(buffer, 256, fp) != NULL)
+ while (fgets(buffer, 256, fp) != NULL)
{
if (!i++) continue;
if ((p = calloc(1, sizeof(struct proc_rs_route))) == NULL)
diff --git a/rsconfig.c b/rsconfig.c
index 8f65404..9522264 100644
--- a/rsconfig.c
+++ b/rsconfig.c
@@ -54,21 +54,21 @@ static RS_Port *rs_port_ptr(char *name)
char *rs_config_get_next(char *name)
{
RS_Port *p;
-
+
if (rs_ports == NULL)
return NULL;
-
+
if (name == NULL)
return rs_ports->Name;
-
+
if ((p = rs_port_ptr(name)) == NULL)
return NULL;
-
+
p = p->Next;
if (p == NULL)
return NULL;
-
+
return p->Name;
}
@@ -115,7 +115,7 @@ char *rs_config_get_port(rose_address *address)
while (p != NULL) {
if (p->Addr != NULL) {
rose_aton(p->Addr, addr.rose_addr);
-
+
if (rose_cmp(address, &addr) == 0)
return p->Name;
}
@@ -146,7 +146,7 @@ static int rs_config_init_port(int fd, int lineno, char *line, const char **ifca
char *name, *addr, *desc;
const char *dev = NULL;
int found = 0;
-
+
name = strtok(line, " \t");
addr = strtok(NULL, " \t");
desc = strtok(NULL, "");
@@ -201,7 +201,7 @@ static int rs_config_init_port(int fd, int lineno, char *line, const char **ifca
rs_port_tail = p;
p->Next = NULL;
-
+
return TRUE;
}
diff --git a/ttyutils.c b/ttyutils.c
index 2037330..580e9a6 100644
--- a/ttyutils.c
+++ b/ttyutils.c
@@ -46,11 +46,11 @@ int tty_raw(int fd, int hwflag)
term.c_cc[VMIN] = 1;
term.c_cc[VTIME] = 0;
-
+
term.c_iflag = IGNBRK | IGNPAR;
term.c_oflag = 0;
term.c_lflag = 0;
-
+
#ifdef CIBAUD
term.c_cflag = (term.c_cflag & (CBAUD | CIBAUD)) | CREAD | CS8 | CLOCAL;
#else
@@ -108,12 +108,12 @@ int tty_is_locked(char *tty)
s++;
else
s = tty;
-
+
sprintf(buffer, "%s/LCK..%s", LOCK_SERIAL_DIR, s);
-
+
if ((fp = fopen(buffer, "r")) == NULL)
return FALSE;
-
+
if (fscanf(fp, "%d", &pid) != 1) {
fclose(fp);
return FALSE;
@@ -138,12 +138,12 @@ int tty_lock(char *tty)
s = tty;
sprintf(buffer, "%s/LCK..%s", LOCK_SERIAL_DIR, s);
-
+
if ((fp = fopen(buffer, "w")) == NULL)
return FALSE;
fprintf(fp, "%10d\n", getpid());
-
+
fclose(fp);
return TRUE;