Skip to content

Commit

Permalink
More spelling fixes in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Jun 20, 2019
1 parent 0433538 commit 20e19d6
Show file tree
Hide file tree
Showing 89 changed files with 174 additions and 174 deletions.
2 changes: 1 addition & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This release comes with contributions from the following people:
Previous contributors
---------------------

Some people didn't contribute to the lastest release, but they did it for the past ones. Kudos for them too!
Some people didn't contribute to the latest release, but they did it for the past ones. Kudos for them too!

- 0xroot
- Alexander
Expand Down
2 changes: 1 addition & 1 deletion libr/anal/flirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
- if flag & IDASIG__PARSE__MORE_MODULES, goto module, to read another module
More Informations
More Information
-----------------
Function flags:
- local functions ((l) with dumpsig) which are static ones.
Expand Down
2 changes: 1 addition & 1 deletion libr/bin/p/bin_pebble.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef struct {

R_PACKED (
typedef struct {
char header[8]; //!< Sentinal value, should always be 'PBLAPP\0\0'
char header[8]; //!< Sentinel value, should always be 'PBLAPP\0\0'
Version struct_version; //!< version of this structure's format
Version sdk_version; //!< version of the SDK used to build this app
Version app_version; //!< version of the app
Expand Down
4 changes: 2 additions & 2 deletions libr/bin/pdb/tpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,8 +1611,8 @@ static int parse_sval(SVal *val, unsigned char *leaf_data, unsigned int *read_by
{
SVal_LF_ULONG lf_ulong;
lf_ulong.value = 0;
// unsinged long = 4 bytes for Windows, but not in Linux x64,
// so here is using unsinged int instead of unsigned long when
// unsigned long = 4 bytes for Windows, but not in Linux x64,
// so here is using unsigned int instead of unsigned long when
// reading ulong value
READ4(*read_bytes, len, lf_ulong.value, leaf_data, ut32);
parse_sctring (&lf_ulong.name, leaf_data, read_bytes, len);
Expand Down
2 changes: 1 addition & 1 deletion libr/bin/pdb/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define READ_PAGE_FAIL 0x01

// TODO: Move to a general macroses in r_util/r_types
// TODO: Move to a general macros in r_util/r_types

///////////////////////////////////////////////////////////////////////////////
#define GET_PAGE(pn, off, pos, page_size) { \
Expand Down
4 changes: 2 additions & 2 deletions libr/bp/bp.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ R_API RBreakpointItem *r_bp_item_new (RBreakpoint *bp) {
}
}
/* allocate new slot */
bp->bps_idx_count += 16; // alocate space for 16 more bps
bp->bps_idx_count += 16; // allocate space for 16 more bps
RBreakpointItem **newbps = realloc (bp->bps_idx, bp->bps_idx_count * sizeof (RBreakpointItem*));
if (newbps) {
bp->bps_idx = newbps;
} else {
bp->bps_idx_count -= 16; // alocate space for 16 more bps
bp->bps_idx_count -= 16; // allocate space for 16 more bps
}
for (j = i; j < bp->bps_idx_count; j++) {
bp->bps_idx[j] = NULL;
Expand Down
2 changes: 1 addition & 1 deletion libr/bp/bp_traptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ R_API int r_bp_traptrace_add(RBreakpoint *bp, ut64 from, ut64 to) {
return false;
}
// read a memory, overwrite it as breakpointing area
// everytime it is hitted, instruction is restored
// every time it is hitted, instruction is restored
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion libr/bp/bp_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ R_API RBreakpointItem* r_bp_watch_add(RBreakpoint *bp, ut64 addr, int size, int
if (hw) {
r_bp_watch_add_hw (bp, b);
} else {
eprintf ("[TODO]: Software watchpoint is not implmented yet (use ESIL)\n");
eprintf ("[TODO]: Software watchpoint is not implemented yet (use ESIL)\n");
/* TODO */
}
bp->nbps++;
Expand Down
2 changes: 1 addition & 1 deletion libr/cons/hud.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ R_API char *r_cons_hud_string(const char *s) {
/* Match a filter on a line. A filter can contain multiple words
separated by spaces, which are all matched *in any order* over the target
entry. If all words are present, the function returns true.
The mask is a character buffer wich is filled by 'x' to mark those characters
The mask is a character buffer which is filled by 'x' to mark those characters
that match the filter */
static bool __matchString(char *entry, char *filter, char *mask, const int mask_size) {
char *p, *current_token = filter;
Expand Down
4 changes: 2 additions & 2 deletions libr/cons/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ R_API int r_cons_arrow_to_hjkl(int ch) {
case 0x4f: // function keys from f1 to f4
ch = r_cons_readchar ();
#if defined(__HAIKU__)
/* Haiku don use the '[' char for funcion keys */
if (ch > 'O') {/* only in f1..f12 funcion keys */
/* Haiku't don use the '[' char for function keys */
if (ch > 'O') {/* only in f1..f12 function keys */
ch = 0xf1 + (ch&0xf);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion libr/cons/less.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ R_API int r_cons_less_str(const char *str, const char *exitkeys) {
if (!rx) {
break;
}
/* find all occurences */
/* find all occurrences */
if (pager_all_matches (p, rx, mla, lines, lines_count)) {
from = pager_next_match (from, mla, lines_count);
}
Expand Down
2 changes: 1 addition & 1 deletion libr/cons/more.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ R_API int r_cons_more_str(const char *str, const char *exitkeys) {
if (!rx) {
break;
}
/* find all occurences */
/* find all occurrences */
if (pager_all_matches (p, rx, mla, lines, lines_count)) {
from = pager_next_match (from, mla, lines_count);
}
Expand Down
2 changes: 1 addition & 1 deletion libr/cons/utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static int cursor_position(const int tty, int *const rowptr, int *const colptr)
if (ret)
break;

/* Assume coordinate reponse parsing fails. */
/* Assume coordinate response parsing fails. */
ret = EIO;

// Read until ESC is found. previous chars, should be
Expand Down
4 changes: 2 additions & 2 deletions libr/core/agraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static const char *mousemodes[] = {
#define hash_get_rnode(sdb, k) ((RGraphNode *) (size_t) hash_get (sdb, k))
#define hash_get_rlist(sdb, k) ((RList *) (size_t) hash_get (sdb, k))
#define hash_get_int(sdb, k) ((int) hash_get (sdb, k))
/* dont use macros for this */
/* don't use macros for this */
#define get_anode(gn) ((gn)? (RANode *) (gn)->data: NULL)

#define graph_foreach_anode(list, it, pos, anode)\
Expand Down Expand Up @@ -855,7 +855,7 @@ static int dist_nodes(const RAGraph *g, const RGraphNode *a, const RGraphNode *b
return res;
}

/* explictly set the distance between two nodes on the same layer */
/* explicitly set the distance between two nodes on the same layer */
static void set_dist_nodes(const RAGraph *g, int l, int cur, int next) {
struct dist_t *d, find_el;
const RGraphNode *vi, *vip;
Expand Down
8 changes: 4 additions & 4 deletions libr/core/anal_tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void var_retype(RAnal *anal, RAnalVar *var, const char *vname, char *type
const char *tmp = strstr (expand, "int");
bool is_default = tmp? true: false;
if (!is_default && strncmp (var->type, "void", 4)) {
// return since type is already propgated
// return since type is already propagated
// except for "void *", since "void *" => "char *" is possible
return;
}
Expand All @@ -114,8 +114,8 @@ static void var_retype(RAnal *anal, RAnalVar *var, const char *vname, char *type
r_strbuf_set (sb, trim);
}
if (!strncmp (r_strbuf_get (sb), "const ", 6)) {
// Droping const from type
//TODO: Infering const type
// Dropping const from type
//TODO: Inferring const type
r_strbuf_setf (sb, "%s", type + 6);
}
if (is_ptr) {
Expand Down Expand Up @@ -616,7 +616,7 @@ R_API void r_core_anal_type_match(RCore *core, RAnalFunction *fcn) {
free (foo);
}
}
// Type Propgation using intruction access pattern
// Type propagation using instruction access pattern
if (var) {
bool sign = false;
if ((type == R_ANAL_OP_TYPE_CMP) && next_op) {
Expand Down
14 changes: 7 additions & 7 deletions libr/core/blaze.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ R_API bool core_anal_bbs(RCore *core, const char* input) {
block_score = 0;
break;
case R_ANAL_OP_TYPE_TRAP:
// we dont want to add trap stuff
// we don't want to add trap stuff
if (b_start < start + cur) {
addBB (block_list, b_start, start + cur, UT64_MAX, UT64_MAX, NORMAL, block_score);
}
Expand Down Expand Up @@ -524,7 +524,7 @@ R_API bool core_anal_bbs_range (RCore *core, const char* input) {
}

bool bFound = false;
// check if offset dont have into block_list, to end branch analisys
// check if offset don't have into block_list, to end branch analisys
r_list_foreach (block_list, iter, block) {
if ( (block->type == END || block->type == NORMAL) && b_start + cur == block->start ) {
bFound = true;
Expand Down Expand Up @@ -589,7 +589,7 @@ R_API bool core_anal_bbs_range (RCore *core, const char* input) {
op = NULL;
}
else {
// we have this offset into previous analized block, exit from this path flow.
// we have this offset into previous analyzed block, exit from this path flow.
break;
}
}
Expand Down Expand Up @@ -681,9 +681,9 @@ R_API bool core_anal_bbs_range (RCore *core, const char* input) {
r_list_append (result, block);
}

// finally add bb to fuction
// finally add bb to function
// we simply assume that non reached blocks
// dont are part of the created function
// don't are part of the created function
if (debug) {
eprintf ("Trying to create functions\n");
}
Expand Down Expand Up @@ -746,9 +746,9 @@ R_API bool core_anal_bbs_range (RCore *core, const char* input) {

// function creation complete
if (current_function) {
// check for supply fuction address match with current block
// check for supply function address match with current block
if (current_function->addr == start) {
// set supply fuction size
// set supply function size
current_function->size = size;
if (checkFunction (current_function)) {
if (input[0] == '*') {
Expand Down
8 changes: 4 additions & 4 deletions libr/core/canal.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ R_API RAnalOp* r_core_anal_op(RCore *core, ut64 addr, int mask) {
goto err_op;
}
if (!op->mnemonic && mask & R_ANAL_OP_MASK_DISASM) {
// i dont think this is used anywhere
// i don't think this is used anywhere
// decode instruction here
r_asm_set_pc (core->assembler, addr);
r_asm_op_init (&asmop);
Expand Down Expand Up @@ -1576,7 +1576,7 @@ R_API int r_core_anal_bb(RCore *core, RAnalFunction *fcn, ut64 addr, int head) {
}

if (ret == R_ANAL_RET_NEW) { /* New bb */
// XXX: use read_ahead and so on, but dont allocate that much in here
// XXX: use read_ahead and so on, but don't allocate that much in here
const int buflen = core->anal->opt.bb_max_size; // OMG THIS IS SO WRONG
buf = calloc (1, buflen);
if (!buf) {
Expand Down Expand Up @@ -3437,7 +3437,7 @@ R_API int r_core_anal_search(RCore *core, ut64 from, ut64 to, ut64 ref, int mode
if (r_cons_is_breaked ()) {
break;
}
// TODO: this can be probably enhaced
// TODO: this can be probably enhanced
if (!r_io_read_at (core->io, at, buf, core->blocksize)) {
eprintf ("Failed to read at 0x%08" PFMT64x "\n", at);
break;
Expand Down Expand Up @@ -4688,7 +4688,7 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
// eprintf ("0x%08"PFMT64x" SYSCALL %-4d %s\n", cur, snv, si->name);
r_flag_set_next (core->flags, sdb_fmt ("syscall.%s", si->name), cur, 1);
} else {
//todo were doing less filtering up top because we cant match against 80 on all platforms
//todo were doing less filtering up top because we can't match against 80 on all platforms
// might get too many of this path now..
// eprintf ("0x%08"PFMT64x" SYSCALL %d\n", cur, snv);
r_flag_set_next (core->flags, sdb_fmt ("syscall.%d", snv), cur, 1);
Expand Down
2 changes: 1 addition & 1 deletion libr/core/carg.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static void print_format_values(RCore *core, const char *fmt, bool onstack, ut64
free (buf);
}

/* This functon display list of arg with some colors */
/* This function display list of arg with some colors */

R_API void r_core_print_func_args(RCore *core) {
RListIter *iter;
Expand Down
6 changes: 3 additions & 3 deletions libr/core/cbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ static int bin_info(RCore *r, int mode, ut64 laddr) {
int len = r_hash_calculate (rh, hash, tmp, h->to);
free (tmp);
if (len < 1) {
eprintf ("Invaild checksum length\n");
eprintf ("Invalid checksum length\n");
}
r_hash_free (rh);
r_cons_printf ("%s\"%s\":{\"hex\":\"", i?",": "", h->type);
Expand Down Expand Up @@ -961,7 +961,7 @@ static int bin_dwarf(RCore *core, int mode) {
r_cons_break_pop ();
R_FREE (lastFileContents);
R_FREE (lastFileContents2);
// this list is owned by rbin, not us, we shouldnt free it
// this list is owned by rbin, not us, we shouldn't free it
// r_list_free (list);
free (lastFileLines);
return true;
Expand Down Expand Up @@ -2136,7 +2136,7 @@ static int bin_symbols(RCore *r, int mode, ut64 laddr, int va, ut64 at, const ch
r_cons_printf ("f sym.%s %u 0x%08" PFMT64x "\n",
r_bin_symbol_name (symbol), symbol->size, addr);
} else {
// we dont want unnamed symbol flags
// we don't want unnamed symbol flags
}
}
binfile = r_bin_cur (r->bin);
Expand Down
2 changes: 1 addition & 1 deletion libr/core/cfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ R_API int r_core_file_close(RCore *r, RCoreFile *fh) {
RIODesc *desc = fh && r ? r_io_desc_get (r->io, fh->fd) : NULL;
RCoreFile *prev_cf = r && r->file != fh? r->file: NULL;

// TODO: This is not correclty done. because map and iodesc are
// TODO: This is not correctly done. because map and iodesc are
// still referenced // we need to fully clear all R_IO structs
// related to a file as well as the ones needed for RBin.
//
Expand Down
8 changes: 4 additions & 4 deletions libr/core/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ static const char *help_msg_y[] = {
"y", " 16 0x200", "copy 16 bytes into clipboard from 0x200",
"y", " 16 @ 0x200", "copy 16 bytes into clipboard from 0x200",
"y!", "", "open cfg.editor to edit the clipboard",
"y*", "", "print in r2 commands whats been yanked",
"yj", "", "print in JSON commands whats been yanked",
"y*", "", "print in r2 commands what's been yanked",
"yj", "", "print in JSON commands what's been yanked",
"yz", " [len]", "copy nul-terminated string (up to blocksize) into clipboard",
"yp", "", "print contents of clipboard",
"yq", "", "print contents of clipboard in hexpairs",
Expand Down Expand Up @@ -2158,7 +2158,7 @@ static int r_core_cmd_subst(RCore *core, char *cmd) {
if (rep < 1) {
rep = 1;
}
// XXX if output is a pipe then we dont want to be interactive
// XXX if output is a pipe then we don't want to be interactive
if (rep > 1 && r_sandbox_enable (0)) {
eprintf ("Command repeat sugar disabled in sandbox mode (%s)\n", cmd);
goto beach;
Expand Down Expand Up @@ -3925,7 +3925,7 @@ R_API int r_core_cmd_foreach(RCore *core, const char *cmd, char *each) {
case '.': // "@@."
if (each[1] == '(') {
char cmd2[1024];
// XXX whats this 999 ?
// XXX what's this 999 ?
i = 0;
for (core->rcmd->macro.counter = 0; i < 999; core->rcmd->macro.counter++) {
if (r_cons_is_breaked ()) {
Expand Down
2 changes: 1 addition & 1 deletion libr/core/cmd_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ static int cmd_debug_map(RCore *core, const char *input) {
switch (i) {
case 2:
symname = r_str_word_get0 (ptr, 1);
// fall thru
// fall through
case 1:
a0 = r_str_word_get0 (ptr, 0);
addr = r_num_math (core->num, a0);
Expand Down
12 changes: 6 additions & 6 deletions libr/core/cmd_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ void r_comment_vars(RCore *core, const char *input) {
return;
}
if (!fcn) {
eprintf ("Cant find function here\n");
eprintf ("Can't find function here\n");
return;
}
oname = name = strdup (input + 2);
Expand Down Expand Up @@ -948,13 +948,13 @@ void r_comment_vars(RCore *core, const char *input) {
} else if (!strncmp (name, "-0x", 3)) {
idx = -(int) r_num_get (NULL, name+1);
} else {
eprintf ("cant find variable named `%s`\n",name);
eprintf ("can't find variable named `%s`\n",name);
free (heap_comment);
break;
}
r_anal_var_free (var);
if (!r_anal_var_get (core->anal, fcn->addr, input[0], 1, idx)) {
eprintf ("cant find variable at given offset\n");
eprintf ("can't find variable at given offset\n");
} else {
oldcomment = r_meta_get_var_comment (core->anal, input[0], idx, fcn->addr);
if (oldcomment) {
Expand All @@ -981,13 +981,13 @@ void r_comment_vars(RCore *core, const char *input) {
} else if (!strncmp (name, "-0x", 3)) {
idx = -(int) r_num_get (NULL, name+1);
}else {
eprintf ("cant find variable named `%s`\n",name);
eprintf ("can't find variable named `%s`\n",name);
break;
}
r_anal_var_free (var);
//XXX TODO here we leak a var
if (!r_anal_var_get (core->anal, fcn->addr, input[0],1,idx)) {
eprintf ("cant find variable at given offset\n");
eprintf ("can't find variable at given offset\n");
break;
}
r_meta_var_comment_del (core->anal, input[0], idx, fcn->addr);
Expand All @@ -996,7 +996,7 @@ void r_comment_vars(RCore *core, const char *input) {
char *comment;
var = r_anal_var_get_byname (core->anal, fcn->addr, name);
if (!var) {
eprintf ("cant find variable named `%s`\n",name);
eprintf ("can't find variable named `%s`\n",name);
break;
}
oldcomment = r_meta_get_var_comment (core->anal, input[0], var->delta, fcn->addr);
Expand Down
Loading

0 comments on commit 20e19d6

Please sign in to comment.