summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
commitfd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch)
tree42d2a87726d196f4db1c68489007520a4c597062 /utils
parent9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile8
-rw-r--r--utils/astcanary.c1
-rw-r--r--utils/astman.134
-rw-r--r--utils/conf2ael.c88
-rw-r--r--utils/db1-ast/hash/README18
-rw-r--r--utils/db1-ast/hash/hash_page.c2
-rw-r--r--utils/db1-ast/include/db.h2
-rw-r--r--utils/db1-ast/recno/rec_search.c2
-rw-r--r--utils/db1-ast/recno/rec_seq.c2
-rw-r--r--utils/extconf.c1
-rw-r--r--utils/frame.c1
-rw-r--r--utils/stereorize.c2
12 files changed, 79 insertions, 82 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 5d3119aee..3a1275407 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Various utilities
#
# Copyright (C) 1999-2006, Digium
@@ -22,7 +22,7 @@ ASTTOPDIR?=..
# the 1.2 days. The neat part is that it will actually evaluate the expressions.
# Users could use this to quickly check expressions in their .ael file.
# to get check_expr2, add it to the ALL_UTILS list -- this is a program that will
-# read in a file containing expressions (as if they were in $[ ]), one per line.
+# read in a file containing expressions (as if they were in $[ ]), one per line.
# It will, of course signal any syntax errors. Devs (like murf) should use this whenever
# changes are made to ast_expr2.y or ast_expr2.fl (or the corresponding .c files),
# as a regression test. Others (mere mortals?) need not bother, but they are
@@ -77,7 +77,7 @@ install:
if [ "$$x" != "none" ]; then \
$(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
fi; \
- done
+ done
uninstall:
for x in $(ALL_UTILS); do rm -f "$(DESTDIR)$(ASTSBINDIR)/$$x"; done
@@ -181,7 +181,7 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTT
$(ECHO_PREFIX) echo " [LD] ast_expr2fz.o ast_expr2z.o -> check_expr2"
$(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o -lm
$(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o"
- rm ast_expr2z.o ast_expr2fz.o
+ rm ast_expr2z.o ast_expr2fz.o
./check_expr2 expr2.testinput
smsq: smsq.o strcompat.o
diff --git a/utils/astcanary.c b/utils/astcanary.c
index 9432c57a7..8e6182cff 100644
--- a/utils/astcanary.c
+++ b/utils/astcanary.c
@@ -132,4 +132,3 @@ int main(int argc, char *argv[])
/* Exit when the parent dies */
return 0;
}
-
diff --git a/utils/astman.1 b/utils/astman.1
index 6a36ca4da..3ce46c9be 100644
--- a/utils/astman.1
+++ b/utils/astman.1
@@ -49,14 +49,14 @@
.ds f2\"
.ds f3\"
.ds f4\"
-'\" t
-.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+'\" t
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH ASTMAN 1 "Jun 12th, 2005" "astman" "Linux Programmer's Manual"
.SH NAME
.B astman
-- a client to asterisk's manager interface
.SH SYNOPSIS
-.PP
+.PP
.B astman
.I hostname
@@ -68,23 +68,23 @@ interface.
.SH OPTIONS
.B hostname
-The host name or IP address to connect to (TCP port 5038). If astman
+The host name or IP address to connect to (TCP port 5038). If astman
fails to connect it will exit immidiately.
.SH USAGE
-If \fBastman\fR has successfully cunnected to the manager port it will
-prompt the user for a username and a secret (password) for the manager
-interface on the remote Asterisk manager interface. It will then be able
-to report existing channels (calls). You will then be able to redirect
+If \fBastman\fR has successfully cunnected to the manager port it will
+prompt the user for a username and a secret (password) for the manager
+interface on the remote Asterisk manager interface. It will then be able
+to report existing channels (calls). You will then be able to redirect
calls to or terminate them.
-.SH "SEE ALSO"
+.SH "SEE ALSO"
asterisk(8)
http://www.voip-info.org/wiki-Asterisk+astman
.SH BUGS
-The hostname does not default to localhost.
+The hostname does not default to localhost.
Impossible to use a port other than 5038.
@@ -92,11 +92,11 @@ The username and password cannot be defined from the command-line.
I mean, what's the point in a man page if the syntax is so simple?
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL.
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index 567dc56f1..a8371bbec 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -1,4 +1,4 @@
-/*
+/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2007, Digium, Inc.
@@ -64,7 +64,7 @@ extern char *months[];
char *config = "extensions.conf";
-/*
+/*
static char *registrar = "conf2ael";
static char userscontext[AST_MAX_EXTENSION] = "default";
static int static_config = 0;
@@ -86,7 +86,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -204,7 +204,7 @@ struct ast_state_cb {
/*! \brief Structure for dial plan hints
\note Hints are pointers from an extension in the dialplan to one or
- more devices (tech/name)
+ more devices (tech/name)
- See \ref AstExtState
*/
struct ast_hint {
@@ -267,10 +267,10 @@ void get_start_stop(unsigned int *word, int bitsperword, int totalbits, int *sta
{
int i;
int thisbit, thatbit = bit_at(word, bitsperword, totalbits-1);
-
+
for (i=0; i<totalbits; i++) {
thisbit = bit_at(word, bitsperword, i);
-
+
if (thisbit != thatbit ) {
if (thisbit) {
*start = i;
@@ -284,14 +284,14 @@ void get_start_stop(unsigned int *word, int bitsperword, int totalbits, int *sta
int all_bits_set(unsigned int *word, int bitsperword, int totalbits )
{
-
+
int i, total=totalbits/bitsperword,bitmask = 0;
-
+
for (i=0; i<bitsperword; i++)
{
bitmask |= (1 << i);
}
-
+
for (i=0; i<total; i++)
{
if (word[i] != bitmask)
@@ -321,9 +321,9 @@ int main(int argc, char **argv)
if (strcmp(argv[i],"-d")==0)
localdir =1;
}
-
+
/* 3 simple steps: */
- /* 1. read in the extensions.conf config file
+ /* 1. read in the extensions.conf config file
* 2. traverse, and build an AEL tree
* 3. Output the AEL tree into a file
*/
@@ -344,9 +344,9 @@ int main(int argc, char **argv)
if (!localdir)
localized_use_conf_dir();
localized_pbx_load_module();
-
+
printf("... Done!\n");
-
+
tmp = 0;
while ((tmp = localized_walk_contexts(tmp)) ) {
printf("Context: %s\n", tmp->name);
@@ -360,9 +360,9 @@ int main(int argc, char **argv)
tree = tmptree;
else
pvalTopLevAddObject(tree, tmptree);
-
+
pvalContextSetName(tmptree, ast_strdup(tmp->name));
-
+
if (tmp->includes) {
incl = pvalCreateNode(PV_INCLUDES);
pvalContextAddStatement(tmptree, incl);
@@ -375,7 +375,7 @@ int main(int argc, char **argv)
char domrange[10];
char monrange[10];
int startbit=0, endbit=0;
-
+
if (all_bits_set(tmpi->timing.minmask, 30, 720))
strcpy(timerange, "*");
else {
@@ -392,7 +392,7 @@ int main(int argc, char **argv)
strcat(timerange,"-");
strcat(timerange,tbuf);
}
-
+
if (all_bits_set(&tmpi->timing.dowmask, 7, 7))
strcpy(dowrange, "*");
else {
@@ -401,7 +401,7 @@ int main(int argc, char **argv)
strcat(dowrange,"-");
strcat(dowrange, days[endbit]);
}
-
+
if (all_bits_set(&tmpi->timing.monthmask, 12, 12))
strcpy(monrange, "*");
else {
@@ -410,7 +410,7 @@ int main(int argc, char **argv)
strcat(monrange,"-");
strcat(monrange, months[endbit]);
}
-
+
if (all_bits_set(&tmpi->timing.daymask, 31, 31))
strcpy(domrange, "*");
else {
@@ -424,7 +424,7 @@ int main(int argc, char **argv)
}
/* now all 4 fields are set; what do we do? */
pvalIncludesAddIncludeWithTimeConstraints(incl, strdup(tmpi->name), strdup(timerange), strdup(domrange), strdup(dowrange), strdup(monrange));
-
+
} else {
pvalIncludesAddInclude(incl, strdup(tmpi->name));
}
@@ -472,23 +472,23 @@ int main(int argc, char **argv)
pval *exten = pvalCreateNode(PV_EXTENSION);
pvalContextAddStatement(tmptree, exten);
pvalExtenSetName(exten, ast_strdup(eroot->exten));
-
+
if (eroot->peer) {
pval *block = pvalCreateNode(PV_STATEMENTBLOCK);
pvalExtenSetStatement(exten, block);
-
+
e = 0;
while ( (e = localized_walk_extension_priorities(eroot, e)) ) {
-
+
pval *statemnt = pvalCreateNode(PV_APPLICATION_CALL);
pval *args = pvalCreateNode(PV_WORD);
-
+
/* printf(" %s(%s)\n", e->app, (char*)e->data); */
pvalAppCallSetAppName(statemnt, ast_strdup(e->app));
pvalWordSetString(args, ast_strdup(e->data));
pvalAppCallAddArg(statemnt, args);
-
+
pvalStatementBlockAddStatement(block, statemnt);
}
} else if (eroot->priority == -1) {
@@ -508,13 +508,13 @@ int main(int argc, char **argv)
pval *statemnt = pvalCreateNode(PV_APPLICATION_CALL);
pval *args = pvalCreateNode(PV_WORD);
-
+
/* printf(" %s (%s)\n", eroot->app, (char *)eroot->data); */
-
+
pvalAppCallSetAppName(statemnt, ast_strdup(eroot->app));
pvalWordSetString(args, ast_strdup(eroot->data));
-
+
pvalAppCallAddArg(statemnt, args);
pvalExtenSetStatement(exten, statemnt);
}
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
if (AST_LIST_FIRST(&tmp->alts)) {
sws = pvalCreateNode(PV_SWITCHES);
pvalContextAddStatement(tmptree,sws);
-
+
sw = 0;
while ((sw = localized_walk_context_switches(tmp,sw)) ) {
pvalSwitchesAddSwitch(sws, ast_strdup(sw->name));
@@ -532,9 +532,9 @@ int main(int argc, char **argv)
}
}
printf("Generating aelout.ael file...\n");
-
+
ael2_print("aelout.ael", tree);
-
+
printf("...Done!\n");
return 0;
}
@@ -551,7 +551,7 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char
void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count)
{
if (cp1 && *cp1)
- strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
+ strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
a possible var substitution on extension names,
so....! */
else
@@ -568,28 +568,28 @@ int ast_add_extension2(struct ast_context *con,
int ast_context_add_ignorepat2(struct ast_context *con, const char *value, const char *registrar)
{
-
+
return localized_context_add_ignorepat2(con, value, registrar);
}
int ast_context_add_switch2(struct ast_context *con, const char *value,
const char *data, int eval, const char *registrar)
{
-
+
return localized_context_add_switch2(con, value, data, eval, registrar);
}
int ast_context_add_include2(struct ast_context *con, const char *value,
const char *registrar)
{
-
+
return localized_context_add_include2(con, value,registrar);
}
struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, struct ast_hashtab *exttable, const char *name, const char *registrar)
{
printf("find/Creating context %s, registrar=%s\n", name, registrar);
-
+
return localized_context_find_or_create(extcontexts, exttable, name, registrar);
}
@@ -661,21 +661,21 @@ const struct ast_include *ast_walk_context_includes(const struct ast_context *co
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action);
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action)
{
return localized_find_extension(bypass, q, context, exten, priority, label, callerid, action);
diff --git a/utils/db1-ast/hash/README b/utils/db1-ast/hash/README
index f29ccf7e1..321de7d5d 100644
--- a/utils/db1-ast/hash/README
+++ b/utils/db1-ast/hash/README
@@ -6,17 +6,17 @@ Test Programs:
All test programs which need key/data pairs expect them entered
with key and data on separate lines
- tcreat3.c
- Takes
- bucketsize (bsize),
+ tcreat3.c
+ Takes
+ bucketsize (bsize),
fill factor (ffactor), and
- initial number of elements (nelem).
- Creates a hash table named hashtest containing the
+ initial number of elements (nelem).
+ Creates a hash table named hashtest containing the
keys/data pairs entered from standard in.
thash4.c
Takes
- bucketsize (bsize),
- fill factor (ffactor),
+ bucketsize (bsize),
+ fill factor (ffactor),
initial number of elements (nelem)
bytes of cache (ncached), and
file from which to read data (fname)
@@ -45,7 +45,7 @@ Test Programs:
NOTES:
The file search.h is provided for using the hsearch compatible interface
-on BSD systems. On System V derived systems, search.h should appear in
+on BSD systems. On System V derived systems, search.h should appear in
/usr/include.
The man page ../man/db.3 explains the interface to the hashing system.
@@ -63,7 +63,7 @@ file, you may lose updates since the package buffers all writes. Also,
the db interface only creates a single database file. To avoid overwriting
the user's original file, the suffix ".db" is appended to the file name
passed to dbm_open. Additionally, if your code "knows" about the historic
-.dir and .pag files, it will break.
+.dir and .pag files, it will break.
There is a fundamental difference between this package and the old hsearch.
Hsearch requires the user to maintain the keys and data in the application's
diff --git a/utils/db1-ast/hash/hash_page.c b/utils/db1-ast/hash/hash_page.c
index 52571c552..6f7fabb7f 100644
--- a/utils/db1-ast/hash/hash_page.c
+++ b/utils/db1-ast/hash/hash_page.c
@@ -688,7 +688,7 @@ overflow_page(hashp)
in_use_bits = free_bit;
else
in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1;
-
+
if (i == first_page) {
bit = hashp->LAST_FREED &
((hashp->BSIZE << BYTE_SHIFT) - 1);
diff --git a/utils/db1-ast/include/db.h b/utils/db1-ast/include/db.h
index a58724bdd..23b9b9575 100644
--- a/utils/db1-ast/include/db.h
+++ b/utils/db1-ast/include/db.h
@@ -182,7 +182,7 @@ typedef struct {
int lorder; /* byte order */
size_t reclen; /* record length (fixed-length records) */
u_char bval; /* delimiting byte (variable-length records */
- char *bfname; /* btree file name */
+ char *bfname; /* btree file name */
} RECNOINFO;
#ifdef __DBINTERFACE_PRIVATE
diff --git a/utils/db1-ast/recno/rec_search.c b/utils/db1-ast/recno/rec_search.c
index e70fe4c13..0679836e4 100644
--- a/utils/db1-ast/recno/rec_search.c
+++ b/utils/db1-ast/recno/rec_search.c
@@ -92,7 +92,7 @@ __rec_search(t, recno, op)
}
BT_PUSH(t, pg, index - 1);
-
+
pg = r->pgno;
switch (op) {
case SDELETE:
diff --git a/utils/db1-ast/recno/rec_seq.c b/utils/db1-ast/recno/rec_seq.c
index ca3451ca6..ebe1e8acd 100644
--- a/utils/db1-ast/recno/rec_seq.c
+++ b/utils/db1-ast/recno/rec_seq.c
@@ -107,7 +107,7 @@ __rec_seq(dbp, key, data, flags)
einval: errno = EINVAL;
return (RET_ERROR);
}
-
+
if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) {
if (!F_ISSET(t, R_EOF | R_INMEM) &&
(status = t->bt_irec(t, nrec)) != RET_SUCCESS)
diff --git a/utils/extconf.c b/utils/extconf.c
index 116302280..1be739c17 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -5936,4 +5936,3 @@ struct timeval ast_tvnow(void)
gettimeofday(&t, NULL);
return t;
}
-
diff --git a/utils/frame.c b/utils/frame.c
index 6752f4a7d..97b959661 100644
--- a/utils/frame.c
+++ b/utils/frame.c
@@ -1088,4 +1088,3 @@ void readawaysamples( FILE *input, size_t size)
}
free( buffer);
}
-
diff --git a/utils/stereorize.c b/utils/stereorize.c
index 484304037..8f22249cc 100644
--- a/utils/stereorize.c
+++ b/utils/stereorize.c
@@ -109,7 +109,7 @@ int main( int argcount, char *args[])
channels = 2; /* Output files are stereo */
if (wavout)
{
- if ((strcmp(outfilename,"<stdout>")!=0) && (fseek( out, 0, SEEK_SET) != 0))
+ if ((strcmp(outfilename,"<stdout>")!=0) && (fseek( out, 0, SEEK_SET) != 0))
fatalerror("Couldn't navigate output file '%s': %s\n",outfilename, strerror(errno));
makewavheader();
}