Skip to content

Commit 19d8b8a

Browse files
committed
Spelling fixes in C comments only
1 parent 1b9935c commit 19d8b8a

19 files changed

+48
-48
lines changed

arm-gen.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ struct avail_regs {
813813
and the parameter is a single float.
814814
815815
avregs: opaque structure to keep track of available VFP co-processor regs
816-
align: alignment contraints for the param, as returned by type_size()
816+
align: alignment constraints for the param, as returned by type_size()
817817
size: size of the parameter, as returned by type_size() */
818818
int assign_vfpreg(struct avail_regs *avregs, int align, int size)
819819
{
@@ -823,7 +823,7 @@ int assign_vfpreg(struct avail_regs *avregs, int align, int size)
823823
return -1;
824824
if (align >> 3) { /* double alignment */
825825
first_reg = avregs->first_free_reg;
826-
/* alignment contraint not respected so use next reg and record hole */
826+
/* alignment constraint not respected so use next reg and record hole */
827827
if (first_reg & 1)
828828
avregs->avail[avregs->last_hole++] = first_reg++;
829829
} else { /* no special alignment (float or array of float) */
@@ -1653,7 +1653,7 @@ static int is_zero(int i)
16531653
}
16541654

16551655
/* generate a floating point operation 'v = t1 op t2' instruction. The
1656-
* two operands are guaranted to have the same floating point type */
1656+
* two operands are guaranteed to have the same floating point type */
16571657
void gen_opf(int op)
16581658
{
16591659
uint32_t x;

arm-link.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int code_reloc (int reloc_type)
6262
return -1;
6363
}
6464

65-
/* Returns an enumerator to describe wether and when the relocation needs a
65+
/* Returns an enumerator to describe whether and when the relocation needs a
6666
GOT and/or PLT entry to be created. See tcc.h for a description of the
6767
different values. */
6868
int gotplt_entry_type (int reloc_type)
@@ -109,7 +109,7 @@ ST_FUNC unsigned create_plt_entry(TCCState *s1, unsigned got_offset, struct sym_
109109
unsigned plt_offset;
110110

111111
/* when building a DLL, GOT entry accesses must be done relative to
112-
start of GOT (see x86_64 examble above) */
112+
start of GOT (see x86_64 example above) */
113113
if (s1->output_type == TCC_OUTPUT_DLL)
114114
tcc_error("DLLs unimplemented!");
115115

arm64-link.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int code_reloc (int reloc_type)
5151
return -1;
5252
}
5353

54-
/* Returns an enumerator to describe wether and when the relocation needs a
54+
/* Returns an enumerator to describe whether and when the relocation needs a
5555
GOT and/or PLT entry to be created. See tcc.h for a description of the
5656
different values. */
5757
int gotplt_entry_type (int reloc_type)

c67-gen.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ void gen_opi(int op)
22252225
r = vtop[-1].r;
22262226
fr = vtop[0].r;
22272227
vtop--;
2228-
C67_MPYI(fr, r); // 32 bit bultiply fr,r,fr
2228+
C67_MPYI(fr, r); // 32 bit multiply fr,r,fr
22292229
C67_NOP(8); // NOP 8 for worst case
22302230
break;
22312231
case TOK_SHL:
@@ -2282,7 +2282,7 @@ void gen_opi(int op)
22822282
}
22832283

22842284
/* generate a floating point operation 'v = t1 op t2' instruction. The
2285-
two operands are guaranted to have the same floating point type */
2285+
two operands are guaranteed to have the same floating point type */
22862286
/* XXX: need to use ST1 too */
22872287
void gen_opf(int op)
22882288
{

c67-link.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int code_reloc (int reloc_type)
4444
return -1;
4545
}
4646

47-
/* Returns an enumerator to describe wether and when the relocation needs a
47+
/* Returns an enumerator to describe whether and when the relocation needs a
4848
GOT and/or PLT entry to be created. See tcc.h for a description of the
4949
different values. */
5050
int gotplt_entry_type (int reloc_type)

coff.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct filehdr {
2222
/*------------------------------------------------------------------------*/
2323
#define F_RELFLG 0x01 /* relocation info stripped from file */
2424
#define F_EXEC 0x02 /* file is executable (no unresolved refs) */
25-
#define F_LNNO 0x04 /* line nunbers stripped from file */
25+
#define F_LNNO 0x04 /* line numbers stripped from file */
2626
#define F_LSYMS 0x08 /* local symbols stripped from file */
2727
#define F_GSP10 0x10 /* 34010 version */
2828
#define F_GSP20 0x20 /* 34020 version */

elf.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ typedef struct
221221
#define EM_68HC12 53 /* Motorola M68HC12 */
222222
#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/
223223
#define EM_PCP 55 /* Siemens PCP */
224-
#define EM_NCPU 56 /* Sony nCPU embeeded RISC */
224+
#define EM_NCPU 56 /* Sony nCPU embedded RISC */
225225
#define EM_NDR1 57 /* Denso NDR1 microprocessor */
226226
#define EM_STARCORE 58 /* Motorola Start*Core processor */
227227
#define EM_ME16 59 /* Toyota ME16 processor */
@@ -342,7 +342,7 @@ typedef struct
342342
#define SHT_FINI_ARRAY 15 /* Array of destructors */
343343
#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */
344344
#define SHT_GROUP 17 /* Section group */
345-
#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */
345+
#define SHT_SYMTAB_SHNDX 18 /* Extended section indices */
346346
#define SHT_NUM 19 /* Number of defined types. */
347347
#define SHT_LOOS 0x60000000 /* Start OS-specific. */
348348
#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */
@@ -871,7 +871,7 @@ typedef struct
871871
#define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */
872872
#define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */
873873

874-
/* Auxialiary version information. */
874+
/* Auxiliary version information. */
875875

876876
typedef struct
877877
{
@@ -1776,9 +1776,9 @@ typedef Elf32_Addr Elf32_Conflict;
17761776
#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
17771777
#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */
17781778

1779-
/* Additional section indeces. */
1779+
/* Additional section indices. */
17801780

1781-
#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
1781+
#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tentatively declared
17821782
symbols in ANSI C. */
17831783
#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */
17841784

@@ -1957,7 +1957,7 @@ typedef Elf32_Addr Elf32_Conflict;
19571957

19581958
/* Legal values for sh_type field of Elf64_Shdr. */
19591959

1960-
/* These two are primerily concerned with ECOFF debugging info. */
1960+
/* These two are primarily concerned with ECOFF debugging info. */
19611961
#define SHT_ALPHA_DEBUG 0x70000001
19621962
#define SHT_ALPHA_REGINFO 0x70000002
19631963

i386-asm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ ST_FUNC void subst_asm_operand(CString *add_str,
14731473
if (r & VT_SYM) {
14741474
const char *name = get_tok_str(sv->sym->v, NULL);
14751475
if (sv->sym->v >= SYM_FIRST_ANOM) {
1476-
/* In case of anonymuous symbols ("L.42", used
1476+
/* In case of anonymous symbols ("L.42", used
14771477
for static data labels) we can't find them
14781478
in the C symbol table when later looking up
14791479
this name. So enter them now into the asm label

i386-gen.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ST_FUNC void gen_addrpc32(int r, Sym *sym, long c)
174174
gen_le32(c - 4);
175175
}
176176

177-
/* generate a modrm reference. 'op_reg' contains the addtionnal 3
177+
/* generate a modrm reference. 'op_reg' contains the addtional 3
178178
opcode bits */
179179
static void gen_modrm(int op_reg, int r, Sym *sym, int c)
180180
{
@@ -890,7 +890,7 @@ ST_FUNC void gen_opi(int op)
890890
}
891891

892892
/* generate a floating point operation 'v = t1 op t2' instruction. The
893-
two operands are guaranted to have the same floating point type */
893+
two operands are guaranteed to have the same floating point type */
894894
/* XXX: need to use ST1 too */
895895
ST_FUNC void gen_opf(int op)
896896
{

i386-link.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int code_reloc (int reloc_type)
4949
return -1;
5050
}
5151

52-
/* Returns an enumerator to describe wether and when the relocation needs a
52+
/* Returns an enumerator to describe whether and when the relocation needs a
5353
GOT and/or PLT entry to be created. See tcc.h for a description of the
5454
different values. */
5555
int gotplt_entry_type (int reloc_type)
@@ -99,7 +99,7 @@ ST_FUNC unsigned create_plt_entry(TCCState *s1, unsigned got_offset, struct sym_
9999
else
100100
modrm = 0x25;
101101

102-
/* empty PLT: create PLT0 entry that pushes the library indentifier
102+
/* empty PLT: create PLT0 entry that pushes the library identifier
103103
(GOT + PTR_SIZE) and jumps to ld.so resolution routine
104104
(GOT + 2 * PTR_SIZE) */
105105
if (plt->data_offset == 0) {
@@ -229,9 +229,9 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
229229
/* do nothing */
230230
return;
231231
case R_386_COPY:
232-
/* This reloction must copy initialized data from the library
232+
/* This relocation must copy initialized data from the library
233233
to the program .bss segment. Currently made like for ARM
234-
(to remove noise of defaukt case). Is this true?
234+
(to remove noise of default case). Is this true?
235235
*/
236236
return;
237237
default:

il-gen.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ void gen_opi(int op)
602602
}
603603

604604
/* generate a floating point operation 'v = t1 op t2' instruction. The
605-
two operands are guaranted to have the same floating point type */
605+
two operands are guaranteed to have the same floating point type */
606606
void gen_opf(int op)
607607
{
608608
/* same as integer */

libtcc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ PUB_FUNC int tcc_add_library_err(TCCState *s, const char *libname)
11761176
return ret;
11771177
}
11781178

1179-
/* habdle #pragma comment(lib,) */
1179+
/* handle #pragma comment(lib,) */
11801180
ST_FUNC void tcc_add_pragma_libs(TCCState *s1)
11811181
{
11821182
int i;
@@ -1287,7 +1287,7 @@ static int link_option(const char *str, const char *val, const char **ptr)
12871287
if (*str == '-')
12881288
str++;
12891289

1290-
/* then str & val should match (potentialy up to '=') */
1290+
/* then str & val should match (potentially up to '=') */
12911291
p = str;
12921292
q = val;
12931293

tcc.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ typedef struct ExprValue {
601601

602602
#define MAX_ASM_OPERANDS 30
603603
typedef struct ASMOperand {
604-
int id; /* GCC 3 optionnal identifier (0 if number only supported */
604+
int id; /* GCC 3 optional identifier (0 if number only supported */
605605
char *constraint;
606606
char asm_str[16]; /* computed asm string for operand */
607607
SValue *vt; /* C value of the expression */
@@ -651,7 +651,7 @@ struct TCCState {
651651
int char_is_unsigned;
652652
int leading_underscore;
653653
int ms_extensions; /* allow nested named struct w/o identifier behave like unnamed */
654-
int dollars_in_identifiers; /* allows '$' char in indentifiers */
654+
int dollars_in_identifiers; /* allows '$' char in identifiers */
655655
int ms_bitfields; /* if true, emulate MS algorithm for aligning bitfields */
656656

657657
/* warning switches */
@@ -768,7 +768,7 @@ struct TCCState {
768768
Section *dynsymtab_section;
769769
/* exported dynamic symbol section */
770770
Section *dynsym;
771-
/* copy of the gobal symtab_section variable */
771+
/* copy of the global symtab_section variable */
772772
Section *symtab;
773773
/* extra attributes (eg. GOT/PLT value) for symtab symbols */
774774
struct sym_attr *sym_attrs;
@@ -945,7 +945,7 @@ struct filespec {
945945
#define TOK_SHL 0x01 /* shift left */
946946
#define TOK_SAR 0x02 /* signed shift right */
947947

948-
/* assignement operators : normal operator or 0x80 */
948+
/* assignment operators : normal operator or 0x80 */
949949
#define TOK_A_MOD 0xa5
950950
#define TOK_A_AND 0xa6
951951
#define TOK_A_MUL 0xaa
@@ -968,7 +968,7 @@ struct filespec {
968968
#define TOK_EOF (-1) /* end of file */
969969
#define TOK_LINEFEED 10 /* line feed */
970970

971-
/* all identificators and strings have token above that */
971+
/* all identifiers and strings have token above that */
972972
#define TOK_IDENT 256
973973

974974
#define DEF_ASM(x) DEF(TOK_ASM_ ## x, #x)
@@ -1241,7 +1241,7 @@ ST_FUNC int tcc_preprocess(TCCState *s1);
12411241
ST_FUNC void skip(int c);
12421242
ST_FUNC NORETURN void expect(const char *msg);
12431243

1244-
/* space exlcuding newline */
1244+
/* space excluding newline */
12451245
static inline int is_space(int ch) {
12461246
return ch == ' ' || ch == '\t' || ch == '\v' || ch == '\f' || ch == '\r';
12471247
}

tccelf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh
151151
sec->sh_addralign = 1;
152152
break;
153153
default:
154-
sec->sh_addralign = PTR_SIZE; /* gcc/pcc default aligment */
154+
sec->sh_addralign = PTR_SIZE; /* gcc/pcc default alignment */
155155
break;
156156
}
157157

tccgen.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ ST_FUNC void tccgen_end(TCCState *s1)
257257
}
258258

259259
/* ------------------------------------------------------------------------- */
260-
/* apply storage attibutes to Elf symbol */
260+
/* apply storage attributes to Elf symbol */
261261

262262
static void update_storage(Sym *sym)
263263
{
@@ -1532,7 +1532,7 @@ static void gen_opl(int op)
15321532
c = (int)vtop->c.i;
15331533
/* constant: simpler */
15341534
/* NOTE: all comments are for SHL. the other cases are
1535-
done by swaping words */
1535+
done by swapping words */
15361536
vpop();
15371537
if (op != TOK_SHL)
15381538
vswap();
@@ -1973,7 +1973,7 @@ ST_FUNC void gen_op(int op)
19731973
goto redo;
19741974
} else if (bt1 == VT_PTR || bt2 == VT_PTR) {
19751975
/* at least one operand is a pointer */
1976-
/* relationnal op: must be both pointers */
1976+
/* relational op: must be both pointers */
19771977
if (op >= TOK_ULT && op <= TOK_LOR) {
19781978
check_comparison_pointer_types(vtop - 1, vtop, op);
19791979
/* pointers are handled are unsigned */
@@ -2137,7 +2137,7 @@ ST_FUNC void gen_op(int op)
21372137
else
21382138
gen_opic(op);
21392139
if (op >= TOK_ULT && op <= TOK_GT) {
2140-
/* relationnal op: the result is an int */
2140+
/* relational op: the result is an int */
21412141
vtop->type.t = VT_INT;
21422142
} else {
21432143
vtop->type.t = t;
@@ -2794,7 +2794,7 @@ static void gen_assign_cast(CType *dt)
27942794
goto type_ok;
27952795
}
27962796
type1 = pointed_type(dt);
2797-
/* a function is implicitely a function pointer */
2797+
/* a function is implicitly a function pointer */
27982798
if (sbt == VT_FUNC) {
27992799
if ((type1->t & VT_BTYPE) != VT_VOID &&
28002800
!is_compatible_types(pointed_type(dt), st))
@@ -6086,7 +6086,7 @@ static void init_putv(CType *type, Section *sec, unsigned long c)
60866086
}
60876087
if ((vtop->r & (VT_SYM|VT_CONST)) == (VT_SYM|VT_CONST) &&
60886088
vtop->sym->v >= SYM_FIRST_ANOM &&
6089-
/* XXX This rejects compount literals like
6089+
/* XXX This rejects compound literals like
60906090
'(void *){ptr}'. The problem is that '&sym' is
60916091
represented the same way, which would be ruled out
60926092
by the SYM_FIRST_ANOM check above, but also '"string"'

tccpe.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ static int pe_check_symbols(struct pe_info *pe)
13331333
#ifdef PE_PRINT_SECTIONS
13341334
static void pe_print_section(FILE * f, Section * s)
13351335
{
1336-
/* just if you'r curious */
1336+
/* just if you're curious */
13371337
BYTE *p, *e, b;
13381338
int i, n, l, m;
13391339
p = s->data;
@@ -1976,7 +1976,7 @@ ST_FUNC int pe_output_file(TCCState *s1, const char *filename)
19761976

19771977
tcc_add_bcheck(s1);
19781978
pe_add_runtime(s1, &pe);
1979-
relocate_common_syms(); /* assign bss adresses */
1979+
relocate_common_syms(); /* assign bss addresses */
19801980
tcc_add_linker_symbols(s1);
19811981
pe_set_options(s1, &pe);
19821982

tccpp.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2993,10 +2993,10 @@ static int *macro_arg_subst(Sym **nested_list, const int *macro_str, Sym *args)
29932993
} else {
29942994
add_var:
29952995
/* NOTE: the stream cannot be read when macro
2996-
substituing an argument */
2996+
substituting an argument */
29972997
macro_subst(&str, nested_list, st, 0);
29982998
}
2999-
if (str.len == l0) /* exanded to empty string */
2999+
if (str.len == l0) /* expanded to empty string */
30003000
tok_str_add(&str, TOK_PLCHLDR);
30013001
} else {
30023002
tok_str_add(&str, t);

x86_64-gen.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ static void gen_modrm_impl(int op_reg, int r, Sym *sym, int c, int is_got)
316316
}
317317
}
318318

319-
/* generate a modrm reference. 'op_reg' contains the addtionnal 3
319+
/* generate a modrm reference. 'op_reg' contains the addtional 3
320320
opcode bits */
321321
static void gen_modrm(int op_reg, int r, Sym *sym, int c)
322322
{
323323
gen_modrm_impl(op_reg, r, sym, c, 0);
324324
}
325325

326-
/* generate a modrm reference. 'op_reg' contains the addtionnal 3
326+
/* generate a modrm reference. 'op_reg' contains the addtional 3
327327
opcode bits */
328328
static void gen_modrm64(int opcode, int op_reg, int r, Sym *sym, int c)
329329
{
@@ -1923,7 +1923,7 @@ void gen_opl(int op)
19231923
}
19241924

19251925
/* generate a floating point operation 'v = t1 op t2' instruction. The
1926-
two operands are guaranted to have the same floating point type */
1926+
two operands are guaranteed to have the same floating point type */
19271927
/* XXX: need to use ST1 too */
19281928
void gen_opf(int op)
19291929
{

0 commit comments

Comments
 (0)