Skip to content

Commit

Permalink
Spelling fixes in C comments only
Browse files Browse the repository at this point in the history
  • Loading branch information
ldoolitt committed May 8, 2017
1 parent 1b9935c commit 19d8b8a
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions arm-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ struct avail_regs {
and the parameter is a single float.
avregs: opaque structure to keep track of available VFP co-processor regs
align: alignment contraints for the param, as returned by type_size()
align: alignment constraints for the param, as returned by type_size()
size: size of the parameter, as returned by type_size() */
int assign_vfpreg(struct avail_regs *avregs, int align, int size)
{
Expand All @@ -823,7 +823,7 @@ int assign_vfpreg(struct avail_regs *avregs, int align, int size)
return -1;
if (align >> 3) { /* double alignment */
first_reg = avregs->first_free_reg;
/* alignment contraint not respected so use next reg and record hole */
/* alignment constraint not respected so use next reg and record hole */
if (first_reg & 1)
avregs->avail[avregs->last_hole++] = first_reg++;
} else { /* no special alignment (float or array of float) */
Expand Down Expand Up @@ -1653,7 +1653,7 @@ static int is_zero(int i)
}

/* generate a floating point operation 'v = t1 op t2' instruction. The
* two operands are guaranted to have the same floating point type */
* two operands are guaranteed to have the same floating point type */
void gen_opf(int op)
{
uint32_t x;
Expand Down
4 changes: 2 additions & 2 deletions arm-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int code_reloc (int reloc_type)
return -1;
}

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

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

Expand Down
2 changes: 1 addition & 1 deletion arm64-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int code_reloc (int reloc_type)
return -1;
}

/* Returns an enumerator to describe wether and when the relocation needs a
/* Returns an enumerator to describe whether and when the relocation needs a
GOT and/or PLT entry to be created. See tcc.h for a description of the
different values. */
int gotplt_entry_type (int reloc_type)
Expand Down
4 changes: 2 additions & 2 deletions c67-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,7 @@ void gen_opi(int op)
r = vtop[-1].r;
fr = vtop[0].r;
vtop--;
C67_MPYI(fr, r); // 32 bit bultiply fr,r,fr
C67_MPYI(fr, r); // 32 bit multiply fr,r,fr
C67_NOP(8); // NOP 8 for worst case
break;
case TOK_SHL:
Expand Down Expand Up @@ -2282,7 +2282,7 @@ void gen_opi(int op)
}

/* generate a floating point operation 'v = t1 op t2' instruction. The
two operands are guaranted to have the same floating point type */
two operands are guaranteed to have the same floating point type */
/* XXX: need to use ST1 too */
void gen_opf(int op)
{
Expand Down
2 changes: 1 addition & 1 deletion c67-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int code_reloc (int reloc_type)
return -1;
}

/* Returns an enumerator to describe wether and when the relocation needs a
/* Returns an enumerator to describe whether and when the relocation needs a
GOT and/or PLT entry to be created. See tcc.h for a description of the
different values. */
int gotplt_entry_type (int reloc_type)
Expand Down
2 changes: 1 addition & 1 deletion coff.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct filehdr {
/*------------------------------------------------------------------------*/
#define F_RELFLG 0x01 /* relocation info stripped from file */
#define F_EXEC 0x02 /* file is executable (no unresolved refs) */
#define F_LNNO 0x04 /* line nunbers stripped from file */
#define F_LNNO 0x04 /* line numbers stripped from file */
#define F_LSYMS 0x08 /* local symbols stripped from file */
#define F_GSP10 0x10 /* 34010 version */
#define F_GSP20 0x20 /* 34020 version */
Expand Down
12 changes: 6 additions & 6 deletions elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ typedef struct
#define EM_68HC12 53 /* Motorola M68HC12 */
#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/
#define EM_PCP 55 /* Siemens PCP */
#define EM_NCPU 56 /* Sony nCPU embeeded RISC */
#define EM_NCPU 56 /* Sony nCPU embedded RISC */
#define EM_NDR1 57 /* Denso NDR1 microprocessor */
#define EM_STARCORE 58 /* Motorola Start*Core processor */
#define EM_ME16 59 /* Toyota ME16 processor */
Expand Down Expand Up @@ -342,7 +342,7 @@ typedef struct
#define SHT_FINI_ARRAY 15 /* Array of destructors */
#define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */
#define SHT_GROUP 17 /* Section group */
#define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */
#define SHT_SYMTAB_SHNDX 18 /* Extended section indices */
#define SHT_NUM 19 /* Number of defined types. */
#define SHT_LOOS 0x60000000 /* Start OS-specific. */
#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */
Expand Down Expand Up @@ -871,7 +871,7 @@ typedef struct
#define VER_NDX_LORESERVE 0xff00 /* Beginning of reserved entries. */
#define VER_NDX_ELIMINATE 0xff01 /* Symbol is to be eliminated. */

/* Auxialiary version information. */
/* Auxiliary version information. */

typedef struct
{
Expand Down Expand Up @@ -1776,9 +1776,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EFA_PARISC_1_1 0x0210 /* PA-RISC 1.1 big-endian. */
#define EFA_PARISC_2_0 0x0214 /* PA-RISC 2.0 big-endian. */

/* Additional section indeces. */
/* Additional section indices. */

#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared
#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tentatively declared
symbols in ANSI C. */
#define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */

Expand Down Expand Up @@ -1957,7 +1957,7 @@ typedef Elf32_Addr Elf32_Conflict;

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

/* These two are primerily concerned with ECOFF debugging info. */
/* These two are primarily concerned with ECOFF debugging info. */
#define SHT_ALPHA_DEBUG 0x70000001
#define SHT_ALPHA_REGINFO 0x70000002

Expand Down
2 changes: 1 addition & 1 deletion i386-asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@ ST_FUNC void subst_asm_operand(CString *add_str,
if (r & VT_SYM) {
const char *name = get_tok_str(sv->sym->v, NULL);
if (sv->sym->v >= SYM_FIRST_ANOM) {
/* In case of anonymuous symbols ("L.42", used
/* In case of anonymous symbols ("L.42", used
for static data labels) we can't find them
in the C symbol table when later looking up
this name. So enter them now into the asm label
Expand Down
4 changes: 2 additions & 2 deletions i386-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ST_FUNC void gen_addrpc32(int r, Sym *sym, long c)
gen_le32(c - 4);
}

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

/* generate a floating point operation 'v = t1 op t2' instruction. The
two operands are guaranted to have the same floating point type */
two operands are guaranteed to have the same floating point type */
/* XXX: need to use ST1 too */
ST_FUNC void gen_opf(int op)
{
Expand Down
8 changes: 4 additions & 4 deletions i386-link.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int code_reloc (int reloc_type)
return -1;
}

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

/* empty PLT: create PLT0 entry that pushes the library indentifier
/* empty PLT: create PLT0 entry that pushes the library identifier
(GOT + PTR_SIZE) and jumps to ld.so resolution routine
(GOT + 2 * PTR_SIZE) */
if (plt->data_offset == 0) {
Expand Down Expand Up @@ -229,9 +229,9 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t
/* do nothing */
return;
case R_386_COPY:
/* This reloction must copy initialized data from the library
/* This relocation must copy initialized data from the library
to the program .bss segment. Currently made like for ARM
(to remove noise of defaukt case). Is this true?
(to remove noise of default case). Is this true?
*/
return;
default:
Expand Down
2 changes: 1 addition & 1 deletion il-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void gen_opi(int op)
}

/* generate a floating point operation 'v = t1 op t2' instruction. The
two operands are guaranted to have the same floating point type */
two operands are guaranteed to have the same floating point type */
void gen_opf(int op)
{
/* same as integer */
Expand Down
4 changes: 2 additions & 2 deletions libtcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ PUB_FUNC int tcc_add_library_err(TCCState *s, const char *libname)
return ret;
}

/* habdle #pragma comment(lib,) */
/* handle #pragma comment(lib,) */
ST_FUNC void tcc_add_pragma_libs(TCCState *s1)
{
int i;
Expand Down Expand Up @@ -1287,7 +1287,7 @@ static int link_option(const char *str, const char *val, const char **ptr)
if (*str == '-')
str++;

/* then str & val should match (potentialy up to '=') */
/* then str & val should match (potentially up to '=') */
p = str;
q = val;

Expand Down
12 changes: 6 additions & 6 deletions tcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ typedef struct ExprValue {

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

/* warning switches */
Expand Down Expand Up @@ -768,7 +768,7 @@ struct TCCState {
Section *dynsymtab_section;
/* exported dynamic symbol section */
Section *dynsym;
/* copy of the gobal symtab_section variable */
/* copy of the global symtab_section variable */
Section *symtab;
/* extra attributes (eg. GOT/PLT value) for symtab symbols */
struct sym_attr *sym_attrs;
Expand Down Expand Up @@ -945,7 +945,7 @@ struct filespec {
#define TOK_SHL 0x01 /* shift left */
#define TOK_SAR 0x02 /* signed shift right */

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

/* all identificators and strings have token above that */
/* all identifiers and strings have token above that */
#define TOK_IDENT 256

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

/* space exlcuding newline */
/* space excluding newline */
static inline int is_space(int ch) {
return ch == ' ' || ch == '\t' || ch == '\v' || ch == '\f' || ch == '\r';
}
Expand Down
2 changes: 1 addition & 1 deletion tccelf.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh
sec->sh_addralign = 1;
break;
default:
sec->sh_addralign = PTR_SIZE; /* gcc/pcc default aligment */
sec->sh_addralign = PTR_SIZE; /* gcc/pcc default alignment */
break;
}

Expand Down
12 changes: 6 additions & 6 deletions tccgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ ST_FUNC void tccgen_end(TCCState *s1)
}

/* ------------------------------------------------------------------------- */
/* apply storage attibutes to Elf symbol */
/* apply storage attributes to Elf symbol */

static void update_storage(Sym *sym)
{
Expand Down Expand Up @@ -1532,7 +1532,7 @@ static void gen_opl(int op)
c = (int)vtop->c.i;
/* constant: simpler */
/* NOTE: all comments are for SHL. the other cases are
done by swaping words */
done by swapping words */
vpop();
if (op != TOK_SHL)
vswap();
Expand Down Expand Up @@ -1973,7 +1973,7 @@ ST_FUNC void gen_op(int op)
goto redo;
} else if (bt1 == VT_PTR || bt2 == VT_PTR) {
/* at least one operand is a pointer */
/* relationnal op: must be both pointers */
/* relational op: must be both pointers */
if (op >= TOK_ULT && op <= TOK_LOR) {
check_comparison_pointer_types(vtop - 1, vtop, op);
/* pointers are handled are unsigned */
Expand Down Expand Up @@ -2137,7 +2137,7 @@ ST_FUNC void gen_op(int op)
else
gen_opic(op);
if (op >= TOK_ULT && op <= TOK_GT) {
/* relationnal op: the result is an int */
/* relational op: the result is an int */
vtop->type.t = VT_INT;
} else {
vtop->type.t = t;
Expand Down Expand Up @@ -2794,7 +2794,7 @@ static void gen_assign_cast(CType *dt)
goto type_ok;
}
type1 = pointed_type(dt);
/* a function is implicitely a function pointer */
/* a function is implicitly a function pointer */
if (sbt == VT_FUNC) {
if ((type1->t & VT_BTYPE) != VT_VOID &&
!is_compatible_types(pointed_type(dt), st))
Expand Down Expand Up @@ -6086,7 +6086,7 @@ static void init_putv(CType *type, Section *sec, unsigned long c)
}
if ((vtop->r & (VT_SYM|VT_CONST)) == (VT_SYM|VT_CONST) &&
vtop->sym->v >= SYM_FIRST_ANOM &&
/* XXX This rejects compount literals like
/* XXX This rejects compound literals like
'(void *){ptr}'. The problem is that '&sym' is
represented the same way, which would be ruled out
by the SYM_FIRST_ANOM check above, but also '"string"'
Expand Down
4 changes: 2 additions & 2 deletions tccpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ static int pe_check_symbols(struct pe_info *pe)
#ifdef PE_PRINT_SECTIONS
static void pe_print_section(FILE * f, Section * s)
{
/* just if you'r curious */
/* just if you're curious */
BYTE *p, *e, b;
int i, n, l, m;
p = s->data;
Expand Down Expand Up @@ -1976,7 +1976,7 @@ ST_FUNC int pe_output_file(TCCState *s1, const char *filename)

tcc_add_bcheck(s1);
pe_add_runtime(s1, &pe);
relocate_common_syms(); /* assign bss adresses */
relocate_common_syms(); /* assign bss addresses */
tcc_add_linker_symbols(s1);
pe_set_options(s1, &pe);

Expand Down
4 changes: 2 additions & 2 deletions tccpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2993,10 +2993,10 @@ static int *macro_arg_subst(Sym **nested_list, const int *macro_str, Sym *args)
} else {
add_var:
/* NOTE: the stream cannot be read when macro
substituing an argument */
substituting an argument */
macro_subst(&str, nested_list, st, 0);
}
if (str.len == l0) /* exanded to empty string */
if (str.len == l0) /* expanded to empty string */
tok_str_add(&str, TOK_PLCHLDR);
} else {
tok_str_add(&str, t);
Expand Down
6 changes: 3 additions & 3 deletions x86_64-gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,14 @@ static void gen_modrm_impl(int op_reg, int r, Sym *sym, int c, int is_got)
}
}

/* generate a modrm reference. 'op_reg' contains the addtionnal 3
/* generate a modrm reference. 'op_reg' contains the addtional 3
opcode bits */
static void gen_modrm(int op_reg, int r, Sym *sym, int c)
{
gen_modrm_impl(op_reg, r, sym, c, 0);
}

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

/* generate a floating point operation 'v = t1 op t2' instruction. The
two operands are guaranted to have the same floating point type */
two operands are guaranteed to have the same floating point type */
/* XXX: need to use ST1 too */
void gen_opf(int op)
{
Expand Down
Loading

0 comments on commit 19d8b8a

Please sign in to comment.