Skip to content

Commit

Permalink
Multiple files: correct spelling
Browse files Browse the repository at this point in the history
activate codespell on the repo
  • Loading branch information
mkmer committed Jan 22, 2025
1 parent e4dee90 commit f470965
Show file tree
Hide file tree
Showing 32 changed files with 311 additions and 92 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Pre-commit checks"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
codespell:
name: "Check for spelling errors"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
skip: "./include, ./configs"
ignore_words_file: ./support/.codespellignore
# When using this Action in other repos, the --skip option below can be removed

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If you want to manually install app_rpt et al., here is how:

### Compiling

First, detection of the ALSA library needs to be readded to the build system, by applying the following patch: https://github.com/InterLinked1/phreakscript/blob/master/patches/alsa.diff
First, detection of the ALSA library needs to be re-added to the build system, by applying the following patch: https://github.com/InterLinked1/phreakscript/blob/master/patches/alsa.diff

Then, add this near the bottom of `apps/Makefile`:

Expand Down
6 changes: 3 additions & 3 deletions apps/app_gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ a 'portable tent'.
- - QTH
. - X
/ - Dot
0-9 Numerial Boxes
0-9 Numeral Boxes
: - FIRE
? - Portable tent (note different then standard ';')
< - Advisory flag
Expand All @@ -72,7 +72,7 @@ G - Snow Shower
H - Haze
I - Rain Shower (Also TCP-IP)
J - Lightening
J - Lightning
K - School
L - Lighthouse
M - MacAPRS
Expand Down Expand Up @@ -228,7 +228,7 @@ static int sockfd = -1;
* str - delimited string ( will be modified )
* strp- list of pointers to substrings (this is built by this function), NULL will be placed at end of list
* limit- maximum number of substrings to process
* delim- user specified delimeter
* delim- user specified delimiter
* quote- user specified quote for escaping a substring. Set to zero to escape nothing.
*
* Note: This modifies the string str, be suer to save an intact copy if you need it later.
Expand Down
30 changes: 15 additions & 15 deletions apps/app_rpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
* "events" subsystem:
*
* in the "events" section of the rpt.conf file (if any), the user may
* specify actions to take place when ceratin events occur.
* specify actions to take place when certain events occur.
*
* It is implemented as acripting, based heavily upon expression evaluation built
* into Asterisk. Each line of the section contains an action, a type, and variable info.
Expand All @@ -247,11 +247,11 @@
* if type is 'E' (for "evaluate statement" (or perhaps "equals") ) then the var-spec is a full statement containing
* expressions, variables and operators per the expression evaluation built into Asterisk.
* if type is 'T' (for "going True"), var-spec is a single (already-defined) variable name, and the result will be 1
* if the varible has just gone from 0 to 1.
* if the variable has just gone from 0 to 1.
* if type is 'F' (for "going False"), var-spec is a single (already-defined) variable name, and the result will be 1
* if the varible has just gone from 1 to 0.
* if the variable has just gone from 1 to 0.
* if type is 'N' (for "no change"), var-spec is a single (already-defined) variable name, and the result will be 1
* if the varible has not changed.
* if the variable has not changed.
*
* "RANGER" mode configuration:
* in the node stanza in rpt.conf ONLY the following need be specified for a RANGER node:
Expand All @@ -265,7 +265,7 @@
* litzcmd=*32008
*
* This example given would be for node "90101" (note ALL RANGER nodes MUST begin with '9'.
* litzcmd specifes the function that LiTZ inititiates to cause a connection
* litzcmd specifies the function that LiTZ inititiates to cause a connection
* "rangerfunctions" in this example, is a function stanza that AT LEAST has the *3 command
* to connect to another node
*
Expand Down Expand Up @@ -379,7 +379,7 @@
</option>
<option name="D">
<para>Dumb Phone Control mode. This allows a regular phone user to have full control and audio access to the radio system. In this
mode, the PTT is activated for the entire length of the call. For the user to have DTMF control (not generally recomended in
mode, the PTT is activated for the entire length of the call. For the user to have DTMF control (not generally recommended in
this mode), the 'dphone_functions' parameter must be specified for the node in 'rpt.conf'. Otherwise no DTMF control will be
available to the phone user.</para>
</option>
Expand Down Expand Up @@ -809,7 +809,7 @@ void rpt_event_process(struct rpt *myrpt)
if (var1 && (varp == var1p))
cmd = (char *) v->name;
break;
case 'I': /* if didnt exist (initial state) */
case 'I': /* if didn't exist (initial state) */
if (!var1)
cmd = (char *) v->name;
break;
Expand All @@ -835,7 +835,7 @@ void rpt_event_process(struct rpt *myrpt)
if (!cmd) {
continue;
}
if (action == 'F') { /* excecute a function */
if (action == 'F') { /* execute a function */
rpt_mutex_lock(&myrpt->lock);
if ((MAXMACRO - strlen(myrpt->macrobuf)) >= strlen(cmd)) {
ast_verb(3, "Event on node %s doing macro %s for condition %s\n", myrpt->name, cmd, v->value);
Expand All @@ -845,7 +845,7 @@ void rpt_event_process(struct rpt *myrpt)
ast_log(LOG_WARNING, "Could not execute event %s for %s: Macro buffer overflow\n", cmd, argv[1]);
}
rpt_mutex_unlock(&myrpt->lock);
} else if (action == 'C') { /* excecute a command */
} else if (action == 'C') { /* execute a command */
/* make a local copy of the value of this entry */
myval = ast_strdupa(cmd);
/* separate out specification into comma-delimited fields */
Expand Down Expand Up @@ -887,7 +887,7 @@ void rpt_event_process(struct rpt *myrpt)
ast_log(LOG_WARNING, "Could not execute event %s for %s: Command buffer in use\n", cmd, argv[1]);
}
rpt_mutex_unlock(&myrpt->lock);
} else if (action == 'S') { /* excecute a shell command */
} else if (action == 'S') { /* execute a shell command */
char *cp;

ast_verb(3, "Event on node %s doing shell command %s for condition %s\n", myrpt->name, cmd, v->value);
Expand Down Expand Up @@ -1616,7 +1616,7 @@ static inline void handle_callmode_1(struct rpt *myrpt, char c)
rpt_telemetry(myrpt, PROC, NULL);
rpt_mutex_lock(&myrpt->lock);
}
} else { /* othewise, reset timer */
} else { /* otherwise, reset timer */
myrpt->calldigittimer = 1;
}
}
Expand Down Expand Up @@ -1706,7 +1706,7 @@ static void handle_link_data(struct rpt *myrpt, struct rpt_link *mylink, char *s
strcpy(mylink->linklist, tmp + 2);
time(&mylink->linklistreceived);
rpt_mutex_unlock(&myrpt->lock);
ast_debug(7, "@@@@ node %s recieved node list %s from node %s\n", myrpt->name, tmp, mylink->name);
ast_debug(7, "@@@@ node %s received node list %s from node %s\n", myrpt->name, tmp, mylink->name);
return;
}
if (tmp[0] == 'M') {
Expand Down Expand Up @@ -2458,7 +2458,7 @@ static void local_dtmf_helper(struct rpt *myrpt, char c_in)
if (!myrpt->patchquiet)
rpt_telemetry(myrpt, PROC, NULL);
return;
} else { /* othewise, reset timer */
} else { /* otherwise, reset timer */
myrpt->calldigittimer = 1;
}
}
Expand Down Expand Up @@ -3066,7 +3066,7 @@ static inline void periodic_process_links(struct rpt *myrpt, const int elap)
* side should consider either side "keyed" and transmitting... but as I explain below, the lack of sending/receiving
* this can actually lead to a node being improperly keyed).
*
* Ordinarily, the called node will call the send_newkey function (XXX twice, it seems, one of these may be superflous)
* Ordinarily, the called node will call the send_newkey function (XXX twice, it seems, one of these may be superfluous)
* The calling node calls this function once. What this function does is send the text frame NEWKEY1STR to the other side.
* Issue #46 was concerned with a case where this was slightly broken, and the below happened:
* (A = calling node, B = called node)
Expand Down Expand Up @@ -5800,7 +5800,7 @@ static void *rpt_master(void *ignore)
continue;
}
if (rpt_vars[i].outstreamlasterror && time(NULL) < rpt_vars[i].outstreamlasterror + 1) {
/* Command exited immediately. It probably doesn't work, no point in continously
/* Command exited immediately. It probably doesn't work, no point in continuously
* restarting it in a loop. */
ast_log(LOG_ERROR, "outstreamcmd '%s' appears to be broken, disabling\n", rpt_vars[i].p.outstreamcmd);
rpt_vars[i].p.outstreamcmd = NULL;
Expand Down
2 changes: 1 addition & 1 deletion apps/app_rpt/rpt_bridging.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int __rpt_request(void *data, struct ast_format_cap *cap, enum rpt_chan_type cha
* rpt_mutex_lock(&myrpt->lock);
* afterwards,
* if flags & RPT_LINK_CHAN.
* This might not be necessary, but if it is, this should be readded. */
* This might not be necessary, but if it is, this should be re-added. */

rpt_make_call(chan, device, RPT_DIAL_TIME, tech, rpt_chan_app(chantype, flags), rpt_chan_app_data(chantype), myrpt->name);
if (ast_channel_state(chan) != AST_STATE_UP) {
Expand Down
2 changes: 1 addition & 1 deletion apps/app_rpt/rpt_bridging.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int dahdi_write_wait(struct ast_channel *chan);
int dahdi_flush(struct ast_channel *chan);

/*!
* \brief Increase buffer space on DAHDI channel, if needed to accomodate samples
* \brief Increase buffer space on DAHDI channel, if needed to accommodate samples
* \note Only use with DAHDI channels!
* \param chan
* \param samples
Expand Down
4 changes: 2 additions & 2 deletions apps/app_rpt/rpt_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int wait_interval(struct rpt *myrpt, int type, struct ast_channel *chan)
return -1;
}
ast_debug(1, "Delay complete\n");
/* This is not superflous... it's checking the same condition, but it might have gone true again after we exited the first loop, so check. */
/* This is not superfluous... it's checking the same condition, but it might have gone true again after we exited the first loop, so check. */
} while (myrpt->p.holdofftelem && (myrpt->keyed || (myrpt->remrx && (type != DLY_ID))));
return 0;
}
Expand Down Expand Up @@ -339,7 +339,7 @@ int send_morse(struct ast_channel *chan, char *string, int speed, int freq, int

dottime = 900 / speed;

/* Establish timing releationships */
/* Establish timing relationships */

dashtime = dottime * 3;
intralettertime = dottime;
Expand Down
8 changes: 4 additions & 4 deletions apps/app_rpt/rpt_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int function_ilink(struct rpt *myrpt, char *param, char *digits, int command_sou

if (strlen(digitbuf) < 1)
break;
/* if doesnt allow link cmd, or no links active, return */
/* if doesn't allow link cmd, or no links active, return */
if (myrpt->links.next == &myrpt->links)
return DC_COMPLETE;
if ((command_source != SOURCE_RPT) &&
Expand Down Expand Up @@ -626,10 +626,10 @@ int function_remote(struct rpt *myrpt, char *param, char *digitbuf, int command_
return DC_COMPLETE;

case 4: /* set tx PL tone */
/* cant set tx tone on RBI (rx tone does both) */
/* can't set tx tone on RBI (rx tone does both) */
if (!strcmp(myrpt->remoterig, REMOTE_RIG_RBI))
return DC_ERROR;
/* cant set tx tone on ft100 (rx tone does both) */
/* can't set tx tone on ft100 (rx tone does both) */
if (!strcmp(myrpt->remoterig, REMOTE_RIG_FT100))
return DC_ERROR;
/* eventually for the ic706 instead of just throwing the exception
Expand Down Expand Up @@ -717,7 +717,7 @@ int function_remote(struct rpt *myrpt, char *param, char *digitbuf, int command_
return DC_ERROR;
return DC_COMPLETEQUIET;
case 99:
/* cant log in when logged in */
/* can't log in when logged in */
if (myrpt->loginlevel[0])
return DC_ERROR;
*myrpt->loginuser = 0;
Expand Down
4 changes: 2 additions & 2 deletions apps/app_rpt/rpt_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int altlink(struct rpt *myrpt, struct rpt_link *mylink)
return (0);
if ((myrpt->p.duplex == 3) && mylink->phonemode && myrpt->keyed)
return (0);
/* if doesnt qual as a foreign link */
/* if doesn't qual as a foreign link */
if ((mylink->name[0] > '0') && (mylink->name[0] <= '9') &&
(!mylink->phonemode) && strcasecmp(ast_channel_tech(mylink->chan)->type, "echolink")
&& strcasecmp(ast_channel_tech(mylink->chan)->type, "tlb"))
Expand Down Expand Up @@ -156,7 +156,7 @@ int altlink1(struct rpt *myrpt, struct rpt_link *mylink)
}
if ((!myrpt->p.duplex) || (!nonlocals))
return (0);
/* if doesnt qual as a foreign link */
/* if doesn't qual as a foreign link */
if ((mylink->name[0] > '0') && (mylink->name[0] <= '9') &&
(!mylink->phonemode) && strcasecmp(ast_channel_tech(mylink->chan)->type, "echolink")
&& strcasecmp(ast_channel_tech(mylink->chan)->type, "tlb"))
Expand Down
2 changes: 1 addition & 1 deletion apps/app_rpt/rpt_rig.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ char check_tx_freq(struct rpt *myrpt);
/*! \brief Dispatch to correct frequency bumping function */
int multimode_bump_freq(struct rpt *myrpt, int interval);

/*! \brief Queue announcment that scan has been stopped */
/*! \brief Queue announcement that scan has been stopped */
void stop_scan(struct rpt *myrpt);

/*! \brief This is called periodically when in scan mode */
Expand Down
4 changes: 2 additions & 2 deletions apps/app_rpt/rpt_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ int serial_open(char *fname, int speed, int stop2);
/*
* Return receiver ready status
*
* Return 1 if an Rx byte is avalable
* Return 0 if none was avaialable after a time out period
* Return 1 if an Rx byte is available
* Return 0 if none was available after a time out period
* Return -1 if error
*/

Expand Down
2 changes: 1 addition & 1 deletion apps/app_rpt/rpt_telemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,7 @@ void *rpt_tele_thread(void *this)
#ifdef HAVE_SYS_IO
if (ioperm(myrpt->p.iobase, 1, 1) == -1) {
rpt_mutex_unlock(&myrpt->lock);
ast_log(LOG_WARNING, "Cant get io permission on IO port %x hex\n", myrpt->p.iobase);
ast_log(LOG_WARNING, "Can't get io permission on IO port %x hex\n", myrpt->p.iobase);
res = -1;
} else {
res = setrbi(myrpt);
Expand Down
2 changes: 1 addition & 1 deletion apps/app_rpt/rpt_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int matchkeyword(char *string, char **param, char *keywords[]);
* str - delimited string ( will be modified )
* strp- list of pointers to substrings (this is built by this function), NULL will be placed at end of list
* limit- maximum number of substrings to process
* delim- user specified delimeter
* delim- user specified delimiter
* quote- user specified quote for escaping a substring. Set to zero to escape nothing.
*
* Note: This modifies the string str, be suer to save an intact copy if you need it later.
Expand Down
12 changes: 6 additions & 6 deletions channels/chan_echolink.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ do not use 127.0.0.1
* To request a differential compressed directory send:
* FSSS0x0d
* Where F is a literal
* SSS is the last snap shot id received. This will initally be a zero length string.
* SSS is the last snap shot id received. This will initially be a zero length string.
*
* The first 4 bytes of the returned data determine if the download is full or compressed.
* @@@ indicates an uncompressed list, while DDD indicates an uncompressed differential.
Expand Down Expand Up @@ -1669,7 +1669,7 @@ static int el_text(struct ast_channel *ast, const char *text)

if (!strcasecmp(cmd, "D")) {
snprintf(str, sizeof(str), "3%06u", pvt->nodenum);
/* if not for this one, we cant go any farther */
/* if not for this one, we can't go any farther */
if (strcmp(arg1, str)) {
return 0;
}
Expand Down Expand Up @@ -1938,7 +1938,7 @@ static void free_node(void *nodep)

/*!
* \brief Find and delete a node from our internal node list.
* \param key Poitner to Echolink node struct to delete.
* \param key Pointer to Echolink node struct to delete.
* \retval 0 If node not found.
* \retval 1 If node found.
*/
Expand Down Expand Up @@ -1968,7 +1968,7 @@ static int find_delete(const struct el_node *key)
* o.rec (turn on/off recording)
* \param buf Pointer to buffer with command data.
* \param fromip Pointer to ip address that sent the command.
* \param instp Poiner to Echolink instance.
* \param instp Pointer to Echolink instance.
*/
static void process_cmd(char *buf, int buf_len, const char *fromip, struct el_instance *instp)
{
Expand Down Expand Up @@ -3088,7 +3088,7 @@ static int do_el_directory(const char *hostname)

/*!
* \brief Echolink directory retriever thread.
* This thread is responsible for retreiving a directory of user registrations from
* This thread is responsible for retrieving a directory of user registrations from
* the echolink servers. This is necessary to validate connecting users and
* have the ip address available for outbound connections.
*
Expand Down Expand Up @@ -3149,7 +3149,7 @@ static void *el_directory(void *data)
* This thread is responsible for registering an instance with
* the echolink servers.
* This routine generally runs every 360 seconds.
* \param data Pointer to struct el_instance data passsed to this thread.
* \param data Pointer to struct el_instance data passed to this thread.
*/
static void *el_register(void *data)
{
Expand Down
6 changes: 3 additions & 3 deletions channels/chan_simpleusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ static int load_tune_config(struct chan_simpleusb_pvt *o, const struct ast_confi
* the USB device.
*
* The CM-XXX USB devices can support up to 8 GPIO pins that can be input or output.
* It continously polls the input GPIO pins on the device to see if they have changed.
* It continuously polls the input GPIO pins on the device to see if they have changed.
* The default GPIOs for COS, and CTCSS provide the basic functionality. An asterisk
* text frame is raised in the format 'GPIO%d %d' when GPIOs change. Polling generally
* occurs every 50 milliseconds.
Expand Down Expand Up @@ -1102,7 +1102,7 @@ static void *hidthread(void *arg)
ast_radio_time(&o->lasthidtime);
/* Main processing loop for GPIO
* This loop process every 50 milliseconds.
* The timer can be interupted by writing to
* The timer can be interrupted by writing to
* the pttkick pipe.
*/
while ((!o->stophid) && o->hasusb) {
Expand Down Expand Up @@ -2771,7 +2771,7 @@ static int usb_device_swap(int fd, const char *other)
return -1;
}
if (p == o) {
ast_cli(fd, "You cant swap active device with itself!!\n");
ast_cli(fd, "You can't swap active device with itself!!\n");
return -1;
}
ast_mutex_lock(&usb_dev_lock);
Expand Down
Loading

0 comments on commit f470965

Please sign in to comment.