Skip to content

Commit

Permalink
Spelling (VirusTotal#582)
Browse files Browse the repository at this point in the history
* spelling: additionally

* spelling: aggressively

* spelling: alignment

* spelling: analyzed

* spelling: approximately

* spelling: beginning

* spelling: chosen

* spelling: compiled

* spelling: containing

* spelling: contiguous

* spelling: definitions

* spelling: delimit

* spelling: executable

* spelling: explicit

* spelling: explicitly

* spelling: external

* spelling: guaranteed

* spelling: identified

* spelling: initialization

* spelling: initialize

* spelling: initializing

* spelling: insensitive

* spelling: instruction

* spelling: insufficient

* spelling: maximum

* spelling: numbers

* spelling: possible

* spelling: processor

* spelling: provided

* spelling: referring

* spelling: require

* spelling: restructuring

* spelling: seventh

* spelling: simultaneously

* spelling: snippet

* spelling: unknown
  • Loading branch information
jsoref authored and plusvic committed Dec 15, 2016
1 parent 779b9a7 commit 6fd4883
Show file tree
Hide file tree
Showing 42 changed files with 229 additions and 229 deletions.
10 changes: 5 additions & 5 deletions args.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,17 @@ void args_print_error(
{
switch(error)
{
case ARGS_ERROR_UKNOWN_OPT:
case ARGS_ERROR_UNKNOWN_OPT:
fprintf(stderr, "unknown option `%s`\n", option);
break;
case ARGS_ERROR_TOO_MANY:
fprintf(stderr, "too many `%s` options\n", option);
break;
case ARGS_ERROR_REQUIRED_INTEGER_ARG:
fprintf(stderr, "option `%s` requieres an integer argument\n", option);
fprintf(stderr, "option `%s` requires an integer argument\n", option);
break;
case ARGS_ERROR_REQUIRED_STRING_ARG:
fprintf(stderr, "option `%s` requieres a string argument\n", option);
fprintf(stderr, "option `%s` requires a string argument\n", option);
break;
case ARGS_ERROR_UNEXPECTED_ARG:
fprintf(stderr, "option `%s` doesn't expect an argument\n", option);
Expand Down Expand Up @@ -198,7 +198,7 @@ int args_parse(
}
else
{
error = ARGS_ERROR_UKNOWN_OPT;
error = ARGS_ERROR_UNKNOWN_OPT;
}
}
else if (args_is_short_arg(arg))
Expand Down Expand Up @@ -230,7 +230,7 @@ int args_parse(
}
else
{
error = ARGS_ERROR_UKNOWN_OPT;
error = ARGS_ERROR_UNKNOWN_OPT;
}

if (error != ARGS_ERROR_OK)
Expand Down
4 changes: 2 additions & 2 deletions args.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {

typedef enum _args_error_type {
ARGS_ERROR_OK,
ARGS_ERROR_UKNOWN_OPT,
ARGS_ERROR_UNKNOWN_OPT,
ARGS_ERROR_TOO_MANY,
ARGS_ERROR_REQUIRED_INTEGER_ARG,
ARGS_ERROR_REQUIRED_STRING_ARG,
Expand Down Expand Up @@ -95,7 +95,7 @@ int args_parse(

void args_print_usage(
args_option_t *options,
int aligment);
int alignment);


#ifdef __cplusplus
Expand Down
30 changes: 15 additions & 15 deletions docs/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
The C API
*********

You can integrate YARA into your C/C++ project by using the API privided by the
You can integrate YARA into your C/C++ project by using the API provided by the
*libyara* library. This API gives you access to every YARA feature and it's the
same API used by the command-line tools ``yara`` and ``yarac``.

Initalizing and finalizing *libyara*
Initializing and finalizing *libyara*
====================================

The first thing your program must do when using *libyara* is initializing the
library. This is done by calling the :c:func:`yr_initialize()` function. This
function allocates any resources needed by the library and initalizes internal
function allocates any resources needed by the library and initializes internal
data structures. Its counterpart is :c:func:`yr_finalize`, which must be called
when you are finished using the library.

Expand Down Expand Up @@ -208,7 +208,7 @@ All ``yr_rules_scan_XXXX`` functions receive a ``flags`` argument and a
``timeout`` argument. The only flag defined at this time is
``SCAN_FLAGS_FAST_MODE``, so you must pass either this flag or a zero value.
The ``timeout`` argument forces the function to return after the specified
number of seconds aproximately, with a zero meaning no timeout at all.
number of seconds approximately, with a zero meaning no timeout at all.

The ``SCAN_FLAGS_FAST_MODE`` flag makes the scanning a little faster by avoiding
multiple matches of the same string when not necessary. Once the string was
Expand Down Expand Up @@ -352,7 +352,7 @@ Functions

.. c:function:: int yr_initialize(void)
Initalize the library. Must be called by the main thread before using any
Initialize the library. Must be called by the main thread before using any
other function. Return :c:macro:`ERROR_SUCCESS` on success another error
code in case of error. The list of possible return codes vary according
to the modules compiled into YARA.
Expand All @@ -377,7 +377,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
.. c:function:: void yr_compiler_destroy(YR_COMPILER* compiler)
Expand Down Expand Up @@ -422,7 +422,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
.. c:function:: int yr_compiler_define_integer_variable(YR_COMPILER* compiler, const char* identifier, int64_t value)
Expand Down Expand Up @@ -468,7 +468,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
:c:macro:`ERROR_COULD_NOT_OPEN_FILE`
Expand All @@ -486,7 +486,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
:c:macro:`ERROR_INVALID_FILE`
Expand All @@ -500,7 +500,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
:c:macro:`ERROR_TOO_MANY_SCAN_THREADS`
Expand All @@ -517,7 +517,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
:c:macro:`ERROR_COULD_NOT_MAP_FILE`
Expand All @@ -542,7 +542,7 @@ Functions
:c:macro:`ERROR_SUCCESS`
:c:macro:`ERROR_INSUFICENT_MEMORY`
:c:macro:`ERROR_INSUFFICIENT_MEMORY`
:c:macro:`ERROR_COULD_NOT_MAP_FILE`
Expand Down Expand Up @@ -647,9 +647,9 @@ Error codes
Everything went fine.

.. c:macro:: ERROR_INSUFICENT_MEMORY
.. c:macro:: ERROR_INSUFFICIENT_MEMORY
Insuficient memory to complete the operation.
Insufficient memory to complete the operation.

.. c:macro:: ERROR_COULD_NOT_OPEN_FILE
Expand Down Expand Up @@ -678,7 +678,7 @@ Error codes
.. c:macro:: ERROR_TOO_MANY_SCAN_THREADS
Too many threads trying to use the same :c:type:`YR_RULES` object
simultaneosly. The limit is defined by ``MAX_THREADS`` in
simultaneously. The limit is defined by ``MAX_THREADS`` in
*./include/yara/limits.h*

.. c:macro:: ERROR_SCAN_TIMEOUT
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ not. If you want to enforce the OpenSSL-dependant features you must pass
``--with-crypto`` to the ``configure`` script. Ubuntu and Debian users can
use ``sudo apt-get install libssl-dev`` to install the OpenSSL library.

The following modules are not copiled into YARA by default:
The following modules are not compiled into YARA by default:

* cuckoo
* magic
Expand Down
16 changes: 8 additions & 8 deletions docs/writingmodules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ After the declaration section you'll find a pair of functions:
return ERROR_SUCCESS;
}
The ``module_initialize`` function is called during YARA's initializtion while
The ``module_initialize`` function is called during YARA's initialization while
its counterpart ``module_finalize`` is called while finalizing YARA. These
functions allows you initialize and finalize any global data structure you may
need to use in your module.
Expand Down Expand Up @@ -274,7 +274,7 @@ declare string, integer, or float variables respectively. For example::
end_declarations;

.. note::
Floating-point variables requiere YARA version 3.3.0 or later.
Floating-point variables require YARA version 3.3.0 or later.


Variable names can't contain characters other than letters, numbers and
Expand Down Expand Up @@ -322,13 +322,13 @@ Your declarations can be organized in a more structured way::
end_declarations;

In this example we're using ``begin_struct(<structure name>)`` and
``end_struct(<structure name>)`` to delimite two structures named
``end_struct(<structure name>)`` to delimit two structures named
*some_structure* and *another_structure*. Within the structure delimiters you
can put any other declarations you want, including another structure
declaration. Also notice that members of different structures can have the same
name, but members within the same structure must have unique names.

When refering to these variables from your rules it would be like this::
When referring to these variables from your rules it would be like this::

mymodule.foo
mymodule.some_structure.foo
Expand Down Expand Up @@ -692,7 +692,7 @@ Setting variable's values
-------------------------

The ``module_load`` function is where you assign values to the variables
declared in the declarations section, once you've parsed or analized the scanned
declared in the declarations section, once you've parsed or analyzed the scanned
data and/or any additional module's data. This is done by using the
``set_integer`` and ``set_string`` functions:

Expand Down Expand Up @@ -798,7 +798,7 @@ in a dictionary:
set_integer(<value>, module, "foo[%s]", "key");
set_string(<value>, module, "bar[%s].baz", "another_key");
If you don't explicitely assign a value to a declared variable, array or
If you don't explicitly assign a value to a declared variable, array or
dictionary item it will remain in undefined state. That's not a problem at all,
and is even useful in many cases. For example, if your module parses files from
certain format and it receives one from a different format, you can safely leave
Expand Down Expand Up @@ -921,7 +921,7 @@ Here you have some examples:
The C type for integer arguments is ``int64_t``, for float arguments is
``double``, for regular expressions is ``RE_CODE``, for NULL-terminated strings
is ``char*`` and for string possibly contaning NULL characters is
is ``char*`` and for string possibly containing NULL characters is
``SIZED_STRING*``. ``SIZED_STRING`` structures have the
following attributes:

Expand Down Expand Up @@ -968,7 +968,7 @@ the corresponding ``YR_OBJECT`` first. There are two functions to do that:
the top-level ``YR_OBJECT`` corresponding to the module, the same one passed
to the ``module_load`` function. The ``parent()`` function returns a pointer to
the ``YR_OBJECT`` corresponding to the structure where the function is
contained. For example, consider the following code snipet:
contained. For example, consider the following code snippet:

.. code-block:: c
Expand Down
4 changes: 2 additions & 2 deletions docs/writingrules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ Executable entry point

Another special variable than can be used on a rule is ``entrypoint``. If file
is a Portable Executable (PE) or Executable and Linkable Format (ELF), this
variable holds the raw offset of the exectutable’s entry point in case we are
variable holds the raw offset of the executable’s entry point in case we are
scanning a file. If we are scanning a running process, the entrypoint will hold
the virtual address of the main executable’s entry point. A typical use of
this variable is to look for some pattern at the entry point to detect packers
Expand Down Expand Up @@ -1133,7 +1133,7 @@ Including files

In order to allow you a more flexible organization of your rules files,
YARA provides the ``include`` directive. This directive works in a similar way
to the *#include* pre-procesor directive in your C programs, which inserts the
to the *#include* pre-processor directive in your C programs, which inserts the
content of the specified source file into the current file during compilation.
The following example will include the content of *other.yar* into the current
file::
Expand Down
12 changes: 6 additions & 6 deletions libyara/ahocorasick.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int _yr_ac_queue_push(
pushed_node = (QUEUE_NODE*) yr_malloc(sizeof(QUEUE_NODE));

if (pushed_node == NULL)
return ERROR_INSUFICIENT_MEMORY;
return ERROR_INSUFFICIENT_MEMORY;

pushed_node->previous = queue->tail;
pushed_node->next = NULL;
Expand Down Expand Up @@ -484,7 +484,7 @@ int _yr_ac_find_suitable_transition_table_slot(
automaton->m_table, m_bytes_size * 2);

if (automaton->t_table == NULL || automaton->m_table == NULL)
return ERROR_INSUFICIENT_MEMORY;
return ERROR_INSUFFICIENT_MEMORY;

memset((uint8_t*) automaton->t_table + t_bytes_size, 0, t_bytes_size);
memset((uint8_t*) automaton->m_table + m_bytes_size, 0, m_bytes_size);
Expand Down Expand Up @@ -548,7 +548,7 @@ int _yr_ac_find_suitable_transition_table_slot(
// link must be used instead.
//
// The transition table for state S starts at T[S] and spans the next 257
// slots in the array (1 for the failure link and 256 for all the posible
// slots in the array (1 for the failure link and 256 for all the possible
// transitions). But many of those slots are for invalid transitions, so
// the transitions for multiple states can be interleaved as long as they don't
// collide. For example, instead of having this transition table with state S1
Expand Down Expand Up @@ -605,7 +605,7 @@ int _yr_ac_build_transition_table(
yr_free(automaton->t_table);
yr_free(automaton->m_table);

return ERROR_INSUFICIENT_MEMORY;
return ERROR_INSUFFICIENT_MEMORY;
}

memset(automaton->t_table, 0,
Expand Down Expand Up @@ -775,7 +775,7 @@ int yr_ac_automaton_create(
yr_free(new_automaton);
yr_free(root_state);

return ERROR_INSUFICIENT_MEMORY;
return ERROR_INSUFFICIENT_MEMORY;
}

root_state->depth = 0;
Expand Down Expand Up @@ -850,7 +850,7 @@ int yr_ac_add_string(
next_state = _yr_ac_state_create(state, atom->atom[i]);

if (next_state == NULL)
return ERROR_INSUFICIENT_MEMORY;
return ERROR_INSUFFICIENT_MEMORY;
}

state = next_state;
Expand Down
Loading

0 comments on commit 6fd4883

Please sign in to comment.