summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Zoë Blade <zoe@bytenoise.co.uk>2019-10-21 09:31:13 +0100
committer Vas Crabb <cuavas@users.noreply.github.com>2019-10-21 19:40:49 +1100
commit5854f09b4dad2516691571226a99efa7ff90e465 (patch)
treed9d2061e10ba3ab392d5caaaf882b1acf3fa182e /src
parent62925267225a4bf5d743310dc83c8983309864a8 (diff)
Fix spelling, tidy whitespace
Diffstat (limited to 'src')
-rw-r--r--src/lib/formats/cbm_tap.cpp4
-rw-r--r--src/lib/util/sha1.cpp26
-rw-r--r--src/lib/util/unicode.cpp2
-rw-r--r--src/tools/imgtool/modules/ti99.cpp8
-rw-r--r--src/tools/imgtool/modules/ti990hd.cpp61
5 files changed, 50 insertions, 51 deletions
diff --git a/src/lib/formats/cbm_tap.cpp b/src/lib/formats/cbm_tap.cpp
index 2699ab51ec0..e621651f577 100644
--- a/src/lib/formats/cbm_tap.cpp
+++ b/src/lib/formats/cbm_tap.cpp
@@ -60,11 +60,11 @@ pulse length is determined by the following formula:
A data value of $00 represents an "overflow" condition, any pulse length
which is more that 255 * 8 in length.
- The value of "clock cylces" from above (985248) is based on the PAL
+ The value of "clock cycles" from above (985248) is based on the PAL
value. Since this file format was developed in Europe, which is
predominantly PAL video, this is only logical. The NTSC value would be
1022730, which is very close to the PAL, and therefore won't cause a
-compatability problem converting European and NTSC tapes. I would stick to
+compatibility problem converting European and NTSC tapes. I would stick to
using the PAL value just in case.
diff --git a/src/lib/util/sha1.cpp b/src/lib/util/sha1.cpp
index f1f00a60310..fcda6ff9995 100644
--- a/src/lib/util/sha1.cpp
+++ b/src/lib/util/sha1.cpp
@@ -174,7 +174,7 @@ sha1_transform(uint32_t *state, uint32_t *data)
D = state[3];
E = state[4];
- /* Heavy mangling, in 4 sub-rounds of 20 interations each. */
+ /* Heavy mangling, in 4 sub-rounds of 20 iterations each. */
subRound( A, B, C, D, E, f1, K1, data[ 0] );
subRound( E, A, B, C, D, f1, K1, data[ 1] );
subRound( D, E, A, B, C, f1, K1, data[ 2] );
@@ -427,17 +427,17 @@ sha1_digest(const struct sha1_ctx *ctx,
word = ctx->digest[i];
switch (leftover)
- {
- default:
- /* this is just here to keep the compiler happy; it can never happen */
- case 3:
- digest[--j] = (word >> 8) & 0xff;
- /* Fall through */
- case 2:
- digest[--j] = (word >> 16) & 0xff;
- /* Fall through */
- case 1:
- digest[--j] = (word >> 24) & 0xff;
- }
+ {
+ default:
+ /* this is just here to keep the compiler happy; it can never happen */
+ case 3:
+ digest[--j] = (word >> 8) & 0xff;
+ /* Fall through */
+ case 2:
+ digest[--j] = (word >> 16) & 0xff;
+ /* Fall through */
+ case 1:
+ digest[--j] = (word >> 24) & 0xff;
+ }
}
}
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index 8e6478beee3..4a83b675087 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -195,7 +195,7 @@ int uchar_from_utf8(char32_t *uchar, const char *utf8char, size_t count)
{
char32_t const auxchar = (unsigned char)utf8char[i];
- // all auxillary chars must be between 0x80-0xbf
+ // all auxiliary chars must be between 0x80-0xbf
if ((auxchar & 0xc0) != 0x80)
return -1;
diff --git a/src/tools/imgtool/modules/ti99.cpp b/src/tools/imgtool/modules/ti99.cpp
index 04881c7b5ef..5c3d66e0c22 100644
--- a/src/tools/imgtool/modules/ti99.cpp
+++ b/src/tools/imgtool/modules/ti99.cpp
@@ -166,7 +166,7 @@
The DSK disk structure is used for floppy disks, and a few RAMDISKs as
well. It supports 1600 AUs and 16 MBytes at most (the 16 MByte value is a
- theorical maximum, as I doubt anyone has ever created so big a DSK volume).
+ theoretical maximum, as I doubt anyone has ever created so big a DSK volume).
The disk sector size is always 256 bytes (the only potential exceptions are
the SCSI floppy disk units and the TI-99 simulator on TI-990, but I don't
@@ -524,7 +524,7 @@ struct dsk_vib
/* the allocation unit associated with that */
/* bit has been allocated. */
/* Bits corresponding to system reserved AUs, */
- /* non-existant AUs, and bad AUs, are set to one, too. */
+ /* non-existent AUs, and bad AUs, are set to one, too. */
/* (AU 0 is associated to LSBit of byte 0, */
/* AU 7 to MSBit of byte 0, AU 8 to LSBit */
/* of byte 1, etc.) */
@@ -1579,7 +1579,7 @@ struct dsk_fdr
/* implementation is regarded as a bug because */
/* program files do not define the fixrecs field */
/* field, so program field saved by the HFDC */
- /* DSR may be larger whan they should. */
+ /* DSR may be larger than they should. */
uint8_t eof; /* EOF offset in last physrec for variable length */
/* record files and program files (0->256)*/
uint8_t reclen; /* logical record size in bytes ([1,255] 0->256) */
@@ -5090,7 +5090,7 @@ static imgtoolerr_t win_image_deletefile(imgtool::partition &partition, const ch
/* check integrity of FDR sibling chain, and go to last sibling */
/* note that as we check that the back chain is consistent with the forward
chain, we will also detect any cycle in the sibling chain, so we do not
- need to check against them explicitely */
+ need to check against them explicitly */
{
int pastendoflist_flag;
unsigned prevfdr_aphysrec;
diff --git a/src/tools/imgtool/modules/ti990hd.cpp b/src/tools/imgtool/modules/ti990hd.cpp
index 8edaeaf3fb6..96866fdd13a 100644
--- a/src/tools/imgtool/modules/ti990hd.cpp
+++ b/src/tools/imgtool/modules/ti990hd.cpp
@@ -96,7 +96,7 @@ enum
Track 1 Sector 0 through N-2: optional disk program image loader
Track 1 Sector N-1: copy of Track 0 Sector 0
Track 1 Sector N: copy of Track 0 Sector 1
- Last cylinder has disagnostic information (reported as .S$DIAG)
+ Last cylinder has diagnostic information (reported as .S$DIAG)
Remaining sectors are used for fdr and data.
*/
@@ -214,7 +214,7 @@ struct ti990_fdr
UINT16BE hkc; /* hask key count: the number of file descriptor records that are present in the directory that hashed to this record number */
UINT16BE hkv; /* hask key value: the result of the hash algorithm for the file name actually covered in this record */
char fnm[8]; /* file name */
- uint8_t rsv[2]; /* reserved */
+ uint8_t rsv[2]; /* reserved */
UINT16BE fl1; /* flags word 1 */
UINT16BE flg; /* flags word 2 */
UINT16BE prs; /* physical record size */
@@ -227,31 +227,31 @@ struct ti990_fdr
UINT32BE eom; /* end of medium record number */
UINT32BE bkm; /* end of medium block number */
UINT16BE ofm; /* end of medium offset / */
- /* prelog number for KIF */
+ /* prelog number for KIF */
UINT32BE fbq; /* free block queue head */
UINT16BE btr; /* B-tree roots block # */
UINT32BE ebq; /* empty block queue head */
UINT16BE kdr; /* key descriptions record # */
- uint8_t ud[6]; /* last update date */
- uint8_t cd[6]; /* creation date */
- uint8_t apb; /* ADU's per block */
- uint8_t bpa; /* blocks per ADU */
- UINT16BE mrs; /* minimumu KIF record size */
- uint8_t sat[64]; /* secondary allocation table: 16 2-word entries. The first word of an entry contains the size, in ADUs, of the secondary allocation. The second word contains the starting ADU of the allocation. */
+ uint8_t ud[6]; /* last update date */
+ uint8_t cd[6]; /* creation date */
+ uint8_t apb; /* ADU's per block */
+ uint8_t bpa; /* blocks per ADU */
+ UINT16BE mrs; /* minimum KIF record size */
+ uint8_t sat[64]; /* secondary allocation table: 16 2-word entries. The first word of an entry contains the size, in ADUs, of the secondary allocation. The second word contains the starting ADU of the allocation. */
/* bytes >86 to >100 are optional */
- uint8_t res[10]; /* reserved: seem to be actually meaningful (at least under DX10 3.6.x) */
+ uint8_t res[10]; /* reserved: seem to be actually meaningful (at least under DX10 3.6.x) */
char uid[8]; /* user id of file creator */
UINT16BE psa; /* public security attribute */
ti990_ace ace[9]; /* 9 access control entries */
- uint8_t fil[2]; /* not used */
+ uint8_t fil[2]; /* not used */
};
/*
ADR record: variant of FDR for Aliases
The fields marked here with *** are in the ADR template to maintain
- compatability with the FDR template.
+ compatibility with the FDR template.
*/
struct ti990_adr
{
@@ -284,19 +284,19 @@ struct ti990_cdr
UINT16BE fill00; /* reserved */
UINT16BE fill01; /* reserved */
UINT16BE fdf; /* flags (same as fdr.flg) */
- uint8_t flg; /* channel flzgs */
- uint8_t iid; /* owner task installed ID */
- uint8_t typ; /* default resource type */
- uint8_t tf; /* resource type flags */
+ uint8_t flg; /* channel flzgs */
+ uint8_t iid; /* owner task installed ID */
+ uint8_t typ; /* default resource type */
+ uint8_t tf; /* resource type flags */
UINT16BE mxl; /* maximum message length */
- uint8_t fill04[6]; /* reserved (and, no, I don't know where fill02 and fill03 have gone) */
+ uint8_t fill04[6]; /* reserved (and, no, I don't know where fill02 and fill03 have gone) */
UINT16BE rna; /* record number of next CDR or ADR */
UINT16BE raf; /* record # of actual FDR */
- uint8_t fill05[110]; /* reserved */
+ uint8_t fill05[110]; /* reserved */
char uid[8]; /* user ID of channel creator */
UINT16BE psa; /* public security attribute */
- uint8_t scg[94]; /* "SDT with 9 control groups" (whatever it means - and, no, 94 is not dividable by 9) */
- uint8_t fill06[8]; /* reserved */
+ uint8_t scg[94]; /* "SDT with 9 control groups" (whatever it means - and, no, 94 is not dividable by 9) */
+ uint8_t fill06[8]; /* reserved */
};
/*
@@ -321,19 +321,18 @@ union directory_entry
*/
struct tifile_header
{
- char tifiles[8]; /* always '\7TIFILES' */
- uint8_t secsused_MSB; /* file length in sectors (big-endian) */
- uint8_t secsused_LSB;
- uint8_t flags; /* see enum above */
- uint8_t recspersec; /* records per sector */
- uint8_t eof; /* current position of eof in last sector (0->255)*/
- uint8_t reclen; /* bytes per record ([1,255] 0->256) */
- uint8_t fixrecs_MSB; /* file length in records (big-endian) */
- uint8_t fixrecs_LSB;
- uint8_t res[128-16]; /* reserved */
+ char tifiles[8]; /* always '\7TIFILES' */
+ uint8_t secsused_MSB; /* file length in sectors (big-endian) */
+ uint8_t secsused_LSB;
+ uint8_t flags; /* see enum above */
+ uint8_t recspersec; /* records per sector */
+ uint8_t eof; /* current position of eof in last sector (0->255)*/
+ uint8_t reclen; /* bytes per record ([1,255] 0->256) */
+ uint8_t fixrecs_MSB; /* file length in records (big-endian) */
+ uint8_t fixrecs_LSB;
+ uint8_t res[128-16]; /* reserved */
};
-
/*
catalog entry (used for in-memory catalog)
*/