aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat-mingw.c2
-rw-r--r--compat.h4
-rw-r--r--cse.c8
-rw-r--r--evaluate.c12
-rw-r--r--example.c6
-rw-r--r--expand.c4
-rw-r--r--expression.c2
-rw-r--r--flow.c9
-rw-r--r--lib.c6
-rw-r--r--memops.c4
-rw-r--r--obfuscate.c2
-rw-r--r--parse.c4
-rw-r--r--pre-process.c8
-rw-r--r--scope.c2
-rw-r--r--simplify.c6
-rw-r--r--sort.c2
-rw-r--r--sparse.c4
-rw-r--r--storage.h2
-rw-r--r--symbol.c4
-rw-r--r--symbol.h4
-rw-r--r--test-parsing.c2
-rw-r--r--token.h2
-rw-r--r--tokenize.c4
23 files changed, 51 insertions, 52 deletions
diff --git a/compat-mingw.c b/compat-mingw.c
index 21ca51a..c978e04 100644
--- a/compat-mingw.c
+++ b/compat-mingw.c
@@ -1,5 +1,5 @@
/*
- * Mingw Compatibility functions
+ * MinGW Compatibility functions
*
*
* Licensed under the Open Software License version 1.1
diff --git a/compat.h b/compat.h
index 5713088..9814ae3 100644
--- a/compat.h
+++ b/compat.h
@@ -6,9 +6,9 @@
* we create a small compat library for them.
*
* - zeroed anonymous mmap
- * Missing in mingw
+ * Missing in MinGW
* - "string to long double" (C99 strtold())
- * Missing in Solaris and mingw
+ * Missing in Solaris and MinGW
*/
struct stream;
struct stat;
diff --git a/cse.c b/cse.c
index 57c66ba..9370a6c 100644
--- a/cse.c
+++ b/cse.c
@@ -47,7 +47,7 @@ static void clean_up_one_instruction(struct basic_block *bb, struct instruction
switch (insn->opcode) {
case OP_SEL:
hash += hashval(insn->src3);
- /* Fallthrough */
+ /* Fall through */
/* Binary arithmetic */
case OP_ADD: case OP_SUB:
@@ -69,7 +69,7 @@ static void clean_up_one_instruction(struct basic_block *bb, struct instruction
case OP_SET_B: case OP_SET_A:
case OP_SET_BE: case OP_SET_AE:
hash += hashval(insn->src2);
- /* Fallthrough */
+ /* Fall through */
/* Unary */
case OP_NOT: case OP_NEG:
@@ -200,7 +200,7 @@ static int insn_compare(const void *_i1, const void *_i2)
case OP_SET_BE: case OP_SET_AE:
if (i1->src2 != i2->src2)
return i1->src2 < i2->src2 ? -1 : 1;
- /* Fall-through to unops */
+ /* Fall through to unops */
/* Unary */
case OP_NOT: case OP_NEG:
@@ -310,7 +310,7 @@ static struct instruction * try_to_cse(struct entrypoint *ep, struct instruction
struct basic_block *b1, *b2, *common;
/*
- * Ok, i1 and i2 are the same instruction, modulo "target".
+ * OK, i1 and i2 are the same instruction, modulo "target".
* We should now see if we can combine them.
*/
b1 = i1->bb;
diff --git a/evaluate.c b/evaluate.c
index 190a112..58f208f 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -759,7 +759,7 @@ const char * type_difference(struct symbol *target, struct symbol *source,
/* Differs in signedness only.. */
if (Wtypesign) {
/*
- * Warn if both are explicitly signed ("unsigned" is obvously
+ * Warn if both are explicitly signed ("unsigned" is obviously
* always explicit, and since we know one of them has to be
* unsigned, we check if the signed one was explicit).
*/
@@ -1066,7 +1066,7 @@ static struct symbol *compatible_ptr_type(struct expression *left, struct expres
* have a true case, this will possibly promote "x" to the
* same type as "y", and thus _change_ the conditional
* test in the expression. But since promotion is "safe"
- * for testing, that's ok.
+ * for testing, that's OK.
*/
static struct symbol *evaluate_conditional_expression(struct expression *expr)
{
@@ -1164,7 +1164,7 @@ static int compatible_assignment_types(struct expression *expr, struct symbol *t
return 0;
}
- /* It's ok if the target is more volatile or const than the source */
+ /* It's OK if the target is more volatile or const than the source */
typediff = type_difference(target, source, MOD_VOLATILE | MOD_CONST, 0);
if (!typediff)
return 1;
@@ -1174,11 +1174,11 @@ static int compatible_assignment_types(struct expression *expr, struct symbol *t
struct expression *right = *rp;
int source_as;
- // NULL pointer is always ok
+ // NULL pointer is always OK
if (is_null_ptr(right))
goto Cast;
- /* "void *" matches anything as long as the address space is ok */
+ /* "void *" matches anything as long as the address space is OK */
target_as = t->ctype.as | target->ctype.as;
source_as = s->ctype.as | source->ctype.as;
if (source_as == target_as && (s->type == SYM_PTR || s->type == SYM_ARRAY)) {
@@ -1581,7 +1581,7 @@ static struct symbol *evaluate_preop(struct expression *expr)
case SPECIAL_INCREMENT:
case SPECIAL_DECREMENT:
/*
- * From a type evaluation standpoint the pre-ops are
+ * From a type evaluation standpoint the preops are
* the same as the postops
*/
return evaluate_postop(expr);
diff --git a/example.c b/example.c
index e4679ae..cfb4408 100644
--- a/example.c
+++ b/example.c
@@ -610,10 +610,10 @@ static struct hardreg *fill_reg(struct bb_state *state, struct hardreg *hardreg,
case REG_REG:
/* Aiaiaiaiaii! Need to flush it to temporary memory */
src = find_or_create_hash(pseudo, &state->internal);
- /* Fallthrough */
+ /* Fall through */
default:
alloc_stack(state, src->storage);
- /* Fallthrough */
+ /* Fall through */
case REG_STACK:
case REG_FRAME:
flush_pseudo(state, pseudo, src->storage);
@@ -1493,7 +1493,7 @@ static void write_reg_to_storage(struct bb_state *state, struct hardreg *reg, ps
/* Fall back on stack allocation ... */
alloc_stack(state, storage);
- /* Fallthrough */
+ /* Fall through */
default:
output_insn(state, "movl %s,%s", reg->name, show_memop(storage));
return;
diff --git a/expand.c b/expand.c
index 5fc0221..cd13c4d 100644
--- a/expand.c
+++ b/expand.c
@@ -103,7 +103,7 @@ Int:
oldmask = oldsignmask | (oldsignmask-1);
dropped = oldmask & ~mask;
- // Ok if the bits were (and still are) purely sign bits
+ // OK if the bits were (and still are) purely sign bits
if (value & dropped) {
if (!(value & oldsignmask) || !(value & signmask) || (value & dropped) != dropped)
warning(old->pos, "cast truncates bits from constant value (%llx becomes %llx)",
@@ -679,7 +679,7 @@ static int expand_preop(struct expression *expr)
case SPECIAL_INCREMENT:
case SPECIAL_DECREMENT:
/*
- * From a type evaluation standpoint the pre-ops are
+ * From a type evaluation standpoint the preops are
* the same as the postops
*/
return expand_postop(expr);
diff --git a/expression.c b/expression.c
index 0d7aed8..457e1fd 100644
--- a/expression.c
+++ b/expression.c
@@ -465,7 +465,7 @@ static struct token *postfix_expression(struct token *token, struct expression *
inner->unop = expr;
expr = inner;
}
- /* Fallthrough!! */
+ /* Fall through!! */
case '.': { /* Structure member dereference */
struct expression *deref = alloc_expression(token->pos, EXPR_DEREF);
deref->op = '.';
diff --git a/flow.c b/flow.c
index fa4764a..82fb23a 100644
--- a/flow.c
+++ b/flow.c
@@ -130,7 +130,7 @@ static int bb_has_side_effects(struct basic_block *bb)
FOR_EACH_PTR(bb->insns, insn) {
switch (insn->opcode) {
case OP_CALL:
- /* Fixme! This should take "const" etc into account */
+ /* FIXME! This should take "const" etc into account */
return 1;
case OP_STORE:
@@ -138,7 +138,7 @@ static int bb_has_side_effects(struct basic_block *bb)
return 1;
case OP_ASM:
- /* Fixme! This should take "volatile" etc into account */
+ /* FIXME! This should take "volatile" etc into account */
return 1;
default:
@@ -449,7 +449,7 @@ found:
return 1;
}
- /* Ok, go find the parents */
+ /* OK, go find the parents */
bb->generation = generation;
dominators = NULL;
@@ -752,8 +752,7 @@ void kill_bb(struct basic_block *bb)
kill_defs(insn);
/*
* We kill unreachable instructions even if they
- * otherwise aren't "killable". Eg volatile loads
- * etc.
+ * otherwise aren't "killable" (e.g. volatile loads)
*/
insn->bb = NULL;
} END_FOR_EACH_PTR(insn);
diff --git a/lib.c b/lib.c
index 42d47f0..79a5c55 100644
--- a/lib.c
+++ b/lib.c
@@ -268,7 +268,7 @@ static char **handle_switch_I(char *arg, char **next)
path = *++next;
if (!path)
die("missing argument for -I option");
- /* Fallthrough */
+ /* Fall through */
default:
add_pre_buffer("#add_include \"%s/\"\n", path);
}
@@ -614,7 +614,7 @@ void create_builtin_stream(void)
static struct symbol_list *sparse_tokenstream(struct token *token)
{
- // Pre-process the stream
+ // Preprocess the stream
token = preprocess(token);
if (preprocess_only) {
@@ -670,7 +670,7 @@ static struct symbol_list *sparse_file(const char *filename)
* files.
*
* NOTE NOTE NOTE! "#undef" of anything in this stage will
- * affect all subsequent files too, ie we can have non-local
+ * affect all subsequent files too, i.e. we can have non-local
* behaviour between files!
*/
static struct symbol_list *sparse_initial(void)
diff --git a/memops.c b/memops.c
index 027f05e..9eafb72 100644
--- a/memops.c
+++ b/memops.c
@@ -117,7 +117,7 @@ static void simplify_loads(struct basic_block *bb)
}
} END_FOR_EACH_PTR_REVERSE(dom);
- /* Ok, go find the parents */
+ /* OK, go find the parents */
generation = ++bb_generation;
bb->generation = generation;
dominators = NULL;
@@ -175,7 +175,7 @@ static void kill_dominated_stores(struct basic_block *bb)
}
} END_FOR_EACH_PTR_REVERSE(dom);
- /* Ok, we should check the parents now */
+ /* OK, we should check the parents now */
}
next_store:
/* Do the next one */;
diff --git a/obfuscate.c b/obfuscate.c
index f2ed7b1..1015510 100644
--- a/obfuscate.c
+++ b/obfuscate.c
@@ -1,6 +1,6 @@
/*
* Example trivial client program that uses the sparse library
- * to tokenize, pre-process and parse a C file, and prints out
+ * to tokenize, preprocess and parse a C file, and prints out
* the results.
*
* Copyright (C) 2003 Transmeta Corp.
diff --git a/parse.c b/parse.c
index 0d60afa..3a9ebc9 100644
--- a/parse.c
+++ b/parse.c
@@ -643,7 +643,7 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
}
/*
* base_type rules:
- * - if all enum's are of the same type, then
+ * - if all enums are of the same type, then
* the base_type is that type (two first
* cases)
* - if enums are of different types, they
@@ -2068,7 +2068,7 @@ struct token *external_declaration(struct token *token, struct symbol_list **lis
/* type define declaration? */
is_typedef = (ctype.modifiers & MOD_TYPEDEF) != 0;
- /* Typedef's don't have meaningful storage */
+ /* Typedefs don't have meaningful storage */
if (is_typedef) {
ctype.modifiers &= ~MOD_STORAGE;
decl->ctype.modifiers &= ~MOD_STORAGE;
diff --git a/pre-process.c b/pre-process.c
index 2936fca..44be783 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -643,7 +643,7 @@ static int already_tokenized(const char *path)
* angle_includepath: Path to search when using #include <file.h>
* sys_includepath: Built-in include paths
*
- * The above is implmented as one array with pointes
+ * The above is implemented as one array with pointers
* +--------------+
* quote_includepath ---> | |
* +--------------+
@@ -734,7 +734,7 @@ static void do_include(int local, struct stream *stream, struct token **list, st
goto out;
}
- /* Dir of inputfile is first dir to search for quoted includes */
+ /* Dir of input file is first dir to search for quoted includes */
set_stream_include_path(stream);
if (!path)
@@ -1549,7 +1549,7 @@ static int handle_split_include(struct stream *stream, struct token **line, stru
*
* We'll just #define that away for now, but the theory here
* is that we can use this to insert arbitrary token sequences
- * to turn the pragma's into internal front-end sequences for
+ * to turn the pragmas into internal front-end sequences for
* when we actually start caring about them.
*
* So eventually this will turn into some kind of extended
@@ -1736,7 +1736,7 @@ struct token * preprocess(struct token *token)
init_preprocessor();
do_preprocess(&token);
- // Drop all expressions from pre-processing, they're not used any more.
+ // Drop all expressions from preprocessing, they're not used any more.
// This is not true when we have multiple files, though ;/
// clear_expression_alloc();
preprocessing = 0;
diff --git a/scope.c b/scope.c
index 82cf572..1f14feb 100644
--- a/scope.c
+++ b/scope.c
@@ -46,7 +46,7 @@ void start_file_scope(void)
scope->next = &builtin_scope;
file_scope = scope;
- /* top-level stuff defaults to file scopt, "extern" etc will choose global scope */
+ /* top-level stuff defaults to file scope, "extern" etc will choose global scope */
function_scope = scope;
block_scope = scope;
}
diff --git a/simplify.c b/simplify.c
index 26a72f4..3adcef1 100644
--- a/simplify.c
+++ b/simplify.c
@@ -92,7 +92,7 @@ static int if_convert_phi(struct instruction *insn)
}
/*
- * Ok, we can now replace that last
+ * OK, we can now replace that last
*
* br cond, a, b
*
@@ -267,7 +267,7 @@ static int simplify_constant_rightside(struct instruction *insn)
insn->src2 = value_pseudo(-value);
return REPEAT_CSE;
}
- /* Fallthrough */
+ /* Fall through */
case OP_ADD:
case OP_OR: case OP_XOR:
case OP_OR_BOOL:
@@ -281,7 +281,7 @@ static int simplify_constant_rightside(struct instruction *insn)
case OP_AND_BOOL:
if (value == 1)
return replace_with_pseudo(insn, insn->src1);
- /* Fallthrough */
+ /* Fall through */
case OP_AND:
if (!value)
return replace_with_pseudo(insn, insn->src2);
diff --git a/sort.c b/sort.c
index 749339a..afd7184 100644
--- a/sort.c
+++ b/sort.c
@@ -188,7 +188,7 @@ merge_block_seqs (struct ptr_list *b1, int n,
if (++i2 >= b2->nr) {
struct ptr_list *l = b2;
BEEN_THERE('M');
- // Ok, we finished with b2. Pull it out
+ // OK, we finished with b2. Pull it out
// and plug it in before b1.
b2 = b2->next;
diff --git a/sparse.c b/sparse.c
index 108eafb..4026ba7 100644
--- a/sparse.c
+++ b/sparse.c
@@ -1,6 +1,6 @@
/*
* Example trivial client program that uses the sparse library
- * to tokenize, pre-process and parse a C file, and prints out
+ * to tokenize, preprocess and parse a C file, and prints out
* the results.
*
* Copyright (C) 2003 Transmeta Corp.
@@ -142,7 +142,7 @@ static void check_byte_count(struct instruction *insn, pseudo_t count)
show_ident(insn->func->sym->ident), val);
return;
}
- /* Ok, we could try to do the range analysis here */
+ /* OK, we could try to do the range analysis here */
}
static pseudo_t argument(struct instruction *call, unsigned int argno)
diff --git a/storage.h b/storage.h
index c1822e5..610cbfd 100644
--- a/storage.h
+++ b/storage.h
@@ -3,7 +3,7 @@
/*
* The "storage" that underlies an incoming/outgoing pseudo. It's
- * basically the backing store for a pseudo, and may be a real hw
+ * basically the backing store for a pseudo, and may be a real hardware
* register, a stack slot or a static symbol. Or nothing at all,
* since some pseudos can just be recalculated on the fly.
*/
diff --git a/symbol.c b/symbol.c
index bad05fd..45d40ee 100644
--- a/symbol.c
+++ b/symbol.c
@@ -192,7 +192,7 @@ static struct symbol *examine_base_type(struct symbol *sym)
{
struct symbol *base_type;
- /* Check the basetype */
+ /* Check the base type */
base_type = sym->ctype.base_type;
if (base_type) {
base_type = examine_symbol_type(base_type);
@@ -730,7 +730,7 @@ struct symbol int_type,
fp_type;
/*
- * C types (ie actual instances that the abstract types
+ * C types (i.e. actual instances that the abstract types
* can map onto)
*/
struct symbol bool_ctype, void_ctype, type_ctype,
diff --git a/symbol.h b/symbol.h
index 00c1a3d..d1b2868 100644
--- a/symbol.h
+++ b/symbol.h
@@ -113,7 +113,7 @@ struct symbol {
struct position pos; /* Where this symbol was declared */
struct ident *ident; /* What identifier this symbol is associated with */
struct symbol *next_id; /* Next semantic symbol that shares this identifier */
- struct symbol **id_list; /* Backpointer to symbol list head */
+ struct symbol **id_list; /* Back pointer to symbol list head */
struct symbol *replace; /* What is this symbol shadowed by in copy-expression */
struct scope *scope;
struct symbol *same_symbol;
@@ -153,7 +153,7 @@ struct symbol {
};
union /* backend */ {
struct basic_block *bb_target; /* label */
- void *aux; /* Auxiliary info, eg. backend information */
+ void *aux; /* Auxiliary info, e.g. backend information */
struct { /* sparse ctags */
char kind;
unsigned char visited:1;
diff --git a/test-parsing.c b/test-parsing.c
index f29a730..0a0b1d4 100644
--- a/test-parsing.c
+++ b/test-parsing.c
@@ -1,6 +1,6 @@
/*
* Example trivial client program that uses the sparse library
- * to tokenize, pre-process and parse a C file, and prints out
+ * to tokenize, preprocess and parse a C file, and prints out
* the results.
*
* Copyright (C) 2003 Transmeta Corp.
diff --git a/token.h b/token.h
index 4c71dbd..10106ba 100644
--- a/token.h
+++ b/token.h
@@ -35,7 +35,7 @@ extern const char *includepath[];
struct stream {
int fd;
const char *name;
- const char *path; // inputfile path - see set_stream_include_path()
+ const char *path; // input-file path - see set_stream_include_path()
const char **next_path;
/* Use these to check for "already parsed" */
diff --git a/tokenize.c b/tokenize.c
index 67f5a67..b5bfa5a 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -1,6 +1,6 @@
/*
* This is a really stupid C tokenizer. It doesn't do any include
- * files or anything complex at all. That's the pre-processor.
+ * files or anything complex at all. That's the preprocessor.
*
* Copyright (C) 2003 Transmeta Corp.
* 2003 Linus Torvalds
@@ -503,7 +503,7 @@ static int escapechar(int first, int type, stream_t *stream, int *valp)
break;
}
}
- /* Fallthrough */
+ /* Fall through */
default:
warning(stream_pos(stream), "Unknown escape '%c'", value);
}